« first day (2412 days earlier)      last day (2551 days later) » 

2:03 PM
 
dead
 
in death we are released
 
2:18 PM
can I do something like having a function, which have an argument of type Type, and use that argument to specify the generic function's generic part? I mean >
    private void SetBinding(Type type1, Type type2)
    {
        Bind<type1>().To<type2>();
    }
 
@ntohl You're looking at reflection, using MakeGenericType
 
thx. I'll look into that
 
Type listType = typeof(List<>);
Type elementType = typeof(string);
Type listOfStringsType = listType.MakeGenericType(elementType);
object stringList = Activator.CreateInstance(listOfStringsType);
 
@mikeTheLiar is slack down for you?
broke in the middle of typing
well this sucks
 
and blows?
 
2:24 PM
everybody is talking and having a good time w/o me
and yes blows
one two
x is coming for you
three four, betta lock teh door
 
@AvnerShahar-Kashtan how would I call .Add on it, if elementType is variable (I mean elementType is the parameter of the function)?
 
five six and your eating weetabix
 
Duuuuudes
 
no, five six get your crucifix
cuz u gonna need it son
 
seven eight give that code a [Depriciate]
kappa
 
2:29 PM
lol
 
depriciate?
 
Yeah code depreciates
 
depricated!
 
wear and tear, y'know
 
DEPRICIATED INTENSIFIES
 
2:29 PM
#fuckthewarningsandusethemanyway
 
Ohh good, some ppl
 
@ntohl With reflection.
@ntohl The moment you're passing types in at runtime, all bets are off.
In the specific case of List<T>, it so happens that all List<T> types implement the non-generic IList, so you can cast your dynamically generated instance to IList and call Add(object item)
But that's the special case of those specific types.
 
^ yes. I have to dig in deeper
    private void SetBinding(Type type1, Type type2)
    {
        Type bindingToSyntaxType = typeof(IBindingToSyntax<>);
        Type bindingOfType1Type = bindingToSyntaxType.MakeGenericType(type1);
        object bind = Activator.CreateInstance(bindingOfType1Type);
        Type bindingWhenInNamedWithOrOnSyntaxType = typeof(IBindingWhenInNamedWithOrOnSyntax<>);
        Type bindingOfType2Type = bindingToSyntaxType.MakeGenericType(type2);
        bind.To
    }
