« first day (1350 days earlier)      last day (2799 days later) » 

7:03 AM
@ReedCopsey thanks
 
morning
what would you use if you would like to share a file over a private network?
we are using lynch now, but that is the worst thing ever!
 
7:21 AM
No problem, @JohanLarsson
 
guess it makes sense and picking up implicit styles would be a pain
messing with templates
is there a difference between having the style defined in resources and doing <TextBlock Style="{StaticResource {x:Type TextBlock}}" Text="3" /> inside the template?
feels like the result should be the same
I have very strange results though, looks like it picks up style for checkbox but not for textblock
must investigate this
 
Isn't the Style="{StaticResource {x:Type TextBlock}}" default for a TextBlock?
 
It should be - but in practice, it's not always ;)
 
7:37 AM
gah, red wtf, I'm dumbing something for real now
^ designer, red was runtime
 
weird
 
But I've been experimenting, probably have something dumb somewhere
if you have time you can paste the xaml in the gist in an empty window
 
it's almost 1am here - been putting out a fire
need to go home and eat something, then sleep ;)
 
:)
I had this in app.xaml:
    <Style TargetType="{x:Type TextBlock}">
        <Setter Property="Foreground" Value="Red" />
    </Style>
strange that it grabbed it over window resources
this turned into a nice example of why I'm always lost when it comes to scoping :D
@ReedCopsey a real fire or code?
 
code/deployment
basically "the world's going to end" type of thing
 
7:43 AM
fight fire with fire applies more than ever
 
just finished fixing it
 
@Johan App.xaml resources get picked up implicitly everywhere
but normal ones (in window) don't propogate into control templates
thats' one of those WAT things in WPF IMO
 
oh, thanks
 
anyways, going to sleep now
cya!
 
7:45 AM
nice, sleep well
 
@ReedCopsey Bye
 
did you know about these scoping rules NovitchiS?
 
It has to be due to ControlTemplate having its own visual tree. If I recall correctly the implicit style should be located in ControlTemplate resources -> StyleResources -> ControlResources ->App Resources -> Generic.xaml. I don't know why the CheckBox picks up the style.
If you move the Resources from Window to <Control> the implicit style will be applied
 
maybe it is due to checkbox using a contentpresenter for rendering content
it is a bit messy imo
and the thing that app.xaml style is picked up but window.resource style is not is capital wat :)
 
When i read in docs that some resources or event is located/routed on a hybrid between the Logical and Visual trees my skin starts to crawl :D
 
7:55 AM
:)
 
 
2 hours later…
10:01 AM
hi guys
I'm going crazy about a Binding that does not work...
<TextBox x:Name="P1_TextBox" HorizontalAlignment="Left" Height="23" Margin="102,19,0,0" TextWrapping="Wrap" Text="{Binding P1Value}" VerticalAlignment="Top" Width="120" KeyDown="P1_TextBox_KeyDown"/>
public class MoveByDirection_ViewModel
    {
        public event PropertyChangedEventHandler PropertyChanged;
        private void NotifyPropertyChanged(String propertyName)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }

        private String _p1Value;
        public String P1Value
        {
            get { return _p1Value; }
            set
            {
                _p1Value = value;
the PropertyChanged event is always null...
I've also set the DataContext
giving the ViewModel
after the VM constructor call
this.viewModel = new MoveByDirection_ViewModel();
            this.DataContext = this.viewModel;
why??
 
Interface implementation declaration missing
INotifyPropertyChanged
 
ahh
otherwise it looked ok
 
as in "public class MoveByDirection_ViewModel : INotifyPropertyChanged " :)
 
did it help Francesco?
 
:O yes...
I'm completely blind!
sorry guys...
: INotifyPropertyChanged missing
 
10:11 AM
your punition is to remove this : KeyDown="P1_TextBox_KeyDown"
 
franssu...I use it to manage user input in the textbox
how can I do it in other way?
using an updown?
 
And not use underscores in class/variable names :)
 
Novitchi I use it to let name more readable...it is not good?
 
