« first day (1011 days earlier)      last day (3941 days later) » 

12:00 AM
The file may reside in what appears to be considered managed resources, requiring the bool flag to be true.
 
for dumping text I usually use File.WriteAllText(), dunno if it is good
 
I take it back.
She is incorrect. using will call Dispose(). When Dispose is called without an argument then it releases all resources.
#dilemma
This question is clearly a gimme teh code question: stackoverflow.com/questions/17799421/… . But I really want to see the codes.
 
Hey TJ - head is killing me. looking at your delegate bit
   Dictionary<Type, Delegate> dic = new Dictionary<Type, Delegate>();

            dic.Add(typeof(MemHead), new System.Delegate(
            {}
                ));
should that not work?
 
let me check
 
nm
 dic.Add(typeof(MemHead), delegate(MemHead m)
            {
            });
 
12:09 AM
today I spent 80% of my day working on unit tests. That is a good day.
 
I spent 9 hours at the beach, then debugged the horse for a while
 
the horse? poor horse
would hate to step into that, and watch the internals
all the threads
 
it is ugly
public class Tick
{
    public DateTime DateTime { get; set; }
    public Stock Stock { get; set; }
    ...
}
Is there a way to ensure that ^ is unique on Stock and DateTime using EF?
 
Why Not DateTime.Ticks?
 
how do you mean?
 
12:22 AM
can I ask a wpf question here? its about dependency properties.
 
if I have a base type coming into a method, can I permanently change it to a subtype?
or will I need to cast it every time I modify it?
void foo(bar b)
{
((donky)b).Name = "joe";
// better way?
}
 
why not void foo(donky b)
 
because it's a base class
 
but the cast is going to explode if it is not a donky?
@user1775703 shoot
 
I have this DP
public List<Node> Inputs
{
get { return (List<Node>)GetValue(InputsProperty); }
set { SetValue(InputsProperty, value); }
}

public static readonly DependencyProperty InputsProperty = DependencyProperty.Register(
"Inputs",
typeof(List<Node>),
typeof(BaseContainer),
new FrameworkPropertyMetadata(new List<Node>()));
 
12:27 AM
@TravisJ noob EF q ^^^^ :D
 
it is ok to override the metadata like this?
static Math()
{
BaseContainer.InputsProperty.OverrideMetadata(typeof(Math),
new FrameworkPropertyMetadata(new List<Node>() {
new Node(){NodeType = NodeType.AnyType},
new Node(){NodeType = NodeType.Handle}
},
FrameworkPropertyMetadataOptions.None,
OnInputsChanged));
}
 
@user1775703 that must be an it depends kind of situation. It will only be used if no binding is present, only you can tell if it will do any harm I think.
 
It doesnt throw any errors, but if xaml if put 2 identical controls with this DP, only the last one "renders" inputs
 
Xaml for that? (if not too huge)
 
yep, binding is involved
 
12:32 AM
if there is a binding the default will have o effect
 
Gah this is bugggggging me
    Dictionary<Type, Delegate> dic = new Dictionary<Type, Delegate>();
    dic.Add(typeof(MemAttr), delegate(MemAttr m)
    {

    });
why won't that work...
 
@Ryan - Do you have to have the delegate return values?
 
no...
 
Because that is a little more complex. Is it an endpoint?
 
R# suggested this:
Dictionary<Type, Delegate> dic = new Dictionary<Type, Delegate>();
dic.Add(typeof(string), new Action<string>(delegate(string m)
{

}));
 
12:36 AM
Cool. Then I think I have something you will like.
 
haha
@JohanLarsson With .net 2.0 i can only use ACtion<T>... i guess i could make an action <T,T>
 
public interface IFace
{
}

public abstract class IBase : IFace
{
	public string Name = "base";
}

public class foo : IBase
{
}

public class bar : IBase
{
}

public class act
{
	public Dictionary<Type, Action> dic { get; set; }
	public act()
	{
		dic = new Dictionary<Type, Action>();
		dic.Add(typeof(foo), delegate(){
			foo();
		});
		dic.Add(typeof(bar), delegate(){
			bar();
		});
	}

