« first day (583 days earlier)      last day (4372 days later) » 

5:27 AM
Hi all
 
 
2 hours later…
7:48 AM
@HansRudel @Hans I still not understand what you are exactly trying to achieve. You loop through rows and assign a new text (1 char trimmed from the beginning) to up to two rows. Also you make the label visible. Hopefully there are just two rows or you will get a nasty out-of-range exception.
 
hi jim
 
8:02 AM
Here is my refactored version. Removed duplicate increment "counter" and renamed couple of variables for better readability. Also limited to "for" loop to avoid out-of-range exception:
private void comboBox1_SelectionChangeCommitted(object sender, EventArgs e)
{
string selectedRoutine = comboBox1.SelectedItem.ToString();
Label[] labels = new[] {label1, label2};

for (int i = 0; i < dt.Rows.Count && i < labels.Length; i++)
{
if (dt.Rows[i]["routine_name"].ToString() == selectedRoutine)
{
string parameter = dt.Rows[i]["Parameter_Name"].ToString();
 
8:27 AM
@JPollack is this from a couple days ago?
yeah there were only two rows. I was only messing with two till i was sure i had it working. the actual one will have a max of 8..
indeed ur variable names are alot better than mine
i believe i still need a counter in there for the label as there are more than 1 SProc in the dt. therefore i may be 5 before it reaches the first entry of the selected SProc
 
8:48 AM
thanks for ur help though
 
9:04 AM
Hello
 
9:21 AM
hi
 
9:38 AM
when c# 5.0 and vs 2011 go out on the market?
 
why do u ask?
 
9:56 AM
actually, i create web crawler on tasks, I think "await" and parallel features on c# 5.0 will be great.
 
10:54 AM
visual C# express dont have asp.net components?
 
11:07 AM
m using c# for game
 
@NickMascarenhas Unity3d or XNA?
@johniekcomp Have you looked at Visual Web Developer Express? I think that's what you need for asp.net
 
@Botz3000 unity3d
what u do.?
 
Maniekb
 
@all hey plz give some links for delegates
i wat to revise
 
delegate what
 
11:19 AM
i want to use that for chat system in my games
 
so
 
its posiible using that
 
@NickMascarenhas i want to use unity3d too, but for a mobile game. haven't really used it yet though
 
@Bot
@Botz3000 m doing on android
 
@NickMascarenhas I'm sure there are examples for unity on chat
 
11:21 AM
@Botz3000 yup but wanted to go through basics too..
 
@NickMascarenhas Look for "C# delegates" on google, you will find a lot of examples and tutorials there
 
@Botz3000 hmm... ok...
@Botz3000 what u do??
 
@NickMascarenhas what do you mean? in unity?
 
@NickMascarenhas I want to create a game for Android (and iphone too), but still don't have a great idea
 
11:25 AM
@Botz3000 I have started making. Now in 2 days will start level designing
@Botz3000 Proto is ready
 
@NickMascarenhas nice. do you already have controls for touch input?
 
@Botz3000 yup
@Botz3000 just waiting for 3d team to complete their work then i will start impoting
 
@NickMascarenhas Where do you have those controls from? Thought maybe someone already implemented it, but couldn't find any
 
@Botz3000 I used Input.GetTouch
 
@NickMascarenhas Ah i see. I thought maybe someone has already written a player controller for it, like the 1st and 3rd person controllers from the examples :)
 
11:35 AM
@Botz3000 I even used accelerometer for 1 build
@Botz3000 in that script u can modify it to use touch control. for moving forward u can use a button which shld be pressed. for that u can use HitTest
 
@NickMascarenhas ah ok. haven't tried that yet
 
@Botz3000 ok..
 
@NickMascarenhas so what is your game about?
 
@Botz3000 its a car game
 
@NickMascarenhas Nice, how much will it cost?
 
11:47 AM
@Botz3000 m makig it for company
@Botz3000 few levels will b free
 
@NickMascarenhas ah, a demo version. always a good idea :)
 
@Botz3000 yeah... it is
@Botz3000 r u working on ASP??
 
@NickMascarenhas No, haven't really had the need to learn it yet
 
@Botz3000 ok... I learnt ASP.net but after gaming i am not willing to go back to that
 
@NickMascarenhas well it's something completely different, asp.net is a good thing to know about for sure
@NickMascarenhas but i would rather develop games, too
 
11:56 AM
@Botz3000 @Baboon hi
 
@Neon hi
 
I don't think learning ASP.NET is mandatory like that johniek states
I for one never made any website
I only do heavy clients
@Neon hi
 
i have a silverlight datagrid which displays record as one by one....
 
i meant ASP.NET
 
ah you can edit your chat messages here? nice
 
11:58 AM
but i need it as two multiple columns...
 
yeah
 
not really no, besides, there is no question mark ;o
 
@Neon have you asked that as a question on stackoverflow already? looks like it might require a longer answer
 
@Botz3000 no ... even i'm new to silverlight... and even i don't how to search this requirement...so i left it... and i'm here :)
 
12:01 PM
what are you trying to achieve with this data
and what data by the way?
 
welcome @heinst
 
thanks @Neon
 
@heinst i need solve a question which i have posted in a forum...
http://www.dotnetspider.com/forum/310194-Silverlight-Row-Columns.aspx
 
@Neon why would you wanna do that?
users are going to be disoriented
you can make the ItemsPanel as WrapPanel in Horizontal orientation
but really, you're asking for trouble
 
-1
Q: Getting rid of parts of combobox selections

heinstI have this code that gets rid of the path of in a combobox: public void CollectDataFolders() { string[] dispDirectories = Directory.GetDirectories(defaultPath, "Data*"); selectdirectories.Items.Clear(); //gets rid of the paths foreach (string l_directory in d...

I asked that question above and no one seemed to have an answer
 
12:15 PM
WPF or winforms?
 
@Baboon it my reqiurement ... it is silverlight..
 
winforms.....I think. I used the VS comboboxes and what not to create the gui
 
@Neon I gave you the answer
@heinst In winforms I don't know, but in WPF you just need an IValueConverter
maybe you can leverage them in winforms as well, ask google
 
How do I get to the Google?
 
kidding me?
 
12:19 PM
yes i am
 
ok xD
 
but every time i search google on goolge.com it comes up with google, but i can never get to the google
 
If you can't google properly, you have much worse problems than can be asked here.
 
amen
they have a sign in my office on how to google properly
 
old work had signs on how to walk down the stairs + wash ur hands
hahaha
 
12:38 PM
hi folks
 
hello
Hans...your post on gays made me laugh
 
I am currently working in silverlight
 
ok
 
what about you?
which technology?
 
C#/.Net 3.5
 
12:41 PM
@heinst well he did write "hi gays" so i thought i better correct him since noone seemed to have noticed
;)
 
haha thats great
@HansRudel you think you can help me with this? stackoverflow.com/questions/10661810/…
 
give me a sec to read it
 
thanks
 
@heinst just for the record im probably going to get dragged outside again by my parents to finish off cutting the grass.
 
Thats nice of them
 
12:50 PM
yeah ur question isnt very clear. Most of mine arent so good either so i cant dis. from what i can understand, say you have 2 file paths C:\Mavro\MavBridge\Data and C:\Mavro\MavBridge\UberFile. You want ur combobox to display Data and UberFile?
but when the user selects say UberFile, the rest of that directory gets added to it so it becomes C:\Mavro\MavBridge\UberFile
?
 
I just have the Data folder, but in the Combobox, instead of saying Data i want it to say <Default>, but when the user clicks the registry needs to be set to Data, not <Default>
 
not too sure what ur trying to do
when the user clicks what?
 
So I have a combobox right
 
Basically replace "Data" with "<Default>", right?
 
@KendallFrey sup batman
 
12:54 PM
yes! but when a user clicks on <Default>, the registry cant be <Default>, it has to be Data
 
have an if loop checking for default
and then reassign it to data
 
wow
 
assuming i have understood u correctly
 
didnt even think of that
 
im assuming thats sarcasum
 
12:55 PM
no
 
I know you could do with DisplayMember and ValueMember, but that would involve a custom class
 
but how do I get it to display as <Default>?
 
I think @Hans has it though. An if.
BTW @Hans there is no such thing as an if loop ;)
 
