Click here to Skip to main content
14,388,768 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.
 
GeneralReflections Pin
Tim Carmichael24-Dec-17 2:01
MemberTim Carmichael24-Dec-17 2:01 
GeneralRe: Reflections Pin
RickZeeland24-Dec-17 2:23
mveRickZeeland24-Dec-17 2:23 
Generala very wholly happy holi/holy-days to you, and yours, and others whose yours you are ! Pin
BillWoodruff23-Dec-17 23:09
mveBillWoodruff23-Dec-17 23:09 
Joke:-) Pin
Kornfeld Eliyahu Peter23-Dec-17 7:40
mveKornfeld Eliyahu Peter23-Dec-17 7:40 
GeneralAll the best for Christmas and 2018 Pin
JustWatchLittle 23-Dec-17 5:39
professionalJustWatchLittle 23-Dec-17 5:39 
GeneralIn the spirit of the upcoming holiday... Pin
CodeWraith23-Dec-17 1:56
MemberCodeWraith23-Dec-17 1:56 
GeneralRe: In the spirit of the upcoming holiday... Pin
Cornelius Henning23-Dec-17 3:15
professionalCornelius Henning23-Dec-17 3:15 
JokeA highly random number generator PinPopular
Nish Nishant22-Dec-17 11:00
sitebuilderNish Nishant22-Dec-17 11:00 
I'd like to see someone beat this algorithm for true randomness. Big Grin | :-D
class Program
{
    static void Main(string[] args)
    {
        for (int i = 0; i < 10; i++)
        {
            var random = BitcoinRandom().Result;
            Console.WriteLine(random);
            Thread.Sleep(15 * 1000);
        }
    }

    static async Task<double> BitcoinRandom()
    {
        var client = new HttpClient();
        var response = await client.GetStringAsync("https://api.coindesk.com/v1/bpi/currentprice.json");
        var data = JsonConvert.DeserializeObject<BitcoinInfo>(response);
        return data.Bpi.Usd.RateFloat;
    }
}

public partial class BitcoinInfo
{

    [JsonProperty("bpi")]
    public Bpi Bpi { get; set; }
}

public partial class Bpi
{
    [JsonProperty("USD")]
    public Currency Usd { get; set; }

}

public partial class Currency
{
    [JsonProperty("rate_float")]
    public double RateFloat { get; set; }
}
Nish Nishant
Consultant Software Architect
Ganymede Software Solutions LLC
www.ganymedesoftwaresolutions.com

GeneralSample output Pin
Nish Nishant22-Dec-17 11:02
sitebuilderNish Nishant22-Dec-17 11:02 
GeneralRe: Sample output Pin
Marc Clifton22-Dec-17 11:23
mvaMarc Clifton22-Dec-17 11:23 
GeneralRe: Sample output Pin
Daniel Pfeffer23-Dec-17 6:52
professionalDaniel Pfeffer23-Dec-17 6:52 
GeneralRe: Sample output Pin
charlieg24-Dec-17 11:48
Membercharlieg24-Dec-17 11:48 
GeneralRe: A highly random number generator Pin
OriginalGriff22-Dec-17 12:06
mveOriginalGriff22-Dec-17 12:06 
GeneralRe: A highly random number generator Pin
CodeWraith22-Dec-17 12:23
MemberCodeWraith22-Dec-17 12:23 
GeneralRe: A highly random number generator Pin
Marc Clifton22-Dec-17 13:23
mvaMarc Clifton22-Dec-17 13:23 
GeneralRe: A highly random number generator Pin
Nish Nishant22-Dec-17 13:50
sitebuilderNish Nishant22-Dec-17 13:50 
GeneralRe: A highly random number generator Pin
CodeWraith22-Dec-17 15:42
MemberCodeWraith22-Dec-17 15:42 
GeneralRe: A highly random number generator Pin
Marc Clifton22-Dec-17 16:20
mvaMarc Clifton22-Dec-17 16:20 
GeneralRe: A highly random number generator Pin
CodeWraith22-Dec-17 17:59
MemberCodeWraith22-Dec-17 17:59 
GeneralRe: A highly random number generator Pin
Marc Clifton24-Dec-17 3:47
mvaMarc Clifton24-Dec-17 3:47 
GeneralRe: A highly random number generator Pin
Maximilien23-Dec-17 12:49
MemberMaximilien23-Dec-17 12:49 
GeneralRe: A highly random number generator Pin
CodeWraith24-Dec-17 7:34
MemberCodeWraith24-Dec-17 7:34 
GeneralRe: A highly random number generator Pin
CodeWraith22-Dec-17 16:18
MemberCodeWraith22-Dec-17 16:18 
PraiseRe: A highly random number generator Pin
kmoorevs22-Dec-17 17:34
Memberkmoorevs22-Dec-17 17:34 
GeneralRe: A highly random number generator Pin
Bassam Abdul-Baki2-Jan-18 6:00
professionalBassam Abdul-Baki2-Jan-18 6:00 

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.