« first day (1778 days earlier)      last day (3198 days later) » 

9:07 PM
> Ok, so this is not the most advanced programming question - and it kind of borders on e-commerce, but it has specifically come up twice in my career - which is only 10 years old, so I figured I would ask it.
Anyone think that question is going to be on topic?
 
solely based on the comment, probably not
but it's anyone's guess whether it contains a good question that can be pulled out with editing
 
3
Q: Proper Price Markup Formula

picusOk, so this is not the most advanced programming question - and it kind of borders on e-commerce, but it has specifically come up twice in my career - which is only 10 years old, so I figured I would ask it. Question: I want to markup a price 10% from its original cost for a website, which is th...

I went with @Snowman 's Old Faithful close reason
 
after reading that carefully, I now believe it's a mathematics question
most of the body text is unrelated to the core issue of "does a 10% increase mean 1.1x or x/90*100?"
there's probably an overlap between our site and the math ones, but that seems like it probably belongs in math, if anyone can be bothered to edit it into shape
personally I don't care enough either way since you all you have to do to get the answer is type 100/90 into your calculator and notice it's not the same thing as 1.1
thus, I have downvoted it, not close voted
 
it'll let you skim off the top on the 0.01111
 
@ratchetfreak Superman 3
 
9:15 PM
@durron597 ?
 
@Ixrec mix economics into that soup. Economics defines what to consider markup / markdown. Math figures in the question are all correct, it is only unclear how to interpret these in economics terms. In other words, when auditors come to the company and start charging fines for wrong bookkeeping, it won't be a fault of neither mathematician nor programmer
...and of course legal
 
ok, the fact that "10% price markup" means "10% increase in price" is an economic thing
but that's so amazingly trivial I don't see how it's even worth mentioning
it's not like 10% interest compounded weekly or something
at least we can all agree it's not a great question
 
9:42 PM
@Ixrec agree. It survived over here probably because readers mistook it for algorithms
 
9:53 PM
@gnat And yet, it only has 2 CVs.
 
So P = NP/1.1 ?
 
the magic of non-determinism gives you exactly 10% speed up on all algorithms
 
@durron597 people are outta votes, you know
 
I think the take-away is P = NP/1.1 is not P = 0.9NP. Which simplifies to NP/1.1 != 0.9NP which further simplifies to 1/1.1 != 0.9. Internet win.
 
user114359
@gnat Snowman to the rescue! I would have CV'd it sooner but I had a critical issue to take care of. My whiskey supply was dangerously low, I had to replenish.
 
9:59 PM
CV bot reporting for duty
 
@MetaFight P = NP/HTTP Version
 
user114359
@MetaFight extra credit if you can finagle those equations to prove P = NP
 
today I learned that we are a good compiler
 
oh, and then this...
 
10:11 PM
 
user114359
Why is this question deleted with three delete votes and this one is not? The first question has more upvotes and a higher net vote score.
 
presumably the former is more "urgent" because of the score?
 
@Snowman one that stays has top answer at +31
 
9
Q: Provide 10k users more close votes

GlenH7Please provide 10k+ users more close votes. Why? Putting questions on-hold in a timely fashion is critical in providing useful feedback to new users. It's rare for salvageable questions to be put on-hold without a constructive comment having been left. Quickly putting questions on-hold keeps...

 
i am sorry for disturbing , but here is my another problem and i dont want to post as question in stack exchnage ..... i am learning java using codingbat website and there is a question ..
 
10:14 PM
 
Given a string, return true if the first 2 chars in the string also appear at the end of the string, such as with "edited".

frontAgain("edited") → true
frontAgain("edit") → false
frontAgain("ed") → true
 
user114359
@gnat Eh, @ratchetfreak took care of it anyway. But yeah, I did not look at the answers.
 
public boolean frontAgain(String str) {

String startandlast="ed";
if(str.toLowerCase().startsWith(startandlast) && str.toLowerCase().endsWith(startandlast)){
return true;
}

else return false;
}
 
the very first thing that comes to my mind is string[0] == string[len-1] && string[1] == string[len-2]
no idea if that is valid Java
 
when complied , it says its partially correct .... please help me
 
10:16 PM
@user143252 is it always "ed"?
just do String startandlast=str.substring(0,2);
 
user114359
@Ixrec Right idea, but not operator[] in Java. Use charAt() instead.
 
@durron597 yes sir , but i am curious to know why my solution is partially correct only
 
because you hardcoded "ed"?
 
@user143252 Because your answer only works for "ed" what about church?
or sheesh
 
@durron597 sir , the question is
Given a string, return true if the first 2 chars in the string also appear at the end of the string, such as with "edited".

frontAgain("edited") → true
frontAgain("edit") → false
frontAgain("ed") → true
 
10:19 PM
edited was just an example
 
ok sir .... i am coming in a minute with a proof
 
I don't think it's trying to say that edited, edit and ed are the only three test cases you need to pass
it says "such as" before introducing "edited"
 
@durron597 thanks a lot sir i got it ..... embarrassed ... its just a silly question ;)
 
I REassuRE you, you seem to DEluDE yourself on the STrangeST things
 
user55340
@user143252 /^(..).*\1$/
 
10:22 PM
your current solution feels like it's halfway through a TDD session, where you only have the "edited" test case so you do just enough to make that pass before adding another test
 