what do you mean by managing user input ?
 
10:16 AM
I mean that if in the textbox that needs to contain only a number user tries to input a char, I block it...but maybe it is better to use an updown (integer or double) for that purpose...
 
so you would have to add codebehind for every textbox with this desired behavior
I don't think you need validation, it's only view related, you want a numerical textbox
 
what is it franssu?
 
you should have a look at custom behaviors
or attached behaviors
 
behaviors.... the hell of mvvm
 
10:28 AM
why @Markus ?!
 
hehe because I don't understand them :)
 
Had some very instructive couple of days profiling out WPF app. Learned some useful stuff.
@Markus They're weird at first until you get used to them. Just think of them as a wrapper around an event-handler.
 
not necessarily an event handler :/
 
10:48 AM
That's the basic use of behaviors. Taking the traditionally code-behind event-handler logic and extracting it into a logical component.
 
 
1 hour later…
11:58 AM
Good morning!
 
12:14 PM
evening
 
12:47 PM
@Alex you around?
 
@JohanLarsson Yes
 
We have this now: <propertyGrid:CheckBoxSettingControl Header="checkbox" Value="{Binding BoolValue}" />
 
Nice
 
I'm thinking about renaming to: <propertyGrid:CheckBox Header="checkbox" Value="{Binding BoolValue}" />
 
You've covered all the control types we'd need
 
12:50 PM
would remove some noise but potentially confusing to introduce clashes with framework types
 
Yeah, I think simpler is better
 
maybe <propertyGrid:CheckBoxSetting Header="checkbox" Value="{Binding BoolValue}" />
or <propertyGrid:CheckBoxRow Header="checkbox" Value="{Binding BoolValue}" />
hmm, maybe that is best
short and describes what it is pretty well
current is an abomination
 
You could go with a name like AutoCheckBox or some other word to start all your controls with
 
yeah
Now Row would be the same but suffix
 
AutoTextBox
Yeah, row makes sense too
Simple and to the point
 
12:53 PM
That would be StringBoxRow or TextBoxRow probably the latter
 
Yeah, then you keep it from getting confused with the built in controls
Looking up synonyms of word control. Can't find anything interesting
 
Row is pretty good as it is a row in the grid
 
Yep, everyone knows about row. I'd say go for it
 
ok, bumping major and changing, thanks
 
You're welcome. Didn't do anything. You already had it figured out :)
 
12:59 PM
nah, it is good to bounce things like this
What should I name the parent thing?
            <propertyGrid:SettingsControl DataContext="{Binding EditableCopy}" OldDataContext="{Binding DataContext.LastSaved, RelativeSource={RelativeSource AncestorType={x:Type Window}}}">
                <propertyGrid:LengthRow Header="length (m)"
                                                   Unit="m"
                                                   Value="{Binding LengthValue}" />

                <propertyGrid:LengthRow Header="length (mm)"
                                                   Unit="mm"
 
You mean the container of the propertyGrid controls?
 
yeah
SettingsControl is a shitty name
 
If these are rows, then the parent can be something to do with grid/table
 
I can't name it PropertyGrid cos it is already used by a class for attached properties
Maybe PropertiesGrid but a bit too similar
 
PropertyGrid2 ?
:D
 
1:06 PM
RowsControl?
@franssu :)
 
RowView
 
RowContainer
 
hmm, RowView feels like there is something in the framework
 
Yeah
 
I'm thinking maybe RowsControl as there is ItemsControl and they are similar.
don't love it though
What about: propertyGrid:Rows?
 
1:08 PM
RowBox!
Yeah, plural
simple and clean
 
works pretty well with the namespace alias
 
Yeah, and won't clash with anything in the framework
 
Dunno if R# handles all this renaming
Could be a couple of thousand build errors now
 
Does a decent job for the most part
Commit changes before doing rename
 
!
LengthBoxRow or LengthRow
I'm leaning towards the latter as there is nothing saying that a textbox will be used
can put a slider in the template or whatever
but then it should be StringRow and DoubleRow I think
 
