|
|
Richard MacCutchan wrote: Why would anyone think to use the same lower case letters for two very distinct fields? Maybe they really like Campbell’s Soup?
Their slogan used to be Mmm Mmm Good.
Jeremy Falcon
|
|
|
|
|
I tried to make a struct with two fields named mm and mmm respectively. The compiler accepted it without any warning. Confusing, isn't it?
Religious freedom is the freedom to say that two plus two make five.
|
|
|
|
|
What if they need the minutes, then the three letter month, then the minutes again, then the two digit numeric month?
We won't ask why, but hypothetically speaking...
|
|
|
|
|
Doesn't PowerApps know whether it is formatting a time object or a date object? That would surprise me a lot.
If I were to develop a formatting function, and was told "No no - you can't use that character to indicate a certain formatting - it has been used to format a very distinct field in a another value type", then I would scream out in protest. I cannot let the format strings for "my" type be limited by the format strings for all other types!
That being said: Doing detail formatting of times and dates is blatant anti-internationalization, an explicit effort to make it difficult to adapt you solution to other markets, an invitation for customers outside your own locale to misunderstand or not understand the data you output. Don't do that! Use locale dependent formatting, and stop fiddling around with literal format strings!
Religious freedom is the freedom to say that two plus two make five.
|
|
|
|
|
Agreed. If you're not typing 'Culture' somewhere on those lines then you're probably doing it wrong.
|
|
|
|
|
Not for the compiler.
|
|
|
|
|
Richard MacCutchan wrote: Why would anyone think to use the same lower case letters for two very distinct fields?
History?
Following has 'd' and 'D'. And 'c' and 'C'.
Formatting Calendar Time (The GNU C Library)[^]
Then there is "C Programming Language 2 edition" copyright 1988 which uses 'm' for minute and 'M' for month. And others.
|
|
|
|
|
Wait...
Is today 10/5 or 5/10?
"In testa che avete, Signor di Ceprano?"
-- Rigoletto
|
|
|
|
|
It's both of course.
|
|
|
|
|
I always use
yyyy-MM-dd
or
dd MMM yyyy
and always include timezones with times.
Multiple hemispheres/countries/etc
|
|
|
|
|
Fine, but if you read my post you will see that "MM" or "MMM" are not valid format specifiers.
|
|
|
|
|
Forget about all format specifiers and use locale dependent formatting.
Forcing your own locale formatting down the throat of customers in other locales is a bad thing to do.
Religious freedom is the freedom to say that two plus two make five.
|
|
|
|
|
I didn't say it was a good thing. I was merely pointing out how having to use the same letter for two different fields is a rather bad design choice.
|
|
|
|
|
My father often modified proverbs, just for fun.
His favorite:
"... two birds at hand are worth one in the bush..."
Since I inherited similar life outlook, here is mine , as an outcome of recent discussions.
" you can instruct them to read the rules, then you have something
to brag about if they actually do"
Since I used "inheritance " I hope readers will not label this post as programming post.
|
|
|
|
|
I'm gonna be that guy, because I know it's gonna come up sooner rather than later anyway:
Don't quit your daytime job to start a career in comedy.
Don't look at it as me trying to put you down. Look at it as free advice. I'm doing you a favor. Whether you want to see it that way or not.
|
|
|
|
|
Another modified one:
If what you have to say is not more beautiful than silence... Shut the fvck up!
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
May I suggest to induce the behavior you prefer merely do not post a message. Sooner or later the message will be received.
|
|
|
|
|
I'm a massive fan of butchered sayings... like Biff from Star Trek.
Make like a tree- and get outta here.
My father, mad at my brother, let fly with, "IF THE SHOE FITS, THEN DON'T SAY ANYTHING STUPID!"
|
|
|
|
|
|
basically a variation of
it is your fault
why pussyfoot around and not say so ?
...between you and fence post
I prefer KISS "it is your fault" anytime
I have an option - I do not have to read it ....
|
|
|
|
|
Absolutely, the best one I have read is:
A week in Beijing is worth two in the bush.
This was in 1981 when China was not as developed as it is today.
|
|
|
|
|
|
See here: Fast Search and Replace in Large Number of Files: A Practical Guide[^]
Hello all,
My name is Dr. Brian Hart, and I am a PhD astrophysicist and one of the original users of The Code Project from back in the year 2000. I've written many articles in C++ and C# programming.
I just wanted to share a link to an article I just posted, today, on The Code Project. I hope you will stop by and take a look.
It's about using memory-mapped files in C# to do a search and replace a large number of files fast. I implemented the algorithm both as a (really bare-bones) console application and a more graphical/user-friendly Windows Forms tool.
It came out of work that I was doing on this .sln file that contains almost 1,000 projects in Visual Studio, and I was pushing my existing Find In Files / Replace In Files tools to the limit. I needed to write my fast algorithm as part of a file- and project-renaming tool I was writing, partly to manage the refactoring of so much code.
The code included with the article compiles (after doing a nuget restore in the Solution directory). It should be informative and a great example of processing a huge number of files really fast.
The impetus of the article was trying to imitate the speed with which Notepad++ processes files with its Find in Files and Replace in Files operations.
I also include code to create a progress dialog in WinForms and report the operation's progress to the user while keeping the GUI responsive. I hope it helps someone with their programming work!
Regards,
Brian Hart
|
|
|
|
|