This is my first attempt at writing a template class. I am implementing Andrew's Monotone Chain algorithm, as described here to calculate a 2D Convex Hull. Since this is my first try at templates, I would like a review of my code to make sure I get started on the right track.
ConvexHull2d.h
// ...
So for the boat thing you just need to comment on one of the posts of the mod? However I've checked a few of his recent posts and none of them seems to have random comments :/
How to get the Batman hat: 1. see a question without included code, but a link 2. watch it get closed (but don't cv) 3. watch op edit the code into the question 4. as the reopen votes roll in, edit the post yourself 5. ... 6. profit?
I saw a post in chat a few days ago, of what I thought was an interesting (albeit fairly simple) statistical challenge:
By @skiwi:
If I shoot once with 50% chance of target A and 50% of target B, and if I hit target A I have 95% chance to shoot again, then how many of target A will I hit on ...
I have just started trying to learn Haskell and tried to think of a practical, but simple problem to try and solve. I have a strong background in C, but am just beginning to dip my toes in the world of functional programming.
The idea came from my investing in notes on Prosper: given a list of...
Since I wrote this post, I have learned a great many things, including that R# is very helpful when learning better programming skills.
My naming is off. I should name my method parameters using camelCase, so BuffSize will become buffSize, etc. This will help the readability of the code becau...
I wrote a Connect Four game including a AI in Clojure and since I'm rather new to Clojure, some review would be highly appreciated. It can include everything, coding style, simplifications, etc.
But keep in mind the AI is not finished yet, other heuristics will be added in the near future. Curren...
I just recently started working on python (interesting language, actually), and, as I always do when I learn a new language (with the exception of BrainFuck, that's too hard), I write a FizzBuzz program.
I notice there is no error-checking, so my program would have problems with incorrect input,...
@Jarod42 I have not since I did not know that such things existed. After a quick google search I think that this is a great tool that I really need to learn as I get into working with more complex algorithms (this is the first time I have ever had a time complexity issue that wasn't rather obvious just through code review). Do you have a specific c++ profiler in mind (ubuntu friendly por favor) that you would recommend? — bstadt51 secs ago
I just posted an answer to an unanswered SQL question, and rolfl always finds something that I didn't know and teaches me something, so I must post an obligatory pimp link
The purpose of this code is to search the entire database for duplicate records and produce a script that a user could then run to delete all of the duplicates.
The stored procedure takes the following parameters:
@DiscludeTables varchar(max): a string of Table Names separated by semicolons....
I know hats are not enabled in the Android app, but is there a way to receive notifications when you have earned one? Similar to when you get a comment or other notification, just for hats, or has the app been left entirely normal this year?
@Quill-HATMANIAC you can chat with your recipient by private chat. So you need to wait until the person asks you. If they don't, it's because they're planning on giving something that doesn't need your address! :)
@Malachi - your points about case-consistency are good, your indentation suggestions are meh, the recommendation for the left join instead of the not-in is suspect, and the switch of the comments from select/delete, is meh.
I consider it to be a somewhat "fluff" review - did not hit any of the meat on the question.
fluff is better than nothing on a post that is already coming for my brains, right?
there is a lot of selecting going on to split that string, I have a thought on that as well, I think I may add it as an opposing answer.... thinking
@Phrancis if I changed that list of Tables to a comma delimited string instead of delimited by Semi-colons, could I put that directly into the NOT IN statement as a variable?
I guess I could have pointed that at @rolfl as well
here is my code, and I'm unsure if it's a logic error or prograaming error.
My math isn't coming out right. It's supposed to prompt for 5 scores and then it outputs the results in decimal and in letter grade(lblGrade)
Option Strict On
Public Class frmGradeBook
Dim intGrades...
@Malachi You could, if you did dynamic SQL string. Otherwise, you'll have to parse it kinda like they are doing
My thought if I had to do something like that would be to take a string, and make just one dynamic SQL statement against sys.objects, or the sys.tables & sys.columns views, and from there maybe make a cursor
Have you considered a simple case, @Malachi ? When has a not-in ever been substitutable with a left-join?
Two simple tables, integers. The first table has "Nums", the values 1 through 10. The second table, called "evens", has the values 2, 4, 6, 8, 10. Now, how can you rewrite: select * from Nums where value not in (select value from Evens)
Meme: Monking
Originator: Morwenn
Cultural Height: The 2nd Monitor
Background: A morning greeting to the Monkey doing his monkey-business, in other words: monking
Examples: A small chat search
Variations: Monkernoon, Monkevening, Monknight, ... Important is only that it begins with Monk... ;...
I removed my remarks about the left join. it seems I have a twisted idea of what a Left Join is and need to do some hard learning to unlearn the bad information in my head, thank you @rolfl
Meme: Monking
Originator: Morwenn
Cultural Height: The 2nd Monitor
Background: A morning greeting to the Monkey doing his monkey-business, in other words: monking
Examples: A small chat search
Variations: Monkernoon, Monkevening, Monknight, ... Important is only that it begins with Monk... ;...
@NᴏᴠɪᴄᴇIɴDɪsɢᴜɪsᴇ here is a link to a little Browser script that some of us use to remember the memes --> github.com/ismael-miguel/memer or at least some of them
I don't have enough time right now to flesh out a solution, but this is how I would tackle it.
"function1" determine the possible combinations for a row or column given the constraints of the numbers on the top or side, and the squares that are already filled out and those that have been emptied...
like I get it, but, the actual processes, I'm not familiar with
You should post some more code, might be a better overall way to do what you want, this sounds like something might benefit from some design tweaks. Or post on StackExchange -CodeReview. — Ryios8 secs ago
When you need to only optimize code (but no problems in the current code), then consider to post the question in codereview.stackexchange.com. — Tareq Mahmood51 secs ago
I wrote a Java class to make a GIF animation from a list of images. The whole project can be found here.
I am pretty new with GitHub, so I would be very glad if you can give critiques regarding my project structure.
package shine.htetaung.giffer;
import java.awt.image.BufferedImage;
import jav...
Do you all like my mustache?
Can someone make a mustache tag for me please? Winter bash just is not complete without one in my opinion.
Would make 2015 complete for me.
@Phrancis - I am in the process of re-tooling myself. I personally don't believe there's a very interesting future in that sort of technology. Sure, there will always be a need for DBAs as long as people have their own databases, but, that market is shrinking, and cloud is growing.
Stack Overflow is for specific programming questions. "How do I make this program better" is not specific. There is a site for code review, but don't expect them to code any new features for you. — Colonel Thirty Two16 secs ago
Is this a proper way to cache side effects (occurring on job.tryLoad)?
case class DFStorage(private var cache: Map[String, DataFrame] = Map()) {
def tryLoad(job: Job): Kleisli[IO, MakeContext, \/[List[String], Unit]] = {
if(!cache.contains(job.id)) {
job.tryLoad.map(_.map(df => add(j...
The people who do "database as a service" have all pretty much abandoned SQL. It does not scale, and it's too hard to configure differently for everyone. The odd "customer" will install their on copy of a database to shoe-horn an old process "into the cloud", but, the industry is moving away from that as a solution.
If you want to work for a bank, insurer, retailer, etc. then there will always be a database position or 10, going.... but that will essentially keep you out of the cloud "forever".
@rolfl I would have thought that the "cloud" would not be very secure for industries that have very stringent constraints especially in compliance with government, like HIPAA or credit card processing businesses and such
I know a number of large companies, with very serious security concerns, and they all run "in the cloud"... people like: googe, amazon, netflix, hospitals, schools, banks, bitcoin, facebook, governments, and even the folk like the fbi's, cia's, etc's will have cloud operations.
How do you think the government agencies track twitter and facebook, and spy on everything?
Consider IBM's smarter planet.... let me find it....
Anyway, my point is really that I see a significant shift in where the work is going, and you can either be there, or fill the voids of the people who go there ;-) Either decision has merit - for different reasons.
In mny ways, all things "cloud" come down to 2 things - scale, and variable-costs.
How big "can" you go, is the scale question - you want something that works now, and will continue to work if you strike it big.
Then, for variable-costs, you want those to be small - adding a server should be cheap, and easy... and quick. If you have to invest time, and money up-front, as a 1-time investment, that;s OK.
So, you spend a lot of time in the upfront processes, and so on, but after that "it just works".... everything automated, etc.
You don't want to be in a situation where, if a machine "goes down", you have to spend hours debugging things, or restoring a database, etc. Instead, you spend the time now to put the data in multiple places, and make them redundant, etc. That way if one goes down, you throw it away, and replace it.
While you do that, there's no downtime.... just a performance drop... maybe.
You also move way from a discrete transactional process... and go to an asynchronous one... you do things, then check if they succeeded.
ll the guarantees that databases give you... are bad designs for the cloud
This question could be suitable for Code Review, as long as (a) your code works as intended, (b) your code is real code, rather than example code, and (c) your code is included in the body of the question. If you wish for a peer review to improve all aspects of your code, please post it on Code Review. — Phrancis25 secs ago