« first day (1160 days earlier)      last day (4013 days later) » 

00:00
@rightfold Did that but they were stored as Javascript TICKS with local time and i had to convert to .NET datetime objects with UTC timezone...
@Greg I've never done things like that before, so your guess is as good as mine
@RyanTernier Yeah, it claims that it will modify the Sites Path, but it doesn't mention anything about the bindings which I thought IIS would require changed.
kind of out of scope of the room but anyone know how I can get an html input value after its been dynamically created? i.e. ajax call inserts html, need values from that html
if i recall its a .bind somehow?
1 message moved to Trash can
so
the engineering team is singing an icelandic drinking song for the holiday party talent show
@RyanTernier In theory, just by changing the physical path should be all I need. Then if they go to the URL the site will read the new application in that other folder.
00:09
do you have to do the thing that the hat says DURING the holiday bash? Because I have a gold badge...
Do you have to earn the hats each time the winter bash is out?
@Pheonixblade9 Yeah - it's each year
@ReedCopsey That kind of sucks, you have to do alot of work for a hat just to lose it next year.
well, they're supposed to be for fun ;)
Alright, I'm off everyone. I'll chat with you all later.
00:21
@Greg cya!
00:50
in JavaScript, 5 hours ago, by rlemon
Ohhhhh Dashing through the posts!
With more downvotes on the way!
Over to Meta I go!
To write about my day! (ha ha ha)

Hats are SE bling
Making regulars fight!
what fun it is to double ping,
on the chat system all night!

OHHHHHHHHHHHHH

Stack Overflow, Stack Overflow,
Why doesn't this site pay?
Oh! what fun it is to argue
about why jQuery sucks all day!

Oh! Stack Overflow, Stack Overflow,
You just made my day!
I could be working but instead I am
Writing meta posts this way (in a song!)
@Reed - I ran this code from Jon Skeet but it throws an exception. stackoverflow.com/a/238562/1026459 Is it just me doing it wrong?
what's the exception?
Null reference
can you show the code for your type?
nvm, I see what I did. Sorry for bothering you
linqpad expected main to be in a different place
 
