|
Thanks very much. I will read that later today.
I was looking for just such a resource.
Love it when the answers just crash into me without me having to exert any energy.
|
|
|
|
|
I'll get a static initialised without a explicit ctor if it kills me!
header:
struct client {
static client dummy;
std::string username;
int id;
} cpp:
client client::dummy = std::move(*[=] { client * c = new client();
c->username = "<DUMMY>";
c->id = -1;
return c;
}()
); I'm not going to use this code but I wonder about it... memory leak?
|
|
|
|
|
And you are sure you didn't miss a way to write it more unreadable?
It does not solve my Problem, but it answers my question
modified 19-Jan-21 21:04pm.
|
|
|
|
|
I'm used to C# so tried
return new client(){username = "<DUMMY>"; } but didn't get told off about it until compile-time
|
|
|
|
|
Why does the struct have to have a static copy of itself in it? Why can't you just do:
struct client {
std::string username;
int id; }
static client theInstance;
theInstance.username = "<DUMMY>";
...
|
|
|
|
|
David O'Neil wrote: Why does the struct have to have a static copy of itself in it?
Doubt it but might be the pattern used by some of .NET for defaults. Think string.Empty or Comparer<T>.Default [^].
modified 18-Mar-18 21:00pm.
|
|
|
|
|
I wrote an in-house Overtime system for our workers. One particular shift is a 24-hour on-call, which is typically 8am to 8am the next day. A worker happened to do an on-call shift 3/10 8am to 3/11 8am, and the system said it was invalid--because he only did 23 hours due to the clocks being moved forward! Once he changed the end time to 9am, it worked.
Strictly speaking, the system is correct--but it sure looks weird.
|
|
|
|
|
Hmmm... one of those annoying issues.
'Work' a full shift, but on that day, it's only 23 hours.. and in the Autumn, it's 25 hours.
What happens if there is overlap for users? This user entered 8:00 AM to 9:00 AM, presumably, someone else may have worked from 8:00 AM on during the same hour.
|
|
|
|
|
DST is evil; don't do it.
Or at least convert everything to UTC and call it good.
|
|
|
|
|
|
Actually - just make it permanent and call it "The New Standard Time" (good start for TV Series?)
It's absolutely great leaving (I cut out at 15:00) and having that bright sunshine, hours of it, ahead of me.
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
I generally work 07:00 to 15:30 . No need to change your clock or insist that other do.
|
|
|
|
|
He actually spent 23 hours. The system (and his contract) should allow 23, 24, 25
... such stuff as dreams are made on
|
|
|
|
|
Internals in UTC, presentation in local time.
GCS d-- s-/++ a- C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- ++>+++ y+++* Weapons extension: ma- k++ F+2 X
|
|
|
|
|
den2k88 wrote: Internals in UTC, presentation in local time.
The presentation still wouldn't add up...just make presentation UTC as well...they'll get used to it! No more DST problems!
"Go forth into the source" - Neal Morse
|
|
|
|
|
If the presentation doesn't add up due to DST shenanigans it's not a problem - presentation is for the human user who could use his human brain to take into account the reason of discrepancy.
kmoorevs wrote: make presentation UTC as well...they'll get used to it! Empyrical proof taught me that this is not the case, unfortunately
GCS d-- s-/++ a- C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- ++>+++ y+++* Weapons extension: ma- k++ F+2 X
|
|
|
|
|
A method out there:
public bool ImportSQLTableIntoHive(SqoopJobRequest jobRequest);
and used like:
private bool CopySQLTableToHive(string tableName)
{
this.SqoopJobManager.ImportSQLTableIntoHive(request);
return true;
}
|
|
|
|
|
Ehsan Sajjad wrote: Sqoop
I keep reading that as the "ScoopPoopJobManager"
Latest Article - Contextual Data Explorer
Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny
Artificial intelligence is the only remedy for natural stupidity. - CDP1802
|
|
|
|
|
let me refactor the name of it
|
|
|
|
|
I have found a better name: ScoobyDooImportToHive()
|
|
|
|
|
that sounds great actually
|
|
|
|
|
He'd have got away with it too, if it hadn't been for those meddling script kiddies.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Clearly someone has a lot of faith in the developer who wrote ImportSQLTableIntoHive() .
/ravi
|
|
|
|
|
Laying down some qualifications for being on U.S. Federal Payroll :
----------------------------------------------------
[ males ]
* Must have more than 1 year at minimum wage job
* Must ABSOLUTELY be 6'0 (182 cm) or taller
* 4 yr college degree [ Scholarships helps ]
* Must be athletic ; exceptional at 2 or more team sports
* Must have religion ( Christian / Islam )
* Must have more than 1 year xp overseas(2 countries)
[ foreign language ]
* Must be an exceptional musician
* Volunteer work (mission)
* Exceptional at 2 or more programming languages
* Must have 1 or more years xp with business venture
[ entrepreneur ]
* A few street fights ( woudn't hurt )
* Must have xp w/ beer pong
* Must have have girlfriend/wife for more than 2 yrs
****** that should fix everything *******
sorry, if you are wondering what the height requirement is it is to ensure that our tax dollars don't go to Deuce Bigilo detective type individuals ....
---------------------------------------------------
|
|
|
|
|
How is any of this weird or wonderful?
|
|
|
|