|
Say Something... |
AMCerasoli
Member #11,955
May 2010
|
Yhea... Where's everybody? I'm bored and the forum is dead...
|
Arthur Kalliokoski
Second in Command
February 2005
|
get back to work, jetson! They all watch too much MSNBC... they get ideas. |
Thomas Fjellstrom
Member #476
June 2000
|
It's the middle of a work day here. They don't pay me to chat on the internet But since I'm taking a break, I can spend a couple moments to spam random forums! -- |
AMCerasoli
Member #11,955
May 2010
|
hahahaha 9:30 here... I want to see something new and funny on allegro.cc and what do I find? nothing... NOTHING! C'mon.
|
Dennis
Member #1,090
July 2003
|
If you are bored, play WoW. Yes, it is boring as well but occasionally some other player runs through your view, ignoring you on their quest to collect/kill/bring n of x from a to b, which makes it feel like you are part of an active world. --- 0xDB | @dennisbusch_de --- |
Thomas Fjellstrom
Member #476
June 2000
|
On some down time I've been messing with my LuaGlue project, along with my minecraft tools (I'll eventually get it all released...). I started writing a perl script to process C and C++ files, including doing manual preprocessing... It didn't turn out so well, and SiegeLord reminded me of clang, and the fact that libclang exists, so I'll probably use that instead. Eventually LuaGlue will come with a little tool called "Hoof" (geddit?) that will automatically generate bindings using clang, and maybe some templates... Haven't fully planned it out. There's a chance that it may use lua itself to customize binding generation It helps that I've wanted to play with llvm and clang for a while, and this is a very good excuse to become familiar with it. -- |
Bruce Perry
Member #270
April 2000
|
-- |
SonShadowCat
Member #1,548
September 2001
|
I just left the office and am about to spend the evening/night with my lady. So its a good day. |
Fishcake
Member #8,704
June 2007
|
It's morning, and I'm working right now. I regularly visit Allegro.cc while waiting for my program to compile, though I don't have much to say, so I just read some threads in the off-topic section and move on.
|
Edgar Reynaldo
Major Reynaldo
May 2007
|
I stop by several times a day, but there was nothing interesting going on. Must be some kind of negative feedback loop. :/ Right now, I am working on a Java program that inserts data into a database and reads it back into a JTable. Anybody know how to auto increment part of a composite primary key based on the other unique components of the key? I have a 3 part composite key composed of a student name , a course name, and an attempt number. (It's a made up Exam table). I need to auto increment the attempt number based on the unique set of student name and course name. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Karadoc ~~
Member #2,749
September 2002
|
I don't have much to say, because I haven't been doing any programming recently. I bought a Surface Pro 2 yesterday. I'm still learning how to drive it, with the touch screen, and the digipen thing, and the new OS - but I'm pretty happy so far. I didn't realise that the computer can detect the presence and position of the digitiser pen without it touching the screen. I'm pretty impressed by that. (It means you can point at the screen with the pen to get "mouse-over" text and stuff like that without touching the computer.) ----------- |
Kris Asick
Member #1,424
July 2001
|
"Something" ... ...what? --- Kris Asick (Gemini) |
l j
Member #10,584
January 2009
|
Something. a b c d e f g h i j k l m n o p q r s t u v w x y z.
|
AMCerasoli
Member #11,955
May 2010
|
Dennis said: If you are bored, play WoW. I don't know, never liked that game. I have never played it, though. I have been playing the alpha of RimWorld, really like it. Edgar Reynaldo said: Anybody know how to auto increment part of a composite primary key based on the other unique components of the key? Why do you use composite primary keys? I always try to avoid them.
|
GullRaDriel
Member #3,861
September 2003
|
Something ? I practice trumpet everyday !
"Code is like shit - it only smells if it is not yours" |
Dizzy Egg
Member #10,824
March 2009
|
Is the search for God meaningless if we all die alone?
---------------------------------------------------- |
Gideon Weems
Member #3,925
October 2003
|
It's good to confirm every once in a while that one doesn't have epilepsy. ... Also, I'd almost forgotten about those ads. |
Slartibartfast
Member #8,789
June 2007
|
If you have time to play WoW, you should play Dominions 4. ---- |
bamccaig
Member #7,536
July 2006
|
Edgar Reynaldo said: Anybody know how to auto increment part of a composite primary key based on the other unique components of the key? I have a 3 part composite key composed of a student name , a course name, and an attempt number. (It's a made up Exam table). I need to auto increment the attempt number based on the unique set of student name and course name. This just sounds like a poorly designed data model. There should be a student table for student information (including their names), a course table for course information (including their names), and perhaps an intersection between them that would effectively capture your "attempts" in a dynamic way (i.e., count the number of records grouped by student and course). You may want a table to hold course information distinctly and a separate table to associate courses with specific "runs" (e.g., "Computer Programming 101" beginning September 4th, 2014 and ending January 31st, 2015 taught by Mr. Hackz Leetsauce in room M2051). Grouping and counting might not be ideal for the "attempts" (if that even practically matters), but you could always cache the answer in an intersection table between student and course. In any case, it seems to me that you could use more tables. I am inclined to agree with AMCerasoli that having a "composite" key in this case probably isn't very useful either. You could always add a unique index if you wanted to enforce uniqueness amongst those fields, but having a single integer primary key is otherwise useful to reference specific records without having to carry around several pieces of information in code. Just because those fields make the record unique doesn't necessarily mean that they should compose the primary key (it doesn't mean that they shouldn't either, but at least in my example above your key would consist of several integer keys instead of strings). That's not how you database. -- acc.js | al4anim - Allegro 4 Animation library | Allegro 5 VS/NuGet Guide | Allegro.cc Mockup | Allegro.cc <code> Tag | Allegro 4 Timer Example (w/ Semaphores) | Allegro 5 "Winpkg" (MSVC readme) | Bambot | Blog | C++ STL Container Flowchart | Castopulence Software | Check Return Values | Derail? | Is This A Discussion? Flow Chart | Filesystem Hierarchy Standard | Clean Code Talks - Global State and Singletons | How To Use Header Files | GNU/Linux (Debian, Fedora, Gentoo) | rot (rot13, rot47, rotN) | Streaming |
Edgar Reynaldo
Major Reynaldo
May 2007
|
bamccaig said: That's not how you database. Pull the corncob out of your butt bc. It's a contrived database just so we can work with JDBC and database connections. I know its not normalized and I know it's not a good design. It was just a made up example of an Exam table for a lab in Java II. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
bamccaig
Member #7,536
July 2006
|
A corncob, you say. Intriguing. It was a poorly made up Exam table for a lab in Java II. This sounds a bit like homework. I still think that my previous post contains the best answer you'll get, however subtle it may be. -- acc.js | al4anim - Allegro 4 Animation library | Allegro 5 VS/NuGet Guide | Allegro.cc Mockup | Allegro.cc <code> Tag | Allegro 4 Timer Example (w/ Semaphores) | Allegro 5 "Winpkg" (MSVC readme) | Bambot | Blog | C++ STL Container Flowchart | Castopulence Software | Check Return Values | Derail? | Is This A Discussion? Flow Chart | Filesystem Hierarchy Standard | Clean Code Talks - Global State and Singletons | How To Use Header Files | GNU/Linux (Debian, Fedora, Gentoo) | rot (rot13, rot47, rotN) | Streaming |
Edgar Reynaldo
Major Reynaldo
May 2007
|
Yes please, let's split up a totally made up database table into 3 tables so I have to join them together to get my results. :/ The teacher was satisfied that I met the requirements for the lab, so that's really all there is to say. It wasn't about proper database design, but about using JDBC to retrieve and set data in a database. :/ Edit - I already came up with a solution that works. I made the composite key hold only the student and course name, and then SELECT'ed unique combinations and counted the number of occurences so I could get the proper attempt number into the database. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
bamccaig
Member #7,536
July 2006
|
{"name":"h14E2A55A","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/f\/6\/f69804312463aa134dfe22aa33a2c888.jpg","w":500,"h":375,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/f\/6\/f69804312463aa134dfe22aa33a2c888"} -- acc.js | al4anim - Allegro 4 Animation library | Allegro 5 VS/NuGet Guide | Allegro.cc Mockup | Allegro.cc <code> Tag | Allegro 4 Timer Example (w/ Semaphores) | Allegro 5 "Winpkg" (MSVC readme) | Bambot | Blog | C++ STL Container Flowchart | Castopulence Software | Check Return Values | Derail? | Is This A Discussion? Flow Chart | Filesystem Hierarchy Standard | Clean Code Talks - Global State and Singletons | How To Use Header Files | GNU/Linux (Debian, Fedora, Gentoo) | rot (rot13, rot47, rotN) | Streaming |
William Labbett
Member #4,486
March 2004
|
something np
|
Derezo
Member #1,666
April 2001
|
Turned 29 on Wednesday. Today is last day of class. Start again on May 5th, teaching the same material, but have more hours next semester. "He who controls the stuffing controls the Universe" |
|
|