« first day (1406 days earlier)      last day (3543 days later) » 

3:00 PM
@RodrigoSilva go to the next example (that's binding 1 million records)
then go back to the previous example...
the original web app is loading when you first navigate to the site
 
@NETscape Yep, I did it already :)
It's extremely fast :)
But is it a US billion?
 
that line is going right over my head, I don't know what you're quoting :p
 
that silverlight sample is very slow
 
are you smoking crack?
 
I'm not quoting anything, but the american billion differs from the European one :P
No, not at the moment
 
3:03 PM
wtf
 
you just said you had problems with 8000x900.
 
Traditionally the UK billion was a million million.
 
that was directed to David
 
that silverlight grid is very slow when scrolling
lots of dropped frames
my Grid is a LOT faster
 
3:05 PM
buy some RAM or something lol
 
@Squiggle Isn't it called a thousand million?
 
ok I will give all my users more RAM
 
@Squiggle thats how it is in german too
 
That's how it directly translates to English in my language, at least
 
8000x900 is also 138 times smaller than 1G
and its in a browser. WPF > Silverlight
 
3:06 PM
I will learn a new framework / buy a new library / learn a new library / upgrade all the computers : to have the same result :)
great ROI
 
> million = Million
> billion = Milliarde
> trillion = Billion
> quadrillion = Billiarde
can get confusing :P
 
awesome :D
 
lol, thanks @DavidDV, exactly my point...
 
My grid cells contains lists/RTF/other tables/charts/forms/pie charts / ....
 
27 mins ago, by David DV
I recommend angularJs because I really really Like it
 
3:07 PM
mille = 1000, right?
 
29 mins ago, by David DV
the problem is that you spent time learning EF, and every little thing that is holding you back you can choose to spent more time learning EF, or choose another technology, but then all that time spent learning EF is "wasted"
 
Now I'm confused @drch
 
@NETscape what is your point?
 
no, @Squiggle, A Millie:
 
10^6 == Million - Million (US - EU)
10^9 == Billion - thousand million

That's how I have always called it :O
My whole life is a lie
 
3:09 PM
and Millie^2 = Milli Vanilli
@RodrigoSilva yes, 10^9 == billion = thousand million
 
you tell @Darek to stop wasting time with EF and switch because you think something is better, but you won't switch because someone else told you something is better.
 
Is there a canonical answer for a question like this? I.e. "Trying to change something in the GUI before a long-running task, but it doesn't show up until after"
 
someone else?
 
EF is fine. Use it if it fits the bill. Understand that it has limitations.
 
I make my own descisions on what I use
 
3:11 PM
clap
 
I will not switch to WPF because there is no added value for my users
 
what value is added if you use EF over angular?
to the users that is
 
if henry ford had listened to his users, he would have built a faster horse.
3
 
huh?
/me uses EF and Angular
 
EF takes more time to learn then Linq2Db to be able to use properly
 
3:12 PM
^wat
 
@drch Damn... That's actually nice :P
 
EF learning curve is low
 
Most don't use EF properly which causes N + 1 selects which causes bad performance
 
EF for the mapping between database persistence and domain models.
Angular for the UI, atop JSON-serialized view models.
 
EF takes more time to learn if you already know Linq2Db
 
3:13 PM
@DavidDV or just lazyloading = false
 
like C# takes more time to learn if you already know C
 
+1 for lazyloading = false, and well defined aggregate boundaries.
 
EF isn't so complex tbh and the knowledge is transferable to other ORMs
 
I used NHibernate and EF pretty much interchangeably for a couple of years.
 
LazyLoading = false is one of those thing that you will need to learn to use EF properly
 
3:14 PM
I will not switch to WPF because there is no money to do so
 
If you're talking about which is easier to learn.. that also depends on prior knowledge. I'm willing to bet a small fortune that developers that are new to databases and programming will be able to learn easier with EF than <generic SQL mapper here>.
 
no they won't
 
one thing that I find confusing with EF is the whole associateion thing
 
@RoelvanUden You just lost your small fortune
 
