Search Results

Search found 10355 results on 415 pages for 'shell extension'.

Page 23/415 | < Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >

  • script unable to find directories/files when running from qsub cluster script

    - by user248237
    I'm calling several unix commands and python on a python script from a qsub shell script, meant to run on a cluster. The trouble is that when the script executes, something seems to go awry in the shell, so that directories and files that exist are not found. For example, in the .out output files of qsub I see the following errors: cd: /valid/dir/name: No such file or directory python valid/script/name.py python: can't open file 'valid/script/name.py': [Errno 2] No such file or directory so the script cannot cd into a dir that definitely exist. Similarly, calling python on a python script that definitely exists yields an error. any idea what might be going wrong here, or how I could try to debug this? thanks very much.

    Read the article

  • Accessing variable from ARGV

    - by snaken
    I'm writing a cPanel postwwwact script, if you're not familiar with the script its run after a new account is created. it relies on the user account variable being passed to the script which i then use for various things (creating databases etc). However, I can't seem to find the right way to access the variable i want. I'm not that good with shell scripts so i'd appreciate some advice. I had read somewhere that the value i wanted would be included in $ARGV{'user'} but this simply gives "root" as opposed to the value i need. I've tried looping through all the arguments (list of arguments here) like this: #!/bin/sh for var do touch /root/testvars/$var done and the value i want is in there, i'm just not sure how to accurately target it. There's info here on doing this with PHP or Perl but i have to do this as a shell script. EDIT Ideally i would like to be able to call the variable by something other than $1 or $2 etc as this would create issues if an argument is added or removed Any ideas?

    Read the article

  • GET command is giving two kinds of ouput,why???

    - by developer
    iam using GET command to get the content of a page.When i write the same command on shell prompt it gives correct result but when i use that in PHP file then sometimes its giving correct result but sometimes it gives only half of the content i.e. end-half portion only. Iam using following command in shell script :- GET http://www.abc.com/ -H "Referer:http://www.abcd.com/" and following in PHP file :- $data=exec('GET http://www.abc.com/ -H "Referer:http://www.abcd.com/"'); echo $data; Now please tell why this command is not giving full content of the page when im using it in php file.

    Read the article

  • PHP system() help

    - by sea_1987
    Hello, I have this shell script #!/bin/sh ############################################################# # Example startup script for the SecureTrading Xpay4 client # # Install Xpay4 into /usr/local/xpay4 # # To run this script automatically at startup, place the # # following line at the end of the bootup script. # # eg. for RedHat linux: /etc/rc.d/rc.local # # # # /usr/local/xpay4/xpay4.sh # ############################################################# # Configuration options # Path to java executable JAVAPATH=/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home ########## Do not alter anything below this line ########## echo "Starting Xpay4. Please ensure the Xpay4 client is not already running" $JAVAPATH/java -jar /usr/local/xpay4/Xpay4.jar /usr/local/xpay4/xpay4.ini & And I am trying to run it using, system("/x/sh/shell.sh"); I am doing this when a user navigates to a certain page on my site, however I am getting just a white blank screen is there a way to error check with system(), I am currently using error_reporting(E_ALL | E_STRCIT) and that is applied site wide

    Read the article

  • typeset: not found error when executing shell script. Am I missing a package or something?

    - by user11045
    Hi, below is the error and corresponding script lines: spec@Lucifer:~/Documents/seagull.svn.LINUX$ ./build.ksh ./build.ksh: 36: typeset: not found ./build.ksh: 39: typeset: not found ./build.ksh: 44: function: not found Command line syntax of - options -exec : mode used for compilation (default RELEASE) -target : target used for compilation (default all) -help : display the command line syntax ./build.ksh: 52: function: not found ERROR: spec@Lucifer:~/Documents/seagull.svn.LINUX$ Script Init of variables BUILD_TARGET=${BUILD_DEFAULT_TARGET} BUILD_EXEC=${BUILD_DEFAULT_EXEC} typeset -u BUILD_OS=uname -s | tr '-' '_' | tr '.' '_' | tr '/' '_' BUILD_CODE_DIRECTORY=code BUILD_DIRECTORY=pwd typeset -u BUILD_ARCH=uname -m | tr '-' '_' | tr '.' '_' | tr '/' '_' BUILD_VERSION_FILE=build.conf BUILD_DIST_MODE=0 BUILD_FORCE_MODE=0

    Read the article

  • Enabling a multi display desktop completely broke Gnome Shell. Help?

    - by Chintan Parikh
    I've been trying to get my dual desktops working on Ubuntu for a while. I previously had them as one large desktop, but that was incredibly slow for some reason. I tried to switch them to multi display desktop on the AMD Catalyst Control Center. Here's what I get after restarting and logging in: http://i.imgur.com/SEjgU.png I'm running an AMD Quad Core A6, AMD Radeon 6540G2 GPU, 16GB Ram. Ubuntu 12.04 Any ideas?

    Read the article

  • What does /dev/null mean in a shell script?

    - by rishiag
    I've started learning bash scripting by using this guide: http://www.tldp.org/LDP/abs/abs-guide.pdf However I got stuck at the first script: cd /var/log cat /dev/null > messages cat /dev/null > wtmp echo "Log files cleaned up." What do lines 2 and 3 do in Ubuntu (I understand cat)? Is it only for other Linux distributions? After running this script as root, the output I get is Log files cleaned up. But /var/log still contains all the files.

    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

  • flush output in Bourne Shell

    - by n-alexander
    I use echo in Upstart scripts to log things: script echo "main: some data" >> log end script post-start script echo "post-start: another data" >> log end script Now these two run in parallel, so in the logs I often see: main: post-start: some data another data This is not critical, so I won't employ proper synching, but thought I'd turn auto flush ON to at least reduce this effect. Is there an easy way to do that? Update: yes, flushing will not properly fix it, but I've seen it help such situations to some degree, and this is all I need in this case. It's just that I don't know how to do it in Shell

    Read the article

  • Firefox extension that overlays persistent iFrame?

    - by Crashalot
    Is it possible to build a Firefox extension that displays a floating, persistent iFrame over the page content? I know it's possible to add iFrames using XUL. For instance, you can add an iFrame to a persistent sidebar. However, I want the iFrame to float over the page content, not cause the content to shrink. So far, my only option is to add the iFrame to the DOM, then use CSS "fixed" positioning to float the iFrame. The iFrame must also persist across page loads, exactly as the sidebar does. Adding an iFrame to the DOM, unfortunately, causes the iFrame to vanish when the browser renders a new page (e.g., after clicking a link). Any clues? Thanks!

    Read the article

  • FF extension: a popup with dynamic menuitems, with each menu item having another popup

    - by encryptor
    I am building an extension that has a popup whose elements are constructed by a function call everytime the mouse hovers over the popup option. I am able to achieve this. Now I need to have a popup for each of the menu item (inside the original popup) which is not dynamic though. I have this code, but it does not work: var myMenuPopup = document.getElementById("file-popup4"); for (var m=0; m var newItem = document.createElement("menupopup"); newItem.setAttribute("label", publicdisplayname[m]); newItem.setAttribute("id", "public" + m); var new1 = document.createElement("menuitem"); new1.setAttribute("label","Home"); new1.setAttribute("id", "publichome" + m); newItem.onclick = function(){ } newItem.appendChild(new1); myMenuPopup.appendChild(newItem); but this doesnt work. Can someone please help me out with whats the problem

    Read the article

  • Using the new jQuery Position utility script at an FF extension

    - by Nimrod Yonatan Ben-Nes
    Hi all, I'm trying to use the following code at my FF extension with no success: $('#duck').position({ of: $('#zebra'), my: "left top", at: "left top" }); (the Position manual is at http://docs.jquery.com/UI/Position) I also tried: var doc = gBrowser.selectedBrowser.contentDocument; $('#duck', doc).position({ of: $('#zebra', doc), my: "left top", at: "left top" }); Both without success.... on the other hand when I try the first code example at the web page code itself it work wonderfully... Anyone got any idea what's causing the problem? Cheers and thx in advance! Nimrod Yonatan Ben-Nes

    Read the article

  • Accessing a Service from within an XNA Content Pipeline Extension

    - by David Wallace
    I need to allow my content pipeline extension to use a pattern similar to a factory. I start with a dictionary type: public delegate T Mapper<T>(MapFactory<T> mf, XElement d); public class MapFactory<T> { Dictionary<string, Mapper<T>> map = new Dictionary<string, Mapper<T>>(); public void Add(string s, Mapper<T> m) { map.Add(s, m); } public T Get(XElement xe) { if (xe == null) throw new ArgumentNullException( "Invalid document"); var key = xe.Name.ToString(); if (!map.ContainsKey(key)) throw new ArgumentException( key + " is not a valid key."); return map[key](this, xe); } public IEnumerable<T> GetAll(XElement xe) { if (xe == null) throw new ArgumentNullException( "Invalid document"); foreach (var e in xe.Elements()) { var val = e.Name.ToString(); if (map.ContainsKey(val)) yield return map[val](this, e); } } } Here is one type of object I want to store: public partial class TestContent { // Test type public string title; // Once test if true public bool once; // Parameters public Dictionary<string, object> args; public TestContent() { title = string.Empty; args = new Dictionary<string, object>(); } public TestContent(XElement xe) { title = xe.Name.ToString(); args = new Dictionary<string, object>(); xe.ParseAttribute("once", once); } } XElement.ParseAttribute is an extension method that works as one might expect. It returns a boolean that is true if successful. The issue is that I have many different types of tests, each of which populates the object in a way unique to the specific test. The element name is the key to MapFactory's dictionary. This type of test, while atypical, illustrates my problem. public class LogicTest : TestBase { string opkey; List<TestBase> items; public override bool Test(BehaviorArgs args) { if (items == null) return false; if (items.Count == 0) return false; bool result = items[0].Test(args); for (int i = 1; i < items.Count; i++) { bool other = items[i].Test(args); switch (opkey) { case "And": result &= other; if (!result) return false; break; case "Or": result |= other; if (result) return true; break; case "Xor": result ^= other; break; case "Nand": result = !(result & other); break; case "Nor": result = !(result | other); break; default: result = false; break; } } return result; } public static TestContent Build(MapFactory<TestContent> mf, XElement xe) { var result = new TestContent(xe); string key = "Or"; xe.GetAttribute("op", key); result.args.Add("key", key); var names = mf.GetAll(xe).ToList(); if (names.Count() < 2) throw new ArgumentException( "LogicTest requires at least two entries."); result.args.Add("items", names); return result; } } My actual code is more involved as the factory has two dictionaries, one that turns an XElement into a content type to write and another used by the reader to create the actual game objects. I need to build these factories in code because they map strings to delegates. I have a service that contains several of these factories. The mission is to make these factory classes available to a content processor. Neither the processor itself nor the context it uses as a parameter have any known hooks to attach an IServiceProvider or equivalent. Any ideas?

    Read the article

  • python c extension, problems with dlopen on mac os

    - by Jason Sundram
    I've taken a library that is distributed as a binary lib (.a) and header, written some c++ code against it, and want to wrap the results up in a python module. I've done this here. The problem is that when importing this module on Mac OSX (I've tried 10.5 and 10.6), I get the following error: dlopen(/Library/Python/2.5/site-packages/dirac.so, 2): Symbol not found: _DisposePtr Referenced from: /Library/Python/2.5/site-packages/dirac.so Expected in: dynamic lookup This looks like symbols defined in the Carbon framework aren't being properly resolved, but I'm not sure what to do about that. I am supplying -framework Carbon to distutil.core.Extension's extra_link_args parameter, so I'm not sure what else I should do. Any help would be much appreciated.

    Read the article

  • Shell access to files created by Apache user in PHP

    - by Alexandru Trandafir Catalin
    My website creates files with owner apache:apache when uploading a file, like this: drwxr-xr-x 2 apache apache 4096 Aug 28 14:07 . drwxr-xr-x 9118 apache apache 233472 Aug 28 14:07 .. -rw-r--r-- 1 apache apache 41550 Aug 28 14:07 468075_large.jpg -rw-r--r-- 1 apache apache 26532 Aug 28 14:07 468075_medium.jpg -rw-r--r-- 1 apache apache 50881 Aug 28 14:07 468075_original.jpg -rw-r--r-- 1 apache apache 4316 Aug 28 14:07 468075_small.jpg Now I am trying to create a file inside the same folder with the user that owns that domain in Plesk and I get permission denied. How can I have both apache and shell user with permissions over that files? Thanks.

    Read the article

  • Safari extension - Too many injected scripts responding to message

    - by Philipp
    Hi, I am trying to code a safari extension similar to Bubble Translate for Chrome. when you click a button on the toolbar, it automatically translates the text currently selected to the language of your choice using the Google language API. I use the following injected script to get the highlighted text and display the result (as an alert for the time being): http://pastebin.com/bYVuQAmp I use the following global script to call the injected script if neccessary: hxxp://pastebin.com/VHaAKM5a The problem I have is the following: The script does not just get injected into the main page but also into ads and similar stuff that is embedded into the page. Due to that, the selected text gets translated multiple times because all the embedded scripts in one page respond to the message. How can I make sure that the script is injected only into the right page or only the right page responds? Thank you, Philipp

    Read the article

  • Firefox extension: how to read a cookie name and value on the current page

    - by encryptor
    My extension works on an application, which requires user login. Once the user has logged in, I need to read the cookies and use them in my XMLHttpRequests. So initially I need to check if the cookie is set, if not, I direct the user to the login page. Once logged in, I need to read the cookies and send it as part of my further requests. How do I read cookies from a XMLHttpRequest or otherwise (if we don't even know the name of the cookie) There is to function as getRequestHeader.. but what I need is something like that.

    Read the article

  • android : how to run a shell command from within code

    - by ee3509
    I am trying to execute a command from within my code, the command is "echo 125 /sys/devices/platform/flashlight.0/leds/flashlight/brightness" and I can run it without problems from adb shell I am using Runtime class to execute it : Runtime.getRuntime().exec("echo 125 > /sys/devices/platform/flashlight.0/leds/flashlight/brightness"); However I get a permissions error since I am not supposed to access the sys directory. I have also tried to place the command in a String[] just in case spaces caused a problem but it didn't make much differense. Does anyone know any workaround for this ?

    Read the article

  • Cheat sheet exhibiting bash shell stdout/stderr redirection behavior

    - by SetJmp
    Is there a good cheat sheet demonstrating the many uses of BASH shell redirection? I would love to give such a thing to my students. Some examples I'd like to see covered: cmd > output_file.txt #redirect stdout to output_file.txt cmd 2> output_file.txt #redirect stderr to output_file.txt cmd >& outpout_file.txt #redirect both stderr and stdout to output_file.txt cmd1 | cmd2 #pipe cmd1 stdout to cmd2's stdin cmd1 2>&1 | cmd2 #pipe cmd1 stdout and stderr to cmd2's stdin cmd1 | tee result.txt #print cmd1's stdout to screen and also write to result.txt cmd1 2>&1 | tee result.txt #print stdout,stderr to screen while writing to result.txt (or we could just make this a community wiki and enumerate such things here) Thanks! SetJmp

    Read the article

  • Creating a notification system using a firefox extension

    - by user303052
    I am creating a firefox extension that should give a notification when the user hits specific sites. I do not want the same kind of notification that firefox gives for pop-ups. I don't want the user to have to go through the hassle of clicking the X in order to close the notification. Instead, I would like it to look like what happens when a normal firefox download is completed - a notification comes up, and automatically goes after a few seconds. On a mac, it looks like a growl notification, and I love the way it looks. Is there an easy way to implement this feature? Thanks

    Read the article

  • How can I block based on URL (from address bar) in a safari extension

    - by PerilousApricot
    I'm trying to write an extension that will block access to (configurable) list of URLs if they are accessed more than N times per hour. From what I understand, I need to have a start script pass a "should I load this" message to a global HTML page (who can access the settings object to get the list of URLs), who will give a thumbs up/thumbs down message back to the start script to deny/allow loading. That works out fine for me, but when I use the usual beforeLoad/canLoad handlers, I get messages for all the sub-items that need to be loaded (images/etc..), which screws up the #accesses/hour limit I'm trying to make. Is there a way to synchronously pass messages back and forth between the two sandboxes so I can tell the global HTML page, "this is the URL in the window bar and the timestamp for when this request came in", so I can limit duplicate requests? Thanks!

    Read the article

  • How to stop java application using a shell script

    - by Fernando Moyano
    I have a shell script, which is run under a opensuse linux, that starts a java application (under a jar), the script is: #!/bin/sh #export JAVA_HOME=/usr/local/java #PATH=/usr/local/java/bin:${PATH} #---------------------------------# # dynamically build the classpath # #---------------------------------# THE_CLASSPATH= for i in `ls ./lib/*.jar` do THE_CLASSPATH=${THE_CLASSPATH}:${i} done #---------------------------# # run the application # #---------------------------# java -server -Xms512M -Xmx1G -cp ".:${THE_CLASSPATH}" com.package.MyApp > myApp.out 2>&0 & This script is working fine. Now, what I want, is to write a script to kill gracefully this app, something that allows me to kill it with the -15 argument from Linux kill command. The problem, is that there will be many java applications running on this server, so I need to specifically kill this one. Any help? Thanks in advance, Fernando

    Read the article

  • get a list of function names in a shell script

    - by n-alexander
    I have a Bourne Shell script that has several functions in it, and allows to be called in the following way: my.sh <func_name> <param1> <param2> Inside func_name() will be called with param1 and param2. I want to create a "help" function that would just list all available functions, even without parameters. The question: how do I get a list of all function names in a script from inside the script? I'd like to avoid having to parse it and look for function patterns. Too easy to get wrong. Thanks, Alex

    Read the article

  • Retrieve default camera video extension from Windows Mobile

    - by kornelijepetak
    Is there any way to find out what is the default video extension for camera application? I am using CameraCaptureDialog to make the user use the camera and save the image to a specific file which then I consume in the application. However, there is a problem with the videos. Emulator gives .wmv video file while some devices I've been testing save to mp4 format. Is there any reliable way to find out what is the format in which the phone that is running the application saves the file?

    Read the article

< Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >