• Welcome to Valhalla Legends Archive.
 
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - Grok

#1
Excess of Grok / #1 LSU vs #2 Bama
November 05, 2011, 11:18 PM
LSU 9, Bama 6 in 1OT.  Can't ask for a better 1v2 match.

The 4th quarter LSU interception of Alabama down on the 1-yard line was really interesting.  I thought the Tide receiver had the ball in his possession until he hit the ground, at which point it skittered over into the LSU db's possession and was ruled an interception.  On multiple replays, I don't see anything to change my opinion.
#2
There are a couple questions here.  In comments and after the code sample.


            class TS { public int lossyVal = 0; }
            TS ts = new TS();
            ts.lossyVal = 555;                 // we will attempt to lose this data via conversions
            Object tt = new object();
           
            // implicit cast
            tt = ts;
            Console.WriteLine("ts is type {0}", ts.GetType().ToString());
            Console.WriteLine("tt is type {0}", tt.GetType().ToString());
            // at this point, both tt and ts are varibles of type TS, so  ...
            ts = tt;    // why does compile fail without explicit cast?
            // is it because compiler cannot figure out what happened on "tt = ts" line?
            // I can buy that, but what about ..
           
            // cast ts to object, attempt to lose the lossyVal
            tt = (object) ts;
            Console.WriteLine("ts is type {0}", ts.GetType().ToString());
            Console.WriteLine("tt is type {0}", tt.GetType().ToString());
            // why is tt not demoted to System.Object, and lose the extra data??
            // tt should be a type that doesnt have a member called lossyVal, but ..
            Console.WriteLine("guess what .. ({0})", ((TS)tt).lossyVal);


Why did lossyVal not get clobbered when converting to Object?
#3
Trash Can / I took out the trash.
April 29, 2010, 12:56 PM
nt
#4
http://mindprod.com/jgloss/unmain.html

The ultimate anti-style guide for programmers.

#5
Thing-O-Rama ™ / What shows do you record?
August 26, 2009, 02:14 AM
Currently only have two shows set to record, at various times of the day.

Stargate SG-1,
Blind Date

End up watching them about1am to 3am before falling asleep.
#6
Unauthorized Advertising.

This topic has been moved to Trash Can.

http://forum.valhallalegends.com/index.php?topic=17980.0
#7
Like 50 million other people, I am having a problem starting out with MySQL Connector/J for JDBC.
I believe I have followed the installation instructions to the letter, as well as tried all the derivations of suggestions in many different forums.

First I will display the test source code, then the results.
Afterward I will describe the environment.

Test source:

import java.sql.DriverManager;
import java.sql.Connection;
import java.sql.SQLException;

class MyTest {
    public static void main(String[] args) {
       
        System.out.println("MyTest started.");
        try {
            Class.forName("com.mysql.jdbc.Driver");
        } catch (Exception ex) {
            System.err.println("------------------------------------------------");
            System.err.println("Exception: " + ex.getMessage());
            System.err.println("------------------------------------------------");
        }
        try {
            String url = "jdbc:mysql:///user";
            String uid = "root";
            String upwd = "changed";
            Connection con = DriverManager.getConnection(url, uid, upwd);
        } catch (SQLException ex) {
            System.err.println("------------------------------------------------");
            System.err.println("SQLException: " + ex.getMessage());
            System.err.println("------------------------------------------------");
        }
        System.out.println("MyTest completed.");
    }
}


Runtime results:

S:\Java\Projects>java -classpath S:\Java\jdk1.6.0_13\jre\lib\ext\mysql-connector
-java-5.1.7-bin.jar MyTest
Exception in thread "main" java.lang.NoClassDefFoundError: MyTest
Caused by: java.lang.ClassNotFoundException: MyTest
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Could not find the main class: MyTest.  Program will exit.

Environment:
S:\Java\jdk1.6.0_13\jre\lib\ext\ contains mysql-connector-java-5.1.7-bin.jar
PATH contains S:\Java\jdk1.6.0_13\bin

NOTE:  I have tested with and without setting CLASSPATH, as well as putting in on the command line when invoking the runtime.

Invoking it WITHOUT classpath set returns (in case you asked for this test):

S:\Java\Projects>java MyTest
MyTest started.
------------------------------------------------
Exception: com.mysql.jdbc.Driver
------------------------------------------------
------------------------------------------------
SQLException: No suitable driver found for jdbc:mysql:///user
------------------------------------------------
MyTest completed.


Like I said at the top, this reads to be a very common problem and after hours of reading the same answers on every page and reimplementing them repeatedly, I do not see what I am missing, or know how to properly test for missing assumption.
#8
If there are any programmers left who are not using VMWare Server, or a competing virtual machine technology, this post is for you.

I started using VMWare Workstation some years ago, and then VMWare Server when it was offered for free.  Virtual Machines are among the greatest environment management tools around.

Currently I maintain several VMs, each dedicated to a development platform.
*  Visual Studio 2008 for .NET development
*  Eclipse for Java development
*  IBM DB2 Content Management

Additionally,
*  MS SQL Server
*  IIS for deployment and testing (isolated in own VM because of IIS security history)

In years past, when everything was installed on a single physical Windows install, any major problem quickly risked becoming catastrophic.  I would often have to reinstall Windows and dozens of applications to reproduce my previous programming environment.

With VMs, my host (Windows Server 2003) is barebones, containing just VMWare Server 2.0, and only a few necessities outside of VMs, like World of Warcraft, and Ventrilo.  To do any actual work, I open a Remote Desktop Connection to a VM.  If I'm going to do something risky, I take a snapshot first, which can be reverted to if the risky action proves harmful.  Snapshots are global UNDO operations for the VM.

If I have to physically reinstall the host OS, the VMs are not affected and can be very simply added to VMWare Server after it gets installed into the new host.  (There is a slight bit of network configuring to do, takes minutes though).
#9
Excess of Grok / Texas Tech vs. Mississippi?
January 02, 2009, 12:06 PM
How lame.  TT got screwed playing vastly inferior opponent for bowl game.  Tech by 25.

Oh well, FSU had to play Wisconsin, so it could've been worse.
#10
My car's head unit supports CD-TEXT for CD playback, displaying the artist and title of each song.  I have tried to create my own audio CDs using a cuesheet and cdtext, and while my CDs play back perfectly, the head unit never displays the artist and title of the tracks.  Instead, it only ever displays "CDn TRACK nn" (where n corresponds to a cd or track number).

I am using ImgBurn to create the layout, cuesheet, cdtext, and do the burn.  Previously I have manually created cuesheets and cdtext files in CDRWIN.  Both methods produce the same results as described in the first paragraph.

Any of you successfully done this?
#11
Excess of Grok / Texas Tech >>>>> Tejas
November 02, 2008, 03:19 AM
Grats on the victory!
#12
General Discussion / MP3 Player Recommendations
April 29, 2008, 10:51 PM
I'm looking to buy my first portable MP3 player.  Yup, first.  Primary feature I'd like is for the UI and database to be programmable.  Maybe Java?  I'm supposing one would write the code on a PC virtual mp3 player environment and upload it to the mp3 player to test and run.

The reason I want it programmable is how certain I will be unhappy with whatever menu, grouping, and filter system provided by the manufacturer's default software.

Is anyone using such an mp3 player and have comments?

Asking here BEFORE I go do my untargeted searches.
#13
Warcraft / Dorf Powa
February 18, 2008, 08:37 AM
Finally got my staff off Bloodboil.

#14
Warcraft / Sunwell Loot
February 11, 2008, 12:06 PM
I think we were the first guild to have a full 25 man raid in Sunwell on the PTR ... I am now shadow (bottom right of this screenshot)



A friendly GM helped us out by spawning a Flaskataur ...


Thanks for the Flasks and Mana Pots!
#15
News / Behavior Warnings
January 14, 2008, 10:20 PM
Some of you will be receiving warnings about your behavior to others on these forums.
The warnings are to be heeded.  This is a small community and I want to keep it a positive influence.

Some of the moderators asked if they could place some people on notice, and I think it's a good idea.

