User Profile

Collapse

Profile Sidebar

Collapse
bergy
bergy
Last Activity: Mar 29 '12, 02:21 AM
Joined: Mar 6 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • bergy
    replied to Averaging Data by Date
    Atli,

    This is perfect thanks - I'm assuming I'll have to convert dates into how MySQL likes them, but that shouldn't be a big deal. We're holding data on an embedded industrial PC so it's good to know your query times on your 5 year old machine. Thanks again!
    See more | Go to post

    Leave a comment:


  • bergy
    started a topic Averaging Data by Date

    Averaging Data by Date

    Background:

    We are collecting data and pushing it to MySQL at various intervals. Sometimes it may be every minute, other times every 15 minutes, and all ranges in between. This data is timestamped using the UNIX epoch timestamp (if needed I could convert this to a MySQL timestamp).

    When viewing the data in just one day, it is okay to show all rows, but we run into a problem with load times when we go past say a week......
    See more | Go to post

  • bergy
    replied to JDBC with OUT DriverManager
    in Java
    Yes, it's quite annoying, you would think that by now, this type of thing on an embedded device would be a no brainer, but I guess not for IBM >< Thanks for your help J!
    See more | Go to post

    Leave a comment:


  • bergy
    replied to JDBC with OUT DriverManager
    in Java
    As far as I know there are no naming services, unless you count the framework's built in one which in this case won't work (as far as I can gather). There is some class introspection done at runtime that is finding the private? Driver variable in the MySQL DataSource class. I have decided to write a PHP script on the database server that I can just query using HTTP/XML. Not really the route I wanted to go but I think it's my only option at this...
    See more | Go to post
    Last edited by bergy; Jan 7 '09, 02:03 AM. Reason: Edited for Clarification

    Leave a comment:


  • bergy
    replied to JDBC with OUT DriverManager
    in Java
    Thanks for the reply Josah; I have tried using "com.mysql.jdbc .jdbc2.optional .MysqlConnectio nPoolDataSource " and "com.mysql.jdbc .jdbc2.optional .MysqlDataSourc e" but both seem to call java.sql.Driver at some point as I'm still getting the error java.lang.NoCla ssDefFoundError : java.sql.Driver
    See more | Go to post

    Leave a comment:


  • bergy
    replied to JDBC with OUT DriverManager
    in Java
    I appreciate the bump of the thread, but honestly did you read my post? I know how to use MySQL or I would be posting in those forums. This is a specific Java related question, related to specific java packages - I fail to see how just searching mysql data in Google would return anything about java. Let me re-explain:

    Normally, in java, you use a class called DriverManager and Driver to load the MySQL or any other JDBC driver. ...
    See more | Go to post

    Leave a comment:


  • bergy
    started a topic JDBC with OUT DriverManager
    in Java

    JDBC with OUT DriverManager

    I am writing on an embedded device (J9 framework from IBM) that has a partial version of the java.sql package. It does not include Driver or DriverManager. I have downloaded the mysql Connector/J but all of their examples use the DriverManager. Something like:

    Code:
    conn = DriverManager.getConnection("jdbc:mysql://localhost/test?" + 
                                       "user=monty&password=greatsqldb");
    ...
    See more | Go to post

  • Any one have an idea on this?
    See more | Go to post

    Leave a comment:


  • bergy
    replied to how to call perl script by php
    in PHP
    If you are running PHP in a Linux based environment you could use the command shell_exec() to execute the PERL file. Something like:
    [PHP]
    <?php
    $output = shell_exec("./perl_script.pl arg1 arg2 arg3");
    echo $output;
    ?>
    [/PHP]
    See more | Go to post

    Leave a comment:


  • Remoting from a Service - Sharing an instance of a class between client and server

    I have a Windows Service created that uses a class (in a DLL file) to hold its information. This class has an array list of custom objects. I would like to expose this class (that my service is actively using) over remoting to a Windows Form application that can manage/add/edit/delete members of this array list.

    I have seen many remoting examples, but all of them start off by creating a new class:

    Code:
    
    
    ...
    See more | Go to post

  • This is because of an anti-trust lawsuit against Microsoft. I'm assuming you're using MS Internet Explorer, and that's why you're getting the little bounding box thing. There is a javascript that will prevent that from happening - I suggest reading this article from Adobe which describes the changes/problem you are having in more detail and gives you sample javascript files to embed flash in IE without the bounding box issue.

    ht...
    See more | Go to post

    Leave a comment:


  • Do what Kigoobe suggests, if it's still not working, check your PHP version, if you're using a version less than 4.1.0 you'll have to use $HTTP_POST_VARS instead of $_POST. You can check your PHP version by typing the code below in a new PHP file:

    [PHP]<?php phpinfo(); ?>[/PHP]
    See more | Go to post

    Leave a comment:


  • Just use the "global" keyword inside of your function for the variable that is outside of the function scope.

    [php]
    <?php
    $message = "hello world";
    function func1() { global $message; echo $message;}
    func1();
    ?>
    [/php]
    See more | Go to post

    Leave a comment:


  • The question is very general, hard to say what's wrong without seeing code, but I suggest you check out the cookie and session capabilities of PHP. These two things should provide everything you need. There are many examples of how to implement cookies and sessions - I suggest Searching Google
    See more | Go to post

    Leave a comment:


  • bergy
    replied to File Attachment problem with PHPMailer class
    in PHP
    I have never used that class before, but could it be that you need to specify the full path to your file?

    On Linux: [PHP]$mail->AddAttachment( "/var/www/httpdocs/mysite.com/home/test.doc"); [/PHP]
    On Windows: [PHP]$mail->AddAttachment( "C:\\My Docs\\test.doc" ); [/PHP]

    That's the only thing I could think of having no experience with the PHPMailer class.
    See more | Go to post

    Leave a comment:


  • bergy
    replied to looping through a result set. How?
    in PHP
    I just wanted to add (since you didn't specify the database type), that those functions are for mysql only, there are similar functions for ODBC and other databases your server/php version may support. Check out php.net for more info.
    See more | Go to post

    Leave a comment:


  • bergy
    replied to looping through a result set. How?
    in PHP
    Something like this?

    [PHP]
    $query = "select * from table";
    $result = mysql_query($qu ery) or die("Error");
    while($obj = mysql_fetch_obj ect($result)){
    switch($obj->some_column_na me){
    case "123": $img = "someimg.jp g"; break;
    case "456": $img = "otherimg.j pg"; break;
    default: $img = "defaultimg.jpg ";...
    See more | Go to post

    Leave a comment:


  • bergy
    replied to Some email providers don't recieve my emails
    in PHP
    My first inclination would be to check your headers. I know you don't need a To: header since that is taken care of by the mail() function, you are also missing some common headers that may help Google's and other mail server's SMTP server let you pass by. Below is an example of what I use for header and I've never had a problem.
    [PHP]$to = "to@domain.com" ;
    $from_name = "John Doe";
    $from_email = "jdoe@domain.co m";...
    See more | Go to post

    Leave a comment:


  • I've never used Smarty, and have no idea what it actually is, however I did try a few things. I enter the first URL in my webbrowser, and it brought me to a blank page - so that URL is valid - even tho it seemed to return nothing - I didn't get a 403 error.

    The second URL however, "http://inetsoftware.ne t/isoft/cek_sn.php hoster=$_smarty _tmp" seems to have a space where the ? should be. It should look like:
    &qu...
    See more | Go to post

    Leave a comment:


  • bergy
    replied to Checking if a string contains a word?
    in PHP
    Haha - No problem - and I'm all man baby... yeah!...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...