Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 159 160 [161] 162 163 ... 796

Author Topic: if self.isCoder(): post() #Programming Thread  (Read 903079 times)

kaenneth

  • Bay Watcher
  • Catching fish
    • View Profile
    • Terrible Web Site
Re: if self.isCoder(): post() #Programming Thread
« Reply #2400 on: May 09, 2012, 01:23:29 pm »

A header file that #defines a string you use as a variable name?
Logged
Quote from: Karnewarrior
Jeeze. Any time I want to be sigged I may as well just post in this thread.
Quote from: Darvi
That is an application of trigonometry that never occurred to me.
Quote from: PTTG??
I'm getting cake.
Don't tell anyone that you can see their shadows. If they hear you telling anyone, if you let them know that you know of them, they will get you.

dizzyelk

  • Bay Watcher
  • Likes kittens for their delicious roasts.
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #2401 on: May 09, 2012, 03:36:47 pm »

I'm using MS Visual C++ 2010 Express.
Logged
Dwarf Fortress - Bringing out the evil in people since 2006.
Somehow, that fills me more with dread than anticipation.  It's like being told that someone's exhuming your favorite grandparent and they're going to try to make her into a cyborg stripper.

Yannanth

  • Guest
.
« Reply #2402 on: May 15, 2012, 06:06:57 am »

.
« Last Edit: November 21, 2016, 05:04:14 pm by Yannanth »
Logged

alway

  • Bay Watcher
  • 🏳️‍⚧️
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #2403 on: May 15, 2012, 07:39:44 am »

What programming languages do I need to know?
http://www.w3schools.com/
http://www.w3schools.com/html5/default.asp in particular.
Anything related to html or web development, w3schools can at the very least point you in the right direction. What particular bits of it you use depends on what you are making, but that should at least get you started.
Logged

Nadaka

  • Bay Watcher
    • View Profile
    • http://www.nadaka.us
Re: if self.isCoder(): post() #Programming Thread
« Reply #2404 on: May 15, 2012, 09:30:20 am »

I want to develop and HTML5 game that can hopefully be ported to Android and iOS tablets as well (I think Windows Phone accepts HTML5 apps too). What technologies do I need to use? What programming languages do I need to know? Tell me everything. I will pay in gratitude. :)

You need to know javascript mostly. but also html and css, because it is a lot easier to build a ui with html than it is to paint it into a canvas. You also need to download and install every browser known to man and learn the horror of almost but not quite entirely dis-similarly glitching code that usually somewhat works... mostly.
Logged
Take me out to the black, tell them I ain't comin' back...
I don't care cause I'm still free, you can't take the sky from me...

I turned myself into a monster, to fight against the monsters of the world.

SolarShado

  • Bay Watcher
  • Psi-Blade => Your Back
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #2405 on: May 16, 2012, 11:46:58 pm »

Non-trivial, cross-browser javascript has historically been deep magic...

In my (admittedly limited) experience though, IE9 and the latest chrom(e/ium) are pretty on par with each other.
Logged
Avid (rabid?) Linux user. Preferred flavor: Arch

Siquo

  • Bay Watcher
  • Procedurally generated
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #2406 on: May 17, 2012, 04:32:52 am »

That's what mootools&jquery are for. Wrap the magic in a box called $.
Logged

This one thread is mine. MIIIIINE!!! And it will remain a happy, friendly, encouraging place, whether you lot like it or not. 
will rena,eme sique to sique sxds-- siquo if sucessufil
(cant spel siqou a. every speling looks wroing (hate this))

Twiggie

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #2407 on: May 18, 2012, 06:25:14 am »

so I had an interview this morning, and the last question was this:
given two files of userIDs, find all the records that exist in both files. the original files are too large to fit in primary memory.

i said sort them in secondary memory and then iterate down them, but i didnt know any external sorting algorithms so they asked me to find another solution.

what do?

and no, the naive solution doesnt count.
Logged

Siquo

  • Bay Watcher
  • Procedurally generated
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #2408 on: May 18, 2012, 06:39:57 am »

Hope for some kind of equal distribution, and separate them first into batches (so while streaming over the initial lists, sort them into batches of 0-1000, 1001-2000 etc depending on min/max numbers), then compare per batch?
Logged

This one thread is mine. MIIIIINE!!! And it will remain a happy, friendly, encouraging place, whether you lot like it or not. 
will rena,eme sique to sique sxds-- siquo if sucessufil
(cant spel siqou a. every speling looks wroing (hate this))

Twiggie

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #2409 on: May 18, 2012, 07:46:44 am »

isnt that essentially an external bucket sort?

they definitely hinted that there was a solution that didnt involve sorting, but i have no clue what it is :(
Logged

Siquo

  • Bay Watcher
  • Procedurally generated
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #2410 on: May 18, 2012, 08:04:55 am »

If they know an answer that does not involve any sort of sort, I'd want to hear it as well...

I had to look up bucket sort, but that involves sorting the buckets. Technically once you've bucketed the stuff, two equal-range buckets fit in RAM (if you chose your buckets right), and you wouldn't have to sort the buckets themselves, so that wouldn't count, would it? :)
Logged

This one thread is mine. MIIIIINE!!! And it will remain a happy, friendly, encouraging place, whether you lot like it or not. 
will rena,eme sique to sique sxds-- siquo if sucessufil
(cant spel siqou a. every speling looks wroing (hate this))

Twiggie

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #2411 on: May 18, 2012, 08:37:43 am »

well no you wouldnt have to, but its more efficient to sort the buckets in RAM, since the naive approach with two buckets takes O(n^2), but sorting them takes O(nlogn + n) = O(nlogn).
Logged

Siquo

  • Bay Watcher
  • Procedurally generated
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #2412 on: May 18, 2012, 08:40:45 am »

I didn't say it was super-effective ;) I can't think of any other non-sorting matching, though... But I'd like to see if anyone else can?
Logged

This one thread is mine. MIIIIINE!!! And it will remain a happy, friendly, encouraging place, whether you lot like it or not. 
will rena,eme sique to sique sxds-- siquo if sucessufil
(cant spel siqou a. every speling looks wroing (hate this))

Mini

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #2413 on: May 18, 2012, 09:23:36 am »

You *could* just loop through the first list, and for every item in it loop through the second and check for matches. If you wanted it to be less hilariously inefficient you could load chunks of data at a time for checking. It would still probably end up being reasonably hilariously inefficient, however.
Logged

alway

  • Bay Watcher
  • 🏳️‍⚧️
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #2414 on: May 18, 2012, 12:52:02 pm »

You could utilize key-value pairs with hash tables.
Logged
Pages: 1 ... 159 160 [161] 162 163 ... 796