« first day (1621 days earlier)      last day (3333 days later) » 

12:18 AM
Does every AppDomain get its own static class?
 
12:31 AM
@JustGreg static variables are not shared between AppDomains, if that's what you mean.
 
Mhm. Yes, that's what I meant.
Thanks
 
1:02 AM
lol
 
@ton.yeung Just Greg != Greg
 
 
2 hours later…
3:02 AM
http://programmers.stackexchange.com/questions/277312/when-designing-a-data-structure-should-i-implement-very-inefficient-operations
Any input?
 
I agree with Doval:
In practice, they would be many orders of magnitude faster than if the user implemented them naively. That sounds like reason enough for me, especially if there's no way for the user to match the performance without modifying your source code. — Doval 29 mins ago
 
ya always need it - even if its just ribbon
 
One last thing to add:
In my experience, programmers should be reading docs when using methods of classes that they're unfamiliar with. I'd do the implementation, but express the caveat: caller beware.Lynn Crumbling 9 secs ago
@ton.yeung I work with a few good programmers that read docs. They exist.
@ton.yeung You could always have the lib emit a warning that you have to ignore...
 
could name them by method (log-n) so it gives you an idea on speed
 
3:25 AM
So you guys agree I should add the feature?
I really think that people won't notice and bottleneck their app though. I mean, even if you read the docs usually, you don't read up on every method. Someone could see a method like AddFirst and think it's the same performance as AddLast, and won't notice the complexity/performance warning.
And then he'll spend ages trying to find where the problem is
But then again it's the sort of gotcha that exists everywhere
 
no request for the feature? you don't want to code for it? wait till someone does and just put your ideas down now.
 
No, the feature cannot be implemented on the data structure efficiently. It's impossible.
It's only efficient if it's a bulk operation, and the number of elements involved is around the same as the collection itself
If I implement it, it's a naive implementation.
I also don't understand why this question is so popular: programmers.stackexchange.com/questions/277197/…
 
4:06 AM
 
5:06 AM
morning!
 
morning Benjamin
your an early bird
you from the UK?
 
one timezone further, belgium
the land of beer, chocolate, and french fries
 
you are at utc +2
Have you worked with unmanaged dlls in ASP?
 
5:25 AM
no, i have no experience with ASP, sorry
 
alright
 
6:18 AM
After fumbling around since monday finally I have posted my question on SO
0
Q: Unmanaged DLL in ASP.NET MVC app causes App pool to stop on IIS server

GotaloveMy ASP.NET MVC App uses an unmanaged external DLL written in C++. This website runs fine from within Visual Studio, locating and accessing the external DLLs correctly. However, when the website is published on a webserver (running IIS7.5) rather than the Visual studio IIS Express I get the foll...

 
6:41 AM
@Gotalove What's the error given in the logs/event viewer?
 
event viewer doesnt capture any error
@user1112560 you mean windows logs application?
or where under the events log would that be captured?
 
@Gotalove Quite honestly, it's been over a year since I've done .NET in a professional context. My recollection is that the event Viewer will capture errors under "Application". I may be mistaken.
 
6:56 AM
yea thats what I gather as well
no errors captured there only the iis log actually captures app pool disabled then when I navigate to ther pages not referencing the dll the app seems okay
 
7:08 AM
Unsurprisingly, I'm drawing a blank. Only question would be: have you confirmed that you're running under a Fully Trusted app domain?
 
7:22 AM
hmmm
how so?
like if my folders have permissions for IIS server
 
Pretty much a pie-in-the-sky: AppDomain.CurrentDomain.IsFullyTrusted;
 
I'm making a program that uses a version of sql server, and I've thought of SQL Server CE, so that the user doesn't need to have anything installed for my program. Can I put this easily into some sort of installer that copies the right dll's? This is my first time deploying a program from scratch, so any pointers are appreciated
 
@user1112560 not sure where that is to be set.Can you expound alittle
 
@Gotalove Just confirm that the returned value of that property is True, it /should/ be. Generally set in app.config/machine.config/configuration screens. As far as I'm aware, on ASP.NET 4 it will default to Fully Trusted.
 
in my project folder?or am lost
this is an mvc web app
I know web.config file
@user1112560
 
