« first day (893 days earlier)      last day (4056 days later) » 

XTG
7:02 PM
eg i have combobox with some items will there be the the items ?
 
If there are items in the combo box, then yes, there will be items in the combo box.
 
Haha.
Sounds reasonable.
 
Bob
Is a List<object> type safe?
 
Yes.
It only accepts objects.
 
any one know about Bluetooth programming ?
 
7:14 PM
@Mohsen yeah
 
20
Q: Bluetooth APIs in Windows/.Net?

cjkarrI am in the process of writing a Bluetooth scanner that locates and identifies mobile devices in the local vicinity. Is this something that I can accomplish using C#, or do I need to drop down into the C/C++ APIs? My application is targeting Windows XP and Vista. Pointers are appreciated. Thanks!

 
@Pheonixblade9 where is the start point ?
 
Evenin' folks
 
Bob
An ArrayList however is not type safe because you have no assurance of what types of values it will contain?
 
It's type safe in the same way that a List<object> is type safe.
It still follows strict rules, but those are very broad.
 
7:19 PM
start point?
 
@Mohsen Perhaps you're lost. Are you looking for a school?
 
Yeah, if one of you could buy me a $7k bike, that'd be greeeeaaat.
 
How about you buy me a $7K computer? kthx
 
@KendallFrey there's no point in a $7k computer
 
cough
 
7:25 PM
...Unless it's a mining rig for bitcoins to make $7M
 
I'm sure I'd use my $7K computer more than you'd use your $7K bike.
 
@KendallFrey I use my bike every day for riding to work
 
$7K does not sound too unreasonable for a computer
 
I use my computer all day at work.
 
Bob
7:28 PM
For an extremely nice computer, anyway.
 
And then after work.
 
Not a good investment but if you don't love to upgrade I can see a case
 
And then at night sometimes.
 
I got a $3K one for home around 2010 to prevent having to upgrade.
 
If I rode a bike as much as I used my laptop, my bum would be burned right through.
 
7:30 PM
$3k is about the limit for a computer
@KendallFrey I wouldn't actually buy a $7k bike unless I was a hardcore racer.
I do have two $500-$700 bikes though
 
$300 is about the limit for a bike.
 
@KendallFrey the difference between a $300 bike and a $600 bike is huge
 
I spend more on computers than on cars
 
I'm using it as my daily transportation
 
Bob
Well, that will happen when you double the price of something
 
7:31 PM
Have a sucky car but nice puter & nice bike
 
eh, I drive a 2003 dodge neon.
 
I use my computer as a means to generate income.
Your point is?
 
Is there a stackoverflow for cars?
 
Yes.
 
7:32 PM
Guessed wrong...
 
Bob
You wouldn't like it, the logs are terrible to troubleshoot after a car explodes... Oh you mean a site.
 
66
Cars

Proposed Q&A site for collectors/hobbyists, enthusiasts, and experts in cars and the automotive industry.

Currently in definition.

 
@Pheonixblade9 nice insta member!
 
DAFUQ
THE INTERNET IS FULL OF CONFLICTING INFORMATION
 
Bob
7:34 PM
Can I have an example of type...not-safe code in C#?
 
dynamic (google it)
 
26
Q: Does the amount of fuel in the tank matter?

