Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
84% Quality Score
Upvotes Received
7
Posts with Upvotes
5
Upvoting Members
5
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
0 Endorsements
Ranked #1K
~53.6K People Reached

40 Posted Topics

Member Avatar for ashalatha

Hi, > while inserting the data only unique records should be inserted into the database * Unique records based on what field(s)? * Unique records in the csv? You can use [array_unique()](http://www.php.net//manual/en/function.array-unique.php) to remove duplicates from csv, before you send it to bulk upload * Unique records in the DB? …

Member Avatar for ashalatha
0
3K
Member Avatar for Ryan_11

Hi Ryan, - echo the query and check if the final query is correct - you can also try to run the query in phpmyadmin and see if it returns any results. - if you don't have access to phpmyadmin, try removing the suppress error operator '@' when you run …

Member Avatar for Ryan_11
0
346
Member Avatar for parkz16

Hi, It seems that you are setting a null model for ComboBox in your `initComponents()` method (which is not listed in the code you've shown us). Check your code at line 292 as shown in the error log. ... and next time please use [code] tags for your code GL

Member Avatar for bguild
0
33K
Member Avatar for BilalAKhan

Hi, If you read the documentation you'll see that: [B]$_POST[/B] [I]is an associative array of variables passed to the current script via the HTTP POST method.[/I] In your example you get the errors because you are not passing this variables, and the last to lines are executed before you click …

Member Avatar for ddymacek
0
7K
Member Avatar for Majestics

Hi, Why don't you try to use SplashScreen class? [url]http://download.oracle.com/javase/7/docs/api/java/awt/SplashScreen.html[/url] and a tutorial [url]http://download.oracle.com/javase/tutorial/uiswing/misc/splashscreen.html[/url] GL!

Member Avatar for Majestics
0
184
Member Avatar for AndreiDMS

Hello all, I've been searching for a couple of days for this but with no luck, I'm not even sure that my searches are correct, so: Scenario: On a http server (apache, OS Centos), I have a lot of folders located on this path: [I]/var/www/folders/[/I] named: [I]R001, E001, utils,[/I] ... …

0
99
Member Avatar for AndreiDMS

Hi, I have a printable class that needs to print some text only on 1 page. The thing is that when I hit print the printer prints 3 pages: page 1 - with correct content page 2 - empty page page 3 - page with content translated some how then …

Member Avatar for queen123
0
783
Member Avatar for vardhmansk

you can create a method in your JFrame that changes the content of the JFrame. Something like: [CODE] void changePanels(JPanel component_to_add, JPanel component_to_remove){ contentPane.remove(component_to_remove); contentPane.add(component_to_add); } [/CODE] and then call it from your button action handler. [CODE] // parentFrame is your JFrame parentFrame.changePanel(this, myScrollpane); [/CODE]

Member Avatar for vardhmansk
0
991
Member Avatar for solomon_13000

it means that you can pass variable number of arguments (type int) to the calculate() method, like: [CODE]calculate(1); calculate(2, 5); calculate(4, 6 ,9);[/CODE]

Member Avatar for AndreiDMS
0
77
Member Avatar for Gadgetman_53

Garbage collector does this for you periodically or when it detects that they are no longer being used. Usually the reference to a variable is lost when the variable goes out of scope. If you want to do it explicitly set the value of the variable to null(I guess).

Member Avatar for Gadgetman_53
0
295
Member Avatar for deftech69

Diagonal search (left -> right, top -> bottom): [CODE]//Consider: searchStr; // the string (array) we need to search for 2dArray; // the array in which we are searching // start search for (row = 0; row < (2dArray.length - searchStr.length); row++){ for (col = 0; col < (2dArray.length - searchStr.length); …

Member Avatar for deftech69
0
2K
Member Avatar for hket89

[CODE] Random r = new Random(); int[][] 2dArray = new int[4][4]; for (int i = 0; i<4; i++){ for (int j = 0; j<4; j++){ 2dArray[i][j] = r.nextInt(8) + 1; // nextInt returns a random int >= 0 and < n } } [/CODE]

Member Avatar for hket89
0
257
Member Avatar for Sri Vidhya

try to specify the full path to your class file: C:\Program Files\Java\jdk1.6.0_18\bin>java [B]C:\project\class files\[/B]ClassWithManyStaticMethods

Member Avatar for AndreiDMS
0
117
Member Avatar for anevins
Member Avatar for dalymiddleboro

Hi, [CODE]String reply; char replyChar=; // your char variable needs to be initialized Scanner input = new Scanner(System.in); [/CODE] and you should initialize it with [B]'y'[/B] if you want to get into the while loop at least 1 time

Member Avatar for AndreiDMS
0
85
Member Avatar for pucivogel

Hi, [CODE]public void actionPerformed(ActionEvent event) { if(event.getSource()==room1 && event.getSource==breakfast) { // never reach this part of code } }[/CODE] the event is triggered only by one component, not by 2, in the same time, I don't know what you understand by "source from JButton and JCheckBox", but event.getSource() returns the …

Member Avatar for AndreiDMS
0
87
Member Avatar for bharri
Member Avatar for DavsTaylor

[CODE] /** * Calculate age group */ public String calcAge() { if (age >=60) { return "senior"; } else if (age >18) { return "adult"; } else if (age <18) { return "junior"; } } [/CODE] Your function returns nothing if the age == 18 Remove [B]if (age < 18)[/B] …

Member Avatar for AndreiDMS
0
145
Member Avatar for conspiracy_dawg

[QUOTE=conspiracy_dawg;255839]I've been having problems with the now deprecated mouseDown and mouseDrag methods, I know the deprecation causes no problem, the program runs fine, but for grading purposes I want my program to be error and warning free, is there any EASY alternative that can solve this deprecation method? I know …

Member Avatar for PersonalIT
0
476
Member Avatar for severman

Hi, Do you want to know how to save the chart to a PNG file using JFreeChart API or? org.jfree.chart.ChartPanel class has a method called doSaveAs() that [QUOTE=jfreechart API]Opens a file chooser and gives the user an opportunity to save the chart in PNG format.[/QUOTE] Just check the jfreechart API …

Member Avatar for AndreiDMS
-1
114
Member Avatar for Shmoil

Hi, Basically you just have to remove the main method from your frame class and your applet should look like this [CODE]public class Scoreclock extends JApplet { // init is for applets same as main is for desktop applications public void init(){ new Stopwatch(); } }[/CODE] Scoreclock class and Stopwatch …

Member Avatar for Shmoil
0
302
Member Avatar for Olliepop

No, in java all parameters are passed by value, so changing only x,y values will do nothing, you have to call g.drawString again.

Member Avatar for AndreiDMS
0
102
Member Avatar for wacky4444

what do you mean by [QUOTE]it does not show the prompt in output [/QUOTE]? Do you get any output?

Member Avatar for javaAddict
0
80
Member Avatar for CurtisEClark

Hi, 1. [CODE]else days = 30;[/CODE] runs only if months != 12 2. If you use [B]break[/B] in your code, like: [CODE] if(months == 3) days = 31; break; // the application ends here if(months == 5) days = 31; [/CODE] because break terminates the innermost block of code, which …

Member Avatar for AndreiDMS
0
124
Member Avatar for Moonrise_state

Hi, If you are using equals() method to compare strings, Java compares the strings correctly. Check again your checkMatch() findMatch() method and make sure that they are correct. Add more brackets in your IF statements, if needed, to make sure the precedence of operators is the one you want. If …

Member Avatar for Moonrise_state
0
117
Member Avatar for jemz

Use [B]JProgressBar[/B] [URL="http://java.sun.com/docs/books/tutorial/uiswing/components/progress.html"]Sun Tutorial[/URL]

Member Avatar for jemz
0
103
Member Avatar for ndeniche

[QUOTE=Nichito;1096064]Hello everyone... I wanna develop a Java Web Applet that will allow me to check a PC's HW configuration (cpu, HDD, and other hardware information), but I don't know what libraries to use, or where to start looking. Anyone can give me a heads up?[/QUOTE] You can't do it directly …

Member Avatar for AndreiDMS
0
84
Member Avatar for Seldar

Hi, You can convert the [I]infix[/I] expression 5+6*2 to [I]postfix[/I] 5 6 2 * + then compute it. Here are the algorithms for conversion [URL="http://scriptasylum.com/tutorials/infix_postfix/algorithms/infix-postfix/index.htm"]link[/URL] and for evaluation [URL="http://scriptasylum.com/tutorials/infix_postfix/algorithms/postfix-evaluation/index.htm"]link[/URL] GL

Member Avatar for AndreiDMS
0
194
Member Avatar for JasonDoyle
Member Avatar for Ryujin89

Hi Ryujin89, [CODE] private void readRecord(DataInputStream inputFile) { String l_employeeName; Double l_hourlyRate; Integer l_employeeNumber, l_regularHours, l_overtimeHours; boolean endOfFile = false; // try { // remove this line // the endOfFile will always be false because you don't check the end of file anywhere while (!endOfFile) { try { l_employeeName = …

Member Avatar for AndreiDMS
0
247
Member Avatar for shashikant.v

Hello shashikant.v, If you what you need is to open the html page from your help menu app, you can use the Desktop API in SE 6... like this: [code] Desktop desktop = null; URI uri = null; if (Desktop.isDesktopSupported()){ desktop = Desktop.getDesktop(); } if (desktop.isSupported(Desktop.Action.BROWSE)){ try { uri = …

Member Avatar for AndreiDMS
0
76
Member Avatar for ngnt4

Hi ngnt4, [CODE] input = days.getText(); day = Double.parseDouble(input); [/CODE] The value returned by getText() method is an empty string(and not a parsable string), this is why you get the exception. You can fix this by initializing the text field before calling the getText() method [CODE]days.setText("0");[/CODE] Anyway I think you …

Member Avatar for ngnt4
0
113
Member Avatar for alreem

Hi alreem, please next time use the code-tags to enclose your code, public static void main(String[] args) { Scanner read= new Scanner(System.in); int count,i,number; System.out.print("Enter the number: "); number= read.nextInt(); if (number%2==0){ System.out.println(" Plz enter an odd number"); // here you should read the number again until it's odd or …

Member Avatar for VernonDozier
0
129
Member Avatar for gunjannigam

Hi, You can add a mouse listener to your panel and use setToolTip() method for your Panel, like this: [CODE] // in JPanel constructor // ... addMouseListener(new MouseAdapter() { public void mouseEntered(MouseEvent me){ mouseEnteredHandler(me); } }); // ... constructor ends // ... // private method private void mouseEnteredHandler(MouseEvent me) { …

Member Avatar for gunjannigam
0
648
Member Avatar for bruceaj

What layout manager are you using? The default layout for JPanel is FlowLayout witch puts components in a row, If you like to set the element position and size you should use another layout like [B]null[/B] (for absolute positioning)

Member Avatar for AndreiDMS
0
152
Member Avatar for gibson.nathan

Hi, Your constructor does something probably, but sure not what you want. It should be like this: [CODE] public CO2FromWaste(int numPeople, boolean paper, boolean plastic, boolean glass, boolean cans) { // replace // numPeople = numberOfPeople; // with // member = parameter passed to constructor numberOfPeople = numPeople; // like …

Member Avatar for AndreiDMS
0
331
Member Avatar for P00dle

Hi P00dle, A map cannot contain duplicate keys. If you have duplicate elements you could use a list.

Member Avatar for P00dle
0
88
Member Avatar for Watti

I think you are reading the file in your first while [CODE]while ((line = brStream1.readLine())!= null) { NoOfLines++; }[/CODE] and there's nothing to read in the second while because you have reached the end of file Anyway the second while it's a little messed up for what you are trying …

Member Avatar for AndreiDMS
0
1K
Member Avatar for adcodingmaster

From the code provided I can see that the size for p and pane are the same (100, 100) this is why the size of both panels are equal. Then again you are setting the panel background color before initializing it [CODE] pane.setBackground(Color.red); // this line should go after pane …

Member Avatar for walid faraj ali
0
182
Member Avatar for gibson.nathan

Hi gibson.nathan, In your CO2FootPrintTester [CODE] public class CO2FootPrintTester { public static void main(String[] args){ // remove this, it shouldn't be here CO2Footprint( int numberOfPeople, double gasFootPrint, double averageElectricBill, double averageElectricPrice, boolean paperRecyled, boolean plasticRecyled, boolean glassRecyled, boolean cansRecyled, int numLightsRecyled, double totalReductionsPaper, double totalReductionsPlastic, double totalReductionsGlass, double totalReductionsCans, double …

Member Avatar for AndreiDMS
0
105

The End.