Hello,
I have a rather simple question but i can't seem to find an answer to it.
I want when i click on any place on web page a div is opened. how can i accomplish that CSS style.
Thanks.
Hi,
Suppose I have an element like this:
<div id="dv" class="red green blue">Something Here !!</div>
How do I get each of those class names using jquery? Should be simple, right?
Really simple question - how do I do a search to find all records where the name starts with a certain string in ActiveRecord. I've seen all sorts of bits all over the internet where verbatim LIKE SQL clauses are used - but from what I've heard that isn't the 'correct' way of doing it.
Is there a 'proper' Rails way?
Hi,
i have a list with objects. The object has a property 'Sales' which is a string.
Now i want to create a list of doubles with the values of all objects' 'Sales' properties.
I tried this:
var tmp = from n in e.Result select new{ Convert.ToDouble ( n.Sales) };
but this gives me this error:
Error 106 Invalid anonymous type member declarator. Anonymous type members must be declared with a member assignment, simple name or member access.
So... I want to return value when C# function is called. I need a code example (simple summ of a,b values will be ok) Please help
I need something like this ( I know ActionScript so I will write in it):
public function sum(valueA:int, valueB:int):int
{
var summ:int = valueA + valueB;
return summ;
}
How to translate it into C#?
Hi,
I'm trying to a create an update statement along the following lines:
TABLE car: id | owner_id | type | status
An owner can have multiple cars.
UPDATE car c
SET c.type = 1
WHERE c.owner_id IN ($ids)
AND c.status = [1 IF IT EXISTS, ELSE 0]
$ids is reasonably small (under 50 values).
It seems simple but I can't seem to get my head around it because I can't use a SELECT subquery with an UPDATE to the same table.
Anyone?
Thanks
Many Windows apps (like Skype or MSN for instance) don't let you start multiple instances, rather trying to run it a 2nd time just leaves the existing version running.
Is this typically done in some simple way - the start-menu shortcut is a 'wrapper' app around the main app - or is there some registry magic you can do to delegate the problem to Windows itself?
Specifically dealing with Win32 here (unmanaged C++) but happy to hear more general solutions as long as they are workable on Windows XP or alter.
This is my first question on Stack Overflow, I would like to know about any c programming books that have real programs to introduce real problems as opposed to standard books with examples aimed to teach the language it should be sort of like a challenge with solutions so that concepts like recursion can be used i know that i should find solutions to existing problems to learn the language but this is my first attempt and i find it hard to understand some simple problems so i was hoping for a book with solutions.
So I have a model that has a field, which originally defaulted to not allow nulls. I want to change it to allow nulls, but syncdb doesn't make the change. Is it as simple as changing it in the database and reflecting it in the models.py file just for the next time its run against a new database?
I have a simple perl script that via ftp uploads files to the server hosting our website. After I do that I have to login as a Wordpress admin and use the GUI to edit a page so that it reflects the new file I just uploaded. I want to programmatically edit that file to save a few steps, but I can't find the file. Are any Wordpress files sitting on the server? The file in question is basically a subpage of the main site.
What is the significance of Thread.Join method in c sharp .net ?
MSDN says that it blocks the calling thread until a thread terminates. Can anybody explain this with a simple example ?
I just started using mysql and I just can see myself woking with strings!
I mean the compiler cant catch errors like this... and its just a mess!
is there a wrapper or some kind of class i can add that does something as simple as making a function that adds a table and asks for args?
I'm sure there is a tool like that but i cant find it or know its name.
plz help.
I have this simple form:
<form method="post" action".">
<input type="text" name="title">
<input type="submit" name"send">
</form>
I want that when a user click on submit, then will be open another window of browser with the results. Is it possible ?
have the tweetmeme button on my site (http://SweatingTheBigStuff.com) and I want to add a facebook button BELOW it.
Right now the tweetmeme settings show:
float: right; margin-left: 10px;
What's the best Facebook plugin for this and what settings do I need?
I think the Simple Facebook Share Button should be good but I'm not sure the bit of code I should put to move it below the tweetmeme button.
Hi, This is a simple question:
I have 2 different view controllers, and each one has its own data stored in its .m file.
I want to take a value, for instance, an integer value (int i=3;) that is declared in ViewController1 and pass it to ViewController2, so I will be able to use that value in the second view controller.
Can anyone please tell me how to do it?
Thanks in advance,
Sagiftw
How does one construct and access a set of key-value pairs in C? To use a silly simple example, let's say I want to create a table which translates between an integer and its square root.
If I were writing javascript, I could just do this:
var squareRoots = {
4: 2,
9: 3,
16: 4,
25: 5
}
and then access them like:
var squareRootOf25 = squareRoots[5]
What's the prettiest way to do this in C? What if I want to use one type of enum as the key and another type of enum as the value?
Hi, I am opening a new popup window on click of an URL in my page.
My question over here is Can i pass whole structure to the new page ?
If thats not possible is there any simple method to do that ?
Hi all,
I have got a simple HTMl form with one field as follows:
<input type="text" name="data['User']['user_id']" id="data['User']['user_id']" value="1">
$(document).ready(function(){
$("#data['User']['user_id']").mouseover(function(){
alert("hello");
});
});
The code couldn't work,
I think it may be the name of the Input text field that caused the problem,
but I don't know how to alter it
because this is the naming convention in CakePHP.
Hi All,
I am new to iPhone development. I want to make a simple iPhone application which when launched computes the distance travelled by the user,calories burnt,postion of the user,movement.Can anybody provide me the details or approach to follow to develop this application.
I have built two programs in C# and I am sending simple strings through the sockets. This is fine for the moment but in the near future I will need to send more complicated items, such as objects down the sockets and eventually files.
What steps would I take to do this? What purpose do the buffers serve for the sockets/streams? Apologies if I am a little vague.
Is there a simple way to see if the xsd code generating C# code has a particular column? Or if you can reference a variable column? table.getColumn("column") instead of table.column?
I am really confused, I want to create one list that holds 2 Images and 2 labels as follows.
+----------------------+ ROW1
|Image1 Image2 Lebel1 |
| Lebel2 |
+----------------------+ ROW2
|Image1 Image2 Lebel1 |
| Lebel2 |
+----------------------+
But i don't want it in a table/columns it should be simple selectable rows without any borders.
Which widget i should use for this and how?
Thanks,
PP.
Hello, In MS SQL Server is there a way to detect whether a database has had its isolation level set via the T-SQL command ALTER DATABASE <database> SET READ_COMMITTED_SNAPSHOT ON;
I cannot find a simple way to detect this in either T-SQL or via the Management Studio's GUI.
TIA