Search Results

Search found 285 results on 12 pages for 'pablo santos'.

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

  • Problem with UTF-8

    - by Pablo Fernandez
    I'm using castor as an OXM mapper, and I'm having a problem with UTF-8 encoding. The code here shows the issue: //Marshaller configuration ByteArrayOutputStream baos = new ByteArrayOutputStream(); OutputStreamWriter os = new OutputStreamWriter(baos, UTF_8); Marshaller marshaller = new Marshaller(os); marshaller.setSuppressXSIType(true); //Mappings configuration Mapping map = new Mapping(); map.loadMapping(MarshallingService.class.getResource(MAPPINGS_PATH)); marshaller.setMapping(map); //Example //BEFORE MARSHALLING: This prints correctly the UTF-8 Chars object.getName() ; marshaller.marshal(object); //AFTER MARSHALLING: This returns the characters like \435\235\654\345 return baos.toString(UTF_8);

    Read the article

  • Thinking Sphinx not working in test mode

    - by J. Pablo Fernández
    I'm trying to get Thinking Sphinx to work in test mode in Rails. Basically this: ThinkingSphinx::Test.init ThinkingSphinx::Test.start freezes and never comes back. My test and devel configuration is the same for test and devel: dry_setting: &dry_setting adapter: mysql host: localhost encoding: utf8 username: rails password: blahblah development: <<: *dry_setting database: proj_devel socket: /tmp/mysql.sock # sphinx requires it test: <<: *dry_setting database: proj_test socket: /tmp/mysql.sock # sphinx requires it and sphinx.yml development: enable_star: 1 min_infix_len: 2 bin_path: /opt/local/bin test: enable_star: 1 min_infix_len: 2 bin_path: /opt/local/bin production: enable_star: 1 min_infix_len: 2 The generated config files, config/development.sphinx.conf and config/test.sphinx.conf only differ in database names, directories and similar things; nothing functional. Generating the index for devel goes without an issue $ rake ts:in (in /Users/pupeno/proj) default config Generating Configuration to /Users/pupeno/proj/config/development.sphinx.conf Sphinx 0.9.8.1-release (r1533) Copyright (c) 2001-2008, Andrew Aksyonoff using config file '/Users/pupeno/proj/config/development.sphinx.conf'... indexing index 'user_core'... collected 7 docs, 0.0 MB collected 0 attr values sorted 0.0 Mvalues, 100.0% done sorted 0.0 Mhits, 99.8% done total 7 docs, 422 bytes total 0.098 sec, 4320.80 bytes/sec, 71.67 docs/sec indexing index 'user_delta'... collected 0 docs, 0.0 MB collected 0 attr values sorted 0.0 Mvalues, nan% done total 0 docs, 0 bytes total 0.010 sec, 0.00 bytes/sec, 0.00 docs/sec distributed index 'user' can not be directly indexed; skipping. but when I try to do it for test it freezes: $ RAILS_ENV=test rake ts:in (in /Users/pupeno/proj) DEPRECATION WARNING: require "activeresource" is deprecated and will be removed in Rails 3. Use require "active_resource" instead.. (called from /Users/pupeno/.rvm/gems/ruby-1.8.7-p249/gems/activeresource-2.3.5/lib/activeresource.rb:2) default config Generating Configuration to /Users/pupeno/proj/config/test.sphinx.conf Sphinx 0.9.8.1-release (r1533) Copyright (c) 2001-2008, Andrew Aksyonoff using config file '/Users/pupeno/proj/config/test.sphinx.conf'... indexing index 'user_core'... It's been there for more than 10 minutes, the user table has 4 records. The database directory look quite diferently, but I don't know what to make of it: $ ls -l db/sphinx/development/ total 96 -rw-r--r-- 1 pupeno staff 196 Mar 11 18:10 user_core.spa -rw-r--r-- 1 pupeno staff 4982 Mar 11 18:10 user_core.spd -rw-r--r-- 1 pupeno staff 417 Mar 11 18:10 user_core.sph -rw-r--r-- 1 pupeno staff 3067 Mar 11 18:10 user_core.spi -rw-r--r-- 1 pupeno staff 84 Mar 11 18:10 user_core.spm -rw-r--r-- 1 pupeno staff 6832 Mar 11 18:10 user_core.spp -rw-r--r-- 1 pupeno staff 0 Mar 11 18:10 user_delta.spa -rw-r--r-- 1 pupeno staff 1 Mar 11 18:10 user_delta.spd -rw-r--r-- 1 pupeno staff 417 Mar 11 18:10 user_delta.sph -rw-r--r-- 1 pupeno staff 1 Mar 11 18:10 user_delta.spi -rw-r--r-- 1 pupeno staff 0 Mar 11 18:10 user_delta.spm -rw-r--r-- 1 pupeno staff 1 Mar 11 18:10 user_delta.spp $ ls -l db/sphinx/test/ total 0 -rw-r--r-- 1 pupeno staff 0 Mar 11 18:11 user_core.spl -rw-r--r-- 1 pupeno staff 0 Mar 11 18:11 user_core.tmp0 -rw-r--r-- 1 pupeno staff 0 Mar 11 18:11 user_core.tmp1 -rw-r--r-- 1 pupeno staff 0 Mar 11 18:11 user_core.tmp2 -rw-r--r-- 1 pupeno staff 0 Mar 11 18:11 user_core.tmp7 Nothing gets added to a log when this happens. Any ideas where to go from here? I can run the command line manually: /opt/local/bin/indexer --config config/test.sphinx.conf --all which generates the output as the rake ts:in, so no help there.

    Read the article

  • How to force the method for a formtastic form to be put?

    - by J. Pablo Fernández
    I have something like semantic_form_for @whatever, :url => whatever_url which generates a from with method="post" I need it to be put, I've already tried: semantic_form_for @whatever, :url => whatever_url, :html => {:method => "put"} and semantic_form_for @whatever, :url => whatever_url, :html => {:method => :put} and semantic_form_for @whatever, :url => whatever_url, :html_args => {:method => :put} with no effect. Any ideas how it's done?

    Read the article

  • Capistrano, Mercurial and branches

    - by J. Pablo Fernández
    It is my understanding that although Mercurial has support from branches, the community generally clone repos instead of creating branches. Similar to the Darcs model, unlike the Git model. I'm deploying a Ruby on Rails app with Capistrano and there I'd like to separate the production from the development branch. Should I point Capistrano to a different repo or should I use branches?

    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

  • Rails 2 support after Rails 3 has been released

    - by J. Pablo Fernández
    Is there some plan or estimate about how long will Rails 2 be supported after Rails 3 has been released? I wanted to ride the wave and move to Rails 3 right away, specially for projects that may take 4 or 6 months to finish (so that they would probably be released with Rails 3.0.0 final) but I've found many things still not working, many basic plugins and gems; so I believe I'm stuck with Rails 2 for now.

    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

  • How to register a service with Mono.ZeroConf?

    - by pablo
    Hi, I'm trying to test the ZeroConf sample at http://www.mono-project.com/Mono.Zeroconf. I'm running OpenSuse 11 and Mono 2.2. My server code is: using System; using Mono.Zeroconf; namespace zeroconftestserver { class MainClass { public static void Main(string[] args) { RegisterService service = new RegisterService (); service.Name = "test server"; service.RegType = "_daap._tcp"; service.ReplyDomain = "local."; service.Port = 6060; // TxtRecords are optional TxtRecord txt_record = new TxtRecord (); txt_record.Add ("Password", "false"); service.TxtRecord = txt_record; service.Register(); Console.WriteLine("Service registered!"); Console.ReadLine(); } } } But I can't find my registered service with the sample client browser code nor with mzclient. Thanks!

    Read the article

  • Markdown to plain text in Ruby?

    - by J. Pablo Fernández
    I'm currently using BlueCloth to process Markdown in Ruby and show it as HTML, but in one location I need it as plain text (without some of the Markdown). Is there a way to achieve that? Is there a markdown-to-plain-text method? Is there an html-to-plain-text method that I could feel the result of BlueCloth?

    Read the article

  • Visual Web Developer 2008 Express wanting SQL Server 2005 instead of 2008?

    - by J. Pablo Fernández
    When I double click on an mdf file on Visual Web Developer 2008 (NerdDinner.mdf) it says: Connections to SQL Server files (*.mdf) require SQL Server Express 2005 to function properly. Please verify the installation of the component or download from the URL: http://go.microsoft.com/fwlink/?LinkId=49251 The URL of course points to SQL Server Express 2008. I have that one installed and running. Any ideas why am I getting that message?

    Read the article

  • setProperty must be overridden by all subclasses of SOAPMessage

    - by Pablo
    I'm trying to deploy some web services in a WAR application on JBoss 5.1.0. I have created the source files from an existing wsdl using JAX-WS tool wsgen. This created the Service files and @XmlType annotated clases that would act as request and response wrappers. This classes worked well on JBoss 4.2.3, but when moving to JBoss 5.1.0, I get this exception. java.lang.UnsupportedOperationException: setProperty must be overridden by all subclasses of SOAPMessage My configuration: Windows XP SP3 (but getting the same on Vista, as well as on Linux) Sun JDK 1.6.0_17 JBoss 5.1.0 GA for jdk6 Thanks in advance!

    Read the article

  • Oracle .NET Provider DLL hell

    - by Pablo Santa Cruz
    I am currently developing on a Win7-32bits computer. Everything works fine. It's a ASP.NET application. I was able to use Microsoft's Oracle deprecated .NET provider to connect to Oracle (using 32 bit instant client) and also ODP.NET. No problems at all. Application runs fine. The problem comes when I deploy it to IIS7 on Windows 2008 Server 64bit computer. I can't get Microsoft's deprecated .NET provider or ODP.NET to work easily. Is there a straightforward way to use a 32bit based ODP.NET or Microsoft's Oracle deprecated .NET provider in Windows 2008 Server 64bits? DLL hell here! Thanks.

    Read the article

  • Extra arguments for Factory Girl

    - by J. Pablo Fernández
    I need to pass extra arguments to factory girl to be used in a callback. Something like this (but more complex really): Factory.define :blog do |blog| blog.name "Blah" blog.after_create do |blog| blog.posts += sample_posts blog.save! end end and then create it with something like this: Factory.create(:blog, :sample_posts => [post1, post2]) Any ideas how to do it?

    Read the article

  • Accessing the relationship of a relationship with Entity Framework

    - by J. Pablo Fernández
    I the School class I have this code: from student in this.Students where student.Teacher.Id == id select student The Student class there are two relationships: Teacher and School. In the School class I'm trying to find out all the students whose Teacher has a given id. The problem is that I get System.NullReferenceException: Object reference not set to an instance of an object. in the statement student.Teacher.Id I thought of doing this.Students.Include("Teacher"), but this.Students doesn't have such a method. Any ideas how can I perform that query?

    Read the article

  • Generating a text file in MYSQL stored procedure

    - by Pablo
    Hi, I'm new to MySQL, I am trying to create a text file using a stored procedure. I'm currently at the stage where I have a temporary table that contains all of the records that I want to output to a text file. I have the following line at the end of my SP, it works in PHPMYAdmin's query but it does not work when part of a stored procedure the code is as follows: SELECT * into outfile '../../htdocs/VIP/Temp/temp.txt' from tmp_Menu2; note that tmp_Menu2 is a table that only includes one field of type VARCHAR(1000) Any help would be greathly appreciated. Thank you,

    Read the article

  • Database performance benchmark

    - by pablo
    Any good articles out there comparing Oracle vs SQL Server vs MySql in terms of performance? I'd like to know things like: INSERT performance SELECT performance Scalability under heavy load Based on some real examples in order to gain a better understanding about the different RDBMS.

    Read the article

  • Stop multiple sessions accessing the same file simultaneously

    - by Pablo
    Is it possible to lock a file to stop it being opened while GD library is accessing it? What I am looking to achieve is similar to a database 'serialzable' level of isolation... I want to ensure that only one session/user can access an image at a time to stop a 'dirty read'. May application allows users to add an image of choice to a bigger image. for example the big image is empty Raj & Janet upload their images Raj's session opens the big image. 1 ms later Janet's session opens the big image. Raj's session add's his image and saves the big image 1 ms later Janet's session adds his image and saves its version of the big image. As a result Raj's image is not in the final image as Janet's version overwrote it. I hope that makes it clear enough.

    Read the article

  • Is JavaScript 's "new" Keyword Considered Harmful?

    - by Pablo Fernandez
    In another question, a user pointed out that the new keyword was dangerous to use and proposed a solution to object creation that did not use new... I didn't believe that was true, mostly because I've used Prototype, Scriptaculous and other excellent JavaScript libraries, and everyone of them used the new keyword... In spite of that, yesterday I was watching Douglas Crockford's talk at YUI theater and he said the exactly same thing, that he didn't use the new keyword anymore in his code. Is it 'bad' to use the new keyword? what are the advantages and disadvantages of using it?

    Read the article

  • Set PATH in NetBeans

    - by J. Pablo Fernández
    When running Ruby code on NetBeans (like when running the tests) I'm having some failures because a program is not being found. That program is installed somewhere in /opt and while for the shell I get that added to my PATH, it seems NetBeans is not getting it. How do I specify the PATH in NetBeans?

    Read the article

  • What Does OSGi Solve?

    - by Pablo Fernandez
    I've read on wikipedia and other sites about OSGi, but I don't really see the big picture. It says that it's a component based platform, and that you can reload modules at runtime. Also the "practical example" given everywhere is the Eclipse Plugin Framework. My questions are: 1) What is the CLEAR and SIMPLE definition of OSGi? 2) What COMMON PROBLEMS does it solve? By "common problems" I mean problems we face everyday, like "what can OSGi do for making our jobs more efficient/fun/simple" Thanks.

    Read the article

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