	private void foo()
	{
		Console.Write("foo");
	}

	private void bar()
	{
		Console.Write("bar");
	}

	public void ret<T>() where T : IFace
sry 4 teh wall
put that in linqpad
and check it out
 
sry to ask, how do you paste code?
 
CTRL-V
Then CTRL-K
 
thanks
 
12:38 AM
or gist
 
Well usually you shouldn't do what I did.. Posting a wall is bad form so if you do, at least apologize for it :P
 
but you are a superstar!
 
It's strange TJ
I'll do this fine: results.Sort(delegate(KeyValuePair<int, string> a, KeyValuePair<int, string> b)
{
return b.Key.CompareTo(a.Key);
});
but this bombs: dic.Add(typeof(MemAttr), delegate(MemAttr m)
{

});
 
12:52 AM
@RyanTernier - Okay, I think I solved it
this is kind of a complex situation apparently
@RyanTernier - In fact, this version will actually return relevant values from what you pass in: pastebin.com/wEb2LALb
\ o /
I think that is kind of cool actually
I am goin home
 
it's kind of cool, but a bit more than I want :P
 
1:37 AM
 Dictionary<Type, System.Action<MemRow>> dic = new Dictionary<Type, System.Action<MemRow>>();


            dic.Add(typeof(MemHead), delegate(MemRow m)
            {
that works
 
2:01 AM
Hello @RyanTernier
 
3:00 AM
hey guys, jsfiddle.net/divinemamgai/qCnyM in this fiddle, a checkbox is imitated using a div and some javascript, is there any way thru which we can pass on the checked or unchecked state using C#?
 
o hey people
 
 
1 hour later…
4:31 AM
hello
does anyone know how AND syntax work for join on clauses when converting to lambda?
 
 
3 hours later…
7:17 AM
Are you getting any vacation this summer Lews?
 
Nope :(
I only had the one month
 
@JohanLarsson hi
how can i get stored procedures schema
DataTable table = conn.GetSchema("Tables");
instead of table schema, i need to take sp's schema
any idea
 
@LewsTherin one month is still a decent vacation
@shankar I suck at SQL, sry. Perhas Lews knows, he is pro.
 
@LewsTherin
are you there
 
no need to ping like that imo, I'm sure he saw it
 
7:24 AM
@JohanLarsson And now to work for the rest of my life (hopefully) :( . I still feel knackered.
@shankar I saw it. And no idea. Sorry.
 
Work is fun ime, chin up.
 
Ha ha
9-5? Not so much :P
ime?
 
in my experience
 
Oh I see.
Yeah it beats staying at home
 
I like programming work stuff more than home stuff, the work stuff moves forward steadily. Homestuff brickwalls.
 
7:31 AM
Interesting. The other way round for me :P I'm more relaxed with my own project.
I can choose not to finish it :D
 
I tend to be so relaxed I take naps
 
Yeah, that makes a diff. But then if I do that I take so much naps I spend little time on the project until I just discard it :L
I'm lazy like that :D
 
*many?
 
@JohanLarsson Yeah :P
 
user142019
Good moming.
 
7:41 AM
Shit morning
 
good indeed
 
Hi
can any one help me in a problem with IE 7?
 
hej @JohanLarsson :)
 
No!
Does anyone know how to: Get shift + 2 to display " in VS?
 
7:44 AM
Hi @LewsTherin
I don't like to ask my questions about older IEs in HTML/CSS/DOM/Web Design
cuz some ppls only mock me and tell me again and again why I do that
and want that force me to avoid that or don't answer me
I have to create CSS for older browsers
cuz my manager wants it
I've something like this
 
user142019
> cuz
 
it expands more than page width and I dunno why...
 
I have no idea, never used css
 
tnx @JohanLarsson for ur reply :)
I think it's better that I ask my question in SO
 
hey guys, how would you design a 4 layered configuration interface? Meaning:
* Layer 1: General category (database settings, language settings...)
* Layer 2: Different modules (if you go into the database layer, you'll have a MySQL module, a MSSQL module and so on, also the category itself can have something to configure, too (for example the primary database configuration to use))
* Layer 3: The database type specific configured instances and the ability to create new configurations
* Layer 4: The list of properties that can be configured for a specific instance (username, databasename...)
does anyone know of a better way to do this?
also it has to be in WIndowsForms
I know that having a horizontal tabcontrol beneath another horizontal tabcontrol is bad...but I've no clue what else I could do
align them to the bottom wouldn't work, since there are buttons, and aligning to the leftside (making it vertical) is just worse (more mouse movement/bad visibility)
 
8:02 AM
perhaps a tree could work?
 
haha, just thought about the same thing...it could really do the trick
 
perhaps a tree could work?
 
haha, just thought about the same thing...it could really do the trick
 
wtf
 
the matrix glitched. again
 
8:05 AM
So it seems.
 
different topic: Creating project templates for Visual Studio is fun, once you actually understood how to do it! (meaning using custom variables)
 
 
1 hour later…
9:32 AM
woke up from an unexpected nap, days go fast on vacation
 
@JohanLarsson How is your regex?
@JohanLarsson Lucky you
 
@LewsTherin decent I hope, shoot
 
Given a string:
key="value" key=value key={key=value key="value"}

I "basically" need to grep that kind of data. I could do it a dirty way, but regex might be simpler here. I haven't learnt to use it though
Of course key value could be anything here
e.g.
a=b b={a=c b=d}
The resultset should be
a=b
b={a=c b=d}
Any ideas?
 
(?<key>.+)=(?<value>.+)
try that but make sure to test it
or same thing without named captures (.+)=(.+)
'.' matches everything, I was surprised that it did not match to the end including the '=' checking some more.
+ matches one or more times
string parsing is a good fit for tests btw
 
hey, does someone know how this is called or when it was introduced to the .NET framework?
SomeClass objectOfThatClass = new SomeClass(){SomePublicField = someValue, SomeOtherPublicField = someOtherValue};
 
9:43 AM
@LewsTherin my first attempt was broken, throw away
 
@SteffenWinkler object initializer?
@JohanLarsson ok
 
yeah object initializer sounds right
 
@LewsTherin aaah, thanks
yes that's it
 
@JohanLarsson I have something like that already but it doesn't parse well
 
([^=]+)=(.+)
[^=] means everything except '='
Same thing with names (?<key>[^=]+)=(?<value>.+)
everything or anything there?^
 
9:52 AM
Mmn
Ignore spaces?
@JohanLarsson You are close but it is including everything after a space as part of each key value pair
 
you want to trim all spaces (start end)
 
@JohanLarsson No, I mean separate each keyvaluepair instance
If enumerate matchcollection it is returning a single instance
key="value" key=value key={key=value key="value"}
Returns the whole line under the parser
Instead of:
key="value"
key=value
key={key="value" key=value}
So if I add a pattern to ignore , and space after the value that should work
MMn but the inner object will be a pain :O
 
10:08 AM
I solved my problem :)
 
@MRS1367 Nice! Well done :P
 
@LewsTherin you want kvp for inner also?
@LewsTherin did not know they wold be on the same row
 
Hey all, any win forms guys around?
 
I think MRS is good with winforms
 
hey @StuartBlackler
tnx @LewsTherin
@JohanLarsson tnx ;)
 
10:21 AM
I basically need to have a datagrid inside a datagrid (much like the WPF datagrid can do). Any idea how to do that in .net 2 without third party controls (yes, im heavily restricted!)
i suspect not, but i thought it was worth a quick question before i continued along the write something custom path
 
@StuartBlackler -> u can use some components for what u want
for example, u can use SuperGrid control or DataGridViewX control from DevComponents.DotNetBar components
 
@LewsTherin I started to look at some lookbehind voodoo, at the same time I started sucking enormously :D
 
10:36 AM
hello
anyone is there?
 
a bunch, ask you q man :D
 
actually i am new in asp
and i hava an problem
in class code
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.SqlClient;


public class GlobalClass
{
public GlobalClass()
{
public static SqlDataAdapter adap;

public static DataTable dt;
// Stored image path before updating the record
public static string imgEditPath;
}
}
this is my code
and i face an error near "{"
can u help ne
 
public GlobalClass()
{
}
you need to close the constructor
remove the last }
 
