Search found 113 matches

by Zabaron
Wed Sep 24, 2014 8:10 am UTC
Forum: Coding
Topic: Mouse interface for 3d environment with virtual camera
Replies: 4
Views: 3395

Re: Mouse interface for 3d environment with virtual camera

What you want the mouse to do depends entirely on your application. Games are probably the most common application for moving a camera around using the mouse, but there are almost as many camera control schemes as there are games. For example a first-person style thing you would probably want the mo...
by Zabaron
Wed Aug 20, 2014 6:39 am UTC
Forum: Coding
Topic: Poll! What is the value of this constant?
Replies: 47
Views: 14355

Re: Poll! What is the value of this constant?

I would also lean towards "pdf", but it's a horrible constant name either way. The point of a constant like that is so you could change all the uses at once, but then the constant would be named improperly. It's almost as bad as "const int FIVE = 6". Another would be to give an o...
by Zabaron
Wed Jul 30, 2014 12:05 am UTC
Forum: The Help Desk
Topic: I wanna try Linux. Again. (x4).
Replies: 52
Views: 19691

Re: I wanna try Linux. Again. (x4).

A window manager is the thing that draws title bars and the close and minimize buttons on windows. It's also responsible for resizing and positioning windows. A file manager is an application that lists the contents of directories (like windows explorer on windows).

--Zabaron
by Zabaron
Wed Apr 23, 2014 12:48 am UTC
Forum: Coding
Topic: Add column to SQLite for WP8 C# table in existing db?
Replies: 3
Views: 3105

Re: Add column to SQLite for WP8 C# table in existing db?

Is that Entity Framework? Entity Framework has a method for doing migrations. If it's a different ORM, then that probably handles migrations as well, but you'll need to check the docs for whatever framework you're using.

--Zabaron
by Zabaron
Thu Jan 16, 2014 12:32 am UTC
Forum: Coding
Topic: continuing loop until input (python)
Replies: 21
Views: 76334

Re: continuing loop until input (python)

I also just realized that this caused more than 100 python processes to open. I don't know why. That's because the child processes have to import f from your module, which runs fd(), which spawns a new child process, which imports your module, which spawns a new child, etc. You need to wrap your fd...
by Zabaron
Fri Mar 22, 2013 2:21 am UTC
Forum: The Help Desk
Topic: Two Article Limit
Replies: 6
Views: 2677

Re: Two Article Limit

Looks like it uses a cookie called CheckTwoAndOut with the value being how many articles you've accessed. Private browsing mode (on Chrome at least, probably Firefox as well) accepts cookies, and deletes them when you close the browser. That's why you can see more articles after restarting Firefox. ...
by Zabaron
Fri Mar 22, 2013 2:04 am UTC
Forum: Coding
Topic: Scripts for Websites
Replies: 4
Views: 8448

Re: Scripts for Websites

Also, XKCD has a JSON api that you can call to make this super easy. http://xkcd.com/info.0.json has info about the current comic, including publish date, title, etc. in nice, easily parseable JSON format. Just pull that page, parse the result (basically any scripting language you can think of will ...
by Zabaron
Fri Jan 25, 2013 2:13 am UTC
Forum: Coding
Topic: continuing loop until input (python)
Replies: 21
Views: 76334

Re: continuing loop until input (python)

When the program is done, it terminates. If you ran it by just double-clicking on the .py file then the console no longer has a process associated with it and it closes. If you want the console to stay open, you'll need to either run the file from a command prompt (so that when it terminates, the co...
by Zabaron
Fri Jan 11, 2013 5:46 am UTC
Forum: Coding
Topic: Grab Time of Day from Client; pull css file on result
Replies: 5
Views: 2179

Re: Grab Time of Day from Client; pull css file on result

The javascript Date type has getHours(), getMinutes(), etc. methods.

--Zabaron
by Zabaron
Sun Jan 06, 2013 12:23 am UTC
Forum: The Help Desk
Topic: data rescue help for TF101
Replies: 1
Views: 959

Re: data rescue help for TF101

