« first day (3134 days earlier)      last day (1797 days later) » 
03:00 - 12:0012:00 - 22:00

mr5
3:14 AM
o/
say for example, I have this date value in UTC format 2019-05-15T14:42:39.6625513
Now, I want it to parse in a format where "hour" part is in "12 hour format"
like this: "yyyy-MM-dd'T'hh:mm:ss.S"
can I parse it from 24 hour to 12 hour without changing the supplied format?
i.e, without adding the 'aa' (AM/PM) part in the format?
 
3:31 AM
DateTime.Parse("2019-05-15T14:42:39.6625513").ToString("yyyy-MM-ddThh:mm:ss.fffffff")
 
mr5
@nyconing it would be incorrect I think since the format should be expecting the AM/PM part
at least, in Swift, it is throwing, in Java, that is not the case.
 
? You want AMPM in the format
 
mr5
Nope
I don't want to change the format
as much as possible
 
Then not sure what you want
Change to AMPM will no longer ISO 8601 compatible
"yyyy-MM-dd hh:mm:ss.fffffff tt" <- not ISO 8601 compatible
 
4:11 AM
yyyy-MM-dd HH:mm:ss ?
 
4:25 AM
How do you attach process to Visual Studio to check function calls?

To avoid XY Problem here, what I am trying to do is, I have a working program that has multiple charts, I want to add one more chart, to do that I must know all the steps that are executed when you choose to view a chart, thus I want to know once I press view, what is the code execution path, i.e. which classes and which functions get called...


I hope that makes sense
Visual Studio 2017 Windows 10
Basically I want to stepthrough each line
I am able to use Step Into and then use step over but once all the windows are initialized and the welcome screen opens, I am unable to see further in it
 
mr5
4:40 AM
@Arphile I am trying to retain the format to 12 hour but it seems the built-in converter I am using does not support rounding of hours > 12
 
5:24 AM
Never mind found it, I was looking for Call Stack and live visual tree
 
5:37 AM
hmm... so you work with C# right?
and expected result is 2019-05-15T02:42:39
without AM/PM part
hmm...
maybe I misunderstood.
mustbe..
 
Good morning
 
Morning
and G'Afternoon.
 
5:57 AM
Good morning in CEST
 
Good morning in UTC +[0-4]
 
anyone tried to create a progress in C#?
like I'm generating a multiple creates and I want to know how long it will take to finish,
from 1 to 100%
 
GoOoOoOoOoOoOoOoOoOoOoOd Mornin' neglecterinos!
@AppleCiderYummy Define Progress
Launch Programm, Pause debugger, press "step into/step over"(not sure), press the view, and you should be in the code after you clicked IAANM
Or did i missunderstood the problem?
 
6:14 AM
@Squirrelintraining Xiaomi
I understand he wants just a progress bar
 
a progress like I'm saving 100 profiles in one submit in the backend
estimate, it will take like 10-20 seconds to finish
so I want to show a progress like how long it will take to finish
 
@HéctorÁlvarez Silly you :D
@AppleCiderYummy ahh So sth. like what the [BackgroundWorker](docs.microsoft.com/en-us/dotnet /api/system.componentmodel.backgroundworker?view=netframework-4.8) does for WinForms
 
I'm using aspnetcore
is it possible there?
 
Dunno google for it
 
