« first day (1287 days earlier)      last day (3658 days later) » 

11:00 AM
just needed to separate that class
 
Your class1 will inherit a Collection property.
I don't carrying my PC here, but I thing this is the solution
 
from the MainForm to avoid conflicts
 
Jon
Yeah... Kreverson is most likely right here
depending on your code...
I've never done this myself.
 
the thing was its internal class and it has attribute
 
Jon
look at the first example.
you need to initialize your class1 before you can init your Collection class.
so...
 
11:04 AM
i still dunno how can i call an internal class or if its possible
 
Thanks @Jon, I understood now: nested classes
 
Jon
class1 c = new class1(textbox);
c.Collection o = new c.Collection();
internal just means you can't access the class from outside its own assembly.
as long as you are calling it within its assembly it should work just like any other class.
just like a public class.
 
It is so much better creating a property list inside your class, don't you agree?
 
Jon
depends on the functionality of that inner class really...
 
i see ... @Jon
 
Jon
11:07 AM
maybe it should be a class on its own.
If you just put that class inside another, without a reason, you are most likely doing it wrong
 
I have a question, how to make this with winforms controls? the dotted lines in between etc. Pic: bit.ly/1faehoW
from Inno Setup..
 
Jon
pic is blocked from my work :)
 
how to add it here in chat?
 
Jon
-->upload button
 
11:14 AM
there is no upload button?
 
Jon
hmm.. might be a rep unlock thing..
 
probably
 
@jyrka Hello buddy
 
is bit.ly or mediafire.com blocked at your work?
 
Jon
@user2056563 what is the error message?
imgur.com isn't blocked.
 
11:15 AM
ok
 
Jon
bit.ly either
 
Jon
That seems like a custom control
 
@Jon it gives me "The given key was not found in the dictionary"
 
hard to remake in WF ?
 
Jon
11:19 AM
If you just awnt to get the dotted lines, just use a TreeView
but the checkbox/radiobutton on the left side is custom
 
can do this for listBox , but what about treeview? listBox1.Controls.Add(radioButton1);
 
Jon
treeview.nodes.add
a treeview, does not take controls
You can do treeview.Controls.add
It will add the control as a child to that treeview (and draw inside of it)
 
how to add it as a node? instead of drawing it to position 0,0
 
Jon
Node is just a string representation
If you want to add checkbox/radiobuttons, you would have to create a custom control
or use a existing lib
 
@Jon can you help me with my parsing issue ?
 
Jon
11:27 AM
Yeah, the issue is that you are trying to scrape data that is not there
You are using Linq statements to build your dictionary
no what line does this crash?
 
@Jon XDocument doc = XDocument.Load(FileName);

            Dictionary<string, List<Chapter>> plistData =
                    doc.Root.Element("array").Elements("dict")
                        .Select(GetValues)
                        .ToDictionary(v => (string)v["MainTitle"],
                                      v => v["SubTitle"]
                                      .Elements("dict").Select(ParseMyObject).ToList());
In the above code in v => v["SubTitle"] it crashes
 
Jon
The easiest fix would be to inject blank data into your XML
Yeah, it expects those nodes in the XML and they are not there
 
@Jon No i cant do any modifications in the xml because we have many xmls like this and our code should work
 
Jon
Not sure how you would do this with linq...
but if you got rid of the linq, you could just check if the node exists before parsing
 
@Jon can you help me on that ? i dont have any problem using other way of parsing also
 
Jon
11:32 AM
@Illaya why?
 
this room for all developers
 
Jon
facepalm
 
what??
 
@Illaya You've not been banned in this room ?
 
Jon
I think he might get banned.
 
11:34 AM
He was from the JS one
Guess why ^^
 
@Illaya "This user has been automatically suspended for posting inappropriate content and cannot chat for 4 hours 29 minutes."
 
Jon
lol.
 
never laughed so hard
 
@dystroy Could it be his charming personality and respect of proper mannerisms online?
 
@WarrenFaith Where does it say this?
 
11:35 AM
@wasatz probably that, yes
 
Xeo
@WarrenFaith 6h 30mins you mean :)
 
@dav_i in his profile
 
Ah! Says 6h 28mins for me
 
Jon
@user2056563 Dictionary<string, List<Chapter>> plistData = doc.Root.Element("array").Elements("dict").Select(GetValues)
 