2 hours later…
03:12
Hello, @Ianthe!
hey there @CCInc what's up?!
Happy holidays!
Eh, not much. You?
Happy holidays!
Preppin for the NAMM 2013 (trade show), might go to California on 23rd-Jan
sorry that's NAMM 2014 :)
are you done with school stuff this season? I'm reading a lot of "finals" posts...
03:31
hi all
Hi there
hellowed all :)
Does anyone happen to know how to refresh (from store) changes to a many-to-many relationship in Entity Framework, when the junction table has no FK and is not represented by a type in the model (just two relationship properties)?
@Ianthe Yeah, I have finals until friday, then it's break.
@robjb something like HasMany...WithMany...Map... in Fluent API?
@robjb modelBuilder.Entity<Course>().
HasMany(c => c.Students).
WithMany(p => p.CoursesAttending).
Map(
m =>
{
m.MapLeftKey("CourseId");
m.MapRightKey("PersonId");
m.ToTable("PersonCourses");
});
03:44
@CCInc, "You shall not pass!" hehe
hahaha
@LINQ2Vodka I'm not familiar with HasMany or WithMany, are those newer additions to EF? I should have specified EF4
@robjb i am talking about EF5 Code First... are you using code first approach?
Model first
04:00
@robjb sorry, didnt workwith them for long. But is it possible to set FK's in model manually even if they arenot present in DB? The actual data shouldnt violate this constraint ofcourse...
I don't think so, I believe it requires the FK be present in the table ...
@robjb maybe there is an option to tell EF model not to verify or rebuilt from DB?
04:16
I'm not sure how that would help. My problem is that because the junction table isn't mapped to a type in my model (and I don't really want to map it), I have no means of checking EntityState to find changes that haven't been saved, or calling ObjectContext.Refresh() to revert those changes
Going with your example, if I add a new course to student.Courses, neither the student nor the course has been modified -- just the relationship, which I have no means of identifying ... that said, I'm starting to think I should just map the table.
Both in model first and code first you can use many to many relationship without junction table type.
well, what happens if you set on both tables navigational props to each other?
Can you clarify?
ok, wait for a while, i'll made my own model and try it
04:36
man I want an F-150 Raptor
Do you have a lot of rocks to drive around?
@robjb I've just created tables One and Two and also a table Bridge that has OneId and TwoId fields. I put FKs on them then. After I ve generated a EF model into application, and there appeared an assiciation M-M and navigational properties in One and Two to each other. I run the app and successfully made some selects. After i deleted FKs in database and the app is still working. Is it what you asking for?
That looks like a vehicle that would excel at rock-hauling.
@robjb thus i've got M-M tables indatabase and M-M entities in the EF model without bridge class
@LINQ2Vodka I've already accomplished that in my application. My problem is how to search for relationships that have been added or deleted (before committing to the database with the SaveChanges() method), and reverting those changes.
04:44
sorry, didnt read to end :( waiit a second...
So if I do something like student.Course.Add(course1), both course1 and student will have their EntityState == EntityState.Unchanged ... the question is how to find the newly added relationship, so I can revert it?
@robjb AdventureEntities ctx = new AdventureEntities();
var r = ctx.One.Include("Two").ToList();
var two = r[0].Two.First();
r[0].Two.Remove(two);
ctx.Entry(two).State = EntityState.Unchanged;
your relationship you're looking for is the child object. In your case it is course.
in my code above i've removed a relationship and restored it again (last 2 rows)
Yes, I see. But if I've made a large batch of changes to the relationship property, how would I find them all without manually keeping track of all changes?
ctx.Entry(course).State = EntityState.Unchanged will restore changed relationship
let me think..
no, i dont know. SOrry.
It's no problem; our discussion has made me think that mapping the function table is probably the best approach after all, since EF will keep track of changes for me
04:57
the common practice is not to revert changes in context but reload it...
Ahh, that could work nicely
05:10
I do love programming under .NET :)
 
2 hours later…
no9
no9
07:15
good morning fellaz
ya good morning dude
no9
no9
just another day at work...
Hmm.. Anything Special @no9
no9
no9
nothing much, next week I only work monday and tuesday
then I am off until 30th
Y no holiday for ur office
Wow superb.. But for me only 2 days only leave is permitted.. coming tuesday and wednesday..
Hate this
no9
no9
07:22
tuesday is xmass ... its free day here, in wednesday its another free day (independence day)
so I only took friday as a day off
hmm.. Where are u ?
no9
no9
slovenia
and yourself?
From india,
no9
no9
I see
guten Morgen :D
07:24
hmm do u have facebook account??
no9
no9
I have some business with a company in Ahmedabad
oh.. so u came to india before?
no9
no9
no I dont use facebook... I have deleted 3 years ago. No never was in India... all business is via internet
@Ianthe guten morgen :)
wie gehts? :)
Hmmmm.. Thats good
no9
no9
0
Q: Progress bar when uploading byte[] (WCF)

no9I need to draw progress bar on my WPF client when uploading byte[] via WCF buffered transfer mode. No i dont have stream mode available, so I am kindly asking for a simple solution on how to achieve this - if it even exists.

if someone will have a clue if this is even possible...
07:28
Just fake a progress bar
Es geht mir gut. Danke schön :D
This is what Microsoft does anyway...
mornng
no9
no9
@gdoron well ... would you If the client would explicitly said you musnt? :)
if it was a streamed mode i guess it would be possible...
0
A: Pasting text from clipboard to Firefox and Chrome

no9OK. So I gave up on this some time ago. I just created an additional textarea control, where I paste my stuff into. Actions on page then read this control and do the work - then delete the content in this control. Some would say its a clumsy solution, but i prefer "old fashion" and safe. Best ...

