This file contains hidden or 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
<%@ page language="java" contentType="text/html; charset=utf-8" import="java.awt.image.BufferedImage, javax.imageio.ImageIO, java.io.*, java.util.*" %> | |
<%! | |
static int[] deColor(BufferedImage orgImgBI) | |
{ | |
int oWidth = orgImgBI.getWidth(); | |
int oHeight = orgImgBI.getHeight(); | |
int oMinx = orgImgBI.getMinX(); | |
int oMiny = orgImgBI.getMinY(); | |
int i,j; | |
int pixel, R, G, B, Gray; |
This file contains hidden or 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
#!/usr/bin/env python | |
#-*- coding:utf-8 -*- | |
import re | |
import os | |
import socket | |
web_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
web_socket.bind(("127.0.0.1", 8080)) | |
web_socket.listen(5) |
This file contains hidden or 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 <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <unistd.h> | |
#include <sys/socket.h> | |
#include <netinet/in.h> | |
#include <arpa/inet.h> | |
#include <fcntl.h> | |
#define WEBROOT "./webroot" // the web server's root directory |
This file contains hidden or 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
#ifndef NM_GAUSS_H | |
#define NM_GAUSS_H | |
#include <iostream> | |
#include <math.h> | |
#include <stdlib.h> | |
using namespace std; | |
// A program used Gaussian elimination with maximal column pivoting to calculate equation set. |
This file contains hidden or 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
class Enum(object): | |
def __init__(self, *args, **kwargs): | |
raise NotImplemented | |
class Person(object): | |
gendor = Enum("gendor", fields=("male", "female", "unknown")) | |
def __init__(self): | |
self.gendor = "unknown" |
This file contains hidden or 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 <stdio.h> | |
#include <stdlib.h> | |
#define N 10 | |
#define MIN -5.0 | |
#define MAX 5.0 | |
#define F(x) (1 / (1 + x * x)) | |
double x_at (int i); | |
double get_lj (int j, double x); |
This file contains hidden or 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 <stdio.h> | |
#include <stdlib.h> | |
#define N 10 | |
#define MIN -5.0 | |
#define MAX 5.0 | |
#define F(x) (1.0 / (1.0 + x * x)) | |
double x_at(int i); | |
double get_L(int k, double x); |
This file contains hidden or 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.图像是自然世界在人的视觉中的一个反映 | |
2.数字图像由有限的元素组成 | |
(每个特定的元素都有特定的位置和幅值,称为像素) | |
3.数字图像处理: | |
借用数字计算机对数字图像进行处理 | |
(处理精度高,处理内容丰富,可进行复杂的非线性处理, | |
有灵活的变通能力) | |
4.数字图像处理方法大致分为两大类: | |
(1).空间域法 | |
直接对图像的像素进行处理,包括 |
This file contains hidden or 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
extract () { | |
if [ -f $1 ] ; then | |
case $1 in | |
*.tar.bz2) tar xjf $1 ;; | |
*.tar.gz) tar xzf $1 ;; | |
*.bz2) bunzip2 $1 ;; | |
*.rar) rar x $1 ;; | |
*.gz) gunzip $1 ;; | |
*.tar) tar xf $1 ;; | |
*.tbz2) tar xjf $1 ;; |
This file contains hidden or 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" | |
"log" | |
"net/http" | |
"strconv" | |
) | |
const ( |