async / await and IProgress come to my mind... (Though I'm developing on Desktop with .NET Framework, no idea if that exists in aspnetcore)
 
6:25 AM
I understand
 
@Squirrelintraining Found the Solution basically I was doing this, but after a certain point this stops once all the windows open and the Program waits for Input from the GUI, so I went with Live Visual Tree to see in which class the input was being passed and used the call stack trace,
still not sure if there is a better way to do this because as I am passing inputs in some cases this also does not record, basically the call stack goes empty once a chart is displayed. Now I am looking for a way to se the history of the call stack to view the functions that get glossed over
The step into/step over suddenly stops working once all the windows are displayed
P.S. I am working with WPF
 
That's probably because the program has finished working and has no pending stuff to do. As soon as you trigger any code it will break on the first instruction again
Press a button or whatever that has some logic
 
No that is the weird thing, If I change the graph, no break is triggered but the output gets updated
I am under the assumption that now all the data is being loaded into the Data Context at once and is being passed to the XAML, still investigating this
 
mr5
6:50 AM
@Arphile yes. can it be done without changing the expected format?
Somebody can help please
 
'morning.
 
7:06 AM
\o
 
\O
 
┌[T]┐
 
mr5
7:18 AM
okay, so here's a rather simplified question: how can you produce an afternoon time (i.e, past 12:59:59 PM) from the format 'hh:mm:ss' only?
 
Wut
Do you mean 12h without the tt part, or 24h format?
you need either of those 2, otherwise you're just guessing
 
yeah, if you see 04:15, it could be 4:15 am or 4:15 pm
you'd have no way of knowing unless you knew for certain it was 24h time
if you knew it was pm, then add 12 to the hour to get 24h time
then parse that
 
mr5
how about if the input was on 24hour format?
 
well you'd know.. it'd be 13 or higher
 
Well then 00.00.00 = 00.00 am
12.00.00 = 00.00 pm
 
7:24 AM
suppose I give you a time from 12pm until 12am (exclusive) and tell you to parse it
 
afternoon would be 12.00 - 18.00 I believe
when is it officially considered evening
 
if the hour is 13 or higher, it's fine, otherwise add 12 to the hour
 
mr5
date.parse(expectedFormat: 'hh:mm:ss', input: '14:00:00')
 
Just have people use the right format in the first place
 
^
if anyone tells you they really really really want to add ambiguity and potentially fishy behavior to your program, you slap them with a trout
 
7:26 AM
yeah, 24h is confusing at first if you're more comfortable with 12h, but it makes sense and is the best format IMO
 
it's our responsibility to ensure the program works always guaranteed
 
all hail the master date: yyyy-MM-dd HH:mm:ss
 
@HéctorÁlvarez yyyy-MM-dd'T'HH:mm:ss
if you let them put in a whitespace between date and time, who knows what chaos could befall us all
 
mr5
I am trying to fix an issue in an iOS app built with Swift 3.3
And since 3.3 is not supported in the AppStore anymore, I needed to upgrade to Swift 4
Swift development < 4 does not support backwards compatibility and have a lot of breaking change.
Now, I am trying to force to understand in the receiving end (app side), where it is expecting a date format of `'...hh:mm:ss'` with an input we can control
 
I always forget about the T
Damn you ISO
 
mr5
7:28 AM
I think T is just a separator?
 
yeah it is
 
Damn right, but it just looks so idiotic to put a T
 
the issue is if it is a space, well it'd be all too easy to insert some non-printable character in its place and it would "look" fine but not be a proper format
 
not underscore, not punctuation, but a damn T
 
7:29 AM
for all intents and purposes, it could have been just as easily an underscore
 
@mr5 There are ambiguities you simply can't resolve without external knowledge and/or guesswork. The date-string `05-06-07" can be read in any three commonly used formats.
 
spaces are scary for ISO formats
 
@AvnerShahar-Kashtan and the other 6 less common combinations too
year 2032 will be a golden age for date parsing
 
mr5
@AvnerShahar-Kashtan the date part is okay, but past 12PM of time, it cannot understand, forcing the app to crash
 
 
7:33 AM
@mr5 Start over: what are your inputs, what are your assumptions, what are your expected outputs?
 
@Neil +1 for ((3+3)*(111+1)-1)*3/3-1/3³
 
I calculated my retirement age.. it'll be after this date :(
 
@Neil I remember, as a kid, calculating how old I'll be in the year 2000. It seemed so far away, and the age so old. Now? shrug. 2038 will be the new 2000.
 
Who uses 32-bit after the ten years.
 
@HéctorÁlvarez I agree, that does seem like the most obvious standard ¯\_(ツ)_/¯
@nyconing you think we'll have switched by then? hah!
 
7:34 AM
Just redefine 1970 to 2010, gives you 40 additional years
 
@AndreasDuering Yeah. After all, 90% of apps only need to address dates in the recent past, present and future anyway. :)
 