still same error
 
you can leave out the constructor altogether if you don't do anything in it, it is implicit
    public class GlobalClass
    {
        public GlobalClass()
        {
        }

        public static SqlDataAdapter adap;

        public static DataTable dt;
        // Stored image path before updating the record
        public static string imgEditPath;
    }
Valid C# ^
Use ctrl+k after you paste code, chat formats it nicely then.
 
10:44 AM
now i have another error :"(
 
what is the new error? pretty sure we made some progress
 
The type or namespace name 'DataTable' could not be found (are you missing a using directive or an assembly reference?)
 
@JohanLarsson Sorry I don't have my headphones. Lookbehind voodoo?
 
using System.Data;
using System.Data.SqlClient;

namespace Tempy
{
    public class GlobalClass
    {
        public GlobalClass()
        {
        }

        public static SqlDataAdapter adap;

        public static DataTable dt;
        // Stored image path before updating the record
        public static string imgEditPath;
    }
}
 
I'm just going to recursively grep it
 
10:45 AM
you need the using things above
 
recursion poo!
 
@LewsTherin ok I failed you,
is the string always in the same format?
 
yes
its working
 
but now in my aspx.cs while show error
public void FillGridView()
{
try
{
string cnString = ConfigurationManager.ConnectionStrings["dbconnection"].ConnectionString;
SqlConnection con = new SqlConnection(cnString);
GlobalClass.adap = new SqlDataAdapter("select * from gridview", con);
SqlCommandBuilder bui = new SqlCommandBuilder(GlobalClass.adap);
GlobalClass.dt = new DataTable();
GlobalClass.adap.Fill(GlobalClass.dt);
GridView1.DataSource = GlobalClass.dt;
GridView1.DataBind();
}
catch
{
Response.Write("<script> alert('Connection String Error...') </script>");
it says The name 'GlobalClass' does not exist in the current context
 
10:48 AM
@JohanLarsson Yeah, but could be of variable length.
 
@MuhammadSaqib use ctrl+k, you can still edit for two mintes
 
i use Ctrl+K
What I Do
@Johan are u there?
 
@JohanLarsson My recursive grepper works. But it is a nightmare lol
 
@MuhammadSaqib you probably need a using and new it/inject it somewhere
@LewsTherin code?
 
11:04 AM
i face an error in this line
.... public partial class _Default : System.Web.UI.Page
it shows...Make sure that the class defined in this code file matches the 'inherits' attribute, and that it extends the correct base class (e.g. Page or UserControl).
 
hard to debug it over internet, the error message is pretty good though
 
so now what i can do?... help me please
 
you should get squigglies in VS, they usually show help/fixes
 
if u dnt mind can i send u my file? after correction can u send me back?
 
I don't think it will work, I would need the entire project
also a bit busy here
 
11:14 AM
ok
but i have just three files .. Default, default.aspx.cs and globalclass.cs
 
I have never done ASP nor SQL so I'm not a good choice either, I would be an antipattern factory
 
ok
please help me, anyone please
 
11:44 AM
@kendallfrey
@kendallfrey :)
@kendallfrey
@kendallfrey :)
good morning @RoelvanUden
@LewsTherin
@steve
 
