« first day (1476 days earlier)      last day (3475 days later) » 

5:03 PM
How much faster is a switch than an if? At what point does the if become slower than a switch?
 
else if's
 
@Greg When you're switching on an integral value (int, long, enum, etc.)
 
i've been getting menu options stuck at the topmost level after i click them... anyone have that before
the only way to get rid of them is to switch user and log back in
 
@KendallFrey So I did this, rather than write fifteen different if.
        switch(acct.SearchOption)
        {
            default:
                rdoSearchResult.SelectedIndex = rdoSearchResult.Items.IndexOf(rdoSearchResult.Items.FindByValue(acct.SearchOption.ToString()));
                break;
        }
 
@Steve its friday....
 
5:18 PM
HAPPY FRIDAY, BITCHES!
4
busy busy day
 
no
5 hours ago, by JLott
HAPPY HALLOWEEN EVERYONE!!!!
 
ohhhh shit
wheres that diagram you had of the angular learning curve, @KendallFrey
btw, wow 20k, you need to get off of SO
 
lip quiver
user image
2
also this
user image
5
 
lol
so many things about angular make me angry, but thinking back, it would have taken me at least 10x as long developing this shit in straight js or jquery
why do all the books tell me I can allow parent scopes properties into an isolated scope by doing scope: {somename : "=" }, when i have tried for hours and that shit no work?
 
@Steve are you passing the properties using attributes? Like <div somename="parentvariable">
 
5:25 PM
yup
for some of them i was
turns out i didn't need to do that, i could just do scope: true, but nevertheless, if i did want to do a completely isolated scope and pass in properties from parent scope, it didn't work
 
If I took a picture with my phone is there a way for it to know the square inches? Maybe based on pixels?
 
@KendallFrey So I figured out how to do it... using sub queries. however I now have another issue, could you take a gander at it?
0
Q: An item with the same key has already been added - SQL Server 2012 Subquery Issue

QuestionQuestionI am writing code within SQL server 2012 to transfer into the query designer of Report Builder 3.0. My code works perfect within Management studio, and it works within the actualy query designer, but once I press Okay within the query designer, it throws me the error: "Could not update a list o...

 
Like If I wanted to take measurements by taking a photo with a phone and having it do all the work
 
@Tokencodingnewbie what do you wanna measure?
 
I was thinking a flower bed, then I could know how much mulch to put in it lol.
Like take the picture and draw the outline with the photo.
 
5:33 PM
@ton.yeung whoo
 
@Tokencodingnewbie i think you need a lot more info like distance between object and phone to make any good measurements
 
I'm still beating the Dow. I'm even with S&P and NASDAQ is just destroying me
 
My stocks keep going down.
I figure I'll just hang myself eventually.
I don't really know what I'm doing I just kind of bought something to see how I did.
Only spent 200 bucks.
Yeah
 
do you guys like my costume?
"the laziest viking"
I am Swedish, so it makes sense.
@ton.yeung according to your mom, you're a terrible son. BOOM
thankfully my feet don't get particularly smelly
 
@Pheonixblade9 Swedish?
 
5:43 PM
I'm an Italian, what does that mean for me?
 
@Greg you need more olive oil and pasta and wine
and less hamburgers, steaks, red meat
 
@Pheonixblade9 Fuck that, I'm a carnivore!
 
I'm a pastavore
Italian food is best food
 
I just eat tons of fish and vegetables
 
It took me 20 minutes to find a pencil in this office.
hi
 
5:46 PM
@KyleTrauberman What's a pencil?
 
the sent me to to the storage room
where there were none
we have tons of pens
in various colors
creative had crayons
yes, especially for the kindergarten-ish wireframes I'm drawing
 
There's no reason for a software office to have any writing utensil other than whiteboard markers.
 
agreed
but whiteboards don't scan into an SOW very well
 
I bring my own pencils/pens. The ones they give us are shit.
 
There's a trick to capturing whiteboards into clean photos
subtract an identical photo of the empty whiteboard from the photo of the diagram, and smudges disappear
 
5:52 PM
those are my pens
hand made :)
 
I love penisland!
3
 

C#

General discussions about the c# language, Squirrels | gist.gi...
 
if that doesn't get starred, there's something wrong with you guys
 
