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
Procedure GenerateDraw ( n ) | |
INPUT: n, the length of the random array | |
OUTPUT: result_array, the array contains unique random integers of length n | |
result_array <- CREATE and array of length n | |
loop n times { | |
current_rand = 0 | |
check_pass = True | |
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
Procedure CountMatches ( test_arr, ref_arr ) | |
INPUT: test_arr, the array use to compare with the reference array | |
ref_arr, the reference array | |
OUTPUT: match_array_count, the array length of the overlap between 2 sets | |
match_array_count = 0 | |
for each each_test_int in test_arr { | |
for each_ref_int in ref_arr { |
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
Procedure ComputeProfit ( lott_database, ref_arr ) | |
INPUT: lott_database, the array of all customer lottery arrays | |
ref_arr, the reference of current week lottery array | |
OUTPUT: profit, the profit of current week lottery | |
earn_count = len(lott_database) * 2 | |
give_out_count = 0 | |
for each_lott_arr in lott_database { | |
match_count = CountMatches(each_lott_arr, ref_arr) |
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
# -*- coding: utf-8 -*- | |
import random | |
def generate_draw(n): | |
result_array = [] | |
for i in range(n): | |
current_rand = None | |
check_passed = True | |
while current_rand is None or check_passed is False: |
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
import java.util.ArrayList; | |
import java.util.Collections; | |
import java.util.Comparator; | |
/** | |
* Created by KanzakiMirai on 10/26/16. | |
*/ | |
public class Test { | |
public static void main(String[] args) { | |
Demo tmp = new Demo(); |
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
const Proxy = require("coin-hive-stratum"); | |
const proxy = new Proxy({ | |
host: "POOL_ADDR", | |
port: POOL_PORT, | |
pass: "POOL_PASSWD", | |
ssl: false, | |
user: "POOL_USER", | |
address: "WALLET_ADDR", | |
dynamicPool: false, | |
maxMinersPerConnection: MAX_CONN_LOAD, |
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
# Decription : The script to install Wildfly 10.0.0.Final | |
# Original script: https://gist.github.com/sukharevd/6087988 | |
# This version is the only variable to change when running the script | |
WILDFLY_VERSION=10.0.0.Final | |
WILDFLY_FILENAME=wildfly-$WILDFLY_VERSION | |
WILDFLY_ARCHIVE_NAME=$WILDFLY_FILENAME.tar.gz | |
WILDFLY_DOWNLOAD_ADDRESS=http://download.jboss.org/wildfly/$WILDFLY_VERSION/$WILDFLY_ARCHIVE_NAME | |
# Specify the destination location |
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
<?xml version="1.0" ?> | |
<server xmlns="urn:jboss:domain:4.0"> | |
<extensions> | |
<extension module="org.jboss.as.clustering.infinispan"/> | |
<extension module="org.jboss.as.connector"/> | |
<extension module="org.jboss.as.deployment-scanner"/> | |
<extension module="org.jboss.as.ee"/> | |
<extension module="org.jboss.as.ejb3"/> | |
<extension module="org.jboss.as.jaxrs"/> |
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 com.kmirai.kis.lib | |
import com.kmirai.kis.Gson | |
import org.hibernate.HibernateException | |
import org.hibernate.dialect.PostgreSQL95Dialect | |
import org.hibernate.engine.spi.SharedSessionContractImplementor | |
import org.hibernate.usertype.UserType | |
import org.springframework.util.ObjectUtils | |
import java.io.Serializable | |
import java.sql.PreparedStatement |
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
#!/usr/bin/env python | |
""" | |
UMD CMSC 216 Project local test tool | |
===================================== | |
This tool is ONLY being tested on Professor Larry Herman's CMSC 216 (18Fall). | |
===================================== |
OlderNewer