« first day (2025 days earlier)      last day (2915 days later) » 

8:00 PM
may i ask a silly question? so let's say i do something original with my web page but dont want people to look at my code and steal the idea, how do i go on about hiding / protecting it?
 
user47589
That's called "obfuscation"
 
@Amy you can't obfusticate the design though
 
i dont mind showing my html/css, i mind the server end code
 
@AdanRamirez it's largely impossible. Code can be de-obfuscated. Also, I highly doubt that anyone wants to steal your code
 
8:01 PM
@juanvan Mostly like that yes.. I want the user to choose row in datagridview and then click on button Delete, to delete it from DB.
Or... Search and then delete. This is how my method looks like https://gist.github.com/anonymous/b134ac07faa3283480d5bd8f44995f8c
 
user47589
@AdanRamirez you're welcome.
 
@AdanRamirez if it's server side no one can see it without access to the server
 
@AdanRamirez well you should never be serving that up
 
@Global and what do you have so for?
 
@Amy thanks
@mikeTheLiar uhh how do i know the code is server side?
3
 
8:03 PM
@juanvan see link :-)
 
yep looking at it
 
user47589
@mikeTheLiar my thoughts exactly
 
i know... ima noob i know
pretend i didnt ask :3
 
I should kick you on principle.
 
user47589
8:04 PM
That wasn't a noob question, though.
 
@Amy it was, and deserving of "Are You Kidding Me"
 
user47589
No, it was a thoughtless one.
 
@Global where do you want the delete button - next to the row or on top of the UI?
should say in the row or
 
dont starr it lol
 
fucking lol
 
8:07 PM
no star gods here
 
nooo
 
@juavan Well in the datagridview or next to it. But in another panel
 
c'mon
 
@Global here is a button at the top might be easier to start with
love that url btw
 
!!learn herpderp "<>http://chat.stackoverflow.com/transcript/message/30296012#30296012"
 
8:09 PM
@mikeTheLiar Command herpderp learned
 
!!herpderp
 
6 mins ago, by Adan Ramirez
@mikeTheLiar uhh how do i know the code is server side?
 
not u 2 caprica
 
user47589
lol
 
user47589
you will live on in infamy
 
user47589
8:12 PM
Zoidberg: what an honor
 
or until he reseeds the commands
 
@juanvan thanks man I'll have a look :-) But is there some way to display the content in datagridview2 also?
 
fill the Datagrid in the next call as the first?
sda2.Fill(dt);
 
@juavan Okay. Hmm.. It's so strange, all data just dissappears sometimes.. gist.github.com/anonymous/dce0044a41fa84f8b44ca4de3a30cdc4
 
are you looking to remove the BookId From the database or from the datagrid?
 
8:16 PM
@juavan It should be removed from both
 
remove one, refresh the data from the Database, then clear/fill the datagrid again
 
Does anybody has a good solution to having nuget packages referenced in code? For example, if I used a nuget package with version X.0, which compiles fine, and then X.1 comes out and breaks everything.
 
release notes?
if I update will I be going gray?
 
@juanvan yeah something like that. Did you see my last link?

I use it now but it removes everything, even if user haven't choosen the right parameters (combobox + searchword)
 
looked at the update - why it is returning an int? delete returns nothing or false
 
8:20 PM
@juavan my bad, havent updated it yet
 
looks like good starter code ado and all
 
user47589
apparently according to JS, "12/31/9999 5:59:59 PM" is not before "12/31/9999 6:00:00 PM"
 
@Amy in what time zones?
 
user47589
I think its failing because the time has non-zero milliseconds.
 
user47589
local time, CST/CDT
 
8:26 PM
I think it's failing because it's JS
 
user47589
hehe
 
JS = fail
 
tbh .NET's implementation of datetime is balls
 
Have you seen Javascript's implementation of Datetime?
Yo reed o/
 
no but i've seen .NET's and being JS it's highly likely its worse
 
8:29 PM
!!mdn date
 
@Sippy Date
 
@ReedCopsey hey
 
user47589
yeah tossing the milliseconds fixed it
 
@juanvan maybe it's the best to copy the same code in panel deletelog and just add a button to remove?
 
@wadry have a peruse through that shite.
Looks alright on the top, right?
Try and do something with it :)
 
8:30 PM
!!> new Date("12/31/9999 5:59:59 PM") < new Date("12/31/9999 6:00:00 PM")
 
@Global or make a method to delete and then only have to call it once
 
@mikeTheLiar true
 
@juanvan that's what i meant ;)
@juanvan but have to call the method search twice
 
