linux下补丁diff与patch,打补丁不成功

1 两个目录:test/a.c test_new/{a.c, abc/abc.c} //test_new下有a.c以及abc目录(目录下有abc.c文件)

2 我原以为打补丁不成功是权限问题,所以更改权限
chmod -R 0775 test test_new

3 制作补丁文件
diff -Naur test test_new > test.patch
修改test.patch权限为0777也不行

4 打补丁
打印信息:
The next patch would create the file test_new/abc/abc.c,
which already exists! Assume -R? [n] n
Apply anyway? [n] n
Skipping patch.
1 out of 1 hunk ignored
patching file test_new/abc/abc.c
Hunk #1 FAILED at 1 (different line endings).
1 out of 1 hunk FAILED -- saving rejects to file test_new/abc/abc.c.rej

abc.c.rej:
1 --- test/abc/abc.c 1970-01-01 08:00:00.000000000 +0800
2 +++ test_new/abc/abc.c 2016-02-25 09:14:58.834541600 +0800
3 @@ -0,0 +1,13 @@
4 +#include ^M
5 +#include ^M
6 +^M
7 +int main(void)^M
8 +{ ^M
9 + int i = 0;^M
10 + int sum = 0^M
11 + while(i++ < 10){^M
12 + sum += i;^M
13 + }^M
14 +^M
15 + printf("sum = %d\n", sum);^M
16 +}

