« first day (1383 days earlier)      last day (3559 days later) » 

5:01 PM
hey all
 
can some one help me with it?
 
what are you trying to do?
you have a string and you need to decode it?
 
Wut, why would that expression have side-effects?
 
i dont know
the first expression it has those slashes an zeros after it
and the second one it should be allright
but they arent the same in if statement
but if im showing with messagebox
 
It has no slashes and zeroes in it. That's just the representation. They represent null characters.
 
5:04 PM
the both shows the same thing
oh and how can i get rid of them?
 
You can either prevent them from being there or remove them using str.Replace("\0", "").
 
i prefare preventing them, instead of replacing
 
Although the latter will also remove null characters that ought to be there.
 
but should i prevent them?
if if use utf8 instead of ASCII, it will give the same
 
do you have the code that creates the variable y?
 
5:07 PM
UTF-8 is a superset of ASCII, so that is not surprising.
 
:18004391 string y = Convert.ToBase64String(Encoding.UTF8.GetBytes("userCYBERCODE-PCF6378BFA8B69FBFFuser"));
 
@KraziiKiiD Ok. When you do the converttobase64 string, run the code to deconvert it (ConvertFrom...), on the next line
 
@RyanTernier with another variable?
it says the same thing, it because of the first one which has thos "\0\0\0\0\..."
how can i get rid of them without replacing them?
 
@ReedCopsey It should not matter what the constructor does
 
in F#, 3 mins ago, by user3892448
Inheritance is the base class of all evil.
 
5:23 PM
@KraziiKiiD
string s = Convert.ToBase64String(Encoding.UTF8.GetBytes("userCYBERCODE-PCF6378BFA8B69FBFFuser"));
s.Dump();
byte[] data = Convert.FromBase64String(s);
string decodedString = Encoding.UTF8.GetString(data);
decodedString.Dump();
dXNlckNZQkVSQ09ERS1QQ0Y2Mzc4QkZBOEI2OUZCRkZ1c2Vy
userCYBERCODE-PCF6378BFA8B69FBFFuser
Is your watch window in hex?
 
@RyanTernier a moment
 
<3 LinqPad. Don't tell my girlfriend.
 
@RyanTernier yes but the other one it has those "\0\0\0\0\"
this by me is ok too
 
@Darek The constructor is what's blocking
that's why it's taking 2 seconds - that's the constructor running - so yes, it does matter tremendously
 
Yes, but it should not matter that it is blocking
 
5:28 PM
ahh - but it's a Form, and forms have thread affinity
 
no, because I am calling Task.Factiory.StarNew
 
so you must construct on the UI thread
 
so the call shoudl come back right away
 
it does - but then you call Invoke
 
for some reason it does block the parent
 
5:28 PM
which pushes the work back onto the UI thread - and blcoks
 
Hmm, that actually makes sense
 
basically - StartNew( () => this.Invoke( () => {... this blocks ..}}
that's an !pattern
 
@KraziiKiiD Can you create an XML Document and load in "<hi></hi>" on it, and then create a stringBuilder and add teh same. I wonder if your watch window is displaying hex data, which would explain the /0/0/0
or have a look at this to see if this is the case
59
Q: Visual Studio debugger - Displaying integer values in Hex

fizzerI'm using Visual Studio 2008 and I have just noticed that the debugger is displaying integer values as Hex when I hover over variables and also in the immediate window. I guess I must have hit a shortcut key accidently or something. Anyone had this before? How do I set it back to display in de...

 
@RyanTernier allright.
 
@ReedCopsey so any form.Invoke, blocks
how about BeginInvoke?
 
5:31 PM
BeginInvoke will wait until the messages are done processing, then block
the only way to fix it is to figure out what's taking so long in your construcotr, and fix that
the whole point of Invoke/BeginInvoke is "run on the UI thread" - and that, by definition, blocks
 
That's teh one thing I want to avoid
I have no control over that part
 
@Darek then there's no way to prevent the blocking in this case
 
BackgroundWorker?
 
requires an Invoke again
You can't run code on a thread without consuming it's time
 
damn thread
:)
 
5:36 PM
arg, is there any reason why C#/ASP.NET can't seem to remember a session variable for very long?
 
yes, the default expiration is 30 minutes @Daи
 
@Darek it's not even keeping some of them that long
 
single server?
 
@Darek and I adjusted my session length settings to 60 min
@Darek yes one server
I store a session variable that verifies user is logged on and another for their permissions level
 
