« first day (1625 days earlier)      last day (3306 days later) » 

12:13 AM
I'm writing a library of collections. This library includes set collections with operations like Intersect, etc. I support both intersection with arbitrary sequences and with sets of the same type (The latter is a lot more efficient and has a specialized algorithm). The method that takes a sequence type tests to see if the collection happens to be a set.
I'm wondering whether it's necessary to have an overload that takes a set of the same type, given that it's all just pretense and the right method will be invoked anyway.
 
@JustGreg It's up to you
LINQ does those things too
and it generally doesn't offer overloads
 
I'm looking for advice :). It's a completely different level of optimization from what LINQ can do.
In principle, I mean.
 
how is it completely different?
I mean, LINQ doesn't do those checks on HashSets afaik (I should check), but it does on Count for lists etc.
 
That's true. Count for lists is a major optimization in performance.
I think I'll go with this route
 
I have a unrelated question to this.
 
12:20 AM
Actually Count for lists is a good example. Not many people know LINQ does this.
So they assume it performs badly.
 
type.GetProperties() with BindingFlags.Public shouldn't it return public properties only?
 
It returns nothing
 
it won't return internal or private properties
 
All props in my class are public, they are not getting returned.
 
12:21 AM
@diemaus Probably because you didn't pass BindingFlags.Instance
 
Ah, thanks!
 
Yeah, if you pass one binding flag you have to pass them all
 
Anything else i should pass?
 
Nope
Unless you also want static ones
 
@diemaus depends what you want to return
 
12:23 AM
public non-static member.
 
public an instance is the default, if those are the ones you want, you don't have to pass anything at all
 
var properties = type.GetProperties(BindingFlags.Public | BindingFlags.Instance);
is the same as
var properties = type.GetProperties();
Is that what you are saying? ^^
 
I see, the more you know.
Could've just read the documentation for GetProperties xD
 
12:28 AM
Well, now my validator works, now i just need to implement it properly.
@KendallFrey any good idea of how to validate value types? as in, validate that they are not default(T) without a TypeParam?
 
!= default(T)
 
I don't have a typeParam
 
you mean generics?
 
I suppose. It's called a type-param however.
 
In what form is the value?
 
12:33 AM
it's all boxed as an object.
but can be a value type.
 
@diemaus saying TypeParam is misleading, I thought you meant something actually named that
@diemaus so what do you have? I need context
 
You could manufacture an instance using the default constructor and check with that.
 
Okay
one moment.
Pushing to repo, sec.
@KendallFrey @JustGreg
And i do not want to use Activator.CreateInstance
 
Why?
 
Because of its performance.
This might be called on every request.
 
12:42 AM
Then make a dictionary of them.
Type -> default value
A static one
 
I had that in mind.
I just wanted to know if you guys had made something more amazin' ^^
 
Oh I hadn't considered that.
However, this is bad because you have to compile it every time. I'm not sure if it's any less expensive than Activator. Maybe more so.
 
I remember reading about it somewhere before.
 
Yeah, it says the performance is a lot worse, which makes sense. Compilers are very expensive to run.
 
Gonna create a test for this, it is interesting.
You are so very correct @JustGreg
 
 
3 hours later…
4:32 AM
morning!
 
you go to be bed yet?
 
