« first day (2385 days earlier)      last day (2565 days later) » 

9:13 PM
Any C# Mongodb people in the house? Just posted this - no idea how to make serializer not add the darn Name and Value fields so annoying. stackoverflow.com/questions/43667862/…
 
This sounds vaguely familiar.
 
@RodrigoSilva possibly
augh my laptop battery died
my bios was stuck in a loop of trying to boot from a corrupted grub bootloader on a secondary disk
and wouldn't give me my boot options even after removing the battery
so I had to code a virus that when the bios scanned my removable drive it would become infected and upload the replacement bios I just wrote
my computer is 2x faster now
and the screen is even wider
but yeah it took a few minutes
@PaulW. I upvoted. Not because its a good question but because I had trouble getting a similiar question answered
you would find the answer if you did a few tutorials on json and serializing
 
hehe
 
:|
@SteveG hi
 
hai
 
9:27 PM
@JABFreeware Yah have not found anything in any of the tutorials yet. I do not have this issue with other json serialization of objects; just mongodb it seems.
 
@PaulW. sad story bro
I feel like im being a bit of an asshole today
more so than other days
 
@JABFreeware all good man
 
better be
 
@PaulW. yeah it's definitely the object you're serializing
 
@SteveG why did you tell him?
 
9:30 PM
i was an asshole yesterday
i can't be an asshole two days in a row
well, i can, i shouldn't
2
Q: Convert BSON to valid JSON

BanksySanThe BsonDocument.ToJson() method returns invalid JSON, as ObjectID() and ISODate are not valid JSON. What's the best way to get valid JSON from an arbitary BSON document?

 
@SteveG because its like crack and is addicting ?
 
does that help at all?
@JABFreeware your mothers
 
@SteveG what about my mother?
@SteveG so he sucks dick?
BBC
 
BBC
 
sigh
unzips
 
9:34 PM
lmao
 
I am familiar with ToJson and setting Strict - is there a way to set that mode so no matter how it is serialized it uses Strict? Because List<BsonDocument> obs is being shoved through Telerik's .ToDataSourceResult :-p
 
Anyone worked with AppDomains from a context of putting processing intensive work in them so that it can be easily killed off if necessary?
 
zips
@CodeWarrior no
 
@PaulW. i think the difference is, you're using MVC Json(), have you tried using strict, and calling ToJson on the bson doc?
 
Good god, can we have some more replies? The image of the Rock tonguing the microphone is freaking me out.
Push it off the page
 
9:36 PM
basically, i think you have to call the ToJson from the bson doc, because it probably can't be converted to proper json with external docs, but i could be completely full of shit
1 message moved to Trash
 
LOL
 
with external libraries*
 
@CodeWarrior SO chat dark theme collapses images by default
 
Hmmm
 
can do this all day man
 
9:38 PM
1 message moved to Trash can
 
Is that a stylish thing or what?
 
i dont care
others do
youre not beig a dick to me you're being a dick to them
 
Hell I was just screwing around
 
@SteveG are you implying im a caring person?
 
9:39 PM
yes
 
Hmm. maybe I will go back to Chrome. Switched back to firefox a while back cause my RAM was suffering
 
@SteveG wht makes you think that?
 
idk why they don't just make SO chat open source
we have people programming bots in every room, themes to give basic functionality
 
@CodeWarrior download more
 
@JABFreeware ISP sez I download too much. They threaten to throttle me
Work wont pay for a commercial account.
 
9:42 PM
@CodeWarrior torrent the ram over a vpn
 
It is not about where or what I am downloading. They see my throughput even through a VPN.
I had a total download of 600 GB last month.
 
@SteveG Yah Telerik's ToDataSourceResult wants an enumerable so .ToJson is not helpful as it ends up string?
 
@CodeWarrior I used 200gb in a week once
 
None of that was illegal either
At least, to my knowledge
 
course not
 
9:44 PM
@PaulW. ah bummer
never used Telerik or mongodb
just winging it here
 
