« first day (1970 days earlier)      last day (3204 days later) » 

14:00
weird
@rlemon check your console
already reported plebs
used the bandwidth perhaps
user47589
i missed the help vampire
user47589
that makes me a sad pony
Ponies should not be sad, they should be happy. Be a happy pony.
14:02
How do I fake this? :)
public GameData FileOpen ()
{
if (File.Exists(filePath))
{
bf = new BinaryFormatter();
fs = File.Open(filePath, FileMode.Open);
data = (GameData)bf.Deserialize(fs);
fs.Close();
}
else
{
SaveForWinX86();
}

return data;
}
@Amy I missed it too </3
@Vlad please format that code
this should make you all happier:
@Vlad you can press ctrl +K to do that
HELP ME!!!
How do I create a Web API project?
user47589
14:03
oh no a help vampire
using Visual Studio? or scaffolding?
user47589
pretend banhammers @JakobMillah
@Amy please sir, I have a doubt. how 2 jquery for my database?
haha
user47589
another one! and misgendered! bans rlemon for real
14:04
@Squiggle what does that mean? isnt VS just the ide that would allow you to interact with some framework that provides scaffolding?
user47589
i feel happy again
@Vlad just return (GameData)bf.Deserialize(fakedMemoryStream);
    public GameData FileOpen ()
	{
        if (File.Exists(filePath))
        {
            bf = new BinaryFormatter();
            fs = File.Open(filePath, FileMode.Open);
            data = (GameData)bf.Deserialize(fs);
            fs.Close();
        }
        else
        {
            SaveForWinX86();
        }

        return data;
    }
AHHH FUCK, god damn it hahaha
14:05
@Michael oh sry im using notpad++ how i create the c webApi?
@Squiggle step 1) download dreamweaver
and what is a fakeMemoryStream?
user47589
and RealPlayer
How do I download dreamweaver? @rlemon?
@rlemon Pahahahaha
14:06
and google ultron
Update Adobe reader, probably will solve your issues
dreamweaver i cannot aford can you give seril number??
user47589
@Vlad are you asking how to mock that method?
pliz gif now
fri itenz pliz
@ntohl I should create FileStream with fake data without oppening a file?
14:07
@Amy yes. Unit test it
I <3 ketchupbot
plz pwrlvl me 1-99, u plz cn u do dat?
@AdrianK. kek
@Squiggle Good ol' Diablo 2 times :)
14:08
pl?
br?
Tibia
I hated Tibia
@Squiggle best sub ever!
It haven't offered me anything good to stick with the game
I enjoyed it around 2004
user47589
@Vlad i don't know much about unit testing/mocking. one of these jokers will have to bear the burden.
14:09
@JakobMillah ever heard about 2Moons/Dekaron?
Still got a level 306 today.. :/
@rlemon I like /r/marijuanaenthusiasts
2moons sounds familiar, but I don't think I ever tried it
Hahaha
/r/childrenfallingover is fun, /r/shittyaskscience is fun, /r/wheredidthesodago is also good
14:12
the sandwich: no please I have a family haha
@Amy best wishes for women's day, warm and fuzzy feelings for every day and every morning, a lot of smile, not being surrounded by dicks nor feminists, also here, have a premium grass: img.ctrlv.in/img/16/03/08/56deddd91de0a.png
@Squiggle Invalid or fake data - missing "progressive vegetarian grindcore" lmao
I like how they plot life expectancy of the US population by musical genre
are "always-on" displays in smartphones actually special hardware or is it basically just a screensaver app that keeps your screen on?
14:18
how to make a fake FileStream ?
but I need it to have default data
instantiate a new one and initialize with the default data I guess
@StevenLiekens There is such a thing? whyyyy
I like that graph
to check the time and notifications
But there is no constructor without parameters
14:21
I just got my S7 and it has an always-on display
which is weird coming from a phone that didn't have that
@Vlad You could always create that file and read it to the stream
@AdrianK. I want to unit test a method that reads a file, but that would not be a unit test if I open a local file. That would be integration test :)
Maybe integration test is the only applicable way to test it :)
@StevenLiekens Oh, because it's LED
still, seems pointless
@Vlad I don't know much about testing, sorry :/
@Vlad personally I wouldn't unit test that.
Just make the footprint of the file access as small as possible, and model the potential errors.
14:31
you could use a MemoryStream instead of a FileStream
@Amy do you know of any way to create a query with EF based on a particular list?

