One of the drop down lists in my Java SWT application has 8 fixed options. When I click on it only 5 first options are visible and I have to scroll the list down to view the rest.
Is there any way to force it to make all options visible without having to scroll down?
There is another similar .NET application that has same drop down list with the same options and they all are visible without having to scroll down!
my list has value such as
m=[['na','1','2']['ka','31','45']['ra','3','5']
d=0
r=2
t=m[d][r]
print t # this is givin number i.e 2
Now when I use this value
u=[]
u=m[t]
I am getting an err msg saying type error list does take str values...
i want to use like this how can i convert that t into a integer??
please suggest..
thanks..
How can I write a Linq expression that select item from a List and join them together ?
Example
IList<string> data = new List<string>();
data.Add("MyData1");
data.Add("MyData2");
string result = //some linq query... I try data.Select(x => x + ",");
//result = "MyData1, MyData2"
Hello, friends...
I want to create a list in a button click event...every time the button is clicked a new list should be created having different name than the previous one...
Can anyone please help me out...I'm stuck on it...
Hi,
Fastest way to uniqify a list in Python without preserving order? I saw many complicated solutions on Internet - could they be faster then simply:
list(set([a,b,c,a]))
?
This may be a bit of an easy, headesk sort of question, but my first attempt surprisingly completely failed to work. I wanted to take an array of primitive longs and turn it into a list, which I attempted to do like this:
long[] input = someAPI.getSomeLongs();
List<Long> = Arrays.asList(input); //Total failure to even compile!
What's the right way to do this?
Is it just me, or does expanding the listof databases in SQL Server 2008 Management Studio take significantly more time than expanding the listof databases in SQL Server 2005 Management Studio?
If it isn't just me, is there an explanation for this behavior? Whatever it is doing in the background that makes it take longer, can we turn that off? Is it configurable?
I know, it seems trivial, but I am perpetually being surprised at how long this takes.
I have a View Model that looks like this:
public class SomeViewModel
{
public SomeViewModel(IEnumerable<SelectListItem> orderTemplatesListItems)
{
OrderTemplateListItems = orderTemplatesListItems;
}
public IEnumerable<SelectListItem> OrderTemplateListItems { get; set; }
}
I then have an Action in my Controller that does this:
public ActionResult Index()
{
var items = _repository.GetTemplates();
var selectList = items.Select(i => new SelectListItem { Text = i.Name, Value = i.Id.ToString() }).ToList();
var viewModel = new SomeViewModel
{
OrderTemplateListItems = selectList
};
return View(viewModel);
}
Lastly my view:
@Html.DropDownListFor(n => n.OrderTemplateListItems, new SelectList(Model.OrderTemplateListItems, "value", "text"), "Please select an order template")
The code works fine and my select list populates wonderfully. Next thing I need to do is set the selected value that will come from a Session["orderTemplateId"] which is set when the user selects a particular option from the list.
Now after looking online the fourth parameter should allow me to set a selected value, so if I do this:
@Html.DropDownListFor(n => n.OrderTemplateListItems, new SelectList(Model.OrderTemplateListItems, "value", "text", 56), "Please select an order template")
56 is the Id of the item that I want selected, but to no avail. I then thought why not do it in the Controller?
As a final attempt I tried building up my select list items in my Controller and then passing the items into the View:
public ActionResult Index()
{
var items = _repository.GetTemplates();
var orderTemplatesList = new List<SelectListItem>();
foreach (var item in items)
{
if (Session["orderTemplateId"] != null)
{
if (item.Id.ToString() == Session["orderTemplateId"].ToString())
{
orderTemplatesList.Add(new SelectListItem { Text = item.Name, Value = item.Id.ToString(), Selected = true });
}
else
{
orderTemplatesList.Add(new SelectListItem { Text = item.Name, Value = item.Id.ToString() });
}
}
else
{
orderTemplatesList.Add(new SelectListItem { Text = item.Name, Value = item.Id.ToString() });
}
}
var viewModel = new SomeViewModel
{
OrderTemplateListItems = orderTemplatesList
};
return View(viewModel);
}
Leaving my View like so:
@Html.DropDownListFor(n => n.OrderTemplateListItems, new SelectList(Model.OrderTemplateListItems, "value", "text"), "Please select an order template")
Nothing!
Why isn't this working for me?
I am just starting off with C#. I managed to get a listof running processes and getting a particular process ID. Can someone tell me how to get a listof files that are opened by a given process ID?
Hi
Is there any way I can get a listof all the running Threads in the current JVM (including the Threads NOT started by my class)?
Is it also possible to get the Thread and Class objects of all Thread in the list?
I want to be able to do this through code.
I have a class that has an list<Book> in it, and those Book objects has many many properties.
How can I remove from that list every Book that his level value is different than, for example, 5?
can any one please let me know, i need to print/list Alphabetical(A-Z) char to manage Excel cells. Is there any php function to list Alphabetic?
I need result as
A1
B1
C1
D1
...
...
...
OR
A
B
C
...
...
how do i programatically add user permission to a list in sharepoint. i want to add the permission "Contribute" to a user or group for a certain list. im using c#
Thanks..
We have 40K+ groups in our active directory and we are increasingly facing problem of circular nested groups which are creating problems for some applications.
Does anyone know how to list down the full route through which a circular group membership exists ?
e.g.
G1 --> G2 --> G3 --> G4 --> G1
How do I list it down.
Hi
I have a listof points as shown below
points=[ [x0,y0,v0], [x1,y1,v1], [x2,y2,v2].......... [xn,yn,vn]]
Some of the points have duplicate x,y values. What I want to do is to extract the unique maximum value x,y points
For example, if I have points [1,2,5] [1,1,3] [1,2,7] [1,7,3]
I would like to obtain the list [1,1,3] [1,2,7] [1,7,3]
How can I do this in python
Thanks
Ok,
So problem here... when using list-style-position:inside in IE8 the first like is indented but every line after that is not. So the new lines appear under the bullet.
This is fine, but when I use a list with that css applied with an a tag within the li then the text automatically gets pushed to the second line, and the first line is empty.
When I remove the a tag from the li then it jumps back up.
Any idea on why this might be or is this a bug in the ie8 world or do I just need to double check my css?
Any insights would be much appreciated.
As asked here is some code
<div id="sub_nav">
<ul>
...
<li><a class="active_page" href="#">Liposculpture</a>
<ul>
<li><a href="#">What is Liposculpture?</a></li>
<li><a href="#">About Liposculpture surgery</a></li>
<li><a href="#" class="active_sub">After Liposculpture surgery</a></li>
<li><a href="#">Post Op Instructions</a></li>
<li><a href="#">Liposculpture Side Effects</a></li>
<li><a href="#">Liposuction Introduction to</a></li>
<li><a href="#">Tumescent Liposculpture</a></li>
</ul>
</li>
...
</ul>
</div>
For the CSS I will try and show it best I can
#sub_nav li {
width: 200px;
padding:4px 0;
border-bottom: 1px #CCC solid;
}
#sub_nav li a {
text-decoration: none;
color:#555;
padding:7px 15px 7px 15px;
display: block;
}
#sub_nav li ul li {
list-style-position: inside;
list-style-type: disc;
font: 11px Arial;
padding-left:15px;
color:#FFF;
border-bottom: none;
}
#sub_nav li ul li a {
padding:0;
margin:0;
text-indent: 0;
}
Hope this helps
Given a List<int> myValues which I know to be ordered, what is the quickest way to determine if X is in the given list?
Do I really have to write my own binary search?
Hi,
I have an object Trip in my object model containing a listof Nodes (e.g. NodeName, StartDate and EndDate) and I am trying to build a Custom control in WPF that draws listof rectangles: one for each Node contained in the Trip object (based on StartDate en EndDate)
Would you have any hint on how the Custom Control should be structured so that I can bind a Trip object to it and draw the rectangles properly, please?
If you take a look at http://www.c-sharpcorner.com/UploadFile/dhananjaycoder/activedirectoryoperations11132009113015AM/activedirectoryoperations.aspx, there is a huge listof properties for AD in one class.
What is a good way to refactor such a large listof (Related) fields? Would making seperate classes be adequate or is there a better way to make this more manageable?
Thanks
Android: How to Add Static row in list view
I have a requirement where i need to add the Static row as first row in list view
Thanks in advance for help..
how should I list a form controls in a Combobox of the same form(like VS designer does)?
I tried:
cboObjectSelection.DataSource = Me.Controls
but this does not work.
Is there a possibility to filter(customize) this list?
Hello friends.. I have three columns in the jquery grid with all three column has dropdown list boxes..
if you select first dropdown list box any value i need to enable second one.. if you senlect second I need to enable third one..using jquery...
thanks
given a listof python strings, how can I automatically convert them to their correct type? Meaning, if I have:
["hello", "3", "3.64", "-1"]
I'd like this to be converted to the list
["hello", 3, 3.64, -1]
where the first element is a stirng, the second an int, the third a float and the fourth an int.
how can I do this? thanks.