« first day (2986 days earlier)      last day (2187 days later) » 

mr5
mr5
00:26
This is what 24.9 billion pixels look like
 
3 hours later…
02:58
best way to store a list in an entity?
by DTO?
nvm stupid question
got that.
03:15
I need help about batch, can some one help me ?
mr5
mr5
04:09
You are passing around Dictionary<K,V> across pages and accessing its values using a string literal. Is there any way I could solidify this "string" literal so that it's safe for refactoring?
I have in mind is storing a constant string into the receiving page but it seems to be less intuitive.
 
2 hours later…
mr5
mr5
05:51
I have a hat yay!
But it's not a hat though
 
1 hour later…
07:03
Gooood moorniiiiiiing CeeeeeShaaaaarp! Have you rediscovered anything long thought lost or forgotten lately?
That thing not really happened in my life. I remember where all of my stuff put at
08:05
Maybe a place you havent visited a long time, a song you always heard as a child and had forgotten about, or a recipe your mother used to make?
good morning
ohayou
Holá
It happened silently, but Airz is back at /r/tfts!
2
morning all
Somebody star that message so people may know!
Morning Default o/
08:13
which one?
there you go
👌
Dude vanished three years ago, and now just continued writing.
Still no answers about the fucking keyboards though
08:49
'morning.
@Squirrelkiller I wore a jacket last night that I haven't worn since last winter. There was an asthma inhaler in the pocket.
Spider-Man: Into the Spider-verse has a pretty good soundtrack.
As well as being a damn good movie.
09:21
People around who has been using Core ?
Core what?
I've used .NET core a bit, and ASP.NET Core a bit more.
We will switch from ASP.Net MVC to Core in 2019 and I was wondering if there are many people on ASP.Net Core these days or still mostly on ASP.Net MVC
ASP.NET Core is catching on, I think, mostly because it can run on .NET Framework as well as on .NET Core, so you can switch to it without switching your entire runtime environment.
Personally, It think it's definitely a step up from ASP.NET WebApi 2 with a lot of improvements.
I've seen ASP.Net Core 2.0 projects with ReactJS implemented that looks very cool
I've been creating new components in Core where possible
And fucking hell he's back? he just dropped off the face of the earth
09:34
hm i got a question
i got a web app that has an oauth login to another site
when i go to their page and login
how can i access that token
on my page?
@Proxy The oAuth provider should redirect the browser to a URL on your app, as defined in your app registration. That URL will be redirected with the token as part of the query string.
That confuses me. Oauth generally works with a secret id/key and use those two to get a bearer token right?
@AvnerShahar-Kashtan yeah i figured out as much. For now we only used it for mobile login
@Falcon A secret-based oAuth flow is for server-side scenario where you want server code to get a token without user interaction.
mr5
mr5
hello
09:37
The client flow for oAuth uses redirects.
so it returns a "deeplink" for the mobile even on web
So there are no secrets passed.
@Proxy You should probably have different application IDs for the web and for mobile.
yeah
okay thanks
Or perhaps it allows you to specify the redirect URL as part of the oAuth request.
AAD does.
(As long as it's one of the registered Redirect URLs)
Either way, the token comes back as part of the redirect
mr5
mr5
09:49
6 hours ago, by mr5
You are passing around Dictionary<K,V> across pages and accessing its values using a string literal. Is there any way I could solidify this "string" literal so that it's safe for refactoring?
6 hours ago, by mr5
I have in mind is storing a constant string into the receiving page but it seems to be less intuitive.
*sniff sniff*
@mr5 It looks like you're rebuilding the Session/Application store.
But generally speaking, yes, constants are the simplest way to go.
mr5
mr5
What's the Session/Application store?
@mr5 A mechanism in ASP.NET to share a Dictionary between pages.
mr5
mr5
ehh, string constants are ugly
o.O
09:54
What's in the dictinoary
Rider 2018.3 has...
mr5
mr5
I think it's the same for Android. Not sure about iOS.
@mr5 So don't use a Dictionary and instead use a typed object.
im like "no no no no no no... no... hell no... I refuse... no!"
09:55
@Wiet Congrats, welcome to 2015 or earlier
If you don't want to reference the values by a string, don't use a data structure that's keyed by a string.
mr5
mr5
@AvnerShahar-Kashtan The Navigation library (Xamarin Prism) I am using is enforcing these passing of dictionaries across pages
@LeeButler it is the most disturbing bug I have seen so far
It's not a bug? Unless it doesn't work properly in which case sure
there is no feeling like writing code and your lines just jump up and down every single character you write
mr5
mr5
09:55
@LeeButler keys are string and values are object
anyway brb meeting
@mr5 Thanks for describing how a dictionary works.
what do you even want to get out of it?
do you always want to see how many times something is used?
I can understand if you want to know in an eye glance if it is used at all
mr5
mr5
@LeeButler :D
so 0 vs 1..inf
@Wietlol A quick easily discoverable tool to find references in addition to keyboard shortcuts.
@mr5 In that case, use consts. That's what they're for.
mr5
mr5
09:57
but you can register any type of key in plain dictionary
@Wietlol If some method I have to adapt to the new parameter of my new method isn't used a single time, I will ask somebody if I can remove it. For example.
@mr5 Yes. That's how dictionaries work.
Or if it's referenced exactly once, by itself.
Look, you either stop using Prism, add a pull-request to change how Prism works, or use the framework in the best way possible, which means using constants for your standard, commonly used keys.
Avner do you have Asthma?
09:58
@Squirrelkiller I do, but in this case it wasn't mine.
@Squirrelkiller if a method is unused (just like every other unused code) it's colour is grey
So yes, there's nothing forcing you or your team to register a constant for a key. You can write code analyzers for it if you really want to.
But to make the 90% of usages easier to refactor and harder to accidentally mistype, create a simple static PageStateKeys with consts in it for the keys that are commonly used.
funny enough, it doesnt show "0 usages"
mr5
mr5
10:00
@AvnerShahar-Kashtan I am trying to differentiate the type of dictionary enforced in the library I am using
@Wietlol How about, instead of ranting how this tiny little detail is "the most disturbing bug ever!", simply disable it in the settings?
already did :)
but im not sure what people use it for
it seemed I can place it after the declaration, which removes the issue of jumping lines
mr5
mr5
you can prevent yourself from seeing it when you start to use VS for Mac
How is VS for mac btw? Close enough to the Windows version?
@mr5 but then I have to use a mac
10:08
If you use Apple product, you have unlimited reason to prove it is best.
Dont ask Apple user how about Apple product, they answer are same.
haha
I have a mac but I haven't tested Visual Studio on it yet :P
mr5
mr5
@Falcon less cluttered
wait I'm using the Community Edition...
Once we start using Core I will start using my Mac as well
just because I can
10:55
Hello, I am trying to load a url using HttpClient every few seconds but the problem is that it's always timeout on anything but a browser.
What could be the reason and what's the solution?
I'm guessing you're abusing the Async methods with GetResult.
I have tried async and non-async
WebClient, HttpClient, etc.
11:36
Hi guys
How in WCF could we handle cookie as Httponly = true?
like in Bindings we can do : allowCookies="true"
11:57
Oh where do I begin
@Avner whose spray was it then?!
@Wietlol Methods with 1 reference arent grey, even if it's their own recursive reference. Yes I know, it get's a warning saying its only call is by itself. Still. Also, when there are several references, you get an overview of how often it's being used. 6 references? I'll refactor that. 90? Hell no.
@nyconing *their answers are the same
Possession with "their"
@Squirrelkiller My daughter's.
Ah that makes sense
@Amir Try fiddler, see what is sent and what is received, if any, by both the browser and your application.
@Falcon what's wrong with you
haha
Sorry :3
I've done my studies on a macbook and got kinda used to our fancy terminal and stuff
but hoho I'm not saying that Windows is bad :P
VS for Mac has a lot less tooling than full VS, though.
Does it have 'go to' function and 'find all references'? If so, it's all I need :P
I've been using Rider for some time on Windows and that also exist on mac so I think i'll be fine anyway
12:37
1 usage, but never used
nice contradiction :)
The usage is itself.
there is nothing wrong with it, everything is quite explainable and everything I expected to be there is there
There's a codeless code lesson somewhere in there
"Remove dead code."
*That isn't part of the API
Stuff in libraries might be referenced externally
12:49
if it is part of an API, it isnt dead code
Exactly, but it would still show as never used
how about tests - does it show for assemblies referencing it in the same solution?
those get picked up, yes
Everything in the smae solution is analyzed
@Squirrelkiller why so?
there must somewhere be a reference to it that says that it is an endpoint
13:05
Depends. jetbrains offers annotations telling the analyzer "this method/property is part of the API" called [ImplicitelyCalled], but yxou have to install Jetbrains.Annotations for that.
If you just build a library you're gonna publish via nuget, you can't know where it'll be referenced.
in our frameworks, we also use annotations, but methods annotated by those things are by definition "used"
this works for basically everything
even for System.Web.Services.WebMethodAttribute
Something in a class library isnt a web methods though
I don't wanna put system.web into my Dto library
13:21
true
for class libraries, we only expose interfaces though
Although I still wonder if the compiler somehow removes jetbrains.Annotations, since it's jsut for development.
those interfaces have "unused" disabled
im not sure the C# compiler can do that
in Jabaland, you have libraries like Lombok, which has annotations like these
and that one is removed during compile time
(except for the runtime variant of it)
I mean, as soon as an interface gets implemented, that's a reference
but the methods might be unused
You might notice if the annotation says "1 Usage"
13:32
A public method would probably never be marked as "unused", though.
API endpoints are public, and public methods aren't marked as unused, because the static analyzer wisely knows that it might be called externally.
it is indeed marked as unused
Why would anyone not want codelens
THat's where the ImplicitelyUsed attribute comes in
Is it in a public class?
ah no, internal
just a sec
13:42
@Squirrelkiller Exactly. The moment it's publicly visible, it won't give you the annotation.,
Yes, yes it does
14:02
strange:
14:15
Hi
Say I have a file format that has a syntax, but also additional logical dependencies. Is there a special word for these dependencies?
Example:
items=8
item1=a
item2=b
...
item9=i
Syntactically, the file is correct, but it has 9 items where only 8 are expected
Depend on programs, but item9 will be ignored? Or program did consistency check and throw Exception, but in this case, items=8 stored item count are redundant.
@ThomasWeller implicit structure?
no, it's not really implicit.
@nyconing: the question is not what the program will do, the question is whether there's a good term for googling :-)
14:22
I think "syntactically correct but invalid"
maybe "semantically invalid"
@nyconing: I think I'll try redundancy
inconsistency data
84
Q: What's the difference between syntax and semantics?

