[Solved] How to plot a math function from string?

You can turn a string into code by using pythons eval function, but this is dangerous and generally considered bad style, See this: https://stackoverflow.com/a/661128/3838691. If user can input the string, they could input something like import subprocess; subprocess.check_call([‘rm’, ‘-rf’, ‘*’], shell=True). So be sure that you build in reasonable security into this. You can define … Read more

[Solved] Applescript: number list of words according to their occurrence in the sequence

AppleScript is not the right tool for this job, so while the following solution works, it is sloooow. (For better performance, you’d need full hash-table functionality, which AppleScript doesn’t provide – AppleScript’s record class is severely handicapped by the inability to specify keys dynamically, at runtime, via variables – third-party solutions exist, though (e.g., http://www.latenightsw.com/freeware/list-record-tools/)). … Read more

[Solved] Comparison inside while loop c++

Use == not = if (num == 1) { system(“start C:\\test\\vw”); Sleep(2000); } else if (num == 2) { system(“start C:\\test\\vw2”); Sleep(2300); } else if (num == 3) { system(“start C:\\test\\vw3”); Sleep(1800); } == is for comparison, = is for assignment The reason why it always chooses the first option is because C++ (and C) … Read more

[Solved] PHP exec command is not working with awk command [closed]

As I said in my answer to your previous question, you can fix this easily by using single quotes on the inside. PHP Code <?php $eff=40; $pos=34; $i = ‘hello’; $line=exec(“tail $i.dssp -n $eff | awk -F’ ‘ -v var=$pos ‘{if ($2==var) print FNR}'”); print “$line\n”; ?> Sample Input (hello.dssp): foobar 34 Sample Output: 1 … Read more

[Solved] Why I can not at font into my table? [closed]

You have to use commas between the css selectors. And as the other people say, important was spelled wrongly. Furthermore, as radiation said, no <tbody> tag is present in your page or table, therefore nothing is selected by the css. Additionally remove the Khmer part from the font-family, as it might not be recognized. #content-area-job-details, … Read more

[Solved] While loop inside of for loop [closed]

There’s nothing wrong with having a while loop inside a for loop. To demonstrate: i = 0 kebab = [“chicken”,”garlic”,”cheese”,”tomato”,”lettuce”,”chilli”] print “Kebabs are so good, this is what mine has:” excitement_over_kebab = 1 for ingredients in kebab: while excitement_over_kebab == 1: print kebab[i] i+=1 if i == 6: print “Enough talk, my lunch break is … Read more

[Solved] Searching in yahoo using java [closed]

The service has been shut down since April 2011. You can use Yahoo! Search BOSS instead, but you’ve to pay for it. You may consider switching to Google Custom Search which is free up to 100 queries per day, afaik. solved Searching in yahoo using java [closed]

[Solved] join 2 same almost same function into 1 [closed]

I’m guessing you want to call two functions on onchange. Try this: newcell.childNodes[0].setAttribute(“onchange”,function(){ showUser(this.value,”+xx+”); secondFunction(); }); or since you tagged this jQuery, do it the jQuery way: $(newcell.childNodes[0]).change(function(){ showUser(this.value,”+xx+”); secondFunction(); }); 1 solved join 2 same almost same function into 1 [closed]