« first day (1406 days earlier)      last day (2743 days later) » 
06:00 - 19:0019:00 - 21:00

6:42 AM
morn'n
 
morning
 
 
3 hours later…
9:43 AM
(that's about €1300)
 
buy it !!
morning :)
 
9:59 AM
just that... now there's a bb2... and I guess this is the 1
 
yep I know...
bb2 is rain proof
 
mm
needed in sweden!
 
10:16 AM
I drove 3800km+ during the holidays
with AC this year :)
the Yaris did fine except sometimes on potholed italian roads
 
10:31 AM
I have AC in all three of my cars, none of them work...
 
when do you need AC in Sweden ?
 
It is nice in the winter :)
 
and summer
 
AC that heats ?
 
All summer I have missed AC, and I don't want to go on longer trips (like to germany etc) and be stuck in a pileup somewhere without an AC
AC dries as well
 
10:37 AM
dries the air ?
 
yes less humidity
I had AC on my second car (for a while before that broke as well)
Next car...
just wounder what that should be
 
peugeot 308 SW :p
 
Did you say something? I just see a blank line...
 
10:52 AM
I said Peugeot 308 SW :p
 
now I only see "I said" and ":p" in between I can just barley see some blurry darker field
anyways...
 
ok
 
I was thinking about a bmw e34 540 touring maybe
I would like a Ferrari FF, but that's not really possible...
 
I like this Ferrari :)
lunch time :)
 
what?
that was two hours ago!
 
 
2 hours later…
1:18 PM
Aaaand I hate serializing javascript in C# :(
Morning all
 
Serializing/deserializing is never fun
Do you use JSON.Net?
 
I was trying not to use external libraries, but I guess it is my only option :/
my simple { "user": "abc, "pw": "zxc" } never translates correctly with var json = new JavaScriptSerializer().Deserialize<Dictionary<string, object>>(content);
 
Yeah, with some of these things, go with a third party.
Pick one that's well supported and widely used
I think the json.net is one of the best
 
Yeah, I got terrible nightmares because of Newtonsoft
 
@Alex dunno if you know about this already but thought I'll ping in case you didn't: syncfusion.com/products/report
 
1:29 PM
Thanks, Maverik. We've got zero budget for this, so anything that's free, we'll use :)
Anything that's paid, the powers in charge say no
 
well thats the thing
if you've ever been a syncfusion free account - its been automatically upgraded to plus account for free and everything unlocked
thats how I just found out
 
I think I'd told about a boss from another job... wanted us to go to the moon but do it all for free
Dang!
 
I've posted their Syncfusion studio link here quite a few times cos its great for working with wpf
 
Didn't know that
Now you tell me?! :)
 
its in stars even
the sole reason i clean up stars is so people at some pooint can go through it :P
 
1:32 PM
Don't see it now in stars section
wait... clicking "show all"
Can't find it in the stars
 
this is the one we've been using in here
seems they've upgraded the community license too
 
Hmm. I already have an account with them.
 
great.. just login and you'll find yourself a Plus account now
and you just have to click unlock key to get stuff
 
Double dang!
That's too cool
 
@LynnCrumbling since you've dealt with reports too.. this may interest you too
 
1:39 PM
What's that?
 
Yep, it says "Free license included as a part of Syncfusion plus program"
 
Oh, they do reporting?
 
right after Andre's line conversation between Alex & myself
but yea that'd be the short version & that free accounts are now plus accounts
also not much use starring that link as it can't be searched :)
seems the last time we had a proper star for syncfusion was in 2013
Jan 28 '13 at 15:20, by Maverik
if anybody's interested, free download of SyncFusion Metro Studio to go with MahApps
 
The only thing running through my head is... TANSTAAFL...
 
^ above appears to be free still
 
1:41 PM
...what's their angle?
 
Yeah, but still worth a try :)
 
none - they'll earn from new customers
they've always been like this - they do support community quite a bit
 
No free lunch, but years ago, I got Telerik's controls for free b/c they wanted to get the word out
 
I'd imagine they use a lot of word of mouth marketing
exactly
 
