« first day (1624 days earlier)      last day (3310 days later) » 
00:00 - 23:0023:00 - 00:00

12:00 AM
Meh, debatable.
 
that is the view from my office right now
I want to be outside kthxbai
 
NO
):
 
I think it's fine that it's plural
if it was a collection you'd call it MongoDbContextParameterCollection
 
Most likely, yes.
 
really that logic should be in the constructor of whatever is implementing DataContext for Mongo
 
12:02 AM
but saying new MongoDBContextParameters() sounds so wrong.
Why not?
 
don't you mean "why?"
 
Oh, read that wrong.
Well, that class is basically just a wrapper for some stuff.
 
then just make it a struct :)
 
I wouldn't consider it to be a value-type.
Let me show you how it's implemented.
 
@KendallFrey this reproduces the problem dotnetfiddle.net/i1Dr5E
 
12:06 AM
 
Doesn't help me much.
 
I'd almost call it DbContextInitialParameters
anyways
it's past 5pm on a beautiful friday
peace out, girl scout
 
Well bye ):
Have a nice day!
 
cya, sorry I couldn't help more
 
Is there seriously no way in angular to just repeat child elements? As in not the element itself?
 
user1881400
12:14 AM
@Pheonixblade9 You play MTG? I was going to ask later, but might as well;

Given the crazy amount of rule exceptions (timed effects, effects which have to re-evaluate their own validity, etc.), can you help me think of a reasonable structure for an MTG game?
 
@someone looks like your variable is 0 instead of 1
 
@SpencerRuport there is. Let me find the ref for it.
 
user1881400
Erm, nevermind. I should really read all the posts.
 
I think you can use the return value of DeclareLocal instead of explicitly supplying an index
check the generated IL so see if it matches what you expect
 
12:16 AM
!!afk hockey
 
@diemaus - What I'm trying to do is this:
 
@KendallFrey can i compile this save it some where and check how ildasm see it ?
 
<tr><td>SomeElement</td><td>divider</td><td>SomeElement</td><td>divider</td>...<‌​td>divider</td><td>SomeElement</td></tr>
 
why can't you add <tr ng-repeat="x in y"><td></td>...<td></td></tr>?
 
Because then the divider item will either show up at the beginning or the end.
element|element|element
But using angular's approach I would get |element|element|element or element|element|element|
 
12:20 AM
Ah, you want a divider on every n % 2 == 0?
Is this not something you would be able to solve with css ::after or ::before?
Or is there dynamic content in the divider?
 
I can't imagine why I would be required to solve this problem with css.
 
It would be cleaner.
 
Not for what I'm doing. The dividers are drag points.
For resizing.
 
Oh, okay.
And the TD:s are what's repeating, not the TR?
 
yes
Holy crap this is silly.
 
12:25 AM
I got an idea, give me a few mins.
 
12:36 AM
@SpencerRuport man this is tricky, no joke.
 
Random point here but I can' believe how many people overlook touchscreens for laptops - just got new laptop and having a touchscreen makes life so much easier - not necessarily for coding, but for most other stuff.
 
@James are you here to salespitch the new surface? ^^
 
Haha no
Although that was a strong consideration - went for XPS 13 instead
Couldn't wait for SP4 :-p
 
^^
 
Ah bugger
Just realised, wiped my old laptop without transferring my local MyPhPAdmin database :-(
 
12:47 AM
Such is life!
@SpencerRuport must you use a table? Angular seems to not like a table.
@SpencerRuport jsfiddle.net/usm85fuj
@SpencerRuport works better with divs (for some reason angular just can't handle td's) jsfiddle.net/usm85fuj/1
Either way, off to bed. kthxbye
 
1:29 AM
@diemaus - A table is semantically correct.
 
Is there a way in XAML/C# to have the font size of a textblock be relative to the window size?
 
 
1 hour later…
user1881400
2:54 AM
@DemCodeLines Something like

for (int i = 0; i < myTextbox.Inlines.Count; i++) {
myTextbox.Inlines.ToArray()[i].FontSize =
}

Where the font size is a proportion based on the window's ActualWidth and ActualHeight values. Chuck the code into a method and subscribe it to the window's SizeChanged event. There you go :)
 
3:25 AM
@FizzledOut Thanks! Will look into it.
 
 
4 hours later…
7:18 AM
morning!
 
gud morning
 
7:34 AM
hi
 
