This file contains 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
@Test | |
public void testBigDecimal() throws Exception { | |
final Random random = new Random(); | |
for (int j = 0; j < 100; j++) { | |
long val = random.nextInt(); | |
Timer.executeFunctionWithTimer(() -> { | |
int value = 0; | |
for (int i = 0; i < 1000000; i++) { | |
value = new BigDecimal(val).intValueExact(); | |
} |
This file contains 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
<android.support.v4.widget.DrawerLayout | |
android:id="@+id/drawer_layout" | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent"> | |
<android.support.design.widget.CoordinatorLayout | |
android:id="@+id/main_content" | |
xmlns:android="http://schemas.android.com/apk/res/android" |
This file contains 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
1 aaaan | |
1 aan | |
1 ab | |
1 abaddnew | |
1 abstract | |
1 abstractrequest | |
1 act | |
1 addressid | |
1 ae | |
1 against |
This file contains 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
1 | | |
1 aasawodli | |
1 abstractrequest | |
1 access | |
1 act | |
1 ae | |
1 afanalyzer | |
1 ago | |
1 ahybsifeo | |
1 air |
This file contains 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
написать | |
решение | |
a | |
вижу | |
class | |
поэтому | |
работать | |
+ | |
джаве | |
new |
This file contains 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
пример | |
проблемы | |
типа | |
решение | |
делать | |
например | |
проект | |
проект | |
кстати | |
стоит |
This file contains 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
а | |
в | |
г | |
е | |
ж | |
и | |
к | |
м | |
о | |
с |
This file contains 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 kz.moe.classifier; | |
import com.google.gson.Gson; | |
import com.google.gson.GsonBuilder; | |
import com.google.gson.reflect.TypeToken; | |
import kz.moe.classifier.genetic.creature.BasicCreature; | |
import kz.moe.classifier.genetic.creature.Chromosome; | |
import kz.moe.classifier.genetic.creature.Gene; | |
import kz.moe.classifier.genetic.creature.ICreature; | |
import kz.moe.classifier.genetic.crossover.ICrossover; |
This file contains 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
boolean consecutiveAscending = true; | |
boolean consecutiveDescending = true; | |
// Check to see if the newPin is made up of consecutive numbers in | |
// ascending order | |
for (int j = 0; j < newPin.length() - 1; j++) { | |
if (Convert.toLong(newPin.substring(j, j + 1)) == null | |
|| Convert.toLong(newPin.substring(j + 1, j + 2)) == null) { | |
consecutiveAscending = false; | |
break; | |
} |
This file contains 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 CrossoverFactory extends AbstractFactory{ | |
public static ICrossover createCrossover(CrossoverType type) { | |
report(type.name(), "Crossover"); | |
switch (type) { | |
case ONE_POINT_CROSSOVER: | |
return new OnePointCrossover(); | |
case TWO_POINT_CROSSOVER: | |
return new TwoPointCrossover(); | |
case UNIFORM_CROSSOVER: | |
return new UniformCrossover(); |