The TF101 (and the rest of the Transformer line) uses a proprietary connector to connect to a PC (it's the same plug it uses to connect to the dock). In the absence of the dock (which is sold separately, and will probably cost around $100) you can use that to connect it to your PC and get whatever d...
by Zabaron
Fri Dec 07, 2012 9:20 am UTC
Forum: Coding
Topic: Dropdown box search filter code
Replies: 4
Views: 2314

Re: Dropdown box search filter code

It looks like it's using an AJAX (stands for Asynchronous Javascript And XML) call to populate that list. Basically, when you pick an item, some javascript code sends a request off to the server, and when it gets a response back it loads that response into that list. The thing that does the magic is...
by Zabaron
Tue Oct 30, 2012 1:47 am UTC
Forum: Coding
Topic: convert pseudocode to python
Replies: 23
Views: 6261

Re: convert pseudocode to python

Besides what ahammel said about using an else clause, your "for r in xrange (0,s-2):" loop is running one time too few. xrange(start, end) iterates over the range [start, end - 1], so xrange(0, s-2) is iterating over the range [0, s-3], which is one fewer time than the "for r = 1 .. s...
by Zabaron
Fri Sep 28, 2012 12:47 am UTC
Forum: Coding
Topic: [Python] of functions, variables and tuples (solved)
Replies: 3
Views: 1441

Re: [Python] of functions, variables and tuples

In your example those tuples you're passing into the functions aren't doing anything. You're just passing (15, "something; trouble isn't defined in your example") to the functions, but you never use those values. The only reason they know about number and other is because they're globals. ...
by Zabaron
Wed Sep 12, 2012 1:10 am UTC
Forum: Hardware
Topic: Recommend me a mouse and keyboard
Replies: 13
Views: 7493

Re: Recommend me a mouse and keyboard

I've had the same issue with the scroll wheel button when I first got my MX. In SetPoint (Logitech's settings app), on the second tab on the left (the one with the pointer icon), there's a checkbox to enable smooth scrolling. Turn it off. Smooth scrolling makes it scroll as the wheel turns rather th...
by Zabaron
Mon Sep 03, 2012 9:19 am UTC
Forum: Hardware
Topic: Recommend me a mouse and keyboard
Replies: 13
Views: 7493

Re: Recommend me a mouse and keyboard

