₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,331,290 members, 8,449,586 topics. Date: Wednesday, 22 July 2026 at 04:27 AM

Toggle theme

Mj's Posts

Nairaland ForumMj's ProfileMj's Posts

1 2 3 4 5 6 7 8 ... 16 17 18 19 20 21 22 23 24 (of 28 pages)

NYSCRe: Prospective NYSC Batch C 2012 Family (house 2)- A Better House by mj(m): 2:19pm On Aug 06, 2012
Wsup, I've bin passing by all dz while sha, name is MJ, Computer Science from d Better By Far University. Hoping to serve in Abuja or Lagos, I'm enjoying ur conversations, kip it up.
ProgrammingHow To: Desktop And Mobile App With PHP. by mj(op): 7:37am On Aug 04, 2012
I need help in writing desktop and mobile app with php, of course I use c#, java, vb to do dt but I love learning everything possible. How can I do it in php? I can program php apps using oop approach as well. Thanks.
Tech JobsRe: Program For Customer Relationship Management(crm) by mj(m): 4:25pm On Aug 03, 2012
How do u want it, do u want someone to write it for you or what, can u code in php? I've done lots of apps but iv not work on anything on CRM, I'm interested, 08067493797.
ProgrammingRe: Programming Career In Either JAVA Or .NET by mj(m): 2:56pm On Jul 24, 2012
Pls oooo, I've not received mine, I need both, thanks. my email address: oshadami_mj@yahoo.com
ProgrammingRe: Programmers In The House,need Your Opinions Plz! by mj(m): 2:48pm On Jul 24, 2012
U can really learn on ur own. I have never gone to any IT firm to learn anything but develop lots of app wit java, c#, php, etc. Get ebooks n read, if u encounter problems, post it on nairaland. Hav fun.
ProgrammingRe: Urgent Help On Sparql Query Ontology by mj(op): 9:44pm On Jul 05, 2012
Need help on this again, my supervisor doesn't want the datatypes resource of the patient name to show, she wants only there name to show.thanks.
ProgrammingRe: Help On Loading Sql Table Data Into Datagrid Using OOP Approach C# by mj(op): 2:58pm On Jul 05, 2012
It did not work really, this one works though...
public DataTable GetPatientMJ()
{

SqlDataAdapter da = new SqlDataAdapter("SELECT * FROM patient", connectionString);
DataTable dt = new DataTable();

da.Fill(dt);
return dt;
}
I called it this way:
dataGridView1.DataSource = DB.GetPatientMJ();

Thanks though.
ProgrammingRe: Help On Loading Sql Table Data Into Datagrid Using OOP Approach C# by mj(op): 1:00pm On Jul 04, 2012
no error, but its not displaying anything in the grid, there are data in the table.
ProgrammingRe: Help On Loading Sql Table Data Into Datagrid Using OOP Approach C# by mj(op): 12:34pm On Jul 04, 2012
my friend wrote the oop class but he is not around, i jst notice that select statement comes before the database was opened, dunno how to fix that, but im working on it, any help will be greatly accepted.
ProgrammingRe: Help On Loading Sql Table Data Into Datagrid Using OOP Approach C# by mj(op): 11:44am On Jul 04, 2012
its showing this error:
Error 1 'System.Windows.Forms.DataGridView' does not contain a definition for 'databind' and no extension method 'databind' accepting a first argument of type 'System.Windows.Forms.DataGridView' could be found (are you missing a using directive or an assembly reference?) C:\Users\DENRELE\Documents\Visual Studio 2010\Projects\HospitalManagementSystem\HospitalManagementSystem\Employeedata.cs 30 32 HospitalManagementSystem
ProgrammingHelp On Loading Sql Table Data Into Datagrid Using OOP Approach C# by mj(op): 11:13am On Jul 04, 2012
This is my oop code for selecting patients:

namespace HospitalAction
{
public class Patients
{
private string connectionString;
public Patients()
{
connectionString = @"Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\medicalDB.mdf;Integrated Security=True;User Instance=True";
}
public DataSet GetPatient(int patientID)
{
string query = "SELECT * FROM patient WHERE registration_id =@Registration_ID";
SqlCommand cmd = new SqlCommand(query);
cmd.Parameters.AddWithValue("@Registration_ID", patientID);
return FillDataSet(cmd, "Patient"wink;
}
public DataSet GetPatient()
{
string query = "SELECT * FROM patient";
SqlCommand cmd = new SqlCommand(query);
return FillDataSet(cmd, "Patients"wink;
}

private DataSet FillDataSet(SqlCommand cmd, string tableName)
{
SqlConnection con = new SqlConnection(connectionString);
cmd.Connection = con;
SqlDataAdapter adapter = new SqlDataAdapter(cmd);

DataSet ds = new DataSet();
try
{
con.Open();
adapter.Fill(ds, tableName);

}
finally
{
con.Close();
}
return ds;
}
}

this is the code in my form to load the data:
HospitalAction.Patients DB = new HospitalAction.Patients();

dataGridView1.DataSource = DB.GetPatient();

but its not showing anythhing on the datagrid and reports no error. thanks.
ProgrammingHow Do I Load Binary Image In Sql Into Windows Form Picturebox by mj(op): 7:32am On Jun 27, 2012
please i have binary image in my sql database, how do I load it into a picturebox. the name of the column in the database is image, all other data are loading except the image. thanks
ProgrammingRe: Urgent Help On Sparql Query Ontology by mj(op): 4:30pm On Jun 19, 2012
Follow me on twitter, I will follow back @OshadamiMJ.
ProgrammingRe: Urgent Help On Sparql Query Ontology by mj(op): 9:39am On Jun 19, 2012
This is the working code, thanks so much, I will reach u back later, ur name must be in my project and publication of ontology.

PREFIX diag: http://www.oceandriveng.com/Diagnosis#
select distinct ?patient ?disease
{
?patient diag:Disease ?disease.
?disease diag:DiseaseName ?name1.
OPTIONAL {
?disease diag:Synonyms ?diseaseSynonym.
?diseaseSynonym diag:DiseaseName ?name2.
}
FILTER (regex( ?name1, "brain tumor", "i"wink||
(bound( ?name2 ) && regex( ?name2, "brain tumor", "i"wink))
}
ProgrammingRe: Urgent Help On Sparql Query Ontology by mj(op): 3:20am On Jun 19, 2012
Kobojunkie: this is the cleaned up version of the code that runs(no records returned).



I think I can read it, but can you read it and tell me if the relationships he created in there makes sense to you.
So, roughly 'the ?patient has a ?disease, and either that disease has
a ?name1 (brain_tumor) which matches "brain tumour", OR that disease has a synonym( brain neoplasm)
and that synonym has a ?name2 which matches "brain tumour". this is how he explained it, yeah is making sense, but no results.
ProgrammingRe: Urgent Help On Sparql Query Ontology by mj(op): 2:03am On Jun 19, 2012
Kobojunkie: ^^^ Have you tested it?
Yes I have but its not working, ive been debugging it but to know success.
ProgrammingRe: Urgent Help On Sparql Query Ontology by mj(op): 12:38am On Jun 19, 2012
This is the mail i got but the code is not working, he said he has not tested it though.

@prefix diag: <http://www.oceandriveng.com/Diagnosis#>

select distinct ?patient ?disease {
?patient diag:Disease ?disease.
?disease diag:DiseaseName ?name1.
OPTIONAL {
?disease diag:Synonyms ?diseaseSynonym.
?diseaseSynonym diag:DiseaseName ?name2.
}
FILTER (regex( "brain tumour", ?name1 ) ||
(bound( ?name2 ) && regex( "brain tumour", ?name2 ))
)
}

So, roughly 'the ?patient has a ?disease, and either that disease has
a ?name1 which matches "brain tumour", OR that disease has a synonym
and that synonym has a ?name2 which matches "brain tumour" '
ProgrammingRe: Urgent Help On Sparql Query Ontology by mj(op): 11:36pm On Jun 18, 2012
ive tried but to know success, but I'll keep trying.
ProgrammingRe: Urgent Help On Sparql Query Ontology by mj(op):
on the "DATA PROPERTIES" the listed properties does not specify the have relationships, CLICK on the Individuals Tab, you will see Disease and Patients Class, you can specify relationship on the individuals using the Object property Assertions on the right side.
look at this:
http://protege-ontology-editor-knowledge-acquisition-system.136.n4.nabble.com/adding-Synonyms-in-Protege-tc4152437.html
ProgrammingRe: Urgent Help On Sparql Query Ontology by mj(op): 8:19pm On Jun 18, 2012
jay bee: Select *
from Table
Where column like (%constraint1%, %constraint2%,.....)
im not clear with your query...read the entire post first so you know where we are.
ProgrammingRe: Urgent Help On Sparql Query Ontology by mj(op): 8:15pm On Jun 18, 2012
mj: Heres is the Link:
http://www.oceandriveng.com/ontology.jpg
what I did is to create an Object Property called Synonym, and add it to the object Property of each Disease and added the individual synonym to it.Maybe I need to modify my ontology to make this work, i dont know really, thanks Kobojunkie for the help you'v rendered on this, I really do appreciate, Thanks once again.
ProgrammingRe: Urgent Help On Sparql Query Ontology by mj(op): 8:12pm On Jun 18, 2012
ProgrammingRe: Urgent Help On Sparql Query Ontology by mj(op): 7:53pm On Jun 18, 2012
Kobojunkie: Oh, i see what I was doing wrong. I omitted some lines at the top.

Now, that you have Synonyms working, what do you want to accomplish with this new line of queries?
how can i link the synonyms with the patients that have that disease.
ProgrammingRe: Urgent Help On Sparql Query Ontology by mj(op): 7:37pm On Jun 18, 2012
Kobojunkie: I tried it as is, and that is what I got . . those error codes. What is Synonyms, and where is it defined?
Result Link:
www.oceandriveng.com/query.jpg
ProgrammingRe: Urgent Help On Sparql Query Ontology by mj(op): 7:34pm On Jun 18, 2012
Kobojunkie: ^ the code there is incorrect

SPARQL query execution failed with errors:
-1:The namespace prefix in "table:DiseaseName" was not declared.
3:syntax error, unexpected $end
Try it, Its working.
ProgrammingRe: Urgent Help On Sparql Query Ontology by mj(op): 7:28pm On Jun 18, 2012
mj: Thanks smiley smiley, yes its working, this project is a large project, but if i can overcome this problem then there wont be much problem for me on the entire project. Whats left? how do we map it in such a way that just supplying Brain_Neoplasm will also fetch patients with Brain_tumor based on the ontology using the synonym property. Thanks... there will be a custom front end that will accept the disease name. Im working with Jena API on Netbeans, if i define my synonyms in the code then im not using the power of ontology which is what this project is about, how can we make the sparql check for synonyms of the disease supplied.
This code checks for synonyms of Brain_Neoplasm, how can i link them with the patients.
PREFIX table: <http://www.oceandriveng.com/Diagnosis#>

SELECT ?DiseaseName

WHERE { ?x table:DiseaseName ?DiseaseName;
table:Synonyms table:Brain_Neoplasm.
}
ProgrammingRe: Urgent Help On Sparql Query Ontology by mj(op): 7:15pm On Jun 18, 2012
Thanks smiley smiley, yes its working, this project is a large project, but if i can overcome this problem then there wont be much problem for me on the entire project. Whats left? how do we map it in such a way that just supplying Brain_Neoplasm will also fetch patients with Brain_tumor based on the ontology using the synonym property. Thanks... there will be a custom front end that will accept the disease name. Im working with Jena API on Netbeans, if i define my synonyms in the code then im not using the power of ontology which is what this project is about, how can we make the sparql check for synonyms of the disease supplied.
ProgrammingRe: Urgent Help On Sparql Query Ontology by mj(op): 6:23pm On Jun 18, 2012
Kobojunkie: I have been able to confirm the query below, at least runs



It returns 6 records, with disease listings which include Brain_tumor, Brain_Neosplasm and Pineoblastoma. Please confirm that this is correct.
Thanks we are almost there, what I want is when you ask for patients with Brain_Neoplasm, patients with Brain_Tumor should also come up automatically based on the synonym relationship. i know it has to do with the query or something.
ProgrammingRe: Urgent Help On Sparql Query Ontology by mj(op): 6:00pm On Jun 18, 2012
Kobojunkie: When you tell me something is not working, you have to also tell me what exactly is not working. I cannot diagnose these things without having details to work with. Remember, I am not looking over your shoulder at your code, nor do I have any real clue what your RDF data even looks like.

Most systems display for you an error message of some kind to give you hints as to where the problem exists. All I have access to is vague info on the system I obtain from you, and I try to match it against what I get from http://www.w3.org/TR/rdf-sparql-query/
. Thanks.
I Have uploaded the rdf online : http://www.oceandriveng.com/onlinediagnosis.rdf

You can run sparql query online here: http://librdf.org/query
RDF content URIs: http://www.oceandriveng.com/onlinediagnosis.rdf
Query I Ran:
PREFIX table: <http://www.oceandriveng.com/Diagnosis#>
SELECT ?FullName ?DOB ?sex
WHERE {

?x table:FullName ?FullName;
table:DOB ?DOB;
table:sex ?sex;
table:Disease table:Brain_Neoplasm.


}
ProgrammingRe: Urgent Help On Sparql Query Ontology by mj(op): 5:39pm On Jun 18, 2012
ive ran the individual code, its not working.
ProgrammingRe: Urgent Help On Sparql Query Ontology by mj(op): 5:15pm On Jun 18, 2012
Thanks for replying to my post: Errors:
a. Error encountered after tableDOB on line 3.
b.same as above
c.same as above
this is the code i use in selecting patients with Brain_Tumor:
PREFIX table: <http://www.semanticweb.org/denrele/ontologies/2012/5/Diagnosis#>
SELECT ?FullName ?DOB ?sex
WHERE {

?x table:FullName ?FullName;
table:DOB ?DOB;
table:sex ?sex;
table:Disease table:Brain_Tumor.


}
For patients with Brain_Neoplasm:
PREFIX table: <http://www.semanticweb.org/denrele/ontologies/2012/5/Diagnosis#>
SELECT ?FullName ?DOB ?sex
WHERE {

?x table:FullName ?FullName;
table:DOB ?DOB;
table:sex ?sex;
table:Disease table:Brain_Neoplasm.


}
The Union will give me both patients with Brain_Neoplasm and Brain_Tumor.
But what im saying is that the user dont need to supply Brain_Tumor after supplying Brain_Tumor, since Brain_Neoplasm as stated in the ontology is a synonym of Brain_Tumor. how can i map that out, Welldone, thanks for your time.
ProgrammingRe: Urgent Help On Sparql Query Ontology by mj(op): 4:38pm On Jun 18, 2012
the code is not working, i dont have anything on my ontology called Brain, I created the <Synonym> myself as an Object Property Assertion on the diseases, this code is working, except that i dnt want the user to supply me the synonym word, the query should do that.
PREFIX table: <http://www.semanticweb.org/denrele/ontologies/2012/5/Diagnosis#>
SELECT ?FullName ?DOB ?sex
WHERE {
{
?x table:FullName ?FullName;
table:DOB ?DOB;
table:sex ?sex;
table:Disease table:Brain_Tumor.
}
UNION
{
?y table:FullName ?FullName;
table:DOB ?DOB;
table:sex ?sex;
table:Disease table:Brain_Neoplasm.
}
}

1 2 3 4 5 6 7 8 ... 16 17 18 19 20 21 22 23 24 (of 28 pages)