Search found 3244 matches

by '; DROP DATABASE;--
Thu Mar 24, 2011 12:24 am UTC
Forum: Coding
Topic: Proper way to idle in Linux?
Replies: 7
Views: 1185

Re: Proper way to idle in Linux?

Well, I can't make a blocking call unless it's able to return when any of several sockets with potentially non-contiguous FDs have data available. Changing the whole system to use a library just to idle seems overkill.
by '; DROP DATABASE;--
Wed Mar 23, 2011 5:11 pm UTC
Forum: Coding
Topic: Coding Idea From An xkcd Comic
Replies: 9
Views: 2174

Re: Coding Idea From An xkcd Comic

Just include getRandomNumber() in your code somewhere. :P
by '; DROP DATABASE;--
Wed Mar 23, 2011 5:08 pm UTC
Forum: Coding
Topic: Proper way to idle in Linux?
Replies: 7
Views: 1185

Proper way to idle in Linux?

I'm writing a program which reads data from a socket and reacts to it. The main loop is basically: while(!shutdown) { for(i = 0; i < num_sockets; i++) { data = read_line(socket[i]); //returns null if no data available if(data) process_line(data); } idle(); //so as not to consume all CPU time } What ...
by '; DROP DATABASE;--
Tue Nov 23, 2010 11:12 pm UTC
Forum: Coding
Topic: SQL: Select files having tags
Replies: 5
Views: 1102

Re: SQL: Select files having tags

Thanks, it looks like EXISTS was what I needed. :) You have a problem in that your data can be in an inconsistent state (where a given value is associated with multiple names, or name with multiple values) without you really noticing. These cases are both valid. Consider a photo of the city of Edmon...
by '; DROP DATABASE;--
Tue Nov 23, 2010 12:08 pm UTC
Forum: Coding
Topic: SQL: Select files having tags
Replies: 5
Views: 1102

SQL: Select files having tags

I have a database with a Files table: +---------+---------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +---------+---------------------+------+-----+---------+----------------+ | ID | bigint(20) unsigned | NO | PRI | NULL | auto_increment | .....
by '; DROP DATABASE;--
Tue Nov 09, 2010 6:24 am UTC
Forum: General
Topic: Does anyone else feel "violated" when someone uses their...
Replies: 64
Views: 7164

Re: Does anyone else feel "violated" when someone uses their

Have a pair of headphones connected to a TTY; each character printed plays a different tone, and you hear the terminal. If you used dual tones (like phones do for dialling) you'd only need 16 different frequencies. Even a different sound for each ear... Actually with some work and training that seem...
by '; DROP DATABASE;--
Tue Nov 09, 2010 6:14 am UTC
Forum: General
Topic: Black Hat or Script Kiddie?
Replies: 12
Views: 3717

Re: Black Hat or Script Kiddie?

It's about what you do with these scripts: A script kiddie just downloads them and runs them without knowing anything about how they work, and pretends to be hot shit. They might also "write" scripts by just copying and pasting from other scripts. A newbie studies them and figures out how ...
by '; DROP DATABASE;--
Tue Nov 09, 2010 12:42 am UTC
Forum: Hardware
Topic: Normally-open thermostat control
Replies: 4
Views: 3539

Re: Normally-open thermostat control

Right, I wired it to the cooler control instead and it seems to be working that way. I am however interested in the idea of someday replacing it with a microcontroller, so I'm still curious about how it'd work. If my multimeter is to be believed, the two wires carry a voltage of around 9VAC, which s...
by '; DROP DATABASE;--
Mon Nov 08, 2010 2:59 am UTC
Forum: Hardware
Topic: Normally-open thermostat control
Replies: 4
Views: 3539

Normally-open thermostat control

Recently I've been noticing the heat in my apartment not working very well. I got a repairman to come look at it and he explained that the thermostat was bad, and the system uses hot water with a normally-open valve whereas most use normally-closed. It has two wires (white and black, but installed b...
by '; DROP DATABASE;--
Mon Nov 08, 2010 2:40 am UTC
Forum: Hardware
Topic: Why do keyboards still have a Scroll Lock button?
Replies: 55
Views: 8928

Re: Why do keyboards still have a Scroll Lock button?

On a related note, of what use is a big-ass 'POWER' button doing hanging up there where you just know you're going to mash it in the middle of editing a document and trying to navigate in it and your system abruptly shuts itself off without saving the document you spent several hours editing? I alw...
by '; DROP DATABASE;--
Tue Oct 19, 2010 11:21 pm UTC
Forum: General
Topic: Blistering blue barnacles
Replies: 28316
Views: 2657156

Re: Rant Thread (to balance Awesome Thread)