And Telerik is huge today
You've got to get your stuff into devs hands
Just ask MS... they're giving VS versions away these days
 
1:42 PM
their syncfusion studio that's super handy for xaml & svg stuff -- setting it free means all their other products get spotlight too
exactly
 
Now, for reporting, do you download their Essential Studio?
 
if you've got the developer swooning over your product, you've got the managers money
nah Essential is xaml stuff
if you have been upgraded to plus account, there's a reporting tool in there
the section is Report Platform
may need to install it as complete package but since they're using RDL for reporting you should be able to make it work for sqlserver
 
My reports are all RDLC... SQL Server 2008
 
yea i was telling for its designer stuff
so you end up with same language
 
Ok, I'm perplexed...
 
1:46 PM
Ahh, great
 
i dunno.. may be it won't help at all
 
Thanks, Maverik :)
 
i just thought i should share and let you have a look :)
np
 
Still, for free, I ain't complaining
 
lol indeed
 
1:47 PM
What is the difference between the example at their website and my code?
 
I'm guessing with the Plus, you get all their goodies
 
and if you've been upgraded (as really most of us should have been) its so much stuff for free :)
exactly
 
var jo = JObject.Parse("{ 'usuario': 'qwerqwer', 'senha': 'zxcvxzcv'}");
 
Niiice :)
I've done so little with JSON
Wondering if the friends in the C# room might have some experience with it
 
this is what i get with my upgrade.. i'm assuming you all get the same
 
1:48 PM
They do, but I really can't believe I can't make this newbie thing work...
 
It's okay... there's always a trick to this stuff.
Keep pluggin' away :)
Too cool, Maverik. All those freebies!
 
Andre: I don't get what your problem is?
i know its been a while but we kinda need some specific error to help you
 
When it comes from the xhr the json comes with \"
 
we've been slacking and still haven't gotten to mind reading tech - some day.. it's on my todo list :)
 
