« first day (1860 days earlier)      last day (3103 days later) » 

12:00 AM
What should I call my asp.net mvc client and web api host? Something like FooWebService and FooWebAPIHost
Are those not bad names or...?
Trying to follow this tutorial but the naming scheme isn't good: youtube.com/watch?v=Z-SWHCM88eU
 
lol, meetings on whether to use LINQ or FluentAPI
 
@Codeman Never used FluentAPI
 
never heard of Fluent
use Linq! Everyone knows it
 
but... LINQ and FluentAPI are completely different things...
you can use both
FluentAPI is for doing data validation and schemas and that sort of thing, LINQ is for data access and filtering...
FluentAPI is stuff like...
public class StringDTO
{
    [DataType=String]
    public string MyStringProperty {get; }
}
FluentAPI can be used for code first, or for validation... it's a different technology from LINQ
 
12:18 AM
@Codeman this doesn't look like FluentAPI to me
it should be smth like .Entity<StringDTO>().Map(d => d.MyStringProperty).As<string>()
or smth like that
 
18 messages deleted
I'm going to reiterate what I said earlier today because it seems that no one in this room took me seriously. Our Be Nice policy applies to chat and if you continue to discuss things that are flat out inappropriate we will impose bans to those who continue to break the rules.
2
Room Owners should be following these guidelines all the time, if needed I will remove room owners from this chatroom who do not get the conversation back inline and let it go off the rails.
 
@bluefeet which conversation are you referring to?
 
@Codeman The deleted ones above.
 
(normally I'd look at the deleted stuff, but it's not a linky link)
 
@Codeman There was a very inappropriate discussion about sex that took place above. That is not something that needs or should be discussed in a c# chatroom.
 
12:31 AM
hmm, I didn't interpret that as inappropriate, maybe a bit off topic, but...
(or at least, anything I said... Obviously is a recurring problem on very thin ice, if that's what you're referring to)
 
@Codeman Our chatrooms are places where users should be able to be comfortable joining, that conversation was not appropriate in any of our chatrooms
 
It's just hard to tell exactly where/what the problem is, since (imo) lots of messages that weren't inappropriate were deleted.
 
this is not limited to a single user, there were several involved
 
For example, my remark that female PhD students' problems and male engineers' problems are compatible
Was not crude, was not referencing anything that was
 
yeah. I'm wanting to help here - was my participation in the conversation what merited deletion? Or are you just deleting the whole thing so that it's not in the history?
I'm asking so I, as a room owner, can help police the room so you don't have to
 
12:34 AM
@Codeman I'm in the process of deleting anything from that entire conversation
 
lol, I was considering doing the same thing but didn't. oh well
@bluefeet I know that it's a bit of a sticking point. Is this an off-topic problem or a subject matter problem? Or both?
Because we're often off-topic here, but we typically get back on topic when someone asks a question
 
@Codeman You're free to discuss off-topic stuff but the problem is the subject matter at hand. I strongly advise you to read this regarding what happened in the SciFi chatroom over the past week.
 
I did read that earlier today. Ideally the room owners should be able to handle stuff like this, but I didn't see anything clearly violating the guidelines in my mind. Maybe my mind was wrong :)
 
Chat is an offshoot of SO and it still needs to be a place where we show respect for others. That subject above was completely inappropriate for any/all SE sites.
 
@bluefeet I don't follow. Is the premise here that any talk of dating and/or sex completely forbidden?
 
12:40 AM
yeah... I'm having the same thought
guidelines are difficult to follow when the guideline is "I can't define it, but I know it when I see it"
my view of something's appropriateness is probably not the same as yours - so please understand, I'm not trying to be a smartass, I want to know how to help keep this space useful and appropriate under SO's policies while allowing for us to have conversations like we normally would
 
It wouldn't be an entirely unreasonable rule at all, but I don't see how it can considered to be one right now.
 
yeah... using the "third place" analogy, plenty of people talk about sex and dating in taverns.
 
Anyway, I have to get home. I'll check in on this conversation later.
 
how do we find a happy medium between being language police/deleting anything that could be seen as offensive and allowing harmful users to post content that is inappropriate?
 
