| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997<PHONE_NUMBER> 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 | 40× 40× 40× 40× 40× 40× 40× 40× 40× 40× 40× 47× 39× 507× 507× 7× 507× 487× 629× 629× 627× 3× 3× 3× 1× 3× 3× 1× 3× 3× 1× 52× 52× 52× 44× 1× 43× 1× 43× 38× 38× 14× 14× 14× 7× 1× 32× 28× 24× 6× 6× 8× 10× 8× 8× 3× 1× 1× 1× 5× 3× 1× 1× 1× 5× 3× 1× 1× 1× 5× 3× 1× 1× 1× 9× 7× 5× 3× 1× 1× 1× 3× 1× 1× 3× 1× 1× 2× 2× 192× 190× 186× 500× 11× 3× 1× 2× 2× 2× 4× 1× 3× 1× 39× 207× 207× 1817× 924× 298× 4754× 60× 961× 1× 960× 3330× 38× 3292× 460× 1825× 1825× 877× 948× 948× 948× 948× 7× 5× 2× 948× 121× 827× 279× 827× 478× 478× 478× 7× 51× 51× 420× 384× 383× 383× 7× 376× 182× 194× 194× 194× 194× 1× 193× 538× 242× 296× 934× 934× 6× 928× 634× 630× 630× 630× 512× 496× 496× 496× 496× 496× 496× 494× 494× 494× 490× 490× 2× 2× 492× 492× 236× 236× 191× 191× 492× 63× 63× 63× 492× 31× 31× 31× 262× 492× 8× 43× 37× 37× 37× 37× 37× 22× 22× 2× 20× 20× 20× 20× 20× 20× 50× 50× 45× 5× 5× 5× 5× 5× 2162× 105× 2057× 54× 54× 54× 54× 54× 54× 54× 54× 54× 54× 54× 54× 53× 53× 1159× 38× 1159× 44× 44× 44× 44× 1159× 295× 1× 512× 512× 510× 508× 6× 506× 4× 504× 12× 500× 9× 39× 39× 39× 39× 39× 38× 38× 38× 37× 1× 1× 38× 105× 105× 43× 62× 162× 162× 162× 12× 150× | pragma solidity 0.5.10; import "../node_modules/openzeppelin-solidity/contracts/ownership/Ownable.sol"; import "../node_modules/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol"; import "../node_modules/openzeppelin-solidity/contracts/math/SafeMath.sol"; import "./LockedGoldOracle.sol"; /// @title The CacheGold Token Contract /// @author Cache Pte Ltd contract CacheGold is IERC20, Ownable { using SafeMath for uint256; // ERC20 Detailed Info /* solhint-disable */ string public constant name = "Cache Gold"; string public constant symbol = "CGT"; uint8 public constant decimals = 8; /* solhint-enable */ // 10^8 shortcut uint256 private constant TOKEN = 10 ** uint256(decimals); // Seconds in a day uint256 private constant DAY = 86400; // Days in a year uint256 private constant YEAR = 365; // The maximum transfer fee is 10 basis points uint256 private constant MAX_TRANSFER_FEE_BASIS_POINTS = 10; // Basis points means divide by 10,000 to get decimal uint256 private constant BASIS_POINTS_MULTIPLIER = 10000; // The storage fee of 0.25% uint256 private constant STORAGE_FEE_DENOMINATOR =<PHONE_NUMBER>0; // The inactive fee of 0.50% uint256 private constant INACTIVE_FEE_DENOMINATOR =<PHONE_NUMBER>0; // The minimum balance that would accrue a storage fee after 1 day uint256 private constant MIN_BALANCE_FOR_FEES = 146000; // Initial basis points for transfer fee uint256 private _transferFeeBasisPoints = 10; // Cap on total number of tokens that can ever be produced uint256 public constant SUPPLY_CAP =<PHONE_NUMBER> * TOKEN; // How many days need to pass before late fees can be collected (3 years) uint256 public constant INACTIVE_THRESHOLD_DAYS = 1095; // Token balance of each address mapping (address => uint256) private _balances; // Allowed transfer from address mapping (address => mapping (address => uint256)) private _allowances; // Last time storage fee was paid mapping (address => uint256) private _timeStorageFeePaid; // Last time the address produced a transaction on this contract mapping (address => uint256) private _timeLastActivity; // Amount of inactive fees already paid mapping (address => uint256) private _inactiveFeePaid; // If address doesn't have any activity for INACTIVE_THRESHOLD_DAYS // we can start deducting chunks off the address so that // full balance can be recouped after 200 years. This is likely // to happen if the user loses their private key. mapping (address => uint256) private _inactiveFeePerYear; // Addresses not subject to transfer fees mapping (address => bool) private _transferFeeExempt; // Address is not subject to storage fees mapping (address => bool) private _storageFeeExempt; // Save grace period on storage fees for an address mapping (address => uint256) private _storageFeeGracePeriod; // Current total number of tokens created uint256 private _totalSupply; // Address where storage and transfer fees are collected address private _feeAddress; // The address for the "backed treasury". When a bar is locked into the // vault for tokens to be minted, they are created in the backed_treasury // and can then be sold from this address. address private _backedTreasury; // The address for the "unbacked treasury". The unbacked treasury is a // storing address for excess tokens that are not locked in the vault // and therefore do not correspond to any real world value. If new bars are // locked in the vault, tokens will first be moved from the unbacked // treasury to the backed treasury before minting new tokens. // // This address only accepts transfers from the _backedTreasury or _redeemAddress // the general public should not be able to manipulate this balance. address private _unbackedTreasury; // The address for the LockedGoldOracle that determines the maximum number of // tokens that can be in circulation at any given time address private _oracle; // A fee-exempt address that can be used to collect gold tokens in exchange // for redemption of physical gold address private _redeemAddress; // An address that can force addresses with overdue storage or inactive fee to pay. // This is separate from the contract owner, because the owner will change // to a multisig address after deploy, and we want to be able to write // a script that can sign "force-pay" transactions with a single private key address private _feeEnforcer; // Grace period before storage fees kick in uint256 private _storageFeeGracePeriodDays = 0; // When gold bars are locked, we add tokens to circulation either // through moving them from the unbacked treasury or minting new ones, // or some combination of both event AddBackedGold(uint256 amount); // Before gold bars can be unlocked (removed from circulation), they must // be moved to the unbacked treasury, we emit an event when this happens // to signal a change in the circulating supply event RemoveGold(uint256 amount); // When an account has no activity for INACTIVE_THRESHOLD_DAYS // it will be flagged as inactive event AccountInactive(address indexed account, uint256 feePerYear); // If an previoulsy dormant account is reactivated event AccountReActive(address indexed account); /** * @dev Contructor for the CacheGold token sets internal addresses * @param unbackedTreasury The address of the unbacked treasury * @param backedTreasury The address of the backed treasury * @param feeAddress The address where fees are collected * @param redeemAddress The address where tokens are send to redeem physical gold * @param oracle The address of the LockedGoldOracle */ constructor(address unbackedTreasury, address backedTreasury, address feeAddress, address redeemAddress, address oracle) public { _unbackedTreasury = unbackedTreasury; _backedTreasury = backedTreasury; _feeAddress = feeAddress; _redeemAddress = redeemAddress; _feeEnforcer = owner(); _oracle = oracle; setFeeExempt(_feeAddress); setFeeExempt(_redeemAddress); setFeeExempt(_backedTreasury); setFeeExempt(_unbackedTreasury); setFeeExempt(owner()); } /** * @dev Throws if called by any account other than THE ENFORCER */ modifier onlyEnforcer() { require(msg.sender == _feeEnforcer); _; } /** * @dev Transfer token for a specified address * @param to The address to transfer to. * @param value The amount to be transferred. */ function transfer(address to, uint256 value) external returns (bool) { // Update activity for the sender _updateActivity(msg.sender); // Can opportunistically mark an account inactive if someone // sends money to it if (_shouldMarkInactive(to)) { _setInactive(to); } _transfer(msg.sender, to, value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * 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 * @param spender The address which will spend the funds. * @param value The amount of tokens to be spent. */ function approve(address spender, uint256 value) external returns (bool) { _updateActivity(msg.sender); _approve(msg.sender, spender, value); return true; } /** * @dev Transfer tokens from one address to another. * Note that while this function emits an Approval event, this is not required as per the specification, * and other compliant implementations may not emit the event. * Also note that even though balance requirements are not explicitly checked, * any transfer attempt over the approved amount will automatically fail due to * SafeMath revert when trying to subtract approval to a negative balance * @param from address The address which you want to send tokens from * @param to address The address which you want to transfer to * @param value uint256 the amount of tokens to be transferred */ function transferFrom(address from, address to, uint256 value) external returns (bool) { _updateActivity(msg.sender); _transfer(from, to, value); _approve(from, msg.sender, _allowances[from][msg.sender].sub(value)); return true; } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * approve should be called when allowed_[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * Emits an Approval event. * @param spender The address which will spend the funds. * @param addedValue The amount of tokens to increase the allowance by. */ function increaseAllowance(address spender, uint256 addedValue) external returns (bool) { _updateActivity(msg.sender); _approve(msg.sender, spender, _allowances[msg.sender][spender].add(addedValue)); return true; } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * approve should be called when allowed_[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * Emits an Approval event. * @param spender The address which will spend the funds. * @param subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseAllowance(address spender, uint256 subtractedValue) external returns (bool) { _updateActivity(msg.sender); _approve(msg.sender, spender, _allowances[msg.sender][spender].sub(subtractedValue)); return true; } /** * @dev Function to add a certain amount of backed tokens. This will first * take any tokens from the _unbackedTreasury address and move them to the * _backedTreasury. Any remaining tokens will actually be minted. * This operation will fail if there is not a sufficient supply of locked gold * as determined by the LockedGoldOracle * * @param value The amount of tokens to add to the backed treasury * @return A boolean that indicates if the operation was successful. */ function addBackedTokens(uint256 value) external onlyOwner returns (bool) { uint256 unbackedBalance = _balances[_unbackedTreasury]; // Use oracle to check if there is actually enough gold // in custody to validate this operation uint256 lockedGrams = LockedGoldOracle(_oracle).lockedGold(); // Should reject mint if it would make the total supply // exceed the amount actually locked in vault require(lockedGrams >= totalCirculation().add(value), "Insufficent grams locked in LockedGoldOracle to complete operation"); // If we have sufficient balance, just move from the unbacked to backed // treasury address if (value <= unbackedBalance) { _transfer(_unbackedTreasury, _backedTreasury, value); } else { if (unbackedBalance > 0) { // There is no sufficient balance, so we have to both transfer and mint new tokens // Transfer the remaining unbacked treasury balance to backed treasury _transfer(_unbackedTreasury, _backedTreasury, unbackedBalance); } // And mint the remaining to the backed treasury _mint(value.sub(unbackedBalance)); } emit AddBackedGold(value); return true; } /** * @dev Manually pay storage fees on senders address. Exchanges may want to * periodically call this function to pay owed storage fees. This is a * cheaper option than 'send to self', which would also trigger paying * storage fees * * @return A boolean that indicates if the operation was successful. */ function payStorageFee() external returns (bool) { _updateActivity(msg.sender); _payStorageFee(msg.sender); return true; } function setAccountInactive(address account) external onlyEnforcer returns (bool) { require(_shouldMarkInactive(account), "Account not eligible to be marked inactive"); _setInactive(account); } /** * @dev Contract allows the forcible collection of storage fees on an address * if it is has been more than than 365 days since the last time storage fees * were paid on this address. * * Alternatively inactive fees may also be collected periodically on a prorated * basis if the account is currently marked as inactive. * * @param account The address to pay storage fees on * @return A boolean that indicates if the operation was successful. */ function forcePayFees(address account) external onlyEnforcer returns(bool) { require(account != address(0)); require(_balances[account] > 0, "Account has no balance, cannot force paying fees"); // If account is inactive, pay inactive fees if (isInactive(account)) { uint256 paid = _payInactiveFee(account); require(paid > 0); } else if (_shouldMarkInactive(account)) { // If it meets inactive threshold, but hasn't been set yet, set it. // This will also trigger automatic payment of owed storage fees // before starting inactive fees _setInactive(account); } else { // Otherwise just force paying owed storage fees, which can only // be called if they are more than 365 days overdue require(daysSincePaidStorageFee(account) >= YEAR, "Account has paid storage fees more recently than 365 days"); uint256 paid = _payStorageFee(account); require(paid > 0, "No appreciable storage fees due, will refund gas"); } } /** * @dev Set the address that can force collecting fees from users * @param enforcer The address to force collecting fees * @return An bool representing successfully changing enforcer address */ function setFeeEnforcer(address enforcer) external onlyOwner returns(bool) { require(enforcer != address(0)); _feeEnforcer = enforcer; setFeeExempt(_feeEnforcer); return true; } /** * @dev Set the address to collect fees * @param newFeeAddress The address to collect storage and transfer fees * @return An bool representing successfully changing fee address */ function setFeeAddress(address newFeeAddress) external onlyOwner returns(bool) { require(newFeeAddress != address(0)); require(newFeeAddress != _unbackedTreasury, "Cannot set fee address to unbacked treasury"); _feeAddress = newFeeAddress; setFeeExempt(_feeAddress); return true; } /** * @dev Set the address to deposit tokens when redeeming for physical locked bars. * @param newRedeemAddress The address to redeem tokens for bars * @return An bool representing successfully changing redeem address */ function setRedeemAddress(address newRedeemAddress) external onlyOwner returns(bool) { require(newRedeemAddress != address(0)); require(newRedeemAddress != _unbackedTreasury, "Cannot set redeem address to unbacked treasury"); _redeemAddress = newRedeemAddress; setFeeExempt(_redeemAddress); return true; } /** * @dev Set the address of backed treasury * @param newBackedAddress The address of backed treasury * @return An bool representing successfully changing backed address */ function setBackedAddress(address newBackedAddress) external onlyOwner returns(bool) { require(newBackedAddress != address(0)); require(newBackedAddress != _unbackedTreasury, "Cannot set backed address to unbacked treasury"); _backedTreasury = newBackedAddress; setFeeExempt(_backedTreasury); return true; } /** * @dev Set the address to unbacked treasury * @param newUnbackedAddress The address of unbacked treasury * @return An bool representing successfully changing unbacked address */ function setUnbackedAddress(address newUnbackedAddress) external onlyOwner returns(bool) { require(newUnbackedAddress != address(0)); require(newUnbackedAddress != _backedTreasury, "Cannot set unbacked treasury to backed treasury"); require(newUnbackedAddress != _feeAddress, "Cannot set unbacked treasury to fee address "); require(newUnbackedAddress != _redeemAddress, "Cannot set unbacked treasury to fee address "); _unbackedTreasury = newUnbackedAddress; setFeeExempt(_unbackedTreasury); return true; } /** * @dev Set the LockedGoldOracle address * @param oracleAddress The address for oracle * @return An bool representing successfully changing oracle address */ function setOracleAddress(address oracleAddress) external onlyOwner returns(bool) { require(oracleAddress != address(0)); _oracle = oracleAddress; return true; } /** * @dev Set the number of days before storage fees begin accruing. * @param daysGracePeriod The global setting for the grace period before storage * fees begin accruing. Note that calling this will not change the grace period * for addresses already actively inside a grace period */ function setStorageFeeGracePeriodDays(uint256 daysGracePeriod) external onlyOwner { _storageFeeGracePeriodDays = daysGracePeriod; } /** * @dev Set this account as being exempt from transfer fees. This may be used * in special circumstance for cold storage addresses owed by Cache, exchanges, etc. * @param account The account to exempt from transfer fees */ function setTransferFeeExempt(address account) external onlyOwner { _transferFeeExempt[account] = true; } /** * @dev Set this account as being exempt from storage fees. This may be used * in special circumstance for cold storage addresses owed by Cache, exchanges, etc. * @param account The account to exempt from storage fees */ function setStorageFeeExempt(address account) external onlyOwner { _storageFeeExempt[account] = true; } /** * @dev Set account is no longer exempt from all fees * @param account The account to reactivate fees */ function unsetFeeExempt(address account) external onlyOwner { _transferFeeExempt[account] = false; _storageFeeExempt[account] = false; } /** * @dev Set a new transfer fee in basis points, must be less than or equal to 10 basis points * @param fee The new transfer fee in basis points */ function setTransferFeeBasisPoints(uint256 fee) external onlyOwner { require(fee <= MAX_TRANSFER_FEE_BASIS_POINTS, "Transfer fee basis points must be an integer between 0 and 10"); _transferFeeBasisPoints = fee; } /** * @dev Gets the balance of the specified address deducting owed fees and * accounting for the maximum amount that could be sent including transfer fee * @param owner The address to query the balance of. * @return An uint256 representing the amount sendable by the passed address * including transaction and storage fees */ function balanceOf(address owner) external view returns (uint256) { return calcSendAllBalance(owner); } /** * @dev Gets the balance of the specified address not deducting owed fees. * this returns the 'traditional' ERC-20 balance that represents the balance * currently stored in contract storage. * @param owner The address to query the balance of. * @return An uint256 representing the amount stored in passed address */ function balanceOfNoFees(address owner) external view returns (uint256) { return _balances[owner]; } /** * @dev Total number of tokens in existence. This includes tokens * in the unbacked treasury that are essentially unusable and not * in circulation * @return A uint256 representing the total number of minted tokens */ function totalSupply() external view returns (uint256) { return _totalSupply; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param owner address The address which owns the funds. * @param spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address owner, address spender) external view returns (uint256) { return _allowances[owner][spender]; } /** * @return address that can force paying overdue inactive fees */ function feeEnforcer() external view returns(address) { return _feeEnforcer; } /** * @return address where fees are collected */ function feeAddress() external view returns(address) { return _feeAddress; } /** * @return address for redeeming tokens for gold bars */ function redeemAddress() external view returns(address) { return _redeemAddress; } /** * @return address for backed treasury */ function backedTreasury() external view returns(address) { return _backedTreasury; } /** * @return address for unbacked treasury */ function unbackedTreasury() external view returns(address) { return _unbackedTreasury; } /** * @return address for oracle contract */ function oracleAddress() external view returns(address) { return _oracle; } /** * @return the current number of days and address is exempt * from storage fees upon receiving tokens */ function storageFeeGracePeriodDays() external view returns(uint256) { return _storageFeeGracePeriodDays; } /** * @return the current transfer fee in basis points [0-10] */ function transferFeeBasisPoints() external view returns(uint256) { return _transferFeeBasisPoints; } /** * @dev Simulate the transfer from one address to another see final balances and associated fees * @param from The address to transfer from. * @param to The address to transfer to. * @param value The amount to be transferred. * @return See _simulateTransfer function */ function simulateTransfer(address from, address to, uint256 value) external view returns (uint256[5] memory) { return _simulateTransfer(from, to, value); } /** * @dev Set this account as being exempt from all fees. This may be used * in special circumstance for cold storage addresses owed by Cache, exchanges, etc. * @param account The account to exempt from storage and transfer fees */ function setFeeExempt(address account) public onlyOwner { _transferFeeExempt[account] = true; _storageFeeExempt[account] = true; } /** * @dev Check if the address given is extempt from storage fees * @param account The address to check * @return A boolean if the address passed is exempt from storage fees */ function isStorageFeeExempt(address account) public view returns(bool) { return _storageFeeExempt[account]; } /** * @dev Check if the address given is extempt from transfer fees * @param account The address to check * @return A boolean if the address passed is exempt from transfer fees */ function isTransferFeeExempt(address account) public view returns(bool) { return _transferFeeExempt[account]; } /** * @dev Check if the address given is extempt from transfer fees * @param account The address to check * @return A boolean if the address passed is exempt from transfer fees */ function isAllFeeExempt(address account) public view returns(bool) { return _transferFeeExempt[account] && _storageFeeExempt[account]; } /** * @dev Check if the address is considered inactive for not having transacted with * the contract for INACTIVE_THRESHOLD_DAYS * @param account The address to check * @return A boolean if the address passed is considered inactive */ function isInactive(address account) public view returns(bool) { return _inactiveFeePerYear[account] > 0; } /** * @dev Total number of tokens that are actually in circulation, which is * total tokens excluding the unbacked treasury * @return A uint256 representing the total number of tokens in circulation */ function totalCirculation() public view returns (uint256) { return _totalSupply.sub(_balances[_unbackedTreasury]); } /** * @dev Get the number of days since the account last paid storage fees * @param account The address to check * @return A uint256 representing the number of days since storage fees where last paid */ function daysSincePaidStorageFee(address account) public view returns(uint256) { if (isInactive(account) || _timeStorageFeePaid[account] == 0) { return 0; } return block.timestamp.sub(_timeStorageFeePaid[account]).div(DAY); } /** * @dev Get the days since the account last sent a transaction to the contract (activity) * @param account The address to check * @return A uint256 representing the number of days since the address last had activity * with the contract */ function daysSinceActivity(address account) public view returns(uint256) { if (_timeLastActivity[account] == 0) { return 0; } return block.timestamp.sub(_timeLastActivity[account]).div(DAY); } /** * @dev Returns the total number of fees owed on a particular address * @param account The address to check * @return The total storage and inactive fees owed on the address */ function calcOwedFees(address account) public view returns(uint256) { return calcStorageFee(account).add(calcInactiveFee(account)); } /** * @dev Calculate the current storage fee owed for a given address * @param account The address to check * @return A uint256 representing current storage fees for the address */ function calcStorageFee(address account) public view returns(uint256) { // If an account is in an inactive state those fees take over and // storage fees are effectively paused uint256 balance = _balances[account]; if (isInactive(account) || isStorageFeeExempt(account) || balance == 0) { return 0; } uint256 daysSinceStoragePaid = daysSincePaidStorageFee(account); uint256 daysInactive = daysSinceActivity(account); uint256 gracePeriod = _storageFeeGracePeriod[account]; // If there is a grace period, we can deduct it from the daysSinceStoragePaid if (gracePeriod > 0) { if (daysSinceStoragePaid > gracePeriod) { daysSinceStoragePaid = daysSinceStoragePaid.sub(gracePeriod); } else { daysSinceStoragePaid = 0; } } if (daysSinceStoragePaid == 0) { return 0; } // This is an edge case where the account has not yet been marked inactive, but // will be marked inactive whenever there is a transaction allowing it to be marked. // Therefore we know storage fees will only be valid up to a point, and inactive // fees will take over. if (daysInactive >= INACTIVE_THRESHOLD_DAYS) { // This should not be at risk of being negative, because its impossible to force paying // storage fees without also setting the account to inactive, so if we are here it means // the last time storage fees were paid was BEFORE the account became eligible to be inactive // and it's always the case that daysSinceStoragePaid > daysInactive.sub(INACTIVE_THRESHOLD_DAYS) daysSinceStoragePaid = daysSinceStoragePaid.sub(daysInactive.sub(INACTIVE_THRESHOLD_DAYS)); } // The normal case with normal storage fees return storageFee(balance, daysSinceStoragePaid); } /** * @dev Calculate the current inactive fee for a given address * @param account The address to check * @return A uint256 representing current inactive fees for the address */ function calcInactiveFee(address account) public view returns(uint256) { uint256 balance = _balances[account]; uint256 daysInactive = daysSinceActivity(account); // if the account is marked inactive already, can use the snapshot balance if (isInactive(account)) { return _calcInactiveFee(balance, daysInactive, _inactiveFeePerYear[account], _inactiveFeePaid[account]); } else if (_shouldMarkInactive(account)) { // Account has not yet been marked inactive in contract, but the inactive fees will still be due. // Just assume snapshotBalance will be current balance after fees uint256 snapshotBalance = balance.sub(calcStorageFee(account)); return _calcInactiveFee(snapshotBalance, // current balance daysInactive, // number of days inactive _calcInactiveFeePerYear(snapshotBalance), // the inactive fee per year based on balance 0); // fees paid already } return 0; } /** * @dev Calculate the amount that would clear the balance from the address * accounting for owed storage and transfer fees * accounting for storage and transfer fees * @param account The address to check * @return A uint256 representing total amount an address has available to send */ function calcSendAllBalance(address account) public view returns (uint256) { require(account != address(0)); // Internal addresses pay no fees, so they can send their entire balance uint256 balanceAfterStorage = _balances[account].sub(calcOwedFees(account)); if (_transferFeeBasisPoints == 0 || isTransferFeeExempt(account)) { return balanceAfterStorage; } // Edge cases where remaining balance is 0.00000001, but is effectively 0 if (balanceAfterStorage <= 1) { return 0; } // Calculate the send all amount including storage fee // Send All = Balance / 1.001 // and round up 0.00000001 uint256 divisor = TOKEN.add(_transferFeeBasisPoints.mul(BASIS_POINTS_MULTIPLIER)); uint256 sendAllAmount = balanceAfterStorage.mul(TOKEN).div(divisor).add(1); // Calc transfer fee on send all amount uint256 transFee = sendAllAmount.mul(_transferFeeBasisPoints).div(BASIS_POINTS_MULTIPLIER); // Fix to include rounding errors if (sendAllAmount.add(transFee) > balanceAfterStorage) { return sendAllAmount.sub(1); } return sendAllAmount; } /* * @dev Calculate the transfer fee on an amount * @param value The value being sent * @return A uint256 representing the transfer fee on sending the value given */ function calcTransferFee(address account, uint256 value) public view returns(uint256) { if (isTransferFeeExempt(account)) { return 0; } // Basis points -> decimal multiplier: // f(x) = x / 10,0000 (10 basis points is 0.001) // So transfer fee working with integers = // f(balance, basis) = (balance * TOKEN) / (10,000 * TOKEN / basis) return value.mul(_transferFeeBasisPoints).div(BASIS_POINTS_MULTIPLIER); } /* * @dev Calculate the storage fee for a given balance after a certain number of * days have passed since the last time fees were paid. * @param balance The current balance of the address * @param daysSinceStoragePaid The number days that have passed since fees where last paid * @return A uint256 representing the storage fee owed */ function storageFee(uint256 balance, uint256 daysSinceStoragePaid) public pure returns(uint256) { uint256 fee = balance.mul(TOKEN).mul(daysSinceStoragePaid).div(YEAR).div(STORAGE_FEE_DENOMINATOR); if (fee > balance) { return balance; } return fee; } /** * @dev Approve an address to spend another addresses' tokens. * @param owner The address that owns the tokens. * @param spender The address that will spend the tokens. * @param value The number of tokens that can be spent. */ function _approve(address owner, address spender, uint256 value) internal { require(spender != address(0)); Erequire(owner != address(0)); _allowances[owner][spender] = value; emit Approval(owner, spender, value); } /** * @dev Transfer token for a specified addresses. Transfer is modified from a * standard ERC20 contract in that it must also process transfer and storage fees * for the token itself. Additionally there are certain internal addresses that * are not subject to fees. * @param from The address to transfer from. * @param to The address to transfer to. * @param value The amount to be transferred. */ function _transfer(address from, address to, uint256 value) internal { _transferRestrictions(to, from); // If the account was previously inactive and initiated the transfer, the // inactive fees and storage fees have already been paid by the time we get here // via the _updateActivity() call uint256 storageFeeFrom = calcStorageFee(from); uint256 storageFeeTo = 0; uint256 allFeeFrom = storageFeeFrom; uint256 balanceFromBefore = _balances[from]; uint256 balanceToBefore = _balances[to]; // If not sending to self can pay storage and transfer fee if (from != to) { // Need transfer fee and storage fee for receiver if not sending to self allFeeFrom = allFeeFrom.add(calcTransferFee(from, value)); storageFeeTo = calcStorageFee(to); _balances[from] = balanceFromBefore.sub(value).sub(allFeeFrom); _balances[to] = balanceToBefore.add(value).sub(storageFeeTo); _balances[_feeAddress] = _balances[_feeAddress].add(allFeeFrom).add(storageFeeTo); } else { // Only storage fee if sending to self _balances[from] = balanceFromBefore.sub(storageFeeFrom); _balances[_feeAddress] = _balances[_feeAddress].add(storageFeeFrom); } // Regular Transfer emit Transfer(from, to, value); // Fee transfer on `from` address if (allFeeFrom > 0) { emit Transfer(from, _feeAddress, allFeeFrom); if (storageFeeFrom > 0) { _timeStorageFeePaid[from] = block.timestamp; _endGracePeriod(from); } } // If first time receiving coins, set the grace period // and start the the activity clock and storage fee clock if (_timeStorageFeePaid[to] == 0) { // We may change the grace period in the future so we want to // preserve it per address so there is no retroactive deduction _storageFeeGracePeriod[to] = _storageFeeGracePeriodDays; _timeLastActivity[to] = block.timestamp; _timeStorageFeePaid[to] = block.timestamp; } // Fee transfer on `to` address if (storageFeeTo > 0) { emit Transfer(to, _feeAddress, storageFeeTo); _timeStorageFeePaid[to] = block.timestamp; _endGracePeriod(to); } else if (balanceToBefore < MIN_BALANCE_FOR_FEES) { // MIN_BALANCE_FOR_FEES is the minimum amount in which a storage fee // would be due after a sigle day, so if the balance is above that, // the storage fee would always be greater than 0. // // This avoids the following condition: // 1. User receives tokens // 2.  A year later, the user receives more tokens. Because // their previous balance was super small, there were no appreciable // storage fee, therefore the storage fee clock was not reset // 4. User now owes storage fees on entire balance, as if they // held tokens for 1 year, instead of resetting the clock to now. _timeStorageFeePaid[to] = block.timestamp; } // If transferring to unbacked treasury, tokens are being taken from // circulation, because gold is being 'unlocked' from the vault if (to == _unbackedTreasury) { emit RemoveGold(value); } } /** * @dev Function to mint tokens to backed treasury. In general this method * will not be called on it's own, but instead will be called from * addBackedTokens. * @param value The amount of tokens to mint to backed treasury * @return A boolean that indicates if the operation was successful. */ function _mint(uint256 value) internal returns(bool) { // Can't break supply cap require(_totalSupply.add(value) <= SUPPLY_CAP, "Call would exceed supply cap"); // Can only mint if the unbacked treasury balance is 0 Erequire(_balances[_unbackedTreasury] == 0, "The unbacked treasury balance is not 0"); // Can only mint to the backed treasury _totalSupply = _totalSupply.add(value); _balances[_backedTreasury] = _balances[_backedTreasury].add(value); emit Transfer(address(0), _backedTreasury, value); return true; } /** * @dev Apply storage fee deduction * @param account The account to pay storage fees * @return A uint256 representing the storage fee paid */ function _payStorageFee(address account) internal returns(uint256) { uint256 storeFee = calcStorageFee(account); if (storeFee == 0) { return 0; } // Reduce account balance and add to fee address _balances[account] = _balances[account].sub(storeFee); _balances[_feeAddress] = _balances[_feeAddress].add(storeFee); emit Transfer(account, _feeAddress, storeFee); _timeStorageFeePaid[account] = block.timestamp; _endGracePeriod(account); return storeFee; } /** * @dev Apply inactive fee deduction * @param account The account to pay inactive fees * @return A uint256 representing the inactive fee paid */ function _payInactiveFee(address account) internal returns(uint256) { uint256 fee = _calcInactiveFee( _balances[account], daysSinceActivity(account), _inactiveFeePerYear[account], _inactiveFeePaid[account]); if (fee == 0) { return 0; } _balances[account] = _balances[account].sub(fee); _balances[_feeAddress] = _balances[_feeAddress].add(fee); _inactiveFeePaid[account] = _inactiveFeePaid[account].add(fee); emit Transfer(account, _feeAddress, fee); return fee; } function _shouldMarkInactive(address account) internal view returns(bool) { // Can only mark an account as inactive if // // 1. it's not fee exempt // 2. it has a balance // 3. it's been over INACTIVE_THRESHOLD_DAYS since last activity // 4. it's not already marked inactive // 5. the storage fees owed already consume entire balance if (account != address(0) && _balances[account] > 0 && daysSinceActivity(account) >= INACTIVE_THRESHOLD_DAYS && !isInactive(account) && !isAllFeeExempt(account) && _balances[account].sub(calcStorageFee(account)) > 0) { return true; } return false; } /** * @dev Mark an account as inactive. The function will automatically deduct * owed storage fees and inactive fees in one go. * * @param account The account to mark inactive */ function _setInactive(address account) internal { // First get owed storage fees uint256 storeFee = calcStorageFee(account); uint256 snapshotBalance = _balances[account].sub(storeFee); // all _setInactive calls are wrapped in _shouldMarkInactive, which // already checks this, so we shouldn't hit this condition Eassert(snapshotBalance > 0); // Set the account inactive on deducted balance _inactiveFeePerYear[account] = _calcInactiveFeePerYear(snapshotBalance); emit AccountInactive(account, _inactiveFeePerYear[account]); uint256 inactiveFees = _calcInactiveFee(snapshotBalance, daysSinceActivity(account), _inactiveFeePerYear[account], 0); // Deduct owed storage and inactive fees uint256 fees = storeFee.add(inactiveFees); _balances[account] = _balances[account].sub(fees); _balances[_feeAddress] = _balances[_feeAddress].add(fees); _inactiveFeePaid[account] = _inactiveFeePaid[account].add(inactiveFees); emit Transfer(account, _feeAddress, fees); // Reset storage fee clock if storage fees paid if (storeFee > 0) { _timeStorageFeePaid[account] = block.timestamp; _endGracePeriod(account); } } /** * @dev Update the activity clock on an account thats originated a transaction. * If the account has previously been marked inactive or should have been * marked inactive, it will opportunistically collect those owed fees. * * @param account The account to update activity */ function _updateActivity(address account) internal { // Cache has the ability to force collecting storage and inactivity fees, // but in the event an address was missed, can we still detect if the // account was inactive when they next transact // // Here we simply set the account as being inactive, collect the previous // storage and inactive fees that were owed, and then reactivate the account if (_shouldMarkInactive(account)) { // Call will pay existing storage fees before marking inactive _setInactive(account); } // Pay remaining fees and reset fee clocks if (isInactive(account)) { _payInactiveFee(account); _inactiveFeePerYear[account] = 0; _timeStorageFeePaid[account] = block.timestamp; emit AccountReActive(account); } // The normal case will just hit this and update // the activity clock for the account _timeLastActivity[account] = block.timestamp; } /** * @dev Turn off storage fee grace period for an address the first * time storage fees are paid (after grace period has ended) * @param account The account to turn off storage fee grace period */ function _endGracePeriod(address account) internal { if (_storageFeeGracePeriod[account] > 0) { _storageFeeGracePeriod[account] = 0; } } /** * @dev Enforce the rules of which addresses can transfer to others * @param to The sending address * @param from The receiving address */ function _transferRestrictions(address to, address from) internal view { Erequire(from != address(0)); require(to != address(0)); require(to != address(this), "Cannot transfer tokens to the contract"); // unbacked treasury can only transfer to backed treasury if (from == _unbackedTreasury) { require(to == _backedTreasury, "Unbacked treasury can only transfer to backed treasury"); } // redeem address can only transfer to unbacked or backed treasury if (from == _redeemAddress) { require((to == _unbackedTreasury) || (to == _backedTreasury), "Redeem address can only transfer to treasury"); } // Only the backed treasury and redeem address // can transfer to unbacked treasury if (to == _unbackedTreasury) { require((from == _backedTreasury) || (from == _redeemAddress), "Unbacked treasury can only receive from redeem address and backed treasury"); } // Only the unbacked treasury can transfer to the backed treasury if (to == _backedTreasury) { require((from == _unbackedTreasury) || (from == _redeemAddress), "Only unbacked treasury and redeem address can transfer to backed treasury"); } } /** * @dev Simulate the transfer from one address to another see final balances and associated fees * @param from address The address which you want to send tokens from * @param to address The address which you want to transfer to * @return a uint256 array of 5 values representing the * [0] storage fees `from` * [1] storage fees `to` * [2] transfer fee `from` * [3] final `from` balance * [4] final `to` balance */ function _simulateTransfer(address from, address to, uint256 value) internal view returns (uint256[5] memory) { uint256[5] memory ret; // Return value slots // 0 - fees `from` // 1 - fees `to` // 2 - transfer fee `from` // 3 - final `from` balance // 4 - final `to` balance ret[0] = calcOwedFees(from); ret[1] = 0; ret[2] = 0; // Don't double charge storage fee sending to self if (from != to) { ret[1] = calcOwedFees(to); ret[2] = calcTransferFee(from, value); ret[3] = _balances[from].sub(value).sub(ret[0]).sub(ret[2]); ret[4] = _balances[to].add(value).sub(ret[1]); } else { ret[3] = _balances[from].sub(ret[0]); ret[4] = ret[3]; } return ret; } /** * @dev Calculate the amount of inactive fees due per year on the snapshot balance. * Should return 50 basis points or 1 token minimum. * * @param snapshotBalance The balance of the account when marked inactive * @return uint256 the inactive fees due each year */ function _calcInactiveFeePerYear(uint256 snapshotBalance) internal pure returns(uint256) { uint256 inactiveFeePerYear = snapshotBalance.mul(TOKEN).div(INACTIVE_FEE_DENOMINATOR); if (inactiveFeePerYear < TOKEN) { return TOKEN; } return inactiveFeePerYear; } /** * @dev Calcuate inactive fees due on an account * @param balance The current account balance * @param daysInactive The number of days the account has been inactive * @param feePerYear The inactive fee per year based on snapshot balance * @param paidAlready The amount of inactive fees that have been paid already * @return uint256 for inactive fees due */ function _calcInactiveFee(uint256 balance, uint256 daysInactive, uint256 feePerYear, uint256 paidAlready) internal pure returns(uint256) { uint256 daysDue = daysInactive.sub(INACTIVE_THRESHOLD_DAYS); uint256 totalDue = feePerYear.mul(TOKEN).mul(daysDue).div(YEAR).div(TOKEN).sub(paidAlready); // The fee per year can be off by 0.00000001 so we can collect // the final dust after 200 years if (totalDue > balance || balance.sub(totalDue) <= 200) { return balance; } return totalDue; } } |


