« first day (2210 days earlier)      last day (2964 days later) » 
00:00 - 16:0016:00 - 00:00

00:12
hi all
In my codebase we get a lot of code analysis warnings about coupling, eg BaseItemRepository is coupled with 109 different types from 24 different namespaces
does anyone know of a good resource to help me start to reduce this? it all looks 'necessary' at the moment, but I would like to improve my architecture skills and improve my codebase at the same time
 
5 hours later…
05:42
posted on November 03, 2016 by Scott Hanselman

WARNING: This post is full of internal technical stuff. I think it's interesting and useful. You may not. I had an interesting Error/Warning happen when showing some folks .NET Core recently and I thought I'd deconstruct it here for you, Dear Reader, because it's somewhat multi-layered and it'll likely help you. It's not just about Core, but also NuGet, Versioning, Package Management in ge

awakes
06:35
https://gist.github.com/anonymous/1f40199ca711e690f27ab5bf4cdf35de

Does anyone know how to change the SQL statement above to LINQ?
 
1 hour later…
07:46
Hey ho Hip hop hip hip hop is deaaaad
Good morning
ohayou
08:06
Does anyone have experience with HTTPS without an SSL??? This sounds silly but basically I am supposed to throw up a product demo on a server and it needs to demo social media login and email via SendGrid... But I dont have an SSL (and it costs $175 which Im not planning to buy for a demo)
I dont even know the best course of action to take here but I dont typically deploy that kind of stuff up without HTTPS
on localhost I would just force a fake SSL cert to show someone next to me and it wouldnt really matter.
08:29
@TeeSee You just generate one and get the computer you want to demo on to trust it. For example, most domain computers have a root CA trusted of their organization. You can generate a certificate using that root CA and every computer in your domain will be happy with it.
@RoelvanUden can I essentially generate one of my own and then as long as the person visits the site on their computer and trusts it, they can use the site? Or do I have to be in-network with them?
0
Q: Geting XML in specific format c#

C SharperI am working on MVC web API, where at one function I need to convert SQL DB result into XML file. private string DbToXml(int fileID) { DataSet ds = new DataSet("Requirements"); string connetionString = ConfigurationManager.ConnectionStrings["DemoConnectionString"]...

please help me
Squiggle in the house
@jrh Thanks for your Opinion :)
@TeeSee In-network. Then they don't have to trust it, it just works.
08:41
That shanselmann article ^ a few hours ago is worth a read if you work with dotnet
@TeeSee Or at least, share a root CA
o/ hi all
@RoelvanUden YEHAY SENSAI IS HERE!
@RoelvanUden got it, thanks.
08:41
I swear I spend more time on these types of issues lol
@Nerdintraining \o
@Squiggle \o squiggle
@RoelvanUden o/ Roel
VS Code's 1.7 update had to be rolled back. They introduced a feature which automatically downloaded typings for installed libraries in JS and TypeScript projects - and prompty DDoS'd the npmjs.org server
Whoops! 1.7 release rolled back to 1.6.1 due to issue downloading definition files for IntelliSense #workingonfix http://code.visualstudio.com/updates/v1_6
08:53
@Squiggle that's nice to know. :)
Goodmorning, if anyone with Microsoft Graph/Azure AD experience could take a look at this question: stackoverflow.com/questions/40396813/…
@Squiggle LOL
@Squiggle haha classic
 