1:17 PM
That'll work
 
I'll spam some xaml shortly
 
And it's your code, so go with what feels right for you
 
put on your critical glasses :)
It is our code
 
I know, but you've put your time and energy into it
So you get a lot of say
And I like your attitude of consultation and detachment. Wish more folks thought that way
 
It is very annoying to get public api wrong/dumb
And very common
 
1:21 PM
But it's also a learning process. We think of things as mistakes too often :)
Each day we try to do better than how we did yesterday
 
nope
I try to be worse
 
:)
 
but it's very hard
:D
 
You're naturally being pulled toward doing better
Darn it!
 
1:25 PM
when you've hit the bottom...
 
Some folks hit the bottom... and then start digging
 
you'll find it goes even deeper!!
 
morning, Maverik
 
as somebody who has done digging.. i've never managed to find "rock bottom" - in my experience its a bottomless pit.. you just have to look harder and you'll find another hole to fall through ;)
Morning!
 
javascript is rock bottom
 
1:28 PM
trust me.. you don't want to believe that
 
Yep, been there
 
because then something else will popup and you'll be like goddamn.. this can actually get worse?!
you know what they say.. never say never xD
 
The Language That Shall Not Be Named (hint: rhymes with "whisp") is rock bottom
 
just like you can't make things completely idiot proof
you can always find something worse than what's been thrown at you and be thankful that you don't have to deal with that worse thing :)
 
Because there's no cure for idiocy... or limit
Cobo* is another worse thing
 
1:29 PM
so sayth the book of Xen of Life by Maverik Micaeel-Kof
 
:)
 
1:45 PM
Hi guys
Can anybody help me with this linq query
1
Q: How to group by on 2 child entities and get total of both this child entities?

LearningI want to get total variants run for my Test Version 0 i.e Test Id=100 This is my table and records: Test: Id Version 100 0 Variants: Id Name Type CategoryId 11 Variant1 Diff 1 12 Variant1 Add 1 13 Variant2 Add 2 14 Variant2 ...

 
Hi Learning
 
do you know Jon Skeet @Learning ?
 
@Alex Hi Alex
@franssu He is famous SO user
but i dont agree with his comment
 
an Ex-MS employee i believe and current google employee
 
because i have asked a complete question
 
1:49 PM
I'm relatively new to LINQ. Sometimes it might help to write the query in SQL and then convert to LINQ (if necessary)
 
complete is not enough
it needs to be complete and SUFFICIENT
 
Learning, his comment is spot on
I can chop your question by editing it and it'll still be complete
 
@Learning Try writing your query in SQL as one option. Then you can ask how to convert it to LINQ
 
what you've given in your question is a ton of data.. that means nothing to us readers
 
@franssu I agree question is little big but pretty easy to understand
 
1:51 PM
i've read your question and I still don't know what the real problem is
all you've said is: I'm getting an 8 and i need a 3
why? well you look at all this data and figure out yourself
if you REALLY need to give this much data, it's much better to make a Github project and link it to question
let people actually see real code instead of pasting it all into a giant question that people won't read
(remember.. people answering your question have very limited time - most will leave because of the size of question)
 
ok then i should remove this table?
 
well yea you need to remove it but you need to improve your question first
there's no real question in there
the question shuold be a very specific description of what's going wrong
 
Can you please tell me what you didnt understand
 
try to create 3 small paragraphs that describe: What you need - try bullet points
What have you tried.. minimal code to demonstrate effort
What's going wrong with your approach - so people can focus on answering that part
right now i can't figure understand what your linq query needs - i'm getting lost in wall of text
 
do you know what sufficiency means @Learning ?
 
1:59 PM
Ok i am editing my question
 
don't edit it
cancel the edit.. draft your question in here
 
again jon skeet commented
 
lol
 
he's right!
 
i definetley need to edit my question otherwise will get lots of downvotes
 
2:05 PM
i understand your frustration though.. it takes some practice to distill information down to core elements
 
hsi comments too gets lots of upvotes
 
