Posts
 
Reputation
Joined
Last Seen
Ranked #3K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
85% Quality Score
Upvotes Received
18
Posts with Upvotes
18
Upvoting Members
15
Downvotes Received
3
Posts with Downvotes
3
Downvoting Members
3
3 Commented Posts
4 Endorsements
Ranked #397
Ranked #718

126 Posted Topics

Member Avatar for cool_zephyr

Hey everyone, I have the following list in my code public class order { private float amount; public float getAmount() { return this.amount; } } and in main function I have the following list List<List<Order>> ordersList I want to iterate the list through Streams in java 8 in order to …

Member Avatar for cool_zephyr
0
260
Member Avatar for Hendo
Member Avatar for newbie26

2. use a new Process to run the java jar bundle in C# and pass the text file path as a parameter. In java program, get the text file path from arguments passed to main

Member Avatar for mueller-bruehl
0
258
Member Avatar for anmol.raghuvanshi1

make the radiobuttons fall under the same radiogroup by giving the same name e.g. <input name="gender" value="Male" type="radio"> <input name="gender" value="Female" type="radio"> Then in PHP code $gender=$_GET['gender']

Member Avatar for anmol.raghuvanshi1
0
205
Member Avatar for krishkommireddy
Member Avatar for earnz

- make a webservice using php/jsp/asp which links to the database - call the webservice from the android app for CRUD database operations - display the data from the database on your php page

Member Avatar for cool_zephyr
0
79
Member Avatar for aseel.jaradat.9

i think it is a database problem..i hope the following table will handle the problem you're facing 'msg_table' msg_id msg from to seen msg_sent_time msg_recv_time when X sends msg to Y msg_id msg sender receiver seen msg_sent_time msg_recv_time 1 hi Y X Y N 3.00 PM null when X logs …

Member Avatar for aseel.jaradat.9
0
429
Member Avatar for priyanka_10

public class Bird { .... .... /*static method*/ public static void eat() { } /*instance method*/ public void fly() { } } so inside your main Bird myBird=new Bird(); /* call instance method */ myBird.fly(); /*call static method*/ Bird.eat(); see how instance methods need an object to be called?? and …

Member Avatar for stultuske
0
159
Member Avatar for london-G

If you are trying to connect to a real server..you need to configure the server allowing remote database connections..like adding your IP address on the remote connection list

Member Avatar for london-G
0
381
Member Avatar for Hoor Bano

you can use jsp, asp, php etc. to build the website and also create web services to feed data to the mobile application

Member Avatar for Kelly Burby
0
171
Member Avatar for toyanc
Member Avatar for hwoarang69
Member Avatar for jonardy

