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
public class test { | |
public static void main(String[] args) { | |
byte[] binByte = {1,0,0,0,1,0,0,0,0,0,1,0,1,0,0,0}; | |
int sum = 0; | |
for (int i = 0; i < 16;i++) { | |
sum += binByte[i] * Math.pow(2, binByte.length - 1 - i); | |
} | |
sum = sum & 0x0f00; | |
//sum >>= 12; |
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数据类型)参数1的数值的名字 参数2的名字: (参数2数据类型) 参数2值的名字 …. ; | |
举个例子,一个方法的定义: | |
-(void) setKids: (NSString *)myOldestKidName secondKid: (NSString *) mySecondOldestKidName thirdKid: (NSString *) myThirdOldestKidName; | |
实现这个函数的时候: |
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
#!/bin/bash | |
while true | |
do | |
echo "#############################################################" | |
echo "# Author: netcat #" | |
echo "# Lable: jinzhi.sh #" | |
echo "# QQ: 297020555 #" | |
echo "# Create Date: 2011-06-17 #" | |
echo "# Version: v1.0 #" | |
echo "#############################################################" |
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 <stdio.h> | |
#include <stdlib.h> | |
#define DAT_MAX_LINES 20 | |
int main(void) | |
{ | |
int array[DAT_MAX_LINES][2]; | |
int n = 0; | |
int i; |
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 <stdio.h> | |
#define MAX_LINES 22050 | |
int main(int argc, const char * argv[]) | |
{ | |
// 读声音数据 | |
char array[MAX_LINES]; | |
FILE *soundFile; | |
int n = 0; | |
if ((soundFile = fopen("sound.txt", "rb")) != NULL) { | |
while ((n < MAX_LINES) && !feof(soundFile)) { |
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
-0.000823974609375000 |
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
/* | |
Name: Open_file_and_write.c | |
Date: 02/01/05 | |
Description: Opens file by append example. | |
*/ | |
#include <stdio.h> | |
int main() | |
{ | |
FILE *file; | |
file = fopen("file.txt","a+"); /* apend file (add text to |
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
/* order.c -- precedence in pointer operations */ | |
#include <stdio.h> | |
int data[2] = {100, 200}; | |
int moredata[2] = {300, 400}; | |
int main(void) |
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<stdio.h> | |
static void find_stack_direction(void); | |
static int stack_dir; | |
int main(void) | |
{ | |
find_stack_direction(); | |
if (stack_dir == 1) | |
puts("stack grew upward"); | |
else | |
puts("stack grew downward"); |
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
CREATE TABLE `nanjing` ( | |
`id` int(11) DEFAULT NULL, | |
`name` char(255) CHARACTER SET latin1 DEFAULT NULL, | |
`dalei` int(11) DEFAULT NULL, | |
`xiaolei` int(11) DEFAULT NULL, | |
`hanyi` text, | |
`longitude` double DEFAULT NULL, | |
`latitude` double DEFAULT NULL | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
OlderNewer