« first day (1381 days earlier)      last day (3559 days later) » 

4:20 AM
Im using VS2013 with EF 6.1 and I m new in ASP.NET MVC. Recently i have created a simple example with some models from asp.net/mvc official tutorial site. in that tutorial the Entity Student is having property ID. EF takes this property as a primary key. but, there is no data-annotation attribute is defined i.e [Key]. Then how EF determines that which property should be taken as a primary key property? pastebin.com/L7tBHbm6
 
 
2 hours later…
6:49 AM
whats wrong? byte[]image = ((byte[,])obj)[i];
"Wrong number of indices inside []; expected 2"
 
7:47 AM
@GLeBaTi, a multidimensional array byte[,] should have both indices specified when accessed, for your purpose try using jagged array byte[][].
 
 
3 hours later…
11:14 AM
good morning all
 
 
1 hour later…
 
2 hours later…
1:57 PM
@JohanLarsson Lol nice. How did that even work? Does .NET foreach infer using those methods?
 
Looks like it, not interested enough to understand it. Just shared as useless :)
 
anyone familiar with TFS and VS? I am trying to make a query to only show me resolved work items that have not been associated with a change set. any clue?
figured it out. I can add a 'History does not contain "ChangeSet"' clause
 
2:17 PM
@NETscape That's a nice one :-)
 
@JohanLarsson what?
remove the if statement and you get an exception
 
no exception here, goes on forewer though
 
scroll all the way down
Run-time exception (line 10): Code output limit was exceeded

Stack Trace:

[DotNetFiddle.Infrastructure.LimitExceededException: Code output limit was exceeded]
  at Program.Main(): line 10
aka would eventually turn into an exception
 
yeah, makes sense for fiddle to have a limitation
 
or an infinity loop...
 
2:25 PM
it is an infinity loop without the if
 
so wheres the trivia?
 
there is no : IEnumerable or : IEnumerator
compiler infers it from method names
 
2:43 PM
^ That. It's quite cool to see that foreach really just uses those names. :)
Even the class names aren't necessary at all.
 
Does anybody know when to use string vs stringbuilder?
 
When you concatenate many things stringbuilder produces less garbage
 
I know stringbuilder actually changes the object, rather than abandoning it like string does when changing
 
var s = "a" + "b" + "c" + "d"; // Will produce a bunch of temp strings
string.Concat(...) is an alternative there or stringbuilder
Stringbuilder can also produce nice code ime
 
Usually, in terms of performance, it doesn't matter (much). Regular strings are faster when in small numbers (< 1000 concats), while SB is faster at higher number of concats. Rest is preference.
 
2:56 PM
Hello there
I am working n facebook api but can't find option to set redirect_uri
Can anybody please tell me where i can get this?
 
@RoelvanUden over time it can matter I think, creating the strings is cheap but GCing them is probably more expensive.
 
is there any alternative to Entity Frame work, that works on .net 3.5 (VS 2008) and provides Code First working approach
 
Maybe nHibernate? (Just guessing here: I'd say probably not otherwise)
 
No idea if nhibernate does code first,could be worth googling.
@RoelvanUden Would be nice if there was a way to do this in ones own code
 
hmm, any way of knowing w/o testing ?
 
3:05 PM
ask on SO?
 
Alternative to EF is a bit broad, perhaps.
Depending on your needs, you may even like a simple XML flat db :P
 
But add code first and 3.5 and it is pretty answerable
 
Depends. Does he need a SQL back-end, or not? Details like that matter :D
 
Upgrading to 4.5 is probably an alternative to consider.
 
yes, i do need sql backend
well, i cannot upgrade
that is the issue
i can compromise on code first though
and use database first approach
 
3:48 PM
Morning everyone.
 
FWIW, NHibernate provides a fluent API almost identical to EF CodeFirst. It's very mature.
good afternoon Greg :)
 
@Squiggle How is everyone>
@ton.yeung He moved to Amazon?
 
Alright everyone... I need help
 
@JLott ?
 
Our application requires us to run as admin the first time, but anytime after that you can run it just normally.. Why is this?
 
3:53 PM
are you writing to the registry or something on startup? creating files in nonlocal directories?
 
We are reading from the registry
But why would you just have to run as admin the first time.. we don't want to have to do that at all... the user set for the logon of the service is an admin
And if I restart the service, we have to run it as admin for the first time again
 