if someone wants to "downvote" my answer :)
what
no9
no9
07:37
what what
HUH
no9
no9
UH?
lay it onto me @Steve.. I can take it. I have time anyway .. my VS is not responding...
puts on his robe and wizard hat
!!google puts on his robe and wizard hat
no9
no9
08:00
oh well
coffee time
Meawhhhh @CapricaSix
anybody knows cad
morning
no9
no9
good morning @RaZor
hey @n09
@no9
no9
no9
08:22
@RaZor I am still fucking around with the threading problem :)
serious?
i'm still struggling with my File Unlock problem @no9
no9
no9
yea ... I tried implementing a simple progress spinner ... but it all came back as boomerang...
nice :p
no9
no9
0
Q: Progress bar (spinner) not animated when background thread is working

no9I have a background worker that does some work. I want to have a spinner on main control indicating that app is working. But looks like threading is preventing my spinner from animating (sometimes it doesnt even show)... can some one explain why it is not working (probably because sleeping the th...

boy i suck at threading
@RaZor just for the kicks ... you are reading bytes ... change it to ReadAllText
why?? i need the bytes
no9
no9
08:25
@RaZor the method is also designed not to lock files ... just so you eliminate readBytes method
@RaZor well ... probably it will produce same problem, but thats how i eliminate possible problem makers :)
@no9 but ReadAllText doesn't return bytes... and I need the file for upload to SQL
no9
no9
oh I see...
@RaZor what else are you doing with the file after reading text?
i mean bytes :)
nothing.. I upload the file into the database
no9
no9
have you tried to "copy" the file into memory and working with that?
but here is the scenario: I checkout a document in my application, then add some stuff to the document and the checkin the document. At my method for Checkin Document the filestream can't open the file since it is still in use
I use either a FileStream or File.ReadAllBytes
so don't know exactly what you mean with loading into memory
no9
no9
08:31
"add some stuff to the document"
then the problem is here?
nope the problem occurs when loading the file into a filestream at DocumentCheckin
no9
no9
@Razor i meant copying file to "tmp" and working with its copy :)
@no9 you have an example for me about copying file to tmp?
Hi everyone.
no9
no9
@RaZor i never had to do it ... perhaps using MemoryStream?
08:39
i'll look into it ;)
didnt we fix that @razor?
no9
no9
@DaImTo good morning sir
:)
@DaImTo perhaps you could help me out when you have time
@no9 whats up?
no9
no9
well I am a noob in threading ... and I am working with this WPF app that I inherited... the problem was that I had to use bckWorker (you will probably say its a bad idea, but hey)... so i got it working as I wanted. Now i have problem displaying progress spinner custom control. It gets blocked because of bckWorker...
0
Q: Progress bar (spinner) not animated when background thread is working