@Steve Wow hi. Kendall fetish going on :P
 
lol
yeah a bit
 
@JohanLarsson Wish I could show you :O but NSA secret
@Steve A bit is an understatement mate :P
 
@LewsTherin hahahaha
 
@LewsTherin ok np, I wish I had solved it but it was too hard for bed coding :D
 
11:48 AM
damn I have to learn a bunch of math tonight for my mid term tomorrow
 
@JohanLarsson Np, I will see if I can optimise it later
@Steve Eww.. what math?
Good luck btw
 
stats for my project management course
i should have paid more attention in stats instead of chatting on this dumb site called stack overflow
 
stats is pain but useful
 
Good morning
 
@Steve Ikr? :P
@AndréSilva hi
 
11:51 AM
:)
Do you guys :
A - ) Make your own FileDialogBrowser in WPF
B - ) Use System.Windows.Forms and feck it
 
i dont make my own
but then again i dont write wpf lmao
 
Makes sense
 
hey dre
 
in WPF, Jul 8 at 17:11, by Maverik
also since we're in WPF, you want to use Microsoft.Win32.OpenFileDialog instead of the Forms version
 
doesn't WPF have a FileDialogBrowser of its own?
 
11:58 AM
@ActionHank Appearantly not.
 
no, don't think so. As i see it there is a point in using a standard dialog for that, more familiar.
Why is wireless always slow? Don't think I ever saw network utilization over 30%
 
