[QUOTE=Giraffen93;25532957]It requires a username and password to store "a meter".[/QUOTE]
Yeah but we are talking about your serverside php script, there is no limit on the amount of times you can request it and how long between requests, and it has no notion of being logged in, the URL just takes a username and password each time you request it.
The time between requests are 10 seconds, else you are blocked. I have no idea how you can get around it.
[QUOTE=Giraffen93;25533017]The time between requests are 10 seconds, else you are blocked. I have no idea how you can get around it.[/QUOTE]
Could you unblock me? [img]http://sae.tweek.us/static/images/emoticons/emot-eng99.gif[/img] That is, if the server isn't supposed to be offline.
[QUOTE=Giraffen93;25533017]The time between requests are 10 seconds, else you are blocked. I have no idea how you can get around it.[/QUOTE]
For reference, This code worked:
[code]
while true
do
area=1000
rand=`head -1 /dev/urandom | od -N 1 | awk '{ print $2 }'`
echo `expr $rand % $area`
curl http://braxnet.org/unifrog/stat.php?username=<USERNAME>\&password=<PASSWORD>\&rnd=$rand\&ver=0.1.3
#sleep 0.5
sleep 5
clear
done
[/code]
(Tell me if you want me to remove it)
[QUOTE=Overv;25533049]Could you unblock me? [img_thumb]http://sae.tweek.us/static/images/emoticons/emot-eng99.gif[/img_thumb] That is, if the server isn't supposed to be offline.[/QUOTE]
Server is offline for me aswell.
Here's my version
[cpp]require( "open-uri" )
# First ask for user data
print( "Username: " )
username = gets.chomp()
print( "Password: " )
password = gets.chomp()
print( "Logging in...\n" )
# Start by retrieving the current score
open( "http://braxnet.org/unifrog/user.php?username=#{username}&password=#{password}" ) do | rawscore |
score = rawscore.string().split( ":" )[1]
if ( score.to_i.to_s == "0" )
print( "Invalid username and/or password!\n" )
break
else
score = score.to_i
end
print( "Your current score is: #{score.to_s}\n" )
while ( true )
print( "Cycling... " )
sleep( 10 )
score = score + 10
print( "#{score.to_s} meters\n" )
open( "http://braxnet.org/unifrog/stat.php?username=#{username}&password=#{password}&rnd=#{rand()}&ver=0.1.3" )
end
end[/cpp]
[QUOTE=layla;25532787]Looks alright? Too dark maybe?
[img_thumb]http://dl.dropbox.com/u/99765/5r4435s52.png[/img_thumb][/QUOTE]
I can't quite pin it down, but this seems familiar to me..
[QUOTE=Dr Magnusson;25533157]I can't quite pin it down, but this seems familiar to me..[/QUOTE]
Manic digger?
Lol my code
[cpp]using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Net;
using System.Threading;
namespace CycleFrog
{
public class Worker
{
public void cycleThatBitch()
{
Random r = new Random();
count = 0;
WebClient client = new WebClient();
while (true)
{
double x = r.NextDouble() * 123456;
int y = (int)(x * 100);
x = y / 100.0;
string address = "http://85.11.28.250/unifrog/stat.php?username=r4nk_&password=####&rnd=" + x.ToString() + Worker.version;
string text = client.DownloadString(address);
count++;
}
}
public static string version = "";
public double count;
}
class Program
{
static void Main(string[] args)
{
if( args.Length >= 2 )
Worker.version = args[1];
Console.Write("Using suffix:" + Worker.version );
int numThreads = 7;
List<Worker> workers = new List<Worker>();
for( int i = 0; i < numThreads; i++ )
{
Worker t = new Worker();
new Thread( t.cycleThatBitch ).Start();
workers.Add( t );
}
while( true )
{
double count = 0;
for( int i = 0; i < numThreads; i++)
{
count += workers[i].count;
}
Console.Write( count );
Console.SetCursorPosition(0, 1);
}
}
}
}[/cpp]
[img]http://www.imgdumper.nl/uploads3/4cbf40d5cd4be/4cbf40d5c193a-off.png[/img]
Does anyone know why the unprojected position is off like that? I just used gluUnProject to get the normal from my camera position and solved for z = 0 to get the ground position. The offset is smaller the closer the point is. Also, the bigger the zfar value, the smaller the offset.
Yeah, here's the situation.
I have 2 monitors to my main computer. The cables are all messed up.
My server is monitorless.
I don't want to unplug one of my monitors and carry it to the other side of the room to the server and then carry it back.
I'm lazy.
[QUOTE=Giraffen93;25533902]Yeah, here's the situation.
I have 2 monitors to my main computer. The cables are all messed up.
My server is monitorless.
I don't want to unplug one of my monitors and carry it to the other side of the room to the server and then carry it back.
I'm lazy.[/QUOTE]
[url]http://www.tightvnc.com/download.php[/url]
For future reference
I pushed "Block all traffic" by accident. I use RDP.
[QUOTE=layla;25532787]Looks alright? Too dark maybe?
[img_thumb]http://dl.dropbox.com/u/99765/5r4435s52.png[/img_thumb][/QUOTE]
[img]http://img216.imageshack.us/img216/5074/freeinternetei8.png[/img]
[QUOTE=DevBug;25535005][img_thumb]http://img216.imageshack.us/img216/5074/freeinternetei8.png[/img_thumb][/QUOTE]
[img]http://anyhub.net/file/freeinternetei8.png[/img]
:saddowns:
Also, though the image may be PNG now, it didn't save it from the JPEG artifacts it had before.
[img_thumb]http://i56.tinypic.com/126e8m8.png[/img_thumb]
Easier to read :3:
[QUOTE=ZeekyHBomb;25535289][img_thumb]http://anyhub.net/file/freeinternetei8.png[/img_thumb]
:saddowns:
Also, though the image may be PNG now, it didn't save it from the JPEG artifacts it had before.[/QUOTE]
That just adds to the authenticity of it and its 1998 look.
[QUOTE=Dj-J3;25535326][img_thumb]http://i56.tinypic.com/126e8m8.png[/img_thumb]
Easier to read :3:[/QUOTE]
"den" Don't mix swedish with english in an app D:
My work at reinventing approximately one and a half wheels is throwing segfaults from most interesting places.
[editline]20th October 2010[/editline]
[url]http://codepad.org/M92mHOzM[/url]
Behold.
[QUOTE=Overv;25533374]Does anyone know why the unprojected position is off like that? I just used gluUnProject to get the normal from my camera position and solved for z = 0 to get the ground position. The offset is smaller the closer the point is. Also, the bigger the zfar value, the smaller the offset.[/QUOTE]
I made the offset a lot smaller now and independent of zfar value, but it still exists. What makes it even more interesting is that the issue is nonexistent on Linux.
Awwright, got a monitor, now i can start it
also fixed the spam problem.
[QUOTE=esalaka;25535342]My work at reinventing approximately one and a half wheels is throwing segfaults from most interesting places.
[editline]20th October 2010[/editline]
[url]http://codepad.org/M92mHOzM[/url]
Behold.[/QUOTE]
Line 48:
You're forgetting to set li->next to NULL.
Line 57:
You could cache the result of strlen and use memcpy for additional speed.
Line 179:
free( li );
li = NULL;
Let's access something from li in the for-loop nao :D
You're also forgetting to free the first element of the list in freeFlagList.
It never ceases to amaze me how quickly fads start up in this thread.
It's amazing :v:
[QUOTE=ZeekyHBomb;25535757]Line 48:
You're forgetting to set li->next to NULL.
Line 57:
You could cache the result of strlen and use memcpy for additional speed.
Line 179:
free( li );
li = NULL;
Let's access something from li in the for-loop nao :D
You're also forgetting to free the first element of the list in freeFlagList.[/QUOTE]
Line 48 already fixed.
Cache the result? Why? strcpy is only ever needed once for one value.
179: The execution never gets there.
Don't ask me why.
Well, i'm moving it to a new thread, bye
What. I fixed that and [B]suddenly everything works[/B].
My debug messages must've been borked.
[editline]21st October 2010[/editline]
Oh damn you, you unicycling frog.
[editline]21st October 2010[/editline]
There's still one problem:
[code]$../bin/alchemist -fuck -u -cunt -k
Initializing new list at 0xA1E010...
Fast-forwarding to end of list...
New instance is now at 0xA1E060
Fast-forwarding to end of list...
New instance is now at 0xA1E090
Fast-forwarding to end of list...
New instance is now at 0xA1E0E0
list ain't NULL!
list == { 'f', "uck", 0xA1E060, 0x0 }
list == { 'u', "<NO VALUE>", 0xA1E090, 0xA1E010 }
list == { 'c', "unt", 0xA1E0E0, 0xA1E060 }
0xA1E0E0, 0x0, 0xA1E090
Freeing k
Freeing c
Freeing u
Freeing f
[/code]
[editline]21st October 2010[/editline]
Er, that is, the fourth member in the list is never printed.
[editline]21st October 2010[/editline]
Actually, not just the fourth one. To be exact, the last member is never printed.
[QUOTE=esalaka;25535905]Line 48 already fixed.
Cache the result? Why? strcpy is only ever needed once for one value.
179: The execution never gets there.
Don't ask me why.[/QUOTE]
I mean like
[cpp]const size_t len = strlen( value ) + 1;
li->value = ( char * ) malloc( len );
memcpy( li->value, value, len ); //strcpy doesn't have to recalculate the length / copy char by char :)[/cpp]
Well, it might crash before reaching the free-function.
Only other think I can see without debugging is line 145 that you didn't check the length of argv[i].
Possibly use unsigned char instead of char for the cur-variable.
Unless .. is argv[0 <= n < argc] defined to be a valid pointer?
[editline]20th October 2010[/editline]
[QUOTE=esalaka;25535973]Actually, not just the fourth one. To be exact, the last member is never printed.[/QUOTE]
Well, you only print the ones, which have a valid next :P
[QUOTE=esalaka;25535973]What. I fixed that and [B]suddenly everything works[/B].
My debug messages must've been borked.
[editline]21st October 2010[/editline]
Oh damn you, you unicycling frog.
[editline]21st October 2010[/editline]
There's still one problem:
[code]$../bin/alchemist -fuck -u -cunt -k
Initializing new list at 0xA1E010...
Fast-forwarding to end of list...
New instance is now at 0xA1E060
Fast-forwarding to end of list...
New instance is now at 0xA1E090
Fast-forwarding to end of list...
New instance is now at 0xA1E0E0
list ain't NULL!
list == { 'f', "uck", 0xA1E060, 0x0 }
list == { 'u', "<NO VALUE>", 0xA1E090, 0xA1E010 }
list == { 'c', "unt", 0xA1E0E0, 0xA1E060 }
0xA1E0E0, 0x0, 0xA1E090
Freeing k
Freeing c
Freeing u
Freeing f
[/code]
[editline]21st October 2010[/editline]
Er, that is, the fourth member in the list is never printed.
[editline]21st October 2010[/editline]
Actually, not just the fourth one. To be exact, the last member is never printed.[/QUOTE]
[cpp]for( ; list->next != NULL; list = list->next )[/cpp]
The last flag's next is null.
Oh fuck I'm dumb. Maybe I shouldn't code at night :downs:
Thanks for fixing my code, anyway, it seems to work flawlessly now!
Hmm nifty, looks like MSVC++ 2010 library has support for regex which is exactly what I wanted to use to rewrite the assembler.
Is the linear order of multidimensional arrays part of the C++ standard?
Sorry, you need to Log In to post a reply to this thread.