Found 18 repositories(showing 18)
Sawo-Community
Official Repository that contains many use cases of single technology built by the awesome @Sawo-Community ❤️
basta1255s
Skip to content Why GitHub? Team Enterprise Explore Marketplace Pricing Search Sign in Sign up safemoonprotocol / Safemoon.sol 476618 Code Issues 62 Pull requests 4 Actions Projects Wiki Security Insights Safemoon.sol/Safemoon.sol @safemoonprotocol safemoonprotocol Create Safemoon.sol Latest commit 152e907 on Mar 4 History 1 contributor 1166 lines (997 sloc) 42.3 KB /** *Submitted for verification at BscScan.com on 2021-03-01 */ /** *Submitted for verification at BscScan.com on 2021-03-01 */ /** #BEE #LIQ+#RFI+#SHIB+#DOGE = #BEE #SAFEMOON features: 3% fee auto add to the liquidity pool to locked forever when selling 2% fee auto distribute to all holders I created a black hole so #Bee token will deflate itself in supply with every transaction 50% Supply is burned at start. */ pragma solidity ^0.6.12; // SPDX-License-Identifier: Unlicensed interface IERC20 { function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // According to EIP-1052, 0x0 is the value returned for not-yet created accounts // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned // for accounts without code, i.e. `keccak256('')` bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; // solhint-disable-next-line no-inline-assembly assembly { codehash := extcodehash(account) } return (codehash != accountHash && codehash != 0x0); } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); return _functionCallWithValue(target, data, value, errorMessage); } function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: weiValue }(data); if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ contract Ownable is Context { address private _owner; address private _previousOwner; uint256 private _lockTime; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } function geUnlockTime() public view returns (uint256) { return _lockTime; } //Locks the contract for owner for the amount of time provided function lock(uint256 time) public virtual onlyOwner { _previousOwner = _owner; _owner = address(0); _lockTime = now + time; emit OwnershipTransferred(_owner, address(0)); } //Unlocks the contract for owner when _lockTime is exceeds function unlock() public virtual { require(_previousOwner == msg.sender, "You don't have permission to unlock"); require(now > _lockTime , "Contract is locked until 7 days"); emit OwnershipTransferred(_owner, _previousOwner); _owner = _previousOwner; } } // pragma solidity >=0.5.0; interface IUniswapV2Factory { event PairCreated(address indexed token0, address indexed token1, address pair, uint); function feeTo() external view returns (address); function feeToSetter() external view returns (address); function getPair(address tokenA, address tokenB) external view returns (address pair); function allPairs(uint) external view returns (address pair); function allPairsLength() external view returns (uint); function createPair(address tokenA, address tokenB) external returns (address pair); function setFeeTo(address) external; function setFeeToSetter(address) external; } // pragma solidity >=0.5.0; interface IUniswapV2Pair { event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); function name() external pure returns (string memory); function symbol() external pure returns (string memory); function decimals() external pure returns (uint8); function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint value) external returns (bool); function transfer(address to, uint value) external returns (bool); function transferFrom(address from, address to, uint value) external returns (bool); function DOMAIN_SEPARATOR() external view returns (bytes32); function PERMIT_TYPEHASH() external pure returns (bytes32); function nonces(address owner) external view returns (uint); function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external; event Mint(address indexed sender, uint amount0, uint amount1); event Burn(address indexed sender, uint amount0, uint amount1, address indexed to); event Swap( address indexed sender, uint amount0In, uint amount1In, uint amount0Out, uint amount1Out, address indexed to ); event Sync(uint112 reserve0, uint112 reserve1); function MINIMUM_LIQUIDITY() external pure returns (uint); function factory() external view returns (address); function token0() external view returns (address); function token1() external view returns (address); function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast); function price0CumulativeLast() external view returns (uint); function price1CumulativeLast() external view returns (uint); function kLast() external view returns (uint); function mint(address to) external returns (uint liquidity); function burn(address to) external returns (uint amount0, uint amount1); function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external; function skim(address to) external; function sync() external; function initialize(address, address) external; } // pragma solidity >=0.6.2; interface IUniswapV2Router01 { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidity( address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB, uint liquidity); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); function removeLiquidity( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB); function removeLiquidityETH( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountToken, uint amountETH); function removeLiquidityWithPermit( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountA, uint amountB); function removeLiquidityETHWithPermit( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountToken, uint amountETH); function swapExactTokensForTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapTokensForExactTokens( uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB); function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut); function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn); function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts); function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts); } // pragma solidity >=0.6.2; interface IUniswapV2Router02 is IUniswapV2Router01 { function removeLiquidityETHSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountETH); function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountETH); function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; } contract SafeMoon is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private _isExcluded; address[] private _excluded; uint256 private constant MAX = ~uint256(0); uint256 private _tTotal = 1000000000 * 10**6 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; string private _name = "SafeMoon"; string private _symbol = "SAFEMOON"; uint8 private _decimals = 9; uint256 public _taxFee = 5; uint256 private _previousTaxFee = _taxFee; uint256 public _liquidityFee = 5; uint256 private _previousLiquidityFee = _liquidityFee; IUniswapV2Router02 public immutable uniswapV2Router; address public immutable uniswapV2Pair; bool inSwapAndLiquify; bool public swapAndLiquifyEnabled = true; uint256 public _maxTxAmount = 5000000 * 10**6 * 10**9; uint256 private numTokensSellToAddToLiquidity = 500000 * 10**6 * 10**9; event MinTokensBeforeSwapUpdated(uint256 minTokensBeforeSwap); event SwapAndLiquifyEnabledUpdated(bool enabled); event SwapAndLiquify( uint256 tokensSwapped, uint256 ethReceived, uint256 tokensIntoLiqudity ); modifier lockTheSwap { inSwapAndLiquify = true; _; inSwapAndLiquify = false; } constructor () public { _rOwned[_msgSender()] = _rTotal; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x05fF2B0DB69458A0750badebc4f9e13aDd608C7F); // Create a uniswap pair for this new token uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); // set the rest of the contract variables uniswapV2Router = _uniswapV2Router; //exclude owner and this contract from fee _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public view returns (string memory) { return _name; } function symbol() public view returns (string memory) { return _symbol; } function decimals() public view returns (uint8) { return _decimals; } function totalSupply() public view override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { if (_isExcluded[account]) return _tOwned[account]; return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; } function isExcludedFromReward(address account) public view returns (bool) { return _isExcluded[account]; } function totalFees() public view returns (uint256) { return _tFeeTotal; } function deliver(uint256 tAmount) public { address sender = _msgSender(); require(!_isExcluded[sender], "Excluded addresses cannot call this function"); (uint256 rAmount,,,,,) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rTotal = _rTotal.sub(rAmount); _tFeeTotal = _tFeeTotal.add(tAmount); } function reflectionFromToken(uint256 tAmount, bool deductTransferFee) public view returns(uint256) { require(tAmount <= _tTotal, "Amount must be less than supply"); if (!deductTransferFee) { (uint256 rAmount,,,,,) = _getValues(tAmount); return rAmount; } else { (,uint256 rTransferAmount,,,,) = _getValues(tAmount); return rTransferAmount; } } function tokenFromReflection(uint256 rAmount) public view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function excludeFromReward(address account) public onlyOwner() { // require(account != 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D, 'We can not exclude Uniswap router.'); require(!_isExcluded[account], "Account is already excluded"); if(_rOwned[account] > 0) { _tOwned[account] = tokenFromReflection(_rOwned[account]); } _isExcluded[account] = true; _excluded.push(account); } function includeInReward(address account) external onlyOwner() { require(_isExcluded[account], "Account is already excluded"); for (uint256 i = 0; i < _excluded.length; i++) { if (_excluded[i] == account) { _excluded[i] = _excluded[_excluded.length - 1]; _tOwned[account] = 0; _isExcluded[account] = false; _excluded.pop(); break; } } } function _transferBothExcluded(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity) = _getValues(tAmount); _tOwned[sender] = _tOwned[sender].sub(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _tOwned[recipient] = _tOwned[recipient].add(tTransferAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeLiquidity(tLiquidity); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function excludeFromFee(address account) public onlyOwner { _isExcludedFromFee[account] = true; } function includeInFee(address account) public onlyOwner { _isExcludedFromFee[account] = false; } function setTaxFeePercent(uint256 taxFee) external onlyOwner() { _taxFee = taxFee; } function setLiquidityFeePercent(uint256 liquidityFee) external onlyOwner() { _liquidityFee = liquidityFee; } function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() { _maxTxAmount = _tTotal.mul(maxTxPercent).div( 10**2 ); } function setSwapAndLiquifyEnabled(bool _enabled) public onlyOwner { swapAndLiquifyEnabled = _enabled; emit SwapAndLiquifyEnabledUpdated(_enabled); } //to recieve ETH from uniswapV2Router when swaping receive() external payable {} function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity) = _getTValues(tAmount); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tLiquidity, _getRate()); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tLiquidity); } function _getTValues(uint256 tAmount) private view returns (uint256, uint256, uint256) { uint256 tFee = calculateTaxFee(tAmount); uint256 tLiquidity = calculateLiquidityFee(tAmount); uint256 tTransferAmount = tAmount.sub(tFee).sub(tLiquidity); return (tTransferAmount, tFee, tLiquidity); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tLiquidity, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rLiquidity = tLiquidity.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rLiquidity); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; for (uint256 i = 0; i < _excluded.length; i++) { if (_rOwned[_excluded[i]] > rSupply || _tOwned[_excluded[i]] > tSupply) return (_rTotal, _tTotal); rSupply = rSupply.sub(_rOwned[_excluded[i]]); tSupply = tSupply.sub(_tOwned[_excluded[i]]); } if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function _takeLiquidity(uint256 tLiquidity) private { uint256 currentRate = _getRate(); uint256 rLiquidity = tLiquidity.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rLiquidity); if(_isExcluded[address(this)]) _tOwned[address(this)] = _tOwned[address(this)].add(tLiquidity); } function calculateTaxFee(uint256 _amount) private view returns (uint256) { return _amount.mul(_taxFee).div( 10**2 ); } function calculateLiquidityFee(uint256 _amount) private view returns (uint256) { return _amount.mul(_liquidityFee).div( 10**2 ); } function removeAllFee() private { if(_taxFee == 0 && _liquidityFee == 0) return; _previousTaxFee = _taxFee; _previousLiquidityFee = _liquidityFee; _taxFee = 0; _liquidityFee = 0; } function restoreAllFee() private { _taxFee = _previousTaxFee; _liquidityFee = _previousLiquidityFee; } function isExcludedFromFee(address account) public view returns(bool) { return _isExcludedFromFee[account]; } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if(from != owner() && to != owner()) require(amount <= _maxTxAmount, "Transfer amount exceeds the maxTxAmount."); // is the token balance of this contract address over the min number of // tokens that we need to initiate a swap + liquidity lock? // also, don't get caught in a circular liquidity event. // also, don't swap & liquify if sender is uniswap pair. uint256 contractTokenBalance = balanceOf(address(this)); if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } bool overMinTokenBalance = contractTokenBalance >= numTokensSellToAddToLiquidity; if ( overMinTokenBalance && !inSwapAndLiquify && from != uniswapV2Pair && swapAndLiquifyEnabled ) { contractTokenBalance = numTokensSellToAddToLiquidity; //add liquidity swapAndLiquify(contractTokenBalance); } //indicates if fee should be deducted from transfer bool takeFee = true; //if any account belongs to _isExcludedFromFee account then remove the fee if(_isExcludedFromFee[from] || _isExcludedFromFee[to]){ takeFee = false; } //transfer amount, it will take tax, burn, liquidity fee _tokenTransfer(from,to,amount,takeFee); } function swapAndLiquify(uint256 contractTokenBalance) private lockTheSwap { // split the contract balance into halves uint256 half = contractTokenBalance.div(2); uint256 otherHalf = contractTokenBalance.sub(half); // capture the contract's current ETH balance. // this is so that we can capture exactly the amount of ETH that the // swap creates, and not make the liquidity event include any ETH that // has been manually sent to the contract uint256 initialBalance = address(this).balance; // swap tokens for ETH swapTokensForEth(half); // <- this breaks the ETH -> HATE swap when swap+liquify is triggered // how much ETH did we just swap into? uint256 newBalance = address(this).balance.sub(initialBalance); // add liquidity to uniswap addLiquidity(otherHalf, newBalance); emit SwapAndLiquify(half, newBalance, otherHalf); } function swapTokensForEth(uint256 tokenAmount) private { // generate the uniswap pair path of token -> weth address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); // make the swap uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, // accept any amount of ETH path, address(this), block.timestamp ); } function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private { // approve token transfer to cover all possible scenarios _approve(address(this), address(uniswapV2Router), tokenAmount); // add the liquidity uniswapV2Router.addLiquidityETH{value: ethAmount}( address(this), tokenAmount, 0, // slippage is unavoidable 0, // slippage is unavoidable owner(), block.timestamp ); } //this method is responsible for taking all fee, if takeFee is true function _tokenTransfer(address sender, address recipient, uint256 amount,bool takeFee) private { if(!takeFee) removeAllFee(); if (_isExcluded[sender] && !_isExcluded[recipient]) { _transferFromExcluded(sender, recipient, amount); } else if (!_isExcluded[sender] && _isExcluded[recipient]) { _transferToExcluded(sender, recipient, amount); } else if (!_isExcluded[sender] && !_isExcluded[recipient]) { _transferStandard(sender, recipient, amount); } else if (_isExcluded[sender] && _isExcluded[recipient]) { _transferBothExcluded(sender, recipient, amount); } else { _transferStandard(sender, recipient, amount); } if(!takeFee) restoreAllFee(); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeLiquidity(tLiquidity); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _transferToExcluded(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _tOwned[recipient] = _tOwned[recipient].add(tTransferAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeLiquidity(tLiquidity); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _transferFromExcluded(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity) = _getValues(tAmount); _tOwned[sender] = _tOwned[sender].sub(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeLiquidity(tLiquidity); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } } © 2021 GitHub, Inc. Terms Privacy Security Status Docs Contact GitHub Pricing API Training Blog About
{ "name": "bootstrap", "description": "The most popular front-end framework for developing responsive, mobile first projects on the web.", "version": "4.5.0", "version_short": "4.5", "keywords": [ "css", "sass", "mobile-first", "responsive", "front-end", "framework", "web" ], "homepage": "https://getbootstrap.com/", "author": "The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)", "contributors": [ "Twitter, Inc." ], "scripts": { "start": "npm-run-all --parallel watch docs-serve", "bundlewatch": "bundlewatch --config .bundlewatch.config.json", "css": "npm-run-all css-compile css-prefix css-minify css-copy", "css-copy": "cross-env-shell shx mkdir -p site/docs/$npm_package_version_short/dist/ && cross-env-shell shx cp -r dist/css/ site/docs/$npm_package_version_short/dist/", "css-main": "npm-run-all css-lint css-compile-main css-prefix-main css-minify-main css-copy", "css-docs": "npm-run-all css-compile-docs css-prefix-docs css-minify-docs", "css-compile": "npm-run-all --parallel css-compile-*", "css-compile-main": "node-sass --output-style expanded --source-map true --source-map-contents true --precision 6 scss/ -o dist/css/ && npm run css-copy", "css-compile-docs": "cross-env-shell node-sass --output-style expanded --source-map true --source-map-contents true --precision 6 site/docs/$npm_package_version_short/assets/scss/docs.scss site/docs/$npm_package_version_short/assets/css/docs.min.css", "css-lint": "npm-run-all --continue-on-error --parallel css-lint-*", "css-lint-main": "stylelint \"scss/**/*.scss\" --cache --cache-location .cache/.stylelintcache", "css-lint-docs": "stylelint \"site/docs/**/assets/scss/*.scss\" \"site/docs/**/*.css\" --cache --cache-location .cache/.stylelintcache", "css-lint-vars": "fusv scss/ site/docs/", "css-minify": "npm-run-all --parallel css-minify-*", "css-minify-main": "cleancss --level 1 --format breakWith=lf --source-map --source-map-inline-sources --output dist/css/bootstrap.min.css dist/css/bootstrap.css && cleancss --level 1 --format breakWith=lf --source-map --source-map-inline-sources --output dist/css/bootstrap-grid.min.css dist/css/bootstrap-grid.css && cleancss --level 1 --format breakWith=lf --source-map --source-map-inline-sources --output dist/css/bootstrap-reboot.min.css dist/css/bootstrap-reboot.css", "css-minify-docs": "cross-env-shell cleancss --level 1 --format breakWith=lf --source-map --source-map-inline-sources --output site/docs/$npm_package_version_short/assets/css/docs.min.css site/docs/$npm_package_version_short/assets/css/docs.min.css", "css-prefix": "npm-run-all --parallel css-prefix-*", "css-prefix-main": "postcss --config build/postcss.config.js --replace \"dist/css/*.css\" \"!dist/css/*.min.css\"", "css-prefix-docs": "postcss --config build/postcss.config.js --replace \"site/docs/**/*.css\"", "js": "npm-run-all js-compile js-minify js-copy", "js-copy": "cross-env-shell shx mkdir -p site/docs/$npm_package_version_short/dist/ && cross-env-shell shx cp -r dist/js/ site/docs/$npm_package_version_short/dist/", "js-main": "npm-run-all js-lint js-compile js-minify-main", "js-docs": "npm-run-all js-lint-docs js-minify-docs", "js-compile": "npm-run-all --parallel js-compile-* --sequential js-copy", "js-compile-standalone": "rollup --environment BUNDLE:false --config build/rollup.config.js --sourcemap", "js-compile-bundle": "rollup --environment BUNDLE:true --config build/rollup.config.js --sourcemap", "js-compile-plugins": "node build/build-plugins.js", "js-compile-plugins-coverage": "cross-env NODE_ENV=test node build/build-plugins.js", "js-lint": "npm-run-all --continue-on-error --parallel js-lint-*", "js-lint-main": "eslint --report-unused-disable-directives --cache --cache-location .cache/.eslintcache js/src js/tests build/", "js-lint-docs": "eslint --report-unused-disable-directives --cache --cache-location .cache/.eslintcache site/", "js-minify": "npm-run-all --parallel js-minify-main js-minify-docs", "js-minify-main": "npm-run-all js-minify-standalone js-minify-bundle", "js-minify-standalone": "terser --compress typeofs=false --mangle --comments \"/^!/\" --source-map \"content=dist/js/bootstrap.js.map,includeSources,url=bootstrap.min.js.map\" --output dist/js/bootstrap.min.js dist/js/bootstrap.js", "js-minify-bundle": "terser --compress typeofs=false --mangle --comments \"/^!/\" --source-map \"content=dist/js/bootstrap.bundle.js.map,includeSources,url=bootstrap.bundle.min.js.map\" --output dist/js/bootstrap.bundle.min.js dist/js/bootstrap.bundle.js", "js-minify-docs": "cross-env-shell terser --mangle --comments \\\"/^!/\\\" --output site/docs/$npm_package_version_short/assets/js/docs.min.js site/docs/$npm_package_version_short/assets/js/vendor/anchor.min.js site/docs/$npm_package_version_short/assets/js/vendor/clipboard.min.js site/docs/$npm_package_version_short/assets/js/vendor/bs-custom-file-input.min.js \"site/docs/$npm_package_version_short/assets/js/src/*.js\"", "js-test": "npm-run-all js-test-karma* js-test-integration", "js-test-karma": "karma start js/tests/karma.conf.js", "js-test-karma-old": "cross-env USE_OLD_JQUERY=true npm run js-test-karma", "js-test-karma-bundle": "cross-env BUNDLE=true npm run js-test-karma", "js-test-karma-bundle-old": "cross-env BUNDLE=true USE_OLD_JQUERY=true npm run js-test-karma", "js-test-integration": "rollup --config js/tests/integration/rollup.bundle.js", "js-test-cloud": "cross-env BROWSER=true npm run js-test-karma", "lint": "npm-run-all --parallel js-lint css-lint lockfile-lint", "docs": "npm-run-all css-docs js-docs docs-build docs-lint", "docs-build": "bundle exec jekyll build", "docs-compile": "npm run docs-build", "docs-production": "cross-env JEKYLL_ENV=production npm run docs-build", "docs-netlify": "cross-env JEKYLL_ENV=netlify npm run docs-build", "docs-linkinator": "linkinator _gh_pages --recurse --silent --skip \"^(?!http://localhost)\"", "docs-vnu": "node build/vnu-jar.js", "docs-lint": "npm-run-all --parallel docs-vnu docs-linkinator", "docs-serve": "bundle exec jekyll serve", "docs-serve-only": "npm run docs-serve -- --skip-initial-build --no-watch", "lockfile-lint": "lockfile-lint --allowed-hosts npm --allowed-schemes https: --empty-hostname false --type npm --path package-lock.json", "update-deps": "ncu -u -x \"jquery,karma-browserstack-launcher,popper.js,qunit,sinon\" && npm update && bundle update && cross-env-shell echo Manually update \\\"site/docs/$npm_package_version_short/assets/js/vendor/\\\"", "release": "npm-run-all dist release-sri docs-build release-zip*", "release-sri": "node build/generate-sri.js", "release-version": "node build/change-version.js", "release-zip": "cross-env-shell \"shx rm -rf bootstrap-$npm_package_version-dist && shx cp -r dist/ bootstrap-$npm_package_version-dist && zip -r9 bootstrap-$npm_package_version-dist.zip bootstrap-$npm_package_version-dist && shx rm -rf bootstrap-$npm_package_version-dist\"", "release-zip-examples": "node build/zip-examples.js", "dist": "npm-run-all --parallel css js", "test": "npm-run-all lint dist js-test docs-build docs-lint", "netlify": "npm-run-all dist release-sri docs-netlify", "watch": "npm-run-all --parallel watch-*", "watch-css-main": "nodemon --watch scss/ --ext scss --exec \"npm run css-main\"", "watch-css-docs": "nodemon --watch \"site/docs/**/assets/scss/\" --ext scss --exec \"npm run css-docs\"", "watch-js-main": "nodemon --watch js/src/ --ext js --exec \"npm run js-compile\"", "watch-js-docs": "nodemon --watch \"site/docs/**/assets/js/src/\" --ext js --exec \"npm run js-docs\"" }, "style": "dist/css/bootstrap.css", "sass": "scss/bootstrap.scss", "main": "dist/js/bootstrap.js", "repository": { "type": "git", "url": "git+https://github.com/twbs/bootstrap.git" }, "bugs": { "url": "https://github.com/twbs/bootstrap/issues" }, "license": "MIT", "funding": { "type": "opencollective", "url": "https://opencollective.com/bootstrap" }, "dependencies": {}, "peerDependencies": { "jquery": "1.9.1 - 3", "popper.js": "^1.16.0" }, "devDependencies": { "@babel/cli": "^7.8.4", "@babel/core": "^7.9.6", "@babel/plugin-proposal-object-rest-spread": "^7.9.6", "@babel/preset-env": "^7.9.6", "@rollup/plugin-commonjs": "^11.1.0", "@rollup/plugin-node-resolve": "^7.1.3", "autoprefixer": "^9.7.6", "babel-eslint": "^10.1.0", "babel-plugin-istanbul": "^6.0.0", "bundlewatch": "^0.2.7", "clean-css-cli": "^4.3.0", "cross-env": "^7.0.2", "eslint": "^7.0.0", "find-unused-sass-variables": "^2.0.0", "glob": "^7.1.6", "hammer-simulator": "0.0.1", "ip": "^1.1.5", "jquery": "^3.5.1", "karma": "^5.0.5", "karma-browserstack-launcher": "1.4.0", "karma-chrome-launcher": "^3.1.0", "karma-coverage-istanbul-reporter": "^3.0.2", "karma-detect-browsers": "^2.3.3", "karma-firefox-launcher": "^1.3.0", "karma-qunit": "^4.1.1", "karma-sinon": "^1.0.5", "linkinator": "^2.1.1", "lockfile-lint": "^4.2.2", "node-sass": "^4.14.1", "nodemon": "^2.0.3", "npm-run-all": "^4.1.5", "popper.js": "^1.16.0", "postcss-cli": "^7.1.1", "qunit": "2.9.2", "rollup": "^2.9.1", "rollup-plugin-babel": "^4.4.0", "shelljs": "^0.8.4", "shx": "^0.3.2", "sinon": "^7.5.0", "stylelint": "^13.3.3", "stylelint-config-twbs-bootstrap": "^2.0.2", "terser": "^4.6.13", "vnu-jar": "20.3.16" }, "files": [ "dist/{css,js}/*.{css,js,map}", "js/{src,dist}/**/*.{js,map}", "scss/**/*.scss" ], "jspm": { "registry": "npm", "main": "js/bootstrap", "directories": { "lib": "dist" }, "shim": { "js/bootstrap": { "deps": [ "jquery", "popper.js" ], "exports": "$" } }, "dependencies": {}, "peerDependencies": { "jquery": "1.9.1 - 3", "popper.js": "^1.16.0" } } }
BabyJ723
Unicorn is W3C's unified validator, which helps people improve the quality of their Web pages by performing a variety of checks. Unicorn gathers the results of the popular HTML and CSS validators, as well as other useful services. This site addresses these audiences: Users, those who want to check their Web pages and understand how to fix them based on Unicorn results. Developers, those who wish to add new services, work on existing services, or help develop the underlying Unicorn framework. Server Managers, those who wish to run their own Unicorn service locally. How to compile and deploy Unicorn: 1. The first thing you have to do in order to make Unicorn work is to add a unicorn.home parameter to your JVM parameters, pointing to the unicorn root directory. example : Dunicorn.home=/var/lib/tomcat6/webapps/unicorn/ or Dunicorn.home=/C:/Program%20Files/Tomcat/webapps/unicorn/ (read your servlet engine documentation to know how to add this parameter) 2. You will find all the configuration files that Unicorn uses in WEB-INF/conf. The main one is unicorn properties, which contains some properties that you may want to change: UNICORN_URL is the URL of your installation of Unicorn. DEFAULT_LANGUAGE, the language Unicorn will use if language negotiation fails. You can nest properties in this file, meaning that Unicorn will replace any ${<Property_key>} by its value. There is one property that is not specify in the file but added at runtime, UNICORN_HOME, which is equal to the JVM parameter unicorn.home. velocity.properties contains properties for the template engine that Unicorn uses: Apache Velocity By default template caching is set to false. In a production environment you should set this property to true. parser.pool.size is set to the default velocity value (20). If you have a lot of requests you may have to increase this value. In any case check the logs to see if you need to change it (Velocity will log warnings). log4j.properties is the properties file for Apache Log4j. The property UNICORN_HOME is also available in this file. By default logs will be written in WEB-INF/logs and sorted by package and level. If you are developing Unicorn locally you should add the appender GUI to the root logger. This will pop up a useful LogFactor5 console. You can find documentation about log4j configuration here: http://logging.apache.org/log4j/1.2/manual.html Note that log4j is not mandatory for Unicorn to work properly. If log4j.properties does not exist the default java.util.Logger will be used. observers.list is the list of the observers contract links 3. Under WEB-INF/resources/tasklist you will find the task related files which are xml files describing tasks and rdf files containing metadata about tasks. 4. Use ant to compile the project. You can use the 'war' task to make a war file of the 'jar' task to package Unicorn in a jar. The files will be written in the dist directory. See build.xml for more info. ex: ant war 5. As root, copy the file resources/tomcat_policy in the policy directory of tomcat (/etc/tomcat5/policy.d for Debian) and eventually edit it to fit your needs. Note that this file is very important because it will give permissions to read and write files under Unicorn servlet dir, but also to connect to distant hosts (observers). How to initialize Unicorn: Once you have compiled and deploy Unicorn on your engine you must initialize it. There are a few mandatory steps that Unicorn has to do before being usable, like parsing the contract files, language files, taklists, etc... If your engine uses the web.xml description file (which should be the case with almost any servlet engine) initialization is automated at startup. If you want to manually initialize Unicorn you can simply execute the InitAction by connecting to http://localhost:8080/unicorn/init. This task will launch all initialization tasks which are: initialize Unicorn core load Unicorn observers (you can execute this task only by connecting to /init?task=observers) load Unicorn tasklists (/init?task=tasklist) load language files (/init?task=language) In a production environment InitAction servlet should be protected to be accessible only from localhost (set PROTECT_INIT_ACTION to true in unicorn.properties) How does the log work: Under Tomcat logs files are on "webapps/unicorn/WEB-INF/logs/". There are split in two directory : "level" where log are split in one file by log level (trace, debug, info, warning and error). "package" where log are split by package where they come from. There are also one file called "all.log" which contains all logs informations. About Unicorn - W3C's Unified Validator validator.w3.org/unicorn/ Topics css java html validation html5 w3c validator Resources Readme Stars 92 stars Watchers 31 watching Forks 57 forks Releases 1 tags Contributors 7 @tgambet @jean-gui @gbaudusseau @dontcallmedom @vivienlacourba @tripu @xfq Languages Java 79.4% JavaScript 15.5% CSS 4.2
gomoku
I wrote a blog in Chinese about why I did this project. Essentially those weak Gomoku applications drove me to do this and I get the preliminary version done in 8 hours' work. I believe a lot of improvement can be done in the near future and I am interested to build a machine learning strategy which can be customized to defeat the specific gamer. You need Mac environment to test or run this application and it is NOT compatible with GNUStep anymore. Many thanks to the initial contributor Nicola Pero and the GNUStep Team. 2011 Please keep in mind that the original source code is licensed under GNU GPL 2.0. Latest Version V1.0 March 19.
vcsekhar
This is a humble Fork of StatSVN (Ref-https://sourceforge.net/projects/statsvn/); Initial credits goes to the original contributors that started at SourceForge. Any changes checked in are supposed to work with Java 8 and above.
MagikidNASA
This repo contains project code for the 2022 magiki NASA space apps challenge. Main Initial contributors are highschool students that are learning how to create a website application.
vcsekhar
A Fork of SVNStat (https://sourceforge.net/projects/svnstat/). All initial credits goes to the contributors that started at SourceForge; Any changes checked in are supposed to work with Java 8 and above.
AshanthaLahiru
In open source projects any new contributor can create pull requests or issues. When contributors do one of the following things they always seek for the feedback from the existing contributors (maintainers). As the contributors are unaware when the maintainers will respond them, they have to check the activity of the repository time to time. When contributors are acknowledged properly, it is easy to keep their interest on particular project. The Responder is to acknowledge the contributors in a timely manner and to get the attraction of the maintainers towards the contributors in an efficient manner. This will predict the response time by calculating the average of the initial responses given by the maintainers to previous issues and pull requests. Then a bot can acknowledge the contributors when they can receive a response. Also adding a label to indicate the remaining time will grab the attention of the maintainers and help them in responding to contributors. Other than that maintainers can define categories to issues/pull requests beforehand so that contributors can use them and categorize their issues/pull requests.
WendySaMitrais
RailsGoat is a vulnerable version of the Ruby on Rails Framework from versions 3 to 6. It includes vulnerabilities from the OWASP Top 10, as well as some "extras" that the initial project contributors felt worthwhile to share. This project is designed to educate both developers, as well as security professionals.
Developed a software system to generate a data repository and made it accessible to both citizens and data contributors. Performed a project initial study, requirement analysis, and developed a project management plan (Gantt and PERT) for the data repository system. Completed the project by performing system analysis and design using various Unified Modeling Language diagrams (e. g., activity diagram, use case diagram).
roman1Fox
Watch 0 Star 0 Fork 0 roman1Fox/Blur-Admin_files Code Issues 0 Pull requests 0 Projects 0 Wiki Insights Settings No description, website, or topics provided. Edit Add topics 1 commit 1 branch 0 releases 1 contributor Clone or download Create new file Upload files Find file Tree: c7a7f09214 New pull request Latest commit c7a7f09 3 hours ago roman1Fox Initial commit README.md Initial commit 3 hours ago README.md Blur-Admin_files
calebcram
Terra (Spring 2019 - Interactive Comic) This is the interactive comic project I worked on in the GIMM 250 class of Spring 2019. The other contributors to this project are: Alex Becerril Caleb Cram Cole Rene Sydney Wayne-Riddle Hannah Wiles The initial commit of this project will contain the code in the state it was when it was turned in. Any code changes afterwards will only be in the interest of maintaining compatability with recent Flash Player and Adobe Animate versions. The project requires the GreenSock library. Just drop "greensock.swc" into the root folder and it should run.
Project Title One Paragraph of project description goes here Getting Started These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system. Prerequisites What things you need to install the software and how to install them Give examples Installing A step by step series of examples that tell you how to get a development env running Say what the step will be Give the example And repeat until finished End with an example of getting some data out of the system or using it for a little demo Running the tests Explain how to run the automated tests for this system Break down into end to end tests Explain what these tests test and why Give an example And coding style tests Explain what these tests test and why Give an example Deployment Add additional notes about how to deploy this on a live system Built With Dropwizard - The web framework used Maven - Dependency Management ROME - Used to generate RSS Feeds Contributing Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us. Versioning We use SemVer for versioning. For the versions available, see the tags on this repository. Authors Billie Thompson - Initial work - PurpleBooth See also the list of contributors who participated in this project. License This project is licensed under the MIT License - see the LICENSE.md file for details Acknowledgments Hat tip to anyone whose code was used Inspiration etc
aamirfarhan
Hindi UD treebank The Hindi Universal Dependency Treebank was automatically converted from Hindi Dependency Treebank (HDTB) which is part of an ongoing effort of creating multi-layered treebanks for Hindi and Urdu. HDTB is developed at IIIT-H India. The project is supported by NSF Grant (Award Number: CNS 0751202; CFDA Number: 47.070). Any publication reporting the work done using this data should cite the following references: Riyaz Ahmad Bhat, Rajesh Bhatt, Annahita Farudi, Prescott Klassen, Bhuvana Narasimhan, Martha Palmer, Owen Rambow, Dipti Misra Sharma, Ashwini Vaidya, Sri Ramagurumurthy Vishnu, and Fei Xia. The Hindi/Urdu Treebank Project. In the Handbook of Linguistic Annotation (edited by Nancy Ide and James Pustejovsky), Springer Press @InCollection{bhathindi, Title = {The Hindi/Urdu Treebank Project}, Author = {Bhat, Riyaz Ahmad and Bhatt, Rajesh and Farudi, Annahita and Klassen, Prescott and Narasimhan, Bhuvana and Palmer, Martha and Rambow, Owen and Sharma, Dipti Misra and Vaidya, Ashwini and Vishnu, Sri Ramagurumurthy and others}, Booktitle = {Handbook of Linguistic Annotation}, Publisher = {Springer Press} } Martha Palmer, Rajesh Bhatt, Bhuvana Narasimhan, Owen Rambow, Dipti Misra Sharma, Fei Xia. Hindi Syntax: Annotating Dependency, Lexical Predicate-Argument Structure, and Phrase Structure. In the Proceedings of the 7th International Conference on Natural Language Processing, ICON-2009, Hyderabad, India, Dec 14-17, 2009. @inproceedings{palmer2009hindi, title={Hindi syntax: Annotating dependency, lexical predicate-argument structure, and phrase structure}, author={Palmer, Martha and Bhatt, Rajesh and Narasimhan, Bhuvana and Rambow, Owen and Sharma, Dipti Misra and Xia, Fei}, booktitle={The 7th International Conference on Natural Language Processing}, pages={14--17}, year={2009} } ## Changelog 2017-03-01 v2.0 * Converted to UD v2 guidelines (Dan Zeman). 2015-11-01 v1.2 * Initial release (Riyaz Bhat and Dan Zeman). === Machine-readable metadata ================================================= Documentation status: stub Data source: automatic Data available since: UD v1.2 License: CC BY-NC-SA 4.0 Genre: news Contributors: Bhat, Riyaz Ahmad; Zeman, Daniel Contact: zeman@ufal.mff.cuni.cz ===============================================================================
716716
Skip to content Learn Git and GitHub without any code! Using the Hello World guide, you’ll start a branch, write comments, and open a pull request. fadhilsaheer / mongoi Code Issues Pull requests Actions Projects Wiki Security Insights mongoi/readme.md @fadhilsaheer fadhilsaheer added redame 1 contributor 226 lines (143 sloc) 3.64 KB MONGOI😇 MONGOI is a npm package made by Fadhil easy tool to manage and do CRUD operation with mongo database Setup Requirements Node Js Npm Mongo Db Internet [to download] 😅 npm i mongoi This will install mongoi for you 😎 How To Use Mongoi will help you to do crud operation 😱 to have more features don't forget to contribute 😁 After installing require it const mongoi = require('mongoi') you have initialize it first let yourDatabaseConnectionUrl = "mongdb:localhost:27017" // create database schema as you do for mongoose let databaseSchema = { name: String, } let collectionName = "your-collection-name" mongoi.init(yourDatabaseConnectionUrl, databaseSchema, collectionName).then(()=>{ // you can write anything here except bug 😊 }) now you initialized mongoi successfully 😎 so lets start doing crud 😜 CRUD = CREATE - READ - UPDATE - DELETE // This is the model of crud 😪 mongoi.crud([option], data).then(()=>{ // use it 😋 }) // options // [you have to write it in string eg : "r"] // // s - "save" // r = "read" // ro = "read one" // u = "update many" // uo = "update one" // d = "delete all" // do = "delete one" // dm = "delete many" // // Enjoy 🤗 // Create lets create 👻 // create this according to you schema const data_to_save = { name: "apple", color: "red" } mongoi.crud("s". data_to_save) // you can call .then after this 🥱 Read lets read 😏 // read all mongoi.crud("r").then((data_you_get_from_database)=>{ // do with this data 🐼 }) // read one let condition = {name: "panda"} // this is the condition of what are you looking for mongoi.crud("ro", condition).then((data_you_get_from_database)=>{ // do with this data 🐧 }) Update let update 🖊 // update many or update all let condition_and_data = [ {cute_message: "you are ugly 🤮"},//this should be condition {cute_message: "you are cute 😘"}//thing you wan't to change ] mongoi.crud("u", condition_and_data)// you can call .then after this 🥱 i don't care 😏 // 😁 /* let condition_and_data = [ {cute_message: "you are cute 😘"},//you are not cute 😅 {cute_message: "you are ugly 🤮"}//you are ugly 😁 ] mongoi.crud("u", condition_and_data)// just kidding 😅 */ // update one let condition_and_data = [ {cute_message: "you are ugly 🤮"},//this should be condition {cute_message: "you are cute 😘"}//thing you wan't to change ] mongoi.crud("uo", condition_and_data)// you can call .then after this 🥱 i don't care 😏 // 😁 /* let condition_and_data = [ {cute_message: "you are cute 😘"},//you are not cute 😅 {cute_message: "you are ugly 🤮"}//you are ugly 😁 ] mongoi.crud("u", condition_and_data)// just kidding 😅 Delete lets delete this 🧺 // delete all mongoi.crud("d") // .then is supported 😇 // delete many let condition = {cute_message: "you are cute"} mongoi.crud("dm", condition)// use .then if you want // delete one let condition = {cute_message: "you are cute"} mongoi.crud("do", condition)// use .then if you want no one cares 😁 Conclusion Hopefully I assume that you love 💗 this contribute for updating this garbage 😁 Made With 💗 Fadhil © 2021 GitHub, Inc. Terms Privacy Security Status Help Contact GitHub Pricing API Training Blog About
FozleFR
Skip to content Sign up AveyBD / tailwind-css-calculator Public Code Issues Pull requests Actions Projects Wiki Security Insights tailwind-css-calculator/index.html @AveyBD AveyBD Changed Input to P tag 1 contributor 72 lines (67 sloc) 3.95 KB <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Simple Calculator Using Tailwind CSS</title> <!-- tailwind css --> <link rel="stylesheet" href="./assets/css/style.css"> <!-- conecting javascript --> <script src="./assets/script/app.js"></script> </head> <body> <header> </header> <main class="bg-slate-100"> <div class="flex justify-center items-center min-h-screen"> <div class="p-4 border border-solid shadow-white border-white-400 bg-black rounded-xl"> <p id="outputScreen" class="mb-5 p-5 font-extrabold rounded-xl text-white bg-black text-right"></p> <div class="grid grid-cols-4 gap-4"> <button class="rounded-full border-solid border-gray-500 bg-slate-300 p-4" onclick="clr()">C</button> <button class="rounded-full border-solid border-gray-500 bg-slate-300 p-4" onclick="del()">Del</button> <button class="rounded-full border-solid border-gray-500 bg-slate-300 p-4" onclick="display('%')">%</button> <button class="rounded-full text-white border-solid border-gray-500 bg-amber-500 p-4" onclick="display('/')">/</button> <button class="rounded-full border-solid border-gray-500 bg-gray-500 text-white px-2" onclick="display('7')">7</button> <button class="rounded-full border-solid border-gray-500 bg-gray-500 text-white px-2" onclick="display('8')">8</button> <button class="rounded-full border-solid border-gray-500 bg-gray-500 text-white px-2" onclick="display('9')">9</button> <button class="rounded-full text-white border-solid border-gray-500 bg-amber-500 p-4" onclick="display('*')">*</button> <button class="rounded-full border-solid border-gray-500 bg-gray-500 text-white px-2" onclick="display('4')">4</button> <button class="rounded-full border-solid border-gray-500 bg-gray-500 text-white px-2" onclick="display('5')">5</button> <button class="rounded-full border-solid border-gray-500 bg-gray-500 text-white px-2" onclick="display('6')">6</button> <button class="rounded-full text-white border-solid border-gray-500 bg-amber-500 p-4" onclick="display('-')">-</button> <button class="rounded-full border-solid border-gray-500 bg-gray-500 text-white px-2" onclick="display('1')">1</button> <button class="rounded-full border-solid border-gray-500 bg-gray-500 text-white px-2" onclick="display('2')">2</button> <button class="rounded-full border-solid border-gray-500 bg-gray-500 text-white px-2" onclick="display('3')">3</button> <button class="rounded-full text-white border-solid border-gray-500 bg-amber-500 p-4" onclick="display('+')">+</button> <button class="rounded-full border-solid border-gray-500 bg-gray-500 text-white p-4 col-span-2" onclick="display('0')">0</button> <button class="rounded-full border-solid border-gray-500 bg-gray-500 text-white p-4" onclick="display('.')">.</button> <button class="rounded-full border-solid border-gray-500 bg-amber-500 text-white p-4" onclick="calc()">=</button> </div> </div> </div> </main> <footer> </footer> </body> </html> © 2022 GitHub, Inc. Terms Privacy Security Status Docs Contact GitHub Pricing API Training Blog About Loading complete
Summary The research study on the global " Animal Prosthetics" market provides a thorough analysis of the most important market segments as well as current trends, market size, and market drivers. The many industry definitions, classifications, applications, and chain structures are also covered in the market report. In addition to this data, the study also discusses the distributor's analysis, marketing channels, possible customers, and development history.The purpose of the global research study is to provide the user with information about market dynamics and predictions for the following years. The report lists the critical elements influencing the industry's growth. The study covers a long-term review of the global market share from various countries and regions. Consumption statistics broken down by kind and application are also provided. Segmenting the global "Animal Prosthetics" market: The report divides the market into categories based on the top manufacturers, multiple types, varied applications, and distinct geographic regions. The presence of well-known regional and international vendors serves to define the market. These well-established competitors have access to a wealth of crucial resources and funding for research and development projects.The firms are also concentrating on the creation of fresh feedstock and technology. This will improve the industry's competitive environment. The USA, Canada, and Mexico are the three most important market regions in North America. Germany, France, Great Britain, Russia, and Italy are the continent's largest market contributors. India, Japan, Korea, and China are some of the top markets in the Asia-Pacific area Egypt, South Africa, and Saudi Arabia are the top industrialized countries in the Middle East and Africa. Brazil, Chile, Peru, and Argentina are the South American countries that provide the most Free Sample Report + All Related Graphs & Charts @ https://www.adroitmarketresearch.com/contacts/request-sample/1889 Overall, the research provides a comprehensive analysis of the parent "Animal Prosthetics" market, important strategies used by top industry players, and emerging market segments. A key component of the study is market analysis, which includes past, present, and future volume and value data as well as research findings. Therefore, that study aids new aspirants in examining the market's upcoming prospects. It outlines the report's key market surveillance, analysis of product costs, and projections for market size and scope from 2020 to 2025. Despite market behavior, factors that affect business growth also involve a thorough examination of market participants, both new and old. Purchase the report at https://www.adroitmarketresearch.com/researchreport/purchase/1889 Key Points Covered in the Report: A thorough analysis of value and volume at the worldwide, sector, and regional levels is included in the global ' Animal Prosthetics' market report. The study offers a full business size ' Animal Prosthetics' from a global point of view through a review of past facts and possible scenarios. Geographically, the Animal Prosthetics of market analysis includes the number of regions and their contrast of revenue. The The market analysis focuses on ex-factory costs, output volume, market share & sales for every manufacturer on a company level basis. Key Reasons to Purchase this Report: A comprehensive study of market size, share and dynamics is a global ' Animal Prosthetics' market research report and a thorough survey of developments in the field. It offers an in-depth overview of revenue growth and an analysis of the total business benefits. In addition to the strategic landscape for commodity pricing and marketing, the ' Animal Prosthetics' industry research also provides key players. This is a new post covering the latest impact on the target market. The research report addresses the rapidly evolving market climate as well as the initial and future impact assessment. ABOUT US: Adroit Market Research is an India-based business analytics and consulting company. Our target audience is a wide range of corporations, manufacturing companies, product/technology development institutions and industry associations that require understanding of a market’s size, key trends, participants and future outlook of an industry. We intend to become our clients’ knowledge partner and provide them with valuable market insights to help create opportunities that increase their revenues. We follow a code– Explore, Learn and Transform. At our core, we are curious people who love to identify and understand industry patterns, create an insightful study around our findings and churn out money-making roadmaps. CONTACT US: Ryan Johnson Account Manager Global 3131 McKinney Ave Ste 600, Dallas, TX 75204, U.S.A Phone No.: USA: +1 9726644514/ +91 9665341414
All 18 repositories loaded