« first day (2924 days earlier)      last day (2011 days later) » 

2:33 AM
Hello!
I use System.Data.SQLite.Core.1.0.109.2 in my WPF .net 4.5 app, as far as I understand it should use SQLite version 3.24.0 but when I create new db file and run select sqlite_version()
I get 3.21.0, What should I do to use the latest db?
 
 
2 hours later…
mr5
4:21 AM
Question:
What is this? 1.1.1.1
They claim to be the fastest DNS
 
Cloudflare's dns
subaddr is 1.0.0.1
 
mr5
So, what do they gain from it?
It's not Cloudflare's, it's 1.1.1.1
 
I mean 1.1.1.1 is owned by cloudflare
1.1.1.1 is a free Domain Name System (DNS) service. The public DNS service and servers are maintained and owned by Cloudflare in partnership with APNIC. The service functions as a recursive name server providing domain name resolution for any host on the Internet. The service was announced on 1 April 2018, and is claimed by Cloudflare to be "the Internet's fastest, privacy-first consumer DNS service". == Service == 1.1.1.1 DNS operates recursive name servers for public use at the two following IP addresses: 1.1.1.1 and 1.0.0.1 for IPv4 service, as well as 2606:4700:4700::1111 and 2606:4700:4700...
 
mr5
oh
So, time to switch to 1.1.1.1 now?
 
I prefer to use 8.8.8.8
google's dns
sub addr is 8.8.4.4
 
mr5
4:35 AM
why?
 
cuz it's enough fast for me.
if you watch youtube a lot, it's really nice choice to change as google's
 
@mr5 How they prove?
ISP own DNS will faster than any generic public DNS, in theory and exclude case of overload.
Just simply because of network latency.
 
@nyconing this is right.
 
mr5
5:39 AM
bool YoureObviouslyUpset = true;
try { int TO = 2; }
catch (MismatchException ME) {
    if (YoureObviouslyUpset)
        CaptureAllNegativity();
}
Riddle
 
5:56 AM
Goooood moorniiiiing CeeeeeeShaaaarp! Have you had any previouslz unknown sweets lately?
 
mr5
^ option to remove the spoiler and at the same time, give credits
@Squirrelkiller me no like sweets
except ice cream
 
Morning! :)
do you address your senior as sir/ma'am or call by their name?
 
We|re all on a first name basis here
Although at first alwazs go for Mr&Mrs $LastName until thez propose something else.
 
never sir or ma'am?
I feel guilty when I address like this to someone older/senior
 
mr5
Our company enforces the same policy. First name basis
I think it's good as you can talk freely to your seniors
 
6:11 AM
but what about respect?
I want to show them respect for their experience and sharing of knowledge
like senpai in japanese
 
mr5
Through action I guess?
 
hmm
thanks @Squirrelkiller, @mr5
 
mr5
But if we are talking to an older senior, we add "kuya/ate" before their names.
It's our native language to indicate a respect. Fortunately, it's allowed, else, it's quite awkward.
 
No, never.
German doesnt really have that.
Also, it's actually helpful in every conversation, regardles of seniority, to address people by name.
Even when talking to friends: Using the name of the person you're talking to, even if you're talking face to face 1 on 1, it kinda...makes a connection between you two. It focuses him on you.
 
mr5
additionally, we also add "po", "opo", any where of every sentences to add "more" respect ^^
 
6:25 AM
We just show respect by not lying to people and not talking behind their backs and stuff. And by using the last name, but when you get to know someone you tend to go to first name pretty quickly.
 
ohayou
@Breathing i call my superior onichan
 
mr5
@Squirrelkiller how about when talking to your parents?
 
Mom/Dad, although I'm a special case since I call them by first name. Long story.
Morning Proxy o/
 
mr5
@Squirrelkiller whoa
 
lol
 
mr5
6:27 AM
it's like they're just your best friends
Whenever I call my parents with their first names, I act like not to be their kid and will be followed by a joke <insert joke here>
But I feel a little bit of shame after doing that
 
For me it's normal
WHen talking to others I will still refer to my parents as "my mother/ my father"
 