i'm awake again :o
and still no closer to my problem. I get the exception that my |DataDirectory| can't be expanded, but i'm setting it in my application start :(
 
did you set the SSIS to True?
going to spin one up and do some ef see what I come up with
 
Yeah, this is my connection string entry ` <add name="VivendaContext"
connectionString="data source=(LocalDB)\mssqllocaldb;attachdbfilename=|DataDirectory|\App_Data\Vivenda.mdf;Integrated Security=True"
providerName="System.Data.SqlClient"/>`
 
5:27 AM
@juanvan Everywhere I read about |DataDirectory| (even for WPF), it says that setting it via AppDomain.CurrentDomain.SetData() should work, but it doesn't seem to make a difference to me
 
as soon as I add DataDirectory the program fails to save the data
I pull it out - works fine
and its not C:\Program Files\Microsoft SQL Server\MSSQL11.SQLEXPRESS\MSSQL\DATA
 
What is your attachdbfilename ?
 
AttachDbFilename=|DataDirectory|\WpfContext.mdf;
 
@juanvan If I remove |DataDirectory| from my connection string, this is the error i'm getting: {"A file activation error occurred. The physical file name '\\Vivenda.mdf' may be incorrect. Diagnose and correct additional errors, and retry the operation.\r\nCREATE DATABASE failed. Some file names listed could not be created. Check related errors."}
 
I get The user instance login flag is not allowed when connecting to a user instance of SQL Server. The connection will be closed.
 
5:34 AM
According to this post, I should use |DataDirectory| to solve my issue :D stackoverflow.com/questions/23765829/…
 
5:47 AM
hmm, the strange part is that I get my .mdf file when I run / debug the application via visual studio. But it crashes on expanding the DataDirectory via clickonce
 
well if I hard code the link it works
lol
 
@juanvan You mean you hardcode the path to the mdf?
 
C:\Users\Me\Documents\visual studio 2012\Projects\wPF2\wPF2\WpfContext.mdf
 
oh my, let's not do that :)
 
ya but you can point it to the %AppData% Dir I bet
 
5:59 AM
But I think I'm missing some basic stuff actually. I don't even know if ClickOnce is good for me and for my needs
the big problem is, i need to finish this stuff by wednesday
 
nope failed
well you are close yes? just have to finish this part
the logic is all tested?
 
@juanvan most of it, still have some importing logic to do
 
shh with the ping watching a movie lol
 
6:15 AM
@BenjaminDiele AppDomain.CurrentDomain.SetData("DataDirectory", System.IO.Path.GetDirectoryName((Assembly.GetExecutingAssembly().Location))); got it into the debug folder
put it before InitializeComponent()
 
Yeah, I also get it in the debug folder, but what do I do then? Copy it over to my project structure and then create a clickonce installer?
 
well that is the exe path so it would be where ever it was installed - the mdf would have to be there
question now, will it always copy to release
Negative
 
damnit, i'm feeling overwhelmed by all this deployment stuff. There's WiX, Installshield, ClickOnce, ..
 
yep
I will tell you before adding an installer to your app - besides one click - make a copy
 
@juanvan it's all in version control, so I can play around :)
 
6:25 AM
true
version controls is a great thing
 
6:40 AM
damnit, and using sql server CE doesn't work as easily as just adding it to my project either
 
? you can't just connect back to the same datastore?
 
seems like SQLCE is in "maintenance" mode for a while now. So I'll stay with localdb. Still haven't gotten it working though :D
 
7:11 AM
Wow I feel terrible. I couldn't sleep. I took sleeping pills and still couldn't sleep. Then I waited for a while and took sleeping pills again ,thining it migh work this time. It didn't.
So now I'm on sleeping pills, but sleeping isn't going to work. And walking is sort of difficult.
I have to wait until they stop working
sarcasm font?
 
7:47 AM
@juanvan FUCK YES IT WORKS I DONT KNOW HOW BUT IT DOES TIME FOR BEER
 
8:01 AM
I read a sci fi novel where they had a special system of continuous melatonin adjustment. I wish I had that.
You're tired when you want to be tired, you're not tired when you don;t
 
 
2 hours later…
10:03 AM
Hello :D
any body here
 
@Bassem depends if you have beer
 
Beer already?
...where do I sign
 
@TomW It's always beer-o-clock somewhere in the world
 
point
Usually the only time I'd do that would be going on holiday. Waiting for a plane entails going to the airport bar, obviously. Whatever time of the day that might be
 
Yeah, beer before 8 is weird for me
 
10:11 AM
There was one time I had to empty a hip flask at half past ten. That was weird and not very pleasant
Forgot about the no liquids security policy
 
ah, the security theater
 
Someone done goofed.
 
@TomW better lube up
 
Bacon. Bacon now.
 
10:35 AM
i need to understand a concept of how to organize my code
i see that there is something called data access layer and business layer
i need to learn about that , what is the topic name or keywords that can help me in search ??
@BenjaminDiele yes sure i have beer :D :D
 
@Bassem the terms you just used are pretty well known, I think googling those would give you a decent set of results
 
thanks @tomw would u recommend me any links ?
 
Nothing immediately springs to mind. Take a look at Martin Fowler's site though, he covers a lot of patterns there. Then from that you can usually find a big group of bloggers who disagree with him
So read their opinions as well.
 
ok , thanks tom
 
is there a built-in way to validate file paths in XAML? I want to allow the user to select a save location and it would be handy if XAML helped validating (at least partly)
 
10:50 AM
The F# file type provider does that. I have literally no idea how you'd integrate that with XAML, but maybe it's possible. The logic is there for exploring the filesystem at design time, anyway
But it's a CLR object so it should be possible to reference it
@ReedCopsey - ever use F# type providers from C#? Is it possible/straightforward and can the design-time validation be made to work outside an F# environment?
 
11:29 AM
damnit, doing git merge conflicts in visual studio is so bad. Each time I forget what to do
 
Guys , how to prevent form resubmission when page is refreshed ??
 
Suppose I have an xml file (which I receive from a 3rd party) I need to import. Each entry starts with a <Group> tag, and beneath it are multiple customer tags: <Customer1>, <Customer2>, <Customer3>, ... How do I catch that kinda stuff? It has no max, so eh .. =/
 
@BenjaminDiele define 'catch'?
 
well, i want to import each and every <CustomerX>
 
sounds like a job for xpath
*[starts-with(local-name(), 'Customer')] or something like that
 
11:45 AM
thanks, i'll look into that
 
oh ffs
my fence has just fallen down
 
@TomW i misread that as 'fiancée', whoops
 
lol
Not sure I'm too into women who fall over in a strong breeze
 
@TomW You just have to tie em down harder
 
12:52 PM
how is everyone on this fine Sunday?
 
@Bonner bored to hell and back
 
1:14 PM
I thought it was Monday today, turns out it is Sunday, not being at work is confusing the hell out me, and making me very bored too
 
1:30 PM
Anybody worked with IE Accelerators? I'm wondering if it's possible to click my custom IE Accelerator which will then launch my own app and pass arguments to the app.
 
1:54 PM
@BenjaminDiele what was the fix?
 
i think having hardcoded the MDF location fixed some stuff. Incidentally that also solved my worries about overwriting existing data
 
so it back to |DataDirectory| and now you have an App_Data folder?
 
@juanvan it's hardcoded to C:\Temp\Db.mdf :D
 
Well that works - by default that one click is to put it in the AppDomain folder - that was the wrong link
 
2:17 PM
hello party people!
 
where's the party I wanna go :)
 
2:38 PM
I have a database initializer for EF called SapphireDatabaseInitializer which extends CreateDatabaseIfNotExists, if I want to extend SapphireDatabaseInitializer and override the seed method is that possible?
ignore that it appears to work
 
hi
anyone here using Azure
I've been using a trial account set up by my college, but got an email saying its cancelled. Is there any way to renew it without losing the current services?
 
was the trial over?
login and see what options you have?
 
3:03 PM
hmm, can i somehow do a health check for which packages i have installed in my wpf project? I'm getting some exceptions when trying to enable migrations which should stem from wrong versions
 
nuget packages?
 
think so
 
you have a package.config in the root of the project?
 
packages and extensions
packages are nuget
ok that will have the versions of the packages you have installed
 
3:10 PM
the strange thing is, I have EF 6.1.1 in my packages.config, and the exception I'm getting is System.TypeLoadException: Could not load type 'System.Data.Entity.Infrastructure.TableExistenceChecker' from assembly 'EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
 
that was my next ? Version=6.0.0.0 - have to update that manually in a setting
it could be in the csproj as well, open it as txt
 
and I can't run my applications because i get an exception regarding automagic migrations :D
 
they are enabled?
 
aha, in my csproj file there are mentions of EF 6.0.0, but with <ItemHint> and stuff
@juanvan Yeah, but I don't know how to disable them
 
you have a pluralsight account?
 
3:14 PM
yes
 
are you missing references?
 
@Bonner The project builds, so i don't think so
 
Migration.Configuration.cs you have that file?
 
that class comes from the EntityFramework.dll, so if that is referenced what version does the dll say it is?
 
PluralSight Look at Database Migration segment in the first module
 
3:17 PM
@juanvan yeah, i have it
 
if you don't have a constr. make one and set the AutomaticMigrationsEnable to true;
 
@juanvan By default it's set to false. Perhaps I need to look up the difference between automagic migrations and manual migrations
thanks for the link btw
 
that little segment might be all you need to get the concept
 
while on the subject of EG
*EF
 
Eggs?
looking at a catering menu
15 pages omg
 
3:20 PM
does the SavingChanges raise when running the seed?
 
@juanvan what are you catering for? Got a happy occasion?
 
I think he was offering to cook me dinner
 
ha - do love me grilling season tho
ya getting married t-2months
but i mean really, we have looked at 5 places for 3 events and this one is just crazy
 
@juanvan nice, i am in 5 - 6 months
 
Nice - we already doing the house, she is kid ready and wants to fwd this to get to that lol
 
3:24 PM
damn, you a step further than me then :D We have no thoughts of kids yet (or perhaps ever), and still need to save some more to buy a house
we do have a cat though
that should count for something :D
 
they do
so you get that setting updated and able to run the enable-migration in the PM console?
 
i've set the AutomagicMigrations to true, but I still get exceptions when running get-migrations in PM
 
run enable-migration first
well
watch that PS first - THEN do the commands
 
if i force enable-migrations, it resets my AutomaticMigrations to false, and I still get the exception
I think i fucked something up with the whole database shebang
 
the DB when BangBang
 
3:28 PM
is it just me or is EF a bit problematic
 
woo they have swordfish -
just how you did the app - it just worked you did not question it and now you need to know more its time to back el bus up
later guys
 
have a good one
 
3:42 PM
@juanvan later, and thanks man
 
4:06 PM
Hi
 
hey man
 
Another user requested to have a chat, can we use this
I have not used one so far
 
you can click on the request, it should create a room
 
Thanks dude
 
5:09 PM
Hi
Any one would help me ?I'm having a problem with SSMS 2008
When i try to connect .\SQLExpress from SSMS ,i get the following today(don't know why it happened):
Cannot connect to .\SQLExpress.
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) (.Net SqlClient Data Provider)
 
5:41 PM
Is the service started?
 
This is fromSSMS
everytime i start from SSMS
 
The sql server service may be stopped due to some reason, and then you won't be able to connect from SSMS.
 
YES
that's what i amtrying to figure out
why its stopped
how can be restarted
 
run -> services.msc
 
5:45 PM
locate sql server, check state, and restart if stopped
If you cannot start it, check event viewer for errors that may be related
 
i found this -->http://www.sqlmusings.com/2009/03/11/resolving-a-network-related-or-instance-s‌​pecific-error-occurred-while-establishing-a-connection-to-sql-server/
It isn't helping me
OMG
it started
U saved my ass
@scheien why did it happen?
 
Probably some intergalactic interference due to aliens travelling by in FTL.
 
hahhaa
 
It has probably stopped for some reason, which I can't really know, since it's on your computer :)
 
