« first day (1286 days earlier)      last day (3653 days later) » 

Jon
5:00 PM
SelectedItem.Value returns the string doesn't it? SelectedIndex.Value returns the index? I forget.
SelectedItem / SelectedValue
Yeah.. n/m
SelectedItem.Text returns the string value...
SelectedItem.Value returns the index
 
@ShotgunNinja you meet Hasker yet?
 
I don't have webforms to test this on =/ It may be that the tertiary operator won't work as well
 
Jon
The issue is that you don't want to assign the SelectedItem, but SelectedItem.Value -- so your statement would throw an exception by trying to assign a SelectedItem to an Int
Would only work with Null object.
 
so would this work? int myID = (!string.IsNullOrEmpty(ddlMyID.SelectedItem.Value)) ? Int32.TryParse(ddlMyID.SelectedItem.Value, out myID) : null;
 
Jon
Not if your SelectedItem is null
 
5:04 PM
^
It will throw an exception trying to access a property of a null object
 
ahh yes
 
Also, you can't use an out parameter that was defined on the same line (until c# 6)
 
how about: int myID = (!string.IsNullOrEmpty(ddlMyID.SelectedItem.Value) & ddlMyID.SelectedItem.Value != "-1") ? Int32.TryParse(ddlMyID.SelectedItem.Value, out myID) : null;
 
@NETscape Hasker?
 
nope
 
5:06 PM
SelectedItem can be null
 
@Daи - I think Jon's version worked
10 mins ago, by Jon
int myID = SelectedItem == null ? -1 : SelectedItem.Value;
 
Jon
you don't have to cast here.. its already an int
 
int myID = ddlMyID.SelectedItem == null ? -1 : ddlMyID.SelectedItem.Value;
 
Jon
err, parse
 
@NETscape Sorry - I'm only in one class right now, the rest of the day I'm out at work. I don't have the time to visit faculty, especially ones I'm not in class with...
 
Jon
5:07 PM
The tryparse was suggested, as a way to check for null and set the value at the same time
Its technically wrong
 
it has a default value of -1, and should also check for null to make sure no funny business is going on
 
ahh okay. just curious
 
He's teaching Data Structures and SDL this quarter, however, according to his schedule.
Fun classes.
 
@TravisJ but that way it doesn't know what ddl to get value from
 
You know the guy?
 
Jon
5:08 PM
Ohhhh. that sounds really fun to teach.
Those who can't do, teach. :)
 
SDL is really, really fun. It's a year-long software development project carried out through contracts between the school and local companies.
 
Jon
Heck, I'd take that class.
 
Students in the SE department are required to take it starting Winter trimester of Junior year, and it runs through Fall trimester of Senior year.
 
I had to do that once. It isn't so bad until you come across a company that doesn't know how to run a team of developers.
 
Teams of five or six students are assigned projects based on interest, and they have to work together, passing off uncompleted projects to the next year's team.
 
5:10 PM
Not with SDL, but a set of dev projects
 
Jon
Could be frustrating depending on your teamates.
 
Yeah, that ^
 
yeah, he was my prof before he went to msoe
 
Oh, there were some teams which fell apart.
oh cool.
 
In the real world, when teammates don't produce they simply get fired. In school, you have to pick up their slack =/
 
5:11 PM
idk, wasn't bad. kind of full of himself
 
Jon
Depends where you work, lol
 
lol
 
reminds me of a @ton.yeung
;)
 
and the project I was on, creating a Web-based robot controller for a class of Mechanical Engineering students, was carried on through the next year, then canned.
The stakeholders were extremely flaky, and refused to get in contact with us long enough to develop a solid plan or judge our progress.
 
Jon
that sucks.
 
5:12 PM
yeah we developed mobile apps for the uni that was passed on for two more years and finally made it to app stores
sounds like my current job. hmm
 
