一点发现
市井烟火气
sdnu
展开
-
关于“为什么创建Vue实例时传入的参数中的data属性的值应该是函数而非对象”
为什么创建Vue实例时传入的参数中的data属性的值应该是函数而非对象原创 2022-11-02 14:15:30 · 124 阅读 · 1 评论 -
VS Code 安装了C# 插件后,编写C#代码时”空格键“会触发自动补全
VSCode 安装C#扩展后,空格键会自动补全原创 2022-10-11 18:30:34 · 557 阅读 · 1 评论 -
JS异步请求回调函数替代方案——轮询
轮询原创 2022-08-14 09:36:30 · 407 阅读 · 0 评论 -
计算机名词解释
计算机名词解释原创 2022-06-11 17:20:54 · 93 阅读 · 0 评论 -
JS执行过程
JS执行过程原创 2022-03-23 19:24:19 · 1189 阅读 · 0 评论 -
C++ sort(first_argument_is_more_back, second_argument_is_more_front)
#include <iostream>#include <algorithm>using namespace std;int arr[] = {4, 2, 3, 1};bool cmp(int back, int front){ for(int i = 0; i < 4; ++i) cout << arr[i] << ' '; cout << '\n'; cout << "f原创 2020-08-03 17:27:02 · 102 阅读 · 0 评论 -
Java没有指针,一切都是对象,一切都是引用。
#include<bits/stdc++.h>using namespace std;class node{public: int data; double t;};int main(){ node n1; n1.data = 4; n1.t = 3.14; node n2 = n1; cout <&l...原创 2020-04-22 16:15:17 · 471 阅读 · 0 评论 -
C++与G++
用C++代码敲代码,一般都会用C++提交,但是后由于一些细微的不同使用不同的编译方式还是会产生差别的,甚至是WR和AC的天壤之别。原来只知道C++能用C++提交,但是原来G++…从网上找了点资料:G++是GNU的那个C++编译器,也是Dev-CPP自带的编译器和NOI系列赛官方的编译器。。而C++是VC++,是微软出的编译器。。。一般来说,两个结果不一样,要么是因为G++效率略低被卡掉,要...转载 2019-05-06 17:52:54 · 517 阅读 · 0 评论 -
关于 ++i 快于 i++
当然,很多时候我们有的代码用C++提交通过了,但是G++却失败了呢?众所周知,不同的编译器,会对代码做出一些不同的优化。举一个最简单的例子。针对单个语句(注意,是单个语句,不是包含在语句中的那种前++和后++):a: a++;b: ++a;一般的讲,我们都知道,这两条语句的最终结果是一样的,就是a自己增加了1。但是,两者的差距还是有的。如果从标准C的角度去理解。a++这个语句等同于a: a ...转载 2019-03-28 12:13:24 · 895 阅读 · 0 评论 -
【重大消息】 搬家啦,搬家啦~
Update:欢迎访问我的新的网站:https://fireworks99.github.io/转载 2019-02-15 16:05:11 · 384 阅读 · 1 评论 -
This is a very simple problem! Your only job is to calculate a + b + c + d!
题目链接:https://ac.nowcoder.com/acm/contest/338/G原文链接:https://blog.csdn.net/ordinarv/article/details/85932520There are several cases.In the first line, there is a single integer T.(T &lt;= 200)In the...转载 2019-01-06 19:23:01 · 881 阅读 · 0 评论 -
vector访问元素(删除性访问)
#include <cstdio>#include <iostream>#include <vector>#include <algorithm>using namespace std;int main(){ vector<int> vec1; vector<int> vec2; vect...原创 2018-12-11 21:28:38 · 506 阅读 · 0 评论 -
sizeof(数组)
sizeof(数组)=数组长度数组类型每个元素所占字节例如:int a[10]; sizeof(a)=104; 而非10!#include<iostream>#include<cstring>using namespace std;int main(){ int a[10]; for(int i=0;i<10;i++) { ...原创 2018-11-20 20:13:14 · 8203 阅读 · 0 评论 -
代码规范(双目符两边、逗号后 加空格)
规范代码的意义不仅仅是使之更清楚简洁,还在于提高效率#include&lt;string&gt;#include&lt;iostream&gt;#include&lt;cstdio&gt;using namespace std;string s1="0123456789";int main(){ cout &lt;&原创 2018-11-23 21:18:20 · 4361 阅读 · 2 评论 -
字符串数组
#include<cstdio>#include<iostream>#include<cstring>using namespace std;int main(){ string s[100]; int n; while(cin>>n) { for(int i=0;i<n;i++) ...原创 2018-11-23 11:16:32 · 131 阅读 · 0 评论 -
强制转换类型查字符的ASCLL码值
#include#includeusing namespace std;int main(){cout&amp;amp;amp;amp;amp;lt;&amp;amp;amp;amp;amp;lt;(int)(‘a’)&amp;amp;amp;amp;amp;lt;&amp;amp;amp;amp;amp;lt;endl;return 0;}//强制改变类型,可以查ASCII表原创 2018-10-13 22:36:23 · 416 阅读 · 0 评论 -
数组向下开辟???
无意中发现奇怪的东西,数组可以用a[-1]、a[-2]、a[-3],往后就出错了#include<cstdio>#include<iostream>using namespace std;int main(){ int a[4]; for(int i = 0; i > -4; i--) { cin >> ...原创 2018-11-28 19:13:16 · 110 阅读 · 0 评论 -
字符串升序
#include<bits/stdc++.h>using namespace std;int main(){ char a[55] = {},b[55] = {} ; while(cin >> a && cin >> b) { ///方式一 int len = max(strlen(...原创 2018-12-07 17:33:42 · 935 阅读 · 0 评论 -
upper_bound and lower_bound
#include <bits/stdc++.h>using namespace std;int main(){ int b[11] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; int a[11] = {0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 4}; printf("%d\n", ((int)a - 72...原创 2018-12-14 19:32:26 · 120 阅读 · 0 评论 -
位运算6则
#include <cstdio>#include <iostream>#include <cmath>#include <algorithm>#include <cstring>using namespace std;///十进制转二进制long long tra(long long n){ int a[100...原创 2018-12-15 17:05:55 · 118 阅读 · 0 评论 -
CSDN在左侧栏添加自定义栏
在左侧一栏添加一个图片1.第一步:2.第二步:点击“我的博客3.第三步:4.第四步:5.第五步:(照着葫芦画瓢)就行解释:此处添加文本上面双引号间是你照片的地址,据说必须是CSDN上的照片,你另写一篇博客专门贴这张照片就是了(可以设为私密),写完了那篇博客查看时在照片上右击,点击“复制照片地址”,然后粘贴在双引号之间。另外后面的100%是size,可以自己调。6.完成...原创 2018-12-21 21:08:25 · 678 阅读 · 2 评论 -
字符串数组(结构体代替)
#include&lt;bits/stdc++.h&gt;using namespace std;struct zifushuzu{ char name[55];}a[100];int main(){ int n; while(~scanf("%d",&amp;n)) { for(int i=0;i&lt;n;i++)原创 2018-11-20 19:18:27 · 640 阅读 · 0 评论