Perhaps this is not the proper place to ask this question, if that is the case, please direct me to the correct venue.
I'm looking for research, guides, any kind of information pertaining to the structuring and styling of results sets; data which comes back from a search, or when looking at content in a list view.
Links would be appreciated, but opinion and commentary are also valued.
I have a list in python ('A','B','C','D','E'), how do I get which item is under a particular index number?
Example:
Say it was given 0, it would return A.
Given 2, it would return C.
Given 4, it would return E.
I have the following code:
l = ['-1.2', '0.0', '1']
x = 100.0
for i in l:
if i < x:
x = i
print x
The code should find the lowest value in my list (-1.2) but instead when i print 'x' it finds the value is still 100.0
Where is my code going wrong?
Hi there.
I need to take the results of a query:
var query = from m in db.SoilSamplingSubJobs where m.order_id == id select m;
and prepare as an ICollection so that I can have something like
ICollection<SoilSamplingSubJob> subjobs
at the moment I create a list, which isnt appropriate to my needs:
query.ToList();
what do I do - is it query.ToIcollection() ?
hi,
is it possible to play movies out of a property list? Like is there's a "tag" with the filename in it which gets replaced by the actual iphone/ipad player? The movies are h.265 codec...
thanks
I wanted to display a long list of strings from an array.
Right now, my script run through a for loop echoing each value to the standard output:
for value in ${values[@]}
do
echo $value
done
Yeah, that's pretty ugly! And the one column listing is pretty long too...
I was wondering if i can find a command or builtin helping me to display all those values in columns, like the ls command does by default when listing a directory (ls -C).
may be too simple groovy question but....please help
i have a list like this:
def ageList =[12,13,23]
i want to get this:
def newAgeList =[age:12,age:13,age:23]
could some one help me out?
thank you so much!
Suppose I have a list of lists of elements which are all the same (i'll use ints in this example)
[range(100)[::4], range(100)[::3], range(100)[::2], range(100)[::1]]
What would be a nice and/or efficient way to take the intersection of these lists (so you would get every element that is in each of the lists)?
For the example that would be:
[0, 12, 24, 36, 48, 60, 72, 84, 96]
I found a nice article:
http://911-need-code-help.blogspot.com/2012/07/youtube-iframe-embeds-video-playlist-and-html5.html
I am using the last option (Custom Playlist). But how to edit the embed code:
<iframe width="560" height="315" src="http://www.youtube.com/embed/T0Jqdjbed40?playlist=SyoA4LXQco4,6l6PPvUhR4c" frameborder="0" allowfullscreen></iframe>
in order to show my playlist name above thumbinails?
i tried to add listname="name", name="name", list="name" but it don't work
I have a data.frame:
df<-data.frame(a=c("x","x","y","y"),b=c(1,2,3,4))
> df
a b
1 x 1
2 x 2
3 y 3
4 y 4
What's the easiest way to print out each pair of values as a list of strings like this:
"x1", "x2", "y1", "y2"
Can you create a linked server in SQL Server 2008 and then refer to it with an alias.
So, I create a linked server to "SalesServer", but I give it the alias "Sales", so I can use it like this:
SELECT * FROM Sales.DB1.dbo.DailySales
Hello gurus,
Im trying to create link inside my list tag that will have href inherited from link that already exists in this list tag. Don't know how much sense does it makes, but i have this:
<ul>
<li><a href="page1.html">Support</a></li>
<li><a href="page2.html">Products</a></li>
<li><a href="page3.html">Management</a></li>
<li><a href="page4.html">Others</a></li>
</ul>
and I need soothing like this:
<ul>
<li>
<a href="page1.html">Support</a>
<div class="slideLink"><a href="page1.html">Click Here</a></div>
</li>
<li>
<a href="page2.html">Products</a>
<div class="slideLink"><a href="page2.html">Click Here</a></div>
</li>
<li>
<a href="page3.html">Management</a>
<div class="slideLink"><a href="page3.html">Click Here</a></div>
</li>
<li>
<a href="page4.html">Others</a>
<div class="slideLink"><a href="page4.html">Click Here</a></div>
</li>
</ul>
So far I have managed to add div with class and link within it with "click here" text, but i don't have a clue how to grab link href and add it to my new link.
$('ul li a').each(function(){
$(this).after("<div class='slideLink'><a href=" + Link + ">Read more</div>");
});
Thank you for your help in advance.
Best Regards
Dom
may be too simple groovy question but....please help
i have a list like this:
def ageList =[12,13,23]
i want to get this:
def newAgeList =[age:12,age:13,age:23]
could some one help me out?
thank you so much!
def fibSeq(n: Int): List[Int] = {
var ret = scala.collection.mutable.ListBuffer[Int](1, 2)
while (ret(ret.length - 1) < n) {
val temp = ret(ret.length - 1) + ret(ret.length - 2)
if (temp >= n) {
return ret.toList
}
ret += temp
}
ret.toList
}
So the above is my code to generate a Fibonacci sequence using Scala to a value n. I am wondering if there is a more elegant way to do this in Scala?
I'm looking for an efficient way of storing an ordered list/set of items where:
The order of items in the master set changes rapidly (subsets maintain the master set's order)
Many subsets can be defined and retrieved
The number of members in the master set grow rapidly
Members are added to and removed from subsets frequently
Must allow for somewhat efficient merging of any number of subsets
Performance would ideally be biased toward retrieval of the first N items of any subset (or merged subset), and storage would be in-memory (and maybe eventually persistent on disk)
So on my wordpress install. I am trying to display category list in the sidebar but having issue with wp_list_categories function. There are handful of categories in the system but this function just prints "NO Categories".
Can't figure out why.
Any ideas?
In XCode is it possible to build a clean version of my project and remove any saved property lists associated with it?
I'm refactoring my code constantly and the old property list that gets saved is causing my app to crash because the data has become old and rotten.
In C, it is considered bad practice to call strlen like this:
for ( i = 0; strlen ( str ) != foo; i++ )
{
// stuff
}
The reason, of course, is that it is inefficient since it "counts" the characters in a string multiple times.
However, in Python, I see code like this quite often:
for i in range ( 0, len ( list ) ):
# stuff
Is this bad practice? Should I store the result of len() in a variable and use that?
I have a method that takes a List<int>, which is a list of IDs. The source of my data is a Dictionary<int, string> where the integers are what I want a list of. Is there a better way to get this than the following code?
var list = new List<int>();
foreach (var kvp in myDictionary)
{
list.Add(pair.Key);
}
ExecuteMyMethod(list);
hi..
please someone help me about this.
i need to implement a list view with checkbox and each item should be assosiated with images.
ex:
[image1] list_item_1 [checkbox]
[image2] list_item_2 [checkbox]
'
.
.
please help me
I already have an iPhone application (version 1.0) available in the App Store and am ready to submit a newer version (version 1.1). How do I test the new upgrade to make sure that the current sqlite database and property list files on the earlier version do not get deleted/overwritten etc? The new version assumes the old data in both the sqlite database and property lists remain.
Or better yet, is there a resource I can use to walk me through what to watch for when developing an application update?