"the whole association thing"?
 
3:15 PM
@PatrickQuirk if you want to update the UI while things are running in the background, you'll have to use another thread for not UI stuff. If you're updating things on the UI from the other thread, you need to use scheduler to report changes to the UI thread. Reed has a good tutorial here... check out part 16 also
 
Easy sucks
 
lol
 
If I pick a record with eager loading and I make a copy of it, can I save the entire record and expect all associations to be staisfied?
 
Simplicity rocks
 
@Darek yes.
 
3:16 PM
@NETscape It's not my question, I've just seen it asked a hundred times and was looking to close it as a duplicate of a canonical answer
 
meaning records replicated all over the place?
I've seen many posts on this, but none which actually worked
but then again, I was using a database with INSTEAD OF INSERT triggers
 
:S
 
@Darek if the objects are attached, then no it shouldnt
 
I like the simplicity of EF
 
3:17 PM
but it also depends on how the relationships are set up
 
watch this
http://www.infoq.com/presentations/Simple-Made-Easy
:p
EF is not simple
EF is easy
EF is a very complex framework
 
when you say linq2db do you mean linq to sql or this: github.com/linq2db/linq2db?
 
but it tries to do a very complex thing.
 
@PatrickQuirk ahh, yeah. hard to choose one. it all falls under the Q: How do I stop UI freeze/update UI while loading data A: Don't load data on the UI thread.
 
Linq2Db = Linq2Db
 
3:19 PM
@NETscape Yep, thanks. I'll keep looking
 
@DavidDV OH THX
 
Simplicity is prerequisite for reliability.
love it
 
I love the way AngularJS handles data binding and loading.
 
nice presentation so far @DavidDV
Me too @Squiggle
 
@PatrickQuirk I would say maybe search for "wpf busy indicator" or something, that's basically what OP is trying to do. However they might need a more detailed answer because they might be updating bindings in the synchronous work...
 
3:22 PM
@PatrickQuirk Use PostSharp Threading Toolkit
@DavidDV does linq2db recognize columns with default values?
 
@Darek in what way (I don't use default values btw)
 
some of my columns have newguid() as a default value
emphasis on some
my devs have no standards
bunch of yahoos
 
Guids are great as clusterd indexes on sql server ;)
 
so for now, I just set all GUID columns to Guid.NewGuid
same effect right?
but I'd prefer to know if there is a default value, so I can skip in my Automapper maps
 
I would say, test it out, because I can't really understand the details of what you are trying to do :)
 
3:28 PM
just love how much code linq2db generates
[Column("CLAIM_AUTHORIZN_LEVEL"), PrimaryKey,  Identity] public long      CLAIM_AUTHORIZN_LEVEL_Column { get; set; } // bigint
in this scenario, linq2db knows it is a identity column
so it will not try to insert value
[Column,          NotNull              ] public Guid      ROWID                        { get; set; } // uniqueidentifier
but there if no HasDefault attribute
would be nice if that was discoverable
Would be also nice to specify a subset of table to generate the POCOs for
like in EF
you can choose 5 out of 500 tables
can you do that in linq2db?
 
Right. Time to go drinking.
 