sounds like you need to think about the flow of the code
 
@juavan yep It's been a hell.
hell of fun of course
 
8:34 PM
might want to make an action list
 
@juavan action list? never heard of it
 
user47589
 
@Sippy which browser? aren't they all different
@Amy that value is not between those two
 
user47589
it doesn't have to be. those two values are the nearest valid values, not the range of allowed values
 
user47589
milliseconds is zero.
 
user47589
8:38 PM
I'm starting to think this HTML5 validator "datetime-local" doesn't work.
 
@juavan the page you sent looks good but only for datagrid, I'm suppose to get the data from Database
 
howdy
 
@Global like a list of the events that should be happening
 
im gonna stay clear of this one ... for fear of being told im wrong again
 
fear is false evidence appearing real.
 
8:42 PM
@Global ? you fill the datagrid with the data from the database - then add the database call in the delete, call the refresh on the Datagrid
all about the flow when to execute what code
 
@juavan so you mean I could call a method in constructor that fill it directly?
@juavan yeah kinda green yet
 
user47589
@Global ideally your constructors are lightweight and don't have side effects.
 
that is kinda funny
if the view is to fill a datagrid, then the constructor of that view should have the fill method
 
@Amy
https://html5test.com/compare/browser/chrome-44/firefox-40/safari-9.0/ie-11/ie-Edge%2013.html

ctrl+f "input type=datetime-local"
 
user47589
8:50 PM
ah, thank you
 
user47589
I've fallen back to just using a date input element, the time wasn't that important in this context.
 
@juavan too many options now.. need to learn easiest one
 
user47589
It would have been nice
 
user47589
@Jakotheshadows i checked the HTML5 spec for datetime-local, but it didn't occur to me to check for browser support.
 
user47589
taking it for granted i guess
 
8:51 PM
@Global ya that is the problem with coding - so many ways to do things sometimes
 
@juavan tell me about it
 
yeah there are a couple problems there, one is that a lot of people are still using old browsers, the other is that the latest browsers still aren't 100% caught up with the HTML 5 spec
 
@juavan but the project begin to looks nice and everything is objectorientatet, just missing last part now
 
I don't get why the world can't follow the way SQL does it ... have a date type and a time type, if I want a datetime i'll have both
annoying as hell
 
SQL has a datetime
at least, T-SQL does
in fact, it has a few of them
 
user47589
8:54 PM
@Jakotheshadows that's okay, this particular application is for internal use only and is expected to have only a single user
 
ah, so is it a web app just so they can use it from any machine in the office then?
 
user47589
almost. this is a rewrite of a poorly-written WPF application that drives how we print and mail out insurance cards.
 
user47589
the number of users with access is understandably limited.
 
gotcha
 
user47589
its been a fun project.
 
8:58 PM
Sometimes I worry about my career. I don't work with any other developers and therefore my understanding of source control and team software methodologies is very limited. I hope it doesn't stay this way too much longer.
I feel like I'm falling behind in those departments even though I'm learning a lot about the technologies I work with
 
user47589
new technologies are released faster than we can keep up
 
user47589
deciding what new tech to learn or ignore is a shot in the dark.
 
Well, I mean more specifically languages
 
@Jakotheshadows best bet is just to get a different job after a while or learn things through side projects
 
user47589
You're the only dev at your company?
 
9:00 PM
Yeah
it isn't a software company, it is a building management systems company. They never had software development before me. So in that regard I feel like where I'm at is an opportunity to rise to a station I might never get a shot at elsewhere
 
Any reason why when I call:

using(var source = Image.FromFile(file))
{

}

An error is thrown?
 
but on the other hand I feel like I'm gonna be on a strugglebus when it comes to source control and teamwork the moment I move to a company with an actual dev team
 
What error?
 
It has a useless Stack Trace, no message, simply states null.
 
My guess is the file either doesn't exist or is locked
 
9:03 PM
StackTrace = "   at System.Drawing.Image.FromFile(String filename, Boolean useEmbeddedColorManagement)\r\n   at rscAdmin.Libraries.ProductImageHelper.ResizeImage(String file, Double maxWidth, Double hscale, String output) in C:\\Code\\Production\\Resource Center Admin\\...
 
I used to be the only programmer at this company, after being hired the other guys left so I was instantly promoted to lead...
 
user47589
@Jakotheshadows i'm a little torn. on the one hand I want to work at a "software company", but on the other hand, working in a corporation for internal tools is just fine.
 
user47589
@Greg what is the exception?
 
user47589
!!msdn image.fromfile
 
honestly I think I would rather work on internal tools, I like making things more efficient and you get a good grasp of the effect of your work in those situations
 
