Search Results

Search found 4763 results on 191 pages for 'adams john'.

Page 124/191 | < Previous Page | 120 121 122 123 124 125 126 127 128 129 130 131  | Next Page >

  • How do I get a MessageBox like information window to appear in Java?

    - by John McClane
    I'm learning Java and I have no idea how to do this. I dragged a button on the form in Netbeans, double clicked it and it created this event: @Action public void HelloClickMethod() { JOptionPane.showMessageDialog(this, "The message!", "This is supposed to be the MessageBox title."); } This is the exception the IDE brings up. Cannot find symbol. Symbol: showMessageDialog() Edit 1 Now I changed it to this: @Action public void HelloClickMethod() { JOptionPane.showMessageDialog(this, "The message!", "This is supposed to be the MessageBox title.",JOptionPane.ERROR_MESSAGE); } However the IDE is saying I have an error in the word 'this'. "Cannot find symbol". I don't understand. Why is it so dificult and why are the errors so esoteric. :P

    Read the article

  • Lists Hash function

    - by John Retallack
    I'm trying to make a hash function so I can tell if too lists with same sizes contain the same elements. For exemple this is what I want: f((1 2 3))=f((1 3 2))=f((2 1 3))=f((2 3 1))=f((3 1 2))=f((3 2 1)). Any ideea how can I approch this problem ? I've tried doing the sum of squares of all elements but it turned out that there are collisions,for exemple f((2 2 5))=33=f((1 4 4)) which is wrong as the lists are not the same. I'm looking for a simple approach it there are any.

    Read the article

  • Java Swing rendering bug on Windows 7 look-and-feel?

    - by John B.
    The knob on vertical JSlider's on my Windows 7 machine (with native look-and-feel) is really, really tiny in both directions. Not just skinny but short as well. Can anyone confirm this? Should I report it? If so, where? Thanks! Here is the code for the sample program (in the screen shot): import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.JSlider; import javax.swing.SwingConstants; import javax.swing.UIManager; public class SliderTest { public static void main( String[] args ) { // Set the look and feel to that of the system try { UIManager.setLookAndFeel( UIManager.getSystemLookAndFeelClassName() ); } catch ( Exception e ) { System.err.println( e ); } // Launch the GUI from the event dispatch thread javax.swing.SwingUtilities.invokeLater( new Runnable() { public void run () { JFrame window = new JFrame(); window.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE ); JPanel contentPane = new JPanel(); contentPane.add( new JSlider(SwingConstants.HORIZONTAL) ); contentPane.add( new JSlider(SwingConstants.VERTICAL) ); window.setContentPane( contentPane ); window.pack(); window.setLocationRelativeTo( null ); // Center window window.setVisible( true ); } }); } }

    Read the article

  • Checking Android version

    - by John Smith
    I need if the phone running the app api level is 14 which is android 4.0 or more ( example api levcel 15 ) then startActivity ... else if the api level is lower than 14 ( example 13 ), then startActivity ... String AndroidVersion = android.os.Build.VERSION.RELEASE; if ( AndroidVersion == 4.0 ) { Intent start = new Intent(S.this, Menu.class); startActivity(start); } else { Intent startt = new Intent(S.this, Menu2.class); startActivity(startt); } whats the wrong ?

    Read the article

  • Problems opening large csv file

    - by John Tyler
    I have a csv file that is 100mb in size. I need to parse some data out of it into a new format. I tried PHP, but keep running into memory issues. After around the first 150 "rows" or so, the script poops out. This is even on the localhost, and doing everything I can to tune the PHP settings, including max_memory and script_execution_time. Now before I continue, I'd like to know if Python will poop out on me too. Or if I will have to use C++. Can someone name good csv libraries for for these programmin langueage? The file is quoted csv. I mean scheiza I can't even open this text file in OpenOffice without it dying on me. (then again, Java sux as bad as PHP)

    Read the article

  • Understanding Security Certificates (and thier pricing)

    - by John Robertson
    I work at a very small company so certificate costs need to be absolutely minimal. However for some applications we do Need to have our customers get that warm fuzzy not-using-a-self-signed certificate feeling. Since creating a "certificate authority" with makecert really just means creating a public/private key pair, it seems pretty clear that creating a public/private key pair FROM such a "certificate authority" really just means generating a second public/private key pair and signing both with the private key that belongs to the "certificate authority". Since the keys are signed anyone can verify they came from the certificate authority I created, or if verisign gave me the pair they sign it with one of their own private keys, and anyone can use verisigns corresponding public key to confirm verisign as the source of the keys. Given this I don't understand when I go to verisign or godaddy why they have rates only for yearly plans, when all I really want from them is a single public/private key pair signed with one of their private keys (so that anyone else can use their public keys to confirm that, yes, they gave me that public/private key pair and they confirmed I was who I said I was so you can trust my public/private key pair as belonging to a legitimate third party). Clearly I am misunderstanding something, what is it? Does verisign retire their public/private key pairs periodically so that my verisign signed key pair "expires" and I need new ones?

    Read the article

  • Wordpress parses wp_posts.post_content before rendering?

    - by John
    I noticed that when I call the the_post() or the_content() function from my wordpress template, it automatically parses the database data to replace new lines with <br/>, wraps the text with <p> tags etc...There's probably some kind of "format" function within the_post() or the_content(). I wrote a query to directly get posts from the wp_posts. I then print it out like <?php $results = $wp->get_results($sql) foreach($results as $row) echo $row->post_content; ?> Clearly, this data is not parsed by wordpress' "format" function. What is the proper way to output this content such that it undergoes the same "formatting" functions as the_post() or the_content()?

    Read the article

  • C++ arrays select square number and make new vector

    - by John Smith
    I have to see which of the following from a vector is a square number then make another vector with only the square numbers For example: (4,15,6,25,7,81) the second will be (4,25,81) 4,25,81 because 2x2=4 5x5=25 and 9x9=81 I started like this: { int A[100],n,r,i; cout<<"Number of elements="; cin>>n; for(i=1;i<=n;i++) { cout<<"A["<<i<<"]="; cin>>A[i]; } for(i=1;i<=n;i++) { r=sqrt(A[i]); if(r*r==A[i]) } return 0; } but I am not really sure how to continue

    Read the article

  • How to enforce a 5-minute per post rule in a session object in Java?

    - by John
    I'm trying to figure out how to enforce a 5 minute per post/action rule. I'm developing a web application with Wicket in Java and I've got a session class which I was planning on using to keep track of these timers on a per-user basis. I wasn't planning on storing the timestamp in a database. public boolean isAllowedToPost() { if(null OR has 5 minutes passed since last post) { // set the new timestamp return true; } else { return false; } }

    Read the article

  • Iphone 3.3 blocks

    - by John Wright
    I am tyring to use Objective C blocks on an iPhone 3.3 app but am getting a linkage error: "_NSConcreteGlobalBlock," referenced from: Any ideas as to whether blocks are supported in the iPhone 3.3 SDK? I found conflicting reports on the internet.

    Read the article

  • OSGi bundle imports packages from non-bundle jars: create bundles for them?

    - by John Simmons
    I am new to OSGi, and am using Equinox. I have done several searches and can find no answer to this. The discussion at OSGI - handling 3rd party JARs required by a bundle helps somewhat, but does not fully answer my question. I have obtained a jar file, rabbitmq-client.jar, that is already packaged as an OSGi bundle (with Bundle-Name and other such properties in its MANIFEST.MF), that I would like to install as a bundle. This jar imports packages org.apache.commons.io and org.apache.commons.io.input from commons-io-1.2.jar. The RabbitMQ client 2.7.1 distribution also includes commons-cli-1.1.jar, so I presume that it is required as well. I examined the manifests of these commons jars and found that they do not appear to be packaged as bundles. That is, their manifests have none of the standard bundle properties. My specific question is: if I install rabbitmq-client.jar as a bundle, what is the proper way to get access to the packages that it needs to import from the commons jars? There are only three alternatives that I can think of, without rebuilding rabbitmq-client.jar. The packages from the commons jars are already included in the Equinox global classpath, and rabbitmq-client.jar will get them automatically from there. I must make another bundle with the two commons jars, export the needed packages, and install that bundle in Equinox. I must put these two commons jars in the global classpath when I start Equinox, and they will be available to rabbitmq-client.jar from there. I have read that one normally does not use the global classpath in an OSGi container. I am not clear on whether items from the global classpath are even available when building individual bundle classpaths. However, I note that rabbitmq-client.jar also imports other packages such as javax.net, which I presume come from the global classpath. Or is there some other bundle that exports them? Thanks for any assistance!

    Read the article

  • best REGEXP friendly Text Editors + most powerful REGEXP syntax?

    - by John
    I am fluent with Microsoft Visual 2005 regular expressions and they are a big time saver. I seem to learn them best by having a vaguely organized cheat sheet thrown at me, at which point I read just a little and play with them until I understand what's going on. That learning approach has worked well for me, for now. I would really like to take this to the next level though. Basically -- What is the REGEXP convention that is generally regarded as the most open-ended and powerful? VS2005 Regexps seem kind of gimped, so maybe I'm a kid playing in a sandbox. Are there text editors out there that can perform a highlight all matches, list lines containing string, or some kind of powerful function like that in conjunction with the very strongest REGEXP language? If not I can just use multiple programs and a weird technique but I'd like to avoid that. I wonder if a stronger REGEXP language or a "stronger" regEXP writer might be able to have his search match all results on all lines even by clicking a "find next" by adding some simple criteria to the search. Anyway, please provide advice!

    Read the article

  • Macro for search Variabl, Date or value

    - by John
    To whom it may concern Good Day I have an excel work book with 10 sheets. In that work book 1 to 5 rows are header. I would like to search a Value, Variable or Date as I required. If it found then all rows should copy to a new work book. I need button for run macro. Program should ask what I need to search for. If I put a date macro should search all workbook if found all result should copy to a new workbook. Can any one give a solution for this.

    Read the article

  • Magento "File was not uploaded"

    - by John
    I'm currently using the magento admin interface, trying to upload an image in the "manage products" and I get the error "file was not uploaded" after I browse the file and click "upload file". I've looked on other forums and the main solution I saw were to make sure that php.ini has the following lines... magic_quotes_gpc = off short_open_tag = on extension=pdo.so extension=pdo_mysql.so I have Windows/IIS with ISAPI_Rewrite. Is there a max file upload size that I can change somewhere. I'm uploading pictures from my local desktop of size ~100kb. help!

    Read the article

  • Does Flash Builder 4 now use AIR 2?

    - by John Isaacks
    I just got CS5 master suite which includes Flash Builder 4 and Flash CS5 Pro. When I create a new AIR app in CS5 pro it says "AIR 2" but when I create a new AIR project in Flash Builder I do not see anything indicating that it is AIR 2 or 1.5? Is there a way to tell which AIR runtime it is using?

    Read the article

  • frequently merge changes between branch and trunk?

    - by John
    My team and I are using svn branches for the first time. Before, we use to work only from the trunk. Over the past 2 weeks, we've been refactoring and developing new code against our branch. But during that time, another developer has been making bug fixes to code in the trunk and deploying it to the production server. We would like to frequently "update" our branch with changes from the trunk to make sure we get the latest fixes. But the problem is that we're making drastic changes to our branch, and many files have been renamed. I have a feeling every "update" we do on our branch that takes changes from trunk will cause a conflict, unless we some how get subversion to recognise that fileA.html in trunk is really fileB.html in branch. Am I using subversion branches correctly? Am I using the word "update" correctly? Are frequent "updates" in branch advisable?

    Read the article

  • Python check if object is in list of objects

    - by John
    Hi, I have a list of objects in Python. I then have another list of objects. I want to go through the first list and see if any items appear in the second list. I thought I could simply do for item1 in list1: for item2 in list2: if item1 == item2: print "item %s in both lists" However this does not seem to work. Although if I do: if item1.title == item2.title: it works okay. I have more attributes than this though so don't really want to do 1 big if statement comparing all the attributes if I don't have to. Can anyone give me help or advise on what I can do to find the objects which appear in both lists. Thanks

    Read the article

  • Javascript Replace Child/Loop issue

    - by Charles John Thompson III
    I have this really bizarre issue where I have a forloop that is supposed to replace all divs with the class of "original" to text inputs with a class of "new". When I run the loop, it only replaces every-other div with an input, but if I run the loop to just replace the class of the div and not change the tag to input, it does every single div, and doesn't only do every-other. Here is my loop code, and a link to the live version: live version here function divChange() { var divs = document.getElementsByTagName("div"); for (var i=0; i<divs.length; i++) { if (divs[i].className == 'original') { var textInput = document.createElement('input'); textInput.className = 'new'; textInput.type = 'text'; textInput.value = divs[i].innerHTML; var parent = divs[i].parentNode; parent.replaceChild(textInput, divs[i]); } } }

    Read the article

  • Ruby: execute a binary file in memory?

    - by John
    Is it possible to read binary in ruby file and execute it directly in memory? for example something like this: x = IO.read('/bin/ls') execute(x) I tried system(x) but it doesn't work ArgumentError: string contains null byte

    Read the article

  • Preloading images in HTML, is there a more modern way?

    - by John
    I have an image loaded by JS on a mouse event. It's a fairly big image so I want to make sure it gets pre-loaded. I reemmber some old techniques from years ago and found this example: <SCRIPT LANGUAGE = JAVASCRIPT> if (document.images) { img1 = new Image(); img2 = new Image(); img1.src = "imageName1.gif"; img2.src = "imageName2.gif" } </SCRIPT> I wondered if this is still good/relevant, or maybe browsers automatically detect unused images and preload them anyway? Note my page has to support IE6, so I might still need older techniques anyway, but I'm still interested if more modern browsers have a better way?

    Read the article

< Previous Page | 120 121 122 123 124 125 126 127 128 129 130 131  | Next Page >