Ola EldøyAs long as there is some fuel in the tank, does the fuel level matter? In other words, is it advisable to make sure the tank is mostly full most of the time, or is this just silly? In other words, are there valid reasons why you should avoid running on an almost empty tank (other than the risk of...

 
I had a problem last week with a window that wouldn't roll up. I eventually found some obscure forum thread where a guy jumped certain wires on the window switch and that luckily worked for me as well.
 
Empty tank == less weight == more gooder
 
@KendallFrey you've been watching too much Top Gear UK
 
7:37 PM
WTF. I would never fill up with still 1/4 tank left.
I always wait until below or near empty if I can.
 
Depending on the age of the car, you can start drawing crud through the fuel filter that would otherwise sit at the bottom of the tank
 
is there a way to show tooltip on combobox so that I can show the full text of selecteditem as tooltip?
 
Filling up near empty is a good way to ruin your fuel pump
 
I never figured that out.
 
yah filling up only when you uber low == bad
should fill up at about 1/4 tank
 
7:44 PM
LOL @ English bat man. Who comes up with this stuff
 
The Spanish one.
 
I'm having a programmer's block moment. Anyone in here to help?
 
34 of us.
 
:P Oh, hush.
 
The English bat man reminds me of this post that I stumbled on long ago: http://www.telerik.com/community/forums/aspnet/ajax/radajaxmanager-destroys-my-design-and-move-my-controls-in-preview-mode-that-are-inside-it.aspx

"post some code to examinе be cause my tarot cards is enjoy their holiday break on Caribian resort write now ^_^"
 
7:52 PM
I have a DataGridView made up of two columns, the second of which is a checkbox column.
I want that checkbox to be checked if the user clicks a row. (Eliminating the need to be 100% accurate on a tiny checkbox)
 
> post some code to examinе be cause my tarot cards is enjoy their holiday break on Caribian resort write now ^_^
lmfao
 
@MikeF Oh. My. God.
Best Google Translate flubbing EVER.
 
"Thank Burno"
 
...Anyone?
 
7:56 PM
forms app?
 
@KendallFrey could you look at some code for me?
 
Yeah, WinForms in VS 2012 with C#
 
Is there a row-wide click event to tap into?
 
@EliteGamer Possibly.
 
7:57 PM
hi guys
 
ok, it is a lot. hold on a sec
 
Thanks, @KendallFrey
 
msdn.microsoft.com/en-us/library/… there's a CellClick event. That should do it
zing, too slow
 
@KendallFrey i have done this. It works, but how do i write the shortcut in the textbox right then, and not after the keyup
 
7:59 PM
 <td style="height: 12px; border-right: silver 1px solid; border-top: silver 1px solid;
                                    border-left: silver 1px solid; width: 339px; border-bottom: silver 1px solid;">
                                    <asp:TextBox ID="txtHaulZoneCodeLEM" runat="server" CssClass="cagText" Text='<%# Bind("HaulZoneCodeLEM") %>'></asp:TextBox>
                                </td>
I want to check if the HaulZoneCodeLEM = 0 i want to put txtHaulZoneCodeLEM.text = ''
how to do that
 
That doesn't do it before keyup?
 
no
oh
opps, sorry, i want the ctl+ the modifiers to show up
right then
 
sorry, i was not clear
 
Side note: Why use Preview?
 
8:01 PM
me?
 
Yes.
 
i was told that is what i should use
 
I see a comment: // Ignore modifier keys.
Isn't that what you don't want?
 
@TomW That one might actually work better. I'm having a problem with events firing prematurely. [If I had a dollar...]
 
@EliteGamer Well, I see no reason to, unless the Handled prevents something.
 
8:02 PM
@KendallFrey when i do that, it returns
ctl+LeftCtl
i do not want the left or right, just ctrl
 
@Ellie I'd avoid triggering for the whole row, too. Just the cell; the row could be a bit counterintuitive
 
Instead of returning when that condition is true, append the key when it is false.
private void ShortcutTextBox_PreviewKeyDown(object sender, KeyEventArgs e)
{
    // The text box grabs all input.
    e.Handled = true;

    // Fetch the actual shortcut key.
    Key key = (e.Key == Key.System ? e.SystemKey : e.Key);

    // Build the shortcut key name.
    StringBuilder shortcutText = new StringBuilder();
    if ((Keyboard.Modifiers & ModifierKeys.Control) != 0) {
        shortcutText.Append("Ctrl+");
    }
    if ((Keyboard.Modifiers & ModifierKeys.Shift) != 0) {
        shortcutText.Append("Shift+");
 
@TomW Yeah, That's what I'm trying now.
 
oops
 
@TomW Just tried my code in a CellClick event. It "worked" once (checked off 3 boxes) and then wouldn't do it again.
 
8:06 PM
@KendallFrey that only returns
when there is a combo
 
@Ellie wpf?
 
WinForms, C#, as always. -___-
 
@EliteGamer Read it again.
 
This is what I have in my CellClick event. I feel like I'm missing something obvious.
for (int i = 0; i < dgv_trainingSessionEmp.Rows[i].Cells.Count; i++)
        {
            dgv_trainingSessionEmp["Attended", i].Value = true;
        }
 
ok dunno then, in wpf snoop is a useful tool for checking out what happens when events fire etc
 
8:08 PM
@PeterJennings You probably want to cast your DataItem to the expected object type or create a helper method in the codebehind
 
@Ellie you've used i as both a row and a column index
 
@KendallFrey so, how do i add the plus only when there is a combo? And, why do the numbers return D1 etc.?
 
@TomW BAH!
 
@MikeF right now 0 is coming if nothing entered in the field..I want to make it blank
 
that'll be it then.
Or at least part of it
 
8:09 PM
How do I tell it this row, and Column 'Attended'?
@TomW The logic on this routine is lost on me.
 
The number keys are labeled D1, D2, etc. to distinguish them from the numpad ones.
 
oh
could i get them to read just 1, 2,3 etc
 
If you add special cases.
 
ok
thanks
brb
 
@Ellie me too. I can't tell what you're trying to do with the loop
 
8:12 PM
It doesn't have to loop. That's what's confusing me. Everywhere else has said I need to use a loop and I don't get why.
I just want the check box next to the name to be checked if the user clicks the name.
brb
 
CellClick has an eventargs of type DataGridViewCellEventArgs
 
@PeterJennings I assume you're binding to some objects, correct? An object type that has a HaulZoneCodeLEM property?
 
that has properties RowIndex and ColumnIndex
 
yes @MikeF, can i do this in my pageload
Dim txtbox As TextBox = frmFields.FindControl("txtHaulZoneCodeLEM")
If txtbox.Text = '0'
txtbox.Text = ''
End If
 
VB... ugh
 
8:18 PM
It's been a while since I've done databinding, but I bet you could do a dirty hack like this: '<%# ((MyItem) Container.DataItem).HaulZoneCodeLEM != 0 ? ((MyItem) Container.DataItem).HaulZoneCodeLEM.ToString() : string.Empty %>'
where MyItem is your class type
 
@TomW I just still don't understand how to make this work. :/
 
@Ellie you have the row and column index of the cell clicked. You've already shown you know how to look up the cell with the checkbox
what's left to do?
 
@TomW Ugh, I don't know. I'm just having a brain fart moment where the logic isn't working for me.
 
@MikeF Myitem will be ? (TextBox)?
 
@TomW Just tried this:
dgv_trainingSessionEmp.CurrentRow.Cells["Attended"] = true;
Doesn't work either. What am I missing? I'm going insane over this. I feel like it's right in front of me and I'm missing it.
 
8:26 PM
is the grid bound?
 
Yes
 
My hunch is that the datasource is changing it back
 
Wait, maybe not.
It's throwing an error on that line saying "Cannot implicitly convert type 'bool' to 'System.Windws.Forms.DataGridViewCell'
But I use similar code later on to check the box if a record exists.
AHHHH! GOT IT!
I needed to add .Value
 
nice.
 
well...duh?
 
8:29 PM
Jesus. That was killing me. I knew it was easy, I just couldn't get it to work.
@TomW >.> Gee, thanks
 
you did it in the previous line of code
 
Yeah. I'm an idiot.
 
so does it work?
 
YES!
 
that looks like exactly the same process as before, only applied to the correct cell
 
edc
8:35 PM
For some reason I haven't used the ASP.NET data grid lately
almost always some jQuery data grid.
 
@edc gee, I wonder why that is ;)
 
edc
just more datagrid feature out of the box
 
Junior developers adds a private key to the solution... so you must have that key installed in order to build the solution... developer leaves for a few days without giving out password for said key....
cc/image facepalm
 
how would i go about making a textbox that will capture keyboard hotkeys and display them?
also, how would i go about styling each key to make them look nice?
 
edc
8:49 PM
isn't it easier to have a listener object listen to keyboard hotkeys and then pass them to the said textbox
 
@EliteGamer Glitter, glue and stencil's work good for styling keys. My daughter loves doing that.
2
 
ha
how would i do this? well, making a textbox that copies keyboard shortcuts (hotkeys)
 
@EliteGamer I thought you did that.
 
i know, but
i need some way to style each one
to make them look like a key
also, how do i make it to where when i press ctrl, it does not display Ctrl+, unless i have a combo
 
Then I don't think you want a TextBox.
@EliteGamer I thought I gave you code.
 
8:52 PM
yes, but it just shows ctrl+
when i press ctrl
and i have not added a combo
 
What do you want?
Wait. What?
 
ok, if just ctrl is pressed, then display Ctrl
if Ctrl+s is pressed, display that
 
So you want to strip the + from the end?
 
yes
until a combo is added
like Ctrl+S
 
you should be able to map those
put a listener on the kdyboard
 
8:55 PM
Your job is to think about simple things like that. If you can't think up a solution to such a simple problem, I don't want to do it for you.
 
but they should have libraries for that already so you don't need to recreate the wheel
 
i have tried
 
lmgtfy
 
here:  shortcutText.Append(key.ToString());
that appends the key
if i say:
 shortcutText.Append("+" + key.ToString());
 
are you running xaml? WinForms, ASP.NET?
 
8:56 PM
wpf
xaml
 
that is not what i am doing
i am just displaying the shortcut pressed in a textbox
@KendallFrey it works...my code above
but when i just press a key, i get +F
for example
 
0
Q: 32-bit .DLL registers on install (Win7 64-bit), but not regsvr32

klutI have a 32-bit application, that uses a VC++ 6 developed 32-bit .DLL (deployed as Win32UMinDependency) that I can't register on a Windows 7/8 64-bit machine. Along with the application are vbAccelerator ActiveX controls, many other 3rd party .DLL's, and in-house built .DLL's. I can register ev...

 
@KendallFrey got it
 
This is common problem that has been solved by millions of programmers. Concatenating a list of strings with separators, but not having the separators appear at the end.
 
9:00 PM
        if (shortcutText.Length == 0)
        {
            shortcutText.Append(key.ToString());
        }
        else
        {
            shortcutText.Append("+" + key.ToString());
        }
 
Perhaps string.Join can be of assistance.
Or that.
 
See, that's what I wanted you to do.
 
i did not think it would be that simple, but it was
 
Programmers are problem solvers who happen to know how to write code.
 
9:01 PM
@KendallFrey this is what i will attempt to do
5
Q: Tag editing in a WPF TextBox

Claudiu ConstantinI want to implement a custom TextBox that will allow me to edit tags. Hotmail's "To" TextBox is the best example I can think of: Also Facebook's "To" implements the same concept: Oh yeah, and StackOverflow does it too to tag a question :) Does anyone have some experience in building someth...

 
That is absolute truth.
 
ha ha
 
edc
@KendallFrey Really?! And I thought I have the next best app for Facebook.
 
If you're a bad problem solver, you're a bad programmer. Plain and simple.
 
If you'd told me as a six year old that what programmers do is solve puzzles all day, I'd have been hooked on the idea from day one
2
in fact I think a lot of kids would
 
9:02 PM
Wrong kendall
 
Hello! does anyone know a working c# script to backup in my pc or to ftp, a remote sql server db. Locally everything works but remotely nothing...
 
@RyanTernier Explain yourself.
 
Programmer: A person who writes computer programs.
Anyone can "write" computer programs. Ever use the damn turtle... lotus?

Anyone can write code, but a true professional software developer is one who can think outside the box, look at different angles, get batman jokes, makes fun of Apple/java or both, and yea...
 
I like java, on the writing stance
but the vm is ew
 
In my (not) humble opinion, Java syntax is nice. But as a whole it isn't all that great, like @SpencerAlderman said.
 
9:11 PM
@RyanTernier though your statement was anecdotal, @KendallFrey is correct
 
TAKE THAT
 
I'm with Ryan on this one
 
I don't have programmers, I hire people that can program, as well as think outside the box, and do the rest of the stuff I need them to do
 
what all c# programmers do all day is work with logic to solve problems with the intent to achieve an overall goal
 
Paraphrasing a certain scifi franchise: A Developer takes personal responsibility for the quality of the numbers that go into the machine, guarding them with their lives. A programmer does not.
 
9:15 PM
@edc I have question for you
 
lol ryan that's to be expected if you call yourself a developer
 
I'm back with another damn Cell Click problem.
 
edc
@pibcat uh oh.
 
I call myself a lot of things...
 
@RyanTernier all that is implied if you call yourself a real programmer
 
9:15 PM
I want to add an if statement in there that checks if the value is checked off. I tried this:
if (dgv.CurrentRow.Cells["MyCell"].Value == true)
 
ELLIE IS BACK
 
Yes, @RyanTernier.
 
edc
do we need a welcoming party?
 
@edc remember the discussion we had this morning abt String measurement?
 
No, @edc
 
9:16 PM
kills self
 
@Ellie I think I can predict where this is going.
 
edc
yup pibcat
 
but carry on
 
@TomW What am I missing?
 
Im having problem while inserting "\n" in the string
 
9:16 PM
It's giving me an error.
 
telling me what the problem is
 
@Ellie try all the usual, true, "true", "1"
 
It says == can't be applied to type 'object' and 'bool'
 
edc
@pibcat elaborate
 
either i) (object)true
 