6:51 AM
I was taught to call elders Mr./Ms. LastName, until they tell you toto use their first name. Sir/ma'am almost always used when I don't know their name, regardless of age (yes, slightly weird when they are clearly younger than you, but is obviously a sign of respect). When talking to my mother, I call her 'mom'; and when introducing her, I say "...my mother, FirstName." Fwiw.
 
@Arphile Snowing?
 
7:08 AM
Is saving user's file in wwwroot a good idea?
 
How to prevent other people from accessing it via
path
hmm
So where I gotta save files?
except database.
 
Is it a website? Do they use these files al lthe time? Is it just something they upload for you?
 
mr5
If the time is presented with UTC with no offsets, does it automatically mean it has an offset of ±0000?
 
Or some thing they store?
 
7:09 AM
They upload and download it
not often, but from time to time
 
mr5
@UbuntuCore you handle it using routing
 
So basically a NAS?
1) seperate application server and file server
 
So, on ViewPage I gotta link to those files via other controller which return those files (after validation)?
other endpoint*
 
Make application server tell file server "I have this user with this password for this file, please download it"
 
mr5
by default, most servers are implemented with a routing by means of local path
 
7:11 AM
or "please upload it" respectively
file server has a db with users and hashed passwords, and a list of files for that user
 
@mr5 but those are accessible for anybody, yup?
 
mr5
@UbuntuCore yes. unless you prohibit them with your implementation
you can also route them to a non-existent path
 
@nyconing nope. here's sunny.
 
good morning
 
mr5
Hmm, I am not really familiar with C# Web Development. Why can a IActionResult return anything including void?
 
7:20 AM
Yo.
 
hello
 
@mr5 why not?
@mr5 it makes your life easier tho
 
@mr5 IActionResult is a wrapper around an HTTP Response. Even a response that returns no values (say, a DELETE or POST request) has response metadata (HTTP status code, reason, etc) that can be encapsulated in the IActionResult object.
 
morning all!
 
G'Evening!
 
mr5
7:31 AM
@AvnerShahar-Kashtan Shouldn't it return the same type only? How does it become possible?
 
@AvnerShahar-Kashtan Hi! :)
 
mr5
Oh, operator overloading right?
returning another non-derived type and different to its declared type
 
Not sure what you mean.
The method returns an IActionResult. The caller of that method is the ASP.NET infrastructure, which takes that object and constructs an HTTP Response from it.
That response is serialized and sent to the HTTP client.
 
so basically performs ToString on everything?
and then returns that ToString in body
 
rather a byte[] if it is to send it over network
 
mr5
7:38 AM
@AvnerShahar-Kashtan oh I'm wrong. It does not allow to return void.
 
so probably something like IActionResult -> HttpResponse -> String / byte[] [-> byte[] ] -> stream of electrons
 
mr5
ActionResult<int> GetSomething()
{
	return 0;
}
 
@Default Or a stream of electrons. Depends on the resolution you wnt to dive into.
 
mr5
I mean, how did it become possible to return an int instead of ActionResult<int>?
 
@UbuntuCore ToString generates a display string, (probably) not a structured HTTP response.
@mr5 Ah, again, because of the infrastructure.
 
7:40 AM
@AvnerShahar-Kashtan just figured it was a bit weird suggesting that it converts it to a string. there are other constructs in C# explaining Responses.
 
@AvnerShahar-Kashtan I meant body of http response
I'm guessing
 
@UbuntuCore Yeah, but "ToString" is a simplification. It creates an HTTP Response, which is a string, but it doesn't call ToString.
@Default But HTTP is a textual protocol.
So an HTTP response is, by definition, a string.
Yeah, well, I'm not being particularly correct here.
You can transport binary data as well. I was thinking more of the common IActionResult sort of HTTP response.
@mr5 Because someone, at some point, thought "Well, if my infrastructure code is calling a controller method that returns int, but I know it's a controller method because, well, I'm the controller infrastructure and I'm calling it, how about I don't force the coder to add IActionResult<int> explicitly and instead assume that whatever return value the method has should be wrapped in an HTTP Response?"
 
mr5
@AvnerShahar-Kashtan so an infra can change the language/compiler specs?
 