And that is not acceptable for some stupid reason
:(
 
1:51 PM
Mind reading? Meh, there's an app for that :)
 
as i said, i've been slacking!
 
What is the name it is given to the @ before a const string text ?
@"my stupid string that wont work"
Verbatim right ?
 
Yeah, I think so
 
my base for starting work on what we were talking about
 
Wow. Just wow. That's gorgeous, Maverik. And what's impressive, it's all SVG -- not always easy to work with
 
1:56 PM
no no I didn't do it - I only forked it from the author and tweaked it
 
Still, anyone who can mess with SVG gets my admiration
 
I've taken his hexgon example and worked from there
 
Neat
Wondering if there's a GUI for working with SVG
 
it can serve as my initial background layer but I still need to sort a specular layer for it
well since Blend can work with svg, i'd say just roll with that :)
but otherwise Adobe Illustrator is full blown editor
 
Or Codepen
 
1:58 PM
i'm sure there's others
well Codepen is more hand driven process :D
 
Yeah
Never been comfortable with Illustrator. More a Photoshop person
 
The actual string came out as "\"{'user': 'abc', 'pw':'zwx'}\"" and those \" were screwing my deserialzation :(
 
I bet it's some setting
Just search on that on Google. Someone else has run into this
 
Andre why not just just deserialize to a proper POCO?
why are you going through this dynamics pain?
 
._. Because I don't know any better
By not knowing I mean I don't have the knowledge
 
2:06 PM
thats my repo doing some json stuff
line 421 will give you one idea of deserialization
its quick & dirty way of deserialization by giving it an anonymous example object
you can also JsonConvert.Deserialize<T>("") to get an actual poco out of it
 
anyone been to Banff National Park yet?
 
I feel like i just saw that image somewhere O.O
 
This is what I'm doing var json = new JavaScriptSerializer().Deserialize<Dictionary<string, object>>(content.Substring(1, content.Length - 2));
 
if you need to do that kinda thing, there's something wrong with input
also.. JavaScriptSerializer? whats that?
its not Newtonsoft.Json as far as I know
 
using System.Web.Script.Serialization;
 
2:09 PM
even MS isn't using that shit anymore
 
Hahahaha good to know
 
MS actually caused a case change in Newtonsoft.Json because of their usage of library in Asp.net Core
(its a breaking change for libraries dependent on case of json properties)
and the breaking change is the new default "cos it was the right thing to do but you can set a flag to go back"
 
PM> Install-Package Newtonsoft.Json
 
(they've gone from Pascal case to Camel case)
yea that
 
I was testing using Newtonsoft because I thought it was a problem with the serializer but it was with the string content
 
2:12 PM
Newtonsoft.Json is the only library i know of that can deserialize to common interfaces too!
 
@Kevin Beautiful. Looks like an HDR photo
 
well if its a problem with string, get the string fixed
hacking it, isn't the answer
newtonsoft is pretty resiliant and it can handle a bit of malformation
 
Well I have no clue how to make it work
JSON.stringify(this.json)
Maybe, just maybe it is the mime type I'm sending that it is getting screwed
Because I'm using application/json instead of text/plain
 
Andre: this line tells me you're double serializing json?
JSON.stringify(myObject) works fine on c# end
and no - mime type isn't relevant for deserialization
(not for a developer - they matter to browsers)
 
Double serializing? Where? ._.
 
2:22 PM
sounds like something you should show us on dotnetfiddle.net
 
Hm, kinda hard to reproduce that there
Since it comes from Javascript
My whole code in my ashx is:
var sr = new StreamReader(context.Request.InputStream);
var content = sr.ReadToEnd();

var json = new JavaScriptSerializer().Deserialize<Dictionary<string, object>>(content.Substring(1, content.Length - 2));
The problem is that it is sending with \"
 
ahh
and what, you can't switch to newtonsoft?
 
2:39 PM
Anybody know what a serialized associative array deserializes to, in JSON.net?
My gut is Dictionary<String,String>
going to give that a whirl now
 
@LynnCrumbling or Hashtable?
 
var temp = deserialize(obj):
Console.Writeline(temp.GetType())
 
Sorry for the delay, even newtonsoft gives me the same error
If I trim the \" it works perfectly with both commands
 
2:57 PM
1
Q: How to remove escape characters from Json string?

PrabhuI have a c# method that calls another method which returns back a string that is supposed to represent JSON. However, the string has escape characters in it: public string GetPerson() { string person = repo.GetPerson(); //person is "{\"name\":jack,\"age\":\"54\"... return person; ...

 
removing escaping from json is a symptom of malformed json
try json input validation wiht something like jsonlint.com
Hmm Windows 10 now comes with builtin Network test tool (Speedtest)
 
Hm, might be because of how I create the string...
xhr.Post(`{ 'usuario': '${user}', 'senha': '${pw}'}`);
 
dunno
but you need to validate the input that you're running into debugger
 
@Maverik that in the anniv. update
 
run the string representation through lint
@juanvan yea I just figured it out - they've added so much shit in this update that I wasn't clicking stuff
 
3:05 PM
humm wonder why my install did not auto install that update
 
Haha I'm so stupid, it was so obvious that I feel bad now
I was creating a JSON string and using stringify, therefore I was serializing twice
 
Nah, it's the obvious stuff that causes the greatest grief :)
 
3:26 PM
@AndréSilva told you the first time you posted code that i feel you're double serializing
 
Interesting. If you ever need to "truncate table xxxx" on SQL Server while leaving the constraints in place, use this:
DELETE FROM Employee DBCC CHECKIDENT ('Employee',RESEED, 0)
This won't work well for a huge table, but for smaller data, it's quite performant
This resets the Identity column, as TRUNCATE does
 
Truncate Table removes constraints? i never knew that
 
It doesn't
It just throws ugly errors. You have to temp disable them and re-enable after running truncate
 
never had that issue but doing Delete would mean quite a bit of transaction log activity
 
Yep, hence proceed with caution with large data
 
3:30 PM
xD
 
If just a few thousand records, it does the trick :)
 
depends on records xD
i had a db with few hundred records
 
Kept getting this no matter what I tried: Cannot truncate table 'TableName' because it is being referenced by a FOREIGN KEY constraint.
 
i deleted stuff 5 times -- transcation log was 10g for a 1 gb db :)
 
