« first day (2508 days earlier)      last day (2663 days later) » 
06:00 - 18:0018:00 - 00:00

06:09
Ayo
06:24
Morning sharperinos! Hope you had a nice weekend?
06:39
Hello
In asp.net core, does it make sense to use in memory database for local development (e.g. when not in production mode)? If so, how can I do it?
Rob
Rob
I wouldn't recommend it. Better to use the same infrastructure that production is using @Shoe
If production is using SQL server, you should develop with SQL server, for example.
Ok, thanks
Then I'd probably need docker
@Shoe SQLite for one. But, as Rob noted, you should keep the same DB as you want to use for prod and then migrate
07:25
Gooood Morning neglecterinos!
Horrible!
I had this annoying friend over who doesn't even own pubg >,<
PUBG is for hype-running newbs. In 2 years time you won't be playing it.
Is there a way to know the "External Code"?
I wouldn't be saying that.
I am still playing PokemonGo everyday.
+ i'd still be palying DayZ but no1 wants to play with me^^ (Pubg and dayz are kinda similar)
Yeah sure.
Fool yourself.
inoptimized program that lag on every phone even iphone. and heat too much with consume battery as drink water.
07:34
@RoelvanUden :'(
good morning
It's nto good @ntohl!
@RoelvanUden is bullying me on the internet!
Yes I am. I'm fishing. And I got results.
#mylifesnotworthlivinganymore
@Nerdintraining Late as always! :P Bet you played that weird game, pupg, all night.
07:36
we have a saying in Hungarian. Whoever mocks someone, mocks him/herself. Give it a try, when You are bullied.
It's a common saying at the age of 6 or so...
@Nerdintraining I mean, that friend probably knows his shit.
@ntohl Having that saying might make things easier with some of the kids here. Wish I had that when I was a kid.
@nyconing Didn't google even send a letter to developers, telling them their apps would get ranked lower if they consumed too much battery? I bet apple has something similar somewhere.
from 11:30 'till 2:30 am to be percise :D

Aswell we won 2 round yesterday!
The english version would be:
Sticks and stones may break my bones, but names can never hurt me!
@ntohl Oh, this was just a year or so back for you then.
@RoelvanUden 4 years yet to come to my kid. :D
Wait, aren't you like 7?
07:50
@RoelvanUden I would be not that much capable of procreation
@Nerdintraining Hungarian version have also a nice rhythm: Aki mondja másra, az mondja magára!
@ntohl nwat
Hi guys
@Nerdintraining I have translated "Aki mondja másra, az mondja magára!" to: "Whoever mocks someone, mocks him/herself". And the previous have a nice rhythm.
@ntohl that should have read "neat" :D
Below is my structure :
Node-1
    Node-1-1 (Node-1)
       Node-1-1-1(Node-1-1)
Node-1-1 is storing reference of its parent i.e Node-1
Node-1-1 is storing reference of Node-1-1
08:03
@Learning why write node -1-1-1 instead of node -3?
Because i am having a nested tree structure in which i want to show parent child hierarchy
i think its not meant to be as a negative number
like versions with 1.2.3
why not write 123?
@Wietlol cuz peps tend to be confused
Below is my class for above strucutre:
public class Tree
{
    public string Name { get; set; }
    public bool IsParent { get; set; }
    public Tree Parent { get; set; }
    public List<Tree> Nodes { get; set; }
}
it's like bullet point, not a negative number
08:05
> IsParent
uhm...
is that "Parent == null" or "Nodes.IsEmpty()" ?
@Learning sorting alhorithm?
its still just a cool story
no questions have been asked
apart from questions to clear up the cool story
Hmmm
No what i am trying to achieve is with each of the node i have 1 sql query
So i want to fire all sql query for Node-1-1-1
So this is what my method should return :
public class Output
{
public string Title { get; set; }
public string[] Columns { get; set; }
}

public List<Output> GetData(Tree tree) -- Will have Node-1-1-1 data
{
return output;
}
Output :
[0] : Node-1
      Col1
      Col2