if statement
 
really?
 
12:56 PM
for loop
while loop
foreach loop
 
@heinst Do the reverse. Replace Data with Default.
 
someone was taking the piss out of me yesterday for that but i couldnt figure out why
 
else statement
 
Does it loop? No, it only runs once.
 
no it runs once to populate the combobox
public void CollectDataFolders()
{
string[] dispDirectories = Directory.GetDirectories(defaultPath, "Data*");
selectdirectories.Items.Clear();
//gets rid of the paths
foreach (string l_directory in dispDirectories)
{
selectdirectories.Items.Add(l_directory.Substring(l_directory.LastIndexOf("\\") + 1));
}

selectdirectories.SelectedIndex = 0;
}
 
12:57 PM
@KendallFrey cheers for the heads up. alright dudes Daa is calling so i got to roll. catch u later
 
go cut that grass
 
http://www.telegraph.co.uk/news/picturegalleries/theweekinpictures/9275976/The-week-in-pictures-18-May-2012.html?frame=2223024

Russian girl friends must be bad ass
 
string item = l_directory.Substring(l_directory.LastIndexOf("\\") + 1);
if (item == "Data") item = "<Default>";
selectdirectories.Items.Add(item);
 
ok thanks
i wish people could get rid of the minuses on their questions :/
 