gsingh2011I've always thought that referring to the syntax of a language was the same as referring to the semantics of a language. But I've been informed that apparently that's not the case. What's the difference?

Android's RecyclerView used inconsistent for items count are incorrect than expected.
191
Q: RecyclerView: Inconsistency detected. Invalid item position

KarolDepkaOur QA has detected a bug: when rotating the Android device (Droid Turbo), the following RecyclerView-related crash happened: java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid item position 2(offset:2).state:3 To me it looks like an internal error inside RecyclerView, as I c...

@nyconing That's a specific case, but I think @ThomasWeller is asking about how to refer to data that is syntactically valid, but still contains invalid data, in general.
So I'd say it's "semantically invalid". Just like trying to deserialize a JSON representation of an object that doesn't contain the right fields - it's syntactically valid JSON, but it's not, semantically, the object you want it to be.
14:25
@AvnerShahar-Kashtan: Semantics is close I think. In the given case, each line has a semantic and it has a clear meaning, but it doesn't fit together
@ThomasWeller That's just a question of scope. Each line is semantically correct, but the whole file isn't semantically correct - it specified an item count that isn't true.
hmm, ok. Good point
Thanks for your input
I have 3 terms now that I will research
Also try out "schema", which is a way to enforce semantic constraints on a structure.
Ok, great.
@AvnerShahar-Kashtan: regarding the public unused stuff: in JetBrains R# you can turn "solution wide analysis" on or off
I think this will change the behavior
14:51
I have very importat question:
Are you using tabs or space file formating? Just to know (tabs here)
15:16
Use (literally) \t
@J.Doe i dont use spaces because it conforms with the globalist agenda
I have a macro that randomly replaces tabs with four spaces and vice versa that runs on save.
3
Besides
If I could trust spaces I wouldn't have this hat made of tinfoil. Space is where the aliens come from.
2
Spaces open portals for the interdimensional beings to transmit their agenda to the global elite
15:33
Now you're thinking with border-radius
Oh god, don't say that magic word
otherwise H̗̺͆̔̆ͦ́Ę̸̷̟̞̞̮͔͖̗̽ͩͧͯ̇̏ͤ̂ ̴ͮ̋̄͏̹͙͎̤̲̯ͅC̠̬̼͍̗̟̭ͩ̓Ǫ̳̿̎̄ͤ͑́ͪM̷̳̺̪̜̞̜̎̃̇͐͝Ẽ̯̩ͮ̐̾̓͒͝͠S̵͉̗̬̹̃ͪ͘ͅ
Who cares space or tab, I dont even know if VS randomly place a TAB inside my class.
I really dont like white characters. Always if need to work with them in code have enabled showing white characters - great thing
You racist. You only like black characters then? Is that what you're saying huh?
Black, yellow, white - I hate all of them if they are invisible
15:44
Quick, take some yellow vests from the closet @RoelvanUden
But you have right, white characers is wrong, it should be named like "transaprent characters" or "invisible characters"
@MikeTheLiar but what do you use in the ende?
<space><space><tab> ?
16:07
In the ende, it doesn't even matter.
i've come so far, to tab it all
But in the ende, it doesnt even matter.
in IJ, indents arent even multiple characters
indents are treated as one block
(including the newline)
16:24
one thing, and i dont know why
doesn't even matter how hard you try
keep that in mind, i designed this line
to use tabs and not spaces
formatting
tabs are a valuable thing
ok im done
also... anyone writes code in non-monospaced fonts?
EW
Why would anyone write code in non-monospaced fonts?
well... why would you write code in monospaced fonts?
formatting
Because it's easy to see things like indentation and line length relative to everything else
16:39
ANyone know if VS Code uses a specific library to render .md files, or does it itself?
It's open source isn't it? Why not just have a gander at the source
Cuz I'm afraid I'd need like 3 hours to find a hint
user7426734
17:35
1
Q: How should i register DI for the following via Unity web.config approach?