yeah, it would have been really cool, too. We had a really cool framework we built, with a customizable UI for different robot profiles, and direct feedback via webcam.
Communication was done via WebSockets to a backing server, which was connected to their DataTurbine network in addition to hosting the robot configuration database and the Tomcat server itself.
btw, DataTurbine is the nastiest protocol ever.
 
Jon
never heard of it
 
Good.
It's a network protocol designed for data acquisition, but in this case, it's used to control robots.
 
was that protocol choosen?
by the chipset? the devs? the ME group?
 
The ME group was actually a professor at a college in SW California
and his TA
 
5:17 PM
anyone have information as to when this would be needed?
 
and yeah, their college had a dedicated robotics laboratory, but everything was hooked up via a DataTurbine server.
 
Jon
@NETscape when you want to connect to a locally attached printer?
 
@NETscape If you were writing a printer manager program?
 
Jon
This net neutrality dead thing.. this is only for US companies.
I don't get how that is going to work.... for example, Google has servers in multiple countries.
They are going to pay extra to host in US
 
but aren't you connected if you found the PrintQueue using the LocalPrintServer?
 
Jon
5:18 PM
Its just dumb.
It also means that Rich Company A, won't have to compete with Poor Companies B, C, and D
 
@NETscape I think the intent is to expose a printer connected via the local computer (via USB or serial/parallel port) that exists in the Devices list to the print network.
 
Jon
With all these attacks on the internet, its only a matter of time if you ask me.
Big pockets are pushing to change the way we consume
 
Gotta lobby to make sure your company stays in business. The american way
 
Jon
Internet providers want it.. big companies want it.. politicians get paid to want it
It sucks.
 
quick become a big company
 
5:22 PM
now that I think about it, it would be used if you were manually building up a printqueue and trying to connect to it.
 
Jon
I could attempt to start laying down my own internet cables.. but i'm sure the government imposes restrictions on that now.
 
i think... but then if you change printers in MS Word, it'll say "Connecting" if you are switching network printers
 
@Jon - But that would be the general solution many people would take. ISP's in the way? Bypass ISP.
It would be a potentially large security risk if the industry went in that direction
 
Jon
@NETscape we have a printer here, with a separate print queue server.
might be for situations like that.
 
@NETscape - What if you wanted to track and control how many pages were printed in order to charge by paper and color dpi?
 
5:26 PM
printqueue is generally your printer
 
Jon
generally, but it doesn't have to be.
 
if i find a printer on the localprintserver, would i have to use that function, is my question
 
@NETscape - Why not allow the user to select a printer?
 
i would assume its already connected since i can grab printcapabilities and printticket information
 
Jon
Yes, but from my understanding, a printer can have multiple print queues.
 
5:28 PM
if you add a printer to your devices, the device will show up when you enumerate printers connected to the localprintserver
 
Why is RedGate such a piece of shit?
 
money
 
Jon
obama
 
lol
 
I've mocked MS Word printer selection, I'm just trying to figure out what's going on when you select a new printer and "Connecting to printer..." shows up for a moment... i figured you'd already be connected if the printer is found on the localprintserver
 
5:32 PM
@KendallFrey - At $2,000 per license I expect better.
 
i'm thinking maybe its just a status message being displayed while the printcapabilities are refreshed
 
The thing is constantly crashing over completely normal circumstances that I'm certain have been reported time and time again.
RedGate SQL Server Management Source Control
Did it again. All I'm doing is unlinking a database.
Gotta shut down management studio and restart.
Such a professional product.
 
How could i make code like this (example): checkbox1.Color(Black, Gold); instead of checkbox1.BackColor = Color.Black; and checkbox1.ForeColor = Color.Gold;
 
@jyrka - public static class CheckboxExtensions { public static void Color(this Checkbox cb, Color backColor, Color foreColor) { cb.BackColor = backColor; cb.ForeColor = foreColor; } }
 
^
 
5:43 PM
Thx, but how do i use that? :)
 
checkbox1.Color( Color.Black, Color.Gold );
It is known as an extension method
 