no9I have a background worker that does some work. I want to have a spinner on main control indicating that app is working. But looks like threading is preventing my spinner from animating (sometimes it doesnt even show)... can some one explain why it is not working (probably because sleeping the th...

i know... its an obvious missusage of bckWorker, but I managed to resolve my primary issue with it.
first i dont do WPF. Second I use a background worker in my app as well to run the progress bar while its riping data from google analytics. :)
you wana see miss use i have mine spiting back Json so that i can display messages of how far its gone and if theres errors :)
no9
no9
08:47
oh well... i think its more of a threading problem. All i need is some1 mastering it to tell me if I can get the spinner to animate when bckWorker is running (in my scenario)
the thing is if you put a spinner up then the app is going to be busy which removes the need for having a background worker.
Me loving hacks as i do would just hide show an animated gif spinning.
no9
no9
actually no. Its true that the spinner (that does not animate) also picks up the "window spinning wheel", but the application is still responsive.
@DaImTo hey goodmorning
No, it's still fucking with me....
no9
no9
@DaImTo im thinking of this ... instead of spinner i will just show label "Please wait..." and let the windows spinner active. Hows that for a hax? :P
@no9 nope. i have mine set to set the % of done so the user knows its still running
like what microsoft does but more acturate.
think i even have time in there.
no9
no9
08:53
@DaImTo fancy ... since I am looping trough files i could do # of # completed...
yup
sometimes its the little things that make the users more happy.
i wonder if i should bother trying to learn wpf. Or stick with my must learn android
good morning
What is format of this web service ? I am new.I want to learn that
Is it wcf ? json ? xml ?
How can I write a web service like that ?
09:13
xml
Tecnily speaking a webservice can be as simple as a webpage that just dumps data out in a format that another system can read. So insted of dumping your data in nice html format you dump it in something disgusting like XML.
@DaImTo can you show a sample ? link ? I want to learn create a web service like this
just google it im sure you can find loads of tutorials.
yes I know but there are many type of web service.I want to create exactly like this format.For that I asked you
@VinayPandey thank you
this looks more like REST service
you can get a better distinction here stackoverflow.com/questions/2458407/…
09:50
@Mehmet Go forth and read thy Web API pages at asp.net/web-api
10:07
@RoelvanUden how can I use linq to insert data from DataSet into ObservableCollection?
I'm using a foreach loop atm but I want to use linq since that is much faster.
hiall
10:32
@no9 that is NSFW :p
no9
no9
@RaZor it is it is ... it lifts up consciousness and self esteem :)
hahaha awesome :)
hi everyone :D
hey @MishMish
0/
11:04
lol
flowingdata.com/2013/09/03/most-popular-porn-searches-by-state i need to find more intersting datasets then google analytics
11:22
What is the vocabulary for these two forms...?

var dt = (from x in arrData select new foo(x)).ToArray();

and

