User Profile

Collapse

Profile Sidebar

Collapse
Formula
Formula
Last Activity: Jan 15 '11, 01:24 PM
Joined: Aug 10 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Formula
    started a topic How i generate a random sequence numbers

    How i generate a random sequence numbers

    Hi,
    i have this code which will generate
    a number between 1 and 4
    Code:
            Random random = new Random();
            random.Next(1, 4);
    but what i need is shuffling numbers
    for example 1 to 4: 2,1,4,3

    please help.
    See more | Go to post

  • How to auto increment field value after inserting to database?

    Hi, i'm working on my first project on asp.net using c#.

    I'm adding a couble of fields to database but i need the primary key of the master table to add it to sub table.


    The database contains 2 tables :


    Question Table :questionID(pri mary key and identity) , questionInText

    Answer table : answerID , answer1,answer2 , questionID


    code used to insert to...
    See more | Go to post

  • Formula
    replied to Array must has length but i want without it
    in Java
    Thanks man .Even though I alredy use it in another language(i won't say which) ,but it didn't come to mined.
    So I gave you this appliction for convert from decimal to binary it really usefull .Thanks again.
    Code:
    import java.util.*;
    import javax.swing.JOptionPane;
    
    
    public class  DecimalToBinary{
    	
      public static void main(String arg[]){
      	
      	List iarray = new LinkedList();
    ...
    See more | Go to post

    Leave a comment:


  • Formula
    started a topic Array must has length but i want without it
    in Java

    Array must has length but i want without it

    Hi all,i have Big problem mmm that the array must has the length but my program cann't be. Becase the array depend on the loop so i don't want to give a number like 20 or 100 .

    I searched through my book and didn't found anything.

    So in java i have to add number to my array,it work greet but i donn't want to do it.
    Please Help.
    Code:
    import javax.swing.JOptionPane;
    
    public class  ConvertDtoB{
    ...
    See more | Go to post

  • Code:
    import socket
    
    timeout = 300 # seconds
    socket.settimeout(timeout)
    Or put zero for unlimited time
    See more | Go to post

    Leave a comment:


  • Formula
    replied to Help with cookies/authentication
    Try this code will give you all cookies will be registered in a file
    from the schoolfinder.co m

    Code:
    #!/usr/local/bin/python
    
    
    
    
    
    COOKIEFILE = 'cookies.lwp'          # the path and filename that you want to use to save your cookies in
    
    import os.path
    
    import sys
    
    
    
    cj = None
    
    ClientCookie = None
    
    cookielib
    ...
    See more | Go to post

    Leave a comment:


  • Hi everyone,I used to copy the code.
    After that, opening Kwrite on linux.
    Then, press Ctrl + R search with regex and put this regex
    \s\s+\d+[.]+\n+\s{6}
    then replace all.
    See more | Go to post

    Leave a comment:


  • Formula
    replied to python CGI struggle...
    I think this the easier way.
    Code:
    import urllib
    
    TheData={'a':'myPlot1','x1': range(10),'y1': range(10),'l1':'First Legend','t':'Some title','h':'Some X label','v':'Some Y label'}
    
    params = urllib.urlencode(TheData)
    
    f = urllib.urlopen("http://Domain.com/myLibs/LibFile.py", params)
    
    print "Content-type: image/png\n"
    
    print f.read()
    ...
    See more | Go to post

    Leave a comment:


  • Formula
    replied to python CGI struggle...
    why don't you use Get method
    See more | Go to post

    Leave a comment:


  • Formula
    replied to What is your OS and Python Version
    OS: Fedora Core 9
    Python version: 2.5
    See more | Go to post

    Leave a comment:


  • Formula
    started a topic Class to extract tags from html code

    Class to extract tags from html code

    Hello everybody,becau se I am newbie in python two weeks only but I had programming in another languages but the python take my heart there's 3 kind of arrays Wow now I hate JAVA :) .

    I am working now on html process.
    So, I found a good class for getting html tag but I don't know how to use it
    I wrote this code for getting the tag A hopping some help please >>>

    Code:
    <%
    import urllib
    ...
    See more | Go to post
No activity results to display
Show More
Working...