« first day (2830 days earlier)      last day (2124 days later) » 
01:00 - 10:0010:00 - 20:00

10:06 AM
Hello, I could use some help with C#. I'm making a Outlook Addin, and there's a method I need to use that opens a file (not mine), but never closes it. So after a bit I need to read the file again but the file is still open and I can't access it. Is there a way for me to force the file to close without access to the file instance?
 
use a different (not broken) method?
dispose the result of your currently used method?
avoid Outlook entirely?
 
i wish I could
 
mr5
@André can't you use the same file stream?
 
don't have access to it. I just give it the name and directory and it returns the MailItem
 
File.ReadAllBytes()
(there should also be an async one, but I cant find it)
 
10:10 AM
Don't lock the file in the first place?
 
the method is not mine
 
@André you have to use a function in Outlook's library?
 
yeah i'm using Application.Session.OpenSharedItem(path) to "transform" the .msg file into a MailItem
 
you can make a temporary file then pass that file to give you the MailItem
I feel so disappointed
why does noone do SRP correctly?
or SoC
or SLA
or DM
 
just tried to comment out the code that transforms the file and its not open, so must be this outlook method
 
10:14 AM
just make a temp file
stupid applications/libraries need stupid fixes
also, it is not stupid if it works
but it is stupid if it works and breaks other things that arent stupid
 
@André What does OpenSharedItem return? Is it Disposable?
 
In our field, it can be stupid even if it works
 
@André does the app not allow reads? so it locks it? Hmm if you wrench the file out from under it, it could make the app unhappy
 
returns a MailItem
 
does MailItem implement IDisposable?
 
10:15 AM
and doesn't have a .displose
dispose*
 
MailItem has close, thats about it
 
you could try close, but if that works, I will pray for you to never have to use such a thing again
 
.close() didn't work :(
 
define "didnt work"
 
define ":("
 
10:19 AM
actually made it worse, before it only had one file open, now it has 2
 
mr5
@André the first time you open it, make a copy of that file and just access that temporary file
 
64k, if anyone was wondering.
 
@AvnerShahar-Kashtan nice lack of context :D
 
Well.. it depends where your extension loads, if its per mail item, it will.. because it wont remember it opened it before.. unless you make it do that
 
mr5
I think avnir is referring to OpenSharedItem return value
 
10:20 AM
but in any case, that would mean a limit of 192 guids?
wait... i didnt do calculations
 
Nope. Was referring to the max length of a URL supported by ASP.NET Core with an HttpClient call.
~1930
Good enough for me.
 
mr5
Unicode?
Or does encoding matter
 
@AvnerShahar-Kashtan depends on the format
 
GUIDs use 0-9a-f, which are all encoded as 1 byte in UTF-8.
 
so @mr5 should i copy this file into a temporary folder and then open the temporary file and leave it open?
 
10:21 AM
you have several formats to write guids
 
mr5
@André why would you leave it open again? yes, you copy that to temporary folder
 
I don't really care for optimization here. 1900 or 1500 or 1000 isn't an important distinction for me.
 
well i can't close it myself
 
one with 4 hyphens, one with 4 hyphens and curly braces around it, one with octal? numbers at the end
 
mr5
@André why not? you created it so pretty sure you have full access to it
 
10:23 AM
Standard .NET ToString() format is 4 hyphens, no braces, and that's good enough for me.
 
@André you dont have to close the temporary file
@AvnerShahar-Kashtan standard .NET ToString() does ToString("d") ;)
 
yeah but as soon as that method to convert the file into the MailItem runs, it will leave the file open, or could i still delete it, even if open?
 
if you make a temporary file, that file will be removed automatically
I am not sure what C#'s api for that is
 
mr5
afaik, it's up to the system when it is going to be deleted. if that file is located under system folder/temp, then it'll be deleted for some days
 
but it will be automatically deleted
;)
based on x it could mean that it is deleted when the resource streams are closed, the application exits (in a normal way), the computer is shut down, every year on a cleanup :D, etc
but it will be automatically deleted
 
