« first day (3790 days earlier)      last day (1143 days later) » 
01:00 - 13:0013:00 - 00:00

1:02 PM
I am stuck
I am following this tutorial to try out pivot
in the end they have made use of dynamic query
 
mr5
why are you doing weird stuffs on SQL
 
it's a project where I am working currently
 
mr5
unfortunately, I can't help you with that thing. those are also new to me.
 
oh alright
it's a project where I am working currently
 
lol fk java still appears in the messages
 
mr5
1:15 PM
I'm gonna work with Java soon though. Wish me luck :D
 
oh boyyy
 
1:26 PM
Java is not that bad at all
 
Java is the pinnacle of beauty.
 
I
cry
when Java deserves to
DIEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
3
 
mr5
1:49 PM
Uncle Bob said C# is just a Java version of Microsoft :D
 
I mean, he's not wrong. Just that this version actually continued being developed.
 
mr5
Speaking of Uncle Bob, in one of his lecture he mentioned that every project needs to have a corresponding Unit Test. Which to me sounds more work but it actually makes sense.
If it translated in VS's project == more work
 
It does mean the VS kind of project
 
mr5
Yeah, C#'s LINQ is da best
 
And it isn't actually more work, it makes clear what it tests
 
mr5
1:52 PM
I wish we have the time for it though
 
Solution has three projects: logic, webservice, and database adapter? Make three test projects.
 
I like 0 test projects. It's the perfect number regardless of how many code projects there are.
 
Ah look at the JS dev
 
mr5
I was thinking of making a language made from Uncle Bob's specification
 
@Squirrelkiller When you're perfect, you have no need for testing.
 
1:54 PM
C#++
@Deathspike Except unfortunately there are usually other people working on the same codebase too
I literaly just fixed a merge conflict that, had it not happend, would have brought really bad code into the codebase. Kinda obvious too. No idea how that got past the code review.
 
Just looking for a pointer for my project, I am doing a simple message app with 2 columns, the get request queries db and i have data stored in a list. The left column is populated with the sender of each message and I want to click the button corresponding to Id of the div (which is the increment from the foreach) and then use that to retrieve and populate the right column with the message.. What would be the best way to achieve this? Ajax?
 
Which UI framework?
Also do you have RPC set up, like SignalR? Because then that would be faster.
 
2:10 PM
I'm still a noob so unsure of all the differences between terminology but using razor pages (I'm not quite sure if MVC and razor pages are the same thing but iirc the project was created from dotnet new webapp with the auth stuff). I'm not currently using SignalR but something I can look into if that's the recommended path to go down?
 
2:44 PM
@Shad I have used pivot table once
 
lol
 