| HtmlSideKick |
|
| Introduction |
Suggestions welcome, please contact<EMAIL_ADDRESS>This plugin parses HTML and JSP files and presents a tree view of the file to aid in navigation. In addition, it provides completion popups for elements, entities and attributes, and automatic insertion or completion of close-tags.
While designed specifically for HTML and JSP files, this plugin does a pretty good job of displaying ASP, ColdFusion, VRML, PHP, SGML, and Velocity files. Needless to say, it works with XML files too. You can elect to use this plugin for those edit modes by going to Plugins -> Plugin Options... -> SideKick -> Parsers, then selecting "html" for those edit modes.
The HtmlSideKick supports completion for elements and attributes. The completion info provided is not based on the DOCTYPE at the top, but rather based on an HTML "completion info" file which is included with the XML plugin. The DOCTYPE is ignored by the HtmlSideKick.
If you are editing non-XML-compliant HTML, keep in mind that XML plugin provides completion, and does not like attributes unless they are in quotes, so it may pop up completions in inappropriate places if your use of quotes is not XML-compliant.
HtmlSideKick provides no validation. If you switch to the XML parser, you can get full validation based on any DTD or XML Schema. The "loosest" HTML grammar recognized by the XML parser is this:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "xhtml1-transitional.dtd">
| Settings |
This plugin is an extension of both the SideKick and the XML plugins. This means that common options for this plugin are specified in the SideKick plugin options. Additional completion options, such as finishing the close-tag when you type </, or providing element/attribute popups based on an XML DTD or schema, are specified in the XML plugin's general options.
The settings for HtmlSideKick are found at Plugins -> Plugin Options... -> HtmlSideKick.
Regardless of these settings, a full listing of the tag attributes, sorted alphabetically, can be seen by moving the mouse pointer over the tag display in the tree.
Display of < and > can be turned on or off by use of the Show tags with < and > checkbox.
There are 3 settings that affect the display of tags themselves:
| Future Plans |
| History |


