在gradle.properties中进行修改:
org.gradle.jvmargs=-Xmx4536m -DsocksProxyHost\=127.0.0.1 -DsocksProxyPort\=1080
在gradle.properties中进行修改:
org.gradle.jvmargs=-Xmx4536m -DsocksProxyHost\=127.0.0.1 -DsocksProxyPort\=1080
// 可以getError()然后在getMessage()得到错误信息
EthSendTransaction ethSendTransaction = request1.send();
if (ethSendTransaction.hasError()) {
result += "ethSendTransactoin has error:" +ethSendTransaction.getError().toString();
result += ethSendTransaction.getError().getMessage();
}
Credentials credentials = Credentials.create(pk); // pk为私钥 这样的话比较简便,适合开发。
contractCode = contractCodeEt.getText().toString(); // 这里contractCode就是remix编译出来的bytecode里的object, // 是一串数字,自己不需要再这串数字前加0x之类的东西,直接复制 // 粘贴过来就行了 // 与一般的交易使用RawTransaction.createTransaction不同, // 这里使用的是RawTransaction.createContractTransaction。
RawTransaction rawTransaction = RawTransaction.createContractTransaction(new BigInteger(VnsApi.nonce + ""), DefaultGasProvider.GAS_PRICE, DefaultGasProvider.GAS_LIMIT, amount.toBigInteger(), contractCode);
// 普通的交易gas limit使用60,000就够了,但部署合约的交易要多些
// Gas_limit为 8,000,000
// Gas_price为 0.000000022 Vns
//
// 部署合约时可以通过传value给合约打钱
Log.v("perci_DeployContractFragment.java", "nonce=" + VnsApi.nonce);
byte[] signedRawTransactionBytes = TransactionEncoder.signMessage(rawTransaction, credentials);
String signedRawTransaction = Numeric.toHexString(signedRawTransactionBytes);
// 最后将这个签名好后的合约通过rpc接口发送出去就可以了
之前的解决方案是给服务器配置https,然后客户端信任所有证书之类的麻烦方法。现在发现只要在AndroidManifest.xml里的application标签里新增
android:usesCleartextTraffic=”true”
就可以了,示例如下:
————————–
<application
android:allowBackup=”true”
android:icon=”@drawable/note”
android:usesCleartextTraffic=”true”
android:label=”@string/app_name”
android:roundIcon=”@drawable/note”
android:supportsRtl=”true”
android:theme=”@style/AppTheme.NoActionBar”>
<activity android:name=”moe.perci.haku.BillingNotes.MainActivity”>
<intent-filter>
<action android:name=”android.intent.action.MAIN” />
tp5.1 初始化方法initialize (不是_initialize,多了一划线)
子元素选择器的语法如下:
div>ul{color:red;}
子元素选择器使用大于号”>”做为连接符,子元素选择器只能选择作为某元素子元素的元素
后代选择器的语法如下:
h1 em{color:red;}
子元素选择器只选择下一层级的,后代选择器选择所有里面的
经过一下午的浪费时间,得出结论,别管什么wp_register_script , wp_enqueue_script,wp_print_scripts ,直接在php中写,不然出现一些问题。如css因为级别不够而不起作用,js因为jQuery库未加载而不起作用。
外嵌式js里面不写<script> ,不然不能执行。
外嵌css里面可写可不写<style>