Xeo
Some more flags got confirmed in the meantime
 
Jon
11:36 AM
Start with that
errr
no
 
@WarrenFaith the more messages we flag of him, the longer the ban.
 
indeed
 
@Jon sorry i didnt get you
 
but he managed the fasted, most hardcore punish I have seen in my SO chat history
 
Jon
yeah, disregard
 
Xeo
11:37 AM
@WarrenFaith He also managed to actually spam-ping quite a lot of people before any flags kicked in
 
Jon
Woke up a bunch of sleeping devs
for shame.
 
well his punishment was well deserved
I guess he can go offline for today :)
anyway, I am out again
 
Jon
anyone actually join that channel?
 
@Illaya what is it
 
Jon
All in One
This room is for all developers around the world
 
11:39 AM
Well at least he wasn't posting porn
 
Jon
its the least he could do
 
12:11 PM
 
hi all
Is it possible to edit an INI File at installation using VS Installer Project?
 
12:29 PM
Can i add this: "button2.Click += (s, e) => { };" to (example) button1_Click(object sender, EventArgs e){} ? or only way is in "public Form1() {}" ?
 
you can do that in any method
 
ok :)
 
How long before my manager realizes a difference between java and javascript
 
@Shoe 0_o
@Shoe Probably soon after you go to your manager's manager and tell them that they don't know this and that they're unfit to do their job?
 
So never lol
 
Jon
12:59 PM
tell him one is a script
He'll be all like
Hmmm... a handful of live wallpapers for android were found to have hidden bitcoin miners in them.
The creators were smart enough to disable the mining once the phone hit 50% -- so users were not as aware that their phones were being sucked dry
It is also worth noting that you can create a javascript bitcoin miner... so just by visiting a website, your PC can be used to mine bitcoins without you even knowing... (Ahem, cookieclicker)
 
@Shoe
575
A: What's the difference between JavaScript and Java?

Greg HewgillJava and Javascript are similar like Car and Carpet are similar.

 
1:14 PM
hi how can I make Visual Studio to tell me that a code block can throw a particular exception and I should handle it?

For example I wrote this simple code

`class Program
{
static void Main(string[] args)
{
throw new DivideByZeroException();
}
}`

I thought VS will give warning at compile time asking me to handle it. Instead, it simply breaks on Exception
 
Jon
@drch nice find :)
 
is there anyway I can force VS to detect this at compile time and notify as warning
??
 
@Mahesha999 no. I think that's a java-only feature.
 
Jon
@Mahesha999 an exception is not a compile time error
oh.. sorry misread
 
and i use the term "feature" loosely
 
1:16 PM
@Jon ??
 
Jon
I wonder if you could turn warnings on for unhandled exceptions
 
@Mahesha999 of course not. Otherwise there could be no exceptions
If we were forced to handle all exceptions, they wouldn't be doing their job.
 
Jon
well... an unhandled exception would crash your application... I think he is saying the compiler should warn on that
 
@KendallFrey in java, can't throw an exception unless you declared that you will
 
But every non-trivial app can throw unhandled exceptions
 
1:18 PM
@KendallFrey nope but say I have function() and in docs of that function() says that it throws XyzException then VS should notify it
 
and you have to catch or rethrow all exceptions
 
warning about that would be stupid
@Mahesha999 should notify whom?
The method that calls it?
 
nope, to us, in warning, on the fly as we write a code, since VS knows that particular framework method can throw particular exception, then its best user handles it, isnt it?
@KendallFrey
 
Not necessarily
 
Jon
Depends what you are doing... if you are writing a lib, you may want to throw exceptions that can't be handled
would be handled by the user of the library for example.
 
1:21 PM
but what if I want to handle all exceptions, just to log them?
 
For example, just because a method can throw an ArgumentNullException doesn't mean you need to handle it if you know that arguments will never be null.
 
user1804599
 
@Mahesha999 Use AppDomain.FirstChanceException
 
how to do this in C# ? code.google.com/p/xvm-updater/source/browse/trunk/Main.dfm (starting from BitMap { )
 
1:22 PM
@rightfold ha
 
Jon
@jyrka by recreating it
 
user1804599
room topic changed to C#: C#Script, also known as C# for short. [.net] [asp.net] [asp.net-mvc] [c#] [entity-framework] [linq] [visual-studio] [wcf] [wpf]
 
