« first day (2166 days earlier)      last day (2765 days later) » 

5:01 PM
the most my code has ever had to process was a few million (apparently)
-> home. 10 hours is enough coding for one day. Beer time.
 
5:32 PM
anyone knows what causes this?

'System.NotImplementedException: The method or operation is not implemented.'
 
You haven't implemented a method or operation.
That'll be $50 please.
 
what do i have to implement? i just ran update-database using a context class. -_-
 
Usually it's from when VS generates a stub method for you when you're implementing an interface
Try searching your project for NotImplementedException
 
the update-database partially works, I mean, the schema is being created when I look on the mysql workbench, but the tables from the model was not created, the only table created was efmigrationhistory. any thoughts on this @mikeTheLiar ?
 
None whatsoever. Never done that before.
 
5:42 PM
Thanks though.
 
Good luck at any rate.
 
hi guys
I'm looking for linq function which name is on tip of my tongue
ohh.. never mind
 
Hi here.

I'm wondering if this is a correct if statement:


                        else if (l[current_line+1, loop_word].Visible == false)
                        {
                            for (int i = 0; i < 5; i++)
                            {
                                current_line++;
                                l[current_line, i].Visible = true;
                                Refresh();
                                loop_word = 0;
                                current_letter = 0;
 
6:02 PM
I dont's see any reason why it shouldn't be correct (but it depends on what do you exactly want to do)
 
I have a 2D array
where I want to loop through. array is full with Labels.
And I want to pick the current_line (starting at 0) and every label on line 0 be visible
 
what does Refresh method do?
 
nothing xD
 
Avoid using == false/true statements. More pro approach is
if (!l[current_line+1, loop_word].Visible)
 
What is the reason to avoid them?
 
6:05 PM
it is not professional :D
 
@miki +1
 
Hmm okay, But I'm not a professional
far off
a beginner XD
 
but you want to be?
 
Kind of.. It's just for fun
 
Professional or not, it's redundant.
 
6:07 PM
Does working for a company involve working on apps like javafx or c# wpf or is it all about problem solving ?
 
@Donovan because you say "if a loop word in a current_line+1 is not visible do this thing" and not "if a loop word in a current_line+1 being visible is false do this thing"
 
Anyway, I would like to show up the next row of labels only if the previous line TableLayout's background's are all 5 red. Those are in a 2D a
Hmm yeah, that makes sense now.
 
@Donovan If Refresh should redraw labels, you can leave it when loop is over, so it is Refreshed 1 time instead of 5 times
 
So after the loop, Refresh
But the next labels don't show up.
 
Hm, is Refresh method something you wrote or it is method from parent Control?
 
6:14 PM
Uhu
 
Can you paste one line of code, first one where it is class name? (for example "public class A..."
 
public partial class Tiebreak_5 : Form
?
 
Yes, Refresh method is from base class Form, so it should redraw everything on the form...
 
oh lol. So remove it?
 
No, i am confused why (But the next labels don't show up.)
Did you make it like this:
for (int i = 0; i < 5; i++)
{
current_line++;
l[current_line, i].Visible = true;
loop_word = 0;
current_letter = 0;
}
Refresh();
 
6:18 PM
Uhu I do
 else if (!l[current_line+1, loop_word].Visible)
                        {
                            for (int i = 0; i < 5; i++)
                            {
                                current_line++;
                                l[current_line, i].Visible = true;
                                loop_word = 0;
                                current_letter = 0;
                            }

                            Refresh();
                        }
oh lol stupid me. Line 0+1 = 1
and line 1 can't be visible at the start
 
:)
 
Okay fixed that
but next 5 labels aren't showing up.
I made an if else statement before but that was too large in my opinion.
 
If that method is not too big paste it here
the method containing that if/else
 
It's like 5x if current_letter = 0 or 1 or 2.. and so on
then it should show op labels on the next row
like 50 rows of coding.
 
@Donovan use pastebin.com to show miki your code.
 
6:27 PM
jwt jot jwt jot
 
http://pastebin.com/1mAKnxag

I did the same method for row 1, 2, 3, 4 and 5 with the corresponding labels.
I removed them aready in project, because I want to do it in a smaller way
But the problem is I know there is one, but I don't know how.
 
I see only one else branch. Paste whole class, we can check it little bit
 
anyone know anything about decrypting an encrypting SAML token in C#?
 
Yes, I don't create labels and other object programmatically but that is something for version 2
I made some comment's in Dutch ( I am) so if you don't understand it, feel free to ask
 
6:38 PM
What is SendMessage method used in your project for? What are you trying to accomplish?
 
anybody here familiar with RedShift? @CharlieBrown ?
 
I added it to make a borderless form dragable
 
Try to call Refresh method only once, at the end of the "Tiebreak_5_KeyPress" method
 
So under the other refresh under the }? That is the last part
 
One time for complete method call is enough
 
6:49 PM
So one time after the loop is enhouf
g
 
i'm not used to using this chat yet :D accidentaly deleted previous post.
Thing is, in the method you set all appearance settings (Visible for example) and only call Refresh one time
 
But the if else statement does work
but looks too large in my opinion
 
It does the work, but as you say it is too big.
if (a)
Refresh();
else
Refresh();
can be replaced by only 1 Refresh call - it looks much better.
 
So did I something wrong?
 
@Codeman nada, what the heck is it
@tkd_aj yes, its horrible
 
7:03 PM
I didn't refresh at the larger method btw
 
@Donovan Nothing wrong :) , but i was trying to find out why labels are not being shown.
 
Aah okay :D
 
Does it work now?
 
Nope, second row is't showing op
It looks so logical, the code, but it doesn't work at all xD
the labels showing part xd
 
This is definition of programming - you look at 1 very simple line of code, everything looks good but is doesn't work :D
Or even worse, when everything works, but you find a bug and you don't know how it is working properly :D
 
7:10 PM
Uhu that's it that's it! I could use the if else statement untill I get a shorter methode
A method that is working in any case. I hoped that this was a ideal solution :p
 
:)
 
