在开发后端服务时, APP中已经写好了服务器地址, 如何在本地开发机器调试呢? 首先,需要设置本地机器的hosts。 最方便的工具是gas masks https://github.com/2ndalpha/gasmask
添加类似如下代码
127.0.0.1 dev.example.com
生成本地证书 copy default OpenSSL config
| // Updated: Aug. 15, 2024 | |
| // Run: node testRegex.js testText.txt | |
| // Used in https://jina.ai/tokenizer | |
| const fs = require('fs'); | |
| const util = require('util'); | |
| // Define variables for magic numbers | |
| const MAX_HEADING_LENGTH = 7; | |
| const MAX_HEADING_CONTENT_LENGTH = 200; | |
| const MAX_HEADING_UNDERLINE_LENGTH = 200; |
| import { expect, use } from 'chai' | |
| import chaiAsPromised from 'chai-as-promised' | |
| import { buffer2bigint, bigint2buffer } from '../src/bigint' | |
| use(chaiAsPromised) | |
| describe('Test Utils', () => { | |
| before(async () => { | |
| }) |
| const bsv = require( 'bsv' ) | |
| const WhatsOnChain = require( 'whatsonchain' ) | |
| const _ = require( 'lodash' ) | |
| async function createScriptFromTx ( woc, prevTxid, outputIndex, scriptName, unlockParams = '', debugParams = '', txContext = {} ) { | |
| //fetch transaction from prevTxid | |
| const prevTxHex = await woc.getRawTxData( prevTxid ) | |
| const prevTx = new bsv.Transaction(prevTxHex) |
| magic减肥法完整版 | |
| 看到不少人,在减肥,为了避免出问题,还是贴个完整版。 | |
| 这可是全球首发,目前周围有好多人实践过我的方法,有效率100%,成功率50%,没成功的原因是因为没有坚持到底,又长回去了。 | |
| 此 方法主要参照阿特金斯法和永田孝行法。阿特金斯是低糖减肥的鼻祖,一直被人批斗,永田孝行是阿特金斯的改良版。 | |
| 阿特金斯叫人一辈子不吃主食终生保持50克以内的糖类才能保持体重,永田孝行叫人一辈子吃粗粮才能保持体重。 | |
| 本人研究结果,没有必要,而且他们对原理的解释我认为不完全正确。 |
| /** | |
| *Submitted for verification at Etherscan.io on 2019-09-06 | |
| */ | |
| pragma solidity 0.5.4; | |
| library SafeMath { | |
| uint256 constant internal MAX_UINT = 2 ** 256 - 1; // max uint256 |
| /** | |
| *Submitted for verification at Etherscan.io on 2019-09-06 | |
| */ | |
| pragma solidity 0.5.4; | |
| library SafeMath { | |
| uint256 constant internal MAX_UINT = 2 ** 256 - 1; // max uint256 |
| // Original Source: | |
| // https://stackoverflow.com/questions/1246198/show-iphone-cut-copy-paste-menu-on-uilabel | |
| class CopyableLabel: UILabel { | |
| override init(frame: CGRect) { | |
| super.init(frame: frame) | |
| self.sharedInit() | |
| } | |
| const tracer = require('tracer').colorConsole() | |
| const console = tracer | |
| const bitcoin = require('bsv') | |
| const maxTried = 100000//Number.MAX_VALUE | |
| class Block { | |
| constructor(data, previousHash, difficulty) { | |
| this.data = data.toString() | |
| this.previousHash = previousHash | |
| this.timestamp = Date.now().toString() |
在开发后端服务时, APP中已经写好了服务器地址, 如何在本地开发机器调试呢? 首先,需要设置本地机器的hosts。 最方便的工具是gas masks https://github.com/2ndalpha/gasmask
添加类似如下代码
127.0.0.1 dev.example.com
生成本地证书 copy default OpenSSL config
| {"sig":"53a00b60a3ce616e9608d6f9dbb05f50c20ffa5cbd95d35933e9fd514e683be5577af7a730ca1046220fd40e0f495036b32d64c25b2584399f9a739d96b76bc10","msghash":"5d0ce7f63dca01f074c1ae9c9e5626b9a245edcb5d6cd818694b182c1d919575"} |