var dt = arrData.Select(x => new foo(x)).ToArray();
@deostroll LINQ syntax and “normal”?
I would like to discuss using protected fields in classes, anyone up for that?
shoot
Okay. I’m reading everywhere that protected fields are considered bad (or actually worse). Now I have some problems understanding that. Of course, using a field will restrict your interface in a way, but on the other hand, if you are exposing something as protected, then you are openly making room for subtypes to work with the internals of the base type any way.
In my case for example, I have a view model with a protected Guid which represents a lock for the data the view model is currently displaying. The base type declares this and has a generic way of communicating with the data layer to use it. But every subtype, a more specialized view model, will be using that lock for other stuff too.
I don’t really see why I should create a property for this instead. I’d even argue that having the camel cased field makes its “internal” idea more clearer than a pascal cased property.
Another example is a field which represents a validator object. It’s readonly, so subtypes can’t modify it (and as such influence the base type’s logic), but they will need to access it to use the validation.
11:41
@Jlott yes i was codebrain, i changed nick since it appears as codebra for some users, that's weird.
@poke are you referring to "protected" or "protected internal" or both?
@deostroll Just protected.
@poke I cannot provide any valuable comment on your specific class design. In principle however, if you want other classes down the line to modify the behaviour of your base class functioning, you'd have to expose that property/method as protected...
For an analogy: think of the base class as a service providing some core functionality...the subtypes can of course can re-use "that" functionality. However, its the "intent" (by the writers of the base class) to not modify that functionality. Hence they'd go with something like protected. This I think is more analogus to your last e.g.
@poke, I don't think it's the protected that's bad, so much as the field
I think it's partly psychological. When you see a field, you expect it's scope to be the code you've currently got in front of you.
Whereas a property is 'obviously' for other people
12:03
@poke if you are quite critical of the "intent" then you'd naturally start being critical about if this is the correct "design". Hence all this becomes a design debate, which is why I started off the way I did with an attempt to explain...
hi
deostroll
hi drtj
Hello everybody
@jayrajGoswami hi, how are you?
fine dear
i need one small help
abt 4.5 framework
ok
Async await
u know ??
12:13
amm sorry friend
not so much about it
but its better to ask your question
this concept asynchronous
ok dear
and if someone knows the answer they'll help u
ok dear
what r u doing man
ah, nothing... just trying to find a good way to make dynamic HTML forms faster based on database tables
how much exp in .net ??
12:23
For what purpose u r using this async.await?? @jayrajGoswami
just knowledge abt this
jasper
hi plz help me
For tat only i ask u..
public async Task CopyFilesAsync(StreamReader Source, StreamWriter Destination)
{
char[] buffer = new char[0x1000];
int numRead;
while ((numRead = await Source.ReadAsync(buffer, 0, buffer.Length)) != 0)
{
await Destination.WriteAsync(buffer, 0, numRead);
}
}
//When you Call CopyFilesAsync
protected async void BtnCopy_Click(object sender, EventArgs e)
{
string UserDirectory = @"C:\Users\tvt4\MyTest\";
using (StreamReader SourceReader = File.OpenText(UserDirectory + "start.txt"))
{
using (StreamWriter DestinationWriter = File.CreateText(UserDirectory + "end.txt"))
i have create one demo
and create 2nd code
private void Button_Click_2(object sender, RoutedEventArgs e)
{
string fileLoc = @"C:\Users\tvt4\MyTest\start.txt";
string fileLocCopy = @"C:\Users\tvt4\MyTest\end.txt";


if (File.Exists(fileLoc))
{

if (File.Exists(fileLocCopy))
File.Delete(fileLocCopy);
File.Copy(fileLoc, fileLocCopy);
}
}
so 2nd code with out use Async await
so what is diff
both code which code is best
12:31
@jayrajGoswami i have invited u to a new room.. accept it
hi @RoelvanUden
hw r u?
@RaZor Linq faster than a foreach? Where did you get that idea? :)
@jayrajGoswami The second uses a blocking calling. That's it.
@JasperManickaraj Fine thanks :3 you? :P
Mine too Dude.. How about christmas??
@RoelvanUden Aren't LINQ expressions faster? as far as I know, Its a compiled and enhanced code and should be faster
am I right?
@jayrajGoswami Asynchrony is essential for activities that are potentially blocking, such as when your application accesses the web. Access to a web resource sometimes is slow or delayed. If such an activity is blocked within a synchronous process, the entire application must wait. In an asynchronous process, the application can continue with other work that doesn't depend on the web resource until the potentially blocking task finishes.
So the 1st method is best..
@DrTJ No you're not. :P
12:46
@RoelvanUden just that? :D
@RoelvanUden assuming
and heard that from other people
@RoelvanUden I assume that is incorrect?
@DrTJ In fact, I'd argue a LINQ statement is slower than a foreach statement. Both are compiled to MSIL at compile time and then to native at run time, however a foreach statement does not need to create anonymous functions and let it be invoked on each item. A LINQ statement does need that, and therefore adds call overhead to the iteration. Also take into account that a LINQ provider has a yield construct, and therefore will be doing calls there too.
Please note that I'm talking nanoseconds here. In most situations it doesn't matter either way.
@JasperManickaraj @jayrajGoswami To add a little more context, asynchronous statements are scheduled into a task scheduler that handles them on a thread pool. That means that a lot of I/O bound jobs can be potentially queued on an OS callback and handled upon receiving a signal, on one of the threads in the pool. This enables extremely high performance scenarios which is necessary when you're dealing with an extreme load in a server situation.
(Refer to asynchronous scheduleing, non-blocking I/O, I/O completion ports)
@RoelvanUden you are right!
no9
no9
i looove extension methods
=]
I hate my work
and the lack of knowledge...
no9
no9
12:57
i loooove my work :P
good for you
no9
no9
i have to .. i just started, but i hate my previous :P
hehehe
this is my first job
no9
no9
how old are you?
12:59
22
no9
no9
if I may ask
oh im 36

« first day (1160 days earlier)      last day (4013 days later) »