The online racing simulator
Searching in All forums
(921 results)
DarkTimes
S2 licensed
Quote from GeForz :And stats for 1000 server don't mean anything for "tens of millions"

That's like saying "The coin landed on heads twice so it is 100% it lands on heads for 200 tosses"

Not really, because two times is statistically insignificant, but a thousand is a pretty reasonable number. That's about the same number of people they ask in government polling.
DarkTimes
S2 licensed
How do I unsubscribe from the news email?
DarkTimes
S2 licensed
Yes, I'm much the same, I'm the kind of guy who likes to read every headstone in the graveyard.
DarkTimes
S2 licensed
It's actually pretty hard to place a cap on an oil-well that's 18 inches in diameter and a mile underwater. Of course this is only temporary, we'll see how the relief well pans out.
DarkTimes
S2 licensed
Quote from E.Reiljans :http://blog.sucuri.net/2010/06 ... es-interesting-stats.html

Looks like totally free and open-source nginx has almost same market share as IIS.

Well I guess, but given how many web servers there are in the world, a 3% difference still tallies to tens of millions of servers, so not really that close. What's probably more interesting is how far behind everyone else seems to be...
DarkTimes
S2 licensed
An option would be to create some sort of browser applet (Flash, Silverlight, Java etc..) and use that to upload the data to your site. This way you could vastly reduce the amount of data that gets transferred, also you offload the actual parsing of the replay to the users computer.
DarkTimes
S2 licensed
Quote from amp88 :Programming is most certainly not like it's commonly portrayed in the movies and TV.

Ah yes, the hollywood operating system.
DarkTimes
S2 licensed
A few weeks ago I would have said that Hulk was the best, just because they have all been pretty unspectacular, but in the last couple of races Kobayashi has been solid and has scored some decent points, so my vote goes to him.
DarkTimes
S2 licensed
Quote from amp88 :You'd be better off with a Set here rather than an List. Depending on the implementation it should give you O(1) access rather than O(n) for the list. I'm not familiar with the C# syntax for a set though.

Hmm, is that true? I thought a set was between O(1) and O(n) in performance. It's not O(n) as there is not a 1 to 1 relation between the performance and the number of items, but because of the hashing process it's not actually O(1) either. Ah, I dunno. Well anyway, yeah a set will probably be faster in .NET, I wouldn't be able to say for sure without doing some performance tests. A generic list is plenty fast enough for this operation though and I've rarely ever seen a set used in .NET code.
Last edited by DarkTimes, .
DarkTimes
S2 licensed
I'm really not sure what your code is doing, but if I was going to make a swear filter, I'd do something like this.

Presuming you have a file called "swear.txt" in the same folder as your program's exe file that has a banned word on each line:

boobs
willy
knickers
thatcher

First of all I would load that file into memory when the programs starts, with some simple code like this:

// List to store swear words.
List<string> swearwords = new List<string>();

void LoadSwearWords()
{
// Get the path to the 'swear.txt' file.
string file = Path.Combine(Environment.CurrentDirectory, "swear.txt");

// Open text file for reading.
using (TextReader reader = new StreamReader(file))
{
// Loop through each line in the file.
string line;
while ((line = reader.ReadLine()) != null)
{
// Remove any whitespace and cast to lower case.
string word = line.Trim().ToLower();

// Add to list in memory.
this.swearwords.Add(word);
}
}
}

Once I had the list of swear words in memory, I would then need some code to check if a message contained a swear word.

bool MessageContainsSwearWord(string message)
{
// This regex splits words, trims whitespace and removes punctuation.
string[] words = Regex.Split(message, @"\W+");

// Loop through each word and check if it's a swear word.
foreach (string word in words)
{
if (this.swearwords.Contains(word.ToLower()))
{
return true;
}
}
return false;
}

The MessageContainsSwearWord method returns true if the message contains a swearword or false otherwise. You could use it like this:


string message = "This message contains the word boobs";

if (MessageContainsSwearWord(message))
{
Console.WriteLine("That message is filthy!");
}
else
{
Console.WriteLine("Aww, what a well-spoken boy.");
}

// OUTPUT: That message is filthy!

I hope that helps!

You can download my test project below (requires VS Express 2010).
Last edited by DarkTimes, .
DarkTimes
S2 licensed
On the BBC you can choose feeds.
DarkTimes
S2 licensed
Quote from amp88 :It's all well and good encrypting it on the server side, but sending it in plain text over the Internet is NOT secure!

Yes, I agree. Sending the password as plain-text in an email is crazy. And that fact they encrypt passwords on the backend is not a selling point, it's basic web development 101.

