About to start learning Classes now in Python on Codecademy. My body is ready, but is my mind ready ? I've been told to get ready to get my mind blown, haha.
_____ quoted you notifier.hey guys
I'm getting into web development, more specifically Ruby on Rails.
You think there might be something I can code that would benefit NeoGAF? Or any other niche. I don't wanna keep on building the nth blog/twitter/reddit-clone but preferrable something that people could actually use.
Maybe some clan/guild like page?
_ R1 _
/ \
R2 R3
/ \ / \
R4 R5 R6 R7
/\ /\ /\ /\
E1 E2 E3 E4 E5 E6 E7 E8
You need to make a binary search tree. Traverse up to each parent node until you reach the start.So guys I have a basic program. Is like a text adventure game (in java) where you choose between two dialogue options and they take you to different places. Very basic since this is the first time I've tried programming.
Is there a way to, once I get to last part of the game, re-start it without having to run the code again?
Basically the game is something like this:
Code:_ R1 _ / \ R2 R3 / \ / \ R4 R5 R6 R7 /\ /\ /\ /\ E1 E2 E3 E4 E5 E6 E7 E8
So, when you are in the last room, say E1, how can I go back to R1? A simple solution would be appreciated, and assume I don't know any advanced java.
Why is it so hard to find database people who know how to create stored procedures. Are sprocs really that rare?
Stored procedures aren't hard. They're literally just regular SQL statements after a parameter list. I'd say if you don't know how to write a stored procedure you probably don't know SQL at all.
I guess SQL is just so accessible these days that most peopl in tech have written a select query or two, and that tricks them into thinking that they "know" SQL. Every person we've interviewed so far has the experience written on their resume, but nobody has come close to passing my test
The more complicated I find myself getting with a stored procedure, the more likely I am to do that thing in a regular programming language instead. I almost never use cursors, for instance. What kind of tasks are you asking them to do with their stored procedures?
You need to make a binary search tree. Traverse up to each parent node until you reach the start.
Another way would be to make a variable that stores the starting room and set the current room to the starting room.
Well it's hard to say since I don't know what your program looks like, but I can make some guesses.How would I do that if you don't mind explaining?
class Game
{
List<Room> rooms = new List<Room>();
Room startRoom = rooms[0];
Room currentRoom = startRoom;
public void setCurrentRoom(Room room)
{
currentRoom = room;
}
public void reset()
{
setCurrentRoom(startRoom);
}
}
How do you know the state of the game? How the game know what to ask/do next?Is there a way to, once I get to last part of the game, re-start it without having to run the code again?
_____ quoted you notifier.
A system that checks the threads where you've posted and warn you if someone replied to one of your posts, I guess.I'm sorry but what does that mean?
A system that checks the threads where you've posted and warn you if someone replied to one of your posts, I guess.
That's what makes it an interesting and possibly useful project.I guessed as much, never saw it tho.
That's what makes it an interesting and possibly useful project.
That being said, I don't see a way to do it that doesn't increase NeoGAF servers load. :/
That's what makes it an interesting and possibly useful project.
That being said, I don't see a way to do it that doesn't increase NeoGAF servers load. :/
Yeah, you can't, but doing searches every ~5 minutes shouldn't too be too bad of a load... but then again it could be if thousands of peeps were using it all the time
Depends on how you do a search...Yeah, you can't, but doing searches every ~5 minutes shouldn't too be too bad of a load...
for (int i = 0; i < array1.length; i++) {
for (int j = 0; j < array2.length; j++) {
for (int k = 0; k < results.length; k++) {
if (array1[i]==array2[j]){
results[i] = 2;
if (array1[i] != array2[j])
results[i] = 0;
}
}
}
Depends on how you do a search...
For a given post in a given thread, loading a couple of pages and checing for possible replies is something (you can probably lower the load by using HTTP headers to know whether pages changed, too), but if without the list of the posts/threads you want to follow, you need to load all threads? Or use Neogaf search functions to get your recent posts (probably better, but still...)?
Do ToS allow this, btw?
Curiously enough, I had to grab a bunch of documentation files, but it was tooking me too much time. I've finally written the couple dozen lines in Python that perform a Google search, find the file in the results, then download it (with resume if the connexion is lost in the middle of a download).
Someone asked earlier why Python can be mind-blowing. I don't know, I'm not even a great fan of Python for large projects, but the standard library is insanely useful for menial tasks like this (and I'm pretty sure my solution is more complex than it should, and proper Google API is probably better than parsing the HTML result of a normal search)
I have two primitive arrays each containing a unique 4 digit number. if all the numbers are the same 2222 is printed, if they are different 0000 is printed. however if two numbers are same but in the wrong position 2211 would be printed. or if the numbers are just wrong it would be 2200 etc
having difficulty writing this with for loop. some help would be appreciated
having difficulty understanding your problem
could this work?
Code:for (int i = 0; i < userarray.length; i++) { results[i]=0; for (int j = 0; j < cpuarray.length; j++) { if (userarray[i]==cpuarray[j]) { if (i==j) results[i] = 2; else results[i] = 1; break; } } }
I'm having trouble making a class iterable in Java. I have to do it for a project, and I've never really used iterators much. Basically, the project is an ArrayOfLists class. The class contains an array list of Element objects. I made Element a private static inner class of ArrayOfLists. Element contains a linked list and an int called lastIndex. The idea is that each element of the array list contains linked lists and the concatination of the linked lists is the data structure that we are making. The elements' lastIndex variable represents the index number of the last element in the linked list, but the number is correct as if all of the linked lists are concatinated.
I'm running into syntax errors and I'm not entirely sure the best way to do this generically.
If your Element class is static, how can you instantiate it to add an Element to the array list? Also, be strict with your capitalization of class types and data structures when describing a problem like this since Element vs. element is a big difference.
It being a static class within my ArrayOfLists class doesn't mean I cannot instantiate it.
I'm no Java expert so I don't understand how that works. You don't mean a static variable rather than a static class, right?
Static member variables and inner static classes have differences. I think you're applying the logic to static member variables to static inner classes.
But how would you start building something like that? Forgive me but I am still in my early stages I would love to make something GAF related tho.
Also, any other ideas or open source projects are always welcome
Depends on how you do a search...
For a given post in a given thread, loading a couple of pages and checing for possible replies is something (you can probably lower the load by using HTTP headers to know whether pages changed, too), but if without the list of the posts/threads you want to follow, you need to load all threads? Or use Neogaf search functions to get your recent posts (probably better, but still...)?
Do ToS allow this, btw?
Curiously enough, I had to grab a bunch of documentation files, but it was tooking me too much time. I've finally written the couple dozen lines in Python that perform a Google search, find the file in the results, then download it (with resume if the connexion is lost in the middle of a download).
Someone asked earlier why Python can be mind-blowing. I don't know, I'm not even a great fan of Python for large projects, but the standard library is insanely useful for menial tasks like this (and I'm pretty sure my solution is more complex than it should, and proper Google API is probably better than parsing the HTML result of a normal search)
Make an extension that picks up posts as your browse. Since it's a server based project you can essentially just crowdsource most of the database at no cost.
To be honest I would just use the built-in GAF search (for unique user names just querying "quote username" (like "quote PetriP-TNT") is enough to get the replies) and check for changes against the previous search results. For more complex usernames (as in not technically complex, but say something like "search" or "library" or "mario" as an username doesn't really work) you will need to go through some other hoops though.
NeoGaf Search sucks though, I mean it's even throttled to keep regular users from using it, so not only is it not performant enough, it's probably not appreciated if an automated service uses it.
This is strange. I have to use an older version of g++ for a school assignment, and it is giving me issues. I have a to_string() pure virtual function in my abstract class and each of the subclasses implement it. It simply returns a string that the class builds out of info on the object. I am getting the following g++ error.
"to_string is not a member of std"
But why does that matter? It's my method. I'm not trying to call some already made method. I made the method. Why isn't the compiler simply using the method that I made? Do I have to use an ostringstream instead? I've never used it, so I'm trying to read into it.
std::to_string()
virtual std::string to_string() = 0;Without seeing the code, it's hard to say, but it looks like you're writing
Code:std::to_string()
somewhere. Is this right?
Without seeing the code, it's hard to say, but it looks like you're writing
Code:std::to_string()
somewhere. Is this right?
NeoGaf Search sucks though, I mean it's even throttled to keep regular users from using it, so not only is it not performant enough, it's probably not appreciated if an automated service uses it.
Hi GAF,
Don't know if this is the right place to be asking this but hopefully you can help anyway.
I've been job searching for a while now and have had a fantastic opportunity as a PHP developer come up, the thing is, I don't really know any PHP. The company I'm working for know this and want to spend time training me up to scratch as they are impressed with my past programming experience.
I don't think it's fair though that I should be learning it solely on the job. I'm after some solid resources to learn as much as I can before I begin, I'm looking for any sort of recommended books and online resources that I can get the most out of, thanks =].
If you just want to get up to speed on syntax, https://learnxinyminutes.com/ is pretty nice.