How to create a script to :
compare two trees,
in c/c++ in a non recursive mode?
also,
How to create a script in c/c++ to verify if a tree is binary, in a non recursive mode?
thanks in advance.
I have a shell background convertor on my video website and I can't seem to get APC to delete a key as a file is uploaded and its visibility is updated. The script is structured like so:
if(file_exists($output_file))
{
$conn->query("UPDATE `foo` SET `bar` = 1 WHERE `id` = ".$id." LIMIT 1");
apc_delete('feed:'.$id);
}
Everything works fine except for the APC and this is the only script on the site that has had this problem. I'm stumped.
I have ruby on rails installed on my ubuntu 8.10 desktop. Script/generate came up with this error.
# script/generate
undefined method `index' for #<Enumerator: "Rails Info:":each_line>
any ideas?
Thanks for you help,
zeem
In PHP, is it possible to get the file name of the script that instantiated an object?
For example I have a script called file.php that creates a new instance of class Class. The class has an Error object that, when triggered, returns some error information. I would like to show that file.php triggered the error.
I am trying to build a python script that will take in an XML document and remove all of the comment blocks from it.
I tried something along the lines of:
tree = ElementTree()
tree.parse(file)
commentElements = tree.findall('//comment()')
for element in commentElements:
element.parentNode.remove(element)
Doing this yields a weird error from python: "KeyError: '()'
I know there are ways to easily edit the file using other methods ( like sed ), but I have to do it in a python script.
I have the following directory structure:
vardir1
vardir2
vardir3
vardir4
constantdir1
Inside constantdir1, i have an ant build script which takes the list of vardir1 to vardir4 and compiles them sequentially. The situation is, vardir1 to vardir4 may or may not exist all the time. Right now I have hard coded the values in the list and checking to see if the vardir is available before I kick off its compilation. Is there any way I can dynamically populate this list in my ant build script?
Hi
I wrote a VBS file to open the "6 May" folder with following content
path = "F:\Test\2010\May\6 May"
Set Sh = CreateObject("WSCript.Shell")
Sh.Run ""path"",3,True
Set Sh = Nothing
However on executing this I am getting following error
Windows Script Host
Script: F:\Sperry\2010\May_06 May\open.vbs
Line: 4
Char: 10
Error: Expected end of statement
Code: 800A0401
Source: Microsoft VBScript compilation error
OK
Can anyone help me in this?
"Only one instance of a Script Manager can be added to the page. " Such Error occurs when I use Script Manager in my vb.net 2005 application. What should I Do?
Hello , i have written an sql script for updating a database that runs in SQL server 2005 and I want to make that changes to the production DB server but I dont want to run the query from the query analyzer , is there a way to run the sql script from console?
Right now I have a very high volume of requests coming to my webserver which execute a PHP CGI script.
Every one of these scripts opens up a config file that I have created to load options of how the script should run.
Doing a file I/O operation everytime a request comes in seems very resource intensive to me. I'm not too familiar with the advanced features of PHP, are there any alternatives to achieve what I'm doing?
From my c# code behind, i pass a query to mysql database and get the data in a DataTable.
Now i want to use the data in data table to write the Insert query in a script file [.sql]
The objective of doing so is, whatever records i select from mysql, i should write that to a script file as backup. Thais why i need the insert statements.
How ? Or any other idea is appreciated.
Hi guys, i came across a scenario where giving a <script> element an "ID" would solve a problem easily. However, after reading about the script tag at w3schools and quirksmode, it seems doing so could have some unforeseen consequences. Has anyone come across any of these issues with modern browsers such as Chrome, Safari, FF3 up and IE 7 up?
Thanks
I have a shell script, with a list of shell variables, which is executed before entering a programming environment.
I want to use a perl script to enter the programming environment:
system("environment_defaults.sh");
system("obe");
but I when I enter the environment the variables are not set.
I'm trying to redirect the output of my script and it needs to be called inside the script.
filename=uname -a
filename="$filename" date
2>&1 | tee $filename".txt"
That is what I have so far, but it's obviously wrong. I don't know too much SH scripting, so help is appreciated
-Alex
i have a database in sql which have entries of time there are more than 1000 entries of time . i want to extract time and run a php script exactly at that time..
i have tried to run a php script continuously which check the time but my server doent allo to run more than 60 seconds
I have some rrdcgi scripts with HTML code which are used to show graphs on my webpage. When I try to run this script from webpage its fine and showing all details perfectly but when i execute this script from command line it shows below error and never returned to command line.
(offline mode: enter name=value pairs on standard input)
Can you please suggest me how can i execute these scripts from command line?
Is there a way to run a shell script using spot light on Mac OS X 10.6? I would like to be able to invoke a shell script with directly from Spotlight without opening up a terminal
Hi,
I'm interested in developing web application and networking application. For that what
is the best script language to learn. Which one is effective for this two. So for, i don't
know even a single syntax of any scripting language. Which is the best script for
understanding, maintainable, effective and simple (may not).
Please don't say what are all you know. Please tell me the best
Hello,
I have a homebase script, that I have many other scripts ping for information using the CURL method. I need to determine the domain name of the callers. Can I do this with tricks just on my homebase script?
. using php .
Hudson
I have the directory ~/fooscripts/ and inside there are foo1.txt, foo2.txt, etc etc
I have a command that takes the file foo1.txt as input and does some calculation. The output location etc is handled internally in fooprog
fooprog -user-data=foo1.txt
I would like to automate the whole thing in a bash script so that the script will parse all txt files in ~/fooscripts/ sequentially. I am a newbie in bash. Could anyone give me a hint?
I am curious about code in my action script project:
public var _p:Object
...
in a function:
public function WObject(pp:MovieClip)
{
_p = pp;
_p.Play();
}
The Play() function is in MovieClip but not Object, can action script allow such syntax?
I want to use a function on my html page but the content is delivered via ajax, how do I first load the script and then apply the function ? It won't work if I include the script in my . Also how can I use the jQuery .find() and and apply a function or modify the css for content that has been delivered after the page has loaded ?
Hello,
after a website mirrored using HTTrack, there is lots of ads. I just want to replace that ads by ID or class, or by text, using script (Perl, Python, Ruby, etc), or any other way
Does anyone know what script can do this job?
Thanks in advance.
I installed this popular, light-weight script on a website but it is running very poorly and maxing out my processor.
http://www.leigeber.com/2008/12/javascript-slideshow/
This is for sure my problem and nothing wrong with that script which runs fine for me on the demo site, but I have no errors and do not understand where the conflict lies. Any ideas on how to root this out?