Search Results

Search found 419 results on 17 pages for 'dwayne johnson'.

Page 13/17 | < Previous Page | 9 10 11 12 13 14 15 16 17  | Next Page >

  • Finding City and Zip Code for a Location

    - by Kristopher Johnson
    Given a latitude and longitude, what is the easiest way to find the name of the city and the US zip code of that location. (This is similar to http://stackoverflow.com/questions/23572/latitude-longitude-database, except I want to convert in the opposite direction.) Related question: http://stackoverflow.com/questions/158557/get-street-address-at-latlong-pair

    Read the article

  • Cache an FTP connection via session variables for use via AJAX?

    - by Chad Johnson
    I'm working on a Ruby web Application that uses the Net::FTP library. One part of it allows users to interact with an FTP site via AJAX. When the user does something, and AJAX call is made, and then Ruby reconnects to the FTP server, performs an action, and outputs information. Every time the AJAX call is made, Ruby has to reconnect to the FTP server, and that's slow. Is there a way I could cache this FTP connection? I've tried caching in the session hash, but "We're sorry, but something went wrong" is displayed, and a TCP dump is outputted in my logs whenever I attempt to store it in the session hash. I haven't tried memcache yet. Any suggestions?

    Read the article

  • Can you in any way interface Ruby Gems with PHP, Python, etc.?

    - by Chad Johnson
    Stupid question, and forgive me for asking, but someone is asking me, and I am not a super expert with Rails yet. Suppose I have some Rails gem I write. Now suppose a customer has some other framework, like Django or CakePHP, and I want to provide the functionality offered by my gem (eg. CRUD for automotive data) to them as a module in their framework. Could I somehow make it so they could interface my gem with Django or CakePHP? Obviously I could do something with some API magic--and I'll probably end up going that route. But I just want to know whether there is a way to directly interface with Gems from a non-Rails application.

    Read the article

  • Using jQuery to make a group of images appear in order.

    - by Sean Johnson
    I have a page that shows a bunch of thumbnails (around 30), and the client is wanting them to appear one by one, in order, going from left to right on the page. This is what I've tried: var start_opacity = 500; $j('.grid-photo').each(function(i) { start_opacity = start_opacity + 500; setTimeout(function() { $j(i).animate({opacity: 1}, 4000); }, start_opacity); }); It doesn't seem to know what i is referencing. Any thoughts?

    Read the article

  • How to hide and show silvelight user control on main Silverlight Control?

    - by Steve Johnson
    Hi all I have a main silverlight control named MainPage.xaml in an asp.net web site. I want to dynamically add and remove control at run time. So, I have created another control Top10.xaml and added to selected canvas area on MainPage.xaml as described on this page(Click Me): Now i need to modify Top10 visibility in MainPage.xaml dynamically when a button is clicked on MainPage.xaml using C# code in MainPage.xaml.cs. Can anybody help me out? Thanks

    Read the article

  • Is there a way to specify a per-host deploy_to path with Capistrano?

    - by Chad Johnson
    I have searched and searched and asked a question already and have not received a clear answer. I have the following deploy script (snippet): set :application, "testapplication" set :repository, "ssh://domain.com//srv/hg/#{application}" set :scm, :mercurial set :deploy_to, "/srv/www/#{application}" role :web, "domain1.com", "domain2.com" role :app, "domain1.com", "domain2.com" role :db, "domain1.com", :primary => true, :norelease => true role :db, "domain2.com", :norelease => true As you see, I have set deploy_to to a specific path. And, I also have specified multiple web servers. However, each web server should have a different deployment path. I want to be able to run "cap deploy" and deploy to all hosts in one shot. I am NOT trying to deploy to staging and then to production. This is all production. My question is: how exactly do I specify a path per server? I have read the "Roles" documentation for Capistrano, and this is unclear. Can someone please post a deploy file example? I have read the documentation, and it is unclear how to do this. Does anyone know? Am I crazy? Am I thinking of this wrong or something? No answers anywhere online. Nowhere. Nothing. Please, someone help.

    Read the article

  • Did "general education" classes make you a better programmer?

    - by Big Johnson
    I'm surprised by the number of general education classes computer science students must complete to get their bachelors. For example, I must take: three English classes two history classes public speaking economics biology I hardly think these general education requirements are unique to the university I attend. My question is (for those of you who have degrees), in what ways have these general education requirements improved your career as a programmer?

    Read the article

  • Hashing a python function to regenerate output when the function is modified

    - by Seth Johnson
    I have a python function that has a deterministic result. It takes a long time to run and generates a large output: def time_consuming_function(): # lots_of_computing_time to come up with the_result return the_result I modify time_consuming_function from time to time, but I would like to avoid having it run again while it's unchanged. [time_consuming_function only depends on functions that are immutable for the purposes considered here; i.e. it might have functions from Python libraries but not from other pieces of my code that I'd change.] The solution that suggests itself to me is to cache the output and also cache some "hash" of the function. If the hash changes, the function will have been modified, and we have to re-generate the output. Is this possible or ridiculous? Updated: based on the answers, it looks like what I want to do is to "memoize" time_consuming_function, except instead of (or in addition to) arguments passed into an invariant function, I want to account for a function that itself will change.

    Read the article

  • How to **delete-protect** a file or folder on Windows Server 2003 and onwards using C#/Vb.Net?

    - by Steve Johnson
    Hi all, Is it possible to delete-protect a file/folder using Registry or using a custom written Windows Service in C#? Using Folder Permissions it is possible, but i am looking for a solution that even restricts the admin from deleting specific folders. The requirement is that the administrator must not be easily track the nature of protection and/or may not be able to avert it easily. Obviously all administrators will be able to revert the procedure if the technique is clearly understood. Like folder Permissions/OwnerShip Settings can easily be reset by an administrator. SO that is not an option. Folder protection software can easily be uninstalled and show clear indication that a particular folder is protected by some special kind of software. SO that too is not an option. Most antivirus programs protect folders and files in Program Dir. Windows itself doesnt allow certain files such as registry files in c:\windows\system32\config to not even copied. Such a protection is desired for folders which allowse to read and write to files but not allow deletion. Similar functionality is desired. The protection has to seemless and invisible. I do not want to use any protection features like FolderLock and Invisible secrets/PC Security and Desktop password etc. Moreover, the solution has to be something other than folder encryption. The solution has to be OS-native so ** that it may implemented ** pro grammatically using C#/VB.Net. Please help. Thanks

    Read the article

  • How to buld selective Projects within a Solution in TS 2008 in Team Build?

    - by Steve Johnson
    Hi all. I have a solution the source Control (TFS 2008) with multiple projects. Some of the projects are independent of each other. I dont want to build the complete solution instead sometimes we need to build some of the projects. I am a total newbie in Team Build. Please help how i can use the <SolutionToBuild Include="$(BuildProjectFolderPath)/../../Development/Main/Build-Development.sln"> <Targets></Targets> <Properties></Properties> </SolutionToBuild> to select only some of the projects from the solution. Kindly give a detailed answer for me as i am absolutely clueless about it. Thanks

    Read the article

  • Rails-like console for PHP?

    - by Chad Johnson
    Every so often, things work in my local PHP development environment, while in my test environment on my server, things do not. It's a nightmare to debug this. If I had a console like Rails provides, debugging would be much much simpler. Is there anything like the Rails console but for PHP? I should mention that I am using a home-brewn PHP application.

    Read the article

  • Cache an FTP connection for use via AJAX?

    - by Chad Johnson
    I'm working on a Ruby web Application that uses the Net::FTP library. One part of it allows users to interact with an FTP site via AJAX. When the user does something, and AJAX call is made, and then Ruby reconnects to the FTP server, performs an action, and outputs information. Every time the AJAX call is made, Ruby has to reconnect to the FTP server, and that's slow. Is there a way I could cache this FTP connection? I've tried caching in the session hash, but "We're sorry, but something went wrong" is displayed, and a TCP dump is outputted in my logs whenever I attempt to store it in the session hash. I haven't tried memcache yet. Any suggestions?

    Read the article

  • What is the standard or best way to deal with database branching with Mercurial or Git branches?

    - by Chad Johnson
    This has been a big question mark on my mind. I'm moving to Mercurial or Git very soon for my web software, and sometimes my branches require significant database changes which other branches should not see. This, I can't always share the same database for my branches. Is there some standard way of dealing with database changes for branching and cloning? What do you all do? I'm using MySQL.

    Read the article

  • How do I add a function to a specific element type in jQuery?

    - by Chad Johnson
    I can do this jQuery.fn.validate = function(options) { var defaults = { validateOPtions1 : '', validateOPtions2 : '' }; var settings = $.extend({}, defaults, options); return this.each(function() { // you validation code goes here }); }; but that will make validate() available for every element. I could do this to any element: $('some selector').validate(). Is there a way I can make this only available to, say, form elements? eg. $('.mySpecialFormClass').validate()?

    Read the article

  • How do I add a function to an element via jQuery?

    - by Chad Johnson
    I want to do something like this: $('.dynamicHtmlForm').validate = function() { return true; } $('.dynamicHtmlForm .saveButton').click(function() { if (!$(this).closest('.dynamicHtmlForm').validate()) { return false; } return true; }); And then when I have a form of class dynamicHtmlForm, I want to be able to provide a custom validate() function: $('#myDynamicHtmlForm').validate = function() { // do some validation if (there are errors) { return false; } return true; } But I get this when I do this: $(this).closest(".dynamicHtmlForm").validate is not a function Is what I've described even possible? If so, what am I doing wrong?

    Read the article

  • Why must I use local path rather than 'svn://' with SVN bindings?

    - by Chad Johnson
    I'm using the Ruby SVN bindings built with SWIG. Here's a little tutorial. When I do this @repository = Svn::Repos.open('/path/to/repository') I can access the repository fine. But when I do this @repository = Svn::Repos.open('svn://localhost/some/path') It fails with /SourceCache/subversion/subversion-35/subversion/subversion/libsvn_subr/io.c:2710: 2: Can't open file 'svn://localhost/format': No such file or directory When I do this from the command line, I do get output svn ls svn://localhost/some/path Any ideas why I can't use the svn:// protocol?

    Read the article

  • Not Equal two Generic Lists

    - by David Johnson
    I have two generic lists, both containing different data, except 4 fields, which I want to compare to another list and find items that do not match in either list. I need to basically replace where it says equals below, with not equals! var unMatchedData = from liveLines in liveList join oldList in comapreSnapshotList on new {liveLines.ClientNo, liveLines.SequenceNo, liveLines.LineNo, liveLines.Text} equals new {oldList.ClientNo, oldList.SequenceNo, oldList.LineNo, oldList.Text} select new KNOWTXTS { ClientNo = liveLines.ClientNo, SequenceNo = liveLines.SequenceNo, LineNo = liveLines.LineNo, Text = liveLines.Text };

    Read the article

  • Way to check for foreign key references before deleting in MySQL?

    - by Chad Johnson
    I'm working with a content management system, and users are prompted with a confirmation screen before deleting records. Some records are foreign key referenced in other tables, and therefore they cannot be deleted. I would like to display a message beside a given record if it has foreign key references. To know whether I should display the message for a record, I could just query the referencing table and see if there are references. But the problem is, there are about a dozen tables with records potentially referencing this record, and a lookup could take a "long" time. Is there an easy way to tell whether the record is delete-ready (ie. has no foreign key references)?

    Read the article

  • Bad idea to force creation of Mercurial remote heads (ie. branches)?

    - by Chad Johnson
    I am developing a centralized web application, and I have a centralized Mercurial repository. Locally I created a branch in my repository hg branch my_branch I then made some changes and committed. Then when I try to push, I get abort: push creates new remote branch 'my_branch'! (did you forget to merge? use push -f to force) I've just been using push -f. Is this bad? I WANT multiple branches in my central, remote repository, as I want to 1) back up my work and 2) allow other developers to develop with me on that branch. Is it bad or something to have branches in my remote repository or something? Should I not be doing push -f (and if not, what should I do?)? Why does Joel say this in his tutorial: Occasionally I've made a change in a branch, pushed, switched to another branch, and changes I had made in that branch I switch to were mysteriously reverted to a previous version from several commits ago. Maybe this is a symptom of forcing a push?

    Read the article

  • IndexedDB and Relationships

    - by Josh Johnson
    Can I create relationships between my object stores in IndexedDB? For example, I have two object stores: artist and album. An artist has a one-to-many relationship with an album. album.artistId relates the album to artist.id. I'm thinking along the lines of Hibernate here. I would like to do a query for artists and have the albums belonging to that artist returned as an array called artists on the album object. artist.albums = [];

    Read the article

< Previous Page | 9 10 11 12 13 14 15 16 17  | Next Page >