[1] : Node-1-1
      Col1
      Col2
its not quite clear to me what you really want to achieve though
you dont want to achieve sql queries
08:20
I want to get fields for all the parents of Node-1-1-1 by executing sql query
you want to achieve something that could be made possible using sql queries
isnt Node-1-1-1 supposed to only have 1 parent?
Node-1 (sql : select * from Node-1)
    Node-1-1 (Node-1 : sql : select * from Node-1)
       Node-1-1-1(Node-1-1:sql : select * from Node-1-1)
See there is an sql query asssociated with each of the node
and yes each node is storing only its immediate parent
So Node-1-1-1 is storing only its immediate parent i.e Node-1-1
Node-1-1 is storing Node-1 its immediate parent
But with this design problem is i am unable to get Node-1 data for Node-1-1-1
I am only able to get Node-1-1 data(immediate parent of Node-1-1-1)
so, you want to get the tree from the root to your node returning as little nodes as possible?
im not quite sure how to do a recurring call in SQL
im not quite fund of the language to do complex queries
08:52
wazzzzup? not much going on here, huh? everyone working? (i personally doubt that :D)
09:15
Bank holiday in the UK so, nope :D
@Learning Format your code here with ctrl+K, makes it way easier to read :)
So what you need is basically a function, going from a starting node through all parent nodes, executing a sql query for each one, in the end returning a collection of all results?
@Learning just go like
List<string> results = new List<string>();

Node start = GetStartNode(); // Why have this reference? I don't know. It's the Interwebz. Don't listen to us.
Node currentNode = start;

while(currentNode.Parent != null){
	results.add(ExecuteQuery(currentNode));
	currentNode = currentNode.Parent;
}
return results;
09:34
@Metallkiller feed me
@Nerdintraining Nah you're big enough
@Metallkiller i like teh comment ^^ we should comment all code like this
oh and theres also fun stuff with linq
GetStartNode().Where(x => x.Parent != null).FirstOrDefault()?.Select(anonymousobject => { result = ExecuteQuery(GetStartNode()); }).While( [...] )
If I use [MinLength(6)] on string property, does it make it automatically required?
@Taurib Where'd you find that attribute?
@Nerdintraining Can't have you spit on heads too much
09:49
:D
Still want my lugia!
@SebastianL Wouldn't that linq statement just filter nodes from a list that have a parent? GetStartNode() is supposed to give you the first node, from which you will start the journey upwards. Might be better put as a parameter, as it'll probably be its own method.
@Nerdintraining Not without any coins though :P
@Metallkiller Just cut ima poor?
@Nerdintraining Cuz you can't get arena time although you're blue
@Metallkiller No becuase i buy egg incubators
@Nerdintraining Can't get Lugia from an egg!
09:53
@Metallkiller But Cheinera und Snorlax
@Nerdintraining You can still get those in a month or so. Lugia not neccessarrily.
@Metallkiller Lugia will be back in a year, and anyways i don't have any stardust to push them to acceptable levels
@Metallkiller this is DataAnnotation
10:10
@Metallkiller But as i mention if i have a structure like below :
Node-1
    Node-1-1 (Node-1)
       Node-1-1-1(Node-1-1)
Then for Node-1-1-1 i get only Node-1-1 but not Node-1
Node-1
    Node-1-1 (Node-1)
       Node-1-1-1(Node-1,Node-1-1)
Does i have to store like above?
only if you forget the while(){ [...] current = currnet.Parent;}
if you have it stored like you say, where every node has its parent set, and you use that while loop, it has to work. Debug it, and you will find a mistake somewhere.
Right now i am storing like below :
Node-1
    Node-1-1 (Node-1)
       Node-1-1-1(Node-1-1)
