input = input Stream
inputText = current line of stream
while (inputText!=null){
if (inputText == "SP"){
split;
}
inputText = input.nextLine();
}
Something like this. Others feel free to correct me.
| Forum Index > General Forum |
Thread Rules 1. This is not a "do my homework for me" thread. If you have specific questions, ask, but don't post an assignment or homework problem and expect an exact solution. 2. No recruiting for your cockamamie projects (you won't replace facebook with 3 dudes you found on the internet and $20) 3. If you can't articulate why a language is bad, don't start slinging shit about it. Just remember that nothing is worse than making CSS IE6 compatible. 4. Use [code] tags to format code blocks. | ||
|
WarSame
Canada1950 Posts
input = input Stream inputText = current line of stream while (inputText!=null){ if (inputText == "SP"){ split; } inputText = input.nextLine(); } Something like this. Others feel free to correct me. | ||
|
obesechicken13
United States10467 Posts
I understand it's a faster way of getting good networks. It trains them faster. I understand that it goes backwards from the output layer, to the hidden layers, then to the input layer. I just don't understand the algorithms or how it adjusts itself. What is it that makes it faster? | ||
|
Cyx.
Canada806 Posts
On January 20 2014 11:55 Ben... wrote: Show nested quote + On January 19 2014 06:30 Cyx. wrote: On January 19 2014 02:44 Mr. Wiggles wrote: Hey, so I've been playing with something last night that I think maybe a couple of people here would be interested in. https://microcorruption.com/ What is it? Your target is a small embedded device; a microcontroller running compiled C code. You get access to the device, disassembly of its code, and a low-level debugger and assembler. We "run" the devices, you interact with them via a vanilla web interface. At each level, you'll get a simple input that, owing to some C software bug, can be used to own the target. You'll use the debugger to reverse the target, find the input, and then deliver it to a "production" instance to beat the level. You'll face a series of revisions of the target, starting from "comically broken" and proceeding vendor-fix by vendor-fix through basic memory corruption, stack overflows, randomization, memory protection schemes, allocator vulnerabilities, and DRM-style software protection. All this happens on an architecture you've probably used, but likely never have written any code for. Have you ever reverse-engineered a program from its assembly code to understand what it's doing? That'll happen too. We're keeping a leaderboard, by completion time, CPU cycles, and input size. Part of the fun of a challenge like this is to see how others are doing in real-time. If you've done a lot of exploit development, you won't have much trouble. But we hope the real fun is reserved for the people who haven't: you'll get to play with concepts that, in the real world, involve tedious toolchain installs and comprehensive knowledge of the memory layouts of gigantic browser library codebases. You won't need any of that here: we're looking forward to seeing people who have never written a line of assembly beating people who've been doing this for years. It's been pretty fun so far, I've beaten the first 3 levels. You don't need any experience with exploit development, and knowing assembly helps, but it's pretty easy to pick up. They have a little manual attached for it: https://microcorruption.com/manual.pdf Pretty fucking cool, especially considering I'm taking an assembly course in school right meow ^^ thanks for sharing! Which flavour of assembly? I actually find assembly quite fun so far. It can be finicky but once you figure something out there is no transparency to it. It can be tedious at times but not too bad and it is quite reliable. It will do exactly what I expect it to. We're doing MIPS, which I guess is pretty standard ^^ I kinda wish we got to learn some x86 but I can do that by myself I guess, it's not too much different. I really like it too though! You really get to spill the computer's guts out in front of you =D | ||
|
icystorage
Jollibee19350 Posts
On January 20 2014 15:06 obesechicken13 wrote: Can someone E(xplain)LI5 backpropagation to me? I was watching videos from Coursera today from 2 different profs and I don't get it. My TA might be able to explain it better though if you guys can't. I understand it's a faster way of getting good networks. It trains them faster. I understand that it goes backwards from the output layer, to the hidden layers, then to the input layer. I just don't understand the algorithms or how it adjusts itself. What is it that makes it faster? it just adjusts the weights of the nodes starting from the output layer and works itself back. basically it goes like this 1) give input and expected output 2) calculate using input to hidden layer 3) give to output output compares it with the expected output basing the difference of the output and expected output it adjusts the weights of the output -> hidden -> input reset to step 1 using another set of input and expected output but with the adjusted weights. this is the training part. (just giving the general run down) | ||
|
obesechicken13
United States10467 Posts
On January 20 2014 15:23 icystorage wrote: Show nested quote + On January 20 2014 15:06 obesechicken13 wrote: Can someone E(xplain)LI5 backpropagation to me? I was watching videos from Coursera today from 2 different profs and I don't get it. My TA might be able to explain it better though if you guys can't. I understand it's a faster way of getting good networks. It trains them faster. I understand that it goes backwards from the output layer, to the hidden layers, then to the input layer. I just don't understand the algorithms or how it adjusts itself. What is it that makes it faster? it just adjusts the weights of the nodes starting from the output layer and works itself back. basically it goes like this 1) give input and expected output 2) calculate using input to hidden layer 3) give to output output compares it with the expected output basing the difference of the output and expected output it adjusts the weights of the output -> hidden -> input reset to step 1 using another set of input and expected output but with the adjusted weights. this is the training part. (just giving the general run down) So how did neural networks work before back propagation if the training occurs during back propagation? | ||
|
icystorage
Jollibee19350 Posts
backprop is one of the ways to train your network | ||
|
obesechicken13
United States10467 Posts
On January 20 2014 15:50 icystorage wrote: well your neural network wont work if it hasnt been trained. backprop is one of the ways to train your network I may be getting more confused. Actually maybe I understand it more. I'm just not perfectly clear on the nitty gritty. Your explanation helps now. Based on the difference between the generated output and the expected training data output, you adjust the weights while propagating backwards through the layers. That's back propagation. | ||
|
Shield
Bulgaria4824 Posts
On January 20 2014 14:57 WarSame wrote: That's a bit of a confusing boolean there. The general form IIRC is input = input Stream inputText = current line of stream while (inputText!=null){ if (inputText == "SP"){ split; } inputText = input.nextLine(); } Something like this. Others feel free to correct me. == is checking for reference, so it should be:
equals is for equal content, while == is checking if it is the same reference ![]() | ||
|
icystorage
Jollibee19350 Posts
On January 20 2014 16:02 obesechicken13 wrote: Show nested quote + On January 20 2014 15:50 icystorage wrote: well your neural network wont work if it hasnt been trained. backprop is one of the ways to train your network I may be getting more confused. Actually maybe I understand it more. I'm just not perfectly clear on the nitty gritty. Your explanation helps now. Based on the difference between the generated output and the expected training data output, you adjust the weights while propagating backwards through the layers. That's back propagation. yes. your training set should include training points that includes the input and the expected output. but actually its the network that adjusts itself. its supposed to be automated since it is unsupervised learning | ||
|
WolfintheSheep
Canada14127 Posts
On January 20 2014 16:03 darkness wrote: Show nested quote + On January 20 2014 14:57 WarSame wrote: That's a bit of a confusing boolean there. The general form IIRC is input = input Stream inputText = current line of stream while (inputText!=null){ if (inputText == "SP"){ split; } inputText = input.nextLine(); } Something like this. Others feel free to correct me. == is checking for reference, so it should be:
equals is for equal content, while == is checking if it is the same reference ![]() Unless you're using C#, where == will compare string values . | ||
|
Tobberoth
Sweden6375 Posts
On January 20 2014 12:56 WarSame wrote: In my school last semester we did MIPS, this semester we're doing x86. Interesting stuff, but it takes forever to write simple programs. On Wikipedia it says that the person who made Rollercoaster Tycoon did it entirely in Assembly. That person is likely insane. Yeah, ZSNES was also written entirely in assembly initially, which is why it was so much faster than SNES9x. It has apparently mostly been rewritten to C now, but still, it's incredible that there actually are full-on programs written in assembly, even today. | ||
|
Shield
Bulgaria4824 Posts
On January 20 2014 16:23 Tobberoth wrote: Show nested quote + On January 20 2014 12:56 WarSame wrote: In my school last semester we did MIPS, this semester we're doing x86. Interesting stuff, but it takes forever to write simple programs. On Wikipedia it says that the person who made Rollercoaster Tycoon did it entirely in Assembly. That person is likely insane. Yeah, ZSNES was also written entirely in assembly initially, which is why it was so much faster than SNES9x. It has apparently mostly been rewritten to C now, but still, it's incredible that there actually are full-on programs written in assembly, even today. I'd not say it's incredible. It's just risky and time-consuming. Here is why: http://www.cs.nott.ac.uk/~cah/G51ISS/Documents/NoSilverBullet.html | ||
|
Tobberoth
Sweden6375 Posts
On January 20 2014 17:04 darkness wrote: Show nested quote + On January 20 2014 16:23 Tobberoth wrote: On January 20 2014 12:56 WarSame wrote: In my school last semester we did MIPS, this semester we're doing x86. Interesting stuff, but it takes forever to write simple programs. On Wikipedia it says that the person who made Rollercoaster Tycoon did it entirely in Assembly. That person is likely insane. Yeah, ZSNES was also written entirely in assembly initially, which is why it was so much faster than SNES9x. It has apparently mostly been rewritten to C now, but still, it's incredible that there actually are full-on programs written in assembly, even today. I'd not say it's incredible. It's just risky and time-consuming. Here is why: http://www.cs.nott.ac.uk/~cah/G51ISS/Documents/NoSilverBullet.html Well, I didnt mean incredible in a positive way. Still, it's impressive that some people have the determination to write whole programs in assembly, since in general, the performance gains are irrelevant while your productivity goes into the drain. | ||
|
ZenithM
France15952 Posts
On January 20 2014 16:16 WolfintheSheep wrote: Show nested quote + On January 20 2014 16:03 darkness wrote: On January 20 2014 14:57 WarSame wrote: That's a bit of a confusing boolean there. The general form IIRC is input = input Stream inputText = current line of stream while (inputText!=null){ if (inputText == "SP"){ split; } inputText = input.nextLine(); } Something like this. Others feel free to correct me. == is checking for reference, so it should be:
equals is for equal content, while == is checking if it is the same reference ![]() Unless you're using C#, where == will compare string values .Btw, in C#, the ReferenceEquals method tests for reference equality . | ||
|
Animzor
Sweden2154 Posts
So I'm trying to write this program in Java where I create a user and add it to an Arraylist. Each user is supposed to have their own inventory where items can be added later. The problem is that I am unable to print the inventory, it simply prints [] even though I have defined toString-methods for each object that has been added to the Arraylist as well as the superclass Item. I'm starting to wonder whether I have added anything to the inventory in the first place. Here's an example of adding a trinket. + Show Spoiler + private void addTrinket() { System.out.println("Enter name of trinket: "); String trinketName = keyboard.nextLine(); System.out.println("Enter number of gems: "); int trinketGems = keyboard.nextInt(); System.out.println("Choose gold or silver: "); String trinketMineral = keyboard.nextLine(); keyboard.nextLine(); Trinket newTrinket = new Trinket(trinketName, trinketGems, trinketMineral); System.out.println("Enter name of owner: "); String owner = keyboard.nextLine(); for(Person personEntry : personList) if(owner.equals(personEntry.name)) personEntry.belongings.add(newTrinket); } + Show Spoiler + import java.util.ArrayList; public class Person{ public String name; public String items; public ArrayList<Item> belongings = new ArrayList<Item>(); public Person(String name){ this.name = name; } public String getName(){ return name; } public String toString() { return "Name: " + name; } } Edit: added Person | ||
|
Shield
Bulgaria4824 Posts
| ||
|
Tobberoth
Sweden6375 Posts
On January 20 2014 09:53 Cyx. wrote: Show nested quote + On January 20 2014 06:30 Tobberoth wrote: On January 19 2014 02:44 Mr. Wiggles wrote: Hey, so I've been playing with something last night that I think maybe a couple of people here would be interested in. https://microcorruption.com/ What is it? Your target is a small embedded device; a microcontroller running compiled C code. You get access to the device, disassembly of its code, and a low-level debugger and assembler. We "run" the devices, you interact with them via a vanilla web interface. At each level, you'll get a simple input that, owing to some C software bug, can be used to own the target. You'll use the debugger to reverse the target, find the input, and then deliver it to a "production" instance to beat the level. You'll face a series of revisions of the target, starting from "comically broken" and proceeding vendor-fix by vendor-fix through basic memory corruption, stack overflows, randomization, memory protection schemes, allocator vulnerabilities, and DRM-style software protection. All this happens on an architecture you've probably used, but likely never have written any code for. Have you ever reverse-engineered a program from its assembly code to understand what it's doing? That'll happen too. We're keeping a leaderboard, by completion time, CPU cycles, and input size. Part of the fun of a challenge like this is to see how others are doing in real-time. If you've done a lot of exploit development, you won't have much trouble. But we hope the real fun is reserved for the people who haven't: you'll get to play with concepts that, in the real world, involve tedious toolchain installs and comprehensive knowledge of the memory layouts of gigantic browser library codebases. You won't need any of that here: we're looking forward to seeing people who have never written a line of assembly beating people who've been doing this for years. It's been pretty fun so far, I've beaten the first 3 levels. You don't need any experience with exploit development, and knowing assembly helps, but it's pretty easy to pick up. They have a little manual attached for it: https://microcorruption.com/manual.pdf Thanks for recommending this, I just beat the first non-tutorial level. I've been looking for something like this, a game which is actually really useful for training assembly, reverse engineering etc. It's almost scary how realistic it is, it's more or less exactly how you crack programs IRL. Hahaha tell me about it, so cool! I just made a program execute arbitrary machine language that I typed in as a password ^^ I'm like 9 levels in so far, we'll see how far I get tonight =D How did you solve Reykjavik? I did it like this, but I feel like I missed the point maybe: + Show Spoiler + First I dicked around and trying to understand the encryption function, and I got a decent idea of what it was doing, I expected it to create the actual password from the dummy data after the INT function. I couldn't see a pattern though, so I simply stepped one instruction at a time after I sent the password and found that it did a simple compare to 0x122b. Sending that in as the password (reversed of course) was enough to open the lock. It almost feels like I cheated (but I guess that's the point of hacking). Did you do it the same way, or was there some actual logic to deal with in the encryption function? | ||
|
aksfjh
United States4853 Posts
On January 18 2014 09:42 Chocolate wrote: Show nested quote + On January 17 2014 14:08 aksfjh wrote: On January 17 2014 11:58 Chocolate wrote: Hey I'm going to enter uni as a CS student soon and I was wondering if the following would be considered a good portfolio to work at over the next four years. For each language that I know, 9 small projects, 5 medium projects, and one big one. I currently know Java and Python, and I'm looking at learning C++, C#, C, PHP, and Ruby (on rails). In addition, I would add every solution that I have made from project euler, hopefully at least 100 of them. Small projects would be just simple computations, perhaps rudimentary physics solvers, and other basic implementations of science stuff. Maybe some basic encryption. Medium projects would be more developed simulators, maybe some games, and generally projects with neater interfaces than just the command terminal. Also, simple web stuff. Decryption as well. Big projects would be things like apps, websites, maybe an actual physics environment, things like that. First is this a decent selection of languages if I want to keep my options open for web or more general software? Is it feasible to finish this all in four years working sparingly at a pace of around 5 hr per week? Also, is it generally acceptable to include things you made for a class in a portfolio? Thanks in advance. I have a feeling that all these stupid code/STEM PR and awareness programs are going to push a lot of scrubs into CS so I want to be one of the better candidates for internships and jobs. Just as a general principle, it's much better to focus on learning very few languages, and put much more focus on program structure and design. You're going to find out pretty quickly that a lot of projects and work give you ample time to learn the nuances of a language, and if you spend all your time learning multiple languages up front, you're going to have 50-80% of your skill set as dead weight for any given project. On the flip side, if you focus on good design (as in planning, functionality, meaningful documentation, etc.) good developers will recognize you as a very valuable team candidate or member. These things are hard to learn and take a ton of time to get better with, and are actually extremely hard to come by in new programmers. That being said, PHP would probably be a good language to learn on top of your other 2 that you already know. C++ will overlap so much with Python, and C# will overlap with Java. With those 3 (Python, Java, and PHP), you'll be able to tackle pretty much any problem that is thrown your way, with remarkable ease assuming you use the right language for the task. The thing about structure and design is that, to me, it is much more boring of a topic to teach myself than the libraries and mechanics of languages. Is it bad to just plan on learning that stuff in classes? I agree with you that learning languages isn't really that big of a deal (though starting with Python and going to an assembly language would be... difficult), but I'm worried that employers would be looking to hire people that already know how to code in certain languages. Is this common practice? I definitely know that normal people that do not code are often impressed by "oh look, he knows all these languages 11!" If you could tell me if this somehow transfers to the workplace hiring process, I'd be appreciative. So, when I'm making a portfolio, do you think that for each and every project I should create a .txt or excel spreadsheet giving a basic layout of what the program does? Thanks for the advice, by the way. For programming design and structure, you will learn the basics, but like with everything else you'll learn in school, the basics are hardly enough to impress anybody. You will have to write and rewrite code a dozen times sometimes before you get an end product that not only works, but is easy to read and debug. Usually employers look for platform or task specific skills, like previous experience working on app development for mobile phones or doing front end work for a website. It doesn't matter if you found a way to write the mobile app in Lisp or did that front end work using COBOL (although they might look at you funny), just that experience will get you into an interview. After that, it's all about personality and perceived competence. More on that point, your projects aren't so much about what the end product was, but rather how well you can describe it and what you learned from it. If you want to emphasize that you're a fast learner, make a point of it when talking about a project. The focus on design and structure (as well as using the right tools for the task) is more of a skill that will reward you after you land that job/internship. A bit of a personal anecdote, I didn't know anything about Perl and very little about regex before I got the internship I have now. In fact, I just knew C/C++ and Java. Now I do ONLY back-end Perl development and a ton of regex, and the company I'm working for has already made it clear they want to hire me on after I graduate in May (after 2 months of working with them). That was due to the fact that I made great contributions in all of our planning stages and my code was easy to follow, well commented, and easy to modify/debug. | ||
|
klo8
Austria1960 Posts
On January 19 2014 02:44 Mr. Wiggles wrote: Hey, so I've been playing with something last night that I think maybe a couple of people here would be interested in. https://microcorruption.com/ Show nested quote + What is it? Your target is a small embedded device; a microcontroller running compiled C code. You get access to the device, disassembly of its code, and a low-level debugger and assembler. We "run" the devices, you interact with them via a vanilla web interface. At each level, you'll get a simple input that, owing to some C software bug, can be used to own the target. You'll use the debugger to reverse the target, find the input, and then deliver it to a "production" instance to beat the level. You'll face a series of revisions of the target, starting from "comically broken" and proceeding vendor-fix by vendor-fix through basic memory corruption, stack overflows, randomization, memory protection schemes, allocator vulnerabilities, and DRM-style software protection. All this happens on an architecture you've probably used, but likely never have written any code for. Have you ever reverse-engineered a program from its assembly code to understand what it's doing? That'll happen too. We're keeping a leaderboard, by completion time, CPU cycles, and input size. Part of the fun of a challenge like this is to see how others are doing in real-time. If you've done a lot of exploit development, you won't have much trouble. But we hope the real fun is reserved for the people who haven't: you'll get to play with concepts that, in the real world, involve tedious toolchain installs and comprehensive knowledge of the memory layouts of gigantic browser library codebases. You won't need any of that here: we're looking forward to seeing people who have never written a line of assembly beating people who've been doing this for years. It's been pretty fun so far, I've beaten the first 3 levels. You don't need any experience with exploit development, and knowing assembly helps, but it's pretty easy to pick up. They have a little manual attached for it: https://microcorruption.com/manual.pdf That's super cool. Just did the tutorial and I'm now doing the first level, I think I won't continue for today because I'm sick and concentrating is hard, but it looks like a lot of fun. | ||
|
Tobberoth
Sweden6375 Posts
I didn't even realize that's what the HSM-2 did at first, was quite disappointing to crack it enough to get "Access granted", yet no door opening ^^ EDIT: And there I solved it. I'm kind of surprised + Show Spoiler + that interrupt 7f completely bypasses the password. | ||
| ||
StarCraft 2 StarCraft: Brood War Calm Dota 2Shuttle Horang2 Jaedong actioN Mini EffOrt Hyun Light ZerO [ Show more ] Counter-Strike Other Games Organizations
StarCraft 2 • StrangeGG StarCraft: Brood War• AfreecaTV YouTube • intothetv • Kozan • IndyKCrew • LaughNgamezSOOP • Migwel • sooper7s Dota 2 |
|
StarCraft2.fi
Replay Cast
The PondCast
OSC
Demi vs Mixu
Nicoract vs TBD
Babymarine vs MindelVK
ForJumy vs TBD
Shameless vs Percival
Replay Cast
Korean StarCraft League
CranKy Ducklings
WardiTV 2025
SC Evo League
BSL 21
Sziky vs OyAji
Gypsy vs eOnzErG
[ Show More ] OSC
Solar vs Creator
ByuN vs Gerald
Percival vs Babymarine
Moja vs Krystianer
EnDerr vs ForJumy
sebesdes vs Nicoract
Sparkling Tuna Cup
WardiTV 2025
OSC
BSL 21
Bonyth vs StRyKeR
Tarson vs Dandy
Replay Cast
Wardi Open
StarCraft2.fi
Replay Cast
WardiTV 2025
StarCraft2.fi
PiGosaur Monday
|
|
|