7:43 AM
Check the property in your code, there's a multitude of places that it could be modified depending on the security policies of the server. If the value returned is false, then it's most likely causing an issue and can be investigated further, if it's true, then it's a detail that's irrelevant, and can be left as an abstraction.
 
but I thought in an mvc app the only place you set such is in web config
 
8:18 AM
Mornin lads.
 
@RoelvanUden dag
 
hi2u
 
@scheien hi!
 
People who run asp.net - how do you track 500 server errors?
 
@BenjaminGruenbaum Plug in a module that logs and e-mails about every error
 
8:32 AM
but emails are clunky and hard to reason about
I want to do better than email
 
Hmm, you can make alternative mechanisms for sure, but we use e-mails :-)
 
use some online tracking service?
 
Look into ELMAH, I'm pretty sure it has it's own tracking mechanisms too.
 
I'm looking into airbrake
 
I have no experience with Airbrake :-)
 
8:36 AM
@RoelvanUden are you secretly hanselman?
 
@BenjaminDiele That'd be quite something.
 
Written by M. Shamalamadingdong
 
@RoelvanUden I want similar incidents and errors aggregated
 
8:54 AM
BS? FASP
 
9:27 AM
There's no way to overload/extend static methods is there?
like implementing my own overload of String.Join(...)
 
9:45 AM
What about new relic?
@Squiggle story of my life :D
 
@Squiggle No, but you can make an extension method for a IEnumerable<string> which should have a similar effect (except you'd use it on the obj)? :-)
 
I was hoping to create something along the lines of
var fullname = String.Join(" ", forename, middlename, surname);
which would strip NullOrWhitespace input
params string blah
n/m I overloaded StringBuilder, which was more relevant anyway
 
10:15 AM
slow morning?
 
yeah, at least here. Had 2 days of PTO :D
 
Paid Time-Off?
highly abbreviated potato?
 
Persistent Traumatized Onion?
 
yeah, paid time off
 
10:33 AM
Rules need to be stickied again :)
 
Hi! there is an internal class in a referenced library that i need to use should i just copy it to my project or is there a better way ?
 
10:56 AM
@someone If it's referenced why not just use it?
 
You can make a friend assembly which exposes internals to it.
 
it's internal i added the assembly from add reference.
 
Hah I can't read
 
@RoelvanUden is it possible without manipulating the referenced assembly ?
i installed it via Nuget
 
@someone Nope.
 
10:59 AM
Newcomers please read: csharpchat.com
5
 
You can try reflecting to the internal class :P
 
It'd probably be easier to just copy it out.
 
:P now i have to maintain it write tests hff.
 
Lol
 
THE
11:15 AM
when i add it to code, it is not defined, even when I can add basichttpbinding
The type or namespace name 'WebHttpBinding' could not be found (are you missing a using directive or an assembly reference?)
I already added these
using System.ServiceModel;
using System.ServiceModel.Channels;
 
@Sippy wsup
how do you publish edmx for db 1st approach ? if you use file system I right clicked and published but it publishes the .cs files and edmx as they are is this correct
 
11:31 AM
@Gotalove If you wanted them deployed ..
 
What do you mean by publish edmx?
 
Probably not a good idea.
 
It builds all the types into the assembly it resides in.
 
Your edmx is compiled along with the classes it generates.
 
aye
 
11:32 AM
What @scheien said.
If there's a dll for your project in the folder\bin you published to it'll work
But the cs files aren't necessary.
You've probably selected an option somewhere that says copy source or something
 
the ef db @scheien
I noted my connectionstring never worked if i dint publish it
 
Put the connectionstring in a config
 
@Sippy filesystem doesnt support database publish
 
@Gotalove Nope.
This is why you should be using a db server.
 
so I publish project 1st then the edmx
 
11:36 AM
Well, this isn't why.
But you should be using a db server :D
 
hehe
 
The edmx isn't a database.
 
You don't publish the edmx
The edmx is just the designerstuff
 
O_o
 
It's a map.
 
11:37 AM
but why doesnt it work without
let me share connectionstring
 
What?
 
here
 
Wait what?
You have to copy the .edmx file before it'll connect to anything?
 
yea
a minute
 
Wtf?
 
11:37 AM
When you built you model (or set it up) you could choose to have the password in a config file or not
 
