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
angular.module('sirhamy', ['ngRoute', 'projects']); | |
angular.module('sirhamy').config( function($routeProvider) { | |
$routeProvider | |
.when('/main', { | |
templateUrl: 'views/main.html', | |
controller: 'MainCtrl', | |
controllerAs: 'control' | |
}) | |
.when('/phantsaver', { |
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 ng-model="rightPdfChart" | |
ng-options="option.name for option in options"> | |
</select> |
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
.chartdisplay img { | |
display: block; | |
height: 100%; | |
width: 100%; | |
} | |
.hide { | |
visibility: hidden; | |
opacity: 1; | |
} |
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 boolean isPalindrome(String s) { | |
for(int i = 0; i < s.length()/2; i++) { | |
if(s.charAt(i) != s.charAt(s.length() - i - 1)) { | |
return false; | |
} | |
} | |
return true; | |
} |
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 static void main(String[] args) { | |
World myWorld = new World( | |
new Country("USA", | |
new State("NY", | |
new City("New York", 8143197)), | |
new City("LA", 3844829), | |
new City("Chicago", 2842518), | |
new District("Washington D.C.", 658893)), | |
new Country("Germany", |
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 City implements Municipality{ | |
private int population; | |
private String name; | |
public City(String name, int population) { | |
this.name = name; | |
this.population = population; | |
} | |
@Override |
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 int x(String z) { | |
if(z.toLowerCase().equals("Airplane")) { | |
return 5; | |
} else if(z.toLowerCase().equals("Car")){ | |
return 3; | |
} else if(z.toLowerCase().equals("Boat")){ | |
return 3; | |
} | |
} |
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 static void zeroRightShift(int[] A) { | |
if(A == null) return; | |
int zeroPtr = A.length - 1; | |
while(zeroPtr >= 0) { | |
if(A[zeroPtr] != 0) break; | |
zeroPtr--; | |
} | |
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 LongestCharSeq { | |
public String findLongest(String s) { | |
StringBuffer result = new StringBuffer(); | |
s.toLowerCase(); | |
int lastChar = getAsciiVal(s.charAt(0)) - 1; | |
StringBuffer currentSeq = new StringBuffer(); | |
for(int i = 0; i<s.length(); i++) { |