For example, if we have a list like listOfItems and I want something like:
var query = context.Items.Where( listOfItems)
or you could mock a stream
@Squiggle ELMO WANTS TO BE FREE!
elmo use bad english in educational show
14:33
Or does anyone have any ideas on how to create a query with EF based on a particular list?
yes but I need to create FileStream with the obsolete intPtr constructor or with SafeFileHandle and then some how write to it with code. In fact I have 23 fields some ints some bools some floats. Not sure if it is plausible?
not sure why you need to use obsolete APIs
can I cast MemoryStream to FIleStream?
user47589
@Michael what do you mean, create a query based on a list?
14:36
FileStream -> [ObsoleteAttribute("This constructor has been deprecated. Please use new FileStream(SafeFileHandle handle
So no unit test for that method then hehe
Good morning folks
Good morning, cb
user47589
@Vlad can't you just create a SafeFileHandle? the constructor takes an IntPtr
I'm trying to deserialize a json string to create my object and it won't work :(
I get nulls everywhere
Casing mode on the serializer perhaps?
14:40
@kush WebAPI/MVC?
@Squiggle just a httpwebresponse
@TomW not sure
the cases of the properties match? Can you provide an example?
This morning started with an very irate email from the sysadmin: "$drive on $QAServer is full. This drive is only to be used for the OS. Please remove anything that should not be on $drive." Me: "$drive has a 23 GB SQL script in your user folder."
Yay
@Michael all linq/ef queries operate on lists
user47589
@mikeTheLiar hahahahahahahahahahahahahahahaha
14:42
@Vlad No You can't. But You can use the MemoryStream just like a FileStream. Generalize the methods to Stream, and You can use both FileStream in production, and MemoryStream in unit tests
23GB of tsql?
@tweray yeah, somehow. I have no idea how that came about.
you'd get that if you script the contents of a database
user47589
i know how it came about. gather around, and i'll tell you, in song.
♬♫♫♫♫♫♫♫♫♫♫♫♫♫♫♫♫♫
14:44
♫♫We're whalers on the moon♫♫
@mikeTheLiar did you accidentally CC all on your response?
♬♫♬♫ 🎺 jazz solo
@TomW nah, I gave her a call. I didn't feel like being that big a dick this early in the morning
@ntohl wow thanks. That might be useful.
14:46
the part about getting the response looks ok
@ntohl but I have 23 fields with data, will I be able to easy write bytes as needed into a MemoryStream, or its hard to do it manually? Somebody tried?
My reply-all was basically "The space issue on $QAServer has been resolved"
@kush so you've got an array of objects. Each object contains a single property 'participant', which is of type Player.
yes but the properties of players are null
reply-all is the devil
14:47
I had a better situation yesterday
I was writing an business email to one of our biggest clients
@Vlad MemoryStream is same like FileStream. Just the output is memory. It just works.
@kush indeed - you've got one extra object there.
some anonymous object with a single property.
Took me ~1hr to put it all together, and I've sent it proud of what I've done.
Suddenly I realized that I've screwed up
Looking at the email salutation there was (direct quote): Dear XXXX-HOLY-SATAN-SWEET-JESUS,
I forgot to replace that placeholder. I've fucked up. Still waiting for the response...
lol, did you send it already?
@AdrianK. Ahahahahahahaha that is fucking brilliant ahahaha
14:50
Yeah, I've noticed it as soon as I've clicked "Sent emails" mailbox.
@RoelvanUden I hope that the client has also good sense of humor like you :D
just send them a follow up: "oh shit sorry my calendar fucked up, i thought it is April 1st today"
So it was pretty much: XXXXXX-KURWA-JEBANY-CHUJ-DUPA?
@CharlieBrown I meant something like this:
list<Item> listOfItems
var query = context.Items.Where( Items.Contains listOfItems )
@tweray I've sent a follow-up already: "Sorry, my brain is numb after over 8hrs of working simultaneous on few projects. I do apologize."
If I was your client, I would remember that email and keep it for special occasions :D
14:52
@JakobMillah no, it was plain English, those worlds you've used are bad cuss worlds :D
I know, but they tend to not be as bad in polish as they are in other languages :P
anyone use telerik reports and not hate it?
So what did you learn; To not joke around in client emails ;)
☮
@Michael Take a look at the linq methods available
yes BinaryWriter to byte array and then byte array to MemoryStream.
14:55
If its the same type in both lists, its quite easy
@Squiggle where at?
If its not the same type, you can export the ids of one set as an array and join on that
I've got a question, what type of persistable storage would you use to push data throughout an application?
[{
    "participant": {
        "id": 36731929,
I'm assuming a cookie doesn't like Json stored in it, though it is simply a string.
user47589
14:57
persistable storage? you could use something like a messaging server
@CharlieBrown yeah here is the statement that I kinda want to work, but it doesnt
because Its going from Matter to Int
context.Matters.Where(y => selClient.Matters.Contains(x.MatterID));
{ participant: { /* this is the player */ } }
@kush either you update your view model to match your inputs, or fix the inputs
--
var ids = selClient.Matters.Select(m => m.MatterId);
context.Matters.Where(y => ids.Contains(x.MatterID));
context.Matters yes that is true.
@mikeTheLiar Good one
15:00
@Amy Basically I have a list of Regions, Districts, and Store Locations accessible by the logged in user. I want to store it throughout the life of the application while they're logged in.
user47589
database then
user47589
or memory
@CharlieBrown is the first statement you did wrong or something?

context.Matters.Where(y => selClient.Matters.Select(m => m.MatterID).Contains(y.MatterID));
they are equivalent right?
@Amy I'm receiving it from the database.
i think ef will complain, but cant remember
the second is easier to read
15:02
@CharlieBrown okay I will go with that
@Greg per session cache, is the term your looking for
@Amy Was thinking cookie or session, but I didn't like those so I was thinking of a server cache.
user47589
oic
cookie will not scale well
I would suggest redis
when I write to my memory stream how can I save the notion that I have a field float score with value of 1000?
15:04
@Greg how about browser's Local Storage?
@AdrianK. good call
BinaryWriter has function Write() which accepts Single, but when I deserialize my MemoryStream is it written that the field is called score?
There is not method that saves the name of field in BinaryWriter :)
@AdrianK. That is a positively.
or maybe if I deserialize the MemoryStream and cast it to my class GameData, it will know what is what and assign the fields appropriatelly?
that means order is important
@Vlad deserialize it, yes. cast it, no
15:08
@KendallFrey this worked so far, no problem: GameData data = (GameData)bf.Deserialize(fs)
@Greg on plain ASP.NET there was some variable called Application, I've used it to store online users dictionary once. The drawback is that you loose all the data upon server restart
user47589
has anyone here embedded the Ace editor into a webpage? i'm doing what the embedding guide says, but my editor won't appear on the screen and i have no idea why
I'm adding to my resume, "Lead Devil's Advocate"
user47589
is that "lead" as in leader, or as in Pb?
@CharlieBrown what about this? I want the SQL from this query thats why I call ToString() at the end. But it is no longer a Query because I ask for AllMatters at the end, which is a property of the Contact that was found

string queryString = context.Contacts.Find(selContact.ContactId).AllMatters.ToString();
Is there a way to ask for the "AllMatters" while keeping it as a query
user47589
15:17
oh, i just had to set the damn height on the div. i'm a moron today.
user47589
puts on dunce hat
context.Contacts.Find(selContact.ContactId).AllMatters.AsQueryable()
Its just a list of AllMatters associated with the contact
so List<Matter>
is the type
@CharlieBrown I did already try that but then calling ToString() at the end doesnt generate SQL it creates a string representing the Object
Why would calling ToString() give you a query?
Calling ToString() on an Iqueryable<> generally gives you the SQL
15:23
var list = new List<int>();
list.AsQueryable().ToString();
Would not give you a sql query
user47589
it works for dbsets, its an EF thing
so its purely on dbSets?
user47589
there's nothing in the IQueryable<T> contracts that says it will give a query, so you are not guaranteed to get what you want.
user47589
it works for dbsets cast to IQueryable<T>. It might work for other implementations, but that's the point: its implementation specific
So is there anyway for me to get SQL from the expression I'm trying to create?

string queryString = context.Contacts.Find(selContact.ContactId).AllMatters.ToString();
with or without ToString()
user47589
15:26
why?
user47589
what do you want the query string for?
AllMatters is going to load Lazy, so the query will execute by proxy
@Amy we still haven't been able to figure that out since yesterday
How is everyone this morning?
because a method I set up takes in a SQL query string in order to reuse that query on the fly as needed
15:28
20 hours ago, by Michael
@mikeTheLiar do you have any thoughts on passing a particular query to a form. But being able to change the dbcontext associated with it at any point in time?
Hey @KalaJ! Good morning to you too, also best wishes on women's day if I not misgendered you ;)
I'm assuming this is still the same issue?
@mikeTheLiar knows
yeah.
@AdrianK, Thanks Adrian :)
Mike knows much, tells some. Mike knows many things that others do not.
15:28
BULLSEYE :O :D
user47589
then maybe you shouldn't be using EF
I celebrated on Saturday by going to Google IWD celebration lol
EF works fine for most of what I'm doing, but for this particular instance its tricky
I love it when co-workers come to me with problem and I fix it in <5 mins. </smug>
Y'think I could just get paid to do that for a living instead of actual work?
user47589
15:30
then don't use EF for this instance.
user47589
just write your query by hand and be done with it
@Michael is AllMatters a readonly prop?
If so, I can probably make this work
@CharlieBrown yes
show me some codes
There isnt a pretty way to show it. but okay hold on
15:33
gist
        public List<Matter> AllMatters
        {
            get
            {
                var allMatters = new List<Matter>();
                allMatters.AddRange(PlaintiffMatters ?? new List<Matter>());
                allMatters.AddRange(DefendantMatters ?? new List<Matter>());
                allMatters.AddRange(OLAAttorneyMatters ?? new List<Matter>());
                allMatters.AddRange(OLAParalegalMatters ?? new List<Matter>());
                allMatters.AddRange(JudgeMatters ?? new List<Matter>());
@Michael I meant, show me the code behind "AllMatters"
nm
Yep. nope. Not gonna happen
lulz
How do I use Point3D in c#, brand new to the language and syntax
This will cause an execution of up to 8 seperate sql queries
There is no way to bundle that up in one sql string based on how it is written
15:42
And EF sometimes does weird stuff with inheritance AFAIK
Performance-wise, this will likely murder your sql server
sigh. but i can think of a solution.
I feel dirty writing this
Make it work.
lol its okay I probably need a broader solution anyway to this problem
aww
Did mathematics not come back?
That's upsetting
string queryString = string.Empty;
using (LitTrackContext context = new LitTrackContext(ConnectionString.LitTrackConnectionString))
{
    queryString = context.Contacts
        .Include(x => x.PlaintiffMatters)
        .Include(x => x.DefendantMatters)
        .Include(x => x.OLAAttorneyMatters)
        // etc
        .Find(selContact.ContactId).ToString();
}
15:46
@Sippy who upset him?
@Ggalla1779 He upset everyone and got kicked repeatedly.
lol he must be off to google
this gist.github.com/mikey32230/caec14dd8d05ea240004 code could result in thousands of individual sql query calls against the database.
Is this why I got a toast this morning reminding me to be nice?
If I was trying to think of a way to burn my sql server, this would be the code i would start with
15:48
I was just told by my darling partner that in her country they give gifts on int womens day
she wants Platinum earings...small
sigh
@mikeTheLiar I got one of those
Thought someone flagged me hahaha
@Ggalla1779 Make her a card that says "You can accomplish anything - buy your own fucking earrings :)"
@Sippy :D
Fucking earrings sound dangerous. Better to stick with regular earrings.
@mikeTheLiar Everyone got that. It's new.
starting sometime yesterday afternoon every got that the first time they logged into chat
15:53
100% of the women who work here earn more than I do
This is a prime example of the matriarchy and I am entitled to equal wages.
all-male company?
Nope
0/0 = 1?
They're just better than me
how dare they
15:54
Exactly.
damn feminists, allowing women to demonstrate genuine skill and talent that is better than a man.
ruining this country, I tell you
I mean I'm not sure - but I think you missed my point.
And that is that I want more money right now because I want a new car.
And a flatscreen.
where can I modify my hands so that they don't leave smudges on my new phone?
you didn't smudge it right!
@StevenLiekens that's why phones now have voice activation
15:57
Ask Mr. Hands. He might be able to help
user47589
cut off your skin.
user47589
your skin produces oils that cause smudges.
user47589
so removal of skin is recommended.
"OK Google. [ding] Locate me some top totty forthwith"

« first day (1970 days earlier)      last day (3204 days later) »