BOUNCE GAME
Introduction
This tutorial is designed to give an example of the basic structure of Nimgame2 applications. The following concepts will be explained here:
- engine initialization
- assets loading
- scenes
- texture graphics
- text graphics
- entity objects
- colliders and collisions
- keyboard input
- pausing
- sound
Assets
For any basic game you'll need three basic kinds of assets:
- fonts
- graphics
- sounds
So, the assets directory of the game will be structured as shown here:
./data/ | |-- fnt/ |-- gfx/ |-- sfx/
For rendering all text in the game we will use good old Fixedsys Excelsior (at "data/fnt").
We will need just two graphic assets here: the ball and the paddle (at "data/gfx").
As for the sounds, we will not worry about it for now.
Starting to Code
All source code will be placed into the "src" directory. Let's start with a file for storing constants and variables that might be accessed from different points of the game.
data.nim
import nimgame2 / [ assets, scene, types, ] const GameWidth* = 640 GameHeight* = 360 GameTitle* = "Nimgame 2 Bounce" var titleScene*, mainScene*: Scene
As you can see, we will have two game scenes: title and main. We will create a souce file for each of them.
title.nim
import nimgame2 / [ nimgame, scene, types, ], data type TitleScene = ref object of Scene proc init*(scene: TitleScene) = init Scene(scene) proc free*(scene: TitleScene) = discard proc newTitleScene*(): TitleScene = new result, free init result method event*(scene: TitleScene, event: Event) = if event.kind == KeyDown: game.scene = mainScene
main.nim
import nimgame2 / [ scene, ], data type MainScene = ref object of Scene proc init*(scene: MainScene) = init Scene(scene) proc free*(scene: MainScene) = discard proc newMainScene*(): MainScene = new result, free init result method show*(scene: MainScene) = echo "Switched to MainScene"
And, finally, we will create a main source file:
bounce.nim
import nimgame2 / [ nimgame, settings, types, ], data, title, main game = newGame() if game.init(GameWidth, GameHeight, title = GameTitle, integerScale = true): # Init game.setResizable(true) # Window could be resized game.minSize = (GameWidth, GameHeight) # Minimal window size game.windowSize = (GameWidth * 2, GameHeight * 2) # Double scaling (1280x720) game.centrify() # Place window at the center of the screen # Create scenes titleScene = newTitleScene() mainScene = newMainScene() # Run game.scene = titleScene # Initial scene run game # Let's go!
During the process of development we will rebuild the game constantly, so let's create some basic scripts for that:
build.debug.sh
#!/bin/sh cd src nim c --out:../ng2bounce bounce.nim cd ..
build.release.sh
#!/bin/sh cd src nim c --out:../ng2bounce -d:release --opt:speed bounce.nim rm -rf nimcache cd ..
Or, if you are working on Windows:
build.debug.bat
cd src nim c --out:..\ng2bounce.exe bounce.nim cd ..
build.release.bat
cd src nim c --out:..\ng2bounce -d:release --opt:speed --app:gui bounce.nim rmdir /s /q nimcache cd ..
So, at this moment, our directory structure looks like this:
./ng2bounce/ | |-- build.debug.sh |-- build.release.sh | |-- data/ | | | |-- fnt/ | | | | | |-- FSEX300.ttf | | | |-- gfx/ | | | | | |-- ball.png | | |-- paddle.png | | | |-- sfx/ | |-- src/ | |-- bounce.nim |-- data.nim |-- main.nim |-- title.nim
When we run our "build.debug.sh" script, we should get an executalbe "ng2bounce" that just shows a black screen and outputs a "Switched to MainScene" message to the console when any keyboard key is pressed.
Title Screen
We will start with populating the title screen. There will be two text graphics: the title of the game and a subtitle hint under it.
To render any text we need to load our font first.
data.nim
import nimgame2 / [ ... font, ... truetypefont, ... ] ... var ... defaultFont*, bigFont*: TrueTypeFont proc loadData*() = defaultFont = newTrueTypeFont() if not defaultFont.load("data/fnt/FSEX300.ttf", 16): echo "ERROR: Can't load font" bigFont = newTrueTypeFont() if not bigFont.load("data/fnt/FSEX300.ttf", 32): echo "ERROR: Can't load font" proc freeData*() = defaultFont.free() bigFont.free()
We will call the loading procedure from our main file.
bounce.nim
... loadData() # Call it before any scene initialization # Create scenes ...
And finally, we will create our entities in TitleScene's init() procedure.
title.nim
import nimgame2 / [ entity, font, ... textgraphic, ... ], ... proc init*(scene: TitleScene) = ... # Create a title text graphic with a big font let titleText = newTextGraphic(bigFont) titleText.setText GameTitle # Set the text to render let title = newEntity() # Create a title entity title.graphic = titleText # Assign the title text graphic title.centrify() # Set the origin point to the graphic's center title.pos = (GameWidth / 2, GameHeight / 3) # Set the title position on the screen scene.add title # Add title entity to the scene # Create a subtitle text graphic with a default font let subtitleText = newTextGraphic(defaultFont) subtitleText.setText "Press any key to start" # Set the text let subtitle = newEntity() # Create a subtitle entity subtitle.graphic = subtitleText # Assign the subtitle text graphic subtitle.centrify() # Set the origin point to the graphic's center subtitle.pos = game.size / 2 # Place to the center of the screen scene.add subtitle # Add subtitle entity to the scene ...
After running the game we should see this screen:
Loading Assets
Though we only have two graphic assets now it is surelly an overkill to use an asset manager, but it is a good opportunity to give an example of its usage.
data.nim
import nimgame2 / [ ... texturegraphic, ... ] ... var ... gfxData*:Assets[TextureGraphic] proc loadData*() = ... gfxData = newAssets[TextureGraphic]( "data/gfx", proc(file: string): TextureGraphic = newTextureGraphic(file)) proc freeData*() = ... for graphic in gfxData.values: graphic.free()
As you can see, we pass two arguments to the asset manager constructor: a path to the assets and a procedure to load them. The procedure recieves a file name and should return an object to be loaded in our collection.
Note: If you try to load any directory containing other types of files, the loading procedure will throw an error.
Paddles
Let's start with creating paddle entity. This object will represent players in this game.
paddle.nim
import nimgame2 / [ assets, graphic, input, nimgame, entity, ], data const Speed = 250.0 # Speed (in pixels per second) type PaddlePlacement* = enum ppLeft, ppRight PaddleControl* = enum pcPlayer1, pcPlayer2 Paddle* = ref object of Entity control*: PaddleControl
As you can see, two enums represent the paddle position and how it will be controlled.
paddle.nim
... proc init*(paddle: Paddle, placement: PaddlePlacement, control: PaddleControl) = paddle.initEntity() paddle.graphic = gfxData["paddle"] paddle.centrify() # Set the center point offset # Set position paddle.pos = case placement: of ppLeft: (paddle.graphic.w.float, game.size.h / 2) of ppRight: (float(game.size.w - paddle.graphic.w), game.size.h / 2) paddle.control = control # Set control mode proc newPaddle*(placement: PaddlePlacement, control: PaddleControl): Paddle = new result result.init(placement, control)
As you see, for now we need to have only one param in our Paddle object — a control state, that we will need in the update() method.
paddle.nim
... method update*(paddle: Paddle, elapsed: float) = var movement = Speed * elapsed # Read input case paddle.control: # First player of pcPlayer1: if ScancodeQ.down: paddle.pos.y -= movement # Move up if ScancodeA.down: paddle.pos.y += movement # Move down # Second player of pcPlayer2: if ScancodeUp.down: paddle.pos.y -= movement # Move up if ScancodeDown.down: paddle.pos.y += movement # Move down # Check for the screen borders paddle.pos.y = clamp( paddle.pos.y, paddle.center.y, game.size.h.float - paddle.center.y)
We calculate movement distance by multiplying the speed and time elapsed since previous update. Finally, don't forget to check for the screen borders.
Now we just need to add two Paddle entities into the main scene.
main.nim
import nimgame2 / [ scene, ], data, paddle type MainScene = ref object of Scene leftPaddle, rightPaddle: Paddle proc init*(scene: MainScene) = init Scene(scene) # left paddle scene.leftPaddle = newPaddle(ppLeft, pcPlayer1) scene.add scene.leftPaddle # right paddle scene.rightPaddle = newPaddle(ppRight, pcPlayer2) scene.add scene.rightPaddle ...
Now the main scene should look like this:
Colliders
To detect collisions between the ball and paddles we need to init colliders for these entities. All collider counstructors accept a parent entity reference, center point offset, and collider dimensions that depend on a particular collider type. We will use a simple box collider for our paddles.
paddle.nim
... proc init*(paddle: Paddle, placement: PaddlePlacement, control: PaddleControl) = ... # Collisions paddle.tags.add "paddle" paddle.collider = paddle.newBoxCollider((0.0, 0.0), paddle.graphic.dim) paddle.collider.tags.add "ball" ...
The "paddle" and "ball" tags will be used to filter out the collisions.
Now we define a Ball entity the same way, but using the circle collider instead of a box one, passing the circle radius to its constructor.
ball.nim
import nimgame2 / [ assets, entity, graphic, nimgame, types, utils, ], data type Ball* = ref object of Entity radius: float proc reset*(ball: Ball) = ball.pos = game.size / 2 # place to the center of the screen proc init*(ball: Ball) = ball.initEntity() ball.graphic = gfxData["ball"] ball.radius = ball.graphic.dim.w / 2 ball.centrify() # Set the center point offset ball.reset() # Collisions ball.tags.add "ball" ball.collider = ball.newCircleCollider((0.0, 0.0), ball.radius) ball.collider.tags.add "paddle" proc newBall*(): Ball = new result result.init()
To be sure that we have initialized colliders correctly we could use a colliderOutline boolean variable from the "nimgame2/settings" module.
main.nim
import nimgame2 / [ input, scene, settings, ], ball, ... type MainScene = ref object of Scene ... ball: Ball proc init*(scene: MainScene) = ... # ball scene.ball = newBall() scene.add scene.ball ... method show*(scene: MainScene) = ... scene.ball.reset() ... method update*(scene: MainScene, elapsed: float) = scene.updateScene(elapsed) if ScancodeF10.pressed: colliderOutline = not colliderOutline if ScancodeF11.pressed: showInfo = not showInfo
Now we could press F10 to toggle collider outlines. We also assigned the info panel toggle to F11 for good measure.
Bounce
Now, as we have a ball entity, bounce logic could be implemented. The ball should bounce from top and bottom walls, and also from both paddles. Paddle bounces will increase ball's speed each time.
ball.nim
... const Speed = 100.0 # Speed (in pixels per second) SpeedInc = 25.0 # Speed increase after each bounce ... proc reset*(ball: Ball) = ball.pos = game.size / 2 # place to the center of the screen ball.vel.x = Speed * randomSign().float ball.vel.y = Speed * randomSign().float ... method update*(ball: Ball, elapsed: float) = var movement = ball.vel * elapsed ball.pos += movement # Top and bottom walls collisions if ball.pos.y < ball.radius or ball.pos.y >= (game.size.h.float - ball.radius): ball.vel.y = -ball.vel.y method onCollide*(ball: Ball, target: Entity) = if "paddle" in target.tags: # Check if the ball is in front of a paddle if (ball.pos.y >= target.pos.y - target.center.y) and (ball.pos.y <= target.pos.y + target.center.y): ball.vel.x = -ball.vel.x # change horizontal direction # Move the ball out of the collision zone if ball.pos.x < game.size.w / 2: ball.pos.x = target.pos.x + target.center.x + ball.radius + 1 else: ball.pos.x = target.pos.x - target.center.x - ball.radius - 1 # increase speed ball.vel += (SpeedInc, SpeedInc) * ball.vel / abs(ball.vel)
Reset
Each time the ball leaves the screen it should be returned to the center and relaunched. It would be good to add a small pause before the launch too. This pause will be indicated by a white circle, shrinking as the pause runs out.
ball.nim
nimgame2 / [
...
draw,
...
],
...
const
...
Pause = 1.0 # Pause value before launch (in seconds)
type
Ball* = ref object of Entity
...
pause: float
proc reset*(ball: Ball) =
...
ball.pause = Pause
method render*(ball: Ball) =
ball.renderEntity()
if ball.pause > 0.0: # pre-launch pause
discard circle(ball.pos, ball.pause * 100, 0xFFFFFFFFF'u32, DrawMode.aa)
method update*(ball: Ball, elapsed: float) =
if ball.pause <= 0.0:
var movement = ball.vel * elapsed
ball.pos += movement
# Top and bottom walls collisions
if ball.pos.y < ball.radius or
ball.pos.y >= (game.size.h.float - ball.radius):
ball.vel.y = -ball.vel.y
else: # pre-launch pause
ball.pause -= elapsed
...
The actual checking of the ball position will be performed in the main scene file.
main.nim
... method update*(scene: MainScene, elapsed: float) = ... # check if the ball is out of the screen borders if (scene.ball.pos.x < 0) or (scene.ball.pos.x >= game.size.w.float) or (scene.ball.pos.y < 0) or (scene.ball.pos.y >= game.size.h.float): scene.ball.reset()
Score
At this moment we are ready to add a simple score counting into the game.
data.nim
... var ... score1*, score2*: int ...
main.nim
import nimgame2 / [ entity, graphic, ... textgraphic, ... ], ... MainScene = ref object of Scene ... scoreText: TextGraphic proc init*(scene: MainScene) = ... # score scene.scoreText = newTextGraphic(bigFont) scene.scoreText.setText "0:0" let score = newEntity() score.graphic = scene.scoreText score.centrify() score.pos = (game.size.w / 2, score.graphic.dim.h.float) score.layer = 10 # text should be over other entities scene.add score proc free*(scene: MainScene) = scene.scoreText.free() ... method show*(scene: MainScene) = ... score1 = 0 score2 = 0 scene.scoreText.setText "0:0" method update*(scene: MainScene, elapsed: float) = ... # check if the ball is out of the screen borders if (scene.ball.pos.x < 0) or (scene.ball.pos.x >= game.size.w.float) or (scene.ball.pos.y < 0) or (scene.ball.pos.y >= game.size.h.float): # increase score if scene.ball.pos.x < 0: inc score2 else: inc score1 # update score graphic scene.scoreText.setText $score1 & ":" & $score2 # reset scene.ball.reset()
Now your game screen should look like this:
Pause
Adding the option to pause the game is actually pretty easy.
main.nim
import nimgame2 / [ ..., types, ], ... type MainScene = ref object of Scene ... pause: Entity proc init*(scene: MainScene) = ... # pause let pauseText = newTextGraphic(bigFont) pauseText.setText "PAUSE" scene.pause = newEntity() scene.pause.graphic = pauseText scene.pause.centrify() scene.pause.pos = game.size / 2 scene.pause.visible = false scene.add scene.pause ... method event*(scene: MainScene, event: Event) = scene.eventScene(event) if event.kind == KeyDown: # Pause/Unpause if event.key.keysym.scancode == ScancodeP: gamePaused = not gamePaused scene.pause.visible = gamePaused ...
Now pressing P will toggle pause mode.
Sound
Finally, we will add sound effects. WAV files will be placed into "data/sfx" directory:
- bell.wav
- hit1.wav
- hit2.wav
- hit3.wav
data.nim
import nimgame2 / [ ... audio, ... ] ... var ... sfxData*: Assets[Sound] proc loadData*() = ... sfxData = newAssets[Sound]( "data/sfx", proc(file: string): Sound = newSound(file)) ... proc freeData*() = ... for sound in sfxData.values: sound.free()
ball.nim
import nimgame2 / [ ... audio, ... ], ... ... method update*(ball: Ball, elapsed: float) = ... if ball.pos.y < ball.radius or ball.pos.y >= (game.size.h.float - ball.radius): ... discard sfxData["hit3"].play() ... method onCollide*(ball: Ball, target: Entity) = ... if ball.pos.x < game.size.w / 2: ... discard sfxData["hit1"].play() else: ... discard sfxData["hit2"].play() ...
main.nim
import nimgame2 / [ ... audio, ... ], ... ... method show*(scene: MainScene) = ... discard sfxData["bell"].play() ... method update*(scene: MainScene, elapsed: float) = ... # reset scene.ball.reset() discard sfxData["bell"].play()
What's Next?
Though the game is ready, there's a multitude of ways to improve it (like changing the angle of the ball's trajectory, for example). As this isn't directly related to the engine functionality, it is left for you to explore on your own.


