Search Results

Search found 5695 results on 228 pages for 'logoff scripts'.

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

  • Replacing text with image invokes "IE has restricted this page from running scripts or ActiveX"

    - by Johan
    I'm making a snippet that people can add to their web sites. My problem is that it invokes the yellow "ActiveX" bar at the top in Internet explorer. I'm not sure what invokes it. This is my code: <a id="nhl1" href="http://www.theaddress.com/">link</a> <script type="text/javascript"> (function () { document.getElementById('nhl1').innerHTML = '<img src="http://www.theaddress.com/banner1.jpg" alt="image 1" style="border: none;" />'; })(); </script>

    Read the article

  • Running shell scripts with sudo through my web app

    - by nfm
    I have some functionality that interfaces with the server's OS in my web application. I've written a bash script and am able to run it from within my app. However, some functionality of the script requires superuser privileges. What is the most sane way to run this script securely? It is being passed arguments from a web form, but should only be able to be called by authenticated users that I trust not to haxxor it.

    Read the article

  • Why is Perl commonly used as CGI scripts?

    - by Michael Vasquez
    I plan to add a better search feature to my site, so I thought that I would write it in C and use the CGI as a means to access it. But it seems that Perl is the most popular language when it comes to CGI-based stuff. Why is that? Wouldn't it be faster programmed in C or machine code? What advantages, if any, are there to writing it in a scripting language? Thanks.

    Read the article

  • Creating a simple command line interface (CLI) using a python server (TCP sock) and few scripts

    - by VN44CA
    I have a Linux box and I want to be able to telnet into it (port 77557) and run few required commands without having to access to the whole Linux box. So, I have a server listening on that port, and echos the entered command on the screen. (for now) Telnet 192.168.1.100 77557 Trying 192.168.1.100... Connected to 192.168.1.100. Escape character is '^]'. hello<br /> You typed: "hello"<br /> NOW: I want to create lot of commands that each take some args and have error codes. Anyone has done this before? It would be great if I can have the server upon initialization go through each directory and execute the init.py file and in turn, the init.py file of each command call into a main template lib API (e.g. RegisterMe()) and register themselves with the server as function call backs. At least this is how I would do it in C/C++. But I want the best Pythonic way of doing this. /cmd/ /cmd/myreboot/ /cmd/myreboot/ini.py (note underscore don't show for some reason) /cmd/mylist/ /cmd/mylist/init.py ... etc IN: /cmd/myreboot/_ini_.py: from myMainCommand import RegisterMe RegisterMe(name="reboot",args=Arglist, usage="Use this to reboot the box", desc="blabla") So, repeating this creates a list of commands and when you enter the command in the telnet session, then the server goes through the list, matches the command and passed the args to that command and the command does the job and print the success or failure to stdout. Thx

    Read the article

  • PHP specifying a fixed include source for scripts in different directories

    - by Extrakun
    I am currently doing unit testing, and use folders to organize my test cases. All cases pertaining to managing of user accounts, for example, go under \tests\accounts. Over time, there are more test cases, and I begin to seperate the cases by types, such as \tests\accounts\create, \tests\account\update and etc. However, one annoying problem is I have to specify the path to a set of common includes. I have to use includes like this: include_once ("../../../../autoload.php"); include_once ("../../../../init.php"); A test case in tests\accounts\ would require change to the include (one less directory level down). Is there anyway to have them somehow locating my two common includes? I understand I could set include paths within my PHP's configurations, or use server environment variables, but I would like to avoid such solutions as they make the application less portable and coupled with another layer which the programmer can't control (some web-host doesn't allow configuration of PHP's configuration settings, for example)

    Read the article

  • YAGNI and database creation scripts

    - by Daniel Straight
    Right now, I have code which creates the database (just a few CREATE queries on a SQLite database) in my main database access class. This seems unnecessary as I have no intention of ever using the code. I would just need it if something went wrong and I needed to recreate the database. Should I... Leave things as they are, even though the database creation code is about a quarter of my file size. Move the database-creation code to a separate script. It's likely I'll be running it manually if I ever need to run it again anyway, and that would put it out-of-sight-out-of-mind while working on the main code. Delete the database-creation code and rely on revision control if I ever find myself needing it again.

    Read the article

  • Powershell scripts to backup SQL, SVN

    - by bszom
    I'm trying to use PowerShell to create some backups, and then to copy these to a web folder (or, in other words, upload them to a WebDAV share). At first I thought I'd do the WebDAV stuff from within PowerShell, but it seems this still requires a fair amount of "manual labour", ie: constructing HTTP requests. I then settled for creating a web folder from the script and letting Windows handle the WebDAV stuff. It seems that all it takes to create a web folder is to create a standard shortcut, as described here. What I can't figure out is how to actually copy files to the shortcut's target..? Maybe I'm going about this the wrong way. It would be ideal if I could somehow encrypt the credentials for the WebDAV in the script, then have it create the web folder, shunt over the files, and delete the web folder again. Or even better, not use a web folder at all. Third option would be to just create the web folder manually and leave it there, though I'd rather not. Any ideas/pointers/tips? :)

    Read the article

  • How to hide the console of batch scripts without losing std err/out streams

    - by cooper.thompson
    My question is similar to Running a CMD or BAT in silent mode, but with one additional constraint. If you use WshScript.Run in vbscript, you lose access to the standard in/error/out streams of the process. WshScript.Exec gives you access to the standard streams, but you can't hide your windows. How can you have your cake (hide the windows) and eat it too (have direct access to the console streams)? I'm currently thinking about a C++ executable which creates a new Windows Station and Desktop, (see MSDN) and runs a specified script within that new Desktop (I'm not yet an expert on Window Stations and Desktops, so this idea may be retarded). This idea is based loosely on Condor's USE_VISIBLE_DESKTOP feature, which, if disabled, runs Condor jobs in a non-visible Desktop. I haven't quite figured out if this requires elevated priveledge. The tradeoff of this approach is that your script can disappear into limbo if it blocks on user input. Does anyone have any additional ideas? Or feedback on the approach outlined above? Edit: Also, the purpose of our script is to set up the user environment, so running as another user, or as a system scheduled task isn't really an option (unless there are clever tricks I don't know about).

    Read the article

  • How to do GUI for bash scripts?

    - by maxorq
    I want to do some graphic dialogs for my script but don't know how. I hear something about GTK-Server or something like that. If someone know how to link bash with tcl/tk I also be satisfied. Please do not post something like "change to C++" because my project must be a script in BASH, there are no other option. Any ideas? P.S. Sorry for bad english! EDIT: Thanks for answers but I don't want "graphics" like colors in console, but windows that shows like hmmmm..... net browser which I can move, minimalize etc. I will test xmessage, but I don't think that will be that what I searching for. EDIT2: And one more thing. I don't want make a simple dialog like yes/no, but some interface like progress bars and buttons, something like game :)

    Read the article

  • Eclipse RCP standalone export problem with Groovy scripts

    - by geejay
    I am trying to export a standalone RCP app using Eclipse 3.5.2. The app has a main pure Java plug-in, and a Java / Groovy plug-in that is used by the main plug-in. When I export the main RCP plug-in using the "Export Wizard", I get compiler errors saying that the Groovy classes cannot be found, e.g ERROR in C:\mysrc\src\ch\calcs\providers\CalcProvider.java (at line 8) import ch.calcs.ArgSet; This plug-in works fine when run from within Eclipse. Any ideas?

    Read the article

  • Are google chrome extension "content" scripts sandboxed?

    - by jabapyth
    I was under the impression that the content_scripts were executed right on the page, but it now seems as though there's some sandboxing going on. I'm working on an extension to log all XHR traffic of a site (for debugging and other development purposes), and in the console, the following sniff code works: var o = window.XMLHttpRequest.prototype.open; window.XMLHttpRequest.prototype.open = function(){ console.log(arguments, 'open'); return o.apply(this, arguments); }; console.log('myopen'); console.log(window, window.XMLHttpRequest, window.XMLHttpRequest.prototype, o, window.XMLHttpRequest.prototype.open); This logs a message everytime an XHR is sent. When I put this in an extension, however, the real prototype doesn't get modified. Apparently the window.XMLHttpRequest.prototype that my script is seeing differs from that of the actual page. Is there some way around this? Also, is this sandboxing behavior documented anywhere? I looked around, but couldn't find anything.

    Read the article

  • How can i Put java Scripts at the Bottom

    - by Hemant Kothiyal
    Hi, In my asp.net page, i am refring external javascript file. As per my learning in web, it's recommended that always put inline java script at the bottom of page. There is no information i get about external javascript refrence I want to know that if i am refing external javascript file then where should i write? Inside top of the page bottom after closing tag of

    Read the article

  • Tomcat deploy: make included scripts executable

    - by AlexS
    I'm devellopping a WebApplication (for Tomcat) using netbeans on Windows 7. For the Webapplication to run I need to run a insall-script once. This script (*.bat for windows and *.sh for linux is included in my war-file (WEB_INF). Now everytime I deploy the WAR-file and want to run the script on linux I have to call chmod +x install.sh first. Is there a way that this script can be made executable by default? I don't want to have to execute some extra commands after the deploy to make the script executable. For clarification: I'm not new to Linux and I know how to set executable-rights on files. That's not the problem. My problem is: What do I have to do, so that this script is executable right after tomcat deployed my *.war-file (unpacked it). If I would be using Linux for development as well, I would try to set the rights according in my sources (maybe I'll try it when I have a little more spare time). But I am using Windows and netbeans. Are there any attributes I can set to achive my goal, or is it possible to achive this using ant? By the way: Are there security related issues with this approach? The script looks for java executable and calls a javabased GUI-installer...

    Read the article

  • Executing Shell Scripts from the OS X Dock?

    - by Wilco
    I'm sure the answer is ridiculously obvious, but so far Google hasn't been very helpful. How do I set up a shell script to execute from the dock? It seems that simply creating a shortcut will open the file in my editor. Is there a flag I need to set somewhere to tell it to run instead of opening it for editing?

    Read the article

  • Scoping in embedded groovy scripts

    - by Aaron Digulla
    In my app, I use Groovy as a scripting language. To make things easier for my customers, I have a global scope where I define helper classes and constants. Currently, I need to run the script (which builds the global scope) every time a user script is executed: context = setupGroovy(); runScript( context, "global.groovy" ); // Can I avoid doing this step every time? runScript( context, "user.groovy" ); Is there a way to setup this global scope once and just tell the embedded script interpreter: "Look here if you can't find a variable"? That way, I could run the global script once. Note: Security is not an issue here but if you know a way to make sure the user can't modify the global scope, that's an additional plus.

    Read the article

  • Vimperator and scripts directory on Windows 7

    - by Ted
    Just trying out Vimperator for the first time. For the life of me however, I can't figure out how to add a script (specifically for delicious bookmarks). Running Windows 7 x64. No plugin directory: C:\Users\username\AppData\Roaming\Mozilla\Firefox\Profiles\dgj7o1s1.default\extensions\[email protected] No plugin directory in default location: C:\Users\username\vimperator If I create the "plugin" directory, the script is still not available. Any suggestions? I'm really liking Vimperator, but when you can't figure something out, you really CAN'T figure it out.

    Read the article

  • Using a singleton database class in functions and multiple scripts(PHP) - best use methods

    - by dscher
    I have a singleton db connection which I get with: $dbConnect = myDatabase::getInstance(); which is easy enough. My question is what is the least rhetorical and legitimate way of using this connection in functions and classes? It seems silly to have to declare the variable global, pass it into every single function, and/or recreate this variable within every function. Is there another answer for this? Obviously I'm a noob and I can work my way around this problem 10 different ways, none of which is really attractive to me. It would be a lot easier if I could have that $dbConnect variable accessible in any function without needing to declare it global or pass it in. I do know I can add the variable to the $_SERVER array...is there something wrong with doing this? It seems somewhat inappropriate to me. Another quick question: Is it bad practice to do this: $result = myDatabase::getInstance()-query($query); from directly within a function?

    Read the article

  • Ant build scripts totally hangs, with no messages in console

    - by voipsecuritydigest.com
    I have build.xml for my project, but even this small piece of code <target name="init"> <tstamp/> <!-- Create the build directory structure used by compile --> <mkdir dir="${build}"/> </target> It doesn't run Console is empty but process is active. I still can terminate it over STOP button In same time I cannot debug it as well, same stuff active process no output in console and I can wait forever! Any ideas? JDK 1.6.0_14 Eclipse 3.5.1

    Read the article

  • 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

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