« first day (835 days earlier)      last day (4128 days later) » 

3:00 PM
@Magikarp One context is one database. It can hold a collection of other classes, each collection is a table. A class properties represent the columns. A class instance is a row. That's what you're asking?
 
@RoelvanUden yeah I just figured it out and thanks. It created a table for all the classes that I had...
 
You mean, a context? That shouldn't happen ^^'
 
@ChadRuppert It actually works now, just some little issues from learning... but Im learning :P
@RoelvanUden no I mean the code first with EF
 
its good that you are learning. but fighting over the fiddly bits i don't count as learning. those are frustrations/fixes you can't apply anywhere.
 
@RoelvanUden yeah and i mean the collection
@ChadRuppert mmm true... but doing fixes helps me understand more... I dont know... Im too lazy right now to start over :P
 
3:04 PM
lol ok
 
Have you ever heard a Brit say 'coordinates'? LOL
 
nope
 
@RoelvanUden do you know if theres like a custom initializer thats like a combination of databasemodel is changed, or databaseisnotexist
 
you have to write your own
 
@Magikarp DropCreateDatabaseIfModelChanges
That?
 
3:16 PM
@Magikarp don't do that. find a migration tool out there and write the migrations by hand, and execute them in your own initializer
 
@RoelvanUden not quite.... I tried to create my own but its wrong
 
@ChadRuppert Database migrations are part of EF since.. 4.3 I think.
 
proper migrations? because by default it does the drop if exists crap
 
No, that's not migration, that's a development assist.
It makes a change log and can generate SQL changes etc.
It's a proper tool.
 
3:18 PM
mmmmm I tried this basically:

public void InitializeDatabase(DataSourceContext context)
{

if (context.Database.Exists())
{
try
{
if (!context.Database.CompatibleWithModel(true))
{
 
You can just modify your model and call 'Add-Migration IAddedSomeStuff'
 
nice. thats way classier
 
Then it makes a change, applies it to the database, and keeps it around so you can do it on production.
 
does it generate the undo as well?
 
It keeps the exact changes so you can create undos at any time if you need to roll back.
Don't know the exact command.
 
3:19 PM
nice.
 
Well, that's the theory - it's tricky in practice; it requires that all DB changes have a unique order, and it doesn't merge changes
 
@Magikarp You can use a database initializer?
 
so if you have dev A adding column aCol to aTable, and dev B adding column bCol to bTable... you're out of luck
 
lame.
 
and that's not exactly a far-fetched scenario.
 
3:21 PM
no, not at all.
i say use proper migrations then. like .net migrations or something
 
You never go through a database architect before applying changes? :/
 
yeah, I've never tried those...
 
we don't. no.
 
"database architect" what's that?
 
Weird. Won't you end up with a terrible database design at some point?
 
3:22 PM
@RoelvanUden yeah thats what i thought so i ditched it
 
Oh sure, but you sorta do anyway once you hit a 1000 views/tables
 
That's way too many tables..
 
posted on January 28, 2013 by Eric Lippert

Integer arithmetic is surprisingly difficult to get right. There are usually lots of weird corner cases,1 and the temptation to use too-clever bit-twiddling tricks is high. Today I thought I'd give an example of how I approach solving integer arithmetic … Continue reading →

 
Actually, it's not enough - but the point is, once an application gets big enough, you'll need migrations to fix problems that come up cleanly
 
I can't even imagine a scenario where you'd need over a thousand tables.
 
3:24 PM
and a db architect might help, but that doesn't alleviate the need for decent migrations.
administrative software.
so you've got payments, people, exceptions, bills, documents, etc.
all in various variations
all with optional components (read: tables)
all with multiple languages (read: should have been even more tables)
etc.
Hierarchical organisational tables
 
hey there!
 
tables for various interop API's that store messages for async communication with lots of other services
tables for email
tables for taxes
tables.... you get the idea?
 
Yeah. Guess that's the inefficiency of SQL. Tables. Tables everywhere.
 
Hasn't your company ever considered a document store instead?
 
3:27 PM
Well, this is partly the document store
and it's partly legacy
and also, it's very nice to have foreign keys
something your document store probably won't have
certainly not foreign keys into an external database
 
That's true. I can imagine it's a bit tedious to keep track of everything otherwise.
 
and in any case, lots of tables aren't really that hard to work with - it's when people make mistakes in their designs that you get the problem
I mean, it's not like every table relies on every other table; you'll have strongly-connected components that have only a few relationships outside.
so I don't actually understand all of it.
I don't think you could, with that many tables.
 
With sufficient diagrams broken into condensed pieces it shouldn't be an issue.
 
but as you might imagine, it's very common for multiple devs to do work simultaneously, so EF's migrations insistance on a single serial sequence of migrations is hopeless.
 
Got it. Thanks for the details ^^'
 
3:31 PM
:-)
What do you work on?
(enough about my dirty laundry...)
 
Question, tough. How do you work with a local database that represents real data? Do you create a clone of production state sometimes?
 
yeah, we use clones
 
Makes sense :-)
Also, I don't work on anything at all. I'm playing a game (Hah!)
 
that's not ideal - it's on our wishlist to have a cleaner seperation sometime, but you can't do everything at once.
a game?
which game?
 
@RoelvanUden anyway what i wanna do is just seed the database with values
when the application is runned
 
3:33 PM
@EamonNerbonne A galge.
 
(looks it up on wiki) I guess you learn something new every day ;-)
 
@EamonNerbonne It's not very common, at least, in the West. :-)
 
@Magikarp I'm pretty sure a database initializer would work fine for that...
 
buhhhhhhhhhh
 
@Magikarp Crete a class extending from the one I send you (forgot the name) and override the Seed method. That should be fine.
 
3:38 PM
@EamonNerbonne yar.... but I want to reuse the code for updates :/
 
How come I dont have any KeyDown, or KeyEventArgs for my TextBox? :o
 
I just got wrecked by the second major exam in my Quantum Mechanics course.
I'm so far behind in that course, it's not even funny.
On top of that, I stayed up all night finishing up the homework that the exam covered, and I didn't get to the topics of one of 4 questions.
 
I got this already: protected override void Seed(DataSourceContext context)
but what if i wanna renew the contents like weekly?
 
@Magikarp Well you're not going to use a 'drop-everything-and-recreate-stuff'-initializer in production (I hope?). So that question makes no sense.
 
@RoelvanUden mm no... I mean just the values... like let say, the top 10 weekly music, this week will be different from next week
@RoelvanUden do i just create another method somewhere else
 
3:41 PM
So have a time-based filter, and select the top 10 ordered by publication date...
That's what I'd do; it makes the most sense, since you can pretend older values don't exist while keeping them stored for posterity.
But I'm running on zero sleep, so excuse me if I sound pedantic/disgruntled, or simply don't make any sense at all.
 
@ShotgunNinja sounds about right... :/ Now then my problem is going to be creating a method that run based on time date
 
You can use a when(DateTime > DateTime.Now + (10*ticks_per_day)) kind of deal.
 
@RoelvanUden Cheers. Thanks for all the tips i'll work on it
 
I have info on a .NET dev opening for a well funded SaaS startup. Remote is okay after a period of coming up to speed. dale@ragan.io
 
@jcolebrand ?
 
3:53 PM
@RoelvanUden oh btw for every collection do I have to designate a key for that class?
 
@SWeko I felt like the tweet spoke for itself. I also thought this was a good room to share it in. Sorry if you really can't read/parse English, that means this job is not for you.
 
@Magikarp That would be wise. Keys are indexed and offer superb performance.
 
>parser.query("english");
Parser ok
seems to be working :D
 
@RoelvanUden so do I just assign a key for every class, or do I have to specify the foreign key as well
 
@SWeko apparently not, as you didn't parse the tweet information succinctly at all
 
3:55 PM
@jcolebrand I was just wondering why did you post the tweet instead just the content of the tweet
 
@Magikarp You have a FK when you need inter-table relations. I know you're working with EF but if you're unsure when to use a key or FK (or any type for that matter), do yourself a huge favour and look into the basics of SQL systems. It helps a lot.
 
@SWeko Because I'm not the one posting the information.
 
(potentially with some more details)
 
I juts came across it on Twitter.
I also figured that was blindingly obvious based on the names and avatars involved.
@dwragan != @jcolebrand
 
@RoelvanUden I know... Imean I was just wondering if EF would designate it for me :P
 
3:57 PM
@jcolebrand ok, thought you were headhunting
 
@Magikarp If you tell it to, yes. You can use the appropriate attributes for that.
 
stupid fucking winforms... die already!
DataGridView Checkbox cell - if the row is selected and you programatically update the check value, the change is not seen until the focus on the control is changed.
wtf?
 
no onchange event?
 
stranger still.. only plages me first view.
DataGridView on init gets some rows. default focus is in the first row. i uncheck the row with a toolbar button and it never unchecks (on the UI). if I change the selected row to another row it works. if I change back to the first row it now works.
 
@RoelvanUden thats what i was wondering... anyway thanks...
 
4:08 PM
Is there some way to include wizards in WinForms applications?
 
Ahh solution. dataGridView.Select(); after it's been populated.
hacky but screw you windows.
 
4:26 PM
Quick help.
I have an assembly, Oracle.DataAccess.DLL in my setup project
And it is targeting AMD64 for some reason.
All my projects are targetting x86 specifically.
 
^ That sounds gross. Have you spoken with Oracle customer support lately?
 
And everytime I rebuild my project, I get this error : "File 'Oracle.DataAccess.DLL' targeting 'AMD64' is not compatible with the project's target platform 'x86'
@ShotgunNinja ._. No, why ?
 
Let me take you to see the Oracle.
She's quite old.
 
Been around since the beginning.
 
4:30 PM
@AndréSilva Well, what likely happened was that the DLL you have was assembled for AMD64. A common mistake, remedied often by replacing the DLL with one which targets the appropriate platform.
However, since it's Oracle, I don't know how one goes about finding the correct-platform DLL...
But a good place to start would be to ask the company which made it.
@rlemon Matrix references, much appreciated.
 
So I went to the Oracle, and yadda, yadda, yadda, and she took my spoon.
 
Now there is no spoon, right?
 
Did her kids bend it?
 
Hmm, I'll try replacing the DLL then..
 
Oh, right... it is not the spoon that bends, it is only my mind.
 
4:35 PM
All I know is I had a spoon going in, and no spoons coming out
 
@SWeko Well, you believe you had a spoon going in... but it was only your perception of a spoon.
 
@rlemon Nope, blocked by Barracuda Web Filter.
 
and I'm not going to try to circumvent my workplace's web filters just to look at ThinkGeek.
 
@ShotgunNinja but it would be so worth it
 
Oh, of course, the Titanium Spork.
Seen it already~
 
4:58 PM
well ofc. but on the topic of mind bending spoons
maybe the kid was lying... maybe the spoon was there and he is just a earth bender. Shifty earth benders... Fire nation will no be pleased to hear of this new discovery!
 
5:28 PM
I'm the owner of > 10 sporks but I prefer plastic
@Greg I think I found a nice solution to this
 
5:48 PM
hi...i have a question
 
@Sadiq Go ahead and ask.
 
consider this class:public class People : IEnumerable
{
IEnumerator IEnumerable.GetEnumerator()
{
return (IEnumerator) GetEnumerator();
}

public PeopleEnum GetEnumerator()
{
return new PeopleEnum(_people);
}
}
there are two implementation one for the ienumerable and other for that specific object
my question is: Is this overloading ??
 
Hi All, Does any one know a solution to my post "Selenium Not showing the values updated through AJAX".. My website is developed in asp.net c#
 
Oh my.
 
its not overloading , then what is it ?
 
5:52 PM
@Sadiq I don't believe this is even valid C# code...
 
it is vald becuse this is the ewxaple from msdn
 
where?
 
fair enough; though you should test all code for validity before believing online tutorials. MSDN is fairly trustworthy for stuff like this, though.

Rather, it's not valid BECAUSE it's on MSDN, it's valid BECAUSE it conforms to the standards of the C# language.
 
I ahve tested it..
Its working fine...
but cant make out what it actually is
 
5:55 PM
@Sadiq I don't think it's technically overloading, but rather explicit interface implementation.
 
i am damn sure its not overloading because the signature is same here... but actually for overloading the signature(method name and input parameters) should be different
 
@KendallFrey From this, I'd venture a guess that it's overloading the method twice, but specifying that one is to be used when referred to as a generic IEnumerable, whereas the other is to be used when explicitly referred to as a People.
 
$google explicit interface implementation
 
may be explicit interface implementation... so does it resolve at execution time or compile time?
 
That ^
 
5:57 PM
yess.. let me chk
 
@Sadiq Compile.
 
hmm...
 
Sure looks like it to me, based on the syntax.
 
$google explicit interface implementation
There we go.
 
6:00 PM
@Anish If you want us to look over a post on SO, please paste the link here.
 
thx Kendall and Shotgu for your time and support
 
@Sadiq You're welcome.
 
so found a interesting bug in the Office 2013 preview installation.
If you click the exe to install it, but then click X or Cancel, the program goes away (Closes)
then comes back 10 minutes later saying installation successful and you have office 2013
 
6:14 PM
Oh, and it removed my Office 2010 registration info, so I have 30 days left to use it too... Hey MS: ..|..
 
hey kids
 
6:36 PM
word homes
 
0
Q: Selenium Not showing the values updated through AJAX

AnishI am trying to use Selenium IDE for testing my website. I noticed that the values fetched and updated through AJAX are not showns or not updated to a particular control when i play the test. How can i solve this issue? Thanks

 
6:59 PM
Lo
 

« first day (835 days earlier)      last day (4128 days later) »