FINE
 
5:54 PM
lol
 
we'll see that for two weeks
 
@ton.yeung I know they're meat. But I need beef, pig, chicken, and countless other animals.
 
pig meat is best meat
BAAAACUUUUUHN
 
  wow
much trichinosis
 
kid probs has ebola now
 
5:58 PM
At least she won't be getting ebola from that
@CharlieBrown YOU CANT GET EBOLA FROM PIGS
 
it's called swine flu, not ebola
 
@ton.yeung yeah my grandpa made them
 
i almost got ebola from the subway the other day. escaped with my life
 
we had a keyboard that you could record tunes on
 
@ton.yeung I usually get fresh Salmon once a week, Shrimp / Scallops.
 
6:16 PM
from a truck in the walmart parking lot.
 
I guys I need help with log4net. I've created a log4net library on my solution so it can be used by all projects on the solution. But when running the program the log file does not get created.
 
@ton.yeung Yeah, we have alot of really good Seafood in our area.
@ton.yeung I get fresh Salmon, caught and shipped in under twenty four hours.
 
I have the log4net configuration on my App.config on my main console project
 
If anyone has any experience with Entity Framework I would love to bother someone with a question regarding saving some child entities. I can send an EF model with children fully populated and everything is created successfully but when it comes to updating that same entry none of my child objects seem to get inserted.
 
and on main console project, on AssemblyInfo.cs I have this line: [assembly: log4net.Config.XmlConfigurator(Watch = true)]
 
6:20 PM
@jhartzell shoot
@jhartzell before saving, you need to first get the entire object graph, parent and children... then make your changes and call save
 
Alright I think that's the part I'm failing to understand. I've tried reading several SO articles on using Attach to accomplish this but I'm a bit confused in my scenario
public async Task<bool> CreateClips(List<VideoTaskClip> clips)
        {
            foreach (VideoTaskClip clip in clips)
            {
                if (clip.VideoTaskId < 1)
                {
                    clip.VideoTaskId = VideoTask.VideoTaskId;
                }

                _ctx.VideoTaskClips.AddOrUpdate(clip);
            }

            int result = await _ctx.SaveChangesAsync();

            return result > 0;
        }
(sorry to spam chat with that)
 
press up arrow and then ctrl-k to format that
kool
your code is close
 
Each clip has an enumerable of attachments as well
I just need to get that collection attached to the object graph as you say?
 
your adding objects manually whicih Ef doesnt like (but you CAN do if you want)
 
@CharlieBrown what I dont get is how it appears to woprk fine and then throws that stack overflow. and it turns out, if I comment out @for (int i = 0; i < Model.Count; i++){} in my View, I dont get the overflow. Also there are no circular references in the model im passing back. Take a look: pastie.org/private/a7zpxws1kipjyqqeoknew
 
6:24 PM
@jhartzell you got 2 approaches, do it the ef way, or continue down your path and use attach
 
Im using my very own viewmodels. and mapping them to the DAO by hand in my select statement
 
I'd like to do it the EF way if possible, just not quite sure how to accomplish that direction
 
the ef way is load the parent and its children. then call Parent.Children.Add(new child()) for each new child. then call AddOrupdate on the Parent
@VictorioBerra checking
 
Ahhh, would this be accomplished with Load() ?
 
@CharlieBrown thank you. Heres the view if you need it pastie.org/private/xdqkm4gmifjkmdx7celw
 
6:26 PM
@jhartzell Just the normal way you get the parent. like DbContext.Parents.Get(id).Include(x => x.Children)
 
Aha!! Awesome, I will investigate this, thank you!
 
@VictorioBerra what is line 1 doing in pastie.org/private/a7zpxws1kipjyqqeoknew
 
@CharlieBrown tieing back to the users table to grab the users full name. full action here pastie.org/private/madsjtse5hdmudfr8eztmq
 
user1804599
> Do you?
 
user1804599
No.
 
6:30 PM
@VictorioBerra is viewmodel a List<T>?
 
let me look
 
T4 issue. My T4 isn't running on build in the changes I unshelved, I suspect TFS may be involved. Anyone ever experienced this?
 
@CharlieBrown its a List<UserRoleViewModel>
 