@mr5 What? There's nothing about the language or compiler spec here.
 
mr5
btw, I found this definition of ActionResult:
public static implicit operator ActionResult<TValue> (TValue value)
{
	return new ActionResult<TValue> (value);
}
 
7:47 AM
It's just a C# method that returns "int" or "ActionResult<int>". Standard C# types.
 
mr5
is this the magic?
 
Ahh, I understood your confusion now.
Yes, that's exactly it. An implicit conversion operator.
If you try to assign a TValue into a ActionResult<TValue>, the compiler will look for this custom operator and call it if it's found.
If it was an explicit operator, you would have been forced to write return (ActionResult<int>)0;, which is ickier.
 
mr5
yes that's it!
It confuses me a bit. I just learned operator overloading could be used like that.
So basically, you can assign it also with other type!
 
You can. Doesn't mean you should.
 
mr5
Like, you declared something like TestActionResult<string> a;, then later in your code, you assigned it with a = "something"
 
7:53 AM
Implicit operators are useful for situations like this, when you want to wrap/unwrap automatically. Or when you have widening conversions (say, an int into a long).
But it can be tempting to abuse it as a parsing operator - say, something like MyObject obj = "{ "title":"blah"}";
Which automatically performs a JSON deserialization into an object.
Or even a simpler format: Point p = "31.21122,27.0122" to automatically convert a coordinate as a string to a Point.
These are usually bad examples, cases where the conversion should take place in a static Parse method or a constructor.
 
I remember in school we used to use DD-MM-YYYY format
 
mr5
@AvnerShahar-Kashtan that looks cool though
 
how come MM-DD-YYYY got start getting preference?
 
@Breathing I think the US is the only country that uses MM-DD-YYYY these days, isn't it?
 
7:57 AM
It get's confusing when range of DD lies withing MM range.
 
Yes, yes it does.
 
The legal and cultural expectations for date formats vary among populations. This page gives an overview of the Gregorian calendar date formats in general use. Using localised date formats causes ambiguity when a date is interpreted differently by individuals in different parts of the world. For the international standard, which should be used whenever a written date might be viewed by individuals from more than just one country, see ISO 8601. == Usage map == == Listing == === Table coding === All examples use example date 1996-04-22 / 22 April 1996 / April 22, 1996 – except where a ...
 
mr5
@AvnerShahar-Kashtan we also use it (highly influenced by American culture)
 
why can't fix to one? pfff
STANDARD!
 
@Breathing For the same reason we don't all speak the same language.
 
7:58 AM
MDY: United States (325), Federated States of Micronesia, Marshall Islands
 
But still, english
^This discussion room
 
YDM: used in Kazakh in Kazakhstan (Russian in Kazakhstan has DMY), Latvian in Latvia
 
:O
 
@Wietlol That's just weird.
 
lol
 
7:59 AM
@Breathing Our various Englishes, even in this room, are far from standartized.
 
DMY, MDY: Malaysia (35), Nigeria (190), Philippines (105), Saudi Arabia (35), Somalia (10)
good luck with those
 
I believe the M-D-Y order echoes the common spoken form - "March 20th, 1979".
 
also, central africa uses no date formats at all :D
 
And it caught on as the standard format before automated tabulation and certainly before computerization made it annoying as hell.
 
B – big-endian (year, month, day), e.g. 1996-04-22 or 1996.04.22 or 1996/04/22
 
8:01 AM
I would always say 25th December
 
L – little-endian (day, month, year), e.g. 22.04.1996 or 22/04/1996 or 22-04-1996 or 22 April 1996
M – middle-endian (month, day, year), e.g. 04/22/1996 or April 22, 1996
 
mr5
endianness can also be applied on dates?
 
it appears so
 
I haven't seen it used thus until now, but it makes sense.
 
> "Big-endian" redirects here. For the fictional characters in Gulliver's Travels who want to force everyone to break the tops of their eggs at the big end, see Lilliput and Blefuscu.
okay....
 
8:03 AM
I mean, except for the middle-endianness.
 
@Wietlol That's where the term comes from, you know.
 
woh
 
mr5
When I first heard endianness, I thought they are referring to Indian people lol
 
i guess so
 