2 hours later…
10:33
hi guys
what is the appropriate approach to make sure input fields remain empty on a page after navigating from on windows phone dev?
@RoelvanUden I have a wp app where on login, it navigates you to home page, on log out, you find login page.Problem is login fields are still populated
Could you please use commas?
sorry
better I hope
So, when you click 'Logout' you navigate to a new page, which happens to be a login page. And there, it still has your credentials? If you bind it back to the same source then yes, that happens. Just clear the source view model.
10:43
am using mvvm light toolkit
where should I clear the source
snippets coming up:
DataContext="{Binding Login, Source={StaticResource Locator}}"
thats on login xaml
hi
everyone
Hey anyone here know xamarin?
hi everyone, does anyone have experience with Visual Studio's NuGet?
Yep, NuGet is very dear to us c#ers
@RoelvanUden hi
@GotaloveCode And Login is a property with an obj that you didnt clear
10:47
@arun I tried it abit with android.Ask if I know I will assist
ok
Do you have to install NuGet Packages for every solution or only once?
every solution, every project even
i am developing crossplatform app using xamarin forms portable project
You can manage NuGet on a solution basis though. For example the NuGet Package manager lets you see which packages you have installed on which projects within a single solution
10:49
in portable project i need to access platform specific folder like android data folder of app how to do that u have any idead?@GotaloveCode
But our Software is distributed via SCCM. So I have to ask the Support to install packages multiple times. Thats not good.
@LasseKlüver What.
What is SCCM?
A quick google doesn't help
Obviously you build your releases and redistribute ALL NuGet packages with it.
We dont have admin rights. So we cant install NuGet packages on our own.
10:51
Package management is only for source control, updates, etc.
What.
Sure you can.
Did you even try?
Yes i get an error if i try saying that it cant Launch power Shell.
@arun can you share a screenshot of your currentview I dont have xamarin installed right now but I might be able to figure it out if I see the screen
string libraryPath = Android.OS.Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData); ;
@RoelvanUden I think the where is my issue; but this link looks hopeful stackoverflow.com/questions/16695349/… thanks
i am trying this code @GotaloveCode
10:52
this is the error i get:
Windows PowerShell updated your execution policy successfully, but the setting is overridden by a policy defined at a more specific scope. Due to the override, your shell will retain its current effective execution policy of RemoteSigned. Type "Get-ExecutionPolicy -List" to view your execution policy settings. For more information please see "Get-Help Set-ExecutionPolicy". someone knows what this means?
@GotaloveCode in portable project that code is showing error
@LasseKlüver It means that you're a developer without permissions to develop.
Well done.
@arun get rid of ;
still same
@arun How do you expect portable code can access Android?
11:00
@RoelvanUden i am new to xamarin
Just reason logically. What happens if that code WOULD compile and runs on say, iOS?
but need to show image in files folder of android on page
@RoelvanUden i kept if condition for OS
if (Device.OS == TargetPlatform.Android)
{

string libraryPath = Android.OS.Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);

ImageView.Source = libraryPath + "/98/475.pdf_4.jpg";
}
That won't work. The compiler essentially needs to link every used function during bootup.
So it can't. Because iOS.
Now reason again: logically, what is the correct solution?
(Hint: What is the opposite of portable code?)
shared
11:05
Actually what we are trying to achieve is code once use it for ios and android
ok
Spoiler: That ain't happening if you need device specific functionality.
So, what is the correct solution to get benefits of both?
@RoelvanUden you suggest
Look, I'm trying to teach you a critical skill here: logical thinking.
It will solve 99% of the questions you ask. So, give it a shot.
ok
@RoelvanUden actually i dnt know much about xamarin just starting now
Hey, I only used it once for 20 minutes, but I can still solve this. :P
It's the same in any situation. What do you do when you can't access certain functions in generic/portable code?
You ........ it.
11:10
coding directly in native code
.. Embarassing text was here once
You abstract it. Sheesh. Are you developers or what?
Make an interface that is portable, make two assemblies with non-portable code implementing that interface, inject them.
Move on.
ok
so i need to use DependencyService
Something lightweight will do
use Unity (perhaps not so lightweight but easy enough to use)
ok
11:17
@arun Sorry - Ignore that, I'm not a xamarin developer and turns out you might indeed need DependencyService. My heads glued on in a .net mvc mode.
its ok
@arun I think Roel has explained what you need. Just to add to it there are a couple of ways to do xamarin shared classes portable classes and by abstraction where our common class just declares that I can do this then in each platform android,windows you go ahead and use its specific implementation.
@GotaloveCode ya ok
thank you
@arun I suggest trying this book.It was helpful for me
ohh ok
@GotaloveCode thank you DO you have any idea of full length course ?
12:06
@AvnerShahar-Kashtan hi
@AvnerShahar-Kashtan do you have knowledge of xamarin
Don't randomly ping people.
I have deep and ancient knowledge.
I have seen things man was not meant to know of.
Xamarin fills my waking thoughts and my nightly dreams. It is an inescapable presence, whispering its cross-platform secrets into my ears.
Xamarin will claim it's prize, the blood of Java.
12:11
Xamarin fills in my fibers and I grow turgid. Violent action ensues.
First, we take the JVM.
Does anyone know how asp.net mvc model binding actually works?
I am looking into making a custom model binder, and I'm seeing how it obtains all the values passed in the request as strings.. so how does it normally convert those string values to .net objects?
sandwich + peanuts + a bit of almond for lunch
@RoelvanUden i tried like that but in portable project that type of facility is not present so i need to use shared ?
@Michael Reflection.
@Michael If it's a primitive, try a convert. If it's an object, create an instance and recurse over its fields. If it's an array/collection type, create a List<T> and drill down [] tags.
Oh and exceptions for built-ins like DateTime and GUID
12:19
wow okay, just does the dirty work.
Pretty much. It's actually a simple beast.
Beasts make life simple
user1804599
I wish my QA team weren't the end users.
That is kinda better they are eating it
I can't find any good custom model binder tutorials or explainations. They all use horribly simple and unrealistic examples where they only bind primitive types and they hardcode string names of properties to find them in the request forms:

