Jump to content

alvin567

Members
  • Posts

    161
  • Joined

  • Last visited

Posts posted by alvin567

  1. //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?

  2. 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?

  3. I phrase it simpler:

    1. Read all files from a folder in the same directory
    2. Files with the same name but different extension
    3. On .txt extensions,count the number of words,the start and end offset of each word,output into a textfiles
    4. Merge a1,a2,ann,rel(other file extensions),on read each line,and store it into a data-structure
    5. 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

     

    https://sites.google.../site/bionlpst/

  4. 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

     

    https://sites.google.../site/bionlpst/

  5. 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?

  6. <?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;

        }

    ?>

     

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.