It shouldn't even be able to use it should it?
Cos it isn't compiled
 
  <connectionStrings>
     <add name="GManagerDBEntities" connectionString="metadata=res://*/MyModelDB.csdl|res://*/MyModelDB.ssdl|res://*/MyModelDB.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=FAVOTECH1-PC\SQLEXPRESS;initial catalog=TimeAttendance;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
  </connectionStrings>
 
Something wrong with that?
 
should I get rid of the metadata part
 
no
it's an entity connectionstring
 
11:39 AM
okay
so with it there if I dont publish the edmx I get an error
 
Which error?
 
wana replicate should I tick precompile befiore publish
 
.. yes.
Try it :D
 
@Sippy thedailywtf.com taught me more about how (not) to write good software than my time spent at University
 
11:44 AM
yo sippy stop messing with me I actually did it and it gives me errors
 
@Squiggle I concur.
@Gotalove Publishing rule 1: don't worry about publishing.
If it fucks up, delete it, change shit, do it again.
What's the build action for your edmx?
 
hehehe am an idiot
it works now
I dont know what nonsense I was doing
 
Awesome error handling right there
 
mhm.
 
I like TFS gated check-ins. It means I can dick around for 5 minutes whilst the build runs.
2
 
11:55 AM
@Squiggle lol ikr
 
ja
 
indeed thanks
 
12:15 PM
good day everyone
 
hi!
 
12:44 PM
first bit of TFS fuckwittery I've noticed
My code builds on my machine. My code builds as a clean checkout on my build engineer colleague's machine. My code does not build on the agent
 
THE
1:03 PM
use SVN
and its free :)
 
SVN? You're so 2001. Git is where it's at.
 
@RoelvanUden CVS yo
 
Not my choice
 
suck it, wednesday
 
THE
@RoelvanUden Git is not secure - I am just saying it without any research
 
1:07 PM
@THE why wouldn't it be secure? you use it via ssh
 
"just like there’s nothing inherently wrong with spandex, but there are times, places and people where it is inappropriate" - TheDailyWTF, on PHP
 
Largely the same times, places and people in either case
 
Hello everyone
is it possible to use model binder for asp mvc to convert a string to class of certain type ?
 
@BenjaminDiele SourceSafe bro.
 
@RoelvanUden trigger warning bro. You should consider that some of us have old, traumatic memories
;)
 
1:22 PM
basically string is name value collection of properties separated by comma
 
@TomW I'm sorry. I didn't consider your PTSD in this instance. Apologies!
 
SourceSafe gives me the shivers @RoelvanUden
 
hey could someone help me with styling WPF? I'm trying to set the background color on all elements of an application. Currently there are two controls left that I don't seem to be able to style: The DataGridColumnHeader and the ScrollBar.
I tried creating a Style that sets the BackgroundColor of the ScrollBar, but that's just ignored. WPF Inspector tells me that there is a 'Thumb' inside of it and that is the thing I need to style. But creating a Style for the thumb is also just ignored
By ignored I mean that I can see in WPF Inspector that my Style was applied, but the color is not affected
 
are you using implicit themeing?
 
is it possible to use model binder for asp mvc to convert a string to class of certain type ??
basically string is name value collection of property value separated by comma
 
1:34 PM
@PaRiMaLRaJ I have no idea what you want. Use the build-in model binder?
 
@PaRiMaLRaJ like a form post? "name=James;age=34"
 
well i cant
only 1 string can be posted
and that posted string contains
values
/Home/Index/Id=10,Name=raj
 
You're going to have to write a custom Serializer.
 
i can write serializer
 
JSON and XML are easy
 
1:40 PM
but how do bind it to mvc action ?
in such a way that i can use it like
public ActionResult Index(Student student)
and it receives student.Id = 10 and Name = "Raj"
 
That's build-in. Just use the correct form values
 
@RoelvanUden i can just post 1 parameter
and that parameter is serialized on client side
 
You can post as many as you want.
 
kind of limitation
yes i know
i can post as many as
but i am limited to one
 
That made no sense whatsoever. Why?
 
1:43 PM
the client part of code cannot be changed
kind of api thing
i have to handle that from server side
 
You could implement your own MediaTypeFormatter
so long as posted as a specific MIME to your API, you should be able to take that approach
but... it's going a bit far out of the ordinary. I'd advise you stick with JSON or XML if you're able?
 
