1月15日去改的8元套餐,2月1日一查变成38元套餐了,偷移动月初改套餐餐投诉8天没有回应,该如何应对?

计算机专业就业前景培训(软件测试方向)
ip地址=网络地址+主机地址或ip地址=网络地址+子网地址+主机地址
& & & 最高位
& 网络id(子网位数) &网络数(子网数目)
A类 &0 & &
& & & 2^7-2
& & & 2^24-2
B类 &10 & &
&2^15-2 & &
& 2^16-2 &128~191
C类 110 & &
&2^23-2 & &
D类1110 & &
& &广播地址
E类1111 & &
& & 保留试验
以上A类默认子网掩码255.0.0.0 &B类255.255.0.0 C类
255.255.255.0
假如换个掩码,记住掩码的0、1分界线,前面是网络号,后面是主机号
* & widows不能复制文字到虚拟机
在虚拟机菜单栏--vm--vmtool安装
Tcpip四层模型作用的理解及每层的协议:
数据链路层(ARP,RARP)又称网络接口层定义协议和网络连接,以便传递ip组。
网络层(IP,ICMP,IGMP)俗称IP层,处理机器之间的通信。
传输层(TCP,UDP)处理应用层之间的通信,即端到端通信。
应用层(FTP,HTTP,Telnet,DNS,SNMP,SMTP)用户调用应用程序来访问tcpip网络提供的各种服务。
OSI七层:物理层、数据链路层、传输层、网络层、表示层、会话层、应用层。
Tcp(transmission control protocol)三次握手,可靠
udp(user data protocol)短信,不可靠
CS(client/server)和BS(browser /server)的特点
Cs 需要客户端响应速度快、只能局域网、升级时每台重新安装成本高、对系统类型有要求。
Bs只要有一台上网的电脑就行,0客户端。
2、10M的带宽 10Mbit=10/8=1.25MB
&下载一首5MB的MP3大约需要4秒
DNS((Domain Name System)域名系统 114 告诉ip地址,然后浏览器建立连接
HTTP(Hypertext transfer protocol)
内存:ROM(bios)、RAM &外存:HD CD U-HD
软件:简单的说软件就是程序加文档的集合体。软件测试就是测试程序和文档。
软件一定是安装在外存的。
程序:代码的结合。
进程:程序的一次运行。进程一定在内存(RAM)里,没有内存就不能运行程序。
静态区和动态区
Vchar输入多少就是多少,char(10)输入3后面补7
int main()
Char ch[]="hello";//“hello”常量,不能动
char *pch="hello";//指针就是地址
ch[0]='H';//修改变量ch[0]的值,通过。
printf("%s\n",ch);
pch[0]='H';//想修改常量h为H,os要阻止这话总行为,终止进程。
printf("%s\n",pch);
pch 静态区常量“hello”的首地址,pch[0]就是常量h
进程在内存分两个区域:动态区(堆栈)+静态区
每个进程私有空间是栈+静态区
静态区:代码 全局变量 静态局部变量
栈:非静态局部变量 &函数运行信息
局部变量在(){}里定义的变量
11、单元测试:面向过程c语言测试函数,面向对象c++java测试类(水平要求高)
12、c语言编译生成二进制文件,java编译生成.Class字节码文件
,在java虚拟机上运行。&
Gcc &wzx.c & ./a.out
& 或gcc wzx.c -o wzx &./wzx
Javac wzx.java & java 类名
微软的外壳 shell explorer.exe
redhat进入字符界面
more /etc/inittab &查看文件, TAB补全,q 退出
init 3 转到字符界面 &重启reboot
14、unset LANG 解决vi模式乱码问题
15、虚拟机联网的条件在同一个网段
在主机上查看vmnet8的ip地址
配置网络:
Netconfig &配置信息放在/etc/resolv.conf
service network restart&
Ifconfig查看ip地址
service iptables stop 关闭防火墙
ping 虚拟机设置的192.168.199.100地址看主机和虚拟机是否联通
16、Xshell概念:
Ssh等于ftp文件传输和telnet远程登录的结合。
Web网页服务器apache阿帕奇(可以进行的网站压力测试)
mount(加载) /dev/cdrom &/mnt/cdrom
负责把光驱加载起来
点光驱,选择redhat的iso文件
ll /dev/cdrom
cd /mnt/cdrom/ReHat/RPMS/二进制文件
17、安装阿帕奇
rpm -i(install)安装软件
&-v显示安装信息
&-h安装进度
ivh httpd补全-2 补全------安装阿帕奇
rpm -ql httpd|less
编辑网页和连接虚拟机、主机80http联通
cd /var/www/html
hostname&wzx.html
netstat -anp|grep ":80" 看双方的连接
微软netstat -ano|find ":22"看tcp连接
service httpd start 开启之后才能在网页中显示文字
vi index.html &编辑的信息在主机浏览器中默认显示
18、安装两个samba共享
cd /mnt/cdrom/RedHat/RPMS
rpm -ivh samba -common -2.2.7a-7.9.0.i386.rpm
rpm -ivh samba -2.........共安装两个。
service httpd status看服务程序有没起来。
Ps -ef|grep “httpd”
cd /etc/samba/
mv smb.conf smb.conf.bak
vim smb.conf
写入老师给的那段代码
重启smb服务,让配置生效
cd /etc/samba/smb.conf
workgroup=comzsz
netbios name=pczsz
guest only=yes
guest account=root
security=share
[zszshare]
path=/var/www/html
writeable=yes
guest ok=yes
service smb restart
rpm -qa相当于打开微软的添加删除程序
19、xshell应用(学习了编译程序)
打开xshell 输入文件传输sftp root@192.168.199.100
命令cmd中输入netstat -anp|find ":22"看连接
再在xshell左下角open下再点localshell&
继续远程登陆输入ssh root@192.168.199.100
用xshell 条件
1、关闭防火墙service iptables stop
2、主机ip与linux在同一网段
20、安装jdk,配置环境变量
步骤一、在sftp(传文件)里cd / &
mkdir /java
选择java tar文件
然后再ssh里
tar -xzvf jdk....
改环境变量
然后查找目录
find java -name "java"
cd java/jdk/1.6.0_05/bin/
pwd&&/etc/profile 覆盖掉
vi /etc/profile
set nu 右移光标,显示行号
dd删除当前行、剪切好像
41开头加上 PATH=$PATH: &路径
source /etc/profile、、立即生效
、、在windows中配置jdk变量之后,重启cmd才能行
之前有装jdk就会出现:
有javac反应,但是输入java没反应
显示不能创建java虚拟机
javac -version
could not create。。。
在资源管理器中搜索 java.exe
把搜索到的三个文件删除
javac -version
Windows 的系统变量路径:c:\windows\system32,如果不小心删除了,重置这个
21、老师问,查看网络连接信息就是
netstat -anp|grep ":80"
在微软中用
Netstat -ano|find “:80”
vi命令的学习网站
http://www.51doit.org/#&
22、java实现乘法表
class sk &{
& & public static void
main(String[] args){
& & int i,j;
& & for (i = 1 ; i &= 9 ;
& &for(j = 1 ; j &= j
System.out.print(j + "*" + i + "=" + i * j + " &
&System.out.printf("%d*%d=%-3d
",j,i,j*i);&
&System.out.println();
javac sk.java
23、软件分类
一:按照部署形式分类
单机软件 &分布式软件(client/server
xshell/sshd&
& & brower/server
ie/apache)
二:按版权分类
copyright(版权保护)copyleft(开源免费 linux mysql)
三:安装方式分类
二进制软件(.rpm setup.exe) &绿色软件(解压之后就能用)
bugzilla配置
Bugzilla 是一个开源的缺陷跟踪系统(Bug-Tracking
System),它可以管理软件开发中缺陷的提交(new),修复(resolve),关闭(close)等整个生命周期。
首先,必须安装gcc,到图形界面中、进入linux 图形界面---开始--系统设置--添加删除程序
找到“开发工具”更新 --找到镜像redhat CD2
mount & /dev/cdrom &
/mnt/cdrom
cd &/mnt/cdrom/mysql
pwd &&& ls &
&//查看当前目录,当前目录下文件
MySQL-client-4.0.21-0.i386.rpm
MySQL-server-4.0.21-0.i386.rpm
rpm &-ivh MySQL-devel-4.0.21-0.i386.rpm
rpm &-qa | grep &MySQL
& //检查MySQL模块是否安装
chkconfig &--list &
chkconfig &mysql &on
&//设置mysql开机自动启动
service &mysql &restart
& & //启动mysql
ps &ef | grep &mysql &
&//查看mysql是否启动,看是否有
mysql的使用
mysql -uroot -p回车回车
&mysql&show &
& &//显示数据库
&mysql&create &database
&//创建数据库wzx
&mysql&show &databases
mysql& //一定要加分号,!
mysql&quit&
25、配置bugzilla
一 二 步骤mysql安装已做过,直接从第三步开始
 三 &cd &/mnt/cdrom
&bugzilla-2.18rc2.tar.gz
&/var/www/html/
 五 &cd &/var/www/html/
 六 &tar &xzvf
&bugzilla-2.18rc2.tar.gz
 七 &mv &bugzilla-2.18rc2
& bugzilla & &
&//文件夹改名wzx
&/mnt/cdrom/PerlModules/* &
 九 &cd &/tmp
 十 & ll & *.sh
 十一 & ./bugmod.sh &
& & //运行perl模块安装脚本
 十二 &安装后查看文件 setup.log 看是否都是0
 !!!若有未安装成功模块,请按照bugmod.sh脚本中的步骤单独安装未成功模块!!!
 十三 cd &
/var/www/html/bugzilla&
 十四 & ./checksetup.pl
 如果bugzilla的相关perl模块都安装成功,则会生成文件localconfig
 十五 编辑文件 # vi &localconfig
  & & 修改
12行(0-&1)、75行(数据库用户root)、85行(数据库用户口令123456,口令和mysql部分修改的口令一致)
 十六 &./checksetup.pl
  Enter the e-mail address of the administrator:root@主机名.com
&(//bugzilla管理员帐号)
  You entered 'root@主机号.com'. Is this correct? [Y/n] 回车
  Enter the real name of the administrator:姓名
  Enter a password for the administrator
account:工具bugzilla的管理员密码
  Please tetype the password to verity:再次输入密码
& 十七 #vi
&/etc/httpd/conf/httpd.conf&
&找到 &AddHandler
& &(AddHandler cgi-script .cgi )
&通过复制或手工增加下列文本:
//此处是自己设置的文件夹,sk没改,好纠结。&
& & & Options
ExecCGI &FollowSymLinks
AllowOverride Limit
& & & Order
allow,deny
& & & Allow from
& 十八 chown &-R
&apache.apache
&/var/www/html/bugzilla
&(//授权bugzilla文件夹给apache用户)
& 十九 & service
&httpd &restart
&http://192.168.1.1/bugzilla/index.cgi
//192.168.1.1是你的bugzilla所在机器ip地址
26、:set nu
shift键+ g到最后一行
按50 shift+g到50行
27、怎么查看一个服务的端口号呢?
netstat -anp|grep -i "listen"
然后输入ps -anp|grep "mysql"
接着比较上面命令最右边数字,比较下面ps的数字相同,看上面的左边端口是多少
因为很多直接输入netstat不会显示端口
只有http显示端口
find / -name "*.java" -mtime -7 7天之内
find / -name "*.java" -mtime -7 -exec grep "main" {} \;
显示含有main的java文件,但是不显示什么文件名
加上-exec ls{} \;
find / -name "*.java" -mtime -7 -exec ls {} \; -exec grep -n
"main" {} \;
显示含有main的java文件 并显示行号
find / -name "*.java" -mtime -5 -exec conmmand {} \;
以某个字符开头\& &\& ^ $
写入一些字符
命令模式下:
:/tom 模糊匹配tom
:/tom\&匹配tom结尾的word
:/ \精确匹配tom
:/^tom匹配tom开头的字符串
:/tom$匹配tom结尾的字符串
30、查看某个命令在哪个地方
rpm -qf /usr/bin/vim看属于那个包
怎么统计一个文件夹下的文件个数
ls -l|grep ^- &统计-开头的文件 ,只是列出文件,没有统计个数
ls -l|grep ^-|wc -l &统计文件个数
ls -l |grep ^d 表示文件夹
31、文件权限
- &rw-(主人) &r--(所在组)
&r--(其他人)
r:100 &4可读
w010 & 2可写
x001 & &1可执行
-000 & & 0
& 都不可 &
0~7 &0: &“---”
&7:rwx &就是4+2+1
chmod 700 abc &只有自己能看,其他人看不了
32、找出文件大小为0的文件
touch a b c d
find -size 0
rm -f a b c d 强制删除不询问
33、 “” &‘’ &``
echo "$ljj" & &----pwd
echo '$ljj' & &----ljj
echo `$ljj` &-----/root
34 、for i in `seq 1 1 9`
for j in `seq 1 1 $i`
echo -n "$j*$i=`expr $i \* $j`"
保存为 sk.sh
运行sh sk.sh & &或./sk.sh
35、date +%s &到现在多少秒
执行代码之前记住时间,执行之后记录时间,相减即为代码运行时间
36、传文件,然后ping &主机
&看是否联通
然后sftp root@目标主机
然后put shell.zip
然后ping &主机 &看是否联通
然后sftp root@目标主机
然后put shell.zip
"ps -ef" 是linux里查看所有进程的命令。
37、SQL语句分类
DDL:开发人员重点definition 数据定义语言
create drop alter(改) database table index view procedure
DML:测试人员重点manipulation 操纵
insert delete update select from where &
&order by &
DCL 控制语言
commit rollback
38、sqlserver
客户端 Microsoft &SQL server
--企业管理器-右键新建SQL注册
--local添加-
在菜单栏--工具--SQL查询分析器
sp_help t1 、、oracle里面desc t1看表
shif+home键 选中当前行,然后f5运行
39、创建数据库inventory在sqlserver要做,在oracle(cmd-sqlplus)直接从第二步开始建表)
右键数据库--新建数据库wzx
在服务里找mysql server路径
进入microsoftsql server\MSSQL\Data里面会多两个文件wzx_Data.mdf
wzx_log.ldf
select table_name from user_--查看有哪些表
在cmd中输入sqlplus &用户名scott &密码
有oracle没有数据库
在oracle -orahome90---configuration andmigration
tools--data
base configuration assistant--安装
oracle-orahome90---application
development---sqlplusworksheet
oracle-orahome90---application
development---sqlplus熟悉之后进入客户端
41、查询表中的数据 &select * from 表名 要插入数据后才能看
t(i int,j int not null)表示j不为空
t(i int,j int defualt 0)(默认值)当没输入数据的时候为0
t(i int,j int check(b in(1,3,5)));
t(i int,j int unique)不能重复输入相同数据,
若初值为null,则能为null,否则且不能null
t(i int,j int primary key)不能重复,不能为null 区别
42、数据库的范式
第一范式 &表必须有字段且字段不能相同 create table aa(a int,a
第二范式 &表有主键(primary key 唯一标识)
第三范式 &表有外键
43、静态区、动态区
void func(int i)
printf("%d%d\n",i,j);
动态区-栈-i:1-2 &1-2
静态区 & -j:0-1
&1-2没有退出程序,静态区数据不变
44、计算机的文件分两大类
文本文件 & 二进制文件
image最大存放2G&
数据库对应的物理文件
查看服务mysql属性,找到目录/..../data里面
一,查询工资sal大于1000的雇员的所有信息
select * from emp where sal&1000;
二、查询1981年右后入职的员工姓名ename 职位job
select ename,job from emp where hiredate&'01-01yue
三、将员工姓名与职位用‘-’连接一起显示
select ename||‘-’||job from emp
四、查询员工的姓名、职位、加上200的工资sal
select ename,job,sal+200 from emp
五、查询运功的工号empno、姓名ename、职位job、薪水
薪水=工资+奖金comm 注意null和not null
select empno,ename,job,sal+nvl(comm,0)"薪水"
六。查询所有工资sal在的员工信息
select * from emp where sal&1000 and sal &2000
update t1 set comm=nvl(comm,0)+500;
-----将emp中2000
create table emp2 as select empno,ename,sal,comm from emp
where sal&2000 and sal&3000;
将emp中大于4000的信息插入emp2中
insert into emp2 select empno,ename,sal,comm from emp where
sql语句中的几个统计(分组、聚合)函数
select max(sal),min(sal),sum(sal),avg,
count(*)显示行数 ,几个人
select (distinct sal)统计非空不相同工资
1、统计每个学生、没门课程的平均成绩
select &sid,avg(score) from sc group by
select &cid,avg(score) from sc group by
2、统计男女生的人数:
select ssex,count(*) from s
3、统计男女生的平均年龄,显示性别、平均年龄
select ssex,avg(sage) from s
4、统计同名的人数(不显示不同名的),显示姓名、人数
select sname,count(*) from student group by sname having
count(*)&=2;
5、查询至少选修2门课程的人,显示学号、课程数
select sid,count(cid) from sc group by sid having
count(cid)&=2;
6、统计男生的平均年龄,显示性别、平均年龄
select ssex,avg(sage) from student group by ssex having
ssex='男';
select avg(sage) from student where ssex='男' group by
分组的字段可以出现在select后面,没有分组的字段不能出现。
在sql、server里面可以不加分号
以table为中心,表也称之为关系。
关系就是表。
围绕着关系(表),可以引申出 index 索引、view视图
procedure存储过程、function函数
表示由一个个实体产生的。根据实体产生表
DDL not null check default unique primary key foreign
索引就相当于书本的目录
所有的DBMS,都自动为PK字段建立索引
索引建立:
create index idx_abc_b on abc(b);
sp_help abc
数据库对视图的定义
把一个查询语句定义为一个视图
select。。
create view v name as select *from 表
视图是虚表。 所看到的数据存在真正的表中
47、一个select 基本查询
高级查询多个select(子查询、链接查询、集合查询)
48、查询总分最高的人
先算每个人的总分,在按照总分降序排列,然后取出和第一个总分相同的
--1 找出每个人的总分
select sum(score) &zf &from
--2找出最大的总分
select max(zf) from
(select sum(score) zf &from sc group by sid)
--3每个人的总分和最大比较
select sid,sum(score) zf from sc group by sid
having sum(score)=(
select max(zf) from
(select sum(score) zf &from sc group by sid)
select sum(score) zf from sc group by sid
having sum(score)&=all(select sum(score) zf from sc group
49、--统计平均成绩,显示学号,姓名,成绩
select a.sid,a.sname,avg(sc.score) from sc,student a
&where a.sid=sc.sid
group by student.sid,sname
--from student a 取别名
select 后面如果跟变量(除了聚合函数sum,avg等之外的变量),
一定要出现在group by后面 &必须有主键,所以不影响分组。
非主键就有可能相同姓名,主键是唯一标识别,就像身份证肯定不同,姓名却可以相同。
select a.sname,a.sid,score from
(select sid,avg(score) pj from sc group by sid) a,
where a.sid=b.sid
50、找出高等数学比c语言成绩高的人
select *from
(select * from sc where cid=1) a,
(select * from sc where cid=2) b
where a.sid=b.sid and a.score&b.score
from sc x,sc y where x.sid=y.sid and x.cid=1 and y.cid=2 and
x.score&y.score
51、查询需要补考的人,显示学号,姓名,补考课程
--5、查询需要补考的人,显示学号,姓名,补考课程名称
select a.sid,sname,c.cid,score from
(select * from sc where score&60) a,
(select * from student) b,
(select * from course)c
where a.sid=b.sid and c.cid=a.cid and score&60
select sc.sid,sname,cname
from student x,sc,course y
where x.sid=sc.sid and sc.cid=y.cid and score&60
1、基于表student sc course
查询没门课程都及格的人,显示学号、姓名
select distinct a.sid,sname
from student a,sc
where a.sid=sc.sid and score&60
2、用c或java 实现查找给定整型数组中的最大值
比如int[]={1,5,6,2,11,34,8}
int main()
int k=0,i,a[5];//这里不能为5,输出结果错误,填10就对
printf("please input some
&numbers!\n");
for(i=0;i&5;i++)scanf("%d",&a[i]);
for(i=0;i&5;i++)
printf("%d",k);
return 0; &&
1、查询同名的人 ,显示名字和人数
select sname,count(sname)
from student
group by sname
having count(sname)&=2
2、查询同名的人,显示学号,姓名,性别
方法一、子查询当做表使用
select b.sid,a.sname,b.ssex from
(select sname,count(sname)sz
from student
group by sname
having count(sname)&=2)a,
where a.sname=b.sname
方法二 &不等号“&&”连接查询
select a.sid,a.sname,a.ssex&
from student a,student b
where a.sid&&b.sid and
a.sname=b.sname&
group by a.sid,a.sname,a.ssex
方法三、in 子查询
select * from student
where sname in(select sname&
from student&
group by sname
&having count(sname)&=2)
from student inner join sc on student.sid=sc.sid
外连接student left(right) join sc on student.sid=sc.sid
3、统计在册所有学生,显示学号,姓名选课数量(包括没有选修的)
select a.sid,sname,count(cid)sl&
from student a left outer join sc on
&a.sid=sc.sid
group by a.sid,sname
4、集合查询 并集union 交集intersect 差集minus
select * form a1 union select *from a2
select * form a1 union all select *from a2也显示相交的部分
统计课程号为1的成绩分布,显示等级,人数
方法,先查询优的人数,等级,再查询良最后union
select '优'等级,count(sid)人数 from sc where cid=1 and score&=90
select '良'等级,count(sid)人数 from sc where cid=1 and score&=80
and score &90 union
select &'及格'等级,count(sid)人数 from sc where
cid=1 and score&=60and score &80 union
select & '不及格'等级,count(sid)人数 from sc where
cid=1 and score &60
第二步:再加上cname
select cname,' & 优'等级,count(sid)人数 from
sc,course a where sc.cid=a.cid and sc.cid=1 and score&=90
&group by cname union
select cname,' &良'等级,count(sid)人数 from
sc,course a where sc.cid=a.cid and sc.cid=1 and score&=80 and
score &90 group by cname &union
select &cname,' 及格'等级,count(sid)人数 from
sc,course a where sc.cid=a.cid and sc.cid=1 and score&=60and
score &80 group by cname union
select & cname,'不及格'等级,count(sid)人数 from
sc,course a where sc.cid=a.cid and sc.cid=1 and score &60 group
6、检查是否有mysql-noinstall-5.1.31-win32.zip
解压出来,path里设置bin目录的环境变量
在cmd中:&mysqld.exe install
然后再服务里面看是否有mysql服务
微软里开启服务,net start mysql
标准的SQL 扩展部分
标准的SQL是不能用来编程的,每个DBMS厂商在标准的sql基础上进行扩展,加入了编程的要素:
可以定义变量 &支持控制结构 &提供一些函数
&可以自己定义函数
数据库:存储过程 --相当于c、java没有返回类型的函数void main(){}
函数--相当于c、java 有返回类型额函数 int main(){}
在c、java中函数的调用方式是一样的
但在数据库中存储过程和函数的调用方式不一样
存储过程用execute & 过程名称(实参) ; 调用
函数 & 在select语句中调用
8、#include //代表引用现成的函数(标准c语言库函数)
& #include "stdio.h"//代表引用自己定义的函数
.h文件里面放的都是函数声明
形参:函数声明或函数定义,小括号括号里面的参数
比如 int func(int i,intj)i,j就是形参
实参:函数调用时,小括号里的数据
int a=3; //a不是实参
&func(a)a=3就是实参,函数调用的时候
9、存储过程
create procedure nyfind(id int)
str char(10);
select sname into str from student where sid=
dbms_output.put_line('find:'||str);
execute nyfind(1)找学号1的人不要用select
create procedure nyfind(id int)
str char(10);
select sname into str from student where sid=
dbms_output.put_line('find:'||str);
execute nyfind(1)
输出名字“亚楠”
10、为成绩登记统计表创建过程
create procedure nyfind(@id int)
--str char(10);
select cname,' & 优'等级,count(sid)人数 from
sc,course a where sc.cid=a.cid and sc.cid=@id and score&=90
&group by cname union
select cname,' &良'等级,count(sid)人数 from
sc,course a where sc.cid=a.cid and sc.cid=@id and score&=80 and
score &90 group by cname &union
select &cname,' 及格'等级,count(sid)人数 from
sc,course a where sc.cid=a.cid and sc.cid=@id and score&=60and
score &80 group by cname union
select & cname,'不及格'等级,count(sid)人数 from
sc,course a where sc.cid=a.cid and sc.cid=@id and score &60
group by cname
--dbms_output.put_line('find:'||str);
继续exec nyfind 1
1 oracle联系1-17 (写上成功的sql 语句,表用oracle中现成的)
2前提准备好java开发工具myeclipse 二级制默认安装
将数量超过30的所有药品按类别分类,求每类的数量总和,库存金额总和
库存金额=数量*进价(采购价)
select itemtype, sum(quantity),sum(quantity*buyprice)
from drug &where quantity&30
group by itemtype
2、mysql回车进入后不能建立数据库,没有权限
&mysql -uroot -p 回车
&回车可以建立
3、数据备份:物理备份,逻辑备份
oracle、 &sqlserver、mysql 对应的物理文件
最可靠的方法,看服务里的属性,找目录
备份: mysqldump -uroot -p wzx&wzx.sql
恢复: mysql -uroot -p wzx
假如删除一个数据库,要恢复
首先建立一个空的数据库,然后mysql -uroot -p wzx
这时候数据库里面就会有备份的表了。
use databasename
mysql : mysqldump导出、mysql恢复
在oracle:exp 、 imp
exp scott/tiger@wzx tables=(ac)
file=any、、wzx是oracleservicewzx
dcl: grant 授权 、commit提交 、 rollback回滚
grant all privileges on *.* to sk@'%' identified by
mysql -h192.168.1.10 -usk -p123456
netstat -ano|find "110:3306"
在oracle企业管理器创建一个用户 &system
&密码manager
sqlplus--system--manager--参考scott用户的权限
在企业管理器里面--安全性--用户--system--打钩
5、oracle安装后默认有三个用户
sys(change_on_install) system(manager)
&scott(tiger)
mysql 默认用户roott 口令空
sqlserver默认用户 sa 口令空
6、在oracle里建立一个用户
首先登陆管理员,system--manager
然后,对象--创建--用户--权限参考scott
sqlplus--用户--密码--show user
7、我在oracle、sqlserver、mysql里面使用过标准的sql语句
企业问:他们之间的差异
sqlserver 停掉sqlserver服务,所有的数据库都不能用
oracle中一个数据库一个服务
8、触发器是特殊的存储过程--特殊在:自动运行
& &正方形是特殊的长方形
9、事务:把多个sql语句当作一个整体处理(原子操作:不可分解的最小操作)
要么一起成功,要么一起失败。
一组sql语句
rollback重来
create table wq(i int, j int);
insert into wq(1,1);
savepoint st1;
insert into wq values(2,2);
rollback to savepoint st1;
#define FSB 2+2//宏
void main()
//输出结果就是4,0
printf("%d,%d\n",FSB*FSB,i)
}如果前面没有static,输出的结果在栈中,不知道的,是随机数
11、新建javaproject 默认---在src中右键--file---取名test1.java
alt+/补全 ===回车
右键src --run as &选第二个
1,技能书p87(test.chm)数据库2,3,8
2,在myeclipse中实现乘法口诀
暑假十 (C/S)
课前准备:
1、主机与oracle虚拟机通信
2、在oracle安装路径C:\oracle\ora90\jdbc\lib下查找classes12.jar文件,并将文件复制到主机
3、将之前复制的jdk-6u10-docs.zip文档解压到主机某个目录
写一个简单的c/s 连接oracle
新建--web project
1、怎么找eclipse里面的工作目录的.class
右键src--Myeclipse--open in explorer-然后进入上层bin里
2、右键wzx1--最后一行属性--java Build Path--libraries----add external
&jars &--classes12.jar
src-右键新建file--
class wzx{
public static void main(String[] args) throws
ClassNotFoundException, SQLException
{//第一步加载连接oracle数据库的类
Class.forName("oracle.jdbc.driver.OracleDriver");
//第二步 建立和数据库的连接
Connection
sk=DriverManager.getConnection("jdbc:oracle:thin:@192.168.1.128:1521:wzx"
, "scott", "tiger");
//课间用oracle的client在oracle里面创建一张表
//sh1(bh int primary key,xm char(20))并向表中加2条数据
Statement hy=sk.createStatement();
ResultSet jgj=hy.executeQuery("select * from sh1");
//第四步,处理结果集中地数据
while(jgj.next())
System.out.println(jgj.getInt(1)+"----"+jgj.getString(2));
3、怎么看oracle里面的数据库
在服务里面找oracleservicewzx,wzx就是数据库
4、城迈科技招聘测试,去上海实习半年
22号前安排面试,面试通过22号后去上海
实习有补贴,包住宿
5、jni 实现javac语言通信
6、一个语言:数据类型 运算符号 &控制结构 &函数
所有语言分基本数据类型和构造数据类型(由现有的类型构造出来的,比如数组,c/java的class
struct SHL
char xm[20];//c++
1、运算符号几乎一样,只有一两个不一样
c &取地址 & java与
2、基本数据类型 都有int char float&
c的有符号的char=java的byte &-2^7~2^7-1
3、构造数据类型 数组array、 &class(javac++)
4、控制结构 if while &for switch
5、都有指针,java里称“引用”,所以java有指针
6、命名规范数字字母下划线,数字不能开头,java多个$符号
7、定义函数风格一样
一、c的char一个字节
&java的char2个字节(为了支持unicode)
二、c面向过程(最小单位是函数),java是面向对象(最小单位是类)
三、c是编译语言,java是先编译+后解释(要在jvm上运行)
四、c的基本数据类型分有符号和无符号,
Java的基本数据类型都是有符号的
五、真假的表示(java有boolean类型)c语言:非0都是真 &0就是假
&java:表达式的运算结果:成立 真,不成立 假
while(1);语句 在c语言中可以,java不行。
六、c的定义在语句块的头部 & c++和java即用即定义
七、纯虚函数(c++) &抽象方法(java)
八、无接口(c++) &interface (java)
九、命名空间namespace(c++) &包(package)
十、#include引用函数 类 & &
& java通过import导入类、接口
十一、指针 & & &
&叫法不同而已
十二、有struct & &
& 无struct
十三、&取地址 & &
& &instance of
//SHL sh1= 出错,找不到指针
SHL sh1=new SHL();//引用变量
System.out.println(sh1.bh);
堆:是所有进程共享的内存空间
c:malloc &c++:new
String sk1="hello";//静态区
String sk2="hello";//char *sk2="hello"
System.out.println(sk1==sk2);
String sk3= new String("hello");
String sk4= new String("hello");
System.out.println(sk3==sk4);
输出结果true//sk1,sk2指向同样的地址“hello”
& false//sk3,sk4申请了不同的内存地址
7、B/S应用可以写在简历里(实现对表的数据的增删改查)
browser:看到的html hypertext markup 标记 language
标签&& &&/& &
js(javascript)、jsp(java server pages)
html只能显示数据,不能编程,所以所有的网站都要用一个脚本语言javascript来协助操作html
javascript语法类似c/java
数据处理肯定用java实现(用jsp实现)
new--web project--把webroot--jsp删除
webroot--new--html
& 控制dsd字体网站就是由文字、图片、文件组成。
-右键-开所在目录--复制三个html、jpg到虚拟机C:\oracle\ora90\Apache\Apache\htdocs目录下
这个通过服务--oracleora90http--属性找
192.168.1.128/sk.html
f12---编辑--更改了之后再点编辑--出现变化
1、找一个可以实时编辑查看html效果的
signed char取值范围是 -128 到 127
unsigned char 取值范围是 0 到 255
2、把c语言char有符号和无符号运行
int main()
char ch1=128,ch2=-128;
printf("%d%d\n",ch1,ch2);
int main()
unsigned char ch1=0;ch2=-1;
printf("%d%d\n",ch1,ch2);
3、在myeclipse中把c语言数组最大值
int k=0,i,a[]={2,5,1,6,8,0};//这里不能为5,输出结果错误,填10就对
//printf("please input some
&numbers!\n");
//for(i=0;i&5;i++)scanf("%d",&a[i]);
for(i=0;i&5;i++)
System.out.println(k);
提前查看技能部分要点,准备电子版简历
/mnt加载光驱 &/dev设备 &/home用户
&/etc配置文件 &/root /tmp
&/binary &/lib
find /etc -exec grep -in "192.168.1.212" & {}
\; -exec ls {} \;
BLOB &CLOB
如果进程是服务 service mysql stop
如果进程不是服务 &ps -ef &kill
ll显示文件详细信息,权限,属于哪个用户,哪个组
ls显示文件名
awk 把格式化的数据取出某一列
grep -v 过滤信息
ping 127.0.0.1&a &后台运行
ps -ef|grep "\" | grep -v grep |awk '{ print $2}'
ps -ef|grep "\" | grep -v grep |awk '{ print "kill -9
ps -ef|grep "\" | grep -v grep |awk '{ print "kill -9
B/S最简单的:用html写页面,并把页面部署到s(webserver)
apache IIs
B/S(两个server:webserver、dbserver)
(ms的技术微软)asp(active server page)
(oracle公司)jsp(java server page)
B/S html(hypertext markup
&language):显示数据,接受用户输入数据。
js &会使用document对象 操作html元素
B/S html:界面--用户可以输入数据
----用js来对数据进行控制
function wzx(ljj)
var a=document.getElementByIdx_x("bh").
var b=document.getElementByIdx_x("bh").
var c=ljj.xs.
{alert("please input bh");}
this代表当前对象
html的作用是显示数据,采集数据
js的作用是通过document实现对html元素的操作
页面有静态,动态
静态页面只要浏览器就能浏览
动态页面必须部署到webserver相应的路径下,再由浏览器通过http协议去访问浏览。
/var/www/html
C:\oracle\ora90\Apache\Apache\htdocs
主机文件复制到虚拟机
1、xshell --sftp---put--
shell-- ssh---cp
虚拟机文件复制到主机中
1、lpwd-查看要复制到的目录
lcd-修改复制目录
因为jsp是java写的页面,所以一般的webserver不能正确的运行jsp
运行jsp需要:JDK+webserver(必须支持java的)
支持java的webserver有时也成为application server(应用服务器)
安装支持java的webserver
1、找到上传的文件tocmcat.*zip
2、cp /usr/src & 解压unzip
&tomm....zip
3、修改解压后的文件夹的权限
chmod -R 755 tomcat
4、复制/usr/src下的文件tomcat_service
到/etc/init.d路径下并将文件名称修改为tomcat:
查看/etc/init.d下其他文件权限,把tomcat修改为同样的权限
查看/etc/init.d下的shell脚本
httpd &mysql &network
5、查看你的linux中的安装路径
6、编辑文件/etc/init.d/tomcat(告诉tomcat
&jdk的安装路径)
将其中的java_home=修改为你的jdk安装路径
7、chkconfig --list tomcat
chkconfig --add tomcat
chkconfig --del tomcat
chkconfig tomcat on
chkconfig tomcat off
8、启动服务service tomcat start
9、netstat -anp|grep ":8080"查看是否启动
jsp:从形式上看就是在html里面写java 代码
asp:写vbscribt代码 &运行asp只需要IIs,自带运行环境
php:写php代码
pl:写perl代码 &运行php、pl
需要apache或IIs+php运行环境或perl运行环境
不管是asp、jsp、php
把这个文件存到tomcat的webapps的ROOT下,通过http://192.168.1.124:8080/index.jsp
以上网友发言只代表其个人观点,不代表新浪网的观点或立场。

我要回帖

更多关于 移动数据流量套餐月费 的文章

 

随机推荐