- 博客(43)
- 问答 (13)
- 收藏
- 关注
原创 计算机指令编码
指令:一条指令包含二进制代码位数。取决于操作码位数,操作数地址位数(地址长度)和地址个数。操作码分为:1:定长操作码2:扩展操作码例子1:指令字长表示这个指令二进制位数位16位地址码长度6位表示你需要的操作的数的地址用6位二进制表示不过32位cpu地址码长度是8个字节 32位 64位cpu是16个字节64位比如#include <stdio.h>#include <stdio.h>int main(){ char a = 'a'; char a1 = 'b'
2021-11-20 20:38:32
3394
1
原创 c语言杂项
转义字符特殊的printf("%d",'\134'); printf("%p",'\x0111');\ddd \n n是数字8以内的整数 就会转义为8进制数 而且只能转义1到3个\xdd 加x转义为二进制数 而且只能转义3个 d是二以内的整数
2021-11-19 21:32:14
598
原创 c语言注释
#include "stdio.h"int main(){ //单行注释 /* 多行注释 */ int a =1; int b =2; int c = 3; #if 0 printf("%p,%p,%p\n",&a,&b,&c); #else printf("%d,%d,%d\n",&a,&b,&c); #endif printf("%d",sizeof(short));}if 判断是否执行下面代码 不能加#elseif
2021-11-19 16:02:14
604
原创 c语言scanf
#include<stdio.h>int main(){ int a,b; while(~scanf("%d%d", &a, &b))printf("%d\n",a+b); return 0;}scanf的返回值有0 1 2,3,4,5等到正整数 表示 对应的%d有几个 并且能正常取值的个数windows系统按下ctrol z表示退出输入流 这时返回值是-1在计算机系统中保存的数据是以二进制数据的补码表示 也叫二补码正数的补码就是原码 例如
2021-11-15 17:37:38
691
原创 c语言精度 float
//正负符号占1 bit(正去0 负取1) 小数部分23bit 指数8 bit 1.bx2^c 这个1隐式添加//最大情况 //小数部分 bvar b =1+1-(Math.pow(2,-23))//11111111111。。 23个1二进制数对应的十进制数 1-(2的负的23次方)// console.log(b)var b1 = parseFloat(b)// console.log(b1,"我是b")var z = "3402823466385288598117041834845169
2021-11-13 20:51:35
826
转载 mongodb wroteConcerny 原理机制 备查看
https://www.cnblogs.com/AK47Sonic/p/7560177.html
2021-11-07 16:37:59
90
原创 字符串和数组相加 以及创建带有违法标识符(:)的数组
<html> <head> <meta charset="utf-8"> <title></title> </head> <body> </body></html><script type="text/javascript"> Array.prototype.demo = function(){} let ob = Object.getOwnPropertyDe
2021-11-05 16:08:13
217
原创 js call方法的原理
<!DOCTYPE html><html> <head> <meta charset="utf-8"> <title></title> </head> <body> </body></html><script type="text/javascript"> Function.prototype.mycall = function(obj){ var
2021-11-05 15:51:27
248
原创 Array.prototype.find 数组find方法
let users = [ {id:1,name:'李四'}, {id:2,name:'张三'}, {id:3,name:'王五'}]Array.prototype.find = function(callback){ for(var i =0;i<this.length;i++){ if(callback(this[i])){ break }; } console.log(i) return this[i]}function getitem (ite
2021-11-01 15:56:59
543
转载 响应头请求头的标识
1、General:Request URL:https://img.alicdn.com/tfs/TB1qfbtawMPMeJjy1XcXXXpppXa-160-56.gif##请求的资源,可以是相对路径,也可以是完整的URLRequest Method:GET##请求方法,希望服务器端执行的动作,如GET、HEAD、POST等。注:HTTP的请求方法:安全的方法:GET、HEADPOST、PUT、DELETE、OPTIONS、TRACE扩展方法:LOCK、MKCOL、COP
2021-10-31 16:31:44
1330
原创 登录界面居中
let logincontent = document.getElementById('login-content');console.log(document.body.clientHeight,document.body.offsetHeight,document.documentElement.clientHeight)console.log(window.screen.height)console.log(window.screen.availHeight)console.log(docum
2021-10-23 17:19:48
364
原创 网页宽度 高度
网页可见区域宽: document.body.clientWidth网页可见区域高: document.body.clientHeight网页可见区域宽: document.body.offsetWidth (包括边线的宽)网页可见区域高: document.body.offsetHeight (包括边线的高)网页正文全文宽: document.body.scrollWidth网页正文全文高: document.body.scrollHeight网页被卷去的高: document.body.sc
2021-10-23 16:40:34
203
原创 实现多个页面跳转
01.html<!DOCTYPE html><html> <head> <meta charset="utf-8"> <title></title> </head> <body> <p>我说的是付付付付付付付付付付付付付付付付付付付付付付付付付付付付付付付付付付付付付付付付付付</p> <div id="aa">点我跳转 <a href="
2021-10-21 20:55:33
756
原创 js 文件路径问题
readfile('路径',function(){}).data/01.txt当前目录下的 相对路径data/01.txt 当前目录下的 相对路径/data/01.txt 绝对路径 当前磁盘下的data下的01 c:/data/01.txtc:/data/01.txt 绝对路径
2021-10-21 17:02:11
705
原创 宏任务 同步任务 微任务 promise
let timer1 = setInterval(function(){ console.log(1)},1000);let timer2 = setInterval(function(){ console.log('-----------')},2000)结果: 1-----11----1宏任务先注册 再执行 timer1 timer同时注册 在宏任务队列中 所以到了1秒执行timer1 到了2秒 执行timer2 timer1为什么timer2在timer1前面 因为tim
2021-10-21 16:00:42
118
原创 get用url post请求时用querystring处理数据
const http = require('http');const url = require('url')const server = http.createServer()server.on('request',function(req,res){ if(req.url=='/') console.log(url.parse(req.url,true)) let str = '' req.on('data',function(data){ // console.log(str)
2021-10-21 12:05:40
604
原创 mysql 修改密码
mysql -uroot -p进入mysql客户端 ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '123456';
2021-10-05 19:49:35
45
原创 mysql 基础操作 增删改查
select * from xx表名 where id=1;update xx表名 set name=“lisi”,age=20 where id=2insert into xx表名(name,age) vlaues(“lisi”,30)delete from xx表名 where id=2更新和删除的where必须要加 否则会把表的所有相关的属性都改掉 或者都删除掉...
2021-10-04 18:17:57
97
原创 事件的捕获,目标节点,冒泡
<!DOCTYPE html><html> <head> <meta charset="utf-8"> <title></title> </head> <style type="text/css"> div{ padding: 20px; color: black; border: aqua solid 3px; } </style> <body>
2021-09-25 18:06:27
103
原创 node.js 安装Error: EPERM: operation not permitted, mkdir ‘C:\Program Files\nodejs\node_global‘
win10安装后 执行npm命令出现 应该是不允许程序自己去创建 node_global 和node_cache这2个文件夹 自己去创建就好了 为什么创建因为 .npmc这2个参数就是设置默认全局安装的路径 和缓存路径
2021-09-03 14:12:09
3756
1
原创 2021-08-24
bind: function( type, fn ) { if ( fn.constructor == String ) fn = new Function("e", ( !fn.indexOf(".") ? "$(this)" : "return " ) + fn); jQuery.event.add( this, type, fn ); },event event: { // Bind an event to an element // Original by
2021-08-24 09:15:03
95
原创 js 正则方法 exec和match 以及正则的匹配顺序
<script type="text/javascript"> var someText= "web2.0 .net2.0" ; var pattern=/(\w+)(\d)[.](\d)/; var a=pattern.exec(someText); var a1=pattern.exec(someText); var b=someText.match(pattern); var b1=someText.match(pattern); console.lo
2021-07-28 19:22:59
880
原创 正则元字符
元字符元字符 描述. 查找单个字符,除了换行和行结束符\w 查找单词字符\W 查找非单词字符\d 查找数字\D 查找非数字字符\s 查找空白字符\S 查找非空白字符\b 匹配单词边界\B 匹配非单词边界\0 查找 NUL字符\n 查找换行符\f 查找换页符\r 查找回车符\t 查找制表符\v 查找垂直制表符\xxx 查找以八进制数 xxxx 规定的字符\xdd 查找以十六进制数 dd 规定的字符\uxxxx 查找以十六进制 xxxx规定的 Unicode 字符..
2021-07-28 14:39:01
89
原创 jquery1.0 原型上的pushStack方法源码解读
248行到265行pushStack: function(a,args) { var fn = args && args[args.length-1]; //在一下情况进入第一个判断语句 //args不能是function {0:function(){},length:1;} {0:age,1:name,3:run,length:3}run = function(){} //可以是1,2,3 "sss" "" null undeinded {age:2,name:1,run
2021-07-27 20:18:36
119
原创 js 的push方法的伪代码
<script type="text/javascript"> var obj0 = {0:"李四",1:165,length:2} var obj1 = {height:20,age:10} var arr = [1,2,3,4] var arr1 = [9,11,22,33] var arr0 = [] arr0.push.apply(obj0,[1,2,3]) arr0.push.apply(obj1,[1,2,3]) console.log(obj0) console.
2021-07-26 17:35:39
514
原创 jquery1.0 $(‘div).parent具体执行过程 还没写完
jQuery.macros = { to: { appendTo: "append", prependTo: "prepend", insertBefore: "before", insertAfter: "after" }, css: "width,height,top,left,position,float,overflow,color,background".split(","), filter: [ "eq", "lt", "gt", "contains" ],
2021-07-25 18:14:10
253
1
原创 jquery1.0 原型核心函数get方法解读
get: function( num ) { // Watch for when an array (of elements) is passed in 标记a if ( num && num.constructor == Array ) { // Use a tricky hack to make the jQuery object // look and feel like an array this.length = 0; [].push.apply(
2021-07-25 15:12:20
267
1
原创 jquery1.0 的$.map和$.merge方法详解
jQuery.extend({map: function(elems, fn) { // If a string is passed in for the function, make a function // for it (a handy shortcut) if ( fn.constructor == String ) fn = new Function("a","return " + fn); var result = []; // Go through t
2021-07-24 22:33:47
221
2
原创 jquery1.0版本代码解读 each extend
13行 --window.undefined = window.undefined;–为了兼容ie5前的老版浏览区,老版本没有window.undefinde没有设定找的话window.undefinde就是undefinded值,再把这个undefinded值复制给window的子对象unfdeinfded,然后window={undefinded:undefinded}核心函数each ,extend,每次给原型jQuery.fn添加(extend)属性的都会用到extend函数jQuery.
2021-07-24 19:46:46
135
原创 jQuery $.extend 和 $.fn.extend 例子
$.extend({ }) 是在jQuery函数对象本身添加属性 访问直接 $.或者jQuery$.fn.extend({}) 是在jQuery函数对象的原型上添加属性 访问是jQuery对象访问 $()或者jQuery()html代码<!DOCTYPE html><html> <head> <meta charset="utf-8">
2021-07-21 13:58:42
115
原创 jQuery js window.onload 和$(function)的区别
<!DOCTYPE html><html> <head> <meta charset="utf-8"> <title></title> </head> <body> <img src="https://img.yalayi.net/d/file/2020/07/24/b6c4ac6b58124d7ac70344ea4992ab5d.jpg" > </body><
2021-07-20 21:54:38
576
原创 jquery轮播图 带圆点
html代码<!DOCTYPE html><html> <head> <meta charset="utf-8"> <title></title> <style type="text/css"> *{ padding: 0; margin: 0; } /* 让body有20px的内边距 */ body{ padding: 20px; } li{
2021-07-19 16:40:09
550
原创 jquery 添加删除员工 问题用each添加多次Tom在判断的时候,执行confirm多次,但是不执行append
Name入职时间工资操作 Data2016-8-102365$删除 Tom2016-8-102365$删除 David2016-8-102365$删除 Lisa2016-8-102365$删除 姓名 入职时间 工资 </body>console.log(a)
2021-07-05 14:44:06
137
2
原创 jquery |= 运算符
$(‘a[href |=exanple]’)----意思是选择超链接a 它的属性href为exanple或者exnple紧跟着-字符相当于正则/^exnple-.*$/ Some textSome other textwill not be outlined
2021-07-01 20:29:15
395
原创 jQuery 点击图片切换内容
<!DOCTYPE html><html> <head> <meta charset="utf-8"> <title></title> </head> <style type="text/css"> *{ margin: 0; padding: 0; } .info{margin:50px auto;position: relative;width: 501px;} .
2021-07-01 19:38:50
235
原创 原型链 Function 和Object的关系,以及创建实例
代码:<!DOCTYPE html><html> <head> <meta charset="utf-8"> <title></title> <script type="text/javascript"> function Fun(){} var fn = new Fun() </scri...
2021-06-18 22:43:12
84
1
原创 关于形参 局部变量的声明提前
<!DOCTYPE html><html> <head> <meta charset="utf-8"> <title></title> <script type="text/javascript"> var a = {name:"李四",age:12}; var b = a; var obj;...
2021-06-17 14:51:34
106
空空如也
关于js f1.bind(obj)返回的函数的原型对象是undefined
2022-08-02
电脑的命令程序是通过什么控制电流的
2022-04-05
nodejs 作用域的问题
2022-02-02
js 函数赋值表达式var f1=(fucntion f(){}) 全局访问不到f
2022-02-02
mongo里的全局函数DBQuery怎样查看yuan码
2021-11-09
前端js Object.defineProperty导致的不停刷屏
2021-11-04
settimeout setinterval 里面的秒数是相对什么开始计时的
2021-10-21
node.js fs.state返回的结果的信息的解释
2021-09-23
js reg.exec(str) 当查找到最后一个如何从头开始执行呢
2021-07-28
js 的正则理解 [a-z*]*是什么意思
2021-07-28
TA创建的收藏夹 TA关注的收藏夹
TA关注的人