I want to do some abbreviations that contain colons, but it doesn't work in vimrc:
ab t:u unsigned
I get a syntax error. I tried \: and \\:\ but it didn't work.
How can I do this?
> We have over 5000 vim questions. They were never off-topic. Plus, the FAQ states that questions about "software tools commonly used by programmers" are on-topic. I believe this question should not have been closed.
>"The people that come up with these kind of things are obviously way above >average intelligence, what a waste, go find a cure for cancer or something."
> "The people that come up with these kind of things are obviously way above average intelligence, what a waste, go find a cure for cancer or something."
quote from someone discussing the Ethical implications of using anti forensic tools Because Biology is very similar to Computer Science...
It's something to do with modulo arithmetic and it's properties and stuff and then how large products of primes are hard break into it's factors p * q and blah blah blah
@Nils Iterators are an abstraction of pointers, sorted into categories regarding how much they are like pointers. Random access iterators are the most alike. (In fact, some early implementations of the std lib implemented std::vector<T>::iterator as T*.)
Wolframalpha was taking ages to break this number into it's prime factors :( 5759602149240247876857994004081295363338151725852938901132472828171992873665524051005072817707778665601229693
@DeadMG I disagree with this. It's an outcome of the decision to use pairs of iterators (which favors compatibility with C arrays and pointers), rather than single ones. Had we ranges instead of pairs of iterators, containers could pass as ranges, and we'd call std::sort(my_vector) and std::sort(my_list). I'd prefer that, but I wouldn't have known I'd do this 15 years ago when those decisions were made, so I can't complain about them.
Argh, I just spent half an hour bug hunting because I assumed a readBytes method would return 0 if there were no more bytes to read, but instead, it returns -1.
Hey guys, I just posted a question about handling smart pointers in containers. If you could shed some light, it would be great :-) stackoverflow.com/questions/8479938/…
@RMartinhoFernandes No, it isn't. Sign extension has to do with widening conversion. Which is exactly what happens here. The byte (which is signed in Java) is sign-extended to int, and that int is then logically shifted to the right.
@JohannesSchaublitb What is there to know in order to know "most implementations"? I suppose neither VC nor GCC nor clang can inline it. That would cover 90% of C++ compiler users.
@JohannesSchaublitb No, it might be unable to, but it can inline the comparison in std::sort(). And that makes all the difference in the world. (Why am I telling this to you? You must know that yourself.)
I have a class Student with a single integer variable
class Student {
int id;...
};
Sometimes id refers to Students's id and sometimes it refers to an autogenerated
id that is completely unrelated to the student's id (maybe the student had no id
at all or did and was ignored). The problem is...
@Pubby so i'm seeking for a way to say "this constructor wants an initlist as a one-argument, instead of the initlist elements each to their own ctor parameter"
so you could say opt_type o = { 1, 2, 3 }, and the ctor having vector<int> as parameter type would be marked "whole_list" or something. the { 1, 2, 3 } would be passed as one argument, instead of as three ints to that ctor, and then the { 1, 2, 3 } could successfully construct the vector
Modern humans owe their existence to the disappearance of Elephants from the Middle East http://www.physorg.com/news/2011-12-elephant-modern-years.html