编写一个shell脚本,实现加法和乘法运算。#!/bin/bash#Function:num1+num2num3*num4sum(){read-p"pleasekeyinfirstnumber:"num1read-p"pleasekeyinsecondnumber:"num2letnum3=${num1}+${num2}echo-e"\033[32m$num1+$num2=$num3\033[0m"}#############cf(){read-p"pleasekeyinfi..
分类:
其他好文 时间:
2014-05-27 03:28:19
阅读次数:
219
//少说话,多做事,以下是我验证过没有问题的串口发送接受数据
//使用MCU stm8s105c6 UART2
void UART2_DeInit(void)
{
u8 dummy = 0;
/*< Clear the Idle Line Detected bit in the status rerister by a read
to the UART2_SR re...
分类:
其他好文 时间:
2014-05-22 12:57:28
阅读次数:
1036
笔记本换成XP系统后,单击我的电脑或者别的时候,有时会提示,下面的错误提示:
---------------------------
IExplore.exe - 应用程序错误
---------------------------
"0x00a1bdb3" 指令引用的 "0x00000001" 内存。该内存不能为 "read"。
要终止程序,请单击“确定”。
要调试程序,请单击“取消”。
...
分类:
数据库 时间:
2014-05-22 12:51:43
阅读次数:
472
我们通常这么写
using (SqlDataReader drm = sqlComm.ExecuteReader())
{
drm.Read();//以下把数据库中读出的Image流在图片框中显示出来.
MemoryStream ms = new Mem...
分类:
数据库 时间:
2014-05-22 12:06:10
阅读次数:
566
【题目】
原文:
2.1 Write code to remove duplicates from an unsorted linked list.
FOLLOW UP
How would you solve this problem if a temporary buffer is not allowed?
译文:
从一个未排序的链表中移除重复的项
...
分类:
其他好文 时间:
2014-05-22 12:04:13
阅读次数:
196
int socketpair(int domain, int type, int protocol, int sockfd[2]); //创建未命名的全双工管道
domain只能为AF_UNIX,也就是限制在本地使用
type可以是SOCK_STREAM或SOCK_DGRAM,SOCK_STREAM相当于创建了双向流管道,管道的每一端都可以write或read,并且两端的数据流...
分类:
其他好文 时间:
2014-05-22 08:47:02
阅读次数:
241
【题目】
Write a program to solve a Sudoku puzzle by filling the empty cells.
Empty cells are indicated by the character '.'.
You may assume that there will be only one unique solution.
A sudoku puzzle...
...and its solution numbers marked in red.
...
分类:
其他好文 时间:
2014-05-20 17:07:34
阅读次数:
335
Problem Description
As we know, Big Number is always troublesome. But it's really important in our ACM. And today, your task is to write a program to calculate A mod B.
To make the problem easie...
分类:
其他好文 时间:
2014-05-20 14:42:07
阅读次数:
324
戳我去解题Given two binary trees, write a function to
check if they are equal or not.Two binary trees are considered equal if they are
structurally identic...
分类:
其他好文 时间:
2014-05-20 10:09:37
阅读次数:
201
这个类实现了一些工具性质的方法,正如其名。记下自己觉得有意思的方法:readFileAsString(path: String, charset:
Charset = Charset.defaultCharset()): String /** * Attempt to read a file ...
分类:
其他好文 时间:
2014-05-20 08:01:50
阅读次数:
223