Oh my god my school's IT staff and Google's UI team are both a bunch of boobs. Last year I found my PSP couldn't connect to the school's wifi. This is because they have a "Cisco Clean Access" system, which is utter garbage, that requires you to go through an authentication page the first t...
by '; DROP DATABASE;--
Tue Oct 19, 2010 11:00 pm UTC
Forum: Computer Science
Topic: Holographic video compression.
Replies: 13
Views: 2077

Re: Holographic video compression.

They already do that in two ways: 1) Product placements. These range from tolerable to ridiculous. 2) Some TV stations do indeed place ads over the video. This was a major part of why I stopped watching TV. Anyway, if you invent a video format that makes it impossible for me to delete parts of the s...
by '; DROP DATABASE;--
Sun Oct 17, 2010 4:07 am UTC
Forum: General
Topic: Does anyone else feel "violated" when someone uses their...
Replies: 64
Views: 7164

Re: Does anyone else feel "violated" when someone uses their

The solution is to twerk and mod the hell out of everything (and ideally run Linux) so that someone wanting to use your computer will have no damn idea how. :lol: (Hardcore version: do everything in text mode. Tell them "sure, just turn on the monitor" and leave the room.)
by '; DROP DATABASE;--
Mon Oct 11, 2010 11:25 pm UTC
Forum: Coding
Topic: Plain HTML rendering widget?
Replies: 14
Views: 1420

Re: Plain HTML rendering widget?

You could just use plain labels for that, with something connected to the "clicked" event. But can they be inline? What I was asking really is if something like Gecko or Webkit can be used as a borderless, control-less widget within an application, preferably with a transparent background...
by '; DROP DATABASE;--
Mon Oct 11, 2010 6:53 pm UTC
Forum: Coding
Topic: Plain HTML rendering widget?
Replies: 14
Views: 1420

Re: Plain HTML rendering widget?

Can the links be made to trigger some function in my program instead of point to a URL, though?

(and yeah I intend to make real apps, not charge money for other peoples' work >.>)
by '; DROP DATABASE;--
Mon Oct 11, 2010 4:54 pm UTC
Forum: Coding
Topic: Plain HTML rendering widget?
Replies: 14
Views: 1420

Re: Plain HTML rendering widget?

Yes, GtkExpander is the functionality I want, but I don't think I'd be able to get the look I want. I don't think Pango does shadows or hyperlinks, either?
by '; DROP DATABASE;--
Mon Oct 11, 2010 9:50 am UTC
Forum: Coding
Topic: Plain HTML rendering widget?
Replies: 14
Views: 1420

Re: Plain HTML rendering widget?

Well, it'd be a bit of a bother to have to learn another whole GUI toolkit just for a widget... GTK's pretty nice. I seem to remember trying Qt once and finding it very complicated. May I ask what kind of appearance properties you were thinking of, that would be hard in most GUI toolkits but easy in...
by '; DROP DATABASE;--
Fri Oct 08, 2010 11:00 pm UTC
Forum: Coding
Topic: Plain HTML rendering widget?
Replies: 14
Views: 1420

Plain HTML rendering widget?

Lately I've been having ideas for unusual user interfaces and realizing they'd be quite difficult to implement in any desktop GUI toolkit I know of (mostly appearance-wise), but simple to do in HTML. It'd be really neat if I could just write my UI in HTML, using CSS and Javascript (or even better Lu...
by '; DROP DATABASE;--
Tue Oct 05, 2010 12:10 am UTC
Forum: The Help Desk
Topic: Thinking of buying a phone
Replies: 0
Views: 671

Thinking of buying a phone

I'm thinking of buying a Motorola Milestone (AKA Motorola Droid) on a 3-year "student" contract from Telus. It seems to be the best deal available here. (1GB data vs 500MB everywhere else, free voicemail, unlimited messaging.) Any thoughts or suggestions? It'll be replacing a very basic ph...
by '; DROP DATABASE;--
Thu Sep 30, 2010 9:46 pm UTC
Forum: The Help Desk
Topic: Why can I crash my OS so easily?
Replies: 13
Views: 1164

Re: Why can I crash my OS so easily?

I have the latest version installed, but the video drivers I'm using aren't compatible. I have been meaning some weekend to try switching to the open-source drivers now that they mostly work. Getting the proprietary ones to work at all is a huge pain, let alone getting them to work with a new kernel...
by '; DROP DATABASE;--
Thu Sep 30, 2010 3:57 am UTC
Forum: Coding
Topic: The "IT DOESN'T WORK!" thread
Replies: 1958
Views: 486939

Re: The "IT DOESN'T WORK!" thread

This seems very strange: const char *Host = "irc.esper.net"; unsigned int Port = 6667; int Socket; SOCKADDR_IN SA; Socket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); unsigned int Address = inet_addr(Host); SA.sin_family = AF_INET; SA.sin_port = htons(Port); SA.sin_addr.s_addr = Address; f...
by '; DROP DATABASE;--
Thu Sep 30, 2010 3:51 am UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9775
Views: 1610757

