I am having a huge problem. In my stylesheet I have: @media only screen and (min-width: 320px) and (max-width: 700px) { code1 } @media only screen and (min-width: 1280px) and (max-width: 1400px) { code2 } my browser window is currently 640x960, so only code1 should run... right? But code1 and … |
|
I forgot this word: 1) it is a program that runs that demonstrates an error for debugging 2) it is an acronym someone on either this board, or another board or another board where I ask programming questions told me to make one a few years ago... and now I … |
|
I could probably/def read a text file with javascript by embedding some ruby in there but I want to know how to do it with javascript. My code follows: [CODE] <HTML> <HEAD> <TITLE>"Text File"</TITLE> <SCRIPT LANGUAGE = JAVASCRIPT> function handleFile() { var myFile = document.getElementById('txtF') var fileContents = System.IO.File.ReadAllLines(myFile); document.form1.textfield.value=fileContents; … |
|
ok, I'm worried that this has an obvious answer that I'm just not seeing for whatever reason... like when you forget how to spell 'the'. I have a table. It is assigned to the class "posTBL". The posTBL class is defined in the css as follows: .posTBL { background-color: #000000; … |
|
hey, so I know if I use the drawLine() method, then I could change the line stroke/thickness with setStroke, but how do I change the thickness of a Line2D? |
|
hello, I made a little game that is similar to "Where's Waldo?", but it has several different people to find in each level. Anyway, each person is found by the user when he/she clicks on them. Sometimes the people are hidden in a crowd, or hidden in a bigger image. … |
|
Hi everyone, I'm trying to make a simple application displaying some amount of buttons which has added simmilar but different action. The amount of buttons is not known before compiling because it depends on external data. All the buttons are shown in some container. How did I get it: -creating … |
|
hey, so I am just starting java3D, and I am running into some pretty basic problems... I started a tutorial online (from [url]www.java3d.org[/url]) and the first sample program is: [CODE]import com.sun.j3d.utils.universe.SimpleUniverse; import com.sun.j3d.utils.geometry.ColorCube; import javax.media.j3d.BranchGroup; public class Hello3d { public Hello3d() { Â Â Â SimpleUniverse universe = new SimpleUniverse(); Â Â Â BranchGroup group = … |
|
what I'm pretty sure I learned in school and what like every website said when I tried to look this up online was that the C++ code for generating a random number with floor: 1 and ceiling 100 (err I guess 101) is: [CODE]int number = rand() % 100 + … |
|
|
This is the code: [CODE]public void testPopulate (int num) { ArrayList<String> great = new ArrayList<String>(); for (int i = 0; i < num; i++) { Random gen = new Random(); int b = 0; b = gen.nextInt(100) + 1; great.add("Account: " + (BASE_ACC_NUM + i)); great.add("Balance: " + b); System.out.println(great); … |
hey... I wat to change the... well, the cursor (the little blinking thing in a text area where subsequent typing appears) in a JTextArea. [U]Not[/U] the pointer (the mouse icon showing where on the screen the mouse is cuz some ppl thought that was wat I meant) but the cursor … |
|
[QUOTE]i am trying to implement a fitness function for GA. i got a code written in python. i don't have any idea about python. can someone help me to convert it into java the code is here [/QUOTE] [CODE]# there are many ways to do an eigenvalue decomp, this is … |
|
Can anyone figure out why the following code is not showing the menubar when it is run in eclipse. import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.*; public class MenuExample { Display display; Shell shell; Menu menu, fileMenu, editMenu,viewMenu; public MenuExample() { display = new Display(); shell = new Shell(display); shell.setText("Menu Example"); shell.setSize(300, 400); … |
|
Hi, I created a game in which players take turns entering their symbol by clicking on a box that is implemented on a grid window. I am having a hard time being able to check if the player has four symbols in a row diagonal or up or down or … |
|
Hello, I have a Computer Science project for school. I am done writing the full code but I am missing one of the requirements. Some of the text have to be aligned to the right. Here's an excerpt from my code which I want to change the alignment: [CODE] System.out.print … |
|
It's going on 4 hours now, and I have yet to find an answer on how to do this. All I want to do access and manipulate data in a list, from another class. The 2 classes: [B]GetList.java[/B] [CODE]public class GetList { public static void main(String args[]) { MakeList xx … |
|
I know this is a basic question. I asked the same question a while ago, even then thinking it was a simple question. The answer I got seemed to be what I already know and was obvious.. however, when I tried it, it did not work, so I just worked … |
|
[CODE] import os; def callAS(cmd): os.system(cmd); def selectFile(): callAS("""osascript -e 'tell application "Finder" to return choose file "Select the file:"'""") def fixPath(raw): arr = raw.split(' '); return(str(arr[1])); thePath = selectFile() thePath = fixPath(thePath); print(thePath); [/CODE] When the above code is run in IDLE, it just gives an error. But, when … |
|
please tell me step of converting java source code into jar in netbean or if any software available please send me download link of it. |
|
I want to run a multiline AppleScript command from a Python script. For a singleline command I can do: [CODE]def stupidtrick(): os.system(cmd) cmd = """osascript -e 'tell app "Finder" to sleep'""" stupidtrick(); [/CODE] however I want to run multiline commands, (such as with multiple 'tell' statements, as in [ICODE]tell application … |
|
ok, I'm pretty embarrassed to be posting such a simple question, I feel like I've done this in much harder applications like a million times... [CODE]String[] wordVar = text.split("$");[/CODE] Why does the above code not split the String 'text' at each occurrence of a "$"? Is the "$" a special … |
|
What is the difference between [ICODE]qq{}[/ICODE] and [ICODE]q{}[/ICODE]? I am learning some basic perl for class, and I noticed that [ICODE]qq{Element contents: $_}[/ICODE][ICODE]q{Element contents: $_}[/ICODE] produce different results in a loop... I thought "q{}" was like quoted or something.. What is it really? And what is qq{}? |
|
I'm sure this has an easy answer, but I don't know it. so I have a widget that will let you get alerts texted to a phone. I am trying to store the info, but I can't get the user's input into my javascript function shown below: [CODE]onClick="collect('info', 'nname=' + … |
|
I know u have like 'Web Development' and a 'PHP' section, and even a slightly less related "Perl' section but unless I missed it, I don't see one for CGI... or JQuery for that matter.. what about adding CGI to the 'PHP' section? Right now, PHP has it's own topic, … |
|
hey.. I recently learned a bit of Perl, and I want to test it out on the net... I was/am under the impression that a perl script can be embedded into HTML, but I am have trouble with that. I searched it but I came up with several methods, none … |
|
[CODE]public class Example { private static void createAndShowGUI() { JFrame.setDefaultLookAndFeelDecorated(true); JFrame frame = new JFrame("Window"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); JLabel emptyLabel = new JLabel(""); emptyLabel.setPreferredSize(new Dimension(175, 100)); frame.getContentPane().add(emptyLabel, BorderLayout.CENTER); frame.pack(); frame.setVisible(true); } public static void main(String[] args) { javax.swing.SwingUtilities.invokeLater(new Runnable() { public void run() { createAndShowGUI(); } }); } }[/CODE] In The above … |
|
Hello. I am writing a script to do some copying of files. I feel confident that I can do that part, but before I even start doing the actual copies, it compares the last modified dates of two files.. I know this seems a very basic question that I would … |
|
For now this has a sample dictionary of words, but later I will allow the user to provide their own dictionary. [CODE] import java.io.*; public class testReader { private String[] auto = {"lorem", "ipsum", "dolor", "sunglasses", "friend", "time", "flies", "like", "an", "arrow", "daisy", "bell", "the", "quick", "brown", "fox", "jumps", "over", … |
|
Hello. I am trying to input the name of a class that I have imported already, and can instantiate regularly, such as 'myClass inst = new myClass('foo');' and create a new instance-object of that class. The code below illustrates my question more specifically: [CODE] import java.lang.reflect.*; import java.io.*; public class … |
0 Reputation Points
~29.2K People Reached
Favorite Forums
Favorite Tags