while ( kb.hasNext() ) { s = kb.nextLine(); /* end the loop if EOF */ if(s==null || s.equals("")) break; /* check if the input is valid or not */ int newNum=numValid(s); if(newNum<0) { System.out.println("The number \"-1\" is invalid.") } else { /* if the number is valid, add it to …

Member Avatar for JamesCherrill
0
215
Member Avatar for chahinez.abdelo.9

for(int r=0;r<numRows;r++) for(int c=0;c<numCols;c++) mat3[r][c]= mat1[r][c]* mat2[r][c];

Member Avatar for chahinez.abdelo.9
0
193
Member Avatar for FruitPunch

try { /* get text from textfield and convert it to integer */ //Integer.parseInt(txtbox.getText()) } catch(NumberFormatException e) { //show error message }

Member Avatar for Freaky_Chris
0
264
Member Avatar for cool_zephyr

I need to create stateful web pages consisting of various forms to be filled up by the user. I want to make UI tools look something like that DOJO framework provides. My problem is what tool is better suited for this type of website?? DOJO+JSP ? (but i'm confused about …

0
99
Member Avatar for KetraCoder

use can store your items like this where integer stores the row/position number : Row1 [HashMap<Integer,Image>,HashMap<Integer,Image>,HashMap<Integer,Image>] Row2 [HashMap<Integer,Image>,HashMap<Integer,Image>,HashMap<Integer,Image>] Row3 [HashMap<Integer,Image>,HashMap<Integer,Image>,HashMap<Integer,Image>]

Member Avatar for Slavi
0
287
Member Avatar for redtribal23
Member Avatar for Shawn_5
Member Avatar for infiniteloop56

suppose the data struture is like this public class Node { public int data; public Node left; public Node right; } int searchData = 569; Node node = rootNode; //point to the root node of the binary tree then the loop would look something like this: while(node.left != null && …

Member Avatar for JamesCherrill
0
5K
Member Avatar for ezekel

URL url=new URL("(http://mysite.com/adduser.php?username=alice&password=bob"); HttpUrlConnection con=(HttpUrlConnection)url.getConnection(); con.setRequestMethod("GET"); be sure to encode the url parameters using UrlEncoder.encode(..)

Member Avatar for cool_zephyr
0
102
Member Avatar for mc3330418
Member Avatar for cool_zephyr
0
165
Member Avatar for Leo_5

may be implement an interface in the controller and pass its instance to the Dao Object create an interface: public interface IMyInterface { public void rollback(Transaction transaction); } in the controller: public class MyController implements IMyInterface { .... .... public void someDatabaseLogic() { Dao dao=new Dao(this); } @Override public void …

Member Avatar for cool_zephyr
0
805
Member Avatar for cool_zephyr

could anyone tell me how to dynamically select an item in a listview?? i tried `listview.setSelection(1);` and `listview.performItemClick(listview,3,listview.getItemIdAtPosition(3));` both of them don't work..please help me.

Member Avatar for NotoriousZeus
0
254
Member Avatar for Abhishek_16

I hope this helps : <form> First Name: <input type = 'text' name = 'firstName'/></br> Last Name: <input type = 'text' name = 'lastName'/></br> Username <input type = 'text' name = 'userName'/></br> Password: <input type = 'password' name = 'password'/></br> <input type = 'submit' value = 'View' onClick='f();'/></br> </form> <script> …

Member Avatar for cool_zephyr
0
880
Member Avatar for Shaikh_1

I hope this helps : <c:forEach items="${pal}" var="p"> <tr> <td><c:out value="${p.pid}"></c:out></td> <td><c:out value="${p.pname}"></c:out></td> <td><c:out value="${p.pdesc}"></c:out></td> <td><c:out value="${p.pestd}"></c:out></td> <td><a id="popa" href="#" onClick="myFunc(${p.pid})">Allocate</a></td> </tr> </c:forEach> <script> function myFunc(pId) { //do whatever you want to do with pid return false; } </script>

Member Avatar for cool_zephyr
0
2K
Member Avatar for nevil120

create a background service which keeps checking if there is any new data from the php api..if there is new data, just invoke the android function

Member Avatar for orochiwolf
0
144
Member Avatar for johnef_sh

you can redirect a page using window.location.href="http://www.google.com"; on what event do you want to redirect the page??

Member Avatar for johnef_sh
0
251
Member Avatar for cool_zephyr

could anyone please tell me what's the difference between getApplicationContext() and MyActivity.this.."MyActivity" being a class that extends Activity class..somethimes getApplicationContext() doesn't work and I need to use MyActivity.this when the constructur asks for a context... for example, if i use `ProgressDialog p=new ProgressDialog(getApplicationContext());` it gives an error however, if i …

Member Avatar for cool_zephyr
0
372
Member Avatar for cool_zephyr

I'm packaging my java program as a jar..it includes mysql-connector.jar..it runs fine when i run it in eclipse..now i need to distriute the jar file..I packaged the jar file and when I run it through command line using java -jar myprogram.jar, it throws ClassNotFoundException: com.mysql.jdbc.Driver could anyone please tell me …

Member Avatar for cool_zephyr
0
349
Member Avatar for cool_zephyr

i'm having a hard time handling multiple screen sizes (meaning supporting different devices with different screen sizes)..could anyone guide me into the right path??

Member Avatar for cool_zephyr
0
128
Member Avatar for ezekel

if you're using an emulator...use 10.0.2.2 to connect to your localhost in your computer

Member Avatar for peter_budo
0
95
Member Avatar for aditya81
Member Avatar for murali2489

suppose the Collections.sort() function is comparing obj(i.e.Apple) and obj2(i.e. Orange)..in that case, name => Apple and o.name => Orange when you're using System.out.println(name +" "+o.name); that's why you are not getting the same output because, you're printing "name" of different objects.

Member Avatar for murali2489
0
338
Member Avatar for ZixCo

You haven't started a connection in your starting code.. -start a connection to the server(either HTTP or socket) -open the connection -send the message

Member Avatar for cool_zephyr
0
400
Member Avatar for CoilFyzx

store all the details in a class implementing Serializable interface..then save it in the file system..when the program starts you can initialize the class directly from the file.

Member Avatar for CoilFyzx
0
407
Member Avatar for anastasia_1

if you are using a browser..just type http://localhost:11880/path and it will automatically make a GET request to http://localhost:11880 with /path as the requested document..GET simply means the browser is asking for the document specified by /path so, you need to read the document from the file system and send write …

Member Avatar for cool_zephyr
0
336
Member Avatar for Leo_5

try this List<Object[]> list=(List<Object[]>)query.list(); In order to loop through the records in the list for(Object[] row:list) { Integer id=(Integer)row[0]; String name=(String)row[1]); }

Member Avatar for cool_zephyr
0
193
Member Avatar for cool_zephyr

i have a simple note and images storing java program that stores data into the server..i'm confused about what to use for building the server..should the server be built using sockets?? or which listens for http requests (the client sends json data)?? could anyone please tell me which one would …

Member Avatar for cool_zephyr
1
297
Member Avatar for cool_zephyr

i want to develop a simple download manager..i have seen download managers downloading a file..but they have multiple download points e.g. suppose i have a file like this on a web server ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| download points : 1 2 3 4 5 they are downloading from all the points 1,2,3,4,5 simultaneously..i'm …

Member Avatar for pritaeas
0
241
Member Avatar for reiferdinan.picar

use gregorian calendar to handle date specific functions Calendar cal=new GregorianCalendar(); cal.setTimeInMillis(timeInMillis); //set the long integer that denotes milliseconds since 1/1/1970 int dayOfWeek=cal.get(Calendar.DAY_OF_WEEK); //dayOfWeek can be Calendar.SUNDAY,Calendar.MONDAY,Calendar.TUESDAY,etc. you can get timeInMillis by creating a date object using SimpleDateFormat Date requiredDate=new SimpleDateFormat("yyyy/MM/dd").parse("2010/12/05"); timeInMillis=requiredDate.getTime();

Member Avatar for stultuske
0
325
Member Avatar for vijaya436
Member Avatar for pallabpal87

use System.getProperty("user.home") to get the home directory of the user..works on both windows and linux E.g. String uploadPath=System.getProperty("user.home")+File.separatorChar+"your-directory-name";

Member Avatar for cool_zephyr
0
147
Member Avatar for MariannJ

<input type="radio" name="fromAccountId" value="${ad.accountId}" <c:if test="${shouldBeChecked==true}"><%= "checked" %></c:if> /> where "shouldBeChecked" is the attribute that you send from the controller to the view

Member Avatar for stultuske
0
177
Member Avatar for ObSys

public Card[] getAllCards() { Card[] arr=new Card[allCards.length()]; int i=0; for(Card c:col) { arr[i++]=c; } return arr; }

Member Avatar for ObSys
0
169
Member Avatar for techyworld

select the table..and click on the Properties Editor tab, there you should be able to specify the border's thickness

Member Avatar for cool_zephyr
0
165
Member Avatar for cool_zephyr

hey how can I handle no-mapping found exception in spring dispatcher?? so that, if no-mapping to a controller is found in the dispatcher, I would like to redirect the user to a separate Resource not found page Suppose I have only 2 pages in my web application, "/about", "/help" and …

Member Avatar for cool_zephyr
0
1K
Member Avatar for sarah49
Member Avatar for cool_zephyr

hi everyone. i've used the following way to store the uploaded files into D: drive of my windows machine from Tomcat server and it works pretty goood. private final String directoryPath="D:\\uploadedFiles\\"; File f=new File("D:\\uploadedFiles\\"+fileName); InputStream in=file.getInputStream(); OutputStream out=new FileOutputStream(directoryPath+fileName); byte[] buff=new byte[4096]; int count=0; while((count=in.read(buff))!=-1) { out.write(buff, 0, count); } …

Member Avatar for JamesCherrill
0
301
Member Avatar for Rachana_1

The End.