not sure how the "run as admin" is persisted. the first time you enter credentials does windows remember? meh idk. might be a UAC setting set to strict or something.
 
I know this is like an extremely small amount of information lol
UAC is off
 
no idea then. does your config file require to run as admin?
 
@JLott Your trying to run as Admin?
@JLott When do you need it by?
 
3:59 PM
I do not want to have to make the program elevated. Which is the case right now. @NETscape Honestly not sure. This issue is kind of blowing our minds.
 
@JLott The registry requires Administrator permissions, I believe by default the UAC would force it.
@JLott Then use Impersonation. You can elevate yourself, then when your done you can downgrade.
 
The user that is accessing it is a admin. And UAC is turned off... which we would rather not have either...
The service would restart every morning as well so we couldn't just run it as admin once on setup and be done.
 
@JLott Doesn't matter, in Windows 7 Microsoft made a chance to separate Software as Admin and user.
@JLott Write the area where you read the registry to impersonate the admin before it does, then downgrade it after you read the registry. Then you'll only use it where needed.
@JLott That is what I did in one of my applications.
 
Yeah... I think we are trying to not do that. We thought at first that might have been what was messing it up.
 
4:18 PM
@JLott That is safer then running your application as Administrator always.
 
4:30 PM
I want to know why it is a problem though haha
 
5:05 PM
G'day everyone
where would be a proper place to ask about best practices for stored procedures regarding number of parameters etc,
 
@JLott Why what is a problem?
 
@Greg That we are having to run the application as administrator and the user having admin rights not being enough to get past that
 
hello you crazy bastards
 
:D
 
@JLott I came into your question late, what exactly is the issue? You mentioned the registry, with User Access Control enabled then it will require Administrator. The reason is because Windows 7 separated elevated permissions between the user / software. They did this for additional security. Here is an article: technet.microsoft.com/en-us/library/dd446675(WS.10).aspx
"Before the introduction of User Account Control (UAC), when a user was logged on as an administrator, that user was automatically granted full access to all system resources. While running as an administrator enabled a user to install legitimate software, the user could also unintentionally or intentionally install a malicious program. A malicious program installed by an administrator can fully compromise the computer and affect all users.
With the introduction of UAC, the access control model changed to help mitigate the impact of a malicious program. When a user attempts to start an admi
@Pheonixblade9 You took a job at Amazon?
 
5:15 PM
@Greg god no, where did you get that idea?
the stock didn't dip that much. :P
 
Oh, you purchased some stock.
@JLott Does that make sense?
 
@ton.yeung yeah I'm fine. It'll come back. I'm long on all my stocks
 
@Greg The user we set up to run the service has admin privileges, but when running the app we get a encryption failure because it seems like it cannot get the registry keys. The fix is to run the actual application as admin. Since UAC is turned off, there is no messagebox that pops up.
 
@JLott But because he is an Administrator he won't be able to simply have Admin rights to the software, the software will trigger the User Access Control so the Administrator can apply their token.
 
@ton.yeung my CVX and MSFT investments more than make up for AMZN losses :) and it'll bounce back. it always does
just means I'm slightly behind the market instead of beating it for awhile
 
5:19 PM
@JLott Well, if you don't want to use Impersonation. Then you could right-click your application and force it to run as an Administrator. That isn't ideal, as it creates security risk though.
@Pheonixblade9 Oh.
 
5:39 PM
@ton.yeung were you deep AMZN?
hahaha nah
I was in North Carolina Tuesday - Sunday
it was actually pretty nice there
very hot and humid
but it wasn't so bad up in the mountains
yeah, a couple times
good luck!
yeah the wedding was at the biltmore, it was crazy nice
 
@ton.yeung Cave Springs: 79.3219F (26.29C, 299.44K), Sky is Clear
 
!!weather asheville, north carolina
 
@Pheonixblade9 Asheville: 75.6499F (24.25C, 297.4K), Sky is Clear
@ton.yeung Houston: 90.8419F (32.69C, 305.84K), Sky is Clear
 
!!weather seattle, wa
 
@Pheonixblade9 Seattle: 70.4839F (21.3799C, 294.53K), Sky is Clear
 
