discovering Java programming
Nov. 18th, 2016 11:12 am/** * A marker interface for classes that have no data inside * Meaning, two instances are equal if they have the same class */ public interface JustCode extends Serializable { } ... public interface Function<X, Y> extends JustCode { Y apply(X x); } ... public interface Function2<X, Y, Z> extends JustCode { Z apply(X x, Y y); } ... public int hashCode(JustCode x) { return x == null ? 0 : x.getClass().hashCode(); } public boolean equal(JustCode x, JustCode y) { return x == null ? y == null : y != null && x.getClass() == y.getClass(); }
No shit, just discovered this kind of data.
You've probably noticed that I kind of prefer
S
to OOP. :)беседы с бейарийскими спамерами
Apr. 16th, 2015 11:25 am"Hi Vlad,
I hope the year has started well for you. I just wanted to reach out because your old resume fits companies that I work for. Are you still working on the same types of projects? I work with small tech shops, one company in particular that I am very excited about has been founded by a CEO that has 15 exits and 10 IPO’s. Not only that, but we also work with some bigger ones, like Dropbox.
Let me know if this interests you at all. If not let’s keep in touch in case you ever need anything, since things always tend to change in the crazy Bay Area."
"Hi Pedro,
Yes, I'm working on the same types of projects as before, with variations.
I just did not exactly get it, you are asking me if this interests me at all - what is "this"? I see you are very excited, that's good for a while, but dangerous in the long run, probably. Getting more sober and specific would help a lot."
"Hi Vlad,
Great to hear from you and thanks for the feedback! I mentioned that I work with some shops and wanted to know if you are interested in knowing more about them in case you were looking for something new. I am very excited but I only use that excitement in certain situations, only when necessary of course. Let me know if you are interested in new job opportunities in the bay area. I’d be more than happy to help out."
(probably meaning he does not have anything, but wants to sell me)
I hope the year has started well for you. I just wanted to reach out because your old resume fits companies that I work for. Are you still working on the same types of projects? I work with small tech shops, one company in particular that I am very excited about has been founded by a CEO that has 15 exits and 10 IPO’s. Not only that, but we also work with some bigger ones, like Dropbox.
Let me know if this interests you at all. If not let’s keep in touch in case you ever need anything, since things always tend to change in the crazy Bay Area."
"Hi Pedro,
Yes, I'm working on the same types of projects as before, with variations.
I just did not exactly get it, you are asking me if this interests me at all - what is "this"? I see you are very excited, that's good for a while, but dangerous in the long run, probably. Getting more sober and specific would help a lot."
"Hi Vlad,
Great to hear from you and thanks for the feedback! I mentioned that I work with some shops and wanted to know if you are interested in knowing more about them in case you were looking for something new. I am very excited but I only use that excitement in certain situations, only when necessary of course. Let me know if you are interested in new job opportunities in the bay area. I’d be more than happy to help out."
(probably meaning he does not have anything, but wants to sell me)
навалял в духе проекта Эйлер
Dec. 5th, 2014 03:53 pmКороче, есть, скажем, пять вопросов для экзамена, каждый в нескольких вариантах; задача - изготовить варианты, чтобы они максимально различались. Ну типа всех возможных будет 55, а мне надо 27, ну вот взять первые 27 из таких.
С таким смаком навалял это на скале. Типа такого:
С таким смаком навалял это на скале. Типа такого:
def findFurthest(current: List[Index])(collection: List[Index]) = collection.map(i => (distance(current)(i), i)).max(order)._2 def sortByDistance(source: List[Index], target:List[Index] = Nil): List[Index] = source match { case Nil => target case more => { val furthest = findFurthest(target)(source) sortByDistance(source.filterNot(furthest==), furthest::target) } } val sorted = sortByDistance(allIndexes).reverse