request.Form.Get("last_name");
12:25
Magic String
whats a magic string?
Because if you misspell the string it Magically never works
user1804599
A string with no apparent origin. Like a magic number.
ah yes.
user1804599
Define it as a constant and use that named constant everywhere. Compiler checks constant names, but not string literal contents.
12:27
constant should not have a changing value
3.14 Pie is a constant
guys, has anyone here ever worked with xamarin ios ?
user1804599
3.41 is a pretty big pi.
@Michael typeof(T).GetProperties start there :0
sorry, no slushiness yet this morning
user1804599
And nameof!
12:29
Yeah reflection... great.
God knows how much facial hair I've pulled ever since I started coding this piece of c***
guess you have 2 problems now
@Michael Yeah. It's not too bad tbh.
user1804599
Does Unity use reflection to call private/internal methods such as Update?
Don't you extend a base class where you override them from?
user1804599
12:39
Nope.
user1804599
Neither an interface.
user1804599
And it calls them even if they're private.
Then, making an assumption here, that is quite likely.
Possibly using emit'ed IL
Which is even faster.
user1804599
It also somehow intercepts calls to methods with Command and RpcClient attributes.
Yeah sounds like they either weave or wrap your code
13:05
If I am trying to pass data from a model, say ClassA to the controller action of another model say ClassB, is it good enough to just do something like @model List<Project.Models.ClassA> in the View of ClassB?
In entity framework, If I have two models with many-to-many relationship and a conjunction model, Should I add a navigation properties in each model for the other one or just the conjunction model (e.g., Product and User are the main models and Ticket is the conjunction model), and Do I have to use fluent API to configure the relationship?
@MohamedAhmed do whatever you want! Map them both ways if you need to reference them in both directions - but it's easier and simpler to avoid that if you can.
Sample Code here: pastebin.com/6HGX8jH6
I tend to only have navigation objects one-way, because then it's far easier to construct the graph through eager loading.
^ And it allows for snazzy decorators
I can do new UserDecorator(context, account.Id) and bam, all data filtered.
13:16
@Squiggle You mean that using navigation properties has the same impact as using fluent API, I hope so because NPs are much easier!
13:29
Damn you, EF, and your flaky and unpredictable support for unregistered providers.
Specifically, Visual Studio and your flaky and unpredictable support for unregistered entity providers.
unregistered?
@arun try microsoft virtual academy
13:48
Anyone have a preference to gif vs jpg?
Meh. Pretty sure they're both lossy.
Wait, I lied. Apparently gif is lossless.
so why do gifs always look like shit
ya that is what I am going back and forth with
png are the best just big
@TomW Because it's an outdated image format that should've been retired years ago, that's why.
@juanvan If I have an edmx file linked to the provider named "Oracle.DataAccess", for instance, it needs to be registered somewhere for VS to recognize it.
Even though I have the DLL that registers it loaded as a dependency.
@TomW Are gifs still limited to a 256-color palette, or has there been an improvement of the standard?
13:52
no its still 256
@juanvan At runtime, I can create a DbConfiguration object and manually register a type as an EF provider, but VS doesn't recognize it, naturally.
Animated PNGs can have >256 colours
ya, with MySql never had that problem
@juanvan Did you have to install the MySQL Connector on the dev machine for it to work?
good morning
13:53
yes
hows everyone
@JABFreeware I need more coffee. lol
Having a hard time getting going this morning and thinking clearly.
@juanvan So yeah, you did have that problem. It works for me as well if I install the Oracle Tools for VS, but I don't want to go around installing it on every dev machine. I would rather it be pulled in automatically and registered dynamically.
@hilli_micha yeah my head is cloudy
Ok now I get what you are saying, I just did not know I had the problem
13:55
cloudy head sucks
@AvnerShahar-Kashtan guess you have to register it in the GAC?
Indeed it does.
@juanvan Probably. And also somewhere in a config file to link the invariant provider name to the DLL itself.
can I ask short questions here?
You can ask any question except for "can I ask questions".
3
user1804599
13:59
It's totally fine, but do keep in mind that if you ask them on Stack Overflow instead you get a bigger audience and help future visitors.
and if there is a lot of code, use a pastie
and if its a question you haven't googled at all, google first.
did we leave anything out?
damn my beef stew is fucking amazing
Beef Stew, with pork
14:12
@juanvan nah just beef stew
I should have added peas though
wonder if its too late
never to late
lol
peas can always be added to any situation to make it better?
yes we add pees to pasta all the time
ewww pees and pasta?
sausage pees noodles sauce
its good
14:13
sounds weird
the wife added pees to the stew yesterday
pees
Well well well, who pissed in your pasta?
him
@mikeTheLiar you don't piss in your pasta? What are you a caveman?
His wife
I am ok with anything in pasta - avocado, rum, vodka
14:15
I'm okay with alcohol in anything lol
@juanvan "anything"? Is that a challenge?
@KendallFrey hi doll
Ok I draw the line at hand soap
interesting place to draw it
what could you not add to pasta? Mustard
14:17
That sounds delicious
I imagine shit in pasta would be a universal turn-off
could if it was in the sauce, but not on top
well depends on who is doing the shitting
@juanvan what about pig blood?
some people would pay for that, I am sure
blood in general, like cold no
two girls one pasta
Black pudding
But yeah
Y'all motherfuckers need Jesus.
14:19
african american pudding
lol, it sounds worse when put that way
some moon rocks
I touched a moon rock the other day
@mikeTheLiar well all I needed was a call from him but he never came. I think he cant...come.
Really, that sounds spacey
14:20
For XmlNodes, am I missing a direct call to "GetAttribute" from a node or do I actually need to iterate through the XmlNode.Attribute collection to get the one I'm looking for?
you can call out the attribute if you are in the right node
@JABFreeware His second coming will catch everyone by surprise.
oh fuck XML enters his safe space
57 secs ago, by juanvan
Really, that sounds spacey
God damn it, duh.
@juanvan Yeah, thanks, I didn't even think about using the Attribute collection directly. Rough morning lol
14:22
@KendallFrey well god obviously doesn't need consent. Just look at marry.
the fuck did I walk into
@JABFreeware he can be hard to nail down sometimes.
a UDP Packet walks in a bar...
@JABFreeware You know, I've actually gotten to be real good friends with XML with this last project i had to take on.
Yeah it's a bit bloated, but it saved my hind quarters. It does have its...quirks
14:23
to moon rock show us on the basalt where Kendall touched you
@hilli_micha yeah... I just hate it. That said automatic class generation tools help a lot.
XML is sin encapsulated in a technical standard
@KendallFrey so we now know how god stores the sins of everyone. Must have been a cloud leak that leaked the standard
I want to play around with AI learning. Anyone know of a good starter framework? Preferably c#
user1804599
Tensorflow is a library for machine learning and people have been positive about it
@rightfold jesus I didn't know there was so much math
user1804599
14:33
Math is the foundation of everything. Learning it continuously is a good idea.
I feel stupid now. I don't understand most of what they are talking about
true...
@rightfold True dat, when I picked up AutoCAD and modeling in 3D, when it comes to Math I was told VERY quickly "get good or get out."
user1804599
Is that geometry?
user1804599
Geometry is rad.
Geometry, Trigonometry, Linear Algebra and Light Calculus.
Those come to mind first.
14:35
I dislike geometry
I do remember my triangles though
@JABFreeware Proof it
and finding the hypotenuse
That's kind of what I have to do when modeling certain objects, a lot of things with a radius bend I start looking for my triangles. lol
user1804599
good old cc = aa + bb
That and SOHCAHTOA
14:36
@juanvan okay I just made this for you baby
Acute
user1804599
Every triangle can be decomposed into exactly two adjacent non-overlapping right triangles.
yeah...
Shadow Triangles
I used to call it the hippopotamus
apparently triangles don't have hippopotamuses
14:39
Someone understand what this document is
@juanvan it's a PDF, which stands for Portable Document Format
!!Lenny
( ͡° ͜ʖ ͡°)
user1804599
Paprika Six
co worker sent it to me, said maybe we could use this
14:42
If I have an Abstract class, and at runtime I instantiate an object that is a subtype of the abstract class is there anyway I can confirm what subtype it is?
but what would I use it for
TypeOf(t)?
hm i'll try
user1804599
@Michael Yes, you can check it with x is C to check if x is an instance of C.
14:57
hello everyone, i want to create a application which can recognize audio and video in c#
can anyone help
Recognise video and audio in such a way that it can play it, or in such a way that if you were to give it a file with an incorrect extension, it would read meta-data and decide what type it is?
@shubhambahuguna sure. My going rate is $125/hour
think you are going pretty cheap for that project
@mikeTheLiar i do not want paid sugeestions
Then you're going to have to do a bit more work before any of us can help you.
15:01
I'll do it for $40/hr
ahh its a reference for the ICA image format.. Ewww
yes...thats why i am asking, what to read
a book, mean what have you googled
I'm trying different things out to try to find the best way to approach an issue.

