16,012,316 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Member 8697827 (Top 31 by date)
Member 8697827
16-Jul-13 3:13am
View
Dear Dr Maimonides
The numerator= oldEnt(bags) - newEnt(bags); in splitCritValue is for each attribute so I want to add to each element in the matrix for each attribute
Dalia
Member 8697827
15-Jul-13 8:39am
View
Thank you for your reply
I have a class containing a matrix
class matrix{
public void actionPerformed(ActionEvent e)
{
dd = new double[m_Instances.numAttributes()];
for (int i = 0; i < m_Instances.numAttributes() - 1; i++)
dd[i] = Double.parseDouble(JOptionPane.showInputDialog("Enter " + m_Instances.attribute(i).name()));
}}
and I want to add the matrix to another method in another class
class matrixxx
{
public final double splitCritValue(Distribution bags, double totalNoInst) {
double numerator;
double noUnknown;
double unknownRate;
int i;
noUnknown = totalNoInst-bags.total();
unknownRate = noUnknown/totalNoInst;
numerator = oldEnt(bags) - newEnt(bags);
numerator = (1-unknownRate)*numerator;
// Splits with no gain are useless.
if (Utils.eq(numerator,0))
return 0;
return numerator/bags.total();
}}
waiting for your reply
Dalia
Member 8697827
28-Dec-12 6:28am
View
I want to write the date in the textbox and display it also in the same textbox also i have database that save this date so how can I make it
Member 8697827
22-Dec-12 6:32am
View
I do it but it gives incorrect syntax near ']'.
Member 8697827
22-Dec-12 6:28am
View
I search dd_db and it exist but I cannot find the dd_tb so I think the error is in the command of create table but i cannot find the error can you help me
Member 8697827
22-Dec-12 6:02am
View
Thank you very much for your reply
I tried tthis solution but still the same error
Member 8697827
21-Dec-12 3:28am
View
I also tried da.Fill(da) but the same message appear
so I remove this line the form appear But at button new to add new to the database it brings this message nullReferenceException was unhandled object reference not set to an instance of an object
Member 8697827
21-Dec-12 3:23am
View
Imports System.Data
Imports System.Data.SqlClient
Public Class Form1
Dim cn As SqlConnection
Dim ds As DataSet
Dim da As SqlDataAdapter
Dim r As DataRow
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim strconnection As String = "data source=.\SqlExpress;initial catalog=master;integrated security=true"
cn = New SqlConnection(strconnection)
cn.Open()
Try
cn.ChangeDatabase("dd_db")
Catch ex As Exception
Try
Dim command As New SqlClient.SqlCommand("create database dd_db", cn)
command.ExecuteNonQuery()
command.Connection.ChangeDatabase("dd_db")
Dim command1 As New SqlClient.SqlCommand("create table dd_tb ([admi.num][int](10),[tran.num][int](4),[name][char](40),[age.reci][int](2),[sex.reci][char](8),[or.kid.d][char](22),[specify][char](50),[consang][char](20),[rec.b.g][char](8),[r_iggt][char](8),[r_iggr][char](12),[r_igmt][char](8),[r_igmr][char](12),[r_hcvt][char](8),[r_hcvr][char](12),[r_pcrt][char](8),[r_pcrr][char](12),[r_hbvt][char](8),[r_hbvr][char](12),[r_bpcrt][char](8),[r_bpcrr][char](12),[blood.gp][char](10),[rhla_aa][int](8),[rhla_ab][int](8),[rhla_ba][int](8),[rhla_bb][int](8),[rdr_a][int](8),[rdr_b][int](8),[prior.bl][char](8),[type.blo][char](15),[number.o][char](15),[num.bl.t][int](2),[datel.bl][date](10),[erythrop][char](8),[hypr_pre][char](8),[rec_schi][char](8),dia_rec][char](22),[sit_urn][char](12),[dial_pre][char](8),[dia_typ][char](20))", cn)
command1.ExecuteNonQuery()
Catch ex1 As Exception
MsgBox(ex.Message)
End Try
End Try
da = New SqlDataAdapter("select * from dd_tb", cn)
Dim x As New SqlCommandBuilder(da)
ds = New DataSet()
da.Fill(ds, "dd_tb")
End Sub
End Class
This is the code at the line of da.Fill(ds, "dd_tb") after compile it brings this message sqlException was unhandled invalid object name "unc_dd" I tried unc_dd.dbo.unc_dd but it brings the same message
So can you help me to find the solution
Thanks in advance
Dalia
Member 8697827
21-Dec-12 3:22am
View
I tried it but the same message appear
Member 8697827
25-Jul-12 3:59am
View
I have fixed the code
import java.util.Scanner;
public class person {
String name,address,job;
byte age;
person(String name,byte age,String address,String job)
{this.name=name;
this.age=age;
this.address=address;
this.job=job;
}
public void display()
{System.out.println("name= "+name);
System.out.println("age= "+age);
System.out.println("address= "+getAddress());
System.out.println("job= "+job);
}
void setAddress()
{String add=address;
}
String getAddress()
{return address;
}
public static void main(String[] args) {
Scanner input=new Scanner (System.in);
System.out.print("name is");
String s=input.next();
System.out.print("age is");
Byte x=input.nextByte();
System.out.print("address is");
s=input.next();
System.out.print("job is");
s=input.next();
person p = new person(s,x,s,s);
p.display();
}
}
can you say your comment
Member 8697827
24-Jul-12 8:46am
View
can you please explain the setAddress() and getAddress()
Member 8697827
24-Jul-12 8:40am
View
thanks alot
Member 8697827
24-Jul-12 8:40am
View
Thank you very much for your help
I do it and it works
Member 8697827
24-Jul-12 5:24am
View
The error occurs at this line
person p = new person();
Member 8697827
24-Jul-12 5:21am
View
Deleted
import java.util.Scanner;
public class person
{
String name,address,job;
byte age;
person(String name,byte age,String address,String job)
{
this.name=name;
this.age=age;
this.address=address;
this.job=job;
}
void Display()
{
System.out.println("name="+name);
System.out.println("age="+age);
System.out.println("address="+address);
System.out.println("job="+job);
}
void setAddress(String address)
{
String add=address;
}
String getAddress(String address)
{
return address;
}
public static void main(String[] args)
{
Scanner input=new Scanner (System.in);
person p = new person();
System.out.print("name is");
String s=input.next();
System.out.print("age is");
byte x=input.nextByte();
System.out.print("address is");
String y=input.next();
System.out.print("job is");
String z=input.next();
p.Display();
}
}
I fix the code but still have error
I read my paper well and solve a lot of problems before sending to you
I send only when I found me in a blind end So I really need help in this code
Member 8697827
9-Jul-12 9:26am
View
yes I am reading in distributed system and I don't understand the fork and I haven't the compiler I try to download but don't find can you help me in understanding the fork
Member 8697827
8-Jul-12 9:13am
View
no the program not the code
Member 8697827
8-Jul-12 3:42am
View
ok could you put the link of the program because I don't have it
Member 8697827
8-Jul-12 2:30am
View
I have read on google first but I cannot solve this problem
How may processes will be created when the following program is executed? Assume that all fork system calls are successful. what will be printed?
main()
{
int i=1;
int ret_val=0;
while(i{=5)
{
fork();
if(ret_val==0) /*child code*/
{printf("In child%d.\n",i);
exit(0);
}
else{/*parent code*/
i=i+1;
}}}
Member 8697827
7-Mar-12 10:27am
View
these are variables so I can put another name
Member 8697827
7-Mar-12 8:37am
View
please edx,_asm,std stands for what
Member 8697827
6-Mar-12 4:58am
View
so I see google search but this is the assembly of mano I want to calculate the working registers by c++
Member 8697827
6-Mar-12 1:49am
View
thank you
Member 8697827
6-Mar-12 1:47am
View
I mean mano computer architecture
Member 8697827
6-Mar-12 1:47am
View
thank you
Member 8697827
6-Mar-12 1:45am
View
Thank you very much for your help but I have a question is itt suites mano computer architecture.
Member 8697827
6-Mar-12 1:38am
View
thank you
Member 8697827
6-Mar-12 1:37am
View
thank you
Member 8697827
6-Mar-12 1:37am
View
yes you are right only child class will get inherited from the parent class
but I want to know overriding
So thank you
Member 8697827
4-Mar-12 5:16am
View
of course thank you vey much for your help but how to write the code i want to load and store registers in memory but how to write the code in c++?
Member 8697827
4-Mar-12 2:19am
View
yes I mean the cpu registers ex DR AC PC AR IR TR
you say that you did it so can you show me how
Show More