mr5
@AvnerShahar-Kashtan input: 2019-05-09T13:59:59.999999, assumption: receiving end is expecting a format of yyyy-MM-dd'T'hh:mm:ss.S, expectation: the app displays in 12 hour format including the AM/PM
 
how to get total time before task finishes in aspnetcore?
 
But hasn't the 32bit unix epoch problem already been addressed in recent (i.e. past 5 years) unix kernels?
 
1 hour ago, by AppleCiderYummy
a progress like I'm saving 100 profiles in one submit in the backend
 
7:36 AM
I know that any code I've written that uses unix timestamps has been using 64bit ints since forever.
 
1 hour ago, by AppleCiderYummy
estimate, it will take like 10-20 seconds to finish
 
mr5
in the receiving end, it will parse the string to Date type, then convert to another format
 
What does hh:mm:ss.S mean for the Swift app reading that string?
Is hh a 12 hour string?
 
mr5
@AvnerShahar-Kashtan yes
 
mr5
7:38 AM
it's the milliseconds I think
it doesn't matter actually
 
So your code actively refuses to accept disambiguation?
 
mr5
yes
 
And you're bound to this code because....?
 
mr5
It would take me days of work before I can upload the app to AppStore just for the patch unfortunately.
 
All current callers, de facto, always passed in AM times. They couldn't pass in anything else. So just replace your date parser to use HH:mm:ss. Old code would remain the same. New code could pass in 24h dates and it would work.
 
mr5
7:40 AM
Yes. I realize that is the right solution.
 
@nyconing I believe it was you who shared news yesterday on MS releasing a patch for older systems, including WinXP?
 
mr5
But, as I said, it would take me days to finally upload the app because of Swift upgrade, dependency update, etc...
 
@mr5 weigh the choices, I think you've been around long enough to understand the consequences of maintenance issues due to a worse early decision that saved you a negligible amount of time
Here in Spain the Constitution says there must be at least 1.5 days of uninterrumpted rest every week
Very few people work on weekends
 
mr5
@HéctorÁlvarez it is just for this update. There is another update but this is a critical one due to client would present the app to their potential partners
It is working in Android but not in Swift
It was working actually before but we're not sure what happened after few weeks it has been uploaded to AppStore
 
8:04 AM
@CaptainSquirrel o7 capitain!
!!giphy capitain
 
@Squirrelintraining That didn't make much sense. Maybe you meant: sippy
 
@Squirrelintraining Information on interacting with me can be found at this page
 
8:12 AM
Just found this beauty:
!!list
 
@Squirrelintraining tobacconist ziraksadvice gayclubs loktar zirak_naked slidepoop lol mhm roomowner buttstuff greatest_question_in_universe abhishekpornfreak
 
A few of those are quite what is the word Pervy
?
 
@anand_v.singh a sexual deviant
or something that is highly sexual
has a negative connotation
 
Is that even allowed?
Oh well time to venture into the darkness
!!mhm
 
@HéctorÁlvarez That didn't make much sense. Use the !!/help command to learn more.
 
8:16 AM
Still I don't wanna test those commands, I don't see Capricia that way.... Lol
 
!!ziraksadvice
 
in JavaScript, Apr 26 '14 at 14:53, by Zirak
@BartekBanachewicz Use jquery
 
!!tobacconist
 
Drop your panties, Sir William; I cannot wait until lunchtime!
 
8:17 AM
!!loktar
 
@anand_v.singh That didn't make much sense. Use the !!/help command to learn more.
 
!!loktar
 
@anand_v.singh That didn't make much sense. Use the !!/help command to learn more.
 
WTH It's the 4th word in the list
I copied it the second time... smh
 
@anand_v.singh pff.. newb
 
8:20 AM
@Neil Look a dinosaur is talking
!!lol
 
@anand_v.singh That didn't make much sense. Use the !!/help command to learn more.
 
(facepalm)
 
A potential security vulnerability in CPUs may allow information disclosure. Intel is releasing Microcode Updates (MCU) updates to mitigate this potential vulnerability.
 
(;一_一)
 
Developer arent affected.
 
8:22 AM
@nyconing Yes Zombie Virus, I read about this, sadly some of the update patches are disabling a few cores on i7 causing them to turn into essentially i5's
 