what you have yet?
(I'll react scarcely)
 
I am exhausted atm tbh
If you want the output from your sp_executesql into a temp table/staging table, you can do that, look up SP execute results insert into table. — Brad 8 mins ago
0
Q: Print output of a dynamic query?

ShadI am able to kinda get the output of a table being used in my stored procedure using the following way:- DECLARE @xmltmp xml = (SELECT * FROM table FOR XML AUTO) PRINT CONVERT(NVARCHAR(MAX), @xmltmp) Now, I came across a sp which makes use of dynamic query inside it. SELECT @query = 'SELECT * FR...

this is what I have just asked
 
3:02 PM
stackoverflow.com/a/3840771/1859959 from this. What happens if you change N'@city nvarchar(75),@cnt int OUTPUT' to '@city nvarchar(75),@out1 int OUTPUT, @out2 int OUTPUT, ...'? You shouldn't use SELECT * anyway
 
didn't try it
I am taking a break
will be back, thanks!
 
@Deathspike best is to have unit tests as part of the projects itself
like how Java does it
on the other hand... in Java, I also rarely write unit tests
design applications the simplest way, then testing becomes... simply duplication
I only test what is more complex than the absolute simplest thing
 
3:24 PM
Does anyone know what the above syntax is called? Resharper just suggested it and I have never seen the combo of return and if brackets before
 
@orgg Sorry got distracted by work :P Both MVC and Razor Pages bascially point to the same UI framework, yes. Unfortunately not something I have actually worked with, but @d4rk4ng31 has been tinkering with that. I think on a razor page you can just trigger a C# method to get something from the database directly.
@Callum Looks crazy and weird and wrong. I gotta try it.
Oh wait technically it looks ok but also as if the brackets are not needed there
Since technically, you can put brackets like these everywhere
public void stuff()
{
  {
    {
      DoStuff();
    }
  }
}
Totally valid
No idea why R# would recommend that though
 
Ahh that makes sense, thought it was some new functionality I missed
 
Did you maybe have it the other way around and R# recommended to invert to reduce nesting?
Maybe some special combination of stuff breaking the refactoring
 
Yes it was a invert to reduce nesting suggestion, must have got confused and not removed the brackets
Thanks for the help!
 
Sure^^
 
3:59 PM
Is there a way to bind the selected value from HTML select to an object, for example, the select source is List<Model>, I want to bind the selected value to the individual element (of type Model).. I know it may be complex in HTML, but I'm coming from XAML. and I badly need it.
 
2 hours ago, by Squirrelkiller
Which UI framework?
Razor Pages again?
 
 
4 hours later…
8:20 PM
Ben Popper on March 02, 2021
While many introductory statistics classes teach the CLT, very few actually attempt to prove it because that requires some complex math. In this session, we’ll bypass all that math by using Python loops to simulate the CLT.
 
user11494366
Hey! I just earned the privilege to use chatrooms!
 
hell ya welcome aboard....unfortunately most people here are in the discord server now, but welcome anyway
 
user11494366
Hey! I may join the Discord server also.
 
user11494366
I can use both.
 
10:03 PM
@Squirrelkiller No worries, same here ha. So I've managed to get the AJAX to submit the ID of the box I'm clicking but the next problem is that while I thought doing the initial get request would store the values in memory, it seems it must be GC'd so when I call the get request again, the list is then empty.. Perhaps I'm doing something wrong
 
10:19 PM
that is not a GC error
generally speaking, the .net GC doesnt make mistakes
it only collects actual garbage... stuff you cannot possibly use again
I think you just made a new list
probably, you need some session state
 
Oh okay, that was just my assumption based on what I found. I just double checked to see if my first get was being hit for some reason during the process and it doesn't seem to be - I did also try create a new list outside of the bind property section (in case for some reason that was the problem) but that was the same deal
Is that typically an easy thing for .net, I'm using the auth stuff so i figure there's already some session going on somewhere already?
 
I am not sure what you are using though...
 
Ah.. uh razor pages with no api stuff atm
 
i see... and where do you create the list?
 
So, I do a get request to load up the page and when that's triggered it does a SQL query
that's like `var list = <query>.ToListAsync()` and then populates my list after with a `foreach (var item in list) { listVar.Add(new DataType { a = item.a, b = item.b } }`
(changed my var names btw)
 
10:29 PM
I see
 
I seemed to be having issues just returning the query as .ToListAsync() without declaring as var even though my data type was correct - you think that could be a problem?
 
iirc, every request will ask for a new processed page, so each request would create a new list
ToListAsync() woul return a task instead of a List, generally speaking you should only use var when you have
var x = new X();
 
So a totally separate get request would wipe my vars? I read about custom handlers whereby listening for generic get or custom but hadn't thought that
 
(obviously, there are exceptions, such as Angle a = Angle.FromRadians(tau); or XDocument doc = XDocument.FromXml(xml);, etc)
@orgg iirc, yes
that is why you could use session state, to retain information across multiple requests
 
I'm returning a Task<IEnumerable<Type>> for async - I think I tried a Task<IList<Type>> but it wasn't having it but i can't completely remember now.. comments haha
 
10:33 PM
ye, that is one thing about Task...
Task<List> is not a valid Task<Object>
even though the Task is a provider and the provided value is always out variant
they just didnt bother
once more the magnificent Task api spits in the face of developers...
also, generally speaking, you wouldnt store the Task somewhere
you would just await it
and store the result
 
My typicals are return await x but couldn't really find another way around the list issue
what's the usual practice for such a scenario?
And for my session issue, could I just use a singleton? Or is there some fancy bell or whistle for that?
 
there should be some way to access the session state
singletons would be shared sessions between all users
which is probably not what you want
 
ohh yeah of course
 
you probably can just do Session["myList"] = await stuff.ToListAsync();
although, you should double check to see if you can store any object or just strings
in the latter case, you need to serialize/deserialize it
 
Would I still be able to use session as part of the service?
i guess not
Or would that be done in the razor page?
 
11:02 PM
mostly, yes
 
01:00 - 13:0013:00 - 00:00

« first day (3790 days earlier)      last day (1143 days later) »