SDL/SFML is a great start; if you want to go more low-level I suggest jumping on OpenGL directly, plenty of tutorials about. Does require some extra libraries though typically (GLEW, GLFW and later on ASSIMP)
The Big Programming Thread - Page 483
| 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. | ||
|
KaiserJohan
Sweden1808 Posts
SDL/SFML is a great start; if you want to go more low-level I suggest jumping on OpenGL directly, plenty of tutorials about. Does require some extra libraries though typically (GLEW, GLFW and later on ASSIMP) | ||
|
urboss
Austria1223 Posts
On May 21 2014 15:02 Release wrote: In java, I cannot seem to create a generic array. Task<T>[] t = new Task<T>[2]; however, a generic arraylist works; ArrayList<Task<T>> t = new ArrayList<Task<T>>(); I'm not sure why as a Task<T> is just an object, and Object[] is usually a valid array declaration and Object[i] is usually a valid array of size i. Array has a method called newInstance: http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/reflect/Array.html#newInstance(java.lang.Class, int[]) | ||
|
iremnant3847
Taiwan269 Posts
| ||
|
sluggaslamoo
Australia4494 Posts
On May 21 2014 16:40 iremnant3847 wrote: Could anyone tell me if MATLAB is a useful language? I'm a first-year in college and I just finished taking a class that taught it. Prior to the spring semester, I had never heard of it, so I can't tell whether it's useful or necessary to know. I've got some spare time on my hands so if I determine it to be useful, I think I'll put in some time to learn it a bit more. Only if you intend to become a professor in science or something. | ||
|
iremnant3847
Taiwan269 Posts
On May 21 2014 17:23 sluggaslamoo wrote: Only if you intend to become a professor in science or something. I figured as much. Oh well, it was only for a semester. | ||
|
teamamerica
United States958 Posts
On May 21 2014 17:26 iremnant3847 wrote: I figured as much. Oh well, it was only for a semester. I know of engineers and machine learning people who use it. It's fast for prototyping stuff, although for production you'd prolly hammer it out in c++/java once you got the algorithms down. There's also gnu octave but in school matlab should be easy to access. To the guy asking about parameterized array, you should look up the generics tutorial on sun site. Lots of gotchas that maybe you don't expect otoh. It's related to type erasure and arrays being covariant and java used to not have generics so of arrays weren't covariant your code would be sad ![]() | ||
|
Rollin
Australia1552 Posts
| ||
|
nunez
Norway4003 Posts
On May 21 2014 17:26 iremnant3847 wrote: I figured as much. Oh well, it was only for a semester. no, it's used in industry as well. but i dunno if it's worth putting extra effort into. | ||
|
MichaelEU
Netherlands816 Posts
| ||
|
Shield
Bulgaria4824 Posts
| ||
|
Kambing
United States1176 Posts
On May 22 2014 06:16 darkness wrote: Can anyone explain the "on the fly model checking" as in Formal Methods? I understand that it does it at run-time, and that it doesn't have to construct/compile the whole product to check stuff but is that all? (Forewarning: I'm not a verification expert, so this is my own understanding based off my reading of the literature.) With respect to SPIN: Spin works on-the-fly, which means that it avoids the need to preconstruct a global state graph, or Kripke structure, as a prerequisite for the verification of system properties. This makes it possible to verify very large system models. Verification engines work by modeling the possible states of a program in a finite state automata. With such a model, the problem of determining if the given program meets some specification is reduced to reachability in that automata. The state space for all but the most trivial of programs is too large to compute up front in its entirety. So on-the-fly analysis constructs only the part of the state space that is necessary to verify the property at hand. The Model Checker SPIN: http://spinroot.com/spin/Doc/ieee97.pdf Simple On-the-fly Automatic Verification of Linear Temporal Logic: http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.51.2625 | ||
|
Shield
Bulgaria4824 Posts
1) to help control how much of the product needs to be constructed by using the formula's negation 2) to help solve the main complexity (construction of full product) So nothing is actually said about 'run-time', haha. | ||
|
3FFA
United States3931 Posts
![]() | ||
|
Kambing
United States1176 Posts
On May 22 2014 14:11 darkness wrote: Thanks! I've managed to find what my Formal Methods professor has said, and it's summed up as: 1) to help control how much of the product needs to be constructed by using the formula's negation 2) to help solve the main complexity (construction of full product) So nothing is actually said about 'run-time', haha. Yeah, there are classes of verification tools that run at runtime. These typically operate over traces of computation rather than models of the state space. And there are, of course, hybrid approaches that use trace information to prune the state space. | ||
|
Manit0u
Poland17496 Posts
Code (mixed with pseudocode):
The problem I'm facing is actually getting the required elements. <div> "x" is not unique on the page (there are many of them), neither are its children ("y") but I must find specific y's in specific x... With getElementById it would be piss simple, like this it's not and unfortunately I can't give unique id to the x divs (very ugly). Any help? | ||
|
urboss
Austria1223 Posts
Once when you pass it to the function and once when you iterate over it. Ah I guess that's just pseudo code. In jquery you have .prev() and .next() In pure JavaScript there is a property of elem, something like .previousSibling and .nextSibling | ||
|
Manit0u
Poland17496 Posts
| ||
|
Shield
Bulgaria4824 Posts
For example, S == [[Flash, Stork, Bisu, JaeDong]] <-- this is a bag i. S [bag union symbol from glossary] [[Bisu]] = [[Flash, Stork, Bisu, JaeDong, Bisu]] <-- no problem here, should be correct ii. S ⊕ {Bisu -> 3} = [[Flash, Stork, Bisu, JaeDong, Bisu, Bisu]] <-- no problem, Bisu has to occur 3 times iii. S U {NaDa -> 3} = ? <--- how do you solve this? I thought bag union should be used rather than simple union, but I've been told the answer is [[Flash, Stork, Bisu, JaeDong, NaDa, NaDa,NaDa]]. Is 'U' indeed valid for bags? Isn't this a job for the bag union instead? | ||
|
ZenithM
France15952 Posts
On May 23 2014 04:32 darkness wrote: Is anyone familiar with the Z notation? I'm getting really confused by bags (multisets). Glossary can be found here: https://www.st.cs.uni-saarland.de/edu/se/2005/zedglossary.pdf For example, S == [[Flash, Stork, Bisu, JaeDong]] <-- this is a bag i. S [bag union symbol from glossary] [[Bisu]] = [[Flash, Stork, Bisu, JaeDong, Bisu]] <-- no problem here, should be correct ii. S ⊕ {Bisu -> 3} = [[Flash, Stork, Bisu, JaeDong, Bisu, Bisu]] <-- no problem, Bisu has to occur 3 times iii. S U {NaDa -> 3} = ? <--- how do you solve this? I thought bag union should be used rather than simple union, but I've been told the answer is [[Flash, Stork, Bisu, JaeDong, NaDa, NaDa,NaDa]]. Is 'U' indeed valid for bags? Isn't this a job for the bag union instead? The difference between multiset sum and union is showcased in examples at the end of this section here: http://en.wikipedia.org/wiki/Multiset#Multiplicity_function Edit: In your case, [Bisu, NaDa] [bag union symbol] [NaDa -> 3] = [Bisu, NaDa -> 4] while [Bisu, NaDa] U [NaDa -> 3] = [Bisu, NaDa -> 3] | ||
|
Shield
Bulgaria4824 Posts
| ||
| ||