14 hours ago, by Steve G
crap, my rants about porn are going to be documented some where
 
Good noon
 
 
4 hours later…
 
1 hour later…
12:57 PM
Found a huge stinking turd in our code.
Scary & huge refactoring to remove it.
 
"a"? you're lucky
 
one of many
the one of today
 
1:23 PM
someone wrote a module in VB?
 
1:46 PM
so it isn't just me who has to put up with turds in code lol
 
How can I set a localdb prereq for clickonce? I can't seem to get any prereqs configured for clickonce. I'm using VS2013 CE, and publishing my application via clickonce just shows me a few windows asking if I want to install offline or online and such.
aaand nvm, found it 5 seconds after asking :(
 
2:26 PM
Alright, so I installed my application (via clickonce) and when I try to run it in my VM, I get the "program has stopped working" pop-up. How do I get a stacktrace from that?
 
2:40 PM
hi
 
2:54 PM
Morning
Backup weekend!
 
3:10 PM
lol
 
@SteveG yo
 
@TomW hey whats going on
 
not a lot, reinforcing my ineptitude at trying to do DIY
 
lol
 
 what a pathetic situation it is:
The following function gives me correct gateway IP on my PC:
<code>
  static string NetworkGateway()
        {
            string ip = null;

            foreach (NetworkInterface f in NetworkInterface.GetAllNetworkInterfaces())
            {
                if (f.OperationalStatus == OperationalStatus.Up)
                {
                    foreach (GatewayIPAddressInformation d in f.GetIPProperties().GatewayAddresses)
                    {
                        ip = d.Address.ToString();
 
3:12 PM
16 hours ago, by Pheonixblade9
actual laughter was produced
 
Why this paradoxxxxxxxxx
 
@JAVEDIQBAL what if somebody has two network cards?
 
YES,but how'd i ensure it gives me WLAN
one thing more;both PC's were connected to same WLAN
or router
::1 would mean localhost!
 
is this something you're just playing around with, or for some production code?
 
production
my guess
 
3:22 PM
Dumb question, if I have an element floated left, what would the ideal way to align all the internal contents to the right?
I mean, if I obviously put it in my responsive container it works fine with a text-ailgn, but I'm not always going to want that. So I was thinking if I could apply a class called Right will force said elements internal contents to the right would be ideal and easy.
I found a solution, not sure how it will hinder my framework.
[class*='Header-'] {
    text-align: left;
}

[class*='Header-']:last-of-type {
    text-align: right;
}
 
3:43 PM
@SteveG no it's not a play
I need it for my project
 
Hi Guys, any one can answer WRT .bat?
 
4:07 PM
hmm, i installed my application via ClickOnce, but it's not in my Users/username/Appdata/Local/Apps folder. Where could it be?
 
VICTORY
 
4:18 PM
Damnit, I'm doing something wrong with this ClickOnce stuff. Anyone here used it before? I can install my application just fine (I think), but whenever I run it, I get the "application has stopped" popup. I've subscribed to UnhandledException and try to write to C:/log.txt, but the file isn't even created. How can I debug this?
 
look at the event log
 
@SteveG thanks man, it does have some info
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Windows.Markup.XamlParseException
That's great, how the hell do I find a XamlParseException. The stacktrace goes into system code, so I can't see which file he's calling
 
try googling the exception and where it came from
i'm sure you're not the only person on the planet who's run into this :p
 
@SteveG you mean i'm not unique?
 
lol unfortunately not
well
at least code -wise
YOU are unique!
 
4:28 PM
Hmm, the only time i see my code in the stack is my App.Main() call. The rest is System.Windows.Application and stuff
the problem is (i think) that i am running this on my VM, which has no visual studio installed because I want to do a "clean" install to try it out
 
i'm not a wpf guy, so i can't help you on the specifics
does it have .net installed? thats needed for sure
 
I think so, it was installed via ClickOnce, and it has .NET 4.5 as a prerequisite
 
i would confirm that before you go down the rabbit hole of trying to figure out where the exception is coming from
 
Alright, let me try and see if .Net is installed :D
So, .Net 4.5.1 is installed. I can still target my app for .Net 4.5, right?
 
i'm pretty sure, but not positive
are you sure your xaml doens't have any typos?
 
4:34 PM
It runs on my development machine, that's what so strange about it
I suspect some file or such is missing, but I can't get to the 'real' error
 
it's not a 32 bit / 64 bit issue
is it?
 
don't think so. Both development machine and VM used the same windows installer image
 
Hello everybody!
 
hey!
 
Anything cool happening?
 
4:39 PM
thinking of going to Outback and feasting like a king
 
Outback?
 
steakhouse
 
Well, go ahead! Nobody is stopping you.
 
waiting for a friend to get here
 
Hi anyone can help me with batch file question?
 
4:46 PM
aha, got the exception that's annoying me. It can't the mdf file as a database!
 
@SteveG outback my favorite steak place
 
5:09 PM
Is there something wrong with my App.config? gist.github.com/3bdNKocY/43e99f911068d8cdadad I keep on getting errors when I try to run my app (installed via ClickOnce)
 
5:32 PM
this is starting to get annoying
 
the error would be better
are you deploying app_data or where ever the mdf is stored, is the prop set to Always Copy on compile?
 
I'm not deploying any .mdf file, which is part of my problem I think. I just don't have it in my project structure (it floats around somewhere on my dev pc)
@juanvan It's a WPF application, so no App_Data that I know of
I thought by using LocalDB, EF automagically creates a new database when it's run for the first time?
 
correct
but there should be a storage point for the mdf in the EF <connectionStrings> in the app.config
 
the gist I linked is my complete app.config
 
is there datastorage wired to the app right now?
 
5:44 PM
I'm using a localdb (or so I hope) storage yeah
 
Good evening everyone
 
@scheien yo
@juanvan Am I correct in thinking that I need to add my .mdf file to my project structure? (so that ClickOnce ships it)
 
You need to include it in the project
 
alright, now why the hell don't I find it on my system :(
 
Yep need to do that
Server Explorer in VS
 
5:46 PM
You should probably use something else than clickonce (before you start crying liek a baby because it sucks like hell) :)
Solutionview
 
and that
 
buttons on top
check the "show all files"
and then find app_Data, right click and include in project
 
that will show the app_data in a wpf app?
If it has one
 
assuming that the folder exist on disk and all that
 
ya
 
5:48 PM
but the mdf should really reside within the datalayer project though :p
 
I can't even find the "show all files"
 
which vs version?
 
but I have the thought that VS uses a different database when debugging / running, than what I have in my app.config
2013 CE
 
@scheien first apps are Never secure
 
in the solution explorer, you have a button row at the top
4th from the right, should be the "show all files"
 
5:49 PM
found it, I had to have my Project selected, not the Solution itself
 
@juanvan: indeed
 
now there's a bin folder and an obj folder
 
that is correct, forgot to mention that :p
 
there is more stuff under the rocks of VS
 
alright, I updated my app.config so that it has a connection string gist.github.com/3bdNKocY/43e99f911068d8cdadad
but when I look in the server explorer, I don't see that database, i think
 
5:52 PM
remember to set the mdffile to copy always/if newer
 
I don't even have an mdf file in my project structure
 
What does the solution structure look like?
one project, or multiple projects?
 
1 solution, 1 project, 1 test project
 
hm
If you run the application it works like a charm? (then it should be there somewhere)
Have you checked the project folder via explorer?
 
yeah, it runs awesome. But when I open the "mssqllocaldb" folder, it shows several databases, but not the one i'm looking for
 
5:57 PM
you using EF - what does the DbContext class look like
maybe its baked in there
 
i'll upload it. Don't shoot me for bad code plz :D
 
sp right now I only see you accessing DataModels/postalCodes.xml on disk for storage
 
@juanvan yeah, and that file gets copied over
 
 protected VivendaContext()
{
LoadTowns();
}
that is loading that xml
 
is that a problem? It's worked so far (on my development machine, but still)
 
6:03 PM
did you try connecting to (LocalDb) in vs Server Explorer?
is your database in the listings? or one with the app name
 
ok search the solution for LocalDb
That word has to be there some how
 
@juanvan all occurrences are in the app.config
 
this is the updated app_config
take a trip to C:\Program Files\Microsoft SQL Server\MSSQL11.SQLEXPRESS\MSSQL\DATA
or some C:\Program Files\Microsoft SQL Server\***\MSSQL\DATA
 
@juanvan Alright, I think I see it
 
6:10 PM
found the mdf?
 
But why is it in the folder for SQL Server, and not some LocalDB?
Yeah, I found the mdf with a correct changetime
 
Integrated Security setting is not set to true
this will place it in the app_data folder - SO Link
 
Perhaps I'm doing all of this wrong. What I basicly want is a way to deploy my application to a client's computer, without him having to install SQL Server
 
they won't
the MDF needs be there tho
you put the sql ref in the program :)
 
@juanvan Does that mean that whatever development data I put in the database, gets deployed?
 
6:13 PM
YOU BET!
its a copy
you can make a msBuild config to empty the mdf I think
 
I don't want to overwrite the user's db. Once it's created on the clients computer, I do not want to lose any data
 
mdf should only deploy once, one clicks then look for executable updates
never tried it - sounds like something to research
 
Hey everyone.
 
@juanvan Funny you mention MSBuild, my VNext project ate shit randomly for that reason.
I had to Clean the solution to fix it, since there wasn't an error. It was really, really weird.
 
6:26 PM
was working on doing a dual deploy with TFS and MSBuild - MSBuild I think went open source
 
Yeah, it did. Which is good and bad.
 
 
1 hour later…
7:46 PM
Have any of you seen this error before? {"Expansion of |DataDirectory| failed while processing the connection string. Ensure that |DataDirectory| is set to a valid fully-qualified path."}
I'm getting that when trying to open my published wpf application
 
8:05 PM
Anybody here who is amazing at expressions? I would need some help ^^
@TravisJ you are generally amazing!
 
I am pretty familiar with expressions
 
okay!
So what i need to do is basically
        public static string GetUniqueUrlName<TEntity>(this EntitySet<TEntity> entitySet, TEntity source, Expression<Func<TEntity, string>> selector)
            where TEntity : class, new()
        {
            string current = selector.Compile().Invoke(source);

            while (entitySet.FirstOrDefault(/* something here that is basically "selector == current" */))
            {
                // create new urlname
            }

            return String.Empty;
        }
And then use it as such:

Context.SomeEntities.GetUniqueUrlName(entity, n => n.UrlName);
Any idea @TravisJ?
 
@JohanLarsson skype broken again?
 
yeah, switched to laptop
was working on stationary for a while
testing it again hold on
was in a somewhat heated discussion in c++
@TomW broken on both again now
 
8:21 PM
fuu
 
I solved it @TravisJ (:
 
@JohanLarsson I asked whether you watched the F# domain modelling presentation
 
not yet, clicking very soon
 
it's archived so that's good
I'm rewatching the part I missed
 
@diemaus - Sorry, I was talking to a coworker
@diemaus - Good job solving it on your own though! :D
 
8:29 PM
Still not entirely solved, but i'll get there @TravisJ
 
@diemaus - A note about using where: new() you only need this if you intend to instantiate the type using new TEntity()
 
I know, but i need to add the constraint there because, it's a constraint somewhere else.
 
you can still have where TEntity : class
You just don't need ,new()
 
@TravisJ yes, there i can. But not in another class.
 
Okay
 
8:35 PM
so. much. hockey. ow.
 
@diemaus - I don't understand your use of while firstordefault
 
I have change it ^^
 
For current you can use
string current = source.Select(selector);
 
     public static string GetUniqueUrlName<TEntity>(this EntitySet<TEntity> entitySet, TEntity source, Expression<Func<TEntity, string>> selector, string current)
            where TEntity : class, new()
        {
            if (String.IsNullOrEmpty(current))
            {
                throw new ArgumentNullException(nameof(selector), "The string provided is null or empty.");
            }

            current = UrlHelperExtensions.CreateUrlName(current);

            string initial = current;
@TravisJ you were correct about the new() btw.
It was an old leftover i could clean up
 
@diemaus - You may want to worry about using static methods with open database connections. It looks okay as is, but if you want to start using async ever you will need to move to a more instance based approach.
 
8:40 PM
I will keep that in mind, thanks!
 
So does that solution work?
It seems some of the core work was moved to the .EQ method
 
The EQ method takes a property selector, which is was i have, and is also more "native".
I could do a .Select(selector).Any(s => s == current); but that would fetch everything in the DB
 
Why not use a where clause? .Where(ent => ent.Property == current)?
 
That was the original issue.
@TravisJ because i have the selector, and cannot do .Where(selector == current) etc...
 
9:03 PM
have you considered changing the selector to be a boolean result?
<TEntity,bool> s => s.Property == s.OtherProperty
 
@TravisJ i must be able to change the "s.OtherProperty"
 
@diemaus - It would would be one of the arguments you pass into the method. You could change it at will, or simply have it be a string there
<TEntity,bool> s => s.Property == "Change Me"
 
Could you show me in code what you mean?
        public static string GetUniqueUrlName<TEntity>(this EntitySet<TEntity> entitySet, TEntity source, Expression<Func<TEntity, string>> selector, string current)
            where TEntity : class
        {
            if (String.IsNullOrEmpty(current))
            {
                throw new ArgumentNullException(nameof(current), "The string provided must not be null or empty.");
            }

            current = UrlHelperExtensions.CreateUrlName(current);

            string initial = current;
 
@diemaus - Can you give me a one line expected usage of your method
 
Sure
string fullName = String.Join(" ", model.Author.FirstName, model.Author.LastName);

model.Author.AuthorId = BookDB.Authors.GetUniqueUrlName(model.Author, a => a.AuthorId, fullName);
 
9:14 PM
So I would suggest
model.Author.AuthorId = BookDB.Authors.GetUniqueUrlName(model.Author, a => a.AuthorId == fullName);
Isn't that the comparison you use later? The Id to fullName?
 
How would that work in my extension-method?
basically
Travis J => travis-j
if travis-j exists, then travis-j-1
 
I see
Are these user name suggestions?
 
Basically to create fancy URL-names.
So basically booksite.com/author/travis-j
 
Have you considered using a guid?
 
I have, and i am. But this is for the url-name.
 
9:20 PM
@diemaus - Potential bug in your feature. What if a user name is removed, and the sequence of travis-j-1, travis-j-2, travis-j-3 becomes travis-j-1, travis-j-3, and you attempt to then return travis-j-3
 
I wouldn't it would return travis-j-2
 
Ah, yes, because it queries each time
 
Exactly ^^
 
using a where clause wouldn't solve the insertion, so your implementation looks fine to me
Is it possible a user name would have into the thousands of concat on their name?
travis-j-9001
 
If there there are travis-j-[1-9000]'s then yes.
I will probably implement a regexp for it later.
since mongoDB has pretty good support for them
 
9:28 PM
@diemaus - That iteration will take a long time past probably 500. Once you hit 5000 it will get very slow, and by 25000 it will probably start throwing exceptions.
 
And that's why i will re-work it later
 
I think if you count more than 100 of a user name, you may want to consider switching to a guid append
 
This is not for production
Again, this is not the users ID.
 
Oh, nvm then :)
 
This is just a nice identifier to be used in URL:s
All my entities implement an actual ID.
a guid
 
9:29 PM
Yeah, I meant a guid as opposed to an int for appending
travis-j-4e8f00b1be874cefa73152b2099557d2
 
ah, i get what you mean
url:s are supposed to be user-friendly.
travis-j-888 is easier to remember than travis-j-4e8f00b1be874cefa73152b2099557d2
 
I guess it depends on the context at that point. It is clearly easier to remember, but if these are constantly shared, you could always minify the url using tiny url.
 
 
1 hour later…
10:39 PM
I need to validate console input in a customized
i need the user to enter N N (Number , space, number)
like 5 5
or 3 6
 
web app?
Or windows forms? WPF?
@Alundrathedreamwalker
 
straight console app
 
Oh, you said console. Sorry.
 
You can use regular expressions
 
10:46 PM
how?
 
something like (\w+\s{1})+(\w)*
 
([\d]+ [\d]+)
would work
 
(1 or more word chars followed by a single space, repeated zero or more times, terminated by the same sequence without a trailing space)
oh yes, use \d and not \w
 
I am using console.readline()
is that th eright one to use
 
Basically @Alundrathedreamwalker. if (Regex.IsMatch(input, "([\\d]+ [\\d]+)"))
yes
 
10:52 PM
Cool lemme try it
 
But what is the greater picture here @Alundrathedreamwalker?
Do you need to handle these numbers after they are put in?
 
Then i would suggest using manual handling, and not regexp.
You need them as numbers as well?
 
yes
i was thinking about iterating throug the string
 
there is an easier way
 
10:55 PM
or something like that and develop a customized method
What is it?
The Regex.IsMatch is great
i didnt know about it before
i dont do a lot of console apps
Is there an easier way to get the int out of the string
?
 
dotnetfiddle.net/7RGcvi @Alundrathedreamwalker
 
Great , i will create a question right now, post it and I will accept your answer
 
00:00 - 23:0023:00 - 00:00

« first day (1624 days earlier)      last day (3310 days later) »