@Jeremy why on earth do you think that topic is appropriate for this chatroom?
 
12:45 AM
maybe we're interested in using algorithms to perfect our social lives
 
@bluefeet sex and dating? it's a thing that exists in our lives. it's not C# related, but... we're not 100% c# 100% of the time
 
In mathematics, economics, and computer science, the stable marriage problem (also stable matching problem or SMP) is the problem of finding a stable matching between two equally sized sets of elements given an ordering of preferences for each element. A matching is a mapping from the elements of one set to the elements of the other set. A matching is stable whenever it is not the case that both the following conditions hold. In other words, a matching is stable when there does not exist any match (A, B) by which both A and B are individually better off than they would be with the element to which...
 
by that logic video games could be seen as inappropriate conversation for the room, but I find it unlikely that those conversations will be removed
I agree with you that some of the language in the conversation above could have been toned down
 
@Codeman that is the problem
 
another example... we talk a lot about professional development in the room... career moves, etc. is that considered on topic?
 
12:47 AM
If you as a RO feel that the language should be turned down, then why aren't you reigning it in?
 
@bluefeet I usually do, by asking people to move on from the conversation if it gets too heated
and honestly the worst offender above (Obviously) has been a problem for awhile and the ROs are split about whether to request a permanent ban
saying things like "I dump women after a couple months because I get bored of them" is not an appropriate thing to say anywhere, and I definitely do tell him that and have kick muted him multiple times for saying things like that
honestly I think banning that one user would be a big step towards maintaining the quality of the room's conversation... but I feel like that's not a move I should take unilaterally
 
@Codeman TBH I'm still working my way through the entire transcript to grasp exactly what transpired and I'll be dealing with it as needed.
 
Ok. I gotta head home - if there's anything else you want to communicate to the ROs, please just nametag me and I'll read it when I get in tomorrow morning to share with the ROs that don't see it
 
1:25 AM
@shanselman @Nick_Craver Thanks! Added to our collection.
 
@bluefeet When we aren't talking about C#, we're talking about things that matter to us. It's a large part of what brings us together and makes us a community. Dating and sex are definitely two things that are relevant to a lot of us, and AFAIK there's not a hard-and-fast rule against talking about them. I don't think any of the ROs even got an impression that anyone was offended or made uncomfortable by the conversation, but I'm guessing that someone told you they were.
If I knew someone was uncomfortable or offended, I would have brought things in.
This seems to be a common SO chat problem - that the chat's perception of what's acceptable is looser than what moderators and admins think it should be.
 
1:49 AM
That said, it's easy now to see some topics were a bit off the rails.
 
2:13 AM
@Sippy Aha, it was a message saying has Shaun left his job/got sacked
 
posted on November 19, 2015 by Scott Hanselman

It was a huge day in New York today as I got to join Scott Guthrie and the team at the Connect() 2015 event as they announced a bunch of stuff, including, but not limited to: Visual Studio Code is now Open Source and a new Beta that supports extensions is out now! ASP.NET 5 RC1 is out with .NET Core and has a Go Live License. This means you can go into production with ASP.NET 5 on Windows o

 
 
2 hours later…
3:57 AM
guys, I can't get the add or delete method in my service to work. I wonder what's wrong
 
4:23 AM
@KalaJ you have to share some details
 
sure, what should I share. I don't even know where to begin what could be wrong
 
start with the error message
 