also in eclipse if we are handling generic exception
try
{
code.....
}
catch(Exception ex)
{}

then double clicking on `Exception` highlights in `code...` all method calls which can throw exceptions that will be typecasted to generic `Exception`, so now by hovering on those method calls, I can know which `ParticularException` that each method can throw, and then I can write `catch(ParticulatException e)`

So I can know in a code block what all types of exceptions can occur and will be typecasted to `Exception`
 
@Jon How ?
 
Jon
Analyze / Plan / Build / Test
 
user1804599
1:26 PM
lol testing after building
 
can't test uncompiled code, silly
 
user1804599
You do not have to build everything before testing it.
 
But you have to build 'it' before testing it.
 
user1804599
Yes, but not everything.
 
Jon
Build as in, make it
 
user1804599
1:27 PM
Testing is part of building.
 
Jon
All good coders write EVERYTHING, before ever compiling.. they just know they are right. Don't need a stinking compiler to tell me.
 
WE NEED A DICTIONARY
 
user1804599
@Jon No. Those are not good coders. Those are terrible people.
 
@Jon Not all JavaScript coders are good though
 
How do you call that? in (Bitmap { ) ? cant search google either if i dont know whats it called?
 
user1804599
1:28 PM
Good coders write tests so they can make sure they are right.
 
Jon
that was sarcasm
 
user1804599
They don't rely on their naivety.
 
user1804599
Also meh "coder."
 
@Jon Use the font
 
Jon
Anyways you are disputing something that we all agree on.
 
user1804599
1:29 PM
Sounds like someone who does nothing but typing.
 
Also, install the userstyle
 
Jon
userstyle?
 
user1804599
1 message moved to Trash can
 
user1804599
You already asked that before (in the same butt-ugly unformatted manner).
 
for the sarcasm font
 
Jon
1:30 PM
Yeah, I need to use a sarcasm font for sure
 
@font-face
{
  font-family: sarcasm;
  src: url("http://glennmcanally.com/sarcastic/fonts/arials.ttf");
}
i>code
{
  font-family: sarcasm !important;
  font-style: normal;
}
 
usually testing is enforced by organization policy, so no point in generalizing definition of good coder, u have to write test cases
 
sup nerds
 
Jon
@ShotgunNinja ping
 
really really white and nerdy
 
Jon
1:32 PM
assert(everything is ok);
This is fun:
 
How does IDisposable fit into the Singleton pattern?
 
@KendallFrey The C# chat rules has dropped off the stars!
 
I have this XML and are trying to get all the images out: <Images>
<fanart>
<original width="1920" height="1080">fanart/original/2-1.jpg</original>
<thumb>fanart/thumb/2-1.jpg</thumb>
</fanart>
<fanart>
<original width="1920" height="1080">fanart/original/2-2.jpg</original>
<thumb>fanart/thumb/2-2.jpg</thumb>
</fanart>
<fanart>
<original width="1920" height="1080">fanart/original/2-3.jpg</original>
<thumb>fanart/thumb/2-3.jpg</thumb>
</fanart>
<fanart>
<original width="1920" height="1080">fanart/original/2-4.jpg</original>
 
Jon
@KendallFrey I think a destructor would be better, in a singleton.
 
I was thinking the same, as I can't figure out any other way
 
Jon
1:43 PM
Dont' see why you would want GC to do it, considering your singleton's init/release is controlled by you
 
no, it's not
It's initialized in the static constructor, and lasts the lifetime of the app
 
Jon
ah.. then you shouldn't have to worry about releasing the memory then...
app close will do that.
 
well, I have another issue, really
I'm not really sure how to fix it, but I have threads that are running after the AppDomain is unloaded
 
Jon
ah.. have you tried closing them off in a destructor?
 
not directly
I was hoping it would terminate by itself
 
1:52 PM
> hoping
> programming languages
 
Jon
You can't pray a bug away
 
It's complex
I was hoping that a certain class had been implemented a certain way
 
How do i split these images in this text and add them to a list? : fanart/original/2-1.jpgfanart/thumb/2-1.jpgfanart/original/2-2.jpgfanart/thumb/2‌​-2.jpgfanart/original/2-3.jpgfanart/thumb/2-3.jpgfanart/original/2-4.jpgfanart/th‌​umb/2-4.jpgfanart/original/2-5.jpgfanart/thumb/2-5.jpgfanart/original/2-6.jpgfana‌​rt/thumb/2-6.jpgboxart/original/back/2-1.jpgboxart/original/front/2-1.jpggraphica‌​l/2-g2.jpggraphical/2-g3.jpgscreenshots/2-1.jpgscreenshots/thumb/2-1.jpgclearlogo‌​/2.png
 
wow that's gross
 
Jon
split at .jpg i guess..
pretty gross.
 
1:55 PM
Nope, there's pngs
can't split on jpg
split on the dot
use the first three letters of the following entry to determine filetype
 
Jon
seems like that would work.
 
woo puzzles
 
Jon
assuming no file name or directory contains a dot
 
Hello
 
praying no file name or directory contains a dot
 
Jon
1:57 PM
I prayed for this bug to go away
 
If that's the case, just merge that entry with the previous one
 
the .png doesn't matter
 
Jon
My argument on faith healing.
 
only the jpgs
 
@Thunder then split on jpg and rebuild the individual entries after splitting, unless they end in png.
in which case skip them
 
Jon
1:58 PM
heh
 
yeah thanks, but im not sure how to do it :/
 
Jon
thing is.. split only takes char
so you would have to substring
 
do a repeated IndexOf on the tail, then substring into a current entry and a tail
don't they teach you anything in Algorithms anymore
 
there is an overload of split for strings too
 
Jon
are you sure?
 
is there any way to limit the response size in httpwebrequest like MaxResponseContentBufferSize in httpclient?
 
Jon
ah cool
 
Is it bad to cancel a CancellationTokenSource in a destructor?
 
Jon
perfect.. split on ['.', 'j','p','g']
 
or might it be inaccessible?
 
2:00 PM
> An array of single-character strings that delimit the substrings in this string, an empty array that contains no delimiters, or null.
 
Jon
errr... that won't work either.
cuz of the png
 
> single-character
> single-fucking-character
 
Jon
I'd substring to the .
removing a entry one at a time, and process it
 
split on (?<=\..{3})
 
Jon
you'd still have to substring to determine the type
 
2:02 PM
The separator array
If any of the elements in separator consists of multiple characters, the entire substring is considered a delimiter. For example, if one of the elements in separator is "10", attempting to split the string "This10is10a10string." returns the following four-element array: { "This", "is", "a", "string." }.
 
@Jon why?
 
Jon
He wants to ignore png files
 
but i can take the png.¨t
 
the sample uses string[] stringSeparators = new string[] {"[stop]"};
 
2:03 PM
but its not neccessary
 
Jon
ah ok
 
Jon
@user2511798 I think you want to look at WebResponse and not WebRequest
I don't know how to set the length however.
Might be something to do on the server configuration portion
 
@ShotgunNinja, dunno why the comment for that arg says single character. rest of the doc talks about multi char strings as separators
 
Jon
Pretty sure it is a web.config thing.
 
2:11 PM
@Beeblebrox Weird
 
Jon
@user2511798 ^
 
How much does Unity keep from your game' generated profit?
 
Jon
0
 
Jon
You pay them upfront for the professional licencse.
 
2:15 PM
And with the free version?
Still 0?
 
Jon
yeah
but the logo and stuff appear.
 
Aslong as your company turns over less than $100,000, you don't have to pay them a penny
 
hm... I'd like to start playing around with game-dev
I've been reading around, there are so many libraries
android game-dev*
 
Jon
once you make 100K per year, you can afford to buy Pro
@Thunder dude.. we just had a conversation about that
 
@Thunder shut up, that's annoying
1 message moved to recycle bin
 
2:17 PM
wow, what happened? xD
 
Jon
Unity is a very good platform to get into android dev.
 
The most used:

libgdx
Unity 3D
AndEngine
Cocos2D
Cocos2D-X

(According to an SO answer)
 
Jon
I've tried libgdx... didn't really like it
 
Jon
the initial setup was painful
And I didn't really like the overall environment
It felt like it could break, and cause me a lot of problems.
I prefered Unity, for what it does.
 
2:21 PM
Hm...
Not sure which one to choose now xD
 
Jon
what is your programming language of choice @RodrigoSilva
 
C# @jon
I do know Unity supports C#
 
Jon
Might as well give Unity a shot then.
You could always go Monogame/xna
 
hm, I'll download it and see how it goes
I've also readthat Unity introduced a whole new set of 2D tools, right?
 
Jon
Yeah. Still some rough edges, but it is pretty awesome.
Unity 5 is coming out soon
the 2D in unity is still 3D.. but with a locked orthographic camera
And then they added sprite objects, and 2d physics
 
2:25 PM
About the graphic resources, do you create them in PS?
The sprite images
 
Jon
create them in whatever you want
 
I mean, if the game doesn't look cool...
 
Jon
You import your resources into unity, then do what you want with it
 
I'm imagining all my games being a very poorly drawn robot moving around a 2 coloured background
 
Jon
that would be a good start.
 
2:26 PM
getting bored, going over an F# book, it says I can use F# lists in C#. What would be the benefit of doing so? I thought I could compare two completely diff lists by value, but its not working
@KendallFrey
 
I see, like everything else, it needs practice
 
Jon
too big
 
@KendallFrey The book says I can add a reference to FSharp.Core, use an F# list, I did...:
 
Hm, image didn't load
what was it? xD
 
Jon
2:28 PM
robot walking in a cave
 
my question is, why would I want to do that? there must be some reason if it was important enough to point out
 
Jon
my web provider is migrating my site, so its damn slow
 
Ah, basic animations, can unity do it?
 
My initial thought was that it would behave like an F# list, but it doesn't
 
Do it, as in: can I do it using Unity?
 
Jon
2:29 PM
lol.. it has a fully fledge animation system, where you can blend different animations together
 
Jon
and you can link them too
hold on
 
How I expect it to behave when I compare two lists:
let l1 : int list = [ 1; 2; 3 ]
let l2 : int list = [ 2; 3; 1 ]

printfn "l1 = l2? %A" (l1 = l2)
printfn "l1 < l2? %A" (l1 < l2)

Execution result

l1 = l2? False
l1 < l2? True
balls, nobody cares
thanks for playing
 
Jon
A character's animation sequences... shows you the possible transitions
you set the property, and the animation cycle runs in game.
 
Nice :O
 
Jon
2:31 PM
if it is allowed in the sequence
That is a complex example.
 
@Steve you mean sets? those 2 lists are different
 
thats a copy and paste out of the book, and yes those 2 lists are different, but what it says I can do is compare them by value, not by pointer value
by default, so i figured i'd import it into C# and see if it works.... it didn't, but it works when I run it in f#
when I import it into C#, its of typeFSharpList<T>
 
what do you mean by works?
 
let l1 : int list = [ 1; 2; 3 ]
let l2 : int list = [ 2; 3; 1 ]

printfn "l1 = l2? %A" (l1 = l2)
printfn "l1 < l2? %A" (l1 < l2)

Execution result

l1 = l2? False
l1 < l2? True
 
And are you saying it outputs true in C#?
 
2:35 PM
using System;
using System.Collections.Generic;
using Microsoft.FSharp.Collections;

namespace CSharpWithFSharpTest
{
   class Program
   {
      static void Main( string[] args )
      {
         FSharpList<string> test = ListModule.OfSeq(new List<string>()
         {
            "test1",
            "test2",
            "test3"
         });

         FSharpList<string> test2 = ListModule.OfSeq(new List<string>()
         {
            "test1",
            "test2",
            "test3"
         });
 
i realize what I have is a huge bag of ass, but i'm just playing with it :)
 
My guess is it doesn't override ==
 
oh shit
that makes sense
 
Jon
hmmm, i didn't know you could mix/match f# and C# in the same file
 
2:45 PM
me either
 
Jon
maybe it would be beneficial for me to learn f#
 
I dont think you can use the F# syntax in C#, just some of the assemblies
but i could be wrong shrugs shoulders
 
I wish I could find .NET documentation for F# libraries
 
Jon
Yeah, apparently it is not in the same file...
 
2:47 PM
No, that's F# documentation
 
oh yeah
 
it doesn't show the operator overloads, methods, etc.
 
indeed it does not
 
Jon
I know 4K monitors exist.. but 8K.. damn thats a lot of real estate
 

« first day (1287 days earlier)      last day (3658 days later) »