following from there
(it's Ninject)
 
Oh my God...I'm so bad at Icons
 
@SteveG sorry had a work thing come up. No, it's working fine as far as I know
 
2:53 PM
does anyone here know how can I search for a pattern like windows uses for files (e.g. *.txt) in a string array?
 
yaaay
    private void SetBinding(Type type1, Type type2)
    {
        MethodInfo[] allMethods = GetType().GetMethods();
        MethodInfo twoParameterBindMethod = allMethods.Single(x => x.GetGenericArguments().Length == 2 && x.Name == "Bind").MakeGenericMethod(type1, type2);
        twoParameterBindMethod.Invoke(this, null);
    }
 
@satibel regex?
 
@satibel return array.Any(s => s.Contains(myString))
 
@Bardicer that's not a regex, I actually get the pattern from "the user".
 
so they would be looking for a specific string like "myfile.txt" and "yourfile.xxx"?
 
2:56 PM
Just because there is some file extensions with two dots
 
@Failsafe Contains would return me "c:*.txt" but not "c:\test.txt"
 
Like .tar.gz on mac
 
I rename all zipped files to .topsecret so nobody knows how to open them
#encryption
 
@satibel array.Where(s => myRegex.Match(s)).ToList()
 
^----
 
2:57 PM
@Failsafe the regex is malformed.
 
s/List/Array if you want another array
do you want regex or the command to use the regex
if the user inputs the wrong regex then thats the users problem
 
*.txt isn't a valid regex.
 
well the user is inputting the regex so tell the user that the regex is not valid
 
I put "the user" in quotes, because it actually comes from windows.
I can't change the input.
 
you are confusing the shit out of me
 
2:59 PM
just use jquery
 
@ndugger in C#?
 
Don't use jQuery
 
@Failsafe ??
 
Use Jicama.js
 
memes
 
3:00 PM
hi all, im having problem in asp.net's update panel
I have a button which binds data to repeater in update panel
 
@satibel i don't really understand what you want
you can't change the input
 
it works the first time but after second time
 
@satibel shouldn't the regrex be (.txt) ?
 
it stays clicked
 
is the user actually giving you a regex pattern
 
it gets released after some time
 
I get immutably a pattern of "*.txt" as input, and I have a list of strings e.g. ["a.txt" , "b.bat" , "c.txt"]
 
anyone faced similar problem?
 
so the user inputs *.txt
 
any help?
 
3:01 PM
or does the user input "txt"
 
this is the windows version of regex.
 
So new Regex ("(.txt)"):
 
Why not use glob? Does C#/Windows even have glob?
 
@Failsafe the user actually clicks on a folder.
windows lists *.txt for example.
 
@satibel No, it's the Windows version of glob
 
3:02 PM
ok stop talking about *.txt
what is the unfiltered input from the user
 
I could transform it to regex though.
it's the search pattern of Directory.GetFiles
 
ok, let me try that again
 
@satibel this is the first time you even mentioned that Directory.GetFiles was involved
 
We saw it the first time
 
3:04 PM
@KendallFrey xdd
 
m sorry i thought i asked it in pieces and it offended everyone
 
if you want a pattern for all files that end in .txt then search "^*\.txt$"
iirc you have to escape the .
haven't written c# regex in a while tho
 
@Failsafe Or just use the goddamn *.txt and let windows handle it
 
at this point i don't remember what the original question was
myregex = "*.txt"
 
don't ever call that a regex
 
3:07 PM
array.Where(s => myregex.Match(s)).ToList()
too late
 
No, directory.getfiles is not actually involved, I want to mimic this function.
The files don't actually exist.
 
@AvnerShahar-Kashtan oh. It was much more easier, than expected. Thx for the help>
    private void SetBinding(Type type1, Type type2)
    {
        Bind(type1).To(type2).InTransientScope().OnActivation(x => _logger.Trace("Created :" + x.ToString()));
    }
Ninject supported this one
 
Input: a string where ? Replaces exactly 1 character, * 0 or more characters.
 
19
Q: How to implement glob in C#

Mark MaxhamI don't know if it's legit at StackOverflow to post your own answer to a question, but I saw nobody had asked this already. I went looking for a C# Glob and didn't find one, so I wrote one that others might find useful.

 
It seems there's no builtin, so I'll just replace that and make a regex out of it.
Thanks anyways.
 
3:15 PM
@satibel replace * and ? with .* and ., escape everything else
 
That's what I'll do.
 
user image
2
Made a comic!
@Kieran
 
i didn't know jack sparrow was asian
2
 
neither did i but i don't care
I fucking love it
 
I cant draw people for shaite
 
3:22 PM
idgaf
i love it
 
Nice weekend
seeing you guys on munday
 
Bye
 
Sttugling is hard :p
 
3:32 PM
Yes. I was going to upload an image and then realised I couldn't find how
Which made it all a bit of a pointless effort, really
 
On phone?
 
No, on PC.
 
What's the error you're getting? Gonna guess the branch hasn't been correctly merged.
 
This is just getting worse and worse 0_o
Finally
So ... made that branch. And I have no idea why the name is now in brackets after the project name. And I can't now delete it. It's just grayed out
 
Well you can't delete the branch you're currently on but I don't think that's your problem
 
3:35 PM
@MattThrower My first guess would be that's your active branch
 
@KendallFrey Thanks. It ought not to be. How do I make the master active?
 
check it out
 
@KendallFrey Aha! Thanks. So that explains that. Seeing as "checkout" didn't result in any local code changes, I don't think it does what I thought it did. Or at least what it did in TFS
I like the idea of Git a lot. But my is it a sea-change in how you look at source control
 
if checkout doesn't change anything in your working directory, then presumably there are no changes between your branches
 
someone please bounty me 10k
 
3:41 PM
Make me RO in JS
 
k
 
@ndugger giv paypul money first
 
done, now bounty me 10k
 
@ndugger kkkkkkkkkk
 
@KendallFrey Yes, I think I get that now. I'm used to branches each having their own physical disc folder. Can't get used to the way Git "flips"only the necessary files
I mean it's obviously useful and convenient, just a very different way of working
 
4:16 PM
i hate C# so much, wish i could go back to java
 
There needs to be a Git room
 
do you need git help
 
Yeah
 
ask away
im not a guru
but i can get around
 
@SteveG Does that make you a Gitru?
 
4:20 PM
When you make a sup-branch of a repository, and make changes in that sub branch, the changes are still there in the parent branch
 
@MattThrower lol :p
@Hypersapien false
 
That's what it looks like it's doing
 
We're still struggling with it here. We can't work out how to do a hard rollback on a branch. It seems to keep all the outstanding commits
 
you have two branches, branch X and Y, branch Y is based off of branch X, and you make changes in branch Y and they show up in branch X without merging?
 
I'm sure it's called Git for a reason
 
4:21 PM
@SteveG Yeah.
 
i think you're mistaken
 
I'm in branch X and I can see the changes I made in branch Y
 
are you using github? the only thing I could see that would give that perception, is if your pull request on GR is going into master, but you're actually based off of branch X
 
No, we're using our own office git server
 
@Hypersapien what you're saying goes against how git works
git is just a bunch of pointers from commit to commit
 
4:23 PM
X isn't even master. It's a sub branch of master
 
so if you add a bunch of pointers in branch Y, how would branch X know about those pointers without you merging them into branch X?
 
And I haven't made a pull request since I created Y
 
@Hypersapien i really think either your tool is broken, or you're misunderstanding / misreading something
because branch X changes, won't show up in branch Y (even though branch Y is based off of branch X) without rebasing
so you branch off of X, and make Y
somebody else pushes changes to X, your Y doesn't have those changes
(I know what i just described isn't what you're seeing, i was using it as an example of how branching works)
 
Just now I went to Branch Y and added a comment. Then I switched over to Branch X and the comment was still there. The page didn't reload or anything.
 
yeah thats not at all how git works
im not sure why you're seeing that, but if i had to guess i'd be something internally (special tool?) is doing rebasing or merging for you
are you using git flow?
 
4:29 PM
It's the visual studio plugin
 
i just use command line
but if i had to guess, i'd say the VS plugin is doing goofy shit
 
Do I need to commit changes to keep them separate or something?
 
You didn't commit?
Changes aren't part of a branch until you commit
 
OH
lol
 
4:31 PM
Did you expect git to just delete your work?
 
yes what kendall said
 
@Hypersapien FWIW we just discovered our problem was the visual studio interface
So yeah, just use the command line
 
Give me a break. I've been using Git for less than a month.
And most of that wasn't switching between branches.
"Changes aren't part of a branch until you commit" <-- that's the bit I wasn't getting.
 
A branch is just a pointer to a certain commit
And every commit has a pointer to the previous commit(s)
And there are numerous other things that are pointers to commits
I guess git is built on commit pointers
 
We had been using Team Foundation. I though Commit was the equivalent of Check In. Apparently it's Pull Request that the equivalent.
 
4:36 PM
commit and checkin are for most intents and purposes the same
although in git you can wait to push your commit to the public, and have it live only on your computer
and you can push it to as many places as you want
 
It's probably best not to try to map them to each other.
 
Yeah, TFS isn't a proper VCS ;)
 
4:48 PM
im an asshole
 
I know and I agree
 
:'(
 
being asshole is kool..
 
warm and moist maybe
kool? idk about that
 
4:57 PM
Idk what i'm talking about either..
 
@KendallFrey are you being sarcastic?
or are you referencing tfvc
 
maybe
 
should i forego using an enum / making code less readable, in order to streamline maintenance?
like, if i don't use an enum, people could add new values by just adding rows to a db table
but it feels weird just having magic numbers in my domain models
the whole point of making code readable is to increase maintainability
so, if using an enum decreases maintainability, then it doesn't do it's job
thanks for listening
 
If it feels like magic, don't use it.
 
@RoelvanUden That's a good way to let your genes die off.
 
5:06 PM
YOU GOT IT BRUH
 
lol
it's not really a magic number, it's just a db key, which, without looking in the db, you don't know what it means
is that bad enough where i should use an enum?
 
Wait why the fuck am I in here
 
like, if i use an enum i can give it a friendly name, but force people to update code when records are added
 
The best answer is, IT DEPENDS
 
@Sippy me, just before i was born
 
5:07 PM
Steve dat pic nsfw i repr0t u
 
@SteveG T4
 
@RoelvanUden "it depends" is the best answer everywhere, everytime
 
Thank you!
 
5:23 PM
@KendallFrey how will that help, i don't want people to have to publish the solution
@Sippy what makes it NSFW?
 
u no wat
 
wat
it's a baby crawling out of a womb
 
@SteveG I hardly think so
 
why
it's a POV of the baby
who wants to play a game
 
@SteveG I'm 100% sure it's not
 
5:30 PM
@SteveG why is your avatar goatse?
 
what is goatse
 
!!kinkykendall
 
!!urban goatse
 
@SteveG goatse A disgusting picture of a man stretching his anus extremely wide. One of the oldest jokes on the internet is to link the picture to internet forums and chatrooms, renamed to look like something else like "happybunnies.jpg" . Often causes people to freak out.
 
5:31 PM
well then
 
@SteveG do you seriously not know what your avatar is
 
IT'S THE MIRACLE OF LIFE
it's a baby trying to get out of the womb
 
Well, it looks like it's supposed to be the Aperture Science logo with something else added
 
it looks like goatse
 
you guys are disgusting
and perverted
and should be ashamed of yourselves
 
5:34 PM
@SteveG No, I know a goatse reference when I see one
 
Disgusting and perverted, yeah. But I don't see how that third one follows.
 
I think it's funny you made a goatse your profile pic without knowing what it was
@Hypersapien LOL
 
lol
well, now i gotta change it
 
perhaps
 
do a google image search of goatse first
just so you know for sure
 
5:35 PM
lol
 
kendall already showed me his bookmarked version
 
it wasn't bookmarked
 
w/e
goat cheese
 
goatse memes are great
 
goatse meme AND a venn diagram joke
 
5:38 PM
wheres the joke part of the venn diagram
 
That the overlap is an asshole
 
oh i missed that
im retarded
i should just die
 
@SteveG no, you need to familiarize yourself with the goatse meme
 
i think i don't need to
 
ha ha, steve is a goatse lover. dank meme.
 
5:42 PM
in JavaScript. Not Java Script or Java Scripting.. JavaScript!, 10 mins ago, by Trasiva
It's official, it's all been a lie. Stephanie is really Stephan.
 
@SteveG Lemonparty is another one you should google
 
don't forget tubgirl
or rather, can't
 
two girls one cup
can't tell you how many times i watched that late at night when nobody was awake
 
can't or won't
 
can't, the number is uncountable
 
5:52 PM
numbers are not uncountable, cardinalities are
 
I swear to god I leave this room alone for an hour and this is what I come back to.
 
tubgirl is the worst image I've ever seen
 
You must be new to the internet.
 
I'm 12
 
we have trouble acting professional
 
5:53 PM
!!c#
 
@ndugger flagged for a mod
 
May 5 '16 at 15:17, by BoltClock
THIS ROOM IS OUT OF CONTROL
 
we had a kid in here who was 12, and he talked about it, a mod seen it and banned him
 
ban me
 
never
 
5:54 PM
TOS says you have to be 13 or older. Something about storing PII for people 12 and under.
 
The mods are all familiar with me already, and they know I'm not 12. I've gotten scolded often.
 
Lol
 
I even got an email from a moderator once about my behaviour
 
Plus in this room's history you've already said what your age is.
 
i once got an email from a mod
 
5:56 PM
 
when i went around and downvoted all of servys answers
lil son of a bitch
 
Did you really do that? Because if so that's really, really dumb.
 
no u
 
!!nou
 
5:59 PM
yeah i really did that
nto all of his answers, he has like 10,000 of them
 
too bad it didn't affect his rep
 
i wasn't worried about his rep, just pissed that he downvoted valid answers to get the top spot
 
who cares
fake internet points for the lols
 
6:39 PM
hi
 
hi
do you like my new avatar?
 
No.
 
it's pink (purple?)
reminds me of kendalls mother
 
yeah very physchedelic
 
thanks :)
i should also change my name to
Steves D
why is Flowdock down :(
 
6:43 PM
why do you change it?
that was nice avatar
it raised my adrenalin
 
it looked like
 
Because he didn't know what goatse was.
 
uh
yeah goatse
mike
don't give me any lip
 
And he made his avatar into a goatse reference without realizing what he was doing.
5
@SteveG I'll give you a lot more than lip
 
oh my
 
6:44 PM
getting micha all hot and bothered i see
 
Is there any reason a WCF service setup with anonymous authentication, would give a 401 unauthorized? I thought anonymous auth setting in IIS allows all users?
 
i know nothing
 
me neither apparently
 
@mikeTheLiar
 
👄
 
6:49 PM
brb 20 minutes, mike wants to make out
 
eww
 
@BrianJ Don't judge our love
 
@SteveG But how do you know?
 
I mean weeee
 
do i know what?
that there were a ton of small bangs and small crunches? logic
 
6:51 PM
ffs steve.
 
@SteveG What logic?
 
Lol
 
lol
IDK WHY JS NEVER TALKS TO ME, OR EVEN ACKNOWLEDGES ME, IM NOT EVER GOING THERE AGAIN AND YOU CAN'T MAKE ME
 
hello
 
welcome back
you will behave
 
6:57 PM
really?
 
yesh
 
steve when did you turn pink?
 
bout an hour ago
 
@Proxy on his pinkth birthday, duh
 
i also changed my name to
Steve's a D
but it hasn't propagated out to chat yet
 
6:58 PM
lol wtf you did
 
so from a G point you went to a D point
interesting
 
lol
 
I'm going to call you Steve Sad
 
so sad
 

« first day (2412 days earlier)      last day (2551 days later) »