« first day (1525 days earlier)      last day (3425 days later) » 

7:07 PM
Is there a way to easily databind an Enum (with a localized description) to a Combobox, which the user can select and update? I've seen this answer stackoverflow.com/a/17381168/1653998 but I don't think that selecting the value will be pushed through to my entity.
 
user862319
crazy question about lambda expressions and LINQ...
 
user862319
How would I go about passing a lambda expression like ctx.Account().Select(...) to a method within Account() as a lambda on that invocation?
 
@Bob that makes no sense
 
Stupid question: When I load an existing project into a new solution, why do all the references break?
and I mean ALL the references..
System is broken
also...HI!
 
Please: those are not stupid questions
 
7:12 PM
that first one certainly isnt
 
@ginkner I think all references have a property called HintPath in the project, which might be relative.
 
@Bob First, a lambda is an expression of the form (args) => expression. Second, a delegate is a reference to a function (or many functions). Now that you know that, what is your actual question?
@ginkner define "break"
 
you might be able to use let, too
let fn=(x=>x*2)
 
might be nothing to do with that
 
HAPPY FRIDAY, Ladies & Gentlemen
7
 
7:13 PM
@TomW that's all well and good for the normal "I made this thing" reference
 
He didn't call us bitches
 
but this is the default library references
 
I am working with webpy in Python right now and I miss ASP.NET/MVC. Since when did people who do not know the difference between shutting down and sleeping know which technology stack should be used
 
4 hours ago, by Kendall Frey
Ηαρργ Γτιδαγ Βιτςηες
 
haha
 
7:14 PM
"System, System.XML, WindowBase..."
 
@ginkner what happens when you delete the ref and re-add it?
 
for the assemblies I've made, they're automatically invalid. Let me check the system ones...
also invalid
 
so they all break and can't be re-added
 
though I notice system.dll is version 4.0 even though the project is set up to use 4.5
yeah
this is ONLY in a new solution
they work fine when they're in it's own solution
 
4 mins ago, by Kendall Frey
@ginkner define "break"
 
7:17 PM
break
 
2
Q: Visual Studio 2013 dosen't recognize anything

AymenDaoudiI opened my WinRT (I'm using MVVMLight) project in Visual Studio 2013 this morning, and found out that all kind of types even system ones are not recognized saying Cannot resolve symbol 'bool' for example, note that the solution builds, executes and works all fine ! C# : Even XAML : I tri...

 
the referend component 'System" could not be found
 
i bought a new laptop, can't wait for it to get here
 
Add-on plugins? that question an example of the problem
@Steve Touchscreen?
 
of course not
i dont like touchscreen laptops
 
7:19 PM
Windows 7?
 
comes with w8
 
think i'm going to keep it w8 and upgrade it
 
@juanvan none of my projects have a Use msbuild to obtain project references'
either in the F4 property menuor the properties file.
 
@juanvan not sure what you mean
 
7:22 PM
@ginkner nuget?
 
@juanvan Why would I not be able to update a class value
 
@NETscape there are a couple nuget things, but I think this is a sperarate issue since the default assemblies are broken too. I've had issues with nuget before, but nothing like this
 
your nuget assemblies might be .NET 4, and that's why its pulling in .NET 4.0 System.dll
 
not that I can see.
The only nuget is NLog, and the included path is specifically for "net45
"
but you're right, it seems to be pulling the wrong DLLs
even though the project itself is set to target 4.5
 
how are you adding system reference?
 
7:28 PM
add references
the reference manager says it's targeting .NET framework 4.5
 
browse or assemblies
 
assemblies/framework
readding the reference changes the csproject files Reference node from a standard reference node to one with a relative hintpath. it also doesn't work.
 
For this example pastie.org/9790266#10,19, why can't I update a class property ? Basically when I try to the line Task<int> firstFinishedTask = await Task.WhenAny(downloadTasks); fails, and the application exits with no exception
 
what property?
you don't seem to have any in this class
 
@Steve - LOL you saint :)
 
7:32 PM
@Tommo1977 do you know what exception you're expecting? You can set up the debugger to break on thrown rather than uncaught exceptions.
 
> For your main project also need to install "NLog Configuration" package.
 
it helps with the ghost exceptions tasks sometimes help
Nuget Package manager says it's all installed
NLog Config, NLog ,and NLog Schema for Intellisense
 
@ginkner - ghost exceptions tasks?
 
lol
the weird non-detected exceptions awaited tasks produce if you're not careful
 
I asked a question similar to this code
Task<int> firstFinishedTask = await Task.WhenAny(downloadTasks);
8
Q: Why doesn't this exception get thrown?