You can. Fix up the question. Usually it doesn't quite work that way though :(
 
1:09 PM
I edited twice to try to explain it better, its not the easiest thing to explain
 
1:24 PM
Hey. I'm using HttpWebRequest and HttpWebResponse to get the content of a web page. Then using StreamReader to put the content inside a string. Doing this I get the page's source and not the text on the page. Is there a way I can get just the text and not the source?
 
hmmm
what is the "source" you are speaking of?
 
It's the page source. The HTML and javascript.
Just want the text on the page though.
 
oh ok
did you try the WebClient class msdn.microsoft.com/en-us/library/…
1
Q: How to get text off a webpage?

Marcus SzantoI want to get text off of a webpage in C#. I don't want to get the HTML, I want the real text off of the webpage. Like if I type "<b>cake</b>", I want the cake, not the tags.

 
Ah, awesome. Thanks. :)
 
no problem
 
1:39 PM
that's the real deal
not for the faint hearted though
 
Can i use MySqlDataReader first on column, for example number 13, then on number 2
For example...
while(reader.Read()) {
if(reader.GetString(12)=="A") { reader.GetString(1); }
else { reader.GetString(2); }}
 
1:55 PM
@Srle Wish I could help you, but dont know SQL or databases...sorry
 
@Srle yes, you should be able to access the columns in any order you want. It is the rows that you only have forward access to.
 
2:16 PM
stackoverflow.com/questions/10686598/… can anyone help me with this
 
2:31 PM
@silent__thought, thanks now is working :)
 
@heinst No, ValueMember is not what you think it is.
DisplayMember/ValueMember just define what is shown when you set the datasource of a control.
DisplayMember is a property on the object you're binding to that will be displayed in the UI. ValueMember is the property that will contain the Value (Control.SelectedValue) of the selected item.
You should just set the Text property.
Also, ChangeDefault should get called anytime the ComboBox selection has changed.
 
3:34 PM
@SPFiredrake I set the text property, but it did not show up in the combobox. What the person said as an answer to my question worked, but the combobox thinks the selectedindex = <Default>, but now I want it to be set to Data when <Default> is selected
 
