« first day (3866 days earlier)      last day (1074 days later) » 

2:01 AM
 
2:34 AM
posted on May 13, 2021 by Scott Hanselman

My co-worker Tanha Kabir has a cool Visual Studio Code extension called REST Book. Sure, there's lots of extensions and lots of ways to call REST APIs from Visual Studio Code - not to mention the command line. However, REST Book is a Postman-like notebook that uses the Native Notebooks UI experience that's already built into Visual Studio code. If you already love the concept of Notebooks lik

 
 
1 hour later…
mr5
3:50 AM
London to SG latency would be reduced to 90ms as compared to current 160ms
 
Expensive than most ISP in the world
Also it will have higher latency or disconnects while at bad weather
Not suitable for city residents
Its good, but their cons are very critical
 
 
1 hour later…
5:45 AM
 
 
3 hours later…
8:28 AM
@Wietlol is there a Number class like in JavaScript?
Javascript doesn't care if you've got a byte, int, int32, int64, float, double, long, longer
double z = (double)a + (double)b + (double)c + double(d) + (double)e + (double)f;
vs
var z = a + b + c + d + e + f + omicron persei 9
so javascript is better? checkmate athiests
1. does c# have Number type or can i use double everywhere and not be frowned on?
2. why am i getting an error on this line:
float tempo = 0;
textField.StringValue = (string)tempo;
CS0030: Cannot convert type 'float' to 'string'
 
8:49 AM
Now power generators can easily sends a pulsed gigawatts/h, lets build a time displacement machine, starts on quantum eraser
@1.21gigawatts tempo.ToString()
 
...i see.. ty
 
9:07 AM
You can just use double all over the time if you want, and decimal for more float precise, like money
Cast a double to int or long will lose decimal point
Convert to string and vice versa: 50.009d.ToString(); double.Parse("50.009")
C# are strong typed so... unlike js, you should care about type all the time
 
Just apply dynamic everywhere...to rule the world!
 
nah dynamic still strong typed, even worse, you get error on runtime vs get error on compiletime
 
That's still better than nothing at all...
Why declare bunch of classes when you can dynamic?
 
9:27 AM
lol dynamic still typed, you just guessing what type is it, you calling wrong method on wrong type then crash
You can avoid class in C# by write Action f = ()=>{}; etc
Not sure if it causing memleak while manies of them stack up
 
But it worked so well for my program, it never crashed...
 
good guessing, or bad naming
my_name_string
lol wonder there is a plugin can convert all type to dynamic
 
Hmm...why not make one for the meme? lol
Also remove the Main() method, class, namespace too, it will still work
 
worked, in dll compile mode
afaik a exe must has Main()
 
Seem to work in normal console project too
C# 9.0
Feature: Top-Level Statements
 
9:38 AM
it still has Main(), just assisted
I didnt upgrade to C#5
my team killing me when client keep complains the app didnt work because of .net framework, upgrade .net framework one by one makes them head bigger
C# .net5 I means
 
Bundle runtime with your app?
 
Force a Roslyn run at new version on old .NET works on C#8, not sure on C#9
bundle runtime?
 
Self-contained
Publishing your app as self-contained produces a platform-specific executable. The output publishing folder contains all components of the app, including the .NET libraries and target runtime. The app is isolated from other .NET apps and doesn't use a locally installed shared runtime. The user of your app isn't required to download and install .NET.
 
lol 100+M on single exe
tried once and forget
 
At least no more headache managing framework version lol
That single exe magic is actually a self-extracting zip archive that load the main program...
 
10:13 AM
c# is way better. what wrong with:
byte z = (byte)myByte + (byte)myInt + (byte)myFloat + (byte)myLong + (byte)myDouble + (byte)myTriple;
i'm convinced to use double everywhere but why is this erroring:
int.Parse(stepper.DoubleValue *100)/100);
I want my double to go to two places
 
you parsed into int, int has no decimal place
 
Math.Round(stepper.DoubleValue *100)/100;
 
(stepper.DoubleValue * 100 / 100).ToString("0.00")
 
mr5
x * 100 / 100 == x
have you ever not do your work at working hours but work on it instead at a later time since nobody checks on you?
 