Now will this work if i want to get Node-1 data also from Node-1-1-1?
@Learning Since Node-1-1-1 doesn't know about Node-1, not directly. If you have Node-1-1-1 and want the data of Node-1, you have to go through Node-1-1. Node-1-1-1.Parent is Node-1-1, and Node-1-1-1.Parent.Parent is Node-1.
Although I believe your method isn't supposed to know how high or low in the tree the given node is, just that it should get all info from all parent nodes?
Yes exactly
But then is this possible with my below current design:
Node-1
    Node-1-1 (Node-1)
       Node-1-1-1(Node-1-1)
???
@Learning Then every Node that is not a sirect parent doesn't matter to your method
Yes, it is possible, by using the code I wrote above.
10:20
So are you saying that i have to post List<tree>?
What is GetStartNode method in your code?
the currentNode = currentNode.Parent moves your "cursor" to the next Node, so in the next iteration of the while loop results will get the parents info.
Wait a sec, I'll make it...prettier.
the currentNode = currentNode.Parent//this is getting Node-1-1 data that is fine
But then what about Node-1 data?
In the next iteration, it goes currentNode = currentNode.Parent again, and then you have Node-1.
Here's it as its own method:
List<string> GetTreeInfo(Node start){
	List<string> results = new List<string>();

	Node currentNode = start; //Oh look now we actually need that reference

	while(currentNode.Parent != null){
		results.add(ExecuteQuery(currentNode));
		currentNode = currentNode.Parent;
	}
	return results;
}
What does Node start will have??
Does it have Node-1-1-1 data?
The Node you want to start with. In this example, Node-1-1-1. But the method doesn't care, it just goes upward from whatever Node you give it.
10:30
Ok wait let me try this.thanks
Oh yes you are right
I was doing a stupid mistake
 
1 hour later…
12:07
@Learning whenever creating a child node keep the Parent parameter, and also give it a Root parameter, so also the root is stored for traversing purposes
Actually storing reference of parent for a child wont work because i am getting circular reference error
Hence now i will traverse whole tree for finding all parents of Node-1-1-1
Why would you get a circular reference error? Of course you're allowed to reference back and forth between nodes. I thought circular reference error is if you reference a dll that already references your project?
when i try to do : Json.stringify on current object(Node-1-1-1) then i get circular reference error
I am trying to post that object to mvc action method but it is throwing error
in console regarding this circular reference
ignore serialization of Parent
nvm
You need custom deserialization for that
I am getting error on client side
Not server side
12:17
And custom serialization. You wanna serialize a node. That node has a node within. SO you serialize the node within the node, which has a node within...and so on, and so on. BOOM circular reference.
The compiler doesn't know how many levels of nodes there are, so the parent might aswell be reference to the same node, crashing everything.
Not a circular reference error
Yeah so i am now traversing the whole tree and then finding all my parents of Node-1-1-1
Circular structure = object might reference itself, so serializing wil run in circles.
so does my new soltuion make sense
?
12:22
...what's your new solution again?
i am now traversing the whole tree and then finding all my parents of Node-1-1-1
THat's more of an idea, not sure you have a solution yet. But if it works, it's a solution and makes enough sense to be used.
public static Stack<Tree> GetParents(List<Tree> tree, Tree node)
{
var parents = new Stack<Tree>();
GetParents(tree, node, parents)
return parents;
}

private static bool GetParents(List<Tree> tree, Tree node, Stack<Tree> parents)
{
if (tree == null) return false;
foreach (var item in tree)
{
if (item.Name == node.Name) return true;
parents.Push(item);
if (GetParents(item.Nodes, node, parents)) return true;
parents.Pop();
}
return false;
}
This is giving me correct output
Although I'd implement a method into Node that serializes it for you
also, ctrl+K that
I did ctrl+k
12:25
public static Stack<Tree> GetParents(List<Tree> tree, Tree node)
{
	var parents = new Stack<Tree>();
	GetParents(tree, node, parents)
	return parents;
}