Super helpful: {"\\\\svr-localhost\\inetpub\\ProductImages\\Original\\ARM-ARMC653BC2EW296368-1.jpg":nu‌​ll}
 
user47589
@Greg what is the exception type
 
@juanvan still there bud?
 
user47589
@greg If its an ArgumentException, its because the filename is in a Uri format which isn't allowed.
 
about done for the day whats up
 
9:06 PM
That's another thing too.. because software development is a new thing for this company, there is no concept of a "lead". There isn't anyone for me to lead but myself. Despite that, I still do everything for the development from requirements engineering, design, development, changes/maintenance etc. So I feel like in some ways I have "lead" responsibilities but I'm certainly not paid like one as in other ways I'm not really "leading" anybody.
 
all software devs should be somewhat a project manager
 
But the work is very satisfying. I get to interact daily with the people who use the stuff, and I get to talk to customers directly to figure out what they want
I do both internal and external work
 
Can't find it @Amy
 
I just worry that my lack of team experience will be a red flag in future interviews
 
@juanvan lost in this jungle.. Can't understand why the sql query is deleting all rows
 
9:08 PM
which query
 
all the rows
 
"DELETE FROM lb WHERE {0} LIKE @search", parameters.GetComboBox())
 
what does the final query text look like when it hits the SQL server
 
so like finds all things might be to close a match
 
if you want to know why a query is behaving in a particular way, you have to look at the query the sql-server gets, not just your source code that constructs the query
 
9:11 PM
want to delete by PK
 
Im using local db, express.
sqlQuery "DELETE FROM lb WHERE Name like @search" string
There's the value in Locals
 
So yeah, that deletes EVERY ROW where the Name equals your @search variable
what is the value of your @search variable
At least you don't have any % wildcards in there, I'll give you that
 
Loggbok.Logbook.GetSearchWord returned "" string
string.Concat returned "%" string
+ System.Data.SqlClient.SqlParameterCollection.AddWithValue returned {@search} System.Data.SqlClient.SqlParameter
 
actually its worse than that, it isn't all rows that are equal, it is all rows with a Name that starts with the string in your @search variable
 
user47589
Use SQL Profiler and examine the query as it is received by SQL Server, or use some ADO.Net logging of some sort to do the same.
 
user47589
9:17 PM
SQL Server Profiler will tell you the query and supplied parameters.
 
So if @search = 'Bob' then it would delete Bob, Bobby, Bobb, Bobble, Bobfoo,..... you get the idea
if @search is the empty string
 
Well if I use = instead?
 
it would delete everything
*I think
 
But it's not empty...
 
then what is it
"%" oh god
its "%"
% is a wildcard
 
user47589
9:19 PM
that'll match everything.
 
that matches ANY STRING
I take it back
you did have wildcards
no cookies for you
if you're searching for a string equal to "%"
use the = operator instead
 
If you're going to be using the profiler learn how to filter on command text
There's a lot of noise in there
 
user47589
imo using Profiler is an important skill to have.
 
Oh without a doubt
Definitely saved me a couple of times
 
user47589
you're right, there's a lot of noise.
 
9:21 PM
You can save the trace and load the file into a temp table. That's super useful
 
@Global read this thoroughly before you use LIKE again:
https://msdn.microsoft.com/en-us/library/ms179859.aspx?f=255&MSPPError=-2147217396
 
Thanks guys. I'm using the database query in Server Explorer, but the command is not same as in the other code enviroment.
 
hey guys..quick one
this assignment:
        TimeSpan ts = SelectedParkDuration - StopWatch.Elapsed;
SelectedParkDuration is TimeSpan?
 
how should we know!?
 
9:25 PM
while StopWatch.Elapsed is just normal TimeSpan
 
you haven't shown the code that declares it
my crystal ball is in the shop for repairs
sorry
 
so I can't assign as one is nullable Timespan and the other is normal Timespan, is there a way to cast?
 
all nullable types have a .Value member. You can also use the ?? operator to provide a default.
var ts = (SelectedParkDuration ?? StopWatch.Elapsed) - StopWatch.Elapsed
 
ok I think that came up before actually
 
I will read, removed the like and replaced with = , nothing is deleted now, even if the user input is matched with data in db
 
9:28 PM
probably because you still have that % in there
unless someone is named %bob
that % isn't doing you any favors
and, I don't know about you
 
@Global not to sound condescending but do you know the difference between = and like and what the significance of the % is?
 
but I far prefer nothing deleted over everything deleted
 
user47589
just got a bug ticket: "the right line is missing"
 