yup
can try that
i think
i can do this way
public class SchoolBinder : IModelBinder
{
public object BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext)
{
var value = bindingContext.ValueProvider.GetValue("id");
return new Student {Id = 10, Name = "raj"};
}
}
 
having an arbitrary/uncommon/undocumented data interchange format is kinda risky
 
the value.RawValue <== contains the serialized string
do i gotta deserialize it
 
You can still just reflect over a name value collection or whatever
 
1:47 PM
but that will involve reftection
reflection*
btw the default model binder? it does use reflection too right ?
 
I assume so, to some degree
 
any advices to making reflection fast or tips to minimize overheads?
 
It does yeah. Reflection isplenty fast in 4.5+
Otherwise, use FastMember
 
gald i am using .net 4.5 :P
well not 4.5.1 or 4.5.2
 
@RoelvanUden Is there a new system in 4.5 that speeds up reflection, or why is it so much faster than 4.0?
 
1:55 PM
@RoelvanUden i would like to know that too why is reflection fast in .net 4.5 ? any good reads on that ?
 
@RoelvanUden so it's stuntish to think that Expression-based code-writing-code is an improvement over reflection?
 
@KendallFrey It's apparently cached from that point on.
I can't find any good docs on it right now.
@TetsujinnoOni Sorry, what?
 
@RoelvanUden what, so it pre-loads everything? Or just caches after the first load?
 
@RoelvanUden related to FastMember, commenting on @Marcgravell's comment in the blog post announcing it about Expression-based metaprogramming being in the realm of "talking with Cthulu", and my thinking it's not so bad
 
@KendallFrey From memory, it caches the data you touched in 4.5 which greatly accelerates subsequent access to type information, getters and setters. I can't find the docs on it, but it was a pretty big deal in the release notes. Benchmarks showed as massive improvement going from 4.0 to 4.5 with a lot of reflection going on
 
2:06 PM
@TetsujinnoOni Expression trees aren't a substitute for reflection. They solve different problems.
 
@KendallFrey there is a set of problems for which they are both in the solution domain, and I find expression better for the last couple that I've tackled.
 
Covariance is when I want to do "IEnumerable<Base> = new List<Derived>();" But is there also a way to get the following to work: "List<Base> list = new List<Base>(); list.Add(new Derived());"
^ Oh, and then with generics :D
 
@ErwinOkken No, it is logically impossible
if you did List.Add(new Base()) it would explode, because it requires a Derived
 
I hate programming ;_;
 
leaf
 
2:16 PM
why, because it makes too much sense?
 
leaf dis chat ruum right now
 
No, because it sometimes doesn't make sense to me
 
if i went by that logic...
i hate my girlfriend...
 
Base b1 = new Derived(); is possible. But not with generics. Why.
Haha
 
@ErwinOkken Because a Derived is a Base
but a Base is not a Derived
so new List<Derived>().Add(new Base()) simply doesn't make sense
 
2:19 PM
class Meh<T> where T : Base

List<T> items = ..;

items.Add(new Derived());
@KendallFrey I get that, that's basic OOP, but I think I said it wrong :P
 
but what if T is Derived2?
that can't work
 
Let me think of that for 1 second
You are absolutely right
omfg :D
I finally get it xD
public void AddSomething(List<Base> list)

but I do: AddSomething(new List<Derived>());

That should work? (with covariance) right?
Because in that case, the relation is clear?
 
no, that won't work
because AddSomething could do list.Add(new Base())
 
For what reason is covariance in this world. Meh, I'm gonna look at this some other time, i'm frustrated :P
Thanks for your help tho!
 
declare @tableName VARCHAR(250)
PRINT 'Renaming Table: ' + @tableName -- concat works
EXEC sp_rename @tableName, 'DELETEME_' + @tableName; -- concat doesn't work

double you, tee, eff
 
2:29 PM
variance only works when data flows one way
like IEnumerable
you only get data out of IEnumerable, not put it in
 
Ahh
 
A list you can put data in and get it out
then you have contravariance, where you can only put data in, and not get it out
 
So I'm gonna get 20 variables with all Example<Derived1>, Example<Derived2>, etc.
 
