« first day (3048 days earlier)      last day (1893 days later) » 
01:00 - 14:0014:00 - 00:00

1:07 AM
@Arphile Evening
 
1:49 AM
Annoying VsCode has CodeLens but VsCommunity does not..
 
Microsoft ignored it since 2016 and frozen/seal this issue on Github.
 
They closed up shop on that
Ohh like VS does
I just tried it
But Floating Windows!!!!
 
mr5
What's the real purpose of Xamarin.Android.Support packages?
I have tried removing them all but still the project is compiling.
 
Any they don't get restored?
they in the some package manager?
 
mr5
They are supposed to be included as NuGet packages.
 
2:01 AM
It is a java library binding, and it is important library for every android app. Without it, you dont even have Activity class.
 
mr5
I have accidentally removed them yesterday because of dependency conflict
nyc, how come the app is working fine?
 
I thought it was NuGet, but didn't want to sound dumb
 
Check it on bin\Configuration
It might be included in some another package
And youre using Xamrin.Form, you dont even need it on design time.
 
mr5
I will try to clean the bin&obj folders
 
It should be Xamarin.Android.Support.Design
 
mr5
2:11 AM
Look, it's on the obj folder!
I think it's just the VS bug
 
It might be a build framework of Xamarin.Forms
 
mr5
I'm not even sure which version of Support libraries I am using
But I have XF 3.5 included which means the support libraries should be >= 28.x.x
Should the support libs have their own dlls?
 
Xamarin.Android.Support.v4.Utils.dll
Inside APK
I have only one package installed Xamarin.Android.Support.Design
 
mr5
In my case, I only have projectName.Android.dll, Xamarin.Essentials.dll, Rg.Plugins.Popup.dll
No support libs dll
hmm
 
Not sure, maybe Xamarin.Forms dont use support library?
No. Im wrong
Xamarin.Forms have dependencies
MonoAndroid 9.0
Xamarin.Android.Support.CustomTabs (>= 28.0.0.1)
Xamarin.Android.Support.Design (>= 28.0.0.1)
Xamarin.Android.Support.v4 (>= 28.0.0.1)
Xamarin.Android.Support.v7.AppCompat (>= 28.0.0.1)
Xamarin.Android.Support.v7.CardView (>= 28.0.0.1)
Xamarin.Android.Support.v7.MediaRouter (>= 28.0.0.1)
When Xamarin.Forms is installed, you will have all of them installed along with
 
mr5
2:28 AM
So it's not necessary now to include or update them manually?
 
No, the NUGET manage its dependencies itself. (and hide it)
 
mr5
I think you mean yes?
 
So you dont see these 6 library inside NUGET manager
Mean you dont have to manage/ update it manually
 
mr5
Yep. I am wondering why they aren't including those in their release notes
 
Old version of VS show all the packages, included dependencies.
Now with the newer version, if one of dependency already installed, it show conflict and rollback the whole installation.
 
mr5
2:52 AM
Great!
 
 
1 hour later…
3:54 AM
posted on February 15, 2019 by Scott Hanselman

I've been exploring nopCommerce. It's an open source e-commerce shopping cart. I spoke at their conference in New York a few years ago and they were considering moving to open source and cross-platform .NET Core from the Windows-only .NET Framework, so I figured it was time for me to check in on their progress. I headed over to https://github.com/nopSolutions/nopCommerce and cloned the repo.

 
mr5
@nyconing do you know a link of the official statement for this change?
 
No, I didnt found it...
 
4:28 AM
Guys, did you received any chocolate on valentine's day?
 
mr5
nope
 
 
1 hour later…
5:58 AM
I have a dinner
 
6:53 AM
Bon dia
How was your dinner?
 
7:27 AM
Hmmm... Its OK, no any surprise
 
mr5
Question
 
Good morning.
 
mr5
Is HttpClient's response stream an actual stream from the socket?
 
ohayou
 
For the most part. I think the HttpClient ResponseStream skips over the headers and gives you the content body stream.
 
mr5
7:32 AM
What happens if I pass this stream into a File and save it on local device, would the memory be bloated if the stream is huge?
Is the buffering already implemented internally from the File?
 
