自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(21)
  • 问答 (2)
  • 收藏
  • 关注

原创 安装新的内存条后电脑启动不了

安装新内存条后开不了机,解决方法

2024-02-28 00:07:44 389

原创 C++ string行尾遇到CR LF问题的解决方法

CR LF换行符问题

2023-01-17 11:43:52 338

原创 a case: multiple definition of a function在另一个cpp文件中的函数重复定义问题

Scenario:两个cpp文件,其中一个cpp文件A只包含main函数,另一个cpp文件B里定义了一系列的函数(在main函数中调用)。问题:如果使用头文件包含(#include “B.cpp”)包含文件B,会导致重复定义,因为在分别编译文件A和文件B时,文件A已经include了文件B,在链接A和B文件时就会导致文件B中的函数重复定义。解决方法:不使用#include “B.cpp”, 在main函数的开头使用关键字extern声明函数为外部函数(在文件B中定义的函数)。最简单粗暴的,把函数的

2021-08-01 21:12:06 179

原创 LSF作业管理系统简易使用指南

LSF简易使用指南LSF(Load Sharing Facility)是一个被广泛使用的作业管理系统,具有高吞吐、配置灵活的优点。通过 LSF 集中监控和调度,可以充分利用计算机的CPU、内存、磁盘等资源。1. 登陆超算服务器命令行窗口使用ssh登陆:>>ssh username@addressusername 是申请的账号用户名,address是服务器地址,上海台超算服务器地址:119.78.226.25然后输入密码,即可登陆LSF除此之外还可以使用MobaXterm或File

2020-12-15 21:21:27 5945

原创 从JVM理解父类引用指向子类对象

关键字:多态、动态链接和向上转型方法的重写、重载与动态链接构成多态性。什么是动态链接?当父类中的一个方法只有在父类中定义而在子类中没有重写的情况下,才可以被父类类型的引用调用;对于父类中定义的方法,如果子类中重写了该方法,那么父类类型的引用将会调用子类的这个方法,这就是动态链接。对应的字节码指令就是invokedynamic。定义一个子类Cat,它继承了Animal类,后者是前者的父类。可以通过 Animal a = new Cat();定义一个Animal类型的引用,指向新建的Cat类型的对象。

2020-11-23 12:22:15 329

原创 fortran并行运算报错151

MPI并行运算报错:forrtl: severe (151): allocatable array is already allocatedPARALLEL LOOP if(condition)then allocate(x_full(nel_pp)) some statements //deallocate(x_full) //right end if deallocate(x_full) //err原因:在并行loop里allocate了动态数组,但没有在loop里deall

2020-08-31 10:22:22 2211

原创 typora常用格式设置

Typora格式Typora常用书写格式这是斜体**这是加粗****加粗斜体******这是下划线 把 u 和 \u用<>围起来这是删除~~~~ 前后各两个~~有序列表,数字加.有序列表有序列表嵌套 按tab键嵌套嵌套list one 短横线list two这是引用> 右尖括号这也是引用这是超链接 [] () 中括号和小括号间无空格三个*代表分割线三个-也是分割线AABB11

2020-08-03 17:06:51 10322

原创 C Primer Plus书中代码注释-chapter17_16_fileio.cpp

chapter17_16_fileio.cpp#include <iostream>#include <fstream>#include <string>int main(){ using namespace std; string filename; cout << "Enter name for new file: "; cin >> filename; ofstream fout(filename.c_str(

2020-07-30 09:58:29 108

原创 C Primer Plus书中代码注释-chapter17_13_get_gun.cpp

chapter17_13_get_gun.cpp#include <iostream>const int Limit = 255;int main(){ using std::cout; using std::cin; using std::endl; char input[Limit]; cout << "Enter a string for getline() processing:\n"; cin.getline(input, Limit, '#')

2020-07-29 17:44:06 124

原创 C Primer Plus书中代码注释-chapter17_8_setf.cpp

chapter17_8_setf.cpp#include <iostream>int main(){ using std::cout; using std::endl; using std::ios_base; int temperature = 63; cout << "Today's water temperature: "; cout.setf(ios_base::showpos); cout << temperature <<

2020-07-29 17:42:14 125

原创 C Primer Plus书中代码注释-chapter17_7_showpt.cpp

chapter17_7_showpt.cpp#include <iostream>int main(){ using std::cout; using std::ios_base; float price1 = 20.40; float price2 = 1.9 + 8.0 / 9.0; cout.setf(ios_base::showpoint); //保留6位有效数字,这是float类型的默认精度 cout << "\"Furry Frie

2020-07-29 17:40:44 152

原创 C Primer Plus书中代码注释-chapter17_4_width.cpp

chapter17_4_width.cpp#include <iostream>int main(){ using std::cout; int w = cout.width(30); cout << "default field width = " << w << ":\n"; //width只影响接下来显示的一个项目, //w的值为0是因为cout.width(30)设置完一个格式后,恢复成默认值了

2020-07-29 17:39:08 103

原创 C Primer Plus书中代码注释-ATM Quene队列模拟

ATM Queue模拟#include <iostream>#include <cstdlib>#include <ctime>#include "queue.h"const int MIN_PER_HR = 60;bool newcustomer(double x);int main(){ using std::cin; using std::cout; using std::endl; using std::ios_base; std:

2020-07-29 15:07:09 231

原创 C Primer Plus书中代码注释-chapter16_14_multimap.cpp

chapter16_14_multimap.cpp#include <iostream>#include <string>#include <map>#include <algorithm>typedef int KeyType; //定义int类型数据为键类型typedef std::pair<const KeyType, std::string> Pair; //定义Pair这个新类型为pair,封装了一对数据,方便后面直接使

2020-07-29 15:03:12 89

原创 C Primer Plus书中代码注释-chapter16_13_set.cpp

chapter16_13_set.cpp#include <iostream>#include <string>#include <set>#include <algorithm>#include <iterator>int main(){ using namespace std; const int N = 6; string s1[N] = {"buffoon", "thinkers", "for", "heavy",

2020-07-29 15:00:47 162

原创 C Primer Plus书中代码注释-chapter16_12_list.cpp

chapter16_12_list.cpp#include <iostream>#include <list>#include <iterator>#include <algorithm> void outint(int n){ std::cout << n << " ";}int main(){ using namespace std; list<int> one(5, 2); //新建int

2020-07-29 14:59:41 94

原创 C Primer Plus书中代码注释-chapter16_11.cpp

chapter16_11.cpp#include <iostream>#include <string>#include <iterator>#include <vector>#include <algorithm>void output(const std::string & s) {std::cout << s << " ";} //output接受一个引用传入参数int main(){ u

2020-07-29 14:58:40 118

原创 C Primer Plus书中代码注释-chapter16_10.cpp

chapter16_10.cpp#include <iostream>#include <iterator>#include <vector>int main(){ using namespace std; int casts[10] = {6, 7, 2, 9, 4, 11, 8, 7, 10, 5}; vector<int> dice(10); //定义了一个包含10个元素的vector容器 copy(casts, ca

2020-07-29 14:57:31 97

原创 C Primer Plus书中代码注释-chapter16_9.cpp

chapter16_9.cpp#include <iostream>#include <string>#include <vector>#include <algorithm>struct Review{ std::string title; int rating;}; bool operator<(const Review &r1, const Review & r2);bool worseThan(const

2020-07-29 14:56:06 96

原创 C Primer Plus书中代码注释-chapter16_8.cpp

chapter16_8.cpp#include <iostream>#include <vector>#include <string>struct Review{ std::string title; int rating; };bool FillReview(Review& rr); //判断是否填入了书名以及评分,引用传入,传出布尔值 void ShowReview(const Review& rr); //展示输入的内容,

2020-07-29 14:54:23 187

转载 原码,反码和补码

一. 机器数和真值在学习原码, 反码和补码之前, 需要先了解机器数和真值的概念.1、机器数一个数在计算机中的二进制表示形式, 叫做这个数的机器数。机器数是带符号的,在计算机用一个数的最高位存放符号, 正数为0, 负数为1.比如,十进制中的数 +3 ,计算机字长为8位,转换成二进制就是00000011。如果是 -3 ,就是 10000011 。那么,这里的 00000011 和 1000...

2020-03-08 11:51:45 104

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除