I've set up a View that accepts a Model of an Abstract Class type.. but now I want to be able to instantiate the view with an instance of the abstract base class, but you cant instantiate an abstract class.
so why can't you use another object off the abstract?
does it hurt - don't do that
15:04
@shubhambahuguna start with the audio recognition
ok @JABFreeware thanks
that essentially comparing the waveform
39
Q: Given an audio stream, find when a door slams (sound pressure level calculation?)

Adam DavisNot unlike a clap detector ("Clap on! clap clap Clap off! clap clap Clap on, clap off, the Clapper! clap clap ") I need to detect when a door closes. This is in a vehicle, which is easier than a room or household door: Listen: http://ubasics.com/so/van_driver_door_closing.wav Look: It's s...

that might get you started
I got that by googling "c# audio recognition"
you do audio video stuff in c#?
note that you might greatly reduce your results by limiting to c#. Especially with the video. So you might want to read an article that uses a different langauge and apply what you learn from it
and there are libraries for this already but thats not as much fun nor as painful as recreating the wheel
15:22
@juanvan okay... so how bad is this?
I created an "Empty" class that inherits from the abstract class just so I have something instantiable to pass into the view
So i'm kind of circumventing the instantiableness of an abstract class. what problems will that cause? because obviously an abstract class isnt supposed to be instantiated for a reason
ya, but it's suppose to be inherited
right.. but now I have this "empty" class that really has no purpose
its as incomplete as the abstract class
hence the reason an abstract class is abstract.
ya an abstract class has no real code
user1804599
Abstract class without abstract methods is funny.
yeah you can tell someone they are an abstract person and they will probably take it as a compliment
15:27
It remains applicable to you, too.
whaaat?
@RoelvanUden because I've set up a View that accepts a Model of an Abstract Class type.. but I want to be able to pass it a sort of empty shell version of the Class
In the view I have an If/ElseIf tree that renders partial views based on what subclass the Model actually is
why not have a class that inherits from a different base?
@juanvan how do you mean?
you would have some view that is of a type it inherits from
say I have a view that shows me all weapons, make in interface of IWeapon, and what ever view that is of IWeapon could be shown in that view
15:49
I dont see how thats any different than this abstract class situation
00:00 - 16:0016:00 - 00:00

« first day (2210 days earlier)      last day (2964 days later) »