Options

[Programming] djmitchella travelling through snow to rfind duplicate dates for singletons

17778808283100

Posts

  • Options
    gavindelgavindel The reason all your software is brokenRegistered User regular
    I'm laying out the design for a database on a Raspberry Pi with a touchscreen interface that tells a drone where to fly. The Pi has more horsepower than my flip phone, and the touch screen cost less than fifty bucks.

    Living in the future, yo.

    Book - Royal road - Free! Seraphim === TTRPG - Wuxia - Free! Seln Alora
  • Options
    mightyjongyomightyjongyo Sour Crrm East Bay, CaliforniaRegistered User regular
    I spent an hour or so putting all my dotfiles and config stuff into github. Best use of company time ever.

  • Options
    Jimmy KingJimmy King Registered User regular
    edited February 2015
    We've got a hybrid site being built using Angular and traditional pages. I have a form with a hidden input and the value of that element needs to be bound to a variable in the angular controller but the form just does a normal submit. I cannot get the value of the hidden element to bind. The variable is being set, I can create a span and use ng-bind or ng-model and display the value, but when the form submits the hidden input's value is not set.

    I have tried
    <!-- myVariable is just a string -->
    
    <!-- this span will show the value just fine -->
    <span ng-bind="myVariable"></span>
    <!-- none of these below will get the value, I have of course only had one at a time in the html -->
    <input type="hidden" value="{{ myVariable }}" name="poop">
    <input type="hidden" ng-value="myVariable" name="poop">
    <input type="hidden" ng-bind="myVariable" name="poop">
    <input type="hidden" ng-model="myVariable" name="poop">
    <input type="hidden" ng-value="myVariable" ng-model="myVariable" name="poop">
    

    Jimmy King on
  • Options
    crimsoncoyotecrimsoncoyote Registered User regular
    I walked in to work today to find an 80-page printout of a filesystem specification. Time to start reading!

  • Options
    TofystedethTofystedeth Registered User regular
    Quick question.
    Connecting to a DB in .NET. I can easily connect using integrated security as the user logged in to Windows. My application takes a user name and password and can authenticate to AD and check for group membership and stuff using directoryServices and security.principal.
    Is there a more direct/better way to do like, a semi-integrated connection to the DB, where it logs in as the AD user logged into the application, not windows, without just using a connection string builder and passing in the user ID and PW they entered in the login box?

    steam_sig.png
  • Options
    bowenbowen How you doin'? Registered User regular
    Nope those are pretty much the only two ways to do it, afaik.

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • Options
    TofystedethTofystedeth Registered User regular
    I mean, I think I could use impersonation, but that adds a whole bunch of other crap and requires the app to be run as an admin, which about half the intended users of this will not be able to, and the other may or may not.

    steam_sig.png
  • Options
    InfidelInfidel Heretic Registered User regular
    I mean, I think I could use impersonation, but that adds a whole bunch of other crap and requires the app to be run as an admin, which about half the intended users of this will not be able to, and the other may or may not.

    What's wrong with using the credentials you already are grabbing?

    OrokosPA.png
  • Options
    TofystedethTofystedeth Registered User regular
    edited February 2015
    Well, I didn't want to have the user's password sitting in a string in memory more than the minimum to process the login. And I'm not sure if connecting with username and password would try and connect as a local user on the server instead of a domain user.
    edit: If it were up to just me it would just use the integrated login, but it was an end user requirement that they might not be logging in as the same user logged into Windows.
    Which seems to me like a whole can of worms.

    Tofystedeth on
    steam_sig.png
  • Options
    InfidelInfidel Heretic Registered User regular
    Well you need their password as long as necessary to open connections, you can't really do any better than that.

    I wouldn't really worry about local memory hacks, they just typed that password in so if a machine is compromised the machine is compromised.

    OrokosPA.png
  • Options
    TofystedethTofystedeth Registered User regular
    Well you know how it is. Just wanting to do things as well as possible. In the end it's moot cause I just spoke with my lead and she agreed that it's stupid to even have a use case where the person logging in is different from the person logged into the workstation since this is a hospital and that's super frowned upon anyway.

    steam_sig.png
  • Options
    admanbadmanb unionize your workplace Seattle, WARegistered User regular
    Jimmy King wrote: »
    We've got a hybrid site being built using Angular and traditional pages. I have a form with a hidden input and the value of that element needs to be bound to a variable in the angular controller but the form just does a normal submit. I cannot get the value of the hidden element to bind. The variable is being set, I can create a span and use ng-bind or ng-model and display the value, but when the form submits the hidden input's value is not set.

    I have tried
    <!-- myVariable is just a string -->
    
    <!-- this span will show the value just fine -->
    <span ng-bind="myVariable"></span>
    <!-- none of these below will get the value, I have of course only had one at a time in the html -->
    <input type="hidden" value="{{ myVariable }}" name="poop">
    <input type="hidden" ng-value="myVariable" name="poop">
    <input type="hidden" ng-bind="myVariable" name="poop">
    <input type="hidden" ng-model="myVariable" name="poop">
    <input type="hidden" ng-value="myVariable" ng-model="myVariable" name="poop">
    

    I'm assuming you're on the latest version of Angular? Because ng-value should work in 1.2.

    That said, I vaguely recall running into this problem and just giving up and using display: none.

  • Options
    bowenbowen How you doin'? Registered User regular
    Well you know how it is. Just wanting to do things as well as possible. In the end it's moot cause I just spoke with my lead and she agreed that it's stupid to even have a use case where the person logging in is different from the person logged into the workstation since this is a hospital and that's super frowned upon anyway.

    Typically in this case the computer is logged in by the unit or with a guest account and the software itself tracks people instead.

    The EHR would be the one that cares about tracking the user across what they're doing with patient records.

    Local IT can suck a dick if they care about which user is using the system and doing malicious stuff with it. Make it so they have no permissions except software, and deal with it because you're not going to do much better, Mister IT man.

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • Options
    JasconiusJasconius sword criminal mad onlineRegistered User regular
    hi guys, posting this here for any potential job seekers

    I need (pretty badly and soon) a new software developer for my team

    You need at least 2 years of professional mobile development experience. iOS is ideal, but Android is OK if you can show you are both willing and able to pick up Swift. I will also accept traditional desktop client experience as well but only with pristine work examples

    You also need 2-3 years of vaguely modern front end web development experience

    Contract-to-perm, respectable pay, enormous benefits, and easy work hours (I've worked overtime like twice in three years)

    also you get to work for me so that right here is worth 100 grand

    PM for details

  • Options
    RendRend Registered User regular
    Jasconius wrote: »
    also you get to work for me

    Tell me more about your "benefits package"

    :winky:

  • Options
    bowenbowen How you doin'? Registered User regular
    Contract to perm makes bowen a sad panda. Starting to see this a lot lately and it's so shitty.

    Friend got fucked out of 3 months pay because they didn't like his "final product" after 3 months so they thought it was kosher under 1099 contract to deny him (partially his fault for not arguing a stronger contract and pay schedule). But since it followed the typical "you need to provide X service in order for your contract to be fullfilled and us to offer a position" it was totes legit.

    His first warning sign should've been the 2 other people that worked with him at the same time.

    /rant

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • Options
    DelmainDelmain Registered User regular
    bowen wrote: »
    Contract to perm makes bowen a sad panda. Starting to see this a lot lately and it's so shitty.

    Friend got fucked out of 3 months pay because they didn't like his "final product" after 3 months so they thought it was kosher under 1099 contract to deny him (partially his fault for not arguing a stronger contract and pay schedule). But since it followed the typical "you need to provide X service in order for your contract to be fullfilled and us to offer a position" it was totes legit.

    His first warning sign should've been the 2 other people that worked with him at the same time.

    /rant

    what the hell kind of contract to hire position doesn't just pay biweekly?

    Also, Jasc, what's the point in contract to hire if you're the one doing the hiring. The only reason I have ever seen that made sense was that it was a recruitment agencies way to get their cut without the company just paying out a couple grand lump sum.

  • Options
    Jimmy KingJimmy King Registered User regular
    edited February 2015
    admanb wrote: »
    Jimmy King wrote: »
    We've got a hybrid site being built using Angular and traditional pages. I have a form with a hidden input and the value of that element needs to be bound to a variable in the angular controller but the form just does a normal submit. I cannot get the value of the hidden element to bind. The variable is being set, I can create a span and use ng-bind or ng-model and display the value, but when the form submits the hidden input's value is not set.

    I have tried
    <!-- myVariable is just a string -->
    
    <!-- this span will show the value just fine -->
    <span ng-bind="myVariable"></span>
    <!-- none of these below will get the value, I have of course only had one at a time in the html -->
    <input type="hidden" value="{{ myVariable }}" name="poop">
    <input type="hidden" ng-value="myVariable" name="poop">
    <input type="hidden" ng-bind="myVariable" name="poop">
    <input type="hidden" ng-model="myVariable" name="poop">
    <input type="hidden" ng-value="myVariable" ng-model="myVariable" name="poop">
    

    I'm assuming you're on the latest version of Angular? Because ng-value should work in 1.2.

    That said, I vaguely recall running into this problem and just giving up and using display: none.
    Yep, using 1.2.26. As much as I hate it, because its awful and going to bite me in the ass eventually, for now in the controller method which was setting the value of myVariable and then submitting the hidden form I am just doing a document.getElementById('my-input').value = 'poopybutts';. Doing it as a text input with display: none so that I can properly use ng-value or ng-model may be a better solution... going to have to give that a try.

    Jimmy King on
  • Options
    TofystedethTofystedeth Registered User regular
    bowen wrote: »
    Well you know how it is. Just wanting to do things as well as possible. In the end it's moot cause I just spoke with my lead and she agreed that it's stupid to even have a use case where the person logging in is different from the person logged into the workstation since this is a hospital and that's super frowned upon anyway.

    Typically in this case the computer is logged in by the unit or with a guest account and the software itself tracks people instead.

    The EHR would be the one that cares about tracking the user across what they're doing with patient records.

    Local IT can suck a dick if they care about which user is using the system and doing malicious stuff with it. Make it so they have no permissions except software, and deal with it because you're not going to do much better, Mister IT man.

    We have several different applications with different kinds of access to different information, EHR, radiology, reports. Fortunately, by now we've almost entirely moved away from real generic logins and have rolled out Imprivata OneSign to most of our workstations. A lot of them still have a generic account underneath, but the OneSign application logs the actual user in on top of that an authenticates with their AD for most things.
    Also we are local IT.

    steam_sig.png
  • Options
    TofystedethTofystedeth Registered User regular
    And now it is time for me to gripe about a minor annoyance in Visual Studio 2013
    if you're working in the XAML and you open a tag like
    <label>
    when you put the closing > on it, it automatically puts in the </label>
    Excellent!
    If you then decide you don't like labels, change one of those to say, a TextBox, it will automatically change the matching tag as well.
    How clever!

    If you have a self closing tag, like <label/> that you put in, or from dragging a control from the toolbox into the XAML, if you decide to split that into an open/close pair, by closing the tag. It will automatically insert the closing tag!
    And leave behind the /> and cause the design view to freak out and yell at you about invalid markup.

    steam_sig.png
  • Options
    admanbadmanb unionize your workplace Seattle, WARegistered User regular
    Fantastic!

  • Options
    bowenbowen How you doin'? Registered User regular
    The best is when you remove a function and it bitches about the designer not knowing where the function is.

    I wish I could say "if the function disappears, remove it from the designer, stop bugging me"

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • Options
    MNC DoverMNC Dover Full-time Voice Actor Kirkland, WARegistered User regular
    The wife is working on her Master's Degree by taking online courses. Last night, she spend almost 2 hours working on a problem in the Computer Vision class she's taking. She kept modifying code, running the results, and going online to figure out where she's going wrong.

    After all that time and research, she found that her core problem was coming from the lesson video and example itself. That was the most painful thing I've seen her handle after basically rolling through all her previous homework stuff. But it was interesting to watch her mind at work. She'd sit there and stare at lines and lines of code, change one value and something very different would happen.

    I'm clearly not a programmer, but that looked like sorcery to me. Crazy.

    Need a voice actor? Hire me at bengrayVO.com
    Legends of Runeterra: MNCdover #moc
    Switch ID: MNC Dover SW-1154-3107-1051
    Steam ID
    Twitch Page
  • Options
    bowenbowen How you doin'? Registered User regular
    A lot of what we do is basically magic, yeah.

    It's the worst when instruction/lessons are wrong because you rely so much on them being right.

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • Options
    HounHoun Registered User regular
    Arcane phrases and words of power that seem unintelligible when uttered? Check.
    Requires years of intensive study and practice to perfect? Check.
    Routinely called upon to make the impossible happen? Check.

    Programming is Sorcery Confirmed.

  • Options
    RendRend Registered User regular
    Houn wrote: »
    Arcane phrases and words of power that seem unintelligible when uttered? Check.
    Requires years of intensive study and practice to perfect? Check.
    Routinely called upon to make the impossible happen? Check.

    Programming is Sorcery Confirmed.

    You forgot the most important:

    Attempting to use powers beyond your comprehension can have catastrophic consequences.

  • Options
    TofystedethTofystedeth Registered User regular
    Leads to wild-eyed, bearded men muttering to themselves? check.
    Programming is gold prospecting sorcery reconfirmed.

    steam_sig.png
  • Options
    SpawnbrokerSpawnbroker Registered User regular
    I've told my girlfriend that the reason programming interests me is it's the closest I'll ever come to being a wizard.

    Also, I'm lazy as fuck and I try to get computers to do things for me so I don't have to do them.

    Steam: Spawnbroker
  • Options
    TofystedethTofystedeth Registered User regular
    As I told my wife the other day, Programmers hate dealing with dates and times. That's why we invented computers.

    steam_sig.png
  • Options
    RendRend Registered User regular
    As I told my wife the other day, Programmers hate dealing with dates and times. That's why we invented computers.

    Yeah we kind of screwed the pooch on that one.

  • Options
    bowenbowen How you doin'? Registered User regular
    Honestly just counting seconds/milliseconds from a certain arbitrary point seems like the best way to do it.

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • Options
    GhotiGhoti Registered User regular
    Houn wrote: »
    Arcane phrases and words of power that seem unintelligible when uttered? Check.
    Requires years of intensive study and practice to perfect? Check.
    Routinely called upon to make the impossible happen? Check.

    Programming is Sorcery Confirmed.

    Why do you think it is called source code?

  • Options
    HounHoun Registered User regular
    Ghoti wrote: »
    Houn wrote: »
    Arcane phrases and words of power that seem unintelligible when uttered? Check.
    Requires years of intensive study and practice to perfect? Check.
    Routinely called upon to make the impossible happen? Check.

    Programming is Sorcery Confirmed.

    Why do you think it is called source code?

    I figured it was named after some guy named Source.

  • Options
    GnomeTankGnomeTank What the what? Portland, OregonRegistered User regular
    bowen wrote: »
    A lot of what we do is basically magic, yeah.

    It's the worst when instruction/lessons are wrong because you rely so much on them being right.

    To non-programmers, no matter how smart, what we do is black sorcery, with goat sacrifice and possibly wild pagan orgies involved.

    Sagroth wrote: »
    Oh c'mon FyreWulff, no one's gonna pay to visit Uranus.
    Steam: Brainling, XBL / PSN: GnomeTank, NintendoID: Brainling, FF14: Zillius Rosh SFV: Brainling
  • Options
    iTunesIsEviliTunesIsEvil Cornfield? Cornfield.Registered User regular
    edited February 2015
    Man, I know dealing with storing and calculating dates and times and spans of time get a little (read: really) painful, but this guy is kinda going a little too far down that rabbit-hole, methinks.
    Deprecate DateTime.Now
    I would like to propose that DateTime.Now be deprecated. This is most developer's first introduction to working with time, and is also a root cause of bugs related to daylight saving time and time zones.

    Developers should get in the habit of thinking globally, rather than locally - especially when designing for the web. Even on desktop and mobile applications that only run in a single time zone, this can create the kind of bugs that pull developers out of bed at 2AM on the morning of a daylight saving time transition.

    More supporting arguments:
    The Case Against DateTime.Now - Matt Johnson (me)
    What's Wrong with DateTime Anyway - Jon Skeet

    Given the widespread nature of this API, I suggest not removing it from coreclr - but rather marking it with an [Obsolete] attribute. I can send a PR if the suggestion is approved.

    On one hand, ok. I get what you're saying. On the other hand, bwahahahahahahahahahahahaha.

    iTunesIsEvil on
  • Options
    GnomeTankGnomeTank What the what? Portland, OregonRegistered User regular
    edited February 2015
    What's wrong with DateTime and DateTime.Now is not DateTime or DateTime.Now, it's programmers, and worse business people, who don't understand the complexities of dates and times. You don't deprecate API's because programmers might do dumb things with them, that's silly. There are valid cases where DateTime.Now makes sense, even if you should GENERALLY be using DateTime.UtcNow.

    And really, you should generally be using DateTimeOffset these days, unless you have a reason not to.

    GnomeTank on
    Sagroth wrote: »
    Oh c'mon FyreWulff, no one's gonna pay to visit Uranus.
    Steam: Brainling, XBL / PSN: GnomeTank, NintendoID: Brainling, FF14: Zillius Rosh SFV: Brainling
  • Options
    PhyphorPhyphor Building Planet Busters Tasting FruitRegistered User regular
    They should have just made it give only UTC by default and then add a timezone conversion as a separate step - the people who are doing stuff TZ agnostic will always get correct results, those who actually need a local time will have to do an extra step to get it, which hopefully will make them think a bit

  • Options
    bowenbowen How you doin'? Registered User regular
    If DateTime.Now doesn't work for you, perhaps you should not use DateTime.Now.

    For many people it's just fine (people that don't deal time sensitive material).

    Even in the medical industry it's not really an issue so much. As long as you're "close enough". 5-8 hours doesn't really break things. Especially if you can explain it away "oh must be a timezone issue."

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • Options
    GnomeTankGnomeTank What the what? Portland, OregonRegistered User regular
    I'm a huge stickler on UTC times, and loudly making fun of people who incorrectly use local times...but removing DateTime.Now is the silly nuclear option.

    Sagroth wrote: »
    Oh c'mon FyreWulff, no one's gonna pay to visit Uranus.
    Steam: Brainling, XBL / PSN: GnomeTank, NintendoID: Brainling, FF14: Zillius Rosh SFV: Brainling
  • Options
    bowenbowen How you doin'? Registered User regular
    To me the better option is just making another step to get local time, so it highlights what you're doing and abstracts it away from "how we measure time in the computer world".

    But like I said, for those of us that need UTC, we use UTC. For those that just need to get a rough idea, DateTime.Now seems hunky dorry.

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
Sign In or Register to comment.