private static bool GetParents(List<Tree> tree, Tree node, Stack<Tree> parents)
{
	if (tree == null) return false;
	foreach (var item in tree)
	{
		if (item.Name == node.Name) return true;
		parents.Push(item);
		if (GetParents(item.Nodes, node, parents)) return true;
		parents.Pop();
	}
	return false;
}
I did ctrl+K
Maybe you have noscript or something similar?
Ok sorry so does my above code make sense?
I'm honestly not sure because I'm doing stuff and am kinda too lazy to go through it in detail, but if it works its ok. Just try it.
Although you'll to change a name. Can't have two methods with same name but different return type.
@Metallkiller noscript active = no chat
Ah ok, didnt try.
12:49
AHOY MATEYS
Chips Ahoy!
Rum* FTFY
@Kieran WE WON YESTERDAY
TWICE
!!kieran2
:O!
12:52
Ye, once i died cuz of lag/desync which mage me lagg out of cover into the wild when like 12-16 peps where allive
The second time I lived to the end
noiceoince
i'm yet to get a chicken dinner :(
Imma do some solo's in a few
@Kieran don't brag :(
now i am jelly
Did i also mention i had today off?
Bank holidays rock
yayaya
what is dat
a bank holiday?
A bank holiday is a colloquial term for a public holiday in the United Kingdom, some Commonwealth countries, Hong Kong and the Republic of Ireland. There is no automatic right to time off on these days, although banks close and the majority of the working population is granted time off work or extra pay for working on these days, depending on their contract. The first official bank holidays were the four days named in the Bank Holidays Act 1871, but today the term is colloquially used for Good Friday and Christmas Day which were already public holidays under common law and therefore not official...
\o/
13:03
Our 'bank holiday' is next monday. lol
Labor Day in the states.
pubg time
wooooo
Hopefully i don't get another shotgun to the face
I'll be home, relaxing, smoking cigars and drinking scotch lol
@Kieran okay
@Kieran gl&hf
I want a bank holiday.
You get Saturday Banks never have off Saturday
13:09
Below is my variable of type stack :
var tree = Stack<Tree>();
Now if i want to start my loop from the last element then how to do this?
What is the 'last element' in your mind
Node-1-1
Node-1
So i want to start my loop from Node-1
What does that mean
So from the bottom of the stack?
push it in another stack, and pull it back, but use the values
I want to read records from last to top
13:11
You can't. That's not what a stack is made for.
In theory, you could open an enumerable, reverse it (meaning, copy it entirely, flip it around), and then get the first.
But yeah.. that's kind of stupid. Are you sure it's a stack you want?
I have my data in stack
Tree in itself should be a hierarchical thing with it's custom foreach
So i want to read one by one data from stack but from last
If it's a tree, why is a stack involved in the first place?
and have depth first traversal
13:13
^ That
dump that thing, and use XDocument. Make Yourself a favor.
If you could see the code posted by metal killer basically that is traversing the tree and findinf all parents of Node-1-1-1
Why are you trying to do?
What's the node list for?
Node-1
    Node-1-1 (Node-1)
       Node-1-1-1(Node-1-1)
I am having a structure like this on website:
interface have Stack<> in it?
13:15
Now what i was doing is i am storing reference of each parent with each of the child node as shown above
or You parse it into Stack?
But problem occurs when i try to do json.stringigy on Node-1-1-1 which is having circular structure
So i was getting below error :
Simple: Don't reference the parent.
But please answer this: why are you building a tree?
I search for this error and came to know that i cant have curcular reference with json
13:18
@Kieran did you die?
then i decided that i will traverse the whole tree and find all parent of Node-1-1-1
And this is the code which is returning all parents of Node-1-1-1
public static Stack<Tree> GetParents(List<Tree> tree, Tree node)
{
var parents = new Stack<Tree>();
GetParents(tree, node, parents)
return parents;
}

