| Posted | 9/9/2016 | Click here to verify Key Dates | Download page to print | |||
| August 22 | Classes Begin | |||||
| September 5 | Labor Day; University Closed | |||||
| ELECTRICAL AND COMPUTER ENGINEERING | November 11 | Veterans Day | ||||
| November 23 | Finals Study Day; No Classes | |||||
| November 24-27 | Thanksgiving Holiday; University Closed | |||||
| FALL SEMESTER 2016 COURSE LIST | December6-10 | Final Examinations | ||||
| December 11 - Jan 2 | Christmas Recess | |||||
| COURSE | TITLE | CR | FACULTY | DAYS/TIMES | ROOM | |
| EE2040 | Circuit Analysis | 3 | Tabrizi | TR 925-1040AM | SHC240 | |
| EE2049-01 | Electrical Measurements and Circuits Laboratory | 1 | Borah | F 200-430PM | ETC248 | |
| EE2049-02 | Electrical Measurements and Circuits Laboratory | 1 | Goudnoor | T 600-830PM | ETC248 | |
| EE2049-03 | Electrical Measurements and Circuits Laboratory | 1 | Abbasi | R 600-830PM | ETC248 | |
| EE2440-01 | Digital Engineering | 2 | Zhang | M 900-950, 1000-1050AM | ETA332 | |
| EE2440-02 | Digital Engineering | 1 | Zhang | F 800-1030AM | ETA332 | |
| EE2440-03 | Digital Engineering | 2 | Ghaforyfard | MW 900-950AM | ETA209 | |
| EE2440-04 | Digital Engineering | 1 | Ghaforyfard | F 1100AM-1:30PM | ETA332 | |
| EE2440-05 | Digital Engineering | 2 | Liu | MW 1100-1150AM | ETA332 | |
| EE2440-06 | Digital Engineering | 1 | Liu | MW 1215-130PM | ETA332 | |
| EE2449-01 | Digital Logic Laboratory | 1 | Kumar | F 800-1030AM | ETC251 | |
| EE2449-02 | Digital Logic Laboratory | 1 | Pradhan | T 600-830PM | ETC251 | |
| EE2449-03 | Digital Logic Laboratory | 1 | Pradhan | R 600-830PM | ETC251 | |
| EE2450-01 | Embedded System Programming I | 2 | Warter-Perez | W 900-950, 1000-1050AM | ETC255D | |
| EE2450-02 | Embedded System Programming I | 1 | Warter-Perez | F 1100AM-1:30PM | ETC255D | |
| EE2450-03 | Embedded System Programming I | 2 | Lin | T 800-850AM, 900-950AM | ETC256 | |
| EE2450-04 | Embedded System Programming I | 1 | Lin | R 800-1030AM | ETC256 | |
| EE2450-05 | Embedded System Programming I | 2 | Zhang | W 900-950, 1000-1050AM | ETC256 | |
| EE2450-06 | Embedded System Programming I | 1 | Zhang | F 200-430PM | ETC256 | |
| EE3000 | Econ for Engineers | 3 | Gharibian | F 400-645PM | ETA332 | |
| EE3001 | Numerical Analysis and Modeling Using MATLAB | 1 | Jamehbozorg | T 800-1030AM | ETC255D | |
| EE3010 | Ethics and Professionalism in Engineering | 3 | Wu/Schaff | R 600-845PM | KHC3097 | |
| EE3020 | Signals and Systems | 3 | Tabrizi | TR 1050AM-1205PM | SHC240 | |
| EE3040 | Probability and Random Processes | 3 | Tabrizi | TR 1215-130PM | SHC240 | |
| EE3050 | Electric and Magnetic Fields | 3 | Tabrizi | MW 1215-130PM | SHC240 | |
| EE3209 | Communications Laboratory | 1 | Pradhan | M 600-830PM | ETB106 | |
| EE3300 | Electric Machines | 3 | Habibi-Ashrafi | TR 925-1040AM | ETA209 | |
| EE3309 | Electromagnetic Energy Conversion Laboratory | 1 | Abbasi | T 600-830PM | ETA209 | |
| EE3445-01 | Computer Organization (for CS students only) | 3 | Ghaforyfard | MW 140-255PM | ETA226 | |
| EE3445-02 | Computer Organization (for CS students only) | 3 | Ghaforyfard | MW 1215-130PM | ETC255E | |
| EE3445-03 | Computer Organization (for CS students only) | 3 | Zhang | W 600-845PM | SHC162 | |
| EE3709 | Electronics Laboratory | 1 | Zhang | T 1100AM-130PM | ETC248 | |
| EE3710 | Electronics II | 3 | Rad | MW 140-255PM | ETA126 | |
| EE3810-01 | Sensors, Data Acquisition, and Instrumentation with application to Biomedical Engineering | 2 | Won | TR 200-250PM | ETC154 | |
| EE3810-02 | Sensors, Data Acquisition, and Instrumentation with application to Biomedical Engineering | 1 | Won | F 200-430PM | ETC252 | |
| EE3810-03 | Sensors, Data Acquisition, and Instrumentation with application to Biomedical Engineering | 2 | Won | MW 10-1050AM | ETA210 | |
| EE3810-04 | Sensors, Data Acquisition, and Instrumentation with application to Biomedical Engineering | 1 | Won | F 1100AM-1:30PM | ETC252 | |
| EE4130-01 | Systems Engineering | 3 | Rad | MW 430-545PM | ETA126 | |
| EE4200 | Digital Communication Systems | 3 | Daneshgaran/Mondin | TR 430-545PM | ETA331 | |
| EE4300 | Introduction to Power Systems Engineering | 3 | Habibi-Ashrafi | TR 140-255PM | ETA209 | |
| EE4310 | Power Systems Analysis | 3 | Shahverdi | TR 850-1005PM | ETA227 | |
| EE4320 | Electric Power Distribution | 3 | Jamehbozorg | TR 1050AM-1205PM | ETA209 | |
| EE4330 | Power Electronics | 3 | Shahverdi | TR 430-545PM | ETA209 | |
| EE4400-02 | Data Communications and Networking | 3 | Zhao | MW 430-545PM | ETA227 | |
| EE4440-01 | Computer Organization | 3 | Ghaforyfard | MWF 10-1050AM | ETA129 | |
| EE4440-03 | Computer Organization | 3 | Ghaforyfard | F 650-935PM | ETA332 | |
| EE4450-02 | Embedded Architectures | 3 | Lin | TR 140-255PM | ETA332 | |
| EE4540-02 | Special Topics in EE | 3 | Gandhi/Patel | TR 1050AM-1205PM | ETA126 | |
| EE4600 | Control Systems II | 3 | Rad | TR 850-1005PM | ETA226 | |
| EE4620 | Modern Control Systems | 3 | Agarwal | TR 600-715PM | ETA226 | |
| EE4689-01 | Control Systems Lab | 1 | Rad | M 600-830PM | ETC156 | |
| EE4810 | Biomedical Devices | 3 | Won | MW 140-255PM | ETA332 | |
| EE4961-01 | Senior Design I | 3 | Nye | F 900-950, 1000-1050, 1100-1150 | PS158 | |
| EE4961-02 | Senior Design I | 3 | Nye | F 1200-245PM | ETA227 | |
| EE5130-01 | System Analysis and Design | 3 | Karimlou | MW 725-840PM | ETA126 | |
| EE5130-02 | System Analysis and Design | 3 | Karimlou | MW 600-715PM | ETA126 | |
| EE5140-02 | Systems Risk Analysis | 3 | Harris | TR 725-840PM | SHC242 | |
| EE5200 | Advanced Digital Communications I | 3 | Daneshgaran/Mondin | TR 600-715PM | ETA331 | |
| EE5220 | Principles of Signal Compression | 3 | Mondin | TR 725-840PM | ETA331 | |
| EE5330 | Computer Method in Power Systems | 3 | Castaneda | F 650-935PM | ETA209 | |
| EE5340 | Power System Stability | 3 | Jamehbozorg | MW 430-545PM | ETA209 | |
| EE5350 | Power System Protection | 3 | Shahverdi | TR 725-840PM | ETA226 | |
| EE5400-01 | Advanced Computer Networks | 3 | Liu | TR 430-545PM | ETA210 | |
| EE5540 | Special Topic in EE | 3 | Harris | TBA | TBA | |
| EE5610 | Stochastic Systems and Estimation | 3 | Agarwal | MW 725-840PM | ETA227 |


Start Page v1
Start Page v2
Start Page v3
Start Page - track v1
Start Page - track v2
Start Page - track v3
Start Page - track v4
Lifetime v1
Lifetime v2
Ride List v1
Ride List v2
Ride Details v1
Ride Details v2
screen layout start screen - start (distance chooser), end (distance chooser), start ride button, something motivational, link to past rides measure calories in food, such as donut, energy drink, or burrito lifetime screen - list of stats for all rides ride list screen - list of rides with date, time, distance, and maybe someday a name; each is a link to a ride detail screen ride detail screen - list of stats for the ride


Heuristic Caching in Browsers
Ever found yourself in a situation when your assets are being cached by browsers without you explicitly instructing them to ? Read on this article is for you then. Normally there are 3 scenarios possible when working with browser caches...


Never lose track of an idea again. With our integrated storage, you'll be able to track them down!
Recognize the ideas that gain the most traction. You can decide to start a new product, a new project, a new amazing adventure!
Let your team vote on the ideas and their taglines. Crowdsource your filtering, and discover the most fit of ideas!
Freelancer is a free bootstrap theme created by Start Bootstrap. The download includes the complete source files including HTML, CSS, and JavaScript as well as optional LESS stylesheets for easy customization.
Whether you're a student looking to showcase your work, a professional looking to attract clients, or a graphic artist looking to share your projects, this template is the perfect starting point!


This app will assist you in performing various tasks in our house and eventually control things for you.
Select an option from the left menu to see detailed instructions for an activity or task.
{{item.feature}}


‘Nothing wrong in deducting wages of prisoners for victim welfare fund’
Plea seeks quashing of amendment in rules mandating deduction
by Staff ReporterThe Delhi High Court on Thursday said there is nothing wrong in deducting wages of prisoners for victim welfare fund, provided it is permitted under the statute, adding that it, however, cannot be done through executive action.
The court said that in Delhi, it was being done under the statute — the Delhi Prison Rules of 2018 — which was permissible. It asked the Delhi government, represented by its Standing Counsel (Criminal) Rahul Mehra, as to why the prison authorities here had stopped making the deductions.
Mr. Mehra replied that the practice was stopped in December last year after the High Court had directed that the same be put on hold. He also said the Delhi Prison Rules of 2018, Rule 96(8), provided for such deductions.
Advocate Ajay Verma, appearing for petitioner Katyayini, opposed the deduction saying various High Courts in India have done away with the practice. He said that of the ₹15 crore collected in this manner since 2006, more than ₹14 crore lay unutilised.
The Bench said it will continue hearing arguments in the matter on November 26.
Ms. Katyayini, a lawyer, has in her plea sought quashing of an amendment made in the Delhi Prison Rules of 1988 — adding Rule 39A — which mandated the deduction. Subsequently, the 1988 rules were replaced by the 2018 rules which also has a similar provision.


