I know this is common in most languages, and maybe in C, as well. Can C handle separating several functions out to a separate file and having them be included?
The functions will rely on other include files, as well. I want the code to retain all functionality, but the code will be reused in several C scripts, and if I change it once I do not wish to have to go through every script and change it there, too.
When you're opening page in IE it downloads lots of files, including CSS, scripts, pictures, SWFs, etc. I need to develop small plugin which will monitor all these URLs and let's say save to file this list.
I need it in Delphi, but any example in any other programming languages will be really appreciated.
I have this method for downloading a script:
var script = document.createElement('script');
script.setAttribute("src", url);
document.getElementsByTagName("head")[0].appendChild(script);
This gives me a GET like this:
GET http://127.0.0.1:17315/Scripts/abc.js HTTP/1.1
However I need to add a header:
Authorization: Bearer Ipnsfm9h1MWYIM0n1ng
Can anyone tell me how I can add a header when I am using Javascript to perform the GET?
hi,
is there any way to disable browsers popups about too long scripts (i.e. in Firefox and Safari) directly from the website ?
(And not from the browser settings)
thanks
i tried to find a built-in for geometric mean but couldn't.
(Obviously a built-in isn't going to save me any time while working in the shell, nor do i suspect there's any difference in accuracy; for scripts i try to use built-ins as often as possible, where the (cumulative) performance gain is often noticeable.
In case there isn't one (which i doubt is the case) here's mine.
gm_mean = function(a){prod(a)^(1/length(a))}
I have a series of python scripts with execute permissions in Linux. They are stored in SVN.
If I then run svn up to update them, the overwritten files are back to 644 - ie no execute permissions for anyone.
Yes I could just script it to chmod +x * afterwards, but surely there's a way to store permissions in SVN or to maintain them when you update?
Any suggestions appreciated.
Hey there.
I'm currently working on a file uploading sript in PHP, but i'm kind of stuck. Users are allowed to upload files such as PHP and JS, but i don't want the scripts to run when a user is trying to download them. Is it possible to block that somehow using htaccess or something?
Thanks in advance.
Is it possible to add visual studio macro's to a solution, so they would be checked in by svn ?
If not, how do you deploy your utilities/scripts with your developer team ?
I'm looking for a solution to profile my php scripts within the browser (rather than having to use *cachegrind)
I saw this a while ago http://particletree.com/features/php-quick-profiler/, but i have no idea how good it is (or accurate)
tips/advice appreciated
Hi,
I'm wondering what is the best and useful debug tool in Linux environment for Perl/C++ scripts.
In related to that, does anyone know the differences between Eclipse to DDD tools?
Thank you,
YoDar.
I'm trying to parse the dmoz content/structures xml files into mysql, but all existing scripts to do this are very old and don't work well. How can I go about opening a large (+1GB) xml file in php for parsing?
(Context: running autohotkey scripts to try and automate some tests. The plan is to take screenshots and then compare them to 'standard' screenshots to detect if output has changed).
Is there a 'clever' way to check if two png images are different?
By clever I mean other than comparing them byte by byte? (after having compared their size, obviously)
i have two shell scripts:
script1.sh
echo "date : DATE"
exit 0;
script2.sh
./scripts1.sh
if [ $? -eq 0 ]; then
reboot;
else
echo "Failed"
fi
What should be the result. Ideally it should have been "reboot" , however on some execution i got the "failed" message too. Can anyone explain why this happens?
Hi I have created an extrenal javascript and inserted the path in my site.master with other scripts. However, I can`t access the functions of the file.
What can be the problem? Have I done it right, though I wanted to access it directly from my view?
Hey everybody,
I'm looking for a more robust and fully featured GUI SVN manager for Mac than what is built into XCode (which works, but only as long as you don't need anything beyond the bare basics and doesn't work for versioning scripts and such created in other editors).
I can use the terminal commands, but I'd really like the option of using a GUI.
On windows I use TortoiseSVN and Visual SVN, which do pretty much everything I need, but as far as I'm aware there's nothing even remotely resembling those on the Mac side.
Is it possible to read/edit iframe contents(not only properties like src) with scripts that are on page but outside of this frame? I know that is impossible if source is from other site as it would be a big serurity hole, but I only ask whether it works for other content from the same origin.
please see the following code
// redirect to success page
if ($success){
header( 'Location: ../Scripts/_lib/phpmailer-fe.php');
}
else{
print "<meta http-equiv="refresh" content="0;URL=error.html">";
}
its not working
I'd like to write small scripts which feature incremental search (find-as-you-type) on the command line.
Use case: I have my mobile phone connected via USB, Using gammu --sendsms TEXT I can write text messages. I have the phonebook as CSV, and want to search-as-i-type on that.
What's the easiest/best way to do it? It might be in bash/zsh/perl/python or any other scripting language.
Thanks!
Are there any good (preferably PHP) open source scripts that I use to measure download/upload speeds? Something like speedtest.net but without Flash.
Basically, I want to put up a 'broadband speed test' website. I found this but is there anything better already available?
Thanks!
I program open source php scripts and I host the projects' websites on my own server. I'm not sure where to host the code. Maybe on an own svn, or on a website like github, sourgeforce, google code?!?
Where do you host your code / Where would you host your code?
Thanks
I'm managing the MySQL database from PHP scripts.
the communication between server and client is secured via SSL.
I store user account data which is sensitive.
Is there a way to encrypt this data when entered into the DB?
What is the best way to protect this sensitive data?
Thanks
I've just switched my scripts to a different server. On the previous server this worked flawlessly, and now that I've switched them to a different server, I can't understand the problem.
I'm not sure it would help, but here's the relevant code.
$headers = apache_request_headers();
PHP Version is: PHP 5.3.2
Any help would be appreciated.