@mr5 Depends on how you pass it.
The Stream mechanism itself is designed for streaming data without having to load it all into memory at once, but it can be misused.
Also, as @RoelvanUden says, the HttpClient's response stream is the HTTP request payload, not the raw NetworkStream.
The whole point of using HttpClient instead of TcpClient is to have it parse the HTTP response for you and separate the headers from the payload, etc.
 
mr5
8:03 AM
So I found this:
487
A: How do I save a stream to a file in C#?

Jon SkeetYou must not use StreamReader for binary files (like gifs or jpgs). StreamReader is for text data. You will almost certainly lose data if you use it for arbitrary binary data. (If you use Encoding.GetEncoding(28591) you will probably be okay, but what's the point?) Why do you need to use a Strea...

I think one needs to implement this if they want to implement a "download" functionality
 
@mr5 You can use the System.Net.WebClient's DownloadFileAsync to spare you the trouble.
 
mr5
But then I would have to include both WebClient and HttpClient that does basically the same thing
 
That doesn't actually cost you anything. Use the tool that best does the job.
It's like "Oh, no, I can't use Dictionary because I already use a List<T>"
They don't do the same thing. One has a method that wraps the HTTP connection + saving to disk. The other one doesn't.
It's not hard to do it with HttpClient as well, but if you do, it's not for that reason.
await httpStream.CopyToAsync(File.OpenWrite("filename")) would do it.
(Of course, with proper flushing of the stream)
 
mr5
I don't think it's fair to compare the situation to the built-in types whereas HttpClient and WebClient is considered as "add-ons". I'm also concerned to the generated app size so I don't include much library unless necessary
 
8:19 AM
HttpClient and WebClient are exactly the same as List and Dictionary - they're all part of the base class library.
They're not more add-ons or more built-in then the other. They're all already installed as part of the .NET Framework.
 
mr5
8:35 AM
Welp, it would still add up to the final app size since I am using both. Nonetheless (omg, I'm using adjectives!), I think WebClient is going to be deprecated.
 
No, it won't add to the final size, because the code for System.Net.WebClient already exists on the system.
(Also, nonetheless isn't an adjective. :))
WebClient is definitely outdated and I wouldn't use it for general purpose HTTP calls, but since it does have several specific methods that you don't get in HttpClient, I wouldn't reject a PR for using it.
 
mr5
@AvnerShahar-Kashtan is it adverb?
 
An adjective modifies a noun ("the pink elephant). An adverb modifies a verb ("he walked quickly")
 
we referring to the word "both"?
that's a pronoun
 
No, "Nonetheless".
 
8:43 AM
I don't think that modifies a verb
but it is an adverb, I'm sure on that
 
It doesn't, so it's not an adverb. Not in this case.
 
I think it's considered to be an adverb nonetheless
 
mr5
Which category does "nonetheless" falls?
 
In "I did it nonetheless", it's an adverb - it describes the verb.
 
But he said "Nonetheless, I think WebClient is going to be deprecated"
 
8:44 AM
In "He didn't think it was a good idea. Nonetheless, it had to be done" - I think it's a conjunction - it joins the two sentences together.
 
He could have said "I think WebClient is going to be deprecated, nonetheless"
 
the way I learned it was: if it's clearly not modifying a noun, and you don't know what the hell it is, it's probably an adverb
hasn't failed me yet
 
@Neil There's more to life than adjectives and adverbs. :)
 
true, but I don't think nonetheless is a conjunction just because it started a sentence
 
8:46 AM
If you can replace "nonetheless" with, say, "despite that" - it's a conjuction.
 
the definition even calls it an adverb
I don't think that ever changes
 
!!>JSON.stringify(JSON.stringify(JSON.stringify(JSON.stringify({}))))
 
@nyconing "\"\\\"\\\\\\\"{}\\\\\\\"\\\"\""
 
Hi, a similar code like this exists in many places in my code :
if(Phone.NotConnectd){
ShowAlert("Check your network connectivity");
return;}
is it possible to move it to another method, where I only can call it from the caller method:

in other words: can I return a void method from another method call?
 
Not sure I understood the question.
Ah, you want the called method to return from the calling method?
You want the call to ShowAlert to autmatically perform the return call that's after it?
 
8:52 AM
No, I want to move the whole block of code that tests the connectivity to another method and performs the Show alert and return if the if expression is true
apparently the return only works on the current method only
 
Yes, it does. Because the internal method doesn't know who called it and isn't part of the caller's control flow.
Unless it throws an exception, which is the mechanism expressly designed to break the control flow.
 
good (ugt) morning
 
mr5
@mshwf try: Action typeThatAcceptsVoid = instance.Method
 
@AvnerShahar-Kashtan So the minimal amount of code is to make its return bool?
 
@mshwf Yes, the common patterns are either IsConnected that returns bool, or EnsureConnected that throws an exception, depends on your needs.
 
9:01 AM
@mr5 I don't understand, can you please clarify more?
 
That won't help. Main() won't stop execution after the call to typeThatAcceptsVoid()
Ugh. I need to install VS2015 now to build a 3rd-party C++ project, because C++-land is a mess.
You can install the VS2015 Build Tools for VS2017, but they don't support UWP C++ projects because, hmm, no-one bothered to actually add those bits to it.
 
@mr5 didn't work :(
 
Hmm. MS offer VM images with VS preinstalled, but they're replaced all the old VS2015 images with newer VS2017 images. I wonder if I can find a link to the old ones somewhere.
They have them on Azure.
 
mr5
9:16 AM
@mshwf It answers the "can I return a void method from another method call?" part
 
hey guys, I'm using WPF Bing map SDK and I'd like to set the map's view on the user's current location, I'd appreciate it if you guys gave me some hints or links on how to do it for I couldn't really google it right
 
!!morn ?
 
@Hans1984 That didn't make much sense. Use the !!/help command to learn more.
 
!!morn or no morn
 
@Hans1984 morn
 
9:20 AM
morn
 
mr5
mom
rnom
 
!!mon or rnom
 
@Hans1984 rnom
 
@mshwf Then return status instead of void. So the caller know the status of calling.
 
anyway
 
9:23 AM
mirn
 
murn
 
Step 1: Get the user's current location via geo location
Step 2: Snap the map view to the user's current latlng
Step 3: ???
Step 4: Profit
 
@SamIbraheem Which part are you having trouble with? Getting the user's current location? Setting the map's center?
 
Step5: Pay to geo/map service
Step6: Deficit
 
@RoelvanUden Thank you dear
@AvnerShahar-Kashtan I've got the map set up and everything and no problem getting the map center it's the user's location I'm struggling with
 
9:26 AM
@SamIbraheem Ok, that's not necessarily part of the Bing Maps control at all.
 
mr5
@RoelvanUden Damn! I never experienced the step 4
 
@AvnerShahar-Kashtan really? what should I use then?
 
@mr5 Me neither!
 
Oh, use the control, by all means, but hte control simply displays the map. It doesn't necesasrily give you geographical services beyond that.
How would you get the current location on a laptop? You don't have a GPS like in a phone, so you're dependent on IP-based services.
 
@SamIbraheem WPF implies a Desktop computer. Desktop computers, including notebooks, rarely have GPS built-in. You can try to query Windows for Geolocation but I don't think Windows, outside the App Store, has much for location. You can guesstimate using the device IP maybe?
 
9:28 AM
Windows 10 has APIs for getting the device's location you can probably hook into, but they're probably not supported in all older OS versions.
 
Yeah, and those W10 APIs are restricted to the App Store AFAIK
Or what is it called? UWP?
 
No, you can get them in WPF as well, with some bridge libraries.
 
Ah, not bad.
 
(Microsoft supplied, not hacks)
 
@RoelvanUden @AvnerShahar-Kashtan I'm using an Android phone as a WiFi router (hotspot) can I make use of that somehow?
 
9:30 AM
@SamIbraheem Probably not.
 
You can't.
 
So now I need to find these bridge libraries things?
 
I'll ask the real question here; why are you trying to get the geolocation of a desktop user? What's the point? What is it for?
 
Well I have this client who asked me to make a map app that gives the ability to push pin locations and saves them in a database
 
so "push this location to a database"?
you need gps for that
 
9:35 AM
Great! Why did you come up with "get device location" as a requirement when you really just want to save "any" location :-)
 
assuming you need precision beyond which city you currently reside
yeah, that or you present a map to the user and say "click your current position"
 
the thing is that he wants to show his current location and pushpin regions nearby
I'd like the program to start with the current location being viewed on the map
 
Right, then you'll need to get an approximate location, but remember; a desktop computer without gps can never get as accurate positions as a device with gps.
 
@RoelvanUden well precision is not really an issue here, my client would like to know where the heck is he
 
You're already using Bing Maps, so you have a Bing Maps API key. Simply use the Bing Maps REST services to get the user location. There are conveient wrappers for it.
Get the Geocoding.NET nuget package, and simply use it:
var userLocation =  new Geocoding.Microsoft.BingMapsGeocoder(apiKey).UserLocation
 
9:40 AM
@AvnerShahar-Kashtan I've tried geocoding but the namespace won't appear in my IDE
 
@SamIbraheem Because you haven't installed the nuget package?
 
@AvnerShahar-Kashtan Oh OK! lemme google it and install it
 
@AvnerShahar-Kashtan Well... that was awkward.
 
There are installation instructions there.
 
@RoelvanUden LOL... I'm not as good as you guys, stupid questions may appear
 
9:45 AM
No, no, don't worry about it. I can understand that NuGet is a new thing if you've never worked with it.
 
-_-
 
@SamIbraheem Getting acquainted with the package manager is a good meta-skill to acquire early on.
 
> I can understand that <insert anything here> is a new thing if you've never worked with it.
 
Most of us work so much with package managers we don't even realize there are people that haven't used it.
@Wietlol Your insights are wonderful.
 
Thank you so much you guys, I'll get to the bottom of this NuGet thing and try with my quest
 
9:47 AM
You have the initial culture shock of "omg I can just type the name of a package and poof it's in my project" where everything is possible! I never have to write anything ever against because everyhthing is available via nuget!"
 
np Roel, ill pop in now and then to guide you peeps
<3
 
And then the culture shock passes, hopefully before you hit the left-pad stage, and you just use it as a daily tool. :)
 
@AvnerShahar-Kashtan but the question is... how do you remove that package when you find out it is not what you are looking for?
 
You.. uninstall it.
 
@Wietlol You... delete it?
^^
 
9:49 AM
but then you still have the packages it also installed (because it depends on them)
i had a library that depended on other libraries that depended on other libraries and installed a total of ~40
 
In C#-land I don't remember really having a huge cascading dependency graph for most libraries. Usually 2-3 at most.
In JS, yeah, that happens. I installed the npm dependencies for writing custom PowerBI visuals and it downloaded over 500 libraries.
 
I havent seen it that often either, but there is this one that just... does
even with 2-3, you dont get any notification of them being installed indirectly
 
@AvnerShahar-Kashtan Sure, but npm also cleans them up.
 
and so, you dont remove them
or is it just me?
 
I remove them
 
9:52 AM
(my IDE might work differently than VS)
 
Does it matter? If the files are downloaded but they're never referenced or loaded, who cares? Unless your tight on disk space.
 
I don't actually know how diligently nuget tracks package dependencies.
 
Do note they don't get published/deployed
 
they are still in the bin folder
as they are referenced in the project references
 
That's the project reference problem, not NuGet.
 
9:53 AM
So if it keeps track that package A was only installed as a dependency of package B and now package B is uninstalled, would it remove it? Dunno.
 
They are still referenced? Your VS is broken
 
Yeah, that's true - if I only called Install-Package on Package B and never on A, it shouldn't add A as reference.
 
when I remove them in NuGet, they are removed in the project references
but if I add package A, which depends on package B, NuGet installs both packages and references both
and if I remove A, it doesnt remove B
so add -> remove doesnt result in the same state as before
 
Oh, yeah, that's true with NuGet. Not so with npm for example.
 
Still. I can do the remove one by one, and it doesn't make me angry
I'm one with the peace. And peace is one with me. I'm accepting. Whenever this happening it's very rare occasion
 
10:00 AM
@ntohl what annoys me is that I dont know which libraries are still in use
so, I just remove everything and then build and re-add what is missing
quite a... bothersome process
 
Resharper has a "Find unused references" feature. Rider probably does as well.
 
that might coming from resharper.
yes
 
I just opened a new project, added a nuget package with many dependnecies (ASP.NET Core) and only the root package shows up in my nuget list.
Maybe it's because it's a .NET COre project with the new PackageReference system.
 
it must be. Old nuget really litters
 
https://i.imgur.com/DIDh06H.png
https://i.imgur.com/zAVf2hx.png
https://i.imgur.com/7LdIPAa.png
this is what happens for me
(not sure if that is NuGet or Rider)
or made by design
 
10:29 AM
Yes, the new one stores it like npm; only the direct references and all the autoresolved crap is not added as a direct reference.
 
Can't wait for the new project system to be the default one for all new projects, .netcore or otherwise.
It's so much better.
 
mr5
What is the standard way of getting the MIME type aka Content-Type of http response in HttpClient?
 
@mr5 It should be in hte headers.
 
mr5
Yeah but should I parse it manually?
 
Automatic glob patterns for included files instead of explicit file references. Editable via VS without unloading. Much leaner.
 
mr5
10:34 AM
Why is it not standardized? As I can see, there are default headers which are AcceptRanges, CacheControl, Date, etc...
but no ContentType
 
I think ContentType is pretty standard
what makes you think it is not standardized?
on a request, Content-Type is the request body and Accept is the response body
 
mr5
It's not on default properties of System.Net.Http.Headers.HttpResponseHeaders
 
guys, I've installed the geocoding package
 
mr5
@Wietlol oh so it's Accept
 
both Accept and Content-Type
depending on which you want
 
10:37 AM
It is, it's just not part of the response header, it's part of the content header.
response.Content.Headers.ContentType
A single HTTP response can be multipart and contain several content blocks, each with their own headers.
 
mr5
Duck! avnir is right
 
Not intuitive, I agree.
 
mr5
Why am I looking at request in the first place!
 
Oh, sorry, response.
It's not part of teh response header, which is the "wrapper" envelope, but part of the inner content header.
 
everytime I hear hoomans talk about http requests, I learn something new
> A single HTTP response can be multipart and contain several content blocks
 
mr5
10:39 AM
Oh I get it why I got confused
The namings are not intuitive
 
but every time I try to use the interface IGeocoder it gives that the interface exists in two namespaces
 
mr5
There's response.Headers and there's response.Content.Headers!
 
@Wietlol MIME is a mi[nm]efield.
 
why so?
 
I'm trying to use the git example you provided
 
10:40 AM
Because it's complicated.
 
the mime type is just the content's serialization format... right?
for example, json, xml, protobuf, C#-Serialization
(not sure what the right name is)
 
For some text formats that's mostly correct but also not really.
 
the only issue I can think of is that it cannot be combined
for example, application/json + application/zip
a json, inside a zip
("cannot" as in, noone does it... i might be horribly wrong here)
i'd assume that you could, but need some form of separator
but im not sure what characters would be valid separators
or maybe include parameters
for example with text/csv
some people, for some mysterious reason, prefer to use something other than commas to separate values in a comma-separated-values context
 
mr5
Gtg! Thanks for the help avnir and everyone!!
 
@Wietlol No, it's the content's actual type, regardless of serialization. image/png means it's a PNGfile, not an encoded PNG file.
It might be encoded as base64 in a MIME multipart block or not, but the content-type itself simply describes the type of the actual content, the final entity that's being transmitted.
 
10:52 AM
ye, what is the name for such a type?
 
Simply "format".
 
Quick C# question, i have created a viewmodel that uses 2 models and passes them to my view, the VM has data in, but when i pass it to my Razor view, something is breaking it as nothing renders.
PlayerStatsViewModel vm = new PlayerStatsViewModel();
vm.Players = mystats;
vm.PlayerChests = mychests;
return PartialView("_MyStats2", vm);
so the VM contains 2 specific models, and they are both full of data
@model Models.CustomViewModels.PlayerStatsViewModel
anything obviously wrong there?
 
Are you trying to do MVVM?
@kingtreelo That question is not a rethorical one
@MikeTheLiar fuck you, youre gonna get a notification and possibly an email for that.
 
11:10 AM
@Squirrelkiller MikeTheLiar is afk: three day weekend to work on my reading comprehension
 
@Cap I don't care he still get's a notification M'Kay
 
ok, its working now, must have been a cache issue
 
!!Will he get a notification ?
 
@Hans1984 Absolutely not
 
lol
 
11:24 AM
Damnit Cap
 
@Squirrelkiller good morning to you, too
What'd I do this time?
 
You moved 2k messages
 
lol that
You're welcome
 
11:43 AM
what was that conversation about?
or do I want to know?
 
Biggest hint that the "moved to trash" message is fake? There's no way the SO chat interface would successfully handle that many messages.
 
yeah its just 2 youtube links
 
12:07 PM
Not just any youtube links. Oh no.
 
question time. Do you have any kind of documentation for the projects you are working on?
like functional specification etc
 
12:43 PM
i tend to find that most specs are written, then go quickly off the boil when the realisation that the user doesnt actually know what they want most of the time
 
"the user doesnt actually know what they want most of the time" the reason you don't work indefinitely for such a customer, is because you point out a line in a specification and say: That was not in the specification, and even agreed on not in the project.
 
oh clever
@kingtreelo you've discovered first-hand the fundamental law of programming
the client doesn't really know what he wants
 
that is true. But greedy about you have to program every possible version, which comes to mind.
 
I'd call it the 1st, but it'd probably be more accurate to say the 0th
 
@ntohl i agree, but when the customer is internal, that isnt as easy to get away with
 
12:49 PM
that can be handled too.
 
generally do you have any documentation for the projects you are working on?
 
simply stop doing anything without ticket
 
that's really the only legit way of dealing with a client like that
 
saying sorry. I'm overloaded. Do you have a ticket in Jira/Redmine/etc..? I'll get back to it whenever I can
 
everything is written and agreed upon. No work is done for free. Bottom line
 
12:50 PM
than your superior can even prioritize
 
you need a boss that understands this though
if you don't, then it's "why haven't you done X yet?"
 
without boss, you can still prioritize :D
 
I suppose that really only applies to freelance
 
i understand the principles of that, but i have written a booking system in the past, and without actually doing some of the work without it being in the spec, the project would have never gotten off the ground, and as it was a staturory requirement in terms of Government legislation, there wasnt really any other option
 
You're obliged to do whatever the client tells you, because usually the client pays for support and whatever the client asks for goes
 
12:52 PM
Guys, I hate technology.
 
@RoelvanUden you're in the wrong field
 
"why haven't you done X yet?" you can answer, because I done <and the result of selecting all the tickets that was done in the last 1 month>
 
I am aware.
I especially hate silently failing package managers causing me to release a production release that's missing packages.
 
sneaky
I had some .dll s missing lately too
 
I just rebuilt a Cordova-based Android app and it silently neglected to install a plugin.
Then rebuilt again and it works.
Then rebuilt again and it silently failed again.
TL;DR: Check your Cordova logs VERY CAREFULLY.
 
1:29 PM
Hi guys
we can impersonate user by identity tag in web.config file. But is it necessary to be configured on IIS level as well to work?
In web.config:
<configuration>
<system.web>
<identity impersonate="true" password="xxxxxx" userName="xxxxxxx"/>
</system.web>
</configuration>
 
@RoelvanUden wow, fuck that
fail-fast is the only way
 
V.7
1:46 PM
Hey all
Can I ask here a question with MS Word and Add-in related?
 
@Neil Yes exactly.
 
V.7
In short, we're trying here to include pdf.js into this project, but getting Access is denied message
0
Q: 0x80070005 - JavaScript runtime error: Access is denied when using PDFJS with MS Word Add-in project

V.7Recently, we've tried to add a library PDFJS to our Microsoft Office Add-in. There are files included pdf.js and pdf.worker.js into Scripts/PDFjs folder. // Home.html ... <script src="Scripts/PDFjs/pdf.js" type="text/javascript"></script> ... // Home.js Office.initialize = function (reason) ...

Already spent a half a day while searching a fix
I've asking here because it's C# project, but ... I know, this question does't include any C# related things.
Just curious, if anyone knows a suggestion.
 
@V.7 are you trying to create PDF's on the fly?
 
V.7
@kingtreelo Read*, but the main thing is to get a document form MS Word without metadata.
 
@V.7 What is it here?
 
V.7
1:56 PM
@RoelvanUden What do you mean?
 
@V.7 The variable called "it", what is the definition of that variable?
Actually, that entire statement is in a try/catch, your VS may be a little over-eager... try running without debugger attached, does that work?
 
V.7
@RoelvanUden I don't know, though. When hovering it in debugger it shows "Permission denied" on it.
 
01:00 - 14:0014:00 - 00:00

« first day (3048 days earlier)      last day (1893 days later) »