This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.helloworld; | |
/** | |
* Created by wannabe on 12.04.15. | |
*/ | |
interface Animal | |
{ | |
int getLegsCount(); | |
animal move(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Main | |
{ | |
public void main() | |
{ | |
Test test = new Test(); | |
Test.Inner inner = test.new Inner(); | |
inner.testMethod(); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class DataStructure { | |
// Create an array | |
private final static int SIZE = 15; | |
private int[] arrayOfInts = new int[SIZE]; | |
public DataStructure() { | |
// fill the array with ascending integer values | |
for (int i = 0; i < SIZE; i++) { | |
arrayOfInts[i] = i; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.helloworld; | |
import java.util.Date; | |
/** | |
* Created by wannabe on 18.04.15. | |
*/ | |
public abstract class BasicEmployee { | |
protected int id; | |
protected String name; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def fizzbuzz(range, triggers) | |
range.map do |i| | |
parts = triggers.select{ |(_, predicate)| predicate.call(i) } | |
parts.size > 0 ? parts.map(&:first).join : i | |
end | |
end | |
puts fizzbuzz(1..100, [ | |
['Fizz', ->(i){ i % 3 == 0 }], | |
['Buzz', ->(i){ i % 5 == 0 }], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name localhost; | |
root %PROJECT_HOME_DIR%/web; | |
location / { | |
try_files $uri @rewriteapp; | |
} | |
location @rewriteapp { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.company; | |
import java.util.ArrayList; | |
import java.util.Stack; | |
/** | |
* Created by wannabe on 08.05.15. | |
*/ | |
public class ThreadHandle { | |
public static final int threadsCount = 10; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
main_cat.id, | |
main_cat.name, | |
last_thread.thread_id, | |
last_thread.name, | |
last_thread.transliteratename, | |
last_thread.posted_at, | |
last_thread.user_id, | |
last_thread.username, | |
counts.thread_count |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Utils { | |
public interface SumOfDigits { | |
Integer run(String s); | |
} | |
public static String orderWeight(String strng) { | |
SumOfDigits sumOfDigits = s -> | |
Arrays.asList(s.split("")) | |
.stream() | |
.mapToInt(Integer::parseInt) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Ancestor | |
{ | |
private static test() | |
{ | |
echo "Ancestor::test"; | |
} | |
public static proxy() | |
{ | |
self::test(); |
OlderNewer