Can i find the reason?
 
5:52 PM
Check the event viewer
perhaps there are some entries for sqlserver
 
Thank you man
 
np
 
6:25 PM
EF is driving me nuts
I'm going to play CoD
 
don,t tell me its advanced warfare or ghost.
 
I'm still on black ops 2
 
that's a relief
ghost is pure camper stuff
 
lol
I run around knifing people on Black Ops
they say I'm cheating because I'm so fast they can't catch me, but they all camp so what do they expect
S&D?
 
bullet to head does't kills, a knife in the knee does
lol
 
6:39 PM
lol
 
sounds like a fair game to me
that's no cheating
 
the best is hardcore with a pistol, someone is spraying and you shoot once with a pistol and kill them after they get hit markers on you
 
:O
that's why hardcore is popular! increased damage
 
more realistic too
 
there is no map/hud so i don't play it
 
6:41 PM
you know before you started chatting, I was about to down about 30 bottles of beer because of EF lol
 
hahaa
must be a complex one
 
it is because I'm clueless to what Im doing haha
 
:D
 
so tomorrow I'm going to look at ADO instead
 
shifting from EF implementation to ado?
?
why???
 
6:44 PM
the problems I have are as simple as having 2 assemblies, one is a library and one is a website that uses the library, each has a database context, but only the the context from the library is actually created
 
O.o
 
the other thing is if I want to query across both contexts, I can't, yet from what I gather I should have a context for the library and one for the website
I have to resort to views in MSSQL
I take it you use EF?
 
u shared it with the Guru(s)?
 
I shared one of the problems, which is actually many problems, I've been working out what was causing them all day, but this context issue is now driving me nuts, I just don't get it
I get that you should have a context per schema for performance reasons, but why only 1 context is built is beyond me, I presume EF is not installed correctly in the website, yet it can use the context from the library fine
 
i'm diving into EF... i was about to implement it for the first time in my project...
i am good with ado
 
6:48 PM
ADO and PDO are pretty similar, I used PDO with PHP (which is a rip off of ADO)
and I love it
 
ahan :D
knew EF can be annoyance!
 
I might just delete everything and try again
 
 
2 hours later…
9:08 PM
guru(s) are silent
 
crickets
 
:D cricket fan?
 
that cricket
 
HFS#
btw autralia won the cricket world cup
it's a good team, well organized
 
9:57 PM
Don't forget the tumbleweeds
 
10:15 PM
Does anyone have a recommendation for an IDE to use if I'm setting out to learn C on Windows?
 

« first day (1625 days earlier)      last day (3306 days later) »