tao

数据库方面】

1、SQL题目,都是一些左连接、右链接,以及多表查询数据(子查询)

2、删除关联多表的数据(级联);题目,大致为:删除A表中订单日期大于2010-10-01的信息,同时,关联表的相关记录自动删除;

【LINUX操作命令】

1、ps -ef|grep-admin/admin  请问admin的作用是什么?作用主要是这一命令将显示进程清单中所有包含单词admin的进程。

2、用两个文件a.txt;b.txt.使用linux命令,复制,a.txt文档倒数第十行的记录to b.txt文档;菜鸟啊,这个没有做出来。只知道一个cp.

【编程随便什么语言没有限制】

1、在一个输入字符的字符串中,查找第一个只出现一次的字符并输出。如下是两种实现的方法,大家可以参考。

=================================================================================================

如输入abaccdeff,输出b

/************************************************************************/
/* 使用multimap查找字符串中第一个只出现一次的字符                       */
/************************************************************************/
#include<map>
#include<iostream>
using namespace std;
int main()
{
char *str;
str=new char[20];
cin>>str;//输入字符串
int i;
int len=strlen(str);
multimap<char,int>m_str;
multimap<char,int>::iterator m1_Iter;
typedef pair<char,int>Int_Pair;
for(i=0;i<len;i++)
{
  m_str.insert(Int_Pair(str[i],i)); //向multimap中插入数据项,str[i]作为第一个key,i作为value
}
for(m1_Iter=m_str.begin();m1_Iter!=m_str.end();m1_Iter++)//输出multimap中的数据
  cout<<" "<<m1_Iter->first<<" "<<m1_Iter->second<<endl;
cout<<endl;
  i=0;
int count;
while(str[i]!='/0')//查找第一个只出现一次的字符
{
    count=m_str.count(str[i]);
cout<<str[i]<<"  count="<<count<<endl;
if(count==1)break;
     i++;
}

cout<<str[i];//输出

}

===================================================================================================

def findFirstOnlyOneChar_PYTHON( s ):
    N = len( s )
    H = { }
    for x in s:
        if not x in H:
            H[x] = 1
        else:
            H[x] = H[x]+1
    for x in s:
        if H[x]==1:
            return x,1
    return "",0
S = "I am a worker. Both you and I are chinese."
x,p = findFirstOnlyOneChar( S )
print ( "S=",S)
if p==1:
    print( " The first char only once = ", x)
else:
    print( " not find")

print( "--- 使用Python特色的哈希表dict -----")
x,p = findFirstOnlyOneChar_PYTHON( S )
print ( "S=",S)
if p==1:
    print( " The first char only once = ", x)
else:
    print( " not find")

S = "aabbcc最直观的想法是从头开始"
x,p = findFirstOnlyOneChar_PYTHON( S )
print ( "S=",S)
if p==1:
    print( " The first char only once = ", x)
else:
    print( " not find")   

S = [12,1,78,12,78,99,100,1]
x,p = findFirstOnlyOneChar_PYTHON( S )
print ( "S=",S)
if p==1:
    print( " The first number only once = ", x)
else:
    print( " not find")
【测试设计
给了一个淘宝登陆页面,设计用例,这个就不用重复了,大家都懂得了。
2、用两个文件a.txt;b.txt.使用linux命令,复制,a.txt文档倒数第十行的记录to b.txt文档;菜鸟啊,这个没有做出来。只知道一个cp.

答案:tail -10 a.txt>>b.txt

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值