@VictorioBerra i think i see the issue
as a test, change this line
GroupName = usr.group.GroupName
to
GroupName = "unicorns"
and rerun it
 
Okay standby, got roped into AutoMapper crap
 
6:46 PM
@CharlieBrown Thank you sir! I have a better understanding now and was able to get it working!
 
@jhartzell cool beans
 
Its funny how small things like this can waste so much time /sigh
 
yeah, ive been doing ef since version 1 and dumb things still mess me up
 
Yea it has a learning curve unlike a lot of stuff I've learned in the past, it's quite steep
 
@CharlieBrown didnt work, I even commented that whole map out pastie.org/private/madsjtse5hdmudfr8eztmq#21-25
 
6:51 PM
Now I need to understand how to do things a little more the EF way than traditional approaches with micro ORMs
 
@CharlieBrown I get this massive stack trace a few seconds after the page loads. My data is on the page, everything looks fine. Then suddenly this happens imgur.com/Q4BEX1V
 
once you do full ef, its a very smooth dev experience, especially code first, but ORMs are complex machines behind the scenes
 
UNLESS I comment out the Razor for loop that spits out the <tr> data
 
try commenting out just whats in the loop
 
@CharlieBrown No crash
 
6:55 PM
@CharlieBrown It has been a very pleasant experience so far aside from trying to understand the fluent api mappings for code-first, that was quite hectic but I'm grasping them more everyday. I do have to say it has the ability to really increase productivity on new projects for sure!
 
yeah, i generally wont use the fluent mappings unless im supporting an older db. i prefer attributes or convents instead
@VictorioBerra i guess add one razor statement back at a time until blammo
lol, convents... conventions
 
I followed ya ;)
So let me ask you this real quickly since you answered the other question so quick and precisely. Since this is an update method it has the ability to remove items to reflect with the model coming in, do you know a quick way of identifying elements that aren't in the model any longer against what is in the database and quickly removing them? I've found myself deleting every clip and readding based on what the model passed in contains
 
@CharlieBrown I did that and check this crap out. This crashes: pastie.org/private/ke4bd3x5mgvcm7dgofpq while this doesnt pastie.org/private/gm0gk1vkua8dlgct3q
The only difference in this case, is instead of commenting out the individual items, I commented out all the TDs as one block
 
syntax error in one
 
Where???
 
7:01 PM
@*@
 
@CharlieBrown thats just how you do a comment in Razor
 
@jhartzell there is none, deleting is painful sometimes
 
@* my comment, will not compile out to HTML page *@
 
@VictorioBerra yep, but @*@ will error out the two ats get angry at each other
 
Alrighty, I figured so as I've had headaches with it on this project already haha
 
7:05 PM
@CharlieBrown You should be able to use @*@Hello world@@@@@*@ I dont see why you cant do that. Anyways, I removed the first @ in each one and I still get a crash: pastie.org/private/ow1eoyqxihp7mwmjfpwajw
 
so the enumeration itself is causing the crash, and when you have no html in the brakcets, it doesnt enumerate....
this collection is not huge right?
 
@CharlieBrown to be thorough, I even deleted them entirely: still crashes.
 
ok, not bad
 
188 records return to the page
@CharlieBrown this is what my page looks like moments before the crash i.imgur.com/50pEssN.png and this is the code pastie.org/private/hu8ppymdxdw0zgphhwg
 
if you breakpoint line 33, and quickwatch viewmodel, does it expand the collection in your debugger?
 
7:09 PM
@CharlieBrown but like I said, if I ditch the <td> elements, everything works
omg....
Charlie
I never close the <td>
CHARLIE I NEVER CLOSE THE TD
 
still would be an odd error
 
lemme test it
Closed the </td>, no more crash
 
ha nice
 
question: do resource files hold order? e.g. I put US at the top of the country list, it doesn't show at the top when viewing the resource file as a designer, when I use the data, will it be ordered the same as the xml? I could check but it might pull me in the wrong direction for a few hours and if anybody knows off of the top of their head i'll love you until the end of time, plus 1 hour. no more. don't be greedy.
 
@Steve Why does ordering matter?
 
7:12 PM
an interesting question
 
Because of drugs, the order of consumption may vary the result.
 
even if it did, i wouldnt trust it unless the api guarantees order
 