Also what is the point in asking people to answer several confusing "are you a spambot" questions and when you have a CAPTCHA on the signup form anyway? Just get a CAPTCHA that actually works... reCAPTCHA is very secure for several reasons (basically because the words it asks you to transcribe are words it's been found almost impossible for an OCR program to decipher).
Last edited by DarkTimes, .
DarkTimes
S2 licensed
Hmm... so time, money and hassle are more important than a life? Nice philosophy you have there. If the police can resolve this peacefully then they should.
DarkTimes
S2 licensed
Basically a crazy guy who shot his ex-girlfriend, her boyfriend and a policeman. He's been hiding rough in the countryside for the last week. Apparently he's been encircled by armed-police who are trying to talk him out of shooting himself. It's all very dramatic and the TV coverage is bizarre.
DarkTimes
S2 licensed
It's on BBC news now.

http://news.bbc.co.uk/sport1/h ... t/formula_one/8802712.stm

I do have to say that in terms of driving, I fail to see how bringing in someone new will help them finish races, as they'll have to spend several races showing another rookie the ropes. Maybe it's a money thing...
Last edited by DarkTimes, .
DarkTimes
S2 licensed
According to BBC F1 on Twitter, Senna is out this weekend to be replaced by Sakon Yamamoto. No information as to why.
Last edited by DarkTimes, .
DarkTimes
S2 licensed
Quote from jur :But (if I remember correctly) minimum InSim packets per second is 3, so it might be a problem.

Actually it would be quite fun to add a packets per second readout to InSimSniffer, as I have no idea if your figure is correct.

Edit: With everything on max I got up to 40 packets per second before InSimSniffer caused LFS to throw a WSAEWOULDBLOCK error (known issue with LFS in TCP mode), but that was a full 32 player race with the MCI interval at 50ms.

Without MCI packets turned on the average is about 3-4 packets per second.
Last edited by DarkTimes, .
DarkTimes
S2 licensed
Quote from Intrepid :What? Rip-off? How? Intellectual property is hugely questionable in the first place, but artists don't have a divine right to be millionaires because they write a catchy tune. Some artists actually have some common sense and accept the market has evolved and have moved more into making money in the live arena. This old out-of-date attachment to intellectual property is really making musicians like Prince look like morons.

I never thought I'd say this, but I completely agree with you.

I feel dirty.
DarkTimes
S2 licensed
Weather to be nice and sunny.

Why doesn't it rain in Britain when you want it to.
DarkTimes
S2 licensed
Yeah, I get you. The reflection code is really only useful for debugging and diagnostic purposes, it probably shouldn't be used (or needed) in production code. That being said, it's not that slow, InSimSniffer uses this type of reflection and it runs pretty fast.
DarkTimes
S2 licensed
Yeah true, but with IIS being the second most popular server after Apache, it's nice to finally have a free version. Also the new ASP.NET MVC platform is very nice, so it's a solid combination.
DarkTimes
S2 licensed
I've been messing around with getting Spark to work as a WCF web service, so you can run it from a web site. I've not written anything like this before, so it's a bit of a learning curve, but I'm making slow progress. With Spark as a web service you could build Silverlight applications and lots of other things. Happily it seems that Spark is flexible enough that it won't require any changes to the core library, all I need to do is to create a WCF web service that relays the InSim data to a client, and then create a new Spark.ISocket derived class that, instead of wrapping a TCP socket, wraps the web service EndPoint instead. Then it will be easy to create Flash-style InSim apps using Silverlight and run Spark from an ASP.NET web site.
Last edited by DarkTimes, .
DarkTimes
S2 licensed
I see that Microsoft are releasing a free express version of their IIS web server, which will work on any version of Windows.
Quote :
  • It’s lightweight and easy to install (less than 10Mb download and a super quick install)
  • It does not require an administrator account to run/debug applications from Visual Studio
  • It enables a full web-server feature set – including SSL, URL Rewrite, Media Support, and all other IIS 7.x modules
  • It supports and enables the same extensibility model and web.config file settings that IIS 7.x support
  • It can be installed side-by-side with the full IIS web server as well as the ASP.NET Development Server (they do not conflict at all)
  • It works on Windows XP and higher operating systems – giving you a full IIS 7.x developer feature-set on all OS platforms

http://weblogs.asp.net/scottgu ... roducing-iis-express.aspx
Last edited by DarkTimes, .
DarkTimes
S2 licensed
I'm not sure what you mean, what code are you specifically referring to?
Last edited by DarkTimes, .
DarkTimes
S2 licensed
95 was also Mellon Collie and the Infinite Sadness.
FGED GREDG RDFGDR GSFDG