« first day (4246 days earlier)      last day (705 days later) » 

mr5
12:52 AM
@Wietlol but can your hash generator avoid comments change so it doesn't affect the result?
 
 
2 hours later…
2:31 AM
Hi everyone
Does anyone know how to format DateTime so that the date outputs in MM/DD/YYYY format?

My code:
DateTime dt = Convert.ToDateTime("2021-01-17T00:00:00", CultureInfo.InvariantCulture);

Output:
[1/17/2021 12:00:00 AM]

Desired Output should be:
[01/17/2021 12:00:00 AM]
 
mr5
@KarlKnechtel you can try your luck in C++ room
and since this room is filled with polyglot peeps, maybe you can try here as well?
@LinuxUser maybe dt.ToString("MM/dd/yyyy hh:mm:ss")
 
2:51 AM
@mr5 Thank you! That works

But if you know a way where we can do the formatting on the same line

Something like this

DateTime dt = Convert.ToDateTime("2021-01-17T00:00:00").ToString("MM/dd/yyyy hh:mm:ss");

Above fails with error:
Cannot implicitly convert type 'string' to 'System.DateTime'
 
mr5
3:15 AM
right. you have to change your variable to string since ToString() returns... a string :D
 
 
3 hours later…
5:52 AM
> ..the “expanding hole” illusion is so good at deceiving our brain that it even prompts a dilation reflex of the pupils to let in more light, just as would happen if we were really moving into a dark area.
 
Good morning
That's one funny hole
 
mr5
6:17 AM
1 day remaining of sprint and a lot of tickets are either awaiting qa, qa in-progress, awaiting review, or blocked by team
-_-
 
Sounds like my team lol
 
mr5
do you brought this up in your retro?
 
We always do, but it's just something that can't be solved 100%. Either the devs work until the sprint is done, then qa has to test after that. Or devs are finished early so the qa can be done testing at the end of the sprint, then the devs are done too early, have nothing to do, and get more work next time and then work until end of sprint again.
 
mr5
6:35 AM
Do you jot down notes and verbally detail it to team, or just verbal only?
As a confused person, I always gets nervous during retro. I really hate that part of scrum process
 
@mr5 yes, as well as user code :D
like
// generated file
code(bla, bla, bla)
// start user code
fooBar()
// end user code
 
mr5
 
the comments and fooBar() are ignored
comments being ignored was actually required as the hashcode is written in the header comment
 
mr5
that doesn't sound like how a checksum should work
 
and I wouldnt dare try to predict the hashcode given an unknown prefix
@mr5 it is the easiest way
and it works for its intended purpose
 
mr5
6:45 AM
not sure if serious or not
 
quite serious
 
