Search Results

Search found 5682 results on 228 pages for 'lord of scripts'.

Page 28/228 | < Previous Page | 24 25 26 27 28 29 30 31 32 33 34 35  | Next Page >

  • PostgreSQL storing paths for reference in scripts

    - by Brian D.
    I'm trying to find the appropriate place to store a system path in PostgreSQL. What I'm trying to do is load values into a table using the COPY command. However, since I will be referring to the same file path regularly I want to store that path in one place. I've tried creating a function to return the appropriate path, but I get a syntax error when I call the function in the COPY command. I'm not sure if this is the right way to go about it, but I'll post my code anyway. COPY command: COPY employee_scheduler.countries (code, name) FROM get_csv_path('countries.csv') WITH CSV; Function Definition: CREATE OR REPLACE FUNCTION employee_scheduler.get_csv_path(IN file_name VARCHAR(50)) RETURNS VARCHAR(250) AS $$ DECLARE path VARCHAR(200) := E'C:\\Brian\\Work\\employee_scheduler\\database\\csv\\'; file_path VARCHAR(250) := ''; BEGIN file_path := path || file_name; RETURN file_path; END; $$ LANGUAGE plpgsql; If anyone has a different idea on how to accomplish this I'm open to suggestions. Thanks for any help!

    Read the article

  • C# CodeDom - making project's forms accessible for scripts.

    - by michal
    Hi, I'm learning CodeDom scripting, I started with http://www.c-sharpcorner.com/uploadfile/mgold/codedomcalculator08082005003253am/codedomcalculator.aspx Now I'd like to allow script modify the project's form (for learning purposes only). I suppose I need to create new field for a class I'm generating which refers "this". However I have no idea how can I set a reference for script-accessible object ... ? Or can I directly publish some class member (like "this" or "button1") to a CodeDom script structure?

    Read the article

  • Ant build scripts

    - by gomathi
    I am using ant script for generating war file, it will generate the war file. please see the below script If it generates a new war file, then i want to have a property to set the value as "newupdates" otherwise i want to know "noupdates"

    Read the article

  • Generating code at compile-time using scripts

    - by Manux
    Hello, I would ideally like to be able to add (very repetitive) C/C++ code to my actual code, but at compile time, code which would come from say, the stdout of a python script, the same way one does with macros. For example, let's say I want to have functions that depend on the public attributes of a given class, being able to just write the following in my C++ code would be a blessing: generate_boring_functions(FooBarClass,"FooBarClass.cpp") Is that feasible using conventional means? Or must I hack with Makefiles and temporary source files? Thanks.

    Read the article

  • ERB doesnt get executed in javascript scripts

    - by Stefano
    Hi guys I have a select input on my page. this select input displays/hides fields in the form. This all works fine. But the problem is that if i submit the form and lack some necessary fields, it doesnt set the select to the right value afterwards. I just cant get the embedded ruby to work! it keeps escaping the whole thing... here my code: $(document).ready(function() { $("#profile_sex").val('<%= @profile.sex %>') $("#profile_sex").change(function(){ ($(this).val() == "Frau") ? $('#form-female').show() : $('#form-female').hide(); ($(this).val() == "Mann") ? $('#form-male').show() : $('#form-male').hide(); if ($(this).val() == "Paar") { $('#form-female').show(); $('#form-male').show(); } }); }); why doesnt this work??? I dont get any error or anything it just sets the value to "<%= @profile.sex =" I was googling and searching about on stack overflow and railscasts, the rails API, everything. Im seriously confused... thanks for your help.

    Read the article

  • How to run stored procedures and ad-hoc scripts asynchronously with "loosely" connected SQL Server 2

    - by sanga
    Is there a way to initiate a script against an instance of SQL server when it is not connected then have it run on the instance the next time it connects? This needs to happen without any intervention from me. Background situation if you are interested: We have about 120 machines each with their own instance of SQL Server 2000. Most of them are laptops. We have merge replication set up with each one. From time to time, there is a need to delete "rogue" guids from some tables in some instances that overwrite legitimate records on the main publisher as well as perform administrative tasks via stored procedure or adhoc sql statements. The problem is there is no telling when each machine is going to be connected to the network. Some folks turn their machines completely off at the end of the day. Others disconnect their machines and take them on business trips, home for the weekend etc. Did I mention that about 35 of these machines are in utility trucks and "attempt" to sync over a wireless connection. Thanks in advance for any assistance or suggestions. Sanga

    Read the article

  • Loading scripts using jQuery

    - by Nimbuz
    $.ajax({ url: "plugin.js", dataType: 'script', cache: true, success: function() { alert('loaded'); }}); 1) I can't get the script to load, probably due to incorrect path, but how do I determine the correct path? The above code is in init.js, plugin.js is also in the same folder. 2) Can I load multiple plugins at once with the same request? eg. plugin.js, anotherplugin.js? Thanks for your help

    Read the article

  • Java scripts conflict on my home page

    - by naveen
    <script type="text/javascript" src="jquery-1.js"></script> <script type="text/javascript" src="mootools.js"></script> <script type="text/javascript" src="slideshow.js"></script> <script type="text/javascript"> //<![CDATA[ window.addEvent('domready', function(){ var data = { '1.jpg': { caption: 'Volcano Asención in Ometepe, Nicaragua.' }, '2.jpg': { caption: 'A Ceibu tree.' }, '3.jpg': { caption: 'The view from Volcano Maderas.' }, '4.jpg': { caption: 'Beer and ice cream.' } }; var myShow = new Slideshow('show', data, {controller: true, height: 400, hu: 'images/', thumbnails: true, width: 500}); }); //]]> </script> <script type="text/javascript"> $(document).ready(function() { //slides the element with class "menu_body" when paragraph with class "menu_head" is clicked $("#firstpane p.menu_head").click(function() { $(this).css({backgroundImage:"url(down.png)"}).next("div.menu_body").slideToggle(300).siblings("div.menu_body").slideUp("slow"); $(this).siblings().css({backgroundImage:"url(left.png)"}); }); //slides the element with class "menu_body" when mouse is over the paragraph $("#secondpane p.menu_head").mouseover(function() { $(this).css({backgroundImage:"url(down.png)"}).next("div.menu_body").slideDown(500).siblings("div.menu_body").slideUp("slow"); $(this).siblings().css({backgroundImage:"url(left.png)"}); }); }); </script> <!--[if lt IE 7]> <script type="text/javascript" src="unitpngfix.js"></script> <![endif]-->

    Read the article

  • variables in batch scripts

    - by richzilla
    I'm trying to set up a batch file to automatically deploy a php app to a web server. Basically, what I want is an entirely automated process: I would just give it a revision number from the repository and it would then export the files, upload via ftp and then update deployment info at the repo host (codebase). However, I'm starting from scratch here. How would I set up a batch file to accept a variable when it was run? For example, the command myfile.bat /revision 42 should deploy revision 42 to my server. If anyone can point me in the right direction I'd appreciate it.

    Read the article

  • Encrypting MySQL Traffic In Scripts

    - by threepoints
    Hello, I need to be able to encrypt the MySQL traffic from a web server to a database server. I know how to set MySQL to use SSL based on the server and client settings in my.cnf however, this needs to be done using mysql_connect() in PHP. This may be a 2 part question. 1) Does mysql_connect() use the MySQL client settings that are set in my.cnf? If not... I have read that you can use MYSQL_CLIENT_SSL however, where is the SSL data obtained from? Does using MYSQL_CLIENT_SSL in the mysql_connect function automagically encrypt the traffic? Simply put, what is the best way to do this? Thanks!

    Read the article

  • Are there any scripts to synchronize sites?

    - by Matrym
    I've just set up a fail-over DNS to switch the site to a second host if the first is down. This is great for showing an old / archived version of the site, but I suspect maintenance is going to be a real pain. I moved the files over with rsync in the first place. Is this the kinda thing that could be run as a cron job, automatically moving over newer files?

    Read the article

  • CodeIgniter and Your Own Scripts

    - by Abs
    Hello all, I have found a class I would like to use to get bookmarks from a users delicious account. Here is how it is used. The problem I am having is, should I be turning this into a Codeigniter library? Can I not use it on its own as this is self contained? I am guessing I am asking for the best practice here. Thanks all for any help

    Read the article

  • Calling variables to run scripts

    - by user1416419
    I have a script that lists all files in a directory, lists them in alphabetical order, and places the number of the file before the filename. #!/bin/bash x=1 cd ~/bin for f in * do if [ -f $f ]; then echo "$x: $f" declare a$x=$f x=$(expr $x + 1) fi done read -p "What would you like to execute?: " num $num Output would be 1: file0 2: file1 3: file2 etc Running $num will execute the command a1 which is not a command. What I want to do is run what $a1 is equal to (ie file0). How can I do this?

    Read the article

  • How to resolve symbolic links in a shell script

    - by Greg Hewgill
    Given an absolute or relative path (in a Unix-like system), I would like to determine the full path of the target after resolving any intermediate symlinks. Bonus points for also resolving ~username notation at the same time. If the target is a directory, it might be possible to chdir() into the directory and then call getcwd(), but I really want to do this from a shell script rather than writing a C helper. Unfortunately, shells have a tendency to try to hide the existence of symlinks from the user (this is bash on OS X): $ ls -ld foo bar drwxr-xr-x 2 greg greg 68 Aug 11 22:36 bar lrwxr-xr-x 1 greg greg 3 Aug 11 22:36 foo -> bar $ cd foo $ pwd /Users/greg/tmp/foo $ What I want is a function resolve() such that when executed from the tmp directory in the above example, resolve("foo") == "/Users/greg/tmp/bar".

    Read the article

  • unknown error in shell

    - by lego69
    can somebody explain me what does this error mean: > ./rank lines.in 'nknown option: `- Usage: tcsh [ -bcdefilmnqstvVxX ] [ argument ... ]. this is my script rank: #! /bin/tcsh -f set line = `cat ${1}` echo $line I think that the problem I have is with first row #! /bin/tcsh -f I'm working on Windows! but after I wrote script on windows editor, I converted it using dos2unix rank, what can be the problem, thanks in advance for any help

    Read the article

  • Speedup writing C programs using a subset of the Python syntax

    - by psihodelia
    I am constantly trying to optimize my time. Writing a C code takes a lot of time and requires much more keyboard touches than say writing a Python program. However, in order to speed up the time required to create a C program, one can automatize many things. I'd like to write my programs using smth. like Python but with C semantics. It means, all keywords are C keywords, but syntax is optimized. For example, this C code: #include "dsplib.h" #include "coeffs.h" #define MODULENAME "dsplib" #define NUM_SAMPLES 320 typedef float t_Vec; typedef struct s_Inter { char *pc_Name; struct s_Inter *px_Next; }t_Inter; typedef struct s_DspLibControl { t_Vec f_Y; }t_DspLibControl; void v_DspLibName(void) { printf("Module: %s", MODULENAME); printf("\n"); } int v_DspLibInitInterControl(t_DspLibControl *px_Con) { int y; px_Con->f_Y = 0.0; for(int i=0;i<10;i++) { y += i * i; } return y; } in optimized pythonized version can look like: include dsplib, coeffs define MODULENAME="dsplib", NUM_SAMPLES=320 typedef float t_Vec typedef struct s_Inter: char *pc_Name struct s_Inter *px_Next t_Inter typedef struct s_DspLibControl: t_Vec f_Y t_DspLibControl v_DspLibName(): printf("Module: %s", MODULENAME); printf("\n") int v_DspLibInitInterControl(t_DspLibControl *px_Con): int y px_Con->f_Y = 0.0 for int i=0;i<10;i++: y += i * i return y My question is: Do you know any VIM script, which allows to translate an original pythonized C code into a standard C code? For example, one is writing a C code but uses pythonized syntax, once she decides to translate pythonized blocks into standard C, she selects such blocks and press some key. And she doesn't save such pythonized code of course, VIM translates it into standard C.

    Read the article

  • Expand a window beyond Windows limitation

    - by Pierre
    I try to setup UltraMon with a really big width and height for my Safari on Windows. See capture : http://cl.ly/de21e9cd2cf4f265efc4 The problem is that the width and height seems to have a max value that I would like to change. I want UltraMon not to change my width and height, even if they are bigger than the screen resolution.

    Read the article

  • Google Script / Spreadsheet -- Shared permissions with Installed Trigger onEdit

    - by user1761852
    Using an installed trigger inside spreadsheet to call onUpdateBilling(). Purpose of this script is on edit, based on content of column "billed" (i.e. "d") will highlight the entire column the predetermined color. Page running script is shared with collaborators and they have been given edit access. My expectation at this point is the script should be run with owner permissions. My shared users are unable to run the script with the given error "You don't have permission for this action." Reached my limited knowledge and googlefu for this workaround. Any help to allow operation to my collaborators is appreciated. Script: function onUpdateBilling(e) { var statusCol = 16; // replace with the column index of Status column A=1,B=2,etc var sheetName = "Temple Log"; // replace with actual name of sheet containing Status var cell = SpreadsheetApp.getActiveSheet().getActiveCell(); var sheet = cell.getSheet(); if(cell.getColumnIndex() != statusCol || sheet.getName() != sheetName) return; var row = cell.getRowIndex(); var status = cell.getValue(); // change colors to meet your needs var color; if (status == "D" || status == "d") { color = "red";} else if (status >= 1) { color = "yellow";} else if (status == "X" || status == "x") { color = "black";} else if (status == "") { color = "white";} else { color = "white"; } sheet.getRange(row + ":" + row ).setBackgroundColor(color); }

    Read the article

< Previous Page | 24 25 26 27 28 29 30 31 32 33 34 35  | Next Page >