@anand_v.singh ugh.. another vulnerability update causing a slowdown? wtf
@nyconing it only pertains to one core inparticular?
 
If given a choice though, what would you choose, vulnerabilities or speed
 
I'd choose to get what I paid for.. speed and no vulnerabilities
also, who wouldn't pick speed over vulnerabilities?
 
Its a me Mario!
!!meow
 
8:29 AM
The flaw when exploited could see data from another process that was running, that too it was limited to data under processing at that moment. it was highly difficult to exploit and also after exploiting, it was tough to piece together due to it being executed on multiple cores, and since no process gets a core for that long, so even after an exploit the puzzle might be too difficult to unravel
@Neil Ahh, the smell of Utopia...
 
Not sure in technical informations
 
@anand_v.singh The smell of getting what you paid for.
 
Google release a sheet to address this vulnerabilities and stated
which actions may taken.
Amazon Cloud is save from all of these MDS attack.
Also named Zombie attack
Oh Zombieload attack.
 
Zombie attack will much more scarier.
 
8:40 AM
Here's a fun bug I found now. We have code that reads JSON config data and returns a value. So I can do GetProperty<double>("StartZoomLevel") and get that value as a double. Simple? Simple. Fun.
GetProperty does several attempts at type coercion if necessary, but basically it takes the value as provided by the JSON deserializer and tries to cast it.
 
@AvnerShahar-Kashtan I can see how that would be unexpected, but not sure if that's a bug technically
 
We have a value we're reading as double? (nullable). The value in the settings file is usually 17.0. This is parsed by JSON.NET as double, then the method casts it to double?, and everything is fine.
But in one place, today, someone set the value to 17, rather than 17.0. So far, so good - valid value!
 
anymore than failing to properly implement an .Equals method results in unexpected behavior where .Equals is used
 