i'm using the stepper for the first time and it looks like it's separate from the text field. so i'm manually writing code to connect all the parts
should i be using binding for this? haven't learnt c# binding yet
 
10:21 AM
@mr5 sometime, underestimated or client suddenly urgent
 
Just hardcode an error message for the part that's still not implemented yet, disguised as bug
 
mr5
wfh mood is so random for me. I can't focus 100% of the time.
 
Just stop thinking about games and cryptos then you're good lol
 
mr5
how about YT? lol
 
YouTube only for background music
 
mr5
10:25 AM
now I need to spend my resting time to do the work I should have done earlier
or else, I would get fired immediately
 
@mr5 are you asking me about working at night or nyconing?
 
mr5
Can't focus also when there's a background music.
@1.21gigawatts no. it's a general question. anyone can answer lol.
 
Lofi music, white noise, or nothing at all
 
i work at night bc quiet
except the @ is making notifications go off
it is messaging me 12 times now
lol
@mr5 are you editing the line?
 
mr5
@1.21gigawatts no I don't. why?
 
10:30 AM
This message has been edited 18 times
 
lol it is popping up notifications each edit
 
I have more concentrate at night, but company want me to working at daylight
 
Some bosses just want you to sit in the office even you have nothing to do
 
@1.21gigawatts last time I checked, Javascript doesnt have any of them, with the exception of double
Number in JS == double in C#
 
@1.21gigawatts youre not the one complaining this, they are some room rules that prohibit editing on reply or tagged transcript, for me, this is a freaking stackexchange BUG
 
10:34 AM
so in XCode (using designer) you drag a line from control to class.h and it creates an action right?
 
then you add a method handler in c# controller class
it's really setting up an event dispatcher correct? so does that mean one method handler get all events?
 
mr5
@DKDhilip 🤣
 
i dragged line from a textfield to viewcontroller.h and set "Action" but it doesn't let me choose what event
what if i need two events like "change" and "focus"? O_O
 
This is C++ ?
 
mr5
10:37 AM
maybe you have a different signature
iirc, action events require the return type to be an id
 
Objective-C?
 
mr5
he's probably working on Xamarin.iOS
 
in visual studio on mac you double click on the main.storyboard and that opens XCode and you use the designer to create your form ui. you can set properties on the form controls and also do some wiring for events. then you switch back to VS and write in C#
i just noticed there is an "Action" property that lets you select what an action does. it is a dropdown list that has two options. "Send on Enter Only" and "Send on end editing"
guess i probably have to add event listeners for other events
 
10:55 AM
[Hans1984] lol
 
- (IBAction)tempoChangeEvent:(id)sender;
- (IBAction)tempoFocusIn:(id)sender;
partial void tempoChangeEvent(Foundation.NSObject sender) {}
i can create multiple action events and there's no errors
but i don't see any event in the handler
i wrote the tempoChangeEvent(Foundation.NSObject sender) function manually
and i named the actions - (IBAction)tempoFocusIn:(id)sender;
but xcode wrote the line ...anyway
Here's from the top of the class
// This file has been generated automatically by Visual Studio to
// mirror C# types. Changes in this file made by drag-connecting
// from the UI designer will be synchronized back to C#, but
// more complex manual changes may not transfer correctly.
Will this prevent the user from entering anything but numbers?
var tempo = double.Parse(textField.StringValue);
if (tempo!=0) { }
 
11:36 AM
Morning, there a way to tell in sln what's not attached to source control in VS besides visually checking the folders. Some reason a few files didn't attached to TFS.
 
12:09 PM
it's occurred to me that most of my clients don't know what a voicemail is
 
12:20 PM
[Captain Obvious] It's not exactly bleeding edge technologyt
 
well, if they knew what it was, they would've responded to mine
 
[Captain Obvious] Yeah some people just ignore voicemails
 
mr5
I just ignore emails at my work
Why do people still use email at work when they can just message me on Teams.
 
[Captain Obvious] Because
[Captain Obvious] Teams messages go awol
[Captain Obvious] Emails dont
[Captain Obvious] My magic SDK-creating pipelines are the best thing since sliced bread
 
