I have a long a web form. I'm wondering if I should bind() to each element separately (what I really want) or should I only define one bind() all of the input elements then do an if-then inside the handler to handle the specific element?
Hi,
In QuickGraph - is there algorithm for find all parents (up to root vertex's) of a set of vertex's. In other words all vertex's which have somewhere under them (on the way to the leaf nodes) one or more of the vertexs input. So if the vertexs were Nodes, and the edges were a depends on relationship, find all nodes that would be impacted by a given set of nodes.
If not how hard is it to write one's own algorithms?
Hello,
I cannot $_post['value_to_be_posted'] value into a <form><input type="hidden" value="<? echo $_post['value_to_be_posted'] ?>"></form> in chrome but works in IE and ff.
Any ideas
Thanks
Jean
Are there any example log4j configuration files (XML).
I have a java main application.
I want log4j to output to console AND write to file.
Any examples of this would be greatly appreciated.
I'm using netbeans if that matters.
I often have a command that processes one file, and I want to run it on every file in a directory. Is there any built-in way to do this?
For example, say I have a program data which outputs an important number about a file:
./data foo
137
./data bar
42
I want to run it on every file in the directory in some manner like this:
map data `ls *`
ls * | map data
to yield output like this:
foo: 137
bar: 42
So I have a little (musical) keyboard that has USB midi interface. I know you can program to this (many programs accept input from the midi device via USB interface) but where do you begin to program a midi device?
Ideally I'm looking for a platform-independent api, through Python or something.
I was working with Python with a Linux terminal screen. When I typed:
help(somefunction)
It printed the appropriate output, but then my screen was stuck, and at the bottom of the terminal was "(end)".
How do I get unstuck? Thanks in advance.
When I run emacs with -nw option, the emacs really open, but I can't do more nothing. As if the user input is blocked and no keyboard signal is received and/or interpreted. I've tried run without load .emacs file and some other behaviors:
emacs -nw -Q --no-desktop --debug-ini foo.c
But makes no difference and strangely the GUI-version(using Gtk) is working fine.
My gnu-emacs version is GNU Emacs 23.3.1
Any help to help to fix it is very appreciated.
The following PHP code will output 3.
function main() {
if (1) {
$i = 3;
}
echo $i;
}
main();
But the following C code will raise a compile error.
void main() {
if (1) {
int i = 3;
}
printf("%d", i);
}
So variables in PHP are not strictly block-scoped?
Hi
I want to log in the console or in a file, all the queries that Grails do, to check performance.
I had configured [this][1] without success.
Any idea would help.
[1]: http://www.grails.org/FAQ#Q: How can I turn on logging for hibernate in order to see SQL statements, input parameters and output results?
If you could organise your own programming meetup how would you organise the session so that people
had fun
learnt lots
were able to participate despite their level.
what kinds of topics, activities, challenges etc would you include (not all in one session but in general)
how would you handle differing levels?
what do you think are some important things to learn, to achieve?
Any input is greatly appreciated. Im not sure how Id mark the best answer, perhaps leave it to the community to vote for it.
If I make a simple diff in git with e.g.:
git diff origin/master
where can I find good references on how to read the output of git. The man page on git-diff is rather long, and explains many cases which are maybe not necessary for a start.
I have a dictionary in jsons form like this:
$user = "{ name: Mary , born: 1963, money: 213 }";
I need to pass it throught this field:
<input type="hidden" name="custom" value="" >
and then insert it in the db:
INSERT INTO user ( name, born, money ) VALUE ( $name, $born, $money )
How can I do that ?
I am Using Selenium RC in C# My application has 3 Captha image in Different registration pages. i have a Huge script i will run it on night hours(when i am off). Hence i feel it will be better if i can capture the last displaying captcha image value and store it in to a variable so that i can input on the relevant field. Is it Possible ?
hi,
I'm quite new with makefile but I don't think the problem I got is caused by my noobness. Somehow if I try to execute mingw32-make from Users/(user)/Documents/myProject the output is
"mingw32-make: *** No targets specified and no makefile found. Stop."
if I just drag the folder with it to my Desktop and execute make, it works.
Any ideas why does it behave like this or perhaps how to make it work from Documents directory too?
Currently, I have osmething like this in all of my classes:
# Import logging to log information
import logging
# Set up the logger
LOG_FILENAME = 'log.txt'
logging.basicConfig(filename=LOG_FILENAME,level=logging.DEBUG)
This works well, and I get the output I want, but I would really like to have all this sort of information in one place, and be able to just do something like import myLogger and then start logging, and then hopefully be able to just go into that file and turn off logging when I need an extra performance boost.
Thanks in advance
Hi there,
I'm loosing my hair trying to figure out why net.sf.json.JSONObject add extra backslash where it shouldn't on my java code :
JSONObject obj = new JSONObject ();
obj.element ("column_name", "<a href=\"#\" title=\"test\">Test !</a>");
will output :
<a href=\"#\" title=\"test\">Test !<\/a>
with an extra "\" near <\/a.
How can I avoid this behavior ?
Thanks for your help !
Hi,
May I know the reason of getting the output of the following code as: 1,10,10? Why not it is as: 10, 10?
<script type="text/javascript">
var str="1, 100 or 1000?";
var patt1=/10?/g;
document.write(str.match(patt1));
</script>
I have 2 lists in my program one that store objects of type student and another one which stores objects of type marks.
I have 3 methods one that inputs the details of the students, one that inputs the marks and one to view student details and their marks. My question is how I can use a hash table to get the Id of a student and then use it to input the marks and then how to retrieve both the student details and their marks altogether.
Please help me if you can.
The scenario is i have a file and contains a string "the date and time is 2012-12-07 17:11:50"
I had searched and found a command
grep 'the date and time is' 2012-12-07.txt | cut -d\ -f5
it just displays the 5th word and i need the combination of 5th and 6th, so i tried
grep 'the date and time is' 2012-12-07.txt | cut -d\ -f5 -f6
But its error.
Now, how to grep the 5th and 6th word with one command
I just need the output like 2012-12-07 17:11:50
I am running some proc and using ods output FitStatistics = fs; etc to create some SAS datasets from the outputs. But since I am running it a large number of times, I want to suppress the printing to Results. What's is the SAS code for doing that?
Hi all,
I'm trying to set a view script to be executed in addition to the currently requested action view script. I want to do this from the controller action itself in a way that this new view script output will be available from the layout $this-layout()-content helper.
I found the setView() method but don't know how to use it from the controller.
Thanks a lot.