THE ADJUSTER A film review by Frank Maloney Copyright 1992 Frank Maloney
THE ADJUSTER is a Canadian film directed and written by Atom Egoyan. It stars Elias Koteas, Arsinee Khanjian, Maury Chaykin, and Gabrielle Rose. It is rated R for sexual situations.
THE ADJUSTER has moved from the recent Seattle International Film Festival to a theatrical run in this town. By all reports it was one of the successes of the Festival. Atom Egoyan is the Armenian-Canadian director of FAMILY VIEWING and SPEAKING PARTS. This new film is being marketed as a black comedy. Don't you believe it! It is a serious movie about values, seeking values, defining values, putting the price on values, as it were. In doing this, Egoyan weaves together three stories, each one of which out-Lynches David Lynch at every turn for bizarre situations and unlikely plot turns. This is a strange, ambiguous movie never goes out of its way to explain itself, but I doubt you will find much that is comedic about it, even though it is witty and canny as hell. You will likely find it fascinating and surprising right to the end.
Elias Koteas plays Noah Render, the insurance adjuster who devotes himself utterly and compulsively to the needs of his clients, who all seem to be victims of fires. He takes charge of their lives while they are in the bureaucratic limbo of waiting to get their claims processed. He puts them up in the same motel, he visits them daily, he even sleep with them if that's what they need. Amy Taubin in the Village Voice calls him a "compassion junkie", which pretty much says it. Of course, what an insurance adjuster does is determine the value of what is lost. His fallacy is thinking that what is lost can be regained, but he determinedly tries to put a value on everything, even in coito.
He lives in a model home in a bankrupt housing development that otherwise consists of scalped ground and signs showing the house that will never be built there. He shares this house with Hera, her Armenian-speaking sister, and Hera's young son. You might think you understand the relationships here, but there's a chance you're wrong.
Hera, played by Arsinee Khanjian, is a censor. She spends her days viewing apparently horrific pornographic films and classifying the ways each violates some code of moral values. Her sister has taken an interest in her work, too.
Then there is the story of Bubba and Mimi (played by Maury Chaykin and Gabrielle Rose, respectively).  As Bubba explains later, "They have everything, or at least the means to have everything, they want, but they don't know what they need, so they try different things." Their ultimate try-out results in, inter alia, uniting the three threads of the film.
THE ADJUSTER gets off to one of those starts where you think the film is never going to let you in on its secrets, but it does at its own pace. I think the pace could have been tighter, but that's just about my only cavil. The pacing problem is a problem at all because the characters are all so emotionally dead; most of the time they brood. Bubba and Mimi are pretty lively, but even Bubba can express himself only with pauses you could drive a Mack truck through. The actors are uniformly excellent.
I can cheerfully recommend THE ADJUSTER to any fan of Egoyan or Wim Wenders, whose style makes similar demands of the viewer. It is an odd movie, but a uniquely satisfying one, one you will think and talk about some time to come.
-- Frank Richard Aloysius Jude Maloney .
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Free Shipping!

Collection
Color
Width
Fabric
Pattern
Cart
0
SIGN IN
REGISTER
Black
Blue
Collegiate
Cotton
Favorites
Graphic
Plaid
Silk
Striped
Start dressing better.


