User Profile

Collapse

Profile Sidebar

Collapse
pb2000
pb2000
Last Activity: Jul 3 '14, 10:45 AM
Joined: Apr 13 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • pb2000
    started a topic Formatting int as a ASCII char

    Formatting int as a ASCII char

    Hello,

    I must present integers as a ASCII chars.
    For instance for num 65 -> str1 "A".
    int num = 65;
    string str1 = String.Format(" {0:??}",num);

    Mentioned problem cannot be solved with Encoding.ASCII. .. and others, because of the fact that I use specified "C# like" environment with only String.Format method for that.

    I would be grateful for Your help.
    Thanks...
    See more | Go to post

  • pb2000
    started a topic string representation of binary to integer

    string representation of binary to integer

    Hello,

    I struggle with really odd matter:
    There is sth like '01010101' which is needed as an integer on function output. Is it possible to convert it (string representation of binary to integer)?
    I tried ::byte and get_bytes(), without any success.

    Can You help me? Thanks a lot!
    pb2000
    See more | Go to post

  • pb2000
    started a topic Custom loading class
    in Java

    Custom loading class

    Hello,
    I have problem with ObjectInputStre am.ReadObject() method.
    Code below
    Code:
    FileClassLoader externalLoader = new FileClassLoader(currentTaskDir);
    Class c = externalLoader.loadClass(className);
    Method mlist[] = c.getDeclaredMethods();
    Object[] objectsPassed = null;
    objectsPassed = (Object[])ois.readObject();
    Object examinedObj = objectsPassed[0];
    String methodName = (String)objectsPassed[1];
    ...
    See more | Go to post

  • pb2000
    started a topic Reflection
    in Java

    Reflection

    Hello.

    I would like to write function which will invoke any method of any object in artificial way.

    Code, I have already written:

    Code:
    import java.lang.reflect.Method;
    import java.lang.Class;
    import java.lang.reflect.Type;
    import static java.lang.System.out;
    
    class Calc
    {
    	public long add(long a, long b) { return a + b; }
    }
    
    public
    ...
    See more | Go to post

  • pb2000
    replied to Multicast in java
    in Java
    Solved. Sorry for stupid question. I am newbie at networking.
    See more | Go to post

    Leave a comment:


  • pb2000
    started a topic Multicast in java
    in Java

    Multicast in java

    Hello,

    I work with Client/Server example as below:

    Code:
    public class Client {
    public static void main(String[] args) throws IOException,
    ClassNotFoundException {
    InetAddress address = InetAddress.getByName("225.6.7.8");
    MulticastSocket socket = new MulticastSocket(56565);
    socket.joinGroup(address);
    byte[] buffer = new byte[1024];
    DatagramPacket datagram =
    ...
    See more | Go to post

  • pb2000
    started a topic Failure sending mail

    Failure sending mail

    Hello,

    Example is simple, shown on many forums, but not working.
    Code:
            MailMessage mail = new MailMessage();
            mail.To.Add("add1@gmail.com");
            mail.From = new MailAddress("add2@gmail.com");
            mail.Subject = "Test Email";
            mail.Body = "Hello";
            SmtpClient smtp = new SmtpClient();
            smtp.Host = "localhost";
    ...
    See more | Go to post

  • pb2000
    started a topic Custom sorting in sql query

    Custom sorting in sql query

    Hello,
    I learn SQL SERVER.

    I wrote:

    SELECT
    "All"
    UNION SELECT DISTINCT
    KindsColumn From ProductsTable

    I obtain:
    ----------------------
    1. AA_kind
    2. AB_kind
    3. All
    4. B_kind
    5. Z_kind

    But i take it into DropDownList where 'All' should be at the top.

    I would like to obtain (where 2-5 are sorted)...
    See more | Go to post

  • pb2000
    replied to Getting Master Details info from table
    Thank You for the answer. Being newbie I confused simple thema.
    See more | Go to post

    Leave a comment:


  • pb2000
    replied to Getting Master Details info from table
    Thank You for the answer.

    Not exactly.
    I obtain with Your answer:

    ID Value1 Value2
    ----------------------------------------------------------
    1. PC1, Mark, 2002/02/02
    2 PC1, Bryan, 2003/02/02
    3. PC1, Chris, 2004/02/02

    But I want for multiplied value1 (PC1) Collect all data in 1 column, not row
    Namely,

    ID Value1
    ----------------------------------------------------------...
    See more | Go to post

    Leave a comment:


  • pb2000
    started a topic Getting Master Details info from table

    Getting Master Details info from table

    Hello,

    I learn SQL Server from the beginning, being newbie in this field.

    I have exemplary table

    ID Device UsedBy From To
    --------------------------------------------------
    1. PC1 Mark 2002/02/02 2003/02/02
    2. PC1 Bryan 2003/02/02 2004/02/02
    3. PC1 Chris ...
    See more | Go to post

  • pb2000
    started a topic Selecting substring of WHERE in query

    Selecting substring of WHERE in query

    I would like to search for records values.

    For instance:

    ID Name Number
    --------------------------
    1. First 704
    2. Second 60042
    3. Third 70

    I would like to create query like

    SELECT * FROM MyTable WHERE Number= %70% (Namely - includes 70)
    Result: 1 and 3

    SELECT * FROM MyTable WHERE Number= %04%
    Result 1,2

    But
    ...
    See more | Go to post

  • Selecting distinct values from one column with casting

    Hello,

    I am beginner in MSSQL.

    After writing:
    Code:
     
    SELECT 
    DISTINCT UpDate AS ExpirationDate
    FROM MyTable
    I have the following result:

    ExpirationDate
    ------------------------------
    1 NULL
    2 2007-11-05 12:53:12.000
    3 2003-01-14 13:33:12.000
    4 2004-01-15 12:34:23.000

    But I would like to obtain:
    ...
    See more | Go to post
No activity results to display
Show More
Working...