« first day (1474 days earlier)      last day (3488 days later) » 

6:00 PM
@ton.yeung Any suggestion on those examples I posted?
 
One is returning a value the other just says ya it was found?
 
@juanvan works code first as well
@Greg use the first one
 
Ya - everyone likes code first
 
the second one does too much
i am shocked when i hear someone prefers model first
 
why kv.Value.ToString().Contains(ControlName)) vs kv.Key.Contains(ControlName)
 
6:07 PM
@CharlieBrown Really? Can you explain it too me?
 
I go code first to generate all my basic tables, then switch to model first so I can tweak the tables and such more closely
 
your second function has a dependency on httputility, not only is it determining the value, but also decoding
first operation is normalize, then comparison, then decoding... the function has 3 responisibilities
fuck seplling
 
@CharlieBrown That makes sense, I'm passing Control for Radio Button / Drop Down.
 
plus an implicit dependency on iData as well. its a small function, but the depencies are very high
 
6:11 PM
It is a ton of json data being parsed.
 
with that said... do what works.
 
@CharlieBrown Okay.
@CharlieBrown I appreciate the explanation.
 
if you were to write the documentation/summary of that funciton, what woudl it say?
 
@juanvan i tried using entity for mysql but i found a lot of problems
 
ugh, with the spelling today
@User1 i have a production app running for 2 years with EF over mySql
 
6:13 PM
what you having?
 
nice
 
are you following a demo online?
 
all the demo online aren't working, first problem i had is that the version of the connctor was not working with the current of .NET ...
 
version grab? you can nuget it as well for the latest
 
will try, i'm working on serious project and already started with ADO.NET
 
6:18 PM
is it in production? if not Delete is always an option
 
Delete what ?
 
you can always start over
if it not being used by others
to make $$
 
wow delete over 9000 of code to use entity framework , no thanks :D
 
ya na
 
sounds good to me
 
6:20 PM
also am not getting paid , so whatever
 
sounds like a good point to start over
lol
I have done a whole project - then took a look and started it all over again
i used the other one as a stepping stone
 
basically, if your writing any non-trivial data based application, and your NOT using a major ORM like EF or NHibernate or a similar alternative... your doing it wrong
 
or you like ado 2.6
 
sure, its fun to write sqlreader code all day, but those orms are going to do it better than you can every single time
 
it's been a while that i'm working on this, i just want to get rid of it, because am not getting paid , and want to move on to something else
 
6:24 PM
Anyone know where to modify the timeout for IIS? Our IIS times out after 30 seconds of attempting a query in SQL.
@ton.yeung It is hanging on a Stored Procedure, potentially.
 
step 1: fix sql. step 2: repeat step 1
 
@CharlieBrown I'm not DBA, so I can't do that :/
 
commandTimeout=0
 
In the web.config?
 
in the cmd for the storeproc
cmd.commandTimeout=0
 
6:27 PM
We have alot of them potentially.
 
"Thanks for interviewing with us, do you have any questions?" "Yes, do developers have to write SQL at your company still?" "Why, yes they do" "Thanks, I will be working somewhere else."
 
We set ExecutionTimeout to avoid that CommandTimeout.
 
ahh
 
Hey guys
how do you do string temp for multiple items?
 
rephrase
 
6:31 PM
I keep on getting "'temp' is already defined" thing...
 
code?
 
I'm a beginninger
um, one moment
string temp = cboBoxMode1.Text;
string temp = cboBoxEngine.Text;
//And um, more if needed.
 
ok, what are you trying to do?
 
top kek
 
I want the string to store multiple data
 
6:32 PM
ah
var temp = new List<string>();
temp.Add(cboBoxMode1.Text);
temp.Add(cboBoxEngine.Text);
 
use string[] , no ?
or list<string> :D
 
Ah, thats how you do it.
Hmm, trying it now. Thank you.
 
you want to stick to generics, i.e. List<T>, IEnumerable<T> and the like instead of array in c# unless you have a good reason for it
 
Um, no idea what that means, but I think its working. Thank you!
 
if only teaching in college actually paid well, i would totally do it
 
