- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 0
- Posts with Upvotes
- 0
- Upvoting Members
- 0
- Downvotes Received
- 3
- Posts with Downvotes
- 2
- Downvoting Members
- 3
30 Posted Topics
I had 3 datagridview in visual basic, and each of them is linked to each other. 1 Main component can have many Failure Mode and 1 Failure Mode can have many Critical. [Click Here](http://i1333.photobucket.com/albums/w631/lloyd1006/1_zpsapbu0wla.png) [Click Here](http://i1333.photobucket.com/albums/w631/lloyd1006/2_zpsbe2c2u3n.png) [Click Here](http://i1333.photobucket.com/albums/w631/lloyd1006/3_zpsw2s2weo6.png) I want to duplicate selected row or record including their children details, … | |
Dim DMC_No As New List(Of Integer) cmd.CommandText = "SELECT MC_No FROM tbl_MainComp WHERE EquipTag= '" & TextBox1.Text & "'" Using reader As OleDb.OleDbDataReader = cmd.ExecuteReader() While reader.Read() DMC_No.Add(reader.GetInt32(reader.GetOrdinal("MC_No"))) End While End Using Dim DFM_No As New List(Of Integer) For i = 0 To DMC_No.Count - 1 MessageBox.Show(DMC_No.Item(i)) 'This line to … | |
I have 3 table which are  I want to duplicate a record from the master table in the same time it will duplicate all children table. I will assign new primary key to the new duplicate record. For the tbl_System and tbl_MainComp work fine. But when i have … | |
the error i get from visual studio is `Number of query values and destination fields are not the same.` below is my insert statement "INSERT INTO tbl_ViewAll(EquipTag, S_Name, S_Function, S_Failure, MC_No, MC_Name, MC_Function)" & "SELECT EquipTag,S_Name,S_Function,S_Failure FROM tbl_System UNION " & "SELECT MC_No,MC_Name,MC_Function FROM tbl_MainComp" | |
cmd.CommandText = "UPDATE tbl_System SET S_Name='" & TextBox2.Text & "', S_Function='" & RichTextBox1.Text & "', S_Failure='" & RichTextBox2.Text & "' WHERE EquipTag='" & Tbl_SystemDataGridView.CurrentRow.Cells(0).Value & "' i think this is correct format for update query but i still get error for this | |
I having a problem with the cloneNode tag problem. NodeList movielist = doc.getElementsByTagName("movie"); Element child = (Element)movielist.item(6); Element newNode = (Element)child.cloneNode(true); child.appendChild(newNode); newNode.setAttribute("id", "this is newnode"); code above will clone the whole set of thing. but the problem is it colne in wrong tag. i want some thing like this … | |
xml file <?xml version="1.0" encoding="UTF-8" standalone="no"?><movies> <movie id="1111"> <title>Blackhat</title> <genre>thriller</genre> <duration> 90 mins </duration> <age>28</age></movie> <movie id="1002"> <title>The Wedding Ringer</title> <genre>comedy</genre> <duration> 100 mins </duration> </movie> <movie id="1003"> <title>The Avengers</title> <genre>action</genre> <duration> 180 mins </duration> </movie> <movie id="1004"> <title>Taken 3</title> <genre>action</genre> <duration> 100 mins </duration> </movie> <movie id="1005"> <title>Insurgent</title> <genre>Science … | |
try { File file = new File("/Users/Alex Ting/Desktop/test2/MovieList.xml"); DocumentBuilder dBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); Document doc = dBuilder.parse(file); NodeList movielist = doc.getElementsByTagName("movie"); for(int i =0;i<movielist.getLength(); i++){ Node m=movielist.item(i); if(m.getNodeType()==Node.ELEMENT_NODE){ Element movie = (Element) m; String movieID = movie.getAttribute("id"); NodeList mnamelist=movie.getChildNodes(); for(int j=0;j<movielist.getLength(); j++){ Node n = mnamelist.item(j); if(n.getNodeType()==Node.ELEMENT_NODE){ Element name = (Element) … | |
for(int i =0;i<movielist.getLength(); i++){ Node m=movielist.item(i); if(m.getNodeType()==Node.ELEMENT_NODE){ Element movie = (Element) m; String movieID = movie.getAttributes("movie id"); NodeList mnamelist=movie.getChildNodes(); for(int j=0;j<movielist.getLength(); j++){ Node n = mnamelist.item(j); if(n.getNodeType()==Node.ELEMENT_NODE){ Element name = (Element) n; //System.out.println("MovieID: "+ movie id + name.getTagName()+ ": "+ name.getTextContent()); } } } } it gave me error of … | |
I want to pass the string from client to server and the server will display the string. First the client enter the option 1 and the server will reply ask from the movie name. My problem is i cannot enter the name from client and send it to server and … | |
im new in objective c.i have come out with the getter and setter but not sure is correct or not. .h #import <UIKit/UIKit.h> @interface ViewController : UIViewController @property(nonatomic, retain) NSString *myText; @property(nonatomic, copy) NSNumber *opacity; @property(nonatomic, assign) id delegate; @end .m #import "ViewController.h" @interface ViewController () @end @implementation ViewController @synthesize … | |
here is my code for delete Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click If MsgBox("Are you sure you want to delete this item?", vbYesNo + vbQuestion, "Delete") = vbNo Then Else If Me.DataGridView1.Rows.Count > 0 Then If Me.DataGridView1.SelectedRows.Count > 0 Then Dim x As Integer = Me.DataGridView1.SelectedRows(0).Cells("FNo").Value … | |
i have 2 class for example class a and class b. i need the string store at class a pass and use by class b, here is my code for class a and class b. class a public void actionPerformed(ActionEvent arg0) { JFileChooser fileChooser = new JFileChooser(); fileChooser.setFileFilter(new FileNameExtensionFilter("Text Files", … ![]() | |
JMenuItem mntmLoad = new JMenuItem("Load"); mntmLoad.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { JFileChooser chooser = new JFileChooser(); chooser.setMultiSelectionEnabled(true); int option = chooser.showOpenDialog(testgui.this); if (option == JFileChooser.APPROVE_OPTION) { File[] sf = chooser.getSelectedFiles(); String filelist = "nothing"; if (sf.length > 0) filelist = sf[0].getName(); for (int i = 1; i < … | |
for(int i = 0; i < program.size(); i++) if(program.get(i).contains(remp)) with the coding above, i can search and display all string in my arraylist that contains "hit2080". for example HIT2080___Introduction to Programming___ALL___Core___NULL___NULL HIT1307___Internet Technologies___ALL___Core___NULL___HIT2080 but i just want to search and display the first token that contains string "hit2080". Is there … | |
i have problem reading the data from text file. The first line in my text file should go to 1st row but it go to the column, here is my code. JScrollPane scrollPane_1 = new JScrollPane(); scrollPane_1.setBounds(30, 288, 944, 207); frmDevelopNewProgram.getContentPane().add(scrollPane_1); String[] columns={"Program Code","Program Name" ,"Major","Abbreviation"}; lap_table = new JTable(); … | |
#include <time.h> #include <math.h> #include <stdio.h> #include <conio.h> #include <string.h> #include <stdlib.h> #define ROW 9 #define COL 9 int printboard(int grid[ROW][COL]){ int x,y,n,chk; srand(time(NULL)); for(x=0;x<ROW;x++){ for(y=0;y<COL;y++){ do{ n=rand()%7+2; grid[x][y]=n; if (((grid[x][y]==grid[x-1][y]) && (grid[x][y]==grid[x-2][y])) || ((grid[x][y]==grid[x][y-1]) && (grid[x][y]==grid[x][y-2]))){ chk=1; continue; }else{ chk=0; printf("%d ", n); } }while(chk==1); } printf("\n\n"); } } … | |
int menu(c){ int choose; do{ printf("*MENU\n"); printf("*Press 2 to move down\n"); printf("*Press 4 to move left\n"); printf("*Press 6 to move right\n"); printf("*Press 8 to move up\n"); printf("*Press 5 to switch\n"); printf("*Press 0 to quit\n"); printf("Please enter your choose: "); scanf("%i",&choose); if(choose==2){ }else if(choose==4){ }else if(choose==6){ }else if(choose==8){ }else if(choose==5){ }else … | |
#include <stdio.h> #include <stdlib.h> double average(int arrx[6], int *ptr); int main(void){ int arry[6]= {2,5,4,5,6,7}; int count=0; double avg; avg=average(arry,&count); printf("The average is %.2f\n",avg); printf("Number bigger than average is %i", count); return 0; } double average(int arrx[6], int *ptr){ int c=0; int sum=0; double a=0; for(c=0;c<6;c++){ sum=(double)sum+arrx[c]; } a=sum/6; for(c=0;c<6;c++){ if(arrx[c]>a){ … | |
here is my function.when i click on the readp button,it will show undefined variable,but still can show out the string in txt file. <?php if(isset($_GET['readp'])){ readinfo($fname,$lname,$phone,$email,$mname,$gender,$city,$country,$fax,$exp); } ?> <?php function readinfo($fname,$lname,$phone,$email,$mname,$gender,$city,$country,$fax,$exp){ $info=file('log.txt'); for($i=count($info)-1;$i>=0;--$i){ echo cleanOutputData($info[$i])."<br>"; } } ?> | |
the coding will works if the data type of my primary key is integer.but when i try to change the primary key in string data type i cant delete oe edit. below is my coding for that 2 button that is working. coding for edit button ` Private Sub Button4_Click(ByVal … | |
`Public Class login Dim cnn As New OleDb.OleDbConnection Private Sub OK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK.Click Dim cmd As New OleDb.OleDbCommand If Not cnn.State = ConnectionState.Open Then cnn.Open() End If cmd.Connection = cnn If cmd.CommandText = "SELECT UName FROM Account WHERE UName =" & Me.UsernameTextBox.Text Then … | |
after searching on the web, i know that Me keyword is use to Refer to the Current Instance of an Object, but if i want to Refer to the others Instance of an Object, what is the keyword that i need to use? | |
Re: haha,you to learn it out yourself step by step.but i will help you this time. [CODE] /*Given the number of commodities bought, create a program that computes the total amount purchased in a fast food center. Assume that the following unit price of each commodity*/ #include <iostream.h> void main(){ int … | |
Re: I think the syntax is wrong also.printf is for c programming.c++ is using cout.am i correct? | |
[CODE]#include<iostream.h> int tripeCallByValue(int count1) void main(){ int count=2; cout<<"count is "<<count<<endl; cout<<"count1 is "<<count1; } int tripeCallByValue(int count1){ count1=count*3; return count1; }[/CODE] when i compile with compiler,i got a syntax error.but i didnt where i have did worng. | |
can anyone explain to me what is the definition for the both above.i had search on the internet but still cant got wat it is mean by.if can pls show some example to me.thanks | |
well,this is my college assignment question.the question ask us to write a program that can compare 3 number,who is the biggest and smaller.the output should be like this: Enter 3 numbers. Number1: Number2: Number3: Main Menu 1)Find the biggest value among the 3 value you have enter juz now. 2)Find … | |
i have a problem here. [CODE][/CODE] #include<stdio.h> int main (){ int counter; int x; int y; int product; counter=1; x=1; y=1; product=1; while (counter<=5){ printf("%d>%d\n",x,y); x=x+1; y=y+2; counter=counter+1; product=product*y; } printf("Product>%d",product); return 0; } well,the product should be 945.but what have printf out is 10395?what is the provlem inside the … | |
here is the things so far i got. [CODE][/CODE] #include <stdio.h> int CF(int C); int FC(int F); int main(){ printf("Fahrenheit equivalents of Celsius temperature\n"); printf("Celsius \t Fahrenheit \n"); for (x=0;x<=100;x++); printf("Celsius equivalents of Fahrenheit temperature\n"); printf("Fahrenheit \t Celsius \n"); for (x=32;x<=212;x++); Pls,somebody help me.T.T |
The End.