---
layout: post
date: 2009-09-11
time: "10:00:00"
authors: ["Greg Wilson"]
title: Two Links
tags: ["Noticed"]
---
- Mendeley has been getting some good press—anyone have first-hand experiences to share?
- A Nature special on data sharing. Bryn Nelson's piece on empty archives is particularly worth reading.


The LDM Product-Queue
The product-queue is a memory-mapped file that temporarily stores
data-products. Access to the product-queue is via the pq module, which
coordinates access by the reading and writing processes to ensure that the product-queue isn't corrupted.
The product-queue has the following characteristics:
- The number of data-products that the queue can contain is fixed when
the queue is created. This is the number of data-product
slots.
- The amount of data that the queue can contain is fixed when the queue is created. This is the size of the
queue.
- A data-product is inserted into the product-queue in contiguous space
and indexed by the time of insertion according to the system clock.
- A data-product will not be inserted into the product-queue if
its signature (i.e., MD5 checksum) equals that of a product already in the
queue.
- Reading a data-product from the queue creates a read-lock on that
product. Read-locks can be shared by reading processes.
- Data-products read from the product-queue sequentially are returned
in time-sorted order (oldest first) according to the insertion-time. Therefore,
data-products can be skipped if the system clock is set backwards.
- Writing a data-product into the queue creates a write-lock on that
product. Write-locks can't be shared.
- If a new data-product can't be added, either because no space is
available for the data-product or because no slot is available, then
unlocked data-products are deleted from the queue -- beginning with the
oldest data-product and continuing to the youngest -- until addition is
possible.
- A writer-counter field in the product-queue keeps track of the number of times the
product-queue has been opened for writing. Opening the product-queue for writing increments the counter;
closing the product-queue decrements the counter. If no process has the product-queue open for writing, then
the writer-counter should be 0. This counter is used to ensure that the product-queue has been properly
closed by all processes that could modify it.
The canonical pathname of the LDM product-queue, relative to the LDM home-directory, is var/data/ldm.pq