尝试在test_new目录下新建一个b.c,打补丁时同样报上面信息,无法成功打补丁

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
用patch打补丁的方式可以替代宏实现相应功能??
项目代码中要为不同客户定制不能功能,第一想法是用宏来区分各个不同客户, 老大却叫我用patch打补丁的方式,没使用过这种方式,是不是这样的,先拷贝一份原始代码,假设要改成A项目的,就直接在原始代码里面添加实现A功能的代码,也不用宏了,添加完之后用diff -Naur 原始原件夹 A项目文件夹 >patchA,这样产生一个补丁文件,如果要编译A项目文件,只需要在原始文件上线patch < patchA 然后就可以编译了,这种方式和用宏相比有优点吗?还请各位指教,谢谢
xgboost ValueError:特征名不匹配问题;问题背景:天池新人O2O优惠券使用预测
我在增加特征的过程中,发现训练集可以提取的特征但测试集不能提取,比如题目让你提交测试集的预测结果,即“领取优惠券后15天以内的使用情况”,但是训练集在提取特征过程中,我增加了与核销有关的特征,比如“商家优惠券被领取后核销次数”,而测试集去无法提取和训练集相同的这个特征,因为测试集只有优惠券的领取数据。我认为可能是因为不能提取一致的特征才导致训练集和测试集特征不匹配,那么我应该如何解决这个给问题? [以下为问题的具体描述] ``` ValueError: feature_names mismatch: ['Distance', 'is_manjian', 'discount_rate', 'min_cost_of_manjian', 'null_distance', 'week', 'is_weekend', 'week_0', 'week_1', 'week_2', 'week_3', 'week_4', 'week_5', 'week_6', 'simple_User_id_receive_cnt', 'simple_User_id_Coupon_id_receive_cnt', 'simple_User_id_Date_received_receive_cnt', 'simple_User_id_Coupon_id_Date_received_receive_cnt', 'simple_User_id_Coupon_id_Date_received_repeat_receive', 'simple_Merchant_id_received_cnt', 'simple_Merchant_id_hexiao_times', 'simple_Merchant_id_hexiao_rate', 'simple_Merchant_id_label_hexiao_diff_users', 'simple_Merchant_id_label_hexiao_diff_coupons'] ['Distance', 'is_manjian', 'discount_rate', 'min_cost_of_manjian', 'null_distance', 'week', 'is_weekend', 'week_0', 'week_1', 'week_2', 'week_3', 'week_4', 'week_5', 'week_6', 'simple_User_id_receive_cnt', 'simple_User_id_Coupon_id_receive_cnt', 'simple_User_id_Date_received_receive_cnt', 'simple_User_id_Coupon_id_Date_received_receive_cnt', 'simple_User_id_Coupon_id_Date_received_repeat_receive', 'simple_Merchant_id_received_cnt'] expected simple_Merchant_id_label_hexiao_diff_users, simple_Merchant_id_label_hexiao_diff_coupons, simple_Merchant_id_hexiao_rate, simple_Merchant_id_hexiao_times in input data ```
google-diff-match-patch c++ QT?
想在C++中使用google-diff-match-patch,但是c++的版本需要有QT的支持,为什么google写这个库会放进去QT啊,求教。我想使用难道先得去安装QT么
hive解析json数组,统计通过率
hive表中有一个字段存储的是json数组 [{ "name": "max_operate_first_diff", "rule": [{ "match": "max_operate_first_diff\u003c3972.0", "priority": 1, "description": "", "result": -2, "hit": "命中", "value": 504 }, { "match": "max_operate_first_diff\u003e=3972.0", "priority": 2, "description": "", "result": 64, "hit": "", "value": 0 }] }, { "name": "up_sms", "rule": [{ "match": " up_sms\u003c=1.0", "priority": 1, "description": "", "result": 5, "hit": "命中", "value": 1 }, { "match": " up_sms\u003e1.0", "priority": 2, "description": "", "result": -13, "hit": "", "value": 0 }] }] 需要统计每一个match对应的命中率,每一次传回来的rule条数不固定,match名字也不固定
Latexdiff 标注修改稿与原稿的区别。
按照CSDN上给出的教程,已经装好了perl, ![图片说明](https://img-ask.csdn.net/upload/202001/04/1578111121_576438.jpg) latexdiff包也装好了,cmd窗口运行latexdiff,没问题。 ![图片说明](https://img-ask.csdn.net/upload/202001/04/1578111146_37368.jpg) 但运行“latexdiff 原稿.tex 修改稿.tex >diff.tex ”却出现如下报错, ![图片说明](https://img-ask.csdn.net/upload/202001/04/1578111409_844816.jpg) 好像是编码的问题,求给位大神解答。 感激不尽!!!
关于在windows下使用git diff查看unix环境clone的代码的困惑
linux环境下git clone出来的代码,譬如位于\home\testaccount\code,不对代码做任何修改。 用smbd将\home\testaccount映射到windows环境下,如z:\code 在windows环境下运行git bash之后,在git bash窗口下运行git status,发现有大量文件处于diff的状态,但是实际上文件内容没有被修改。 因为怀疑是unix/windows文件格式的问题,所以运行 git config --global core.autocrlf false 但是,问题依然存在。 请教一下,这是什么原因?谢谢!
wordpress新文章后面怎么添加new图表
我知道是插入下面这段代码,就是插入新图片图标,但是放在那里啊,试了各个地方都不行。 <?php $time_one=$post->post_date; $time_two=date("Y-m-d H:i:s"); $diff=(strtotime($time_two)-strtotime($time_one))/3600; if($diff<48){echo "<img src='’";} else{echo "";} ?> 下面是的wordpress文件,放在下图哪个位置,谁懂PHP啊 ![图片说明](https://img-ask.csdn.net/upload/201912/18/1576639161_168111.png)
Subversion报告错误:不能升级'',因为他不是1.7之前的工作副本目录
我在windows里映射了一个服务器的ip的Z盘,映射的网络盘里就是我服务器上的代码。 然后我在windows里安装SVN软件TortoiseSVN,在Z盘里checkout版本流代码。 平时在linux系统里对项目代码进行编译,在Z盘里提交代码或看log或diff操作等,现在不知道为什么我之前在linux系统里想更新代码的时候,svn cleanup时提醒我要进svn升级,我svn upgrate后发现Windows下Z盘代码路径里右键没有svn的提交清理等功能了。如下图: ![图片说明](https://img-ask.csdn.net/upload/201910/30/1572427394_447328.jpg) 右键点击升级工作副本: ![图片说明](https://img-ask.csdn.net/upload/201910/30/1572426915_161510.png) 确认之后: ![图片说明](https://img-ask.csdn.net/upload/201910/30/1572426937_837087.png) 网上查了资料说是Subversion找不到一个正确的.svn目录,但没找到具体的解决方法。 希望大家了解的给一个解决方法,谢谢(没C币就不悬赏了-_-)
如何设置git format-patch 生成的文件的charactset=utf8
在ubuntu系统下, 使用git format-patch -M -1 commit_id生成的patch文件的中文是乱码 然后用file -ib 查看生成的patch文件: text/x-diff; charset=unknow-8bit 问: 如何让生成的patch文件是 text/x-diff; charset=utf-8 那个大神指点指点 非常感谢
Peer Review
Problem Description For scienti c conferences, scientists submit papers presenting their ideas, and then review each other's papers to make sure only good papers are presented at the conference. Each paper must be reviewed by several scientists, and scientists must not review papers written by people they collaborate with (including themselves), or review the same paper more than once. You have been asked to write a program to check if your favorite conference is doing things right. Whether a paper is being reviewed too much, too little, or by the wrong people - the organizers must know before it is too late! Input The fi rst line in each test case has two integers, K (1<=K<=5) and N (1<=N<=1000). K is the number of reviews that each paper will receive, while N is the number of papers to be reviewed. The conference only accepts papers with a single author, and authors can only present a single paper at the conference. Each of the next N lines describes an author and includes the name of the institution to which the author belongs, followed by the list of the K papers he or she has been requested to review. It is assumed that researchers from the same institution collaborate with each other, where as researchers from diff erent institutions don't. All institution names are shorter than 10 characters, and contain only upper or lowercase letters and no whitespace. Since we have as many papers as authors, papers are identi ed by their author's index; paper 1 was written by the first author in the list, and paper N was written by the last author. The end of the test cases is marked with a line containing K = 0 and N = 0. You should generate no output for this line. Output For each test case, your program should output NO PROBLEMS FOUND (if all rules are being followed) or P PROBLEMS FOUND, where P is the number of rule violations found (counting at most 1 violation per paper). If there is exactly one rule violation overall, your program should output 1 PROBLEM FOUND. Sample Input 2 3 UCM 2 3 UAM 1 3 UPM 1 2 2 3 UCM 2 3 UAM 1 2 UPM 2 2 0 0 Sample Output NO PROBLEMS FOUND 3 PROBLEMS FOUND
Cybercrime Donut Investigation 代码的设计
Problem Description Year 2042. The Internet has evolved to a virtual reality dataspace where crimes are committed every day. The 2041 SWERC winner developed an agent that drops a donut every time a crime is committed in the Cyberspace. Each of the donuts has its own signature. The Madrid Police have a huge database with crimes and their donut signatures. Today is your day. Your task is to implement a new agent that looks for the records in the database that bear a strong resemblance to the given signature of a dropped donut found at a new crime scene. Figure 2: The major piece of evidence for today's unsolved crime streak Experts in virtual criminology have obtained the best similarity measure between donuts: compute the diff erence in radius of the internal part of the toroids (holes), compute the di fference in radius of the external part of the toroids (tubes), and then add up those di fferences. Input The fi rst line of each test case contains n (1<=n<=100,000), the number of donuts in the database. The ith of the following n lines contains the radius of the hole and radius of the tube of the ith donut in the database, described by two integers l and w (1<=l,w<=109). After that there is a line containing q (1<=q<=50,000), the number of donuts that you are looking for in the database. Then q lines follow, the ith of them describing the dimensions of the newly found ith donut in the same way. Diff erent test cases are separated by a blank line. A line containing -1 marks the end of the input. Output The output of your program on each test case should have q lines, each of them containing an integer. The ith of these lines should contain the similarity between the newly found ith donut and the donut in the database that most closely resembles it. Outputs for di fferent test cases should be separated by a blank line. Sample Input 2 2 3 3 4 2 1 1 3 4 2 1 1 9 9 4 4 5 6 5 2 5 3 4 -1 Sample Output 3 0 7 7 5 5
怎么把这个改成字符类型
#include<iostream> #include<cstring> #include<stdlib.h> using namespace std; int inter(int *a,int *b,int m,int n)//交集 { int len=m>n?m:n; int *c=(int*)malloc(sizeof(int)*len); int d=0; for(int i=0;i<m;i++) { for(int j=0;j<n;j++) { if(a[i]==b[j]) { c[d++]=a[i]; } } } cout<<"输出a与b的交集:"<<endl; for(int i=0;i<d;i++) { cout<<c[i]<<" "; } cout<<endl; } int union_a(int *a,int *b,int m,int n)//并集 { int k=m,es=1; int *c=(int *)malloc(sizeof(int)*(m+n)); for(int i=0;i<m;i++) { c[i]=a[i]; } for(int i=0;i<n;i++) { es=1; for(int j=0;j<m;j++) { if(b[i]==c[j]) { es=0; } } if(es) { c[k]=b[i]; k++; } } cout<<"输出集合a,b的并集:"<<endl; for(int i=0;i<k;i++) { cout<<c[i]<<" "; } cout<<endl; } int diff(int *a,int *b,int m,int n)//差集 { int k=0; int *c=(int *)malloc(sizeof(int )*m); for(int i=0;i<m;i++) { c[i]=a[i]; } for(int i=0;i<n;i++) { for(int j=0;j<m;j++) { if(b[i]==c[j]) { for(k=j;k<m;k++) { c[k]=c[k+1]; m--; break; } } } } cout<<"输出集合a,b的差集:"<<endl; for(int i=0;i<k;i++) { cout<<c[i]<<" "; } cout<<endl; } int main() { int *a,*b; int m,n;//集合a,b的个数 int c; cout<<"输入集合a的长度:"<<endl; cin>>m; cout<<"输入集合b的长度:"<<endl; cin>>n; a=(int*)malloc(sizeof(int)*m); b=(int*)malloc(sizeof(int)*n); cout<<"输入集合a:"<<endl; for(int i=0;i<m;i++) { cin>>a[i]; } cout<<"输入集合b:"<<endl; for(int i=0;i<n;i++) { cin>>b[i]; } inter(a,b,m,n); union_a(a,b,m,n); diff(a,b,m,n); return 0; } ———————————————— 版权声明:本文为CSDN博主「也耶」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。 原文链接:https://blog.csdn.net/badder2/article/details/85009330
Coin Collecting 硬币的问题
Problem Description As a member of the Association of Coin Minters (ACM), you are fascinated by all kinds of coins and one of your hobbies involves collecting national currency from diff erent countries. Your friend, also an avid coin collector, has her heart set on some of your precious coins and has proposed to play a game that will allow the winner to acquire the loser's collection (or part thereof). She begins by preparing two envelopes, each of them enclosing two coins that come from di fferent countries. Then she asks you to choose one of the two envelopes. You can see their contents before making your choice, and also decline the off er and take neither. This process is repeated for a total of r times. As the game progresses, you are also allowed to change your mind about your previous picks if you think you can do better. Eventually, your friend examines the envelopes in your fi nal selection, and from among them she picks a few envelopes herself. If her selection is non-empty and includes an even number of coins from every country (possibly zero), she wins and you must hand over your entire coin collection to her, which would make years of painstaking eff ort go to waste and force you to start afresh. But if you win, you get to keep the coins from all the envelopes you picked. Despite the risks involved, the prospect of enlarging your collection is so appealing that you decide to take the challenge. You'd better make sure you win as many coins as possible. Input The fi rst line of each test case is the number r of rounds (1<=r<=300); a line with r = 0 indicates the end of the input. The next r lines contain four non negative integers 0<=a,b,c,d<10,000, meaning that your friend puts coins from countries labelled a and b inside one of the envelopes, and c and d inside the other one. A blank line separates test cases. Output Print a line per test case containing the largest number of coins you are guaranteed. Sample Input 4 0 1 0 5 5 1 0 5 1 2 0 1 1 5 2 0 6 1 4 1 4 2 4 2 4 0 3 0 3 0 4 0 4 4 3 4 3 1 3 1 3 0 Sample Output 6 8
Peer Review 的做法的问题
Problem Description For scienti c conferences, scientists submit papers presenting their ideas, and then review each other's papers to make sure only good papers are presented at the conference. Each paper must be reviewed by several scientists, and scientists must not review papers written by people they collaborate with (including themselves), or review the same paper more than once. You have been asked to write a program to check if your favorite conference is doing things right. Whether a paper is being reviewed too much, too little, or by the wrong people - the organizers must know before it is too late! Input The fi rst line in each test case has two integers, K (1<=K<=5) and N (1<=N<=1000). K is the number of reviews that each paper will receive, while N is the number of papers to be reviewed. The conference only accepts papers with a single author, and authors can only present a single paper at the conference. Each of the next N lines describes an author and includes the name of the institution to which the author belongs, followed by the list of the K papers he or she has been requested to review. It is assumed that researchers from the same institution collaborate with each other, where as researchers from diff erent institutions don't. All institution names are shorter than 10 characters, and contain only upper or lowercase letters and no whitespace. Since we have as many papers as authors, papers are identi ed by their author's index; paper 1 was written by the first author in the list, and paper N was written by the last author. The end of the test cases is marked with a line containing K = 0 and N = 0. You should generate no output for this line. Output For each test case, your program should output NO PROBLEMS FOUND (if all rules are being followed) or P PROBLEMS FOUND, where P is the number of rule violations found (counting at most 1 violation per paper). If there is exactly one rule violation overall, your program should output 1 PROBLEM FOUND. Sample Input 2 3 UCM 2 3 UAM 1 3 UPM 1 2 2 3 UCM 2 3 UAM 1 2 UPM 2 2 0 0 Sample Output NO PROBLEMS FOUND 3 PROBLEMS FOUND
Alphabet Soup 是怎么写的
Problem Description Peter is having lunch at home. Unfortunately for him, today's meal is soup. As Peter's mother is aware that he doesn't like it very much, she has cooked a special soup using pasta pieces shaped like letters from the alphabet, numbers and other characters. She has a special knife with which she can prepare an unlimited supply of pasta pieces that may come in S di fferent forms. The soup always has P pasta pieces in it, and is so thick that the pieces never move. Despite her eff orts, Peter is still not happy with today's menu and asks how many days in his life he will have to eat soup. His mother promises him that she will prepare a di fferent soup every day, and that on no day will the dish contain the same shapes in all positions as any soup dish previously served. However, the number P of pasta pieces, as well as the positions in which pieces float, will remain the same every day. Peter is not easily fooled (or so he thinks), and he cleverly realizes that this can still make him eat soup for ages. In an attempt to reduce the number of confi gurations, he tells his mother he will not accept any dish which can be obtained by rotating one of the con figurations previously seen. Figure 1: Top view of Peter's dish Consider the dish as a circle of radius 2 centered at the origin. All the symbols will be floating in the soup at a given angle (in millidegrees) at distance 1 from the origin. Two plates are considered equal if you can perform a rotation of one of the dishes about its center so that the positions of the symbols, as well as the symbols themselves, are the same in both. Your program will be given the number of possible symbols Peter's mother has available, and the angles determining the location of each of the pasta pieces (measured clockwise in millidegrees). Write a program that returns the number of possible plates Peter's mother can prepare. As this number can be very large, output the number modulo 100,000,007, which is prime. Input The fi rst line of input in each test case contains two numbers: S (2<=S<=1,000), the number of symbols Peter's mother can use; and P (P > 0), the number of pasta pieces floating in the soup. Each of the next P lines contain the angle A (0<=A <360,000) of one of the P pieces (measured clockwise in millidegrees). All angles will be di fferent. Di fferent tests cases are separated by a blank line. After the last test case there is a line with S = P = -1. Output For each test case output a single integer in a line by itself, the number of diff erent plates Peter's mother can cook modulo 100,000,007. Sample Input 2 4 0 90000 180000 270000 100 5 0 45000 90000 180000 270000 -1 -1 Sample Output 6 99999307
oracle自动关闭服务,然后手动stratup启动,又能正常使用!
Thu Dec 05 09:37:05 2019 System state dump requested by (instance=1, osid=44223 (DBW0)), summary=[abnormal instance termination]. System State dumped to trace file /oracle/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_diag_44215_20191205093705.trc Instance terminated by DBW0, pid = 44223 Thu Dec 05 09:47:25 2019 Adjusting the default value of parameter parallel_max_servers from 320 to 120 due to the value of parameter processes (150) Starting ORACLE instance (normal) ************************ Large Pages Information ******************* Per process system memlock (soft) limit = 64 KB Total Shared Global Region in Large Pages = 0 KB (0%) Large Pages used by this instance: 0 (0 KB) Large Pages unused system wide = 0 (0 KB) Large Pages configured system wide = 0 (0 KB) Large Page size = 2048 KB RECOMMENDATION: Total System Global Area size is 9634 MB. For optimal performance, prior to the next instance restart: 1. Increase the number of unused large pages by at least 4817 (page size 2048 KB, total size 9634 MB) system wide to get 100% of the System Global Area allocated with large pages 2. Large pages are automatically locked into physical memory. Increase the per process memlock (soft) limit to at least 9642 MB to lock 100% System Global Area's large pages into physical memory ******************************************************************** LICENSE_MAX_SESSION = 0 LICENSE_SESSIONS_WARNING = 0 Initial number of CPU is 8 Number of processor cores in the system is 8 Number of processor sockets in the system is 1 CELL communication is configured to use 0 interface(s): CELL IP affinity details: NUMA status: non-NUMA system cellaffinity.ora status: N/A CELL communication will use 1 IP group(s): Grp 0: Picked latch-free SCN scheme 3 Autotune of undo retention is turned on. IMODE=BR ILAT =27 LICENSE_MAX_USERS = 0 SYS auditing is disabled Starting up: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options. ORACLE_HOME = /oracle/app/oracle/product/11.2.0/dbhome_1 System name: Linux Node name: easdatabase Release: 2.6.32-642.el6.x86_64 Version: #1 SMP Tue May 10 17:27:01 UTC 2016 Machine: x86_64 Using parameter settings in server-side spfile /oracle/app/oracle/product/11.2.0/dbhome_1/dbs/spfileorcl.ora System parameters with non-default values: processes = 150 sga_target = 9632M control_files = "/oracle/app/oracle/oradata/orcl/control01.ctl" control_files = "/oracle/app/oracle/fast_recovery_area/orcl/control02.ctl" db_block_size = 8192 compatible = "11.2.0.4.0" log_archive_dest_1 = "location=/mnt1/archivelog" db_recovery_file_dest = "/oracle/app/oracle/fast_recovery_area" db_recovery_file_dest_size= 35G undo_tablespace = "UNDOTBS1" remote_login_passwordfile= "EXCLUSIVE" db_domain = "" dispatchers = "(PROTOCOL=TCP) (SERVICE=orclXDB)" audit_file_dest = "/oracle/app/oracle/admin/orcl/adump" audit_trail = "DB" db_name = "orcl" open_cursors = 300 _b_tree_bitmap_plans = FALSE _no_or_expansion = TRUE optimizer_index_cost_adj = 50 optimizer_index_caching = 90 pga_aggregate_target = 3210M diagnostic_dest = "/oracle/app/oracle" Thu Dec 05 09:47:26 2019 PMON started with pid=2, OS id=47601 Thu Dec 05 09:47:26 2019 PSP0 started with pid=3, OS id=47603 Thu Dec 05 09:47:28 2019 VKTM started with pid=4, OS id=47607 at elevated priority VKTM running at (1)millisec precision with DBRM quantum (100)ms Thu Dec 05 09:47:28 2019 GEN0 started with pid=5, OS id=47611 Thu Dec 05 09:47:28 2019 DIAG started with pid=6, OS id=47613 Thu Dec 05 09:47:28 2019 DBRM started with pid=7, OS id=47615 Thu Dec 05 09:47:28 2019 DIA0 started with pid=8, OS id=47617 Thu Dec 05 09:47:28 2019 MMAN started with pid=9, OS id=47619 Thu Dec 05 09:47:28 2019 DBW0 started with pid=10, OS id=47621 Thu Dec 05 09:47:28 2019 LGWR started with pid=11, OS id=47623 Thu Dec 05 09:47:28 2019 CKPT started with pid=12, OS id=47625 Thu Dec 05 09:47:28 2019 SMON started with pid=13, OS id=47627 Thu Dec 05 09:47:28 2019 RECO started with pid=14, OS id=47629 Thu Dec 05 09:47:28 2019 MMON started with pid=15, OS id=47631 Thu Dec 05 09:47:28 2019 MMNL started with pid=16, OS id=47634 starting up 1 dispatcher(s) for network address '(ADDRESS=(PARTIAL=YES)(PROTOCOL=TCP))'... starting up 1 shared server(s) ... ORACLE_BASE from environment = /oracle/app/oracle Thu Dec 05 09:47:28 2019 ALTER DATABASE MOUNT Successful mount of redo thread 1, with mount id 1553952944 Database mounted in Exclusive Mode Lost write protection disabled Completed: ALTER DATABASE MOUNT Thu Dec 05 09:47:33 2019 ALTER DATABASE OPEN Beginning crash recovery of 1 threads parallel recovery started with 7 processes Started redo scan Completed redo scan read 10546 KB redo, 1690 data blocks need recovery Started redo application at Thread 1: logseq 47164, block 39943 Recovery of Online Redo Log: Thread 1 Group 3 Seq 47164 Reading mem 0 Mem# 0: /oracle/app/oracle/oradata/orcl/redo03.log Recovery of Online Redo Log: Thread 1 Group 2 Seq 47165 Reading mem 0 Mem# 0: /oracle/app/oracle/oradata/orcl/redo02.log Completed redo application of 5.86MB Completed crash recovery at Thread 1: logseq 47165, block 4932, scn 500814159 1690 data blocks read, 1688 data blocks written, 10546 redo k-bytes read Thu Dec 05 09:47:40 2019 LGWR: STARTING ARCH PROCESSES Thu Dec 05 09:47:40 2019 ARC0 started with pid=27, OS id=47696 ARC0: Archival started LGWR: STARTING ARCH PROCESSES COMPLETE ARC0: STARTING ARCH PROCESSES Thu Dec 05 09:47:41 2019 ARC1 started with pid=28, OS id=47711 Thu Dec 05 09:47:41 2019 ARC2 started with pid=30, OS id=47713 Thu Dec 05 09:47:41 2019 ARC3 started with pid=29, OS id=47715 ARC1: Archival started ARC2: Archival started ARC1: Becoming the 'no FAL' ARCH ARC1: Becoming the 'no SRL' ARCH ARC2: Becoming the heartbeat ARCH Thread 1 advanced to log sequence 47166 (thread open) Thread 1 opened at log sequence 47166 Current log# 1 seq# 47166 mem# 0: /oracle/app/oracle/oradata/orcl/redo01.log Successful open of redo thread 1 MTTR advisory is disabled because FAST_START_MTTR_TARGET is not set Thu Dec 05 09:47:41 2019 SMON: enabling cache recovery Archived Log entry 44784 added for thread 1 sequence 47165 ID 0x58d8a86f dest 1: [47655] Successfully onlined Undo Tablespace 2. Undo initialization finished serial:0 start:1111127512 end:1111127762 diff:250 (2 seconds) Verifying file header compatibility for 11g tablespace encryption.. Verifying 11g file header compatibility for tablespace encryption completed SMON: enabling tx recovery Database Characterset is AL32UTF8 No Resource Manager plan active replication_dependency_tracking turned off (no async multimaster replication found) Thu Dec 05 09:47:43 2019 Starting background process QMNC Thu Dec 05 09:47:43 2019 QMNC started with pid=31, OS id=47739 ARC3: Archival started ARC0: STARTING ARCH PROCESSES COMPLETE Thu Dec 05 09:47:44 2019 db_recovery_file_dest_size of 35840 MB is 0.00% used. This is a user-specified limit on the amount of space that will be used by this database for recovery-related files, and does not reflect the amount of space available in the underlying filesystem or ASM diskgroup. Completed: ALTER DATABASE OPEN Thu Dec 05 09:47:45 2019 Starting background process CJQ0 Thu Dec 05 09:47:45 2019 CJQ0 started with pid=32, OS id=47753 Thu Dec 05 09:48:03 2019 Starting background process SMCO Thu Dec 05 09:48:03 2019 SMCO started with pid=47, OS id=47850
LSTM神经网络预测值与实际值偏差过大
在使用博主https://blog.csdn.net/u010866505/article/details/74910525 的改编代码进行预测时,发现预测值与实际值相差过大,我用的数据:输入两个10以内的整数,输出为这两个整数的加和,代码如下: ```%接下来就是LSTM的Matlab代码,我也进行了注释,用英文注释的,也比较容易懂: % implementation of LSTM clc % clear close all % %% training dataset generation % binary_dim = 8; % % % largest_number = 2^binary_dim - 1; % binary = cell(largest_number, 1); % % % for i = 1:largest_number + 1 % binary{i} = dec2bin(i-1, binary_dim); % int2binary{i} = binary{i}; % end load('datta.mat') x = datta(:,1:2); Y = datta(:,3); %% input variables alpha = 0.0001; input_dim = 2; hidden_dim = 256; output_dim = 1; allErr = []; %% initialize neural network weights % in_gate = sigmoid(X(t) * X_i + H(t-1) * H_i) ------- (1) X_i = 2 * rand(input_dim, hidden_dim) - 1; H_i = 2 * rand(hidden_dim, hidden_dim) - 1; X_i_update = zeros(size(X_i)); H_i_update = zeros(size(H_i)); bi = 2*rand(1,1) - 1; bi_update = 0; % forget_gate = sigmoid(X(t) * X_f + H(t-1) * H_f) ------- (2) X_f = 2 * rand(input_dim, hidden_dim) - 1; H_f = 2 * rand(hidden_dim, hidden_dim) - 1; X_f_update = zeros(size(X_f)); H_f_update = zeros(size(H_f)); bf = 2*rand(1,1) - 1; bf_update = 0; % out_gate = sigmoid(X(t) * X_o + H(t-1) * H_o) ------- (3) X_o = 2 * rand(input_dim, hidden_dim) - 1; H_o = 2 * rand(hidden_dim, hidden_dim) - 1; X_o_update = zeros(size(X_o)); H_o_update = zeros(size(H_o)); bo = 2*rand(1,1) - 1; bo_update = 0; % g_gate = tanh(X(t) * X_g + H(t-1) * H_g) ------- (4) X_g = 2 * rand(input_dim, hidden_dim) - 1; H_g = 2 * rand(hidden_dim, hidden_dim) - 1; X_g_update = zeros(size(X_g)); H_g_update = zeros(size(H_g)); bg = 2*rand(1,1) - 1; bg_update = 0; out_para = 2 * rand(hidden_dim, output_dim) - 1; out_para_update = zeros(size(out_para)); % C(t) = C(t-1) .* forget_gate + g_gate .* in_gate ------- (5) % S(t) = tanh(C(t)) .* out_gate ------- (6) % Out = sigmoid(S(t) * out_para) ------- (7) % Note: Equations (1)-(6) are cores of LSTM in forward, and equation (7) is % used to transfer hiddent layer to predicted output, i.e., the output layer. % (Sometimes you can use softmax for equation (7)) % train iter = 1000; % training iterations for j = 1:iter % total error overallError = 0; % difference in output layer, i.e., (target - out) output_deltas = []; % values of hidden layer, i.e., S(t) hidden_layer_values = []; cell_gate_values = []; % initialize S(0) as a zero-vector hidden_layer_values = [hidden_layer_values; zeros(1, hidden_dim)]; cell_gate_values = [cell_gate_values; zeros(1, hidden_dim)]; % initialize memory gate % hidden layer H = []; H = [H; zeros(1, hidden_dim)]; % cell gate C = []; C = [C; zeros(1, hidden_dim)]; % in gate I = []; % forget gate F = []; % out gate O = []; % g gate G = []; % start to process a sequence, i.e., a forward pass % Note: the output of a LSTM cell is the hidden_layer, and you need to % transfer it to predicted output for position = 0:length(Y)-1 % X ------> input, size: 1 x input_dim X = x(position + 1,:); % y ------> label, size: 1 x output_dim y = Y(position+ 1); % use equations (1)-(7) in a forward pass. here we do not use bias in_gate = sigmoid(X * X_i + H(end, :) * H_i + bi); % equation (1) forget_gate = sigmoid(X * X_f + H(end, :) * H_f + bf); % equation (2) out_gate = sigmoid(X * X_o + H(end, :) * H_o + bo); % equation (3) g_gate = tan_h(X * X_g + H(end, :) * H_g + bg); % equation (4) C_t = C(end, :) .* forget_gate + g_gate .* in_gate; % equation (5) H_t = tan_h(C_t) .* out_gate; % equation (6) % store these memory gates I = [I; in_gate]; F = [F; forget_gate]; O = [O; out_gate]; G = [G; g_gate]; C = [C; C_t]; H = [H; H_t]; % compute predict output pred_out = sigmoid(H_t * out_para); % compute error in output layer output_error = y - pred_out % compute difference in output layer using derivative 用导数计算输出层的差分 % output_diff = output_error * sigmoid_output_to_derivative(pred_out); output_deltas = [output_deltas; output_error*sigmoid_output_to_derivative(pred_out)]; %output_deltas = [output_deltas; output_error*(pred_out)]; % compute total error % note that if the size of pred_out or target is 1 x n or m x n, % you should use other approach to compute error. here the dimension % of pred_out is 1 x 1 overallError = overallError + abs(output_error(1)); % decode estimate so we can print it out d(length(Y) - position) = round(pred_out); end % from the last LSTM cell, you need a initial hidden layer difference future_H_diff = zeros(1, hidden_dim); % stare back-propagation, i.e., a backward pass % the goal is to compute differences and use them to update weights % start from the last LSTM cell for position = 0:length(Y)-1 X = x(position+1,:); % hidden layer H_t = H(end - position, :); % H(t) % previous hidden layer H_t_1 = H(end- position-1, :); % H(t-1) C_t = C(end-position, :); % C(t) C_t_1 = C(end-position-1, :); % C(t-1) O_t = O(end-position, :); F_t = F(end-position, :); G_t = G(end-position, :); I_t = I(end-position, :); output_diff = output_deltas(end-position, :); % output layer difference % hidden layer difference % note that here we consider one hidden layer is input to both % output layer and next LSTM cell. Thus its difference also comes % from two sources. In some other method, only one source is taken % into consideration. % use the equation: delta(l) = (delta(l+1) * W(l+1)) .* f'(z) to % compute difference in previous layers. look for more about the % proof at http://neuralnetworksanddeeplearning.com/chap2.html % H_t_diff = (future_H_diff * (H_i' + H_o' + H_f' + H_g') + output_diff * out_para') ... % .* sigmoid_output_to_derivative(H_t); H_t_diff = output_diff * (out_para').* sigmoid_output_to_derivative(H_t); % H_t_diff = output_diff * (out_para') .* sigmoid_output_to_derivative(H_t); % future_H_diff = H_t_diff; % out_para_diff = output_diff * (H_t) * sigmoid_output_to_derivative(out_para); out_para_diff = (H_t') * output_diff;%输出层权重 % out_gate diference O_t_diff = H_t_diff .* tan_h(C_t) .* sigmoid_output_to_derivative(O_t); % C_t difference C_t_diff = H_t_diff .* O_t .* tan_h_output_to_derivative(C_t); % % C(t-1) difference % C_t_1_diff = C_t_diff .* F_t; % forget_gate_diffeence F_t_diff = C_t_diff .* C_t_1 .* sigmoid_output_to_derivative(F_t); % in_gate difference I_t_diff = C_t_diff .* G_t .* sigmoid_output_to_derivative(I_t); % g_gate difference G_t_diff = C_t_diff .* I_t .* tan_h_output_to_derivative(G_t); % differences of X_i and H_i X_i_diff = X' * I_t_diff.* sigmoid_output_to_derivative(X_i); H_i_diff = (H_t_1)' * I_t_diff .* sigmoid_output_to_derivative(H_i); % differences of X_o and H_o X_o_diff = X' * O_t_diff .* sigmoid_output_to_derivative(X_o); H_o_diff = (H_t_1)' * O_t_diff .* sigmoid_output_to_derivative(H_o); % differences of X_o and H_o X_f_diff = X' * F_t_diff .* sigmoid_output_to_derivative(X_f); H_f_diff = (H_t_1)' * F_t_diff .* sigmoid_output_to_derivative(H_f); % differences of X_o and H_o X_g_diff = X' * G_t_diff .* tan_h_output_to_derivative(X_g); H_g_diff = (H_t_1)' * G_t_diff.* tan_h_output_to_derivative(H_g); % update X_i_update = X_i_update + X_i_diff; H_i_update = H_i_update + H_i_diff; X_o_update = X_o_update + X_o_diff; H_o_update = H_o_update + H_o_diff; X_f_update = X_f_update + X_f_diff; H_f_update = H_f_update + H_f_diff; X_g_update = X_g_update + X_g_diff; H_g_update = H_g_update + H_g_diff; bi_update = bi_update + I_t_diff; bo_update = bo_update + O_t_diff; bf_update = bf_update + F_t_diff; bg_update = bg_update + G_t_diff; out_para_update = out_para_update + out_para_diff; end X_i = X_i + X_i_update * alpha; H_i = H_i + H_i_update * alpha; X_o = X_o + X_o_update * alpha; H_o = H_o + H_o_update * alpha; X_f = X_f + X_f_update * alpha; H_f = H_f + H_f_update * alpha; X_g = X_g + X_g_update * alpha; H_g = H_g + H_g_update * alpha; bi = bi + bi_update * alpha; bo = bo + bo_update * alpha; bf = bf + bf_update * alpha; bg = bg + bg_update * alpha; out_para = out_para + out_para_update * alpha; X_i_update = X_i_update * 0; H_i_update = H_i_update * 0; X_o_update = X_o_update * 0; H_o_update = H_o_update * 0; X_f_update = X_f_update * 0; H_f_update = H_f_update * 0; X_g_update = X_g_update * 0; H_g_update = H_g_update * 0; bi_update = 0; bf_update = 0; bo_update = 0; bg_update = 0; out_para_update = out_para_update * 0; % if(mod(j,1000) == 0) % if 1%overallError > 1 % err = sprintf('Error:%s\n', num2str(overallError)); fprintf(err); % end allErr = [allErr overallError]; % % try % d = bin2dec(num2str(d)); % % catch % % disp(d); % % end % if 1 % overallError>1 % pred = sprintf('Pred:%s\n',dec2bin(d,8)); fprintf(pred); % Tru = sprintf('True:%s\n', num2str(c)); fprintf(Tru); % end % out = 0; % tmp = dec2bin(d,8); % for i = 1:8 % out = out + str2double(tmp(8-i+1)) * power(2,i-1); % end % if 1 % overallError > 1 % fprintf('%d + %d = %d\n',a_int,b_int,out); % sep = sprintf('-------%d------\n', j); fprintf(sep); % end % end end figure;plot(allErr); function output = sigmoid(x) output = 1./(1+exp(-x)); end function y = sigmoid_output_to_derivative(output) y = output.*(1-output); end function y = tan_h_output_to_derivative(x) y = (1-x.^2); end function y=tan_h(x) y=(exp(x)-exp(-x))./(exp(x)+exp(-x)); end ``` 不知道哪里出了问题,运行误差都是相当大的,看起来不是预测而像是随机输出,同时,通过观测每次输出与实际是之间的误差,发现误差的改变量微乎其微,好像梯度下降并没有起作用。
关于OpenCV accumulateWeighted更新背景的问题
用树莓派写了个判断遮挡的程序,然后背景在未被遮挡时进行实时更新, 现在会出现程序在已经被判断为遮挡的情况下更新,求解是什么问题。 代码如下: contours, hierarchy = cv2.findContours(diff.copy(), cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE) for c in contours: if cv2.contourArea(c) < 15000: if cv2.contourArea(c) < 100: print(time.strftime("%Y-%m-%d-%H:%M:%S", time.localtime()) + '更新完毕') cv2.accumulateWeighted(gray, background, 0.5) continue else: print(time.strftime("%Y-%m-%d-%H:%M:%S", time.localtime()) + '被遮挡') 现在就是本来应该在contourArea 小于 100时才会更新,但是现在会出现>15000的时候进行更新
这代码是什么意思(贝塞尔曲线)
第一段是初始化贝塞尔曲线,第二段是什么意思 ``` void ActionBezierBy::InitWithTarget(RealObjectPtr target, float duration, const ccBezierConfig& c) { ActionBase::InitWithTarget(target,duration); _config = c; _previousPosition = _startPosition = target->GetPosition(); } bool ActionBezierBy::isDone() const { return _elapsed >= _duration; } void ActionBezierBy::update(float time) { if (_target) { float xa = 0; float xb = _config.controlPoint_1.x; float xc = _config.controlPoint_2.x; float xd = _config.endPosition.x; float ya = 0; float yb = _config.controlPoint_1.y; float yc = _config.controlPoint_2.y; float yd = _config.endPosition.y; float x = bezierat(xa, xb, xc, xd, time); float y = bezierat(ya, yb, yc, yd, time); /* #if CC_ENABLE_STACKABLE_ACTIONS Vec2 currentPos = _target->getPosition(); Vec2 diff = currentPos - _previousPosition; _startPosition = _startPosition + diff; Vec2 newPos = _startPosition + Vec2(x,y); _target->setPosition(newPos); _previousPosition = newPos; #else */ _target->SetPosition(_startPosition + SexyVector3(x,y,0)); //#endif } } void ActionBezierTo::InitWithTarget(RealObjectPtr target, float duration, const ccBezierConfig& c) { //ActionBase::InitWithTarget(target,duration); _toConfig = c; ActionBezierBy::InitWithTarget(target,duration,c); SexyVector2 start_pos = SexyVector2(_startPosition.x,_startPosition.y); _config.controlPoint_1 = _toConfig.controlPoint_1 - start_pos; _config.controlPoint_2 = _toConfig.controlPoint_2 - start_pos; _config.endPosition = _toConfig.endPosition - start_pos; } ```
终于明白阿里百度这样的大公司,为什么面试经常拿ThreadLocal考验求职者了
点击上面↑「爱开发」关注我们每晚10点,捕获技术思考和创业资源洞察什么是ThreadLocalThreadLocal是一个本地线程副本变量工具类,各个线程都拥有一份线程私有的数
win10系统安装教程(U盘PE+UEFI安装)
一、准备工作 u盘,电脑一台,win10原版镜像(msdn官网) 二、下载wepe工具箱  极力推荐微pe(微pe官方下载) 下载64位的win10 pe,使用工具箱制作启动U盘打开软件,   选择安装到U盘(按照操作无需更改) 三、重启进入pe系统   1、关机后,将U盘插入电脑 2、按下电源后,按住F12进入启动项选择(技嘉主板是F12)     选择需要启
程序员必须掌握的核心算法有哪些?
由于我之前一直强调数据结构以及算法学习的重要性,所以就有一些读者经常问我,数据结构与算法应该要学习到哪个程度呢?,说实话,这个问题我不知道要怎么回答你,主要取决于你想学习到哪些程度,不过针对这个问题,我稍微总结一下我学过的算法知识点,以及我觉得值得学习的算法。这些算法与数据结构的学习大多数是零散的,并没有一本把他们全部覆盖的书籍。下面是我觉得值得学习的一些算法以及数据结构,当然,我也会整理一些看过
《奇巧淫技》系列-python!!每天早上八点自动发送天气预报邮件到QQ邮箱
将代码部署服务器,每日早上定时获取到天气数据,并发送到邮箱。 也可以说是一个小人工智障。 思路可以运用在不同地方,主要介绍的是思路。
Nginx 软件层面加强Nginx性能优化的面试问答和解决方案
Nginx 软件层面加强Nginx性能优化的面试问答和解决方案 去年我去爱卡汽车面试PHP,一轮和二轮面的都不错,在三轮面到Nginx的时候很多问题当时不知道怎么回答,确实没有深入学习过,花了一段时间的学习,终于能解答Nginx高性能优化的问题了,10月24号为了获得程序员勋章,发布了半个优化笔记,浏览到了1000+,受到这个鼓舞,我抽时间在仔细整理下关于Nginx性能优化的问题,我们从软件说起。...
【管理系统课程设计】美少女手把手教你后台管理
【文章后台管理系统】URL设计与建模分析+项目源码+运行界面 栏目管理、文章列表、用户管理、角色管理、权限管理模块(文章最后附有源码) 1. 这是一个什么系统? 1.1 学习后台管理系统的原因 随着时代的变迁,现如今各大云服务平台横空出世,市面上有许多如学生信息系统、图书阅读系统、停车场管理系统等的管理系统,而本人家里就有人在用烟草销售系统,直接在网上完成挑选、购买与提交收货点,方便又快捷。 试想,若没有烟草销售系统,本人家人想要购买烟草,还要独自前往药...
11月19日科技资讯|华为明日发布鸿蒙整体战略;京东宣告全面向技术转型;Kotlin 1.3.60 发布
「极客头条」—— 技术人员的新闻圈! CSDN 的读者朋友们早上好哇,「极客头条」来啦,快来看今天都有哪些值得我们技术人关注的重要新闻吧。扫描上方二维码进入 CSDN App 可以收听御姐萌妹 Style 的人工版音频哟。 一分钟速览新闻点! 6G 专家组成员:速率是 5G 的 10 至 100 倍,预计 2030 年商用 雷军:很多人多次劝我放弃WPS,能坚持下来并不是纯粹的商业决定 ...
C语言魔塔游戏
很早就很想写这个,今天终于写完了。 游戏截图: 编译环境: VS2017 游戏需要一些图片,如果有想要的或者对游戏有什么看法的可以加我的QQ 2985486630 讨论,如果暂时没有回应,可以在博客下方留言,到时候我会看到。 下面我来介绍一下游戏的主要功能和实现方式 首先是玩家的定义,使用结构体,这个名字是可以自己改变的 struct gamerole { char n
化繁为简 - 腾讯计费高一致TDXA的实践之路
导语:腾讯计费是孵化于支撑腾讯内部业务千亿级营收的互联网计费平台,在如此庞大的业务体量下,腾讯计费要支撑业务的快速增长,同时还要保证每笔交易不错账。采用最终一致性或离线补...
Python爬虫爬取淘宝,京东商品信息
小编是一个理科生,不善长说一些废话。简单介绍下原理然后直接上代码。 使用的工具(Python+pycharm2019.3+selenium+xpath+chromedriver)其中要使用pycharm也可以私聊我selenium是一个框架可以通过pip下载 pip install selenium -i https://pypi.tuna.tsinghua.edu.cn/simple/ 
Java学习笔记(七十二)—— Cookie
概述 会话技术: 会话:一次会话中包含多次请求和响应 一次会话:浏览器第一次给服务器发送资源请求,会话建立,直到有一方断开为止 功能:在一次会话的范围内的多次请求间,共享数据 方式: 客户端会话技术:Cookie,把数据存储到客户端 服务器端会话技术:Session,把数据存储到服务器端 Cookie 概念:客户端会话技术,将数据存储到客户端 快速入门: 使用步骤: 创建C
阿里程序员写了一个新手都写不出的低级bug,被骂惨了。
这种新手都不会范的错,居然被一个工作好几年的小伙子写出来,差点被当场开除了。
Java工作4年来应聘要16K最后没要,细节如下。。。
前奏: 今天2B哥和大家分享一位前几天面试的一位应聘者,工作4年26岁,统招本科。 以下就是他的简历和面试情况。 基本情况: 专业技能: 1、&nbsp;熟悉Sping了解SpringMVC、SpringBoot、Mybatis等框架、了解SpringCloud微服务 2、&nbsp;熟悉常用项目管理工具:SVN、GIT、MAVEN、Jenkins 3、&nbsp;熟悉Nginx、tomca
2020年,冯唐49岁:我给20、30岁IT职场年轻人的建议
点击“技术领导力”关注∆  每天早上8:30推送 作者| Mr.K   编辑| Emma 来源| 技术领导力(ID:jishulingdaoli) 前天的推文《冯唐:职场人35岁以后,方法论比经验重要》,收到了不少读者的反馈,觉得挺受启发。其实,冯唐写了不少关于职场方面的文章,都挺不错的。可惜大家只记住了“春风十里不如你”、“如何避免成为油腻腻的中年人”等不那么正经的文章。 本文整理了冯
程序员该看的几部电影
##1、骇客帝国(1999) 概念:在线/离线,递归,循环,矩阵等 剧情简介: 不久的将来,网络黑客尼奥对这个看似正常的现实世界产生了怀疑。 他结识了黑客崔妮蒂,并见到了黑客组织的首领墨菲斯。 墨菲斯告诉他,现实世界其实是由一个名叫“母体”的计算机人工智能系统控制,人们就像他们饲养的动物,没有自由和思想,而尼奥就是能够拯救人类的救世主。 可是,救赎之路从来都不会一帆风顺,到底哪里才是真实的世界?
作为一个程序员,CPU的这些硬核知识你必须会!
CPU对每个程序员来说,是个既熟悉又陌生的东西? 如果你只知道CPU是中央处理器的话,那可能对你并没有什么用,那么作为程序员的我们,必须要搞懂的就是CPU这家伙是如何运行的,尤其要搞懂它里面的寄存器是怎么一回事,因为这将让你从底层明白程序的运行机制。 随我一起,来好好认识下CPU这货吧 把CPU掰开来看 对于CPU来说,我们首先就要搞明白它是怎么回事,也就是它的内部构造,当然,CPU那么牛的一个东
@程序员,如何花式构建线程?
作者 |曾建责编 | 郭芮出品 | CSDN(ID:CSDNnews)在项目和业务的开发中,我们难免要经常使用线程来进行业务处理,使用线程可以保证我们的业务在相互处理之间可以保证原子性...
破14亿,Python分析我国存在哪些人口危机!
2020年1月17日,国家统计局发布了2019年国民经济报告,报告中指出我国人口突破14亿。 猪哥的朋友圈被14亿人口刷屏,但是很多人并没有看到我国复杂的人口问题:老龄化、男女比例失衡、生育率下降、人口红利下降等。 今天我们就来分析一下我们国家的人口数据吧! 一、背景 1.人口突破14亿 2020年1月17日,国家统计局发布了 2019年国民经济报告 ,报告中指出:年末中国大陆总人口(包括31个
强烈推荐10本程序员在家读的书
很遗憾,这个鼠年春节注定是刻骨铭心的,新型冠状病毒让每个人的神经都是紧绷的。那些处在武汉的白衣天使们,尤其值得我们的尊敬。而我们这些窝在家里的程序员,能不外出就不外出,就是对社会做出的最大的贡献。 有些读者私下问我,窝了几天,有点颓丧,能否推荐几本书在家里看看。我花了一天的时间,挑选了 10 本我最喜欢的书,你可以挑选感兴趣的来读一读。读书不仅可以平复恐惧的压力,还可以对未来充满希望,毕竟苦难终
Linux自学篇——linux命令英文全称及解释
man: Manual 意思是手册,可以用这个命令查询其他命令的用法。 pwd:Print working directory 显示当前目录 su:Swith user 切换用户,切换到root用户 cd:Change directory 切换目录 ls:List files 列出目录下的文件 ps:Process Status 进程状态 mk
Python实战:抓肺炎疫情实时数据,画2019-nCoV疫情地图
文章目录1. 前言2. 数据下载3. 数据处理4. 数据可视化 1. 前言 今天,群里白垩老师问如何用python画武汉肺炎疫情地图。白垩老师是研究海洋生态与地球生物的学者,国家重点实验室成员,于不惑之年学习python,实为我等学习楷模。先前我并没有关注武汉肺炎的具体数据,也没有画过类似的数据分布图。于是就拿了两个小时,专门研究了一下,遂成此文。 2月6日追记:本文发布后,腾讯的数据源多次变更u
智力题(程序员面试经典)
NO.1  有20瓶药丸,其中19瓶装有1克/粒的药丸,余下一瓶装有1.1克/粒的药丸。给你一台称重精准的天平,怎么找出比较重的那瓶药丸?天平只能用一次。 解法 有时候,严格的限制条件有可能反倒是解题的线索。在这个问题中,限制条件是天平只能用一次。 因为天平只能用一次,我们也得以知道一个有趣的事实:一次必须同时称很多药丸,其实更准确地说,是必须从19瓶拿出药丸进行称重。否则,如果跳过两瓶或更多瓶药
在家远程办公效率低?那你一定要收好这个「在家办公」神器!
相信大家都已经收到国务院延长春节假期的消息,接下来,在家远程办公可能将会持续一段时间。 但是问题来了。远程办公不是人在电脑前就当坐班了,相反,对于沟通效率,文件协作,以及信息安全都有着极高的要求。有着非常多的挑战,比如: 1在异地互相不见面的会议上,如何提高沟通效率? 2文件之间的来往反馈如何做到及时性?如何保证信息安全? 3如何规划安排每天工作,以及如何进行成果验收? ......
作为一个程序员,内存和磁盘的这些事情,你不得不知道啊!!!
截止目前,我已经分享了如下几篇文章: 一个程序在计算机中是如何运行的?超级干货!!! 作为一个程序员,CPU的这些硬核知识你必须会! 作为一个程序员,内存的这些硬核知识你必须懂! 这些知识可以说是我们之前都不太重视的基础知识,可能大家在上大学的时候都学习过了,但是嘞,当时由于老师讲解的没那么有趣,又加上这些知识本身就比较枯燥,所以嘞,大家当初几乎等于没学。 再说啦,学习这些,也看不出来有什么用啊!
2020年的1月,我辞掉了我的第一份工作
其实,这篇文章,我应该早点写的,毕竟现在已经2月份了。不过一些其它原因,或者是我的惰性、还有一些迷茫的念头,让自己迟迟没有试着写一点东西,记录下,或者说是总结下自己前3年的工作上的经历、学习的过程。 我自己知道的,在写自己的博客方面,我的文笔很一般,非技术类的文章不想去写;另外我又是一个还比较热衷于技术的人,而平常复杂一点的东西,如果想写文章写的清楚点,是需要足够...
别低估自己的直觉,也别高估自己的智商
所有群全部吵翻天,朋友圈全部沦陷,公众号疯狂转发。这两周没怎么发原创,只发新闻,可能有人注意到了。我不是懒,是文章写了却没发,因为大家的关注力始终在这次的疫情上面,发了也没人看。当然,我...
Java坑人面试题系列: 包装类(中级难度)
Java Magazine上面有一个专门坑人的面试题系列: https://blogs.oracle.com/javamagazine/quiz-2。 这些问题的设计宗旨,主要是测试面试者对Java语言的了解程度,而不是为了用弯弯绕绕的手段把面试者搞蒙。 如果你看过往期的问题,就会发现每一个都不简单。 这些试题模拟了认证考试中的一些难题。 而 “中级(intermediate)” 和 “高级(ad
Spring Boot 2.x基础教程:使用JdbcTemplate访问MySQL数据库
在第2章节中,我们介绍了如何通过Spring Boot来实现HTTP接口,以及围绕HTTP接口相关的单元测试、文档生成等实用技能。但是,这些内容还不足以帮助我们构建一个动态应用的服务端程序。不论我们是要做App、小程序、还是传统的Web站点,对于用户的信息、相关业务的内容,通常都需要对其进行存储,而不是像第2章节中那样,把用户信息存储在内存中(重启就丢了!)。 对于信息的存储,现在已经有非常非常多...
基于Python的人脸自动戴口罩系统
目录 1、项目背景 2、页面设计 3、器官识别 4、退出系统 1、项目背景 2019年新型冠状病毒感染的肺炎疫情发生以来,牵动人心,举国哀痛,口罩、酒精、消毒液奇货可居。 抢不到口罩,怎么办?作为技术人今天分享如何使用Python实现自动戴口罩系统,来安慰自己,系统效果如下所示: 本系统的实现原理是借助 Dlib模块的Landmark人脸68个关键点检测库轻松识别出人脸五官
这个世界上人真的分三六九等,你信吗?
偶然间,在知乎上看到一个问题 一时间,勾起了我深深的回忆。 以前在厂里打过两次工,做过家教,干过辅导班,做过中介。零下几度的晚上,贴过广告,满脸、满手地长冻疮。 再回首那段岁月,虽然苦,但让我学会了坚持和忍耐。让我明白了,在这个世界上,无论环境多么的恶劣,只要心存希望,星星之火,亦可燎原。 下文是原回答,希望能对你能有所启发。 如果我说,这个世界上人真的分三六九等,...
相关热词 c#导入fbx c#中屏蔽键盘某个键 c#正态概率密度 c#和数据库登陆界面设计 c# 高斯消去法 c# codedom c#读取cad文件文本 c# 控制全局鼠标移动 c# temp 目录 bytes初始化 c#
立即提问