User Profile

Collapse

Profile Sidebar

Collapse
coolsti
coolsti
Last Activity: Jun 11 '09, 12:08 PM
Joined: Mar 4 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Lost in the software jungle: WPF vs. C# vs. C++ vs. Java ...

    I have experience with C++, Java, PHP and many many more "older" software languages. More recently I got introduced to C# and programmed some small applications with Visual Studio 2005 Express version.

    In the last days I started to look around to see what language/platform would be good for a new project I may be embarking on, which will be a rather sophisticated chemical process simulator. And now I am completely confused...
    See more | Go to post

  • Ok I am going to solve my own post. I just found out that it was my Avira antivirus protection software that was the culprit. I had to add text/plain to the mime type that is ignored by the input stream checker, as this checker apparently holds back the data and buffers it if the stream is non-terminating.

    :)
    See more | Go to post

    Leave a comment:


  • Windows Vista browser input stream buffering, how to stop it?

    I am having a curious problem with Vista working on a Lenovo thinkpad.

    To test and demonstrate this problem, I have a PHP script that does not terminate. It enters an infinite loop where it repeatedly prints out a line of data, flushes output buffers (with appropriate PHP functions), then sleeps for a number of seconds.

    In other words, this represents a constant input stream to the browser which is requesting the script...
    See more | Go to post

  • I may be missing something or maybe my explanation of the situation is not so clear. Let me try again. My PHP script opens a data file and dumps the contents of it out to the browser with echo statements. When it reaches the end of the data file the script does not finish and exit. Instead, I wait some time with the sleep() function, then I look to see if there is new data. If there is, I send it also out to the browser and wait again. This is why...
    See more | Go to post

    Leave a comment:


  • Hi Jos,
    yes you are correct, the code I showed above does not work because of the buffer size of 0. That was a cut and paste of the code during my experimentation . I found out afterwards that it doesn't work.

    Putting the sleep at the end of the infinite while loop is not easy to do as that would mean I have a steady amount of data to send out, which is not the case here (the data comes from another process and the PHP script...
    See more | Go to post

    Leave a comment:


  • coolsti
    started a topic Applet input stream buffering delay, how to stop?
    in Java

    Applet input stream buffering delay, how to stop?

    I have an applet that accepts data as a stream from a php script using the following code snippet:

    Code:
               String dataendpoint = "http://phpfunction.php";
    
                URL url = new URL(dataendpoint);
                InputStream is = url.openStream();
                String line;
                InputStreamReader isr = new InputStreamReader(is);
                BufferedReader br = new
    ...
    See more | Go to post

  • You can leave the images as files located someplace off the document tree so that they are not directly accessible via a browser. But place them in a directory that is accessible to PHP or whatever scripting you are using for your site.

    You can store the filename or if needed also the directory path information of the user's active profile picture in the database. This would only be saving some text in the database rather than the...
    See more | Go to post

    Leave a comment:


  • I don't know where the proxy server stuff comes in, but if you have a C# application and you wish to connect to a MySQL database (even if it is on a reachable but remote machine) you can do this with C# commands.

    You need to install a MySQL connector for C# on the computer that will run the C# application. This just adds the library functions that do all the work for you. I did this a while back easilly enough. Just look at the MySQL...
    See more | Go to post

    Leave a comment:


  • coolsti
    replied to Removing duplicates
    There is still the conceptual problem of knowing when to delete what, since even as you describe it, you can still have a long series of rows in your table that have adjacent entries with dates within 3 days of each other, making it difficult to know what is a duplicate or not.

    I think what you might better want to do is to not think in terms of "deleting" what you consider to be duplicate, but to instead refuse to "insert"...
    See more | Go to post

    Leave a comment:


  • coolsti
    replied to Table structure issue
    Your post is 3 days old so maybe you are not looking for an answer anymore.

    Try to post an example table structure or two, and we can give you better advice.

    Basically, databases are quite good at handling large tables with lots of information. If a particular table gets large and queries become slow, you can speed things up (for the select queries at least) by adding an index or two.

    Where you may wish...
    See more | Go to post

    Leave a comment:


  • Hint: look in the mysql documentation for the "group by" clause and the "group_concat() " function.
    See more | Go to post

    Leave a comment:


  • I don't understand the part about your date range, so I am just basically repeating yours without knowing if it will work logically, but you want something similar to the following:

    Code:
    select t3.guestNo, t3.dateFrom, t3.dateTo, t1.hotelNo, t2.roomNo
    from hotel t1 inner join room t2 on t1.hotelNo=t2.hotelNo
    left join booking t3 on (t1.hotelNo=t3.hotelNo and t2.roomNo=t3.roomNo)
    where t3.dateFrom>current_date
    ...
    See more | Go to post

    Leave a comment:


  • coolsti
    replied to Complex join?
    Is tab2no in table2 unique?

    if so you could try this:

    [code=sql]
    select table2.tab2id,t able2.tab2name, table1.tab1no, sum(table1.tab1 val) as sumtab1val
    from table1 inner join table2 on table1.tab1no=t able2.tab2no
    group by table1.tab1no
    [/code]

    Unless I have missed the meaning of the problem and my solution is totally off, this is just a very basic join using an aggregate function...
    See more | Go to post

    Leave a comment:


  • coolsti
    replied to Removing duplicates
    I was just going to give you a suggestion of how you might go about this, but then I realize there is a specific problem in your problem specification.

    You are saying that two rows are "duplicate" if the ID is the same and the date field is within 3 days of each other. I have a problem deciding when to decide that rows are duplicates.

    Take this case: Let us say you have 10 rows in your table with the same title,...
    See more | Go to post

    Leave a comment:


  • coolsti
    replied to Problem with inner join
    Actually, thinking about it, my suggestion might not work.

    If not, you could try this:

    Code:
    select distinct 
    if(a1.medicine<a2.medicine,a1.medicine,a2.medicine) as medicine1, 
    if(a1.medicine<a2.medicine,a2.medicine,a1.medicine) as medicine2 
    from A a1 inner join A a2 on a1.id = a2.id 
    and a1.medicine != a2.medicine and a1.medicine < a2.medicine
    Here I do...
    See more | Go to post

    Leave a comment:


  • coolsti
    replied to Problem with inner join
    Code:
    select a1.medicine as medicine1, a2.medicine as medicine2 
    from A a1 inner join A a2 on a1.id = a2.id and a1.medicine != a2.medicine and a1.medicine < a2.medicine
    Won't the above work?
    See more | Go to post
    Last edited by Atli; Oct 31 '08, 12:06 AM. Reason: Added [code] tags

    Leave a comment:


  • coolsti
    replied to Problem with MySQL root directory
    It is a little hard to understand your question and problem, so maybe that is why you haven't had an answer yet.

    As I understand it, you have put the directory locations, meaning the directory paths, for your images and videos in your database. And your images and videos themselves are located in these directories. But what is the problem? Can you read the directory locations from your database, but you cannot get your application...
    See more | Go to post

    Leave a comment:


  • coolsti
    replied to Check if the user can create temporary?
    You can use the "show grants for XXX" where XXX is your user.

    I am not sure what permissions you need to have as user to be able to carry out this command, though.

    If the user has permission to create temporary tables, then it will appear in the outcome of carrying out this query.

    By the way, you didn't carry out your search of the Mysql site very well. I found the above information there....
    See more | Go to post

    Leave a comment:


  • coolsti
    replied to Exporting database from a linux server
    Hope I may hop in to add some clarifications to this.

    You want to run the above not within "mysql" but externally to mysql. Meaning, you run this mysqldump command in a Linux terminal window.

    Also, depending on the permissions set up for your database, you may have to supply some additional arguments to specify a username and possibly the corresponding password for that user....
    See more | Go to post

    Leave a comment:


  • coolsti
    replied to Receiving Syntax Error using "OR" command
    Glad to help where I can. I am not expert in all things and I assume (and welcome) others will jump in and correct me when I am wrong.

    I don't always have the time for it but I feel a good explanation helps more than a short response giving only a solution.
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...