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 |
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
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
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
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
private void postJournal(CustTransOpenMobilePaym_AX4B _mobilePaym) | |
{ | |
CustVendOpenTransManager manager; | |
LedgerJournalCheckPost ledgerJournalCheckPost; | |
NumberSeq numberSeq; | |
ledgerJournalTrans ledgerJournalTrans; | |
ledgerJournalTable ledgerJournalTable; | |
AxLedgerJournalTrans axLedgerJournalTrans; | |
QueryRun qRun = new QueryRun(custTransQuery); | |
CustTrans custTrans; |
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
firewall-cmd --permanent --add-port=3389/tcp | |
dnf install xrdp | |
systemctl enable xrdp |
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
try | |
{ | |
/* CODE */ | |
} | |
} | |
catch (System.ServiceModel.FaultException<DAXLIMSInteg.SalesService.AifFault> axe) | |
{ | |
var errorMsg = new StringBuilder(); | |
foreach (var item in axe.Detail.InfologMessageList) | |
{ |
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
jQuery.extend(jQuery.validator.methods, { | |
date: function (value, element) { | |
return this.optional(element) || /^\d\d?\/\d\d?\/\d\d\d?\d?$/.test(value); | |
}, | |
number: function (value, element) { | |
return this.optional(element) || /^-?(?:\d+|\d{1,3}(?:\.\d{3})+)(?:,\d+)?$/.test(value); | |
} | |
}); |
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
client static Bitmap barCode(str _data) | |
{ | |
System.Drawing.Bitmap barCode; | |
System.Drawing.Font font; | |
System.Drawing.Graphics graphics; | |
System.Drawing.SizeF dataSize; | |
System.String data; | |
System.Drawing.Brush brush; | |
System.IO.MemoryStream stream; | |
Image barCodeImage; |
NewerOlder