• What do you need help with? V4 (January 2012)
    966 replies, posted
[QUOTE=Ardosos;34454566]What about something timezone dependent, like shows one picture in the AM hours, and a different picture of the same dimensions in the PM hours? Is such a thing even possible?[/QUOTE] With javascript, not PHP.
[QUOTE=Octave;34454694]With javascript, not PHP.[/QUOTE] So javascript can display as an image similar to how PHP can?
[QUOTE=Ardosos;34454876]So javascript can display as an image similar to how PHP can?[/QUOTE] Yeah, javascript can modify the HTML at any time pretty much. And it's clientside, so it can access the user's system time and such.
This is a quick question and I will probably face palm when I see the answer. How do you use the dict function in java to zip and array of chars with and array of ints? For some reason I cant find a good example on the web.
I'm having some trouble with Hexxeh's ScrAPI. I'm trying to grab pages of posts from LMAO Pics and I'm having some issues with returned data being incomplete. Whenever I receive incomplete data for page 3 it is always at char 32689. I've tried reading the data through both C# and Java. The thread ID is 1152069 and one of the pages that consistently doesn't work is page 3. Can someone confirm that this is an issue on my end and not a problem with the api server?
I have a general question: For IDE's that find errors for you in real time (I use visual express for c#, which does that), do you keep the error list open when you code, or do you never use it in fear of bad habits, or look at it occasionally?
[QUOTE=Dark7533;34454988]This is a quick question and I will probably face palm when I see the answer. How do you use the dict function in java to zip and array of chars with and array of ints? For some reason I cant find a good example on the web.[/QUOTE] dictionaryInstance.put(key, value) in a for loop. I'm pretty sure that Python's dict(zip()) has no Java equivalent. [editline]30th January 2012[/editline] [QUOTE=DoctorSalt;34455622]I have a general question: For IDE's that find errors for you in real time (I use visual express for c#, which does that), do you keep the error list open when you code, or do you never use it in fear of bad habits, or look at it occasionally?[/QUOTE] I often keep it open out of habit, but use it only for compile-time errors and when the mouse-over isn't precise enough. I don't think there's a reason not to use it.
[QUOTE=Octave;34454694]With javascript, not PHP.[/QUOTE] It could be done server-side in PHP, too.
[QUOTE=Tamschi;34456505]dictionaryInstance.put(key, value) in a for loop. I'm pretty sure that Python's dict(zip()) has no Java equivalent. [editline]30th January 2012[/editline] I often keep it open out of habit, but use it only for compile-time errors and when the mouse-over isn't precise enough. I don't think there's a reason not to use it.[/QUOTE] Example plz, I have no clue what the variable type for the dictionary would be called. Thanks
VS 2010 is refusing to build modified files when I tell it to compile. I know it is a great feature that it skips compiling files that haven't changed, but for some reason it thinks the files that I have changed haven't and just skips them, resulting in the executable using the old code from before. Apparently the only solution is to rebuild the entire project, but that takes a lot of time if I do it every time I want to change something small. Does anyone know how to fix this?
[QUOTE=Dark7533;34456883]Example plz, I have no clue what the variable type for the dictionary would be called. Thanks[/QUOTE] It should be something along the lines of [code] HashMap<Character, Integer> map = new HashMap<Character, Integer>(); for (int i = 0; i < array1.Length; i++) { map.put(array1[i], array2[2]); } [/code] That should work, if array1 is a char[] and array2 is an int[]. The generic collections in Java only work with objects like Character and Integer, not with char and int. Code is untested. [editline]30th January 2012[/editline] If you want to keep the order, you'll have to create a wrapper class for the key value pairs and add them into a List<> instead. [editline]30th January 2012[/editline] If you want the entries to be sorted by key, you can use a TreeMap<,> instead of the HashMap<,>.
-snip-
C# question, I want to make a ping request, and check if I get a response. I can already make a ping request, but I don't know, how I can check, if I get a response.
[QUOTE=kaukassus;34460370]C# question, I want to make a ping request, and check if I get a response. I can already make a ping request, but I don't know, how I can check, if I get a response.[/QUOTE] [url]http://msdn.microsoft.com/en-us/library/system.net.networkinformation.ping.pingcompleted.aspx[/url]
For something like a rougelike, should I use ncurses?
How does google index all that data and access it so fast? I mean... If I stored everything in a MySQL database, there is no way in the actual fuck I could pull 10 top results in science. Like really. How do they even? I need to know for my project.
Hey can someone point me in the right direction on how to setup an environment where i can create games using OpenGL, I really have no idea where to start. I've been looking for a while now but all i can find are guides which use older Xcode version ( i use 4 ) and i cannot find anything about compiling C++ code with OpenGL using GCC. [editline]30th January 2012[/editline] [QUOTE=Sprite;34464985]How does google index all that data and access it so fast? I mean... If I stored everything in a MySQL database, there is no way in the actual fuck I could pull 10 top results in science. Like really. How do they even? I need to know for my project.[/QUOTE] They use fancy, magical data mining techniques, they don't save their cached websites in mysql as far as i know because if they did it'd be shit slow.
[QUOTE=WTF Nuke;34464943]For something like a rougelike, should I use ncurses?[/QUOTE] *Roguelike* On topic, from what I've heard, that's the best route for c++ roguelikes. I wonder what the best c# option is..?
[QUOTE=Bambo.;34466760]They use fancy, magical data mining techniques, they don't save their cached websites in mysql as far as i know because if they did it'd be shit slow.[/QUOTE] I read somewhere that they keep all that shit in memory [editline]30th January 2012[/editline] fuck man i can't find the source
How do I make 2d games in java? I learned how to use it in school where we used BlueJ to make little programs that didn't do much.
Wait PDCurses or ncurses? I'm using PD because it's easier to set up, is there any differences?
ncurses is for posix.
[QUOTE=Sprite;34464985]How does google index all that data and access it so fast? I mean... If I stored everything in a MySQL database, there is no way in the actual fuck I could pull 10 top results in science. Like really. How do they even? I need to know for my project.[/QUOTE] Like the guy above said, they store some data in memory, and if I recall they dump it to a database of sorts every once in a while. They use an algorithm that's commonly referred to as map-reduce for parsing data. They also have a section about it: [URL="http://code.google.com/edu/parallel/mapreduce-tutorial.html"]clickyidy clack.[/URL]
Does anyone know if there is a function on LOVE similar to Garry's Mod's CurTime()?
How can I convert .swf files to .png's?
I'm having a problem when compiling a piece of code in g++. I have basically an overarching graphics class with a member window class within it, and upon the graphics class constructor it sends the constructors arguments to a function in the member class to initialize it. However... [code]gfx.cpp: In constructor ‘GraphicsAPI::GraphicsAPI(int, char**, int, int, int, int, unsigned int)’: gfx.cpp:20: error: no matching function for call to ‘Window::SetupWindow(int&, char**&, int&, int&, unsigned int&)’ window.h:23: note: candidates are: void Window::SetupWindow(int&, char**, int&, int&, int&, int&, unsigned int&)[/code] This happens. Below is the prototype for the window's setup function and graphicsapi's constructor prototype/call to the window. [code]void SetupWindow( int& argc, char **argcv, int& nArgx, int& nArgy, int& nArgW, int& nArgH, unsigned int& nArgMode );[/code] [code]GraphicsAPI::GraphicsAPI( int argc, char **argcv, int nArgx, int nArgy, int nArgW, int nArgH, unsigned nArgMode ) { int na = argc; char **cv = argcv; int x = nArgx; //maybe this will fix it? nope int y = nArgy; unsigned int m = nArgMode; wGameWindow.SetupWindow( na, argcv, x, y, m );[/code] Any help would be appreciated.
[QUOTE=Shining_Sabe;34471203]I'm having a problem when compiling a piece of code in g++. I have basically an overarching graphics class with a member window class within it, and upon the graphics class constructor it sends the constructors arguments to a function in the member class to initialize it. However... [code]gfx.cpp: In constructor ‘GraphicsAPI::GraphicsAPI(int, char**, int, int, int, int, unsigned int)’: gfx.cpp:20: error: no matching function for call to ‘Window::SetupWindow(int&, char**&, int&, int&, unsigned int&)’ window.h:23: note: candidates are: void Window::SetupWindow(int&, char**, int&, int&, int&, int&, unsigned int&)[/code] This happens. Below is the prototype for the window's setup function and graphicsapi's constructor prototype/call to the window. [code]void SetupWindow( int& argc, char **argcv, int& nArgx, int& nArgy, int& nArgW, int& nArgH, unsigned int& nArgMode );[/code] [code]GraphicsAPI::GraphicsAPI( int argc, char **argcv, int nArgx, int nArgy, int nArgW, int nArgH, unsigned nArgMode ) { int na = argc; char **cv = argcv; int x = nArgx; //maybe this will fix it? nope int y = nArgy; unsigned int m = nArgMode; wGameWindow.SetupWindow( na, argcv, x, y, m );[/code] Any help would be appreciated.[/QUOTE] You're missing a closing brace on the GraphicsAPI function, or maybe you just pasted it wrong? Oh, you're only passing 5 arguments to SetupWindow, whereas you require 7 in the prototype.
Should've clarified, that's not the whole constructor for GraphicsAPI, that's only the bit to do with the game window. EDIT: Wow, I need sleep, and this is why I will never want to major in programming. Thanks.
[quote]Oh, you're only passing 5 arguments to SetupWindow, whereas you require 7 in the prototype.[/QUOTE]
[QUOTE=DesolateGrun;34471037]How can I convert .swf files to .png's?[/QUOTE] Take a screenshot? You can't, SWFs can be interactive with audio and animation, and PNGs are static images. You could /try/ converting it to an APNG which would allow for animation but that's non-standard and it wouldn't be interactive or have sound.
Sorry, you need to Log In to post a reply to this thread.