Thank's for the time in any case. If you find something.. I'll receive that
 
no problem, good luck with debugging
 
Hey, I need a suggestion
I have a view model which needs to be entered into the database. Is there a way I can map my view model to my model without mapping each element of the view model to those in the model?
 
Thanks!
Old methode is'nt working? lol
else if (loop_word == 4 && current_line == 0)
                        {
                            l06.Visible = true;
                            l07.Visible = true;
                            l08.Visible = true;
                            l09.Visible = true;
                            l10.Visible = true;

                            current_line++;
                            loop_word = 0;
                            current_letter = 0;
                        }
 
7:42 PM
fixed
I think why the short method was'n't working
is because the if else is continuing
 
@The_Outsider Take a look at Automapper.
 
and it should start with a new if
 
@Donovan Yes, very familiar with those shitty problems :D
 
It displays an error now in the shorter method, so it is seen now
dditional information: Index was outside the bounds of the array.
BINGO!
 
7:59 PM
You can also try for every if/else branch to create separate method and move code there. So at the end code is easier to read, since you have only if/else statements :
if (a)
method1();
else
method2();
 
Uhu yes. I redesigned a bit and the labels are showing up now
Tomorrow a new challange xD
 
:)
 
Thanks again. Bye!
 
War
8:17 PM
having some trouble with a linq to entities query
here's what I'm trying to do ...
public override IQueryable<T> GetAll()
{
    var result = base.GetAll();

    if (typeof(T).GetInterfaces().Contains(typeof(IAmRoleSecured<Role>)))
        result = result.Where(i => ((IAmRoleSecured<Role>)i).Roles.Any(r => User.Roles.Contains(r)));

    return result;
}
anyone got any ideas how I can do this without the cast
base.GetAll() returns an IQueryable<T> (obviously)
 
does T is IAmRoleSecured<Role> work?
oh, that cast
 
War
the problem is the exception I get on this line ...
result.Where(i => ((IAmRoleSecured<Role>)i).Roles.Any(r => User.Roles.Contains(r)));
NotSupportedException
 
erm
result.Cast<IAmRoleSecured<Role>>() would do the job, but you'd still have to do the type check
If you know T is that type, then every element in the sequence is, right
That's a weird one though, not sure what would cause that exception
 
That query looks problematic.
Any(Contains) is bad practice.
Is it possible for you to query this set from the other side of the relation?
 
War
@TomW hmmm ... good shout ... testing
@TravisJ I'm looking for all T's where the current user is in one of T's roles
not sure how I can do that any other way
result = (IQueryable<T>)result.Cast<IAmRoleSecured<Role>>().Where(i => i.Roles.Any(r => User.Roles.Contains(r)));
still didn't work
 
8:26 PM
Why are you casting if you have already ensured that the type is inheriting from your I<Role>?
 
War
I need to return an IQueryable<T> but if T implements IAmRoleSecured<Role> then I add this extra filterto the result set
 
Anyway, you should be able to go from currentUser.Roles.SelectMany(r => r.Ts).Distinct()
 
War
not sure how that helps ?
result = result.Where(i => ((IAmRoleSecured<Role>)i).Roles.Any(r => User.Roles.Contains(r)));
 
That will give you all T's where the current user is in one of T's roles.
 
War
but T only has a roles collection if T implements IAmRoleSecured<Role>
the problem is the cast
 
8:32 PM
Doesn't matter because you are coming from the roles side, which should always have a relation to T.
 
War
no im not
I'm coming from T
 
Are you / were you responding to my suggestion?
 
War
@TravisJ yup ... if you read the code sample above
I have an IQueryable<T> not an IQueryable<Role> related to a IQueryable<T>
 
I read your code, but it still isn't originating from the current user's foreign relation.
 
War
brb
 
War
8:45 PM
@TravisJ no it originates from the T table in the db
So I have a set<T> and I have a user
 
If you cannot query from the foreign relationship of the user, then your query could be very problematic.
 
War
if T has roles then I want to join the two and return the T's where both the user and the T share a role
 
War
9:06 PM
hmmm can't seem to get anything to work :(
might not be able to apply this rule genericly
 
 
1 hour later…
10:21 PM
anyone know of a simple recent mvc5 asp.net chat plugin which I can use for my web application?
 
10:36 PM
@kush Missing Xamarin meetup tonight. Let me know how it goes if you go!
 

« first day (2166 days earlier)      last day (2765 days later) »