Really. Downloading VMS from (and uploading them to) Azure.
Which brings me back to my first question. AppDomains. I have an application that uses Tesseract OCR.
Occasionally we feed it a particularly bad image.
 
oh my
dirty domain
 
It churns on it for sometimes hours and turns back crap characters. That is fine.
There is a timeout implemented in it, but badly.
 
feed it better porn
 
It will perform the timeout AFTER it has examined the image which is what is taking so long.
We thought about putting the calls in a separate executable which we can then kill easily.
 
9:47 PM
@JABFreeware imma kick you
 
@JABFreeware if you're eating porn you're doing something wrong
 
@SteveG you'd do that?
 
But that means that we then have to instance and initialize it anew every time whcih has easily doubled the processing time on average.
 
oh yeah
 
@SteveG i thought we were friends
what did I do now?
 
9:48 PM
!!bing Tesseract OCR
 
@SteveG i've used it
its good for te price
 
Also, spinning up a worker thread and executing the tesseract processing on that and calling abort only requests and abort. Tesseract ignores it
 
i dont even know what it is
 
so is porn a banned word or something?
its free OCR processing
 
9:49 PM
Object Character Recognition, takes images with text, figures out what the text is.
Pretty sure I read that Google uses it in a lot of their stuff
Open source on git.
 
oh
at work we have some computer vision guys that made an OCR
 
Sounds like a heck of a lot of work
 
@SteveG you're just telling me this now?
@CodeWarrior not as bad as it sounds with openvc
 
they're smarter than me, idk
machine learning stuff
 
@SteveG id like to meet these beings
 
9:53 PM
@JABFreeware no, but you were getting more obnoxious than me, and most of the time i walk the line of 'steve should probably be kicked'
 
@SteveG oh so no one can be more obnoxious than you?
because it hurts your feelings?
ego?
 
well, if i'm on the line
and you're more obnoxious than me, that means you're over the line
:p
 
the line is a wide line
 
haha uh huh
 
@SteveG just sayin
 
9:55 PM
yeah it's my ego, get in the way of my ego again and you'll get it
 
I'll kick you both
 
now go on, get out of here
SHOO
i know you would mike, lol
because i walk the line
jk
im going back to watching dr phil
 
@mikeTheLiar why is everyone a moderator except me?
@SteveG hes an idiot
 
I also am not a moderator, and that is fine by me.
My moderating days are over.
I'm a man of peace now.
 
i just want to unstar stupid things i say
i don't really moderate
see, "im a douche bag" is starred
now i can remove it
 
10:01 PM
@SteveG but i have more points
 
i've also been in this chat for 7 years
6
 
@SteveG i've been here off and on for 4 years
 
oh wow
2 or 3 more then
LOL
 
and then I can rule with an iron fist?
 
im jk
i'm not against you being RO, but it's not just my choice
 
10:04 PM
mark my words the first thing I'd do is kick you
just because
 
lol
 
its a matter of principal
can I post a pg image?
 
yesh
 
lol weird
 
10:14 PM
random though: there are no treadmills for sloths
 
random fact: when sloths poop, it's more like a painful birth
 
but what if you poop a sloth?
 
@juanvan Yeah, I definitely figured it out. Making crazy progress.
 
hello
 
hey
 
10:27 PM
Entity framework is killing me. Is anybody here experienced with that ?
 
a lot of people here
 
Apr 14 at 12:43, by Steve G
You can ask any question you want except for one, which is "can I ask a question". If someone is around and can help, they will
 
yeah sorry. I'm kind of winding up to that :)
I'm just frustrated atm. : [
 
oh i know that feeling
 
I have shipped one commercial project with EF and now with this new one things that I expect to work just don't.
I'm starting to question if I understand the basic things about EF at all :)
 
10:30 PM
are you doing code first or database first (do you have an edmx, or manual mappings?)
 
@Riva im sorry you are feeling down
 
thanks
 
are you suicidal?
 
not yet
I use Code first.
 
okay
 