That's the problem, you're binding to a string collection, so any changes you make are going to be "permanent".
That's why I recommended having a CLR object that you build. So you can maintain the path and the display text separately.
public class FolderItem
{
    public string FullPath { get; set; }
    public string DisplayText { get; set; }
}
Then you can set DisplayMember on the ComboBox to "DisplayText" and ValueMember to "FullPath"
So the UI will show what you set DisplayText to, and when you have selected an item you can call SelectedValue on the combobox to get the full path.
 
ok. I understand but ive never used get and sets before
 
3:56 PM
They're not that that complicated.
All it does is create a private backing field and expands the get and set definitions to methods.
public string FullPath { get; set; }
expands to:
private string _FullPath;
public string FullPath
{
    get { return _FullPath; }
    set { _FullPath = value; }
}
Which is really:
public string get_FullPath() { return _FullPath; }
public void set_FullPath(string value) { _fullPath = value; }
 
4:12 PM
oh ok
so now with the get and set
so I have to get the selectedindex then set the name to <Default?
 
Nope. You create the FolderItem with the FullPath set to the Data folder, and the DisplayText will be set to "Default".
 
public class FolderItem
{
private string _FullPath = @"C:\Mavro\MavBridge\Data\";
public string get_FullPath()
{
return _FullPath;
}
public void set_FullPath(string value)
{
_FullPath = value;
}

private string _DisplayText = "<Default>";
public string get_DisplayText()
{
return _DisplayText;
}
public void set_DisplayText(string value)
{
_DisplayText = value;
}

}
 
4:33 PM
I change it to:
public class FolderItem
{
private string _FullPath = @"C:\Mavro\MavBridge\Data\";
get
{
return _FullPath;
}
set
{
_FullPath = value;
}

private string _DisplayText = "<Default>";

get
{
return _DisplayText;
}
set
{
_DisplayText = value;
}

}
and got 10 counts of Error Expected class, delegate, enum, interface, or struct
 
It seems you have missed property names before getters
 
public class FolderItem
{
private string _FullPath = @"C:\Mavro\MavBridge\Data\";
public string FullPath {
    get
    {
        return _FullPath;
    }
    set
    {
        _FullPath = value;
    }
}

private string _DisplayText = "<Default>";
public string DisplayText {
    get
    {
        return _DisplayText;
    }
    set
    {
        _DisplayText = value;
    }
}
 
4:50 PM
@heinst The object should not be set with default values. It's just a placeholder for the actual data.
public class FolderItem
{
    public string FullPath { get; set; }
    public string DisplayText { get; set; }
    public FolderItem(string path, string display)
    {
        FullPath = path; DisplayText = display;
    }
}
When you get the directories, instead of adding just the string of the path after "\\Data." like you were before, you create a List<FolderItem> and add new FolderItem(fullPath, someDisplayText)
So in your CollectDataFolders method, make the following change
List<FolderItem> folders = new List<FolderItem>();
foreach (string l_directory in dispDirectories)
{
    string displaytext;
    if (subIndex == l_directory.LastIndexOf("\\Data.") == -1)
    {
        displaytext = "<Default>";
    }
    else
    {
        displaytext = l_directory.Substring(l_directory.LastIndexOf("\\Data.") + 6);
    }
    folders.Add(new FolderItem(l_directory, displaytext));
}
So now each object in folders will be an object that has the full path (l_directory) and the displaytext (either "<Default>" or anything after "\\Data.").
Now you set:
selectdirectories.DataSource = folders;
selectdirectories.DisplayMember = "DisplayText";
selectdirectories.ValueMember = "FullPath";
 
5:17 PM
for the subIndex...what should it be set to? I tried int subIndex and it says the == is wrong in the if statement. I also tried what it was before
 
5:32 PM
Crap, sorry.
if (l_directory.LastIndexOf("\\Data.") == -1)
 
@SPFiredrake - How was your weekend?
 
ok here is a yes/no HTML question. Is there is a way to override background images from the CSS file with one placed in the html?
 
I got a StackOverflow error
 
I have this line
<h3 class='ui-corner-tl ui-corner-tr' background-image="images/grey-gradient1.png" >
but my html still uses a background from my css
 
background-image="images/grey-gradient1.png" is not valid
 
5:37 PM
yeah
 
use style="background-image: url(images/grey-gradient1.png)"
or better yet
put it in a css class
and apply the class
 
thanks kyle
and heinst
 
mostly kyle
 
@SpencerRuport Not bad. A lot of yardwork.
 
5:39 PM
Same!
 
Hey. Is it possible to set a cookie on a WebBrowser control?
I have the cookie in a string.
I used GetCookieHeader to get the cookie from a CookieContainer.
 
hi i want to know how to use 2 database column in single datagridview column
 
@SPFiredrake - Planting or just general cleanup?
 
@SpencerRuport Everything. Planting, weeding, painting, power washing, reupholstering...
 
... you have carpet in your yard?
 
5:47 PM
No, chair cushions.
 
oh haha
Nice :)
 