I get no error message :( Just nothing happens when I click on save
or if I click on delete
 
I assume you have a web application
look at your browser's dev tools' network tab to see if the request is going through and what reply do you get
 
yes
Oh there's one thing though
I noticed my id for my person is not being set
when I add the person
Can I autogenerate the ids every time I create them?
I forgot how to do that?
Currently, when the viewmodel is passed, I debug and I see id = 0
 
4:28 AM
probably. that depends on what do you use to access your db and the layout of your db
 
oh I'm not using db
I'm using persistence in memory right now
looking at the Network tab, the post went through
300 status
 
then you will probably have to increment them manually
 
how should I do that?
 
300? that's weird. that's not successful
 
okay, so what should I look into for that post request
that happens when I click on save
 
4:31 AM
since you have everything in memory now, create a static var with last id and increment it before saving to the db
maybe it returns 300 because you have multiple records with the same id (0)
 
In console, the only error I get is: Cross-Origin Request Blocked
well currently I'm not going to be saving to db
Just trying to do a small exercise
 
@KalaJ i meant 'to memory db'
 
ok
My question is how does the controller keep track of last id?
 
@KalaJ this error happens when your script from one origin (e.g. localhost) tries to access another origin (e.g. www.yoursite.com)
@KalaJ just create a static field in the controller for now and keep track manually
 
Doesn't seem like it's the id
 
4:41 AM
what?
 
like if I set it manually to some value and I try to save that value, it still doesn't add it
 
that's weird. how are you actually saving it?
 
This is what I'm doing on the client side
@torvin
 
1) never do xxxAsync().Result. never. use non-async version instead or use await
2) what do you mean by 'client side'? I thought browser was your client
i.e. web app
 
yeah I mean those are controller and client for web app asp.net mvc
why not async?
what should I use then?
I can't find a nonasync
 
4:53 AM
because the way you call it makes it sync, not async
 
I can't find sync under HttpClient
 
what do you mean by "client for web app". browser is the client for web app
 
yeah I know
 
then who calls your 'client'? i don't understand
 
The Index method in my controller
  CustomerClient customerClient = new CustomerClient();
            ViewBag.listCustomers = customerClient.findAll();
 
4:57 AM
so your controller calls another controller via HttpClient?!
 
???
Client is a class
Controller calls that class
 
CreateCustomer is a method of the controller. So browser calls it. Right?
 
yes
 
ok. then this method, inside, calls CustomerClient.CreateCustomer. That makes an HTTP request. right?
 
yes
 
4:59 AM
so which server does this request go to?
browser --http--> CreateCustomer --http--> ???
 
It goes the web api service?
 
are your controller and web api service on the same server?
 
currently yes I believe. I created a single project that is currently housing my web app (mvc) and web api (service)
 
so why do you call yourself via http then?
you can just call it directly
 
for best practice?
How would I call it directly?
I'm still new to web services, so please excuse my ignorance
Just trying to learn thanks
 
5:04 AM
Honestly, I don't understand. Why do you need a separate controller? It looks like it just behaves as a proxy right now between the browser and your api. Do you need a separate api?
 
I basically almost copied this example: youtube.com/watch?v=8dwOlEAQV10
and that's what the tutorial did
I guess it's not the right approach? This is my first time dealing with web services
 
5:43 AM
@KalaJ sorry, i was afk
dunno, it may be the right approach, but that depends on your actual requirements
the video is too long to watch though :)
 
hmm.. weird that my chat image hasn't updated ... some profile breakage I guess
 
 
1 hour later…
6:57 AM
I want to add WCF services reference in shared project (I am using Xamarin.Forms Portable).
 
Folks, once in a while I see this kind of selector dialog. Is it a "canned" library dialog (not unlike a message box) ?
 
7:14 AM
@NickAlexeev I think it's part of the Shell, not part of Win32 (like the messagebox)
 
@AvnerShahar-Kashtan What might this dialog be called? If I knew the term for it, I'd be able to look up more details.
 
@NickAlexeev Good question.
Trying getting a hold of Spy++ that used to be in the Windows SDK, which can let you see the window class name of a Win32 Window, and that might give you a name to google for.
 
Good morning.
 
hello all, am facing an issue with the app.config file that when am updating the config file with the path's, the running windows service is nt taking the updated value.
What should I be doing if I need to get the updated value from the app.config.
Should I be doing any settings to the app.config file like Build to Content and Copy to Outut to True??
 
Well, there has been a bit of drama last night huh.
 
7:30 AM
@Ganesh app.config is compiled to MyExecuteable.exe.config. Are you changing app.config without recompiling?
 
I changed in the exe.config file also, but still it did not updating
When I deploy the windows service, I might required to change the config file.
but when ever I do the change in the app.config which is copied to bin folder and also myexecutable.exe.config file also, there is no luck
 
app.config is irrelevant at runtime.
 
hmm then I should be depending on *.exe.config right
?
 