Re: Coding: Fleeting Thoughts

given a specific computer, could a program be written which would destroy that computer? FT: Just how many different parts of an average computer can you design a program to physically burn (or for bonus points, light on fire or make explode)? I only know how to do this to the RAM. Some early compu...
by '; DROP DATABASE;--
Thu Sep 30, 2010 3:18 am UTC
Forum: Coding
Topic: C++ Problem with cin>> buffer (i think it's the buffer...)
Replies: 14
Views: 2212

Re: C++ Problem with cin>> buffer (i think it's the buffer..

Mhm, you definitely should use const or #define for arbitrary numbers and settings like that. [...] As we're dealing with C++ here, a global const declaration would be the right way to go, not a #define. Mhm, but doesn't C++ not actually allow this sort of thing? const int size = 5; int things[size...
by '; DROP DATABASE;--
Wed Sep 29, 2010 10:17 pm UTC
Forum: The Help Desk
Topic: Why can I crash my OS so easily?
Replies: 13
Views: 1164

Re: Why can I crash my OS so easily?

Mhm, you make some very good points, and I can see how it'd be fairly simple to take down a significant portion of the system by some design flaw or limitation of what this old machine can provide. To me, it's more just a question of why it's so easily that I frequently do it by accident, and why th...
by '; DROP DATABASE;--
Wed Sep 29, 2010 5:45 am UTC
Forum: The Help Desk
Topic: Why can I crash my OS so easily?
Replies: 13
Views: 1164

Re: Why can I crash my OS so easily?

Mhm, I can have as little as 10% swap usage (and I have twice as much swap as RAM), but running out of RAM will still just grind everything to a halt. I suppose I should twerk it to use swap more aggressively, but that seems like more of a bandaid solution. I can do heavy disk access fine at times, ...
by '; DROP DATABASE;--
Tue Sep 28, 2010 10:14 am UTC
Forum: Hardware
Topic: Headphone wires that will not break.
Replies: 33
Views: 42294

Re: Headphone wires that will not break.

I switched to a Bluetooth set for this exact reason. Arguably the improvement is negligible (Bluetooth is so damned unreliable that it cuts out as bad as a broken headphone cable at times), but you don't have to replace it every few months just because of the cable. They'd always break at the very e...
by '; DROP DATABASE;--
Tue Sep 28, 2010 9:58 am UTC
Forum: Hardware
Topic: Why do keyboards still have a Scroll Lock button?
Replies: 55
Views: 8928

Re: Why do keyboards still have a Scroll Lock button?

What I wonder is why Num/Caps/Scroll Lock are global, rather than per-application settings? I'd like to change that useless menu key into an AltGr, but haven't found how. I can change right Alt into one, but I like having an actual Alt there. The Windows key is (amusingly) quite useful for me in Lin...
by '; DROP DATABASE;--
Tue Sep 28, 2010 9:41 am UTC
Forum: Coding
Topic: particle movement simulator
Replies: 18
Views: 2229

Re: particle movement simulator

im writing a program to simulate the movement of a molecule. in my molecule class (BTW it's in c++) has member functions to randomly decide if it will go left right up or down. the problem is it always goes left+down and right+up. bool directionUp() //1 indicates up, 0 indicates down. { srand((unsi...
by '; DROP DATABASE;--
Tue Sep 28, 2010 9:32 am UTC
Forum: Coding
Topic: C++ Problem with cin>> buffer (i think it's the buffer...)
Replies: 14
Views: 2212

Re: C++ Problem with cin>> buffer (i think it's the buffer..

Mhm, you definitely should use const or #define for arbitrary numbers and settings like that. As for the actual problem, it seems like you're asking for one character but letting them enter an entire line. Not only is it not what you want, but it'd get a bit annoying having to press enter after ever...
by '; DROP DATABASE;--
Tue Sep 28, 2010 9:24 am UTC
Forum: The Help Desk
Topic: Why can I crash my OS so easily?
Replies: 13
Views: 1164

Why can I crash my OS so easily?

This is kind of a combination of a question and a rant, but I'll try to keep it short. The idea of kernelspace vs userspace is that something running in userspace can't interfere with things in kernelspace, yes? A process in userspace can take up all the resources it wants, and the kernel will still...
by '; DROP DATABASE;--
Fri Sep 17, 2010 5:36 am UTC
Forum: Computer Science
Topic: Strange local network transmission
Replies: 8
Views: 2228

Re: Strange local network transmission

I just tried nmap and it doesn't appear to send anything. Just establish a connection and close it again.

The connection comes from the external IP, and netstat shows the router's hostname, though I figure it may just be coming from another machine behind it.
by '; DROP DATABASE;--
Thu Sep 16, 2010 4:03 am UTC
Forum: Computer Science
Topic: Strange local network transmission
Replies: 8
Views: 2228

Re: Strange local network transmission

I'm not running AVG or even Windows, and it does appear to vary, but I didn't closely inspect it. I can try to strip out the replacement characters, but are they just the EF BF BD? I heard a 6-byte sequence somewhere too, which occurs frequently, and I think includes those three.
by '; DROP DATABASE;--
Wed Sep 15, 2010 5:57 pm UTC
Forum: Computer Science
Topic: Strange local network transmission
Replies: 8
Views: 2228

Re: Strange local network transmission

I would guess so, but what kind of encryption uses the Unicode replacement character so many times? I suppose it could be some type of worm trying to communicate, sending some magic string that looks meaningless, rather than trying to actually infect the system.
by '; DROP DATABASE;--
Mon Sep 13, 2010 1:19 pm UTC
Forum: The Help Desk
Topic: Installing encrypted Damn Small Linux on USB stick
Replies: 5
Views: 1219

Re: Installing encrypted Damn Small Linux on USB stick

Yes. /boot is on an unencrypted partition and contains just enough to prompt for the password to decrypt the main partition and start loading the OS from it. Without the password it's essentially unreadable noise. I use this in Ubuntu on my desktop. If someone managed to sneak the stick out of my wa...
by '; DROP DATABASE;--
Mon Sep 13, 2010 3:47 am UTC
Forum: The Help Desk
Topic: Installing encrypted Damn Small Linux on USB stick
Replies: 5
Views: 1219

Re: Installing encrypted Damn Small Linux on USB stick

I want there to be no way to access anything on that partition without the password, even if bypassing the OS, like full-disk encryption does. I created a smaller partition that can hold /boot and any unencrypted files.
by '; DROP DATABASE;--
Mon Sep 13, 2010 1:05 am UTC
Forum: The Help Desk
Topic: Installing encrypted Damn Small Linux on USB stick
Replies: 5
Views: 1219

Installing encrypted Damn Small Linux on USB stick

I've found some tutorials for how to install DSL to a bootable USB stick from within another Linux system, but none that mention encryption. I want the whole system inside an encrypted container, prompting for password at bootup like some other distros can do. How would I achieve this?
by '; DROP DATABASE;--
Sun Sep 12, 2010 3:00 am UTC
Forum: Computer Science
Topic: Strange local network transmission
Replies: 8
Views: 2228

Strange local network transmission

I'm sharing *cough* a network with my neighbour, and I have a small script listening on port 55555. Recently I've noticed that at times, the script receives a garbage-looking transmission every two hours. At first glance it looks like it could be some kind of exploit shellcode, but looking closer at...
by '; DROP DATABASE;--
Sun Sep 12, 2010 2:52 am UTC
Forum: Computer Science
Topic: Hacking the CIA?
Replies: 55
Views: 34664

Re: Hacking the CIA?

at my school [...] claimed to be able to hack into the CIA. Enough said. If he were that skilled while still in school, he wouldn't still be in school, and he definitely wouldn't be bragging about it. He's probably the type who copies a script from the Internet, runs it, and brags about his 1337 5k...
by '; DROP DATABASE;--
Mon Sep 06, 2010 5:52 pm UTC
Forum: Coding
Topic: Lua: Detect intersection between 2D rotated lines/rectangles
Replies: 10
Views: 3675

Re: Lua: Detect intersection between 2D rotated lines/rectan

Ah, I see what you did there. Thanks, it works perfectly now (except I had to convert theta to radians). I'm still not totally clear how it works, but I'm taking linear algebra this semester so hopefully that will help me understand it better.
by '; DROP DATABASE;--
Sun Sep 05, 2010 9:10 pm UTC
Forum: Coding
Topic: Lua: Detect intersection between 2D rotated lines/rectangles
Replies: 10
Views: 3675

Re: Lua: Detect intersection between 2D rotated lines/rectan

Mhm, I've translated that code directly to Lua (only renaming some things) and it too gives false positives. This is considered an intersection: Screenshot-OpenGL Window.png (red=A/R1, vertical, rotated 20°; yellow=B/R2, horizontal, rotated 30°) I don't have time at the moment to investigate it but ...

Go to advanced search