Search Results

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

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

  • running SVN scripts of users with no password

    - by Oded
    Hi, I'm running SVN functions such as log from the command line. I'm using --username and --password attributes to authenticate the function. Unfortunately, my users don't have passwords and I'm don't know what value to provide in the command line for the password. the syntax is: --password ARG and I don't have any value. please help. Thanks.

    Read the article

  • Managing multiple AJAX calls to PHP scripts

    - by relativelycoded
    I have a set of 5 HTML dropdowns that act as filters for narrowing results returned from a mySQL database. The three pertinent filters are for "Province", "Region", and "City" selection, respectively. I have three functions: findSchools(), which runs when any of the filters (marked with CSS class .filter) are changed, and fetches the results via AJAX from a PHP script. Once that is done, two other functions are called... changeRegionOptions(), which, upon changing the "Province" filter, and updates the available options using the same method as the first function, but posting to a different script. changeCityOptions(), which runs if the "Region" filter was changed, and updates options, again using the same method. The problem is that since I want these AJAX functions to run simultaneously, and they by nature run asynchronously, I've tried using $.when to control the execution of the functions, but it doesn't fix the problem. The functions run, but the Region and City filters return blank (no options); the FireBug report shows absolutely no output, even though the POST request went through. The posted parameter for filter_province gets sent normally, but the one for region gets cut off at the end -- it sends as filter_region=, with no value passed. So I'm presuming my logic is wrong somewhere. The code is below: // When any of the filters are changed, let's query the database... $("select.filter").change(function() { findSchools(); }); // First, we see if there are any results... function findSchools() { var sch_province = document.filterform.filter_province.value; var sch_region = document.filterform.filter_region.value; var sch_city = document.filterform.filter_city.value; var sch_cat = document.filterform.filter_category.value; var sch_type = document.filterform.filter_type.value; $.post("fetch_results.php", { filter_province : sch_province, filter_region : sch_region, filter_city : sch_city, filter_category : sch_cat, filter_type : sch_type }, function(data) { $("#results").html(""); $("#results").hide(); $("#results").html(data); $("#results").fadeIn(600); } ); // Once the results are fetched, we want to see if the filter they changed was the one for Province, and if so, update the Region and City options to match that selection... $("#filter_province").change(function() { $.when(findSchools()) .done(changeRegionOptions()); $.when(changeRegionOptions()) .done(changeCityOptions()); }); }; This is just one of the ways I've tried to solve it; I've tried using an IF statement, and tried calling the functions directly inside the general select.filter.change() function (after findSchools(); ), but they all return the same result. Any help with this would be great!

    Read the article

  • Changing character encoding in MySQL, PHP scripts, HTML

    - by Sandman
    So, I have built on this system for quite some time, and it is currently outputting Latin1 (ISO-8859-1) to the web browser, and this is the components: MySQL - all data is stored with the Latin1 character set PHP - All PHP text files are stored on disk with Latin1 encoding HTML - The output has the http-equiv="content-type" content="text/html; charset=iso-8859-1" meta tag So, I'm trying to understand how the encoding of the different parts come into play in my workflow. If I open a PHP script and change its encoding within the text editor to UTF-8 and save it back to disk and reload the web browser, the text is all messed up - unless the text comes from the DB. If I change the encoding of the DB to UTF-8 and keep the PHP files in latin1 I have to use utf8_decode() for the data to display correctly. And if I change the HTML code the browser will read it incorrectly. So yeah, I realise that if I want to "upgrade" to UTF8, I have to update all three parts of this setup for it to work correctly, but since it's a huge system with some 180k lines of PHP code and millions of posts in a lot of databases/tables, I don't want to start something like this without understanding everything correctly. What haven't I thought about? What could mess this up beyond fixing? What are the procedures for changing the encoding of an entire MySQL installation and what's the easiest way to change the encoding of hundreds or thousands of PHP files on disk? The META tag is luckily added dynamically, so I'll change that in one place only :) Let me hear about your experiences with this.

    Read the article

  • There's some html content in a file which is downloaded using PHP scripts on firefox

    - by chqiu
    I use the following to download a file with PHP: ob_start(); $browser = id_browser(); header('Content-Type: '.(($browser=='IE' || $browser=='OPERA')? 'application/octetstream':'application/octet-stream')); header('Expires: '.gmdate('D, d M Y H:i:s').' GMT'); header('Content-Transfer-Encoding: binary'); header('Content-Length: '.filesize(realpath($fullpath))); //header("Content-Encoding: none"); if($browser == 'IE') { header('Content-Disposition: attachment; filename="'.$file.'"'); header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header('Pragma: public'); } else { header('Content-Disposition: attachment; filename="'.$file.'"'); header('Cache-Control: no-cache, must-revalidate'); header('Pragma: no-cache'); } //@set_time_limit( 0 ); ReadFileChunked(utf8_decode($fullpath)); ob_end_flush(); The source code of ReadFileChunked is: function ReadFileChunked($filename,$retbytes=true) { $chunksize = 1*(1024*1024); $remainFileSize = filesize($filename); if($remainFileSize < $chunksize) $chunksize = $remainFileSize; $buffer = ''; $cnt =0; // $handle = fopen($filename, 'rb'); //echo $filename."<br>"; $handle = fopen($filename, 'rb'); if ($handle === false) { //echo 1; return false; } //echo 2; while (!feof($handle)) { //echo "current remain file size $remainFileSize<br>"; //echo "current chunksize $chunksize<br>"; $buffer = fread($handle, $chunksize); echo $buffer; sleep(1); ob_flush(); flush(); if ($retbytes) { $cnt += strlen($buffer); } $remainFileSize -= $chunksize; if($remainFileSize == 0) break; if($remainFileSize < $chunksize) { $chunksize = $remainFileSize; } } $status = fclose($handle); if ($retbytes && $status) { return $cnt; // return num. bytes delivered like readfile() does. } return $status; } The question is : The file downloaded will contiain some html tags which are the content of the html code generated by the php. The error will happened when downloading the txt file with the file size smaller than 4096 bytes. Please help me to slove this problem , thank you very much! Chu

    Read the article

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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 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

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