Travis JI use a set of tasks at times, and in order to make sure they are all awaited I use this approach: public async Task ReleaseAsync(params Task[] TaskArray) { var tasks = new HashSet<Task>(TaskArray); while (tasks.Any()) tasks.Remove(await Task.WhenAny(tasks)); } and then call it like this: ...

Long story short
If you want to properly await all the tasks, I would suggest something a little overkill just to make sure.
public async Task CompleteAsync()
{
 var tasks = new HashSet<Task>(this.TaskList);
 while (tasks.Any()) tasks.Remove(await Task.WhenAny(tasks));
 foreach (var task in this.TaskList)
 {
  try
  {
   await task;
  }
  catch (Exception ex)
  {
   //log exception in some fashion
   //or handle specific
  }
}
I use this in a class to await a list of tasks that have all been started at different times in order to ensure I can use them all at some point.
TaskList is a List<Task>
@ginkner ^
+^^+^^^+^^^^
 
7:41 PM
lol
I'm still working on my cavalcade of broken references
Need to push out an installer
it's a bit difficult when the project won't compile in the solution
 
can you post your .config?
 
my what now?
 
packages.config
 
uh...sure
 
@Tommo1977 i was able to use the prop but it never wrote to the console window for me
 
do you have a NLog.config?
 
yes
yes I do
but how would that invalidate every other reference?
again, this project compiles in it's own solution
 
but with all your projects in a solution it doesnt?
 
when it's in a different solution
yeah
also it doesn't have a manifest...
not sighned...
dont feel like that's useful info though
 
gotta be dependency or something in another project
 
7:57 PM
I disabled the restoring nuget...
I don't know
why would one broken dependency break all the other ones?
 
make sure all projects are targeting .net 45
 
I have
all my dlls target 4.5
 
<rant>Why do people post question titles that aren't freaking questions?! "Javascript working only once".... really?? It doesn't even describe a problem. ugh This is the type of crud that when piled up lowers the site's SEO rank.</rant>
 
and so do all the nuget packeges i'm using, directly and indirectly
 
and all are same platform target, Any CPU or x86/x84
 
7:58 PM
Hmmm...I'll check that
 
I am about to dislike what domain.com does
 
The annoying thing is I have another project where are the references are fine
D:
 
wtf github. Whoa there! Too many requests are being made from your account or IP address. Wait five to ten minutes and try again.
i was paging through a search...
 
@TravisJ SO needs a did you RTFM the manual check before accepting the question
 
@NETscape why does that happen?
 
8:01 PM
@NETscape yup, everything is AnyCPU
 
have you restarted VS
 
no... not yet
 
if they can all build independently, but can't build in a solution its gotta be a dependency issue or build order or something...
try restarting
VS
 
done
aaaand....
nope
still broken
there's gotta be some path issue
maybe if I check the solution file
 
yeah
52 mins ago, by Tom W
@ginkner I think all references have a property called HintPath in the project, which might be relative.
 
8:05 PM
what I meant to say was project file, just to be clear
 
The standard libraries don't
yes
 
that packages.config file... check all those paths are correct, and all the paths inside those projects packages.config
 
Hmm, ok. Another thing that springs to mind is that references when you select them and view their property grid still show a path, I think, even if they're GAC references.
Not obvious where that's from
 
yeah, they do
I actually just reinstalled NLog, so that shouldn't be an issue
 
and you should be copying references of main project references to output folder (that aren't System/Microsoft/etc)
 
8:08 PM
what?
 
if you have Project A (main.exe) and Project B, and Project A references Project B, ProjectB.dll should be in ProjectA/Debug/bin/ or whatever
 
ugh, don't you hate it when solutions aren't designed properly
 
AKA copy to local output dir = true
 
yes
yes I do
though It's very difficult to find good information on what exactly a well designed solution is supposed to look like
 
Do this
That's impossible
*hour-long phone call with top-speed redesigning*
 
8:10 PM
It's been bugging me forever
 
@ginkner Well, make sure it at least is implementable
 
?
 
Things I can't wait to get from Cuba - a 57 Chevy in Mint condition
 
does another project use NLog?
 
yes
 
8:11 PM
on the plus side, I now get to write my own version of .gitignore
 
is it also using NLog 3.1
 
lol
wtf
 
Actually, is there an existing project that I could use for ignore file parsing?
 
NLog Version 0.0.0.0
Yeah
 
hey guys
 
8:12 PM
it just cant find the files for some stupid reason
 
theres your solution... its a path issue
 
So...whats the issue?
and how do I solve it without totally screwing up the path in the OTHER solution?
the stand alone one
OR
no
 
do you have MyProjectA and OpenSourceProjectB ?
 
No
 
its a dependency thing...
if you have one project using version 2.0 and another using 3.0
when both file try to get copied to output folder... both are named NLog.dll...
 
8:16 PM
I have NuGet Packegs A,B,C in ProjectA, NugetPackages B,D,E in ProjectB, Project C uses Project A and NuGet D, Project D uses Project A and B and NUGet B and D
Hmmm
 
I think I must be setting some sort of record for sneezing, fuck me.
 
aw
 
@KendallFrey I have sneezed for 45 mins straight
 
@NETscape I tested your theory by getting a new solution and just importing the broken project. It still doesn't work
pastebin.com/KFfayebE here's the project file
 
nothing uses Project C
?
 
8:19 PM
Project C and D are both primary outputs
no dependencies between them
just shared dependencies on the base library
s
 
..\..\..\..\..\..\..\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework
that could cause a problem?
 
yeah
 
see what that looks like in one of the other programs
 
no, that's what was put in by visual studio when I tried to re-reference a standard assembly
I've also tried editing the reference path for the project, but it doesn't seem to change the project file at all
 
8:24 PM
It's almost like the project isn't getting the proper search path
this is driving me nuts
ok
now all references to non-microsoft assemblies are gone
 
user862319
dat relative search path.
 
Just like a ship's wheel down a pirate's pants
 
change those hintpaths
 
@Bob yeah, I know
 
lol
 
8:28 PM
The issue is why visual studio thinks it NEEDS those hint paths to find the assemblies
shouldn't they be being picked up by default?
 
I think if a process wants to load an assembly in windows, it has to nominate it as a file, regardless of whether it's GACed
 
I mean by visual studio
 
then the .net assembly loader intercepts that and supplies the version in the GAC regardless of where you think you were loading it from
 
huh
 
No, I mean I think that's what the path is for
 
8:30 PM
and so the standard <Reference Include="System"/> node is just a shortcut for saying "Find a file with the given .Net target framework and load it
 
I guess so. That being a project file, I guess that shorthand notation doesn't persist as far as any assembly you build
I only have a very vague outline of how that stuff actually works
 
it's cool ,and info helps
do you know anything about the <SolutionDir> node?
the project that works doesn't have one
deleting it didn't help though
 
<Reference Include="System.Xaml">
  <RequiredTargetFramework>4.0</RequiredTargetFramework>
</Reference>
get rid of required target framework
 
Will try that
nope
 
get rid of ALL hintpaths
 
8:34 PM
already done
 
for system/framework only references?
 
yup
 
why this:
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
  <Visible>False</Visible>
  <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
  <Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
  <Visible>False</Visible>
  <ProductName>.NET Framework 3.5 SP1</ProductName>
  <Install>false</Install>
</BootstrapperPackage>
 
I have no idea
I haven't tuched that yet
It's also in the working project, so I didn't consider it problematic
what
the actual hell
it was the nuget thingy
fucking nuget
What the hell
 
jfc
 
8:40 PM
??
 
!!urban JFC
 
@NETscape [JFC](http://jfc.urbanup.com/5172321) "Jesus Fucking Christ"

Used when extremely aggravated, confused, excited, or all of the above.
 
lol
I thought that was a funny way to tell me to look it up myself ^^
 
Who else thinks that the new string interpolation is very webcentric and wonders why people are getting so annoyed by their introduction?
 
I have no opinion because I have no idea what you're talking about
but I'm annoyed with the webcentric attitude of everyone in general
 
8:44 PM
The webcentric attitude comes from the advantage that almost every device can run a browser.
 
@juanvan sorted out the task issue
realised what was going on
I have another question though
Say I need to spawn off 5 tasks in parrell
 
Write once, run everywhere; it is a very beneficial aspect
 
How best should I wait for them to finish
Would something like this be sufficient
 
@MoonOwlPrince I don't see it as web centric, really
 
it also suffers from the fact that it pisses me off
 
8:45 PM
int Time = 20000;

while ((!ncClass.FinishedProcessing) && (Time > 0))
{
Thread.Sleep(100);
Time--;
}
 
eww - what's that for?
 
booooo
 
Yeah! And give me any web framework in any programming language today. I can MVC the hell out of it! The browser is just a means to an an end. Well, I thought of templating when I thought about the benefits of the new introduction
 
spinning booooo
 
why not just use Task.WaitAll(tasks) ?
 
8:46 PM
I too am kinda new to tasks so I would not know past an example
 
or Task.WhenAll(tasks) (depending on usage/context)
 
you would prob just load the other tasks as new results come in
 
talk to reed
he's kind of great
 
@ReedCopsey I am referring to this example pastie.org/9790266#19
 
Kind of? Don't insult the man! :)
 
8:47 PM
Basically I have a 20 second timeout
But
 
lol. I enjoy understatement
you'll get used to it
 
When I call ncClass.SomeMethod(); how would I be able to call Task.WaitAll(tasks)
 
@MoonOwlPrince string interpolation meaning?
or new at least
 
@Tommo1977 Task.WhenAll is your friend there ;)
 
@Tommo1977 you have to set it up so SomeMethod returns a task
 
8:48 PM
instead of your loop
 
{varName}?
 
@NETscape I think he means the new C# 6 string interpolation
 
yeah
 
How does one interpolate a random ass string?
 
@ReedCopsey one of the things I am going to do for Christmas is fork webpy and actually make it more usable e.g. dealing with the globals for good, changing the urls to a dictionary and providing complete documentation.
@NETscape Yeah I mean the C# 6 string interpolation
 
8:49 PM
where you can do $"My name is {FirstName} {LastName}"; instead of string.Format("My name is {0} {1}", FirstName, LastName);
 
@ReedCopsey But wouldn't Task.WhenAll just wait for them all to finish
 
...where do the arguments go?
oh
 
@Tommo1977 yeah - if that's not what you want, what's wrong with whaty ou have now?
 
I would like to think the scripting languages could have influenced that
 
It's...neat syntatic sugar?
 
8:50 PM
what i have now is fine, I just wondered if it is best practice this way
 
I don't see anything inherently wrong or right with it
 
for what i'm trying to
 
@Tommo1977 If all you want to do is print off hte values, that's fine
 
ok
cool cheers
 
you could simplify your code a bit - no need for separate query/list, etc
but the approach is okay
ie: var downloadTasks = urlList.Select(url => ProcessURL(url, client, ct)).ToList(); instead of 2 statements over multiple lines
if it's a lot of URLs, a hashset might be better, too
I'd also make SomeMethod return Task not void
 
8:53 PM
Well, if you are going to be templating then it comes in handy when you want your code to be more readable
 
@MoonOwlPrince only problem I have with it is that it's culture sensitive by default, and you have to write your own formatters to make it not culture sensitive
which is odd at best
 
It is a small change but one which we should never understimate because what that means now is that you need not to worry about variable positioning
UGH! I will say it again: the string datatype is a broken type
 
why's that?
 
Yeah, I'm not seeing a huge issue?
that is quite odd though
Might stick to string.format for a while
 
Well, the string datatype is only well defined for ASCII characters across most English programming languages. When we start getting outside of that comfort zone with different character sets, things get slightly complicated when you have to be a polygot
 
9:00 PM
@MoonOwlPrince Oh,you mean in general, not in a specific language
 
Yes, in general
 
ie: .NET's System.String (which, given that this is a C# room, is typically implied)
 
I should have clarified. Pardon me for that
 
.NET at least "standardized" it within System.String, so it's always UTF-16 there
3
which works for a lot more cases than ascii
(but makes working with ascii a bit of a pain, too :) )
 
Yes it is a PITA. I think one of the underlying reasons it is so is: on the lower level the other types are defined but the string type is not as it is more of a special form of a datastructure
 
9:05 PM
well, .NET did a reasonable job of handling it
I think a large part of that was making it immutable
 
I think it's generally a good think it's now considered a data structure type
the days where all computers used ASCII is long gone
 
And cs50.net used ASCII in 2014
And also think the fact that there is a difference between value types and reference types helps when you consider that strings are not taken as value types
 
You probably wouldn't notice if they made string a value type
seeing as it's immutable
 
Has anyone poked with the internals of .NET?
 
a bit
yeah
like il?
 
9:13 PM
@MoonOwlPrince sure
My favourite: System.LOGIC
 
Let me read the docs on that
 
hah, good luck
it's internal
I should say was
It doesn't exist after 2.0
Hmm, is there a good way to convert, say, "*.dll" into the regex .*\.dll?
Best I can think of is escape then replace
 
9:29 PM
WHAT?!? WHY
I wish there was a search engines that does nothing but matches parsed HTML strings so I can include characters such as period
 
What we really need is a search engine that can regex all the html
 
Without it being parsed?
 
9:46 PM
Anyone use this jQuery.Unobtrusive.Validation from NuGet.
 
9:57 PM
Given a base path and a full path, how do I create a relative path?
 
What do you mean @KendallFrey ?
@KendallFrey You mean you want to create like: ~/Home/SomeContent.pdf?
 
@Kendall Uri.MakeRelativePath is the best approach
though you need to convert back to filesystem format if that's required
 
e.g. "C:\stuff" and "C:\stuff\asdf\file.txt" would become "asdf\file.txt"
 
unfortunately, no .NET API in Path class to do the conversion :(
or PInvoke PathRelativePathTo ;)
 
sounds brilliant, except for the pinvoke part
 

« first day (1525 days earlier)      last day (3425 days later) »