Jun 29, 2019 14:54
@Mitsuko I intend to be helpful to point out a fact that this is not an idiom. I don't intend to persuade anyone to change their mind on anything, or argue about any other facts about China. 3 or so people saying something doesn't make it automatically true. And as I said, this is a valid Chinese phrase in actual use. Whether it is also an idiom or not doesn't matter much to most people, so they don't have to carefully choose the term. It may not even matter much to you, depending what you'll do with it. Usage of this phrase without implying it's an idiom is completely irrelevant.
Jun 29, 2019 14:20
I hope these results are not localized for me. I'm asking because, you know, if I simply say it doesn't exist in a few idiom dictionaries (google 成语词典 in Chinese), it doesn't sound convincing.
Jun 29, 2019 14:20
Googling pinyin without tone marks gives 188, but included many posts in English that clearly says this is an idiom, proverb, or even part of culture. In any case, it's not. Maybe slogans or catchphrases, because they don't have to be universal. And I suppose at least some people who are doing this may actually have said it a lot. But it's just the straightforward construction in the Chinese grammar, without any idiomatic implications, references, literary value or anything like that.
Jun 29, 2019 14:20
After reading some answers I recommend "无奸不商" "人不利己,天诛地灭" "傻子太多,骗子不够用". The original phrase, whether it's an idiom or not, is not harsh enough compared to the answers.
Jun 29, 2019 14:20
So, your source is "somewhere", but also confirmed by two friends on Facebook? (No offend, but not everybody is a linguist, or would assumes others are using the right terms.) Googling this term in double quotes gives 224,000 results. First two are your posts. The 3rd asks what it means, without implying it's an idiom. The 4th is a Chinese post that claims a racist westerner professor introduces this term in a lecture. And I consider this not significantly more than the similar phrases "能坑就坑" 50,000 "能蒙就蒙" 90,300. Googling the pinyin in double quotes gives only 66 results.
Jun 29, 2019 14:20
This is not an idiom in Chinese. It is how this idea expressed literally. It happens to have 4 characters like most of the idioms. You may replace 骗 with any verb to mean to do that as long as you can. Or you may use X就Y to mean Y as long as X.
Jun 29, 2019 14:20
Looks like you want this expression in every language. Could you reference some sources where did you "read a lot" about it? I feel it like someone criticizing a group of scammers or the like: "their slogan is X", mistranslated as something like "their best respected idiom is X".
 
Apr 7, 2017 17:37
Is it allowed to shift by negative bits? Alternatively, is it allowed to assume the number of bits an unsigned number?
Apr 7, 2017 17:37
Sorry, I should have said return truthy if two numbers are equal.
 
Dec 5, 2016 18:52
These argument sometimes arises. That's why I prefer to get out of the academy as fast as I could. It's understandable though. In middle school I could prove the theorems myself, as this is how the teacher said about how to do things seriously. But after that I decided that's wasting my time and simply preferred a lower score. Unfortunately people started to argue about what programming style is the best too.
 
Sep 2, 2016 14:52
But a counter is reversible.
 
Aug 9, 2016 07:42
Question: How do you reboot them? I guess of course it's not triggered by some program preinstalled in that usb stick?
 
Jul 13, 2016 04:51
Ah, some network problem
Jul 13, 2016 04:49
@mbomb007 Nevermind, I misunderstood that code. Yes, O(n^3)
Jul 13, 2016 04:48
@mbomb007 Never mind, I misunderstood that code. Yes, O(n^3)
Jul 13, 2016 04:44
@mbomb007 Seemed to be O(n^2) to me. More exactly, O(m) + O(m*k*(m-k+1)), but m-k=0.
Jul 11, 2016 19:15
A program checks whether the two strings are equal and do everything slowly in all other cases can also run in O(n) time for the best case for this question, which doesn't make much sense. In your algorithm, if the length of the answer is n/2 and appears at the beginning of the strings, you can always get at least n/4 pairs of strings (if there is no duplicates) from A and B with the first n/4 characters matches, for every length between n/2 and 3n/4. And that's enough for O(n^3).
Jul 11, 2016 19:15
All algorithms ending in finite time are O(1) if the input is fixed. It doesn't make sense to speak of the time complexity without explicit input and the definition of n. Assume strings is the input, that's O(m^2k) where m is the length of the list, and k is the length of each string. In the similar routines in this answer, both m and k are O(n) (in average) where n is the length of A and B. But in your link, it is usually just said to be O(m^2k). Using the conventions in theoretical computer science, where mk=O(n), it is O(n^2). Or if you assume k is constant, then it is O(m^2).
Jul 11, 2016 19:15
For substring, I don't know. Many implementations are indeed O(n), but there are ways to implement it in O(1). But for a hash table, it cannot be implemented in a lower time complexity.
Jul 11, 2016 19:15
Just as an example, given a whatever data structure supporting add and has, you only add one string a and then find another string b in it. This is equivalent to simply comparing whether a and b are equal. Do you think this can be done in O(1) when the two strings are long?
Jul 11, 2016 19:15
Your link only addressed its complexity relative to the number of elements in a data structure. The length of each element is something else. So, for example, the complexity of most operations in a normal BBST implementation (such as red-black tree) is in fact O(m*log(n)), where n is the number of elements in the BBST as that page states, and m is the time comparing two elements (or in case of hash or trie, the time processing each element), which is just the length for a string. And for hash tables, n doesn't contribute to the complexity and it's O(m).
Jul 11, 2016 19:15
One level for while, one level for for, and one level for hashing. Anyway not O(n).
Jul 11, 2016 19:15
And it is O(n^3).
 