But because it didn't have a decimal point, JSON.NET deserialized it as long, not as double. And while double has an implicit conversion to double?, long doesn't.
So the code got the value, tried to cast long value = 17 to double?, and threw an exception. :(
 
I'd think the opposite would be true
converting double to long could be lossy
 
8:43 AM
@Neil I think it's about the nullable - you can cast long to double, but not to double?.
 
so could the opposite technically, but it isn't as straightforward to mess that up
 
As far as the configuring user was concerned, "17" is as valid a value as "17.0" - they're identical. But behind the scenes, it caused a different type inference, and thus led to the bug.
 
you think that's why? converting to a nullable type should always be possible
it's the opposite that is tricky
 
I could probably cast from long to double and from that double to double? safely, but there's no direct cast.
And because it's a generic method, I couldn't really add that two-step method.
 
How to get the actual memory adress of an object?
 
8:45 AM
@Squirrelkiller Why? It might change anyway as the GC moves it around.
 
morning
 
Are there only aroudn the corner things with like 6 calls?
 
You can pin it if you need to pass it to an unmanaged method.
 
I wanna check if an object in debug is the same I put into a static instance 3 steps before
 
object o = new object();
TypedReference tr = __makeref(o);
IntPtr ptr = **(IntPtr**)(&tr);
 
8:46 AM
@Squirrelkiller Use object.ReferenceEquals(objA, objB)
 
apparently this will do it
but I agree, it smells XYish
 
The two references ar ei ndifferent contexts :/
error CS0726: 'tr' is not a valid format specifier
 
I'm not sure if it's built-in in VS or via my OzCode plugin, but while debugging you can get an ObjectID for an intsance and check later if it's the same one.
 
61
Q: Memory address of an object in C#

lejonI have a function written some time ago (for .NET 3.5), and now that I have upgraded to 4.0 I can't get it to work. The function is: public static class MemoryAddress { public static string Get(object a) { GCHandle handle = GCHandle.Alloc(a, GCHandleType.Pinned); IntPtr...

 
I'm not sure why unit tests fail sometimes and sometimes succeed. I suspect multithreading shenanigans.
 
8:48 AM
maybe that was C++, not sure :P
 
I mock a db service, but it somehow doesnt return the object I tols it to return
 
@Squirrelkiller DB services are sensitive and easily offended when mocked.
3
 
Well I'm just evil like that
 
"Look at me! I'm a DB service! Nyah nyah!! Neener neener!"
 
Anyway, assuming you didn't override it, calling GetHashCode() on both objects should return the same value if they're the same instance.
Ah, my casting problem isn't due to the nullable. It's because of boxing. My long value is held in an object variable, so it fails to cast.
 
8:54 AM
ahh
damn boxes
 
long unboxed = 17L;
object boxed = unboxed;
double d1 = (double)unboxed; // works
double d2 = (double)boxed; // exception
 
uhhh GetHashCode is dumb remember
 
Ha that is so easy I didint think of it
It did work though, they are two different mocks
I wasnt aware casting doesnt unbox
 
GetHashCode shouldn't be expected to return the same value for 2 identical objects in different application intances
 
8:57 AM
Sure, but in this case he was checking in the same debug session.
 
Lahtouhg I think that's somewhat platform dependent
 
@AvnerShahar-Kashtan Try double d2 = (double)(long)boxed;
 
Same application, step into method -> hash == 1, return from method -> has == 2
 
@Neil Sure, but my generic GetProperty<T> doesn't know it should do that.
 
Ohh right okay, I thought he was checking against a previously saved hash from another session
 
8:57 AM
@AvnerShahar-Kashtan True, I was mostly curious
 
Both member variables assigned to from a static instance
 
@AvnerShahar-Kashtan time for some extension method for Object types that implicitly convert to any other type?
 
@Neil That works fine, just checked.
 
!!> '1'+'1'-'1'
 
@HéctorÁlvarez 10
 
8:58 AM
Hm maybe someone can think of a gist that may do something like that?
 
I suppose you could check if it is a boxed version of the type which needs to be returned
if it isn't, there isn't much you can do, but at least you can throw an exception in that case
 
I really need to add that as a command
 
Anyway, it's time for me to get back on the road
 
!!sandbox
 
@HéctorÁlvarez Please go and play in the Sandbox
 
9:01 AM
if (rawValue.GetType().IsNumeric() && typeof(T).IsNumeric())
{
     Convert.ChangeType(rawValue, typeof(T);
}
But of course, that would crash if casting "17.1" to long, or "257" to byte.
*sigh*.
I can just catch the exception.
 
'1'+'1'-'1' equals 10
 
?
!!>'1'+'1'-'1'
 
@nyconing 10
 
WTH
 
9:14 AM
magic
 
This encourage me must use most powerful and reliable IDE if I did JS in future.
 
!!>'a' - 'b'
 
@anand_v.singh "NaN"
 
You'll be fine with a decent Lint
Most of my friends who do JS 99% of the time use JetBrains' solution, I believe it's called WebStorm
This IDE is probably the best one for JS, or at least it was about 5 years ago from what I heard.
 
Yes. I know this. Only VSCode can fight with WebStorm. But VSCode was uninstalled after the 10mins from launching. What an IDE does not support multi windows.
 
9:32 AM
VSCode supports multi windows and split windows
ctrl + \
to split a window
 
mr5
VS Code sucks
 
Never used on Mac... but it is quite great on windows...
 
It's a great and powerfull editor
Not a fully functional IDE though
 
I mean you can tune it to be a debugger, add the powershell/terminal based on the OS you are working on, but yes not a fully functional IDE
 
@mr5 SUCK YOU!
 
mr5
9:46 AM
If you're converting from a 24 hour time to 12 hour time format, you must always include the 'a' along with 'h'
@Squirrelintraining SUCK YOU TOO
 
@nyconing but it does
@mr5 SUCK YOU MORE!
 
mr5
@Squirrelintraining SUCK YOU MUCH MUCH MORE!
 
@mr5 SUCK YOU THE MOST!
 
@mr5 @Squirrelintraining Get a room...
 
@anand_v.singh NO YOU GET A ROOM
 
9:50 AM
Enough Public display of affection
 
10:00 AM
by the Rule 34. There must be a datetime format conversation porn. And you guys seem to be the first horny searchers for it...
2
 
!!googleme datetime conversion porn
 
mr5
@anand_v.singh NO U!
 
10:23 AM
List<T>'s RemoveAll is quiet a good stuff. I just replaced 5 rows of code to avoid Collection was modified
 
I leave for a few minutes and get back to datetime porn
I get mr5 can be 5, but I understand squirellino has children already?
 
He has
 
IDK what's happening
 
10:39 AM
Oh just shit like china blocking wikipedia completely
 
user11496081
can some please suggest something here (stackoverflow.com/questions/56160616/…)
 
user11496081
someone*
 
"can some please suggest someone here"?
 
user11496081
I m here
 
user11496081
I m that 'someone' that you wanted 'some' to suggest - how may I help you?
 
10:47 AM
I'm confused
 
user11496081
That was the idea
 
NVM it was just an introductory comment to tell you that you can edit previous messages like this. This is new, do you see?
 
user11496081
yeah .. thanks .. forgot about the edit option .. must be doing too fast
 
user11496081
how am i.. i m too fast
 
Regarding your issue, someone already suggested web storage. Do that.
Disregard the server paging stuff.
 
user11496081
10:50 AM
hmm web storage ok but a partial view information stored inside web storage will make a partial view render - what about its parent view ..
 
user11496081
parent view = ShopOnline.cshtml
partial view = _categoryDetails.cshtml
partial view pageNumber = 6

How can these 3 lines pieces of information be stored and run in a URL in c#
 
user11496081
Refreshing a page always refreshes the parent view ..
 
Web storage allows you to save data for the browser to use, localstorage has persistence, sessionstorage has persistence while the session is alive. Pick your choice depending on needs and always request stored data when refreshing.
 
user11496081
All that is good but I think I need to explain my problem a little bit more to you ..
 
user11496081
I give you an example website ..
 
user11496081
Please visit this page and checkout its left hand side menu
 
user11496081
On its left side menu, please click Household
 
user11496081
From Household please click 'Laundry Needs`
 
user11496081
There are 5 pages on Laundry Needs
 
user11496081
Please click page 5 and then refresh the page...
 
user11496081
10:56 AM
since everything is in the URL - it lands on the very same page ...
 
user11496081
in my app - no information is in the URL when you're on page 5 of the Laundry Needs
 
user11496081
Just the very initial URL all the way -
 
user11496081
so when I'm refreshing it .. its coming back to 0.
 
user11496081
For example my initial URL is /Home/ShopOnline
 
@mr5 YOU
 
10:59 AM
Blocked by proxy
 
user11496081
so when a user clicks Household in my app - URL doesn't change to /Home/ShopOnline/Household like this URL is changing to https://shop.coles.com.au/a/a-national/everything/browse/household?pageNumber=1 from https://shop.coles.com.au/a/a-national/everything/browse when someone clicks Household in the left side menu.
 
user11496081
What I'm doing is - when someone click Household in my app, I render a _partialView inside the parent view displaying Household items
 
user11496081
Parent view stays - so URL stays
 
user11496081
are you using proxy?
 
of course
 
user11496081
11:11 AM
why? if i may ask?
 
Pretty much any company that cares about themselves have proxies installed for their employees
 
user11496081
haha company right
 
user11496081
companies networks
 
user11496081
I think i m gonna crash for now
 
user11496081
maybe get back on this issue when i am recharged again
 
11:25 AM
I could use some help to enable hex codes here, I've already activated the registry key but whenever I try to print U+202E, when I press E other stuff gets activated other than printing the character
In chrome the menu pops up
Using CTRL+Shift also doesn't seem to do the job, nothing happens
 
@HéctorÁlvarez Would using a separate tool/application be an option, or do you want to do it with keyboard only?
 
Tools are fine, I've tried the (Shortkeys)[chrome.google.com/webstore/detail/shortkeys-custom-keyboard/… extension but it ain't working for me, no matter how many times I refresh
Screw the text parser
 
11:42 AM
@HéctorÁlvarez I see fileformat.info/tool/unicodeinput/index.htm being recommended
 
‮‮I think I managed to make it work.
Or maybe I didn't?
It works on notepad though
BTW I just learned Microsoft teams uses something called Squirrel Setup @Squirrelkiller & company
 
03:00 - 12:0012:00 - 22:00

« first day (3134 days earlier)      last day (1797 days later) »