10:28 AM
Afternoon ALL
@War hey hey, how you doing
 
Alright creating the temporary file worked. Outlook is weird and required a .msg file.
Thanks
 
> Outlook is weird
Yeah no shit
@Mathematics It's not afternoon yet
 
@LeeButler where are you from
 
He's from Liverpool
 
10:53 AM
Wow, that killed the conversation dead. "Where're you from?" "Liverpool". "Oh". *awkward silence*
 
Hi guys
Is it possible to generate barcode in pdf using any pdf plugin?
 
@RudiVisser fuck off
 
@AvnerShahar-Kashtan Oh.. that city. *cough*
 
I'm not from liverpool so it's fine
 
I'm from spleenpond
 
11:01 AM
:)
 
@Learning-Overthinker-Confused normally people just print using a barcode font
 
I'm convinced you only come in here to sling shit at liverpool
Which I'm all for, because I don't live there
 
11:12 AM
Liverpool-adjacent
 
It's better to be adjacent to a pool of livers than in one
 
Well you're not wrong there
 
I just thought it's a weird name for a city, if you couldn't tell :)
 
Lost of places have weird names once you stop and think about it.
 
yes, I've noticed
 
11:47 AM
is it bedtime yet?
 
*checks watch* nope
Still at work
 
darnit
 
12:11 PM
PRIME DAY IS HERE
 
oh.. so we may buy the crap they couldnt sell for slightly less.. in the hopes we may buy it
 
Hey I got my 144hz screen a couple of years ago at mad discount. And a really decent wireless router too
 
true its prime day not things like black friday
 
Yeah that was on Prime day 2016
 
the black friday one is usually total rubbish with stuff you wouldnt buy even if they gave it for nothing
 
12:19 PM
I need to buy myself a new laptop, so I'm hoping I can find something decent
 
ive seen a chromebook but nothing id wanna call decent
i mean.. save 50 quid on "certifed referb echo plus" they still want 80 quid for it
I thought i only paid 80 quid for mine new, and it came with a 25 pound lightbulb
apparently they got 25% off a bunch of intel powered "PCs" but it shows a pic of a laptop
90 quid for a 6TB drive
 
I need to seriously rearrange all my home networking and storage, but I really can't be bothered.
 
:D
 
Also, Amazon doesn't ship most of this stuff to Israel, so *shrug*.
 
nooooooooooooooo how can you live without amazon!??? (Apparently it works out i buy at least 1 item per day as an average)
 
12:25 PM
what is this thing they're calling ultrabooks?
are they just laptops for gamers?
 
@Neil Usually high-specced 13-14" notebooks.
 
its some bs marketing ploy
 
Not necessarily for gamers. They don't necessarily have a discrete GPU.
 
why would you need a very fast calculator?
seems 13-14" is a little small
 
It's the perfect size for me.
 
12:26 PM
I couldn't stand that
But I can't even stand having one monitor either
 
I want a laptop that's strong enough for work (I have 2-3 instances of VS open in the office) but also small and light enough to carry around.
 
Id go nuts with something that small
 
They've got the headphones I use on a decent offer at the moment
 
I have different work phases. In the office I have 2x24" + the laptop monitor, but I also work in cafes, and at home, sometimes, on the couch with the laptop on my knees.
 
my wife wanted a laptop after the security update, but we're talking only 6 months ago
 
12:28 PM
I bought two of these about a year ago when the Pound was low and I think they're fantastic entry-level headphones
 
@LeeButler are they good? the last noise cancellers I got were terrible.. in fact they came with a case, even in the case on a table, they broke, the plastic snapped
I wouldnt wanna spend 90 on a headset and go "meh"
 
Weird. The white ones cost £30 and the blue ones cost £42, even though they're the exact same model.
(I have both)
 
