Hi all,
Is there any PHP script to convert XML file to DTD.
I tried a lot. I can able to find tools but can't PHP script.
Is there any?
any help will be thankful...
Fero
Hi, I was writing a script to check if a number is Armstrong or not. This is my Code
echo "Enter Number"
read num
sum=0
item=$num
while [ $item -ne 0 ]
do
rem='expr $item % 10'
cube='expr $rem \* $rem \* $rem'
sum='expr $sum + $cube'
item='expr $item / 10'
done
if [ $sum -eq $num ]
then
echo "$num is an Amstrong Number"
else
echo "$num is not an Amstrong Number"
fi
After I run this script,
$ ./arm.sh
I always get this error
./arm.sh: line 5: [: too many arguments
./arm.sh: line 12: [: too many arguments
I am on cygwin.
I have a PHP script on Linux in which the sticky bit is set, so it gets executed as the file owner. How can I get the user id of the calling process, for authorization purposes?
Context: I have two applications on a server, and want one to request some info from the other. For this reason the other offers a script with setuid, but I want to make sure it can only be called by the one.
Hi, I'm using ASP.Net and whenever I create a script file or try to include a script file like jQuery they aren't working. I am doing just a regular localhost server and none of the scripts are working. Upon further examination using firebug I look at whats being referenced in those scripts and it shows html code for a 404 error. I know the scripts and files are there and I can navigate directly to them in the browser but for some reason I can't reference them in my page.
Here is a screenshot:
There are many inbulit functions like int(octal) which can be used to convert octal numbers into decimal numbers on command line but these doesn't work out in script .
int(0671) returns 0671 in script, where as it represent decimal form of octal number on python command line.
Help???
Thank You
I am a bit confused with mysql create procedure script.
My script looks like as follows:
DELIMITER //
DROP PROCEDURE play;
CREATE PROCEDURE play()
BEGIN
insert into hi (name,id)VALUES ('apple','2010');
END
//
It does not insert into table hi.
For the purpose of a demonstration I'm looking for a way to start an eclipse run configuration from outside using a script (e.g. windows batch script). I have no idea if that's possible or how to do it.. Does anybody have an idea?
Greetings!
I uses b? to make some calculations in my script. For example:
bc
scale=6
1/2
.500000
For further usage in my script I need "0.500000" insted of ".500000".
Could you help me please to configure bc output number format for my case?
I have the following VB script , I want to remove the "NET ID" element from name list
but after running the VB script the "NET ID" element still exist in the XML doc?
Something wrong in the VB?
Yael
Set objXMLDoc = CreateObject("Microsoft.XMLDOM")
objXMLDoc.async = False
objXMLDoc.load("\dir\d.xml")
Set objRoot = objXMLDoc.documentElement
Set objExNode = objRoot.removeChild(objRoot.childNodes.item(0))
objRoot.appendChild(objExNode)
the XML file:
I have a Php script I want to use for creating a new blog in WPMU. I am having trouble calling wordpress functions like "wpmu_create_user" and "wpmu_create_blog".
My hope is to get this script running as a cron job from command line and pick up new blog creation requests from an external db, create a new blog using the wordpress functions and update the db with new blog info.
Any help/suggestions are highly appreciated.
Sid.
Hi
I want to write a php script which updates svn working directory
I tried with below code , but it does not work.I guess because the USER for php script is "apache" but for svn update it needs to be "homeuser"
putenv("USERNAME=homeuser");
putenv("HOME=/home/homeuser");
exec("svn update /home/homeuser/path/to/working/dir", $info); //svn update with full path
print_r($info);
how to get around ?
Hi
I would like to script telnet to test my website inputs handling. I can do it manually :
telnet localhost 8888
...
GET / HTTP/1.1\n
Host: localhost
...html response
But I can pass command to telnet in my shell script !
I've tried :
(echo "GET / HTTP/1.1\n"; echo "Host: localhost \n\n"; sleep 1) | telnet localhost 8888
It produces no results at all !
Hi guys,
I am trying to write an php twitter script which will be run by crontab, what the script does is to get the tweets from a dedicated twitter account.
I have looked at some of the php twitter oauth libraries, all of them seem to use redirect to a twitter page to get a token, then goes back to a callback link. In my case I don't want to have any user interaction at all.
Could anyone please tell me what I should do?
Regards
James
I am running a MSBUILD script which disables and enabled a scheduled task from command line.
I am getting following error. No idea, what 'exited with code 1' means. When I try to copy paste the line in command prompt, it works perfectly. I doesnot run in MSBuild script which is in turn called by CruiseControl.NET
SNIPPET FROM MSBUILD file is
ERROR is
The command "C:\WINDOWS\system32\schtasks.exe /S servername /Change /RU SYSTEM /TN "MyScheduledtask" /DISABLE" exited with code 1.
How do I pass each line from a text file as an argument to a script I have written? So each line is then in itself a single arg to the script each time.
Hi all,
I'm new to mysql. My requirement is to import a sql dump into mysql using shell script for linux and this script should be called by java program for the restoration to take place automatically.
Please advice me on this.
Regards,
Chandu.
Hello all,
I am making use of variables in my TSQL queries. As my script has grown, I have separated each part by GO, now the problem is I need access to variables at the top of my script.
How can I still access these variables?
Hopefully, this is something simple and straightforward.
Thanks all
Hi
I wanted to know if their is any tool that can be used to create sql migration script of existing database in Ruby on Rails.
Also is their any visual tool that can be used to write Ruby on Rails migration script.
Hi All,
I want a batch script which will extract the first 30 characters from a file.
Requirement:
there is one file called test.txt and it's content is
\765514e2aad02ca658cc56cdb7884947 *E:\test1
now I need a script which extract only \765514e2aad02ca658cc56cdb7884947 from the above file
Thx in advance
I've tried to code a recent posts script for my custom WP theme, however, it occurs to me that since WP ships with a recent posts widget, ideally I should just be able to call that from within my sidebar.php script, passing it the "Number of posts to show" parameter.
Anyone know how to do this?
hi,
i use set /p below to read user input
it seems to work outside the if block but the one inside if block doesn't work.
When i run the script second time the user input in the if block prints the previous user input.
test script:
@echo off
set cond=true
echo %cond%
if %cond%==true (
echo "cond is true"
REM the below input doesn't work
set /p name1="enter your name"
echo name is: %name1%
)
REM it works here
set /p name2="enter your name"
echo name is: %name2%
thank you
I need a python script that will do the following:
connect to a URL, and that URL will return a number like 1200.
Use the number, to download xml files named: 1 to x where x is the number from #1.
store the files in a particular directory.
Sorry I've never written a python script, so if you could guide me along that would be great (maybe with a some comments).
I will be running this as a cron job if that matters.
According to http://vimdoc.sourceforge.net/htmldoc/usr_41.html#function-list vim script has functions setline() and append() to modify the current buffer but how do i delete a line from within a script? With setline(1, "") the line is only emptied but I want to get rid of it.