« first day (3832 days earlier)      last day (1099 days later) » 

5:21 AM
Good morning
 
 
1 hour later…
6:31 AM
morning rodent
 
Hi
 
hi shad
 
:)
Are you good with Sql?
my issue is exactly this
2
Q: Pivot result returning duplicate rows

user3090790With this query, I am getting result with null values and duplicate Ids... SELECT QuesId,QuesName,[Ketan Mevada],[Parvej],[Parvez Vahora] FROM ( SELECT tbl_EvolutionAnswer.QuesId,tbl_QuestionMaster.Name as QuesName, dbo.Evaluation_Calculation_CourseWise(tbl_EvolutionAnswer.QuesId,34...

my question is won't trainerid will be left out in the final result set?
 
mr5
I can't really understand the goal of that SQL. Can you add more details to it?
 
similar question
7
Q: My PIVOT is returning duplicate rows with pivot column values in each row

ScottI am having an issue I have seen others with similar issues, but the answers for those don't seem to apply to my situation. This is my first Question, so forgive me in advance for any formatting issues and thanks for any insight you can provide. My #TempTBData looks like this: InvoiceProductID ...

@mr5
 
mr5
6:47 AM
Still, no explanation of the goal :(
 
it is pivoting
problem is multiple rows
 
The pivot groups the data using whatever aggregation function you use, but can only group data with the same columns. If you add a column with different values, the grouping wont be the same as you want
 
yes okay
but I want that column back
after pivoting is it possible?
 
You group your question data and pivot to get the trainer related data in columns
to undo a pivot you would unpivot
Check the documentation pivot and unpivot doc
 
thanks!
but I want the trainerid to be present too
how can I not loose it while applying pivot?
trainerid/contaidid as per the questions above
 
6:54 AM
Once the pivot was done, you would loose the trainer_id because never was included in the result set, you could do the pivot using the trainer_id instead of the trainer_name
 
so the answer is no?
I want to include it :(
 
you could do two pivots to the same result set at the same time, one using trainer_id, the second using trainer_name
 
:O
 
7:15 AM
[Squirrel in Training] GoOoOoOoOoOoOoOoOoOoOoOd Mornin' neglecterinos!
 
mr5
Sorry Shad. Left you hanging there. Fortunately, Cleptus to the rescue.
that pivot thing is a foreign thing to me hmm
izz already afternoon nerd in training you lazy sqwrlelrelr
 
9 am here...
 
mr5
your time is wrong
it's exactly 3:20 PM (15:20 for plebs)
 
7:37 AM
You guys use AM/PM too? How fucking far oes the US spread that shit
 
hehe
 
7:57 AM
Hi guys, how can i call this function: '''public static bool TestHelp(this HtmlHelper htmlHelper)
{}''' ?
Ok don't know how to format :D
 
@Squirrelkiller It is not US related, but more british influence of that latin representation of the time
 
it's called de. and du. here.
 
static methods are those that do not need an instance of a class to be called.
class FancyClass{
void NormalMethod() {}
static void StaticMethod() {}
}
....
FancyClass.StaticMethod();
....
FancyClass myInstance = new FancyClass();
myInstance.NormalMethod();
 
and it is one of the things I constantly have to regoogle which means which
 
It is from the latin "ante meridiem" and "post meridiem".
 
8:05 AM
@Cleptus And how do I create HtmlHelper htmlHelper?
 
@Cleptus Except it's an extension method - you can call it like an instance method
 
who is good with sql?
 
Did not notice that "this" keyword... That is an extension method
 
@SpedoDeLaRossa No idea what an htmlhelper is, but you create it normally, independently from that method.
 
I want to display max of columns
 
8:12 AM
@Shad which SQL?
 
mssql
What I actually want to do is
I have 3 columns in one table
A B 1
A B 2
C D 3
I wanto table to be like
A B 2
A B 2
C D 3
that is having max value for same A and B
@ntohl
 
a window function
 
I have no idea what you want
 
would be something similar to: select col1, col2, max(col 3) over (partition by col1, col2)
This would be the documentation docs.microsoft.com/en-us/sql/t-sql/queries/…
 
wow
you awesome <3
 
8:18 AM
I do not remember if that would perform better, the same or worse to other alternatives
 
@ntohl convert the first A B 1 to A B 2
never wanted 1 in the first place
 
Windows functions are very handy when you check-in check-out tables (you need the value of the next row as an exit value)
 
thank you so much. :')
 
Hey
i have a problem in dotnet cli
while building in a win7 32 bit vm (for testing) i supply --runtime win7-x86
but it says that the rid isnt recognized
 
rid?
 
8:23 AM
runtime identifier
 
Not my arena, never used dotnet cli, but checking the documentation seems fine docs.microsoft.com/en-us/dotnet/core/rid-catalog#windows-rids
 
which version of dotnet are you using?
 
@OmerHijazi Win7?!
Get the fuck outta there
 
vm man
i use windows 10
just testing compatibility
@Wietlol 5.0
5.0.202
 
That's no excuse, your applications aren't supposed to be compatible with Win7
 
8:34 AM
why
wdym
 
ye... for net5 you are out of luck
 
ohhh
ok
 
.net core 2.1 should be fine
 
There's no more support for Win7
 
wait i just restarted 4 times (the vm) and reinstalled dotnet and boom 5.0 be smooth
 
like right now
 
you might want to look at those two
 
but it works tho
 
On your VM
For now
 
lol yes
tho in github i have said its for win 10
was just testing out of curiosity
its a webapp/console app mix btw
QBLint/QBLint
 
8:46 AM
[Captain Obvious] Did you file an issue on github saying it doesn't work
[Captain Obvious] Or do you mean on your repo for your project you said it needs to run on Win 10?
[Captain Obvious] If the latter then why bother testing for Win 7
 
@Botler Scratch the if
Why bother testing for win7
 
> was just testing out of curiosity
 
@Botler its my project
i said preferably use windows 10
@Wietlol and it works smoothly
do any of you guys know QB64?
or QBASIC
or any other BASIC dialect?
 
[Captain Obvious] Hey sometimes you gotta develop for shit platforms
 
yea lol
i know this guy who made a win10 app but I guess he had too much free time so he ended up adding support from windows 98 to windows 10
 
8:57 AM
[Omer H.] oi
[Omer H.] i dont know how he managed that
[Omer H.] i guess he used .net -5.0
[Captain Obvious] but why
[Captain Obvious] I mean maybe he didn't use .net
[Captain Obvious] If it's a 32bit application using basic Win32 apis and not using anything like Visual C++ libs then there's no reason why it can't run on Windows 95 through Win10
[Omer H.] He. Used. C#.
[Omer H.] You dont even know Visual Basic?
[Captain Obvious] I mean I know vb.net but I try not to
[Omer H.] yea lol
[Captain Obvious] Probably compiled to
[Omer H.] worse than caroona
\[**[Omer H.](https://discord.gg/PNMq3pBSUe)**] .net 2.0 maybe
it can run on win 98 afaik
[Captain Obvious] oh yikes
[Omer H.] so i made this website which lints any QBASIC or QB64 code you enter
 
9:27 AM
[ntohl (MR.TaNk)] useful.
[Omer H.] do you know it
[Omer H.] qbasic
[ntohl (MR.TaNk)] I draw some shit in that LONG ago
[Omer H.] nice
[Omer H.] try it out
[ntohl (MR.TaNk)] comeon 😄
[Omer H.] if you're on windows 10
[Omer H.] comeon? wdym
[Omer H.] try qblint out btw not qbasic
[ntohl (MR.TaNk)] why would I try something like that except for nostalgia
[Omer H.] no the website
[Omer H.] but you gotta build it and run on ur own pc
[Omer H.] cuz it used input simulation
[Omer H.] which aint gonna work on a server
[ntohl (MR.TaNk)] so. You suggest me in my work time to git clone something, build a server out of it, and try to write a code, that I last time did approx 25 years ago. And it will be fun
[Omer H.] your wish
[Omer H.] just sayin
\[**[ntohl (MR.TaNk)](https://discord.gg/PNMq3pBSUe)**] > cuz it used input simulation
> which aint gonna work on a server
[ntohl (MR.TaNk)] how come you can't use it on a hosted?
[Omer H.] by server i mean the webhosts
[Omer H.] like any webhost
[Omer H.] unless ur hosting it on ur own pc
[Omer H.] which of course has gui
[ntohl (MR.TaNk)] you can have a .dll in IIS for example to run
[Omer H.] (win10)
[Omer H.] but it uses input simulation
[Omer H.] it simulates pressing mouse buttons and keys
[Omer H.] etc
[ntohl (MR.TaNk)] it's something not wishing to do with a random 3rd party software to do
[Omer H.] not random
[Omer H.] winapi
[Omer H.] and not even mouse
[Omer H.] just presses ctrl s for your info
[ntohl (MR.TaNk)] you don't get it. Don't touch my mouse, except for Gameranger
[Omer H.] to save the qbasic code from ide
[Omer H.] see the code
[Omer H.] it doesnt use mouse at all
[Omer H.] i was just giving example
[Omer H.] see the code
[Omer H.] Project QBLintLinter File Formatter.cs
[ntohl (MR.TaNk)] back to work
[Omer H.] aight bye
 
9:52 AM
[Captain Obvious] I hate CSS
[Omer H.] realize that now?
[Captain Obvious] Well I can normally get it to do what I want it to do
 
But Blazor has scoped CSS now
 
[Omer H.] frick css, all my homies use <br>
[Omer H.] and bgcolor
[Captain Obvious] Like I've got this flex container
[Captain Obvious] Which is getting a "minimum size" from... somewhere
[Omer H.] i hate css 3000
 
10:25 AM
[Omer H.] if youve watched avengers endgame then you'll get it
 
Or like, any meme that was made the following year
 
 
3 hours later…
1:06 PM
lol okay no wonder I never heard of null!; it's for .NET 8.0 and my company's still on 4.5
 
uhh
C#8
 
yeah
oh we're using c#7
 
Theoretically the upgrade is not too complicated
Practically at a certain point, your codebase will have like a thousand errors/warnings the moment you enable reference nullability
 
1:32 PM
and once you solved all of them, it will still complain about half of them
 
Disregard Wietlol's low opinion of static analyzers
 
Can anyone help me in how to update a IColectionView returned data?
This is my code:
        public ObservableCollection<IngredientModel> IngredientModels { get; set; }
        private IngredientModel CopyOfIngredientModel;

        public ICollectionView ItemsView
        {
            get { return CollectionViewSource.GetDefaultView(IngredientModels); }
        }


        public ViewModel()
        {
            CopyOfIngredientModel = new IngredientModel();

            RefreshData();
        }

        // Method to refresh all data from the database
        public void RefreshData()
And the XAML:

<DataGrid ColumnWidth="*" ItemsSource="{Binding ItemsView}">
I have extra code to execute RefreshData() via the UI.. I know it's executing - but the ItemsView is not Refreshing...
 
1:48 PM
@Squirrelkiller my low opinion would be better if they actually worked
 
@LV98 it's usually {Binding IngredientModels}. Exactly because ObservableCollection have implementation about INotifyPropertyChanged. Also set the Mode to TwoWay, and source trigger to PropertyChanged to be sure. stackoverflow.com/a/25641255/1859959
I'm not sure you have to handle the View manually
 
@ntohl Reason I used ItemsView because it allows me to use a filter.
Like so:
namespace ViewModelLayer
{
    public class ViewModel : BaseViewModel
    {
        public ObservableCollection<IngredientModel> IngredientModels { get; set; }
        private IngredientModel CopyOfIngredientModel;


        public ViewModel()
        {
            CopyOfIngredientModel = new IngredientModel();
            RefreshData();
        }

        public ICollectionView ItemsView
        {
            get { return CollectionViewSource.GetDefaultView(IngredientModels); }
        }



        private bool Filter(IngredientModel ingredient)
 
that RefreshData is fishy
 
@ntohl Hahaha why? :D
 
ItemsView.Filter constructs a new View anyway, which should be like that
after that, you fill up the values of ItemsView source
you are setting a Filter on an empty model
first of all don't create new ICollectionView on every get {}, that would stop propagating changes to the view
 
2:02 PM
What about I just remove ICollectionView in general?
And use the current IngredientModels and set up a new Filter
Because I just binded it to IngredientModel and that refreshed okay
 
ICollectionView should be set on view side. Not VM
ObservableCollection doesn't have Filter
 
Yeah just realised that after some research..
Ignore what I said..
 
hmm. I checked my old code, which used ICollectionView and GetDefaultView, but that was a fine combination of manual stuff, and binding...
which I wouldn't do again
sorrz
I don't know
 
Are you able to share the code? :)
 
2:19 PM
// view
<ListView ItemsSource="{Binding LawCaseViewSource}" ...

// vm
private void Initialize(process_managerDataSet dataSet) {
    _adapter = new law_caseTableAdapter();
    _adapter.Fill(dataSet.law_case);
    _dataTable = _adapter.GetData();
    _lawCaseViewSource = CollectionViewSource.GetDefaultView(_dataTable);
}

private ICollectionView _lawCaseViewSource;

public ICollectionView LawCaseViewSource { get { return _lawCaseViewSource; } }
the point is to have only one of that
 
True - I am just confused that I refresh the IngredientModels it's updating, but the View is not.. as soon as I figured it out I'll let you know.
 
[Captain Obvious] I feel like my css files should have the word "hack" so often
[Squirrel in Training] you can rite css? 😮
[Captain Obvious] so much !important you know it's good
[Captain Obvious] German problem solved
 
2:47 PM
@ntohl Got it!
:51981682


namespace ViewModelLayer
{
    public class ViewModel : BaseViewModel
    {
        public ObservableCollection<IngredientModel> IngredientModels { get; set; }
        private IngredientModel CopyOfIngredientModel;


        public ViewModel()
        {
            CopyOfIngredientModel = new IngredientModel();
            RefreshData();
        }

        private ICollectionView _itemsView; // Altered this

        public ICollectionView ItemsView
        {
            get { return _itemsView; }
 
I suggest gist.github.com
You can make a gist an edit it whenever you want
 
still looks like you get in the data too many times. When you have a new Search string, you enumerate the dataset, which should not be the case
that's the nice thing about ICollectionView
just reset the filter, and the ItemsSource can be intact
 
3:27 PM
Can someone help me out with the VS Git interface? I just committed a sub branch and now I'm trying to push it to my main working local branch before I push it, but it's not giving me the option.
I'm in the main working branch, I right-click on the sub branch, but the merge option I get is "Merge 'subbranch' into 'subbranch'".
Or is "rebase" what I'm looking for? I was never clear on what that meant.
 
> I'm trying to push it to my main working local branch before I push it
Bruh
 
Merge it to my main working branch, sorry.
 
Not sure what's wrong, mine looks like this:
 
lol
you sure you checked out the other branch? Haha
git status
Don't listen to VS
 
3:41 PM
 
Damn
Restart VS I guess?
 
The branch I'm on is apparently ahead of the branch I'm on by 6 commits
 
ahead of its origin
unless you called your branch origin/xxx-main-dev
 
Also, when did SO chat lose the ability to paste images? I could have sword you used to be able to do that.
 
Maybe when you stopped using the browser extension
 
3:43 PM
Or when I started a new job with a clean computer and forgot there was an extension.
 
It's only on chrome though, and I think @Deathspike knows more about that
 
Oh, is it? I'm on Firefox.
 
Yeah, restarting VS worked.
 
3:55 PM
[Squirrel in Training] atleast you know css
 
4:46 PM
Ryan Donovan on April 13, 2021
Part 4 In this session, we will make our p5.js sketches interactive! Together with Morgan, we will work on the Generative Art Creator project using the p5.js web editor! We will make a tool to create, control, and combine generative works of art inspired by early media artists, such as John Whitney and Vera Molnar.…
 
5:27 PM
@ntohl I'll look into it when I'm back at work again.
 
5:46 PM
does anybody know how to create custom brushes on WPF? I'm using material design and there are PrimaryHueLightBrush, PrimaryHueMidBrush, PrimaryHueDarkBrush as well as SecondaryAccentBrush. I want to create SecondaryAccentLightBrush and SecondaryAccentDarkBrush
 
6:17 PM
I even tried something like Foreground="{StaticResource SecondaryAccentBrush, Converter={StaticResource LightBrushConverter}}", but theres no such Converter property for StaticResource
 
 
1 hour later…
7:30 PM
I have a function with a number of optional parameters. I want to call it a number of times and collect the results of each call. Not each parameter will be needed on each call. How can I organize which value goes to which parameter and submit them appropriately?
 

« first day (3832 days earlier)      last day (1099 days later) »