Daily Archives

Articles indexed Tuesday May 18 2010

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

  • java.lang.NoClassDefFoundError: javax/persistence/Persistence

    - by ManWard
    hi , i'm using Netbeans 6.8 and build simple Maven web application project. create Entity and main file for persist Entity [also create persist unit] and use EclipsLink. but when i run main file get this error : Exception in thread "main" java.lang.NoClassDefFoundError: javax/persistence/Persistence at Main.main(Main.java:34) Caused by: java.lang.ClassNotFoundException: javax.persistence.Persistence at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) ... 1 more in netbeans projects window and in my project libraries folder only add this package : javaee-web-api-6.0.jar [provided] please help me for solve this Error thanks

    Read the article

  • Upload image using CURL + PHP via remote form

    - by user253530
    I have a few images that i need to upload using an online form. So far here's my code $info = array('test title','1234','virginia','@'.realpath('e:\wamp\www\1.jpg'),'@'.realpath('e:\wamp\www\2.jpg'),'@'.realpath('e:\wamp\www\3.jpg'),'@'.realpath('e:\wamp\www\4.jpg'),'test description'); $post->postAd($url, $info); The $info array is processed in the postAd method and it's being sent as an associative array using a method from a Curl class i have (it has been tested and worked nicely with everything i needed to do so far with curl). The problem is that the data is completed correctly on the form but the images are not uploaded. Can anyone help with advices/code/guidance?

    Read the article

  • UNIX timestamp always in GMT?

    - by bn
    UNIX timestamp always in GMT? I tried to run php function time() and when I tried to convert the unix timestamp from the time() function, the output is not similar to the computer time. Thank You

    Read the article

  • How can I retrieve CSV data from a web server using Flex?

    - by samoz
    I am trying to retrieve a stock quote from Yahoo! finance using Flex. I currently have it set so that it will pull the quote like I want, but it opens it in a new file. However, I want to store the CSV data in a variable so that I can use it in my program. How do I do this? Here is the code that I am using right now: navigateToURL(new URLRequest("http://download.finance.yahoo.com/d/quotes.csv?s=aapl&f=l1"),"_self");

    Read the article

  • Reading XML element & child nodes using LINQ in Vb.net- help me in where condition :(

    - by New Linq Baby
    Hi, I am new in LINQ world. I need an urgent help in reading the xml elements using LINQ with specific where condition. I need to find the max air_temp for a county i.e where county name = "Boone" and hour id = "06/03/2009 09:00CDT" i tried something like below, but no luck : Dim custs As IEnumerable = From c In Element.Load("C:\meridian.xml").Elements("county") _ Select c.Elements("hour").Elements("air_temp").Max() For Each x In custs Response.Write(custs(0).ToString()) Next ------------------- here is the xml file : <forecasts> <issued>06/02/2009 12:00CDT</issued> - <county name="Adair"> - <hour id="06/02/2009 12:00CDT"> <air_temp>61</air_temp> <cloud_cover>overcast</cloud_cover> <dew_point>59</dew_point> <precip_prob>90</precip_prob> <precip_rate>0.12</precip_rate> <precip_type>rain</precip_type> <snow_rate>0.0</snow_rate> <wind_direction>NE</wind_direction> <wind_speed>12</wind_speed> <dew_point_confidence>-3/+3</dew_point_confidence> <road_temp>64</road_temp> <road_frost_prob>0</road_frost_prob> <road_potential_evap_rate>429</road_potential_evap_rate> <road_temp_confidence>-3/+2</road_temp_confidence> <dew_point_confidence>-3/+3</dew_point_confidence> <bridge_temp>63</bridge_temp> <bridge_temp_confidence>-4/+2</bridge_temp_confidence> <bridge_frost>NO</bridge_frost> </hour> - <hour id="06/02/2009 13:00CDT"> <air_temp>61</air_temp> <cloud_cover>overcast</cloud_cover> <dew_point>60</dew_point> <precip_prob>70</precip_prob> <precip_rate>0.01</precip_rate> <precip_type>rain</precip_type> <snow_rate>0.0</snow_rate> <wind_direction>ENE</wind_direction> <wind_speed>10</wind_speed> <dew_point_confidence>-3/+3</dew_point_confidence> <road_temp>65</road_temp> <road_frost_prob>0</road_frost_prob> <road_potential_evap_rate>411</road_potential_evap_rate> <road_temp_confidence>-3/+2</road_temp_confidence> <dew_point_confidence>-3/+3</dew_point_confidence> <bridge_temp>64</bridge_temp> <bridge_temp_confidence>-4/+1</bridge_temp_confidence> <bridge_frost>NO</bridge_frost> </hour>

    Read the article

  • How to overlay a small page on a html page?

    - by Usman Ajmal
    Hi, I have a webpage underconstruction. I want to notify the people who visit it about its under-construction nature. For that I wanted to show a small transparent or transluscent page on the above page as shown here http://img17.imageshack.us/i/normalpagewithasmallpag.png/ You may notice that i want that page to appear at the center of the webpage overlayed on the original page with a cross at top-right corner. Clicking on that cross may close this small page revealing the page behind it so that the users may see what has been developed so far. I hope you guys have some suggestions for me. I know its possible with javascript but don't know how...any tutorial if available will also help. Thanks a lot.

    Read the article

  • Android - How to set the wallpaper image?

    - by asdf.BEN
    What i'm trying to do is, set the wallpaper using an image URI (no cropping) I'm a noob at dev on Android and dev in general. The internet has failed me... on providing code to set the wallpaper. yes the dev resource site says public void setStream (InputStream data) but i don't understand it, some sample code would greatly help me.

    Read the article

  • JBoss Database Connection Pool

    - by Salman
    I am new to jboss and i have been asked to incorporate jboss connection pooling mechanism with an existing web application. Considering that a web application database layer is properly written i.e. all resultsets, statements and connections being closed properly when not needed, What all code changes i will have to make in my web app after i have configured the jboss datasource properly. Can anybody please point me to a tutorial or a code sample which uses jboss datasource in a web app.

    Read the article

  • this.select() and javascript events on forms

    - by aloishis89
    I have a form box that I want to be always selected. I was able to get it to select everything in the box when it is clicked (using onFocus="this.select()") but I want it to be selected 100% of the time. The text in the box will be always changing, so I tried using onChange="this.select()" but that didn't work. Here's what I have: <form> <input type="text" id="txt1" size="30" maxlength="1" onkeyup="showHint(this.value)" onFocus="this.select()" onBlur="this.select()" onChange="this.select()" value="Click here, then press a key"/> </form> Basically I just tried to call everything in hopes that something would work, but it is still acting as if only onFocus="this.select()" is there. By the way, this is for controlling something via keyboard, which is why the maxlength is only 1. I want it to be always selected so that when new key are pressed, the last command will be changed without having to use backspace.

    Read the article

  • Finding a laptop to fit my spec's

    - by Mick
    I have a small list of characteristics that are required for a new laptop and have been looking for websites where I can specify my requirements and see which laptops fit the bill. I want to specify OS/RAM/HDD size/CD drive/screen resolution/battery life. I have found several sites so far where I can specify everything except battery life. Does such a site exist? I know that this is not a shopping site - but before any moderator rushes to close this question - please note that I am not asking "where do I buy this laptop" - merely what laptop fits this specs. I don't even care what country the website is based in.

    Read the article

  • How can I make the C# compiler infer these type parameters automatically?

    - by John Feminella
    I have some code that looks like the following. First I have some domain classes and some special comparators for them. public class Fruit { public int Calories { get; set; } public string Name { get; set; } } public class FruitEqualityComparer : IEqualityComparer<Fruit> { // ... } public class BasketEqualityComparer : IEqualityComparer<IEnumerable<Fruit>> { // ... } Next, I have a helper class called ConstraintChecker. It has a simple BaseEquals method that makes sure some simple base cases are considered: public static class ConstraintChecker { public static bool BaseEquals(T lhs, T rhs) { bool sameObject = l == r; bool leftNull = l == null; bool rightNull = r == null; return sameObject && !leftNull && !rightNull; } There's also a SemanticEquals method which is just a BaseEquals check and a comparator function that you specify. public static bool SemanticEquals<T>(T lhs, T rhs, Func<T, T, bool> f) { return BaseEquals(lhs, rhs) && f(lhs, rhs); } And finally there's a SemanticSequenceEquals method which accepts two IEnumerable<T> instances to compare, and an IEqualityComparer instance that will get called on each pair of elements in the list via Enumerable.SequenceEquals. public static bool SemanticSequenceEquals<T, U, V>(U lhs, U rhs, V comparator) where U : IEnumerable<T> where V : IEqualityComparer<T> { return SemanticEquals(lhs, rhs, (l, r) => lhs.SequenceEqual(rhs, comparator)); } } // end of ConstraintChecker The point of SemanticSequenceEquals is that you don't have to define two comparators whenever you want to compare both IEnumerable<T> and T instances; now you can just specify an IEqualityComparer<T> and it will also handle lists when you invoke SemanticSequenceEquals. So I could get rid of the BasketEqualityComparer class, which would be nice. But there's a problem. The C# compiler can't figure out the types involved when you invoke SemanticSequenceEquals: return ConstraintChecker.SemanticSequenceEquals(lhs, rhs, new FruitEqualityComparer()); If I specify them explicitly, it works: return ConstraintChecker.SemanticSequenceEquals< Fruit, IEnumerable<Fruit>, IEqualityComparer<Fruit> > (lhs, rhs, new FruitEqualityComparer()); What can I change here so that I don't have to write the type parameters explicitly?

    Read the article

  • Mac vs. Windows Browser Font Height Rendering Issue

    - by cdmckay
    I'm using a custom font and the @font-face tag. In Windows, everything looks great, regardless of whether it's Firefox, Chrome, or IE. On Mac, it's a different story. For some reason, the Mac font renderer thinks the font is a lot shorter than it is. For example, consider this test code (live example here): <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Webble</title> <style type="text/css"> @font-face { font-family: "Bubbleboy 2"; src: url("bubbleboy-2.ttf") format('truetype'); } body { font-family: "Bubbleboy 2"; font-size: 30px; } div { background-color: maroon; color: yellow; height: 100px; line-height: 100px; } </style> </head> <body> <div>The quick brown fox jumped over the lazy dog.</div> </body> </html> Open it on Windows Firefox and on Mac Firefox. Use your mouse to select it. On Windows, you'll notice it fully selects the font. On Mac, it only selects about half the font. If you look at what it is selecting, you'll see that that part has been centered, instead of the full height of the font. Is there anyway to fix this rather large discrepancy?

    Read the article

  • Deploy and Run application at beginning of WIX Install

    - by Doctor Fro
    I'm trying to deploy and run an application (C# console app) at the beginning of the MSI install with WIX but having some difficulty. The application needs to run before any of the webserver actions happen but after the files have been copied from the MSI to the target location. I can get the app to run but only if I have actually copied the application in the directory before I run the MSI. If I don't do that, I get an error relating to the app not existing in the MSI logs. So basically I think it has to do with the launch sequence I am using I need to ensure that the app exists before it is run. Wondering if one of you good folks could help me out. The requirement is that the application must run as the first thing the WIX MSI does, (well actually before any of the webservice parts happen). The relevant bits of the Wix are as follows. <CustomAction Id='LaunchUpdaterRunFirst' FileKey='serverUpdaterRunFirstExe' ExeCommand='' Return='ignore' /> ... <InstallExecuteSequence> <Custom Action='CA_BlockOlderVersionInstall' After='FindRelatedProducts'>NEWERVERSIONDETECTED</Custom> <RemoveExistingProducts After="InstallInitialize" /> <Custom Action='LaunchUpdaterRunFirst' After='InstallInitialize' /> <Custom Action='LaunchInstaller' After='InstallFinalize'><![CDATA[ REMOVE <> "ALL" and UILevel <> 2]]></Custom> </InstallExecuteSequence> ... <Component Id="ServerInstaller" DiskId="1" Guid="9662EC72-1774-4d22-9F41-AD98A5DCD729"> <File Id="serverUpdaterRunFirstExe" Name="MyCompany.Server.Updater.RunFirst.exe" Source="$(var.SOURCEPATH)\MyCompany.Server.Updater.RunFirst.exe" /> <File Id="serverUpdaterRunFirstExeConfig" Name="MyCompany.Server.Updater.RunFirst.exe.config" Source="$(var.SOURCEPATH)\MyCompany.Server.Updater.RunFirst.exe.config" /> Any help or references greatly appreciated.

    Read the article

  • wamp can't put offline!!

    - by user343570
    when i wana put it offline it say: "Could not execute menu item (internal error) [Exception] Could not perform service action: The service has not been started." all froums said to me:u must under Apache open the httpd.conf and change the lines #Listen 12.34.56.78:80 Listen 80 to #Listen 12.34.56.78:80 Listen 8080 save the file and you are done. but my httpd.conf is blank!!!i need it

    Read the article

  • How to prevent Debug.Assert(...) to show a modal dialog

    - by Martin
    I have a couple of libraries which use Debug.Assert(...). I think that the Debug.Assert(...) are fine and I still want them to execute, but I don't want them to block the execution of my application. Ideally, I would only like them to be logged somewhere. Given that I can't change the code of the libraries (and that I still want to compile in debug and run the assertion), how do I prevent Debug.Assert(...) to show a modal dialog? Thanks!

    Read the article

  • Array of Objects

    - by James
    Complete and utter neophyte to Objective-C and the entire Mac platform so don't flame me please =). Basically I'm trying to create a simple game. The game has a board which I've created a class for and a board is comprised of squares which I also created a class for (board and square respectively). In my view controller I'm trying to instantiate a board and add boardSize^2 squares to said object. board contains an NSMutableArray *squares. I've also created a convenience method which sets an NSNumber *boardSize called initWithDimension. In my touchesBegan handler I have the following: board *game_board = [[board alloc] initWithDimension:10]; int size = [game_board.boardSize intValue]; for(int i = 0; i <= size; i++) { square *s = [[square alloc] init]; [game_board.squares addObject:s]; [s release]; } NSLog(@"%i", size); NSLog(@"%@", [game_board.squares objectAtIndex:0]); ...and I'm getting 10 (as expected) and then (null). This is probably glaringly obvious to an experienced developer, I've just struggled for an hour trying to solve it and have given up. I've tried it without the [s release] as well, same result. I've also imported square.h and board.h. Any ideas what's wrong here? Any other comments on what I'm brutalizing? Thanks.

    Read the article

  • Verilog Posedge Problem

    - by Cenoc
    I'm having the following problem; I have a clk at 50MHz, but I want something else to run with a posedge signal whenever ready, but for some reason it always goes at the 50MHz, although I explicitly write otherwise, do you guys have any suggestions?

    Read the article

  • DirectX 9 HLSL vs. DirectX 10 HLSL: syntax the same?

    - by numerical25
    For the past month or so, I have been busting my behind trying to learn DirectX. So I've been mixing back back and forth between DirectX 9 and 10. One of the major changes I've seen in the two is how to process vectors in the graphics card. One of the drastic changes I notice is how you get the GPU to recognize your structs. In DirectX 9, you define the Flexible Vertex Formats. Your typical set up would be like this: #define CUSTOMFVF (D3DFVF_XYZRHW | D3DFVF_DIFFUSE) In DirectX 10, I believe the equivalent is the input vertex description: D3D10_INPUT_ELEMENT_DESC layout[] = { {"POSITION",0,DXGI_FORMAT_R32G32B32_FLOAT, 0 , 0, D3D10_INPUT_PER_VERTEX_DATA, 0}, {"COLOR",0,DXGI_FORMAT_R32G32B32A32_FLOAT, 0 , 12, D3D10_INPUT_PER_VERTEX_DATA, 0} }; I notice in DirectX 10 that it is more descriptive. Besides this, what are some of the drastic changes made, and is the HLSL syntax the same for both?

    Read the article

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