|
Jewel had it right in the first place... but the real issue is that the code I had written had flaws in it that used anything other than the constructor I had supplied anyway. Once I fixed that (and wrote the rest of the program) it was all good. I'm not saying it was the best way to do it, but the way I did it was create a 52-item array and then fill it with the respective numbers in a random order, so that as I iterated through the creation of each object in a routine matter they would be given a random place in the deck. It is definitely not the best implementation but it was an assignment for a class, so it wasn't really in my interests to spend an inordinate amount of time on it, or look up features of the language that we hadn't discussed yet. Regardless I learned alot from all the stuff you guys had to say, so thanks! bomblol fucked around with this message at 08:36 on Dec 15, 2012 |
# ? Dec 15, 2012 08:31 |
|
|
# ? May 29, 2024 20:54 |
|
I'm of the opinion that if you're just learning enough C++ to get your homework assignment done then going into any serious theoretical depth about why the hell it behaves the way it does is probably not worth the time you'd have to put in. Not worthless, just not cost-effective.
|
# ? Dec 15, 2012 11:42 |
|
I don't even know if this is the appropriate place to ask this but does anyone know of a simple emailing script with actually allows SMTP authentication and SSL connections and such? I have one now that I use for alerts for certain triggers in Task Scheduler, but it only takes the host address of the SMTP server and nothing else, rendering it effectively useless for 99% of email servers. Any help would be appreciated.
|
# ? Dec 17, 2012 22:11 |
|
Gozinbulx posted:I don't even know if this is the appropriate place to ask this but does anyone know of a simple emailing script with actually allows SMTP authentication and SSL connections and such? mailx looks fairly complicated, but it supports SMTP over SSL, SMTP with STARTTLS, and LOGIN, PLAIN, and CRAM-MD5 authentication. You should be able to use that to connect to the SMTP server and then pipe the actual mail contents through it, I think.
|
# ? Dec 17, 2012 22:34 |
|
That looks promising. Only problem is, I'm using a windows machines. I know I know.. Thank you anyways though, I'll see where this leads me.
|
# ? Dec 17, 2012 22:54 |
|
Gozinbulx posted:That looks promising. If you can use Cygwin, it doesn't come with mailx, but it does come with email, msmtp and ssmtp, which look like they also do what you need. Depending on how scary mailx's dependencies are, you might also be able to build a windows native version of it (or one of the other programs mentioned above) using mingw. I've heard reference to blat as a mailx replacement for windows, but I don't know if it supports the SSL and AUTH features you need.
|
# ? Dec 17, 2012 23:26 |
|
I did end up finding Blat. It has AUTH (login and pw) features but not SSL. So close! I'll see about what you said though. Thanks for all the help guys.
|
# ? Dec 18, 2012 20:15 |
|
I'm trying to setup this thing for my company where a user logs in from a third party site, and through an iframe on our site load this user's information. Trying to figure out the best way to approach this. The idea I see is to give them an "API key", and then have them call a route on our site that return a unique key based off some of the user's credentials. Then append it onto the url in the iframe and we verify on our end if the key matches up. Is there a better way or is this typically the general way people have been display unique data to a third-party? Someone at my company suggested using OAuth but that doesn't seem like the way to go... Can you bypass asking the user for permission in an OAuth flow?
|
# ? Dec 19, 2012 00:59 |
|
Strong Sauce posted:I'm trying to setup this thing for my company where a user logs in from a third party site, and through an iframe on our site load this user's information. Depends on the form of OAuth? It's not super well-specified. OAuth might not be that bad.
|
# ? Dec 19, 2012 01:07 |
As far as I remember, OAuth doesn't specify what the service provider (site whose data you, the consumer, want to access on the user's behalf) should present of UI, or if it should even present one at all. Basically you do a sideband request to the service provider, get a temporary key back, redirect the user's browser to an URL on the service provider's site, and the service provider then sends the user back to your site with a full token. Most service providers then want to give the user a chance to sign in or otherwise confirm access when they are transferred there. (One example: Instagram's OAuth 2.0 implementation will return a token to you immediately if the user is already signed in and has approved your application once, while Twitter's OAuth 1.0 implementation will always ask for confirmation, even for applications the user has already approved once.)
|
|
# ? Dec 19, 2012 01:14 |
|
Well basically there can be zero interaction between us and the user for the third-party. The user has no actual access to our site, we just have data that the third-party stored on our site that they want to show the user. So I think in this case we would be the service provider, while the third-party "consumes" our tokens to get access to their data (and the user's) from our site. They'd also have to pass over data like the user's login name to us so we can associate the data. I think the flow would be, they sign onto the third party's site, they would do the oauth handshake with us in the background, then they'd pass the token through to the iframe src, then once we get that we just do a lookup and display the proper data.
|
# ? Dec 19, 2012 05:06 |
|
So does the data on your site belong to the user, or to the other service? Does the user have a login to sign in to your site, or do they just log in to the other service and the other service automatically has access? Is your site essentially acting like a glorified database?
|
# ? Dec 19, 2012 05:56 |
|
Real stupid personal project/teaching myself database stuff question. The goal is to write a program that handles class grading. There will be two simple DB's, a Student DB with a record linking a student's names to an internal ID# and Assignment DB with individual records (?) for a singluar assignment linked to some student. The question: should I keep track of a student's grade in the Student DB? I'm leaning towards no, if a user asks for a students grade, just compute it at run time. I say this because it means that any function that plays with the Assignment DB must either: a) be "safe" (not cause changes that would change the stored grade) or b) check to see if a student's or all students' grades have been affected. Also, it means that the DB should be protected and only accessed via my program (or, at least, ones that can be trusted), because if they change the Assignment DB, the Student DB wouldn't be updated. Am I looking at this from the wrong angle though? Which would be the "standard" approach to this situation?
|
# ? Dec 20, 2012 00:25 |
|
In general the only time you should store something you can calculate is if calculating it is too slow.
|
# ? Dec 20, 2012 00:49 |
|
And if you're unsure, err on the side of assuming that it won't be too slow.
|
# ? Dec 20, 2012 02:58 |
|
jetbrains has a 75% off sale for the next 24 hours: http://www.jetbrains.com/specials/index.jsp
|
# ? Dec 20, 2012 12:57 |
|
Deus Rex posted:jetbrains has a 75% off sale for the next 24 hours: http://www.jetbrains.com/specials/index.jsp And given how slow their web server is right now I might need 24 hours to buy anything.
|
# ? Dec 20, 2012 13:22 |
|
Plorkyeran posted:In general the only time you should store something you can calculate is if calculating it is too slow. GrumpyDoctor posted:And if you're unsure, err on the side of assuming that it won't be too slow. So I normally go "memory is cheap, store anything you may reference again," assuming that access is always faster than recalculating. This probably holds true more for run-time usage then data storage, but I understand y'all's logic and get that speed is not always a top tier priority (and even if it is...). Thanks for clearing that up for me.
|
# ? Dec 20, 2012 15:23 |
|
akadajet posted:And given how slow their web server is right now I might need 24 hours to buy anything. Yeah, really. I'm getting This webpage has a redirect loop, Error 310 (net::ERR_TOO_MANY_REDIRECTS).
|
# ? Dec 20, 2012 15:36 |
|
epalm posted:Yeah, really. I'm getting This webpage has a redirect loop, Error 310 (net::ERR_TOO_MANY_REDIRECTS). Some static analysis tools should be able to help clear that up.
|
# ? Dec 20, 2012 15:45 |
|
BirdOfPlay posted:So I normally go "memory is cheap, store anything you may reference again," assuming that access is always faster than recalculating. This probably holds true more for run-time usage then data storage, but I understand y'all's logic and get that speed is not always a top tier priority (and even if it is...). That's not necessarily true. Cache misses cost a lot more than recalculating, and you can screw the cache if you don't manage it properly.
|
# ? Dec 20, 2012 15:51 |
|
BirdOfPlay posted:So I normally go "memory is cheap, store anything you may reference again," assuming that access is always faster than recalculating. This probably holds true more for run-time usage then data storage, but I understand y'all's logic and get that speed is not always a top tier priority (and even if it is...). Be careful about what you are calculating and what you are storing. An example I could think of is a report card. It would be pretty easy to not store report cards in the database and just rebuild them on the fly. However, a report card is immutable but grades can change that require a new report card. Like if a student is out sick for an extended period of time around report cards but makes up the work later. That student probably failed the first time but passed the second time. Do you want to be able to pull both report cards or just the last report card the assignments table reflects?
|
# ? Dec 20, 2012 16:48 |
|
Deus Rex posted:jetbrains has a 75% off sale for the next 24 hours: http://www.jetbrains.com/specials/index.jsp Thanks for the heads up. I was able to get my order in but due to their site being broken most the morning, I am now worried that my order didn't really take and there's no way to check on the status of an order. The only thing I was told is that it could take up to 12 hours for the order to take place. I'm afraid that in 12 hours I'll find out that my transaction was cancelled and I missed out on the sale. They're using element5 for transactions and it looks like that site is/was also experiencing traffic overload so it might be best just to hold off until this afternoon if anyone else is thinking about jumping on the deal. Unperson_47 fucked around with this message at 18:31 on Dec 20, 2012 |
# ? Dec 20, 2012 18:22 |
|
They're dead, best to wait for a while.
|
# ? Dec 20, 2012 18:43 |
|
I really want to give jetbrains my money for some youtrack licenses so this is sad.
|
# ? Dec 20, 2012 20:55 |
|
I just tried a couple time and was able to order PyCharm. Except, now that I completed my order, I haven't got an email from them with license information.
|
# ? Dec 20, 2012 21:24 |
|
I was able to get as far as the checkout button and then got a blank page. So I don't really know if it worked.
|
# ? Dec 20, 2012 22:02 |
|
In Objective-C, what is faster: A NSString comparison or an NSMutableArray count? I'm guessing the count.
|
# ? Dec 20, 2012 22:04 |
|
Thermopyle posted:I just tried a couple time and was able to order PyCharm. Order page mentions that it can take up to 12 hours to process. I'm guessing they're going to be taking a long time today. If in doubt, phone them.
|
# ? Dec 20, 2012 22:29 |
|
Jerry SanDisky posted:Order page mentions that it can take up to 12 hours to process. I'm guessing they're going to be taking a long time today. If in doubt, phone them. I just dropped in here to mention this sale, but I see you already know of it. It is up now, or at least it was 20 minutes or so ago. I was able to purchase IntelliJ. EDIT: I also didn't get an email with license info yet though. Dietrich posted:I really want to give jetbrains my money for some youtrack licenses so this is sad. It is only for personal licenses to the IDE apps, I don't think YouTrack is included.
|
# ? Dec 20, 2012 22:35 |
|
LP0 ON FIRE posted:In Objective-C, what is faster: A NSString comparison or an NSMutableArray count? I'm guessing the count. Yes. Modulo some internal abstraction penalties, the count is just a load from a field, whereas the comparison is, well, a string comparison, i.e. a loop over two arrays. And the abstraction penalties should be higher for NSString than NSMutableArray for various reasons that are hard to explain.
|
# ? Dec 20, 2012 22:57 |
|
rjmccall posted:Yes. Modulo some internal abstraction penalties, the count is just a load from a field, whereas the comparison is, well, a string comparison, i.e. a loop over two arrays. And the abstraction penalties should be higher for NSString than NSMutableArray for various reasons that are hard to explain. Thanks. The array is very small, but I'm not sure if that makes it grab the count any faster than if it was larger. Probably not since you just said it's just a load from a field.
|
# ? Dec 20, 2012 23:03 |
|
Thermopyle posted:I just tried a couple time and was able to order PyCharm. I haven't either, nor have they billed my card. I have a reference number though so hopefully even if the transaction was cancelled I'll be able to cajole them into giving me a copy of pycharm for $25
|
# ? Dec 21, 2012 02:41 |
|
rjmccall posted:And the abstraction penalties should be higher for NSString than NSMutableArray for various reasons that are hard to explain. I'd love to hear you try explaining this anyway. Though maybe in the Mac/iOS thread.
|
# ? Dec 21, 2012 10:05 |
|
I ordered IntelliJ about 2 hours ago and just got my license info.
|
# ? Dec 21, 2012 12:17 |
|
Deus Rex posted:I ordered IntelliJ about 2 hours ago and just got my license info. Did others get their license info? I still haven't gotten mine and my card doesn't appear to have been charged.
|
# ? Dec 21, 2012 15:27 |
|
armorer posted:Did others get their license info? I still haven't gotten mine and my card doesn't appear to have been charged. Nope - only have confirmation emails from their payment processor who hasn't taken my money yet :\
|
# ? Dec 21, 2012 16:06 |
|
Munkeymon posted:Nope - only have confirmation emails from their payment processor who hasn't taken my money yet :\ I don't even have that much, although I saved the confirmation number that came up in broweser after I bought it. I will wait it out - they were slammed yesterday. I suppose I can use the free trial in the meantime.
|
# ? Dec 21, 2012 16:11 |
|
Munkeymon posted:Nope - only have confirmation emails from their payment processor who hasn't taken my money yet :\ Same.
|
# ? Dec 21, 2012 17:21 |
|
|
# ? May 29, 2024 20:54 |
|
edit: Oops, wrong thread.
Thermopyle fucked around with this message at 22:15 on Dec 21, 2012 |
# ? Dec 21, 2012 17:32 |