Nucleator CLI Reference
nucleator-setup(1) Manual Page
NAME
nucleator-setup - manage the site configuration files
SYNOPSIS
nucleator setup show nucleator setup wizard nucleator setup validate
DESCRIPTION
The Nucleator system relies on a set of files which describe the components of your installation. This is described in the User’s Guide on the page titled "Nucleator Configuration Process Overview"
SUBCOMMANDS
SITECONFIG SHOW
- nucleator setup show
-
nucleator setup show creates a rudimentary display of the existing site configuration set of files.
SITECONFIG WIZARD
- nucleator setup wizard
-
nucleator setup wizard asks you a series of questions enabling you to simply create the suite of site configuration files. Prior to starting the wizard you should know what AWS accounts you will be using and for each account you will need the account number, access key and secret key. This information can be read from the AWS Management Console.
In the simplest possible case, you can create one cage in one account, in the region you select. By entering the three required fields (account number, access key and secret key), and selecting default values, all the appropriate configuration files will be created for you.
For ongoing maintenance of the files, a good practice would be to create a Git repository to store the files with verions. This will also enable the Nucleator User Interface to have access to the site configuration files.
As you run the wizard, default values, when present, are shown in brackets []. Just press enter if you want to use the default value offered.
If you want to create multiple cages, just enter a new cage name when asked, and it will ask the questions for that cage. Similarly, if you have multiple accounts, you can enter the number and keys for each account.
SITECONFIG VALIDATE
- nucleator setup validate
-
Attempts to validate the existing site configuration including sources of updates and distribution keys. TO BE IMPLEMENTED.
FILES
- ~/.nucleator/
-
Configuration directory for local nucleator configuration.
- ~/.nucleator/<customer_name>-credentials.yml
-
File with AWS access key and secret key.
- <customer_name>.yml
-
Customer configuration file, defines Cages supported for customer including mapping each cage to a specified AWS Account and Region.
- <customer_name>-<cage_name>.yml
-
Cage configuration file, allows refinements to network address space used by this cage. One file is created for each cage you define.
- <cage_name>.crt
-
An SSL certificate that will be used on the nucleator-ui and nucleator machines.
NUCLEATOR
Part of the nucleator(1) suite


--- layout: post status: publish published: true title: Cardinals fans love their own, even if he's a cheater. author: display_name: Corey Fineran login: Corey email<EMAIL_ADDRESS>url: '' author_login: Corey author_email<EMAIL_ADDRESS>wordpress_id: 1741 wordpress_url: http://ivyenvy.com/?p=1741 date: '2010-01-18 14:10:47 +0000' date_gmt: '2010-01-18 20:10:47 +0000' categories: - General Baseball tags: - Pete Rose - Sammy Sosa - MLB - Cardinals Fans - Tony LaRussa - Mark McGwire - Jack Clark - Bob Costas comments: [] ---
Like most baseball fans, I was shocked when the Cardinals hired Mark McGwire as their hitting coach. I think the case can be made that McGwire's cheating (and Sosa's, while we're at it) impacted baseball on a much larger scale than any betting Pete Rose did. Of course, MLB knew exactly what was going on when scrawny 20 year olds ended up looking like body-builders in their mid 30's, so they aren't going to take any strong stance against the players that took steroids. They will rely on the sports-writers to keep those guys out of the Hall of Fame. But that doesn't keep those guys out of baseball.
My current disappointment is with Cardinals fans. I would expect something like this from a club that is managed by Tony LaRussa, but I was surprised to hear how Cardinals fans greeted McGwire at the Cardinals' Winter Warm-up. If the Cubs were to hire Sammy Sosa, in any capacity, I could not get behind it at all. I would expect a heavy dose of heckling if Sosa was to be introduced at the Cubs Convention.
But Cardinals fans cheered for Mark McGwire as he was introduced at their Winter Warm-up. Many were wearing t-shirts that said "Welcome Back Mac". I really can't understand how they could rally around him. Earlier in the week, I was happy to hear former Cardinals first baseman Jack Clark voice his opposition of McGwire, by stating that players that used steroids are cheaters and fakes. How did Cardinals fans react when Clark was introduced? He was "dusted by boo's" according to Joe Strauss of the St. Louis Post-Dispatch.
I have spoken with two Cardinals fans in the last week about all of this, since McGwire's sit-down with Bob Costas. Both were not in favor of McGwire being hired, but didn't seem too passionate about it. In this whole situation, I've realized I'm trying to do something impossible. I am trying to understand the rationale of the typical Cardinals fan.


Thank you for visiting my portfolio. I am a software/web developer located in Seattle, WA.
Currently, I am capable of using couple of different stacks for web development, including Python, MEAN, and ASP.NET Core with C#.
If you have a project ideas or technologies you would like to share, please do not hesitate to contact me!
Or, download and enjoy a timelapse video I took from the west coast!


Toggle navigation
About
Services
Contact
Simulator
simulator your price
124
Prices Lists
13
Support Tickets!
Back
Edit Exception
Add exception:
Date Type
Clock Type
Days On Week Type
Amount Type
1 Exception
Price
45
2 Exception
Price
35
3 Exception
Price
25
4 Exception
Price
15
5 Exception
Price
5
PLAN
$100
1 Exception
45
2 Exception
35
3 Exception
25
4 Exception
15
5 Exception
5


Use the x "button" to delete records.
| Id | Name | Job | Salary | Hiredate | |
|---|---|---|---|---|---|
| 1000 | John Smith | CEO | 8000 | 11-06-2005 | X |
| 1001 | Jane Doe | Regional Manager | 6000 | 01-22-2002 | X |
| 1002 | Bill Johnson | Assistant Regional Manager | 3500 | 05-30-2004 | X |
Use the x "button" to delete records.
| Id | Name | Job | Salary | Hiredate | |
|---|---|---|---|---|---|
| 1000 | John Smith | CEO | 8000 | 11-06-2005 | X |
| 1001 | Jane Doe | Regional Manager | 6000 | 01-22-2002 | X |
| 1002 | Bill Johnson | Assistant Regional Manager | 3500 | 05-30-2004 | X |


blackjok3r
31-Jan-19 05:30 AM
not helpful.... because its already fixed in LABS
no use even testing it.... as the fix already exists
My suggestion is for someone who knows whats what to tell me what exactly they DO NOT want from the commitu abopve so I can disable it... Then jsut merge the whole thign in
Maybe just make is_STAKED alwasys return 0 ? That effecvly disables everything
(edited)
As long as it can sync every chain (not MGNX or SEC I think due ts assets changes) then it should be fine.
@Alright There are more thigns the staker needs than just getblock btw.. segid is in listunspent, and it uses the getlastsegidstakes RPC, maybe even other things.


You can return to homepage and start it over again.
back to homepage


Floating action buttons are used for a special type of promoted action. They are distinguished by a circled icon floating above the UI and have special motion behaviors related to morphing, launching, and the transferring anchor point.
Use the class .btn
along with class .btn-float
.
Social Buttons for Bootstrap
Buttons with built-in loading indicators, effectively bridging the gap between action and feedback.
Social Media Buttons