face turnI have an interface and a class as follows, public interface IEventStoreRepository<T> where T : Entity and class public class EventStoreRepository<T> : IEventStoreRepository<T> where T : Entity, new() i have configured in the web.config as follows, <register type="IEventStoreRepository[Ent...

19:14
Hi there.
I try to send a websocket message with Windows.Networking.Sockets.MessageWebSocket()
and it sends the messages like this:
 dataWriter.WriteString(message);
        await dataWriter.StoreAsync();
        dataWriter.DetachStream();
just a string
but all websocket libraries (servers) I know use 'events' and messages
how do solve this problem?
on the servers it looks like this:
  ws.on('event', function incoming(message) {
    console.log('received: %s', message);
  });
 
2 hours later…
21:17
@KendallFrey you around?
21:33
Never mind. I solved my regex problem the way my last date with your mom ended. Sloppily.
wOaH
21:47
Speaking of RegEx, if anyone wants a challenge, tell me what on Earth this does: (?i)^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{‌​2})?)$
Probably an email adress or something
What else, except a very specific domain problem, could such a conplicated solve?
Also: How do I correctly put a SecureString into a Database, hashed? DO I really need to get the plaintext string and hash that? That's not the point of having a SecureString in the first place.
I don't know how you're going to get the hash without involving the plain text string at some point.
I hoped maybe the SecureString class has something for me I can use that somehow...doesn't involve me manually extracting the plain text password.
Also sadly I think you're right about the regex re: email validation
21:58
Or maybe some built-in hash function that takes a secure string
In which case STOP VALIDATING EMAIL ADDRESS WITH REGEX
In fact
STOP VALIDATING EMAIL ADDRESSES, PERIOD
Isn't SecureString just rules about when and how it's loaded and removed from memory?
The string itself isn't encrypted or hashed
You just can't get at it from an insecure memory dump
I might be remembering that wrong.
It's essentially a pointer to unmanaged memory, there the password is in plaintext
But I hoped to get that kind of method by MS, since it comes naturally to use a SecureString for handling passwords inside an application.
Well, I'm doing it. I'm writing an Extension method for SecureString that hashes it.
That's the spirit.
22:35
Trying to execute a delete sql command from c#
I get a list of the ids that I want to delete. How do I execute a sql command to delete from a table where the id is in that list?
The part where I'm linking the sql command and the set of ids im confused about
foreach (int id in ids) { Sql($"DELETE FROM Table WHERE Id = {id}"); } Or build a string with a bunch of OR statements instead of executing a million delete statements on their own. No?
22:53
Can I do something where I build the command text once
Define build once
and then in a loop iterating over the set of ids I call ExecuteNonQuery and commandAddWithParameters()
where I redefine the id?
foreach (var runId in runIdsUsingModifiedSurvey) {
							cmd.Parameters.AddWithValue("RunId", runId);
							cmd.ExecuteNonQuery();
						}
am i allowed to call the execNonquery in a loop like that?
I have no context for what cmd is, but from what I can see there it looks like you build a command and then run it, repeatedly... Which doesn't make much sense if it equates to something like this.
One would think you would add parameters in the loop before executing the query once.
sorry cmd is the sqlcommand
23:19
But then
How could I write that latter case
and keep appending OR id=x?
Use a subquery
delete from sometable where someid in (select someid from whatever where somecondition)
23:59

« first day (2986 days earlier)      last day (2187 days later) »