This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module.exports.noSql = { | |
| dbo: null, | |
| connectionDB: function () { | |
| if(!this.dbo){ | |
| this.dbo = db.db("mydb"); | |
| } | |
| }, | |
| setDB: function (param) { | |
| this.connectionDB(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // SQLSTATE[HY093]: Invalid parameter number | |
| // (SQL: select (select `user`.`id` from `user` | |
| // where `user`.`id` in (2013, 2015) limit 1) as ff | |
| // from `user` as `tmp_user` | |
| // where `tmp_user`.`year` in (2016, 2017, 2018, ?, ?)) | |
| $arrayUser = [5,6]; | |
| $arrayYear = [2013,2015,2016,2017,2018]; | |
| $subSelect = DB::table('user') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //SQLSTATE[HY093]: Invalid parameter number | |
| // (SQL: select (select `user`.`id` from `user` | |
| // where `user`.`id` in (2013, 2015, ?, ?, ?, ?) limit 1) as ff | |
| // from `user` as `tmp_user` where `tmp_user`.`year` in (?, ?)) | |
| $arrayUser = [5,6,7,8,9,10]; | |
| $arrayYear = [2013,2015]; | |
| $subSelect = DB::table('user') | |
| ->select('user.id') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // (SQL: select (select `user`.`id` from `user` where `user`.`id` in (2013, 2015) limit 1) | |
| // as ff from `user` as `tmp_user` | |
| // where `tmp_user`.`year` in (?, ?)) | |
| public function arrayUser(){ | |
| $arrayUser = [5,6]; | |
| $arrayYear = [2013,2015]; | |
| $subSelect = DB::table('user') | |
| ->select('user.id') | |
| ->wherein('user.id',$arrayUser) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 2=20000000000000000 | |
| 4=6000000000000000 | |
| 6=5001000000000000 | |
| 7=5100000000000000 | |
| 8=5001000000000000 | |
| 9=5100000000000000 | |
| 17=6000000000000000 | |
| 18=5100000000000000 | |
| 19=5100000000000000 | |
| 20=8000000000000000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pragma solidity ^0.4.23; | |
| /// @title Interface new rabbits address | |
| contract FromInterface { | |
| function getBunny(uint32 _bunny) public view returns( | |
| uint32 mother, | |
| uint32 sire, | |
| uint birthblock, | |
| uint birthCount, | |
| uint birthLastTime, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function getSireList(uint page, uint indexBunny) | |
| public view returns( | |
| uint32[12] rabbitID, | |
| uint[12]currentPriceBids, | |
| uint elementEnd, | |
| uint elementTotal | |
| ) { | |
| uint32 bunnyID = 0; | |
| uint pagecount = 12; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const expectRevert = require('./assertRevert'); | |
| const ABI_tkn = require('./ABI_token');// remote token | |
| var Web3 = require('web3'); | |
| const Safe = artifacts.require("./Safe.sol"); | |
| // use the given Provider, e.g in Mist, or instantiate a new websocket provider | |
| var web3 = new Web3(Web3.givenProvider || 'http://127.0.0.1:8545'); | |
| var GasCost = 470000; | |
| var gasPrice_value = 200000000000; | |
| let meta; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var Web3 = require('web3'); | |
| //var mysql = require('mysql'); | |
| var publicABI = [{"constant":false,"inputs":[{"name":"add","type":"address"}],"name":"transferOwnershipServer","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"rabbitid","type":"uint32"},{"name":"name","type":"string"},{"name":"description","type":"string"}],"name":"setNameRabbit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"value","type":"uint256"}],"name":"getMoneyContract","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"page","type":"uint256"}],"name":"getBids","outputs":[{"name":"rabbitID","type":"uint32[16]"},{"name":"rabbitSeller","type":"address[16]"},{"name":"startMoneyBids","type":"uint256[16]"},{"n |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var Web3EthContract = require('web3-eth-contract'); | |
| var mysql = require('mysql'); | |
| //var addr = '0x82bbb666969181e1e743dc004d3ee1f8563e6507'; | |
| var addr = '0x345492ebbe79de005d527669e8e54efb5849a3a1'; | |
| var fromAddress = "0x4Ece223a70F46056419957EbDa1e31d5D79fF03a"; |