I am a passionate, self-motivated IT professional from Athens, Greece. I am an alumnus of Deree College and Open University of UK with an Information Technology (IT) Bachelor (BSc - Networks and Telecommunications emphasis). I have been working commercially for more than a year, mostly as a proud web developer team member of different companies. Furthermore, my passion for network systems and data communications is remarkable and I have a keen interest in self development thus I find myself comfortable experimenting with new technologies.
I tend to simplify even the most complexed problems, giving me the ability to find short cuts.
I consider myself a talented developer, with knowledge in many computer languages, but with particular preference and experience in web development.
One of my advantages is fast adaptability to new environments and technologies.
The feeling you get when you develop a new app and your code compiles with no errors... Priceless!!
Significant participation in Genius Solution's team, for the development of an account management web application which facilitates the functionality and creation of E-Learning courses via Moodle educational platform.
Participation in the development of a Voting application through the Internet.
Providing mobility consulting as a team member of Regate corporation (Mobile CRM solutions). First level customer support for company's software and maintenance of company's website.
As a team member of Synergic Software, I participated in the development of many E-Commerce and corporate Websites. My primary duty was the precise development of the given mockups and the free of errors functionality of the corresponding websites. The programming languages / technologies I used to develop the UI/UX (front-end) were HTML, CSS and JS (especially jQuery). On the other hand, PHP was the main programming language I used for back-end development.
As a partner of interTen, my main responsibilities were the installation and development of websites. More specific, the programming languages / technologies that I used to develop the UI/UX (front-end) were HTML, CSS and JS (especially jQuery). Furthermore, PHP was the main programming language that I used to develop the back-end. The construction of the websites was done using Wordpress and CS-cart.
Do not hesitate to send me an e-mail on the address below, I would love to hear from you!
Karditsis 18
Chalandri, Athens GR 15231


| Afghanistan(https://www.cdc.gov/malaria/images/map/Afghanistan_3.14.16.jpg) |
April–December in all areas at altitudes below 2,500 m (8,202 ft). |
Moderate2 |
Chloroquine |
P. vivax 80-90% P. falciparum 10-20% |
Atovaquone-proguanil, doxycycline, or mefloquine |
1) Month(s) of travel
2) City(ies) of travel
3) Altitude of city(ies) of travel Altitude information for Afghanistan |


The Background Task API makes it easy to run background tasks. Currently, this plugin supports running a task when the app is backgrounded, and soon will support periodic background fetch operations.
Mobile operating systems have strict, constantly changing guidelines for background tasks. Running indefinitely in the background is limited to apps that need to play audio, maintain VoIP connections, track geolocation for navigation purposes, and a limited set of other tasks. All other apps should expect to perform periodic, short background tasks, such as finishing an upload when the app goes to the background, and periodically syncing data.
Plugins that claim to offer infinite background operation outside of those core use cases will cause App Store rejections! This limitation is the same for developers using any mobile app technology, not just Capacitor.
Generally, Android is less strict about background tasks, but your app should code to the lowest common denominator in order to be a good actor on all platforms.
import { Plugins } from '@capacitor/core';
const { App, BackgroundTask } = Plugins;
App.addListener('appStateChange', (state) => {
if (!state.isActive) {
// The app has become inactive. We should check if we have some work left to do, and, if so,
// execute a background task that will allow us to finish that work before the OS
// suspends or terminates our app:
let taskId = BackgroundTask.beforeExit(async () => {
// In this function We might finish an upload, let a network request
// finish, persist some data, or perform some other task
// Example
setTimeout(() => {
// Must call in order to end our task otherwise
// we risk our app being terminated, and possibly
// being labled as impacting battery life
BackgroundTask.finish({
taskId
});
}, 30000); // Set a long timeout as an example
});
}
})


[Gecode] Distributors, batch recomputation
Guido Tack
tack at ps.uni-sb.de
Wed Jul 14 11:58:30 CEST 2004
Am Mittwoch, 14. Juli 2004 11:49 schrieb Christian Schulte:
> Your scenario is of course a desaster for recomputation. However, it is
> also a desaster for non-recomputation: the addition of further constraints
> can break it anyway (anyt constraint on either a or b will do). So it's
> boned anyway.
>
> But what is clear is that I have to come up with an invariant that
> describes hwat are you allowed to do when you want to use recomputation. A
> simple restriction (the same as used in Oz) is to restrict us to the case
> that there is only one branching to be created at any time. That will do.
Ok, so I just overestimated the power of Combinators::Selection ;-) Wouldn't
it in this case be enough to propagate only when there are no more active
distributors? Maybe it's not so important at the moment, we should just
remember that we have to think about all this again.
--
Guido Tack
Programming Systems Lab
http://www.ps.uni-sb.de/~tack
More information about the gecode-users
mailing list


