虫虫首页|资源下载|资源专辑|精品软件
登录|注册

M-<b>CSF</b>

  • 题目:利用条件运算符的嵌套来完成此题:学习成绩>=90分的同学用A表示

    题目:利用条件运算符的嵌套来完成此题:学习成绩>=90分的同学用A表示,60-89分之间的用B表示,60分以下的用C表示。 1.程序分析:(a>b)?a:b这是条件运算符的基本例子。

    标签: gt 90 运算符 嵌套

    上传时间: 2015-01-07

    上传用户:lifangyuan12

  • The government of a small but important country has decided that the alphabet needs to be streamline

    The government of a small but important country has decided that the alphabet needs to be streamlined and reordered. Uppercase letters will be eliminated. They will issue a royal decree in the form of a String of B and A characters. The first character in the decree specifies whether a must come ( B )Before b in the new alphabet or ( A )After b . The second character determines the relative placement of b and c , etc. So, for example, "BAA" means that a must come Before b , b must come After c , and c must come After d . Any letters beyond these requirements are to be excluded, so if the decree specifies k comparisons then the new alphabet will contain the first k+1 lowercase letters of the current alphabet. Create a class Alphabet that contains the method choices that takes the decree as input and returns the number of possible new alphabets that conform to the decree. If more than 1,000,000,000 are possible, return -1. Definition

    标签: government streamline important alphabet

    上传时间: 2015-06-08

    上传用户:weixiao99

  • 电力系统在台稳定计算式电力系统不正常运行方式的一种计算。它的任务是已知电力系统某一正常运行状态和受到某种扰动

    电力系统在台稳定计算式电力系统不正常运行方式的一种计算。它的任务是已知电力系统某一正常运行状态和受到某种扰动,计算电力系统所有发电机能否同步运行 1运行说明: 请输入初始功率S0,形如a+bi 请输入无限大系统母线电压V0 请输入系统等值电抗矩阵B 矩阵B有以下元素组成的行矩阵 1正常运行时的系统直轴等值电抗Xd 2故障运行时的系统直轴等值电抗X d 3故障切除后的系统直轴等值电抗 请输入惯性时间常数Tj 请输入时段数N 请输入哪个时段发生故障Ni 请输入每时段间隔的时间dt

    标签: 电力系统 计算 运行

    上传时间: 2015-06-13

    上传用户:it男一枚

  • 一:需求分析 1. 问题描述 魔王总是使用自己的一种非常精练而抽象的语言讲话,没人能听懂,但他的语言是可逐步解释成人能听懂的语言,因为他的语言是由以下两种形式的规则由人的语言逐步抽象上去的: -

    一:需求分析 1. 问题描述 魔王总是使用自己的一种非常精练而抽象的语言讲话,没人能听懂,但他的语言是可逐步解释成人能听懂的语言,因为他的语言是由以下两种形式的规则由人的语言逐步抽象上去的: ----------------------------------------------------------- (1) a---> (B1)(B2)....(Bm) (2)[(op1)(p2)...(pn)]---->[o(pn)][o(p(n-1))].....[o(p1)o] ----------------------------------------------------------- 在这两种形式中,从左到右均表示解释.试写一个魔王语言的解释系统,把 他的话解释成人能听得懂的话. 2. 基本要求: 用下述两条具体规则和上述规则形式(2)实现.设大写字母表示魔王语言的词汇 小写字母表示人的语言的词汇 希腊字母表示可以用大写字母或小写字母代换的变量.魔王语言可含人的词汇. (1) B --> tAdA (2) A --> sae 3. 测试数据: B(ehnxgz)B 解释成 tsaedsaeezegexenehetsaedsae若将小写字母与汉字建立下表所示的对应关系,则魔王说的话是:"天上一只鹅地上一只鹅鹅追鹅赶鹅下鹅蛋鹅恨鹅天上一只鹅地上一只鹅". | t | d | s | a | e | z | g | x | n | h | | 天 | 地 | 上 | 一只| 鹅 | 追 | 赶 | 下 | 蛋 | 恨 |

    标签: 语言 抽象

    上传时间: 2014-12-02

    上传用户:jkhjkh1982

  • We have a group of N items (represented by integers from 1 to N), and we know that there is some tot

    We have a group of N items (represented by integers from 1 to N), and we know that there is some total order defined for these items. You may assume that no two elements will be equal (for all a, b: a<b or b<a). However, it is expensive to compare two items. Your task is to make a number of comparisons, and then output the sorted order. The cost of determining if a < b is given by the bth integer of element a of costs (space delimited), which is the same as the ath integer of element b. Naturally, you will be judged on the total cost of the comparisons you make before outputting the sorted order. If your order is incorrect, you will receive a 0. Otherwise, your score will be opt/cost, where opt is the best cost anyone has achieved and cost is the total cost of the comparisons you make (so your score for a test case will be between 0 and 1). Your score for the problem will simply be the sum of your scores for the individual test cases.

    标签: represented integers group items

    上传时间: 2016-01-16

    上传用户:jeffery

  • 汉诺塔!!! Simulate the movement of the Towers of Hanoi puzzle Bonus is possible for using animation

    汉诺塔!!! Simulate the movement of the Towers of Hanoi puzzle Bonus is possible for using animation eg. if n = 2 A→B A→C B→C if n = 3 A→C A→B C→B A→C B→A B→C A→C

    标签: the animation Simulate movement

    上传时间: 2017-02-11

    上传用户:waizhang

  • 本代码为编码开关代码

    本代码为编码开关代码,编码开关也就是数字音响中的 360度旋转的数字音量以及显示器上用的(单键飞梭开 关)等类似鼠标滚轮的手动计数输入设备。 我使用的编码开关为5个引脚的,其中2个引脚为按下 转轮开关(也就相当于鼠标中键)。另外3个引脚用来 检测旋转方向以及旋转步数的检测端。引脚分别为a,b,c b接地a,c分别接到P2.0和P2.1口并分别接两个10K上拉 电阻,并且a,c需要分别对地接一个104的电容,否则 因为编码开关的触点抖动会引起轻微误动作。本程序不 使用定时器,不占用中断,不使用延时代码,并对每个 细分步数进行判断,避免一切误动作,性能超级稳定。 我使用的编码器是APLS的EC11B可以参照附件的时序图 编码器控制流水灯最能说明问题,下面是以一段流水 灯来演示。

    标签: 代码 编码开关

    上传时间: 2017-07-03

    上传用户:gaojiao1999

  • TCP/IP Socket软件设计

    获取计算机IP地址等网络参数 UDP聊天程序 TCP聊天程序 浏览器的实现

    标签: 获取计算机的名称和IP地址 基本C/S模式的通信实验

    上传时间: 2015-04-12

    上传用户:scnbyh

  • (免费)基于FPGA的机器人视觉系统模块的设计.doc

    基于FPGA的机器人视觉系统模块的设计 关键字: 机器人 视觉系统 集成电路 FPGA     一、概述   视觉技术是近几十年来发展的一门新兴技术。机器视觉可以代替人类的视觉从事检验、目标跟踪、机器人导向等方面的工作,特别是在那些需要重复、迅速的从图象中获取精确信息的场合。尽管在目前硬件和软件技术条件下,机器视觉功能还处于初级水平,但其潜在的应用价值引起了世界各国的高度重视,发达国家如美国、日本、德国、法国等都投入了大量的人力物力进行研究,近年来已经在机器视觉的某些方面获得了突破性的进展,机器视觉在车辆安全技术、自动化技术等应用中也越来越显示出其重要价值。本文根据最新的CMOS图像采集芯片设计了一种通用的视觉系统模块,经过编制不同的图像处理、模式识别算法程序本模块可以应用到足球机器人,无人车辆等各种场合。

    标签: FPGA的机器人视觉系统

    上传时间: 2015-04-25

    上传用户:justgo123

  • samba服务器实验指导

    第一节、samba是干什么的?它有什么用? Samba(SMB是其缩写) 是一个网络服务器,它是Linux作为本地服务器最重要的一个服务,用于Linux和Windows共享文件之用;Samba可以用于Windows和 Linux之间的共享文件,也一样用于Linux和Linux之间的共享文件;不过对于Linux和Linux之间共享文件有更好的网络文件系统 NFS,NFS也是需要架设服务器的; 2、安装及服务操作命令 安装samba程序非常简单,使用rpm -q samba查看当前系统是否已经安装了samba软件。 如果没有那就进入光盘,rpm -ivh *samba*.rpm即可。 仔细说下安装的包: samba-common-3.0.28-0.el5.8    //samba服务器和客户端中的最基本文件 samba-3.0.28-0.el5.8           //samba服务器核心软件包 system-config-samba-1.2.39-1.el5     //samba图形配置界面 samba-client-3.0.28-0.el5.8          //samba客户端软件   启动、暂停和停止服务: /etc/init.d/smb start /etc/init.d/smb stop /etc/init.d/smb restart 或 service smb start service smb stop service smb restart   第二节、由最简单的一个例子说起,匿名用户可读可写的实现 第一步: 更改smb.conf 我们来实现一个最简单的功能,让所有用户可以读写一个Samba 服务器共享的一个文件夹;我们要改动一下smb.conf ;首先您要备份一下smb.conf文件; [root@localhost ~]# cd /etc/samba [root@localhost samba]# cp smb.conf smb.conf.bak [root@localhost samba]# vi smb.conf 或geidt smb.conf & 然后我们把下面这段写入smb.conf中:   [global] workgroup = WORKGROUP netbios name = Liukai server string = Liukai's Samba Server security = share [test]         path = /opt/test         writeable = yes         browseable = yes         guest ok = yes 注解: [global]这段是全局配置,是必段写的。其中有如下的几行; workgroup 就是Windows中显示的工作组;在这里我设置的是WORKGROUP (用大写); netbios name 就是在Windows中显示出来的计算机名; server string 就是Samba服务器说明,可以自己来定义;这个不是什么重要的; security 这是验证和登录方式,这里我们用了share ;验证方式有好多种,这是其中一种;另外一种常用的是user的验证方式;如果用share呢,就是不用设置用户和密码了; [test] 这个在Windows中显示出来是共享的目录; path = 可以设置要共享的目录放在哪里; writeable 是否可写,这里我设置为可写; browseable 是否可以浏览,可以;可以浏览意味着,我们在工作组下能看到共享文件夹。如果您不想显示出来,那就设置为 browseable=no,guest ok 匿名用户以guest身份是登录; 第二步:建立相应目录并授权 [root@localhost ~]# mkdir -p /opt/test [root@localhost ~]# id nobody uid=99(nobody) gid=99(nobody) groups=99(nobody) [root@localhost ~]# chown -R nobody:nobody /opt/test 注释:关于授权nobody,我们先用id命令查看了nobody用户的信息,发现他的用户组也是nobody,我们要以这个为准。有些系统nobody用户组并非是nobody ; 第三步:启动服务器 第四步:访问Samba 服务器的共享; 1、在Linux 中您可以用下面的命令来访问; [root@localhost ~]# smbclient -L //liukai或 smbclient //192.168.0.94/test Password: 注:直接按回车 2、在Windows中,您可以用下面的办法来访问; \\liukai  或  \\192.168.0.94 3、说明:如果用了netbiosname,就可以用“\\主机名”来访问,如果没用netbiosname,就不能用主机名访问。   第三节、简单的密码验证服务器 修改smb.conf文件: security = user guest account = liukai encrypt passwords = yes smb passwd file = /etc/samba/smbpasswd 然后,建立一个新用户 useradd liukai passwd liukai 成功后,cat /etc/passwd | mksmbpasswd.sh > /etc/samba/smbpasswd smbpasswd -a liukai 这就成功地添加了一个smb用户。 重启服务,使用这个用户进行登录即可。    

    标签: samba 嵌入式

    上传时间: 2015-05-13

    上传用户:yangkang1192