Search Results

Search found 17 results on 1 pages for 'jjj'.

Page 1/1 | 1 

  • Create Dynamically table at runtime & save it in database

    - by user1548245
    I have written a code for creating table. It displays table structure on GUI form, but what I want is, when I enter values into table it should be stored in database table too. My code: <?php function display($column,$rows) { echo "<table border='1' align='center'>"; for ($iii = 0;$iii <$_POST['column'];$iii++) { echo "<tr>".$jjj."</tr>"; //display no. of <tr> for ($jjj = 0; $jjj <$_POST['rows'];$jjj++) { echo "<td>" ."<input type=\"text\" name='$iii'>"."</td>"; } } echo "</table>"; } ?>

    Read the article

  • New to Java Programming - Error help

    - by JJJ
    I am going through a Java book and drafting the examples and have run into the following error when compiling this code. Any help would be appreciated thank you. Error: Main.java:3: class Addition is public, should be declared in a file named Addition.java public class Addition        ^ 1 error Code: import java.io.*; import java.util.Scanner; public class Addition {   public static void main(String[] args) { java.util.Scanner input = new java.util.Scanner(System.in);  int number1; int number2; int sum; System.out.print( "Enter first digit: " ); number1 = input.nextInt(); System.out.print( "Enter second digit:" ); number2 = input.nextInt(); sum = number1 + number2; System.out.printf( "Sum is %d\n, sum" );      } }

    Read the article

  • Restoring a DataBase

    - by jjj
    i have two deferent Servers databases connections , let say j and k .. and i have backup data file in j, i named it jtok.bak .. now , i am trying to restore a database in k from jtok.bak , the database name is kkk ... so ... is there a way to do that ?

    Read the article

  • executing null values records

    - by jjj
    i am trying to execute the records that have TotalTime null value from the table NewTimeAttendance...TotalTime datatype nchar(10) select * from newtimeattendance where TotalTime = 'NULL' ....nothing select * from newtimeattendance where TotalTime = 'null' ....nothing select * from newtimeattendance where TotalTime = 'Null' ....nothing select * from newtimeattendance where TotalTime = null ....nothing select * from newtimeattendance where TotalTime = Null ....nothing select * from newtimeattendance where TotalTime = NULL ....nothing when i select the whole table i can see that there is some NULL TotalTime values..!! it is small select statment ..why doesn't it work ? is there a way (special way ) to execute the 'NULL' with nchar type ?! thanks in advance

    Read the article

  • how to use two count or more on one selecting statament ..?

    - by jjj
    i develop this code: SELECT COUNT(NewEmployee.EmployeeID), NewEmployee.EmployeeId,EmployeeName FROM NewEmployee INNER JOIN NewTimeAttendance ON NewEmployee.EmployeeID = NewTimeAttendance.EmployeeID and NewTimeAttendance.TotalTime is null and (NewTimeAttendance.note = '' or NewTimeAttendance.note is null ) and (month=1 or month =2 or month = 3) GROUP BY NewEmployee.EmployeeID, EmployeeName order by EmployeeID from my previous two question selecting null stuff and counting issue...that amazing code is working beautifully fine..but now i need to select more than one count... ...searched (google) .... found alias...tried: SELECT COUNT(NewEmployee.EmployeeID) as attenddays, COUNT(NewEmployee.EmployeeID) as empabsent , NewEmployee.EmployeeId,EmployeeName FROM NewEmployee INNER JOIN NewTimeAttendance ON empabsent =NewEmployee.EmployeeID = NewTimeAttendance.EmployeeID and NewTimeAttendance.TotalTime is null and (NewTimeAttendance.note = '' or NewTimeAttendance.note is null ) and (month=1 or month =2 or month = 3) , attenddays = NewTimeAttendance.EmployeeID and NewTimeAttendance.TotalTime is null and (NewTimeAttendance.note = '' or NewTimeAttendance.note is null ) and (month=1 or month =2 or month = 3) GROUP BY NewEmployee.EmployeeID, EmployeeName order by EmployeeID Incorrect syntax near '='. second try: SELECT COUNT(NewEmployee.EmployeeID) as attenddays, COUNT(NewEmployee.EmployeeID) as absentdays, NewEmployee.EmployeeId,EmployeeName FROM NewEmployee INNER JOIN NewTimeAttendance ON attenddays(NewEmployee.EmployeeID = NewTimeAttendance.EmployeeID and NewTimeAttendance.TotalTime is null and (NewTimeAttendance.note = '' or NewTimeAttendance.note is null ) and (month=1 or month =2 or month = 3)) , absentdays(NewEmployee.EmployeeID = NewTimeAttendance.EmployeeID and NewTimeAttendance.TotalTime is null and (NewTimeAttendance.note = '' or NewTimeAttendance.note is null ) and (month=1 or month =2 or month = 3)) GROUP BY NewEmployee.EmployeeID, EmployeeName order by EmployeeID Incorrect syntax near '='. not very good ideas... so ...help thanks in advance

    Read the article

  • Getting TexBox's ID's .... to Calculate

    - by jjj
    i have : vb code: Private Sub Calculation() Dim txt1 As Decimal txt1 = (CS_Incoms_done.Text / CS_Incoms_target.Text) * 100 CS_Incom_Result.Text = "%" + FormatNumber(txt, 2, TriState.False) Dim txt2 As Decimal txt2 = (CS_GovernmentService_done.Text / CS_GovernmentService_target.Text) * 100 CS_GovernmentService_Result.Text = "%" + FormatNumber(txt2, 2, TriState.False) Dim txt3 As Decimal txt3 = (CS_RentBox_done.Text / CS_RentBox_target.Text) * 100 CS_RentBox_Result.Text = "%" + FormatNumber(txt3, 2, TriState.False) Dim txt4 As Decimal txt4 = (CS_ServiceAdvertising_done.Text / CS_ServiceAdvertising_target.Text) * 100 CS_ServiceAdvertising_Result.Text = "%" + FormatNumber(txt4, 2, TriState.False) Dim txt5 As Decimal txt5 = (CS_ServiceCatogray_done.Text / CS_ServiceCatogray_target.Text) * 100 CS_ServiceCatogray_Result.Text = "%" + FormatNumber(txt5, 2, TriState.False) End Sub i just show you 5 textbox's of 100 textbox's .... and don't want to complete all the textbox's like this ... i want a simple code to do it.. ... as you notice , every three textbox's are look a like on the first two parts of their id's..~ for example -- CS_ServiceCatogray _Result.Text, CS_ServiceCatogray _done.Text and CS_ServiceCatogray _target.Text... ~..and the last part is the same in all textbox's for geving the Result .. _Result.Text , _done.Text and _target.Text So... i had an idea to take the id and put the Similar two parts in an array... and use For Each something like: Dim allItems As Array For Each item As Control In panel4.Controls Select Case item.[GetType]().Name Case "TextBox" 'here just be sure that this item is not saved in the allItems array ,if it is not do >>' allItems[Last_Item_Saved_Index+1] = DirectCast(item, TextBox).ID ', but i want to save just the two Similar parts of the textboxs ids' 'i am not sure if this completely correct, but i wanted to do something like it[' Dim partOFtxt As String = allItems[Last_Item_Saved_Index] Dim txt As Decimal = (partOFtxt + "_done.Text") / (partOFtxt + "_target.Text") (partOFtxt + "_Result.Text") = "%" + FormatNumber(txt, 2, TriState.False) ']' 'end condition' Exit Select Case Else Exit Select End Select Next i hope that you get the idea.. if you have a better idea ... it would be nice.. Thanks in advance..

    Read the article

  • counting employee attendance

    - by jjj
    i am trying to write a statment for counting the employees attendance and execute thier id , name and the days that he has working on the last 3 months by counting the duplicate id on NewTimeAttendance for month 1 , 2 and 3 .. i tried to count : Select COUNT(employeeid) from NewTimeAttendance where employeeid=1 and (month=1 or month =2 or month = 3) This is absolutely working ,but just for one employee... the secound try: SELECT COUNT(NewEmployee.EmployeeID) FROM NewEmployee INNER JOIN NewTimeAttendance ON NewEmployee.EmployeeID = NewTimeAttendance.EmployeeID and (month=1 or month =2 or month = 3) This is working , but it counts all employees .. and i want it to execute each EmployeeId, EmployeeName and number of days as new record last try: (before you see the code ... it is wrong ..but i am trying) for i in 0..27 loop SELECT COUNT(NewEmployee.EmployeeID),NewEmployee.EmployeeId,EmployeeName FROM NewEmployee INNER JOIN NewTimeAttendance ON NewEmployee.EmployeeID(i) = NewTimeAttendance.EmployeeID and (month=1 or month =2 or month = 3) end loop i realy need help...thanks in advance

    Read the article

  • How can I use two or more COUNT()s in one SELECT statament?

    - by jjj
    i develop this code: SELECT COUNT(NewEmployee.EmployeeID), NewEmployee.EmployeeId,EmployeeName FROM NewEmployee INNER JOIN NewTimeAttendance ON NewEmployee.EmployeeID = NewTimeAttendance.EmployeeID and NewTimeAttendance.TotalTime is null and (NewTimeAttendance.note = '' or NewTimeAttendance.note is null) and (month = 1 or month = 2 or month = 3) GROUP BY NewEmployee.EmployeeID, EmployeeName order by EmployeeID from my previous two questions selecting null stuff and counting issue...that amazing code is working beautifully fine..but now i need to select more than one count... ...searched (google) .... found alias...tried: SELECT COUNT(NewEmployee.EmployeeID) as attenddays, COUNT(NewEmployee.EmployeeID) as empabsent , NewEmployee.EmployeeId,EmployeeName FROM NewEmployee INNER JOIN NewTimeAttendance ON empabsent =NewEmployee.EmployeeID = NewTimeAttendance.EmployeeID and NewTimeAttendance.TotalTime is null and (NewTimeAttendance.note = '' or NewTimeAttendance.note is null ) and (month=1 or month =2 or month = 3) , attenddays = NewTimeAttendance.EmployeeID and NewTimeAttendance.TotalTime is null and (NewTimeAttendance.note = '' or NewTimeAttendance.note is null ) and (month=1 or month =2 or month = 3) GROUP BY NewEmployee.EmployeeID, EmployeeName order by EmployeeID Incorrect syntax near '='. second try: SELECT COUNT(NewEmployee.EmployeeID) as attenddays, COUNT(NewEmployee.EmployeeID) as absentdays, NewEmployee.EmployeeId,EmployeeName FROM NewEmployee INNER JOIN NewTimeAttendance ON attenddays(NewEmployee.EmployeeID = NewTimeAttendance.EmployeeID and NewTimeAttendance.TotalTime is null and (NewTimeAttendance.note = '' or NewTimeAttendance.note is null ) and (month=1 or month =2 or month = 3)) , absentdays(NewEmployee.EmployeeID = NewTimeAttendance.EmployeeID and NewTimeAttendance.TotalTime is null and (NewTimeAttendance.note = '' or NewTimeAttendance.note is null ) and (month=1 or month =2 or month = 3)) GROUP BY NewEmployee.EmployeeID, EmployeeName order by EmployeeID Incorrect syntax near '='. not very good ideas... so ...help thanks in advance

    Read the article

  • How to Load Balance 2 Internet Connections on a Windows 7 machine?

    - by Jimmy Chandra
    It's sort of related to this particular question, but that one is on Mac. I am looking for similar solution on Windows 7. I have 2 network connections: (Connection A) Wireless terminal connecting to ISP A (3G / EVDO internet provider) (Connection B) Broadband wired connection connecting to ISP B (Cable internet provider) Both has access to the internet. When I try connecting to a website and checking the networking tab on my Task Manager, I only see the network traffic being routed to only Connection A. Is there a way to make the computer to utilize both network (in a sense using all the bandwidth available from both the Cable ISP and the 3G / EVDO ISP) at the same time? If so, what do I need to do to set this up ... on Windows 7? Here is a bit more info on my network connections (ipconfig /all): PPP adapter Wireless Terminal: IPv4: aa.bb.ccc.ddd(preferred) Subnet mask: 255.255.255.255 Default Gateway: 0.0.0.0 DNS: aa.ee.f.ggg aa.ee.f.hhh Primary Wins: jjj.ii.k.l Secondary Wins: jjj.ii.k.m Ethernet adapter LAN: IPv4: 192.168.1.100 (connected to a router by wired that itself connect to a cable modem) subnet mask: 255.255.255.0 Default gateway: 192.168.1.1 (the wireless router) DHCP: 192.168.1.1 (the wireless router) DNS: xxx.yy.zz.ww rr.sss.t.uuu For my own privacy, I don't believe the actual number matters, the patterns are representative of the ip numbering scheme...

    Read the article

  • Code Golf - Banner Generation

    - by Claudiu
    When thanking someone, you don't want to just send them an e-mail saying "Thanks!", you want to have something FLASHY: Input: THANKS!! Output: TTT H H AAA N N K K SSS !!! !!! T H H A A NNN K K S !!! !!! T HHH AAA NNN KK SSS !!! !!! T H H A A N N K K S T H H A A N N K K SSS !!! !!! Write a program to generate a banner. You only have to generate upper-case A-Z along with spaces and exclamation points (what is a banner without an exclamation point?). All characters are made up of a 3x5 grid of the same character (so the S is a 3x5 grid made of S). All output should be on one row (so no newlines). Here are all the letters you need: Input: ABCDEFGHIJKL Output: AAA BBB CCC DD EEE FFF GGG H H III JJJ K K L A A B B C D D E F G H H I J K K L AAA BBB C D D EE FF G G HHH I J KK L A A B B C D D E F G G H H I J J K K L A A BBB CCC DD EEE F GGG H H III JJJ K K LLL Input: MNOPQRSTUVWX Output: M M N N OOO PPP QQQ RR SSS TTT U U V V W W X X MMM NNN O O P P Q Q R R S T U U V V W W X M M NNN O O PPP Q Q RR SSS T U U V V WWW X M M N N O O P QQQ R R S T U U V V WWW X M M N N OOO P QQQ R R SSS T UUU V WWW X X Input: YZ! Output: Y Y ZZZ !!! Y Y Z !!! YYY Z !!! Y Z YYY ZZZ !!! The winner is the shortest source code. Source code should read input from stdin, output to stdout. You can assume input will only contain [A-Z! ]. If you insult the user on incorrect input, you get a 10 character discount =P. I was going to require these exact 27 characters, but to make it more interesting, you can choose how you want them to look - whatever makes your code shorter! To prove that your letters do look like normal letters, show the output of the last three runs.

    Read the article

  • Jacob + Microsoft SpeechAPI trouble

    - by guai
    Following groovy code kills JVM on SetInterest method invocation It uses Scriptom, the groovy DSL for Jacob Spend whole day searching SAPI's SPFEI macro to rewrite it in groovy. Don't sure does it came out right. Or maybe other bugs %) Help welcomed import org.codehaus.groovy.scriptom.* import static org.codehaus.groovy.scriptom.tlb.sapi.SpeechVoiceSpeakFlags.* import static org.codehaus.groovy.scriptom.tlb.sapi.SpeechRunState.* import static org.codehaus.groovy.scriptom.tlb.sapi.SpeechLib.* import static org.codehaus.groovy.scriptom.tlb.sapi.SPEVENTENUM.* def spfei(Integer[] args) { res = 1<<SPEI_RESERVED1 | 1<<SPEI_RESERVED2 args.each {res |= 1<<it} res } Scriptom.inApartment { def voice = new ActiveXObject('SAPI.SpVoice') evtsrc = voice.toInterface(ISpEventSource) evtsrc.setInterest(spfei(SPEI_WORD_BOUNDARY), spfei(SPEI_WORD_BOUNDARY)) evtsrc.events.Callbacks = {args -> println 'jjj'} voice.speak "Hello, world", SVSFlagsAsync }

    Read the article

  • How do I fix the python installer's 'missing dependencies' error?

    - by Trevor Boyd Smith
    Background: running ubuntu So I downloaded the python "install from source" tarball. I ran make and got this error message: Python build finished, but the necessary bits to build these modules were not found: _aaa _bbb _ccc ... _jjj _kkk I google'd and found one solution is to: MANUALLY map all the string names from the error message to something in the apt-get repo MANUALLY call "sudo apt-get AAA BBB ... JJJ KKK" to get all the libraries I can easily do all of that. But I have no way of knowing what is the right version libraries I need to get! How in the world am I supposed to fix the missing dependencies if I don't know what the exact missing dependency is?

    Read the article

  • Help for a Sql statement

    - by stighy
    Hy at all, today is the day of ...question. I've a single table, with a relation master-detail like this: RecordID MasterID Field1 Field2 .... NrDetail 1 0 xxx yyyy 1 2 0 aaaa bbbb 2 3 1 hhhhh ssss 0 4 2 eee sssss 0 5 2 jjj hhhh 0 As you can see, NrDetail contain the total of "child record". Unfortunately, i've to create this field... and i would like to write it in my table. So my SQL question is: how to do this type of SQL to write the field NrDetail ? Something like: UPDATE table SET NrDetail= (SELECT COUNT(*) as Total FROM table WHERE MasterID= RecordID) But i think there's some mistake... Thank you in advance !

    Read the article

  • How to display node name in Action script 3 xml

    - by Mirage
    My xml is like below <rat> <to>tt</to> <from>ggg</from> <heading>hhhhh</heading> <body>jjj</body> </rat> My AS3 code is var example:XML = new XML(event.target.data); _label.text = example[0].rat[0][nodeName]; addChild(_label); I want to display the data like to = tt from = ggg how can i do that

    Read the article

  • python add two list and createing a new list

    - by Adam G.
    lst1 = ['company1,AAA,7381.0 ', 'company1,BBB,-8333.0 ', 'company1,CCC, 3079.999 ', 'company1,DDD,5699.0 ', 'company1,EEE,1640.0 ', 'company1,FFF,-600.0 ', 'company1,GGG,3822.0 ', 'company1,HHH,-600.0 ', 'company1,JJJ,-4631.0 ', 'company1,KKK,-400.0 '] lst2 =['company1,AAA,-4805.0 ', 'company1,ZZZ,-2576.0 ', 'company1,BBB,1674.0 ', 'company1,CCC,3600.0 ', 'company1,DDD,1743.998 '] output I need == ['company1,AAA,2576.0','company1,ZZZ,-2576.0 ','company1,KKK,-400.0 ' etc etc] I need to add it similar product number in each list and move it to a new list. I also need any symbol not being added together to be added to that new list. I am having problems with moving through each list. This is what I have: h = [] z = [] a = [] for g in hhl: spl1 = g.split(",") h.append(spl1[1]) for j in c_hhl: spl2 = j.split(",") **if spl2[1] in h: converted_num =(float(spl2[2]) +float(spl1[2])) pos=('{0},{1},{2}'.format(spl2[0],spl2[1],converted_num)) z.append(pos)** else: pos=('{0},{1},{2}'.format(spl2[0],spl2[1],spl2[2])) z.append(pos) for f in z: spl3 = f.split(",") a.append(spl3[1]) for n in hhl[:]: spl4 = n.split(",") if spl4[1] in a: got = (spl4[0],spl4[1],spl4[2]) hhl.remove(n) smash = hhl+z #for i in smash: for i in smash: print(i) I am having problem iterating through the list to make sure I get all of the simliar product to a new list,(bold) and any product not in list 1 but in lst2 to the new list and vice versa. I am sure there is a much easier way.

    Read the article

  • How to get the parent node of a given child node using PowerShell?

    - by kumar
    I am new to PowerShell. I have to write a script which can return me the first parent(node) value by passing the child node. I have the following XML. When I pass my PowerShell script the value "AAA", it should return "parent2", and when I pass "III", it should return "parent311". Can someone help me write this script? XML: <root> <parent> <parent2> <child>AAA</child> </parent2> <parent3> <child>BBB</child> <child>CCC</child> <child>DDD</child> </parent3> <parent4> <child>EEE</child> </parent4> <parent5> <child>FFF</child> </parent5> </parent> <parent21> <parent211> <child>GGG</child> </parent211> <parent311> <child>HHH</child> <child>III</child> <child>JJJ</child> </parent311> <parent411> <child>KKK</child> </parent411> <parent511> <child>LLL</child> </parent511> </parent21> </root>

    Read the article

1