There's people at the keyboards of each active participant here (carefully chosen words to avoid categorizing bots as people!).  You will treat them with the respect I ask, or you'll be no longer welcome here.  I don't care if you have 925348924 posts that explain the meaning of all things, or 1 post asking "how does puters werk?", you're all expected to observe a minimum level of civility.

This warning applies to all the public boards in:
General
Bot Development Forums
Programming

Individual forums in Members section are ruled by their moderators, almost entirely, so most of the above is not written to apply to those forums.  However those moderators may have more or less expectations of their own.

Improve or be asked to leave.
#16
News / Server Downtime
January 14, 2008, 09:42 AM
Sorry for the 24-hour downtime.  Had some file corruption issue that was difficult to solve.  All good, for now.
#17
General Programming / LOLCODE
December 04, 2007, 11:20 AM
When the texting generation meets programming, ... http://lolcode.com/

This has supposedly been implemented in Microsoft DLR so that you get:

QuoteExamples
COUNT!!1:

HAI
CAN HAS STDIO?
I HAS A VAR
IM IN YR LOOP
   UP VAR!!1
   VISIBLE VAR
   IZ VAR BIGGER THAN 10? KTHXBYE
IM OUTTA YR LOOP
KTHXBYEFILEZORZ:

HAI
CAN HAS STDIO?
PLZ OPEN FILE "LOLCATS.TXT"?
   AWSUM THX
      VISIBLE FILE
   O NOES
      INVISIBLE "ERROR!"
KTHXBYE

ZOMG WTF!
#18
What are the restrictions on events?  In this sample, I am defining 3 events and calling them all one after another, but it seems only the first event fires each time.

Add Button1 and ListBox1 to a form.


Imports System
Imports System.Windows.Forms

Public Class Form1

    'class to carry the data for the raised event
    Public Class CustomEventArgs
        Inherits EventArgs
        Public id As Integer
        Public Sub New(ByVal id As Integer)
            Me.id = id
        End Sub
    End Class

    'delegate must be of the custom EventArgs class
    Public Delegate Sub CustomEventHandler(ByVal sender As Object, ByVal e As CustomEventArgs)

    'define some events
    Public Event Event1 As CustomEventHandler
    Public Event Event2 As CustomEventHandler
    Public Event Event3 As CustomEventHandler

    Public Sub ShowTheEventId(ByVal sender As Object, ByVal e As CustomEventArgs)
        ListBox1.Items.Add("event id = " + CStr(e.id))
    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        AddHandler Me.Event1, AddressOf Me.ShowTheEventId
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim ea1 As CustomEventArgs = New CustomEventArgs(1)
        RaiseEvent Event1(Me, ea1)
        Dim ea2 As CustomEventArgs = New CustomEventArgs(2)
        RaiseEvent Event2(Me, ea2)
        Dim ea3 As CustomEventArgs = New CustomEventArgs(3)
        RaiseEvent Event3(Me, ea3)
    End Sub
End Class

#19
I'm looking for the cheapest possible root-trusted certificates authority for code-signing certificates.  Acceptable customer support would be a plus but cost is my main concern, for now.

What are you guys using, if any?
#20
I am setting out to write a class library for use in a later project, and have not written any real OO code since Turbo Pascal 5.5 days.  I use VB.NET in mostly RAD-style development for Windows Forms and Windows Services, but it's mostly procedural within events.  (ala VB6 round peg in a VS2003 square hole)

I am looking to create a class hierarchy that is not inherited, because they don't share similar base class features.  Rather, it's an organizational hierarchy.  I suspect I need to implement generic collections of a type within each class to establish the hierarchy.  But you tell me.  Here's an example, using post office boxes.

A class library named PostalSystem
A collection of Nations
Each Nation contains Cities
Each City contains PostOffices
Each PostOffice contains POBoxes

Pretty simple, so I'm looking for the design pattern in VB.NET that one would use to establish this.  All would need to be serialized to MSSQL or XML, but that's a later problem.

Anyone have any design pattern books or themselves know how this is properly implemented?