private static bool GetParents(List<Tree> tree, Tree node, Stack<Tree> parents)
{
if (tree == null) return false;
foreach (var item in tree)
{
if (item.Name == node.Name) return true;
parents.Push(item);
if (GetParents(item.Nodes, node, parents)) return true;
parents.Pop();
}
return false;
}
I really don't like multi-day road trips, especially when we don't know specifically where we're going.
@Learning please read chat description and post code there :<
@RoelvanUden Actually i have requirement like that so cant explain you fully as because you wont have that much time too
Combined with the fact that we were going to something that EVERYONE was going to, so it was impossible to get a motel room.
13:20
@Learning You have a requirement that says: 'Bring me a tree, frodo!'?
No its not like that but i am having an interface where i am allowing user to create a tree structire as you can see here :jsfiddle.net/brendanowen/uXbn6/8
So then with each of the nodes i am performing lots of operation
Oh okay. Then just don't ref the parent and lookup by key.
Doesnt my above code make sense or i should make structure changes on client side which make this thing easy?
Node 1-3-1 would be split into
key=1
key=3
key=1
access root.. get key 1 (use sorted index and quick search)
in that node.. get key 3 (^)
in that node.. get key 1 (^)
should be somewhat of a O(log n) impact
now you don't need a ref to parent
Can you explain me with reference to my below structure please:
Node-1
    Node-1-1
       Node-1-1-1
13:25
i just did
class Node {
  protected _children: Node[];
  protected _id: number;

  public constructor(id: number) {
    this._children = [];
    this._id = id;
  }

  public add(node: Node): void {
    this._children.push(node);
    this._children.sort(this._sorter);
  }

  public get(id: number): Node | undefined {
    for (let child of this._children) if (child._id === id) return child;
    return undefined;
  }

  private _sorter(a: Node, b: Node): number {
    if (a._id === b._id) return 0;
    if (a._id < b._id) return -1;
Enjoy.
rootNode.find('1-1-1') would yield the correct node.
Probably.
Note: Optimize the living hell out of the child array.
Is this server side or client side code?
Sorry if this is silly question
Doesn't matter. I wrote it in TypeScript. Would work anywhere JS runs.
Just grasp the concept
Oh all right
Thank you so much :)
@Learning If you wanna put the stuff you find into a list, and then read it starting with the first you put in, you need a Queue<Node>
@RoelvanUden you have fun today
13:40
Stack = LiFo, queue = FiFo
@Metallkiller And where are you when I need you?!
@Nerdintraining Getting my senior dev to explain to me why our thumbnails aren't getting built correctly.
TUrns out, they just don't and htey actually should and i can just go and fuck shit up until it works
^^
okay
ima gona write you on whatsapp
careful with that, i tend to not read that while at work :P
14:04
Good. You're supposed to work, not spend time chatting with random people online.
.... Wait ....
is ASP.net outdated?
@RoelvanUden .... What ....
what about ASP.Net Web Application?
or ASP.Net Website? I remember there was something ASP related in file..new that was outdated.
WebForms?
14:19
ASP.NET
1) web forms (OLD)
2) MVC (NEW)
GOD DAMIT
HOW CAN I REMOVE THAT WHITE BORDER FROMA DATEPICKERTEXTBOX
display: none
Newer then Forms
14:28
@Nerdintraining have you tried antifa?
NOW THEY ONLY WORK ON GOVERNMENTS
@Nerdintraining Have you tried Background="transparent"?
@Metallkiller this is what i have
Fine I'm trying your damn datepicker!
<DatePickerTextBox Grid.Row="4" Grid.Column="1">
	<DatePickerTextBox.Resources>
		<Style TargetType="Grid"/>

		<Style TargetType="ContentControl">
			<Setter Property="Background" Value="AliceBlue"/>
			<Setter Property="BorderThickness" Value="2"/>
			<Setter Property="BorderBrush" Value="Yellow"/>
		</Style>
	</DatePickerTextBox.Resources>
</DatePickerTextBox>
In a DatePicker is a DatePickerTextBox
In a DatePickerTextBox is a grid and a content controll
inbetween the Grid and content controll is a white border
that seems to be unremovable
14:38
I just realized that's not a datepicker you gave me
its the inside
I have learnt how to crash the designer ^^