java
Section: User Commands (1)Updated: 07 Aug 2006
Index Return to Main Contents
NAME
java - the Java application launcherSYNOPSIS
java [ options ] class [ argument ... ] java [ options ] -jar file.jar [ argument ... ]
-
-
- options
- Command-line options.
- class
- Name of the class to be invoked.
- file.jar
- Name of the jar file to be invoked. Used only with -jar.
- argument
- Argument passed to the main function.
-
DESCRIPTION
The java tool launches a Java application. It does this by starting a Java runtime environment, loading a specified class, and invoking that class's main method.
The method must be declared public and static, it must not return any value, and it must accept a String array as a parameter. The method declaration must look like the following:
public static void main(String args[])
By default, the first non-option argument is the name of the class to be invoked. A fully-qualified class name should be used. If the -jar option is specified, the first non-option argument is the name of a JAR archive containing class and resource files for the application, with the startup class indicated by the Main-Class manifest header.
The Java runtime searches for the startup class, and other classes used, in three sets of locations: the bootstrap class path, the installed extensions, and the user class path.
Non-option arguments after the class name or JAR file name are passed to the main function.
OPTIONS
The launcher has a set of standard options that are supported on the current runtime environment and will be supported in future releases. In addition, the current implementations of the virtual machines support a set of non-standard options that are subject to change in future releases.
Standard Options
-
- -client
Select the Java HotSpot Client VM. A 64-bit capable jdk currently ignores this option and instead uses the Java Hotspot Server VM.
For default VM selection, see Server-Class Machine Detection
- -server
Select the Java HotSpot Server VM. On a 64-bit capable jdk only the Java Hotspot Server VM is supported so the -server option is implicit.
For default VM selection, see Server-Class Machine Detection
- -agentlib:libname[=options]
- Load native agent library libname, e.g.
-agentlib:hprof
-agentlib:jdwp=help
-agentlib:hprof=help
For more information, see JVMTI Agent Command Line Options.
- -agentpath:pathname[=options]
- Load a native agent library by full pathname. For more information, see JVMTI Agent Command Line Options.
- -classpath classpath
- -cp classpath
- Specify a list of directories, JAR archives, and ZIP archives to search for class files. Class path entries are separated by colons (:). Specifying -classpath or -cp overrides any setting of the CLASSPATH environment variable.
If -classpath and -cp are not used and CLASSPATH is not set, the user class path consists of the current directory (.).
As a special convenience, a class path element containing a basename of * is considered equivalent to specifying a list of all the files in the directory with the extension .jar or .JAR (a java program cannot tell the difference between the two invocations).
For example, if directory foo contains a.jar and b.JAR, then the class path element foo/* is expanded to a A.jar:b.JAR, except that the order of jar files is unspecified. All jar files in the specified directory, even hidden ones, are included in the list. A classpath entry consisting simply of * expands to a list of all the jar files in the current directory. The CLASSPATH environment variable, where defined, will be similarly expanded. Any classpath wildcard expansion occurs before the Java virtual machine is started -- no Java program will ever see unexpanded wildcards except by querying the environment. For example; by invoking System.getenv("CLASSPATH").For more information on class paths, see Setting the Class Path.
- -Dproperty=value
- Set a system property value.
- -d32
- -d64
- Request that the program to be run in a 32-bit or 64-bit environment, respectively. If the requested environment is not installed or is not supported, an error is reported.
Currently only the Java HotSpot Server VM supports 64-bit operation, and the "-server" option is implicit with the use of -d64. And the "-client" option is ignored with the use of -d64. This is subject to change in a future release.
If neither -d32 nor -d64 is specified, the default is to run in a 32-bit environment, except for 64-bit only systems. This is subject to change in a future release.
- -enableassertions[:<package name>"..." | :<class name> ]
- -ea[:<package name>"..." | :<class name> ]
- Enable assertions. Assertions are disabled by default.
With no arguments, enableassertions or -ea enables assertions. With one argument ending in "...", the switch enables assertions in the specified package and any subpackages. If the argument is simply "...", the switch enables assertions in the unnamed package in the current working directory. With one argument not ending in "...", the switch enables assertions in the specified class.
If a single command line contains multiple instances of these switches, they are processed in order before loading any classes. So, for example, to run a program with assertions enabled only in package com.wombat.fruitbat (and any subpackages), the following command could be used:
java -ea:com.wombat.fruitbat... <Main Class>
The -enableassertions and -ea switches apply to all class loaders and to system classes (which do not have a class loader). There is one exception to this rule: in their no-argument form, the switches do not apply to system. This makes it easy to turn on asserts in all classes except for system classes. A separate switch is provided to enable asserts in all system classes; see -enablesystemassertions below.
- -disableassertions[:<package name>"..." | :<class name> ]
- -da[:<package name>"..." | :<class name> ]
- Disable assertions. This is the default.
With no arguments, disableassertions or -da disables assertions. With one argument ending in "...", the switch disables assertions in the specified package and any subpackages. If the argument is simply "...", the switch disables assertions in the unnamed package in the current working directory. With one argument not ending in "...", the switch disables assertions in the specified class.
To run a program with assertions enabled in package com.wombat.fruitbat but disabled in class com.wombat.fruitbat.Brickbat, the following command could be used:
java -ea:com.wombat.fruitbat... -da:com.wombat.fruitbat.Brickbat <Main Class>
The -disableassertions and -da switches apply to all class loaders and to system classes (which do not have a class loader). There is one exception to this rule: in their no-argument form, the switches do not apply to system. This makes it easy to turn on asserts in all classes except for system classes. A separate switch is provided to enable asserts in all system classes; see -disablesystemassertions below.
- -enablesystemassertions
- -esa
- Enable asserts in all system classes (sets the default assertion status for system classes to true).
- -disablesystemassertions
- -dsa
- Disables asserts in all system classes.
- -jar
- Execute a program encapsulated in a JAR file. The first argument is the name of a JAR file instead of a startup class name. In order for this option to work, the manifest of the JAR file must contain a line of the form Main-Class: classname. Here, classname identifies the class having the public static void main(String[] args) method that serves as your application's starting point. See the Jar tool reference page and the Jar trail of the Java Tutorial @ http://java.sun.com/docs/books/tutorial/jar for information about working with Jar files and Jar-file manifests.
When you use this option, the JAR file is the source of all user classes, and other user class path settings are ignored.
Note that JAR files that can be run with the "java -jar" option can have their execute permissions set so they can be run without using "java -jar". Refer to Java Archive (JAR) Files.
- -javaagent:jarpath[=options]
- Load a Java programming language agent, see java.lang.instrument.
- -verbose
- -verbose:class
- Display information about each class loaded.
- -verbose:gc
- Report on each garbage collection event.
- -verbose:jni
- Report information about use of native methods and other Java Native Interface activity.
- -version
- Display version information and exit.
- -version:release
- Specifies that the version specified by release is required by the class or jar file specified on the command line. If the version of the java command invoked does not meet this specification and an appropriate implementation is found on the system, the appropriate implementation will be used.
release not only can specify an exact version, but can also specify a list of versions called a version string. A version string is an ordered list of version ranges separated by spaces. A version range is either a version-id, a version-id followed by a star (*), a version-id followed by a plus sign (+) , or two version-ranges combined using an ampersand (&). The star means prefix match, the plus sign means this version or greater, and the ampersand means the logical anding of the two version-ranges. For example:
-version:"1.5.0_04 1.5*&1.5.1_02+"
The meaning of the above is that the class or jar file requires either version 1.5.0_02, or a version with 1.5 as a version-id prefix and that is not less than 1.5.1_02. The exact syntax and definition of version strings may be found in Appendix A of the Java Network Launching Protocol & API Specification (JSR-56).For jar files, the usual preference is to specify version requirements in the jar file manifest rather than on the command line.
See the following NOTES section for important policy information on the use of this option.
- -showversion
- Display version information and continue.
- -?
- -help
- Display usage information and exit.
- -X
- Display information about non-standard options and exit.
Non-Standard Options
-
-
- -Xint
- Operate in interpreted-only mode. Compilation to native code is disabled, and all bytecodes are executed by the interpreter. The performance benefits offered by the Java HotSpot VMs' adaptive compiler will not be present in this mode.
- -Xbatch
- Disable background compilation. Normally the VM will compile the method as a background task, running the method in interpreter mode until the background compilation is finished. The -Xbatch flag disables background compilation so that compilation of all methods proceeds as a foreground task until completed.
- -Xbootclasspath:bootclasspath
- Specify a colon-separated list of directories, JAR archives, and ZIP archives to search for boot class files. These are used in place of the boot class files included in the Java 2 SDK. Note: Applications that use this option for the purpose of overriding a class in rt.jar should not be deployed as doing so would contravene the Java 2 Runtime Environment binary code license.
- -Xbootclasspath/a:path
- Specify a colon-separated path of directires, JAR archives, and ZIP archives to append to the default bootstrap class path.
- -Xbootclasspath/p:path
- Specify a colon-separated path of directires, JAR archives, and ZIP archives to prepend in front of the default bootstrap class path. Note: Applications that use this option for the purpose of overriding a class in rt.jar should not be deployed as doing so would contravene the Java 2 Runtime Environment binary code license.
- -Xcheck:jni
- Perform additional checks for Java Native Interface (JNI) functions. Specifically, the Java Virtual Machine validates the parameters passed to the JNI function as well as the runtime environment data before processing the JNI request. Any invalid data encountered indicates a problem in the native code, and the Java Virtual Machine will terminate with a fatal error in such cases. Expect a performance degradation when this option is used.
- -Xfuture
- Perform strict class-file format checks. For purposes of backwards compatibility, the default format checks performed by the Java 2 SDK's virtual machine are no stricter than the checks performed by 1.1.x versions of the JDK software. The -Xfuture flag turns on stricter class-file format checks that enforce closer conformance to the class-file format specification. Developers are encouraged to use this flag when developing new code because the stricter checks will become the default in future releases of the Java application launcher.
- -Xnoclassgc
- Disable class garbage collection. Use of this option will prevent memory recovery from loaded classes thus increasing overall memory usage. This could cause OutOfMemoryError to be thrown in some applications.
- -Xincgc
- Enable the incremental garbage collector. The incremental garbage collector, which is off by default, will reduce the occasional long garbage-collection pauses during program execution. The incremental garbage collector will at times execute concurrently with the program and during such times will reduce the processor capacity available to the program.
- -Xloggc:file
- Report on each garbage collection event, as with -verbose:gc, but log this data to file. In addition to the information -verbose:gc gives, each reported event will be preceeded by the time (in seconds) since the first garbage-collection event.
Always use a local file system for storage of this file to avoid stalling the JVM due to network latency. The file may be truncated in the case of a full file system and logging will continue on the truncated file. This option overrides -verbose:gc if both are given on the command line.
- -Xmsn
-
Specify the initial size, in bytes, of the memory allocation pool. This value must be a multiple of 1024 greater than 1MB. Append the letter k or K to indicate kilobytes, or m or M to indicate megabytes. The default value is chosen at runtime based on system configuration. For more information, see HotSpot Ergonomics
Examples:-
-Xms6291456 -Xms6144k -Xms6m
-
- -Xmxn
-
Specify the maximum size, in bytes, of the memory allocation pool. This value must a multiple of 1024 greater than 2MB. Append the letter k or K to indicate kilobytes, or m or M to indicate megabytes. The default value is chosen at runtime based on system configuration. For more information, see HotSpot Ergonomics
Examples:-
-Xmx83886080 -Xmx81920k -Xmx80m
-
- -Xprof
- Profiles the running program, and sends profiling data to standard output. This option is provided as a utility that is useful in program development and is not intended to be be used in production systems.
- -Xrs
- Reduces use of operating-system signals by the Java virtual machine (JVM).
In a previous release, the Shutdown Hooks facility was added to allow orderly shutdown of a Java application. The intent was to allow user cleanup code (such as closing database connections) to run at shutdown, even if the JVM terminates abruptly.
Sun's JVM catches signals to implement shutdown hooks for abnormal JVM termination. The JVM uses SIGHUP, SIGINT, and SIGTERM to initiate the running of shutdown hooks.
The JVM uses a similar mechanism to implement the pre-1.2 feature of dumping thread stacks for debugging purposes. Sun's JVM uses SIGQUIT to perform thread dumps.
Applications embedding the JVM frequently need to trap signals like SIGINT or SIGTERM, which can lead to interference with the JVM's own signal handlers. The -Xrs command-line option is available to address this issue. When -Xrs is used on Sun's JVM, the signal masks for SIGINT, SIGTERM, SIGHUP, and SIGQUIT are not changed by the JVM, and signal handlers for these signals are not installed.
There are two consequences of specifying -Xrs:
-
- o
- SIGQUIT thread dumps are not available.
- o
- User code is responsible for causing shutdown hooks to run, for example by calling System.exit() when the JVM is to be terminated.
- -Xssn
- Set thread stack size.
- -XX:+UseAltSigs
- The VM uses SIGUSR1 and SIGUSR2 by default, which can sometimes conflict with applications that signal-chain SIGUSR1 and SIGUSR2. The -XX:+UseAltSigs option will cause the VM to use signals other than SIGUSR1 and SIGUSR2 as the default.
-
NOTES
The -version:release command line option places no restrictions on the complexity of the release specification. However, only a restricted subset of the possible release specifications represent sound policy and only these are fully supported. These policies are:
-
- 1.
- Any version, represented by not using this option.
- 2.
-
Any version greater than an arbitrarily precise version-id. For example:
"1.5.0_03+"
Would utilize any version greater than 1.5.0_03. This is useful for a case where an interface was introduced (or a bug fixed) in the release specified.
- 3.
-
A version greater than an arbitrarily precise version-id, bounded by the upper bound of that release family. For example:
"1.5.0_03+&1.5*"
- 4.
-
"Or" expressions of items 2. or 3. above. For example:
"1.4.2_05+&1.4* 1.5+"
Similar to item 2. this is useful when a change was introduced in a release (1.5) but also made available in updates to previous releases.
SEE ALSO
-
- o
- javac - the Java programming language compiler
- o
- jdb - Java Application Debugger
- o
- javah - C Header and Stub File Generator
- o
- jar - JAR Archive Tool
- o
- The Java Extensions Framework
- o
- Security Features.
- o
- HotSpot VM Specific Options @ http://java.sun.com/docs/hotspot/VMOptions.html.
Index
This document was created by man2html, using the manual pages.
Time: 05:29:05 GMT, December 24, 2015


College
B.S. Computer Engineering, 2017
CSU Fullerton
Courses:
- Fundamentals of Ubuntu
- Advanced Calculus
- Programming with C++
- Data structures and Algorithms
- Embedded processing
- Introduction to Computer Security
- Operating Systems
- Designing with VHDL
- Advanced electronics for Computer Engineers
- Introduction to Computer Security


Nigerian Actors Guild Gets New Exco - Premium Times Nigeria
by Jayne AugoyeThe Actors Guild of Nigeria has got a new leadership.
They are Nollywood stars, Emeka Rollas, Monalisa Chinda, Femi Branch and other actors.
They came tops in the guild’s 2019 election which held in Uyo, Akwa Ibom State recently.
Over 187 delegates from 22 states attended and voted during the elections which were supervised by AGNEC Chairman, Steve Eboh, and Emma Ogugua.
Rollas returns as National President, while Mohammed Kareem, Wassh Waziri Hong, Lolo Oby Kate Okafor, and David Branch emerged Vice Presidents for North-central, North-west, South-east, and South-west respectively.
Monalisa won her bid to become the guild’s Public Relations Officer, while Abubakar Sanusi emerged Secretary-General.
Chelsea Nwodo also emerged AGN’s Assistant Secretary-General.
Regina Daniels’ mum, Rita Daniels, failed to win the seat of the Vice President, South-south.
Meanwhile, an inauguration committee headed by the newly elected Vice President, South-west, Femi Branch, has been set up.
The inauguration committee also has Monalisa, Uche Elendu, Kemi Adekomi, and Don Pedro Aganbi as members.
Other elected executives are Emeka Duru as Financial Secretary, Maradona Mikevine Paul as Treasurer, Anigbo Clement Cowboy as Director of Guild Services and Adigizi Bala as Chief Whip.
Speaking on behalf of the Guild, Monalisa, said top on the agenda of the new AGN excos is the welfare of members across all the state chapters, professional job opportunities, training, and improved remuneration.
AGN has been enmeshed in crisis in the past and this is the first time the guild would hold a hitch-free election.
On March 23, 2016, a Federal High Court sitting in Lagos State ruled against Ibinabo Fiberesima as the president of the actors guild .
Following the verdict, Emeka Ike was announced as the interim president of the guild pending its elections in 2018.
However, for almost two years, the guild was undecided about its rightful leader.
AGN is an umbrella union that regulates and represents the affairs of film actors in Nigeria and abroad.
Rollas has served as President since August 22, 2017.


Ethereum Services
Smart Contract Auditing Services for Ethereum Blockchain
polkasecurity Audits offers advanced Ethereum, EOS, TRON smart contract audit, blockchain protocol security and formal verification to ensure your platform’s integrity.
Importance of Audit(security)
Smart contract hold assets of millions of worth, all the issues and security flaws must be solved before deploying on mainnet.
Secure code has high chances of project success.
Your code should justify your use-case.
If your smart contract Verified by 3rd party Auditor, it gains value in the market as well as attract investor.
Our Ethereum Audit Services
Blockchain / Platform Audit
It is generally of the combined nature (smart contract + backend with wallets). We identify and research on best optimisations possible with the smart contract that may save the precious gas of Ethereum. We focus to make the platform more efficient and secure overall.
Smart Contracts Audit
A Smart contract audit is a process to test the source code against all known vulnerabilities and attacks. A Smart Contract audit identifies and prevents the deployment of security vulnerabilities that may cause to loss. Both business case logic and security point of view are considered.


The CDS (Coronal Diagnostic Spectrometer) is designed to probe the solar atmosphere through the analysis of spectral emission lines in the extreme ultraviolet wavelength range 15.0-80.0 nm. Observations of the absolute and relative intensities of selected lines, and line profiles, allows the derivation of temperature, density, flow and abundance information for the plasmas in the solar atmosphere.
The CDS will provide simultaneous coverage of large wavelength bands combined with temporal resolution down to 1 s. The spatial resolution is 2 arcsec over a field of view of 4 arcmin, which can be pointed anywhere on the sun and the low corona. Wavelength ranges for normal incidence are 31.0-38.0 nm and 51.7-63.3 nm. For grazing incidence, the wavelength ranges are 15.5-22.4, 26.1-34.6, 39.5-49.6, and 66.2-78.7 nm. Slit choices are 2 x 2, 4 x 4, 2 x 240, 4 x 240, 8 x 50, and 90 x 240 arcsec. Spectral resolving power is 3,500 to 12,000 depending on wavelength.
The instrument generates far more data than can be transmitted in the telemetry available. Therefore, data are compressed and selected; only the portions of the spectrum desired by the current program are returned. The instrument consists of a Wolter 2 telescope, a flat scan mirror, a slit assembly, and two spectrometers; one for normal incidence and one for grazing incidence. For normal incidence a wavelength-dispersed image is produced at a two-dimensional detector. With a rotation of the scan mirror, two-dimensional images in all of the observed lines can be built up very quickly. For wavelengths less than approximately 30.0 nm, a grazing incidence system is used. The spectrum is dispersed onto four detectors placed along the Rowland circle. Such a system has no imaging capability, so for imaging a pin-hole slit is used, with the mirror performing a raster scan in one dimension. In the other dimension the slit itself is scanned.
This information is from the paper "The Coronal Diagnostic Spectrometer for the Solar and Heliospheric Observatory," by R. A. Harrison and E. C. Sawyer (Proceedings of the First SOHO Workshop, ESA SP-348, pp. 17-19, November 1992).
Version:2.0.0
The CDS (Coronal Diagnostic Spectrometer) is designed to probe the solar atmosphere through the analysis of spectral emission lines in the extreme ultraviolet wavelength range 15.0-80.0 nm. Observations of the absolute and relative intensities of selected lines, and line profiles, allows the derivation of temperature, density, flow and abundance information for the plasmas in the solar atmosphere.
The CDS will provide simultaneous coverage of large wavelength bands combined with temporal resolution down to 1 s. The spatial resolution is 2 arcsec over a field of view of 4 arcmin, which can be pointed anywhere on the sun and the low corona. Wavelength ranges for normal incidence are 31.0-38.0 nm and 51.7-63.3 nm. For grazing incidence, the wavelength ranges are 15.5-22.4, 26.1-34.6, 39.5-49.6, and 66.2-78.7 nm. Slit choices are 2 x 2, 4 x 4, 2 x 240, 4 x 240, 8 x 50, and 90 x 240 arcsec. Spectral resolving power is 3,500 to 12,000 depending on wavelength.
The instrument generates far more data than can be transmitted in the telemetry available. Therefore, data are compressed and selected; only the portions of the spectrum desired by the current program are returned. The instrument consists of a Wolter 2 telescope, a flat scan mirror, a slit assembly, and two spectrometers; one for normal incidence and one for grazing incidence. For normal incidence a wavelength-dispersed image is produced at a two-dimensional detector. With a rotation of the scan mirror, two-dimensional images in all of the observed lines can be built up very quickly. For wavelengths less than approximately 30.0 nm, a grazing incidence system is used. The spectrum is dispersed onto four detectors placed along the Rowland circle. Such a system has no imaging capability, so for imaging a pin-hole slit is used, with the mirror performing a raster scan in one dimension. In the other dimension the slit itself is scanned.
This information is from the paper "The Coronal Diagnostic Spectrometer for the Solar and Heliospheric Observatory," by R. A. Harrison and E. C. Sawyer (Proceedings of the First SOHO Workshop, ESA SP-348, pp. 17-19, November 1992).
| Role | Person | |
|---|---|---|
| 1. | PrincipalInvestigator | spase://SMWG/Person/Richard.A.Harrison |
Information about the Coronal Diagnostic Spectrometer (CDS) experiment on the SOHO mission.


Main author
Martin
Otter
Deutsches Zentrum für Luft- und Raumfahrt e.V. (DLR)
Institut für Systemdynamik und Regelungstechnik (DLR-SR)
Forschungszentrum Oberpfaffenhofen
D-82234 Wessling
Germany
email<EMAIL_ADDRESS>Acknowledgements
- The development of this library was strongly motivated by the
master thesis of Isolde Dressler (see
literature), in which a compiler from JGrafchart to Modelica
was designed and implemented. This project was supervised by
Karl-Erik Årzén from Department of Automatic Control, Lund Institut
of Technology, Lund, Sweden.
- This library profits also from the experience gained in the
focused research program (Schwerpunktprogramm) "Continuous-Discrete
Dynamic Systems" (KONDISK), sponsored by the Deutsche
Forschungsgemeinschaft under grants OT174/1-2 and EN152/22-2. This
support is most gratefully acknowledged.
- The implementation of the basic components of this library by
describing finite state machines with equations is based on
(Elmqvist, Mattsson and Otter, 2001), which in turn uses ideas from
(Mosterman, Otter and Elmqvist, 1998), see literature
Generated at 2019-01-25T16:44:03Z by OpenModelica 1.14.0~dev-130-gefa44fb


Blyth will leave Greenwich by September
Blyth (NYSE: BTH), the home fragrance and decor company based in Greenwich, plans to relocate its corporate headquarters to Plymouth, Mass., in an effort to restructure the company and improve profitability.
According to documents filed with the Securities and Exchange Commission April 4, the company plans to move by the end of September when the current office lease on East Weaver Street in Greenwich expires.
The move out of Greenwich is not connected to changes to Connecticut’s corporate tax structure in the recently passed state budget, according to Susan Flinn, spokeswoman for Blyth. Flinn said the move is purely a cost-savings effort as the company-owned space in Plymouth is empty. The company will share the building with PartyLite, a Blyth subsidiary, according to the SEC filings.
The move follows months of poor quarterly reports, the most recent of which showed a 12 percent decline in net sales compared to the same period in 2014.
Robert Goergen Jr., Blyth CEO, said sales were hurt by the increasing strength of the U.S. dollar compared to the euro, as well as a decline in independent sales consultants — a staple of the company’s business structure.
“Absent the adverse currency impact, we experienced year-over-year sales growth in all of our emerging markets as well as in several of our mature markets, including Germany, Austria, the U.K. and Australia,” Goergen said in a statement.
Goergen said the company anticipated a decline in operating profits over 2014, and as a result initiated substantial restructuring efforts to benefit profitability, including the move of the corporate headquarters from Greenwich.
Goergen said the one-time costs of the move will be about $2.1 million, incurred in 2015. According to the SEC filings, the costs of relocation will include employee severance payments, employee benefit payments, retention payments, recruiting fees and outplacement fees, to be recorded in the final three quarters of 2015. The costs could vary based on factors such as the level of employee terminations, according to the documents
Flinn said about 30 employees will be affected by the move.
Blyth headquarters have been in Greenwich since the company’s inception 30 years ago when Robert Goergen Sr. purchased Valley Candle in 1976 in Brooklyn, N.Y.
A year later, Goergen and his colleagues acquired Candle Corporation of America, a Chicago-based company. The company went public under the ticker BTH in 1994.
Today, the business has expanded internationally as a designer and marketer of home decor and fragrances, as well as health, wellness and beauty products, household convenience items, and personalized gifts sold through independent sales consultants.
<EMAIL_ADDRESS>203-625-4411; Twitter: @kaitlynkrasselt


This is a jumbotron example, that is used for many websites today and shows that Bootstrap is successfully loadedd, using all components. Bootstrap feature will help you to create the desired layouts.
Our greatest weakness lies in giving up. The most certain way to succeed is always to try just one more time.
This is a nice text about me...
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.
These are my projects...
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.


Guess That Song
Please login to Spotify to play this game.
Log in with Spotify
Please wait while we log you in.
Questions Correct :
0
Hold please while the game loads.
How Many Questions Would You Like?
Start Game


Simple slider
This is our big Tagline!
Here's our small slogan.
Left Aligned Caption
Here's our small slogan.
Right Aligned Caption
Here's our small slogan.
This is our big Tagline!
Here's our small slogan.
Paused slider
This is our big Tagline!
Here's our small slogan.
Left Aligned Caption
Here's our small slogan.
Right Aligned Caption
Here's our small slogan.
This is our big Tagline!
Here's our small slogan.


Next: Tilde S-> Standard, Previous: FORMAT Printer Operations, Up: FORMAT Printer Operations
An arg, any object, is printed without escape characters (as by princ). If arg is a string, its characters will be output verbatim. If arg is nil it will be printed as nil; the colon modifier (~:A) will cause an arg of nil to be printed as (), but if arg is a composite structure, such as a list or vector, any contained occurrences of nil will still be printed as nil.
~mincolA inserts spaces on the right, if necessary, to make the width at least mincol columns. The @ modifier causes the spaces to be inserted on the left rather than the right.
~mincol,colinc,minpad,padcharA is the full form of ~A, which allows control of the padding. The string is padded on the right (or on the left if the @ modifier is used) with at least minpad copies of padchar; padding characters are then inserted colinc characters at a time until the total width is at least mincol. The defaults are 0 for mincol and minpad, 1 for colinc, and the space character for padchar.
~A binds *print-escape* to false,
and *print-readably* to false.


Library: Input/output
basic_ostream basic_ios ios_base
|
basic_ostream() bool() char_type flush() |
int_type off_type operator<<() pos_type |
put() seekp() sentry() tellp() |
traits_type write() ~basic_ostream() ~sentry() |
Class that assists in formatting and writing output to sequences controlled by a stream buffer
#include <ostream> namespace std { template<class charT, class traits = char_traits<charT> > class basic_ostream; }
The class basic_ostream assists in formatting and writing output to sequences of characters controlled by a stream buffer. Two groups of functions share common properties, the formatted functions and the unformatted functions.
Both groups of functions insert output characters to basic_streambuf. They both begin by constructing an object of class basic_ostream::sentry and, if this object is in good state after construction, the function tries to perform the requested output. The sentry object performs exception-safe initialization, such as controlling the status of the stream or locking it in a multithread environment.
Some formatted output functions generate the requested output by converting a value from some scalar to text form and inserting the converted text in the output sequence. The conversion behavior is directly depend on the locale object being imbued in the stream.
namespace std { template <class charT, class traits = char_traits<charT> > class basic_ostream : virtual public basic_ios<charT,traits> { public: typedef charT char_type; typedef typename traits::int_type int_type; typedef typename traits::pos_type pos_type; typedef typename traits::off_type off_type; typedef traits traits_type; explicit basic_ostream(basic_streambuf<char_type,traits>* sb); virtual ~basic_ostream(); class sentry; basic_ostream& operator<< (basic_ostream& (*pf)(basic_ostream&)); basic_ostream& operator<< (basic_ios<charT,traits>& (*pf)(basic_ios<charT,traits>&)); basic_ostream& operator<< (ios_base& (*pf)(ios_base&)); basic_ostream& operator<<(bool n); basic_ostream& operator<<(short n); basic_ostream& operator<<(unsigned short n); basic_ostream& operator<<(int n); basic_ostream& operator<<(unsigned int n); basic_ostream& operator<<(long n); basic_ostream& operator<<(unsigned long n); basic_ostream& operator<<(float f); basic_ostream& operator<<(double f); basic_ostream& operator<<(long double f); basic_ostream& operator<<(const void* p); basic_ostream& operator<< (basic_streambuf<char_type,traits>* sb); basic_ostream& put(char_type c); basic_ostream& write(const char_type* s, streamsize n); basic_ostream& flush(); pos_type tellp(); basic_ostream& seekp(pos_type); basic_ostream& seekp(off_type, ios_base::seekdir); }; template<class charT, class traits> basic_ostream<charT,traits>& operator<<(basic_ostream<charT,traits>&, charT); template<class charT, class traits> basic_ostream<charT,traits>& operator<<(basic_ostream<charT,traits>&, char); template<class traits> basic_ostream<char,traits>& operator<<(basic_ostream<char,traits>&, char); template<class traits> basic_ostream<char,traits>& operator<<(basic_ostream<char,traits>&, signed char); template<class traits> basic_ostream<char,traits>& operator<<(basic_ostream<char,traits>&, unsigned char) template<class charT, class traits> basic_ostream<charT,traits>& operator<<(basic_ostream<charT,traits>&, const charT*); template<class charT, class traits> basic_ostream<charT,traits>& operator<<(basic_ostream<charT,traits>&, const char*); template<class traits> basic_ostream<char,traits>& operator<<(basic_ostream<char,traits>&, const char*); template<class traits> basic_ostream<char,traits>& operator<<(basic_ostream<char,traits>&, const signed char*); template<class traits> basic_ostream<char,traits>& operator<<(basic_ostream<char,traits>&, const unsigned char*); } }
char_type
The type char_type is a synonym for the template parameter charT.
int_type
The type int_type is a synonym of type traits::in_type.
off_type
The type off_type is a synonym of type traits::off_type.
pos_type
The type pos_type is a synonym of type traits::pos_type.
traits_type
The type traits_type is a synonym for the template parameter traits.
ostream
The type ostream is a specialization of class basic_ostream on type char:
typedef basic_ostream<char> ostream;
wostream
The type wostream is a specialization of class basic_ostream on type wchar_t:
typedef basic_ostream<wchar_t> wostream;
explicit basic_ostream(basic_streambuf<charT, traits>* sb);
Constructs an object of class basic_ostream, assigning initial values to the base class by calling:
basic_ios<charT,traits>::init(sb);
virtual ~basic_ostream();
Destroys an object of class basic_ostream.
Interface
namespace std { template <class charT,class traits = char_traits<charT> > class basic_ostream<charT,traits>::sentry { public: explicit sentry(basic_ostream<charT,traits>& os); ~sentry(); operator bool() const; private: sentry(const sentry&); // undefined sentry& operator=(const sentry&); // undefined }; }
Constructor
explicit sentry(basic_ostream<charT,traits>& os);
Prepares for formatted or unformatted output. If os.tie() is not a null pointer, the function synchronizes the output sequence with any associated stream. If after any preparation is completed, the os.good() is true, the sentry conversion function operator bool() returns true. Otherwise, it returns false. In a multithread environment, the sentry object constructor is responsible for locking the stream and the stream buffer associated with the stream.
Destructor
~sentry();
Destroys an object of class sentry. If the ios_base member function flags() & unitbuf == true, then flushes the buffer. In a multithread environment, the sentry object destructor is responsible for unlocking the stream and the stream buffer associated with the stream.
Operator
operator bool();
If after any preparation is completed, the ios_base member function good() is true, the sentry conversion function operator bool() returns true, else it returns false.
Formatted output functions start by constructing an object of class sentry. If this object returns true when converted to a value of type bool, the function attempts to produce the requested output. If the generation fails, the function calls setstate(ios::failbit), which might throw an exception. If an exception is thrown during output, ios::badbit is set in the stream object's error state without causing an ios::failure to be thrown.
If (exceptions()&badbit) != 0, the exception is rethrown. The sentry object is destroyed before the function exits. If no exception is thrown, the result of the formatted output function is *this.
basic_ostream& operator<<(basic_ostream& (*pf)(basic_ostream&));
Calls pf(*this), then returns *this. See, for example, the function signature endl(basic_ostream&).
basic_ostream& operator<<(basic_ios<char_type, traits_type>& (*pf)(basic_ios<char_type, traits_type>&));
Calls pf(*this), then returns *this.
basic_ostream& operator<<(ios_base& (*pf) (ios_base&));
Calls pf(*this), then returns *this. For example, see the function signature dec(ios_base&).
basic_ostream& operator<<(bool n);
Converts the boolean value n and outputs it into the basic_ostream object's buffer. If the ios_base member function flag() & ios_base::boolalpha is false, it tries to write an integer value, which must be 0 or 1. If the boolalpha flag is true, it writes characters according to the locale function numpunct<>::truename() or numpunct<>::falsename().
basic_ostream& operator<<(short n);
Converts the signed short integer n, outputs it into the stream buffer, and returns *this.
basic_ostream& operator<<(unsigned short n);
Converts the unsigned short integer n, outputs it into the stream buffer, and returns *this.
basic_ostream& operator<<(int n);
Converts the signed integer n, outputs it into the stream buffer, and returns *this.
basic_ostream& operator<<(unsigned int n);
Converts the unsigned integer n, outputs it into the stream buffer, and returns *this.
basic_ostream& operator<<(long n);
Converts the signed long integer n, outputs it into the stream buffer, and returns *this.
basic_ostream& operator<<(unsigned long n);
Converts the unsigned long integer n, outputs it into the stream buffer, and returns *this.
basic_ostream& operator<<(float f);
Converts the float f, outputs it into the stream buffer, and returns *this.
basic_ostream& operator<<(double f);
Converts the double f, outputs it into the stream buffer, and returns *this.
basic_ostream& operator<<(long double f);
Converts the long double f, outputs it into the stream buffer, and returns *this.
basic_ostream& operator<<( const void *p);
Converts the pointer p, outputs it into the stream buffer, and returns *this.
basic_ostream& operator<<(basic_streambuf<charT,traits> *sb);
If sb is null, calls the basic_ios member function setstate(badbit). Otherwise, gets characters from sb and inserts them into the stream buffer until any of the following occurs:
an end-of-file on the input sequence
a failure when inserting into the output sequence
an exception while getting a character from sb
If the function inserts no characters, or if it stops because an exception is thrown while extracting a character, it calls the basic_ios member function setstate(failbit). If an exception is thrown while extracting a character, it is rethrown.
basic_ostream& flush();
If rdbuf() is not a null pointer, calls rdbuf()->pubsync() and returns *this. If that function returns -1, calls setstate(badbit).
basic_ostream& put(char_type c);
Inserts the character c. If the operation fails, calls the basic_ios member function setstate(badbit).
basic_ostream& seekp(pos_type pos);
If the basic_ios member function fail() returns false, executes rdbuf()->pubseekpos(pos), which positions the current pointer of the output sequence at the position designated by pos. If positioning fails, calls the basic_ios member function setstate(failbit).
basic_ostream& seekp(off_type off, ios_base::seekdir dir);
If the basic_ios member function fail() returns false, executes rdbuf()->pubseekpos(off,dir), which positions the current pointer of the output sequence at the position designated by off and dir. If positioning fails, calls the basic_ios member function setstate(failbit).
pos_type tellp();
If the basic_ios member function fail() returns true, tellp() returns pos_type(off_type(-1)) to indicate failure. Otherwise it returns the current position of the output sequence by calling rdbuf()-> pubseekoff(0,cur, out).
basic_ostream& write(const char_type* s, streamsize n);
Obtains characters to insert from successive locations of an array whose first element is designated by s. Characters are inserted until either of the following occurs:
n characters are inserted
inserting into the output sequence fails
In the second case, the function calls the basic_ios member function setstate(badbit). The function returns *this.
template<class charT, class traits> basic_ostream<charT, traits>& endl(basic_ostream<charT, traits>& os);
Outputs a newline character by calling os.put(os.widen ('\n')), flushes the buffer, and returns os.
template<class charT, class traits> basic_ostream<charT, traits>& ends(basic_ostream<charT, traits>& os);
Inserts a null character, charT(), into the output sequence, then returns os.
template<class charT, class traits> basic_ostream<charT, traits>& flush(basic_ostream<charT, traits>& os);
Flushes the buffer, then returns os.
template<class charT, class traits> basic_ostream<charT, traits>& operator<<(basic_ostream<charT, traits>& os, charT c); template<class charT, class traits> basic_ostream<charT, traits>& operator<<(basic_ostream<charT, traits>& os, char c); template<class traits> basic_ostream<char, traits>& operator<<(basic_ostream<char, traits>& os, char c); template<class traits> basic_ostream<char, traits>& operator<<(basic_ostream<char, traits>& os, signed char c); template<class traits> basic_ostream<char, traits>& operator<<(basic_ostream<char, traits>& os, unsigned char c);
Outputs the character c and any required padding into the basic_ostream object's buffer. If the type of c is char and it doesn't match char_type, the function calls os.widen (c) before inserting the character. Before returning, the function calls os.width (0).
template<class charT, class traits> basic_ostream<charT, traits>& operator<<(basic_ostream<charT, traits>& os, const charT* s); template<class charT, class traits>
basic_ostream<charT, traits>&
operator<<(basic_ostream<charT, traits>& os, const char* s); template<class traits> basic_ostream<char, traits>& operator<<(basic_ostream<char, traits>& os, const char* s); template<class traits> basic_ostream<char, traits>& operator<<(basic_ostream<char, traits>& os, unsigned char* s); template<class traits> basic_ostream<char, traits>& operator<<(basic_ostream<char, traits>& os, signed char* s);
After constructing a sentry object the function inserts traits::length(s) characters starting at s plus any required padding into os. Characters starting at s are widened by calling os.widen (*s). Before returning, the function calls os.width (0).
The formatting is done through member functions or manipulators.
| Manipulators | Member Functions |
showpos |
setf(ios_base::showpos) |
noshowpos |
unsetf(ios_base::showpos) |
showbase |
setf(ios_base::showbase) |
noshowbase |
unsetf(ios_base::showbase) |
uppercase |
setf(ios_base::uppercase) |
nouppercase |
unsetf(ios_base::uppercase) |
showpoint |
setf(ios_base::showpoint) |
noshowpoint |
unsetf(ios_base::showpoint) |
boolalpha |
setf(ios_base::boolalpha) |
noboolalpha |
unsetf(ios_base::boolalpha) |
unitbuf |
setf(ios_base::unitbuf) |
nounitbuf |
unsetf(ios_base::unitbuf) |
internal |
setf(ios_base::internal, |
left |
setf(ios_base::left, |
right |
setf(ios_base::right, |
dec |
setf(ios_base::dec, |
hex |
setf(ios_base::hex, |
oct |
setf(ios_base::oct, |
fixed |
setf(ios_base::fixed, |
scientific |
setf(ios_base::scientific, |
resetiosflags (ios_base::fmtflags flag) |
setf(0,flag) |
setiosflags (ios_base::fmtflags flag) |
setf(flag) |
setbase(int base) |
see above |
setfill(char_type c) |
fill(c) |
setprecision(int n) |
precision(n) |
setw(int n) |
width(n) |
The meaning of the manipulators is as follows:
showpos |
Generates a + sign in nonnegative generated numeric output |
showbase |
Generates a prefix indicating the numeric base of generated integer output |
uppercase |
Replaces certain lowercase letters with their uppercase equivalents in generated output |
showpoint |
Generates a decimal-point character unconditionally in generated floating-point output |
boolalpha |
Inserts and extracts the bool type in alphabetic format |
unitbuf |
Flushes output after each output operation |
internal |
Adds fill characters at a designated internal point in certain generated output. If no such point is designated, it's identical to right. |
left |
Adds fill characters on the right (final positions) of certain generated output |
right |
Adds fill characters on the left (initial positions) of certain generated output |
dec |
Converts integer input or generates integer output in decimal base |
hex |
Converts integer input or generates integer output in hexadecimal base |
oct |
Converts integer input or generates integer output in octal base |
fixed |
Generates floating-point output in fixed-point notation |
scientific |
Generates floating-point output in scientific notation |
resetiosflags(ios_base::fmtflags flag) |
Resets the fmtflags field flag |
setiosflags(ios_base::fmtflags flag) |
Sets up the flag flag. |
setbase(int base) |
Converts integer input or generates integer output in base base. The parameter base can be 8, 10 or 16. |
setfill(char_type c) |
Sets the character used to pad (fill) an output conversion to the specified field width |
setprecision(int n) |
Sets the precision (number of digits after the decimal point) to generate on certain output conversions |
setw(int n) |
Sets the field width (number of characters) to generate on certain output conversions |
// // ostream1.cpp // #include <iostream> // for cout, endl, hex, oct #include <sstream> // for istringstream #include <iomanip> // for setfill, setprecision, setw int main ( ) { // create a read/write stringbuf object on tiny char // and attach it to an istringstream object std::istringstream in (std::ios::in | std::ios::out); // tie the ostream object to the istringstream object std::ostream out (in.rdbuf ()); out << "test beginning !" << std::endl; // output an int value in hexadecimal const int i = 22; out << std::hex << i << std::endl; // set the field width to 10, the padding character // to '@' and output i in octal notation out << std::setw (10) << std::oct << std::setfill ('@') << i << std::endl; // output a float with precision set to 2 digits // after the separator const float f = 3.14159123; out << std::setprecision (3) << f << std::endl; const char s[] = "Why, one can hear the grass growing!"; // output the 17 first characters of s out.write (s, 17); // output a newline character out.put ('\n'); // output s out << s << std::endl; // output the entire contents of the buffer // to standard output std::cout << in.rdbuf(); return 0; } Program Output:
test beginning ! 16 @@@@@@@@26 3.14 Why, one can hear Why, one can hear the grass growing!
// // ostream2.cpp // #include <iostream> // for wcout, endl #include <sstream> // for wistringstream int main () { const float f = 3.14159; const wchar_t s[] = { 'K', 'e', 'n', 'a', 'v', 'o', ' ', '!', '\0' }; // create a read/write stringbuf object on wide char // and attach it to an wistringstream object std::wistringstream in (std::wios::in | std::wios::out); // tie the wostream object to the wistringstream object std::wostream out (in.rdbuf ()); out << L"test beginning !" << std::endl; out.setf (std::wios::fixed, std::wios::floatfield); // output f in fixed format out << f << std::endl; // store the current put-pointer position std::wostream::pos_type pos = out.tellp (); // output s out << s << std::endl; // output the all buffer to standard output std::wcout << in.rdbuf () << std::endl; // position the get-pointer in.seekg (pos); // output s std::wcout << in.rdbuf () << std::endl; return 0; } Program Output:
test beginning ! 3.141593 Kenavo ! Kenavo !
char_traits, ios_base, basic_ios, basic_streambuf, basic_iostream
ISO/IEC 14882:1998 -- International Standard for Information Systems --Programming Language C++, Section <IP_ADDRESS>


WELCOME
MNREGA Employment Management
(Mahatma Gandhi National Rural Employment Guarantee Act)
BDO Login
GPM Login


In this part of the tutorial we will complete the test and methods necessary to get the full functionality for the stand alone single player version. In the next part of the tutorial part 6, we will begin to develop both the client and server code that allows other users to connect and play our game over a local area network. So lets continue with the testing and move onto the player class. Go ahead and open up the “test.h" file and add line below.
void test_player_class();
void Test::test_player_class(void) { // Player constructor w/o initial room Player no_room_player("hero"); assert(10 == no_room_player.mMaxHp); assert(10 == no_room_player.mHp); assert(1 == no_room_player.mStrength); assert(0 == no_room_player.mDefence); assert(NULL == no_room_player.mLocation); assert("hero" == no_room_player.mName); assert(NULL == no_room_player.mWeapon); assert(NULL == no_room_player.mArmor); // Player constructor w/room Player room_player("dude", new Room("Home", "A big house")); assert(NULL != room_player.mLocation); // Player getters/setters Player get_set("setter", new Room("Lake", "A clean lake")); get_set.setDefence(1); get_set.setHp(10); get_set.setName("getter"); get_set.setStrength(2); assert(1 == get_set.getDefence()); assert(10 == get_set.getHp()); assert("getter" == get_set.getName()); assert(2 == get_set.getStrength()); assert("Lake" == get_set.getLocation()); // Player equip test // The Item is not found // - There is no item within the room "There is no item to equip in this rooom" // - The player misspelled the item name "To equip an item you must type its full name correctly" Room no_item_room("Itemless", "There is no item here"); Player no_item_player("Hi"); no_item_player.mLocation = &no_item_room; string response("There is no item to equip in this room"); assert(response == no_item_player.equip("Bad Item name")); Room with_item("Item room", "Item filled room", new Item("dagger", Item::WEAPON, 10, 0, 0)); no_item_player.mLocation = &with_item; response = "To equip an item you must type its full name correctly"; assert(response == no_item_player.equip("daggers")); // Weapon is found // - The weapon becomes unavailable // - The players strength is set equal to the weapons power value // - The response returned is "You equipped the Item.mName" Player item_player("Bye", &with_item); response = "You equipped the dagger"; assert(response == item_player.equip("dagger")); assert(false == with_item.mItem->mAvailiable); assert(with_item.mItem->getPower() == item_player.getStrength()); // Armor is found // - The armor becomes unavailable // - The players vitality is set equal to the armor's defence // - The response returned is "You equipped the Item.mName" // - The armor's health value is added to the players max hp Item* steel_plate = new Item("steelplate", Item::ARMOR, 0, 10, 20); with_item.setItem(steel_plate); response = "You equipped the steelplate"; assert(response == item_player.equip("steelplate")); assert(with_item.mItem->mAvailiable == false); assert(steel_plate->getHealth() + item_player.getHp() == item_player.mMaxHp); assert(with_item.mItem->getVitality() == item_player.getDefence()); // Health is found // - The health item becomes unavailable // - The player's hp is fully restored // - The response is "You were healed" Item* herb = new Item("herbs", Item::HEALTH, 0, 0, 0); with_item.setItem(herb); response = "You were healed"; assert(response == item_player.equip("herbs")); assert(with_item.mItem->mAvailiable == false); assert(item_player.getHp() == item_player.mMaxHp); // Player attack test // a- There are no monsters within the Room then the method should // return "There are no monsters in this room to fight" // b- The player mis-typed the monster name then // "The Monster.mName is not here" // c- If damage was dealt to the monster then the message should say // "Monster.mName was dealt X damage" // d- If no damage was dealt to the monster then the message should say // "Monster.mName dodged the attack" string response_a("There are no monsters in this room to fight"); string response_b("The roll is not here"); string response_c("troll was dealt 30 damage"); string response_d("supertroll dodged the attack"); Item* great_sword = new Item("greatsword", Item::WEAPON, 30, 0, 0); Room* arena = new Room("arena", "A large crowd gathers", great_sword); Monster* troll = new Monster("troll", 50, 0, 0); arena->setItem(great_sword); Player* attacker = new Player("Fighter", arena); attacker->equip("greatsword"); assert(response_a == attacker->attack("troll")); arena->addMonster(troll); assert(response_b == attacker->attack("roll")); assert(response_c == attacker->attack("troll")); Monster* super_troll = new Monster("supertroll", 8, 0, 999); arena->addMonster(super_troll); assert(response_d == attacker->attack("supertroll")); // Player move test // - If the player moves in an invalid direction then // "You traveled nowhere" should be returned // - If the direction is valid but no room is connected // "There is nothing in that direction" // - If the direction is valid and a room exist // "You traveled directionname\nmLocation->getDescription()" Room* moving_room = new Room("Moving room", "You can move from here"); Room* moving_north = new Room("Moving north", "North of the moving room"); Room* moving_south = new Room("Moving south", "South of the moving room"); Room* moving_west = new Room("Moving west", "West of the moving room"); Room* moving_east = new Room("Moving east", "East of the moving room"); Player* moving_player = new Player("Jill", moving_room); response = "You traveled nowhere"; assert(response == moving_player->move('p')); response = "There is nothing in that direction"; assert(response == moving_player->move('n')); assert(response == moving_player->move('e')); assert(response == moving_player->move('w')); assert(response == moving_player->move('s')); moving_player->mLocation = moving_room; response = "You traveled North\n" + moving_north->getDescription(); moving_room->link('n', *moving_north); assert(response == moving_player->move('n')); moving_player->mLocation = moving_room; response = "You traveled South\n" + moving_south->getDescription(); moving_room->link('s', *moving_south); assert(response == moving_player->move('s')); moving_player->mLocation = moving_room; response = "You traveled West\n" + moving_west->getDescription(); moving_room->link('w', *moving_west); assert(response == moving_player->move('w')); moving_player->mLocation = moving_room; response = "You traveled East\n" + moving_east->getDescription(); moving_room->link('e', *moving_east); assert(response == moving_player->move('e')); // Player search test // Exact same as the string Room::searchResponse( void ) // method so it has already been tested // Player death test // -Returns true when the player's hp is less than zero // -Returns false when the player's hp is greater than zero Player* death_test = new Player("Dead guy"); assert(false == death_test->death()); death_test->setHp(-1); assert(true == death_test->death()); }
Player::Player( string name, Room* start ) : mName(name), mLocation(start), mWeapon(NULL), mArmor(NULL), mHp(10), mMaxHp(10), mStrength(1), mDefence(0) { } void Player::setHp( int newHp ) { mHp = newHp ; } int Player::getHp( void ) const { return mHp ; } void Player::setStrength( int newStrength ) { mStrength = newStrength ; } int Player::getStrength( void ) const { return mStrength ; } void Player::setDefence( int newDefence ) { mDefence = newDefence ; } int Player::getDefence( void ) const { return mDefence ; } string Player::getLocation( void ) { return mLocation->mName ; } void Player::setName( string newName ) { mName = newName ; } string Player::getName( void ) const { return mName ; } string Player::attack( string monsterName ) { list< Monster* >::iterator iter ; int damage = 0 ; string response( "The " + monsterName + " is not here" ) ; stringstream ss ; string strDamage ; if( mLocation->mMonsters.empty() ) { return "There are no monsters in this room to fight" ; } for( iter = mLocation->mMonsters.begin() ; iter != mLocation->mMonsters.end() ; ++iter ) { if( (*iter)->getName() == monsterName ) { damage = getStrength() - (*iter)->getDefence() ; ss << damage ; ss >> strDamage ; ss.clear() ; if( damage > 0 ) { (*iter)->setHp( (*iter)->getHp() - damage ) ; response = (*iter)->getName() + " was dealt " + strDamage + " damage" ; } else { response = (*iter)->getName() + " dodged the attack" ; } break ; } } return response ; } string Player::equip( string itemName ) { string response ; if( mLocation->mItem != NULL && mLocation->mItem->getName() == itemName ) { if( Item::WEAPON == mLocation->mItem->getType() && true == mLocation->mItem->mAvailiable ) { mWeapon = mLocation->mItem ; mLocation->itemTaken() ; setStrength( mWeapon->getPower() ) ; response = "You equipped the " + mWeapon->getName() ; return response ; } else if( Item::ARMOR == mLocation->mItem->getType() && true == mLocation->mItem->mAvailiable ) { mArmor = mLocation->mItem ; mLocation->itemTaken() ; setDefence( mArmor->getVitality() ) ; mMaxHp += mArmor->getHealth() ; response = "You equipped the " + mArmor->getName() ; return response ; } else { setHp( mMaxHp ) ; mLocation->itemTaken() ; response = "You were healed" ; return response ; } } else { if( mLocation->mItem == NULL ) { return "There is no item to equip in this room" ; } response = "To equip an item you must type its full name correctly" ; return response ; } } string Player::move( char direction ) { string response = "You traveled " ; switch( direction ) { case 'n': case 'N': if( NULL == mLocation->mNorth ) { response = "There is nothing in that direction" ; break ; } mLocation = &(mLocation->north()) ; response = response + "North\n" + mLocation->getDescription() ; break ; case 's': case 'S': if( NULL == mLocation->mSouth ) { response = "There is nothing in that direction" ; break ; } mLocation = &(mLocation->south()) ; response = response + "South\n" + mLocation->getDescription() ; break ; case 'e': case 'E': if( NULL == mLocation->mEast ) { response = "There is nothing in that direction" ; break ; } mLocation = &(mLocation->east()) ; response = response + "East\n" + mLocation->getDescription() ; break ; case 'w': case 'W': if( NULL == mLocation->mWest ) { response = "There is nothing in that direction" ; break ; } mLocation = &(mLocation->west()) ; response = response + "West\n" + mLocation->getDescription() ; break ; default: response = response + "nowhere" ; } return response ; } string Player::search( void ) { return mLocation->searchResponse() ; } Player::dead Player::death( void ) { if( getHp() <= 0 ) { return true ; } return false ; }
void test_dungeon_class(void);
void Test::test_dungeon_class(void) { // Dungeon constructor test Dungeon* test_dungeon = new Dungeon(1, 1); assert(1 == test_dungeon->mMaxPlayers); assert(1 == test_dungeon->mMaxRooms); assert(true == test_dungeon->mPlayers.empty()); assert(true == test_dungeon->mRooms.empty()); // - A dungeon without monsters is considered complete assert(true == test_dungeon->isComplete()); // Dungeon addPlayer test // - Successful addition of a new player should display the following // "The player named newPlayer->getName() entered the Dungeon" Player* newbie = new Player("Noob"); string response("The player named Noob entered the Dungeon"); assert(response == test_dungeon->addPlayer(newbie)); assert(false == test_dungeon->mPlayers.empty()); // Dungeon addRoom test // - "The room: newRoom->mName was added" will be displayed // if the addition was successful Room* main_room = new Room("Main hall", "The main hall"); response = "The room: Main hall was added"; assert(response == test_dungeon->addRoom(main_room)); assert(false == test_dungeon->mRooms.empty()); // Dungeon removePlayer test response = "Noob has left the dungeon"; assert(response == test_dungeon->removePlayer(newbie->getName())); // Dungeon generatePlayerStats test // -Sets the players max hp to 10, strength and defence to 2 test_dungeon->generatePlayerStats(newbie); assert(10 == newbie->getHp()); assert(2 == newbie->getStrength()); assert(2 == newbie->getDefence()); // Dungeon combatLoop test // - If the hero is stronger than the monster then the monster // should die else the hero should die Dungeon* combat_test = new Dungeon(1, 1); Room* combat_room = new Room("Battle", "Fight here"); Item* longsword = new Item("longsword", Item::WEAPON, 100, 0, 0); Player* brawler = new Player("brawler", combat_room); Monster* ogre = new Monster("ogre", 10, 0, 0); Monster* superogre = new Monster("superogre", 100, 100, 100); combat_room->setItem(longsword); combat_room->addMonster(ogre); combat_room->addMonster(superogre); combat_test->addRoom(combat_room); combat_test->addPlayer(brawler); combat_test->generatePlayerStats(brawler); brawler->mLocation = combat_room; brawler->equip("longsword"); combat_test->combatLoop(*brawler, *ogre); assert(combat_room->mMonsters.empty() == false); assert(combat_test->isComplete() == false); Item* badsword = new Item("badsword", Item::WEAPON, 0, 0, 0); combat_room->setItem(badsword); brawler->equip("badsword"); combat_test->combatLoop(*brawler, *superogre); assert(true == brawler->death()); // Dungeon playerStatus test Dungeon* status_test = new Dungeon(1, 2); Room* start_room = new Room("Starting room", "Start here"); Room* end_room = new Room("Ending room", "End here"); Player* stats_hero = new Player("Mike", start_room); Item* weapon_x = new Item("weaponx", Item::WEAPON, 20, 0, 0); Item* armor_x = new Item("armorx", Item::ARMOR, 0, 20, 10); start_room->link('e', *end_room); end_room->link('w', *start_room); start_room->setItem(weapon_x); end_room->setItem(armor_x); status_test->addRoom(start_room); status_test->addRoom(end_room); status_test->addPlayer(stats_hero); // The stats reported are the following /* 1. Hp 2. Strength 3. Defence 4. Location 5. Name 6. Weapon 7. Armor */ const int stat_total = 7; string* status_before_weapon = new string[stat_total]; string* status_with_weapon = new string[stat_total]; string* status_with_armor = new string[stat_total]; status_before_weapon[0] = "Current HP: 10 out of 10"; status_before_weapon[1] = "Current Strength: 2"; status_before_weapon[2] = "Current Defence: 2"; status_before_weapon[3] = "Current Location: Starting room"; status_before_weapon[4] = "Current Name: Mike"; status_before_weapon[5] = "Current Weapon: none equipped"; status_before_weapon[6] = "Current Armor: none equipped"; assert(status_before_weapon = status_test->playerStatus(*stats_hero)); stats_hero->equip("weaponx"); status_with_weapon[0] = "Current HP: 10 out of 10"; status_with_weapon[1] = "Current Strength: 20"; status_with_weapon[2] = "Current Defence: 2"; status_with_weapon[3] = "Current Location: Starting room"; status_with_weapon[4] = "Current Name: Mike"; status_with_weapon[5] = "Current Weapon: weaponx"; status_with_weapon[6] = "Current Armor: none equipped"; assert(status_with_weapon = status_test->playerStatus(*stats_hero)); stats_hero->move('e'); stats_hero->equip("armorx"); status_with_armor[0] = "Current HP: 10 out of 20"; status_with_armor[1] = "Current Strength: 20"; status_with_armor[2] = "Current Defence: 20"; status_with_armor[3] = "Current Location: Ending room"; status_with_armor[4] = "Current Name: Mike"; status_with_armor[5] = "Current Weapon: weaponx"; status_with_armor[6] = "Current Armor: armorx"; assert(status_with_armor = status_test->playerStatus(*stats_hero)); }
Dungeon::Dungeon( int maxPlayers, int maxRooms ) : mMaxPlayers(maxPlayers), mMaxRooms(maxRooms) { mRooms.reserve( maxRooms ) ; mPlayers.reserve( maxPlayers ) ; } bool Dungeon::isComplete( void ) { bool flag = true ; for( unsigned int i = 0 ; i < mRooms.size() ; ++i ) { if( mRooms[i]->mMonsters.empty() ) { continue ; } else { flag = false ; break ; } } return flag ; } string Dungeon::addPlayer( Player *newPlayer ) { mPlayers.push_back( newPlayer ) ; string response = "The player named " + newPlayer->getName() + " entered the Dungeon" ; generatePlayerStats( newPlayer ) ; return response ; } void Dungeon::generatePlayerStats( Player* newPlayer ) { newPlayer->mMaxHp = 10 ; newPlayer->setHp( newPlayer->mMaxHp ) ; newPlayer->setStrength( 2 ) ; newPlayer->setDefence( 2 ) ; } string Dungeon::addRoom( Room *newRoom ) { mRooms.push_back( newRoom ) ; string response = "The room: " + newRoom->mName + " was added" ; return response ; } string Dungeon::removePlayer( std::string playerName ) { string response = playerName + " has left the dungeon" ; for( unsigned int i = 0 ; i < mPlayers.size() ; ++i ) { if( playerName == mPlayers[i]->getName() ) { mPlayers.erase( mPlayers.begin() + i ) ; break ; } } return response ; } //Should change this to have the monstersName as an argument void Dungeon::combatLoop( Player& hero, Monster& villain ) { villain.inCombat = true ; while( true ) { cout << hero.attack( villain.getName() ) << endl ; if( villain.getHp() <= 0 ) { cout << villain.getName() + " was slain by the valiant " << hero.getName() << endl; hero.mLocation->killMonster( villain.getName() ) ; return ; } else { int damage = 0 ; damage = villain.getStrength() - hero.getDefence() ; if( damage > 0 ) { hero.setHp( hero.getHp() - damage ) ; cout << hero.getName() + " was dealt " << damage << " damage" << endl ; } else { cout << hero.getName() + " dodged the attack" << endl ; } if( hero.death() ) { cout << hero.getName() + " was slain by the horrible " + villain.getName() << endl; return ; } } } } string* Dungeon::playerStatus( Player& player ) { stringstream ss ; string temp ; const int statusCount = 7 ; string* response = new string[statusCount] ; ss << player.getHp() ; ss >> temp ; response[0] = "Current HP: " + temp ; ss.clear() ; temp.clear() ; ss << player.mMaxHp ; ss >> temp ; response[0] = response[0] + " out of " + temp ; temp.clear() ; ss.clear() ; ss << player.getStrength() ; ss >> temp ; response[1] = "Current Strength: " + temp ; ss.clear() ; temp.clear() ; ss << player.getDefence() ; ss >> temp ; response[2] = "Current Defence: " + temp ; ss.clear() ; temp.clear() ; if( NULL == player.mLocation ) { response[3] = "Error: BAD LOCATION" ; } else { response[3] = "Current Location: " + player.getLocation() ; } response[4] = "Current Name: " + player.getName() ; if( NULL == player.mWeapon ) { response[5] = "Current Weapon: none equipped" ; } else { response[5] = "Current Weapon: " + player.mWeapon->getName() ; } if( NULL == player.mArmor ) { response[6] = "Current Armor: none equipped" ; } else { response[6] = "Current Armor: " + player.mArmor->getName() ; } return response ; } void Dungeon::displayHelp( void ) { cout << "////////////////" << endl ; cout << "Help menu" << endl ; cout << "////////////////" << endl ; cout << "Attack a monster type -> a:monster_name_here" << endl ; cout << "Move to a new location type -> mv:location_name_here" << endl ; cout << "Look for items type -> find:" << endl ; cout << "Search the room for exits and monsters type -> loc:" << endl ; cout << "Equip new items type -> eq:weapon_or_armor_name" << endl; cout << "See your current status type -> you:" << endl; }
void test_filter_class(void);
void Test::test_filter_class(void) { // Filter chat test // string Filter::chat() just truncates the command from the // chat message if it was t:message Filter filter; string input("t:Hello world"); string response("Hello world"); assert(response == filter.chat(input)); // Filter validateMessage test /* The valid commands are the following a: mv: find: loc: eq: you: help: */ assert(true == filter.validateMessage("mv:n")); assert(true == filter.validateMessage("a:goblin")); assert(true == filter.validateMessage("find:")); assert(true == filter.validateMessage("loc:")); assert(true == filter.validateMessage("eq:weapon")); assert(true == filter.validateMessage("you:")); assert(true == filter.validateMessage("help:")); assert(false == filter.validateMessage("move:north")); assert(false == filter.validateMessage("move:south")); assert(false == filter.validateMessage("move:east")); assert(false == filter.validateMessage("move:west")); assert(false == filter.validateMessage("attack:goblin")); assert(false == filter.validateMessage("fid:")); assert(false == filter.validateMessage("location:")); assert(false == filter.validateMessage("eqip:weapon")); assert(false == filter.validateMessage("me:")); assert(false == filter.validateMessage("zelpeafaf:")); assert(false == filter.validateMessage("gg:")); assert(false == filter.validateMessage("Pi:affg")); assert(false == filter.validateMessage("Eqip:weapon")); assert(false == filter.validateMessage("Ye:")); assert(false == filter.validateMessage("no command input")); }
Filter::valid Filter::validateMessage( std::string message ) { //Necessary for the std::tolower() method locale loc ; for( unsigned int i = 0 ; i < message.length() ; ++i ) { message [ i ] = tolower( message[ i ], loc ) ; } bool keywordTest = false ; bool commandTest = false ; bool moveCommandTest = true ; // Checks for a valid direction unsigned int inputIndex = 0; switch( message[ 0 ] ) { case 'a': //Attack case 'm': //Move case 'f': //Find case 'l': //Location case 'e': //Equip case 'y': //You case 't': //Talk case 'h': //Help Menu keywordTest = true ; break ; default: keywordTest = false ; } if( false == keywordTest ) { return false ; } string subMessage ; for( unsigned int i = 0 ; i < message.size() ; ++i ) { if( message[ i ] == ':' ) { inputIndex = i; subMessage += message[ i ] ; break ; } else { subMessage += message[ i ] ; continue ; } } if( subMessage == "a:" || subMessage == "mv:" || subMessage == "find:" || subMessage == "loc:" || subMessage == "eq:" || subMessage == "you:" || subMessage == "t:" || subMessage == "help:" ) { commandTest = true ; } else { return false; } if( subMessage == "mv:" ) { //Checks if a direction was entered by the player, // accomplishes this by seeing if the mv: command // is followed by at most a single character representing // the directions 'n' or 'e' or 'w' or 's' if( inputIndex + 1 == message.size() ) { moveCommandTest = false; } while( inputIndex < message.size() ) { if( false == moveCommandTest ) { break ; } if(message[ inputIndex ] == ' ') { moveCommandTest = false; break ; } ++inputIndex ; } } if( true == commandTest && true == keywordTest && true == moveCommandTest ) { return true ; } else { return false ; } } string Filter::chat( string message ) { return message.substr( 2, message.length() ) ; }
void test_dispatch_class(void);
void Test::test_dispatch_class() { // Dispatch extractCommand test //a Attack //m Move //f Find //l Location //e Equip //y You //t Talk //h Help Menu Dispatch dispatch; assert('a' == dispatch.extractCommand("a:")); assert('m' == dispatch.extractCommand("mv:")); assert('f' == dispatch.extractCommand("find:")); assert('l' == dispatch.extractCommand("loc:")); assert('e' == dispatch.extractCommand("eq:")); assert('y' == dispatch.extractCommand("you:")); assert('t' == dispatch.extractCommand("t:")); assert('h' == dispatch.extractCommand("help:")); // Dispatch extractValue test /* The only commands that take values. attack move equip talk */ assert("goblin" == dispatch.extractValue("a:goblin")); assert("north" == dispatch.extractValue("mv:north")); assert("armor" == dispatch.extractValue("eq:armor")); assert("hello world" == dispatch.extractValue("t:hello world")); assert(" s p a c e s " == dispatch.extractValue( "t: s p a c e s ")); }
char Dispatch::extractCommand(std::string fromFilter) { //a Attack //m Move //f Find //l Location //e Equip //y You //t Talk //h Help Menu return fromFilter[ 0 ] ; } string Dispatch::extractValue(std::string fromFilter) { /* The value of the string from the filter is all of the text that follows the command. -Example- a:goblin The command is a: The value is goblin */ // For single character commands such as t: if( fromFilter[ 1 ] == ':' ) { return fromFilter.substr( 2, fromFilter.length() ) ; } return fromFilter.substr( 3, fromFilter.length() ) ; }
//Filename main.cpp #include "Database.h" #include"Test.h" using namespace MUD ; void run_test(void) { cout << "Ignore the combat printouts from the\n"; cout << "test_dungeon_class() method\n" << endl; Test::get_instance()->test_item_class(); Test::get_instance()->test_monster_class(); Test::get_instance()->test_room_class(); Test::get_instance()->test_player_class(); Test::get_instance()->test_dungeon_class(); Test::get_instance()->test_filter_class(); Test::get_instance()->test_dispatch_class(); } void run_sample_game(void); int main(void) { run_test(); //run_sample_game(); return 0; } void run_sample_game(void) { //Construct Dungeon Dungeon caves( 2, 21 ) ; //Items power vitality health Item* herb_a = new Item( "herb", Item::HEALTH, 0, 0, 0 ) ; Item* herb_b = new Item( "herb", Item::HEALTH, 0, 0, 0 ) ; Item* herb_c = new Item( "herb", Item::HEALTH, 0, 0, 0 ) ; Item* herb_d = new Item( "herb", Item::HEALTH, 0, 0, 0 ) ; Item* herb_e = new Item( "herb", Item::HEALTH, 0, 0, 0 ) ; Item* herb_f = new Item( "herb", Item::HEALTH, 0, 0, 0 ) ; Item* herb_g = new Item( "herb", Item::HEALTH, 0, 0, 0 ) ; Item* woodsword = new Item( "woodsword", Item::WEAPON, 10, 0, 0 ) ; Item* steelblade = new Item( "steelblade", Item::WEAPON, 20, 0, 0 ) ; Item* crystalsword = new Item( "crystalsword", Item::WEAPON, 35, 0, 0 ) ; Item* genjiblade = new Item( "genjiblade", Item::WEAPON, 60, 0, 0 ) ; Item* angelicsword = new Item( "angelicsword", Item::WEAPON, 80, 0, 0 ) ; Item* finalweapon = new Item( "dragonslayer", Item::WEAPON, 2000, 0, 0 ) ; Item* woodarmor = new Item( "woodarmor", Item::ARMOR, 0, 5, 15 ) ; Item* steelarmor = new Item( "steelarmor", Item::ARMOR, 0, 7, 20 ) ; Item* diamondarmor = new Item( "diamondarmor", Item::ARMOR, 0, 12, 30 ) ; Item* crystalarmor = new Item( "crystalarmor", Item::ARMOR, 0, 15, 35 ) ; Item* dragonarmor = new Item( "dragonarmor", Item::ARMOR, 0, 20, 100 ) ; Item* ultimatearmor = new Item( "ultimatearmor", Item::ARMOR, 0, 1000, 1000 ) ; //Monsters hp str def Monster* bear = new Monster( "bear", 15, 2, 3 ) ; Monster* goblin = new Monster( "goblin", 5, 3, 1 ) ; Monster* imp = new Monster( "imp", 5, 5, 2 ) ; Monster* redgoblin = new Monster( "redgoblin", 5, 5, 5 ) ; Monster* demon = new Monster( "demon", 6, 3, 7 ) ; Monster* zergling = new Monster( "zergling", 10, 10, 9 ) ; Monster* bats = new Monster( "bats", 20, 15, 3 ) ; Monster* morebats = new Monster( "morebats", 25, 20, 15 ) ; Monster* golem = new Monster( "golem", 50, 21, 9 ) ; Monster* goatdemon = new Monster( "goatdemon", 100, 10, 10 ) ; Monster* cyclops = new Monster( "cyclops", 150, 90, 0 ) ; Monster* behemoth = new Monster( "behemoth", 250, 30, 40 ) ; Monster* alien = new Monster( "alien", 50, 21, 4 ) ; Monster* giantrat = new Monster( "giantrat", 55, 40, 1 ) ; Monster* fallenangel = new Monster( "fallenangel", 300, 100, 100 ) ; Monster* greatdragon = new Monster( "greatdragon", 500, 300, 1 ) ; Monster* invincibledragon = new Monster( "invincibledragon", 999, 999, 999 ) ; //Rooms name description item Room* mainHall = new Room( "The main cavern", "A murkey swamp cavern", woodsword ) ; Room* river = new Room( "The black river", "A river with dark water", woodarmor ) ; Room* greencave = new Room( "The greencave", "A moss covered cave", herb_a ) ; Room* bluecave = new Room( "The bluecave", "A frosty cave", steelblade ) ; Room* darkpit = new Room( "The darkpit", "An endless hole lies before you", steelarmor ) ; Room* morbidfield = new Room( "The morbidfield", "Pitch black grass surrounds you", herb_b ) ; Room* graveyard = new Room( "The graveyard", "Tombstones abound", diamondarmor ) ; Room* crypt = new Room( "The crypt", "A nasty rotten crypt", crystalsword ) ; Room* evilpassage = new Room( "The evil passage", "An evil pasage", crystalarmor ) ; Room* darklair = new Room( "The dark lair", "A dark lair", herb_c ) ; Room* firepit = new Room( "The firey pits", "Fire is every where", herb_d ) ; Room* greenpasture = new Room( "The greenpastures", "A meadow is before you", genjiblade ) ; Room* icecave = new Room( "The icy caves", "Ice everywhere you look", herb_e ) ; Room* livingroom = new Room( "The living room", "The room is alive", dragonarmor ) ; Room* cellar = new Room( "The cellar", "A dirty cellar filled with rats", angelicsword ) ; Room* lifespring = new Room( "The lifespring", "A beautiful fountain stands", herb_f ) ; Room* waterfall = new Room( "The waterfall", "Clear blue water falls", herb_g ) ; Room* hellsgate = new Room( "The gates of hell", "Large rusty doors lead to hell", ultimatearmor ) ; Room* dragoncave = new Room( "The dragon's cave", "An ancient cave..." ) ; Room* dragonsden = new Room( "The dragon's den", "A powerful monster awaits" ) ; Room* lostforest = new Room( "The secret forest", "The strongest sword lies hidden here", finalweapon ) ; //Link Rooms mainHall->link( 'e', *river ) ; river->link( 's', *greencave ) ; river->link( 'e', *bluecave ) ; river->link( 'w', *mainHall ) ; greencave->link( 'n', *river ) ; bluecave->link( 'w', *river ) ; bluecave->link( 'n', *darkpit ) ; darkpit->link( 's', *bluecave ) ; darkpit->link( 'n', *morbidfield ) ; morbidfield->link( 's', *darkpit ) ; morbidfield->link( 'e', *graveyard ) ; graveyard->link( 'w', *morbidfield ) ; graveyard->link( 'n', *crypt ) ; graveyard->link( 'e', *evilpassage ) ; crypt->link( 's', *graveyard ) ; evilpassage->link( 'w', *graveyard ) ; evilpassage->link( 's', *darklair ) ; darklair->link( 'n', *evilpassage ) ; darklair->link( 's', *firepit ) ; firepit->link( 'n', *darklair ) ; firepit->link( 'e', *greenpasture ) ; greenpasture->link( 'w', *firepit ) ; greenpasture->link( 's', *icecave ) ; greenpasture->link( 'e', *livingroom ) ; icecave->link( 'n', *greenpasture ) ; livingroom->link( 'w', *greenpasture ) ; livingroom->link( 'e', *cellar ) ; cellar->link( 'w', *livingroom ) ; cellar->link( 'n', *lifespring ) ; cellar->link( 'e', *hellsgate ) ; lifespring->link( 's', *cellar ) ; lifespring->link( 'n', *waterfall ) ; waterfall->link( 's', *lifespring ) ; hellsgate->link( 'w', *cellar ) ; hellsgate->link( 'e', *dragoncave ) ; dragoncave->link( 'w', *hellsgate ) ; dragoncave->link( 'e', *dragonsden ) ; dragonsden->link( 'w', *dragoncave ) ; dragonsden->link( 'e', *lostforest ) ; lostforest->link( 'w', *dragonsden ) ; //Add monsters to rooms mainHall->addMonster( goblin ) ; mainHall->addMonster( imp ) ; river->addMonster( bear ) ; river->addMonster( redgoblin ) ; bluecave->addMonster( demon ) ; bluecave->addMonster( zergling ) ; morbidfield->addMonster( bats ) ; morbidfield->addMonster( morebats ) ; graveyard->addMonster( golem ) ; evilpassage->addMonster( goatdemon ) ; firepit->addMonster( cyclops ) ; greenpasture->addMonster( behemoth ) ; livingroom->addMonster( alien ) ; cellar->addMonster( giantrat ) ; hellsgate->addMonster( fallenangel ) ; dragoncave->addMonster( greatdragon ) ; dragonsden->addMonster( invincibledragon ) ; //Add the rooms to the dungeon caves.addRoom( mainHall ) ; caves.addRoom( river ) ; caves.addRoom( greencave ) ; caves.addRoom( bluecave ) ; caves.addRoom( darkpit ) ; caves.addRoom( morbidfield ) ; caves.addRoom( graveyard ) ; caves.addRoom( crypt ) ; caves.addRoom( evilpassage ) ; caves.addRoom( darklair ) ; caves.addRoom( firepit ) ; caves.addRoom( greenpasture ) ; caves.addRoom( icecave ) ; caves.addRoom( livingroom ) ; caves.addRoom( cellar ) ; caves.addRoom( lifespring ) ; caves.addRoom( waterfall ) ; caves.addRoom( hellsgate ) ; caves.addRoom( dragoncave ) ; caves.addRoom( dragonsden ) ; caves.addRoom( lostforest ) ; //Create a filter Filter filter ; //Create a dispatch object with a command char and a value string Dispatch dispatch ; char command ; string value ; //Simulate a new game //Create a new player and add to the dungeon string input ; cout << "Welcome to the game\nEnter in a new name: " ; getline(cin, input, '\n'); Player* one = new Player( input, mainHall ) ; cout << caves.addPlayer( one ) << endl ; //Display needed info for the players cout << "The objective is to clear the dungeon of all monsters. Good Luck" << endl ; cout << "Enter in a new command to start, to display help type the following command" << endl ; cout << "help:" << endl ; cout << "To quit simply enter \"quit\" without the quotes as a new command" << endl ; cout << "New Command" << endl ; getline(cin, input, '\n'); //Start the game loop while( input != "quit" ) { //Pass the users message through the filter if( filter.validateMessage( input ) ) { //Split the users message into a command and value pair command = dispatch.extractCommand( input ) ; value = dispatch.extractValue( input ) ; //Match the command and forward the value switch( command ) { case 'a': //Attack //If the monster does not exist or the name was mispelled if( &(one->mLocation->getMonsterRef( value )) == NULL ) { cout << "There is no " + value + " at this location" << endl ; break ; } //If the monster is there but in combat the player cannot fight it if( one->mLocation->getMonsterRef( value ).inCombat == true ) { cout << "The " + value + " is currently fighting" << endl ; break ; } caves.combatLoop( *one, one->mLocation->getMonsterRef( value ) ) ; break ; case 'm': //Move cout << one->move( value[ 0 ] ) ; break ; case 'f': //Find cout << one->search() ; break ; case 'l': //Location cout << one->getLocation() ; break ; case 'e': //Equip cout << one->equip( value ) ; break ; case 'y': //You { string* playerStats = new string ; playerStats = caves.playerStatus( *one ) ; for( int i = 0 ; i < 7 ; ++i ) { cout << playerStats[i] << endl ; } } break ; //case 't': //Talk case 'h': //Help Menu caves.displayHelp(); break ; } } else { cout << "Invalid command please refer to the help menu.\nhelp:" << endl ; cout << "Or type \"quit\" to quit the game" << endl ; } if( caves.isComplete() ) { cout << "Dungeon Cleared, YOU WIN!" << endl ; break ; } if( one->death() ) { cout << one->getName() + " was slain by the " + one->mLocation->getMonsterRef( value ).getName() << endl ; one->mLocation->getMonsterRef( value ).inCombat = false ; cout << "*Hint* Secret rooms hidden abound; find them and victory shall be yours" << endl ; input = "quit" ; } else { //Get the next command cout << "\n\nNew Command" << endl ; getline(cin, input, '\n'); } } caves.removePlayer( one->getName() ) ; }
http://dl.dropbox.com/u/22280460/database.cpp
http://dl.dropbox.com/u/22280460/database.h
http://dl.dropbox.com/u/22280460/main.cpp
http://dl.dropbox.com/u/22280460/Test.cpp
http://dl.dropbox.com/u/22280460/Test.h


Before Change
if self.return_state:
output_shape = [output_shape]
if cell.data_format == "channels_first":
output_shape += [(input_shape[0], cell.filters, rows, cols)
for _ in range(2)]
elif cell.data_format == "channels_last":
output_shape += [(input_shape[0], rows, cols, cell.filters)
for _ in range(2)]
return output_shape
def build(self, input_shape):
// Note input_shape will be list of shapes of initial states and
After Change
if self.return_state:
output_shape = [output_shape]
base = (input_shape[0], rows, cols, cell.filters)
base = transpose_shape(base, cell.data_format, spatial_axes=(1, 2))
output_shape += [base[:] for _ in range(2)]
return output_shape
def build(self, input_shape):