This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <io.h> | |
#include <direct.h> | |
#define MAX_PATH 256 | |
void CreateDir(const char* pPath) | |
{ | |
const char *lastpoint; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bytes" | |
"fmt" | |
"io" | |
"log" | |
"mime/multipart" | |
"net/http" | |
"os" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
the function the follow utility: | |
1. inquire socket buffer before set socket buffer | |
2. set socket buffer | |
3. get the info after set buffer | |
conclusion: a. the get value of socket buffer is double of the set value. | |
b. if set value > the max of os max value , the value we get is double *maxsocketbuffer of os | |
for example | |
if max of os socket buffer is 200000 bytes and we set value is 3000000 , | |
then we get the value is 400000 not 600000. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"net" | |
// "os" | |
"syscall" | |
) | |
const ( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>WebSocket demo</title> | |
</head> | |
<body> | |
<div> | |
<form> | |
<label for="numberfield">Number</label> | |
<input type="text" id="numberfield" placeholder="12"/><br /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="ch"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Title</title> | |
</head> | |
<body> | |
<div> | |
<progress id="progressBar" value="0" max="100" style="width: 300px;"></progress> | |
<span id="percentage"></span> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 参考链接https://feixiao.github.io/2016/05/08/bufio/ | |
package main | |
import ( | |
"bytes" | |
"encoding/binary" | |
"flag" | |
"fmt" | |
"io" | |
"net" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 参考链接https://feixiao.github.io/2016/05/08/bufio/ | |
package main | |
import ( | |
"bufio" | |
"bytes" | |
"encoding/binary" | |
"flag" | |
"fmt" | |
"io" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 1. oldstring element is not in new : abandon(delete) | |
// 2. new element is not in oldstring : add(add) | |
func Difference(oldstring []string, newstring []string) map[string]string { | |
var diff = make(map[string]string) | |
// Loop two times, first to find oldstring strings not in newstring, | |
// second loop to find newstring strings not in oldstring | |
for i := 0; i < 2; i++ { | |
for _, s1 := range oldstring { | |
found := false |