Skip to content

Instantly share code, notes, and snippets.

View addicted2sounds's full-sized avatar

Oleg Borys addicted2sounds

View GitHub Profile
package com.company;
/**
* Created by addicted on 27.02.16.
*/
public class Contact {
private String name;
private String nickname;
private String email;
private String phone;
package com.company;
/**
* Created by addicted on 27.02.16.
*/
public class Circle {
private double radius;
public double getCircumference() {
return 2 * Math.PI * radius;
package com.company;
/**
* Created by addicted on 27.02.16.
*/
public class Circle {
private double radius;
public double getCircumference() {
return 2 * Math.PI * radius;
package com.company;
/**
* Created by addicted on 27.02.16.
*/
public class Contact {
private String name;
private String nickname;
private String email;
private String phone;
package com.company;
/**
* Created by addicted on 27.02.16.
*/
public class Weather {
private double windDirection;
private double windSpeed;
private double temperature;
private PrecipitationTypes precipitations;
# remove
/usr/libexec/PlistBuddy -c 'Add :LSUIElement bool true' /Applications/iTerm.app/Contents/Info.plist
# restore
/usr/libexec/PlistBuddy -c 'Delete :LSUIElement' /Applications/iTerm.app/Contents/Info.plist
public class Main {
public static void main(String[] args) {
System.out.println("Arguments count: " + args.length);
for (int i = 0; i < args.length; i++) {
String type = args[i].matches("[+-]?\\d+") ? "Integer" : "String";
System.out.println(args[i] + " <" + type + ">");
}
}
}
public class Main {
public static void main(String[] args) {
System.out.println("Arguments count: " + args.length);
for (int i = 0; i < args.length; i++) {
String type = args[i].matches("[+-]?\\d*\\.\\d+") ? "Decimal" : "String";
System.out.println(args[i] + " <" + type + ">");
}
}
}
public class Main {
public static void main(String[] args) {
System.out.println("Arguments count: " + args.length);
for (int i = 0; i < args.length; i++) {
String type = args[i].matches("[+-]?(\\d*\\.)?\\d*[eE][+-]?(\\d*\\.)?\\d*") ? "Float" : "String";
System.out.println(args[i] + " <" + type + ">");
}
}
}
public class Main {
static int[][] arr1 = {
{12,453,435},
{56,783,855},
{23,435,543}
};
static int[][] arr2 = {
{4,4,4},