10:31 PM
Right now with SQLite
 
:(
 
hey, i warned him like 20 minutes ago lol
 
EF 6, .Net 4.5.1
 
im in a kicky-mood
okay, fluent api, or attribute mappings?
 
that hurt man
 
10:32 PM
ily
 
I was worried about him. For once I was caring and you go and do that. I will never care again
emotions.empathy = null
 
@Riva i've never used EF with SQLite
 
I prefer fluelent but with the late things not working, or not able to find a way to make them work with fluelen only I used couple attributes. So not, I admit, it's kind of a mixed mess.
 
okay
 
My problem isn't really SQLite related. or any specific DB related I think.
 
10:33 PM
okay, what problem are you running into?
 
its a problem weren't you listening
okay okay...
I'll go back to my corner
 
With One to zero or one relation
if the child entity is not loaded
EF just forgets cascade delete on parent entity deletion.
 
@SteveG "ohh a kick?" :D, reads the message he was kicked for :(
 
@JABFreeware start helping ;)
:(
 
!!s/(/)/
 
10:36 PM
@rlemon Could not process input. Error: unterminated parenthetical on line 5851
 
😬 god dammit cap
I wanted to turn that frown upside down
stupid chat evaluates my escapes and cap doesn't see them
 
I'm wondering now if EF really does cascade delete only on One to many ?! I dont know.
 
@SteveG I was helping.
 
what do you mean 'forgets', it doesn't convert to sql with cascade? Or it does, and it just doens't cascade
 
No keys (parent key and child foreign key) are nullable.
@SteveG It just generates SQL that deletes the parent and thats it. doesnt give a damm about the child.
 
10:39 PM
well thats not right, shouldn't SQLite error out?
regardless of how you're interacting with it
 
If though the child entity is loaded before the Context.Parents.Remove(parent), EF does do the cascade delete of the child.
 
Anyone else of you here getting a Connection Refused when trying to reach MSDN?
 
It doesn ton error out. But I think that's because of SQLite. I think (red something about) SQLite not actually giving a damm about FK constraints.
 
oh
hm
 
@icecub no. check for proxies. @SteveG see? I helped
 
10:41 PM
@icecub happens to me from time to time. once today. but maybe the link was dead.
 
@JABFreeware :D
 
But why EF ignores cascade delete. and only when child is not cached. I dont know.
tested it maybe 5 times
 
did you compare the SQL?
 
the EF generated ones ?
 
yeah
the two queries you got
 
10:42 PM
sure
nothing misterious there
the right one has "delete child" followed by "delete parent". as I believe it should be.
the wrong one has just "delete parent" part, identical from the right one.
 
@JABFreeware Must be a local (Netherlands) problem. I've tried with both my computer and my phone (4G) connection. Both return Connection Refused
 
I can double check but I think it's that.
 
4
Q: Cascade on delete not cascading with EF

Howard MayI have a simple sqlite database with two tables. When I manually delete (using SQLite Expert)an entry in table DataSets, the coresponding entry in OneD is deleted as expected. When I delete an entry in DataSets from Entity Framework it does not cause the coresponsing entry in One D to be deleted....

 
@icecub oh yes they banned the netherlands
no one told you?
 
@JABFreeware I honestly wouldn't be surprised xD
 
10:45 PM
@icecub not joking
 
Nah I know it doesn't make any sense, but there are no proxies, firewalls disabled and I've tried 2 different ISPs and devices just to be sure
 
yean NH block
 
I know about SQLite having all FK constraints off by default.
But I'm not trying to do the cascade on DB side. I expect EF to generate queries for that. And it - in most cases - does that.
 
@Riva i guess one option would be to load the child objects when you load the parent object
context.Table.Include(x => x.ChildObjectTable).Where(...)
 
I know. That should solve it.
But those are precisely children I don't want to load. more so simce I just want to delete them.
 
10:48 PM
@JABFreeware Uhuh, I'll just wait for the unban then
 
Besides I would really like to understand whats going on there with EF.
 
@Riva im just giving you options man
 
I appreciate it
 
@icecub they said its permanent
I could get you what they said about it
 
@JABFreeware Please do*
 
10:52 PM
one sec
 
I guess I can try to open connection myself with the pragma, force EF to keep the connection open and try to deal with the cascade on DB side.
With how SQLite works, I just hope that will work there at all :D
 
how are your classes mapped together
 
@SteveG I can post the code .. one sec
 
maybe your mappings are wrong, so it's not doing a cascade
 
Did somebody ping me?
 
10:55 PM
@JABFreeware I actually found it: infoq.com/news/2016/05/docs-ms-com
 
icecub did on accident @JennaSloan
 
Ah, ok.
 
@JennaSloan Ye that was me. Sorry
 
@icecub here it is:
After careful consideration we have decided to permanently ban the Netherlands. As many of our users have experienced, the Netherlands is not sending its best programmers. They are vampires, bad googlers, and use linux. We assume some are good people but ultimately this decision is for the greater good. This ban will be in affect starting on the 27th. Attempts to circumvent this ban will result a drone strike.
 
@JABFreeware Whahaha xD
 
10:57 PM
1 drone strike, or 1 drone strike per attempt
 
@SteveG they didnt say :(
but I think they mean 1 per attempt
 
aw :(
 
I recommend bypassing from this datacenter: cyberbunker.com
 
I admit using linux though..
 
NSA they're only joking
 
10:59 PM
GET HIM OUTTA HERE
 
lol
 
Not on this pc xD But ye, my webserver runs on linux
 
`
public class Video : TagsParent<Tag_Video, TagGroup_Video>
{
public long ID { get; set; }

public virtual VideoTitleNString TitleNS { get; protected set; }
}

public class VideoTitleNString
{
[Key, DatabaseGenerated(DatabaseGeneratedOption.None), ForeignKey("Parent")]
public long ParentID { get; set; }
public virtual Video Parent { get; set; }

public string String { get; set; }
}

class EFContext : DbContext
{
public DbSet<Video> Videos { get; set; }

protected override void OnModelCreating(DbModelBuilder modelBuilder)
damm can't make it format the code. sorry
 
!!tell Riva format
 
@Riva Format your code - hit Ctrl+K before sending and see the faq
 
11:01 PM
!tell Riva @Riva
 
I did see the faq and can't make it right
 
WHAAAAA
!tell Riva test
 
no worries
 
!tell Riva WOOOOOOOOOOOOOOORK
 
!!tell JABFreeware no.
 
11:03 PM
@SteveG Command no. does not exist. Did you mean: no, nou (note that /tell works on commands, it's not an echo.)
 
@SteveG do you see anything horribly wrong there ?
 
!tell Steve G no
!tell Riva no
 
@Riva maybe
 
why
does she listen to me?
!!help
 
@JABFreeware Information on interacting with me can be found at this page
 
11:04 PM
!!/listcommands
 
@JABFreeware help, afk, backup, ban, convert, define, die, doge, eval, forget, google, hang, imdb, info, jquery, learn, listcommands, listen, live, mdn, meme, moustache, msdn, mustache, nudge, refresh, spec, stat, stats, summon, tell, unban, undo, unonebox, unsummon, urban, weather, welcome, wiki, xkcd, youtube, zalgo, !, !!, $.baby, (4337654<<1)+1, (y), /somecommand, 2020/07/23, 3, 666, :p, </pissing>, ?, ^, ^5, abesnacking, abhi, abhishekpornfreak, acronym, afsari, ah, ahah, algosmarts
aliens, alot, am, angry, angryticks, annoy, apocalypse, appreciated, archerneat, artisticpoop, artistics
 
!!meme no
 
@JABFreeware deskflip, fuu, iseewhatyoudidthere, no, notbad, ohyou, okay, troll, trollface, youdontsay
 
!!angry
 
11:06 PM
(nope. doesn't work)
 
!!abhishekpornfreak
 
in JavaScript, Jan 21 '14 at 16:46, by Abhishek Hingnikar
they love there work like i love p***. maybe i should do a p*** site !
 
@Riva i'm not a guru at this, but i have a few things you could try. Instead of having a public long ParentID, have a reference to the actual Video class.
 
!!artisticpoop
 
11:10 PM
but i suspect thats not the issue
 
@SteveG whos the suspect then?
 
im not sure to be honest
 
It is actually there. Inside VideoTitleNString "public virtual Video Parent { get; set; }".
if that's what you mean.
 
it's hard to figure it database mappings by just looking at code, i always have to fiddle with things
 
yeah. I know :)
 
11:11 PM
@Riva well, thats not marked as a FK
and i'm not sure about the whole databasegenerated option, is that required for a fk?
 
I though the
modelBuilder.Entity<Video>()
.HasOptional(vid => vid.TitleNS)
.WithRequired()
.WillCascadeOnDelete(true);

block should do that. But actually maybe not.
 
well, theres also a fluent HasForeignKey(...) thing too
and MapKey
 
@SteveG I think I had some other issue with that particular relation and it solved it. I admit it's there kind of from desperation :\
 
i think those might be more appropriate since you're trying to delete
 
Is there really not a way to do SELECT * FROM [table] WHERE col LIKE '%a%' with LINQ out of the box?
 
11:14 PM
there is...
 
@SteveG Fluelent doesn't have HasForeignKey(...) for 1:1, 1:0 mapping I'm affraid.
only for 1 : * afaik
 
collection.Where(x => x.varcharcolumn.contains("foo bar"));
 
@SteveG I found it
 
@Riva ahh
 
Yep haha. It's been one hell of a day...
 
11:15 PM
@Riva what about MapKey
 
@SteveG I was actually looking for it for an hour. Most docs and QA's say it doesn't exist though :)
 
heres an idea
 
@SteveG I don't know how to use it in this case. Didn't find a lot of docs on it.
 
all my mappings are on my work comp
winging it here
 
wow. thanks
 
11:18 PM
5
Q: Code First and Fluent API one to one relationship

WilliamI'm having trouble with reverse navigation on one of my entities. I have the following two objects: public class Candidate { [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)] public long CandidateId { get; set; } .... // Reverse navigation public virtual Candidat...

have you tried that
.Map(t => t.MapKey("CandidateId")); // Only use MAP when the Foreign Key Attributes NOT annotated as attributes
 
@SteveG No. I'll test it. Again thanks a lot.
 
np
 
@SteveG Is this hard to read.
 
no
i'm pretty good at english
i think my computer is dying
or the NSA
 
IEnumerable<PlotDomain> plots = await plotService.RetrieveAllPlots();
var concurrentPlotAutoComplete = new ConcurrentQueue<PlotAutoCompleteModel>();
Parallel.ForEach(plots, (plot) => { concurrentPlotAutoComplete.Enqueue(new PlotAutoCompleteModel(plot)); });

return concurrentPlotAutoComplete;
 
11:30 PM
not really
it's pretty readable
 
Straight forward, sadly I have millions of Plot's to go through and transform.
 
well, except for the { } body in the for each being on one line
but thats just my preference
gotcha
why a queue though?
 
Because it is Thread Safe and holds my existing order.
 
im sure it's fine, just curious
you have an list, and you convert it to a queue, im assuming you need it to be in queue form, just jelly, i hardly ever get to use queues outside of messaging
 
List wasn't thread safe, and wasn't returning all records.
 
11:34 PM
ohh gotcha
makes sense
thats neat
 
Yeah. What is neat?
 
i never get to do multithreading stuff
so, doing that and managing it
and how you're managing it, looks fun
 
Oh, I get to do a little bit.
 
im kind of shocked there isn't a concurrentlist
@JABFreeware
 
@SteveG Yeah, closest you can get would be a ConcurrentBag or ConcurrentQueue.
 

« first day (2385 days earlier)      last day (2565 days later) »