@Amy that sounds helpful.
I'm sure you'll have that fixed in no time
 
@Jakotheshadows exec sp_msforeachtable 'DROP TABLE ?'
 
9:30 PM
                                      here, a right line -----------------------> |
 
@Amy pretty straightforward ... add the right line ^
 
@MichaelEdenfield that's the wrong line though
 
it's clearly on the right.
 
and he didn't use red ink
 
STATUS: NOREPRO
 
9:30 PM
The right line in the wrong place can make all the difference
 
I guess that like is everything in it.. and = is more extactly
 
Add that to the code @Amy
 
@Global not exactly
 
9:31 PM
                                                                                 better? -----------------------> |
 
like uses pattern matching. = tests for exact equality
 
nope its not perpendicular
 
% means anything at all
 
user47589
I flagged the ticket WONTFIX: all right lines are accounted for
 
rofl
 
9:32 PM
Bob% matches anything that starts with Bob
% matches anything matching anything
@Amy Status: no repro. Lines blurred.
 
user47589
lol
 
thanks for the clarification
So in my case, I would rather remove the % and replace like with =, as a start
 
@Global like technically accepts regular expressions so there's a lot more you can do beyond wildcards
 
for delete query
 
If you only want to delete users with that exact name.
But that will delete all users named Bob
 
9:35 PM
@Global yes, and you should delete using the primary key as someone said earlier. If you delete on name, then 2 people with the same name both get deleted
 
Is Bob's last name Tables perchance?
Middle name '; DROP TABLE Students; --?
 
Dear lord.
Times like this make me glad I work alone.
 
Oh okay
little more difficult then
But I see what you mean, how do you know which id that should be deleted if both have the same name?
Delete lbid from LB, LB where LB.lbid = name something like this perhaps
i mean name = 'user input'
 
Sie
How would I get the contents of a list from another class to another class so that I can use that for a list box?
 
9:49 PM
@Global it can be done, it is your job to figure out how. I'd start by not giving the user the option to manually type in what person they're deleting, and think about how you would go about doing it without doing it the way you're currently doing it.
 
Thanks Jake, I'll start with find out what command I should use.. What makes it more difficult is that im using combobox , but perhaps I could just replace that object with an name extactly the same that's in the combobox?
 
Actually, a combo box makes it easier
 
Really? But I'm using combobox + textbox
 
Are you really using a combobox + text box? or are you just using a combobox
because a combobox allows you to type text in to match elements in the list
 
I mean, if the user could choose from datagridview which row that he/she wants to delete and the press delete button. Would be the best solution
 
9:53 PM
^^^ Folks, that sounds like a winner
 
I am using a combobox that I have locked with 4 different items, then he search for specific data in that column. It works for search
 
what do you mean "locked"
 
@Global this is probably what you want. Delete by ID, not non-unique information
 
The user can only choose between the 4 (name,title, text, date) in combobox
 
delete from Users where name = 'Bob' is the SQL equivalent of "John G raped and killed my wife"
 
9:57 PM
haha
 
@Global, stick to deleting from the datagridview idea
put their PK in a hidden column
then when they choose to delete that item, use the hidden PK
or show it, up to you, but either way include their PK in the datagridview
 
Great! Thank you. I'll try figure it out :)
 
I'm trying to update the AuthenticatedUser with the AuthenticatedUser received in the message why is not working?
@wadry I managed to put that stuff working without going to code behind. Using a windowservice approach :)
thanks for the words and motivation, I was really going through the bottom pit
 
10:29 PM
everyone is gone :/
 
I got to stackoverflow.com/questions/1599219/… and the most useful answer is terraslate's rant. I'm considering trying to figure out how to knock the check out of coreclr so I can catch it again. I understand the thread needs to go away but I still need to inspect the frames so I can log the problem and recycle and hope I come back up.
Unfortunately terraslate's rant is not visible to those with less than 10k rep ...
 
holy crap, it's 85F here right now
 
10:52 PM
Still up guys?
 
@codeman I know - record temps - it's crazy
 
go home, Seattle. You're drunk.
 
11:08 PM
we broke the record high here by 11deg :p
 
jeez
bunny at work!
 
@Codeman wat
 
11:24 PM
there's a bunny right outside
nibblin' on the grass
 
does no one hover when they see the arrow
I was remarking on the 90 degree weather
It's still stupid cold in the UK lol
for May, at least
 
@Sippy I do
@Codeman they've been eating my grass at home recently
 
Eat em :D
 
they're tiny here
 

« first day (2025 days earlier)      last day (2915 days later) »