@AvnerShahar-Kashtan I had the same with washing machines, the white one was 150 more than the grey one... so.. as it sits in a room with p*s poor lighting and no one ever goes in there.. guess which colour I got?
 
@BugFinder I've never had any issues, and a few people I've suggested them to haven't had any issues with them either. Mine get thrown around a lot and are fine. They sound pretty accurate (you can use the included wire if your bluetooth is trash), have decent reproduction characteristics and are generally good
 
It looks like they have a £20 discount on the white ones... but not the blue ones. But the white ones used to be £50. Weird pricing.
Still, they're good headphones. Use them at home, on the bicycle, on the bus.
 
12:31 PM
kids love white headphones
 
I use them every day in work, and leave them to charge overnight. The claimed "12 hour" battery life on the ones I have is about right, it lasts about a work day and a half, or about 12 hours.
 
I don't use mine all day, so I don't really know how long they last for sustained play. But I charge them about 1/month. More than 12 hours, I think.
But no noise-canceling, so that's less battery use.
 
plenty of angry posts on the feedback mind
 
I want headphones with a noise-cancelling option that I can disable
 
most of the ones I saw have that @neil
 
12:35 PM
awesome
 
even the crap ones I had had that
 
You can disable it on these too aparerently, not somethign I've ever looked into
 
Most times I don't want noise cancelling on, but it would be nice to have that feature
 
amazon.co.uk/… even these had a turn it on/off
 
oh geez, if those are considered crap headphones..
I know they can cost quite a bit, but I'd at least like to think that most of that is good marketing
 
12:39 PM
I have a hard time trusting any product from a brand called "iGadgitz".
 
and these were crap too amazon.co.uk/…
well there was that..
 
hah, sony
good one XD
For me, Sony could be replaced with "Pay 50% more by picking me"
 
I've had really good Sony headphones in the past - both in-ear and professional over-ear. But they have so many products competing in the same space, you know that some gotta be crap.
 
its impossible to be great at everything
oh look the aircraft are returning home after the farnborough air show
Oooh shame so now both meetings that were planned today, have been rescheduled.. rar
BTW anyone else ever noticed that if you look ahead say a couple of hours and see a thing you might actually want, you make note of the time, come back and.. its not there any more
"gaming" laptop for <550 quid... I doubt it would run the games id play
i5... non ssd......
hmm
 
12:56 PM
nah, I wouldn't get a laptop without ssd
aside from being faster, it wouldn't have a hard drive spinning like mad adding to the heat
I mean it would technically, but it wouldn't be accessed heavily at least
maybe in another 10 years
 
I know what you mean
 
it seems all the laptops I've ever had have had this problem of overheating
 
to be fair 8gb mem, 1050M graphics, 1TB HDD.. for 550 isnt bad
I swear thats what killed my alienwares, despite having a cool tray, and additional fans sucking out the hot air
 
@BugFinder no, that's honest
for the price
 
calling it a "gaming" machine no.. but for the price not a bad machine
 
12:59 PM
well, to call it a gaming machine, it'd need a graphics card boost and 16gb of ram
but I don't buy laptops for gaming
 
apparently (I got lectured by someone) most games dont use more than 8gb...
yeah I bought 32 (most I could get at the time) and was happy with my choice
most games I play have a min 8gb requirement
 
games do use 8gb
some graphics cards will lean on memory to hold texture memory
assuming the graphics cards don't have enough of course
 
15.6" screen.. it would be almost workable as a "use" laptop for other stuff
especially mobile ones, they tend to "share"
 
my wife can't use a laptop with under 17,3" screens
 
1:01 PM
Smaller screens with higher DPI is essentially the same as bnigger screens with lower dpi
 
yes
i find i end up picking up the laptop and trying to stick it on my nose to decide if thats an 1 or an l or an I
this is a bit more gaming - its the best on the prime offer: amazon.co.uk/MSI-Raider-GE73VR-17-3-Inch-Laptop/dp/… i7, has 1tb HDD but also an SSD, a 1070M card, and 16gb memory with 120hz screen
for 1459
 
