Search Results

Search found 25663 results on 1027 pages for 'script programmer'.

Page 85/1027 | < Previous Page | 81 82 83 84 85 86 87 88 89 90 91 92  | Next Page >

  • using javascript setTimeout to see if div has loaded

    - by Matt
    I'm loading remote data using dynamic script tags and JSON. the remote page that I'm displaying on my website has a div in it that I use to load content into. The problem is the javascript functions do not see the div as the page loads because it is remote data. if I set a timeout of about 300 it usually works and my javascipt can see the div. But sometimes it takes longer and it breaks the javascript. I'm tring this: function load_content() { if(document.getElementById('remote_div')==null) { setTimeout('load_content()', 300); } else { document.getElementById('remote_div').innerHTML = 'Content goes here' } } but it just doesn't seem to work... what is wrong with it?

    Read the article

  • Script SQL Server login with Windows authentication without machine name

    - by Evgeny
    I want to write a SQL 2005 script to create a new login that uses Windows authentication. The Windows user is a local account (not a domain one). A local account with the same name exists on many SQL Server machines and I want to run the same script on all of them. It seemed simple enough: CREATE LOGIN [MyUser] FROM WINDOWS However, that doesn't work! SQL returns an error, saying Give the complete name: <domain\username>. Of course, I can do that for one machine and it works, but the same script will not work on other machines.

    Read the article

  • Ending tail -f started in a shell script

    - by rangalo
    I have the following. A Java process writing logs to the stdout A shell script starting the Java process Another shell script which executes the previous one and redirects the log I check the log file with the tail -f command for the success message. Even if I have exit 0 in the code I cannot end the tail -f process. Which doesn't let my script to finish. Is there any other way of doing this in Bash? The code looks like the following. function startServer() { touch logfile startJavaprocess > logfile & tail -f logfile | while read line do if echo $line | grep -q 'Started'; then echo 'Server Started' exit 0 fi done }

    Read the article

  • Script Speed vs Memory Usage

    - by Doug Neiner
    I am working on an image generation script in PHP and have gotten it working two ways. One way is slow but uses a limited amount of memory, the second is much faster, but uses 6x the memory . There is no leakage in either script (as far as I can tell). In a limited benchmark, here is how they performed: -------------------------------------------- METHOD | TOTAL TIME | PEAK MEMORY | IMAGES -------------------------------------------- One | 65.626 | 540,036 | 200 Two | 20.207 | 3,269,600 | 200 -------------------------------------------- And here is the average of the previous numbers (if you don't want to do your own math): -------------------------------------------- METHOD | TOTAL TIME | PEAK MEMORY | IMAGES -------------------------------------------- One | 0.328 | 540,036 | 1 Two | 0.101 | 3,269,600 | 1 -------------------------------------------- Which method should I use and why? I anticipate this being used by a high volume of users, with each user making 10-20 requests to this script during a normal visit. I am leaning toward the faster method because though it uses more memory, it is for a 1/3 of the time and would reduce the number of concurrent requests.

    Read the article

  • exportDocument() 'destination folder does not exist' error

    - by dvb
    I'm trying to make a script in photoshop that will modify some layers and than export them as a PNG image. I've copied the following code from another place: function SavePNG(saveFile){ var pngOpts = new ExportOptionsSaveForWeb; pngOpts.format = SaveDocumentType.PNG pngOpts.PNG8 = false; pngOpts.transparency = true; pngOpts.interlaced = true; pngOpts.quality = 100; activeDocument.exportDocument(saveFile,ExportType.SAVEFORWEB,pngOpts); } The function export the active document of photoshop to the file specified by the saveFile parameter. It's working fine with simple paths like 'C:\images\result.png' but when trying with different paths like '~/Desktop/' or paths with some special characters the file isn't exported, and a 'destination folder does not exist' error massage appear. Any idea how can I solve it?

    Read the article

  • Running MSBuild script on development machine

    - by devdigital
    Hi, I have an MSBuild script which performs a lot of tasks, as it is run on our build server. I want the script to be run each time a developer builds from Visual Studio on their local development machine, so that a) the build process they are runnning locally is the same as that run by the build server so any problems in the build can be identified immediately by the developer b) many of the operations of the build script are run on local builds, for example running of unit tests, generation of code coverage reports etc How is this possible in Visual Studio (2008)? Note I am running a single solution product with multiple projects.

    Read the article

  • Switching layouts page jumping (improvement to script)

    - by Ricardo Zea
    Hello, I'm using this script to switch layouts in a page: $("span.switcher").click(function () { $("span.switcher").toggleClass("swap"); /*!*/ $("ol.search-results").fadeOut("fast", function() { $(this).fadeIn("fast").toggleClass("grid"); }); The script works fine, the problem I have is that if the switch view is down the page, the layout changes and then the page jumps back up. If I add 'return false' right where you see the /* ! */ in the second line the script doesn't work. Also, as you can see, I'm using < span instead of < a since I was told that using other element other than < a would stop the page from jumping. Any idea how to fix the jumping of the page? Thanks.

    Read the article

  • MySQL multi CREATE TABLE syntax help?

    - by rlb.usa
    Hi guys, I'm trying to write a MySQL script that creates several tables. I have: CREATE TABLE `DataBase1`.`tbl_this`( ... ); CREATE TABLE `DataBase1`.`tbl_that`( ... ); ... (14 more) ... BUT, only the first CREATE TABLE statement is executed. I get no syntax errors. Erm, am I missing the MSSQL equivalent of GO ? What am I doing wrong here; how do I get this baby to run all the tables?

    Read the article

  • Help with variables and new lines, and quoting in a bash script

    - by Scott
    I would like to automate the following svn command. Note this command produces the desired results on my system - Ubuntu 10.04, svn 1.6.6, bash shell, when issued from the command line: svn ci -m $'Added new File: newFile.txt\nOrig loc: /etc/networking/newFile.txt' /home/user/svnDir/newFile.txt I would like to run that command in a bash script, assuming that the original full path to the file is contained in the variable $oFileFull, and the filename is in $oFileName. The script is executed from the svn directory. I need to allow for the possibility that the file name and or path contain spaces. so the line inside my shel script might look like: svn ci -m$'Added new file: ${oFileName}\nOrig loc: ${oFileFull}' ${oFileName} But I want the variables (which may contain spaces) expanded before the command is executed, and I cannot figure out how to do this while enclosing the svn comment in single quotes which is necessary in order to get the new line in the subversion comment log. I am pulling my hair out trying to figure out how to properly quote and assemble this command. Any help appreciated.

    Read the article

  • How to execute a large PHP Script ?

    - by atif089
    Well basically I may want to execute a script that may take as much as 1 hours as well. What I really want to do is Send SMS to my users using a third party API. So its basically like I supply my script with an array of phone numbers and fire the method to send SMS. However assuming it take 5 seconds to send 1 SMS and I want to send 1000 SMS which is roughly 1 - 2 hours. I can use set_time_limit() because I am on shared host. One way to do this is store numbers in a session and execute each SMS and use javascript to refresh that page until end. This way I need to keep my browser open and the execution will stop if my Internet Connection is disconnected. So, Is there any better way to do this ? Hope I am clear enough to explain what I want? I want to execute a large script that may take hours to execute without getting timeout.

    Read the article

  • Optimizing simple search script in PowerShell

    - by cc0
    I need to create a script to search through just below a million files of text, code, etc. to find matches and then output all hits on a particular string pattern to a CSV file. So far I made this; $location = 'C:\Work*' $arr = "foo", "bar" #Where "foo" and "bar" are string patterns I want to search for (separately) for($i=0;$i -lt $arr.length; $i++) { Get-ChildItem $location -recurse | select-string -pattern $($arr[$i]) | select-object Path | Export-Csv "C:\Work\Results\$($arr[$i]).txt" } This returns to me a CSV file named "foo.txt" with a list of all files with the word "foo" in it, and a file named "bar.txt" with a list of all files containing the word "bar". Is there any way anyone can think of to optimize this script to make it work faster? Or ideas on how to make an entirely different, but equivalent script that just works faster? All input appreciated!

    Read the article

  • asp.net mvc script and style references

    - by tom
    I'm trying to include script and style references that will not break on deployment, however I can not even get the references to work locally. I have tried using Url.Content() and MVCContrib's <%=Html.ScriptInclude("")%>. My scripts are in a Scripts folder on the root of the site; my styles are in the usual Content/css/ folder. The scripts render like this: <script type="text/javascript" src="/Scripts/MicrosoftAjax.debug.js" ></script> This will not work in a view page in the Views folder. What am I doing wrong and what is the best way to handle this? I would have thought Url.Content() would at least work for styles but used in my master page, the link rendered <link href="/Content/css/Site.css rel="stylesheet" type="text/css" /> This does not work, because the Master Page is in a Shared folder, so what is really the way forward with this?

    Read the article

  • IE 8 prompts user on "slow" jQuery script

    - by Jason
    I have a form with over 100 list items that I must reorder on submit. The following code works to reorder my list without any apparent problems in Firefox; however, IE prompts with the message "A script on this page is causing Internet Explorer to run slowly. If it continues to run, your computer may become unresponsive. Do you want to abort the script?" If the user clicks 'No', the script will work as expected. var listitems = $(form).find('li').get(); listitems.sort(function(a, b) { var compA = $(a).attr('id'); var compB = $(b).attr('id'); return (compA - compB); }); Any ideas on how to make this more efficient?

    Read the article

  • SSIS Script Component, Allow Null values

    - by user2471943
    I have a SSIS package that I am programming and my script component won't allow null column inputs. I have checked the box to keep nulls in the flat file source component. My program is running well until my script component where I get the error "The column has a null value" (super vague, I know). The column currently throwing the error is an "int" valued column and is used for aggregations in my script. I could make the null values 0s or to say "NULL" but I'd prefer to just leave them blank. Any advice on how to handle this problem would be greatly appreciated! Thanks in advance! I am using SQL Server BIDS 2008.

    Read the article

  • need to run php script when form is submitted

    - by Brad
    I have a form that needs to run a php script once the submit button is clicked, it needs to be ajax. <form method="post" action="index.php" id="entryform" name="entryform"> <input type="submit" name="submit" value="Submit" onclick="JavaScript:xmlhttpPost('/web/ee_web/include/email-notification.php', 'entryform')" /> </form> In this situation, using if(form posted) { get results and run script } is not an option, I need to run the script externally, that is why I need it to execute the email-notification.php at onclick When I point my web browser to domain.com/include/email-notification.php - it runs perfectly. Any help is appreciated.

    Read the article

  • perl script grabbing environment vars from "someplace else"

    - by Michael Wilson
    On a Solaris box in a "mysterious production system" I'm running a perl script that references an environment variable. No big deal. The contents of that variable from the shell both pre and post execution are what I expect. However, when reported by the script, it appears as though it's running in some other sub-shell which is clobbering my vars with different values for the duration of the script. Unfortunately I really can't paste the code. I'm trying to get an atomic case, but I'm at my wit's end here. Thoughts?

    Read the article

  • Killing a script launched in a Process via os.system()

    - by L.J.
    I have a python script which launches several processes. Each process basically just calls a shell script: from multiprocessing import Process import os import logging def thread_method(n = 4): global logger command = "~/Scripts/run.sh " + str(n) + " >> /var/log/mylog.log" if (debug): logger.debug(command) os.system(command) I launch several of these threads, which are meant to run in the background. I want to have a timeout on these threads, such that if it exceeds the timeout, they are killed: t = [] for x in range(10): try: t.append(Process(target=thread_method, args=(x,) ) ) t[-1].start() except Exception as e: logger.error("Error: unable to start thread") logger.error("Error message: " + str(e)) logger.info("Waiting up to 60 seconds to allow threads to finish") t[0].join(60) for n in range(len(t)): if t[n].is_alive(): logger.info(str(n) + " is still alive after 60 seconds, forcibly terminating") t[n].terminate() The problem is that calling terminate() on the process threads isn't killing the launched run.sh script - it continues running in the background until I either force kill it from the command line, or it finishes internally. Is there a way to have terminate also kill the subshell created by os.system()?

    Read the article

  • Cache images provided through script

    - by Wim Haanstra
    I have a script, which by using several querystring variables provides an image. I am also using URL rewriting within IIS 7.5. So images have an URL like this: http://mydomain/pictures/ajfhajkfhal/44/thumb.jpg or http://mydomain/pictures/ajfhajkfhal/44.jpg This is rewritten to: http://mydomain/Picture.aspx?group=ajfhajkfhal&id=44&thumb=thumb.jpg or http://mydomain/Picture.aspx?group=ajfhajkfhal&id=44 I added caching rules to IIS to cache JPG images when they are requested. This works with my images that are REAL images on the disk. When images are provided through the script, they are somehow always requested through the script, without being cached. The images do not change that often, so if the cache at least is being kept for 30 minutes (or until file change) that would be best. I am using .NET/C# 4.0 for my website. I tried setting several cache options in C#, but I cant seem to find how to cache these images (client-side), while my static images are cached properly.

    Read the article

  • Registering a piece of script across all the SharePoint Pages

    - by NLV
    Hello all I've a business requirement in which i need to create a SharePoint feature which registers a JavaScript across all the SharePoint pages. The only way i figured out to achieve it is that adding the script in (all) the SharePoint Master Pages or any other custom master pages present in the Site/Site Collection/Web Application while activating the feature. But i found that editing the master pages to add a Javascript snippet is not feasible. Finally i found that i could register my custom controls in the "Delegate Controls" and the custom user control i created can in turn register my script in the page. But my question is how can i handle it if the master page does not have a delegate control? Or is there any other possible solution to register a script across all the SharePoint pages?

    Read the article

  • Regarding PID Shell Script

    - by arav
    I am calling another shell script testarg.sh within my main script. the logfiles of testarg.sh are stored in $CUSTLOGS in the below format testarg.DDMONYY.PID.log example: testarg.09Jun10.21165.log In the main script after the testarg process gets completed i need to grep the log file for the text "ERROR" and "COMPLETED SUCCESSFULLY". How do i get the PID of the process and combine with DDMONYY for grepping. Also i need to check whether file exists before grepping $CUSTBIN/testarg.sh $CUSTBIN/testarg.sh rc=$? if [ $rc -ne 0 ]; then return $CODE_WARN fi

    Read the article

  • Apply Patch Update

    - by Velu
    Hi, We are the product devlopement company. We have the MSI setup for product it will install the more than 500 assemblies files in customers machine. Once we had released the product there may be some problem in any our of the assemblies due to serveal reason. At the time we will fix those problem and provided the patch update to the customer. [b]Current System:[/b] 1) Fix the problem in the devlopement environment and build the assemblies. 2) Generate the Patch setup using the Inno script with modified assemblies. 3) While installing the patch setup in the customer machine it will backup the old assemblies and replace the modified assemblies. [b]Drawback:[/b] Customer can't able to uninstall the installed patch becoz it just replace the assemblies. Is it possible to have the patch system in MSI like MSP files or else is there any option to uninstall the patch in my current system itself ? Thanks, Velu

    Read the article

  • Bash - Adding 0's in the middle of a file name

    - by user596691
    I have a bunch of files which are named: mem0.csv mem1.csv . . . . mem153.csv . . . They are all in the same folder. When I do ls in the folder they appear in an order of mem0.csv mem1.csv mem10.csv mem100.csv . . . mem2.csv mem20.csv . . . I want to create a bash script to push 0's between mem and the number. I figure that I need to add 0's until all the filenames are of the same length only problem is that I don't know how to do this.

    Read the article

  • java decmail string to AS 3.0 conversion procedure

    - by Jack Smith
    Hello, I have a problem with conversion java code to action script 3. Anyone can help with code translation? Thanks. public static short[] decmail_str_to_binary_data(String s) { short[] data = new short[s.length()/2]; for (int i = 0; i < s.length(); i += 2) { char c1 = s.charAt(i); char c2 = s.charAt(i + 1); int comb = Character.digit(c1, 16) & 0xff; comb <<= 4; comb += Character.digit(c2, 16) & 0xff; data[i/2] = (short)comb; } return data; }

    Read the article

  • Add code to html pages automatically

    - by piede
    I need to add some code to the of several html contained in a folder on my desktop. How can i do that? I am using a prototyping tool (Axure) on Mac and I want to add some html meta tags to the generated pages. These pages can be overwritten every time I generate the prototype. What I need is a sort of script that I can launch after re-generating the prototype, to reinsert the code. There is something for windows but it doesn't work on Mac: http://joshuamorse.com/2009/01/14/axure-protonotes-an-alternative-to-protoshare/ thanks

    Read the article

  • Magento data-install script

    - by Vladimir Kerkhoff
    I'm trying to build a data install script that I use to setup a new webstore. This script creates the categories, pages and static blocks and default settings for the specific shop (we use a multistore setup to host the shops). In our dev/staging setup this scripts runs great and all categories are build without any problem. But on our live system this script fails. After some debugging I found the difference is in the Flat catalog usage on the live systems. The problem with creating the category with the flat tables enabled is in getting the parent path information based on the parentId given: $parentCategory = Mage::getModel('catalog/category')->load($parentId); Without flat categories enabled this gives a correct parentCategory, but with flat categories enabled it gives an empty object. Why is this behaviour with flat categories enabled?

    Read the article

< Previous Page | 81 82 83 84 85 86 87 88 89 90 91 92  | Next Page >