how do you preserve state, and what do you mean by "can't seem to remember"?
 
5:37 PM
it will often hang onto the logged in state and lose the permissions level
 
@ReedCopsey Are you talking about invoking a delegate, and that blocks?
 
I'll get an Object reference not set to an instance of an object. for the permissions level
but if I don't call the ToString() method on the session variable it can't seem to use it in a comparison
i.e. if (Session["permlevel"].ToString() != "A") { // access denied }
 
@RyanTernier No - Control.Invoke/BeginInvoke in windows forms
(or Dispatcher.Invoke in WPF/XAML)
 
WPF Y U no maek Binding.ConverterParameter a DP?
 
I started using ReactiveUI
 
5:42 PM
@KendallFrey ^insanely annoying can't think of any reason other than that someone derped that one
 
but the thing is that sometime, if I fire Command.ExecuteAsync, the notification sinks
 
@Darek is this directed at me?
 
the command is processed, the RaiseChanged fires, but UI remains
 
Is there a tool /extension for playing around with xpaths?
 
Yes
XmlSpy
but it is freaking expensive
@Daи I've moved on
 
5:44 PM
@Darek ok, so no ideas?
 
nope, sorry
maybe @KendallFrey
he knows everything
 
Do you use ASP.Net session state service? @Daи
 
@Darek I just set them using Session["variablename"] = "blah"
@Darek so whatever that is using....
 
so in memory
does your application pool stay up 24x7 or do you have it on recycle?
you need to persist your session state
if you are not using a database or Session State Service, every time app pool recycles, and depending on your volume and settings it might a lot, you will lose session state otherwise
Any PostSharp gurus around?
0
Q: Build with PostSharp Toolkit fails on 4.5.1 but works with 4.5

DarekI have preserved a NuGet package of PostSharp.Toolkit.Threading, version 2.1.1.12, because I can;t upgrade to version 3.x. Any project compiles fine, as long as I stay on .Net 4 or 4.5, but as soon as I change to 4.5.1 or 4.5.2, I get this error: Error 3 error: Unhandled exception (2.1.7.35,...

 
5:55 PM
@Darek ok, how do I do this?
 
@Darek ok, yes - I already changed those settings. Not solving the problem
 
did you configure for service or database?
 
@Daи I don't ASP.NET, sorry.
Is the client's session cookie expiring?
 
@Darek in process
@KendallFrey yes, prematurely
 
6:01 PM
In-Process will die
you have no persistsence
 
@Daи Have you made sure the expiry date is set correctly?
 
you must have persistence for session state to survive app pool recycle
 
A default worker process is recycled after 20 minutes of inactivity. Are you session variables lost while surfing around on the site, or after being idle for some time?
 
@SimonSvensson both
@Darek ok I'll give it a shot, can I set this in the web.config file instead?
 
yes
 
you can use loopback:42424 for the string I believe, if the state service is on the same computer
but server name is preferred
 
@Darek I see, ok
 
just make sure ASP.Net Session State Service is up and running and switched to automatic startup
 
@RoelvanUden you around?
 
What is the technical term for using an interface to limit the exposed methods of a class?
ISubset sub = new SuperSet();
sub is not cast to ISubset, it is _________ to ISubset
 
6:11 PM
typed?
 
okay
that sounds good
 
I will take Extensions and Lambdas for 400 please
and @KendallFrey the correct answer was "What is typed?"
 
@TravisJ implemented from
 
:P
 
Please post your answer in the form of a question. This modifier must be used in order to create an extension method.
 
6:13 PM
Being silly
why today should be any different
:)
Is anyone here who remembers my reflection questions about WinForms yesterday?
all sympathy comments were appreciated
anyhow
 
eet eet eet
 
you are going to laugh what I ended up doing
and it seems to work
 
The correct answer was, "What is static?" A static modifier must be used when creating an extension method.
 
so if you remember, management did not want to spend $$$ on rework for MVVM
but, they still wanted two skins for an old 33k lines WInForms
sooooooo
drum roll please
I've wrapped my old form, as a value property of an ReactiveObject from ReactiveUI
so the old form, with all its business logic, became a model
now I can freely bind properties and commands
and it lets me gradually move business logic to a true model
crazy
I know
but works
we have 3 forms like that
each 20-35k lines of code
that's why I was asking about the Invoke and BeginInvoke, cause I can't touch the old forms
 
6:20 PM
I was allowed only to modify accessors
from private to public
but this is now cool
            this.Bind(ViewModel, vm => vm.Value.textBox1.Text, v => v.textBox1.Text);
yay!
how crazy batshit is that ?!?!
another question, best practices for 100 please
I heard one of these is not right ... string.Format() or String.Format(), which one?
 
@Darek either is fine. lowercase is more common.
really doesn't matter as long as it's consistent
String is just an alias for string, just like using System.Web = SW or something like that
 
It does matter, your whole life depends on it. One is a keyword, and one is the type name.
 
me neither, but one C# purist yelled at me for string.Format()
 
The type name gives correct colors in the intellisense.
Love the intellisense colors!
 
by the same extension, string.Empty is good, but String.Empty is not
 
6:26 PM
@Darek C# purist? it's just an extension method, calm your tits
 
might have been @KendallFrey
:P
 
I would comment on using String too. Just as I enforce Int32 over int.
 
See @Pheonixblade9? They are everywhere .... I am so scarred
 
How long is a long? Truly longer than a short. But is that really short? The C# keywords are a mess, use Int16, Int32, Int64 and you know what they can contain.
 
@Darek funny - I'd argue (and style cop too) that string.Format() is preferred - since it doesn't force you to have using System;
@Pheonixblade9 neither is an extension method...
 
6:30 PM
@ReedCopsey derp. yeah, just a static method
I'm so used to our string stuff all being extension methods, it just defaulted in my brain. lol
 
@Pheonixblade9 Ya?
 
@RoelvanUden I have a q re: Angular auth. I have it close to working. Mind if we step into a side room and chat for a bit?
 
@Pheonixblade9 Or Skype me.
 
@Pheonixblade9 eww - string extension methods?
 
@ReedCopsey stuff like CaseInsensitiveCompare or CompareAsSqlString (not exactly) but yeah
@RoelvanUden does gchat work?
 
6:32 PM
@Pheonixblade9 Don't have that. :)
 
I don't have Skype on my work pc
 
@Pheonixblade9 Use aroom then :P
 
ok :)
 
