安装及使用 安装 npm install typescript -g 复制代码 或 yarn global add typescript 复制代码 使用 新建demo.ts: function test() { let web: string="hello world" console.log(we ...
分类:
其他好文 时间:
2020-10-16 11:07:32
阅读次数:
22
Logger写*.log文件时 Console Log: W/System.err: java.io.IOException: open failed: ENOENT (No such file or directory) W/System.err: at java.io.File.createNe ...
分类:
移动开发 时间:
2020-10-16 10:47:37
阅读次数:
39
1.路由拦截 router.beforeEach((to, from, next) => { const userInfo=sessionStorage.getItem(userInfo) const curToken=sessionStorage.getItem(curToken) console ...
分类:
其他好文 时间:
2020-10-16 10:46:36
阅读次数:
29
1 using Newtonsoft.Json; 2 using Newtonsoft.Json.Linq; 3 4 static void Main(string[] args) 5 { 6 TestJsonValid(); 7 Console.ReadLine(); 8 } 9 10 stati ...
5G 时代的宣传热火朝天,万物互联的生活沉浸到方方面面,网络资源的访问成了人们生活中不可或缺的存在。访问使用的多了也经常会遇到无法访问的情况,这个时候打开 Console 往往会看到下面这种红彤彤一片。 红彤彤的报错信息多种多样。但是图上这个错误相信大家肯定经常见到,其实这就是在开发过程中经常遇到的 ...
分类:
Web程序 时间:
2020-10-14 20:21:51
阅读次数:
30
今天忙活一天了,想用php调用一个exe程序。执行后一直返回1(返回0是成功),也看不到任何输出,$output也看不到东西。 从网上看了, 大部分文章都说是cmd.exe的权限问题、php开启了safemode等,我不是这些原因。我遇到的是编码问题,网页是utf-8编码,程序路径中的中文到了cmd ...
using System;using System.Collections.Generic;using System.Linq;using System.Net;using System.Net.Sockets;using System.Text;using System.Threading;usi ...
常见的API扩展形式 prototype 比如我现在有一个需求,给定一个字符串,给方法传递一个参数为数字类型来确定当前字符串重复次数,例如: 'abc'.repeatStringNumTimes(3) // abcabcabc 如果按照一般的思维就是我们把这个方法绑定到String的原型上,如下代码 ...
前言 我们知道,变量根据作用域的不同分为两种:全局变量和局部变量。 函数内部可以访问全局变量和局部变量 函数外部能访问全局变量,不能访问局部变量 当函数执行完毕,本作用域的局部变量销毁。 如: function foo() { let a = 1;}foo();console.log(a); //打 ...
分类:
编程语言 时间:
2020-10-13 16:55:34
阅读次数:
24
1 class ClassType{ 2 public int num{get;set;} 3 } 4 5 struct StructType{ 6 public int num{get;set;} 7 } 8 9 static void Main(string[] args) 10 { 11 St ...