Looks like we're either going to induce or break her water and go from there. As long as no one rebases we should be good! I'll post more in the days to come.
As with any programming problem, try to break it up.
You're asked to find the number of days difference between two dates, so first of all, try calculating the number of days from 0 that a given date has.
Breaking that up, you would calculate all the days for previous years, then add all the days for previous months, then the days for the current month
The wife asked me to write out how I'd to it in a real-world scenario before creating any code. After doing so, I'm then supposed to transpose that into code.
I know that I'll need to create a leapYearCheck procedure, which I did like so:
def leapYearCheck(year1):
if year1 == 0:
return False
if year1 % 4 == 0:
if year1 % 100 == 0:
if year1 % 400 == 0:
return True
else:
return False
return True
return False
Now I've got a True/False check ready for the procedure calculating days. So I'm trying to wrap my head around making an efficient way to store the days in each month. My first thought was creating 12 variables, one for each month, and assigning them the proper day count. This is messy and a nightmare.
Looking at your code, I can see that there's an easier way of getting the answer with lists and for loops, but I don't know how they work yet and I'm trying to solve this without using stuff that hasn't been introduced yet.
Ahhh! The cascades! Whyy?!
def leapYearCheck(year):
return year % 4 == 0 and not (year % 100 == 0 and year % 400 != 0)
Also, changed the parameter to year, cuz there's only 1 :P
As with any programming problem, try to break it up.
You're asked to find the number of days difference between two dates, so first of all, try calculating the number of days from 0 that a given date has.
Breaking that up, you would calculate all the days for previous years, then add all the days for previous months, then the days for the current month
The wife asked me to write out how I'd to it in a real-world scenario before creating any code. After doing so, I'm then supposed to transpose that into code.
I know that I'll need to create a leapYearCheck procedure, which I did like so:
def leapYearCheck(year1):
if year1 == 0:
return False
if year1 % 4 == 0:
if year1 % 100 == 0:
if year1 % 400 == 0:
return True
else:
return False
return True
return False
Now I've got a True/False check ready for the procedure calculating days. So I'm trying to wrap my head around making an efficient way to store the days in each month. My first thought was creating 12 variables, one for each month, and assigning them the proper day count. This is messy and a nightmare.
Looking at your code, I can see that there's an easier way of getting the answer with lists and for loops, but I don't know how they work yet and I'm trying to solve this without using stuff that hasn't been introduced yet.
Ahhh! The cascades! Whyy?!
def leapYearCheck(year):
return year % 4 == 0 and not (year % 100 == 0 and year % 400 != 0)
Also, changed the parameter to year, cuz there's only 1 :P
I'm cascading because I didn't know about this "and not" thingy.
This is probably the most challenging part of asking established coders for help; you're all so hardwired to certain aspects you forget that I gotta learn the inefficient and ugly code first so I can handle the better stuff later on.
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
So, in this web app, I'm using jQuery's animate(scrollTop); to push the user to various places on the page based off events. We have some long lists that slide open to show details you can edit. If you edit one, it refreshes the list, scrolls to that item and reopens it to give a consistent experience. Works great. On other areas, if you submit a form, it pops up a success or error message at the top of the page, and then scrolls to it.
if (data.success) {
jQuery('#loading').hide();
jQuery("#listBlock").empty();
var scrollToMe = jQuery('#main');
jQuery('html,body').animate({scrollTop: scrollToMe.offset().top-50}, 'fast');
jQuery("messageBlock").empty();
jQuery("#messageBlock").append("<div class='successMessage'><div class='message'>Your " +
"evaluation has been submitted. You will now be redirect back to your home page.</div></div>");
setTimeout(function() {
window.location.href = "../";
}, 1000);
} else {
jQuery('#loading').hide();
var scrollToMe = jQuery('#main');
jQuery('html,body').animate({scrollTop: scrollToMe.offset().top-50}, 'fast');
jQuery("#messageBlock").empty();
jQuery("#messageBlock").append("<div class='errorMessage'><div class='message'>" + data.errormessage + "</div></div>");
}
On success it scrolls fine. On Error, nothing happens. Except in IE, because of course in this one case IE would be working properly. I am using the animate thing in literally dozens of other places in this app, and it works fine in all of them. What the hell is going wrong on this page?
So another Oracle DB question.
I'm working on a report in our WebIntelligence environment involving BMI percentile. In current code version of our EHR the BMI percentile is supposed to be stored in the database instead of just calculated on the fly, but while I can find the clinical event code corresponding to it, I can't actually find any instances of it, so I'm guessing ours hasn't been configured that way. Because it's pediatric BMI the percentile varies widely depending on sex and age, so there's not a hard and fast rule. I did find a couple of tables from the CDC that I can use to look it up, but not really sure how to embed it it in my query. We don't have any direct control over the database and can't make any permanent tables, so I'm guessing I need to do some kind of Select Into temp table thing, but I'm pretty new to actually using SQL and haven't done much along those lines. It's like, 200ish rows because the age is represented in months.
edit: Looks like this
Age (in months) | 95th Percentile BMI Value (Females) | 95th Percentile BMI Value (Males)
24 19.10624 19.33801
24.5 19.05824 19.2789
25.5 18.96595 19.16466
We have so many things going on. I know we hit one of our Meaningful Use deadlines a month or so ago because I was one of the people doing a bunch of lookups of things with screenshots to show that we could pull X information if we wanted to.
There's also this Accountable Care Organization thing that I'm supposed to start working on in April that I haven't been told much about other that I'm going to be the guy for it. I've got like, a full week of meetings 2nd week in April to find out what the heck I'm supposed to be doing.
So our backlog is pretty thin right now, which means I can basically pick up whatever I want.
Our next bit of work will be for support of a "new" filesystem.
Any ideas on where I can start with that? I've read through the spec, but a better (and more practical) understanding would help a bunch I think.
Bonus points if I can work on my C++ at the same time.
EX: I've started looking into B+Trees, since I know the filesystem (and others) uses them, but is there a better approach?
So our backlog is pretty thin right now, which means I can basically pick up whatever I want.
Our next bit of work will be for support of a "new" filesystem.
Any ideas on where I can start with that? I've read through the spec, but a better (and more practical) understanding would help a bunch I think.
Bonus points if I can work on my C++ at the same time.
EX: I've started looking into B+Trees, since I know the filesystem (and others) uses them, but is there a better approach?
Are we talking about like an actual system file system or something that your program can use internally for file storage?
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
Basically, we will be working on expanding support to include a filesystem we do not currently support.
Hmm. I might need to take a step back here and look into how we deal with other filesystems first.
I don't really know too much about filesystems yet, unfortunately
Posts
Alright thread, you heard the man.
No one rebase their projects in the mean time.
If your boss asks you why, redirect them to me.
Ahhh! The cascades! Whyy?!
Also, changed the parameter to year, cuz there's only 1 :P
I'm cascading because I didn't know about this "and not" thingy.
This is probably the most challenging part of asking established coders for help; you're all so hardwired to certain aspects you forget that I gotta learn the inefficient and ugly code first so I can handle the better stuff later on.
Legends of Runeterra: MNCdover #moc
Switch ID: MNC Dover SW-1154-3107-1051
Steam ID
Twitch Page
I think... I may have muttered that I wanted to stab something out loud at work.
People are giving me odd glances now, and asking if I'm stable.
I'M OKAY.
Yes my child, let the stab flow through you.
That sounds unsafe.
A long flight combined with very little sleep. If you are in the area/gtc shoot me a PM and we can try to meet up.
So, in this web app, I'm using jQuery's animate(scrollTop); to push the user to various places on the page based off events. We have some long lists that slide open to show details you can edit. If you edit one, it refreshes the list, scrolls to that item and reopens it to give a consistent experience. Works great. On other areas, if you submit a form, it pops up a success or error message at the top of the page, and then scrolls to it.
On success it scrolls fine. On Error, nothing happens. Except in IE, because of course in this one case IE would be working properly. I am using the animate thing in literally dozens of other places in this app, and it works fine in all of them. What the hell is going wrong on this page?
I am going to stab some fruit
A dev just tried to get my approval to cast away const and modify the memory passed in via const pointer.
Changed your pointer, wasn't declared const.
YOU HAVE TURNED ME EMO
You glorious bastard
Look I could just make the members mutable instead if you want!
I don't think the other dev knows that keyword, thank god.
Sysadmin's gonna find that you post here. Then men in white suits..
bwaaAhHAhahahahahahaAHHHAahahahasssssszaaaha
stay calm leaving this place stay calm staycalm stalm missing letters are yca or cya if rearranged yes ciao cya later alligator in a while crocodile
But yeah, any of the rest of y'all ever find yourselves in San Jose, let me know.
No. I believe the proper thing to do here is declare all the pointers as const pointers to volatile variables. Then you get the best of both worlds.
I'm working on a report in our WebIntelligence environment involving BMI percentile. In current code version of our EHR the BMI percentile is supposed to be stored in the database instead of just calculated on the fly, but while I can find the clinical event code corresponding to it, I can't actually find any instances of it, so I'm guessing ours hasn't been configured that way. Because it's pediatric BMI the percentile varies widely depending on sex and age, so there's not a hard and fast rule. I did find a couple of tables from the CDC that I can use to look it up, but not really sure how to embed it it in my query. We don't have any direct control over the database and can't make any permanent tables, so I'm guessing I need to do some kind of Select Into temp table thing, but I'm pretty new to actually using SQL and haven't done much along those lines. It's like, 200ish rows because the age is represented in months.
edit: Looks like this
The worst part of healthcare EHRs.
I had a great time, and I fully endorse @ASimPerson. Luckily my co-presenter is feeling better so everything should go well.
Every part is the worst part.
... I'll allow it.
You guys doing certification too?
There's also this Accountable Care Organization thing that I'm supposed to start working on in April that I haven't been told much about other that I'm going to be the guy for it. I've got like, a full week of meetings 2nd week in April to find out what the heck I'm supposed to be doing.
Our next bit of work will be for support of a "new" filesystem.
Any ideas on where I can start with that? I've read through the spec, but a better (and more practical) understanding would help a bunch I think.
Bonus points if I can work on my C++ at the same time.
EX: I've started looking into B+Trees, since I know the filesystem (and others) uses them, but is there a better approach?
Are we talking about like an actual system file system or something that your program can use internally for file storage?
And yes, an actual filesystem.
Basically, we will be working on expanding support to include a filesystem we do not currently support.
Hmm. I might need to take a step back here and look into how we deal with other filesystems first.
I don't really know too much about filesystems yet, unfortunately
That might get you started at the least.
This is something you set a team of 5+ up for a few years to accomplish too.