In this lab, each student is to write a program that allows the user to manipulate the entries in vector, or in a matrix. The program should keep track of one vector of variable length, and one matrix of exactly 4x4 size. The program should enter a loop, displaying a set of options (given below). Once the user selects an option, the program should display the vector (or matrix, as appropriate) before and after the operation chosen by the user. For example, if the user selects “reverse vector” and the current vector is [-3 0 2 5] then the program should display:
关系不一定是一对一,也可能是一对多、多对一、多对多关系,如一本书可以对应多个作者,而一名作者也可以对应多本书。这类情形也可以由E-R图反映。
Implement a templated Stack class. It must implement the following interface (abstract class), which you should inherit from. In other words, create a file IStack.h which contains this definition, and then your own class (which may be called something like ListStack or ArrayStack or other, depending on how you impement it) should inherit publicly from IStack.
Web的裸写大作业,做一个Cinemas,包括Image Gallery,Movies Selection,Movies Reservation,Shopping Cart等等功能页面,简单粗暴耗时,做了整整两天。30个得分点,每个一分,再加上bonus那滋味真是酸爽。
一个21点的扑克牌游戏,作业提供了框架以及游戏引擎,不过UI库是学校内部的,需要学习成本。刨除UI部分,整体不难,无非就是deal, hit, stand三个按钮,然后label显示得分。
In this Assignment, you should write a program that allows the user to perform simple arithmetic in binary. Upon starting, the program should tell the user that it is a binary math program, along with brief instructions on how to use the program. The program should then enter a loop, where it gives a prompt, such as “input>”. Upon receiving input from the user, the program should process it, report the output result (or error), and loop back to the prompt. This should continue until the user gives the keyphrase to exit the program (keyphrase is your choice, good choices are “quit”, “end”, “exit”, etc.). For example:
Twenty tobacco budworm moths of each sex were exposed to different doses of the insecticide trans-cypermethrin. The numbers of budworm moths killed during a 3-day exposure were as follows for each sex (male, female) and dose level in mg’s
Greedy Algorithm,也就是贪心算法,局部最优化的算法,虽然可以快速得到解,但是这个解往往不会是全局最优解。不过这个算法的思想倒是挺有趣的。
Prior to beginning tis assignment, please download the studentsdb.sql, studentdb.pdf and the Index.php file from the course web site. In this assignment, you are to complete the php script, Index.php, which will use the values input by the user. This script contains one push botton and one textbox in order to perform the interaction. The web page should provide the following functions:
Database Management的大,根据现有代码片段以及架构图,实现一个完整的Database System,不过相对的比较灵活。
大数据作业,利用Hadoop去跑数据集,先是几个基本的MapReduce简单问题,当然也可以用Hive,然后是去计算TF-IDF,当然,数据集得自己下,Hadoop平台也得自己去搭。
Insert Sort和Merge Sort是排序算法中两个最基础的算法,虽然实际中很难用到,但是作为排序的启蒙还是不错的。 此次要求写出Insert Sort和Merge Sort,并根据随机输入对比两个算法的时间复杂度。分别在最好和最坏以及平均的情况下,通过不同数据量的输入进行对比实验。
调试方面,R语言还是比较方便的,打印变量、画图等,不过相对的,由于没有方便的IDE支持,编程速度相比C/C++,Java,Python倒是慢了不少。 虽然严格要求编程习惯是好事,但是过于严格就有点过了。大部分编程习惯完全可以靠一个优秀的IDE自动调整来完成。而且时间浪费在调整格式、代码规范上面,真的值得吗?
类对象,是一个描述这个类信息的对象,对虚拟机加载类的时候,就会创建这个类的类对象并加载该对象。Class,是类对象的类型。只有对象才会被加载到虚拟机中。一个类只会被加载一次。
JPanel,他不是顶层容器,必须放在顶层容器中,任何一个容器都有add()方法,Panel面板是透明的(默认)。他也是一个组件。
Script Name: adjMatrix Input: n... The number of vertices in the graph p... Probablity two vertices are connected plot... whether or not the matrix should be plotted as a graph Output: The nxn matrix of zero and ones Error Checking: The dimension is postive (else return NULL)
Complete the following exercises using the code discussed during computer lab. Save your work in an R script as well as a Word document containing the necessary output and comments. Be sure to use notes in the script to justify any computations. If you have any questions, do not hesitate to ask
一、概述 1、JavaScript是一种基于对象和时间驱动解释性的脚本语言,很难调试 是一种不全面的面向对象 对于事件,即出发JavaScript定义的方法,比如按钮被按下,文本框中敲回车…… 2、小例子 (1)<input type="button" value="google" onclick="javaScript:window.open('http://www.google.com')"> 在按钮被按下的时候,弹出新窗口,链接http://www.google.com (2)<script language="javascript"> document.write("hello"); </script> 作用:在页面显示hello (3)<script language="javascript"> function test(){ document.write("hello"); } </script> 作用:在某个特定条件下调用test()函数,在页面显示hello文字 3、注释 /* ....... */ // 4、函数调用 <script language="javascript" src="global.js"></script> <script language="javascript"> test(); </script> 导入global.js文件,函数test()就定义在这个文件中 注意:此文件在当前目录下,可用相对路径也可以中绝对路径
对象本身是简单的(功能简单),多个对象可以组成复杂的系统(对象之间彼此调用对方的方法)
• Test the null hypothesis that the variance 9 at a 10 % significance level and at a 1 % significance level. • Repeat steps 2-4 above for a new sample (generated via the same process) but with only 10 observations. • Construct another sample (from the same population) with 50 observations. Test the hypothesis that both samples of 50 observations each came from normal populations with the same mean (use α = 5%)