alvin567
-
Posts
161 -
Joined
-
Last visited
Posts posted by alvin567
-
-
//There will be 0.0 to 1.0% chance that the String will become "CHICKEN NUGGESTs"
public static String main(String arg){
Random rand = new Random();
int mutatePercentage = rand.nextInt(100);// if it's 0, means 0% chance. if it's 99, it means 1% chance
if(mutatePercentage==0){
return arg; // no change since % is 0
}
else if (rand.nextInt(10000) < mutatePercentage){
return mutateString(arg);
}
}
Hi there,
I found this piece of code from else where.
Where can I get the mutateString(arg) function?
-
Compute the two difference between the sets and documents,by word,by lines,by chracters and calculate and evaluate by f-scores and precisions
Firstly,generate two different sets of documents with 1% changes and apply them on add/deletion
Convert the two sets of documents into appropiate data structures and look up on the ontologies
Break up and build the data structures and calculate the statistics involved.
Have anyone worked on something like this can share the process of how it is supposed to be done?
-
[entities]
Protein
Entity
[relations]
Equiv Arg1:Protein, Arg2:Protein
Equiv Arg1:Entity, Arg2:Entity
How can I reach [entities] until it reaches [relations]?
-
I phrase it simpler:
- Read all files from a folder in the same directory
- Files with the same name but different extension
- On .txt extensions,count the number of words,the start and end offset of each word,output into a textfiles
- Merge a1,a2,ann,rel(other file extensions),on read each line,and store it into a data-structure
- Join results of 3,4 and output into a new folder <previousfolder>_result
What are the operations that I can use to achieve this with java?
On PMID-1334619.txt,it contains these texts,how am I supposed to read them word by word and store them into a data structure?
Reading word line by line,word by word?
Hydroxylated kininogens and kinins.
Hydroxyprolyl-3-bradykinin was identified in the digest of purified human high molecular weight (H) kininogen with plasma kallikrein. Hydroxyproline was not detected in the heavy and light chains portions of H kininogen, although they include three possible sites for hydroxylation of proline by proline hydroxylase. The content of hydroxyprolyl-3-bradykinin in H kininogen from individual plasmas varied from 14% to 64% of total kinin. The present results and our previous results indicate that only kinin moity in H kininogen from human and monkey plasmas has been partially hydroxylated post-translationally by proline-4-hydroxylase.
How do I merge .a1,a2 together?
How do I store them I data structures?For example T1(ID),Protein (Start Offset)(End_Offset) (Event)
PMID-1334619.a1
T1 Protein 13 23 kininogens
T2 Protein 28 34 kinins
T3 Protein 53 63 bradykinin
T4 Protein 111 146 high molecular weight (H) kininogen
T5 Protein 152 169 plasma kallikrein
T6 Protein 245 256 H kininogen
T7 Protein 385 395 bradykinin
T8 Protein 399 410 H kininogen
T9 Protein 467 472 kinin
T10 Protein 538 543 kinin
T11 Protein 553 564 H kininogen
It also may link to other files.
PMID-1334619.a2
T12 Hydroxylation 0 12 Hydroxylated
T13 Hydroxylation 614 626 hydroxylated
E1 Hydroxylation:T12 Theme:T1
E2 Hydroxylation:T12 Theme:T2
E3 Hydroxylation:T13 Theme:T10
- Read all files from a folder in the same directory
-
On PMID-1334619.txt,it contains these texts,how am I supposed to read them word by word and store them into a data structure?
Reading word line by line,word by word?
Hydroxylated kininogens and kinins.
Hydroxyprolyl-3-bradykinin was identified in the digest of purified human high molecular weight (H) kininogen with plasma kallikrein. Hydroxyproline was not detected in the heavy and light chains portions of H kininogen, although they include three possible sites for hydroxylation of proline by proline hydroxylase. The content of hydroxyprolyl-3-bradykinin in H kininogen from individual plasmas varied from 14% to 64% of total kinin. The present results and our previous results indicate that only kinin moity in H kininogen from human and monkey plasmas has been partially hydroxylated post-translationally by proline-4-hydroxylase.
How do I merge .a1,a2 together?
How do I store them I data structures?For example T1(ID),Protein (Start Offset)(End_Offset) (Event)
PMID-1334619.a1
T1 Protein 13 23 kininogens
T2 Protein 28 34 kinins
T3 Protein 53 63 bradykinin
T4 Protein 111 146 high molecular weight (H) kininogen
T5 Protein 152 169 plasma kallikrein
T6 Protein 245 256 H kininogen
T7 Protein 385 395 bradykinin
T8 Protein 399 410 H kininogen
T9 Protein 467 472 kinin
T10 Protein 538 543 kinin
T11 Protein 553 564 H kininogen
It also may link to other files.
PMID-1334619.a2
T12 Hydroxylation 0 12 Hydroxylated
T13 Hydroxylation 614 626 hydroxylated
E1 Hydroxylation:T12 Theme:T1
E2 Hydroxylation:T12 Theme:T2
E3 Hydroxylation:T13 Theme:T10
-
Hey,I am trying to select a count of m and f.
-
or a row returns results as 1 or 0,
I want to display as Yes or no
-
Hi,there,
I am to search from a databases,it will return the results 1 or 0,
I need to manipulate from the sql queries such that it will return 1 as yes and 0 as no.
-
Can I ask you:
ini_set('display_errors',1);
error_reporting(-1);
what does this meants?
-
Hi there,
I am trying to design a php based access control list for my application,
the idea is to disallow members to access certain functionalities in my systems
Filelist(file_id,filename)
Member_Access(member_id,file_access)
Member(member_id,name)
Is it a good ideas?
The idea is revolved around RBAC,and ACL?
-
Ok,apologies,the identifier even though I removed the quotes it is still not working.
I will try out the mysql_error() and php_error reporting features by myself.
-
can you explain better?
-
<?php
//javascript-coder.com
if(!empty($_REQUEST['adduser'])){
if($_POST["email"] && $_POST["password"] && $_POST["cpassword"]){
if($_POST["password"] == $_POST["cpassword"]){
$email = $_POST['email'];
$password = $_POST['password'];
if(validate_user($email,$password) == 1){
echo 'User Already Exist in the system';
}else{
add_user($email,$password);
echo 'User successfully added into the system';
}
}else{
echo 'Password doesn\'t match try again';
}
}
else{
echo 'Please ensure all values are filled up';
}
}
//w3schools,refer
//airline system from netbeans
//betterphp help
function validate_user($email,$password){
//if the password is correct the move on todo others
$result = mysql_query("Select * FROM user WHERE email = '$email'");//learn from betterphp
$row = mysql_fetch_array($result);
if ($row['email'] <> "") {//check if email already existed in the database
return true;//email exist in the database
}else{
return false;//email doesn't exist in the database
} }
function add_user($email,$password){
//password to be hashed in the database because the database it,
$sql = "Insert into user ('email','password') VALUES ('aaaa', 'aaaa')";
mysql_query($sql);
$user_id = mysql_insert_id();//return the user id by the previously generated columns
return $user_id;
}
?>
-
What I mean is to display all the tuple.
-
ok,I have a group by condition in the sql.
there is male and female in the database.
I want to sum up the male and female in the same sql queries.
-
how do I count the number of males and female in and sql database.
-
I have a questions:
how do I count the number of values in a database using a group by conditions?
-
but I though datediff is for mssql only?
-
Gizmo:
I have manage to solve the issue already,thanks
SELECT * , YEAR( CURDATE( ) ) - year - IF( STR_TO_DATE( CONCAT( YEAR( CURDATE( ) ) , '-', month, '-', day ) , '%Y-%c-%e' ) > CURDATE( ) , 1, 0 ) AS age
FROM member
LIMIT 0 , 300;
-
Is it possible to explode phpmyadmin is display all the database and column?
-
SELECT *, STR_TO_DATE(CONCAT(YEAR(CURDATE()), '-', MONTH(birthdate), '-', DAY(birthdate)) ,'%Y-%c-%e') AS birthday FROM user;
I think you mean this portion?
-
ok,so i use a str_to_date()
then how do I calculate the age?
-
gizmo,
I am thinking of strictly using mysql to manipulate the data.
Currently my environment is php/mysql
-
gizmo,there are three of these columns in the database,I am trying to use mysql queries,
can i cast these 3 columns as date type instead?
Matching a configurations for violations
in Application Design
Posted
Line: Binding:T33 Theme:T12 Theme2:T13 Site:T32
Config: Binding Theme+:Protein, Site*:Entity
How do I match the line with the config?
Assume:
* number of times
+ one or more time
? 0 or 1 times only