Jon doesn't mean any offense. He's guiding people in writing SO questions that will have a better likelihood of receiving answers
 
upvotes on SO mean agreement with a comment
 
@Alex Right but i was just showing that i put some efforts in asking a clear and better question
 
I'm always trying to learn how to do something better
 
2:06 PM
downvotes mean people are disagreeing with something
@Learning the effort will stay there in terms of history
but as it is, your question isn't making a lot of sense
 
@Learning Totally agree. I've typed up questions and they take forever!
 
but some peoples just downvotes because of other users downvotes
 
for a start. the tables are confusing rather than helping
Variants? SubVariants? Test? wth is that to us who don't know anything about your project
 
^ question is not even complete => downvote
 
alright i have make a paste bin in case if any user want to see how records are
 
2:08 PM
on top of that you use same name on variants even though they're different things
just because you have a different ID, it's not going to help a human understand
 
@franssu please dont downvote as i am already running so low on points
 
again you're adding more to confuse
 
I didn't
but I should
 
yea i shuold as well but i haven't
 
thank you guys
but please dont downvote
 
2:12 PM
i should too, but i didn't
 
you only have one downvote and i think it's from Jon Skeet
 
that means retaliate, and go downvote all of his answers right?
 
i too think so
jon skeet has downvote
 
How do you know that?
 
FYI: doing a retaliation and downvoting others is pretty stupid on SO for 2 reasons -- you lose your own rep to downvote others
and SO will detect your retaliation by itself and reverse the downvote automatically on target
 
2:24 PM
Anyway, one thing that he mean is that what does it give us to know that you have an Id and a version in your Test class?? etc...
 
(i was kidding. Y SO ZERIOUS?)
 
(personal experience when somebody did serial downvoting on my answers)
I know you were kidding, but it may not be clear that there's a consequence to this
 
I think we can't have a conversation with Learning, he might be not only one person
 
I was more wondering who gave the upvotes...
 
^
 
2:26 PM
people upvote because of amount of detail and effort put into question
especially when its newer people
 
mjae, maybe, I wouldn't now, and I didn't then...
 
last 3 questions are all at least +2 0_o
 
@Learning and why do you even have the Variants class included??? it's only referenced in the SubVariants in the Variants property (which isn't used in the example. And you should fix the indentation!
 
@Markus just for the sake of asking complete question i have reference needed code in question
right now trying to improve the question but seriously not getting how to explain it or improve it for better readability
 
dont use your data
your question is about how to format a linq query
your data is very specific
"if i have two lists contained within two parents, how do i do write this query"
something like that. i still dont really understand your question. 8 looks like the right answer to me. lol
you have object A that has a list with 5 things, and object B that has a list with 3 things, A.List.Count (5) + B.List.Count (3) = 8
 
2:42 PM
how do you know that the output should be 3?
 
the question implies that it should be counting something to do with the parents as opposed to the children
but i dont get it
 
It helps to change the names of things
try to explain in terms of Apples & Oranges if it helps
if you can explain it in abstract terms like that, you can get your reader to understand your problem
 
^ all of that. I thought it should be 8 too lol
 
guy is not reading anyways.
 
nope
 
2:52 PM
Guys what you suggest should i ask a new question
 
what is your question ? ask here
 
I have 2 objects:Variant and sub variants
there are 2 types of operation performed on this variants
1 Add operation
2 difference operation
but this 2 operations are performed on only sub variants
Now i will perform some kinds of test on this variants
this test will have different versions
so in each test i want to know how many variants (Parent variants ) are used
 
remove variants from the question
lol
 
yes stop here
 
ok
 
2:56 PM
your problem is about manipulating data using queries
the domain of your problem (variants, test, subvariants, versions) is not relevant
 
yes right
 
so you can likely ask your question without ever mentionning any of these (variants,...)
and still get an answer that solves your problem
so WE don't have to learn your domain
 
but i thought with some peoper explaination it would be easy for you guys to asnwer it
 

« first day (1350 days earlier)      last day (2799 days later) »