9:18 PM
how can I insert special characters at each interval of particular width
?
 
@Ellie put a break and find out what the value actaully is before you test against it
 
or ii) cast the cell to DataGridViewTextBoxCell and pick a property specific to that type that is of type bool
 
It won't even let me build.
 
@Ellie what do you mean "checks if the value is checked off"
 
@Ellie lol you will have to remove the code that breaks first
 
9:19 PM
@Ellie well yes, because there's a type mismatch. DataGridViewCell has no idea what type its value really is
 
edc
@pibcat hmm, count number of characters and then split?
 
@edc how can you find how many characters fit in fixed width?
 
edc
oh wait, you want a fixed width as in pixels/points hmm
 
@klut If it's checked, I want it to uncheck. If unchecked, check it.
@Vortex Lol. I'm going as fast as I can! Y'all type faster than I can debug!
 
pts
 
9:21 PM
lol
but yah check the value, it might even be "checked" who knows
 
edc
how about... split your string into tokens using String.Split, then MeasureString on each token, if it's small than certain width, include the next token and measure again
 
Hm, is there any advantage to using string.Concat(), rather than StringBuilder ("string1 + "string2")?
 
yep, DataGridViewCheckBoxCell doesn't even have Checked
 
yeah, but the process going to be efficient?\
 
it has State, which I guess takes values of Checked, Unchecked and Meh
2
 
9:23 PM
Okay. Tried using an (object)true cast, and it doesn't have an error, but when it is true, it doesn't recognize it.
 
@Ellie do you know what CurrentRow returns? stackoverflow.com/questions/11974995/…
 
edc
@pibcat well... if you don't have thousands of words... I'd say the overhead is insignificant
 
@klut I'm gonna guess no...
 
@Ellie it doesn't look like that type of cell uses Value directly
 
@edc okay, and how does this work on selectionchanged?
 
9:25 PM
Wow, Rogue wasn't taken as a name, heh
 
is it going to be same?
 
hmm, might have to ignore that, maybe I've misunderstood the docs.
 
edc
@pibcat hmm I think so, though I am not 100% sure
@pibcat The last time I did WinForms was years ago.
 
I have lost complete control of this project because of a CheckBox. @.@
 
edc
I worry about the project.
 
9:27 PM
@Ellie are you trying to go through just the selected row, or all rows?
 
lol @Ellie
 
Oh shit, it's @Ellie.
 
@klut Selected row.
 
@edc Thank you
 
i can't understand @Ellie why you cannot just put a breakpoint and figure out what the value is when it's true or false lol
 
9:27 PM
@Ellie everything I've suggested I've got from reading the docs. There really isn't anything more to it than that. Just try things
 
@Vortex Sorry. Thought I had said that. I put a breakpoint on there and it's getting 'true', but not registering as true,.
 
ohhh
hmm
then mabey turn it into a string
 
Hence my frustration.
 
.ToString()
 
Mmmm. Smart thinking.
 
9:28 PM
and check for "true"
 
yah boolean.parse might work too
 
hi guys
  <asp:TextBox ID="txtHaulZoneCodeLEM" runat="server" CssClass="cagText" Text='<%# ((frmFields) Container.DataItem).HaulZoneCodeLEM != 0 ? ((frmFields) Container.DataItem).HaulZoneCodeLEM.ToString() : string.Empty %>'>
this is giving error....HaulZoneCodeLEM is not a member of string
how to resolve this...i want to put ' ' space if haulzonecodelem is 0 ( the binded value)
 
@edc And circle gets the square!! That worked really well.
bool check = Boolean.Parse(dgv.CurrentRow.Cell["Cell"].Value.ToString());
Then used check in my if statement.
 
edc
:)
 
