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
sudo su | |
echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee /etc/apt/sources.list.d/webupd8team-java.list | |
echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list | |
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EEA14886 | |
apt-get update |
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
import java.util.Scanner; | |
/**Implements a game of nim, person vs. computer. | |
* The game starts with a number of elements chosen | |
* by the person. The computer takes 1 or 2 elements. | |
* Then the person takes 1 or 2 elements. The game | |
* continues until there are no elements left. The | |
* play who takes the last turn wins. | |
* @author Jam Jenkins | |
*/ | |
public class Nim |
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
private DimensionDefault createDimensionDefault(MainAccountNum _mainAccount, container _conData) | |
{ | |
int hierarchyCount; | |
int hierarchyIdx; | |
RecId dimAttId_MainAccount; | |
LedgerRecId ledgerRecId; | |
MainAccount mainAccount; | |
RefRecId recordvalue; | |
DimensionAttribute dimensionAttribute; | |
DimensionAttributeValue dimensionAttributeValue; |
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
static void updInventSetup(Args _args) | |
{ | |
InventTable item; | |
InventDim dimSite, dimLocation; | |
InventSite site; | |
InventItemPurchSetup purchSetup; | |
InventItemSalesSetup salesSetup; | |
InventItemInventSetup inventSetup; | |
try |
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 main | |
import "fmt" | |
func binarySerach(list []int, item int) (bool, int) { | |
low := 0 | |
high := len(list) - 1 | |
for low <= high { | |
median := (low + high) / 2 |
OlderNewer