flex 1 %{ 2 #include 3 #include "mycalc.tab.h" 4 5 int yywrap(void) {return 1;} 6 %} 7 8 %% 9 10 "+" return ADD;11 "-" return SUB;12 "*" r...
分类:
其他好文 时间:
2014-12-27 18:53:33
阅读次数:
267
输入一个字符串,判断有多少个子串。
输入: asdg ds dga
输出:3
#include
#include
using namespace std;
int num_of_sub(char *str)
{
int len = strlen(str);
int count = 0;
for(i...
分类:
其他好文 时间:
2014-12-26 18:39:50
阅读次数:
185
#! /usr/bin/perluse Getopt::Std;use warnings;use strict;sub read_from_sh($) { my $file = shift; my @files = (); open F, $file or die "Could n...
分类:
其他好文 时间:
2014-12-26 18:38:23
阅读次数:
335
OracleStudy之案例--AIX安装RAC错误之(rootpre)Oracle10gforAIX5309rootpre执行时报以下错误:#./rootpre.shRequiredfile./pw-syscall32ismissing.解决办法:1、下载补丁号2896876,上传至服务端重新执行即可
2、以下方法没有尝试(仅作参考)
Copythe"rootpre"sub-director..
分类:
数据库 时间:
2014-12-25 18:50:23
阅读次数:
236
VBA连接SQL SERVER数据库操作Excel。
Sub 按钮1_Click()
Dim i As Integer, j As Integer, sht As Worksheet 'i,j为整数变量;sht 为excel工作表对象变量,指向某一工作表
'Dim cn As New ADODB.Connection '定义数据链接对象 ,保存连接数据库信息;...
分类:
数据库 时间:
2014-12-25 16:32:12
阅读次数:
515
Public Sub ErgodicDim() Dim ent As AcadEntity '对象基类 For Each ent In ThisDrawing.ModelSpace '所有对象 If TypeOf ent Is AcadText Then '...
分类:
编程语言 时间:
2014-12-25 12:53:24
阅读次数:
1393
(1)用perl来ls一个目录:
写perl的时候,经常要调用到系统命令,perl有很多等价的函数可以用,但是,不小心任性了,就想用system来实现了,好吧,来个ls把,列出指定的一个目录,直接上代码
sub ls{
my ($dir) = @_;
system("ls -al '$dir' ");
}
不做参数校验了,直接ls一个目录,这个...
分类:
其他好文 时间:
2014-12-24 22:48:59
阅读次数:
196
'刷新浏览器
Public Sub Refresh
Browser("CreationTime:=0").Refresh
Browser("CreationTime:=0").Sync
End Sub
Public Function Include(value)
Dim ExcelPath,TCNum,arrTemp
arrTemp = Split(value,",")
E...
分类:
其他好文 时间:
2014-12-23 19:29:18
阅读次数:
140
VBA获取某文件夹下所有文件,或子文件目录的文件
'-------------------------------------------
'获取某文件夹下的所有Excel文件
'-------------------------------------------
Sub getExcelFile(sFolderPath As String)
On Error Resume Next
Di...
分类:
编程语言 时间:
2014-12-23 12:29:16
阅读次数:
349