I have a Javascript Object like
var obj = {
key1: 'value1',
key2: 'value2',
key3: 'value3',
key4: 'value4'
}
How can I get the length and list of keys in this object.
I need a regular expression for a list of numbers in a text box with carriage returns and line feeds, but no other characters.
e.g.
1234
5678
5874
3478
I have this:
Regex(@"\d\r\n${0,}?");
... but it is accepting commas when I paste them into my text box:
e.g.
1234,
5678
5874,
3478
Can someone please tell me what I'm doing wrong?
Thanks
hi...
how to add a list to a button.. for example if i have four button like classic, western, jazz,pop.if i click classic button i should get subtitle .or if i click western i should get sub title... so how to creat
I generally have ignored using macros while writing in C but I think I know fundamentals about them. While i was reading the source code of list in linux kernel, i saw something like that:
#define LIST_HEAD_INIT(name) { &(name), &(name) }
#define LIST_HEAD(name) \
struct list_head name = LIST_HEAD_INIT(name)
(You can access the remaining part of the code from here.)
I didn't understand the function of ampersands(I don't think they are the address of operands here) in LIST_HEAD_INIT and so the use of LIST_HEAD_INIT in the code. I'd appreciate if someone can enlighten me.
How to efficiently generate a list of million random elements in scheme? The following code hits maximum recursion depth with 0.1 million itself.
(unfold (lambda(x)(= x 1000000)) (lambda(x)(random 1000)) (lambda(x)(+ x 1)) 0)
Hi All,
I m trying to leave a gap from left in select list, but its getting problem in firefox and safari please give me source code or any reference link from where i can work...
code which i use :
<select style="padding:10px">
<option>Male</option>
<option>female</option>
<option>other</option>
</select>
Thanks
Hi,
Ok so I have 2 list boxes one is connected to a database the other isnt.
I want to be able to send the selected item from the listbox connected to the database to the one that isnt.
Ive written this code
listBox2.Items.Add(listBox1.SelectedItem);
But instead of copyin the item i get "
System.Data.DataRowView
Anyone havin any advice?
I have a List of executables which may call a certain function. I need to find out which all execs call that function. I know I can do "strings -a " but is there some other better way to find that out. Full code is written in C.
I want to create the activity which will load the images from Web by using urls and i want to load that images in list view and i want some specific text and properties of that image in front of that image like the image below Click to see Image.Is there any way to store that images temporarily in phones memory.So how can i do this activity please give me perfect solution so that i can complete my application.How can i load the images from web.
Hello SO;
I'm trying to convert xml elements whose content is a csv list of identifiers, the exact form doesn't matter. I want to exclude every item that contains the character "/". The best I've come up with is
translate(./someElement, ",*/*", "")
but this has at least two problems; I'm pretty sure that xsl doesn't accept wildcards, and "," is an illegal character in xpaths.
Is there a straightforward way to do this sort of thing?
When I show a hidden div that is stored inside an <li> tag the icons are pushing down to the bottom of the <li>. How can I prevent this?
Here's the HTML:
<ul>
<li>Utah
<ul>
<li>Park City
<ul>
<li>Park Cat 1
<div><img class="portf_edit" /></div>
<div><img class="portf_archive" /></div>
<div><img class="portf_delete" /></div>
</li>
<li>Skiing
<div><img class="portf_edit" /></div>
<div><img class="portf_archive" /></div>
<div><img class="portf_delete" /></div>
</li>
</ul>
</li>
</ul>
</li>
</ul>
Here's the li css:
li {
list-style-type:none;
vertical-align: top;
list-style-image: none;
left:0px;
text-align:left;
clear: both;
}
.portf_edit{
float:right;
position: relative;
right:50px;
display:block;
}
.portf_archive{
float:right;
position: relative;
right:-5px;
display:block;
}
.portf_delete{
float:right;
position: relative;
right: -60px;
display:block;
}
Here's a screen shot prior to expanding which shows the icons how I want them to line up:
Here's the screen shot prior to expanding which shows where the icons are being pushed to:
I have anywhere from 5 to 10 generic list in an ASP.NET VB.NET web app. I would like to write a method to pass them all into, and return only the elements they all have in common.
I'm looking for some ideas how to accomplish this the easiest and cleanest way possible.
Hy,
i went from this page on internet http://studiostyles.info/schemes that have a particular rendering technique, the list grow when the page is rendered. Is there anyone that can explain me how it is possible?
Thanks in advance.
F.
I have a datatable having 44 rows.
I have converted that to list and want to take the rows from 4th row till the last(i.e. 44th).
I have the below program
IEnumerable<DataRow> lstDr = dt.AsEnumerable().Skip(4).Take(dt.Rows.Count);
But the output is Enumeration yielded no results
I am using c#3.0
Please help.
Looking for any help regarding the problem. Here's the deal: I have a database that has a teams table and it contains team_id. On one of my pages, I generate a list of links that contain the team_id of the creator in their get URL. I need the team_id on the next page but can't figure out how to pass it through any other way. Using a form and POST isn't an option because this method would only pass through the last links data on the list. Storing in a session isn't an option either because there is no way to discretely pass the the variables I need to a function to set the session variables. I have tried and it can pretty easily be viewed from viewing the source code. So here's some sample code to see exactly what I'm dealing with.
<?
if(mysql_num_rows($result2)>0){ ?>
<a class="fltrt btn btn-danger btn-small" onclick="test()" href="acceptmatch-exec.php?match_id=<?php echo $match_id; ?>&team_id=<?php echo $team_id;?>&action=cancel">Cancel Match</a>
<?}else{?>
<a class="fltrt btn btn-success btn-small" href="acceptmatch-exec.php?match_id=<?php echo $match_id; ?>&team_id=<?php echo $team_id;?>&action=accept">Accept Match</a>
<?} ?>
The code above is generated multiple times on a page via a while loop that was excluded. I want to pass the match_id and team_id variables without being seen anywhere. If I made this a form, it wouldn't pass the correct variables unless there is only one result at the time (not likely). I'm sure there has to be an easy method that is eluding me, so please share thoughts on how to solve this. I feel as though I am not explaining it well enough, but it's not really easy to explain. I basically want something that works like GET but acts like POST and can be hidden from people viewing source code or link locations.
Thanks
In Resharper I edited the inspection severity of the 'use var keyword when possible' to ''do not show'.
But when I select a certain word in the code file, Resharper still shows a pencil with an Action list in the left border with the action 'use var'.
Where can I edit the actions that should be shown? I cannot find this option.
I want to add simple list/combo box with action script 3 . but i have not found anything in internet.
Can anyone give me sough rough idea with some dummy values
thanks
I have a list of tuples, say [{x, a, y}, {x, b, y}].
Is there a built-in function (or can I use a combination of BIFs) to delete all tuples matching {x, _, y}, as in match and delete based on the first and third term in the tuples, ignoring the second?
createSchedule([[math109]], fall, Out).
[[cs485, cs485], [cs355, cs355, cs462, cs462, cs462], [cs345, cs345, cs352, cs352, cs352, cs362, cs362, cs362, cs396, cs396, cs396], [cs330, cs330, cs330], [cs255, cs255, cs255, cs268, cs268], [math114, cs245, cs245], [math112, cs145, cs146], [math109]]
Out = _G431
this is what prolog returns and the list of lists is shown by using write(Out) in prolog.
Any ideas why it is showing this?
Thanks
Hi,
I'm trying to send a Python list in to client side (encoded as JSON), this is the code snippet which I have written:
array_to_js = [vld_id, vld_error, False]
array_to_js[2] = True
jsonValidateReturn = simplejson.dumps(array_to_js)
return HttpResponse(jsonValidateReturn, mimetype='application/json')
So my question is how to access it form client side, can I access it like this:
jsonValidateReturn[0]
or how I assign a name to the returned JSON array in order to access it?
I am trying to create an outlook distribution list with php but I am having a hard time finding any resources or instructions on how to do so. Is it even possible to do this?
I have a list of computers (stored in a database) and I want to find out the localadmins on those computers programmatically so that I can store that information in the database too.
I understand this can be done using powershell. But looking for a way to do the same thing using C#
how do I do that
Hi,
I want to check whether a string starts with any character in a list. My current implementation in C# is as follows:
char[] columnChars = new char[] { 'A', 'B', 'C', 'D', 'E' };
private bool startWithColumn(string toCheck)
{
for(int i=0; i<columnChars.Length; i++)
if (toCheck.StartsWith(columnChars[i]+""))
{
return true;
}
return false;
}
I would like to know if any solution is better?
I am having a data list that shows images and button under it. Now i want to download that images. I have written code for that. The problem is i want to access the image on click of button. How it can be done