« first day (1115 days earlier)      last day (4059 days later) » 

14:00
7.5 hours of motorcycle commute each week here :D
@Tobberoth well, we don't understand them, they don't understand us and we really don't like their politicians...also they're weird.
@RoelvanUden cumulative, right?
I do 8h at once.
@KendallFrey what do you mean at once?
you travel to work, stay there for the week and then travel back?
@KendallFrey Staying at an apartment or something in US, weekend back to Canada?
Like, with one or maybe 2 pit stops.
@SteffenWinkler Yeah
14:01
ahh
I travel back and forth every day
week in US, week in CA, repeat
so 75 minutes of total travel (average) per day
weekends always CA
@SteffenWinkler .5h to work while in US
so one hour per day total commute?
14:03
I walk to work in 5 minutes. Booyah.
but 0 while at home
I walk to work in 1 minute. boobyeah
So basically from your bedroom to your living room?
Is it possible to group by a codition in c# ?
Elaborate.
14:05
I have a data called NF
For each NF I have N items
Each item has a code id called NCM
I want to group by NF
But without separating the NCM..
Fuck, after I explain what I'm trying to do, it always sounds stupid
group by NCM then by NF?
I need a vacation
I can't group by NCM because there are NCM in other NF
but you said you didn't want to separate them
Actually I'd need to group by NCM in each NF
group by NF then NCM?
14:08
Yeah
Exactly
That's exactly what you need then.
What's stopping you?
Lack of knowledge
And rest
99% of stuff I ask here ends up that I have a logic problem
Thanks
Haha I'm so stupid, I was trying to GroupBy().ThenBy() :(
Isn't that what you want?
Isn't this correct? dbResultado.Insumo.GroupBy(g => g.NF).Select(s => s.First()).GroupBy(g => g.NCM).Select(s => s.First()).ToList();
ThenBy is after an OrderBy
14:12
Oh.
Why are you selecting the first item?
My normal data has 50k data
Because GroupBy returns a IGroupable
And I can't group again because I have that interface
I'd need to new myClass so I could group again
Yeah, an IGrouping is just an IEnumerable
At least that is the only way I know
So I can .ToList ?
Sure, but why would you?
Because I can't retrieve the information that I initially had from a IGroupable
14:14
Are you trying to just order the items into groups, rather than actually separating them?
I don't them grouped
I mean..
I need them grouped, I just don't need them separated in different enumerables
Just like a sql group by
Is there any reason you can't use OrderBy?
If it's ordered, items with similar IDs will be grouped together.
Why would I use OrderBy ?
Because you're ordering your data
With an OrderBy ?
I think I'm not explaining very well ;/
14:17
Say you have data 2, 4, 1, 2. You want to order them in groups. If you do an orderby, you get 1, 2, 2, 4. Voila! Grouped.
NF - 1
   NCM - 101 => Quantity 5
   NCM - 102 => Quantity 10
   NCM - 102 => Quantity 12

NF - 2

   NCM - 105 => Quantity 2
   NCM - 105 => Quantity 3
   NCM - 108 => Quantity 8
The outcome I'm trying to have is:
NF - 1

   NCM - 101 => Quantity 5
   NCM - 102 => Quantity 22

NF - 2

   NCM - 105 => Quantity 5
   NCM - 108 => Quantity 8
