var mongooes=require("mongoose"); mongooes.connect("mongodb://localhost/my_test",{useMongoClient:true}) mongooes.connection.once("open",function(){ co ...
分类:
其他好文 时间:
2020-07-10 15:37:04
阅读次数:
64
import React, {Component} from 'react'import {View, Text, TouchableOpacity, FlatList, RefreshControl,ActivityIndicator} from 'react-native'import * as ...
分类:
其他好文 时间:
2020-07-10 14:58:29
阅读次数:
141
1. 启用 Hermes 引擎后,打包时在 Android Studio中 遇到 SoLoader: couldn't find DSO to load: libhermes.so result: 0 解决方法:在 /android/app/build.gradle 中加入如下配置 configur ...
分类:
其他好文 时间:
2020-07-10 13:23:17
阅读次数:
87
1.设计html编码如下: 1 <!DOCTYPE html> 2 3 <html xmlns="http://www.w3.org/1999/xhtml"> 4 <head runat="server"> 5 <meta http-equiv="Content-Type" content="tex ...
分类:
Web程序 时间:
2020-07-10 11:21:58
阅读次数:
275
Find all possible combinations of k numbers that add up to a number n, given that only numbers from 1 to 9 can be used and each combination should be ...
分类:
其他好文 时间:
2020-07-10 09:59:09
阅读次数:
61
Given a positive integer a, find the smallest positive integer b whose multiplication of each digit equals to a. If there is no answer or the answer i ...
分类:
其他好文 时间:
2020-07-10 09:57:57
阅读次数:
79
Laravel Redis分布式锁的使用 创建锁 use Illuminate\Support\Facades\Cache; $lock = Cache::lock('foo', 10); if ($lock->get()) { // 处理业务逻辑 sleep(3); $lock->release( ...
分类:
其他好文 时间:
2020-07-09 22:22:13
阅读次数:
117
Description Given an array of integers A, find the number of triples of indices (i, j, k) such that: 0 <= i < A.length 0 <= j < A.length 0 <= k < A.le ...
分类:
其他好文 时间:
2020-07-09 19:24:31
阅读次数:
58
功能描述: 查找:查找指定字符串是否存在 替换:在指定的位置替换字符串 函数原型: int find(const string& str,int pos = 0) const; //查找str第一次出现位置,从pos开始查找 int find(const char* s,int pos = 0) c ...
分类:
其他好文 时间:
2020-07-09 12:28:37
阅读次数:
72
一、类及对象 1. 类的组成成分 属性(成员变量,Field) 方法(成员方法,函数,Method) 2. 属性 成员变量 vs 局部变量 相同点: 遵循变量声明的格式: 数据类型 变量名 = 初始化值 都有作用域 不同点: 声明的位置的不同 :成员变量:声明在类里,方法外, 局部变量:声明在方法内 ...
分类:
编程语言 时间:
2020-07-08 22:58:36
阅读次数:
57