Search Results

Search found 346 results on 14 pages for 'luis enrique'.

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

  • Somewhat lost with jquery + php + json

    - by Luis Armando
    I am starting to use the jquery $.ajax() but I can't get back what I want to...I send this: $(function(){ $.ajax({ url: "graph_data.php", type: "POST", data: "casi=56&nada=48&nuevo=98&perfecto=100&vales=50&apenas=70&yeah=60", dataType: "json", error: function (xhr, desc, exceptionobj) { document.writeln("El error de XMLHTTPRequest dice: " + xhr.responseText); }, success: function (json) { if (json.error) { alert(json.error); return; } var output = ""; for (p in json) { output += p + " : " + json[p] + "\n"; } document.writeln("Results: \n\n" + output); } }); }); and my php is: <?php $data = $_POST['data']; function array2json($data){ $json = $data; return json_encode($json); } ?> and when I execute this I come out with: Results: just like that I used to have in the php a echo array2json statement but it just gave back gibberish...I really don't know what am I doing wrong and I've googled for about 3 hours just getting basically the same stuff. Also I don't know how to pass parameters to the "data:" in the $.ajax function in another way like getting info from the web page, can anyone please help me? Edit I did what you suggested and it prints the data now thank you very much =) however, I was wondering, how can I send the data to the "data:" part in jQuery so it takes it from let's say user input, also I was checking the php documentation and it says I'm allowed to write something like: json_encode($a,JSON_HEX_TAG|JSON_HEX_APOS|JSON_HEX_QUOT|JSON_HEX_AMP) however, if I do that I get an error saying that json_encode accepts 1 parameter and I'm giving 2...any idea why? I'm using php 5.2

    Read the article

  • Highlight all occurrences of a selected object with ReSharper

    - by Luís Custódio
    I was used to use RockScroll (or MetalScroll), but when I started to use ReSharper my RockScroll start to show some bugs. Well, this is scope to another discussion http://stackoverflow.com/questions/1089493/is-rockscroll-compatible-with-resharper. But my problem is related, because now without MetalScroll I can't highlight all occurrences, what I consider very useful in many situations. Someone have another plugin for VS2010 or for ReSharper that do the same or better?

    Read the article

  • How to get the measures of an object from far away?

    - by Luis Armando
    I am working on an App that intends to give an accurate measure of any object (building, desk, chair, people, etc.) Using the camera (either phone's or laptop) but I'm unsure as to how to do this without using a lot of resources, would someone mind giving me some options? I'm looking for a lightweight one that can be quickly processed by the computer/phone to give back the measures.

    Read the article

  • Compute jvm heap size to host web application

    - by Enrique
    Hello, I want to host a web application on a private JVM they offer 32, 64, 128, 256 MB plans. My web application uses Spring. And I store some objects for every logged in user session. My question is: How can I profile my web app to see how much heap size it needs so I can choose a plan?, How can I simulate hundreds of users logged in at the same time? I'm developing the application using Netbeans 6.7 Java 1.6 Tomcat 6.0.18 Thank you.

    Read the article

  • rotate image with php - any degree

    - by Luis
    How to rotate an image with PHP, any degree, without having the filled space? For instance, if I rotate an image 10 degrees, the image rotates fine but the container around (square) gets filled with black. Is it possible to get rid of this, when for example merging 2 images?

    Read the article

  • Is there a best coding style for indentations (same line, next line)?

    - by Luis Soeiro
    I prefer Pascal-like coding style, where the beginning and ending of a code block are on the same column. I think that it is easier to read and to handle cut and paste than the other kind of coding style. The style I prefer (Pascal-like): void fooBar(String s) { int a; int length=s.length(); for (int i=0;i<length;i++) { if (i>10) { System.out.println(i); System.out.println(s.charAt(i)); } } } The style that was adopted by the Java community: void fooBar(String s) { int a; int length=s.length(); for (int i=0;i<length;i++){ if (i>10){ System.out.println(i); System.out.println(s.charAt(i)); } } } So why do you use one type or the other (please cite an objective reason)?

    Read the article

  • Given n report thumbnails, how do I create a Flex Effect that zooms into the selected report?

    - by Luis B
    I am worried about performance issues. If I just render all n reports zoomed out, then that will cost me in performance. Even animating a zoomed out report to zoom in, will also cost me in performance because it has to recalculate all the UIComponent's of my report as it transitions from zoomed out to zoomed in-to view. Any solutions/suggestions welcome. Let me know if you need clarification.

    Read the article

  • Managing Many to Many relationships in asp.net Wizard Control

    - by Luis
    Say I have this entity with a lot of attributes. In the input form I have decided to implement a wizard control so I can collect information about this entity in several steps. The problem is that I need to collect information that has been modeled has many to many relationships. I am planning to use a telerik gridview to manage this (add/edit/delete), the problem is where do I store that data since the entity in a insert form is not created on the database yet. OK so I can store all that info in temporary lists residing in the viewstate, waiting for the final submit where I dump all that in the DB, but one of the steps I am collecting files...now storing files in the viewstate is out of the question, same as as storing them in the session... I have been thinking of implementing in a way that the user has to submit some info first (say first 3 steps), commit the data to the database creating the parent entity and then start inserting all the childs entities...but this will get weird as it's confusing since on the first steps you not saving the data to the DB and on the next ones you are commiting directly... Anyone has any thoughts on this? Thanks

    Read the article

  • Using an ObjectCollection as a parameter create a new Control?

    - by Luis
    I was using something like public int Test(System.Windows.Forms.ListBox.ObjectCollection Colecction) { } With this I want to pass just the ObjectCollection of the control, to sort, add and delete elements without passing the entire control, but someone told me that, this way of calling the collection, actualy, create an entire ListBox, making it a worst decition, than, passing a ListBox as a parameter. Is it true? An if, what's the best way of working whit the collection?

    Read the article

  • Event to listen to attribute changes

    - by Luis
    I dont think this is possible but maybe someone knows a way to achieve this. I want to attach an event to an html element to listen to attribute change. So say for instance that I want something to happen when a visibility of a div changes. The reason is that I have no control over the javascript that is switching the visibility, hence the need for an event. Thanks

    Read the article

  • JPA EclipseLink Auditing for Oracle issue with SessionCustomizer...

    - by enrique
    I was trying to use the SessionCustomizer for auditing with v$session.program for oracle and it works with JDBC but i need it working with JPA, so i read a bit more the documentation for SESSION_CUSTOMIZER in this site: http://wiki.eclipse.org/Using_EclipseLink_JPA_Extensions_(ELUG)#EclipseLink_JPA_Persistence_Unit_Properties_for_Customization_and_Validation but had not lucky in making it work in passing the program name parameter to oracle with the v$session.program... i was using the SessionCustomizer and it is an interface so my code is as follows: package com.util; import org.eclipse.persistence.config.SessionCustomizer; import org.eclipse.persistence.sessions.Session; /** * * @author xkalibur */ public class ProgramCustomizer implements SessionCustomizer{ public void customize(Session s) throws Exception { s.getDatasourceLogin().setProperty("v$session.program","Customers"); } } then in CustomerFacade : ProgramCustomizer pc=new ProgramCustomizer(); public void edit(Customer customer) { emProperties.put(PersistenceUnitProperties.SESSION_CUSTOMIZER,pc); em=factory.createEntityManager(emProperties); em.merge(customer); } and returns the following error: javax.ejb.EJBException Caused by: java.lang.NullPointerException at com.facades.CustomerFacade.edit(CustomerFacade.java:48) please some help...

    Read the article

  • Special characters incongruence

    - by Enrique
    Hello I'm building a Spring MVC web application that runs on Tomcat 6.0.20 and JDK 1.6.0_19. When I send some special characters through an HTML form some of them are stored as question marks ? For example these symbols are stored correctly: €, á, é, í, ‰, etc But some symbols are replaced with ? like: £, ?, ? MySQL tables charset is utf-8. My jsp also use utf-8 <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> I have included org.springframework.web.filter.CharacterEncodingFilter in web.xml as suggested here When I debug the POST request when sending 3 characters €a£ with firebug I get: %E2%82%ACa%E2%82%A4 which is correct since E2 82 AC is the code for € and E2 82 A4 is the code for £ but £ is stored as ? in the database. When I save £ directly into the database it is displayed correctly in the webpage. How can I fix this?

    Read the article

  • Sanitize file_get_contents

    - by Luis
    I want to use file_get_contents to implement a proxy so I can do ajax cross domain requests. Querystring will be used to supply the URL to file_get_contents. Now the problem is people can muck around with the qurystring in order to read local files on the server. I dont wnat this. Can someone get me a function to sinitize the querystring in order only to accept urls and not local files: ie: ?url=http://google.com.au - OK ?url=./passwords.txt - Not OK

    Read the article

  • C++: defining maximum/minimum limits for a class

    - by Luis
    Basically what the title says... I have created a class that models time slots in a variable-granularity daily schedule (where for example the first time slot is 30 minutes, but the second time slot can be 40 minutes); the first available slot starts at (a value comparable to) 1. What I want to do now is to define somehow the maximum and minimum allowable values that this class takes and I have two practical questions in order to do so: 1.- does it make sense to define absolute minimum and maximum in such a way for a custom class? Or better, does it suffice that a value always compares as lower-than any other possible value of the type, given the class's defined relational operators, to be defined the min? (and analogusly for the max) 2.- assuming the previous question has an answer modeled after "yes" (or "yes but ..."), how do I define such max/min? I know that there is std::numeric_limits<> but from what I read it is intended for "numeric types". Do I interpret that as meaning "represented as a number" or can I make a broader assumption like "represented with numbers" or "having a correspondence to integers"? After all, it would make sense to define the minimum and maximum for a date class, and maybe for a dictionary class, but numeric_limits may not be intended for those uses (I don't have much experience with it). Plus, numeric_limits has a lot of extra members and information that I don't know what to make with. If I don't use numeric_limits, what other well-known / widely-used mechanism does C++ offer to indicate the available range of values for a class?

    Read the article

  • Database contents setting themselves to 0

    - by Luis Armando
    I have a Database that contains 4 tables, however I'm using 1 of them which is separated from the others. In this table I have 4 fields which are varchar and the rest are ints (11 other fields), when the users fill up the DB everything gets saved correctly, however it has happened 3 times so far that the database values for the int's reset to 0 without any apparent reason. At first, I thought, it was because those fields (where the numbers should go) were varchars not ints. However since I changed it, it happened again. I've already double checked my code and I have nothing that even updates or inserts a 0 value. Also I'm using codeigniter and active records which protect against SQL injections AND have XSS filtering enabled, could anyone point out something I might be missing or a reason for this to be happening? Also, I'm pretty sure about the answer of this but, is there ANY way to recover some data?? Other than having to ask everyone to fill in everything again.. =/ ** EDIT ** The Storage Engine is MyISAM and Collation is latin1_swedish_ci, Pack Keys are default, for all intents and purposes it's a normal DB

    Read the article

  • Passing Extras and screen rotation

    - by Luis A. Florit
    This kind of questions appear periodically. Sorry if this has been covered before, but I'm a newbie and couldn't find the appropriate answer. It deals with the correct implementation of communication between classes and activities. I made a gallery app. It has 3 main activities: the Main one, to search for filenames using a pattern; a Thumb one, that shows all the images that matched the pattern as thumbnails in a gridview, and a Photo activity, that opens a full sized image when you click a thumb in Thumbs. I pass to the Photo activity via an Intent the filenames (an array), and the position (an int) of the clicked thumb in the gridview. This third Photo activity has only one view on it: a TouchImageView, that I adapted for previous/next switching and zooming according to where you shortclick on the image (left, right or middle). Moreover, I added a longclick listener to Photo to show EXIF info. The thing is working, but I am not happy with the implementation... Some things are not right. One of the problems I am experiencing is that, if I click on the right of the image to see the next in the Photo activity, it switches fine (position++), but when rotating the device the original one at position appears. What is happening is that Photo is destroyed when rotating the image, and for some reason it restarts again, without obeying super.onCreate(savedInstanceState), loading again the Extras (the position only changed in Photo, not on the parent activities). I tried with startActivityForResult instead of startActivity, but failed... Of course I can do something contrived to save the position data, but there should be something "conceptual" that I am not understanding about how activities work, and I want to do this right. Can someone please explain me what I am doing wrong, which is the best method to implement what I want, and why? Thanks a lot!!!

    Read the article

  • Persist data when the table was not mapped (JPA EclipseLink)

    - by enrique
    Hi everybody I need some help in persisting data into a table that has not been mapped... The issue is that the database we have has a table which all of its columns are foreign keys so by mapping the whole database all of the tables are correctly mapped. However that table called "category" is not mapped. The way in which we can browse the data is by passing for the table I mentioned using the @jointable annotation which was set by the system in the other tables with which "category" has a relation. So we can go ahead and using the collections and perform a query. But the issue comes when I want to persist data into that table because there´s no any entity. We tried to persist through the collections but no luck. Then I have just tried by creating the entity with its PK and Facade all by hand. However when I try to persist using the Merge method the system tries to perform an Insert when it is supposed to perform an Update. So obviously it returns an error. Does anybody have an idea on this situation? Thanks.-

    Read the article

  • jQuery: How can I work with dates in this format? mm/yyyy

    - by Enrique
    I'm doing a web application for articles Articles must be shown by month, with its published date stored as mm/yyyy Now: 1- Should I use a DATE type field for storing? 2- Will jQuery UI datePicker be useful for showing mm/yyyy? 3- How could I sort by mm/yyyy? I guess it will be more complicated if I store date normally and extract the day from date each time I want to do something, right? Thanks,

    Read the article

  • Help in setting the setClientInfo with JPA

    - by enrique
    i am trying to set to jpa the new JDBC method which allows the application to be identified with a name it is the setClientInfo() and i could do it using pure JDBC using the lines Properties jdbcProperties = new Properties(); jdbcProperties.put("user", "system"); jdbcProperties.put("password", "sw01"); jdbcProperties.put("v$session.program", "Clients"); Connection connection = DriverManager.getConnection(url,jdbcProperties); However i have new requirements and i need to make it with JPA EclipseLink i have been googling and could not find something substantial on how to set this property out in JPA i guess it is by annotating something but i do not know what, i was trying to setting the persistence unit by putting the following in the persistence unit: <properties> <property name="toplink.ddl-generation" value="create-tables"/> <property name="v$session.program" value="Clients"/> </properties> but no lucky ...does somebody know how to do it or any idea...? thanks in advanced.-

    Read the article

  • GWB | 30 Posts in 60 Days Update

    - by Staff of Geeks
    One month after the contest started, we definitely have some leaders and one blogger who has reached the mark.  Keep up the good work guys, I have really enjoyed the content being produced by our bloggers. Current Winners: Enrique Lima (37 posts) - http://geekswithblogs.net/enriquelima Almost There: Stuart Brierley (28 posts) - http://geekswithblogs.net/StuartBrierley Dave Campbell (26 posts) - http://geekswithblogs.net/WynApseTechnicalMusings Eric Nelson (23 posts) - http://geekswithblogs.net/iupdateable Coming Along: Liam McLennan (17 posts) - http://geekswithblogs.net/liammclennan Christopher House (13 posts) - http://geekswithblogs.net/13DaysaWeek mbcrump (13 posts) - http://geekswithblogs.net/mbcrump Steve Michelotti (10 posts) - http://geekswithblogs.net/michelotti Michael Freidgeim (9 posts) - http://geekswithblogs.net/mnf MarkPearl (9 posts) - http://geekswithblogs.net/MarkPearl Brian Schroer (8 posts) - http://geekswithblogs.net/brians Chris Williams (8 posts) - http://geekswithblogs.net/cwilliams CatherineRussell (7 posts) - http://geekswithblogs.net/CatherineRussell Shawn Cicoria (7 posts) - http://geekswithblogs.net/cicorias Matt Christian (7 posts) - http://geekswithblogs.net/CodeBlog James Michael Hare (7 posts) - http://geekswithblogs.net/BlackRabbitCoder John Blumenauer (7 posts) - http://geekswithblogs.net/jblumenauer Scott Dorman (7 posts) - http://geekswithblogs.net/sdorman   Technorati Tags: Standings,Geekswithblogs,30 in 60

    Read the article

  • GWB | Contest Standings as of May 17th, 2010

    - by Staff of Geeks
    I want to officially let everyone know the 30 posts in 60 days contest has started.  The current standings as as followed for those in the “Top 10” (there are twelve due to ties now).  For those who don’t know about the contest, we are ordering custom Geekswithblogs.net t-shirts for those members who post 30 posts in the 60 days, starting May 15th, 2010.  The shirts will have the Geekswithblogs.net logo on the front and your URL on the back.    Top 12 Bloggers in the 30 in 60 Contest Christopher House (4 posts) - http://geekswithblogs.net/13DaysaWeek Robert May (3 posts) - http://geekswithblogs.net/rakker Stuart Brierley (3 posts) - http://geekswithblogs.net/StuartBrierley Dave Campbell (2 posts) - http://geekswithblogs.net/WynApseTechnicalMusings Steve Michelotti (2 posts) - http://geekswithblogs.net/michelotti Scott Klein (2 posts) - http://geekswithblogs.net/ScottKlein Robert Kokuti (2 posts) - http://geekswithblogs.net/robertkokuti Robz / Fervent Coder (2 posts) - http://geekswithblogs.net/robz Mai Nguyen (2 posts) - http://geekswithblogs.net/Maisblog Mark Pearl (2 posts) - http://geekswithblogs.net/MarkPearl Enrique Lima (2 posts) - http://geekswithblogs.net/enriquelima Frez (2 posts) - http://geekswithblogs.net/Frez I will be publishing updates throughout the contest on this blog.  Technorati Tags: Contest,Geekswithblogs,30 in 60

    Read the article

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