Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
0% Quality Score
Upvotes Received
0
Posts with Upvotes
0
Upvoting Members
0
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
0 Endorsements
~13.0K People Reached

33 Posted Topics

Member Avatar for kukuruku

Is it OK to have if statement in the constructor Thanks [CODE] public class CTime { private int start_hour; private int end_hour; private int start_minute; private int end_minute; public CTime(int h1,int m1,int h2,int m2){ if(h1>=7 && h2<17 && h2*60+m2>h1*60+m1){ setStartHour(h1); setStartMinute(m1); setEndHour(h2); setEndMinute(m2); } }[/CODE]

Member Avatar for Washington AM
0
9K
Member Avatar for kukuruku

I do have a dataset with id date code 1 02/02/2012 A 1 02/07/2012 B 1 02/21/2012 A 2 02/02/2012 C 2 02/09/2012 A and I have to create a grid with the days in february and insert the code in the coresponding days id 1 2 3 4 5 …

Member Avatar for tinstaafl
0
144
Member Avatar for kukuruku

Hi ,I am trying to implement merge sort with list and I have this error in this code [COLOR="Red"]invalid use of void expression[/COLOR] list<string>::iterator LIST_ITER; sz is the size of the list beg beginning of the list end end of the list Thank you in advance [CODE]void merge_sort(LIST_ITER beg, LIST_ITER …

Member Avatar for mrnutty
0
88
Member Avatar for kukuruku

Hi,I am trying to verify form input for length(before that I would like to trim it) How can I do that for user Thanks [CODE]function verify(){ var user=document.getElementById("user"); var pass=document.getElementById("pass"); var msg= ""; document.write("Length "+user.length); if(user.value == ""){ msg+= "Please enter a username!\n"; user.className = "inpBoxError"; } if(pass.value == ""){ …

Member Avatar for HG&C
0
102
Member Avatar for kukuruku

I have this problem with xsl if I entered the state and the city is working fine ,but if I miss one or the other doesnt work Thanks [CODE]<?php $city=$_GET['city']; $state=$_GET['state']; $dom = new DOMDocument; $dom->load('Sample.xml'); $xsl = new DOMDocument; $xsl->load('asn6.xsl'); $xslt = new XSLTProcessor(); $xslt->importStylesheet($xsl); if(isset($city)) $xslt->setParameter(NULL, 'city', $city); …

Member Avatar for Airshow
0
128
Member Avatar for kukuruku

Hi ,traing to explode list like 1. one.gif 2. two.gif [CODE]$datain= file_get_contents($filename); $lines=explode("\n",$datain); for($i=0;$i<sizeof($lines);$i++) { echo $lines[$i].'<br>'; $images=explode(":",$lines[$i]); }[/CODE]

Member Avatar for tnjiric
-1
82
Member Avatar for kukuruku

I am confused with the optimized quick sort little help please [CODE] public static void quickSort(int []A,int p,int q){ while(p<=q) { int r = partition(A, p,q); quickSort(A, p, r); quickSort(A, r+1, q); } } static int partition(int []A, int p, int q) { int a=A[p]; int lp=p-1; int rp=q+1; while(A[rp]<a) …

Member Avatar for stultuske
0
98
Member Avatar for kukuruku

I am trying to fill up the array den and it is giving me java.lang.NullPointerException Why is that Thanks [CODE]public static void main(String[] args) { Scanner input=new Scanner(System.in); System.out.print("Enter an amount:"); float amount= input.nextFloat(); int denom, i=0; int [] den=null; do{ System.out.print("Enter denominations: "); denom=input.nextInt(); den[i]=denom; i++; } while(denom!=0);[/CODE]

Member Avatar for stultuske
0
72
Member Avatar for kukuruku
Member Avatar for debasisdas
0
47
Member Avatar for kukuruku

Hi ,I am trying to implement stack with linked list ,but when I run it show up NullPointerException How can I avoid that with try and catch Thanks [CODE]public char pop() { try{ ListNode returnNode = top; top = top.next; } catch (Exception e){} return returnNode.value; }[/CODE]

Member Avatar for jon.kiparsky
0
327
Member Avatar for kukuruku

Hi ,I want to go back after the else to the if statement(step2),how can I do it [CODE]public class main { public static void main(String[] args) { gcd(12,23); } public static void gcd(int m,int n){ int uPrime=1; int vPrime=0; int u=0; int v=1; int mPrime=m; int nPrime=n; int counter=0; if(mPrime%nPrime==0)//step2 …

Member Avatar for quuba
0
93
Member Avatar for kukuruku

Hi,I have to write code in java and in the description is this symbol u' Can anybody tell me what is the meaning of it Set (u')

Member Avatar for JamesCherrill
0
76
Member Avatar for kukuruku

Hi ,I am learning java ,and wondering why is this return in this method Thanks [CODE]public void updateDisplay() { if (curIndex<0 || curIndex>=appObj.array.size()) { display.setText(""); return; } display.setText( appObj.array.get(curIndex).toString()); }[/CODE]

Member Avatar for RunTimeError
0
104
Member Avatar for kukuruku

HI I have method object appointment ,and inside this object I have another object time and I want to get startHour method(inside the time object) (method startHour(inside TIME(object)inside Appointemt(object)) How can I do that :@ Thanks

Member Avatar for thekashyap
0
78
Member Avatar for kukuruku

Hi ,I am trying to catch exception if integer is out of certain interval ,how can I do that. Lets say that float variable has to be in the interval 2 to 5 in all other cases exception Thanks

Member Avatar for mKorbel
0
105
Member Avatar for kukuruku

Hi ,I have super class vehicle,truck extends vehicle,and I created array in test class full with objects from vehicle and truck,how can I call method from vehicle,is this the way (truck)object1[1].getMethod()

Member Avatar for jwenting
0
352
Member Avatar for kukuruku

HI,I am having trouble understanding if I have to ADD F4H and B1H(hex) ,what will be CF and OF (flags).Could somebody explain. Thanks

0
67
Member Avatar for kukuruku

Hi I am trying to put letters in array ,before that I am converting capitals to lower case.Putstr,getch,putint are predefined macros Thanks [CODE] .386 .model Flat include Cs266.inc .data array DD 128 dup(?) promt DB "Enter a string of at most 128 characters: ",0 count DD 0 .code main: mov …

0
123
Member Avatar for kukuruku

Hi ,I am trying to print this ,so far unsuccessful,I am printing only the first row Thanks [CODE] 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 11 2 3 4 5 6 7 8 9 10 11 12 …

Member Avatar for GunnerInc
0
119
Member Avatar for kukuruku

Hi,I am trying to do if statement in Assembly but it doesnt work.Could you help me putstr is predifine macro Thanks [CODE].386 .model Flat include Cs266.inc .data mes1 DB "First Greater" mes2 DB "Second Greater" var1 DD 22 var2 DD 9 .code main: mov EAX,var1 cmp EAX,var2 jge else jmp …

Member Avatar for Ancient Dragon
0
315
Member Avatar for kukuruku

Hi ,I am trying to count all characters in entered text ,putch and putint are macroses for printing int and char What I am doing wrong Thanks [CODE] .386 .model Flat include Cs266.inc .data count DW 0FFH .code main: mov BX,count here: getch cmp EAX,-1 INC BX je exit putch …

Member Avatar for untio
0
74
Member Avatar for kukuruku

Hi ,I am new in Assembly and I am trying to print the first element of array putint is macros include in Cs266 [CODE] .386 .model flat include Cs266.inc .data Arr DW 1,2,5,9,12 .code main: mov AX,[Arr] putint AX ret end [/CODE]

Member Avatar for GunnerInc
0
88
Member Avatar for kukuruku

Here I am creating the objects and try to print them,I have differnt classes for date and Employee.The objects EmplObj and EmplObj2 ,are created but I have problem when I tried to print them ,it is printing only the first one [CODE] public class tester { public static void main(String …

Member Avatar for mKorbel
0
117
Member Avatar for kukuruku

Hi,I am new in Java ,and I was wondering if somebody can explain what is the right way to create new object.Is the only right way the case 3,Am I only overwriting the arguments in the same object in case 1 and 2 Thanks [CODE] public static void main(String[] args) …

Member Avatar for ~s.o.s~
0
200
Member Avatar for kukuruku

Hi,I have a question ,which one is a better way to set constructor [CODE]public Employee(String name,double hours,double perHour,Date dateOfHire){ id=++count; setName(name); setHours(hours); setPerHour(perHour); this.dateOfHire=new Date(); } [/CODE] or [CODE] public Employee(String name,double hours,double perHour,int day,int month,int year){ this(name, hours, perHour, new Date(day,month,year) ); [/CODE]

Member Avatar for Mitja Bonca
0
125
Member Avatar for kukuruku

Hi everybody,I have java exam tomorrow and one of the question is going to be tracing code,unfortunately I am not vary good at that.My question is if anybody knows web site on the net with similar questions and answers Thanks yesterday the professor give us this example [CODE]public class A …

0
59
Member Avatar for kukuruku

Hi,if I have array of objects {first(name,age),second(name,age)} How can I access first (name) in java Thanks

Member Avatar for javaAddict
0
171
Member Avatar for kukuruku

Hi I need help with bubble sort ,Why doesnt work Thanks [CODE] public void printList(){ System.out.print(patientsList.get(0).getFirstName()); for(int i=0;i<patientsList.size();i++){ for(int j = 0; j < patientsList.size(); j++){ for (int b=(j+1);b< patientsList.size(); b++){ int first=patientsList.get(j).getPriority(); int second=patientsList.get(b).getPriority(); if(first>=second){ int temp=first; first=second; second=temp; } } } String fname = patientsList.get(i).getFirstName(); String lname = …

Member Avatar for BestJewSinceJC
0
104
Member Avatar for kukuruku

Hi,I have myfile.csh first second third ..... How can I find how many variables I apply to the file Thanks

Member Avatar for JeoSaurus
0
54
Member Avatar for kukuruku

Is there method in Java to compare the strings first letter and sort the alphabetical or I have to substring and compare them with bubble sort Thanks

Member Avatar for btsuper
0
146

The End.