« first day (572 days earlier)      last day (4393 days later) » 
01:00 - 16:0016:00 - 23:00

1:32 AM
So, it turns out that my problem was as follows: Like an idiot, I had made an internal class "a long time ago in a galaxy far, far away" that implemented the interface of the class I wanted. And, it had the same name as a class that was an external dependency; and, the internal class had a bug, there just wasn't a proper stack trace for whatever reason. ... Yep. I'm going to go stare at a wall and add this to my list of things not to do
Yep. I know everyone left; I just know that this chat room is logged, and it's good practice to let the room know what the issue is when it's discovered.
This particular one was found by fresh eyes on a project. They're always helpful, because they don't have all the context you used for all of your assumptions :)
 
2:04 AM
@Travis Haha nice going
Personally, when I am review someones code, I get mad when it is unorganized and start to slowly hate the person the more and more I have to deal with them and their code
 
Anyone knows if there is APi for C++, particularly Winbase.h ?
 
Why are you asking this in a c# chatroom?
 
'cause C++ers have gone to sleep
 
Haha all that c# does for me is bog down my memory on my computer
 
2:08 AM
pretend to talk about c# and no one will notice
 
Understood! :)
 
Haha so cant wait for 5.0;)
 
What time is it now in US?
 
for me? ~8
at night
 
:D Cool
here it is 4 AM :D
 
2:11 AM
haha you woke up early
 
Actually, I didn't sleep at all. :)
But I am about to go now... :)
 
Haha you're like all of my frieds
 
Pro life :P
 
haha totally.... last year I couldn't even think of falling asleep until after 11
 
:D Wait to see what will happen when you pass 15 :P
You won't go to bed after 2 AM :P
 
2:13 AM
Haha yes
 
@OutlawLemur I have to go now to sleep.
It was nice talking to you. :)
See ya these days. ;)
 
haha you too
 
Hi @OutlawLemur
 
2:57 AM
@BallCutter Hello
 
0
Q: how to find the GridViewCommandColumn that set ShowSelectCheckbox=true in aspxgridview.columns?

BallCutteri need to done in programmatic and i have no idea on it. So i need to use loop to search all the columns? For example GridViewCommandColumn a= new GridViewCommandColumn(); a.showselectcheckbox=true; aspxgridview1.columns.find(a);

@OutlawLemur can u help me?
 
3:46 AM
@gonzalomelov hi
 
 
3 hours later…
7:11 AM
@All HI
 
 
2 hours later…
9:15 AM
hello everyone
after trying on google, nothing gained here is my question or problem yu can say

cannot convert from 'string' to 'System.Web.UI.WebControls.TreeNode'
@Baboon any idea
0
Q: cannot convert from 'string' to 'System.Web.UI.WebControls.TreeNode'