@JohanLarsson Collisions
 
copying files to NAS is 100 MB/s using wire and 5 MB/s over n wireless
@RoelvanUden ok but I'm the only one here (I hope)
 
@JohanLarsson Thanks btw
 
12:05 PM
@JohanLarsson the frequency wifi works at is very prone to reflection and refraction
which in turn causes collission
 
you think there is a point in switching frequency?
 
plus there is the clear to send pattern of transmitting data
@JohanLarsson I would download a wifi scanner and see what channels are most actively used in your area
 
+1 what stuart said
 
ok ty all sirs
 
and don't run your microwave in the path of transmission :P
 
12:09 PM
it is five meters and almost optically free path (dunno if the last part is close to proper English)
 
If you have one of these nifty external antenna APs, you can try rearranging them, or move the AP altogether for better reception (that's what I did in my house)
oh seriously :P
then maybe the channel is full, download a wifi scanner and check it out
 
will maybe do :D
I should probably get a wire here but it will be ugly and some effort
 
or you have the option of ethernet through your power sockets
 
A first chance exception of type 'System.Data.Linq.ChangeConflictException' occurred in System.Data.Linq.dll
UPDATE [BuyBackInventory]
SET [DisplayBrandName] = @p0, [FK_Receipt_Id] = @p1
WHERE 0 = 1 <--- WTF
 
@StuartBlackler yeah thet is nice
 
12:19 PM
@JohanLarsson background info about wireless collisions: en.wikipedia.org/wiki/…
 
logged in on router for fun, did not find a scanner util on it
ty
 
:)
 
Lol(allLanguages.Where(lang => lang != cSharp)) <~~ I get it!
 
@dirt I don't, please explain ;)
 
i get what he's saying...... he's a java fanboy ;)
 
12:30 PM
Well you see Lol is a magic function only available in c#, in php its call Lo_l
 
ohhhhhhhhh
lmao
 
or sometimes l_oL
depending on which version of php is installed, and modules of course
 
herpes
i went to bed at 9:15 last night, woke up at 640am this morning, and i'm still tired
 
say yes to herpes
 
12:36 PM
herpes, not even once
 
@kendallfrey
 
@Steve hey
 
@KendallFrey!
 
12:52 PM
> Thinks he became infected by nervously scratching while awaiting the birth
 
@Tim
 
I did not know one can get herpes that way.
Oh, that picture! D:
 
hey @KendallFrey hey @ActionHank
@dirt dailymail...even the onion is closer to reality than that.
 
its on the internet... they cant put stuff on the internet if its not true
3
 
12:55 PM
nobody on the internet lies!
 
:)
 
c) there is no statement
 
lmao c!
 
there is no internet, we're all just a figment of jon skeet's imagination
 
12:57 PM
pah
 
Jon Skeet is running this universe in an emulator. He didn't write it, and it has bugs. Lots of them are in quantum physics.
 
yep
 

« first day (1011 days earlier)      last day (3941 days later) »