?
Clarkson has been fired from Top Gear :(
 
Uh. When will they cancel Top Gear? After viewing rates plummet I suppose?
 
2:35 PM
who knows
 
@KendallFrey why, who did he offend this time?
 
Well originally I heard it was because of a slur, but now I'm hearing he attacked someone
 
like, physically?
 
yeah
 
haha :D
 
2:38 PM
sent him to the hospital apparently
 
ow, he got him good then
 
Yeah he went on a 20-minute rant then violently attacked the producer
he's a bit of a knob, though
 
@Squiggle the producer or clarkson?
 
Clarkson
 
anybody have experience that mvc take weird long time while retrieving session for ajax request comparing to regular page request?
 
2:40 PM
An entertaining knob, but a complete and utter knob nevertheless.
 
hey
can anyone see why this link isn't working? seems to be correct considering my folder structure..

<li>@Html.ActionLink("Progress Charts", "DetailsPage", "Charts")</li>
 
@KendallFrey I wanted to have "private Dictionary<string, Factory<Base>>" and put Factory<Derived1>, Factory<Derived2> in it, etc. Is that possible or should I get all variables in it then? (The dict won't change @ runtime)
 
http://i.stack.imgur.com/P2jZ5.png

This is the error thats thrown, but my link seems to be the correct format? http://hastebin.com/kabapewaqe.vbs
 
@tweray Session can get locked during requests in a fashion that makes them serialize instead of parallel
 
@ErwinOkken You should probably use an interface instead
an interface can guarantee covariance
 
2:42 PM
OK let's do this, Resharper... Solution > Remove Unused References
 
@TetsujinnoOni i see, is there anyway to tell a action to retrieve session, but readonly so it won't place lock?
 
@Squiggle Unused references aren't even compiled, it's not going to do much
 
@KendallFrey So I get "private Dictionary<string, IFactory<Base>>" and then I can put Factory<Derived> in it?
 
@Squiggle Watch out! It's a fragile thing.
 
@ErwinOkken yeah
 
2:44 PM
Just to be sure, that's with the out keyword?
 
(In the interface)
 
as long as you only ever pass data out
 
But how do I get data in? :P
 
@BrianJ do a rebuild on the project and see if it finds the view - put a break point on the controller see if it is being called
 
2:45 PM
@tweray stefanprodan.com/2012/02/… -- Not sure it's still an issue in 4.5.2 but worth checking out.
 
@ErwinOkken Why do you need to pass the object into your factory? The factory should create new objects and pass them out
 
@RoelvanUden Mwuahahaha! It's all broken! :D
 
@TetsujinnoOni that's interesting, i will give it a shot. thanks :)
 
@juanvan will do
 
@RoelvanUden I'm replacing all references across 30 projects with correct versions from our local NuGet repo. This is... "fun".
 
2:47 PM
@KendallFrey "Factories.Add("Customer", new Factory<Customer>("Customer"));" works now.
@KendallFrey In the same class as the Dict is in. So I can just create a getter now.
Or am I missing something? :P
 
@BrianJ - Changes to # code require a rebuild and run. Changes to .cshtml code (even if it is c#) only require a refresh. This is because the .cshtml files are compiled on the fly.
 
if you have a data class lib, do an update, can you place that dll into the web app running on the server and have it work?
 
@ErwinOkken I dunno, are you?
 
@KendallFrey I mean, is that what you meant? :P
 
Is what what I meant
 
2:50 PM
@TravisJ rebuilt and still get a resource cannot be found error
 
@BrianJ - and your controller is named ChartsController, and your actionresult is named DetailsPage?
 
my link seems correct though? yes ^^
 
I was looking for EPPlus assistance, am I in the correct place?
 
anyone ever tried that sql server in memory session database feature btw? I'm curious about how much resource it take and how stable it is
 
@BrianJ - show your controller code
 
2:53 PM
@tweray stable? or volatile?
 
@BrianJ - Do you see the problem?
 
@Squiggle well, volatile if i have to pick a word. anyway i just want to hear from ppl if it sucks or it rocks
 
@TravisJ no, not off the top of my head anyways
 
5 mins ago, by Travis J
@BrianJ - and your controller is named ChartsController, and your actionresult is named DetailsPage?
 
2:57 PM
@brianj Close > Typo
 
that's gone over my head ^^ what does the name of the controller have to do with the link? @TravisJ
 

« first day (1621 days earlier)      last day (3333 days later) »