but am not sure even if I update the *.exe.config file, the service is not considering the updated one? Should I be doing Restart Service?
 
7:43 AM
Sorry to bother but, Could someone help me with the following Regex/linq. I got this code from another question but it breaks FullPath's Because it removes the drives Semicolon from the path. I need to know how to ignore split[0] from the regex. But still have it added to the string.

public static string CleanPath(string path)
        {
            string regexSearch = new string(new[]{'<','>',':','"','/','\\','|','?','*'});
            Regex r = new Regex(string.Format("[{0}]", Regex.Escape(regexSearch)));
 
Why are you doing this? We have build-in helpers to validate paths.
Look into Path.GetInvalidFileNameChars()
 
will that fix the path though? because CleanPath removes all the invalid characters.
 
If you use it right, of course. You missed quite some invalid characters in your CleanPath though. Your method is not reliable at all.
 
I was just testing it with those specific characters because I couldn't see why it wasn't working(different problem) And then I figured out it was breaking because it's removing the Drive colon. EG CleanPath("C:\\Temp" returns "C\\Temp"
 
That's because there's a difference between InvalidFileNameChars and InvalidPathChars.
 
8:19 AM
@JasonBrown Asking another way - why would you need a cleanup function to clean a path name?
As opposed to one that cleans a folder name you want to create.
 
hmm... I guess I only need to clean a folder name. However do you know how to get the last folder from a path?
I am guessing I need to use Split :
 
No, no, no.
Use the methods in System.IO.Path and System.IO.Directory
Treating paths as strings is a recipe for tiny hard-to-catch off-by-one errors.
 
but those are the most fun error's :D
I'm Giving up for now, 2 tired. And my codes getting on my nerves... I'l probably have a better Idea how I'm going to handle the stupid paths in the morning. Thanks for Help, sorta.
 
8:38 AM
No worries. Come back later and we'll probably be able to be more help.
 
sure, I'l also be more aware of what I need since I wont be dead tired :).
 
@RoelvanUden: some drama, not much. I guess people are just trying to be careful, so that this chat doesn't end up like the scifi room.
 
hello everyone
i have a question regarding sql managenemt studio?
 
Hi all, non programming question here, I'm sharing internet by WiFi but cannot use it from my phone, is there any app or some one did it before?(Windows 10)
 
in sql management studio, i have 30 tables and in the diagram i have organized the way i like it . when i clicked on the view page breaks it takes 15 pages. i want it to be printed on exactly 15 pages. but will print on one page only
 
 
1 hour later…
10:14 AM
Hello everyone!
This is my first time chat on C# chatroom
So...here's my question...hope this might be a noob question>>
Here's it:

How do I return a value from say suppose

(xDoc.SelectSingleNode("Hello/HelloAgain/Hey").InnerText);

when I am using a class file and not directly via a textbox control.
I mean to say a method directly saving the values to the nodes and accessing it via some other class.

Thanks :)
 
@Zero Not entirely sure of your situation. You have an XDocument, into which you presumably loaded an XML document, right?
And you have a method which reads a node's content and returns it?
 
@Avner
@AvnerShahar-Kashtan yes I did

"And you have a method which reads a node's content and returns it?"
No...I am just saving the file using
xTxt.WriteStartElement("Hello"); xTxt.WriteEndElement();
But, I want a method that'll return the value of the node
 
10:35 AM
Just set a method that retuns a string and that calls return xDoc.SelectSingleNode("..").InnerText.
 
Means I am just creating an XML node using XMLTextWriter and then
loading that xml file as:
string fullpath = myDoc + @"\SomeFolder\File.xml";
xDoc.Load(fullpath);
and then I want to return a value that'll be given from the form app (remind you that this is the .class file)...so I did as:

return (xDoc.SelectSingleNode("Hello/HelloAgain/Hey").InnerText);
xDoc.Save(fullpath);

Thx :)
 
xDoc.Save won't do anything if it's after a return statement
@Zero can you explain what you're trying to do more clearly, please?
 
hellllllllllllllllllllllllllllllllllllllo is any buddy is there?
 
o/
@Shaun lol
You got another job now?
 
Morning everyone, hope everyone is well!

I have a potentially stupid question...

Say I have a class as follows:

public class Filter
{
public int ID {get;set;}
public List<Filter> Filters {get;set;}
}

How do I get all filter objects within an object (including the parent object) without using a recursive method?
The recursive method approach throws a stack overflow exception...
 
10:48 AM
What was the bluefeet inquisition about?
 
@RianMostert How deep is your recursion?
Show us your recursive method. Chances are it can be converted to an iterative solution easily.
 
@AvnerShahar-Kashtan Unknown, over 100 at least. Also not sure if you got my message the other day, I came right with the DateTime search thing. Thank you very much for your help!
 
@RianMostert I would say your break condition for the recursive method is if(context.Filters.Count==0) //stop`
 
@RianMostert Yeah, I got a notification. Congrats on that, it was a really annoying requirement to fill. :)
 
@AvnerShahar-Kashtan that it was, but you gotta do what you gotta do. =D
As an example:

public class FilterExample
{
public List<FilterExample> Filters { get; set; }
}

public static IEnumerable<FilterExample> GetAllFilters(FilterExample filter)
{
List<FilterExample> filters = new List<FilterExample>();

if (filter.Filters != null)
{
foreach (FilterExample innerFilter in filter.Filters)
{
filters.AddRange(GetAllFilters(innerFilter));
}
}

return filters;
}
 
10:59 AM
@RianMostert (You can press Ctrl-K to format code in chat)
 
chat does not like indentation eh?
Is there a way to paste a codeblock on here?
4 spaces? [code]? <code>?
public class FilterExample
{
	public List<FilterExample> Filters { get; set; }
}

public static IEnumerable<FilterExample> GetAllFilters(FilterExample filter)
{
	List<FilterExample> filters = new List<FilterExample>();

	if (filter.Filters != null)
	{
		foreach (FilterExample innerFilter in filter.Filters)
		{
			filters.AddRange(GetAllFilters(innerFilter));
		}
	}

	return filters;
}
neat, good to know
 
morning
 
morning
what time is it in your country?
 
8:09
am
yours?
 
it is really morning :D
here it is 13:09
 
11:09 AM
lol
 
got it :)
If you have some spare time: 0hh1.com
 
@NikolayKostov did you make it?
 
Is there any clever tricks to finding bottlenecks in code I don't know?
 
@Sippy yeah, ship it and wait for complaints
works every time
 
11:33 AM
I know vaguely where it is
 
Use profiler like JustTrace or dottrace
 
I don't know the code though
And it's extensive.
 
@Sippy profilers are designed to do exactly that
 
Never used a profiler
Will have a look
Thanks dudes
 
11:36 AM
Is the profiler built into VS2013 gonna be adequate?
 
there is no built-in profiler
try dotTrace instead :)
 
Under Debug there's a Profiler?
Oh that's 2015
 
VS2013 does have a profiler, at least premium does.
 
I'm on VS13 premium
Where be that?
:D
 
Yeah, I've used the built-in VS2013 profiler a couple of times. Ants was better, but it still helped me find some memory leaks.
@Sippy Under ANALYZE.
 
11:39 AM
Ah, cheers
 
@AvnerShahar-Kashtan nvm, found my problem, it wasn't a case of ridiculous amounts of objects in objects, it was a case of adding the object I was scanning to the list of objects to be scanned, thus causing an infinite loop of recursion. Thanks for listening =D
 
damn, mods are overly sensitive now, deleting conversations that apparently haven't actually offended anyone...
 
yo dawg, we heard you like objects, so we put an object in yo object so yo can recurse while you recurse
 
11:49 AM
:D
 
@NicolásCarlo Don't blame the mods, blame the people who soured the conversation in the first place.
 
@AvnerShahar-Kashtan i'm not sure we're talking about the same conversation but the one recently deleted here from last night didn't actually sour anything, by the time i left, everyone in the room was okay with it
even the mod herself didn't specifically point out anything just that this room should not have this "type" of conversation. apparently there's a loose criteria that only mods can define when they see it
 
First they came for the Kendall's Mom jokes. And I did not protest, for I did not tell Kendall's Mom jokes.
 
@TomW ?
 

« first day (1860 days earlier)      last day (3103 days later) »