@Darek They are both "right", but using the type name for a type that has a keyword just gives me the willies
 
:)
 
6:33 PM
yeah honestly it doesn't matter as long as you're consistent IMO
@ReedCopsey why do you say string extension methods are gross? just because it pollutes the type?
 
I am happy when my developers remember to use long for a SQL BIGINT
most of the time they resort to int
but we are still well below 2 billion
 
@Pheonixblade9 yeah
 
gotcha. we don't have a ton, just ones we really do use everywhere
 
object extensions FTW
Global functions!
 
eurgh
 
6:35 PM
Seen it on Pluralsight
gave me the willies
 
now that we don't do
 
I am ashamed to say, I did write and used one too
 
We don't either, but I could find some equally nasty stuff.
 
well... if it's something like GenerateSHAHash, I could understand putting it on object... but still
 
ILog GetLogger(this object obj)
in my defense I was tired of typing LogManager.GetLogger(typeof(whatever))
in hind sight ... I am ashamed
 
6:37 PM
@Pheonixblade9 Even then it belongs in a utility class
 
yeah, probably
Hasher.SHA1Hash(objectName) would be better
 
intersting
@KendallFrey so this is a no-no ? alexmg.com/compute-any-hash-for-any-object-in-c
 
The idea's nice, but object extensions are no way
 
Agreed
Oh, oh, another war is about ot start in 20 minutes
Helsinki and London
but don't you worry ... It is only virtual ... Call Of Duty: Ghosts
 
@KendallFrey - Heh, here is an example of an object extension gone wrong: dotnetfiddle.net/in8DyH
 
7:00 PM
@TravisJ That has nothing whatsoever to do with object extension
It's about the idiot that wrote that not knowing what "default" means.
 
Dust 2. Best war ground out there for the terrorists. Or is that too old school for people?
 
7:40 PM
i would agree, dust 2
i wonder if 6 dig means anything these days
 
7:53 PM
dm_facing_worlds anyone?
nightmares:
 
anybody here a nuget expert?
 
@ReedCopsey not an expert. what up? :)
 
8:12 PM
@ReedCopsey Try asking in c++
 
@ReedCopsey - I use nuget fairly often
@ReedCopsey - Are you talking about consuming it, or creating a package?
 
creating a package
I'm trying to figure out the right way to specify the libs
 
so a .NET 4.5 (full framework ) package picks one thing, but I want a PCL profile 259 package in there for any other targets
 
I think Christoph Ruegg in F# might be pretty good, he has Mathnet.Numerics
 
