Search Results

Search found 310 results on 13 pages for 'jimmy nguyen'.

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

  • Which information (files) of an eclipse-workspace should be tracked by source control

    - by Phuong Nguyen de ManCity fan
    I want to track the workspace of eclipse by source control so that important settings can be backed up. However, there are a lot of kind of *.index inside the .metadata folder of workspace. Some information are important, for example Mylyn repository, but some information is merely cached files and thus, doesn't make sense to me for being tracked. In short, what files inside eclipse workspace that should be tracked so that I can restore the working workspace after problems (like meta data file deleted, etc.)

    Read the article

  • Using $.get with jquery validation

    - by Jimmy McCarthy
    I'm trying to use the Jquery builtin validator on my page. The issue is that I have certain fields that only are required if the JobID (entered into another field) does not already exist in our database. I have a simple service which simply takes JobID and returns True or False based on whether the JobID exists, but I can't seem to get this information where I want it. Some sample code: $("#dep_form").validate({ rules: { JobID: { required: true, digits: true, minlength: 3 }, OrgName: { required: function(element) { //This field is required if the JobID is new. return $("#jobinfo").html().length==15; } } }, messages: { JobID: { required: "Enter a Job Number.", digits: "Only numbers are allowed in Job ID's.", minlength: "Job Number must be at least 3 digits" }, OrgName: { required: "Select a Practice from the dropdown list." } }, errorClass: "ui-state-error-input", errorLabelContainer: "#errorbox", errorElement: 'li', errorContainer: "#validation_errors", onfocusout: false, onkeyup: false, focusinvalid: false }; Currently, I'm using a lazy method to validate (shown above). However, I now have access to a service using the URL: var lookupurl = "/deposits/jobidvalidate/?q=" + $("#id_JobID").val() + "&t=" + new Date().getTime(); which is a page which will contain just the word True or False based on whether that given JobID exists. I've tried half a dozen different ways of setting variables and calling functions within functions and still cannot get a way to simply return the value of that page (which I've been trying to access with $.get() ) to my validator, so that required is set to true when the Job does not exist and false if the job already exists. Any suggestions? Thanks.

    Read the article

  • Unbelievable: Cannot cast from class X to its super class

    - by Phuong Nguyen de ManCity fan
    I'm encountering a very weird problem with Spring (3.0.1.RELEASE), TestNG (5.11) and Maven Surefire (2.5). I have a test class that extends a Spring helper class for testNG so that test context can be loaded from an xml file (that contains some bean definitions). My project was imported into eclipse using m2eclipse (using Import Maven Project) The class run fine in Eclipse TestNG runner. However, it throws this exception with Maven Surefire Caused by: java.lang.ClassCastException: com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl cannot be cast to javax.xml.parsers.DocumentBuilderFactory at javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:123) at org.springframework.beans.factory.xml.DefaultDocumentLoader.createDocumentBuilderFactory(DefaultDocumentLoader.java:89) at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:70) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:388) I have eliminated all involved dependencies in my pom so that the two classes com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl and javax.xml.parsers.DocumentBuilderFactory are coming from JRE only (the rt.jar). So, it looks so unbelievable to me. I wonder if there is any mechanism in loading class that can explain for this behavior? Thanks.

    Read the article

  • Adding a font for use in ReportLab

    - by Jimmy McCarthy
    I'm trying to add a font to the python ReportLab so that I can use it for a function. The function is using canvas.Canvas to draw a bunch of text in a PDF, nothing complicated, but I need to add a fixed width font for layout issues. When I tried to register a font using what little info I could find, that seemed to work. But when I tried to call .addFont('fontname') from my Canvas object I keep getting "PDFDocument instance has no attribute 'addFont'" Is the function just not implemented? How do I get access to fonts other than the 10 or so default ones that are listed in .getAvailableFonts? Thanks. Some example code of what I'm trying to make happen: from reportlab.pdfgen import canvas c = canvas.Canvas('label.pdf') c.addFont('TestFont') #This throws the error listed above, regardless of what argument I use (whether it refers to a font or not). c.drawString(1,1,'test data here') c.showPage() c.save() To register the font, I tried from reportlab.lib.fonts import addMapping from reportlab.pdfbase import pdfmetrics pdfmetrics.registerFont(TTFont('TestFont', 'ghettomarquee.ttf')) addMapping('TestFont', 0, 0, 'TestFont') where 'ghettomarquee.ttf' was just a random font I had lying around.

    Read the article

  • JPA - Performance with using multiple entity manager

    - by Nguyen Tuan Linh
    My situation is: The code is not mine I have two kinds of database: one is Dad, one is Son. In Dad, I have a table to store JNDI name. I will look up Dad using JNDI, create entity manager, and retrieve this table. From these retrieved JNDI names, I will create multiple entity managers using multiple Son databases. The problem is: Son have thousands of entities. It takes each Son database around 10 minutes to load all entities. If there is 4 Son databases, it will be 40 minutes. My question: Is there any way to load all entities and use them for all entity manager? Please look at the code below For each Son JNDI: Map<String, String> puSonProperties = new HashMap<String, String>(); puSonProperties.put("javax.persistence.jtaDataSource", sonJndi); EntityManagerFactory emf = Persistence.createEntityManagerFactory("PUSon", puSonProperties); PUSon - All of them use the same persistence unit log.info("Verify entity manager for son: {0} - {1}", sonCode, emSon.find(Son_configuration.class, 0) != null ? "ok" : "failed!"); This is the actual code where the loading of all entities begins. 10 mins.

    Read the article

  • Easy Flood Fill

    - by Jimmy
    Some advice, please. I'm just starting out in C#. I've managed to get some shapes created on a Windows form, and now I'd like to fill them with color. In the old C++ I studied years ago, there was a floodfill function that was really easy. It has been an unpleasant realization to find there's not a similar method available in regular old C#. Does anyone have advice for me, or some code, so I can implement filling without understanding GDI+, DirectX, or rest of the avalanche of acronyms that I've run into by researching this on the web? I need to fill irregular shapes, bounded by a certain color. Gradient and transparency control would be nice, but I'd settle for plain old solid fill right now, just to get a modicom of control over this. Any help, code or advice would be really appreciated.

    Read the article

  • UTF-8 BOM in php response to mootools xmlhttprequest

    - by Jimmy
    Hi, I'm writing my first little AJAX-enabled Joomla component. I'm using mootools. I got a xmlhttprequest to contact my Joomla component, and the component returns a response - just plain text echoed by php, like echo 'Hello World!'; It's all working fine, except wireshark tells me that the response is prepended with \357\273\277\357\273\277 when it gets read by the javascript on the client side. This shows up as a little square before the response in an alert box that the script shows. I don't explicitly set the encoding on the xmlhttprequest; mootools docs say that it defaults to UTF8. What's the right way to handle this? Should I be setting the encoding on the request? Mime type? Should the javascript get rid of it? I'm not planning to have any characters requiring UTF8 in the response, so using plain old ascii would be ok for me too. Thanks

    Read the article

  • How to debug GWT using Ant

    - by Phuong Nguyen de ManCity fan
    I know that the job would be simpler if I use Google Plugin for Eclipse. However, in my situation, I heavily adapted Maven and thus, the plugin cannot suit me. (In fact, it gave me the whole week of headache). Rather, I relied on a ant script that I learned from http://code.google.com/webtoolkit/doc/latest/tutorial/appengine.html The document was very clear; I follow the article and successfully invoked DevMode using ant devmode. However, the document didn't tell me about debugging GWT (like Google Plugin for Eclipse can do). Basically, I want to add some parameter to an ant task that expose a debug port (something like (com.google.gwt.dev.DevMode at localhost:58807)) so that I can connect my eclipse to. How can I do that?

    Read the article

  • How to write a virtual conditional breakpoint in java

    - by Phuong Nguyen de ManCity fan
    I'm sorry if the question title may mis-inform you, but I cannot find a proper word to explain that. If you ever working with .NET, you would know that there is Assert class that will automatically wake up and attach debugger if necessary and then have debugger (Visual Studio) pausing at the Assert command, given the Assert command failed. Given I'm running a java program and having debugger connected, then how can I have debugger to break on certain condition without manually setup a break point? I'm expecting something like that: void doSomeThing(String x){ if (x==null) breakDebuggerNow(); }

    Read the article

  • Validating textboxes and checkboxes then add the values of those checkboxes

    - by TiTi Nguyen
    I am very new to Javascript. I am running to a problem and don't know how to solve it. Could you please help? Basically, I want to create some textboxes and checkboxes in a form. Then I have to validate those fields, and add the values of the checkboxes if they are selected. One of the textboxes asking for how many semesters attended, and 3 checkboxes with value of 100, 1000, and 750. Whichever checkbox is selected, it should multiply its value to the number of semesters attended. For example if the first two checkboxes are selected then totalCost = (100+1000)* semester. Here is my code: User Name: <label>User Address: <input type = "text" id ="address" size = "30"/></label> <br/><br/> <label> User E-mail address: <input type = "text" id ="email" size = "30"/></label> <br/><br/> <label> User Phone number: <input type = "text" id ="phone" size = "30"/></label> <br/><br/> <label> User area code: <input type = "text" id ="area" size = "30"/></label> <br/><br/> <label> User SSN: <input type = "text" id ="ssn" size = "30"/></label> <br/><br/> <label> User Birthday: <input type = "text" id ="birthday" size = "30"/></label> <br/><br/> <label> Number of semester attended: <input type = "text" id ="semester" size = "3"/></label> <br/><br/> <label><input type="checkbox" id="box_book" value="100"/>Books $100 per semester</label> <br/> <label><input type="checkbox" id="box_tuition" value="1000"/>Tuition $1000 per semester</label> <br/> <label><input type="checkbox" id="box_room" value="750"/>Room and Board $750 per semester</label> <br/> <input type="reset" id="reset"/> <input type="submit" id="submit" onclick="checking()"/> <p/> </form> function checking() { var name=document.forms["myForm"]["name"].value; var address=document.forms["myForm"]["address"].value; var email=document.forms["myForm"]["email"].value; var atpos=email.indexOf("@"); var dotpos=email.lastIndexOf("."); var phone=document.forms["myForm"]["phone"].value; var area=document.forms["myForm"]["area"].value; var ssn=document.forms["myForm"]["ssn"].value; var birth=document.forms["myForm"]["birthday"].value; var semester=document.forms["myForm"]["semester"].value; var boxBook = document.forms["myForm"]["box_book"].value; var boxTuition = document.forms["myForm"]["box_tuition"].value; var boxRoom = document.forms["myForm"]["box_room"].value; if (name==null || name=="") { alert("Please fill in your name."); return false; } if (address==null || address=="") { alert("Please fill in your address."); return false; } if (atpos<1 || dotpos<atpos+2 || dotpos+2>=email.length) { alert("The email (" + email + ") is not a valid e-mail address. Please reenter your email address."); return false; } if(phone.length!=10) { alert("Phone number entered in incorrect form. Please reenter phone number in the correct form which contains 10 numbers."); return false; } if (area==null || area=="") { alert("Please fill in the area code"); return false; } if(ssn.length!=9) { alert("SSN entered in incorrect form. Please reenter SSN."); return false; } if (birth==null || birth=="") { alert("Please fill in your date of birth."); return false; } if (semester==null || semester=="") { alert("How many semester have you attended?"); return false; } if (document.getElementById("box_book").checked == false && document.getElementById("box_tuition").checked == false && document.getElementById("box_room").checked == false) { alert("You must select one of the checkboxes"); return false; } if (document.getElementById("box_book").checked ==true) { var subcost = boxBook; var totalcost = subcost * semester; alert ("Your total cost is: $" + totalcost); } if (document.getElementById("box_book").checked == true && document.getElementById("box_tuition").checked == true) { var subcost = boxBook + boxTuition; var totalcost = subcost * semester; alert ("Your total cost is: $" + totalcost); } if (document.getElementById("box_book").checked == true && document.getElementById("box_tuition").checked == true && document.getElementById("box_room").checked == true) { var subcost = boxBook + boxTuition + boxRoom; var totalcost = subcost * semester; alert ("Your total cost is: $" + totalcost); } if (document.getElementById("box_tuition").checked ==true) { var subcost = boxTuition; var totalcost = subcost * semester; alert ("Your total cost is: $" + totalcost); } if (document.getElementById("box_tuition").checked == true && document.getElementById("box_room").checked == true) { var subcost = boxTuition + boxRoom; var totalcost = subcost * semester; alert ("Your total cost is: $" + totalcost); } if (document.getElementById("box_room").checked ==true) { var subcost = boxRoom; var totalcost = subcost * semester; alert ("Your total cost is: $" + totalcost); } if (document.getElementById("box_book").checked == true && document.getElementById("box_room").checked == true) { var subcost = boxBook + boxRoom; var totalcost = subcost * semester; alert ("Your total cost is: $" + totalcost); } else return false; } When I hit the submit button, nothing happens!! Please help.

    Read the article

  • Excluding files from being deployed with Capistrano while still under version control with Git

    - by Jimmy Cuadra
    I want to start testing the JavaScript in my Rails apps with qUnit and I'm wondering how to keep the test JavaScript and test runner HTML page under version control (I'm using Git, of course) but keep them off the production server when I deploy the app with Capistrano. My first thought is to let Capistrano send all the code over as usual including the test files, and write a task to delete them at the end of the deployment process. This seems like sort of a hack, though. Is there a cleaner way to tell Capistrano to ignore certain parts of the repository when deploying?

    Read the article

  • How to add ACTIVE DIRECTORY user to Sharepoint group

    - by standley-nguyen
    Hi all. I got an exception when executing this snippet code SPSecurity.RunWithElevatedPrivileges(delegate() { using (SPSite site = new SPSite(siteUrl.Trim())) { using (SPWeb web = site.OpenWeb()) { try { web.AllowUnsafeUpdates = true; SPUser spUser = web.AllUsers[userName]; if (spUser != null) { SPGroup spGroup = web.Groups[groupName]; if (spGroup != null) spGroup.AddUser(spUser); } } catch (Exception ex) { this.TraceData(LogLevel.Error, "Error at function Named [AddUserToSPGroupWidget.AddUserToGroup] . With Error Message: " + ex.ToString()); } finally { web.AllowUnsafeUpdates = false; } } } }); PLease guide me. Thanks in advance.

    Read the article

  • mysql C connector unresolved symbols on Win2k8 but not on XP?

    - by jimmy glick
    I have a visual C++ 2008 express project which compiles fine on Windows XP with mysql C connector 6.0.2. When I copy the project over to a Windows Server 2008 x64 machine, it gets a bunch of linker errors like "unresolved external symbol _mysql_server_end@0" "unresolved external symbol _mysql_close@4" "unresolved external _mysql_real_connect@32". Is the mysql C connector 6.0.2 known to not work with Win Server 2008? (Note, the C connector is installed into the same place on both machines, and since I just copied over the project wholesale, it still has the correct libmysql.lib include. The interesting thing is that the errors I get on XP if I remove the libmysql.lib are not the same errors I'm getting on Win2k8, so that's what makes me think it might be an incompatibility...or maybe it's just because win2k8 is x64 and XP is x86?) Thanks

    Read the article

  • Using Ext.Msg.Alert in Asp.net

    - by Nguyen Son
    Ext.onReady(function(){ if (Ext.get('ctl00_ContentBody_txtCM').dom.value == "") { Ext.MessageBox.alert("Status", "You have input CM!", function() { Ext.get('ctl00_ContentBody_txtCM').focus(); } ); } when submit button,it postback server before.Please help me.I using asp.net Thanks

    Read the article

  • Get current value in a set of CSS classes using Jquery

    - by Thang Nguyen
    Dear all I have some class like this <div class = "student"> <div class = "name">Adam </div> <input class = "paperTaken"> </div> <div class = "student"> <div class = "name">Smith</div> <input class = "paperTaken"> </div> When I put the cusor on an input field (say, "paperTaken" in the first "student" class), I can get the corresponding value in class "name" (eg: Adam). Could you help me? Thank you in advance.

    Read the article

  • iframe shifts 1 pixel to left on some browser sizes

    - by Tuan Nguyen
    i have code like, sorry i dont have the exact code now. but its valid. <iframe src="..." borderframe="0" scrolling="no" width=728px" height="90px"></iframe> the target is a html file that contains code for a banner. everything displays well. but when i resize browser or go to maximize. the content is shiftet to the left by 1 pixel. so the banner is displayed missing the first vertical 1px line. and only 727px is visible. anyone has an idea? thank you.

    Read the article

  • Convert date time value to expected with SimpleDateFormat

    - by Khoi Nguyen
    I have an issue with converting a date time value to expected one with SimpleDateFormat (java), my expected format is MM/yyyy, and I want to convert 2 values to only 1 format MM-yyyy for example 05-2012 yyyy-MM for example 2012-05 ouput is 05/2012. I implemented something look like following String expiry = "2012-01"; try { result = convertDateFormat(expiry, "MM-yyyy", expectedFormat); } catch (ParseException e) { try { result = convertDateFormat(expiry, "yyyy-MM", expectedFormat); } catch (ParseException e1) { e1.printStackTrace(); } e.printStackTrace(); } private String convertDateFormat(String date, String oPattern, String ePattern) throws ParseException { SimpleDateFormat normalFormat = new SimpleDateFormat(oPattern); Date d = normalFormat.parse(date); SimpleDateFormat cardFormat = new SimpleDateFormat(ePattern); return cardFormat.format(d); } Now, the return value is 6808, I don't know why. Kindly anyone help me on this case.

    Read the article

  • compiling cocos3d 0.7.2 with Xcode5 error

    - by jimmy
    I tried to compile my cocos3d 0.7.2 project with xcode5. I am already stuck at the first error I get with the line “super.parent = aNode;” in CC3ParametricMeshNodes.m. this line is in the setParent function: -(void) setParent: (CC3Node*) aNode { super.parent = aNode; [self deriveNameFrom: aNode]; if ( !mesh ) self.box = self.parentBoundingBox; } and the error I get is: CC3ParametricMeshNodes.m:246:15: Assignment to readonly property I am sure that there will be other errors after this one is fixed. Is there any topic on common errors that occur while compiling cocos3d 0.7.2 with Xcode5? Thanks

    Read the article

  • Point of Sale how to add quantity v2

    - by Jimmy nguyen
    Problem - I have Point of Sale V9 -intuit When ringing up a customer by using a barcode scanner for 1 item and the customer wants multiple of that same item but the receipt shows a long list of that same item. How can I get that program to set it where it would just self update without having to physically touching the keyboard or mouse I would pretty much want it to be user friendly Also if there is a code for this where do I put in the code?

    Read the article

  • MYSQL : First and last record of a grouped record (aggregate functions)

    - by Jimmy
    I am trying to do fectch the first and the last record of a 'grouped' record. More precisely, I am doing a query like this SELECT MIN(low_price), MAX(high_price), open, close FROM symbols WHERE date BETWEEN(.. ..) GROUP BY YEARWEEK(date) but I'd like to get the first and the last record of the group. It could by done by doing tons of requests but I have a quite large table. Is there a [low processing time if possible] way to do this with MySQL?

    Read the article

  • Ruby open-uri open method loses file extension opening images

    - by Jimmy
    I'm using ruby 1.9.2 along with Rails 3.1.4 and Paperclip 2.4.5. My issue is trying to save a paperclip attachment from a URI loses the file extension and saves the file without one resulting in issues with things like fancybox that require an extension. Some example code: uri = "http://featherfiles.aviary.com/2012-06-13/bbe5f0de1/0c5a672b88ea47ecb4631ac173e27430.png" open(uri) #=> #<File:/var/folders/zc/d69gxhzx10x_bvjrkqgyjgxr0000gn/T/open-uri20120613-27204-i6cldv> Because there is no extension on the temp file paperclip is saving the file without one resulting in issues. Has anyone run into this issue? I've seen multiple answers about using paperclip to store images from a URI but none seem to address the same problem we're running

    Read the article

  • How to add ACTIVE DOMAIN user to Sharepoint group

    - by standley-nguyen
    Hi all. I got an exception when executing this snippet code SPSecurity.RunWithElevatedPrivileges(delegate() { using (SPSite site = new SPSite(siteUrl.Trim())) { using (SPWeb web = site.OpenWeb()) { try { web.AllowUnsafeUpdates = true; SPUser spUser = web.AllUsers[userName]; if (spUser != null) { SPGroup spGroup = web.Groups[groupName]; if (spGroup != null) spGroup.AddUser(spUser); } } catch (Exception ex) { this.TraceData(LogLevel.Error, "Error at function Named [AddUserToSPGroupWidget.AddUserToGroup] . With Error Message: " + ex.ToString()); } finally { web.AllowUnsafeUpdates = false; } } } }); PLease guide me. Thanks in advance.

    Read the article

  • C# 4.0 'dynamic' doesn't set ref/out arguments

    - by Buu Nguyen
    I'm experimenting with DynamicObject. One of the things I try to do is setting the values of ref/out arguments, as shown in the code below. However, I am not able to have the values of i and j in Main() set properly (even though they are set correctly in TryInvokeMember()). Does anyone know how to call a DynamicObject object with ref/out arguments and be able to retrieve the values set inside the method? class Program { static void Main(string[] args) { dynamic proxy = new Proxy(new Target()); int i = 10; int j = 20; proxy.Wrap(ref i, ref j); Console.WriteLine(i + ":" + j); // Print "10:20" while expect "20:10" } } class Proxy : DynamicObject { private readonly Target target; public Proxy(Target target) { this.target = target; } public override bool TryInvokeMember(InvokeMemberBinder binder, object[] args, out object result) { int i = (int) args[0]; int j = (int) args[1]; target.Swap(ref i, ref j); args[0] = i; args[1] = j; result = null; return true; } } class Target { public void Swap(ref int i, ref int j) { int tmp = i; i = j; j = tmp; } }

    Read the article

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