the ".Color" doesnt show o.O
 
So on any object which is of type Checkbox you will not be able to call .Color on it and have it reference that method
Did you include the namespace reference to the Checkbox extension?
Was it supposed to be this CheckBox cb instead of this Checkbox cb?
The type must be an exact match
 
i changed it to CheckBox
 
Does it show now?
 
5:46 PM
nope
actually thats the first thing i did before tring it.
 
Where did you insert the code for the static class
 
rught under:
public partial class Form1 : Form
{
right *
 
Hey all
can someone help me write a very simple regex.It should have atleast 3 characters and all Alphabets may start with small alphabet or large Alphabet.
 
@jyrka - Perhaps the extension should be declared outside of the partial class.
 
yea tried now :)
 
5:49 PM
I don't have forms installed in this vs version so I can't test it myself
 
@TravisJ Ok
 
@LasseV.Karlsen help?
 
With what?
 
regex
 
What do you mean by "all alphabets"?
 
5:53 PM
a-z
it can take A-Z or a-z
no numbers or special characters
just alphabets
 
so ... [a-zA-Z]{3,}
an alphabet is a collection of legal symbols
do you mean letters?
letters of the english alphabet?
ie. a-z?
 
yeah actually
@LasseV.Karlsen Thanks.It works
 
@SpencerRuport Thank you for the 'Color' class :)
 
@jyrka - Welcome. :)
 
Usually a NullReferenceException is easy to pinpoint if you use a debugger.
 
@KeremZaman Why do you have a private set. You can't assign values until you build the object, which you don't actually assign to. Not that I can see anyways.
 
:)
 
@Steve ?
I'll figure it out.
 
@KeremZaman It's not wise to just blindly cut/paste code... you're just asking for trouble. You should try to understand the code and then create an implementation of it that works for your situation.
 
6:38 PM
@EvanL Agree,
 
Nothing wrong with using other people's examples as a base to work from... but never directly "steal" the code...
Unless its awesome and completely reusable.
 
Question, what does this mean:

var split = columnMapping[0].Split(' ');

data.First = split[0];
data.Last = split[1];
data.Username = split[2];
I know the Split(' '); is grabbing items after a space. But the lower part, split[0] never seen that.
 
.Split() returns a string array.
var split is a string[]
 
@Greg ;)
 
@Steve @Greg :/
 
6:47 PM
@ShotgunNinja :D
 
=8-D
 
@EvanL Okay, so it is a string[] and the integer represents the items to store in the array? In the indexed position?
 
....
 
I mean what
 
6:49 PM
Is that correct?
 
Indubitably
 
@ShotgunNinja My brain cells are dead for the day, can you be a tad bit more specific?
 
Sure. Once you have split the string into an array of sub-strings, the number n specified in the square brackets just gives you the n th string
 
@ShotgunNinja So it is basically assigning an index?
 
No. It's actually reading off consecutive runs of characters from the string into separate entries in an array which it creates.
Effectively, ("A B C").Split(" ") will result in (String[]){ "A", "B", "C" }.
Then you can access that via the square brackets as you would a normal array.
 
6:51 PM
@ShotgunNinja Okay, I got you.
Thanks.
 
The split function works pretty much the same in all high-level languages with objects.
In languages like C, it's a bit different, but still doable.
 
@Greg yes, split[0] is the first element in the array
 
Huh... are there any object-oriented languages with no system for dynamic memory allocation?
 
It can't be object orientated if there is no memory allocation for the objects o_o
 
There can be static memory allocation... it'd be bass-ackwards, but that's not the question.
 
6:54 PM
@RoelvanUden How did you think of this approach?
 
@Greg What approach?
 
For the data scrape, what about the problem indicated the route you went. It is really good, I'm still trying to understand it a bit.
 
@RoelvanUden Why do you say that?
 
As you've done things I haven't done before.
 