Hi All, just wanted to ask for some opinions.

I have some code that takes a CSV file, converts it to C# row models, makes changes, and writes it back out to CSV.

The process happens within a loop so it can work on multiple files.
The models represents the columns in the file.

I know have a different structure CSV that I want to run through the same process.
I can quickly implement the new file structure by doing a copy/paste of the existing code and modifying it to handle the new C# model.

Is this a common thing and people use something like interfaces, or is there a neat solution?
 
12:37 PM
Depending on how these different CSV files relate, inheritance or composition with a fitting strategy(?) implementation might be a solution
(?): Strategy would work, but I'm in a lecture and can't think of whether or not there would be a better way
 
mr5
@matty357 if the columns are dynamic, you might prefer dictionary instead.
 
@mr5 cause I don't have teams, duhhhh 😨
 
mr5
@Freerey your company doesn't use any of those variant? slack? discord? etc...
 
we use skype for business, and only the IT team
 
mr5
oh Skype
 
12:47 PM
and I usually dread getting a skype message cause it's not something good
 
mr5
ha. messages from admins asking you to get a screenshot of your computer for auditing.
happens a lot in my work rn.
cuz wfh. they don't do audits before shipping equipments.
 
what is the screenshot supposed to prove..?
 
mr5
maybe to say it is still intact? dunno. lol
 
[Captain Obvious] That's dumb
 
1:03 PM
why does botler put [captain obvious] before his sentence
 
mr5
click the link and see for yourself
 
cap is speaking from Discord
 
i see.gif
 
[Captain Obvious] Like magic
[Captain Obvious] It's a discord relay, so anyone who speaks in the channel in discord will have their messages relayed to SO chat
[Captain Obvious] and likewise your messages are relayed back here in a similar way
 
1:25 PM
Thanks for your suggestions @Squirrelkiller and @mr5

I think I can have an InterfaceC with method GetClientNo()
ModelA has CustNo - GetClientNo() returns CustNo
ModelB has CustomerNumber - GetClientNo() returns CustomerNumber

This means I can keep everything the same, and anywhere in my loop where I need to work on the row, as in ordering them or modifying a field, I can add a method to the interface that gets me the appropriate field from the different models.
 
would you use this to get a number at two decimal places?
Convert.ToDouble(value.ToString("0.00"))
 
You mean round a number to two decimal places?
 
@matty357 Yes very common, I do it with PDF's
 
That's what Math.Round(value, 2) is for, in case you would want to answer "yes" to my question.
 
Is there a particular way to do it?
In my head using an interface makes sense and is easy.
 
1:36 PM
But the interface only allows me to call the same 'Output' not the same 'workings'
B/c every PDF is not the same
even reading them isn't
 
@Squirrelkiller nice. javascript world Math.round() rounds to int
 
Well, welcome to a world that has real types
 
2:10 PM
Cassidy Williams on May 17, 2021
There are a lot of opinions out there about how to improve and scale sites “beyond the Jamstack” by adding in features that use a Node server in addition to the pre-built pages. One of those features is called Incremental Static Regeneration. Some people call it “hybrid web development” (or “hybrid serverless + static”) but let’s talk a bit more about what that means.
 
I feel like "they never tell me these things!" is becoming my catchphrase when it comes to debugging
 
mr5
why do they expect that everything is supposed to be taught to them?
 
I'm talking about when there's a bug in the system that they should've been able to catch months ago, yet here I am catching it now
 
 
2 hours later…
3:48 PM
Maybe They didn't see the bug?
 
4:24 PM
Hey all, does anyone know about any good deals for laptops for developers out there currently? I looking for a new developer laptop with approximately the following specs: Intel(R) Xeon(R) CPU E5-2698 v3 @ 2.30 GHz 2.30 ( 2 processors )
RAM 16 GB
64-bit processor
 
xeon processor in a laptop?
Might be Dell only
Yep Dell/Lenovo
 
5:02 PM
I just bought Dell Vostro 3500. It's very good. notebookstore.hu/…
 
 
3 hours later…
8:30 PM
 

« first day (3866 days earlier)      last day (1074 days later) »