Is there any textbox comoponent(control) which is counting back from the maxlength?
I can write it but i would like to find a control which has this function.
I have such an object :
var options = {1: 'Running', 2: 'Falling', 3: 'Collapsing wall',
4: (...)};
I'd like to create form's select element with ooptions taken from this object, so something like that (code I tried which is not working, but you can get the idea) :
html = '<form action="" ><select name="block-action"><option>-------</option>';
for(k in obj){
html += '<option value="'+k+'">'+obj[k]+'</option>'
}
html += '</select></form>'
How can I set a conditional breakpoint to a function's 3rd line in GDB?
I know I could give the file name + line number but this is not working for me.
I have to store the gdb commands as a script to repeat it later and I don't want to change the script every time the source file is changing.
The default stl priority queue is a Max one (Top function returns the largest element).
Say, for simplicity, that it is a priority queue of int values.
Hi All,
I'm trying to detect if a file exists at runtime, if not, create it. However I'm getting a 'The process cannot access the file 'myfile.ext' because it is being used by another process.' error when I try to write to it.
Any ideas how to fix it?
Thanks
is there a built in function to compute the overlap between two discrete intervals, e.g. the overlap between [10, 15] and [20, 38]? In that case the overlap is 0. If it's [10, 20], [15, 20], the overlap is 5.
thanks.
Hi there,
I tried to pass a string value into a JavaScript function like below:
<%= "'" + prop.property_description + "'") %>)
But it does not seems to be the best option, is there a better way to do the above without concatenate the string values with "'"?
Thanks
How can I tell if a given javascript function will work across browsers? For instance, I want to use String.trim() and I see that it works in Firefox, but will it work in all the other major browsers? I imagine there is a good doc online somewhere, but I can't find it.
In NHibernate there is a merge function that does the following:
if there is a persistent instance with the same identifier currently associated with the session, copy the state of the given object onto the persistent instance
if there is no persistent instance currently associated with the session, try to load it from the database, or create a new persistent instance
the persistent instance is returned
Is this possible in EF? I mean this part : copy the state of the given object onto the persistent instance. And if i used ApplyCurrentValues it seemes to be as update behavior or not?
Windows XP, Python 2.5:
hash('http://stackoverflow.com') Result: 1934711907
Google App Engine (http://shell.appspot.com/):
hash('http://stackoverflow.com') Result: -5768830964305142685
Why is that? How can I have a hash function which will give me same results across different platforms (Windows, Linux, Mac)?
I have been trying to get this array function to output (non-zero) minimum values in the 'FINAL DATA' AE column. Can you see a structural error in this formula?
=IF($C$4="All EMEA",
MIN(IF('FINAL DATA'!$2:$AE$250000<>0,
('FINAL DATA'!$J$2:$J$250000=$C$4)*('FINAL DATA'!$E$2:$E$250000=$E$4)*( 'FINAL DATA'!$AE$2:$AE$250000))),
MIN(IF('FINAL DATA'!$AE$2:$AE$250000<>0,
('FINAL DATA'!$K$2:$K$250000=$C$4)*('FINAL DATA'!$E$2:$E$250000=$E$4)*( 'FINAL DATA'!$AE$2:$AE$250000)))
)
I have a Class A that when it is instantiated and saved for the first time or modified it will create an instance of Class B and save it also
I want them to be in the same transaction and I want it to be handled in the Model not a controller.
I know how to do this in a conteoller with the ‘transaction do’ block but how do I do it in the model?
Thanks
char
char* c[30];
c = (char*) malloc(30*sizeof(char) );
How does this give an incompatible declaration in built in function warning and and incompatible types in assignment error in the line where i have declared malloc . According to the syntax of malloc , i shouldnt have any error
Is there a way to create a profile page for every user that is registered on my WordPress site? I need a feature that allows each registered user to fill in his profile - name, address, email, add photos. Then this data is populated to a user's profile page using a template so when anyone goes to, e.g. mysite.com/users/johndoe, he sees the user's profile page with all information. Thanks.
i have a slide up function and a slide down on my script, everything works. The problem is that the DIVs are collapse and not hidden how would i be able to hide the divs on page start up. i tried to set the DIV to hidden but no luck with that.
Hi,
In my C++ program, I need to call this c API:
GConn* gnet_conn_new (const gchar *hostname,
gint port,
GConnFunc func);
where GConnFunc is defined as:
void (*GConnFunc) (GConn *conn);
My question is if I have a C++ class and have a member function like
Class A {
public:
A();
void my_func (GConn* conn);
}
In my A::A() Constructor, how can I pass this-myfunc to gnet_conn_new as the GConnFunc parameter?
Thank you.
Hi there,
How to get a script for all tables about all default constraints and indexes from an existing database?
SQL Server Management Studio produces SQL-Scripts with the create table statements and there is no option to dismiss it.
Peace
Ice
Is there a way in python without wrapping a function call like following?
from sys import stdout
from copy import copy
tempstdout = copy(stdout)
stdout = file("trash",w)
foo()
stdout = tempstdout
That way works but appears to be terribly inefficient. There has to be a better way... I would appreciate any insight I can get into this.
Is it possible to create a file on a mounted SMB share that is hidden from Windows? The .(dot) prefix doesn't work in this case because that only works on Linux. Basically I'm looking for the same affect as using attrib +h on Windows, but under Linux.
I need to create a section of our website where there is a main box of content with 3/4 smaller boxes (previews) underneath. Please take a look at http://espn.com for an example. They have a main top box for content and then it shuffles between the content previews below.
What is the best way to do this? We are using .NET framework.
Thanks in advance
function get_ibo_id() {
if($registerquery = $this->conn->query("SELECT ibo_id FROM fasttrack WHERE count <
8 && flag = 1 ")){
$this->increase_count();
while ($row = $registerquery->fetch_assoc()) {
return $row[ibo_id];
}
}
else return "No id";
}
it always enters the if block even if the condition is not satisfied... going crazy
Hi,
I would like to call a function automatically lets say every 2 secs.
Is this possible with .NET, and if so can you please paste some code?
This will be used in Windows Mobile 6 SDK
thanks
I know that it's OK for a pure virtual function to have an implementation. However, why it is like this? Is there conflict for the two concepts? What's the usage? Can any one offer any example?
This is too basic I think, but how do both of these work?
return true; // 1
and
return (true); // 2
Similar: sizeof, exit
My guess:
If return was a function, 1 would be
erroneous.
So, return should be a unary
operator that can also take in
brackets... pretty much like unary
minus: -5 and -(5), both are
okay.
Is that what it is - a unary operator?