List.nth is 'T list - int - 'T, rather than the standard int - 'T list - 'T like Seq.nth.
This makes pipeline somewhat awkward.
Is there something behind the scene?
I don't know why.
Hello everybody,
I'm using this codes for listing custom field values into drop-down list element on this category in Wordpress (screenshot is here what i'm point out).
So there are duplicate items on drop-down list and how i can delete duplicate entries on list?
Thanks in advance.
I guess this is simple, but i couldnot figure it out.
i have a dropdown list with values
America
Asia
Europe
I need to the display the ddl as Select Type and when i click it, it should display the three values, but i should not use Select Type as a list item and it should not be displayed in the list. It should only be used as a default text in ddl.
Thanks,
If I want a list initialized to 5 zeroes, that's very nice and easy:
[0] * 5
However if I change my code to put a more complicated data structure, like a list of zeroes:
[[0]] * 5
will not work as intended, since it'll be 10 copies of the same list. I have to do:
[[0] for i in xrange(5)]
that feels bulky and uses a variable so sometimes I even do:
[[0] for _ in " "]
But then if i want a list of lists of zeros it gets uglier:
[[[0] for _ in " "] for _ in " "]
all this instead of what I want to do:
[[[0]]*5]*5
Has anyone found an elegant way to deal with this "problem"?
I need to deploy a new List View for the standard List View Web Part in MOSS 2007 via the object model (the list already exists, a new view should be added). I need and want to make this list view read-only. This is because saving changes to the view would corrupt modifications made to Header/Footer.
How can I do that via the object model? I looked at the content db, the read-only flag (0x20) is stored with the view and could technically be updated using calls to proc_GetAllWebPartsOnPage and proc_UpdateView[Properties]. NOTE: The database interface and all mentioned stored procs are all documented by Microsoft.
Is there ANY way to do that via the object model, because I would strongly prefer that?
I currently have two Model classes:
class Leaders: List<Leaders>
{
public string LeaderName { get; set; }
public string PrecintName { get; set; }
}
public class MarketReport
{
//A list of activists
public Leaders leaderlist { get; set; }
}
Now, I have no idea if I am doing the above correctly, but I want to populate the list within the MarketReport
foreach (var store in stores)
{
MarketReport.leaderlist.AddItem //I want to add an item of type Leader to the list
//so that I can pass it to MVC view
}
I am making a shopping list app. When an item is added to the text input, it should be converted into a list item with a class of "tile" and added to the beginning of the list with a class of ".shopping_item_list". Here is my HTML:
<section>
<h1 class="outline">Shopping List Items</h1>
<ul class="shopping_item_list">
<li class="tile">Flowers<span class="delete">Delete</span></li>
</ul>
</section>
My jQuery:
$("input[name='shopping_item']").change(function() {
var item = $(this).val();
$("<li class='tile'>+ item +</li>").prependTo(".shopping_item_list");
$(".tile").removeClass("middle");
$(".shopping_item_list li:nth-child(3n+2)").addClass("middle");
});
This isn't working, and I can't figure out why. I'm new to jQuery.
Also, I need to add the "delete" span to the list item and am not sure how.
Thanks for any help you can offer!
Edited to add:
Thanks to the feedback here, I was able to make it work with:
$("input[name='shopping_item']").change(function() {
var item = $(this).val();
$("<li class='tile'>" + item + "<span class='delete'>Delete</span>" + " </li>").prependTo(".shopping_item_list");
$(".tile").removeClass("middle");
$(".shopping_item_list li:nth-child(3n+2)").addClass("middle");
});
However, in my jquery, I have functions for the classes "tile" and "delete" that are not working for newly added items.
// hide delete button
$(".delete").hide();
// delete square
$(".tile").hover(function() {
$(this).find(".delete").toggle();
});
$(".tile").on("click", ".delete", function() {
$(this).closest("li.tile").remove();
$(".tile").removeClass("middle");
$(".shopping_item_list li:nth-child(3n+2)").addClass("middle");
});
// cross off list
$(".tile").click(function() {
$(this).toggleClass("deleteAction");
});
The new items, which have these classes applied aren't using these functions at all. Do I need to add the functions below the add item? Does the order in which they appear in my js file matter? Do I need to add some kind of function?
i'm trying to get a list of the most recent used applications. NSWorkspace returns me a list of active applications and i can sort them on a few options using NSRunningApplication. see list below:
launchDate
finishedLaunching
processIdentifier
i dont want the lauch date but the recent 'active' date (like the way cmd-tab sorts).
Does anyone knows the solution for this?
Most mainstream IDEs use code-completion in the form of a linearlist of suggestions (typically methods).
Are there any IDEs (mainstream or not) or IDE plugins that use a non-linear widget, such as a tree? (e.g., pick category first, then the actual recommendation)?
I'm working on an IDE feature and want to make sure I'm not reinventing the wheel or infringing some patent.
My slides say that
A recurssive call should always be on a smaller data structure than the current one
There must be a non recurssive option if the data structure is too small
You need a wrapper method to make the recurssive method accessible
Just reading this from the slides makes no sence, especially seeing as it was a topic from before christmas!
Could anyone try and clear up what it means please?
Thank you
I am kind of new to web development. I am trying to create a drop down menu, something I have now is like:
<select>
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="opel">Opel</option>
<option value="audi">Audi</option>
</select>
but this is not exactly what I want. I want to create a drop down list very similar to the one on Amazon.com (the dropdown list beside "Search"), shown in following pic. so whenever user click on the button, the list will be displayed in the button as text. Please feel free to give me any ideas.
Thank you,
This should probably be pretty simple but my Google-Fu is as yet unable to find an answer. I simply want to create a dropdown list in Access so that upon selection I can perform some action based on the value of the selection. For instance, I have a list of people and I would like to populate the combo box so that their names appear in the list but the "value" is set to their ID (the primary key).
I have an application that requires we use distinct user connection strings per user. We are trying to upgrade from SubSonic 2.x to 3.0. I'm running into issues with trying to create a List< of objects. When I try to create a List like this:
List<table_name> oList = table_name.All().Where(tn => tn.table_id == TableId).ToList();
I get the error "Connection string 'ConnectionStringName' does not exist."
So, I try to create the List< like this:
List<table_name> oList = table_name.All(sConnectionString, "System.Data.SqlClient").Where(tn => tn.table_id == TableId).ToList();
I get the error "The name 'table_name' does not exist in the current context."
I'm using SQL Server, and the sConnectionString is definitely verified to be a good connection string, and the table_name is a table in the database. What am I doing wrong?
On iOS, I am looking for the proper way to return the URLs for a list of files that are in a directory.
/images
1.jpg
2.jpg
3.jpg
...
I know the URL for the directory and know all the files in the directory will be of type jpeg. It is not clear to me how to properly format the NSURLRequest to return the list of files in the images directory. Once the list is returned, I will iterate through it to return the individual images.
I'm creating a mobile website with jQuery, and I was wondering if there was a way to align a list to the bottom of a page, I just want the list to stay at the very bottom of the page, and be fixed in the spot. Thanks
This is the list im trying to get fixed on the bottom of the page:
<div data-role="content">
<div class="content-primary">
<ul data-role="listview">
<li><a href="link.html"><img src="file.jpg" /><h3>List name</h3></a>
</li>
</div>
The err part is Capitalized in the code, it also comes in foreaching. Because of the abstract list, it cannot be initialized, declaration is in a static field. The lists have the same type.
import java.util.*;
public class Test
{
public static final List<String> highPrio = Arrays.asList("*","/");
public static List<String> ops;
public static void main(String[] args)
{
//ERROR HERE, why do it throw nullPointer?
ops.addAll(highPrio);
for(String s : ops)
{
System.out.println(s);
}
}
}
Is it possible to link one MDB to another in a standalone manner?
Ie. If I have the accounts table in db1.mdb and the products table in db2.mdb, can both these MDBs be coded so that they can link to each of the tables in a seamless manner?
I have a WCF WebService that uses LINQ and EF to connect to an SQL database. I have an ASP.NET MVC front end that collects its data from the webservice.
It currently has functions such as
List<Customer> GetCustomers();
As the number of customers increases massively the amount of data being passed increases also reducing efficiency. What is the best way to "page data" across WebServices etc.
My current idea is to implement a crude paging system such as
List<Customer> GetCustomers(int start, int length);
This, however, means I would have to replicate such code for all functions returning List types. It is unfortunate that I cannot use LINQ as it would be much nicer.
Does anyone have any advice or ideas of patterns to implement that would be "as nice as possible"
Thanks
Hi,
I have a sharepoint List.We will get the data from TEAMCENTER from there we will enter manually into the List.
Inorder to automatically update the sharepoint List with Teamcenter data is there any way????
I have a list of items sorted alphabetically:
list = [a,b,c,d,e,f,g,h,i,j]
I'm able to output the list in an html table horizonally like so:
| a , b , c , d |
| e , f , g , h |
| i , j , , |
What's the algorithm to create the table vertically like this:
| a , d , g , j |
| b , e , h , |
| c , f , i , |
I'm using python, but your answer can be in any language or even pseudocode.
Thanks
Hi,
im using $this-widgetSchema-setFormFormatterName('list'); this way
below to render my form as a list but it is still a table. Any idea?
public function configure()
{
parent::configure();
$this->widgetSchema->setFormFormatterName('list');
}
}
Any idea?
Javi
I need to let my users enter a variable length list of items into something that looks like a grid view (or a series of standard text boxes stacked vertically). Each item could be a few characters or a few hundred characters long, and I just want them to enter a "sentence", and then tab to the next row, and always having another blank one ready to go at the bottom of the list.
I don't want to save any data to my SQL Server DB until they enter the entire list and then click on a "save all" button.
When they hit the "save all" button they will be given a preview screen where the data will be presented as standard HTML ordered list.
If they confirm/save, then each row of the grid will then be saved as a separate row into my SQL Server database (with an index to remember the order).
What ASP.Net (or Jquery/javascript) UI control would be the best to use in this situation?
I need to walk a link list in the kernel debugger. How can I determine the head pointer and walk the list?
I have a listing and can find the address and location in the code where I check to see if I have a head, so I know the specific code location and address. But not sure how to determine the pointer or how to determine the next element and pointer on the list.
I have a IList. where the object PersonDetails consists of the persons name, address and phone number. The list consists of more than 1000 person details. I would like to display 50 PersonDetails per page. Is there a way to select only 50 elements from the list, and return them.
For example.
myList.select(1,50)
myList.select(51, 100)
I am able to select only first 50 by using. myList.Take(50);
The entire list is at the wcf service, and i would like to get only fifty elements at a time.