I can't explain anything :(
You just did
Yeah, after the forth try
And I almost opened paint brush to explain.
I feel retard at times
Is that even possible what I'm trying to do ?
Let me give you the structure of my class
14:22
NFs.Select(NF => NF.GroupBy(NCM => NCM.ID).Select(NCMs => new NCM { ID = NCMs.Key, Quantity = NCMs.Sum(NCM => NCM.Quantity) }))
Think that's it.
Erm, there is a problem with that expression
NF isn't in a list
Look at my class ( ... my class is amazing... (8) )
Where is it then
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ProjetoDrawBack
{
    public class Insumo
    {
        private int _ncm = 0;
        public int NCM
        {
            get
            {
                return _ncm;
            }

            set
            {
                if (_ncm == value) return;
                _ncm = value;
            }

        }

        private string _descricao = string.Empty;
        public string Descricao
        {
That is it
14:24
Morning everyone :)
Afternoon @JLott
Oh, I think I see
if (_descricao == value) { return; }
_descricao = value;

doesn't that consume more processor cycles than it saves?
For me at least ._.
moinmoin @JLott
14:24
Man, I'm not giving much fucks about performance right now...
I'm in so much pressure that I just want to give them a result
also it makes your class longer
This extra hour is treating me right
So you have NCM = { NF: "1", Quantity: 2 }?
@KendallFrey NF 1:N NCM
NCM 1:1 Quantity
Give me some sample data organized in the form it is before the thing we're trying to do.
14:26
Let me get from SQL
ew, no
Just the data that I need to solve the problem
Hold it
000000006	29146100	12980
000000010	28332100	18,45
000000011	28151200	15,317
000000015	39069049	2000
000000015	28332100	20,67
000000016	25221000	27,82
000000017	28151200	15,074
000000018	28151200	18,009
000000019	28151200	19,783
000000019	28151200	15,346
In order, NF => NCM => Quantity
That is the raw data
commas are decimal point?
Yes
SQL is in pt-BR
insumos.GroupBy(insumo => new { insumo.NCM, insumo.NF }).Select(g => new Insumo { NCM = g.Key.NCM, NF = g.Key.NF, Quantity = g.Sum(insumo => insumo.Quantity) })
Excuse my use of English pluralization.
14:33
You wrote everything correctly.
chaching
If this returns wrongly, I'm f*cked
No, you just ask me another question XD
I wonder who decided that "being fucked" was a bad thing.
Probably Johan.
Your code basically will check if my last code is right or wrong
If it is wrong, I'll have to start from scratch
And I don't have the time
You're assuming my code is right
14:36
Yes
If I paste my entire code here, at least 30% here will commit suicide
The other 70% will hunt me down
I'm hammering bananas with shoelaces
Yay for LINQ one-liners
@AndréSilva Wait, what?
@KendallFrey Yep, it is that bad
I didn't get to the point of using goto
But I'm almost there
creating mental picture... DOES NOT COMPUTE
:) F*ck
fasteriskck!
14:43
Is that a word ?
No.
See? F-asterisk-ck. F*ck.
Ah
I thought you were trying to retrieve something like a RegEx..
Anything that starts with F and ends with CK...
Like.. Fudgestick..
Wait, that is still dirty :(
We can swear all we want now, motherfasteriskckers!
@AndréSilva FIRE TRUCK
So let me quote something smart. Shit, piss, fuck, cunt, cocksucker, motherfucker, tits
???
Somebody's gonna flag that
It's even worse than the osama hitler gangbang thing
14:48
anyway, WPF Checkboxes suck
why is there a 'Checked' and a seperate 'Uncheck' event?
Instead of one 'CheckedChange' event
like it's for WindowsForms
I'm speechless at that stupidity
@KendallFrey It is from George Carlin Seven dirty words
I guess it is because different states can make different actions, just so you could organize yourself better
in that case they aren't very consistent
because for a BindingList you've one Event that does all
Instead of if(e.Checked) { CheckedFunction(); } else { UncheckedFunction(); }
14:51
^
Well you do have that, but you have multiple events that can achieve the same short thing you'd need inside the bindinglist
Presumably, you want to do something different if it's checked or unchecked.
that's just stupid.
No, your code is stupid
It isn't stupid. It is Microsoft.
14:51
no, your code is stupid
@AndréSilva that's the same
You don't know what my code looks like.
@KendallFrey I don't care :p
I LOVE IT
I crashed my car into the bridge...
14:52
ffs @KendallFrey you made me sing that
And now the gif is going through my head
gif?
There's a gif for that?
link pls
Googling
@KendallFrey cdn.makeagif.com/media/9-10-2013/OSqzxc.gif
I couldn't find the exact one so, use your imagination :(
And youtube is blocked here
well it's a car crashing into a bridge
14:56
I don't care.
At least I can link it
@SteffenWinkler Yeah, Kendall was supposed to say "I love it"
He failed.
...
just had to explain to my colleague why I laughed ~.~
"So.. there is this car. And it hit a bridge at 100mph. So funny."
everyone backing away
no, earlier
14:58
Oh ._.
about the song stuck in your head
What did you laugh about ?
Ahh
and @KendallFrey's 'I LOVE IT'
that was so friggin' random
14:59
No it wasn't.
I want to see Trans Siberian Orchestra again
So good.
Me too.
Never saw them tho
fml
gonna go crash my car
So smooth.
throw my shit into a bag
jump down the stairs
15:01
ahahaha JK
Are you sure you're kidding?
@KendallFrey I saw them a few years ago. It was an amazing show.
ARE YOU?
@KendallFrey
@KendallFrey you'd make for a good Cueball :p (sometimes) (no offense) (credits to Mr. Munroe)
Can't see xkcd
15:03
???
kidding me?
no
iz blok
Those are fine
hah! Beat your Blacklist
BTW, I never text IRL
15:05
I asked this last night, but I will again...
Favorite Visual Studio Tips and Tricks... GO!
Ctrl+M, Ctrl+O
CTRL+E+D formats your source code makes your code pretty
^
Ctrl+Shift+V
@KendallFrey Say what they do. I don't know these...
@KendallFrey how do I revert that? :(
15:07
Ctrl+M, O is collapse to definitions
:D
@SteffenWinkler That did nothing for me ._.
Ctrl+Shift+V is ring paste. Press it again to access older items from the clipboard
@AndréSilva Try Ctrl+K, D
Oh yeah that works..
I always used K D
15:08
what's the diff?
Brb, grabbing something to eat
@SteffenWinkler idk
@JLott also .NET Demon, it compiles your project when you save
About the texts, I sent my last text almost 2 weeks ago.
CTRL + O keeps doing Open File lol
15:09
You need Ctrl+M before it
I figured that out
@KendallFrey how do I open all definitions again?
Uh...
I never needed to
Ctrl+M, P
15:10
@KendallFrey ah, thanks
This is awesome...
The best visual studio tip is to get the VsVim extension
@JLott also Target Framework Migrator. It let's you change the .NET Framework version for multiple projects at once. I need it for a few projects because of .NET 4 / .NET 4.5 incompability
That is pretty legit @SteffenWinkler
@Tobberoth Elaborate
@JLott: It basically makes the VS text editor into vim
15:12
Is it a style?
@Tobberoth @JLott that only helps if you know vim, which is a very big tool on Linuxoid systems
Or does it include all the shortcuts too
Yeah I do not know vim lol
It's shortcuts, but its more than that. It allows : commands etc
@JLott also 'Indent Guides' it's an extension that adds dotted lines to VS, so you can easily see which { belongs to which }
15:14
You have to be pretty advanced in vim to find stuff missing from vsVim
Nifty
@JLott - Find all references / Go to definition are my favorite tools in VS. Kind of basic I guess.
@TravisJ same here
I like that you can use ctrl-f find to replace a word across the entire project though
@JLott oh, also if you use ctrl+shift+f the 'Search and Replace' box opens, which allows you to not just search one occurence of a string after another, but let it find all occurences of a string and print all of them into a search result window. You can then double-click the results and it takes you exactly where that specific occurence was found
15:21
regex search is epic
that, too.
I like using the <summary> xml tags when I get more than 5 classes in a .cs file
@Steve Mentioned CTRL + . the other day
oh, right, just enter /// above a function, procedure or class and it generates a full XML comment header
1 CLASS PER FILE
4 LIFE
15:22
@TravisJ I hate you
It is nice to be able to hover over the class to see the definition instead of having to go there all the time (although in vs2013 they added an extension that will preview for you)
@TravisJ That is actually my favorite lol
@Kendall - Are you forced to write summary every time?
@JLott :D
@TravisJ We're supposed to, but that's not the issue here.
lol
I guess I missed the memo then
15:24
Most of these girls have barely used VS so I am looking for the basic tricks
Nothing too crazy
Stuff like Ctrl+S?
Lol. Maybe a little more than that
CTRL+X when no text is selected to cut a line?
15:26
@TravisJ You see my DAP? Up $.44 today (35%)
@JLott - I like auto hiding all the side windows(tabs) so my code is all that I see unless I open a tab.
@Ryan - Scary as shit.
Sorry, up 66 cents, 50%
baby is rising!
haha that twin peaks pattern there has a tendency to go from N to M
/\/ ... -> ... /\/\
Yea, i hate it when it does this though. $1.95 to buy it, $1.40 to sell it. :\
I kind of pulled this topic to talk about out of my ass. Hopefully no ones mind is too blown.
15:29
@Ryan - Low volume is rough
Yes, let's talk about your ass. Oh, what?
@JLott There is an application for Windows Phone with tons of neat shortcut tips and tricks.
@JLott set the cursor onto a class/method and press F1 do open the MSDN page
also @KendallFrey and @TravisJ with XML comments: If you've an assembly A.dll and reference that in your project B.exe and want to see the comments, go into the project setting page of A.dll, go to 'Build' scroll down to 'Output' and check 'XML-Documentationfile'. Put that file in the same directory from where you reference A.dll in B.exe. Done.
@SteffenWinkler Nice! That is helpful
@JLott that together with the MSDN us what makes VS superior to all other IDEs
at least in my book
us = is
15:37
I agree..
How do I convert an IEnumerable to a List<object>?
IEnumerable<T>.ToList()
.ToList()
IEnumerable, not IEnumerable<object>
@KendallFrey .Cast<object>().ToList()_
15:39
datasource.Cast<object>().ToList();
Well, that makes 3 of us with that solution
Yes.
But, as it turns out, I might as well leave it as IEnumerable, because List won't offer any performance benefit.
With obvious reason.
But IEnumerable doesn't have Contains dammit
15:41
ICollection
nvm
not present either =/
can someone explain to me like I am 5 the difference between IEnumerable and IQueryble ?
The Project, Window, and Control areas have some nice shortcuts.
IQueryable takes expression trees rather than functions as parameters, allowing implementers of IQueryable to transform the trees into, for example, SQL queries.
@Greg Thanks that is really helpful
15:44
@AmmarAhmed The IQueryable interface is intended for implementation by query providers. It is only supposed to be implemented by providers that also implement IQueryable<T>. If the provider does not also implement IQueryable<T>, the standard query operators cannot be used on the provider's data source.

The IQueryable interface inherits the IEnumerable interface so that if it represents a query, the results of that query can be enumerated. Enumeration causes the expression tree associated with an IQueryable object to be executed. The definition of "executing an expression tree" is specific
@Ammar - IQueryable usually indicates a live connection to a database. IEnumerable is just a more efficient structure of an array.
@ton.yeung Just fine today :)
IEnumerable is less efficient than an array
Except for forward-only streaming data
@Greg thanks
@TravisJ thanks
15:46
@AmmarAhmed Honestly, I got it straight from MSDN.
@Greg that site is awesome
@SteffenWinkler Fo Sho
The MSDN? What is it used for?
@Greg I only been using IEnumerable so far
lol
@TravisJ Wha.
15:48
@TravisJ you don't know what the MSDN is?
MSDN can be bad for some libraries. I had a hard time using it with the kinect SDK
I tend to just scroll to the examples
@SteffenWinkler It can be, some have typos or use weird wording which makes understanding difficult.
@Greg uhm...I meant the Shortcuts page you linked
I mean the MSDN is cool, too. But I really meant the VS Shortcuts page @Greg linked previously. I was some time afk, sorry.
@JLott - And the dropdowns at the top of the code file that allow you to navigate classes and methods. Those are win
15:53
@SteffenWinkler Yeah, that shortcut page is pretty neat. I have a printed copy on my desk; quite useful.
@TravisJ @JLott I like CodeMaid more. It's an extension and it's awesome.
@TravisJ You mean where the tabs are?
I use Snoop I believe it is called
@JLott - Yeah, just below the tabs
Yes yes
Can someone help me understand why I'm getting an error from this string definition in a class?

public string Path
{
get
{
return Path;
}
set
{
if (value != this.Path)
{
this.Path = value;
NotifyPropertyChanged("Path");
}
}
}
15:57
@Nathvi Because the property calls itself infinitely
You need a field
that took me surprisingly long to see...
That took me surprisingly long to type.
I think I typed "problerty" at one point
I don't care
15:58
... ;)
every once in a while I challenge the internet. I tend to search for [songname]-dubstep and see if the songs exist. I found out that the same works for deep-fried-[food]. Ladys and gentleman.. I introduce to you ... DEEP FRIED SUSHI
oh come on now. You did it earlier ;) @KendallFrey
sorry for being off topic
@SteffenWinkler teehee
I have had deep fried sushi though...
15:59
@TravisJ was it good?
I want deep fried butter
Yes. It had lobster in it.
@KendallFrey 'MURRICA
LOBSTA
NOM NOM
It is a common preparation
15:59
I did not know. I gotta try it next time I go for sushi

« first day (1115 days earlier)      last day (4059 days later) »