Jun 15, 2016 11:24
Didn't realize you could use any expressions there... but adding braces isn't harmful.
Jun 15, 2016 11:11
Well, I'm not working there so I can't know.
Jun 15, 2016 11:08
By the way, if you are working at Dyalog... I think ngn is too
Jun 15, 2016 11:07
Thanks.
Jun 15, 2016 11:06
Well, your wording was a bit confusing. It wasn't the PPCG consensus to not count the header, but there is a way in APL to write that without a header at all.
Jun 15, 2016 10:57
Well, can I write 16 pieces of code, where some of them are functions, some are complete programs?
Jun 15, 2016 10:56
@LeakyNun Can I?
Jun 15, 2016 10:55
But I just had an idea. I could just think they are complete programs. If I could write 2 complete programs and 14 functions, then I could remove those 2 bytes.
Jun 15, 2016 10:53
Anyway I don't think it is... Function headers are always included, unless you can make that expression alone returning a function
Jun 15, 2016 10:40
It returned nothing.. maybe the comment is deleted?
Jun 15, 2016 10:32
@Adám Which consensus? You can't call 1 directly to use it as a function...
Jun 15, 2016 10:32
@Adám Link please...
Jun 15, 2016 10:32
@Adám Doesn't that add much more overhead?
 
Jun 7, 2016 21:35
Wrote too many words before realizing this is protected. In short: Avoid mentioning or even hinting anything about why one should work there in the materials when hiring her. Avoid explaining how you not appreciating this behavior personally, but refer to "most people" as a disguise and the economical view if required, to allow her not agreeing or rejecting immediately, nor is that assumed in the future. Don't assume what she want and if she want something obvious (position or money), she might be complaining about something assuming you won't understand and just took an arbitrary reference.
 
Mar 16, 2016 16:47
@YoustayIgo Sorry if you feel bad about my comment, but I don't hate you. I downvote for (a big part of) "this answer is not useful" (and only listed some most obvious problems).
Mar 16, 2016 16:47
-1 "A lot of suicides and heart failure deaths are expected" I wonder what you are thinking. Random deaths of men occasionally happens even in our world. (It might be a lot, though, even if 0.001% women do so, but quite irrelevant.) And without at least one next generation, old times and the human technologies being forgotten is unimaginable. I recommend posting separate answers if you change it too much. But I'll give both a -1 for this case.
 
Mar 14, 2016 06:14
Decoding u2yu is much shorter than using atob 3 times. But anyway your eval approach should be much shorter than [].find.constructor.
Mar 14, 2016 06:06
@CatsAreFluffy I didn't downvote, but your code doesn't work in Firefox, for the v.
Mar 13, 2016 20:10
@CatsAreFluffy
window["a"+"t"+"o"+(window+[])[2]]("c"+"u"+"a"+"a")[0] -> r
window["a"+"t"+"o"+(window+[])[2]]("c"+"y"+"a"+"a")[0] -> s
Mar 13, 2016 03:08
(If there is no strict mode.)
Mar 13, 2016 03:08
[[].concat].find("".concat) should be just Array.prototype.concat with the object reference removed. concat(1)[0] returns window.
Mar 13, 2016 01:56
Older browsers when there wasn't the strict mode, usually doesn't have [].find.
Mar 13, 2016 01:54
Then we can get [object Window] and window.atob, and most of the letters.
Mar 13, 2016 01:54
If a browser supports Array.prototype.find, and doesn't set strict mode for native functions, it should return window.
Mar 13, 2016 01:51
So my approach doesn't seem to work anywhere. If we had window, we could get [object Window], then window.atob and most of the letters.
Mar 13, 2016 01:38
Anyone using MS Edge?