Click here to Skip to main content
15,893,588 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: MQOTD Pin
den2k889-Apr-15 21:38
professionalden2k889-Apr-15 21:38 
GeneralRe: MQOTD Pin
CDP18029-Apr-15 21:43
CDP18029-Apr-15 21:43 
GeneralRe: MQOTD Pin
RUs1239-Apr-15 22:02
RUs1239-Apr-15 22:02 
GeneralRe: MQOTD Pin
Johnny J.9-Apr-15 22:13
professionalJohnny J.9-Apr-15 22:13 
GeneralRe: MQOTD Pin
RUs1239-Apr-15 23:00
RUs1239-Apr-15 23:00 
GeneralRe: MQOTD Pin
Corporal Agarn10-Apr-15 0:45
professionalCorporal Agarn10-Apr-15 0:45 
JokeRe: MQOTD Pin
Stefto10-Apr-15 2:02
professionalStefto10-Apr-15 2:02 
GeneralFriday Programming Challenge Pin
PIEBALDconsult9-Apr-15 19:28
mvePIEBALDconsult9-Apr-15 19:28 
The other day, in the course of my job, I was presented with the following challenge.

Given an IP address (IPv4 or IPv6) and the "number of set leading bits of the subnet mask", generate the actual subnet mask.
For example, given an IPv4 address and the value 16, produce 255.255.0.0 .
There are thirty-three such subnet masks for IPv4 and one hundred twenty-nine for IPv6.

I, of course, created a look-up table (in a database) rather than generating the mask each time, but I still had to write the code to do it (so I did).

Your challenge, should you choose to accept it, is to do likewise in a language of your choice, or at least describe a technique.
JokeRe: Friday Programming Challenge Pin
V.9-Apr-15 20:14
professionalV.9-Apr-15 20:14 
GeneralRe: Friday Programming Challenge Pin
CDP18029-Apr-15 20:37
CDP18029-Apr-15 20:37 
GeneralRe: Friday Programming Challenge Pin
User 101325469-Apr-15 22:09
User 101325469-Apr-15 22:09 
GeneralRe: Friday Programming Challenge Pin
CDP18029-Apr-15 22:26
CDP18029-Apr-15 22:26 
JokeRe: Friday Programming Challenge Pin
Joan M9-Apr-15 20:38
professionalJoan M9-Apr-15 20:38 
GeneralRe: Friday Programming Challenge Pin
C3D19-Apr-15 21:44
professionalC3D19-Apr-15 21:44 
GeneralRe: Friday Programming Challenge Pin
Thomas Daniels9-Apr-15 21:44
mentorThomas Daniels9-Apr-15 21:44 
GeneralRe: Friday Programming Challenge Pin
Mark_Wallace9-Apr-15 21:54
Mark_Wallace9-Apr-15 21:54 
GeneralRe: Friday Programming Challenge Pin
Orjan Westin9-Apr-15 22:47
professionalOrjan Westin9-Apr-15 22:47 
GeneralRe: Friday Programming Challenge Pin
PIEBALDconsult10-Apr-15 11:30
mvePIEBALDconsult10-Apr-15 11:30 
GeneralRe: Friday Programming Challenge Pin
Freak3010-Apr-15 2:47
Freak3010-Apr-15 2:47 
GeneralRe: Friday Programming Challenge Pin
PIEBALDconsult10-Apr-15 11:31
mvePIEBALDconsult10-Apr-15 11:31 
GeneralHappy Friday Guys Pin
VijayPd9-Apr-15 18:24
VijayPd9-Apr-15 18:24 
GeneralRe: Happy Friday Guys Pin
King Fisher9-Apr-15 18:37
professionalKing Fisher9-Apr-15 18:37 
GeneralRe: Happy Friday Guys Pin
VijayPd9-Apr-15 19:04
VijayPd9-Apr-15 19:04 
JokeRe: Happy Friday Guys Pin
Agent__0079-Apr-15 18:38
professionalAgent__0079-Apr-15 18:38 
GeneralRe: Happy Friday Guys Pin
drummerboy05119-Apr-15 19:32
professionaldrummerboy05119-Apr-15 19:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.