Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror
×

Comment Re:areas of specialization (Score 1) 148

doesn't matter - you can divide the input number by 3 and if its exactly zero, then print fizz out.

What it? Result? It's only 0 if the input number was 0. You are probably thinking of remainder and in that case you would need to use modulo. There are various ways to get around of not using modulo, but that's not one.

Comment Re:1% (Score 3, Insightful) 148

You don't need to use mod for fizzbuzz. It's likely the most effective (besides precomputed tables), but there are several alternatives. To name some:

1. Create your own mod function (you can most likely leave out dealing with negatives and overflows as long as you just point that out). Given dividend X and divisor Y, while X>=Y: X=X-Y and finally return X.

2. Take human approach and convert the number to string. Skip 0/print it depending on definition. If last number is 0 or 5, it's dividable by 5. For dividable by 3, you loop thru the string and sum the numbers. Repeat until the length of string is 1. Now compare it to 3, 6 and 9 (you can convert it back to number or just compare the string of those). If it's true, it's dividable by 3.

Surely you could create at least one of those in some language you know?

Comment Re:Remove, replace with apt (Score 2) 413

You shouldn't judge operating system's versioning based on their kernel version (and from begin within, the kernel version can be very arbitrary, Linux's jump from last 2.4 to 2.6 was way bigger than it's jump from last 2.6 to 3.0). Otherwise you are saying that there's only one major version difference between Debian 2.0 (kernel 2.x) and Debian 7.0 (kernel 3.x) since the kernel has only been pumped up by one version.

Comment Re:Search is Google's answer to everything. (Score 1) 435

(Do you really intend to type all of: runas /profile /env /user:mymachine\administrator "mmc %windir%\system32\services.msc" ???)

No. Almost every program that needs admin permissions will ask for it automatically these days (mmc will ask it when it starts, some will ask it as needed). If it doesn't (like notepad and cmd), I will simply start the program with shift+ctrl+enter and that will make program to run as admin (it doesn't work from run prompt, but it does work from the searchpromptthing).

Comment Re:Expensive Bus? (Score 5, Informative) 123

Kutsuplus's price is 3.50 € ($4.73) + 0.45 €/km ($0.98/mile). For cabs, base price is 5.90€ ($7.97) € or 9€ ($12.16) depending on the time and the price per km is 1.52 € - 2.13€ depending on number of passengers ($3.31 - $4.63 per mile). The price for single mass transit ticket (inside Helsinki) is 2.80€ ($3.78) when bought from the driver and it's good for 60 minutes (or 80 minutes when bought from certain busses).

Comment Re:Huh? (Score 1) 133

The terminology in article confused me as well. It's talking about "enterprise single sign-on" which actually means something different from what Crowd actually seems to provide. It's usually used to refer software that does SSO to desktop applications (well known software in that sector are like Oracle ESSO, NetIQ (formerly Novell) SecureLogin, IBM SAM ESSO (formerly IBM TAM ESSO)). Crowd, however, seems to be WebSSO+IDM solution.

Slashdot Top Deals

The key elements in human thinking are not numbers but labels of fuzzy sets. -- L. Zadeh

Working...