@KendallFrey localization, i'd like the de-DE locale to have the german name first
 
huh
Are you talking about .NET embedded resources?
 
7:21 PM
 
nvm
 
0
A: Searching for and displaying sql database data C#

GregThe proper way to read data out of your database into your console application would be: /* This approach will allow for parameters, avoiding Sql Injection. It also shows the 'TOP' for result, to limit the data your pulling. The larger the table, the slower the application. (Just example...

 
7:36 PM
@Greg get rid of the word 'proper'
 
@CharlieBrown Sorry to keep pestering! I often run into an issue where one of my entities is trying to make an insert on a table I don't want it to try to insert too which causes a foreign key constraint insert error. Is this an issue in my mapping?
 
off hand, possibly
hard to tell without seeing all the code on that one
 
@KendallFrey my current solution runs on azure, and it doesn't have a list of country names (e.g. doesn't have access to our on premises dbs). That list also needs to be localized, so I created a resx file for the locales, and put certain countries at the top of the xml, so, if they're in a german locale, I put the translated "german" up top. My question is: before I dig deep into this, does the order that I put the xml in the resx file persist? Because when I view it in the designer,
its def. in alphabetical order by key, and not in order by xml. So before I wasted a couple hours implementing this crap that might not even do what I want, I wanted to see if anybody else was familiar with it
 
sir knows a lot
 
@Steve I don't understand, as far as I know, resources are a dictionary, not a list. There's no concept of ordering.
 
7:49 PM
hey kendall...
it was literally a 2 second solution
TWO SECKOND
 
well, good I guess
 
@KendallFrey well it has to be in SOME order
 
This may be stupid, but if I have a td element, that is the parent of the child. How can I anchor to it with jQuery?
 
I thought you were the god of coding
 
@Steve no it doesn't
Can you even enumerate resources?
 
7:51 PM
like in the name of the father, the son, and the holy kendall frey
 
@QuestionQuestion you might want to rethink the strategy of being a sarcastic shit to room regulars that help a lot of people
 
@QuestionQuestion I am merely a minion
 
Kratos kendall frey
yeah I used to be a regular
until I was banned for a few months lol
sir knows a lot ;)
 
Anyone>?
 
I was, and still am, a sarcastic shit to room regulars
 
7:52 PM
@QuestionQuestion Really? Do I know you?
 
yeah
from last year
 
Unless you've created a new account, I doubt that because I've been in this room for 3 years.
 
@KendallFrey yes, we're doing it
 
@QuestionQuestion What did you say! You are sarcastic and rude! You must be banned immediately. Joking, don't care- Well happy to have you back.
 
which is why i'm claiming that they have to be in SOME order, even if its random
 
7:53 PM
LOL Jlott got be banned
 
I don't recognize your name...
 
SIR_KNOWS_A_LOT
from last september
 
@QuestionQuestion How did she get you banned?
 
me and johann
from sql
I had to change my name
 
@QuestionQuestion oh
 
7:53 PM
but still original acc
 
Anyone on that Javascript.
 
well it was a slow rainy day and I wanted to troll
sums it up nicely
 
trolls aren't welcome here
 
im an ex troll
I help people like you become morer aware of trolls
 
being chatty and amusing is fine... doing nothing but trolling isn't
 
7:54 PM
it technically is fine
but I mean according to whomever is doing the receiving of said trolling..
kendall muted me for good
 
I was that good
 
Etiquette
Be on topic
Be nice, show class
 
i do show class
public class Dog{
String breed;
int age;
String color;

void barking(){
}
}
see
me showing class
 
Is there a better way then to do this:
  var tablinks = document.getElementById('tabs').getElementsByTagName('a');
  for (var i = 0, j = tablinks.length; i < j; i++) {
    tablinks[i].onclick = doit;
  }
 
7:56 PM
@QuestionQuestion at least format that correctly
 
donkey
j
 
dto between dal and repo, dto between repo and service, dto between service and app... who the F thinks this stuf up?
 
kendall do you remember me
 
7:58 PM
I try not to
 
if the code you are writing is difficult, your doing it wrong*
exceptions being complex scientific craziness or whatever kendall is working on this week
 

« first day (1476 days earlier)      last day (3475 days later) »