The Big Programming Thread - Page 569
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. | ||
Requizen
United States33802 Posts
| ||
Manit0u
Poland17252 Posts
On January 23 2015 08:00 travis wrote: does swing have a menu thats like what you would see in a typical old school rpg? like where it says like 'items' 'stats' 'equip' and you can pick between them what swing component would i want to use for that? I guess i'll need to learn to make my own? or would I use a "list" for this? You're trying to rush things too much travis. Please slow down, work on some basic stuff (without GUI) until you get the gist of it and then move on to more complex things. Most of your problems stem from not knowing the basics and trying to work with something that's intermediate level at least. It's like trying to play poker without knowing which combination beats which so you're just blindly trying things out in hope they'll work. On January 23 2015 08:02 Requizen wrote: Anyone have experience working with Bootstrap and MVC? I'm trying to apply a theme that our UX team bought and I can't for the life of me get it to apply to the site. What exactly seems to be your problem? I work with Bootstrap and MVC frameworks all the time. | ||
Deleted User 3420
24492 Posts
On January 23 2015 09:15 Manit0u wrote: You're trying to rush things too much travis. Please slow down, work on some basic stuff (without GUI) until you get the gist of it and then move on to more complex things. Most of your problems stem from not knowing the basics and trying to work with something that's intermediate level at least. It's like trying to play poker without knowing which combination beats which so you're just blindly trying things out in hope they'll work. i am aware of this but I am still learning and your method is extremely boring lol I feel like I have learned a ton for how recently I started this for the record i am reading the book you told me to read. just slowly because it's so dry. and really just starting with that book, it is so hard to follow right from the beginning it's like im in 6th grade reading shakespeare. the problem is the author starts using terminology that you don't really use in your everyday life without putting the terminology in context, and then it makes it impossibly hard to read at a reasonable pace | ||
Blisse
Canada3710 Posts
| ||
phar
United States1080 Posts
Programming requires a lot of patience to do well. As for the specific problem of line separating in java from above, it depends. If you need cross platform, something like String foo = String.format("First line%nSecond line"); is probably more readable. If you just need stuff to work on debug output for purely linux stack stuff, "\n" is sufficient. For a brief introduction into swing menus, see http://docs.oracle.com/javase/tutorial/uiswing/components/menu.html It is a lot to digest. It will also probably require some familiarity with callbacks or listeners (not exactly sure for swing). | ||
Prillan
Sweden350 Posts
On January 23 2015 01:32 herokiller_ wrote: I'm having troubles understanding monads (statet for example) and monads transformation Everyone has problems with monads. I even studied some category theory and have problems understanding them. I have no experience with using the state monad (I assume "statet" is a typo), but this seems like a good tutorial: https://en.wikibooks.org/wiki/Haskell/Understanding_monads/State | ||
Deleted User 3420
24492 Posts
+ Show Spoiler + and to learn | ||
Ropid
Germany3557 Posts
On January 23 2015 01:32 herokiller_ wrote: I'm having troubles understanding monads (statet for example) and monads transformation I'm just a noob and haven't worked through it fully myself, but here's stuff I have bookmarked: If you mean just understanding how monad transformers are used, maybe look through this tutorial: https://web.archive.org/web/20140821053740/http://www.grabmueller.de/martin/www/pub/Transformers.pdf It starts out with a code example without any monads, then adds several monad transformers onto that code while stopping and discussing a little after each step. This tutorial doesn't explain at all how it works behind the scenes, just shows how to use things. Someone seems to have collected the example code in the document and put it onto his github: https://gist.github.com/tatac1/badd810ad55919e57020 Another example I have bookmarked and which I wanted to look through in the future is this here: http://hrothen.github.io/2014/09/05/lets-build-a-browser-engine-in-haskell/ There's a tiny bit of StateT use in the second part where he builds a parser for html. That's all that's relevant with regards to StateT as he switches over to using Parsec afterwards. In his posts, the guy follows a series of articles about building a tiny browser engine in Rust. I guess that has to also be read to fully understand what's going on (might anyway be interesting as that Rust stuff looks kind of fun): http://limpet.net/mbrubeck/2014/08/08/toy-layout-engine-1.html That was all just stuff that might help to get a feel what monad transformers are about. If you meant you literally want to know how monad transformers do stuff in Haskell, I feel I pretty much have no idea. I have this here bookmarked about what monads actually do and how they work exactly in Haskell: http://mvanier.livejournal.com/ It's the blog posts that are titled "Yet Another Monad Tutorial (part ...)." That series of eight posts goes through things very slow and thorough and starts from the ground up. It does not go over monad transformers, only monads, but it seems to explain well how the code behind monads works. That might already help enough? The monads actually all seem to be just normal Haskell code (except for IO), and the reason the various monads got written is just to make life easier in certain situations. | ||
solidbebe
Netherlands4921 Posts
| ||
Manit0u
Poland17252 Posts
On January 23 2015 18:14 solidbebe wrote: where did foo come from? I never understood that http://en.wikipedia.org/wiki/Foobar On January 23 2015 12:53 travis wrote: alright manit0u to make you happy im gonna go through that book and while i do that i will do all the programmingbydoing.com assignments + Show Spoiler + and to learn Don't do it to make me happy. Do it for yourself. | ||
InvaderUK
225 Posts
On January 23 2015 01:32 herokiller_ wrote: I'm having troubles understanding monads (statet for example) and monads transformation i use haskell at work, so can confirm. it's like a burrito. | ||
Requizen
United States33802 Posts
On January 23 2015 09:15 Manit0u wrote: What exactly seems to be your problem? I work with Bootstrap and MVC frameworks all the time. This is my first time working with Bootstrap, I've done MVC work before. I'm using MVC 4 (for whatever reason that's what our company is using), and our UX team bought a Bootstrap template called Sugoi Admin. Every time I look up a guide to apply a Bootstrap Template to MVC, it just says "Install Bootstrap and then overwrite the CSS and JS files with the ones from the template" or something similar. But the one we bought has way more stuff inside it: ![]() The README just talks about Grunt (which I have never heard of prior to now), so I'm not really sure what to do. When I just overwrite the CSS and JS files, nothing happens on the site. So it's confusing to me. | ||
YourGoodFriend
United States2197 Posts
On January 24 2015 00:31 Requizen wrote: This is my first time working with Bootstrap, I've done MVC work before. I'm using MVC 4 (for whatever reason that's what our company is using), and our UX team bought a Bootstrap template called Sugoi Admin. Every time I look up a guide to apply a Bootstrap Template to MVC, it just says "Install Bootstrap and then overwrite the CSS and JS files with the ones from the template" or something similar. But the one we bought has way more stuff inside it: ![]() The README just talks about Grunt (which I have never heard of prior to now), so I'm not really sure what to do. When I just overwrite the CSS and JS files, nothing happens on the site. So it's confusing to me. So first off bootstrap and themes are just like using any css or js in that you need to include it in your project and then reference it in your code. We just did a similar thing and to start off you need to figure out what you are using, so start with the navigation open their dummy site (usually a index.html file) and then right click and inspect element and see what classes and ids they are using to make it look that way, then start adding in those to your code. It seems a bit daunting initially but just think of it as just regular css and js that you need to reference. Hope this helps **Grunt is a command line runner used for multiple different purposes usually around minifying your css and js or linting your js | ||
Blisse
Canada3710 Posts
ahahah | ||
Deleted User 3420
24492 Posts
but I keep looking at example java code, and the code will list that it is part of one package, and in one java file, but in the code it has more than one class but according to netbeans every class i make has to have it's own java file? | ||
Toadesstern
Germany16350 Posts
On January 24 2015 04:16 travis wrote: I am sure this is an incredibly dumb question to be asking but I keep looking at example java code, and the code will list that it is part of one package, and in one java file, but in the code it has more than one class but according to netbeans every class i make has to have it's own java file? There's a difference between .java and .class files. .class files are the bytecode-files the compiler generates for the VM and like you said, that's one file per class. | ||
Deleted User 3420
24492 Posts
On January 24 2015 04:29 Toadesstern wrote: There's a difference between .java and .class files. .class files are the bytecode-files the compiler generates for the VM and like you said, that's one file per class. You probably gave me this answer because what I said didn't make sense. It wasn't really what I was asking. I figured out my problem though, I wasn't nesting the class inside the first class, I was putting it outside of it | ||
nunez
Norway4003 Posts
triangular dirigibles, with 2 thrusters (rotational, translational), moving on the surface of a torus, all controlled by arrow keys on keyboard. rational simulation (integer arithmetic), converted to floating points for drawing when copied into gl buffer. 1 128 64k 256k is ok too (no lag), but video would not be fine (my connection too slow to upload worthwhile video). segfault at 512k, but naive implementation, so probably not difficult to make it scale further. | ||
Blisse
Canada3710 Posts
On January 24 2015 04:16 travis wrote: I am sure this is an incredibly dumb question to be asking but I keep looking at example java code, and the code will list that it is part of one package, and in one java file, but in the code it has more than one class but according to netbeans every class i make has to have it's own java file? In Java I believe you can have multiple classes inside a java file, but only the first class will be public to other files, so all the rest of the classes are private to the file. I'm a shitty Java developer so I might be wrong. | ||
spinesheath
Germany8679 Posts
On January 24 2015 05:38 Blisse wrote: In Java I believe you can have multiple classes inside a java file, but only the first class will be public to other files, so all the rest of the classes are private to the file. I'm a shitty Java developer so I might be wrong. It's not like that issue is of any importance, anyways. One class per file, not because you must, but because you can. | ||
| ||