When it comes to mechanical keyboards, you won't find much better than the Das Keyboard (though it has a price to match). I absolutely love mine (so much so that I bought a second one for the office), though it does lack the volume up/down keys you want. The silent model isn't all that loud (though ...
by Zabaron
Thu Aug 30, 2012 1:56 am UTC
Forum: The Help Desk
Topic: Computer won't sleep in sleep mode
Replies: 2
Views: 1224

Re: Computer won't sleep in sleep mode

It's also possible that it's set to wake on LAN for any packet. If there are other computers on your network (especially Windows computers) then there will be constantly be network management packets getting broadcast out to the whole network. To check, you can go to Control Panel -> Network and Sha...
by Zabaron
Wed Jul 18, 2012 7:17 am UTC
Forum: Coding
Topic: C program doesnt exit correctly
Replies: 3
Views: 1603

Re: C program doesnt exit correctly

You're accessing memory that you don't own. When you do p++ you're changing the location in memory that p points to, but you never allocated that memory to your program. What's probably happening is that you're overwriting the return address of your binary() function, so the program craps out when i...
by Zabaron
Sun Apr 08, 2012 6:58 pm UTC
Forum: The Help Desk
Topic: A website
Replies: 3
Views: 2252

Re: A website

I use NearlyFreeSpeech, and it gives you everything you're looking for. I use it with Google Apps (which is free for the basic version) for many of the same reasons you list. They also give you cheap pay-per-use web hosting, which is nice if you have a small, low traffic site.

--Zabaron
by Zabaron
Thu Mar 15, 2012 3:19 am UTC
Forum: Coding
Topic: Visual Studio Find and Replace Macro
Replies: 8
Views: 2793

Re: Visual Studio Find and Replace Macro

Erm, this seems like a job for inheritance. Just have public class FooBase { public string ToString() { return "I am overriding ToString!" } } public class Foo : FooBase { //Foo specific functionality. } public class Bar : FooBase { //Bar specific functionality. } In general, if you have a...
by Zabaron
Sun Nov 13, 2011 7:39 am UTC
Forum: Coding
Topic: Database structure problem with tags, categories
Replies: 19
Views: 4651

Re: Database structure problem with tags, categories

Each tag should be a separate row. That way if you want to get all of the pictures tagged with 'funny', you can just use the query "SELECT media_id FROM tags WHERE tag = 'funny';". If you were to try to put all the tags for a given item in the same row, that query would be way uglier. --Za...
by Zabaron
Mon Oct 31, 2011 4:01 am UTC
Forum: Coding
Topic: Help with java decision structure program
Replies: 4
Views: 1328

Re: Help with java decision structure program

Just a couple pointers: ⋅ getIncome is declared to return double, but doesn't ⋅ getIncome is a terrible name for a method that gets taxes ⋅ check how you calculate taxes, it's not doing what the assignment specifies ⋅ your residency method is totally jacked up...
by Zabaron
Fri Oct 21, 2011 2:53 am UTC
Forum: The Help Desk
Topic: speaker wire to tulip plug
Replies: 4
Views: 3034

Re: speaker wire to tulip plug

It looks like your receiver only has 2 channel output anyway (the A and B sets both get the same output), so adding a subwoofer probably wouldn't work very well anyway (I'm curious what you currently have attached to your A left channel, since there's nothing in the corresponding right channel). Mos...
by Zabaron
Sun Jul 24, 2011 5:14 pm UTC
Forum: The Help Desk
Topic: Opening textfiles in Python 3.2
Replies: 5
Views: 6572

Re: Opening textfiles in Python 3.2

If the code was written for Python 2, then you should use Python 2. Python 3 made a lot of library changes that are not backwards-compatible with Python 2. There is a tool included with Python 3 (2to3 I believe it's called), that will try to translate the Python 2 library calls to Python 3 ones, but...
by Zabaron
Tue Jul 19, 2011 11:25 pm UTC
Forum: The Help Desk
Topic: Faster Boot times
Replies: 7
Views: 1775

Re: Faster Boot times

The thing that usually takes the longest when you do a cold boot starting up background processes. I currently have 90 processes running, but I'm only actively using about 8 of them. When the computer started it had to initialize the other 82. That's why the computer takes so much less time to start...
by Zabaron
Sun May 15, 2011 10:53 pm UTC
Forum: The Help Desk
Topic: Ad-Hoc Ethernet?
Replies: 4
Views: 1200

Re: Ad-Hoc Ethernet?

There's nothing really special to do here. Just use a crossover cable to plug the two computers together. You'll probably need to set up static IP addresses on both computers unless you have a DHCP server running on one of them.

-Zabaron
by Zabaron
Sat Apr 23, 2011 9:42 pm UTC
Forum: The Help Desk
Topic: I can't get Civilization 5 to work
Replies: 4
Views: 4686

Re: I can't get Civilization 5 to work

Try deleting it an re-downloading it from Steam. Just right-click Civ V and click "Delete Local Content...". You'll have to re-download it before you can play it, but if there are any bad files in your installation then that should fix it.

-Zabaron
by Zabaron
Thu Mar 17, 2011 11:18 pm UTC
Forum: Coding
Topic: Quick C++ Question about Structures, brackets and Negation
Replies: 12
Views: 2110

Re: Quick C++ Question about Structures, brackets and Negati

C++ operator precedence

Thus !foo->bar == !(foo->bar).

-Zabaron
by Zabaron
Mon Jan 17, 2011 10:47 pm UTC
Forum: Coding
Topic: How do i clear the input buffer in C?
Replies: 4
Views: 3071

Re: How do i clear the input buffer in C?

Clearing the input buffer isn't what will make your code work. Adding your int empty to your scanf will not help. As it stands, scanf is reading all of the input, including the 'y'/'n' in its futile attempt to find an int in the user's input. Since scanf can't find what it's looking for, your progra...
by Zabaron
Tue Nov 09, 2010 4:10 am UTC
Forum: The Help Desk
Topic: javac and source files issue
Replies: 1
Views: 910

Re: javac and source files issue

You shouldn't have to do any of that. javac will recursively compile any dependencies if needed, so as long as you have your packages set up correctly (Singleton is in the tools package, and BookAction is in the book package), then a single call to "javac book\BookAction.java" should compi...
by Zabaron
Wed Nov 03, 2010 5:33 am UTC
Forum: Coding
Topic: Problems of passing objects (fstream) by reference
Replies: 16
Views: 2166

Re: Problems of passing objects (fstream) by reference

The first time you sort, you're reading the whole file. Then the second time you sort you pass the same ifstream to vectorStuff(). Since it's the same ifstream, it's still at the end of the file and when vectorStuff() tries to build a new vector out of it it has nothing left to read. Your best optio...
by Zabaron
Sun Oct 31, 2010 9:22 am UTC
Forum: Coding
Topic: Linked Lists
Replies: 11
Views: 2264

Re: Linked Lists

In his example, "node_t" is just another name for "struct node". Thus "node_t* root" is exactly the same as "struct node* root". The * to declare a pointer can go anywhere between the type and the name, so "node_t* root", "node_t * root", a...
by Zabaron
Mon Oct 11, 2010 8:28 pm UTC
Forum: Coding
Topic: universal function for pawns.
Replies: 52
Views: 5706

Re: universal function for pawns.

and i get this compile error: error: ‘class Piece’ has no member named ‘move’ That's because the Piece class doesn't have a move() function. What you want here is to make an empty move() function in your Piece class, and to override it in the subclasses. This behavior can be achieved with the 'virt...
by Zabaron
Wed Oct 06, 2010 5:56 pm UTC
Forum: The Help Desk
Topic: How should I set up my home network with a server?
Replies: 13
Views: 1198

Re: How should I set up my home network with a server?

I'm not really sure what you're trying to accomplish here. It seems like you're trying to force all traffic in and out of your network to pass through a single computer; why, your router already serves this purpose. You mentioned it would be running apache, but that's just a webserver. If you just w...
by Zabaron
Mon Aug 30, 2010 8:34 pm UTC
Forum: Coding
Topic: C++ Program Compiles, Runs, then crashes. Help?!
Replies: 13
Views: 2185

Re: C++ Program Compiles, Runs, then crashes. Help?!

Entity doesn't have a default constructor, which Actor is (implicitly) trying to call as part of its constructor. Rather than duplicating code in Actor's constructor, you should write it like this Actor::Actor ( int stats[10], string name, int targetNum) : Entity(stats, name, targetNum) { //Any extr...
by Zabaron
Mon May 17, 2010 3:37 pm UTC
Forum: Coding
Topic: Connecting to a USB device
Replies: 10
Views: 1632

Re: Connecting to a USB device

Is this going to be running on Windows? If so, Microsoft provides the Windows Driver Kit, which includes an API for working with HID compliant devices . I've never used it, and have no Idea how to use it, but there's the documentation. If you want to use it with C#, you'll need to learn about P/Invo...
by Zabaron
Thu May 06, 2010 3:18 am UTC
Forum: Hardware
Topic: Want a new tower. What mainboard?
Replies: 8
Views: 1541

Re: Want a new tower. What mainboard?

The extra 40$ on that last motherboard seems to be for integrated graphics (the other two boards don't have an integrated GPU), which you will have no need for since you're getting a discreet GPU.

-Zabaron
by Zabaron
Thu May 06, 2010 2:32 am UTC
Forum: The Help Desk
Topic: PC 4.0 Surround Sound
Replies: 3
Views: 1312

Re: PC 4.0 Surround Sound

What type of sound device do you have? It's very likely that your two ports aren't supposed to be left and right, but rather front and rear (I've never seen a sound device that has them set up as left and right). That's why you're getting sound only out of the right side (which is actually the front...
by Zabaron
Wed Apr 14, 2010 6:27 pm UTC
Forum: Coding
Topic: C++ help reading from txt files
Replies: 17
Views: 2777

Re: C++ help reading from txt files

Code: Select all

cur = table[i].getNext();

I imagine that's your problem line. You're never checking if that returns NULL.

-Zabaron
by Zabaron
Mon Apr 12, 2010 11:37 pm UTC
Forum: Coding
Topic: can't enter text in TextCtrl, wxPython on Windows
Replies: 8
Views: 2345

Re: can't enter text in TextCtrl, wxPython on Windows

The first thing that jumps out at me is that you're disabling area_name_text_ctrl, but you're enabling area_name_label, but I've never used wxPython, so I may be way off.

-Zabaron
by Zabaron
Wed Apr 07, 2010 6:16 pm UTC
Forum: Coding
Topic: Templates and You
Replies: 10
Views: 1183

Re: Templates and You

Yes, the ^ and gcnew operators tell me you're writing C++ CLR, rather than native-compiled code.

-Zabaron

Go to advanced search