user1362605Dunno why getting this stupid or more like sense less error, Normally we add strings to a treeNode then why not in this code, protected override void CreateChildControls() { base.CreateChildControls(); try { int Index = 0; TreeView tre...

got it, am so stupid
lol
 
 
1 hour later…
10:31 AM
Hello! Anyone home?
I have a question about flat file vs hierarchical data structures and the creation of such. Any data gurus in the room?
 
@Baboon Hi]
does anyone know any control like Dictionary that can be used to have duplicate keys
 
10:46 AM
@TimeToThine Try looking here: stackoverflow.com/questions/146204/…
 
@Siyfion cheers
 
@TimeToThine just use a List<KeyValuePair<T,U>>
 
@Baboon using it, now got another error
0
Q: Logical mistake with TreeView

user1362605When I try to add treeview control to the webpart, it gives me this exception, "Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index " however when i debug, it gets the exception only when i try to add control to the webpart, here's ...

 
 
1 hour later…
12:09 PM
@Baboon hello
i need a help in finding a substring
The text is as AD_01MSN.
& i need 1. AD 2. 01 3. MSN
Hw can i do this
 
Can we have more examples, or can you describe the rules for picking out substrings?
You want groups of either all digits or all letters?
 
actually problem is in 01MSN
the numeric is not fixed in length
& as so the text
so hw can i split this
 
You should be able to use a regex.
 
how?
I think to use substring method
 
[a-zA-Z]*|[0-9]*
That will match the strings you gave
 
12:14 PM
@KendallFrey i do not want a match
i need that string
as o/p
 
What string?
 
see AD_01MSN.
now want
in first variable
AD
01 in next var & theMSN in next var
 
Are all the strings in the exact same format?
 
hang on, im writing some example code
 
if so you can do
string part1 = value.substring(0,2);
string part2 = value.substring(3,2);
string last = value.substring(5, 3);

Ugly but it works if the formats are always the same.
 
12:17 PM
@SecretDeveloper it can also be like MC_011ADS
@SecretDeveloper no
my length of string is not fixed
 
ok list the different formats, we have 2 so far
AD_01MSN
MC_011ADS

Any others?
 
@SecretDeveloper ys it can be LBBS_01ADRS
the thing is first before '_' character
second numeric
& third the remaining
 
string s = "AD_01MSN";
var matches = Regex.Matches(s, "[a-zA-Z]*|[0-9]*");
string sub1 = matches[0].Value;
string sub2 = matches[1].Value;
string sub3 = matches[2].Value;
There ya go.
 
@KendallFrey let me try
 
ok so can we say that the strings are made up of the following:
[part1]_[num1][part2]
 
12:20 PM
@SecretDeveloper yes
 
anyone help me please :(
 
@TimeToThine can you put the full exception and any inner exceptions into here?
 
@KendallFrey it only gives me sub1=AD
rest all variable as blank
 
Yup, I typoed
 
.
 
12:22 PM
use the regex:
[a-zA-Z]+|[0-9]+
string s = "AD_01MSN";
MatchCollection matches = Regex.Matches(s, "[a-zA-Z]+|[0-9]+");
string sub1 = matches[0].Value;
string sub2 = matches[1].Value;
string sub3 = matches[2].Value;
@TimeToThine How would we know? We don't know the problem.
 
@KendallFrey ok, wait
 
@KendallFrey i pasted the question earlier
posting it again
0
Q: Logical mistake with TreeView

user1362605When I try to add treeview control to the webpart, it gives me this exception, "Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index " if (groupNode != null) { tree.Nodes.Add(groupNode); this.Controls.Add(tree)...

 
@KendallFrey a problem in third var
if my data is like AD_01D8988
I need in third D8988
Bt this gives me onlyD
 
Oh.
Hmm
 
@KendallFrey ??
 
12:29 PM
^([a-zA-Z]+)_([0-9]+)([a-zA-Z0-9]+)$
 
@Neha relax, i think he's thinking
 
You will need to change the code a bit. hang on.
 
@KendallFrey hmm
 
string s = "AD_01D8988";
Match match = Regex.Match(s, "^([a-zA-Z]+)_([0-9]+)([a-zA-Z0-9]+)$");
string sub1 = match.Groups[1].Value;
string sub2 = match.Groups[2].Value;
string sub3 = match.Groups[3].Value;
"AD"
"01"
"D8988"
 
ok, let me check
 
12:32 PM
@KendallFrey nice solution
 
notice the changed group indexes (starting at 1). the first group in the collection is actually the entire match ("AD_01D8988").
 
@KendallFrey nooo, all are blank
:(
 
@Neha Works for me
string s = "AD_01D8988";
Match match = Regex.Match(s, "^([a-zA-Z]+)_([0-9]+)([a-zA-Z0-9]+)$");
string sub1 = match.Groups[1].Value;
string sub2 = match.Groups[2].Value;
string sub3 = match.Groups[3].Value;
 
@Neha Is this value in the middle of a string somewhere?
 
12:43 PM
yawnssss
I wish if patrick was here
 
@KendallFrey wait.. let me try again
 
So many crappy "enterprise frameworks" out there
is there a C# enterprise architecture for idiots book ?
 
" -Patterns of Enterprise Application Architechture"
Try that, but I wouldn't say it's a light read
 
@KendallFrey blank still
 
you missing the context :)
 
12:45 PM
no i dnt have any string in b/w @KendallFrey
 
or particularly "For Dummies"
 
@Neha Post some short code to repro it.
@CBarlow ??
 
@KendallFrey RAWR!!
 
:@KendallFrey this is my original data am using ADAIR_30S6021
here is the exact code I have used
Match match = Regex.Match(fileName, "^([a-zA-Z]+)_([0-9]+)([a-zA-Z0-9]+)$");
string sub1 = match.Groups[1].Value;
string sub2 = match.Groups[2].Value;
string sub3 = match.Groups[3].Value;
 
12:48 PM
"ADAIR"
"30"
"S6021"
What is the value of fileName?
 
am getting all empty
fileName=ADAIR_30S6021
 
post some runnable c#
 
public void SaveToDatabase(string fileName) {

Match match = Regex.Match(fileName, "^([a-zA-Z]+)_([0-9]+)([a-zA-Z0-9]+)$");
string sub1 = match.Groups[1].Value;
string sub2 = match.Groups[2].Value;
string sub3 = match.Groups[3].Value;}
 
@Neha: Are you available later? I gtg.
 
@KendallFrey yeah till its not done
 
12:54 PM
Can some please help me with treeview
 
@Baboon there?
 
or do i have to change my name to "Jenifer" to get help :|
 
@TimeToThine lol
@TimeToThine at which line are you getting this error exactly
 
@Neha at the last one
basically I have list of, Groups, Users in the group &&& Individual users
Now i want to make treenodes from the list of users, then another expandable node for groups (with list of users in them)
but I am really bad with treeview
here's the code
                foreach (string GroupListItem in GroupList)
                {
                    TreeNode groupNode = new TreeNode();
                    foreach (string Item in IndividualUserList)
                    {
                        groupNode = new TreeNode(Item);
                    }

                    groupNode = new TreeNode(GroupListItem);
                    foreach (KeyValuePair<string, string> UserPair in UserList)
                    {
                        if (UserPair.Key == GroupListItem)
 
@SecretDeveloper there?
 
1:07 PM
0
Q: TreeView Confusion

user1362605basically I have list of, Groups, another List for Users in the group &&& Individual users list. Now i want to make (non expandable) treenodes from the list of users, then another expandable node for groups (with list of users in them) but I am really bad with treeview, and tutorial n...

@Neha why dont you help me till they come
;)
 
I have a if statement question
its using services
if (mavbridgeservice.Status == ServiceControllerStatus.Stopped) && (mavrodemservice.Status == ServiceControllerStatus.Stopped)
it underlines the double & sign....why is that?
 
@TimeToThine i guess userlist is empty there
@TimeToThine & am also trying at my own for my problem
 
1:22 PM
@heinst because you have 2 statements but they are not within round brackets
Try:
if ((mavbridgeservice.Status == ServiceControllerStatus.Stopped) && (mavrodemservice.Status == ServiceControllerStatus.Stopped))
instead
 
@SecretDeveloper can you help me please ?
 
@TimeToThine I'll try
 
@heinst You can only do that in VB. In C# the conditional HAS to be within parantheses.
 
@KendallFrey @SecretDeveloper Thanks for help
I have done
 
@TimeToThine So you have a list of Groups, a list of users associated with each Group and a third list of IndividualUsers not in any group? Is that correct?
 
1:30 PM
@SecretDeveloper thanks
and yes
 
Im not familiar with the TreeView/TreeNode but it looks like you need to do something like
foreach(string groupName in Groups)
{
var groupNode = new TreeNode();
foreach(string user in UserList)
{
 
I find this tutorial but its adding a pre defined array, but here its dynamic
 
/add the user node to the groupNode
}
// add the group node to the treeView
}
and then you can add the individualUser items at the end, either in their own group or as individual nodes.
 
I wanna add them in the start , and because of them I am getting exception
If i take this line out, it works like a charm
foreach (string Item in IndividualUserList)
                    {
                        groupNode = new TreeNode(Item);
                    }
 
whats the exception?
 
1:36 PM
index out of range
 
is the collection initialized?
 
@Baboon what does that mean :/
and I am trying to collapse all of the nodes, but central one isn't getting collasped as well
using this "tree.CollapseAll();"
 
@Baboon that I already sugessted him
 
@Neha: did you get it working?
 
@KendallFrey yeah, but in very odd manner
 
1:38 PM
oh?
 
@Neha what does collection intialized means, i mean how can i do that
 
@KendallFrey see Regex.Matches(fileName, "[a-zA-Z]+|[0-9]+|[a-zA-Z0-9]+");
 
Ew, that's bad
 
I know
What else
 
does it even work?
 
1:39 PM
I need to do any how
Please correct it if you can
 
what i gave you works
 
yeah it gives five elements
i concated them as required
AD,01,D,8988
such this returns
to me
 
mm, that's pretty weird
 
@KendallFrey Tha't why am saying in odd manner
well let me know now if you can
 
@TimeToThine it means is the collection you are looping through set to a live object. If it is null then you may get the error you are seeing.
 
1:42 PM
@SecretDeveloper I just have 2 items named as "a" and "q" and they are not null
 
The last example I gave should work. If you can give me a complete example of when it doesn't, I might be able to give a better solution.
 
@KendallFrey It won't work
 
Show me.
 
@TimeToThine Take a look at the partial answer i added to your question. see if it makes sense and reasses what you are doing / trying to achieve.
 
@KendallFrey ADAIR_30S6021
 
1:43 PM
@SecretDeveloper ok
 
It works for me.
string s = "ADAIR_30S6021";
Match match = Regex.Match(s, "^([a-zA-Z]+)_([0-9]+)([a-zA-Z0-9]+)$");
string sub1 = match.Groups[1].Value;
string sub2 = match.Groups[2].Value;
string sub3 = match.Groups[3].Value;
Console.WriteLine("\"" + sub1 + "\"");
Console.WriteLine("\"" + sub2 + "\"");
Console.WriteLine("\"" + sub3 + "\"");
gives
"ADAIR"
"30"
"S6021"
 
ADAIR_30S6021.jpg it is
sorry
 
That makes perfect sense.
I asked you about that earlier and you said no.
So, should I grab everything before the dot?
 
sorry
hmm
@KendallFrey ??
 
@SecretDeveloper WOW! I feel dumb....its the same thing with java....i should have know
 
1:48 PM
Or, take as much as I can from the start of the string?
 
like
 
Or you could use the Path class to get the file name without the extension.
That makes the most sense.
 
ok
 
One more question....Im trying to edit registry but the string in the registry contains quotes. I know that \" ignores the quotes or whatever but it doesnt seem to like it
the path is "C:\Mavro\MavBridge\Server\MavBridgeService.exe" /service /data "..\Data"
 
@heinst So it makes sense? good
 
1:52 PM
@Neha string name = Path.GetFileNameWithoutExtension(fileName);
 
@heinst you have 2 sets of double quotes in there also, make sure you are escaping those correctly
 
@heinst Use a verbatim string literal:
 
@KendallFrey yeah i know
 
@"whatever\whatever2""in quotes""verbatim\foobar"
@Neha ok, if you pass only the filename, you should be fine.
 
@SecretDeveloper your answer is putting Groups and user together which already being done in my code, but its not working when I try to add Individual users on top of group nodes :S
                foreach (string Item in IndividualUserList)
                {
                    if (Item != null)
                    {
                        TreeNode groupNodee = new TreeNode(Item);
                        tree.Nodes.Add(groupNodee);
                    }
                }

                foreach (string GroupListItem in GroupList)
                {
                    TreeNode groupNode = new TreeNode(GroupListItem);

                    foreach (KeyValuePair<string, string> UserPair in UserList)
@ ALL I am fighting with this since morning, Please help :/
 
1:56 PM
@TimeToThine what happens when you add in the IndividualUserList piece? still an exception?
you need to check if IndividualUserList is null also.
 
Does anyone know if there's an SDK to write a C# console app that will connect to an Xbox 360 and simulate a controller?
 
@SecretDeveloper its not null, it has two items in it, code go through all and give exception here


this.Controls.Add(tree);
 
@KendallFrey DONE.. Thanks
am really..my mistake
 
@Neha are you ?
lol
 
@TimeToThine What is the exception?
 
1:59 PM
@TimeToThine :) Because of my stupidity I lost my time
 
I got 40 errors when I did that @SecretDeveloper
 
k Bye All
 
@heinst Well pick the worst looking one and give the details
 
@Neha: Bye. Thanks for the regex practice :)
 
Rate the errors by the the fear they instill and get the scariest one
 
2:02 PM
they were all just \ expected errors
 
@heinst Well if i dont know whats going wrong I cant help, "It doesnt work" isnt enough unfortunately :(
 
@SecretDeveloper Its not? I usually just ask the computer nicely to fix my problems and it does
 
@heinst Where can I buy one?
 
@heinst That must be the next version of .NET, im still on 4.0 here :)
 
Its actually .NET 16.0 .... Its in very early alpha but still pretty stable
 
2:07 PM
@heinst Is there a download?
 
@SecretDeveloper Ill just make a question on it and see what people say
 
.NET 27 - writes your code, cooks your dinner and remembers your wifes birthday...
 
.NET 35 - The MATRIX
 
@KendallFrey I know some people. I didnt hear that @SecretDeveloper you must have better connections than me!
 
@SecretDeveloper Index out of range
 
2:11 PM
@TimeToThine is this.Controls null? It still shouldnt throw an index exception. You might want to copy and paste the full method.
 
@SecretDeveloper nice cat.....
@SecretDeveloper Ha lol
 
@OutlawLemur thanks
 
  protected override void CreateChildControls()
        {
            base.CreateChildControls();

            try
            {
                TreeView tree = new TreeView();
                List<string> GroupList = new List<string>();
                List<KeyValuePair<string, string>> UserList = new List<KeyValuePair<string, string>>();
                List<string> IndividualUserList = new List<string>();

                GroupList.Clear();
                UserList.Clear();
                IndividualUserList.Clear();
 
@TimeToThine what was the the problem you were having with that
 
Index out of range
 
2:17 PM
Ah
Is that in a specific part of that or the whole thing
@KendallFrey What the? The last time I checked you had 3k rep, not 4.5k
@BallCutter Sure...... But I don't know much about ASP.net
 
shrugs
 
All these people that gain 1000+ reputation a week make me feel stupid
 
@TimeToThine It LOOKS right, the tree appears to build correctly. Im not sure why it is blows up adding the control to the form. When you leave out the IndividualUserList piece does it render correctly on the screen?
 
@TimeToThine Is this winforms or wpf?
 
@OutlawLemur its Webpart
for sharepoint
and guys guess what
 
2:23 PM
Oh.... What
 
I gave code to my senior developer to find what was the problem he tested it and working fine
i came back to my seat and closed to browser and restarted it , and it worked perfectly
 
Was it Jon Skeet?
 
:|
FML lol
thanks guys for looking at it
 
Anybody ever check his website? Almost nothing about programming...
 
If you gave Jon Skeet code that didn't work, even if he doesn't change it, it is scared of him and has to work
 
2:24 PM
well that makes sense, the results you were getting didnt match the code
@KendallFrey I thought he reimplemented LINQ and ASynch libraries on his blog?
he had a series of articles on it
 
@SecretDeveloper @KendallFrey I prefer to look at hyperboleandahalf.blogspot.com
 
yea i read that one alot
 
I still have yet to finish the whole blog:(
 
@SecretDeveloper I got it to edit the string with the name, but the variable im trying to put in there wont go inside the quote
 
Why? is your computer malfunctioning?
 
2:31 PM
@SecretDeveloper what i mean is the string reads "C:\Mavro\MavBridge\Server\MavBridgeService.exe" /service /data "..\Data" But I want it to "C:\Mavro\MavBridge\Server\MavBridgeService.exe" /service /data "..\Data.Apple" when some one switches directories
All I get is "C:\Mavro\MavBridge\Server\MavBridgeService.exe" /service /data "..\"Data.Apple
how do I put the data.apple inside the last quote next to the \
 
guys, IF i want to open outlook when someone click on a treenode, what property can i use :)
 
@heinst How are you reading the string from the registry? What is the value in the registry exactly?
 
this is what Im having trouble with mavbridgeKey.SetValue("ImagePath", @"""C:\Mavro\MavBridge\Server\MavBridgeService.exe"" /service /data ""..\""" + defaultPath, RegistryValueKind.String); where should the + default path go
 
@TimeToThine if you want to open outlook you could use mailto: (google it)
 
RegistryKey mavroKey = Registry.LocalMachine;
RegistryKey mavbridgeKey = mavroKey.OpenSubKey("SYSTEM\\CurrentControlSet\\services\\MavBridge\\", true);
 
2:33 PM
as long as outlook is the default mail client
@heinst ok and what does the value look like exactly, it seems like you might need to either edit it in the registry or write some code to process it into "[program path] [arguments]"
 
@SecretDeveloper cheers
 
The value by default looks like "C:\Mavro\MavBridge\Server\MavBridgeService.exe" /service /data "..\Data" I want to get it to look like "C:\Mavro\MavBridge\Server\MavBridgeService.exe" /service /data "..\Data.Apple"
I use a combobox, and get the users selection which overwrites my defaultPath code.
So all im trying to do is say "C:\Mavro\MavBridge\Server\MavBridgeService.exe" /service /data "..\" + defaultPath but it always puts it on the outside of the last quote
 
@SecretDeveloper because I am doing it in a webpart, I couldn't find any relevant :S
 
@SecretDeveloper I seen that, but how can I make my treeNode to use "<a />" a hyperlink
 
2:41 PM
@heinst you have a few options, 1 is to read in all the arguments, find the /data and then edit the next argument to be what you want.
@heinst or if the argument list is always the same you could just rebuild it. Strip out the path to the exe and then append your own set of arguments at the end, ignoring the registry values
 
I hate to say this but....i havent gone to college yet and dont know all the terms. Im new to C# I just started monday and am making really good progress. So, can you please dumb it down a little haha
 
@TimeToThine If you cant add a hyperlink then you might need an onclick action stackoverflow.com/questions/5471756/…
 
I am mean you seem very intelligent...im just not there yet, terminology wise
 
@heinst sure sorry
 
nah no problem
 
2:45 PM
so the /service /data "..\" stuff are arguments
passed to the MavBridgeService.exe program
 
that makes more sense
 
if the arguments are always the same e.g. "/service /data ..\" then you could just read in the program path part from the registry ("c:\whatever\MavBridgeService.exe") and stick your own arguments on the end e.g ("/service /data ..\data.apple")
It might be the easiest way to do it but depends on how the application works
 
yeah i was thinking option 2 you gave was the easiest
the argument by default always ends in "..\Data" Im just trying to point it to a different data folder
Thanks for the help!
 
howdy
Anyone know anything about Silverlight? I know this is the C# room, but no-one is in the Silverlight chat room.
 
2:59 PM
I know the bare minimum
 
Nope. Sorry. Never dealt with authentication.
 
Thought I'd ask. It's crazy, it worked fine in SL3.
 
@NeilKnight So User.Identity.Name is null?
 
yes
The whole User is empty
Running it locally and on a live site, its empty :S
 
3:15 PM
I have no idea :)
 
It is becoming a very stressful day as all of the examples that I have found talk about Forms authentication
 
so nothing has changed apart from the SL version?
 
3:37 PM
And RIA Services. They changed it to WCF Ria Services
 
how can I get space between Image and node text @ userNode.ImageUrl = "/_layouts/bullet.gif";
 
Now I can't get Windows Authentication to work at all.
@TimeToThine which space?
 
like right now, the image and Node text is like this,

"imageNodetext" i want it like "Image Text"
 
MY GOD!!!! I've found the solution to my problem!
 
@NeilKnight was it something simple, I bet it was something simple...
 
3:42 PM
@SecretDeveloper Everything is simple, once you understand it.
 
@KendallFrey Its the understanding bit that is not simple
 
Well, the interesting thing is that I've not changed code, but removed elements from the web.config file.
There is no documentation saying that I need to remove anything
 
@SecretDeveloper :D Exactly
 
More of a frustrated hack at the file and its working
 
3:55 PM
Hey guys trying to sort a custom Class list
but not working with Icompareable :/
public class CustomList: IComparable<CustomList>
{
    public CustomList() { }
    public string Name { get; set; }
    public string GroupName { get; set; }
    public string Email { get; set; }
    public int CompareTo(CustomList other) { return Name.CompareTo(other.Name);   }
}
 
What about IComparer?
And how is it 'not working'?
 
its not sorting out Name
like a first, then b then c
it shows other way around :L lol
like

c
b
a
 
public int CompareTo(CustomList other) { return other.Name.CompareTo(this.Name); }
worth a try
Also your sort may have a direction parameter
 
Sounds wrong, but...
 
01:00 - 16:0016:00 - 23:00

« first day (572 days earlier)      last day (4393 days later) »