hey give me ans if anyone know
 
I'm looking forward to having a garden when I finally buy a house.
 
20-40$ per cushion? No thanks... I'd rather buy a blanket for $20, cut it up and reupholster 3 cushions per blanket.
 
Makes sense.
 
5:48 PM
18$ actually
 
I bought my EDC ticket and it came in the mail this weekend.
In the packet they have some "ED-Seeds"
I assume they're daisies haha.
Cheesy as hell but I'm going to plant them eventually.
 
@KyleTrauberman I got it to override the image, but for some reason, it is not drawing the new one :(
now it is just not displaying anything. and yes, Checked the path
nvm .. path was wrong
 
@SpencerRuport I got more books this weekend :p
 
Bad tony. Bad!
Which ones?
 
LOL ASP.NET MVC 3 Framework from APress and head first HTML and jQuery
crap... have a meeting be back in about and hour
 
6:00 PM
The html and jquery one probably are good.
Latez
 
@TonyHarmon I need to buy the asp one.
head first Jquery and HTML sound good too!
ok I don't know the correct term to even google it. I want to "tab" the div blocks, so if I reply to a message, the reply div would be aligned under the topic (think reddit)
kinda like a tree view
"threaded comments" seem to work
 
6:59 PM
hi all!
 
7:27 PM
@CBarlow What happenin? So how is the pregnancy going?
 
@kcbeard Pretty good man - just hanging in there. =)
How are you?
 
@CBarlow Good, first day at the new job. So I should be around much more now :)
@CBarlow Oh yeah and wifey is due anyday now for kid #2
 
hi
 
8:23 PM
hi folks
Quick poll: If I have a question regarding shorthands in Windows Explorer- where shall I put it? SO, programmers.SE or SuperUser ?
 
shorthands?
 
I'm searching for a shorthand for CommonAppData - much like %APPDATA%
something I can copy&paste into the address bar, hit ENTER and jump right there
bummer
got it... you can use the same commands that work after hitting WINDOWS + R
shell:Common AppData\Microsoft\DRM looks ugly as f*ck, but works
 
8:41 PM
@yas4891 hya , what's up?
 
9:00 PM
where is patrick :L
I need help desperatly man lol
 
@TimeToThine - With what?
 
@kcbeard Congratulations on the job and the kid! Well done you!
@kcbeard Looking forward to more rapping sessions as time allows. ;-)
 
 
2 hours later…
10:50 PM
:(
You all are supposed to be my entertainment for the day
Today you receive an F
and you're all terrible people.
That's not me talking that's just what the results say.
We weren't even testing for that.
2
 
11:08 PM
theres no one here
that's bad entertainment
 

« first day (583 days earlier)      last day (4372 days later) »