Search Results

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

Page 113/228 | < Previous Page | 109 110 111 112 113 114 115 116 117 118 119 120  | Next Page >

  • Java: Calculate distance between a large number of locations and performance

    - by Ally
    I'm creating an application that will tell a user how far away a large number of points are from their current position. Each point has a longitude and latitude. I've read over this article http://www.movable-type.co.uk/scripts/latlong.html and seen this post http://stackoverflow.com/questions/837872/calculate-distance-in-meters-when-you-know-longitude-and-latitude-in-java There are a number of calculations (50-200) that need carried about. If speed is more important than the accuracy of these calculations, which one is best?

    Read the article

  • Appending javascript code piece to end of the body tag

    - by uzay95
    I am looking for a way to insert javascript code block to end of ASP.NET page. Page.ClientScript.RegisterClientScriptBlock(typeof(Page), "showVideo", sScript, true); is appending to body but js codes are always requesting some js files didn't load or some functions are below of the script. How can i append scripts that i generated dynamically to the bottom of body? Thanks for your help.

    Read the article

  • Using #DEBUG macros in spark

    - by Quintin Par
    I have some scripts which need to be included only in the release version. Stuff like google analytics, quantserve etc. The typical way in asp.net mvc world is to wrap a #if DEBUG #endif How do I do it the sparkish way. Like <script if='x==5' type="text/javascript">

    Read the article

  • PHP, MySQL - My own version of SALT (I call salty) - Login Issue

    - by Fabio Anselmo
    Ok I wrote my own version of SALT I call it salty lol don't make fun of me.. Anyway the registration part of my script as follows is working 100% correctly. //generate SALTY my own version of SALT and I likes me salt.. lol function rand_string( $length ) { $chars = "ABCDEFGHIJKLMNOPQRSTUWXYZabcdefghijklmnopqrstuwxyz1234567890"; $size = strlen( $chars ); for( $i = 0; $i < $length; $i++ ) { $str .= $chars[ rand( 0, $size - 1 ) ]; } return $str; } $salty = rand_string( 256 ); //generate my extra salty pw $password = crypt('password'); $hash = $password . $salty; $newpass = $hash; //insert the data in the database include ('../../scripts/dbconnect.php'); //Update db record with my salty pw ;) // TESTED WITH AND WITHOUT SALTY //HENCE $password and $newpass mysql_query("UPDATE `Register` SET `Password` = '$password' WHERE `emailinput` = '$email'"); mysql_close($connect); However my LOGIN script is failing. I have it setup to TEST and echo if its login or not. It always returns FAILED. I entered the DB and changed the crypted salty pw to "TEST" and I got a SUCCESS. So my problem is somewhere in this LOGIN script I assume. Now I am not sure how to implement my $Salty in this. But also be advised that even without SALTY (just using crypt to store my pass) - I was still unable to perform a login successfully. And if you're gonna suggest i use blowfish - note that my webhost doesn't have it supported and i don't know how to install it. here's my login script: if (isset($_POST['formsubmitted'])) { include ('../../scripts/dbconnect.php'); $username = mysql_real_escape_string($_POST['username']); $password = crypt(mysql_real_escape_string($_POST['password'])); $qry = "SELECT ID FROM Register WHERE emailinput='$username' AND Password='$password'"; $result = mysql_query($qry); if(mysql_num_rows($result) > 0) { echo 'SUCCESS'; //START SESSION } else { echo 'FAILED'; //YOU ARE NOT LOGGED IN } } So what's wrong with this login? Why isn't it working just using the crypt/storing only crypt? How can i make it work storing both the crypt and randomly generated SALTY :) ? Ty advance

    Read the article

  • How can I invoke linux programs from C#/Mono?

    - by Thiado de Arruda
    I've been using MonoDevelop and Make to execute some build taks on a C project under linux, but I decided to abandon Make and switch to NAnt since I am more proficient in writing C# programs than Make/shell scripts, so I decided to write a custom NAnt task in C# to replace my Makefile. So, how can I invoke GCC or other shell commands from C#?

    Read the article

  • Please help with choosing CI build tool

    - by alexeypro
    Hello, I need to choose the right CI build tool which will: 1. Support groups of build configurations so we can use the standardized build process for all our projects 2. Support dashboard with "pretty" (for executive/director "eye" :-) reports. 3. Support Java, Maven, Ant, and be somewhat customizable for build process itself (though this is optional, as I can "fix" it with scripts) I'd prefer free and open source tool, but paid version is fine too. Please help :-)

    Read the article

  • Passwordless SSH using cgi-perl script

    - by AV
    Hello, This is my first shot at trying out cgi-perl scripts. I have SSH keys set up between my (root user) local machine and a remote machine. I'm trying to run a command on the remote box and display the output on a webpage hosted from my local machine. The script runs fine from command line however, it throws SSH key error when called from the webpage because the user running the script is apache and not root. Is there a way to get around this issue?

    Read the article

  • no DOM in wordpress admin

    - by Chris
    I correctly inserted a javascript file into the wordPress admin with : wp_enqueue_script() I know that the script is loading. I tested it with an alert(). I then found that I am unable to access the DOM. When I tried : document.getElementsByTagName('body')[0].addEventListener('load', function() {}); This error was: Uncaught TypeError: Cannot call method 'addEventListener' of undefined This is the first time I have used 'settings api' or inserted scripts into the WordPress admin.

    Read the article

  • jquery in ajax loaded content

    - by Kim Gysen
    My application is supposed to be a single page application and I have the following code that works fine: home.php: <div id="container"> </div> accordion.php: //Click functions: load content $('#parents').click(function(){ //Load parent in container $('#container').load('http://www.blabla.com/entities/parents/parents.php'); }); parents.php: <div class="entity_wrapper"> Some divs and selectors </div> <script type="text/javascript"> $(document).ready(function(){ //Some jQuery / javascript }); </script> So the content loads fine, while the scripts dynamically loaded execute fine as well. I apply this system repetitively and it continues to work smoothly. I've seen that there are a lot of frameworks available on SPA's (such as backbone.js) but I don't understand why I need them if this works fine. From the backbone.js website: When working on a web application that involves a lot of JavaScript, one of the first things you learn is to stop tying your data to the DOM. It's all too easy to create JavaScript applications that end up as tangled piles of jQuery selectors and callbacks, all trying frantically to keep data in sync between the HTML UI, your JavaScript logic, and the database on your server. For rich client-side applications, a more structured approach is often helpful. Well, I totally don't have the feeling that I'm going through the stuff they mention. Adding the javascript per page works really well for me. They are html containers with clear scope and the javascript is just related to that part. More over, the front end doesn't do that much, most of the logic is managed based on Ajax calls to external PHP scripts. Sometimes the js can be a bit more extended for some functionalities, but all just loads as smooth in less than a second. If you think that this is bad coding, please tell me why I cannot do this and more importantly, what is the alternative I should apply. At the moment, I really don't see a reason on why I would change this approach as it just works too well. I'm kinda stuck on this question because it just worries me sick as it seems to easy to be true. Why would people go through hard times if it would be as easy as this...

    Read the article

  • Lightweight version control software on Linux

    - by I'm Dario
    I'm working with a shell account in a shared system and I would like to use some version control software for my bash scripts and config files. It must works on Linux with no dependencies, just unpack it in my home dir. I don't need remote checkout, branching or other fancy tricks. I want to be able to commit my changes and restore them if needed.

    Read the article

  • user specifc maven settings in repository

    - by Samuel
    http://maven.apache.org/settings.html As per documentation the user specific settings can be either copied to the .m2 folder or under the maven installation. If a developer changes a machine or gets a new user id, such properties have to be copied manually to these newer machines. Would it be possible to store user specific setting information in the repository itself (say SVN) and somehow have the mvn scripts load it on startup.

    Read the article

  • Classes. Whats the point?

    - by Ben Shelock
    I'm fairly new to OOP in PHP, I've made a couple of basic scripts but nothing impressive. All I've really taken from it is that it would probably be easier just make a collection of functions and include them. The structure of classes seems to just confuse what was otherwise a simple process. And in collating everything into a class it doesn't really add any functionality. So I'm clearly missing something. Could someone explain what functionality is added by creating classes

    Read the article

  • how sequence events while upload heavy file to Amazon S3 ?

    - by coolpawan4u
    Here i am getting problem while uploading heavy files e.g. 100MB. Files go to amazon s3 successfully but after that scripts waiting for if($flag == 1) and does not execute the rest of code. Can any one tell me the solution for this ? if($s3-putObjectFile($uploadDIR, $bucket, $name, S3::ACL)) { $flag = 1; } if($flag == 1) { //countine code }

    Read the article

  • I want to learn programming. How should I start?

    - by metal-gear-solid
    If I'm going to learn programming first time, How i should start? I don't know programming yet but I'm good at XHTML and CSS. my main aim is to learn first Javascript than second PHP. after having good command in Javascript I'll move to PHP. Although i can use basic javascript, jquery, PHP scripts in my projects but know i want to learn programming concept and want to get good knowledge.

    Read the article

  • Can Firefox Plugin, Greasmonkey, be detected by Web Servers?

    - by Babar
    Hi, My friend's account for some Facebook game was suspended on the grounds that he had Greasemonkey installed on his browser. He is asked to uninstall Greasemonkey and account has been restored. My question is how can a web server detect a client side plugin presence? I assume that Greasemonkey or greasemonkey scripts operate on the client side only so it would not be possible for the server to detect it. Thanks.

    Read the article

  • Load a Lua script into a table named after filename

    - by Homeliss
    I load scripts using luaL_loadfile and then lua_pcall from my game, and was wondering if instead of loading them into the global table, I could load them into a table named after their filename? For example: I have I file called "Foo.lua", which contains this: function DoSomething() --something end After loading it I want to be able to access it like: Foo.DoSomething() Thanks!

    Read the article

  • Form creating sites with output

    - by Alex
    Sites lite faary.com wufoo.com/and theformsite.com help you building forms But the output tables that being created are password protected as far as i know. Are there sites/scripts like the above which can make the output visible to all ? Something like a "guest book" script/form that you can edit the fields and the output will show immediately ? Thank you.

    Read the article

  • Why is FF on OS X loosing jQuery-UI in click event handler?

    - by Jean-François Beauchamp
    In a web page using jQUery 1.7.1 and jQUery-UI 1.8.18, if I output $.ui in an alert box when the document is ready, I get [object Object]. However when using Firefox, if I output $.ui in a click event handler, I get 'undefined' as result. With other browsers (latest versions of IE, Chrome and Safari), the result is still [object Object] when clicking on the link. Here is my HTML Page: <!doctype html> <html> <head> <title></title> <script src="Scripts/jquery-1.7.1.js" type="text/javascript"></script> <script src="Scripts/jquery-ui-1.8.18.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function () { alert($.ui); // ALERT A $(document).on("click", ".dialogLink", function () { alert($.ui); // ALERT B return false; }); }); </script> </head> <body> <a href="#" class="dialogLink">Click me!</a> </body> </html> In this post, I reduced to its simplest form another problem I was having described here: $(this).dialog is not a function. I created a new post for the sake of clarity, since the real question is different from the original one now that pin-pointed where the problem resided. UPDATE: IF I replace my alerts with simply alert($); I get this result for alert A: function (selector, context) { return new jQuery.fn.init(selector, context, rootjQuery); } and this one for alert B: function (a, b) { return new d.fn.init(a, b, g); } This does not make sense to me, although I may not be understanding well enough what $ is... UPDATE 2: I can only reproduce this problem using Firefox on OS X. On Firefox running on Windows 7, everything is fine.

    Read the article

  • Taking backup of data in a table.

    - by Rishabh Ohri
    Hi All, Is there some way to backup the data in a table in sql server by using sql scripts. Note: I dont want to take the backup of the whole database. And later on restore the same data back in case of any failure. Please suggest some solution.

    Read the article

  • Where should I put common utility functions for Perl .t tests?

    - by zedoo
    I am getting started with Test::More, already have a few .t test scripts. Now I'd like to define a function that will only be used for the tests, but across different .t files. Where's the best place to put such a function? Define another .t without any tests and require it where needed? (As a sidenote I use the module structure created by Module::Starter)

    Read the article

< Previous Page | 109 110 111 112 113 114 115 116 117 118 119 120  | Next Page >