9:32 PM
Thank you @edc!!
 
edc
well, everyone here helped
 
Haha. Was about to say and thanks to everyone else for helping me get there.
 
@Ellie i see how it is lol
 
edc
@PeterJennings You need value from HaulZoneCodeLEM, so something like HaulZoneCodeLEM.Text
 
@Vortex I promise I'm thankful! :P Always thankful for the help I get in here.
'Tis why I missed y'all.
 
9:34 PM
yah i'm new here but am enjoying it so far
i just want it to be 5pm so I can go home and play bioshock
 
edc
I got my copy too, for free :P
 
well i usually use usenet servers but i wanted it the second it was released on steam
and it a 95 on metacritic
 
@Ellie Value.ToString() returns if a checkbox is checked? lol
 
Hey all , quick question , do you think creating a custom attribute to log user actions is a good idea , given the fact that my mvc app has hundreds of actions. i'm thinking i could get away with one custom attribute per controller and integrate the logging in there , what do you think ?
not one per controller , per se .. but just add the ONE attribute on top of each controller class
 
@edc  Strill it is giving problem :  <asp:TextBox ID="txtHaulZoneCodeLEM" runat="server" CssClass="cagText" Text='<%# ((frmFields) Container.DataItem).HaulZoneCodeLEM.Text.ToString() != 0 ? ((frmFields) Container.DataItem).HaulZoneCodeLEM.Text.ToString() : string.Empty %>'>
 
edc
9:46 PM
@PeterJennings You are comparing a string to an integer (HaulZoneCodeLEM.Text.ToString() != 0)
 
edc : <asp:TextBox ID="txtHaulZoneCodeLEM" runat="server" CssClass="cagText" Text='<%# ((frmFields) Container.DataItem).HaulZoneCodeLEM != 0 ? ((frmFields) Container.DataItem).HaulZoneCodeLEM : string.Empty %>'>
now it says the server tag not found
@edc see my formview code pastebin.com/t7WMDjNA
 
would this work for @Ellie ? if ((DataGridViewCheckBoxCell)(dgv.CurrentRow.Cells["MyCell"]).TrueValue == true)
assuming DataGridViewCheckBoxCell states are TrueValue = checked, FalseValue = unchecked.
 
@klut I got it using @edc's Boolean.Parse() idea.
 
yeah, but that isn't readable code
Value.ToString() = checked or not checked?
 
And I may have to take it back. It was working fine when I left my desk earlier. Got back just now, and I'm getting an error.
Luckily, it's 5, so I'm off for the day. I'm sure I'll be back on Friday when I have to deal with this error.
 

« first day (893 days earlier)      last day (4056 days later) »