in xaml put cursor on `TargetType="ContentControl" '
In designer try to move that controll
Don't know how to get to the texbox right now, and its time to go home. Will check that tomorrow. Have a nice evening everyone :)
user7480455
15:31
Hi all
15:49
can someone help me with some regex string replacement?
@im1dermike 'sup
Don't ask if you can ask, it creates an infinite recursive loop. Just ask your question. If someone is around who can help, they will.
23
@mikeTheLiar ''sup
@im1dermike What are you trying to do?
15:57
@milleniumbug heyho
user7480455
I never understood why that upsets you guys on stack overflow
user7480455
you guys don;t like proper manners
user7480455
it makes me laugh sometimes
user7480455
it seems like proper form to ask first
16:05
Not when you have to keep answering over and over "yes you can ask".
Just get to the damn problem.
Stack Overflow isn't about "being polite" it's about getting shit done.
If it were just one person, it wouldn't be a problem. But it's not. Its a continuous stream of people.
user7480455
But you don;t have too.. its kinda like saying hey you dont have to ask.. I'm thinking hey you to have to answer either...
Case in point, im1dermike still hasn't asked his fucking question.
user7480455
it just seems like a young person thing and a internet that
16:06
If he had just started with the question it'd be answered already.
"Hey, is this the correct room to ask about X? If yes, then how do I frob the foo in the baz X?"
user8516396
Could someone take a look at my question? Thanks. stackoverflow.com/questions/45922680/…
user7480455
it's just interesting
i'm in ur codez frobbin ur widgets
^^^ see? he gets it
16:08
!!tell l746577 mcve
@l746577 If you would like assistance, please create a Minimal, Complete, and Verifiable Example
Oh that's much better.
user8516396
@mikeTheLiar If you're refering to the lack of code I have just updated it.
user8516396
Thank you.
@im1dermike you obviously can't...
16:09
That said I have no idea what the problem is.
user8516396
It actually works fine if I put socket.connect in the constructor, very strange.
user8516396
Does anyone know how I can handle "'No connection could be made because the target machine actively refused it'" specifically, not just catch a SocketException in general?
Typically that's a configuration issue, not a code issue.
In my experience at least.
16:24
anyone would like to join in this open source project??
any comments or feedback to improve this package or feature in it are also highly appreciated
thank you in advance :)
16:35
BTW...in case anyone is interested in this Query: data.stackexchange.com/stackoverflow/query/715250/…
*if anyone interested
16:59
whats the best way of reading the connection string from appsettings.json? hard coded in my models>projectcontext needs to goooo
Hey guys, I'm writing a .NET boilerplate MVC application and I wanted to add a bunch of web applications to it. The idea is that I have a single MVC application but each module can be added as middleware. For example if I had a CRM module then you could use app.UseCrm() to enable it. Is this a good approach for making reusable web applications that all sit under a single website?
17:48
@PrimeByDesign I don't think MVC will work like that
Want to explain a little more what you are looking to accomplish?
@SomdipDey What is the location type? I did zipcode city name state and came up with 0 results
user7480455
what does boilerplate mvc mean?
user7480455
never heard that term before
he is making a template
user7480455
ahh I just found this aspnetboilerplate.com
user7480455
so this template will be fore all other application he makes
user7480455
17:55
in a way?
Ya something to that effect
In computer programming, boilerplate code or boilerplate refers to sections of code that have to be included in many places with little or no alteration. It is often used when referring to languages that are considered verbose, i.e. the programmer must write a lot of code to do minimal jobs. The need for boilerplate can be reduced through high-level mechanisms such as metaprogramming (which has the computer automatically write the needed boilerplate code or insert it at compile time), convention over configuration (which provides good default values, reducing the need to specify program details...
06:00 - 18:0018:00 - 00:00

« first day (2508 days earlier)      last day (2663 days later) »