in my site i want to set default page to open, using this script
if (!isset($_GET))
{
$_GET['id'] = "home";
}
but it doesn't work. can somebody explain why?
Script adds id for block, gives:
<div id="some">Text</div>
After that page should jump for that id, without animation, just like we have target #some on current page link.
How to do this?
Thanks.
I have a post-build script after building my c# project that will place one of the dll files in a specific directory. This dll is saved in SVN. My question is, is there a way that when building my project, it knows that this dll has not changed and would know not to be copied over to the directory so the there will not be a modified copy for the SVN?
I have a script that animates an element as follows:
var item_height = $('#item').height();
$('#item').height(0);
$('#item').animate({ height: item_height });
Now suppose the animation needs to be stopped before it is complete:
$('#item').stop();
How can I get the end value of the animation? (The total height of the element when the animation would have been complete)
I have a fairly large SQL Server database; I'd like to pull 4 tables out and dump them directly into an sqlite.db for remote querying (via nightly batch).
I was about to write a script to step through(most likely on a unix host kicked off via cron); but there should be a simpler method to export the tables directly (SQLite not an option in the included DTS Import/Export wizard)
What would the most efficient method of dumping the SQL Server tables to SQLite via batch be?
This is my question and apparently this is the answer. I found you can stdout to null by writing NUL in command prompt so i tried writing < NUL at the end of my argument. No luck.
How do i pass in null or do something with the IO locks like that perl code does so i can get my ffmpeg script not locking up after 15 or so seconds?
In SQL Server, you can declare a table variable (DECLARE @table TABLE), which is produced while the script is run and then removed from memory.
Does Oracle have a similar function? Or am I stuck with CREATE/DROPs that segment my hard drive?
Possible Duplicate:
Sending mass email using PHP
I have a PHP script that sends an individual email to all users in my DB, such as a monthly / weekly newsletter.
The code I am using goes as follows:
$subject = $_POST['subject'];
$message = $_POST['message'];
// Get all the mailing list subscribers.
$query = $db->prepare("SELECT * FROM maildb");
$query->execute();
// Loop through all susbcribers, and send and individual email.
foreach ($query as $row) {
// Setting maximum time limit to infinite.
set_time_limit(0);
$newMessage = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
</head>
<body>';
// Search for the [unsubscribe] tag and replace it with a URL for the user to unsubscribe
$newMessage .= str_replace("[unsubscribe]", "<a href='".BASE_URL."unsubscribe/".$row['hash']."/".$row['email']."'>unsubscribe</a>", $message);
$newMessage .= '</body></html>';
$to = $row['email'];
// Establish content headers
$headers = "From: [email protected]"."\n";
$headers .= "Reply-To: [email protected]"."\n";
$headers .= "X-Mailer: PHP v.". phpversion()."\n";
$headers .= "MIME-Version: 1.0"."\n";
$headers .= "Content-Type: text/html; charset=iso-8859-1"."\n";
$headers .= "Content-Transfer-Encoding: 8bit;";
mail($to, $subject, $newMessage, $headers); // Send email to each individual user
}
This code works perfectly with a REALLY small database... I recently populated my test db with 200k+ users, and obviously this script fails, gets out of memory, and dies...
I know this is a bad way to send so many emails, thats why I'd like to ask you for much more efficient ways to do this!
Thank you very much!
I have a .h when I map all the image files names and xib names with #defines. For example, if I have an image called "buttonBackground.png" I map it in my .h as
#define BUTTON_BACKGROUND_PNG_FILE @"buttonBackground.png"
It's possible to detect when a resource is added to the bundle and create the correspond define with a script?
I am currently facing a situation where i have a table with almost 80 millions data and i have to take a dump of that table and store it into a csv file. Currently i am using a not so professional approach( with a perl script+DBI interface , printing the values to stdout and redirecting to a csv file). Now i am planning to use java threading approach. Can you suggest a way forward. Thanks in advance
i have a textbox in asp.net form.... if i entered numbers not like 7 or 8 or 9, then script function should be araised with alert message.... how to achieve this.... that 7 or 8 or 9 are first digits in my texbox...
In my bash script I have two variables 'CONFIG_OPTION' and 'CONFIG_VALUE' which contain string VENDOR_NAME and Default_Vendor respectively.
I need to create a variable with name '$CONFIG_OPTION' ie VENDOR_NAME and assign the value in CONFIG_VALUE to newly created variable.
How I can do this?
I tried
$CONFIG_OPTION=$CONFIG_VALUE
But I am getting an error on this line as
'./Build.bash: line 137: VENDOR_NAME="Default_Vendor": command not found'
Thanks.
"8,5,,1,4,7,,,,7,,1,9,3,6,,,8,6,3,9,,2,5,4,,,,,3,2,,,7,4,1,1,,4,,6,9,,5,,,,5,,,1,,6,3,,,6,5,,,,7,4,,1,7,6,,,,8,,5,,,7,1,,3,9,"
I'm doing a programming challenge where i need to parse this sequence into my sudoku script.
Need to get the above sequence into 8,5,0,1,4,7,0,0,0,7,0,1,9,3,6,0,0,8.........
I tried re but without success, help is appreciated, thanks.
I have a directory of functions and aliases I'd like to include for both bash and zsh terminal invocations (So I don't need to put every function and alias into every separate script and to facilitate organization/tidying of .rc files)
What I've tried so far hasn't worked. Just setting this out for further suggestions.
I've set a rule in Apple Mail to run a "Download & Open link" applescript. I would like this script to download the url in the mail message and after downloading it should open the file.
No idea how to start on this...
I am looking for a script that will block or remove an order button to prevent customers from double or triple ordering but clicking the button more then once. I don't know what something like this would be called. But the site was developed in Classic .asp. However I'm going to guess and say this would be javascript or jquery on an image button? Any suggestion or points for this would be a big help!!!!
Thanks,
Hi,
I am trying to make a script that updates the captcha image, that is loaded through live() function... It works, but it only updates the image 1 time on firefox, 2 times on safari... How can I make this to work multiple times?
jquery 1.4.2
relevant part of code:
/* captcha image change */
var rand = Math.random();
$('a.captcha_refresh').live('click', function() {
$('img.captcha').attr("src", 'captchashow.php?sid=' + rand);
});
thanks,
brm
I need to put copyright message one every file. It will be done only for files going to client. Is there some unix script that will slap copyright message at the very top of every file.
I've come across the following code in a Python script
from pprint import pprint
why not simply import pprint?
Unless the module pprint contains a function called pprint which is being aliased as pprint (surely, this must be the definition of madness?)
The title pretty much sums up my question, I would like to find all commits I have ever done to the subversion repository. Not just commits in current snapshot. More importantly, I would like to organize the file lists by the SVN comment used while committing.
Thank you
Edit: I am thinking maybe a python or shell script that would parse the output of
svn log | grep username
to extract revisions and then pipes the output to
svn log -r [revision numbers go here]
Maybe some scripting gurus can help me out..
I was looking at twitters embed code and saw that they are using !function ... while i know that this evaluates to false I was wondering what the point of it was.
thoughts?
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");
I'm quite happy to rig up a bash script to do this, but it would nice to have an automated tool to sort java files into the correct directories (after creating them).
Thanks!
sed "s/\(.*\)/\t\1/" $filename > $sedTmpFile && mv $sedTmpFile $filename
I am expecting this sed script to insert a tab in font of every line in $filename however it is not. For some reason it is inserting a t instead.. Strange..