6:35 PM
And, I can just use
>if ((temp.Contains
Like normally right?
 
Thanks.
@CharlieBrown College professors get paid well, or so I heard
 
Not what Contractors get paid ;)
 
what does a place like pluralsight pay for a video series?
 
good question
 
6:37 PM
got be a buck if MVP are doing them or are they using them to get the MVP
 
@CharlieBrown Having fun > more pay most of the time. If teaching is your thing, go for it. I'm considering doing that after I've build some years of 'work experience' (lol)
 
@RoelvanUden i agree, but there is a balancing act. college is less than half my current salary then no way
 
@ton.yeung Thankfully, it's less restrictive here. I could teach without masters.
 
if it was a few grand less, then i would be all over it
 
@CharlieBrown That's true. Is it that much difference?
 
6:49 PM
for the instructors I know it is, but that may only hold true for local
full professors make good money
instructors make much less than half of what contractors make
 
chat related meta
16
Q: Allow Room Owners in chat room to be pinged as a group

FfisegyddIs it possible to add the ability for Room Owners (ROs), as a group, to be "pinged" in the same manner that a normal user can be pinged? At the moment, someone can ping me with @Ffisegydd. I propose that ROs should be ping-able with a similar "group" ping, say @RoomOwners or @ROs. This would all...

sounds painful
 
abuse-potential is high on that one. sounds like people want to wine (whine, wyne?)
 
Agree
:)
 
If that got approved, I sense the Kick to Whiner ratio drastically increasing. Especially since you know when someone wants help: ping owner HELP ME. All the room owners, aw fuck!
 
my angular ui dp sends it as js date
yeah
thats what im getting
mine works either way, whether i send string or date
*without the binder
protip: new MyClassName(int) should not make a database call
 