@Greg Basically, you think "So what does what data represent?". The table was basically the collection, whereas each row was an object in that collection and each column was a property. I just went from there, grab each row, each column, and map that back into an object. :P
 
@RoelvanUden That makes sense
 
@KendallFrey Oh god no!
 
@ReedCopsey Well.. theoretically it is possible to pre-allocate static memory that would be used to store the fields for objects in. However, it doesn't make much sense, so I'd rather say that object orientated design without dynamic memory allocation doesn't work.
 
I don't think the room code would work. You can't catch an exception like that in Java :P
 
@Greg The trickiest part was probably the way the table was found. I went from the table header, and scanned up in the HTML tree to find that table. For the rows, I then skipped the first one (because it contained headers).
 
6:58 PM
@RoelvanUden C++ does object creation on the stack frequently
 
@RoelvanUden Yeah, my first go at data scraping
 
I agree that you typically need to have dynamic allocation (for other reasons), but wouldn't say it's impossible to have OO without it
 
@ReedCopsey it's not, and C++ is indeed a good example of where you want to have as little things on the heap as possible. Different languages for different tasks.
 
Fuck, accidentally opened IE
 
@RoelvanUden I'm trying to rework the example a bit, to separate the address Street, City, State, Zip now.
 
7:03 PM
@KendallFrey - alt f4!
 
"taskkill /f /im iexplore.exe" ;)
 
delete *.*
 
Array.ForEach(Directory.GetFiles(@"C:\Program Files\Internet Explorer\"), File.Delete);
 
7:19 PM
hcf
 
What?
 
!!google hcf
 
darn
stands for "halt and catch fire"
a joke assembly instruction
 
hey all
 
7:29 PM
@Pheonixblade9 hey
 
Hey guys!
Can you guide me here
 
you're already here...
 
I'm creating a new project (class library) but I want to modify the .config file whenever someone references it. This will add some default config
 
congratz on the successful journey!
 
@NETscape thanks btw xP
I've seen this in projects like EF which adds a default config to your config file
thing is i don't know where to start looking
 
7:33 PM
you could use Properties, and save a values to the .config...
 
is that made via script?
 
click the Properties > Settings.settings file
add a value. you should see a .config file get added to the project
 
ohh I see them!
let me play with it
@NETscape thanks
 
you can use the designer or write a custom .config
now sure if this is the route you want to take or not. you could also write to a local hidden file in some hidden directory. the thing about .config files is they have to be located in the same directory as their assembly I believe.
if someone deletes your .config, you'll lose all your data
 
So i referenced 2 dll files: "log4net.dll" and Ionic.Zip.dll" in same folder as my program, but how could i make the program load these for example from "C:\ProgramData\" ? i cant seem to get the examples on internet to work for this.
got errors when application started then just gave up on that idea :/
Copying them from resources to the application path right before "InitializeComponent()" is not good i think.
 
7:42 PM
hey, anyone who loves the internet, do me a favor? call your congressman and ask them to favor Title II classification for internet services. Also call the FCC and do the same: http://www.pcworld.com/article/2147600/fcc-will-seek-input-on-latest-net-neutrality-proposal.html

Tom.Wheeler@fcc.gov

1-202-418-1440
 
odd, a blank field keeps passing validation
 
@Pheonixblade9 Yeah, I saw that. Scray stuff-
 
@Greg yeah. I set up a meeting with my congressman and senator's staff.
 
@NETscape tried, but that modifies the config file of my library project...I want to modify the config file of the project that references my library project :/
 
gahh! is there any reason why C# can't figure out that -1 is less than 0?
because it keeps passing an if statement checking for that, and I've debugged the value passed - it is definitely -1
 
7:52 PM
@Pheonixblade9 I should do the same, assuming he is willing to listen.
@KendallFrey Master of Regular Expressions, question.
 
@Daи You've got something odd going on- because -1 is less than 0 in C#
 

« first day (1286 days earlier)      last day (3653 days later) »