Hi
I created a list in Python:
mylist=os.listdir("/User/Me/Folder")
now I have a list of files in a List.
What I would like to do is:
Take one file name after the other and add a URL to it:
/myurl/ + each item in mylist
And then I would like to write the result in a html template from Django.
So that it display all the images in...
Hey all,
I'm currently working my way through the learning curve that is LINQ and I could really use some assistance. I don't know if what I want is possible, but if I had to wager, I bet it is.
I currently have a list of objects called _tables and each of these objects has within it another list of objects exposed through the propert...
Hello,
I'm running into this problem often: I'm creating a function that needs to perform a series of operations on a value, whether that value be a single value or a list of values.
Is there an elegant way to do this:
def convert_val(val):
do a series of things to each value, whether list or single val
return answer or list of...
OK so I switched from JList to List because
1.) It doesn't overlap my drawn images
2.) It can have focus disabled yet track what's selected
Anyway, here's the error I get when I try to compile:
C:\Users\Dan\Documents\DanJavaGen\inventory.java:30: cannot find symbol
symbol : constructor List(java.lang.Object[])
location: class java.aw...
OK so I'm doing an ArrayList into a (awt) List and I'm getting the following errors when compiling.
C:\Users\Dan\Documents\DanJavaGen\ArrayList_INV.java:29: cannot find symbol
symbol : constructor List(java.lang.Object[])
location: class java.awt.List
list = new java.awt.List(arr.toArray());
^
C:\Users\Dan\Docume...
I am working in an android application that uses a list view. I currently have a XML for the row layout with only one text view. Based on certain conditions, some rows will have one additional button and some other rows may have 2 additional buttons. Can I override the getView method of the adapter class to do this logic? is there any pe...
Simple question: How to change a background color of a Java AWT List? By that I mean the list ITEM *not* the WHOLE list.
SO > Google
:)
...
If I have a list in a GNU Makefile, is it possible to create a new list with the original strings modified. This is would be perfect if there was the map higher-order procedure from some languages.
This is an example of what I'm trying to do
DIRS=A B C D
#apply some magic to create
DIRS_INCLUDE=-IA -IB -IC -ID
...
I have a group of buckets, each with a certain number of items in them. I want to make combinations with one item from each bucket. The loop should keep making different combinations until each item has participated in at least some defined number.
I can easily see how to run the loop and stop once a single element has been accessed a c...
My page should shown information like this:
No. Customer Bank_Name Amount
---------------------------
1. AAA Bank A 100
2. BBB Bank B 200
3. CCC Bank A 500
4. DDD Bank C 150
----------------------------
Total 950
How to sum amount as shown below:
Summary
No.Bank_Name...
Hello, I can do such thing in python:
list = ['one', 'two', 'three']
if 'some word' in list:
...
This will check if 'some word' exists in the list. But can I do reverse thing?
list = ['one', 'two', 'three']
if list in 'some one long two phrase three':
...
I have to check whether some words from array are in the string. I can...
I want to return arraylist of one table data out without using Bean/Transfer objects
ArrayList<MyBean> list = new ArrayList<myBean>();
not like above, because I dont have such MyBean Class in my application, but still i need to add each row of employee table to ArrayList
How can I do this ?
...
Can somebody explain to me whats wrong with the below piece of code ?
public static void main(String[] args) {
List<String> l = new ArrayList<String>();
l.add("1");
l.add("2");
l.add("3");
l.add("4");
for (int i = 0; i < l.size(); i++) {
if(l.get(i).equals("1"))
l.remove(l.get(i));
else
System.out.println(l.get...
Hello,
i need in double linked list in C, but it must be for different types. In C++ we use templates for it. Where can i find example in C for double linked list with abstract types items.
Thank you
...
We have a web project that contain its business methods in a class library project called "Bll.dll"
some methods of Bll.dll return List<> ...
from a source - that i don't remember now - told that returning Collection<> is better than returning List<>
Is it a valid ?
Note that i don't make any process on values returned from BLL methods ...
I could not figure out how to implement two basic functionalities with the expandable lists: 1. The onClick for the child 2. Using linear layout for the children, so that I can have multiple clickable items in same row under the parent item
Can somebody help me with some sample code for the above?
...
Given a list of unsorted numbers, I want to find the smallest number larger than N (if any).
In C#, I'd do something like this (checks omitted) :
var x = list.Where(i => i > N).Min();
What's a short, READABLE way to do this in Python?
...
I am returning a SQL dataset in SSRS (Microsoft SQL Server Reporting Services) with a one to many relationship like this:
ID REV Event
6117 B FTG-06a
6117 B FTG-06a PMT
6117 B GTI-04b
6124 A GBI-40
6124 A GTI-04b
6124 A GTD-04c
6136 M GBI-40
6141 C GBI-40
I would like to display it as a comma d...
I am building a list that will be sorted by the alphabet and am looking for a solution to grab the database result and sort it like this: photo
Any help is greatly appreciated!
...
I have tried almost everything and I can't seem to get my lists to order themselves.
Here's some code:
private List<Person> names = new ArrayList<Person>();
private Map<Integer, Person> peopleMap = new TreeMap <Integer, Person>();
for(int i = 0; i<20; i++)
{
Person personOne = new Person();
peopleMap.put(personO...