In a form_tag, there is a list of 10 to 15 checkboxes:
<%= check_box_tag 'vehicles[]', car.id %>
How can I select-all (put a tick in every single) checkboxes by RJS? Thanks
I am using LINQ expressions in my code
like this
var obj = Collection.Single(collection = (collection.ShortName.Equals("AAA")));
The problem is that this line works fine for me, no problems.
But when I upload the same executable to some remote machine with same 32 bit Windows XP. The code execution is just stopping at this line of source.
Can anyone help me.
I have a struct like this, with an explicit conversion to float:
struct TwFix32
{
public static explicit operator float(TwFix32 x) { ... }
}
I can convert a TwFix32 to int with a single explicit cast: (int)fix32
But to convert it to decimal, I have to use two casts: (decimal)(float)fix32
There is no implicit conversion from float to either int or decimal. Why does the compiler let me omit the intermediate cast to float when I'm going to int, but not when I'm going to decimal?
I have a Windows 2008 server with two IP addresses assigned to a single NIC. The DNS settings are setup to register the connections's addresses on the DNS server. nslookup shows both IP addresses for the server name. How is name resolution done in this case, i.e. which IP address does the DNS server return for a host lookup? Or does it return both, and the client selects one of the addresses?
Its not urgent but I was just wondering how one would go about authenticating against a single db using python and openfire? Is there a simple module that will do this?
var result = (
from contact in db.Contacts
where contact.ContactID == id
join referContactID in db.ContactRefferedBies on contact.ContactID equals referContactID.ContactID
join referContactName in db.Contacts on contact.ContactID equals referContactID.ContactID
orderby contact.ContactID descending
select new ContactReferredByView
{
ContactReferredByID = referContactID.ContactReferredByID,
ContactReferredByName = referContactName.FirstName + " " + referContactName.LastName
}).Single();
Problem is in this line:
join referContactName in db.Contacts on contact.ContactID equals referContactID.ContactID
where referContactID.ContactID is called from the above join line. How to nest these two joins?
Thanks in advance!
Ile
HI
Let me explain what i wont to do.I have a form and there is 10 picturebox on it.when I click one of them I wont to hide all other except clicked.It is possible that on click event of all of them hide others.but I ask for efficent way.forexample with a single function call from click event maybe
I'm an administrator of 10-20 separate WordPress blogs, and it's a big pain for me to login to all of them separately. Is there some sort of interface that allows me to do a single-sign-on administration of all of them, like there is under a WordPress MU umbrella?
If so, what's it called? I don't even know the term I'd use to search for this.
Hi guys,
I'm just writing an App for displaying the route between two coords (lat, long) in google maps view.
Displaying an single coord (even with a marker) works fine, but how to do this with 2 ones and the route between them?
I must admit that I'm quite new to Android and the maps-API...
I have two wars which I deploy in two maven projects using tomcat plugin.
I want to do this in one step and be able to deploy more than one war in a single maven project.
How can I do this? any suggestions?
What is the best way to set the RGB components of every pixel in a System.Drawing.Bitmap to a single, solid color? If possible, I'd like to avoid manually looping through each pixel to do this.
Note: I want to keep the same alpha component from the original bitmap. I only want to change the RGB values.
I looked into using a ColorMatrix or ColorMap, but I couldn't find any way to set all pixels to a specific given color with either approach.
I'm writing for an atmel at91sam9260 arm 9 cored single board computer [glomation gesbc9260]
Using request_mem_region(0xFFFFFC00,0x100,"name"); //port range runs from fc00 to fcff
that works fine and shows up in /proc/iomem
then i try to write to the last bit of the port at fc20 with
writel(0x1, 0xFFFFFC20);
and i segfault...specifically "unable to handle kernel paging request at virtual address fffffc20.
I'm of the mind that i'm not allocating the right memory space...
any helpful insight would be great...
The question is pretty simple, is it possible to create a FIPS 140-2 compliant server in Perl? Especially, is it possible without modifying any of the C code for the modules? If it's not possible in straight Perl, what would be the easiest way to go about it from a C perspective?
I'm basically creating a mini-httpd that only serves up a single file, but due to security restrictions it needs to be served up on SSL under FIPS compliance.
Consider the below program
myThread = new Thread(
new ThreadStart(
delegate
{
Method1();
Method2();
}
)
);
Is it that 2 threads are getting called parallely(multitasking) or a single thread is calling the methods sequentially?
It's urgent.
I want to allow users add files to the application document folder, so I used the iTunes file sharing. The problem is they can only add single files with a flat structure. I want to drag and drop whole folder (even with sub folders) and keep the structure.
Questions I have:
is it possible with iTunes file sharing?
if not, is there an open source project that helps me with writing a pc side app that talks to the iPhone side app and pushes the files into it?
I have a page, where I have approximately 90 items I need to output. Most of them are object properties (I am using ORM so these objects map to my database tables). But the question is, do I have to escape each of those 90 outputs by applying functions to each (in my case, the htmlspecialchars)? Wouldn't that add a bit of an overhead (calling a single function 90 times)?
I have a single MYSQL Question and need help ASAP.
Database:
Email | Name | Tag
[email protected] |Test Person | TagOne
[email protected] |Test Person | Tag Two
Need an SQL query that will return
Email | Name | Tag
[email protected] |Test Person | TagOne, Tag Two
Any help?
We are facing the following problem in a Spring service, in a multi-threaded environment:
three lists are freely and independently accessed for Read
once in a while (every 5 minutes), they are all updated to new values. There are some dependencies between the lists, making that, for instance, the third one should not be read while the second one is being updated and the first one already has new values ; that would break the three lists consistency.
My initial idea is to make a container object having the three lists as properties.
Then the synchronization would be first on that object, then one by one on each of the three lists.
Some code is worth a thousands words... so here is a draft
private class Sync {
final List<Something> a = Collections.synchronizedList(new ArrayList<Something>());
final List<Something> b = Collections.synchronizedList(new ArrayList<Something>());
final List<Something> c = Collections.synchronizedList(new ArrayList<Something>());
}
private Sync _sync = new Sync();
...
void updateRunOnceEveryFiveMinutes() {
final List<Something> newa = new ArrayList<Something>();
final List<Something> newb = new ArrayList<Something>();
final List<Something> newc = new ArrayList<Something>();
...building newa, newb and newc...
synchronized(_sync) {
synchronized(_sync.a) {
_synch.a.clear();
_synch.a.addAll(newa);
}
synchronized(_sync.b) { ...same with newb... }
synchronized(_sync.c) { ...same with newc... }
}
// Next is accessed by clients
public List<Something> getListA() {
return _sync.a;
}
public List<Something> getListB() { ...same with b... }
public List<Something> getListC() { ...same with c... }
The question would be,
is this draft safe (no deadlock, data consistency)?
would you have a better implementation suggestion for that specific problem?
update
Changed the order of _sync synchronization and newa... building.
Thanks
In a single-module project, I don't see how to get a 'classified' artifact from the project itself into the descriptor and thus the assembly. Do I list it as a dependency?
I am using Applescript to create a macro where data is transferred from several files to a single file. Data is copied with
copy range the_range destination clipboard
and pasted with
paste worksheet active sheet destination range "A1"
The problem is that most of the formatting is lost and I have not managed to get the "paste special"-syntax correct. I have downloaded "Excel2004AppleScriptRef.pdf".
If I want to validate that a text box contains an integer greater than or equal to zero. Do I need to use TWO asp:CompareValidator controls: one with a DataTypeCheck operator and one with a GreaterThanEqual operator?
Or is the datatype operator redundant? Can I just use a single validator with the GreaterThanEqual operator (and the type set to Integer)?
I have this project that i need to add a translation to. I already know how to add localisation to single image files, but there are 200+ images with text on it in that project. Do i really have to click one file at a time, "get info", click "add localisation" enter the Language and click OK for every file?
When i select multiple images the languages and do those steps the new language is not added :-/
Please someone have a way to save me from insanity ;-)
Thanks!
S
I have several very large XML files and I'm trying to find the lines that contain non-ASCII characters. I've tried the following:
grep -e "[\x{00FF}-\x{FFFF}]" file.xml
But this returns every line in the file, regardless of whether the line contains a character in the range specified.
Do I have the syntax wrong or am I doing something else wrong? I've also tried:
egrep "[\x{00FF}-\x{FFFF}]" file.xml
(with both single and double quotes surrounding the pattern).
Our development cycle rarely requires a branch so we have what tfs appears to consider a single, never-ending development cycle. Our problem is that each build includes an ever increasing long "Generating list of changesets and updating work items" step that includes all changesets/work items back to day 1.
What is the proper step that we need to perform to formally lock and label (wrong terms I'm sure) the source tree so that a new cycle of changesets and work items can begin.
Thanks!