@MichaelT Don't you mean Pattern p = Pattern.compile("^(..).*\\1$"); Match m = p.match(str); return m.find(0);
 
user55340
Java - double backslash.
 
@MichaelT because your answer is such good Java. :-P
 
user55340
The thing is - it's a nice regular language.
 
user55340
Substrings are a pain there.
 
10:26 PM
@MichaelT I usually try to help people with the least invasive fix possible
unless they're doing something really dangerous
 
user114359
@MichaelT Technically a regular language cannot match an arbitrary prefix and postfix that match, you need a pushdown automata to do that. But Perl extensions can.
 
user114359
You know what is better than caffeine? Whiskey. You know what is better than either? Both together.
 
iirc some regex flavors even have recursion
 
but only a fixed length prefex/postfix
regex with backrefs is NP-complete
went through the queue a bit and found some more tags for cleanup
 
user114359
10:45 PM
So, this is my next project. Viewing all of these in order:
 
user114359
66
A: Is there an official Marvel Cinematic Universe viewing order?

ReanimationThis is an updated list of the films of the Marvel Cinematic Universe in order of internal chronology; including shorts and other releases (feature films are in bold): Captain America: The First Avenger Marvel's Agent Carter Season 1 Marvel One-Shot: Agent Carter (short; Iron Man 3 release) Ir...

 
user114359
Thank the programming gods for Netflix.
 
have fun
not sure if I'll ever get around to Agents of SHIELD but almost all of the movies I've seen
 
user114359
@Ixrec I have seen most of the movies but none of the shows. I want to watch them in order including the extras/special features and keep an eye open for easter eggs.
 
user114359
11:04 PM
Anyone here good with Handbrake?
 
@Snowman you pull it to make those fancy sliding turns right?
 
@JimmyHoffa eh... what platform?
linux?
 
user114359
Windows.
 
user114359
I'm converting some Blu-rays to H.264 MP4s with some really inconsistent results
 
user114359
Specifically, I started with The Walking Dead season 1. I tried a few different quality settings. Sometimes the video is sharp, sometimes blurry (same compression level). Some areas of the same color (e.g. a wall) are pixelated. I figure it is probably something to do with the codec and the input data, and maybe there is a setting I can tweak?
 
user55340
11:23 PM
@Snowman arbitrary - yes. But its not arbitrary. Its [A-Za-z0-9] or even a more limited set than that. Its doable. Then there's this crazy paper - cial.csie.ncku.edu.tw/st2010/pdf/… (you don't need a PDA, something in-between will work)
 
user114359
@MichaelT If you are looking for fixed strings, it will work. I can construct an NFA to do that. Arbitrary strings? Requires a PDA. Again, the twin caveats that regexes as implemented in most programming languages and libraries do more than what we learn in college, and specifically, Perl extensions allow nested regexes which can do what the OP requires.
 
user114359
In other words, I was being an annoying pedant.
 
user15026
@Snowman I've watched the movies, and am watching Agent Carter now. I tried Agents of Shield but it didn't really thrill me. Gave it my usual 3 eps to hook me, and it never really got there.
 
it's hard to say anything about regexes without being a pedant
 
user114359
@AshleyNunn What specifically was it missing or did you not like?
 
11:26 PM
if you don't bring up the fact that "regexes" includes everything from FSMs to turing machines, someone else will
 
user15026
@Snowman I don't know. I don't know if it was the whole "monster of the week" feel, or if it was teh fact that none of the characters really appealed to me enough to want to know what happened to them, or what.
 
user15026
I just got bored easily with it.
 
user15026
Agent Carter, on the other hand, is fucking brilliant.
 
user114359
@AshleyNunn Speaking of characters, does it have Black Widow? Specifically, her butt in leather like in the Avengers movie?
 
user15026
@Snowman I don't really remember how much of her I saw - I watched very few eps so I might be a bad person to ask :P
 
user55340
11:31 PM
Yea... this is a helpful answer:
 
user55340
 
user55340
(question is tagged c - though that was after this answer... still... clean up after yourself people)
 
user114359
@AshleyNunn Yeah yeah, I am sure you could tell me all about Haweye in the show ;-)
 
user114359
My wife is a fan of Robert Downy Jr, she loves when he is not in the Iron Man suit.
 
user114359
@MichaelT That whole question and its answers are pretty useless. I know for a fact there are a few questions on SO that cover that material much better.
 
user55340
11:39 PM
@Snowman But giving a java answer on the question, having two upvotes on it (before I down voted it) and not cleaning up after yourself?
 
user114359
@MichaelT That answer should be deleted. I cannot vote to do that, so I downvoted instead.
 
user55340
@Snowman one more down vote then and I can vtd.
 
@MichaelT go for it
 
user55340
Also that will kick it in with an auto VLQ flag.
 
DV placed
do your worst
 
user114359
11:41 PM
Flagged for VLQ
 
user55340
Done. (and so when you see it in the LQP review queue, you can recommend deletion - and that will draw either other 20ks or 6 recommend delete votes)
 
user114359
Time for dinner and zombies. See y'all later!
 
user15026
@Snowman Actually no, he's not really my thing. She's more attractive to me than he is. Although I agree with your wife about RDJ.
 
user55340
@Snowman Fortunately Pepper doesn't wear a suit.
 
user55340
 
user55340
11:47 PM
Ok, well, so thats a suit. But not an iron one.
 

« first day (1778 days earlier)      last day (3198 days later) »