8:03 AM
Clearly m-d-y is the best..
 
clearly separating the values is the best
{ "year": 2018, "month": 10, "day": 18 }
 
DDisgusting.
 
the issue of the formats is mostly about storage and communication of applications
and only... when you store them as strings
like 99% does in xml/json/etc
and some even do in systems where there is a date time thing available
 
Even if they're stored properly, the might not be transmitted properly over the wire.
 
0.o?
 
8:07 AM
Network byte order?
 
I suppose that is an issue which would corrupt the entire data set that you expect to receive
 
Because JSON, for instance, doesn't have a standard DateTime type, a service that returns data might send it badly - it should be either a 64bit unix timestamp or a RFC-compliant roundripable string, but it often isn't, because each service can technically send whatever.
So a service might return a date string formatted in their current locale. Which is horrible, especially if it doesn't tell you the format it used.
 
wow
 
64 bits.. Seems excessive :D
 
@AvnerShahar-Kashtan how about just a date?
 
8:11 AM
@ABuckau To keep a count of milliseconds since January 1st 1970, you need 64bits if you want to avoid the Y2k38 bug
 
^my comprehension level says same issue
 
No, sorry, that's if you're storing seconds. If you want millisecond precision, you need 64bit for a while now.
 
MMilliseconds....seems excessive :p
 
@AvnerShahar-Kashtan if you used milliseconds, you have had that bug a lot earlier
;)
you can also use... a double ;)
 
2^64 / (seconds per year: 31536000)== how many years?
 
8:21 AM
quite a lot
 
1970 to 2038 is quite a lot?
 
that is 2^32
not ^64
in essence, you square the amount of seconds
2^32 ^2
 
4294967296
^2
 
So like..past the death of our star? :p seems excessive.
 
mr5
!!> Math.pow(Math.pow(2, 32), 2)
 
8:25 AM
@mr5 18446744073709552000
 
@ABuckau but 2^32 is too little
2^64 is the next step
 
mr5
@CapricaSix this has been converted to double and the precision have lost
 
Why not 40 bits? Multiple of 8 and whatnot.
Mm..maybe not big enough. 48?
 
31536000 is larger than 16777216(2^14) and smaller than 33554432(2^15)
2^39 < x < 2^40
 
@ABuckau 1) You don't have a native data type between 32bit and 64bit.
2) What would this serve except for artificially introducing a limitation? Sure, you don't expect to be using the same code for millions of years. But people in 1975 didn't expect to use it in 2038 either. And you're not talking only about the time format representing the present, but perhaps simulations and future dates.
11 mins ago, by mr5
@CapricaSix this has been converted to double and the precision have lost
That's a good reason not to use a double.
 
8:38 AM
:D
 
Incidentally, .NET's DateTime struct only supports dates up to 31/12/9999.
DateTime stores the time as a 64bit variable representing number of ticks (100-ns intervals) since 01/01/0001.
Date/Time code is so, so icky.
  // Number of days from 1/1/0001 to 12/31/1969
        internal const int DaysTo1970 = DaysPer400Years * 4 + DaysPer100Years * 3 + DaysPer4Years * 17 + DaysPerYear; // 719,162
 
.NET's DateTime is just meh
this would be a great improvement
 
so much knowledge...<3
 
I would still stick with DateTime for scenarios where it's good enough, which are 90% of them.
 
8:55 AM
are you familiar with noda time?
 
Worked with it once or twice.
When we needed smarter timezone handling.
 
after you really used it, you'll find the System.DateTime to be lacking a lot
 
We've had this discussion before, even if not about nodatime, I think.
If I need X, I'm fine with a tool that gives me X, and I don't need a tool that gives me 5X, even if 5X is better
 
Press 'X' button to restart.
 
Yeah. If I can work with the minimum, then I'll work with the minimum. Why introduce more dependencies when you don't need them?
 
8:59 AM
(X) Doubt.
 
Principle of Least Power applies.
 
@RoelvanUden well... in theory, you dont get more dependencies
you just get different ones
 
so, it's time to go my Sweeeeee-----t home!
work time is over!
See ya!
 

« first day (2924 days earlier)      last day (2011 days later) »