8:14 PM
I'm just not sure if it'll pick the right one or not
 
I've got an odd issue.
 
@ReedCopsey - Can't you just write a powershell script in order to do that?
 
@TravisJ not that'll work on mono/xamarin ;) which is the entire point of the PCL profile
 
When I call a method from the database, then it populates the fields. When I attempt to push those changes, edit them. It keeps the initial value. Any thoughts?
 
@Greg are you calling SubmitChanges ?
 
8:17 PM
@ReedCopsey - Good luck :P I have no experience with mono/xam so I don't think I can help
 
also need to see some code to know what you're using?
 
@TravisJ that being said - that's the reason the lib profiles exist in the first place - I ~think~ this would work, just afraid if it's wrong it might mess it up
 
@Greg - "call a method from the database", is that an sproc?
Or did you mean something from your ORM
 
It is as follows:

You click the hyperlink, which does a navigate to another page with a modified query string. At page load the UI identifies the query string and what the UI should be. So it tweaks it, at the page load it calls a method with a stored procedure to fill the fields. Then when I modify I call a `submit` (`protected void btnCategorySubmit_Click(object sender, EventArgs e)`) and it keeps the original field values.
Any thoughts?
When I call the button, shouldn't it take the new values to push to the server.
 
8:35 PM
In theory the click method would gather field values, open a database connection, find the file needing modification, run validation, and update the new values. In practice, I am not sure from what you have shown what happens when the button is clicked.
 
@TravisJ Well, it keeps the initial values. Because it says "Oh, this field has values based on the id." So it populates, but then I change them and it doesn't actually update it.
 
haha, awesome. talking to my old mentor from my internship about doing some contract work. He said

> Mike: ya thats what i remember about you - stuff just gets done
 
Anyone have a thought.
 
hello guys, i have a question: i want my app to send a picture on a php website, when the website request it. How can i do that? I made that the app should always request a "status" from php (every 2 second) and if the php has setted the status to "yes" the app should send the pic (as bytes), but like this isn't very good. I dont want to keep requesting the php, i just want that when i change in php the "status" my app should see it and take action.
any ideea ?
 
You do realize this is the C# room @KraziiKiiD?
 
8:49 PM
@Greg yes but fom the php room no one talks with me... :| and my question is more c# then php
 
What part is C#?
 
You're looking for websockets and pushing out state changes instead of continuous polling.
 
but it doesn't means that the app should be always in touch with the php ?
 
That's not really a question. It means that your application will always have a connection to your webserver, and your server will send data when there's something new that's relevant for the client.
 
@SimonSvensson Yes, this is what i was looking for. Sorry my bad english Simon.
can you send me some examples?
 
8:55 PM
HCIM (my application)
Version 6
SVN Codebase size. 2.8gb. 32,128 files
Version 7 (new release i'm trimming with level 9 sheers of f-u biztalk pwnage)
svn codebase size 210mb, 12,328 files
 
Krazii, no, I can not. I'm (luckily) not a php developer. You'll have to google for a working solution. Hint; move away from php before it's too late.
 
@RyanTernier nice :)
removing BizTalk from your app?
 
@SimonSvensson hint: i dont like php btw :))
 
@RyanTernier hey, been a while
heard you were getting rid of BizTalk
 
@KraziiKiiD very few people like PHP. They use it because it's a necessary evil.
 
8:57 PM
@Pheonixblade9 =]
 
@Pheonixblade9 @TomW Ohhhh yea. BT Removal and .NET 4.0 upgrade (finaly)
 
feels good brah
 
Sigh.. pro: application is now mission critical, con: added responsibility of now producing data mining reports since I can code directly against the db
 
is that not basically a complete rewrite?
are those ever a good idea?
 
9:16 PM
is this a good Meetup title/description?
How to Startup - Tips and Traps for the Tech Entrepreneur

The VP of engineering at YCORP, Bob Bobberson, will go over his experiences with the good and bad of building a startup and technical team. We'll focus a lot on the business and cultural side, as well as providing some context for technical decisions.

We'll have plenty of time for Q&A after the meeting, and food will be provided.
 
If you like startups, the title will make you go "woo, startup"
If you aren't interested in startups, the title will make you go "meh, startup"
 
the user group is "Dot Net Startups" :)
 
Ok, fair
thought it probably would be something like that, but you aren't actively soliciting a wider audience, is what I'm saying
I spose in your case there isn't one
 
yep
gotta have a niche around here
or noone comes
 