@mr5 Since corona our retro is basically always the same concept: Everyone gets to write up to 2 sticky notes, then after a few minutes when everyone is ready one by one we put the notes on a board (we use metroretro, but we also just use the wall when we're in person) and in short explains what it means in case it's not immediately clear, then we group them together and talk about each group.
 
what doesnt sound like how a checksum should work?
 
mr5
ehh, your hash generator is meant for checksum right? why should it care whether a comment or source code is changed?
 
it shouldnt
and it doesnt
user code and comments are ignored
technically speaking, the comments will be removed, so I suppose that I should only ignore the checksum comment and the user comments (also in user code)
 
6:48 AM
Why is the user code ignored though, I feel like the generated code should be ignored?
 
the checksum is there to assert that the generated code hasnt changed
as it will be regenerated
if a code refactor has changed the generated code, that change may or may not be applied to the newly generated code when it is being regenerated
it shouldnt happen though
but the same if a dev changed the generated code
that change would be removed once regenerated
user code and user comments are allowed to be changed
so the checksum, which is used to detect changes, only includes the generated code
 
mr5
@Wietlol so this checksum is run after being transpiled/compiled to IL/assembly? If so, if there's a compiler option change or updates, checksum would be invalidated.
 
this checksum runs when regenerating the code
I would have to write a compiler plugin to also do it on compilation
and I am lazy
so I wont
 
mr5
@Squirrelkiller what are your usual suggestion when encountering cases like the above I mentioned? I feel like not bringing this up again because I can't defend myself or my brain is not fully functioning when my communication mode is set to verbal.
 
Usually none. I'm a dev so obviously I don't care what happens after I gave my perfectly built feature to qa who will 100% not find any problems with it so I can immediately forget all about it.
 
mr5
6:55 AM
yeah, that's what I feel too but other seniors from other department are bringing it up so I feel like I should do it too.
tbf, the only dedicated QA in our department is on 50% allocation, so it is reasonable that a ticket may not be QA complete.
but I think my concern would be: I would not be able to merge the code I have pushed for my next ticket, which means, there will be merge conflict at some point.
you know what, I think that's a valid reason to brought it up.
 
@mr5 why do I read that as "tbf, the only dedicated QA in our department is on 50% alcohol, so it reasonable."
 
mr5
xD
that's legit. he does sound in alcohol sometimes too
 
"I speak fluid alcohol"
 
fruit alcohol
 
7:56 AM
[Captain Obvious] morning
 
8:21 AM
[Hector] morning boys and girls
 
in Visual Studio, when you let the IDE replace var with explicit type, will it sometimes incorrectly make that variable nullable?
 
mr5
try it!
 
i dont want to install VS
 
mr5
what category name do you call with IntelliSense?
is it just "code completion" tool?
 
intellisense would probably be code completion
 
mr5
8:24 AM
anyway, I have seen some "code completion" tool where it always inferred the correct type, even for nullable.
so judging from that, VS should always infer the correct type.
 
IntelliJ for Kotlin?
 
[Hector] I have an image in my WPF app, and whenever i make a new bitmap I change the source of the image to the new bitmap. do you know a better way to display a fast-changing image for this scenario?
[Hector] If I do it that way, there's some insane fragmentation taking place
 
mr5
what intellij for kotlin u talkin about?
 
it is some "code completion" tool where it always inferred the correct type, even for nullable
 
mr5
@Hector pool the image
 
8:26 AM
but Rider doesn't
 
[Hector] <@561582857949282355> what does that mean lol
 
mr5
ImagePool.Load(...) // memoize it!
 
i think it is when you mix #nullable and non-nullable code
 
[Captain Obvious] @wiet it doesn't from my experience
 
mr5
search for memoization. I think there is already a library that pools/cache images for you
 
8:27 AM
it doesnt always do it correctly or it doesnt have that bug?
 
mr5
@Wietlol ohh, I thought Rider : IntelliJ?
 
[Captain Obvious] <@273599255996792843> you can do some magic to load the new source bitmap in the background, but it's really weird and hacky
 
@mr5 not really
 
[Captain Obvious] it seems to work fine on my VS
 
IntelliJ and Rider work quite differently, but they have the same UI
 
mr5
8:29 AM
@Hector what that means is the image will be cached for sometime in memory/GPU, so it doesn't always fetch it from local storage or in the internet.
 
[Captain Obvious] When I tell it to use explicit type it always infers the type correctly
[Captain Obvious] Or doesn't at all
[Hector] @mr5 it never does that in the first place, it's always in memory
 
doesnt at all?
 
[Captain Obvious] just doens't infer any type and leaves it as var
 
mr5
> If I do it that way, there's some insane fragmentation taking place
 
[Captain Obvious] generally only happens when the line is missing something which would tell it what the thing is meant to be
 
mr5
8:30 AM
what does this mean then?
 
[Captain Obvious] <@273599255996792843> You can do (most) of that in the background
 
mr5
@Wietlol it means there's a tech debt.
 
[Hector] it's done in the background right now, in a very rudimentary way I have to say, but yep
[Captain Obvious] Once you've loaded the source in the background, you can do somehting like .Freeze
[Captain Obvious] And then you can pass the full loaded source into the UI thread to apply it
[Hector] the point here is that building the IntPtr too fast makes it stay in memory, and GC-boi doesn't know where to fetch the garbo
 
@mr5 not really, they are intended to work differently
 
[Captain Obvious] why are you using the pointer options
[Hector] that's the way I found to assign a bitmap to an image
[Captain Obvious] You should be able to get a bitmap as a screenshopt
 
mr5
8:33 AM
@Wietlol shouldn't the code completion feature common for both IDEs and should be "inherited"?
 
[Captain Obvious] and the BitmapSource has a ctor which takes a Drawing.Bitmap
 
the code completion feature might be the same code... but even then, you are dealing with 2 different languages, so code completion works differently
 
[Captain Obvious] Don't get me wrong, the GC is still going to have a bad time and there's not much you can do about that
 
for example, in Java, you would just do completion based on members of the type of your variable, but in C#, you also have to suggest extension methods
 
mr5
wait, what language does Rider supports that IntelliJ could not?
 
8:35 AM
not sure where the writers of the intellisense would put the logic of finding stuff, but there is different logic per language
 
[Captain Obvious] @mr5 they're about as common as something like Rider.RoslynCodeCompletion : IntelliJ.ICodeCompletion
 
@mr5 generally speaking, C#, F#, VB, etc
 
[Hector] It says BitmapSource is an abstract class for me (?)
[Captain Obvious] oh right not a ctor
[Captain Obvious] but one of the BitmapSource.CreateFromX methods
[Captain Obvious] Ohh righ tyeha
[Captain Obvious] Hold on let me dig up some old code
[Captain Obvious] Excuse the VB.Net ness
[Hector] I'm oly missing the Array part lol
[Captain Obvious] THat code converts from the System.Drawing.Bitmap to a System.Windows.Something.BitmapSource on a background thread, then the frozen sourceBitmap can be passed to the main thread and applied to a contorl
[Hector] sounds like this would slow down the app
[Hector] i have to test it
[Hector] thanks!
[Captain Obvious] that code has been in customer facing use since 2017
[Captain Obvious] You definitely don't want to do any image work on the UI thread if you're using images in memory
 
but can you get this to 120 fps?
 
[Captain Obvious] I don't see why not, I never really tried to load tons of them at a time
[Hector] that's correct. I just added that because, right now, I was more interested in doing it quickly to have it working ASAP. Everything is in the code-behind file like a mongrel
[Hector] I can run it almost real time right now, but if I enable the UI refresh using the dispatcher, boom. 100MB/s to the heap
 
8:47 AM
also 100MB/s to the heap when you use the using like I told you?
 
[Captain Obvious] I mean if you're interested, that code came from this file and used from this one
 
I sent >100mbps icmp requests to jam wifi router
 
mr5
how do you do that?
parrallel.for -> ping router.com?
 
[Captain Obvious] ping -l <size>
 
mr5
router.com in this case is an IP address
 
8:57 AM
[Captain Obvious] and then do it a bunch of times in parallel
 
mr5
oh
why would you do that? lol
 
yeah, like that
 
mr5
why would you want to crash your own router?
 
[Captain Obvious] Who said it was her own
 
no its company router
 
mr5
8:58 AM
lmao
 
why would you want to jam company router?
 
so everyone can have a break... or anger
 
[Captain Obvious] IT certainly won't be having a break
 
mr5
now that you said that, for people that is working remotely, you can convince your employer to establish a tunnel from their router so you can connect, and then do that.
in my previous employer, I was able to convince them to do that for me.
 
turned off before get caught
 
mr5
9:00 AM
I have access to one of their routers, but it was a satellite router so there's really no damage I can do
 
still can
just sending same requests to google.com
it will now jam entire internet instead
 
mr5
can you jam google.com?
the only jam I am familiar with is coconut jam
 
no just internet, because cgnat controls upload bandwidth, too much to upload cause congression, a simple http request now takes forever
 
mr5
wth is cgnat?
there is a lot of jargons I don't understand everytime I open my router's dashboard
 
oh, it is just like ISP firewall
 
9:08 AM
[Captain Obvious] cgnat is the worst thing that ISPs have relied on to avoid migrating from IPv4 and continue using a small amount of IPs for their customers
[Captain Obvious] It literally stands for Carrier Grade NAT
[Captain Obvious] NAT being Network Address Translation, or what your home router does when translating internal adresses to external and vice versa when crossing your network boundary
 
yeah aggree, but actually 99% of user dont need a public wan ip
 
[Captain Obvious] That's not the only thing it fucks up
 
so isp just give nated ip as default
what is it
 
[Captain Obvious] it breaks port forwarding
 
all connection are still cgnat even they give public wan ip
 
9:12 AM
[Captain Obvious] it's stateful so it could have security/reliability issues
[Captain Obvious] If you get a public IP that works properly, it's not NATed
 
oh, they can bypass using UDP hole punching
 
[Hector] it tells me the palette can't be null. Weird
 
no, all cgnated actually, they just had a rules on their firewall to forward the connection
 
@mr5 not even... chili jam?
 
[Captain Obvious] <@273599255996792843> I think you should be able to reconstruct a pallette from the bitmap fairly easily
 
mr5
9:15 AM
okay, I understand nothing.
 
[Hector] also bitmapData.Scan0 's type is IntPtr and it expects an object of type Array
[Hector] which is weird because VB.NET and C# should, at least, translate directly between one another
 
mr5
have you guys worked on low level networking before?
 
[Captain Obvious] there are differences due to how how VB does type inferences and shit and its all a bit weoird
[Captain Obvious] @mr5 how low?
 
mr5
@Wietlol yeah, that sounds like I don't want to eat it
 
@mr5 its simple, just like a router without dmz, so you cant connect your computer outside the nat
 
mr5
9:17 AM
@CaptainObvious ^
@nyconing I don't even know what dmz is
the only thing I understand when I open router dashboard is "wifi"
 
hmmm.... mostly same like port fowarding, but all port
 
@mr5 I dont even understand wifi
 
[Captain Obvious] ^^ pretty much
 
it just wörk
or I call sysadmin
 
[Captain Obvious] Basically dumps you right behind the firewall with no NAT
 
mr5
9:20 AM
@Wietlol it's a slang for "wifey"
@nyconing I also don't understand port forwarding
 
10years ago i pronounced it wiefie
 
we just pronounce it weefee
except shorter
 
mr5
not "y fy"?
 
or faster... depends on how you see it
not i, yes
 
mr5
"we free"
 
9:29 AM
without the R
 
[Hector] <@263075131323187203>
 
what are you even trying to do?
 
[Captain Obvious] I'm not sure what part it's struggling with
[Hector] <@211519661420838912>
 
mr5
why are you calculating bitmapLength/pixel count with stride * height?
 
[Captain Obvious] how else would you calculate it?
 
mr5
9:37 AM
width * height?
 
[Captain Obvious] stride is width
[Captain Obvious] with byte rounding
[Hector] that's something weird because we are basically saying A.stride = B.stride * width, wouldn't it make more sense to make both strides equal?
[Captain Obvious] It's worth mentioning that the context of that code was after doing some resizing, so there could be something weird goign on with sizes in there
 
mr5
and the 2nd pixelFormat shouldn't be something like the first format you specify?
 
[Captain Obvious] I don't know exactly, this code is from 5 (or more) years ago
 
mr5
what? is this MS specific thing?
this is the first time I hear stride as a property of image
 
[Hector] this is a lot of weird as shit going on just to refresh the UI
[Captain Obvious] Loading images is really hard
 
mr5
9:42 AM
oh maybe not. I heard it on opengl too but its for composing textures/sprites
 
[Captain Obvious] Oh yeah
[Captain Obvious] You're probably at the end of the stream you're loading the image from
[Captain Obvious] Seek back to the start otherwise the code will EoS immediately and then nothing happensd
[Captain Obvious] If you just dumped the screenshot into a memorystream and then fed it straight into that code, then that will be the issue
 
@mr5 technically speaking, stride is a property of a pixel or a property of a row of pixels
 
[Hector] oh
 
so, an image should have 2 different stride values
 
[Hector] well this is too complex just to get a preview of what I'm scanning
[Hector] not worth wasting time on it
[Captain Obvious] streams are fun
[Captain Obvious] images are also fun
[Captain Obvious] Putting them together is obviously super fun
 
mr5
9:49 AM
couldn't you get something like screenshot.data?
and I'm guessing it should contain all the pixels you need
 
[Captain Obvious] The issue is that WPF image types are completely different to the normal System.Drawing.x ones that the rest of .Net uses
[Captain Obvious] So you could do soimething nice and simple that like that with Winfirms
[Hector] tiny little MVVM question, I'm trying to refresh my memory here. Do I have to build a dependency property under the control's partial class, or is it possible to do under mainwindow itself?
 
mr5
it should be in the ViewModel afaik
 
[Captain Obvious] I have no idea, I never really undferstood DependencyProperties
[Captain Obvious] I just used a model which implemented INotifyPropertyChanged and that seemed to avoid the need to mess about wioth them
[Hector] hmmm. I would like to do it properly now, but I've rushed everything code-behind and it's going to take a little while to adapt to MVVM
[Captain Obvious] Allegedly it's a bit slower doing it that way but I've never really had an issue with it
 
mr5
ViewModel.ImageSourceFromVM = dependency.DoSomething()
<Image Source={Binding ImageSourceFromVM} />
should be something like that
 
Hi How can i add default page in razor pages app
 
[Hector] amazing, i just realized my linkedin account was still linked to my previous company, which I left 2 months ago, so I detached it and now i cant attach my current account
 
10:32 AM
@SaTech @page "/" I guess?
 
i used public IActionResult Index()
{
return RedirectToPage("/Page");
}
 
@Botler ...you can attach a linkedin account to another account? Why?
 
but didn't work
 
[Captain Obvious] So you can use your work email and your personal email to access the same account
 
Why though
Just stay logged in with your personal email forever?
 
10:38 AM
[Captain Obvious] Well maybe you log in using your personal
[Captain Obvious] But you want your public email to be your work one
 
You say that as if I wanted my email public
 
[Captain Obvious] Many people on linkedin would
[Captain Obvious] Recruiters etc
 
They're on linkedin, they can contact me via linkedin
 
11:01 AM
[Hector] List<Tuple<double, double>>
[Hector] is this the best way to do a list of pairs?
[Hector] I guess it would be easier to do a dictionary but IDK if there's any advantagae for doing it this way
 
mr5
rate my arts skills
 
[Captain Obvious] Not bad at all
 
mr5
@Hector do you need some rules for your list?
 
[Hector] nope
[Captain Obvious] I see you also suffer from writing sliding down the page 🤣
[Hector] let me give you an example
 
mr5
I'm practicing my arts for work, to compensate my lacking of verbal communication skills
 
11:13 AM
[Hector] i have a couple factors for each line
[Captain Obvious] Makes sense to me
[Hector] instead of doing each couple of factors individually
 
mr5
what sliding down the page?
 
[Captain Obvious] anon types also work, although they're useless if you need to specify types in a generic
 
mr5
my vertical lines are perfect
 
[Hector] i want to have something like List<double,double>
[Captain Obvious] I mean the horizontal ones
 
mr5
yeah lol. it's hard for me to write straight line horizontally. dunno y
 
11:15 AM
[Captain Obvious] A tuple is probably the best option if you don't want to deal with any special behaviours of things like dictionaries
[Captain Obvious] It's common, if the thing I'm writing on isn't line then my text falls too
[mr5] ohh. yup. good use for tuple
 
mr5
fix your botler @CaptainObvious
it doesn't work for Discord markup
 
[Hector] I think a metalist is a better idea than tuples
[Hector] why tho
[Hector] it can be extended to have more members if needed
[Captain Obvious] Well because there's no guarantee that the items in the main list will have the same amount of items as eachother
[Captain Obvious] Or in the same order
[mr5] oh, is that how you call it "metalist"?
[mr5] metadictionary would be dictionary of dictionary?
[Captain Obvious] I mean I'd just call it a list of lists
[mr5] <@263075131323187203> tbf, disabling some features not working for C# chat seems like a good marketing strat.
[mr5] "if you want to view this markup, you have to go to our Discord server"
[Hector] good point
[Hector] tuple looks a bit prettier
[Hector] but not too much
[Hector] I tried an MDA but I can't iterate that shit properly
I think you should be able to do
cs
List<Tuple<double, double>> test2 = new List<Tuple<double, double>>()
            {
                {1d, 2d},
                {1d, 2d},
                {1d, 2d},
                {1d, 2d},
            };
[Hector] AFAIK yes
[mr5] iirc, it should be (1d, 2d), ...
[Captain Obvious] yeah that
[Captain Obvious] close eonugh
[Hector] also fun to be able to use "metasomething" as a word
[Hector] like metadata is data of data, you know
[mr5] metalica would be lica of lica?
[mr5] where did you learn that?
[Hector] not sure if that's prettier
[mr5] > You can define tuples with an arbitrary large number of elements:
[mr5] ^ from msdocs
[mr5] it's handy than List
[Hector] friend at work, we started to joke about it, and it sunk
[mr5] is this so called "friend" with us in the room right now?
[Hector] nope
[mr5]
[Hector] he used to be my senior in my first real job
 
12:05 PM
[Hector] lol IDK what I did but now the app is capturing VS
 
12:52 PM
[mr5] capturing what
 
@mr5 0/10
you include ads in design
 
mr5
lul
It's Active Directory actually
 
ew, ads for active directory
 
mr5
ADFS to be complete
 
1:53 PM
Ryan Donovan on June 01, 2022
What does a blockchain built for engineers look like?
 
mr5
2:16 PM
2
A: Why must "stride" in the System.Drawing.Bitmap constructor be a multiple of 4?

Tim CAs has been stated before by Jake you calculate the stride by finding the bytes per pixel (2 for 16 bit, 4 for 32 bit) and then multiplying it by the width. So if you have a width of 111 and a 32 bit image you would have 444 which is a multiple of 4. However, let's say for a minute that you have...

> As has been stated before by Jake you calculate the stride by finding the bytes per pixel (2 for 16 bit, 4 for 32 bit) and then multiplying it by the width. So if you have a width of 111 and a 32 bit image you would have 444 which is a multiple of 4.

However, let's say for a minute that you have a 24 bit image. 24 bit is equal to 3 bytes, so with a 111 pixel width you would have 333 as your stride. This is, obviously, not a multiple of 4. So you would want to round up to 336 (the next highest multiple of 4). Even though you have a bit of extra, this unused space is not significant enough
TIL
 
mr5
2:48 PM
you would immediately be authenticated from a website if you just copy the 'Cookie' header right?
 
in most websites, yes
not in all of them
cookies are a client-server thing
so for paged applications, it probably would
but for single page applications, cookies aren't really supposed to be used that much, they would probably rely on localstorage for caching of authentication tokens
and even if they use cookies, sending those cookies on the request to download the html/css/js would probably not make any difference
 
3:18 PM
posted on June 01, 2022 by Grace Taylor

Visual Studio 2022 allows you to personalize your IDE so you can code the way you want. We’ve added new document management capabilities so navigating tabs and organizing your workspace has become more flexible. Take a look at our other Personalization capabilities, The post Improved doc management personalization appeared first on Visual Studio Blog.

 

« first day (4246 days earlier)      last day (705 days later) »