User Profile

Collapse

Profile Sidebar

Collapse
newbieBrian
newbieBrian
Last Activity: Dec 14 '07, 10:49 PM
Joined: Nov 12 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Need Help on How to check if the excel table is empty

    I have a program that combines the contents of other tables into one tables.
    If it sees any bad data from each table, it stores it into the tables called errors:
    So the inputs like this:
    table1,table2,t able3

    the output:
    combinedTable, errorTable1,err orTable2,errorT able3. The bad data from table1 will go to errortable1, etc.

    My question is How to check to see if some of the error table is empty?...
    See more | Go to post

  • newbieBrian
    started a topic Read Ms word document line by line

    Read Ms word document line by line

    Hi all,

    I am new to VB. I have a Word document. Could you show me some idea of how to
    1) Read line by line
    2) Get the word next to a specific one. For example as below:

    Code:
    Name: Some Name      Addr: Some address     City: Some City.
    Description: some texts, etc.
    So for 2) , how do I get Some Name from Name:, Some address from Addr:, and Some City from City: ?

    Thanks.
    See more | Go to post
    Last edited by Killer42; Nov 22 '07, 02:03 AM. Reason: Added CODE tag to preserve text spacing

  • newbieBrian
    replied to STR_TO_DATE Problem
    I fixed the problem....
    See more | Go to post

    Leave a comment:


  • newbieBrian
    started a topic STR_TO_DATE Problem

    STR_TO_DATE Problem

    Hi All,

    Please test it out.

    [CODE=mysql]SELECT STR_TO_DATE('01/01/69','%m/%d/%y');[/CODE]


    I got this result:
    2069-01-01

    Please help to make it to 1969-01-01. Thanks
    See more | Go to post
    Last edited by mwasif; Nov 16 '07, 04:37 PM. Reason: Added [CODE=mysql] tag

  • newbieBrian
    replied to How to Query more than one Col1 in Col2?
    [CODE=mysql]select instructor ,count(instruct or) from ThisTable group by instructor;[/CODE]

    I think it will work. My mine was dump yesterday. Thanks....
    See more | Go to post
    Last edited by mwasif; Nov 16 '07, 02:57 PM. Reason: Added [CODE=mysql] tag

    Leave a comment:


  • newbieBrian
    replied to Compile doesn't see the derived class
    in Java
    Sorry for the misspell, since it is not real files. I do have the java files spelling correctly. In fact, I was able to run the project using the eclipse. But I have trouble
    setting up to work with the command line. Thanks any way.
    See more | Go to post

    Leave a comment:


  • newbieBrian
    started a topic How to Query more than one Col1 in Col2?

    How to Query more than one Col1 in Col2?

    Hi all,

    I have a table with two columns called for example instructor and class
    one instructor may teach more than one class. How can I query how many classes each instructor teaches?

    Let me make up the table.

    Instructor Class

    Mr. A physics
    Mr. A Calculus
    Ms.B...
    See more | Go to post

  • newbieBrian
    started a topic Compile doesn't see the derived class
    in Java

    Compile doesn't see the derived class

    Hi All,

    I have an abstract class,called Mybase.java, for example. I have a derived class called MyDerived.java that extends Mybase.java.

    From the window command line, I compile the Mybase.java successfully, as it should be. When I compile Myderived.java I got the error:

    C:\test\Myderiv ed.java:3: cannot fsymbol: class Mybase
    public class Myderived extends Mybase

    Please give me some...
    See more | Go to post

  • newbieBrian
    replied to Formatting output file
    in Java
    I didn't get the comma either. I will try some thing like:

    char c = inputLine.charA t(i);
    if (!Character.isW hitespace(c))
    {
    field.append(c) ;
    }
    and append the coma when it reaches the whitespace.

    Thanks for your help.

    Brian...
    See more | Go to post

    Leave a comment:


  • newbieBrian
    replied to Formatting output file
    in Java
    Jos,

    Code: ( java )

    1.
    field= field.toString( ).replaceAll("[\t"], ",");

    I got an error message: field is StringBuider type while field.toString is String type. If I use field.toString( )= field.toString( ).replaceAll("[\t"], ",");
    I got this error:
    required: variable
    found : value
    field.toString( ) =...
    See more | Go to post

    Leave a comment:


  • newbieBrian
    replied to Formatting output file
    in Java
    If I have a line with three field, each field may separate by a number of whitespace. some coma may be between one field. For example, the field name:company, which may be like this: companyname, Inc. So it I see something like this, I will put double quote arount it. So it would be "companynam e, Inc". And each field of the input file is separated at least three whitespace. Here is the example:
    lastname firstname...
    See more | Go to post

    Leave a comment:


  • newbieBrian
    replied to Formatting output file
    in Java
    Please take a look at the code and the input/output files and help me find out what I have been doing wrong here. The regular expression didn't work. The line feed didn't seem to work either. Thanks

    import java.io.*;
    import java.util.*;

    public class TestReplaceAll
    {
    public static void main(String[] args) throws Exception
    {
    /* sample file:
    12345 ...
    See more | Go to post

    Leave a comment:


  • newbieBrian
    replied to Formatting output file
    in Java
    I use the regular expression as you mentioned and I didn't get the comma in.
    Also, I don't know how to handle the whitespace and the ',' between the text field. Take this input file for example:

    col1 col2 col3
    12345 text text someone, sometitle

    If I use replaceAll space with , then I would end up with

    12345,text,text ,someone,someti tle....
    See more | Go to post

    Leave a comment:


  • newbieBrian
    replied to Formatting output file
    in Java
    [PHP]"[/PHP]

    r035198x, sorry about that.

    I just fix the version problem and using the FileWriter as you suggested. But I didn't get the right output format. Here is my input file:

    12345 sometext sometext

    99 sometext sometext

    And the output is :
    12345,sometext, sometext
    sometext,99,som etext,sometext
    Please show me how to get it right like...
    See more | Go to post

    Leave a comment:


  • newbieBrian
    replied to Formatting output file
    in Java
    Hi Admin,

    Here is what I did:

    import java.io.*;
    import java.util.*;

    public class TestReplaceAll
    {
    public static void main(String[] args) throws Exception
    {

    BufferedReader in = new BufferedReader( new FileReader("sam ple.txt"));
    PrintWriter out = new PrintWriter("ou t.txt");

    String...
    See more | Go to post

    Leave a comment:


  • newbieBrian
    replied to Formatting output file
    in Java
    Hi Admin,

    I know how to read the file using FileReader/BufferedReader. But I have the problem with the logic of how to add comma and replace the whitespaces between each fields. Please if you can write a simple code so that I can learn from it. I appreciate it very much....
    See more | Go to post

    Leave a comment:


  • newbieBrian
    started a topic Formatting output file
    in Java

    Formatting output file

    Hi all,

    I am very new to java programming. I want to write a program that turn an input file into the output file with fields separated by comma. Here is the sample input:


    12345 somewords somewords somewords
    21345 somewords somewords somewords

    Below is the output I want to have:

    12345,somewords ,somewords,"som ewords
    21345,somewords ,somewords,some words...
    See more | Go to post
No activity results to display
Show More
Working...