How to Startup - Tips and Traps for the Tech Entrepreneur

Bob Bobberson, the Vice President of Engineering at YCORP, will go over his experiences with building a startup and technical team. The focus will be on the business and cultural aspects involved, as well as how to define the scope for making successful technical decisions.

There will be free food and additional time after the metting for questions and answers.
 
guys, is there a function (no web request) to get the public ip address like this one?
 public static string GetPublicIP()
        {
            string direction;
            WebRequest request = WebRequest.Create("http://checkip.dyndns.org/");
            using (WebResponse response = request.GetResponse())
            using (var stream = new StreamReader(response.GetResponseStream()))
                direction = stream.ReadToEnd();
            int first = direction.IndexOf("Address: ", StringComparison.Ordinal) + 9;
            int last = direction.LastIndexOf("</body>", StringComparison.Ordinal);
 
Hey
I have a question about casting an Object[] to a String[]
I'm going from a ArrayList => ArrayList.ToArray() = Object[] => (String[])Object[]
If that makes any sense
 
an object isn't a string
 
@KraziiKiiD you can't know whether you're behind a NAT or not without doing some kind of request.
 
I'm explaining this terrible
This [pastie.org/9432672] is returning object[]
 
9:35 PM
@DestinyDawn what type is ArrayList holding?
 
@DestinyDawn pass typeof(String) to ToArray
 
don't use ArrayList
 
It isn't, I'm constructing it using new ArrayList();
I thought it was suppose to be ArrayList<string> str = new ArrayList<string>();
 
@DestinyDawn or better yet use List instead of ArrayList
 
List<string> messages = new List<string>();
and do public List<string> GetMessagesText()
 
9:38 PM
@NETscape That fixed it, thanks guys! I haven't used c# in the longest time. I've been mostly using Obj-C and Java for iOS and Android, but I decided to switch to Xamarin so everything is in C#
 
sounds like a good choice. I'm sorry you were stuck using those other two languages
 
Obj-C I'm okay with, Java, not so much. But now that they added Swift to the picture, I thought I'd be better off going back to C#
enum's can't be imported, can they?
 
imported?
 
Like using Enum.Name
I constructed a class that consists of different set's and get's, I put the enum in that class but it doesn't appear to help so much
Actually, forget it. That would be too much of a headache for only two different variables.
 
did you declare public?
 
9:47 PM
The only thing you import in C# is namespaces, not individual classes/enums/etc.
 
and you would have to use class name.enum
put your enum at the namespace level (outside of a class)
 
The fact that it wasn't public was the problem, thanks!
 
@SteveTrout Until C# 6, at least...
 
10:01 PM
@Tom skype broken?
 
So one of our employees asks me about this research we are doing, says that he can get result on it in two days but would like it if I could create a one time data mining report.
350 lines of code later, ran accurately without any testing first try :)
 
nice
If you had written it in F# it would have been 15 lines and read like a regex :)
 
hahaha
 
ok now we have to produce on screen of transcript so Reed does not see it :)
 
10:25 PM
@JohanLarsson heh now, nicely written F# reads really well
:p
:p
 
in Lounge<C++>, 5 mins ago, by R. Martinho Fernandes
user image
 
they are?
ahhh, stuff, now I got it.
no, I'm too young
 
@ton.yeung we use 3D printers a lot
We print production stuff also, some things are nice if they break in case of crash.
 
i see 3D printers, CAD/modeling, WPF, Mindstorms, etc.
 
Printed stuff makes nice spare parts, fast & cheap
 
10:37 PM
@ton.yeung I can't afford moving and what not.
 
I got 4 upvotes on a answer today :/
 
noooo
!!weather 53202
 
@NETscape Perušić: 15.301C (288.451K), overcast clouds
 
Spencer
 
@JohanLarsson let me find the Kerbal version
 
10:38 PM
jk
he's in OK I think.
 
@ton.yeung cheap compared to the alternatives. Precision is decent also, sometimes we mount the prints in a milling machine for adjustments on important surfaces & holes.
ah, then it may be out of budget but not by that much. Thinkyou can order prints relatively cheaply if you can draw the models yourself.
 
@JohanLarsson how much is the printer you guys bought?
 
@NETscape €30k I think but it was a couple of years ago.
 
10:47 PM
guess it is good enough for a star
 
ahh. my friend is a plastics designer and he said they bought one for ~$1M
 
$1M is some really high end shit. You get a metal printer in that price range.
 

« first day (1383 days earlier)      last day (3559 days later) »