|
I was just thinking of using an extension method. I autocorrected the source code in my head.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
I miss C++ typedef, and macros - they were pretty hamn dandy... Does anyone know if they're available in c++.net?
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
I feel kinda naked without them to be honest.
It's deeply uncomfortable working outside C++. I always find myself wishing for some feature or another I don't have.
Once you know how to use it C++ is pretty much a Domain Specific Language - you can even utterly alter it to your problem domain and create a whole different language out of it practically (once again, the Spirit Parser framework in C++ is an excellent application of this) - i *love* that even if i rarely use it.
It can do just about anything except protect you from yourself.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
Un-managed C/C++ is not for wussies. I did C/C++ from 1990 to 2007. Moving to .net was a bit jarring.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
I did a lot of backend C++ development, including ISAPI stuff in the early aughts.
Switching to .NET was iffy for me too, but I had been forced to know VB6 so C#'s sugary syntax didn't entirely blindside me. And I was already using a garbage collected string table in most of my C++ server apps, so the GC end of it rather appealed to me. Used correctly garbage collection is kickass on servers due to limited heap fragmentation. Your apps performance doesn't degrade over time. This is especially critical of strings, which tend to be thrown around a lot in HTTP apps =)
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
honey the codewitch wrote: no typedef!
Yup. And that's where F# really shines, because C#'s using doesn't let you built up the structure from smaller using s, as you've pointed out in other responses.
|
|
|
|
|
If you're using .NET Core:
dt = KeyValuePair.Create(KeyValuePair.Create(dt.Key.Key, dt.Key.Value), tt[dt.Key]); KeyValuePair.Create<TKey,TValue>(TKey, TValue) Method (System.Collections.Generic) | Microsoft Docs[^]
If you're using .NET Framework, it's simple enough to provide your own version of this method:
#if NETFRAMEWORK
using System;
namespace System.Collections.Generic;
{
public static class KeyValuePair
{
public static KeyValuePair<TKey, TValue> Create<TKey, TValue>(TKey key, TValue value)
=> new KeyValuePair<TKey, TValue>(key, value);
}
}
#endif
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
That's one of those things that makes me feel dumb for not thinking about it first. I use template functions for things similar to this all the time. duh.
And thanks! *facepalm*
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
|
I needed something like that some time ago. I found this RANDOM.ORG - HTTP Interface Description[^]
It's pretty great.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
Yes, but with a quota of 200000 bits per day, it will take a while to do the tests.
|
|
|
|
|
i was thinking you could download it in batches. They have a bulk generator.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
Yes, but with a quota, if you want more you have to pay.
And it costs a bit more than I want to pay just to test an idea I have.
|
|
|
|
|
Great comments !
I needed a bunch of random numbers once and I grabbed a WinAES wrapper class from here and used it. It worked out pretty well.
"They have a consciousness, they have a life, they have a soul! Damn you! Let the rabbits wear glasses! Save our brothers! Can I get an amen?"
|
|
|
|
|
Seems like the way to go for me.
Everything truly random costs money, and I'm just testing something to disprove an idea I had.
|
|
|
|
|
Jörgen Andersson wrote: But where do I find a reliable source of a million truly random numbers?
Using a search engine you should be able to find a hardware number generator that uses Cesium-137 or Potassium-40. The hardware coming out of Switzerland seems expensive at around €900.
Best Wishes,
-David Delaune
|
|
|
|
|
how many digits of a number?
|
|
|
|
|
And this book is published in 1955. I wonder what computer they used.
|
|
|
|
|
They didn't, they used an electronic roulette wheel and fed the numbers into an IBM punch during May-June 1947.
It's in the introduction to the book.
|
|
|
|
|
My late Mum (a statistician) had a book of random numbers in the living room bookshelf. It was one of the most used books when I was a kid (if only because it was regularly taken out to show friends what a weirdo Mum was! ) It was a hardcover book, possibly the same as this one (same layout of the random numbers) but I think it just got put in a skip when she downsized in the 1980s. And this hardcover version is selling at $495 !!
|
|
|
|
|
There should be a low-cost way of generating random numbers.
|
|
|
|
|
|
So, I have an Android CI-Docker problem where I'm trying to set up jenkins and create a pipeline... But I'm having some trouble configuring the Jenkins instance which is run on a Docker container.
I'm not posting it here for a solution, I just need to know which is the right place on CP for this sort of question . I'm not even sure if this is the right place to ask this question but I'm now kinda desperate (Stuck in the same problem for 4 days now).
|
|
|
|
|
I don't think you will get much response on CodeProject, maybe you can try on a Jenkins forum.
CodeProject mostly is about Microsoft technology.
Maybe you can find an alternative for Jenkins here: continuous-integration-tools-for-mobile-app-developers[^]
modified 24-Nov-19 16:00pm.
|
|
|
|
|
Thanks for the link I'll look into it... For now I think I'm gonna stick with Jenkins at least until I figure it out.
|
|
|
|