Search Results

Search found 272 results on 11 pages for 'pablo fernandez'.

Page 7/11 | < Previous Page | 3 4 5 6 7 8 9 10 11  | Next Page >

  • httpURLConnection vs apache commons http

    - by Pablo Fernandez
    Hi everyone! I just wanted to know if any of you had any problems using java default HttpURLConnection class. Some kind of bug that made you switch to apache commons. Or is it just the (ugly) interface that class exposes that justifies the birth of 3rd party http lib? Disclosure: I heard some arguments against java.net having some serious problems, but I'm finding hard to believe that a class that is part of the java core distribution still has issues after several releases of the JDK

    Read the article

  • What's the best way to add tags to the head in Plone?

    - by J. Pablo Fernández
    I want to add the link tags to redirect my web-site to my OpenID provider. These tags should go in the head element. What's the best way to add them in Plone? I understand that filling the head_slot is a way to do it, but that can only happen when you are adding a template to the page and that template is being rendered. In my case I'm not adding any template. Which template should I modify (that is not main_template.pt, which is my current solution, with it's huge drawbacks).

    Read the article

  • How to dispatch on the result of submiting an AJAX form in ASP.Net MVC?

    - by J. Pablo Fernández
    In ASP.Net MVC, having a form more or less like this: <% using (Ajax.BeginForm(new AjaxOptions() { OnSuccess="onSuccess"})) {%> <p> <label for="Comment">Comment:</label> <%= Html.TextArea("Comment")%> <%= Html.ValidationMessage("Comment", "*")%> </p> <p><input type="submit" value="Submit comment" /></p> <% } %> How can the onSuccess Javascript function know whether the result is another version of the form because it didn't validate, a comment as a div to add to the list of comments or a log in page that should be pop up for logging in?

    Read the article

  • Make Sphinx quiet (non-verbose)

    - by J. Pablo Fernández
    I'm using Sphinx through Thinking Sphinx in a Ruby on Rails project. When I create seed data and all the time, it's quite verbose, printing this: using config file '/Users/pupeno/projectx/config/development.sphinx.conf'... indexing index 'user_delta'... collected 7 docs, 0.0 MB collected 0 attr values sorted 0.0 Mvalues, 100.0% done sorted 0.0 Mhits, 99.6% done total 7 docs, 159 bytes total 0.042 sec, 3749.29 bytes/sec, 165.06 docs/sec Sphinx 0.9.8.1-release (r1533) Copyright (c) 2001-2008, Andrew Aksyonoff for every record that is created or so. Is there a way to suppress that output?

    Read the article

  • Error when pushing data to Heroku: time zone displacement out of range

    - by J. Pablo Fernández
    I run the following command to push the contents of my local database to Heroku: heroku db:push --app my-app and from my home computer it works flawlessly but from my work computer I get this error: Taps Server Error: PGError: ERROR: time zone displacement out of range: "2011-11-15 12:00:00.000000+5894114400" I'm not sure where that date is coming from, I can't find it in the data anywhere. Any ideas what's going on and/or how to fix it? Thanks.

    Read the article

  • Creating an http proxy

    - by Pablo Fernandez
    This might be a beginner question but I did some googling and couldn't find an answer so bear with me. I was wondering if there was a resource, tutorial, wiki, etc that explained how to create an http proxy. It would be good to see it in ruby but any language will do if that's not possible. Thanks a lot

    Read the article

  • Storing an encrypted cookie with Rails

    - by J. Pablo Fernández
    I need to store a small piece of data (less than 10 characters) in a cookie in Rails and I need it to be secure. I don't want anybody being able to read that piece of data or injecting their own piece of data (as that would open up the app to many kinds of attacks). I think encrypting the contents of the cookie is the way to go (should I also sign it?). What is the best way to do it? Right now I'm doing this, which looks secure, but many things looked secure to people that knew much more than I about security and then it was discovered it wasn't really secure. I'm saving the secret in this way: encryptor = ActiveSupport::MessageEncryptor.new(Example::Application.config.secret_token) cookies[:secret] = { :value => encryptor.encrypt(secret), :domain => "example.com", :secure => !(Rails.env.test? || Rails.env.development?) } and then I'm reading it like this: encryptor = ActiveSupport::MessageEncryptor.new(Example::Application.config.secret_token) secret = encryptor.decrypt(cookies[:secret]) Is that secure? Any better ways of doing it? Update: I know about Rails' session and how it is secure, both by signing the cookie and by optionally storing the contents of the session server side and I do use the session for what it is for. But my question here is about storing a cookie, a piece of information I do not want in the session but I still need it to be secure.

    Read the article

  • Audio processing libraries for Ruby?

    - by J. Pablo Fernández
    Any recommendation on libraries to do audio processing in Ruby. I need to do the following two tasks: Find silences, for which I'm happy to just be able to iterate over each sample in the wave. Cut and paste pieces of wav files to form a new wav file. Convert wav to mp3, which I will probably leave to lame anyway. I'm looking for the equivalent of NAudio, a C# library.

    Read the article

  • Gmail HTML5 Feature to "drop" attachments

    - by Pablo Fernandez
    I've seen this and I have to admit I'm pretty impressed: http://bit.ly/bkU9r5 I'm almost certain that this is an HTML 5 feature (it's supported on Chrome and Firefox 3.5), and was wondering if somebody knew how is the browser feature called. Bonus points for a tutorial/article on how to do something similar!

    Read the article

  • Run script after Jquery finish

    - by Felipe Fernández
    First let's explain the hack that I was trying to implement. When using Total Validator Tool through my web page and I get following error: [WCAG v1 6.3 (A), US-508-l] Consider providing a alternative after each tag As my page relies heavily on javascript I can't provide a real alternative, so I decided to add an empty noscript tag after every script appearence. Let's say I need to provide a clean report about accesibility about my web page even the hack is senseless. (I know the hack is unethical and silly, let's use it as example material, but the point of my post are the final questions) I tried the following approach: $(document).ready(function(){ $("script").each(function() { $(this).after("<noscript></noscript>"); }); }); The problem raises because I have a jQueryUI DatePicker component on my page. jQuery adds a script section after the DOM is ready so my hack fails as miss this section. So the questions are: How handles jQuery library to be executed after document is ready? How can I run my code after jQuery finish its labours?

    Read the article

  • Accessing JAR resources

    - by Pablo Fernandez
    I have a jar file with resources (mainly configuration for caches, logging, etc) that I want to distribute. I'm having a problem with the relative paths for those resources, so I did what I've found in another stackoverflow question, which said that this was a valid way: ClassInTheSamePackageOfTheResource.class.getResourceAsStream('resource.xml'); Sadly this does not work. Any ideas? Thanks! PS: Obviously I cannot use absolute paths, and I'd like to avoid environment variables if possible

    Read the article

  • Is there a view for inputing integers in Android?

    - by J. Pablo Fernández
    I'm looking for something like the individual parts of the date picker dialog. A view that allows you to input integers (and only integers) that you can limit (between 1 and 10 for example), where you can use the keyboard or the arrows in the view itself. Does it exists? It is for a dialog. A ready-made dialog to request an integer would also help.

    Read the article

  • How effective can this Tagging solution be?

    - by Pablo
    Im working on an image sharing site and want to implement tagging for the images. I've read Questions #20856 and #2504150 I have few concerns with the approach on the questions above. First of all it looks easy to link an image to a tag. However getting images by tag relation is not as easy. Not easy because you will have to get the image-to-tag relation from one table and then make a big query with a bunch of OR statements( one OR for every image). Before i even research the tagging topic i started testing the following method: This tables as examples: Table: Image Columns: ItemID, Title, Tags Table: Tag Columns: TagID, Name The Tags column in the Image table takes a string with multiple tagID from the Tag table enclosed by dashes(-). For example: -65-25-105- Links an image with the TagID 65,25 and 105. With this method i find it easier to get images by tag as i can get the TagID with one query and get all the images with another simple query like: SELECT * FROM Image WHERE Tags LIKE %-65-% So if i use this method for tagging, How effective this is? Is querying by LIKE %-65-% a slow process? What problems can i face in the future?

    Read the article

  • Call private methods and private properties from outside a class in PHP

    - by Pablo López Torres
    I want to access private methods and variables from outside the classes in very rare specific cases. I've seen that this is not be possible although introspection is used. The specific case is the next one: I would like to have something like this: class Console { final public static function run() { while (TRUE != FALSE) { echo "\n> "; $command = trim(fgets(STDIN)); switch ($command) { case 'exit': case 'q': case 'quit': echo "OK+\n"; return; default: ob_start(); eval($command); $out = ob_get_contents(); ob_end_clean(); print("Command: $command"); print("Output:\n$out"); break; } } } } This method should be able to be injected in the code like this: Class Demo { private $a; final public function myMethod() { // some code Console::run(); // some other code } final public function myPublicMethod() { return "I can run through eval()"; } private function myPrivateMethod() { return "I cannot run through eval()"; } } (this is just one simplification. the real one goes through a socket, and implement a bunch of more things...) So... If you instantiate the class Demo and you call $demo-myMethod(), you'll get a console: that console can access the first method writing a command like: > $this->myPublicMethod(); But you cannot run successfully the second one: > $this->myPrivateMethod(); Do any of you have any idea, or if there is any library for PHP that allows you to do this? Thanks a lot!

    Read the article

  • How to pause a setTimeout call ?

    - by Pablo
    Im using jQuery and working on a notification system for my site. The notifications automatically fadeout using the setTimeout function. How can i stop the timer of the setTimeout call? For example i would like to pause the setTimeout call while the mouse is over the notification and continue the count down mouseout... I googled "pause setTimeout" with no luck. Im currently clearing the setTimeout call with clearTimeout and at same time fading out the notification on mouseout but it would be nice to have that pause effect. Any ideas?

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11  | Next Page >