@Squiggle Awwwwwwww I wanna go drinking :(
 
Cheerio, folks. Have fun with your computers and programming things.
@Sippy then come join in. Can you get to Dusseldorf by 10am tomorrow?
:D
this weekend is going to be messy :(
 
Probably could if I put my mind to it haha
 
technically speaking, I could just delete table,
@DavidDV any idea how to limit T4 to a subset of tables?
 
3:34 PM
Sippy: you're in the UK, right? Where abouts? I'll take you out for a beer if I'm ever in the area ;)
or if you can get to ngEurope in Paris in October
 
Can't you just change to the code in the T4 template
 
It's a trap
 
shhh
 
I guess it gets the tables from the Database, just limit that list
 
looked, but could not find
 
3:35 PM
anyhow. Cheerio!
 
right
 
@Squiggle Swindon :P
 
@Sippy my condolences
 
@DavidDV I guess I could even drop T4 and hand-rolled it
public class DbNorthwind : LinqToDB.Data.DataConnection
{
  public DbNorthwind() : base("Northwind") { }

  public ITable<Product> Product { get { return GetTable<Product>(); } }
  public ITable<Category> Category { get { return GetTable<Category>(); } }

  // ... other tables ...
}
 
3:39 PM
true that
 
@TomW Thank you, thank you.
At least I work in the 'nice' part.
 
What's wrong with working in the UK?
 
Nothing, there's a lot wrong with working in Swindon.
Anyway, I'm going on holiday.
See you round folks
 
hey people
 
Oh, is it a widely known not good for working place?
 
3:47 PM
No
 
@SteffenWinkler Hi
 
It's widely known as a shithole.
 
I see...
 
hope someone with a little experience on parallel/threading is here. I've a Parallel.Foreach loop that executes a method and if that method returns false, I want to set a bool to false. I do NOT want to evaluate the boolean during the Parallel.Foreach and it is defined outside the Parallel.Foreach.
Now, do I need a lock() around the myBool = false statement or not?
I'd say no, but since .NET is sometimes kind of weird, I want to be sure about this
bool myBool = false;
Parallel.Foreach(someList, (singleEntry) => {if (!SomeOperation(singleEntry)){myBool = false;}});
if (!myBool){//do something}
 
you do
 
3:51 PM
object locker = new object();
bool myBool = false;
Parallel.Foreach(someList, (singleEntry) => {if (!SomeOperation(singleEntry)){lock(locker){myBool = false;}}});
if (!myBool){//do something}
 
@SteffenWinkler
 
@Darek I need to lock?
 
but only if the value could be changing to true or false
 
/away <--- what's the equivalent of this here ?
 
your code (above) is not changing state @SteffenWinkler
myBool never becomes true, right?
 
3:54 PM
Probably /afk
I remember Kendall using something similar
@MarkRichman ^
 
you could use Interlocked.Exchange<bool>
 
!!help
 
@RodrigoSilva Information on interacting with me can be found at this page
 
I take it back, Exchange requires reference type
@SteffenWinkler
ReaderWriterLock is used to synchronize access to a resource. At any given time, it allows either concurrent read access for multiple threads, or write access for a single thread. In a situation where a resource is changed infrequently, a ReaderWriterLock provides better throughput than a simple one-at-a-time lock, such as Monitor.
 
is anyone here
-4
Q: List out of List C#

Customized Namewhat if i have one this and want another out of it for example, I have this, List<User> users = GetAllUsers(); but what I want is Listof firstname, List<string> firstNames = GetAllUsers(); Is it possible to convert List<Users> into List<string> of FirstNames out of box ? Edit FirstName i...

I need 1 more open vote please
 
4:06 PM
It has been answered already, why do you need an open vote?
And I bet there are dozens of similar questions already on SO :P
 
because i updated it then i got answers
i have too, pleazo :(
 
I don't think I can vote to re-open a question
 
you can up vote though :)
 
So, you're asking us to up vote an already answered question which is itself a duplicate of several others?
 
@CustomizedName why are you asking this again?
 
4:09 PM
not asking it again
I cannot ask questions anymore now
one moderator said that if I manage to reopen couple of my questions he will let me ask questions again
which is why i am asking for open votes
however this question anonymously got 4 votes already
so i need 1 vote
 
you can also ask your question here
 
its related to Office 365
 
Edit your question to be more readable @CustomizedName, we'll even provide you proper english if you're stuck on wording
 
@Darek correct. If it's changed to false, it stays false
sometimes I think I'm an idiot. Then I see code like what I'm currently seeing
 
4:19 PM
if you lock in a parallel for....
almost sounds like a place not to use a parallel for
 
@drch Whether you think you can, or you think you can't--you're right. - Henry Ford
 
it basically amounts to this:
string myString = "";
foreach (var elem in elements){myString += ";"+elem.SomeStringProperty;}
// some stuff happens, but myString is untouched
foreach(string elem in myString.Split(";"))
{
}
and I'm trying to figure out why that program is so friggin slow and crashing on bigger files...
 
posted on August 22, 2014 by Visual Studio Blog

When it comes to ensuring that code quality is high, methods and approaches vary by developer. The Visual Studio team would like to hear about the ways in which you ensure high code quality. Specifically, we are looking to developers building hybrid apps using Apache Cordova™ and/or developers building web apps, to provide feedback on their experiences through our anonymous survey. Your f

 
@SteffenWinkler are there already existing ";" in the strings?
 
o/
If I create a function to return a result set from a database query in .net do I put the data in a DataSet or a DataTable?
i am thinking DataSet but all the existing code shows DataTable
 
4:35 PM
@Jojo neither. Do not use those structures. They are big, fat and slow
 
@SteffenWinkler Okay I need the data, what do you recommend?
 
@JoJo define yourself some classes (if you don't have those already) that have properties for the needed data
after that, retrieve the data by using a SqlDataReader
 
you mean like a property for each column value and retrieve them one by one?
 
for each row you create one object of your class and put it in to a Dictionary or List, depending upon if you'Ve something like a primary key
basically, yes
 
okay, ty
 
4:38 PM
it involves some typing but is faster
 
good to know
 
if you've the money/time you could go big and use a Object Relational Mapper
 
awesome
I will research LinqConnect at some point, possibly after I do ANY Linq of my own to begin with lol
is it Linq or LINQ?
 
@JoJo C# without Linq is...blergh
 
aye
 
4:40 PM
I think both are valid
 
4:53 PM
I am trying to create an html file in c# then populate it so here is what I have

using (FileStream fs = new FileStream("test.htm", FileMode.Create))
{
using (StreamWriter sw = new StreamWriter(fs, Encoding.UTF8))
{
sw.WriteLine(myHTML.ToString());
}
}
the trouble here is that I cant see where the file is saving to
it does not save in the main folder
 
@Skullomania it should be in C:\
 
I looked there and did not see it....i will look again
 
@Skullomania it could also be where your application files are. (usually your debug folder)
mainly your executable
to be on the safe side, you could use Path.GetTempFilename()
 
i looked in the debug
 
.NET will create a random file in a temp folder so you don't have to worry about user permissions/where that file is.

When you are done writing to it, transfer it to where you want it and give it a decent filename
to find your file..do you've Windows 7?
if yes, open up the explorer, navigate to 'Computer' and in the searchbox enter 'name:test.htm'
that may take some time but it'll find it
(usually)
 
4:59 PM
What would be the fastest way to allow me to download data from another remote server in a web application with ASP.NET? Impersonation isn't working.
 
@SteffenWinkler I will try it
 
IF OBJECT_ID('tempdb..#UserIDs') IS NOT NULL
DROP TABLE #UserIDs

Is a #TempTable drop required in production SPROCS?
 
@JoJo if you don't intend to keep the temp table around'
 
Does anyone know how to get 'all properties' into a poco with json.net?
e.g. {"a": 1, "b": 2} => into a class
 
@JoJo it's a good idea to always empty/clear/dispose of everything you don't need anymore. Be it for security reasons or for memory reasons.
@RoelvanUden nice to see you. What language is it you are speaking? ;)
 
5:10 PM
Yo! C# :P
 
I know C#, that's not C# ;)
poco...json...
 
poco=plain old c# object
json = javascript object notation
therefore, relating to getting json (web standard) into a c# class o_o
 
java...blerhg
but I guess you've to write yourself a parser
 
What. No. Json.NET is the go-to thing that parses JSON for you onto POCOS. I'm just asking how to define a dictionary of properties in a POCO that gets filled for you :P
 
oh, silly me.
 
5:13 PM
@RoelvanUden Can't you use the JObject thingies to parse it yourself?
 
@RodrigoSilva Uhm.. I don't want to. I want it to make an entire object graph.
 
@RoelvanUden I've got a path in our database to a local file, what is the best way to download this when the button is clicked?
 
so, i need to do a comparison on two objects of the same type. I've overridden obj.Equals, implemented IEquatable<T>, and made my own Equals method that obj.Equals calls.... it keeps telling me to override gethashcode also, but I don't give two shits about that method.... what are the downsides of not implementing it?
 
The interface will bitch if its not there - but if you have the empty method it won't care
 
i dont think its the compiler complaining, think its fxcop or restsharp
oops
resharper
 
5:17 PM
blue lines? ya as long as the method sig is there
 
yeah
so i understand that it'll compile and work, but i want to know if its dangerous to do w/o implementing gethashcode
 
@Steve Your object will break or severely slow down dictionaries and the like
 
won't it just call the base getHashcode if there is no codeblock?
 
not a clue
 
@juanvan Not if it's actually there
 
5:18 PM
have to tell it :Base()
ya
 
@KendallFrey and the like.... so like, lists? I have a list of these puppies and I def. use linq on it, will it slow that down?
 
@juanvan no, you've to call it
 
Cool never did it - kinda speculating on that part
 
@Steve nope, not lists
Just things that hash it, usually dictionaries and hashtables
 
okay cool
 
5:20 PM
Just implement GHC a simple way, as long as you don't return a constant value
 
GHC?
!!google GHC
 
fuck you google
 
It's kind of expected that if Equals is true, GHC must return identical values
 
oh gethashcode, got it
 
5:21 PM
that's it for me for today, have a nice evening everyone!
 
If Equals is false, GHC should try to return different values
 
all i want to do is compare two Address classes to see if their address has changes lmao, Y U WANT ME TO FUCK WITH HASHCOdES MSN
just going to implement my own and say fuck this IEquatable crap
 
So they can use your Address class in dictionaries and lookups
 
address.ISTHISFUCKINGTHESAMEASTHIS(otheraddess)
 
Wrong naming convention @Steve
 
5:23 PM
You should learn to implement GHC
 
its just a model, i want to keep it as small and precise as possible, i don't want all this hash code shit in my model
 
A simple way is to XOR all the hashcodes of the properties
@Steve Hashcodes aren't shit, they're essential parts of objects
 
let me rephrase, i don't want that level of complication in something thats supposed to be simple
not that i'm saying its complicated
but for a model its fluff
 
nah
properties are fluff too. just use fields ffs
 
@RoelvanUden Is there a simple way to have it download the path? Rather than build elaborate web-client or response?
 
5:36 PM
Anyone, because anytime I call new WebClient().DownloadFile(readOrder[@"SignaturePath"], @"Image.jpg"); it says I can't convert void to string.
 
@Greg Put the (new WebClient()) in parenthesis - does that fix it?
 
@SteffenWinkler @Pheonixblade9 thanks guys
 
// ======================================================================
// This source code form is subject to the terms of the Mozilla Public
// License, version 2.0. If a copy of the MPL was not distributed with
// this file, you can obtain one at mozilla.org/MPL/2.0.
// ======================================================================
using System.IO;
using System.Net;
using System.Threading.Tasks;

namespace GenerationExample
{
    internal class Program
    {
        private static async Task<bool> DownloadAsync(string from, string to)
 
@ReedCopsey Nope.
 
@Greg ^
 
5:47 PM
@RoelvanUden Why don't I have access to GetResponseAsync?
 
.NET 4.0? Use the non-async versions then.
 
@RoelvanUden Where should I put the to, if it is just a random person? Their download folder?
 
Its just a path. Try the code.
relative to exew
 
@RoelvanUden Says I can't convert path to string.
hlViewSignature.NavigateUrl = DownloadPod(readOrder[@"SignaturePath"].ToString(), @"Signature.jpg");
 
You didn't run my code.
Before hacking and slashing stuff up, try it.
Then start modifying it slightly o_o
 
5:59 PM
Read: my code always works :P
 
Exactly! Thank you @RodrigoSilva :-P
No but seriously, if you are learning, learn step by step. Don't just take something, assume it works one way, and modify it completely.
 

« first day (1406 days earlier)      last day (3543 days later) »