1:18 PM
@Neil WH-1000XM2s are great
 
1:34 PM
@BugFinder too expensive for my tastes
I like to have a high-performing desktop for gaming and a laptop I can use for whatever
it mostly just has to last :P
 
Maybe I could interest you in The New Microsoft Surface Book 2 with nVidia GTX 1050 discrete gpu
 
not crazy about the surfaces
I have a tablet already (which I don't use)
 
1:54 PM
The book is more like a laptop
The laptop actually is a laptop
I've only used my book in Tablet mode twice. Because on planes, you can't use laptops during takeoff and landing, but you can use mobile phones and tablets
 
I had the surface and didnt get on with it at all
in fact I still have it
i just dont use it
 
Which onr?
 
err
1sec
 
I'm getting a Surface Go
I'm so glad that came out
 
or should that be year..... for my internet to do anything
 
2:24 PM
Hello, i'm playing with active directory and i have that method Directoryentry.children.find but i don't know how to get if it doesn't find anything
and i don't find examples of what's going on if it's doesn't find anything
 
@RudiVisser Why though? Its like the Surface 3 from a couple of years ago but nerfed even harder
 
 
@john if it doesnt find any children the list should be empty
 
how cna i check if it's empty?
I'm searching an user
 
At least it doesn't use a Micro USB port like the 3 did though, jesus christ that was stupid
 
2:29 PM
@LeeButler It's smaller
My goal for a Surface now isn't development
It's just a usable Windows Tablet w/ Pen input, the Go fits that bill
ie. if it runs OneNote - it works for me
 
Fair enough I guess
 
@john its been a bit since i played with AD but either children will be null or have an array/list of length 0
 
There's no length or count so i'll go with children
thx
 
what type is children supposed to be?
 
dynamic
 
2:36 PM
well children.find children will have to be there..
so..
its items under children.. problem is out of context I cant picture it
can i have a snippet
Ive not used children.find
 
Just use dynamic types and your life will be easy. Or hard, I'm not sure. Either way, it'll change your life
 
I guess it depends what specifically you're trying to do
Seems @john MS have a good example on how to test msdn.microsoft.com/en-us/library/39zxbb5w(v=vs.110).aspx
Seems find returns an object, if that object has data then its found, if it doesnt its not.
 
so what i should test if the reuslt of find is null?
 
the object you got from find
did you look at their example
 
yes they don't care if there's nothing they catch an excpetion and throw it
i don't want that
 
2:46 PM
so check if its null and avoid that issue
 
i'm interested to know if there's anything in find and return a 1 or 0
 
then its 1 for object 0 for null
 
So if the find is null or children is null?
i'll check both fk it :D
false && true will only check the first and result will be false right?
 
I feel like slamming my head in a drawer repeatedly
 
or he will still go check the second condition?
 
2:50 PM
if there are zero things to find it wont find the first one, so, SOMETHING = mything.children.find(stuffhere)... check SOMETHING is null, if null then 0 else 1 found.. if you need this much explaination i would worry you will struggle with the rest
 
thing is that i come from delphi
and if entry is my object and children is my property
if i do entry.children while entry is null it will throw an exception
 
hi
 
and i don't know how c# deal with this
 
thats fine, delphi is a glorious and wonderful thing
 
Ahah
 
2:52 PM
so check if empty is null
this is not hard stuff
 
I was trying to get ViewBag value from view in external jQuery
 
entry...
 
I have SVN with 10s of repos...
I want to pull changes for them all in one go
what should I do
 
but it doesn't get
 
Learn how to SVN Good
 
2:53 PM
@Mathematics hit go, and go get a coffee :P
 
I return my response in html format
 
Or do it manually and feel the punishment
 
www.amazon.co.uk/dp/B07CTJWGVJ
This is actually a good deal given the inclusion of the type cover
 
@BugFinder which go lol
 
Yeah I saw that one before
 
2:56 PM
@RudiVisser get the fattest one you can afford as you will only want more
 
Then I'd be on a Surface Book 2
That's not what I want
Money isn't the issue here it's just the thing that fits the job, the i5s are still fanless afaik
 
Get the New Micro... I can't be bothered typign it out again
 
I actually think a Galaxy Tab S3 would do
Hmm
 
it depends too much on what you want it for, my 2016 surface i5 thing was a heap of crap to me.. it was too slow and i hated every word I used it for
 
Yes but my Surface Book w/ Perf Base was also a heap of crap due to the multitude of issues it had
My goal is note taking
 
3:02 PM
@RudiVisser why you have upside down pic
it is giving me headache
 
Because I'm an upside down person
 
I can't breathe
 
This is not my problem
 
apathy will kill humanity
never seen an upside down person before!
how are they like?
 
Ah yeah I knew there was a reason he was ignored
 
3:04 PM
ya know pen and paper work real well for notes
actually there is an e-notebook as in like scribble notebook which is digital and you can download the pics after.. would that work
 
Yeah but when you've got 4 notebooks of varying sizes it's hard to keep up
and I've looked into that, there's a really cool one but it's colourless and expensiiiiiiiive
reMarkable
Looks very cool
 
I keep loding my notepads
 
I dont think remarkable was the one I was thinking of
 
There is that too :D
This is nice - but again it's Surface territory
 
there was one you chuck it in the microwave to resue it
 
3:08 PM
😂
 
yeah I pulled a face when they said chuck it in the microwave.. but..
 
@RudiVisser £749 for an ePaper note thing 🤮
 
Yeah I know right
It is beautiful though
 
So is the surface screen tho
And that can do colour. But probably doesn't last as long battery wise
 
for around 7£ you get 500 pages
for 749, 53500 pages
 
3:16 PM
The battery life is "3 weeks"... Tested to make that claim were 60 minutes of viewing for up to 30 pages of text and 1 minute of stylus use per day with the wifi and bluetooth features turned off.
 
xD
 
Wtf is that
 
a reusable notepad that you get an app that sucks it into your phone
The notebook can be placed directly in the microwave, removed and then wipe with a damp cloth to restore the condition before use (it may have some brands)
putting electronicy stuff in a microwave....
 
3:21 PM
Love it
Anyway I'm off to get a Galaxy Tab S3 brbz
 
Boooooooo
 
Seems fine, cheap enough to throwaway if it doesn't work
I've ordered the SP w/Type also
 
the Surface Go is calling youuuuu
 
But won't be here before my flight tomorrow morning :D
 
Oh fair enough
 
3:22 PM
It is, will probs get that too
Then decide later
 
Where are you going
 
Tomorrow just Isle of Man for a meeting
 
You're not flying with FlyMaybe are you?
 
Yeah it's great fun
 
Absolutely gonna miss your meeting
 
3:24 PM
Ha
It's fine their little ATRs are brilliant
Thought their fleet was all Dash-8s
But nope - they have 5 little ATR-72s too <3
and ofc I'm stuck on one of them :D
 
> Flying props
Hey the 72s are cheap though, only $26m
 
Not bad
tbh it was a more stable flight than a Dash
 
That's only 2 thirds of the cost of a concorde
 
lol adjust for inflation
 
Shhhh
 
 
2 hours later…
5:38 PM
Sorry dudes, I was dragged into work stuff - why is it people only ever ever talk to me after I was supposed to go home
 
6:11 PM
1 message moved to JavaScript
 
 
1 hour later…
7:33 PM
what does the c# hello world look like?
 
Stuck on step 1. Start Visual Studio.
which visual studio? community, professional, the other one?
 
It doesn't say because it doesn't matter.
 
the extension is .csharp?
 
Just read the page and follow the instructions
 
01:00 - 10:0010:00 - 20:00

« first day (2830 days earlier)      last day (2124 days later) »