05 2020 档案

摘要:<iframe> 即内联框架通过内联框架 可以实现在网页中“插入”网页 iframe相当于浏览器里面有个小浏览器,在这个小浏览器中,打开另一个网页 <iframe src="https://how2j.cn/" width="600px" height="400px"> </iframe> 阅读全文
posted @ 2020-05-23 07:05 Jasper2003 阅读(398) 评论(0) 推荐(0)
摘要:font常用的属性有 color和size, 分别表示颜色和大小 <font color="green">绿色默认大小字体</font> <br> <font color="blue" size="+2">蓝色大2号字体</font> <br> <font color="red" size="-2" 阅读全文
posted @ 2020-05-23 03:02 Jasper2003 阅读(194) 评论(0) 推荐(0)
摘要:<div><span>这两种标签都是布局用的这种标签本身没有任何显示效果通常是用来结合css进行页面布局 示例 1 : 看不出任何效果 这没有标签 <div> 这是一个div </div> <span>这是一个span</span> 示例 2 : div布局 一个简单的div布局的例子注: 这里使用 阅读全文
posted @ 2020-05-23 02:52 Jasper2003 阅读(136) 评论(0) 推荐(0)
摘要:列表分无序列表和有序列表分别用<ul>标签和<ol>标签表示 示例 1 : 无序列表 <ul> <li>DOTA</li> <li>LOL</li> </ul> 示例 2 : 有序列表 <ol> <li>地卜师</li> <li>卡尔</li> </ol> 阅读全文
posted @ 2020-05-22 06:56 Jasper2003 阅读(140) 评论(0) 推荐(0)
摘要:<table>标签用于显示一个表格<tr> 表示行<td> 表示列又叫单元格 示例 1 : 3行2列表格 tr(table row)表示行,所有3个tr元素td(table data)表示列,每一行,有2列,所以每一个tr元素里,有2个td元素 <table> <tr> <td>1</td> <td 阅读全文
posted @ 2020-05-21 13:29 Jasper2003 阅读(250) 评论(0) 推荐(0)
摘要:<a>标签即用来显示超链完整元素是<a href="跳转到的页面地址">超链显示文本</a> 示例 1 : 超链 <a href="http://www.12306.com">12306</a> 示例 2 : 在新的页面打开超链 新增属性target <a href="http://www.1230 阅读全文
posted @ 2020-05-20 12:13 Jasper2003 阅读(128) 评论(0) 推荐(0)
摘要:<img> 即图像标签需要设置其属性 src指定图像的路径 示例 1 : 显示图像 <img src="https://how2j.cn/example.gif"/> 示例 2 : 同级目录图像 如果是本地文件,只需把图片放在同一个目录下即可src直接使用文件名,不需要/ 示例 3 : 上级目录图像 阅读全文
posted @ 2020-05-20 11:48 Jasper2003 阅读(192) 评论(0) 推荐(0)
摘要:<ins>即下划线标签 但是通常来讲,不要给普通文本加下划线,因为用户会误以为是一个超链 <ins>使用ins标签实现的下划线效果</ins> <br/> <u>使用u标签实现的下划线效果,但是不建议使用</u> 阅读全文
posted @ 2020-05-20 10:24 Jasper2003 阅读(1529) 评论(0) 推荐(0)
摘要:<del>即删除标签delete的缩写 <p>无删除效果</p> <del>使用del标签实现的删除效果</del> <br/> <s>使用s标签实现的删除效果,但是不建议使用,因为很多浏览器不支持s标签</s> 阅读全文
posted @ 2020-05-20 10:19 Jasper2003 阅读(312) 评论(0) 推荐(0)
摘要:有时候,需要在网页上显示代码,比如java代码就需要用到pre <p>这里是没有用预格式的情况:</p> public class HelloWorld { public static void main(String[] args) { System.out.println("Hello Worl 阅读全文
posted @ 2020-05-20 10:16 Jasper2003 阅读(238) 评论(0) 推荐(0)
摘要:<i>和<em>都可以表示斜体效果 示例 1 : 斜体 区别:i是italic的缩写,仅仅表示该文本是斜体的,并不暗示这段文字的重要性em 是 Emphasized的缩写,虽然也是斜体,但是更多的是强调语义上的加重,提醒用户该文本的重要性。 常常用于引入新的术语的时候使用。 <p>无斜体效果</p> 阅读全文
posted @ 2020-05-20 09:48 Jasper2003 阅读(927) 评论(0) 推荐(0)
摘要:<b><strong>都可以用来实现粗体的效果 区别:b是bold的缩写,仅仅表示该文本是粗体的,并不暗示这段文字的重要性strong虽然也是粗体,但是更多的是强调语义上的加重,提醒用户该文本的重要性。 在SEO(搜索引擎优化)的时候,也更加容易帮助用户找到重点的内容推荐使用strong <p>无粗 阅读全文
posted @ 2020-05-20 09:40 Jasper2003 阅读(454) 评论(0) 推荐(0)
摘要:<p>标签即表示段落是paragraph的缩写自带换行效果 段落1 段落2 段落3 <p>段落4 </p> <p>段落5 </p> <p>段落6 </p> 在p标签中的文本会自动换行,不在p标签中的,不会自动换行 阅读全文
posted @ 2020-05-20 09:33 Jasper2003 阅读(213) 评论(0) 推荐(0)
摘要:标题会自动粗体,大写其中的内容,并且带有换行效果一般会使用<h1> 到 <h6> 分别表示不同大小的标题 <h1>标题1</h1> <h2>标题2</h2> <h3>标题3</h3> <h4>标题4</h4> <h5>标题5</h5> <h6>标题5</h6> 阅读全文
posted @ 2020-05-20 09:31 Jasper2003 阅读(148) 评论(0) 推荐(0)
摘要:html使用<!-- --> 进行注释 示例 1 : 注释 注释通常用于解释一段代码的意义注释不会在网页上显示出来 <!--align属性用于对齐--> <h1 align="center">居中标题</h1> 阅读全文
posted @ 2020-05-20 09:26 Jasper2003 阅读(192) 评论(0) 推荐(0)
摘要:属性用来修饰标签的比如要设置一个标题居中 <h1 align="center">居中标题</h1> 写在开始标签里的 align="center" 就叫属性align 是属性名center 是属性值属性值应该使用双引号括起来 示例 1 : 居中标题 <h1 >未设置居中的标题</h1> <h1 al 阅读全文
posted @ 2020-05-20 09:23 Jasper2003 阅读(126) 评论(0) 推荐(0)
摘要:元素指的是从开始标签到结束标签之间所有的代码比如<p>HelloWord</p> 示例 1 : 完整的HTML 一个完整的HTML文件,应该至少包含html元素,body元素,以及里面的内容 <html> <body> <h1>标题</h1> </body> </html> 示例 2 : 不完整的元 阅读全文
posted @ 2020-05-20 09:17 Jasper2003 阅读(92) 评论(0) 推荐(0)
摘要:HTML是Hyper Text Markup Language 超文本标记语言 的缩写HTML是由一套标记标签 (markup tag)组成,通常就叫标签标签由开始标签和结束标签组成<p> 这是一个开始标签</p> 这是一个结束标签<p> Hello World </p> 标签之间的文本叫做内容 < 阅读全文
posted @ 2020-05-20 09:06 Jasper2003 阅读(141) 评论(0) 推荐(0)
摘要:中文乱码问题可以在浏览器上设置编码方式为GB2312或者在html的最前面加上编码设置 <head> <meta http-equiv="Content-Type" content="text/html; charset=GB2312"> </head> <p>中文</p> 这样就能告诉浏览器使用G 阅读全文
posted @ 2020-05-20 09:00 Jasper2003 阅读(349) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2020-05-19 12:04 Jasper2003 阅读(126) 评论(0) 推荐(0)
摘要:我们用gcc编译程序时,可能会用到“-I”(大写i),“-L”(大写l),“-l”(小写l)等参数,下面做个记录: 例子1: gcc -o example1 example1.c -I /usr/local/include/freetype2 -lfreetype -lm 上面这句话在编译examp 阅读全文
posted @ 2020-05-19 11:59 Jasper2003 阅读(261) 评论(0) 推荐(0)
摘要:To read a file in C, you must create a pointer to the file. To do this, you use the FILE data type:#include <stdio.h> /* You need this include file to 阅读全文
posted @ 2020-05-19 11:50 Jasper2003 阅读(144) 评论(0) 推荐(0)
摘要:C and C++ allow various types of operators. By now, you should be familiar with the basic binary operators +, -, *, / and the boolean operators <, >, 阅读全文
posted @ 2020-05-19 11:44 Jasper2003 阅读(217) 评论(0) 推荐(0)
摘要:Masking lets you modify a specific bit (or bits) using a bit pattern (called the mask) and a logical bitwise operator (AND, OR, or XOR). By changing t 阅读全文
posted @ 2020-05-19 11:39 Jasper2003 阅读(234) 评论(0) 推荐(0)
摘要:Dangling pointers in computer programming are pointers that pointing to a memory location that has been deleted (or freed). Cause of dangling pointers 阅读全文
posted @ 2020-05-19 10:50 Jasper2003 阅读(132) 评论(0) 推荐(0)
摘要:Self Referential structures are those structures that have one or more pointers which point to the same type of structure, as their member. In other w 阅读全文
posted @ 2020-05-19 09:27 Jasper2003 阅读(137) 评论(0) 推荐(0)
摘要:(Remember that strcmp() is tricky! It returns 0 when the strings are the SAME, >0 if str1 is greater, or <0 if str2 is greater) strtok() Description T 阅读全文
posted @ 2020-05-19 07:54 Jasper2003 阅读(100) 评论(0) 推荐(0)
摘要:helloworld.c #include<stdio.h> #include<stdlib.h> void Hello(); void Hello() { printf("Hello World!\n"); } int main() { void (*Hello_ptr)() = Hello; / 阅读全文
posted @ 2020-05-19 06:43 Jasper2003 阅读(142) 评论(0) 推荐(0)
摘要:0. Introduce Random Number Generators #include <stdlib.h> 1. How to generate a random number in a given range in C. Examples: Input : Lower = 50, Uppe 阅读全文
posted @ 2020-05-19 06:16 Jasper2003 阅读(207) 评论(0) 推荐(0)
摘要:1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <math.h> 4 5 #define BYTETOBINARYPATTERN "%d%d%d%d%d%d%d%d" 6 7 #define BYTETOBINARY(byte) \ 8 ( 阅读全文
posted @ 2020-05-19 01:25 Jasper2003 阅读(213) 评论(0) 推荐(0)
摘要:2 (1) 3 #include<stdio.h> 4 FILE * myFile = NULL; 5 myFile = fopen(“input_file.dat” , “r”); 6 /* r-> open for reading w-> writing a-> appending */ 7 I 阅读全文
posted @ 2020-05-19 01:07 Jasper2003 阅读(147) 评论(0) 推荐(0)
摘要:AsciiToBinary 1 #include <stdio.h> 2 #include <stdlib.h> 3 4 int main(int argc,char *argv[]) 5 { 6 FILE *ascFile = NULL; 7 FILE *binFile = NULL; 8 dou 阅读全文
posted @ 2020-05-19 01:02 Jasper2003 阅读(192) 评论(0) 推荐(0)
摘要:1 #include<stdio.h> 2 #include<stdlib.h> 3 #include<string.h> 5 6 #define UNPACKED_SIZE 160 7 #define PACKED_SIZE 120 8 9 void menu(); 10 void pack(); 阅读全文
posted @ 2020-05-19 00:55 Jasper2003 阅读(189) 评论(0) 推荐(0)
摘要:Example 0 :Debug Scheduler.c Example 1 : Debug LAB5 <1> Using GDB to Debug Lab5 bash$ gdb Lab5 <2&5> Specify a condition in the program and apply it t 阅读全文
posted @ 2020-05-19 00:48 Jasper2003 阅读(150) 评论(0) 推荐(0)
摘要:#include<stdio.h> #include<stdlib.h> #include<math.h> typedef struct _node { int data; struct _node *next; }node; void insertNodeSorted(node **head, n 阅读全文
posted @ 2020-05-19 00:43 Jasper2003 阅读(146) 评论(0) 推荐(0)
摘要:1 #include<stdio.h> 2 #include<stdlib.h> 3 #include<string.h> 4 5 /* 6 * Item struct for holding item information 7 */ 8 typedef struct _Item 9 { 10 c 阅读全文
posted @ 2020-05-19 00:32 Jasper2003 阅读(164) 评论(0) 推荐(0)
摘要:1 #include<stdio.h> 2 #include<stdlib.h> 3 4 typedef struct _Node 5 { 6 int data; 7 struct _Node *next; 8 }Node; 9 10 Node *newList(); 11 Node *insert 阅读全文
posted @ 2020-05-19 00:21 Jasper2003 阅读(176) 评论(0) 推荐(0)
摘要:1. Directory structure Many times with large projects, in order to keep things neat and orderly, source and include files are distributed across sever 阅读全文
posted @ 2020-05-16 01:56 Jasper2003 阅读(176) 评论(0) 推荐(0)
摘要:1. What dose it mean? Hand-tracing is a simulation of code execution in which you step through instructions and track the values of the variables 2. H 阅读全文
posted @ 2020-05-16 01:35 Jasper2003 阅读(232) 评论(0) 推荐(0)
摘要:1.Introduction The Valgrind tool suite provides a number of debugging and profiling tools that help you make your programs faster and more correct. Th 阅读全文
posted @ 2020-05-16 01:20 Jasper2003 阅读(189) 评论(0) 推荐(0)
摘要:In this article, let us discuss how to debug a c program using gdb debugger in 6 simple steps. Write a sample C program with errors for debugging purp 阅读全文
posted @ 2020-05-16 01:11 Jasper2003 阅读(119) 评论(0) 推荐(0)
摘要:1.typedef: The typedef is used to give data type a new name. For example, // After this line BYTE can be used // in place of unsigned char typedef uns 阅读全文
posted @ 2020-05-16 00:58 Jasper2003 阅读(131) 评论(0) 推荐(0)
摘要:A stub is just an empty function. It's a quick way to create a skeleton of your final program. You may add the print output to ensure that all your st 阅读全文
posted @ 2020-05-16 00:46 Jasper2003 阅读(190) 评论(0) 推荐(0)
摘要:COMMON OPERATORS IN C Unary Operators: take only one argument e.g. unary -, unary +, ++, --, ! (-2), (+2), a++, a--, !done Binary Operators: take two 阅读全文
posted @ 2020-05-16 00:29 Jasper2003 阅读(209) 评论(0) 推荐(0)
摘要:Function prototype in C programming: Importance Function prototype in C is used by the compiler to ensure whether the function call matches the return 阅读全文
posted @ 2020-05-15 23:42 Jasper2003 阅读(117) 评论(0) 推荐(0)
摘要:Preprocessor programs provide preprocessors directives which tell the compiler to preprocess the source code before compiling. Examples of some prepro 阅读全文
posted @ 2020-05-15 23:30 Jasper2003 阅读(174) 评论(0) 推荐(0)
摘要:a.Vim has two mode . 1. Insert mode (Where you can just type like normal text editor. Press i for insert mode) 2. Command mode (Where you give command 阅读全文
posted @ 2020-05-15 10:22 Jasper2003 阅读(94) 评论(0) 推荐(0)
摘要:Mac In order to copy files you will use the command scp a. When copying files from your computer to zeus this will be done in the form scp <origin_loc 阅读全文
posted @ 2020-05-15 09:59 Jasper2003 阅读(135) 评论(0) 推荐(0)
摘要:ssh stands for “Secure Shell”. It is a protocol used to securely connect to a remote server/system. ssh is secure in the sense that it transfers the d 阅读全文
posted @ 2020-05-15 09:45 Jasper2003 阅读(167) 评论(0) 推荐(0)
摘要:To make a duplicate copy of a file, use the command cp. For example, to create an exact copy of the file called firstfile, you would type: cp firstfil 阅读全文
posted @ 2020-05-15 08:54 Jasper2003 阅读(122) 评论(0) 推荐(0)
摘要:Unix does not have a command specifically for renaming files. Instead, the mv command is used both to change the name of a file and to move a file int 阅读全文
posted @ 2020-05-15 08:52 Jasper2003 阅读(115) 评论(0) 推荐(0)
摘要:kNN 基础 import numpy as np import matplotlib.pyplot as plt 实现我们自己的 kNN 创建简单测试用例 raw_data_X = [[3.393533211, 2.331273381], [3.110073483, 1.781539638], [ 阅读全文
posted @ 2020-05-11 18:01 Jasper2003 阅读(132) 评论(0) 推荐(0)
摘要:Reply: As far as I know a binary constraint will have the same effect as the integer constraint i.e. no "Sensitivity or Limits Report". 阅读全文
posted @ 2020-05-08 00:14 Jasper2003 阅读(267) 评论(0) 推荐(0)
摘要:It can be understood as: the value of an addition revenue if the constraint is relaxed. or How much you would be willing to pay for an additional reso 阅读全文
posted @ 2020-05-08 00:12 Jasper2003 阅读(207) 评论(0) 推荐(0)
摘要:I argue that climate change does exist and that we need to respond on a global scale to this very issue. Without immediate steps now, it would be more 阅读全文
posted @ 2020-05-05 03:48 Jasper2003 阅读(399) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2020-05-05 03:40 Jasper2003 阅读(242) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2020-05-05 03:33 Jasper2003 阅读(187) 评论(0) 推荐(0)
摘要:1 int main() 2 { 3 int arr[] = {53,3,542,748,14,214}; 4 5 } 6 void radixSort(int[] arr) 7 { 8 //Buckets (one bucket = one array) 9 int[][] bucket = ne 阅读全文
posted @ 2020-05-04 08:29 Jasper2003 阅读(136) 评论(0) 推荐(0)
摘要:Count the number of digits in a long integer entered by a user. int countDigit(long long n) { int count = 0; while (n != 0) { n = n / 10; ++count; } r 阅读全文
posted @ 2020-05-01 20:18 Jasper2003 阅读(113) 评论(0) 推荐(0)
摘要:It is possible to pass some values from the command line to your C programs when they are executed. These values are called command line arguments and 阅读全文
posted @ 2020-05-01 09:37 Jasper2003 阅读(254) 评论(0) 推荐(0)
摘要:To illustrate the radix sort algorithm we will sort the sequence S0 = {32, 100, 11, 554, 626, 122, 87, 963, 265, 108, 9}. We start by distributing ele 阅读全文
posted @ 2020-05-01 00:02 Jasper2003 阅读(205) 评论(0) 推荐(0)