7:10 PM
Question, if I'm passing a <asp:RadioButtonList> control through JSON, then parsing to find the control. What would be the best way to return the value rather then the dumb bool?
@ton.yeung Because someone architected it that way :/
@ton.yeung And unless I rewrite a ton of shit, it won't happen.
@ton.yeung Too much to change, it would take a month or more.
I never realized how much shitty code existed :(
Is there a good approach?
 
how in the world do you even pass it through json...
 
Well, this is what they did:
 
Damn JavaScript again ...
 
thats the best part, its probably way more difficult to do it that way than the correct way
 
Hmn what's with the odd stl of c# lol
 
7:22 PM
<a href="javascript:void(0)" onclick="submitControl('Preferences')" class="zocial zocialGreenLg">Save Changes</a>
 
there's no shuffle method for lists?
 
function submitControl(page) {
    var cdata = $('.prodsflyout form').serialize();
    $.ajax({
        type: 'POST',
        url: '/service/controls/' + page + '.svc/save',
        contentType: 'application/json; charset=utf-8',
        dataType: 'json',
        data: JSON.stringify(cdata),
        success: function (data) {
            $('.ControlSaved').show();
            if (page == 'Preferences') {
                $('#divStatementsEdit, #divInvoicesEdit, #divAckEdit').hide();
                $('#divStatementsViewOnly, #divInvoicesViewOnly, #divAckViewOnly').show();
[OperationContract]
[WebInvoke(Method = "POST",
           RequestFormat = WebMessageFormat.Json,
           ResponseFormat = WebMessageFormat.Json)]
public int save(object data)
{
    bool access = ZNodeUserAccount.allowedAccess(ZNodeUserAccount.SecurityRights.CanViewAccount);
    iData = DataParser.ParseSubmitString(data.ToString());
 
doesnt look like its json-ing the control to me
just the form data
@paul23 how many times do you really need to shuffle something?
 
Quite often, but even C++ has it in the standard library...
 
@CharlieBrown Well, if I pass data for these:
 
7:24 PM
really? 15yrs and I've never done it once
 
        <div class="prefSearchResult">
            <!-- SEARCH RESULT -->
            <br />
            <h3>Search Results</h3>
            <p>View as a
                <asp:RadioButtonList id="rdoSearchResult" runat="server" RepeatDirection="Horizontal">
                    <asp:ListItem Value="rdoList">List</asp:ListItem>
                    <asp:ListItem Value="rdoGrid">Grid</asp:ListItem>
                </asp:RadioButtonList>
            </p>
        </div>
So, I want to get that lovely List or Grid.
 
var cdata = $('.prodsflyout form').serialize(); is going to grab every value in the form
and send it like this: { rdoSearchResult: "List" }
just type that line into your browsers js console to see what i mean
 
I've tried:
bool searchGrid = iData.ContainsValue("rdoGrid");
Throws error in serializing.
 
then idata's serialzer is fucked
 
@CharlieBrown Well, if I remove the Value from the ListItem it works fine.
 
7:29 PM
???
and then firefox crashed for me opening that gif
my bad also :P
2GB ram is something firefox doesn't like
But I don't get it.....
 
party rockers in the hooooouse toniiiiiiiiiight
 
Sounds social thingy btw: eeew
Sounds like one of those things -popular thanks to social media- I scare away from those.
 
@CharlieBrown Sigh-
@CharlieBrown Right now I keep getting Service.ActivationException.
 
7:48 PM
Sounds social thingy btw: eeew
 
@Greg Activation? you got something screwey partner
 
@CharlieBrown I got it back to working, but I want to get the actual value. Not if it contains a value.
Is there a simple way to do that?
Cause obviously if I do ContainsValue I'll get a true or false.
 
in c# or js?
what kind of class is idata? its not .net
 
@CharlieBrown Either a List or Dictionary.
 
lol, what? how can it be either?
one has key value pairs, the other does not
yes, but greg wants value access
 
7:55 PM
@CharlieBrown I can't find the spot, it looks like it is a List.
 
just F12 on it
or breakpoint and do a quickwatch and try out different code
 
@CharlieBrown I found a solution...
@CharlieBrown Use the true or false to force the search query list.
 
8:45 PM
Does anyone know at what stage web-forms initializes the query string? So if someone goes to a page, I want to read the session and add something to the query string.
 
9:01 PM
so did I tell you guys I actually got knocked by a "no-poach" agreement? I can't be hired by Amazon, apparently.
 
@Pheonixblade9 Wait, what?
 
Cody,

I do apologize but it looks like the company you work for is one of the companies that I’m not supposed to reach out to.

My apologizes and I do encourage you to apply online to Amazon.com

Sincerely
just thought you might find it interesting
 
Weird-
Did you reach out to them?
@Pheonixblade9 I need help.
Our search page receives a query string that states List or Grid. I want to add some logic that will detect user preferences and add that query string item.
 
9:25 PM
they reached out to me, lol
@Greg you'll have to be more specific
 
@Pheonixblade9 Well, The page is loading and I need to call our session data for a user and add Grid or List for their search before the page actually loads.
 
well you need some way of knowing what the user wants
 
@Pheonixblade9 Well, I've got it stored in their preferences.
Basically I'm trying to get that query string in there before the page reads it for search preference.
 
why do it in the query string? just include it in the response
 
@Pheonixblade9 Not following-
@Pheonixblade9 But, I don't want to rewrite this persons search code / page.
 
9:39 PM
I honestly don't know dude... the technology you're using is very strange to me
 
Office does weird shit.
 
10:01 PM
Anybody know some tricks for formatting text in vs? I have text in the form:

222, 222, 222
Needs to be:
222, 333, 444, etc...
 
@Pheonixblade9 Well, I tried this:
    private void GetSearchPreference()
    {
        string preference = String.Empty;
        string url = Request.Url.AbsolutePath;
        if(Account.CurrentAccount().SearchOption == 1)
        {
            preference = "List";
        }
        else { preference = "Grid"; }

        if (!Page.IsPostBack)
        {
            var query = HttpUtility.ParseQueryString(Request.QueryString.ToString());
            query.Set("vo", preference);
            Response.Redirect(url + "?" + query.ToString());
So, when you put that in Page_Load it breaks the entire page. I just want to damn query string to be changed, ugh~
Any thoughts?
 
What is Page_Load?
 
ASP.NET Page_Load Event...
 
What's that code suppose to do?
 
10:22 PM
It reads the session, determines search option (list or grid) which works. Then it is supposed to modify the query string before page loads so it defaults to their search preference.
 
10:35 PM
Figured it out.
 

« first day (1474 days earlier)      last day (3488 days later) »