Mushrooms - P. Cubensis
I'll start off by giving a little bit of a background of myself. I was born and raised in Central Florida, and have been experimenting with mild altering substances for about 5 years (starting at the end of my 9th grade year of High School). I've used many different pharmaceuticals, and have experimented with moderate doses of DXM (600+ mg). I normally smoke pot a couple times a week, and that has been going on for about 2 years. I started smoking pot after my Freshman Year in High School, but until recently I was only smoking a few times a month.
I have taken Psilocybe Mushrooms on 3 different occasions, but I will only be talking about my most recent experience which was two days before this was written. The first time I tried mushrooms I did about 2.5 grams and had a great time, the second time I did around 3 grams and had an even greater time. For that reason, I decided that I wanted to experiment with a higher dose. My cousin (We'll call him N) decided that he had wanted to try mushrooms for his first time with me, so we acquired about 8 grams of dried Psilocybe Cubensis and split it 50/50. To prepare for our trip, I told my cousin to eat a good breakfast in the morning, and to try to eat a light lunch because this tends to help me with the abdominal discomfort that comes after ingesting the mushrooms.
At around 10:30 P.M. we each ingested roughly 4 grams of the mushrooms we acquired earlier that day, and chased the taste down with a glass of lemon juice. I told N that the mushrooms would take roughly an hour and a half to kick in, so we needed to find a way to occupy ourselves for the time being. About 30 minutes after taking the mushrooms I decided to go for a walk with my cousin to pass the time. After walking for about 30 minutes, N and I both started feeling 'Different', and our pupils began to dilate. I told N that the mushrooms would be kicking in full force shortly. We decided then to start heading back to his house before things got too hectic. The walk home was a lot longer than I remembered it being, and I began to sweat a lot. By the time we got home, we still weren't feeling much other than having the giggles, and the 'Bright' look that everything had.
T + 2:15
We decided to watch some TV to pass the time, I was starting to get worried that the mushrooms we had were of low quality because I was still barely feeling anything. I didn't mention that to N at the time because I didn't want to bum him out.
T + 2:45
After sitting around watching TV for another half hour, we decided to smoke a few bowls of 'K2 Pineapple Express Herbal Incense', which we purchased at a local gas station earlier that day. Roughly 10 minutes, and 2 bowls later the mushrooms finally started to kick in full force. The come-up was extremely fast, and it caught N and I by surprise. Within the same minute, N and I had both started peaking, which I found extremely odd. For the next 15 minutes we just sat on the floor and admired the beautiful world that we had just entered. Everything in his room was glowing, and everything that I looked at was made of wonderful tiny colorful patterns. N and I started talking about how much we loved each other, and how awesome it was that we finally got to experience mushrooms together. This lead us to the decision that this moment called for a hug.
T + 3:00
N and I sat around for a while and watched some Dragon Ball Z Kai on TV, and giggled about every little thing that happened. By this time, we were both having a great time, and were very relieved that the mushrooms had finally kicked in. While watching TV I noticed that any time I would look away, the picture from the TV would follow wherever I looked and it seemed as though the picture was still moving even though I wasn't looking at the TV anymore. The colors on the TV seemed brighter, and more saturated than ever. There also seemed to be bubbles floating around the screen, distorting everything that they passed. Everything in the room seemed to be floating in the air as if there was no gravity.
T + 4:00
At this point in the night, I was enjoying the visuals and brilliant colors that the mushrooms had introduced to me. I started to think deeply about the meaning of life (typical right?), and how things work. For what seemed like an eternity, I was trying to figure out how my brain communicated with my lungs/vocal chords/mouth to make me talk, and where personality came from. As much as I thought about it, I could not understand how the human body was capable of such amazing things. I found it very difficult to communicate with anyone other than N, because I thought that any sober person would not understand what I was feeling/thinking. N had a box of 'Airheads' that he bought earlier that week, and gave me a couple to eat. After every bite of the airhead I would say something like 'Best decision of my life' because I felt like they were the best candy I had ever eaten.
T + 5:30
N decided that he wanted to go lay down in bed and enjoy the rest of his trip by listening to his mp3 player and letting his mind wander. I prepared my bed on his floor and watched TV for the rest of the night. While laying down, I thought deeply about how to explain the whole experience in words, but was unsuccessful. The best way that I could describe the experience is to say this:
'The mushrooms don't cause me to see things such as large purple elephants, and talking trees. They basically take the things that I could already see, and give them a new, more brilliant and mysterious look. All the barriers in my mind that I never knew existed are removed, allowing my mind to wander anywhere it wants with no limitations. They also give me a new respect for the human mind, and the amazing world we live in.'
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


A fast visualization tool for creating wordcloud by using 'wordcloud2.js'. 'wordcloud2.js' is a JavaScript library to create wordle presentation on 2D canvas or HTML <https://timdream.org/wordcloud2.js/>.
| Version: | 0.2.1 |
| Depends: | R (≥ 3.1.0) |
| Imports: | htmlwidgets, base64enc, grDevices, graphics |
| Suggests: | knitr, rmarkdown, webshot |
| Enhances: | shiny (≥ 0.12) |
| Published: | 2018-01-03 |
| Author: | Dawei Lang[aut, cre], Guan-tin Chien[aut, author for 'wordcloud2.js'] |
| Maintainer: | Dawei Lang <chiffonlang at icloud.com> |
| BugReports: | https://github.com/lchiffon/wordcloud2/issues |
| License: | GPL-2 |
| URL: | https://github.com/lchiffon/wordcloud2 |
| NeedsCompilation: | no |
| CRAN checks: | wordcloud2 results |
| Reference manual: | wordcloud2.pdf |
| Vignettes: |
Introduction |
| Package source: | wordcloud2_0.2.1.tar.gz |
| Windows binaries: | r-devel: wordcloud2_0.2.1.zip, r-release: wordcloud2_0.2.1.zip, r-oldrel: wordcloud2_0.2.1.zip |
| OS X binaries: | r-release: wordcloud2_0.2.1.tgz, r-oldrel: wordcloud2_0.2.1.tgz |
| Old sources: | wordcloud2 archive |
| Reverse imports: | neuropsychology, TAShiny |
| Reverse suggests: | ggwordcloud, hunspell |
Please use the canonical form https://CRAN.R-project.org/package=wordcloud2 to link to this page.


Intro_Figure.Rmd
rm(list = ls())
library(precision.seq)
library(Biobase)
library(vsn)
library(limma)
library(ggplotify)
The package includes a number of plotting functions for comparing the data distribution and analysis results for the test data (before and after normalization) with these for the benchmark data. These functions take one or more of the following three types of objects: (1) sequencing count data, (2) a single set of differential expression analysis results, and (3) a list of multiple sets of differential expression analysis results, with one set for one normalization method being assessed. Besides the nine normalization methods included in this package, users can also assess additional methods by inputting its associated differential expression analysis results.
## Normalize test data using normalization functions included in the package
test.norm <- pip.norm(raw=data.test, groups=data.group, norm.method = "all")
#> converting counts to integer mode
test.DE <- list(
TMM = DE.voom(RC=test.norm$TMM$dat.normed, groups = data.group),
TC = DE.voom(RC=test.norm$TC$dat.normed, groups = data.group),
UQ = DE.voom(RC=test.norm$UQ$dat.normed, groups = data.group),
med = DE.voom(RC=test.norm$med$dat.normed, groups = data.group),
DESeq = DE.voom(RC=test.norm$DESeq$dat.normed, groups = data.group),
PoissonSeq = DE.voom(RC=test.norm$PoissonSeq$dat.normed, groups = data.group),
QN = DE.voom(RC=test.norm$QN$dat.normed, groups = data.group),
RUVg = DE.voom(RC=data.test, groups = data.group,normalized=FALSE, adjust=test.norm$RUVg$adjust.factor),
RUVs = DE.voom(RC=data.test, groups = data.group,normalized=FALSE, adjust=test.norm$RUVs$adjust.factor),
RUVr = DE.voom(RC=data.test, groups = data.group, normalized=FALSE, adjust=test.norm$RUVr$adjust.factor),
SVA = DE.voom(RC=data.test, groups = data.group,normalized=FALSE, adjust=test.norm$SVA$adjust.factor),
noNorm = DE.voom(RC=data.test, groups = data.group))
benchmark.DE <- DE.voom(RC=data.benchmark, groups = data.group)
Relative log expression plot is the sample-specific boxplots displaying the data deviation of each sample from the median counts across all samples.
fig.RLE(data.test, data.group, "test without normalization")
#> Warning: Removed 367 rows containing non-finite values (stat_boxplot).
Venn diagram is used to compare the differential expression status based on the test data (before or after normalization) with that based on the benchmark data.
fig.venn(benchmark.DE$p.val, test.DE[[1]]$p.val, Pvalue = 0.01)
False Negative Rate (FNR) and False Discovery Rate (FDR) are calculated for the test data (before or after normalization) treating the differential expression status based on the benchmark data as a gold standard. Besides the benchmark-data-based gold standard, users also have the option of inputting an alternative golden standard (in the form of a list of miRNA/marker names). Scatter plot is used to plot the FNRs and FDRs among the normalization methods under study.
fig.FDR_FNR(test.DE, benchmark.DE, title = "")
Concordance at the top plot compares the concordance of the ranking for the differential expression p-values based on the test data (before and after normalization) versus that in the benchmark data.
fig.CAT(test.DE, benchmark.DE, title = "")
Dendrogram clusters the differential expression p-values for various normalization methods applied to the test data.
fig.dendrogram(lapply(test.DE, function(x) x$p.val), title="")


|
|
|
Words:
monkeys
Matching on substrings (partial words/phrases)
TV movies only
|
|
|
|
|
|
| |
|
|
PowerSearch Results
Here are the 5 matching titles:
- Dana Carvey: Squatting Monkeys Tell No Lies (2008) (TV) 6.7/10 (55 votes)
- Monkey, Monkey, Bottle of Beer, How Many Monkeys Have We Here? (1974) (TV)
- Monkeys (1989) (TV) 6.6/10 (5 votes)
- Snow Monkeys (1994) (TV)
- Uncle Gus in: For the Love of Monkeys (1999) (TV)
|


Many aspiring programmers find it hard to choose from the seemingly endless list of programming languages and while it might be nice to hear that most programming concepts carry over from language to language, that doesn't always make it easier when choosing one to learn. Fortunately for you, this tool has been created to be an aid in your programming quest to learn the best language. Below you will take a short quiz where you will enter some basic information about yourself. Then, we will process your answers to generate what we think will be the best language for you.
May the Force be with you!
You should learn C#!
Congratulations! You have found the clear way forward, good luck.
You should learn Ruby!
Congratulations! You have found the clear way forward, good luck.
You should learn Python!
Congratulations! You have found the clear way forward, good luck.


Connecting Livelihoods
Connecting Muga , Eri and Mulberry SILK Handloom Industry Artisans of Northeast India (Assam) to direct income revenue streams
Clusters income
Increase your Market Share Profit
GREAT !
Lets Connect to increase your market share


About TEDx, x = independently organized event
In the spirit of ideas worth spreading, TEDx is a program of local, self-organized events that bring people together to share a TED-like experience. At a TEDx event, TED Talks video and live speakers combine to spark deep discussion and connection. These local, self-organized events are branded TEDx, where x = independently organized TED event. The TED Conference provides general guidance for the TEDx program, but individual TEDx events are self-organized. (Subject to certain rules and regulations.)
About TED
TED is a nonprofit organization devoted to Ideas Worth Spreading. Started as a four-day conference in California 30 years ago, TED has grown to support its mission with multiple initiatives. The two annual TED Conferences invite the world's leading thinkers and doers to speak for 18 minutes or less. Many of these talks are then made available, free, at TED.com. TED speakers have included Bill Gates, Jane Goodall, Elizabeth Gilbert, Sir Richard Branson, Nandan Nilekani, Philippe Starck, Ngozi Okonjo-Iweala, Sal Khan and Daniel Kahneman.
The annual TED Conference takes place each spring in Vancouver, British Columbia. TED's media initiatives include TED.com, where new TED Talks are posted daily; TED Translators, which provides subtitles and interactive transcripts as well as translations from volunteers worldwide; the educational initiative TED-Ed. TED has established The Audacious Project that takes a collaborative approach to funding ideas with the potential to create change at thrilling scale; TEDx, which supports individuals or groups in hosting local, self- organized TED-style events around the world, and the TED Fellows program, helping world-changing innovators from around the globe to amplify the impact of their remarkable projects and activities.
Follow TED on Twitter at https://twitter.com/TEDTalks, or on Facebook at https://www.facebook.com/TED.


--- date: "2019-08-21T10:38:36+02:00" title: Person analyses weight: 12 ---
After cleaning the data, there are three sections of the template that produce tabular, graphic, and cartographic (map) analysis outputs.
This first section produces descriptive analyses about the patients demographics and attack rates.
The person analysis section begins with a couple sentences that contain in-line code - code embedded in normal RMarkdown text (not within an R code chunk). The second sentence in-line code inserts the number of males and females by counting the observations with “Male” and “Female” in the variable sex
. Because our dataset’s variable sex
contains M
and F
instead, we must modify this in-line code (or modify our variable) so the fmt_count()
function is searching for the correct terms.
The first demographic table presents patients by their age group (the table’s rows) and their relationship with the case definition (the table’s columns). This chunk uses piping to link six different functions and produce a table (%>%
is the pipe operator - see the R Basics Advanced and Miscellaneous page):
tab_linelist()
function creates a frequency and percent table of age_group
, with columns differentiating by case_def
valueselect()
function removes an unnecessary column “variable” generated by tab_linelist()
.rename()
function renames the default column “value” as “Age Group”rename_redundant()
function replaces any column name that has proportion with “%”augment_redundant()
command replaces any column name with n with " cases (n)"kable()
command completes the table, in this case with one digit after each decimal# Describe observations by age_group and case_def
tab_linelist(linelist_cleaned,
age_group, strata = case_def,
col_total = TRUE, row_total = TRUE) %>%
select(-variable) %>%
rename("Age group" = value) %>%
rename_redundant("%" = proportion) %>%
augment_redundant(" cases (n)" = " n$") %>%
kable(digits = 1)
| Age group | Confirmed cases (n) | % | Probable cases (n) | % | Suspected cases (n) | % | Missing cases (n) | % | Total |
|---|---|---|---|---|---|---|---|---|---|
| 0-2 | 4 | 4.0 | 0 | 0.0 | 40 | 5.8 | 23 | 3.7 | 67 |
| 3-14 | 30 | 30.3 | 1 | 16.7 | 284 | 40.9 | 320 | 50.9 | 635 |
| 15-29 | 46 | 46.5 | 2 | 33.3 | 246 | 35.4 | 180 | 28.6 | 474 |
| 30-44 | 15 | 15.2 | 2 | 33.3 | 95 | 13.7 | 76 | 12.1 | 188 |
| 45+ | 4 | 4.0 | 1 | 16.7 | 29 | 4.2 | 30 | 4.8 | 64 |
| Total | 99 | 100.0 | 6 | 100.0 | 694 | 100.0 | 629 | 100.0 | 1428 |
You can change the argument strata =
to refer to any number of variables (in this next example, sex
). To show proportions of the total population of observations, add the argument prop_total =
specified as TRUE
, as below.
tab_linelist(linelist_cleaned,
age_group, strata = sex,
col_total = TRUE, row_total = TRUE, prop_total = TRUE) %>%
select(-variable) %>%
rename("Age group" = value) %>%
# rename_redundant("%" = proportion) %>%
augment_redundant(" cases (n)" = " n$") %>%
kable(digits = 1)
| Age group | F cases (n) | F proportion | M cases (n) | M proportion | Total |
|---|---|---|---|---|---|
| 0-2 | 26 | 1.8 | 41 | 2.9 | 67 |
| 3-14 | 222 | 15.5 | 413 | 28.9 | 635 |
| 15-29 | 316 | 22.1 | 158 | 11.1 | 474 |
| 30-44 | 118 | 8.3 | 70 | 4.9 | 188 |
| 45+ | 32 | 2.2 | 32 | 2.2 | 64 |
| Total | 714 | 50.0 | 714 | 50.0 | 1428 |
You can also choose to exclude or edit the in-line code that gives a count of the missing cases by sex and age_group.
To print an age pyramid in your report, use the code below. A few things to note:
split_by =
should have two non-missing value options (e.g. Male or Female, Oui or Non, etc. Three will create a messy output.)legend.position = "bottom"
with “top”, “left”, or “right”You can make this a pyramid of months by supplying age_group_mon
to the age_group =
argument.
# plot age pyramid by sex
plot_age_pyramid(linelist_cleaned,
age_group = "age_group",
split_by = "sex") +
labs(y = "Cases (n)", x = "Age group") + # change axis labels (nb. x/y flip)
theme(legend.position = "bottom", # move legend to bottom
legend.title = element_blank(), # remove title
text = element_text(size = 18) # change text size
)
To have an age pyramid of patients under 2 by month age groups, it is best to add a filter()
step to the beginning of the code chunk, as below. This selects for linelist_cleaned
observations that meet the specified critera and passes that reduced dataset through the “pipes” to the next function: (plot_age_pyramid()
). If this filter()
step is not added, you will see that the largest pyramid bars are of “missing”. These are the patients old enough to not have a months age group.
If you add this filtering step, you must also modify plot_age_pyramid()
by removing its first argument linelist_cleaned,
. The dataset is already given to the command in the filter()
and is passed to plot_age_pyramid()
via piping.
Note that the filter step does not drop any observations from the linelist_cleaned
object itself. Because the filter is not being assigned (<-
) to over-write linelist_cleaned
, this filter is only temporarily applied for the purpose of producing the age pyramid.
# plot age pyramid by month groups, for observations under 2 years
filter(linelist_cleaned, age_years <= 2) %>%
plot_age_pyramid(age_group = "age_group_mon",
split_by = "sex") +
# stack_by = "case_def") +
labs(y = "Cases (n)", x = "Age group (months)") + # change axis labels (nb. x/y flip)
theme(legend.position = "bottom", # move legend to bottom
legend.title = element_blank(), # remove title
text = element_text(size = 18) # change text size
)
The text following the age pyramids uses in-line code to describe the distribution of outpatient and inpatient observations, and descriptive statistics of the length of stay for inpatients. The Am Timan dataset does not have length of stay, so it is best to delete those related sentences related to obs_days
for the final report.
This next code also uses the tab_linelist()
function to create descriptive tables of all the variables that were included in the SYMPTOMS
variable list.
tab_linelist()
function, SYMPTOMS
(the value supplied to the second argument) is an object we defined in data cleaning that is a list of variables to tabulate. If this code produces an error about an “Unknown column”, ensure that the variables in the object SYMPTOMS
are all present in your dataset (and spelled correctly).tab_linelist()
, the argument keep =
must represent the character value to be counted for the the table. As these Am Timan variables are still in French, we change keep = "Yes"
to keep = "Oui"
.mutate()
function is aesthetically changing variable names with underscores to spaces.# get counts and proportions for all variables named in SYMPTOMS
tab_linelist(linelist_cleaned, SYMPTOMS, keep = "Oui") %>%
select(-value) %>%
# fix the way symptom names are displayed
mutate(variable = str_to_sentence(str_replace_all(variable, "_", " "))) %>%
# rename accordingly
rename_redundant("%" = proportion) %>%
augment_redundant(" (n)" = " n$") %>%
kable(digits = 1)
| variable | n | % |
|---|---|---|
| Generalized itch | 512 | 64.6 |
| Fever | 668 | 84.0 |
| Joint pains | 240 | 30.5 |
| Epigastric pain heartburn | 469 | 59.2 |
| Nausea anorexia | 425 | 53.5 |
| Vomiting | 457 | 57.6 |
| Diarrhoea | 112 | 14.2 |
| Bleeding | 52 | 6.6 |
| Headache | 633 | 80.0 |
The code for the lab table is very similar, but has this difference:
tab_linelist()
command, transpose = "value"
is set because the values in the lab data are important in-and-of themselves (e.g. IgM+/IgG-, etc.) - i.e. the values should become column headers.{{% notice tip %}} This table may be large and unwieldy at first, until you clean your data. The step in data cleaning where we converted 0, 1, “yes”, “pos”, “neg”, etc. to standardized “Positive” and “Negative” was crucial towards making this table readable. Once knitted into a word document, you will likely need to adjust the font size, column widths, etc. {{% /notice %}}
# get counts and proportions for all variables named in LABS
tab_linelist(linelist_cleaned, LABS,
transpose = "value") %>%
# fix the way lab test names are displayed
mutate(variable = str_to_sentence(str_replace_all(variable, "_", " "))) %>%
# rename accordingly
rename("Lab test" = variable) %>%
rename_redundant("%" = proportion) %>%
augment_redundant(" (n)" = " n$") %>%
kable(digits = 1)
| Lab test | Negative (n) | % | Positive (n) | % | IgG-/IgM- (n) | % | IgG-/IgM+ (n) | % | IgG+/IgM- (n) | % | IgG+/IgM+ (n) | % | IgG±/IgM- (n) | % |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Hep b rdt | 222 | 91.7 | 20 | 8.3 | - | - | - | - | - | - | - | - | - | - |
| Hep c rdt | 239 | 99.2 | 2 | 0.8 | - | - | - | - | - | - | - | - | - | - |
| Hep e rdt | 149 | 59.8 | 100 | 40.2 | - | - | - | - | - | - | - | - | - | - |
| Test hepatitis a | 23 | 100.0 | - | - | - | - | - | - | - | - | - | - | - | - |
| Test hepatitis b | 22 | 95.7 | 1 | 4.3 | - | - | - | - | - | - | - | - | - | - |
| Test hepatitis c | 23 | 100.0 | - | - | - | - | - | - | - | - | - | - | - | - |
| Test hepatitis e igm | 21 | 33.9 | 41 | 66.1 | - | - | - | - | - | - | - | - | - | - |
| Test hepatitis e genotype | - | - | 2 | 100.0 | - | - | - | - | - | - | - | - | - | - |
| Test hepatitis e virus | 7 | 11.3 | 1 | 1.6 | 9 | 14.5 | 14 | 22.6 | 5 | 8.1 | 26 | 41.9 | - | - |
| Malaria rdt at admission | 160 | 63.5 | 92 | 36.5 | - | - | - | - | - | - | - | - | - | - |
| Dengue | - | - | - | - | 12 | 52.2 | - | - | 10 | 43.5 | - | - | 1 | 4.3 |
| Yellow fever | - | - | - | - | 18 | 78.3 | - | - | 5 | 21.7 | - | - | - | - |
| Chikungunya onyongnyong | - | - | - | - | 20 | 87.0 | - | - | 3 | 13.0 | - | - | - | - |
| Other arthropod transmitted virus | 23 | 100.0 | - | - | - | - | - | - | - | - | - | - | - | - |
The opening text of this chunk with in-line code must be edited to match our Am Timan data. The second in-line code references the variable exit_status
- this must now reference the variable exit_status2
. Also, we do not have Dead on Arrival recorded in our dataset, so that part of the sentence should be deleted.
Likewise, the code section on time-to-death does not apply to our dataset and should be deleted.
Overall CFR is produced with the code below. Note the following:
patient_facility_type
, that it has a value “Inpatient”, and the DIED
variable.rename()
is used to change the column labels in the table# use arguments from above to produce overal CFR
overall_cfr <- linelist_cleaned %>%
filter(patient_facility_type == "Inpatient") %>%
case_fatality_rate_df(deaths = DIED, mergeCI = TRUE) %>%
rename("Deaths" = deaths,
"Cases" = population,
"CFR (%)" = cfr,
"95%CI" = ci)
knitr::kable(overall_cfr, digits = 1) # print nicely with 1 decimal digit
| Deaths | Cases | CFR (%) | 95%CI |
|---|---|---|---|
| 13 | 86 | 15.1 | (9.05–24.16) |
The next code adds arguments to case_fatality_rate_df()
such as group = sex
(which stratified the CFR by sex), and add_total = TRUE
(which makes a total row across the sex groups).
linelist_cleaned %>%
filter(patient_facility_type == "Inpatient") %>%
mutate(sex = forcats::fct_explicit_na(sex, "-")) %>%
case_fatality_rate_df(deaths = DIED, group = sex, mergeCI = TRUE, add_total = TRUE) %>%
rename("Sex" = sex,
"Deaths" = deaths,
"Cases" = population,
"CFR (%)" = cfr,
"95%CI" = ci) %>%
knitr::kable(digits = 1)
| Sex | Deaths | Cases | CFR (%) | 95%CI |
|---|---|---|---|---|
| F | 11 | 55 | 20.0 | (11.55–32.36) |
| M | 2 | 31 | 6.5 | (1.79–20.72) |
| Total | 13 | 86 | 15.1 | (9.05–24.16) |
When creating a table of CFR by age groups, one additional step, using the function complete()
is required to ensure that all age_group
levels are shown even if they have no observations.
linelist_cleaned %>%
filter(patient_facility_type == "Inpatient") %>%
case_fatality_rate_df(deaths = DIED, group = age_group, mergeCI = TRUE, add_total = TRUE) %>%
tidyr::complete(age_group,
fill = list(deaths = 0,
population = 0,
cfr = 0,
ci = 0)) %>% # Ensure all levels are represented
rename("Age group" = age_group,
"Deaths" = deaths,
"Cases" = population,
"CFR (%)" = cfr,
"95%CI" = ci) %>%
knitr::kable(digits = 1)
| Age group | Deaths | Cases | CFR (%) | 95%CI |
|---|---|---|---|---|
| 0-2 | 4 | 11 | 36.4 | (15.17–64.62) |
| 3-14 | 1 | 17 | 5.9 | (1.05–26.98) |
| 15-29 | 5 | 36 | 13.9 | (6.08–28.66) |
| 30-44 | 2 | 17 | 11.8 | (3.29–34.34) |
| 45+ | 1 | 4 | 25.0 | (4.56–69.94) |
| (Missing) | 0 | 1 | 0.0 | (0.00–79.35) |
| Total | 13 | 86 | 15.1 | (9.05–24.16) |
The commented code below examines CFR by case definition. Note that this is dependant upon our working case_def
variable.
# Use if you have enough confirmed cases for comparative analysis
linelist_cleaned %>%
filter(patient_facility_type == "Inpatient") %>%
case_fatality_rate_df(deaths = DIED, group = case_def, mergeCI = TRUE, add_total = TRUE) %>%
rename("Case definition" = case_def,
"Deaths" = deaths,
"Cases" = population,
"CFR (%)" = cfr,
"95%CI" = ci) %>%
knitr::kable(digits = 1)
| Case definition | Deaths | Cases | CFR (%) | 95%CI |
|---|---|---|---|---|
| Confirmed | 8 | 44 | 18.2 | (9.51–31.96) |
| Suspected | 5 | 42 | 11.9 | (5.19–25.00) |
| Total | 13 | 86 | 15.1 | (9.05–24.16) |
To use the attack rate section, we need to modify the first code slightly. An object population
is created from the sum of population counts in the population figures. Because we only imported region-based population counts, we must change this command to reflect that we do not have population_data_age
, but rather population_data_region
.
# OLD command from template
# population <- sum(population_data_age$population)
Running the correct command and printing the value of population, we see that the sum population across regions is estimated to be 62336.
# CORRECTED command for Am Timan exercise
population <- sum(population_data_region$population)
population
## [1] 62336
The first line of code below creates a multi-part object ar
with the number of cases, population, attack rate per 10,000, and lower and upper confidence intervals (you can run just this line to verify yourself). The subsequent commands alter the aesthetics of to produce a neat table with appropriate column names.
# calculate the attack rate information and store them in object "ar""
ar <- attack_rate(nrow(linelist_cleaned), population, multiplier = 10000)
# Create table from the information in the object "ar""
ar %>%
merge_ci_df(e = 3) %>% # merge the lower and upper CI into one column
rename("Cases (n)" = cases,
"Population" = population,
"AR (per 10,000)" = ar,
"95%CI" = ci) %>%
select(-Population) %>% # drop the population column as it is not changing
knitr::kable(digits = 1, align = "r")
| Cases (n) | AR (per 10,000) | 95%CI |
|---|---|---|
| 1436 | 230.4 | (218.88–242.44) |
We are unable to calculate the attack rate by age group, because we do not have population counts for each age group. Comment out (#) this code.
Mortality attributable to AJS is also not appropriate for this example. Comment out (#) the 4 related code chunks.


Dgame.Graphics.RendererTexture
- struct RendererTexture;
- version = Develop;
This is a wrapper for the hardware acceleration of SDL_Surfaces, called SDL_Textures.
That means it is the same as if you use the HW_ACCEL Flag in SDL 1.2.
Author:
rschuett
- enum Access: int;
- Supported Access modes
- Static
- changes rarely, not lockable
- Stream
- changes frequently, lockable
- this(SDL_Texture* tex, Access access);
- CTor
- void free();
- Destroy the RendererTexture and all which are linked to this.
- int[2] getSize();
- Returns a two dimensional array filled with the width and the height
- @property ushort width();
- Returns the width
- @property ushort height();
- Returns the width
- const pure nothrow bool isLockable();
- Checks whether this Surface is lockable and therefore accessable.
- void* lock(out int pitch, const ShortRect* area = null);
- Use this function to lock a portion of the texture for write-only pixel access.
Returns the pixel data of given area.
If area is null, the whole pixel data returns.
- void unlock();
- Use this function to unlock a texture, uploading the changes to video memory, if needed.
- inout @property inout(SDL_Texture)* ptr();
- Returns a pointer of the SDL_Texture* struct.
- const pure nothrow bool isValid();
- Checks whether the RendererTexture is valid.
- void update(const void* pixels, const ShortRect* rect = null, int pitch = -1);
- Use this function to update the given texture rectangle with new pixel data.
- void copy(ref RendererTexture hw, const ShortRect* rect);
- Copy hw onto this RendererTexture. rect is the position and size.
- void copy(ref Surface srfc, ShortRect* rect);
- Copy srfc onto this RendererTexture. rect is the position and size.
- void setBlendMode(Renderer.BlendMode bmode);
- Use this function to set the blend mode for a texture, used by 'copy'.
- Renderer.BlendMode getBlendMode();
- Use this function to get the blend mode used for texture copy operations.
- void setAlphaMod(ubyte alpha);
- Use this function to set an additional alpha value multiplied into render copy operations.
- ubyte getAlphaMod();
- Use this function to get the additional alpha value multiplied into render copy operations.
- void setColorMod(ref const Color col);
- Use this function to set an additional color value multiplied into render copy operations.
- void setColorMod(const Color col);
- Rvalue version
- void setColorMod(ubyte r, ubyte g, ubyte b);
- Use this function to set an additional color value multiplied into render copy operations.
- Color getColorMod();
- Use this function to get the additional color value multiplied into render copy operations
Page generated by Ddoc.


| Modifier and Type | Constant Field | Value |
|---|---|---|
public static final boolean |
DEBUG |
true |
| Modifier and Type | Constant Field | Value |
|---|---|---|
private static final int |
INVALID_POINTER_ID |
-1 |
| Modifier and Type | Constant Field | Value |
|---|---|---|
private static final int |
INVALID_POINTER_ID |
-1 |
| Modifier and Type | Constant Field | Value |
|---|---|---|
public static final int |
directions_values |
2131099648 |
| Modifier and Type | Constant Field | Value |
|---|---|---|
public static final int |
activity_horizontal_margin |
2130968576 |
public static final int |
activity_vertical_margin |
2130968577 |
| Modifier and Type | Constant Field | Value |
|---|---|---|
public static final int |
ic_launcher |
2130837504 |
public static final int |
pinguin |
2130837505 |
public static final int |
yoshi |
2130837506 |
| Modifier and Type | Constant Field | Value |
|---|---|---|
public static final int |
action_interest |
2131296275 |
public static final int |
action_io |
2131296276 |
public static final int |
action_load |
2131296278 |
public static final int |
action_menu |
2131296279 |
public static final int |
action_room |
2131296274 |
public static final int |
action_save |
2131296277 |
public static final int |
from_direction |
2131296268 |
public static final int |
from_room |
2131296269 |
public static final int |
interest_name |
2131296264 |
public static final int |
interest_room |
2131296266 |
public static final int |
label_from |
2131296267 |
public static final int |
label_interest |
2131296263 |
public static final int |
label_room |
2131296265 |
public static final int |
label_to |
2131296270 |
public static final int |
linearLayout |
2131296256 |
public static final int |
linearLayoutGame |
2131296258 |
public static final int |
menu_item_share |
2131296280 |
public static final int |
menu_main_button_builder |
2131296259 |
public static final int |
menu_main_button_game |
2131296260 |
public static final int |
menu_main_button_quit |
2131296262 |
public static final int |
menu_main_button_share |
2131296261 |
public static final int |
RotateSwitch |
2131296257 |
public static final int |
to_direction |
2131296271 |
public static final int |
to_room |
2131296272 |
public static final int |
two_way |
2131296273 |
| Modifier and Type | Constant Field | Value |
|---|---|---|
public static final int |
activity_builder |
2130903040 |
public static final int |
activity_game |
2130903041 |
public static final int |
activity_menu_main |
2130903042 |
public static final int |
dialog_new_interest |
2130903043 |
public static final int |
dialog_new_io |
2130903044 |
| Modifier and Type | Constant Field | Value |
|---|---|---|
public static final int |
builder |
2131230720 |
public static final int |
game |
2131230721 |
public static final int |
menu_main |
2131230722 |
| Modifier and Type | Constant Field | Value |
|---|---|---|
public static final int |
action_settings |
2131034113 |
public static final int |
app_name |
2131034112 |
public static final int |
builder_interest_error |
2131034149 |
public static final int |
builder_interest_label_name |
2131034147 |
public static final int |
builder_interest_label_room |
2131034148 |
public static final int |
builder_io_error |
2131034145 |
public static final int |
builder_io_label_from |
2131034141 |
public static final int |
builder_io_label_to |
2131034142 |
public static final int |
builder_io_label_two_way |
2131034143 |
public static final int |
builder_io_not_enough_room |
2131034140 |
public static final int |
builder_io_same_room |
2131034144 |
public static final int |
builder_load_level_error |
2131034133 |
public static final int |
builder_load_level_nok |
2131034132 |
public static final int |
builder_load_level_ok |
2131034131 |
public static final int |
builder_menu_interest |
2131034121 |
public static final int |
builder_menu_io |
2131034122 |
public static final int |
builder_menu_load |
2131034124 |
public static final int |
builder_menu_menu |
2131034125 |
public static final int |
builder_menu_room |
2131034120 |
public static final int |
builder_menu_save |
2131034123 |
public static final int |
builder_room_already_referenced |
2131034139 |
public static final int |
builder_room_error |
2131034138 |
public static final int |
builder_room_name |
2131034134 |
public static final int |
builder_room_name_empty |
2131034137 |
public static final int |
builder_room_nok |
2131034136 |
public static final int |
builder_room_ok |
2131034135 |
public static final int |
builder_save_level_error |
2131034130 |
public static final int |
builder_save_level_name |
2131034126 |
public static final int |
builder_save_level_name_empty |
2131034129 |
public static final int |
builder_save_level_nok |
2131034128 |
public static final int |
builder_save_level_ok |
2131034127 |
public static final int |
builder_switch_rotation |
2131034146 |
public static final int |
builder_title |
2131034119 |
public static final int |
hello_world |
2131034153 |
public static final int |
menu_main_button_builder |
2131034115 |
public static final int |
menu_main_button_game |
2131034116 |
public static final int |
menu_main_button_quit |
2131034118 |
public static final int |
menu_main_button_share |
2131034117 |
public static final int |
menu_main_share |
2131034150 |
public static final int |
menu_main_share_error |
2131034151 |
public static final int |
menu_main_title |
2131034114 |
public static final int |
title_activity_game |
2131034152 |
| Modifier and Type | Constant Field | Value |
|---|---|---|
public static final int |
AppBaseTheme |
2131165184 |
public static final int |
AppTheme |
2131165185 |
| Modifier and Type | Constant Field | Value |
|---|---|---|
public static final int |
EAST |
4 |
public static final java.lang.String |
EAST_STR |
"east" |
public static final int |
NORTH |
0 |
public static final java.lang.String |
NORTH_STR |
"north" |
public static final int |
SOUTH |
1 |
public static final java.lang.String |
SOUTH_STR |
"south" |
public static final int |
WEST |
2 |
public static final java.lang.String |
WEST_STR |
"west" |
| Modifier and Type | Constant Field | Value |
|---|---|---|
protected static final float |
PRESSURE_THRESHOLD |
0.6700000166893005f |


Must be ran off a web server since AJAX is used to fetch existing data, which must be in the same directory.
Could not load one or more files. Make sure all files in res exist and that datagen.html is in the same folder.
| Label | Probs |
|---|
Use the buttons in the right hand columns to fill in a selected person into a specific position in the new relationship form below.
| Name | Occupation |
|---|
| Type | From | To |
|---|