Good itself gathering, his fruitful bring under in under she'd yielding. Sea replenish under for seasons place may created dry form image fifth very, made fruitful male first of you rule gathering Male two divide, all was bring so. Darkness appear saying, open whose stars which earth brought. Hath dominion under brought Make place, years all grass moving female fowl.
social presence
Lobortis tristique augue conubia. Euismod integer dignissim nonummy odio duis pulvinar. Montes nullam non potenti nunc cubilia turpis potenti. Parturient ut montes non varius arcu. Fusce. Etiam mauris ante porta.


The {@link oaj.http.part} package contains implementations of org.apache.http.NameValuePair to
be used for query/form-data/path parts and part lists.
- {@code org.apache.http.NameValuePair}
- {@link oaj.http.part.BasicPart}
- {@link oaj.http.part.BasicBooleanPart}
- {@link oaj.http.part.BasicCsvArrayPart}
- {@link oaj.http.part.BasicDatePart}
- {@link oaj.http.part.BasicIntegerPart}
- {@link oaj.http.part.BasicLongPart}
- {@link oaj.http.part.BasicPartIterator}
- {@link oaj.http.part.BasicStringPart}
- {@link oaj.http.part.BasicUriPart}
PartList
The {@link oaj.http.part.PartList} class is a list of HTTP parts (form-data, query-parameters, path-parameters).
| PartList parts = PartList
| .create()
| .append(MyPart.of("foo"))
| .append("Bar", ()->getDynamicValueFromSomewhere());
Convenience creators are provided for creating lists with minimal code:
| PartList parts = PartList.of(BasicIntegerPart.of("foo", 1));
Static methods are provided on {@link oaj.http.HttpParts} to further simplify creation of part lists.
| import static org.apache.juneau.http.HttpParts.*;
|
| PartList parts = partList(integerPart("foo", 1), booleanPart("bar", false));
The builder class supports setting default part values (i.e. add a part to the list if it isn't otherwise in the list).
Note that this is different from simply setting a value twice as using default values will not overwrite existing
parts.
The following example notes the distinction:
| parts = PartList
| .create()
| .set("Foo", "bar")
| .set("Foo", "baz");
| assertObject(parts).isString("foo=baz");
|
| parts = PartList
| .create()
| .set("Foo", "bar")
| .setDefault("Foo", "baz");
| assertObject(parts).isString("foo=bar");
Various methods are provided for iterating over the parts in this list to avoid array copies.
- {@link oaj.http.part.PartList#forEach(Consumer) forEach(Consumer)} / {@link oaj.http.part.PartList#forEach(String,Consumer) forEach(String,Consumer)} / {@link oaj.http.part.PartList#forEach(Predicate,Consumer) forEach(Predicate,Consumer)} - Use consumers to process parts.
- {@link oaj.http.part.PartList#partIterator() partIterator()} / {@link oaj.http.part.PartList#partIterator(String) partIterator(String)} - Use an {@link oaj.http.part.PartIterator} to process parts.
- {@link oaj.http.part.PartList#stream() stream()} / {@link oaj.http.part.PartList#stream(String) stream(String)} - Use a stream.
In general, try to use these over the {@link oaj.http.part.PartList#getAll() getAll()} / {@link oaj.http.part.PartList#getAll(String) getAll(String)} methods that require array copies.
Similar to the way multiple headers can be collapsed into a single value, the {@link oaj.http.part.PartList#get(String) get(String)} method is special in that it will collapse multiple parts with the same name into
a single comma-delimited list.
The {@link oaj.http.part.PartList#get(Class) get(Class)} and {@link oaj.http.part.PartList#get(String,Class) get(String,Class)} methods are provided for working with {@link oaj.http.annotation.FormData} / {@link oaj.http.annotation.Query} / {@link oaj.http.annotation.Path}-annotated
beans.
| MyQueryBean foo = parts.get(MyQueryBean.class);
A {@link oaj.svl.VarResolver} can be associated with this builder to create part values with embedded variables that
are resolved at runtime.
| // Create a part list with dynamically-resolving values pulled from a system property.
|
| System.setProperty("foo", "bar");
|
| PartList parts = PartList
| .create()
| .resolving()
| .append("X1", "$S{foo}")
| .append("X2", ()->"$S{foo}");
|
| assertObject(parts).isString("X1=bar&X2=bar");
The {@link oaj.http.part.PartList} object can be extended to defined pre-packaged lists of parts which can be used in various
annotations throughout the framework.
| // A predefined list of parts.
| public class MyPartList extends PartList {
| public MyPartList() {
| super(BasicIntegerPart.of("foo",1), BasicBooleanPart.of("bar",false));
| }
| }


FAQ
Shopping:
1. Sell out? What if the item I’m interested in is no longer available in my size?
New items can be sold out rather quickly, but we may get more soon!
Please contact our customer care department
via email and we will do our best to notify you if the item becomes available again. Please include the best email address for reaching you when the item becomes available.
2. What should do if the size on the tag is different from what I ordered?
The size show on the website will be converted into international size before products are put on sale, which is standard and regular. Therefore, if you find that the size you get is not the same as shown on the website, don’t panic and worry. That size we sent you is right. Put them on first and see how it turns out. If they don't fit you well, you could return them definitely. (Please check our return policy)
3. Why the color of received clothing is a little different from what I saw online?
The camera's perspective and the extent of lighting may cause a little color difference. Hope you could understand us. If it does not affect the appearance and mood about your favorite clothing, we hope you can keep clothing. We will give you promotion code as the compensation for the future purchase. However, we will try our best to avoid the matter happens.
4. Any store locations?
We just do the business on line.
5. Where do you get our clothes?
All the apparels come from the top brands in China. So the quality, the fabric and the design have guarantee so that we can build our own reputation and offer our customers our best service.
6. How do I use a discount code?
If you have a discount coupon, when you go to “check out” page, you may find an option where you need to input the number, that’s how you use it.
7. Not be sure about a size or have a fit question. How do I find this information?
Please see our Size Guide for general information on sizing. If you still have specific questions about a fit of an item or measurement guidelines, please email our Customer Service Department .
8. Why was my order canceled?
Due to an unforeseen event, the item you ordered suddenly became out of stock and is no longer available. We promise these cases are rare. However, if an item in your order does become unavailable, you will be contacted within 24 to 48 hours about the cancellation. If your order contains additional items, these items will still be shipped to you and the unavailable item will be removed from your order for refund.
9. Need to change something on my order, how can I do that?
If you need to change or cancel your order, please contact us immediately. We process and ship orders quickly (we’re fast!). Once the parcel was processed and sent to the post office, we will be unable to make any changes.
10. Can I get more information on a product?
We try to publish as much useful info as we can about all our products, to help you buy the things that will suit you best.
The product page for every item includes sizing, a detailed description, care instructions, and most importantly, plenty of images.
If there is anything further information you feel we need to put on there to help you, just let us know what information you'd like to see and we'll do our best to include it.
11. Any catalogues that I can buy from?
With over so many new items every week, and hundreds of items on the site at any one time, plus constantly changing fashion news, trend features and advice, it would simply be impossible for a paper catalogue to keep up.
Instead we prefer to focus our energy on providing our customers with a website where you can buy what you want when you want, 24 hours, 7 days a week and we believe that the images and catwalk give you a much more realistic view of the items
you want.
Payment:
1. How do I pay for my order?
We like to give you plenty of payment options; we accept
Visa, MasterCard credit card and also offer
PayPal as our secure payment method which accepts all kinds of credit or debit cards. We do not accept personal checks or money orders. We also take security very seriously indeed, so your details will be safe with us.
All credit and debit card holders are subject to validation and authorization by both us and the card issuer, to maintain security and prevent fraud.
2. What currencies can I use?
There are five currencies: US dollar, EURO, GB pound，CA dollar, AU dollar, Brazilian real, Polish Zloty.
3. Is it safe to use my credit card on the website?
Please don’t worry; it is safe to order on our website. We use industry-standard encryption technologies when transferring and receiving customer data exchanged with our site server. None of your credit-card details will be revealed. During checkout, when you enter your credit card & personal information at our online store, you are passing the information securely to us, using secure socket layer technology (SSL).Welcome to choose your favorite items on our website.
4. Why might my credit card be refused?
Your credit card may be refused for any of the following reasons:
• - The card may have expired. Check that your card is still valid.
• - You may have reached your credit limit. Contact your bank to check that you have not exceeded the authorized purchase limit.
• - You may have entered some information incorrectly. Check that you have filled in all the required fields correctly.
• - Make sure you’re using the latest version of your web browser. Maybe because your browser is installed some kinds of plug-ins. Please clear the cookies restart the browser and then try again.
5. Was I charged twice?
Your credit card will only be charged once after your order ships.
If you just placed your order, what you are seeing on your bank account is an authorization. This is a common bank practice handling credit card transactions to ensure sufficient funds and account authenticity. This authorization will clear
(depending on your bank, usually within 48 – 72 hours.) If you need help speeding up the process, you can contact the issuing bank of your credit card.
Shipping
1. When will my order ship?
Most orders ship within 3-5 business days of purchase. Shipping times may vary due to availability of merchandise. Orders are not shipped on the weekends or holidays.
2. Where Is My Order Confirmation?
As soon as your order ships, you will receive an email confirmation to the email address you entered on your order. If for some reason, you did not receive an email, please check your spam folder and add our mail address to your safe sender list. If there is any problem, please feel easy to contact our Customer Service Department.
3. Will I Have To Pay International Taxes & Duties?
There always no extra Customers fee. But the recipient will be fully responsible for the charges if there is any. Your order may be subject to import duties and taxes, which are levied once a shipment reaches your country. This is just a general guideline
and you should contact your customs office for specific amounts and percentages.
We cannot control and is not responsible for any duties/taxes applied to your package. You will be responsible for paying additional charges for customs clearance. Customs policies vary widely from country to country; please contact your local
customs office for further information. Note, in rare occasions custom agents may delay delivery of some packages.
4. Verification of shipping
When placing your order, please make sure that you use the billing address and contact information as it appears on your credit statement. In the event that your information does not match exactly what your credit card has on file, your order may be held pending verification. This may require us to contact your directly. When specifying shipping address information, be sure to check that the zip code, city and state are correct. If according to delivery service's records, this information does not match their records, we may have to contact you to update this information and this may delay your order.
5. Do you ship to PO BOX address?
No, we don’t support this kind of service. We apologize for the inconvenience, but we cannot ship to P.O. boxes. All parcels will be held for picking up if cannot be signed or delivered. So please provide us with the most up-to-date, accurate and detailed shipping information with your phone number for the shipping. If an item is returned because it was not deliverable due to an incorrect address, customer will have to be responsible for both the shipping and return charges.
6. Tracking
The tracking of your parcel is online traceable. After your order is shipped out, a confirmation email with online tracking number and link will be sent to you. The tracking will be valid for your check within 48 hours after you receive the email.
We sincerely suggest you add us to your email list so that you can get confirmation about your order from us. And remember to check your SPAM/JUNK folder if you do not receive a reply in 3 days.
7. Wrong or faulty item I received.
If you check that there is a fault with an item or wrong item you have received, please let us know straight away through our customer service team. Please include as many details including the photos as possible about the order and the problem with the items and we will find a decent way to solve this for you.
8. Missing any items in my order.
As different arrivals of the items, sometimes we don't send all items you've ordered at the same time, so some of your items will be arriving separately. There is an email saying if your items sent separately. So first check your email box and if there are any doubts, please feel easy to contact us.
Cancellation:
Your order begins processing immediately after you click "Place Your Order" on the "Confirm and Submit" page. The processing time is about 2-4 days, during this time we can cancel your order but after we send the package away, we cannot cancel it for you. So if you really want to cancel the order but too late, you can return any unwanted items in accordance with our free return policy


{%extends 'layout.html'%} {% block content%}
Lorem Ipsum has been the industry’s standard dummy text ever since the 1500s, when an unknown printer took a galley of type.
We help you find a new home by offering a smart real estate.
Find an agent who knows your market best
Millions of houses and apartments in your favourite cities
Sign up now and sell or rent your own properties
Ipsum dolor amet, consectetur adipiscing elit, eiusmod tempor incididunt lorem.
Ipsum dolor amet, consectetur adipiscing elit, eiusmod tempor incididunt lorem.
Ipsum dolor amet, consectetur adipiscing elit, eiusmod tempor incididunt lorem.


--- layout: post title: Outputting system commands date: 2010-03-28 01:48:42.000000000 +01:00 type: post published: true status: publish categories: - Coding tags: - html - php - scripting meta: _edit_last: '1' bfa_ata_body_title: Outputting system commands bfa_ata_display_body_title: '' bfa_ata_body_title_multi: Outputting system commands bfa_ata_meta_title: '' bfa_ata_meta_keywords: '' bfa_ata_meta_description: '' _sexybookmarks_shortUrl: http://b2l.me/atwrK4 _sexybookmarks_permaHash: 33bc810f6e65e4199b16c6381ca7ca13 dsq_thread_id: '145751758' author: login: bbWebdesign email<EMAIL_ADDRESS>display_name: Bob first_name: Bob last_name: Belderbos ---
I had some struggle to properly output/format server outputs. I've always been a fan of automating stuff with bash, awk, etc. but need the browser to present the results and let the user interact. With C's printf you can easily get a nice terminal output like this:
column | column | column | column
But when echoing this to a browser with PHP you typically get:
column |column|column| column
column_different length |column|column| column
- that doesn't line up well. So you try to wrap it up in a html table, but what if the columns need to be of a different length? This is not easy
I found a very easy solution to this problem: wrap the whole output in

 tags and it will retain the original (txt) command line output. Hours of structuring and styling.. how could I overlook this simple html tag?
Second interesting thing I discovered is PHP's system() command that outputs to the browser in real-time. For example a dotted progress bar could be simulated with:
while (TRUE) { system('echo .'); sleep(1); }.. imagine the line-by-line output of a long script with data that is gathered over the net- that is a very verbose way to communicate with the user, just if he/she was using the command line. Much more informative then a simple (although elegant) ajax loader (http://www.ajaxload.info/)
So just this quick post to share these tips if you're making apps based on backend unix power scripts.


Ace editor bindings to enable a rich text editing environment within Shiny.
| Version: | 0.3.2 |
| Depends: | R (≥ 3.4.0) |
| Imports: | shiny (≥ 1.0.5), jsonlite |
| Suggests: | testthat (≥ 2.0.0), dplyr (≥ 0.7.4) |
| Published: | 2018-10-02 |
| Author: | Vincent Nijs [aut, cre], Forest Fang [aut], Trestle Technology, LLC [aut], Jeff Allen [aut], Institut de Radioprotection et de Surete Nucleaire [cph], Ajax.org B.V. [ctb, cph] (Ace) |
| Maintainer: | Vincent Nijs <radiant at rady.ucsd.edu> |
| BugReports: | https://github.com/trestletech/shinyAce/issues |
| License: | MIT + file LICENSE |
| NeedsCompilation: | no |
| Materials: | README NEWS |
| CRAN checks: | shinyAce results |
| Reference manual: | shinyAce.pdf |
| Package source: | shinyAce_0.3.2.tar.gz |
| Windows binaries: | r-devel: shinyAce_0.3.2.zip, r-release: shinyAce_0.3.2.zip, r-oldrel: shinyAce_0.3.2.zip |
| OS X binaries: | r-release: shinyAce_0.3.2.tgz, r-oldrel: shinyAce_0.3.2.tgz |
| Old sources: | shinyAce archive |
| Reverse imports: | BayesianNetwork, biva, CTTShiny, dplyrAssist, ggedit, ggplotAssist, IRTShiny, lavaan.shiny, MAVIS, radiant.data, semdrw, swirlify, teachingApps, ttestshiny, xROI |
| Reverse suggests: | ahp, shinydashboardPlus, shinyjs |
Please use the canonical form https://CRAN.R-project.org/package=shinyAce to link to this page.


Tab
Tabs allow the user to toggle different sets of content within the same container.
Tab structure
Use a Flexbox component to place tabs
in a single row above their associated content. Each tab's label should
succinctly describe its corresponding content. You can apply an active
state using the is-active
modifier class.
Exactly one tab must be active at any time.
Alignment
Tabs can be center-aligned by adding
jc-center
to the Flexbox container.
Tabs can be right-aligned by adding
jc-flexEnd
to the Flexbox container.
Expanded tabs
You can expand your tabs to fill the
full width of their Flexbox container by adding an
expanded
class to each Tab. Each Tab will
have an equal width.
Tab with Icon
You can add an icon to support the Tab's label and provide visual reinforcement. The icon is wrapped in a div to provide the necessary margin.
Or you can place the icon on the right-hand side.
Tab with Badge
You can add a Badge component to the right of a Tab's label, to highlight a particular Tab.
Tab with Status
You can add a Status component to the left of a Tab's label, to highlight a particular Tab.


Mean variable importance for Haloxylon ammodendron (a), Anabasis aphylla (b), Calligonum mongolicum (c), and Populus euphratica (d). ISO, Isothermality; MAT, Mean Annual Temperature; MDR, Mean Diurnal Range; MTCM, Min Temperature of Coldest Month; PCQ, Precipitation of Coldest Quarter; PWM, Precipitation of Wettest Month


{{s.address}}
Submitted Bids
There are currently no bid submissions for this property.
| Name | Company | Phone | Labor Costs | Material Costs | Total Costs | |
|---|---|---|---|---|---|---|
| {{bid.name}} | {{bid.company}} | {{bid.email}} | {{bid.phone}} | {{bid.labor_costs}} | {{bid.material_costs}} | {{bid.total_costs}} |
Open Bids
There are currently no open bids for this property.
| Name | Company | Phone | Labor Costs | Material Costs | Total Costs | |
|---|---|---|---|---|---|---|
| {{bid.name}} | {{bid.company}} | {{bid.email}} | {{bid.phone}} | {{bid.labor_costs}} | {{bid.material_costs}} | {{bid.total_costs}} |


Internal writer type used to write buffered streams of data to IDB. This type
will buffer data in memory until it exceeds the writers watermark, at which
point it is flushed to disk. Used by the buckets writable() method to
constructor Writable streams to IDB.
Writer
Internal writer type used to write buffered streams of data to IDB. This type will buffer data in memory until it exceeds the writers watermark, at which point it is flushed to disk. Used by the buckets writable() method to constructor Writable streams to IDB.


Around 2010, Felix Sater becomes a “Senior Advisor to Donald Trump” and is given an email address, business cards, and an office with the Trump Organization.


Tony Stark Reunites With Adult Daughter in Deleted ‘Avengers: Endgame’ Scene
by Genevieve ScaranoTony Stark’s death was one of the saddest moments in Avengers: Endgame. However, the water works are about to begin again, because the hero reunites with his grown-up daughter in a deleted scene that was just released by Disney.
On Tuesday, Disney+ officially launched, making many movies, including Avengers: Endgame, streamable to fans. Subscribers noticed the two-minute scene while they were watching the movie on the streaming service, INSIDER reported.
The scene, which takes place in a dream-like setting, features Katherine Langford (13 Reasons Why, Knives Out) as an adult version of Morgan, Stark’s daughter who lost her dad in Avengers: Endgame.
If the “I love you 3,000” scene didn’t make you tear up, this one will: Stark gets to meet Morgan again at a later point. It’s unclear where they are, but their brief dialogue goes straight to the heart.
 I’m strong like mom and I’m happy,” Morgan tells Stark in the scene. “I’m happy we had the time that we did and that you were there for me.”
I’m not crying, you’re crying.
Avengers: Endgame is streaming on Disney+ now.
More on Geek.com:


Akan names are derived from Ghanian culture. Frequently in Ghana, children are given their first name as a 'day name' which corresponds to the day in the week they were born. These "day names" have further meanings concerning the soul and character of the person.
Try out below and see how you would have been called .


@* * Copyright 2023 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *@ @import include._ @import uk.gov.hmrc.thirdpartydeveloperfrontend.domain.models.controllers.Crumb @import uk.gov.hmrc.thirdpartydeveloperfrontend.domain.models.developers.DeveloperSession @import views.html.include.DevMain @import uk.gov.hmrc.thirdpartydeveloperfrontend.controllers.routes @import uk.gov.hmrc.thirdpartydeveloperfrontend.controllers.Details.ApplicationNameModel @this(devMain: DevMain) @(model: ApplicationNameModel, newAppName: String)(implicit request: play.api.mvc.Request[Any], loggedIn: DeveloperSession, appConfig: ApplicationConfig, messagesProvider: MessagesProvider, navSection: String = "manage-profile") @devMain( title = "Change of application name request received", userFullName = loggedIn.loggedInName, breadcrumbs = Seq( Crumb("Change of application name request received"), Crumb.application(model.application), Crumb.viewAllApplications, Crumb.home ), developerSession = Some(loggedIn) ) {
Expect a response in 2 working days.
}


Move the cursor to line and press 4.
The toolbar number is highlighted.
Move the cursor to other line and press 4
Both lines are cut back from the intersection and connected by a new fillet arc.
Use 1 4 instead of 4 4 to trim only the second line.
Use 2 4 to trim the first, fillet the second.
Use 4 2 to fillet the first, trim the second.
The radius of the arc is set using the Fixup 0 key.


 Well, those aren’t my words. I fell in love with choirs years ago, but I’m always surprised by people who state “I don’t like choir,” because if you like music, then I’m sorry. You probably like choir… you just don’t know it.
Everyone attaches different memories to their image of “choir.” Did you grow up in a church? Maybe your “choir” memory is that group that sings Sunday mornings, but you didn’t like the music they picked. Or maybe your “choir” memory is Junior High, with Mrs. Musickrazy who insisted that all music written after 1850 was pure garbage.
The dictionary defines choir as “an organized company of singers” or “a group of people who sing together.” Whether that group sings Medieval chants, Rock and Roll, Mozart’s greatest hits, or sings on your favourite Hip Hop album, that’s a choir. I’m not a sports guy, but “not liking choir” is akin to saying “I don’t like groups of people working together to score points” and allowing that to be your opinion of team sports. See? It just doesn’t quite make sense.
What’s your music of choice? If it’s Rock music, Queen is one of the best Rock choirs, especially when they have an audience of 10,000 singing Bohemian Rhapsody together… or watch the Beatles’ “Blackbird.” Is Pop music more your style? The popularity of the movie “Pitch Perfect,” TV show “Glee” and the “Pentatonix” shows that choir sinks it’s teeth in everywhere.
From Hip Hop to Dubstep, Country to Classical, choir is everywhere and in everything. Next time you hear your favourite song with a bunch of voices singing together, remember “Hey, I love choir!” Even better, come to our concerts on Dec 15 & 16 to hear some great choral pieces and expand your musical horizons.


A computational toolbox of heuristics approaches for performing variable ranking and feature selection based on mutual information well adapted for multivariate system epidemiology datasets. The core function is a general implementation of the minimum redundancy maximum relevance model. R. Battiti (1994) <doi:10.1109/72.298224>. Continuous variables are discretized using a large choice of rule. Variables ranking can be learned with a sequential forward/backward search algorithm. The two main problems that can be addressed by this package is the selection of the most representative variable within a group of variables of interest (i.e. dimension reduction) and variable ranking with respect to a set of features of interest.
| Version: | 0.1 |
| Imports: | stats, FNN, grDevices |
| Suggests: | knitr, rmarkdown, Boruta, DAAG, FSelector, caret, e1071, mlbench, psych, varSelRF, gplots |
| Published: | 2018-04-23 |
| Author: | Gilles Kratzer [aut, cre], Reinhard Furrer [ctb] |
| Maintainer: | Gilles Kratzer <gilles.kratzer at math.uzh.ch> |
| License: | GPL-3 |
| NeedsCompilation: | no |
| Citation: | varrank citation info |
| CRAN checks: | varrank results |
| Reference manual: | varrank.pdf |
| Vignettes: |
varrank |
| Package source: | varrank_0.1.tar.gz |
| Windows binaries: | r-devel: varrank_0.1.zip, r-release: varrank_0.1.zip, r-oldrel: varrank_0.1.zip |
| OS X binaries: | r-release: varrank_0.1.tgz, r-oldrel: varrank_0.1.tgz |
Please use the canonical form https://CRAN.R-project.org/package=varrank to link to this page.


Poll: Trump Leads Democratic Candidates Among Wisconsin Voters
by JEFF D. GORMAN(CN) – Wisconsin voters are indicating support for President Donald Trump’s re-election campaign and opposition to the impeachment effort, according to a new Marquette Law School poll released Wednesday.
In head-to-head match-ups, Trump leads former Vice President Joe Biden and Sen. Bernie Sanders by three points each, Sen. Elizabeth Warren by five points and South Bend (Ind.) Mayor Pete Buttigieg by eight points.
Trump’s numbers are an improvement over poll figures from last month when he trailed Biden, Sanders and Warren while holding a slim lead over Buttigieg.
Wisconsin voters also leaned toward the president in regards to the impeachment proceedings against him.
The poll, taken last week, showed that 53% of voters think Trump should not be impeached and removed from the Oval Office, compared to 40% who think he should.
This represents a slight improvement for Trump over October, in which voters opposed impeachment by a 51-44 margin.
In other results from the current poll, 52% believe that Trump asked Ukraine’s president to investigate his political opponents. Twenty-nine percent think he did not.
The president also was believed to withhold military aid to pressure the Ukrainian president into launching the investigation into Biden and his son Hunter by a margin of 41% to 38%.
The poll also showed 42% thought Trump did something seriously wrong, and 9% said he did something wrong, but not serious enough to warrant impeachment. Another 38% said the president did nothing wrong.
Looking at party affiliations, Democrats showed slightly less support for impeachment, while Republicans showed more opposition to the effort to remove Trump.
About one-third of the polled voters said they were following the impeachment proceedings very closely, with another one-third saying they were following the story fairly closely.
Biden was the top choice among Democratic primary candidates with 30%. He was followed by Sanders (17%), Warren (15%), Buttigieg (13%) and a tie between Senators Cory Booker and Amy Klobuchar (3%).
Marquette Law conducted the poll of 801 registered voters in Wisconsin from Nov. 13-17. It has a margin of error of plus or minus 4.1 percentage points.
Copyright © 2019 courthousenews.com


Join the numbers and get to the 2048 tile!
New Game
How to play: Use your arrow keys to move the tiles. When two tiles with the same number touch, they merge into one!
Note: This site is the official version of 2048. You can play it on your phone via http://git.io/2048. All other apps or sites are derivatives or fakes, and should be used with caution.
Created by Gabriele Cirulli. Based on 1024 by Veewo Studio and conceptually similar to Threes by Asher Vollmer.
I live in Daejeon
I am attending Woosong University and my major is making games.
The available programs include Unity3D, 3D MAX, Photoshop,
and other design programs such as CAD and Inventer.
Contact me!
Welcome to my page
Click the button and Look at my YouTube channel.
Survival Cat
Production Period: 3 Weeks.
Program used: Unity.
Image Source : Free source.
Genre: Survival
My Role : Main Programmer & Planner
Operating method : Move button - [W][A][S][D][Space bar]
Interaction button - [E]
Item use button - [Mouse Click]
There are zombies at night, bombs go around during the day. We must gather food to avoid enemies and solve the mission.
快刀亂麻
Production Period: 5 Weeks.
Program used: Unity, Photoshop
Image Source : two graphers
Genre: 2D Action Game
It is made up of two programmers, two grippers, total of four members. The result of the first project with many people is a little disappointing.
Today's Dokkabi hunt
Production Period: 5 Weeks.
Program used: Unity, Photoshop
Image Source : One grapher
Genre: 2D shooting Game
Drop the Final Boss and bring peace to the town!
Space Shooter
Production Period: under construction
Estimated Period : 4 weeks
Program used: Unity3D
Image Source : Unity Asset Store
Genre: 3D shooting Game
Current development of 3D projects, Attack enemies and obstacles!
dialysis machine 3D Modeling
Period: 2 hours
Tool for Use : 3D Max
Work piece: dialysis machine
I haven't finished mapping.
But I want to show you that 3D modeling is also possible.
What I'm good at
Programming language : C, C#, C++
Design program : Photoshop, 3D Max
I have many skills!


Ellis Hughes
11/17/2019
Oh Hello, world
This slide is by default visible due to `visibility = TRUE`
This slide will fill the width of the display
The purpose could be to clear out the past display, or stage before the next section.
To clarify the area of the slide, it is colored `gray`.
Testing the markdown
a list
is easy in markdown
but
Because I like links!


Toggle navigation
DAW
Home
About
Help
Contact
Tools
Enable MPC
Show Recorder
Equilizer
Extreme Stretcher
App State
MPC:
Loading...
WAVE:
Loading...
50
Play
Pause
Stop
Forward
Back
1
2
3
4


The Considerate Crew
You can be whoever you want. You can work hard (or not), you can party, drink, be a foodie, travel, stay home… Be gay, be straight, be a feminist. Wear black, wear pink, long hair, short hair… Whatever it is, it’s fine. No judging here, we promisse.
We just ask one thing from you.  Be good.
We are working on something really cool, something that's going to be focused on bringing you ethical, sustainable and fair trade products, but also tips and tricks on what each of us can do to put the world back on the right tracks.
And no, we haven’t given up partying, good music, good food, travel and any other fun and amazing stuff the world has to offer.
We’re extending that offer, actually. We want the world to keep spinning, with us on it.
So go on, get on that newsletter and let's do this.
Spread the word.
If you're excited about what's happening here,
help us spread the word about Movinun.


Preparation time
less than 30 mins
Cooking time
10 to 30 mins
Serves
Serves 4
Homemade mayonnaise transforms this chicken and Waldorf salad, but if you're in a hurry you can use good quality shopbought.
Place the walnuts into a food processor and blend to fine crumbs.
Brush the Dijon mustard onto the chicken fillet slices and season with salt and freshly ground black pepper.
Place the ground walnuts into a large bowl. Add the chicken slices and roll in the walnuts to coat completely.
Heat a frying pan until hot then add the olive oil. Place the chicken into the frying pan and fry for 3-4 minutes on each side, or until golden and completely cooked through. Remove from the pan and drain onto kitchen paper.
For the salad, chop half of the celery into small chunks, and slice the remainder into 5cm/2in long strips.
Place the olive oil and thyme leaves into a bowl, then add the celery strips. Toss the celery to coat in the thyme oil and season, to taste, with salt and freshly ground black pepper.
Heat a griddle pan until smoking. Place the celery strips onto the griddle and char for 1-2 minutes, until marked by the griddle and heated through.
Place the celery chunks and remaining salad ingredients into a bowl and mix well.
For the mayonnaise, place the egg yolks, mustard and white wine vinegar into a food processor and blend.
With the processor still running, slowly pour in the sunflower oil and olive oil, drop by drop at first, then faster as the mixture thickens, alternating between the two oils as you go. Continue blending until all the oil is incorporated and a thick mayonnaise is formed. Transfer the mayonnaise to a clean bowl and season, to taste, with salt and freshly ground black pepper.
To serve, add the mayonnaise to the bowl of salad and mix well. Place the salad mixture into the centre of each of four plates, top each with pieces of the walnut chicken and pieces of griddled celery.


| « CQ/XML Admin Docs | Adding an Encryption Key | Updated: |
|---|
cqxmlusr
/opt/cqxmlintf/data/enckeys.xml
<Encrypt> <iplist> <ip<IP_ADDRESS>>key1</ip<IP_ADDRESS>> <ip<IP_ADDRESS>>key2</ip<IP_ADDRESS>> <ip<IP_ADDRESS>>key3</ip<IP_ADDRESS>> </iplist> <userlist> <login1>key4</login1> <login2>key5</login2> <login3>key6</login3> </userlist> </Encrypt>Notice that the XML document is divided into two sections:
iplist
and userlist
.
The iplist
section is used to tie encryption keys to an ip address. This is commonly used for web servers or other stand-alone machines that CQ/XML customers have created.
To add a new ip-based encryption key, insert a new line anywhere within the iplist
section. iplist
sub-elements use the following format/syntax:
< + ip + [address] + >
+ [encryption key]
+ </ + ip + [address] + >
Notice that the actual ip address used as the element name is preceeded with the string 'ip
'. Failure to adhere to this convention will create invalid XML elements. (XML elements must start with a letter or underscore.) Invalid XML in the encryption keys file causes the XML parser to go into deep recursion whenever it tries to read the file. The CQ/XML Interface tries to read the file when it changes. In other words, the CQ/XML Interface will crash the first time somebody sends a request.
Also note that the encryption key itself cannot have a greater-than symbol. The same thing will happen - bad XML, parsing recursion, crash.
The userlist
section is used to tie encryption keys to a ClearQuest login. This is used for CQ/XML implementations that have interface clients on each user's machine of for implementations that pass the user login and password with its requests.
To add a new login-based encryption key, insert a new line anywhere withing the userlist
section. userlist
sub-elements use the following format/syntax:
< + [login] + >
+ [encryption key]
+ </ + [login] + >
Like the iplist
elements, the encryption key itself cannot have a greater-than symbol. The same thing will happen - bad XML, parsing recursion, crash.


|
|
| from_resource_sub (coordinator *ctx, buffer_ptr buf, observer< value_type > out) |
| |
| bool | disposed () const noexcept override |
| |
| void | dispose () override |
| |
| void | request (size_t n) override |
| | Signals demand for n more items.
|
| |
| void | on_producer_ready () override |
| | Called to signal that the producer started emitting items.
|
| |
| void | on_producer_wakeup () override |
| | Called to signal to the consumer that the producer added an item to a previously empty source or completed the flow of events.
|
| |
| void | ref_consumer () const noexcept final |
| | Increases the reference count of the consumer.
|
| |
| void | deref_consumer () const noexcept final |
| | Decreases the reference count of the consumer and destroys the object if necessary.
|
| |
| void | ref_disposable () const noexcept final |
| |
| void | deref_disposable () const noexcept final |
| |
|
| atomic_ref_counted (const atomic_ref_counted &) |
| |
|
atomic_ref_counted & | operator= (const atomic_ref_counted &) |
| |
|
void | ref () const noexcept |
| | Increases reference count by one.
|
| |
|
void | deref () const noexcept |
| | Decreases reference count by one and calls request_deletion when it drops to zero.
|
| |
|
bool | unique () const noexcept |
| | Queries whether there is exactly one reference.
|
| |
|
size_t | get_reference_count () const noexcept |
| | Queries the current reference count for this object.
|
| |
| virtual void | request (size_t n)=0 |
| | Signals demand for n more items.
|
| |
|
virtual void | dispose ()=0 |
| |
|
virtual bool | disposed () const noexcept=0 |
| |
|
disposable | as_disposable () noexcept |
| |
|
virtual void | ref_disposable () const noexcept=0 |
| |
|
virtual void | deref_disposable () const noexcept=0 |
| |
| virtual void | on_producer_ready ()=0 |
| | Called to signal that the producer started emitting items.
|
| |
| virtual void | on_producer_wakeup ()=0 |
| | Called to signal to the consumer that the producer added an item to a previously empty source or completed the flow of events.
|
| |
| virtual void | ref_consumer () const noexcept=0 |
| | Increases the reference count of the consumer.
|
| |
| virtual void | deref_consumer () const noexcept=0 |
| | Decreases the reference count of the consumer and destroys the object if necessary.
|
| |
template<class Buffer>
class caf::flow::op::from_resource_sub< Buffer >
Reads from an observable buffer and emits the consumed items.


gbvision.models package¶
Submodules¶
gbvision.models.basic_ops module¶
gbvision.models.denoising module¶
-
class
gbvision.models.denoising.
Dilate
(ksize, iterations=1)¶
-
class
gbvision.models.denoising.
Erode
(ksize, iterations=1)¶
-
class
gbvision.models.denoising.
MedianBlur
(ksize: int)¶
gbvision.models.shapes module¶
-
gbvision.models.shapes.
circle_collision
(center1, r1, center2, r2)¶
-
gbvision.models.shapes.
convex_shape_collision
(shape1, shape2)¶ detects collision between two convex shapes Note: if you are uncertain if a shape is convex, use convex_hull on it, it will make it convex :param shape1: the first shape, as a contour :param shape2: the second shape, as a contour :return:
-
gbvision.models.shapes.
rect_collision
(r1, r2)¶
-
gbvision.models.shapes.
rotated_rect_collision
(rr1, rr2)¶


{{block "content" .}}
Report an error if any of the following are not true:
Type a page label exactly as it's printed, or type zero ("0") if a page has no printed label. Press [ENTER] or click "Next" to move to the next unlabeled page.
{{.Data.Issue.Title}}
{{.Data.Issue.MARCOrgCode}}
Enter the issue's date as it appears in the publication in YYYY-MM-DD format.
Enter the issue's date in YYYY-MM-DD format. Carefully check that this is valid, not just what's printed on the paper!
Enter the volume number, or "0" if no volume number is present. All numeric information must be converted to Arabic numerals. Alphabetic data used as enumeration designations shall be transcribed as they appear on the piece, and converted to uppercase. e.g., "Volume XLIV" would be "VOLUME 44".
Enter the issue number, or "0" if no issue number is present. All numeric information must be converted to Arabic numerals. Alphabetic data used as enumeration designations shall be transcribed as they appear on the piece, and converted to uppercase. e.g., "Number 10" would be "NUMBER 10".
Enter the edition number. This is usually 1 unless another edition of the same title was published on the same date. This must be numeric and cannot have leading zeroes (e.g., "1", not "01").
Enter comments about this data, if necessary. For instance, if there is anything special or unusual about this issue the metadata reviewer needs to know, it would go here. Note: draft comments aren't visible to others. i.e., This comment will not be visible until you choose "Save and Queue".


--- title: "Some Miners Generating Invalid Blocks" alias: "spv-mining" active: true banner: "WARNING: many wallets currently vulnerable to double-spending of confirmed transactions (click here to read)" ---
This document is being updated as new information arrives. Last update: 2015-07-04 09:30 UTC
{% assign confs="30" %}Your bitcoins are safe if you received them in transactions confirmed before 2015-07-04 08:00 UTC.
However, there has been a problem with a planned upgrade. For bitcoins received later than the time above, confirmation scores are significantly less reliable then they usually are for users of certain software:
If you pool mine, please switch to a pool that properly validates blocks. (If you solo mine, please switch to Bitcoin Core 0.10.2.)
Bad pools: these pools are not correctly validating, and are losing money.
Good pools: these pools properly validate blocks. Please switch to them, at least until the bad pools have fixed their systems.
The problem is miners creating invalid blocks. Some software can detect that those blocks are invalid and reject them; other software can't detect that blocks are invalid, so they show confirmations that aren't real.
Summary: Some miners are currently generating invalid blocks. Almost all software (besides Bitcoin Core 0.9.5 and later) will accept these invalid blocks under certain conditions. The paragraphs that follow explain the cause more throughly.
For several months, an increasing amount of mining hash rate has been signaling its intent to begin enforcing BIP66 strict DER signatures. As part of the BIP66 rules, once 950 of the last 1,000 blocks were version 3 (v3) blocks, all upgraded miners would reject version 2 (v2) blocks.
Early morning UTC on 4 July 2015, the 950/1000 (95%) threshold was reached. Shortly thereafter, a small miner (part of the non-upgraded 5%) mined an invalid block--as was an expected occurrence. Unfortunately, it turned out that roughly half the network hash rate was mining without fully validating blocks (called SPV mining), and built new blocks on top of that invalid block.
Note that the roughly 50% of the network that was SPV mining had explicitly indicated that they would enforce the BIP66 rules. By not doing so, several large miners have lost over $50,000 dollars worth of mining income so far.
All software that assumes blocks are valid (because invalid blocks cost miners money) is at risk of showing transactions as confirmed when they really aren't. This particularly affects lightweight (SPV) wallets and software such as old versions of Bitcoin Core which have been downgraded to SPV-level security by the new BIP66 consensus rules.
The immediate fix, which is well underway as of this writing, is to get all miners off of SPV mining and back to full validation (at least temporarily). As this progresses, we will reduce our current recommendation of waiting {{confs}} extra confirmations to a lower number.


Awesome Blog of Everything™
Home Button
Blog Menu Button
(graphic design is my passion)
Travel
Hot Pockets
Makeup
Entertainment


Transfer From: Select Account Student Account Business Account Investment Account Savings Account
Transfer To: Select Account Student Account Business Account Investment Account Savings Account
From Reference:
To Reference:
Please note
Your transfer may take up to 24 hours to reflect in your account.


Enter multiple URLs, seperated by commas. Once you select a timerange in one of the traces, the other viewers will automatically zoom to the same size timerange, for easy comparison.
No data is stored by this app; it's clientside only. Visit your Google security permissions if you'd like to revoke authorization.
Checking for Drive API authorization...
Once authorized, you'll see Timeline Viewer as a registered Google Drive viewer when opening .json
files.
Once you select the Timeline Viewer, it will open in a new tab and load the timeline asset from your Drive.
You can share this URL with any users who have both 1) authorized Timeline Viewer to Drive via the typical Google OAuth flow and 2) have Edit
permission to the Google Drive file.
Afterwards, you can revoke authorization entirely.