Hey guys, I thought it might interest you that I updated [url=http://github.com/sahchandler/buildit]buildit[/url] today, with a new feature.
If you have a compiler not on your system path you can go System.add_path(directory), and it will temporarily add that directory to the system path, so if you don't know shit about system path's you're pretty much set, as you can just add the directory with the executables in it :P
Should be posting a thread on this soon, but if you want you can idle in the [url=iirc://irc.freenode.net/##buildit]IRC channel[/url] and receive constant updates there. :) (it's just me and a bot right now D:)
fuck sorting algorithms :/
[QUOTE=Kylegar;19601790]fuck sorting algorithms :/[/QUOTE]
They are a bitch, aren't they. :(
[editline]lololol[/editline]
Just Kidding! :v:
[QUOTE=Shanethe13;19598350]Just messing with the Slick API for Java right now. I've been looking for a Java equivalent to SDL/SFML, and in the five minutes I've messed with it, Slick seems nice so far. It handles window creation, input, graphics, and sound, letting you worry about the actual application logic itself.[/QUOTE]
I've been using it too for a Java game. It is nice for all the reasons you stated. I just wanted to do the game logic and not worry about doing the low-level OpenGL stuff and making it look right on various GPUs.
Another nice thing about Java and Slick is that you can make an applet to embed into a browser.
[QUOTE=Killuah;19589734]All I can work with is pictures, really.[/QUOTE]
VirtualDub can load image sequence too.
And with this you can export directly to APNG:
[url]http://vdubapngmod.sourceforge.net/[/url]
I'm gonna start teaching a friend c++, I never had a reason to use it properly, and doing a spoon feeding should refresh/extend my knowledge greatly. I'm just happy he already knows basic programming concepts, so that makes it a pretty easy start.
Would it be a good idea to keep an online documentation? I know there are loads of resources out there, but I like the idea of having the base for a small learning community.. I just don't know if I find more people willing to participate.
[QUOTE=Baroth;19605800]I'm gonna start teaching a friend c++, I never had a reason to use it properly, and doing a spoon feeding should refresh/extend my knowledge greatly. I'm just happy he already knows basic programming concepts, so that makes it a pretty easy start.
Would it be a good idea to keep an online documentation? I know there are loads of resources out there, but I like the idea of having the base for a small learning community.. I just don't know if I find more people willing to participate.[/QUOTE]
You don't know C++ and you are going to teach someone C++.
Do them a favour and tell them to get a book, or they will be likely be writing a messy jumble of C and C++ code.
[QUOTE=Jallen;19605911]You don't know C++ and you are going to teach someone C++.
Do them a favour and tell them to get a book, or they will be likely be writing a messy jumble of C and C++ code.[/QUOTE]
It's not like I don't know my way around, and I'll be teaching by book, not just by myself. I think I should get someone to supervise the later areas tho. I know what you mean with messy jumble, the way I was taught was try and error, without actually checking if what we were doing was wrong :(
Just spent 2 hours refactoring and multithreading the backend for Hunch for android.
now code that once looked like this:
[cpp]
new Thread()
{
@Override
public void run()
{
Map< String, String > params = new HashMap< String, String >();
params.put( "topicId", String.valueOf( topicId ) );
params.put( "topicImgSize", "64x64" );
params.put( "responseImgSize", "32x32" );
params.put( "questionImgSize", "32x32" );
api.nextQuestion( params, new HunchAPI.Callback()
{
@Override
public void callComplete( HunchObject resp )
{
Message m = handler.obtainMessage( Const.TOPIC_PLAY_INIT, resp );
handler.sendMessage( m );
}
} );
}
}.start();
[/cpp]
now looks like this:
[cpp]
api.nextQuestion( String.valueOf( topicId ), null, null, "32x32", "32x32", "64x64",
new HunchNextQuestion.Callback()
{
@Override
public void callComplete( HunchNextQuestion resp )
{
startTopic( resp );
}
} );
[/cpp]
Though it's not really programming, it's maths for my comp science degree so it's almost programming, and here I'm sure cathbadh or nullsquared can answer whereas other areas of fp will just troll.
I have a question regarding Logarithms.
[quote]Log 12 - Log 4 + Log 3[/quote]
Now I know the usual order of operations is BODMAS, so that would indicate addition before subtraction, is that the same here? Because if I do...
[quote]Log 12 - (Log 4 + Log 3)[/quote]
Then I get Log 1
But if I do...
[quote](Log 12 - Log 4) + Log 3[/quote]
I get Log 9
So do I just follow the normal order of operations?
Just follow the normal order of operations. Think of them as f(a) - f(b) + f(c)
I mean f(a) + -f(b) + f(c)
and therefore the answer is Log 9
I'm pretty sure it is the second one.
[QUOTE=Jallen;19608089]Now I know the usual order of operations is BODMAS, so that would indicate addition before subtraction, is that the same here? Because if I do...[/QUOTE]
The "AS" in BODMAS stands for Addition *and* subtraction, and therefore is executed in standard left-to-right order, the same way you did it in grade 3.
Therefore "Log 12 - Log 4 + Log 3" is just that, Log 12 - Log 4 + Log 3, (or simply: Log ( 12 / 4 * 3 ) = Log (9))
"(Log 12 - Log 4) + Log 3" works because it's the same as "Log 12 - Log 4 + Log 3" under normal rules.
[QUOTE=gparent;19608266]The "AS" in AS stands for Addition *and* subtraction, and therefore is executed in standard left-to-right order, the same way you did it in grade 3.
Therefore "Log 12 - Log 4 + Log 3" is just that, Log 12 - Log 4 + Log 3, (or simply: Log ( 12 / 4 * 3 ) = Log (9))[/QUOTE]
Ok cool thanks :buddy:
I'd have to agree with the above two posts. As far as I've been taught, Multiply/Divide and Add/Subtract are essentially one step each, and you just do addition and subtraction (or multiplication and division) from left to right 'at the same time', meaning that your second grouping is the correct way.
[editline]07:30AM[/editline]
ninja'd by gparent >_>
[QUOTE=andersonmat;19601801]They are a bitch, aren't they. :(
[editline]lololol[/editline]
Just Kidding! :v:[/QUOTE]
asdf
yea, I had to write a quicksort algorithm for a class yesterday in C, which highly influenced that post XD. I don't get why they spend so long on this shit...once you get out of classes, they are all written for you, and, the concept is pretty simple. really, it's just a mind excersize nowadays
Wow, we made it to V7...
Anyway, trying to make a game like Bullet Candy...
Trying.
Stupid noob c++ question again
[cpp]Is there a way to make a default parameter = another paramater
void f(int 1, int 2 = 1, int 3 = 1);
Or should I just do this
void f(int 1, int 2, int 3);
void f(int 1){f(1, 1, 1);};[/cpp]
the bottom way is the best
I don't think there's a way to do it other than your code below.
[QUOTE=Pj The Dj;19610529]Stupid noob c++ question again
[cpp]Is there a way to make a default parameter = another paramater
void f(int 1, int 2 = 1, int 3 = 1);
Or should I just do this
void f(int 1, int 2, int 3);
void f(int 1){f(1, 1, 1);};[/cpp][/QUOTE]
I always do like this:
[cpp]
void f(int a, int b = 1, int c = 1);
[/cpp]
Less to write than the second one :v:
[QUOTE=Eleventeen;19610659]the bottom way is the best[/QUOTE]
Well yeah, the only way that will work is definitely the best.
But otherwise default parameters would be preferred.
[editline]06:36PM[/editline]
[QUOTE=dezek;19610730]I always do like this:
[cpp]
void f(int a, int b = 1, int c = 1);
[/cpp]
Less to write than the second one :v:[/QUOTE]
That won't work, in his code the [b]parameter[/b] is called "1". At run time, the value could be anything.
Ahh, nevermind. Got a bit confused with his numeric named variables :v:
Alright thanks guys. It doesn't really matter, for some reason I just thought it might be nicer to try and put it into one function.
[QUOTE=gparent;19610712]I don't think there's a way to do it other than your code below.[/QUOTE]
Top method would work.
[QUOTE=Archive;19610821]Top method would work.[/QUOTE]
Go ahead and try to use it, please.
[QUOTE=gparent;19610872]Go ahead and try to use it, please.[/QUOTE]
Worked for me when I did it :\
[QUOTE=Archive;19611014]Worked for me when I did it :\[/QUOTE]
No, it did not.
What works is this:
[cpp]
void f(int i, int j = 0)
{
}
[/cpp]
What [i]doesn't[/i] work (in standard C++, and apparently under both MSVC and GCC):
[cpp]
void f(int i, int j = i)
{
}
[/cpp]
However, if you know of a compiler extension which makes it work, I'm interested.
I should have used letters instead of numbers in the example heh. Annoyingly/coincidentally the function I was trying to do this on had a single letter parameter anyway.
[QUOTE=gparent;19611094]No, it did not.
What works is this:
[cpp]
void f(int i, int j = 0)
{
}
[/cpp]
What [i]doesn't[/i] work (in standard C++, and apparently under both MSVC and GCC):
[cpp]
void f(int i, int j = i)
{
}
[/cpp]
However, if you know of a compiler extension which makes it work, I'm interested.[/QUOTE]
I'm stupid.
I was reading it all as the first code you posted, rated myself box.
Sorry, you need to Log In to post a reply to this thread.