All child tables had been cleared
 
3:32 PM
ah i see
 
Yeah, we'd run into trans logs getting out of hand. Not sure if newer versions have solved it
 
well thats a sensible error
 
Not sure what else I needed to clear to be able to run truncate on that table
 
the FK constraint is basically telling you that they stuff you're deleting is PK for some other table
i'm not sure if you shuold workaround that error
 
I know. It's test data, though
 
3:33 PM
lucky you :P
i operate on production data directly :P
test data is for p00s13s
 
Nice. Actually, that's not such a bad thing, if you have experience and are careful
 
i've never screwed up in past 7 years
 
Thing is, I'd cleared all 3 child tables that were FK's on Employee and it still complained
 
(I never operate on live db if i'm not sure of course)
 
How do you track down which table it's screaming about?
 
3:35 PM
well i can't figure it out without access to db and you've solved the problem anyway :)
usually via reverse engineering the constraint thats bitching
 
Yeah, it's all good. Going to load fresh data from Excel... the user gave me some to get ready for move to prod
Love the integration b/w all these MS tools. So easy to import/export
 
Thought it was so cool
 
4:32 PM
@Maverik Yeah, the terminology always gets messes up in my head. :(
 
omg!!
memories! i dunno if any of you remember - but i was talking about bruteforcing batman a while back when i was a kid (cos i didn't have the manual to read the actual page and plug the code in)
^ this was the game!!
 
4:48 PM
i can't figure out how to move damnit. lol
 
WPF MVVM validations are pain in the arse..
Do you agree or it is just me struggling to find the right solution
 
what kind of stuff are you validating
 
So I have 10 forms and a button the button should dynamically active if all the forms are correct
I've got 3 files , one for the view , viewModel , ValidationRules
                        <TextBox.Text>
                            <Binding Mode="TwoWay"
                                     Path="IdCardNumber"
                                     UpdateSourceTrigger="PropertyChanged"
                                     ValidatesOnDataErrors="True">
                                <Binding.ValidationRules>
                                    <v:AlphaNumValidationRule />
                                </Binding.ValidationRules>
                            </Binding>
 
sounds/looks good
 
and the view model looks like this
    public override bool IsValid
    {
        get { return !string.IsNullOrWhiteSpace(IdCardNumber); }
    }
    private string idCardNumber;
    public string IdCardNumber
    {
        get { return idCardNumber; }
        set { Set(() => IdCardNumber, ref idCardNumber, value);
            RaisePropertyChanged("IsValid");
        }
    }
while the validation rule
public class AlphaNumValidationRule : ValidationRule
{
    public override ValidationResult Validate(object value, CultureInfo cultureInfo)
    {
        if (string.IsNullOrWhiteSpace((value ?? "").ToString()))
            return new ValidationResult(false, Resources.Strings.MessagesResource.RequiredField);
        else if (value.ToString().MatchRegex(RegexResource.ALPHANUMERIC))
            return new ValidationResult(true, null);
        else
            return new ValidationResult(false, Resources.Strings.MessagesResource.InvalidFormat);
What I want to have is to update IsValid everytime the IdCard input is updated , I tried different ValidationStep but none do as I wish.

At first when loading the input for the first time IsValid is false , when typing a correct value it becomes true after deleting input and adding wrong non-supported values IsValid stays the same since it keeps the last correct value.

Any way to solve this ?
 
5:23 PM
Why is string interpolation such a fad?
 
because + operators are so annoying
 
I was so used to string.Format the living hell outta everything that it annoys me a bit
 
@Alex Large transaction logs are a result of having your recovery model set to FULL.
 
I shouldn't been away from a year from coding :( just got an email about C# 7.0
 
There's no need for the in most installations.
Change your recovery model to Simple.
 
5:26 PM
@AndréSilva You can't replace string.Format with string interpolation anyway
because these have to be compile time
 
@LynnCrumbling Yep, but the logs are out of my control. DBAs maintain those
And for 4K records, it shouldn't be too bad. It's when you delete many times that
 
Well, ReSharper suggested that I should use string interpolation instead of my string.Format ._.
 
which is fine
 
@JABBARITaoufik everytime you change the textbox, the IdCardNumber setter should fire
if they delete the value and put in something else, it shoudl fire the setter, and raise property changed on IsValid
 
Years ago, we'd have to ask the DBAs to truncate the logs as they were getting so big, they were throwing errors
 
5:28 PM
is that not occuring?
 
@Alex Tell them that you need to execute a <cough> cleanup operation </cough> statement: ALTER DATABASE your_db SET RECOVERY SIMPLE;
Or, if you're db_owner, you do it :)
 
Well, the mass deletes are on dev, so not a biggie :)
 
:)
Found something else funny for you :)
 
Getting the data ready for move to prod
 
5:30 PM
Hehe
It was bound to happen
Nice one
Who are the folks who edit these things together? Must've lots of time on their hands
 
No idea. Just know I'm not one of them.
 
Too tired when I get home to do much
VS 2015 has crashed twice today already
There goes the third one
A lot to do with McAfee AV
 
Bah. Get rid of that S***.
 
Can't. Installed by sys admins
But I can disable most of it
And PC runs so smoothly then
Their argument... "Oh, but your machine is secure."
Us: "We can't do anything."
Them: "But you're secure."
Though there's no "them" -- it's all "us"
 
@LynnCrumbling slack
 
5:48 PM
all my day spent trying to get my hexgon to cooperate :(
and you guys are enjoying youtubes!! :(
while I'm doing my hexagon thing, i'm curious to know - how to make it tile
i can't seem to get the idea of viewbox bounds + tiling
 
im all about octagons over here
 
great i can work with that too if you can draw it for me in xaml
in meanwhile i'm gonna learn me some geometry .. again
so anybody volunteering for some math or do I need to do this the old school way and find a pen!
 
i like math
360/8 = 45. each angle should be 45 degrees
 
umm no i need help with coordinates
so say 0,5 is the start of first vertex
 
STOP NOW
 
5:57 PM
ok
because?
 
math
 
0,5, first vertex, check.
slowly losing interest @Maverik
 
@Kevin i'm thinking about a regular hexagon that encompasses a circle of radius 10
well whose sides are tangents to the circle
haha.. ok you've barely spent a few minutes - i've been at this all day xD (though i wasn't trying to solve it via coordinates earlier)
but i figured the amount of pain i'm inflicting on myself trying go from svg to xaml - i can redraw the damn thing myself by hand in less time
 
haha, i just meant in the math part in particular
 
ok so seems i can leverage equilateral triangles
so that makes life easier - each side is 10 units
and each side has inside angle of 120
now to somehow translate this to coordinates
 
6:13 PM
I watched "Now you see me" again, earlier this week.
What an awesome movie.
Can't wait until NYSM 2 comes out.
(on dvd)
 
@Maverik draw 10 units from vertex, rotate 45 degrees, draw 10 units, rotate 30, draw 10, rotate 30, draw 10, etc.
 
thats the brute force i'm doing right now
 
Ahhhh! Slipping into... math... coma... irreversible
Too late
Believe it or not, I enjoyed calculus 2
Had a great teacher
 
yea i had that time too
 
46
Q: Calculating the position of points in a circle

JoeBrownI'm having a bit of a mind blank on this at the moment. I've got a problem where I need to calculate the position of points around a central point (assuming they're all equidistant from the center and from each other). The number of points is variable so it's "DrawCirclePoints(int x)" I'm sure th...

calculate/draw points, connect with straight lines instead of arcs
 
6:27 PM
@LynnCrumbling I heard that the second part is much weaker than the first
 
Kevin that may just be what i needed -- drawing :)
 
@FoggyFinder That's a bummer. Then again, sequels are hard...
 
that's for sure
although I was not looking
 
06:00 - 19:0019:00 - 21:00

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