5:53 PM
it's going to be such a nice week
:(
57% humidity here atm, so not great
!!wiki biltmore estate
 
Biltmore Estate is a large mansionAsheville, North Carolina. Biltmore House, the main house on the estate, is a Châteauesque-styled mansion constructed by George Washington Vanderbilt II and is the largest privately owned house in the United States, at 178,926 square feet (16,622.8 m2) of floor space (135,280 square feet (12,568 m2) of living area) and featuring 250 rooms. Still owned by one of Vanderbilt's descendants, it stands today as one of the most prominent remaining examples of the Gilded Age, and of significant gardens in the jardin à la française and English Landscape garden styles in...
 
Ugggh I am freaking
So apparently the underwriter says that the appraiser needs to find two log cabins to compare to.. WTF. Those are not that common of a house that is going to be on the market.
 
@JLott that's always a problem when buying unique properties - and a pain, too
you can often argue, though - and show other types of properties, and their relative values in other regions
 
6:10 PM
@ReedCopsey That is what we did.. we already had an appraisal done...
@ton.yeung Aug 13 is when it expires... Expected was the first
The seller is real nice and the underwriter/bank was in charge of the appraisal.. You think they would have freaking thought of it before.
 
problem is typically that the underwriters aren't local - so they're only brought in at the very end :(
 
^ right... I spent $375 on an appraisal that cannot be use
d
@ton.yeung No I paid $375 on the banks appraisal...
That was the one they did... I was charged that for it.
That is why I am even more pissed about it
 
@JLott is it a small bank?
 
BB&T
 
I have a stupid question, if I have a string that has a true false value. If I do Convert.ToBoolean will it automatically test it to true false or will it just tell me it is a boolean?
 
6:23 PM
can you use a bool instead?
 
@Greg it'll convert it to true/false
 
@NETscape It is a query string.
 
or throw if neither
 
@ReedCopsey So, it will tell me if it is a valid bool expression.
 
it'll throw if it's not
if you need to test, use bool.TryParse
that'll return true if it succeeds, and put the output into the out param
 
6:28 PM
Was hoping to condense a bit, to if(type == true) { // modify person type } sort of thing.
 
in C# 6, you can - in 5, it ends up
bool value; if (bool.TryParse(str, out value)) { // modify...
in C# 6 you'll be able to just do if (bool.TryParse(str, out bool value)) { // modify...
but not today :(
 
@ton.yeung I think I would have the right to be mean if they did that.
 
@ReedCopsey Bummer, well the other issue is I can't do this:

bool type;
bool.TryParse(Request.QueryString[@"Type"], type);

It will actually throw an error, which means I'd have to basically redundantly do the same thing. Duplicate values.
 
duplicates values for what?
 
Well, I would have to do this:

bool value;
var type = Request.QueryString[@"Type"];
bool.TryParse(type, value);
 
6:45 PM
@ton.yeung Saw your message about using the registry and it has something to do with our new cloud stuff
It has made my life much more difficult
@ton.yeung Wasn't my idea lol
 
I avoid it if possible
typically only mess with the registry for third party support
 
@ton.yeung I don't like to talk about it...
 
7:14 PM
@ReedCopsey I thought Microsoft tried to prevent Registry access unless required? They tried to make it more difficult to access, as it caused several issues in the past.
 
registry was originally supposed to be for very systems-level things. Eventually people started treating it like a generic key value store system for every app under the sun.
config files, user data, everything
yeah, and GAC hell
in the days before require.js, NuGet, Bower, etc.
 
wtf is the point of the GAC
I don't think it's ever helped me with anything, and it's caused a fair amount of pain
 
@TomW only real reason to ever use the gac is if you need ngen
 
@TomW The Global Assembly Cache, well. It has the image for .NET in it.
 
or you use BizTalk, in which case GACing everything in the dependency tree is mandatory
 
7:18 PM
And several other libraries.
 
the GAC used to be where you needed to go if you wanted "global" stuff
not necessarily the best practice, but it was easy so lots of people did it without thinking too hard about it.
 
The framework lives in the gac no?
 
it does
why?
 
just checkin'
 
I have proven myself a worthy googler... I have found 6 log cabins for sale... 2 of them better count.
 
7:20 PM
I mean, it does, but why does it?
 
Putting frequently used stuff like nunit could be a fit for the gac maybe
@TomW re-use of dll's is my guess.
 
In Mapuche mythology, Ngen are spirits of nature of the Mapuche beliefs. In Mapudungun, the word ngen means "owner". == Legend == The Ngen are those that manage, govern and arrange the different features of nature; but also those that nature takes care of and protects. The Ngen were created by the Pu-am (the representation of the universal soul), who wanted the Ngen to assure the order and the laws of admapu (rules of the Mapuche tradition); and they prevent commotion such as the one caused by the battle of the pillan before the beginning of time. The Ngen receive orders of the Pu-am and of Antü...
 
@ton.yeung yeah I always do it but it leads to bloat.
 
Having nunit in 100 projects' packages + build folders
 
7:22 PM
7 messages moved to Trash can
@TomW The Native Image Generator (Ngen.exe) is a tool that improves the performance of managed applications. Ngen.exe creates native images, which are files containing compiled processor-specific machine code, and installs them into the native image cache on the local computer. The runtime can use native images from the cache instead of using the just-in-time (JIT) compiler to compile the original assembly.
 
I am aware of this, I'm just moaning because it's implemented in such an annoying way
+ some application have made stupid decisions to require it
like BizTalk shakes fist
funnily enough, that's not my choice
How does nservicebus handle message transformation?
googling didn't seem to come up with anything I recognise
does that answer my question? I can't see how
unless that says "It doesn't"
How do messages get translated from one format (i.e. one defined by an xml schema) to another?
Yeah, that's still not really anything to do with what I'm asking
Because that's how application integration works?
You suggested it as a replacement for BizTalk. It's not much of a replacement if it doesn't do one of the key things that BizTalk does
But these services all implement the same contracts?
or different schemas from a suite of contracts, or whatever
Yeah, it doesn't do what we need. No good.
it's not getting shelved, I don't know why people keep saying that
I've sat in an auditorium and listened to the programme manager for BizTalk describe their roadmap for the next N years, and explicitly say "we are not canning BizTalk"
MS also don't know why people keep claiming that
at least, the BizTalk programme manager and MVPs don't
someone asked a question in a seminar once and they didn't answer emphatically enough, I suppose
learning a lot about the internal architecture this week, the crying shame is that it's a pretty solid and full-featured product, but the BS they lay over the top makes it a miserable development experience
stuff as simple as the fact the workflow engine (which isn't WF4) doesn't save its designer files with line endings, so you can't diff them
why would you deliberately make that difficult
they're xml but all on one line
I correct myself: It's WF4 from BizTalk 2013
workflow ain't bad
mysterious in places when it chooses to rehydrate out of date instances you thought were dead, etc.
 
8:00 PM
I got stuck in a 2-week lab at Microsoft in NYC to evaluate biz talk for our company (all because this idiot "architect" decided that 100k+ worth of software and hardware and 6 months of development were needed to avoid 1 database insert trigger, but I digress). I found that the purpose of BT seems to be to generate consulting revenue for MicroSoft
BT is needlessly obtuse and hard to implement, and impossible to debug
 
8:16 PM
Sorry to interrupt any on-going converstations, but does anyone know the standard practice for setting a browser cooking via javascript (or angularJS) such that I can access the cookie in HttpContext.Request.Cookies?
 
@DreadPiratePeter it comes into its own when you have a large number of very eccentric products to tie together. It's absolutely a waste of time and money for simple scenarios
@DreadPiratePeter if they just talked about it in terms of what's actually happening instead of putting a layer of managerese BS over the top, it'd be a lot more persuasive
 
8:38 PM
mvc
 
9:12 PM
@ton.yeung Did you get that image?
 
9:58 PM
@dckuehn there are lots of ways to set a cookie with JS
Angular has the cookie service: docs.angularjs.org/api/ngCookies/service$cookies
 
10:52 PM
is there no expiry, ssl, or path in that cookie api?
 
11:37 PM
Slow day for you guys too huh?
 
@SpencerRuport sup?
 
@KendallFrey - Not much. Waiting for QA sign off on a couple features so we can merge them back into our MAIN branch and begin regression testing/fixes.
Doing a push on Thursday or Friday.
 
ugh, my brain can't think about programming right now
I haven't written any code since Friday
 
What are you up to?
 
Drove home from the US today, currently catching up with the internet
 
11:42 PM
Were you on a weekend getaway?
 
sorta
Spent the week working in the office, and went to a family sale.
 
ah
It was a gorgeous weekend so I was paddle boarding, playing tennis and hiking.
Came in to work today feeling optimistic!
 
It was too hot for me to do anything physical
 
I looove the heat :D
95F+ <3
 
It's better than the cold, at least.
 

« first day (1381 days earlier)      last day (3559 days later) »