The Marti application is a platform where you can process and visualize data using drag and drop coding cards. When you open the application, you will see the following interface.
While processing data with Marti, you can drag the coding card blocks you see in the Blocks area to the coding area to open the cards. For example, when we drag and drop the Define variable card into the Coding field, two spaces will open where you can enter "Name" and "Value".
You can quickly navigate between the blocks by clicking the icons you see in the category area. Each category also lets you navigate between different Output tabs. For example, if you are going to open a file, you will see the values in that file in the "File" tab in the Output area. If you want to draw a chart, you will see it in the "Visualization" tab.
Let's get acquainted with the data collection, processing, and visualization mechanisms of Marti with an example activity.
In this activity, you will learn how different types of data collected in the classroom can be expressed and visualized with the Marti application. Throughout the activity, you will see how different mathematical operations can be used to play with data and their possible applications in Seagull.
The table below shows some of the data collected as a result of a classroom survey.
Name |
Age |
Gender |
Favorite Color |
Ahmet |
9 |
Boy |
Green |
Leyla |
10 |
Girl |
Orange |
Cansu |
9 |
Girl |
Green |
Hakan |
10 |
Boy |
Orange |
... |
... |
... |
... |
This table aims to show the trend in the students' favorite colors according to their age and gender distribution. I wonder if age or gender has an impact when choosing a favorite color, or is it completely irrelevant?
When we analyze the table according to age and gender, we notice that no particular color preference is observed according to gender. However, while 9-year-old students preferred the color green, 10-year-old students preferred the color orange.
But according to the results of this survey, can we say that all 9-year-old children in Turkey prefer the color green? Of course, we cannot claim this. The community we present the survey to consists of very few people, and they are all in the same class, so they are susceptible to being influenced by each other.
To obtain a scalable survey result, the data must be distributed dispersedly among the area the survey is to be conducted in and applied to enough people to make the scalability of the results reasonable.
Now, in the activity we will be doing, we will fill a similar table for our class. We will learn how to do basic data operations and reflect the results of different data types with the Marti application.
Let's draw a table with columns for name, age, gender, and favorite color on a blank sheet of paper. (You can also use the sample data collection page to which you will be directed when the button below is clicked. Instead of collecting data for "Favorite Color" data, you can ask questions that may be of more interest to the class, such as data for "Pet", "Favorite Sport").
Let's fill in the table we prepared by interviewing our classmates.
Depending on what we want to do with the collected data, we can save our table in two different ways:
We can store each column in the table using a separate variable. A variable is a symbol we define to store the data we have and use it in the programming environment. To define a variable in the Marti interface, let's drag the Define Variable box to the coding area. Let's define a variable called "class colors" to define the class's favorite colors:
The figure above shows the moment we save the colors in our example table to the variable. When we click the Save button, a confirmation text will appear at the bottom of the screen. If this confirmation box says that the defined variable is saved, then everything is fine.
What should we do if we want to save data like names, lucky numbers, and cities along with the color data?
If we want to transfer the entire table we have created to Marti altogether, let's drag the Create Table block from the File category to the coding area.
When we want to create a table, the first line we need to fill out is the title, which defines the data in the table. The title and all the data we have filled out should be separated by commas (,). In the example above, the names, favorite colors, the cities of birth, and numbers of a group of four were recorded.
With the "Create Table" coding card, we can use the "Draw Graph from Table" command to instantly see the data we have recorded. With Marti, we can visualize three types of data: Line, Circle (pie), and Column (bar)
Showing the relationship between Age and Height with a line or bar graph can be a suitable way to show how height changes as age increases. To try the line chart, first, select the "line" chart from the selection menu. Then, enter a title that clearly describes the chart so that other people understand it when they see it.
You can choose the "bar" chart instead of the line chart on the coding card to quickly change the type of the chart.
Data Visualization Using Variables
When there are two columns in the table, we can use the Make Graph from Chart card to visualize data quickly. When the table has more columns or when we want to include different variables, the Draw Graph with Variable card will help us.
Using the card, we can draw either one of the line charts, pie charts, or bar charts in 4 steps.
All the examples we have given so far have covered the visualization of numeric values. The data visualization method we choose depends on what type of data we are transferring. For example, if we have cities in our dataset, it might make sense to show our data on a map. If we want to show the distribution of favorite colors according to cities, we can do this in an eye-catching manner by painting these cities in that particular color.
Data visualization can be a very powerful tool when used correctly. It can rapidly convey data that requires very long readings and analyses. By using different materials and different visualization tools, we can reflect this power in our classrooms. We can encourage students to prepare posters that will both develop their creativity and explain data science to the community we live in.
In order to support the diversity of data visualization, we will also grasp how we can develop different visualizations with different materials, starting with the Marti interface.
Let's start with some basic information on electronics;
This simple circuit you will probably remember from your science class consists of a battery that provides electrical energy, a light bulb, and a switch that switches the light on and off. Our electronic circuit, with its sliding button used to show change according to the number of years, solely comprises of these objects. The final product will work as follows:
The orange button will act as a switch that completes electricity from the positive (+) end so that when the button is slid for a certain period of time, the lights will turn on as we pass the empty spaces.
For this, let's stick the LED on the back of the page with copper wires that serve to prolong the circuit:
We can use this simple circuit to observe the changes of a particular country over one year. So, what can be done when we want to convey a change not solely over a single year but for many years?
As an example activity, let's visualize the relationship between the extent of the forest areas and of the surface area of a country over many years.
In this activity, we will explore how we can show the top 100 potential players in FIFA18 with the desired features on the map. We will learn about data, analysis methods, visualization techniques, and presenting data for different problems.
In each row of the downloaded data set, there is the name, age, country, club information and the score and potential information calculated based on the performance of the football players.
Name |
Age |
Country |
Point |
Potential |
Club |
C. Ronaldo |
34 |
Portugal |
94 |
94 |
Real Madrid CF |
L. Messi |
30 |
Argentina |
93 |
93 |
FC Barcelona |
F. Muslera |
31 |
Uruguay |
82 |
82 |
Galatasaray SK |
M. Neuer |
31 |
Germany |
92 |
92 |
FC Bayern Munich |
R. Lewandowski |
28 |
Poland |
91 |
91 |
FC Bayern Munich |
E. Hazard |
26 |
Belgium |
90 |
91 |
Chelsea |
... ... |
... |
... |
... |
... |
... |
(The table above shows some of the player data. If we shared all the data here, it would take up more than 10 pages)
Dataset Click the "Datasets" button in the navigation area in the upper right corner of the Marti application.
On the site we have entered, you can find different data sets that we will use for the following activities. To download player data, click on the link on the card titled "FIFA18 Football Players." We can use this data by dragging the File > "Select CSV File from Computer" card to the coding area. Next, click on the "Select File" button. After clicking the button and selecting the file, you can view the data in the file you have opened in the Output Area.
Alternatively, you can copy the link of the source CSV file and use this link in the "Open CSV via link" card.
By programming, we can perform many operations in simpler ways. For example, let's say that we are curious about the average age of players coming from different countries, and we want to illustrate our results by using a graph.
Name |
Age |
Country |
Point |
Potential |
Club |
C. Ronaldo |
34 |
Portugal |
94 |
94 |
Real Madrid CF |
L. Messi |
30 |
Argentina |
93 |
93 |
FC Barcelona |
Bruno Fernandes |
34 |
Portugal |
78 |
85 |
Sporting CP |
P. Dybala |
23 |
Argentina |
88 |
93 |
Juventus |
K. De Bruyne |
26 |
Belgium |
89 |
92 |
Manchester City |
T. Courtois |
25 |
Belgium |
89 |
92 |
Chelsea |
It is possible to identify players over the age of 29 from a six-line table and draw a graph using this information. But how long would it take to make this chart for a list of 100 players? Or how many minutes would this process take if there were 10000 players on the table?
For such problems, we can make our job easier by writing a small piece of code. During this activity, we will perform this operation on our 100-player dataset by using the programming interface on the site we have opened.
We can filter data using a conditional operation by dragging the "Filter the Table" card to the coding area. The filtering process resembles the working mechanism of a tea strainer. Just like we want the tea sprouts to remain in the tea strainer and the flavored water to pass through, we enter the data which we hope will "pass through" in the filtering process.
We first need to select a table in the card we left in the coding area. When we open the football player file, the Marti application saves this file with its name. To filter a specific table, we need to select its name.
After selecting the table, we must write a comparison function. As a result of this function, a selection will be made according to the columns features. For example, in the comparison function above, we're trying to find the rows that are equal to "Argentina" in the country block. We can quickly find that there are two Argentine football players in this dataset: Messi and Dybala.
Moving on to a different example, let's try to get a list of football players whose age is over 30. In this case, we need to choose "age" as the column. Then we choose the operation greater than and choose 30 as the value that will be compared to.
At the end of each operation, there happens to be a button at the bottom of the output area which saves this data. If you want to use the filtered table in the future, you can click this "save" button and save the result.
We can click the save button and write "Footballers over 30" in the input field that will appear. Now, we can use this table in the operations we want to do later on.
We select Select Column from the Blocks and drag it to the coding area. We choose the variable we have saved in the card and specify that we want to use the country column. I also save the countries' names in the selected column as variables.
When you click on Map among the categories, you will see the map and the blocks related to it in the visualization area. To mark it, drag the Add Marker block from the map section.
Let's find the saved name of the column we had selected in the Add Sign block and click the Apply button.
In this activity we will design a physics experiment using our phones. Our phones allow us to record physical changes happening in our environment thanks to their sensors. Now, we will measure the intervals of the balls sound hitting the phone's microphone and the air resistance that is developed against different materials.
Data: Information collected to use during research or to solve a problem
In the activity, depending on the time intervals, we will collect data about the when the crashing sound occurred for the each item in the table below:
Tennis Ball |
Cushion Ball |
Elastic Ball |
|||
Distance |
Elapsed Time |
Sound Intensity |
Time |
Sound Intensity |
Time |
Thanks to the data in the table and the information obtained from previous studies, we can easily calculate the air resistance that the ball came across.
When we release a ball without applying any additional force, its velocity and height change every second as follows:
height (m) = 0.5 x gravitational acceleration (m/s2) x time2 (s)
velocity (m/s) = gravitational acceleration (m/s) s2) x seconds (s)
According to these formulas, if 3 seconds pass from the time a ball is released to the time it hits the ground, that ball has been dropped from a height of 45 meters. In this formula, we do not see a parameter depending on the mass. In other words, we should expect a feather and an iron ball dropped from a height of 45 meters to fall on the surface at the exact same time. But it is impossible to witness such a thing in our daily life. This is because in an environment filled with air, light and flat objects like feathers, are weak against a lot of air resistance.
At the YouTube link below, you can find an experiment of a feather and an iron ball that has been dropped simultaneously in a completely air-free environment. The video link takes you right to the beginning of the attempt. As soon as you open it, the experiment will start, so watch carefully:
Now that we can confide in the formulas, we can start our activity to calculate air resistance by coding:
Download Phyphox Application to Your Phone In
In this activity, we will collect data with the assistance of our phones. After downloading the Phyphox application to our phone, let's watch the video at the following link:
https://www.youtube.com/watch?v=zRGh9_a1J7s
Let's save the data we have collected through the table identification card. If we do not have the necessary means to collect data, we can use the table below.
Distance |
Drawdown Initial |
Drawdown End |
Time elapsed over distance
Show the calculations you have made in the following spaces:


Scenarios of real-world use cases of different scenarios of multiple users (person with diabetes, doctor from clinic, researcher) in the same environment. The backend is refered to as a Health Data Store (HDS).


Litters
All parents are
OFA certified hips,
OFA certified elbows,
cardiologist certified, and ophthalmologist certified.
To see the parents' pedigrees, go to
K9data.com,
and type in the dog's registered name in the searchbox.
Now you can find pedigrees of the litters if you follow the link next to a litter, and relevent links about the parents next to parents (such as K9Data or the dog's homepage).
Litter born March 27, 2008: Pedigree
Litter: Two females; medium gold.
Sire: Windrush's Desert Storm CD SH WCX CCA Tank K9Data
Dam: Sunfire's Rocky MT Chickadee Chickie K9Data
Note: All shades of gold, all willing to work or be best friends, companions. Strong field and obedience pedigree, and should be good looking.
Litter born March 11, 2008: Pedigree
Litter: Five males and three females; light to medium gold.
Co-owners: Barbara Biewer and Claudette Beauleau
Sire: Comstock's Cool Cullen Cullen K9Data
Dam: Sunsplash Sunfire Time Flies Belle K9Data
Note: These should be attractive, active companions, very pretty, blonde, some darker. There is excellent potential for obedience and agility in this pedigree.
Litter born March 6, 2008: Pedigree
Litter: Four males and two females; medium to dark gold.
Sire: Sunfire's Causing a Ripple Ripple K9Data
Dam: Sunfire's Rainier Lux OD Lux K9Data
Note: These should be all around versatile competition dogs, for field, obedience, or agility.
Litter born July 10, 2007: Pedigree
Litter: Three males and seven females; medium gold.
Co-owners: Barbara Biewer and Demi Osborn
Sire: Sunfire Rainier Submersible Scuba K9Data
Dam: Sunfire's Chim Chim Cher-ee Shimmer K9Data
Note: They should be good competitors in obediece and field. One female available.
Litter born June 20, 2007: Pedigree
Litter: Three males and one female; medium to dark gold.
Sire: Sunfire's Quicksand JH, WC Speedy K9Data
Dam: Sunfire's Lilly of the Valley Hannah K9Data
Note: They should be good competitors in obediece and field. One male available.
|


|
Bitstream Interpretation Library (BIL)
0.1
|
Contains definition of text message constants for xdlcmp. More...
#include <test/xdlcmp/xdlcmpMsgs.hpp>
Go to the source code of this file.
Variables | |
| const char *const | SPLASH_MSG = "xdlcmp version 0.1\nCopyright (c) 2011 Florian Benz\n\n" |
| const char *const | READING_REFERENCE_XDL_MSG = "Reading reference XDL file...\n" |
| const char *const | READING_TEST_XDL_MSG = "\nReading test XDL file...\n" |
| const char *const | PARSING_XDL_HEADER_MSG = "Parsing XDL header...\n" |
| const char *const | LOADING_DEVICE1_MSG = "Loading device " |
| const char *const | LOADING_DEVICE2_MSG = "... \n" |
| const char *const | PARSING_XDL_MSG = "Parsing XDL...\n" |
| const char *const | COMPARING_MSG = "\nComparing...\n" |
| const char *const | FINISHED_MSG = "\nFinished.\n" |
| const char *const | INFO_MSG = "xdlcmp: Reads in two XDL files and compares them.\n\n" |
| const char *const | ERROR_MSG = "Error: " |
| const char *const | ERROR_UNKNOWN_MSG = "Unknown error occurred.\n" |
| const char *const | ERROR_TOO_MANY_PARAMETERS_MSG = "Too many parameters!" |
| const char *const | ERROR_UNKNOWN_OPTION_1_MSG = "Unknown option \"" |
| const char *const | ERROR_UNKNOWN_OPTION_2_MSG = "\"!" |
| const char *const | ERROR_NO_REFXDL_FILE_MSG = "No input reference XDL file specified!" |
| const char *const | ERROR_NO_TESTXDL_FILE_MSG = "No input test XDL file specified!" |
| const char *const | ERROR_NO_REPORT_FILE_MSG = "No output report file specified!" |
| const char *const | ERROR_NO_DATAPATH_MSG = "No data path given!" |
| const char *const | DEVICE_FILE_EXT = ".dev" |
| const char *const | REPORT_FILE_EXT = ".txt" |
Contains definition of text message constants for xdlcmp.
Definition in file xdlcmpMsgs.cpp.
| const char* const SPLASH_MSG = "xdlcmp version 0.1\nCopyright (c) 2011 Florian Benz\n\n" |
Definition at line 9 of file xdlcmpMsgs.cpp.
| const char* const READING_REFERENCE_XDL_MSG = "Reading reference XDL file...\n" |
Definition at line 12 of file xdlcmpMsgs.cpp.
| const char* const READING_TEST_XDL_MSG = "\nReading test XDL file...\n" |
Definition at line 15 of file xdlcmpMsgs.cpp.
| const char* const PARSING_XDL_HEADER_MSG = "Parsing XDL header...\n" |
Definition at line 18 of file xdlcmpMsgs.cpp.
| const char* const LOADING_DEVICE1_MSG = "Loading device " |
Definition at line 21 of file xdlcmpMsgs.cpp.
| const char* const LOADING_DEVICE2_MSG = "... \n" |
Definition at line 24 of file xdlcmpMsgs.cpp.
| const char* const PARSING_XDL_MSG = "Parsing XDL...\n" |
Definition at line 27 of file xdlcmpMsgs.cpp.
| const char* const COMPARING_MSG = "\nComparing...\n" |
Definition at line 30 of file xdlcmpMsgs.cpp.
| const char* const FINISHED_MSG = "\nFinished.\n" |
Definition at line 33 of file xdlcmpMsgs.cpp.
| const char* const INFO_MSG = "xdlcmp: Reads in two XDL files and compares them.\n\n" |
Definition at line 36 of file xdlcmpMsgs.cpp.
| const char* const ERROR_MSG = "Error: " |
Definition at line 47 of file xdlcmpMsgs.cpp.
| const char* const ERROR_UNKNOWN_MSG = "Unknown error occurred.\n" |
Definition at line 50 of file xdlcmpMsgs.cpp.
| const char* const ERROR_TOO_MANY_PARAMETERS_MSG = "Too many parameters!" |
Definition at line 54 of file xdlcmpMsgs.cpp.
| const char* const ERROR_UNKNOWN_OPTION_1_MSG = "Unknown option \"" |
Definition at line 57 of file xdlcmpMsgs.cpp.
| const char* const ERROR_UNKNOWN_OPTION_2_MSG = "\"!" |
Definition at line 60 of file xdlcmpMsgs.cpp.
| const char* const ERROR_NO_REFXDL_FILE_MSG = "No input reference XDL file specified!" |
Definition at line 63 of file xdlcmpMsgs.cpp.
| const char* const ERROR_NO_TESTXDL_FILE_MSG = "No input test XDL file specified!" |
Definition at line 66 of file xdlcmpMsgs.cpp.
| const char* const ERROR_NO_REPORT_FILE_MSG = "No output report file specified!" |
Definition at line 69 of file xdlcmpMsgs.cpp.
| const char* const ERROR_NO_DATAPATH_MSG = "No data path given!" |
Definition at line 70 of file bitextractMsgs.cpp.
| const char* const DEVICE_FILE_EXT = ".dev" |
Definition at line 76 of file xdlcmpMsgs.cpp.
| const char* const REPORT_FILE_EXT = ".txt" |
Definition at line 78 of file xdlcmpMsgs.cpp.


Tracking Position and Heading
Objective
In this chapter, you'll learn how to use Titanium's Geolocation API to retrieve GPS positioning and heading information from mobile devices. In addition you'll learn best practices with respect to using the API.
Contents
The position and heading APIs are part of the Ti.Geolocation module, which contains all the functions, properties, and events necessary to handle location information. In the following sections, you'll learn how to use this API to perform the following activities:
-
Detect if location services are available
-
Obtain the current GPS position
-
Continually monitor the GPS position
-
Use the device's compass
-
Configure location service properties
-
Forward and reverse geocoding
You'll also learn best practices and caveats to consider when using location services in your apps. But first, let's dive into some platform specific considerations when using these services.
iOS Considerations
When using location services with iOS, there's one thing you must do in every Titanium app. iOS, as of version 4.0, requires that you specify a 'purpose' when attempting to access a device's location. To make things simple for developers, Titanium provides the Ti.Geolocation.purpose property. This property will be presented to end users in a permissions dialog when they elect to enable location services for your app.
Any valid string is an acceptable value for Ti.Geolocation.purpose. Here's one simple example of setting this property.
Ti.Geolocation.purpose = 'Determine Current Location';
Android Considerations
Adding GPS Support to Android Emulator
The Android emulator, by default, may not be equipped to handle location services. In order to make sure you have location services enabled for your Titanium Android emulator, follow these steps:
-
Open the Android SDK and AVD Manager (found at ANDROID_SDK/tools/android)
-
Select your Titanium Android emulator and click the "Edit.." button
-
In the "Hardware" section, see if "GPS support" is listed
** If it is, make sure the "Value" field it set to "yes"-
If not, click the "New..." button
-
From the "property" list, select "GPS support"
-
Click "OK"
-
Make sure the "Value" field for "GPS support" it set to "yes"
-
-
-
Click "Edit AVD" then click "OK" in the resulting dialog
-
Restart your Android emulator, if necessary
You have now enabled location services for your Android emulator. But there's still one more thing to consider when testing location services on the Android emulator. It doesn't generate GPS positions itself. You'l need to manually enter via the Dalvik Debug Monitor Service (DDMS).
Sending GPS info via DDMS
In order to send mock locations to the Android emulator, we need to assert that Android has appropriate permissions to do so. Titanium will take care of this automatically, but you can confirm that these permissions are present by going into your project's build/android directory and checking the AndroidManifest.xml file. Within the <manifest> section, you should see a line that looks like this:
<uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION"/>
With permissions in place, we can now use DDMS to send mock locations to the Android emulator. To do so, follow these steps:
-
Open DDMS (found at ANDROID_SDK/tools/ddms)
-
Select your emulator from the list of devices in the left pane and click the "Emulator Control" tab in the right pane
-
In the right pane, scroll down to the "Location Controls" section
-
Click the "Manual" tab if it is not already selected
-
While your location based app is running in the emulator, enter values for latitude and longitude and click "Send"
To get more information about providing mock locations to your Android emulator, be sure to check out the official Android documentation on the subject. It gives you details not only on manual mock locations, but also using the GPX and KML formats.
Detect if Location Services are Available
To determine whether or not location services will be available to you on the current mobile device, you simply need to check the boolean property Ti.Geolocation.locationServicesEnabled. With this in mind, the base skeleton of a locations based app might look something like this.
if (Ti.Geolocation.locationServicesEnabled) {
// perform other operations with Ti.Geolocation
} else {
alert('Please enable location services');
}
Obtain the Current GPS Position
Many apps only infrequently need to use location services. Whether it's at app startup, on a button click, or at a timed interval, developers have a multitude of opportunities to actively query for location information.
Let's take a look at a very basic example. After asserting that location services are enabled, the Ti.Geolocation.getCurrentPosition() function is used to query for location information. This function takes a single paramater; a callback function whose event object contains the requested location in its coords property. This is an asynchronous call as the GPS functionality may take a moment to work, especially if this is the first time your app is accessing location. Also worth noting is that the location services will return a cached location is your current position cannot be determined.
if (Ti.Geolocation.locationServicesEnabled) {
Titanium.Geolocation.purpose = 'Get Current Location';
Titanium.Geolocation.getCurrentPosition(function(e) {
if (e.error) {
Ti.API.error('Error: ' + e.error);
} else {
Ti.API.info(e.coords);
}
});
} else {
alert('Please enable location services');
}
The output for a successful execution of the above app would look something like this:
{
"accuracy": 100,
"altitude": 0,
"altitudeAccuracy": null,
"heading": 0,
"latitude": 40.493781233333333,
"longitude": -80.056671
"speed": 0,
"timestamp":<PHONE_NUMBER>331
}
Continually monitor the GPS position
Often you will want to know where a mobile device is at all times. The most common example of this is navigation for driving directions. To have the same constant awareness of a device's position in Titanium, you simply need to register the location event with the Ti.Geolocation module.
Here's a simple case showing how location data can be handled via event listener. You'll notice that the data is handled in a nearly identical manner to the Ti.Geolocation.getCurrentPosition() example.
if (Ti.Geolocation.locationServicesEnabled) {
Titanium.Geolocation.purpose = 'Get Current Location';
Titanium.Geolocation.addEventListener('location', function(e) {
if (e.error) {
alert('Error: ' + e.error);
} else {
Ti.API.info(e.coords);
}
});
} else {
alert('Please enable location services');
}
As with the Ti.Geolocation.getCurrentPosition() example, the location data is returned in the event object's coords property. The listener callback will be executed every time your device detects a new location.
Continually monitoring the GPS for location will consume a mobile device's battery much faster than usual. Be sure that you actually need to be constantly handling the device's location before using this method. If you do, be sure to remove the location event listener via Ti.Geolocation.removeEventListener() when you are not actively using the location information.
Android Lifecycle Events
When monitoring location events continually in Android, apps will continue to receive events even when in the background. As mentioned above, this can be a major drain on the battery life of a mobile device. While this is sometimes the desired behavior, most apps only need location data while active.
In order to manage our location events such that we only receive them while our app is active, we need to take advantage of Titanium's access to the Android lifecycle events. There are 3 events that are significant, each of which can be handled via addEventListener() on the Ti.Android.currentActivity object:
-
destroy - This event is fired when your activity is destroyed. Location events should always be removed in this event.
-
pause - This event is fired when an activity moves to the background. If you intend to suspend your location data handling when your app is in the background, you need to remove location event listeners in this event.
-
resume - This event is fired when an activity comes to the foreground. If you previously removed location events in a pause event, this is where you would add them again to reenable them.
Below is a demonstration of how you would handle these events in order to only manage location events when your app is active. The key part to note is that pausing and resuming your location event handling is the responsibility of the Android Activity object accessible through the Titanium API as Ti.Android.currentActivity.
var locationAdded = false;
var handleLocation = function(e) {
if (!e.error) {
Ti.API.info(e.coords);
}
};
var addHandler = function() {
if (!locationAdded) {
Ti.Geolocation.addEventListener('location', handleLocation);
locationAdded = true;
}
};
var removeHandler = function() {
if (locationAdded) {
Ti.Geolocation.removeEventListener('location', handleLocation);
locationAdded = false;
}
};
Ti.Geolocation.accuracy = Ti.Geolocation.ACCURACY_BEST;
Ti.Geolocation.preferredProvider = Ti.Geolocation.PROVIDER_GPS;
if (Ti.Geolocation.locationServicesEnabled) {
addHandler();
var activity = Ti.Android.currentActivity;
activity.addEventListener('destroy', removeHandler);
activity.addEventListener('pause', removeHandler);
activity.addEventListener('resume', addHandler);
} else {
alert('Please enable location services');
}
Use the Device's Compass
A mobile device's compass can be used to determine its heading. By using heading, the added dimension of direction can be added to a location based mobile app. With this addition, developers can add features like more robust navigation or even augmented reality.
Just as with location, Titanium has events and functions for both continual and one-time monitoring of heading. For continual monitoring, the heading event needs to be registered with the Ti.Geolocation module. In the case of needing only the current heading, a simple call to the Ti.Geolocation.getCurrentHeading() function is necessary. As you may have noticed, this is very similar to how location is handled.
The below includes both of the methods for determining heading mentioned above.
if (Ti.Geolocation.locationServicesEnabled) {
Ti.Geolocation.purpose = 'Get Current Heading';
// make a single request for the current heading
Ti.Geolocation.getCurrentHeading(function(e) {
Ti.API.info(e.heading);
});
// Set 'heading' event for continual monitoring
Ti.Geolocation.addEventListener('heading', function(e) {
if (e.error) {
alert('Error: ' + e.error);
} else {
Ti.API.info(e.heading);
}
});
} else {
alert('Please enable location services');
}
The console output of your program will contain the heading information, which will be sent continuously from the heading event. The data for each heading entry will be structured in the following manner.
{
"accuracy": 3,
"magneticHeading": 34.421875, // degrees east of magnetic north
"timestamp":<PHONE_NUMBER>692,
"trueHeading": 43.595027923583984, // degrees east of true north
"type": "heading",
"x": 34.421875,
"y": -69.296875,
"z": -1.140625
}
Configure Location Service Properties
You may find when continually monitoring location services that you need additional control over their delivery. With the default configuration, the amount of data returned from location and heading events may be overwhelming. To help this situation, Titanium offers the following properties of the Ti.Geolocation module:
-
accuracy - The target accuracy of all location data received. The following Ti.Geolocation constants represent the valid values for this property:
-
ACCURACY_BEST - Location data will be of the highest possible accuracy of which the device is capable
-
ACCURACY_HUNDRED_METERS - Location data will be accurate within 100 meters
-
ACCURACY_KILOMETER - Location data will be accurate within 1 kilometer
-
ACCURACY_NEAREST_TEN_METERS - Location data will be accurate within 10 meters
-
ACCURACY_THREE_KILOMETERS_ - Location data will be accurate within 3 kilometers
-
-
distanceFilter - The minimum change of position (in meters) before a location event is fired. The default is 0, meaning that location events are continuously generated.
-
headingFilter - The minium change of heading (in degrees) before a heading event is fired. The default is 0, meaning that heading events are continuously generated.
-
preferredProvider - Allows you to specify the preferred method for receiving a location. The following Ti.Geolocation constants represent your possible choices:
-
PROVIDER_NETWORK - Give the network based location provider preference
-
PROVIDER_GPS - Give the GPS location preference
-
Using the event-driven location example at the beginning of this chapter, let's modify it to use some of the above properties.
if (Ti.Geolocation.locationServicesEnabled) {
Ti.Geolocation.purpose = 'Get Current Location';
Ti.Geolocation.accuracy = Ti.Geolocation.ACCURACY_BEST;
Ti.Geolocation.distanceFilter = 10;
Ti.Geolocation.preferredProvider = Ti.Geolocation.PROVIDER_GPS;
Ti.Geolocation.addEventListener('location', function(e) {
if (e.error) {
alert('Error: ' + e.error);
} else {
Ti.API.info(e.coords);
}
});
} else {
alert('Please enable location services');
}
Forward and Reverse Geocoding
Another feature of location services that is built into the Titanium API is geocoding. This is the process of converting an address into a geographic location (forward geocoding), or vice versa (reverse geocoding). For example, let's say we wanted to know the latitude and longitude of the Appcelerator headquarters in Mountain View, California. All we need to do is use the Ti.Geolocation.forwardGeocoder() function, giving it the address and a callback as parameters. Here's the code:
Ti.Geolocation.forwardGeocoder('440 Bernardo Ave Mountain View CA', function(e) {
Ti.API.info(e);
});
And here is the output of a forward geocoding of Appcelerator HQ. As you can see, it delivers the geographic location of the given address in latitude and longitude.
{
"accuracy": 1,
"latitude": 37.389071,
"longitude": -122.050156,
"success": 1
}
Now let's say we just have latitude and longitude and we want to figure out what places of interest are in the area. This case can occur if you accept these coordinates from user input, or if you want to get further information in your location events. To do so, we use the Ti.Geolocation.reverseGeocoder() function. To this function we pass a latitude, longitude, and callback function. Let's see what we get when we use the random coordinates (50,50), as in the below sample.
Ti.Geolocation.reverseGeocoder(50, 50, function(e) {
Ti.API.info(e);
});
Here's the output:
{
"places": [
{
"address": ", 418020 Dzhany-Kuduk, , Kazakhstan",
"city": "Oral",
"country": "Kazakhstan",
"country_code": "KZ",
"latitude": 50.0,
"longitude": 50.0,
"street": "",
"zipcode": 418020
}
],
"success": 1
}
While the above output shows only one place, you'll notice that the places property is an array. This means that on any given call to Ti.Gelocation.reverseGeocoder() you may receive a number of entries in the places property, if multiple places are found in the area of your query.
Summary
In this chapter we learned how we can leverage a mobile device's native location services to add the context of a physical location to our apps. Using Titanium's APIs we are able to proactively query or passively listen for a device's current GPS position and heading. By using the configuration properties found in the Ti.Geolocation module like accuracy and distanceFilter we can further refine a location based experience.
Finally, we learned how to use additional location based features like forward and reverse geocoding to get even more location details. In the next chapter, we'll learn how we can use the native mapping functionality of mobile devices via the Titanium.Maps module. We'll be able to take the techniques learned in this chapter and apply them to the next in order to create a visual representation of our location data.


Johnny Cache-Change to your name
This semester I am enrolled in the following courses:
- FYES1000
- CIST1001
- CIST1305
- CIST1510
I am in the:
Web Design/Development: Degree Program
Networking: Degree Program
Web Design/Development: Degree Program
Networking: Degree Program


'No substantive progress' in talks as CN Rail workers strike enters fourth day
MONTREAL — The strike at the country's biggest railway has entered its fourth day with no resolution in sight as round-the-clock negotiations continue under the watch of federal mediators.
by Canadian PressMONTREAL — The strike at the country's biggest railway has entered its fourth day with no resolution in sight as round-the-clock negotiations continue under the watch of federal mediators.
The Teamsters union says that "no substantive progress has been made" since 3,200 workers hit the picket lines early Tuesday morning.
The union claims Quebec's propane shortage "appears to be largely manufactured" by Canadian National Railway Co. amid rising pressure from industry and Prairie premiers to reconvene Parliament ahead of schedule and pass back-to-work legislation.
Premier Francois Legault said yesterday the province is days away from running out of propane, which heats hospitals and nursing homes and fuels operations in agriculture and mining.
The Teamsters Canada Rail Conference says CN's decision to transport freight other than propane using employees who remain on the job "is a business decision."
CN Rail is rejecting the union's claim that the strike concerns workplace health and safety, suggesting instead that it revolves around worker compensation.
CN says it has offered to enter into binding arbitration, with a neutral arbitrator chosen by the parties or appointed by the federal government.
This report by The Canadian Press was first published on Nov. 22, 2019.
Companies in this story: (TSX:CNR)
The Canadian Press


---
layout: home
title: Patient AI
subtitle: Patient-centered AI platform
---
This site is under construction. But here is a list of resources for user-level tasks.
Our Resources for User Modeling
- COVID-19 Data
- We provide a Twitter data related to COVID-19 (Coronavirus). We distribute this Twitter data to support research efforts in the fight against COVID-19. Visit covid19dataresources.org for more COVID-19 related social media and web data resources.
- Visit Here
- Multilingual Hate Speech Data
- We provide a multilingual Twitter data related to hate crime. The data is to support fairness exploration for hate crime detection on user-level.
- Visit Here
- Cross-domain Online Reviews Data
- We provide an online review data with annotated user profiles. This data aims to understand how user factors can improve classification performance.
- Visit Here
- Online Suicide Data
- We provide a suicide data from social media sites. This data aims to detect suicidal ideations for online users.
- Request-only
Contact
Please contact xiaolei.huang@memphis.edu.


[Gecode] Some issues in the code you contributed...
Guido Tack
tack at ps.uni-sb.de
Sat May 1 17:47:02 CEST 2004
Hello.
On Saturday 01 May 2004 13:57, Christian Schulte wrote:
> Dear all,
>
> I stumbled over the following two issues and some minor stuff:
>
> If you have a template <class A, class B>, then you can't have a template
> <class A, class A>. First of all, this awkward construction is not
> necessary, if you want to have that better iterator, then just give it a
> different name. Grep for #ifdef FUCKED. Your code might not compile/work
> right now.
I think this was intended to be a specialized version. The problem was that
you relied on the two arguments being of the same type to exchange them
(using Common::swap), that's why we had to split it in a generic and a
specialised version. The code compiled and worked, although I don't know at
all what the msvc might think about it...
> The max and min double values are exactly those for which floating point
> arithmetic is exact. Basing the configuration on the fact that long long is
> 64 bits is worse than using the predefined constant (which is guaranteed by
> the C++ standard afaik).
The configuration is not based on that fact. It tests whether this holds, in
which case the constants can be computed the way I did. Otherwise, they have
to be computed the way you did in arith-conf.cc, which will be automatically
done by make. I would be very surprised if these constants were really
guaranteed by the C++ standard, I couldn't find anything like that on the web
or in "The C++ programming language".
The problem with computing the constants at "configure" time the way you did
in arith-conf.cc is if you try to cross-compile, as you have to run the
generated executable... That is why I tried to get around this if the
platform supports it.
> Then please:
>
> NO C STYLE CASTS, NOWHERE. READ AND UNDERSTAND CASTS IN C++ (Denys will
> agree with me that C-style casts actually put Mozart in big shit, I won't
> have that again).
Ok, we'll go through the code and get rid of them.
> NO FUNKY LAYOUT! Fact is, do it as I did it (I know that's tough luck, but
> such is life).
What layout are you referring to? Directory structure or coding conventions?
I'm sure we'll have to work on both...
Guido
--
Guido Tack
Programming Systems Lab
http://www.ps.uni-sb.de/~tack
More information about the gecode-users
mailing list


Books App
View All Books
Add A New Book
CREATE NWE E BOLKO!
HOME
New Article
Add book and return to the Home Page


GuruTraining
HTML
CSS
Bootstrap
JavaScript
TypeScript
Angular
React
Vue
BackGrounds
Selectors
Flex
Topography
Animations
Grid
Colors
Box Model
Transition


Experts Fear Public Influence In Julius Malema Assault Case After Video Released
by NT EditorThose involved in the common assault case involving Economic Freedom Fighters (EFF) leader Julius Malema and spokesperson Mbuyiseni Ndlozi have been cautioned not to allow public debate to influence the case.
The pair appeared in court for allegedly assaulting an officer during the funeral of struggle icon Winnie Madikizela-Mandela in April last year.
On Wednesday, AfriForum uploaded a surveillance video that it said showed Malema and Ndlozi shoving a man dressed in army uniform.
AfriForum has accused the National Prosecuting Authority (NPA) of dragging its feet on the common assault case.
But NPA spokesperson Phindi Mjonondwane said prosecutors were following procedure.
“As the NPA, we follow due processes, the matter was not trial ready hence it was not enrolled. Investigations were ongoing.”
Now the lobby group has uploaded a video that shows Malema and Ndlozi shoving the officer several times until he almost falls.
Legal experts said the video now puts the spotlight on the sub judice rule.
Criminal law experts, including Kelly Phelps of the University of Cape Town, have warned that the Oscar Pistorius trial created a crisis of legitimacy for the criminal justice process.
They said this led to expectations and outrage with the verdict and dented the integrity of the judge.
The experts argued that it remained to be seen if the public debate raging because of the AfriForum video would have any impact on the trial now set for March.


People: Alejandra🧁🍭🍩 y Canela🐕
Components (All)
Areas (All)
Tweets
Last Week
Alejandra🧁🍭🍩 y Canela🐕
- Thu, Oct 28, 2021 - 🍊 Contribute to AsyncAPI with @gitpod Happy news! Thanks to @paulienuh's OSS contribution, you can now contribute to @AsyncAPISpec Docs using Gitpod dev environments. 👉🏽Spin up a Gitpod codespace: https://t.co/Y5k8kl8y4J #DevDocs #Gitpod https://t.co/irzcmQrnq8
- Wed, Oct 27, 2021 - Jonas encourages us, reminding us that we cannot build these #OSS #tools 🛠 without help from the #community. ♥ "It's your ideas that drive us." ~ Jonas Lagoni, @AsyncAPISpec 🤗 AsyncAPI community meetings: 🔗https://t.co/PeclvNl4p9
- Wed, Oct 27, 2021 - @APIWorld @AIDevWorld @AsyncAPISpec The Vision behind @AsyncAPISpec: 🔗https://t.co/KiZpZORAb1
- Wed, Oct 27, 2021 - @APIWorld @AIDevWorld @AsyncAPISpec Another tool he mentions we need help with: 🔗https://t.co/zLVUu8YBhF
- Wed, Oct 27, 2021 - @APIWorld @AIDevWorld @AsyncAPISpec Help us build out our Studio OSS tool for @AsyncAPISpec! 🛠 🔗https://t.co/5X8WOPPTCn https://t.co/UeXaRtYl2H
- Wed, Oct 27, 2021 - 🚨 LIVE now 👩🏻💻 @APIWorld 2021 (+ @AIDevWorld) 🗣 Jonas Lagoni ✨ How @AsyncAPISpec can change APIs I'm modding, throw us your questions LIVE in the chat 💬 ♥ ! 🎥 https://t.co/mqOJ7B2tOH https://t.co/mZ0ygVAefr
- Wed, Oct 27, 2021 - 📝 Contributor-first @AsyncAPI #8 - Docs 📝 Jokes aside, in today's stream we discussed upcoming changes to #AsyncAPI Dev #Docs: 🪣 new content buckets 🥳 improved nav sub-sections 👩🏻💻 new Docs homepage 🧼 cleanup & refactoring 🎥https://t.co/2jeq22M7dI https://t.co/LrJCYPkeGF
- Wed, Oct 27, 2021 - I'm LIVE w/ Lukaszzz now! 🎥 🎉 https://t.co/vONcRgImpE
- Tue, Oct 26, 2021 - 📌 We're LIVE tmw on AsyncAPI stream! Join @derberq & me (in your platform of choice!) tmw for our LIVE Contributor @AsyncAPISpec stream! Sharing how the OSS community can contribute to Dev Docs. 🗓 Wed, Oct 27 ⏰ 9am PST 🎥 https://t.co/aPvPQIvc5t 👾 https://t.co/lsGeo9FYUJ https://t.co/HiN0Retmzn
- Tue, Oct 26, 2021 - 📰 #AsyncAPI: Transparency as a Value The value of transparency in @AsyncAPISpec is tackled in this article by my brilliant #OSS colleague, Barbaño González: "History has been marked by opaque and totalitarian power systems." 🔗https://t.co/ZbvT0m4xTP
- Mon, Oct 25, 2021 - Looking at my GH contributions, I see a marked difference in commits vs reviews. At first, it felt SO strange to see a higher percentage under community PR reviews than created PRs (w/ new Docs). But I soon realized that helping as Editor and Community Builder rocks. 🥳 /3 https://t.co/ipYCxkzAjf
- Mon, Oct 25, 2021 - TBH, I thought he was exaggerating just a teensy bit. 😂 But once I joined... what he predicted was exactly what's happened so far! 💥🤯 I had no idea working for the #OSS #community would be SO different or that my priorities would be a 180° change from Product world. /2
- Mon, Oct 25, 2021 - When I first joined @getpostman to work on @AsyncAPISpec, @derberq warned me that a lot of my time would primarily revolve around responding to community questions, PRs, issues, etc. He even said that actual 'Doc Writing' would sometimes be the last thing I get to in the day! /1
Last Month
Alejandra🧁🍭🍩 y Canela🐕
- Fri, Oct 22, 2021 - 🎉DEV DAY 4 WOMEN🎉 es un evento para mujeres que desarrollan Software Grandioso. ❤✨ 🗓 10 y 11 de noviembre 2021 📌 Evento Online y Gratuito 🔗https://t.co/aOEJHxW36H https://t.co/tF3w0IxxwL
- Fri, Oct 22, 2021 - ✨Gracias por aceptar mi #CfP, @sg4women ✨ 👩🏻💻 Cómo contribuir a AsyncAPI Dev Docs 🎉 2021 Dev Day 4 Women 🗓 Wed, Nov 11 ⏰ 11:30am-12:00pm PST 🔗 https://t.co/aOEJHxW36H #DD4W #DD4W @AsyncAPISpec #OSS https://t.co/5eiCh3V9bC
- Fri, Oct 22, 2021 - Finished scoring CfPs for the upcoming AsyncAPI Conference and it feels so good to label that task done ✅
- Thu, Oct 21, 2021 - Don't look now, but a certain @paulienuh and I maaaaay just be planning a partner @gitpod and @AsyncAPISpec stream! 🎥👩🏻💻🍊 https://t.co/5G37mHVF8Q
- Wed, Oct 20, 2021 - I need gear with… - counter balance handle: I trip easily & have balance issues - guiding handle: Canela guides me outside of env that give me panic attacks - hands free leash: makes solo travel easier - traffic lead: staying as close as possible to Canela helps anxiety /6
- Wed, Oct 20, 2021 - Her team also educates on how to design gear that doesn’t hurt your #servicedog. EX: Did you know that misusing a guiding handle could injure your dog’s spine & shoulders? It’s important disabled customers ALSO receive training on how to correctly use working dog’s gear. /5
- Wed, Oct 20, 2021 - The other bonus is that her team helped me better understand my OWN #disability because of the many intelligent and educational questions they ask me during this process. Each disability needs unique gear! Not all needs are the same 🙅🏻♀ /4
- Wed, Oct 20, 2021 - A main component to designing disability specific #servicedog gear is to have several sessions with the owner of this business. We can text, call, FaceTime or Zoom, it’s all up to me! The owner wants disabled customers to work closely with her team for each gear order 💜. /3
- Tue, Oct 19, 2021 - Literally spent part of my 1:1 today discussing what sort of Development Goals Canela should bring to the team. I love my new team 😂🥳🥳🥳
- Mon, Oct 18, 2021 - ¡Gracias por la mención de @AsyncAPISpec, @RevistaSG! Un honor contribuir a proyectos de código abierto y ayudar aumentar la participación de LATAM en proyectos de código abierto. ❤✨ 🔗https://t.co/HGcYA9OwlR
- Mon, Oct 11, 2021 - 📖✨ BOOK update ✨📖 This is how I start the #accessibility chapter of my book, "Designing Developer Documentation as a Product". I demonstrate how businesses are losing up to 26% of additional revenue by excluding customer segment data of people with #disabilities.💰💰💰 https://t.co/KXY0ojzmrm
- Fri, Oct 08, 2021 - 👩🏻💻Taller de contribución a #asyncapi AsyncAPI es un proyecto #OSS que busca impulsar y facilitar el desarrollo de APIs asíncronos y arquitecturas dirigidas por eventos (event driven architecture, EDA). 🔗https://t.co/J1hu1MwfMF
- Fri, Oct 08, 2021 - Mi workshop de @AsyncAPISpec para 🎉2021 #CCOSS✨ ya está disponible en el canal YouTube de @RevistaSG 🎥🎞 🔗https://t.co/5FBE9iR4SI


window_reg()
is a way to generate a specification of a window model
before fitting and allows the model to be created using
different backends.
window_reg(mode = "regression", id = NULL, window_size = NULL)
| mode | A single character string for the type of model. The only possible value for this model is "regression". |
|---|---|
| id | An optional quoted column name (e.g. "id") for identifying multiple time series (i.e. panel data). |
| window_size | A window to apply the window function. By default, the window uses the full data set, which is rarely the best choice. |
A time series window regression is derived using window_reg()
.
The model can be created using the fit()
function using the
following engines:
"window_function" (default) - Performs a Window Forecast
applying a window_function
(engine parameter)
to a window of size defined by window_size
function (default engine)
The engine uses window_function_fit_impl()
. A time series window function
applies a window_function
to a window of the data (last N observations).
The function can return a scalar (single value) or multiple values that are repeated for each window
Common use cases:
Moving Average Forecasts: Forecast forward a 20-day average
Weighted Average Forecasts: Exponentially weighting the most recent observations
Median Forecasts: Forecasting forward a 20-day median
Repeating Forecasts: Simulating a Seasonal Naive Forecast by broadcasting the last 12 observations of a monthly dataset into the future
The key engine parameter is the window_function
. A function / formula:
If a function, e.g. mean
, the function is used with
any additional arguments, ...
in set_engine()
.
If a formula, e.g. ~ mean(., na.rm = TRUE)
, it is converted to a function.
This syntax allows you to create very compact anonymous functions.
Date and Date-Time Variable
It's a requirement to have a date or date-time variable as a predictor.
The fit()
interface accepts date and date-time features and handles them internally.
ID features (Multiple Time Series, Panel Data)
The id
parameter is populated using the fit()
or fit_xy()
function:
ID Example: Suppose you have 3 features:
y
(target)
date
(time stamp),
series_id
(a unique identifer that identifies each time series in your data).
The series_id
can be passed to the window_reg()
using
fit()
:
window_reg(id = "series_id")
specifes that the series_id
column should be used
to identify each time series.
fit(y ~ date + series_id)
will pass series_id
on to the underlying functions.
Window Function Specification (window_function)
You can specify a function / formula using purrr
syntax.
If a function, e.g. mean
, the function is used with
any additional arguments, ...
in set_engine()
.
If a formula, e.g. ~ mean(., na.rm = TRUE)
, it is converted to a function.
This syntax allows you to create very compact anonymous functions.
Window Size Specification (window_size)
The period can be non-seasonal (window_size = 1 or "none"
) or
yearly seasonal (e.g. For monthly time stamps, window_size = 12
, window_size = "12 months"
, or window_size = "yearly"
).
There are 3 ways to specify:
window_size = "all"
: A seasonal period is selected based on the periodicity of the data (e.g. 12 if monthly)
window_size = 12
: A numeric frequency. For example, 12 is common for monthly data
window_size = "1 year"
: A time-based phrase. For example, "1 year" would convert to 12 for monthly data.
External Regressors (Xregs)
These models are univariate. No xregs are used in the modeling process.
library(dplyr) library(parsnip) library(rsample) library(timetk) library(modeltime) # Data m750 <- m4_monthly %>% filter(id == "M750") m750#> # A tibble: 306 × 3 #> id date value #> <fct> <date> <dbl> #> 1 M750 1990-01-01 6370 #> 2 M750 1990-02-01 6430 #> 3 M750 1990-03-01 6520 #> 4 M750 1990-04-01 6580 #> 5 M750 1990-05-01 6620 #> 6 M750 1990-06-01 6690 #> 7 M750 1990-07-01 6000 #> 8 M750 1990-08-01 5450 #> 9 M750 1990-09-01 6480 #> 10 M750 1990-10-01 6820 #> # … with 296 more rows# Split Data 80/20 splits <- initial_time_split(m750, prop = 0.8) # ---- WINDOW FUNCTION ----- # Used to make: # - Mean/Median forecasts # - Simple repeating forecasts # Median Forecast ---- # Model Spec model_spec <- window_reg( window_size = 12 ) %>% # Extra parameters passed as: set_engine(...) set_engine( engine = "window_function", window_function = median, na.rm = TRUE ) # Fit Spec model_fit <- model_spec %>% fit(log(value) ~ date, data = training(splits)) model_fit#> parsnip model object #> #> Fit time: 14ms #> WINDOW FUNC [12] #> -------- #> Model: #> # A tibble: 1 × 1 #> value #> <dbl> #> 1 9.26#> # A tibble: 62 × 1 #> .pred #> <dbl> #> 1 9.26 #> 2 9.26 #> 3 9.26 #> 4 9.26 #> 5 9.26 #> 6 9.26 #> 7 9.26 #> 8 9.26 #> 9 9.26 #> 10 9.26 #> # … with 52 more rows# ---- PANEL FORECAST - WINDOW FUNCTION ---- # Weighted Average Forecast model_spec <- window_reg( # Specify the ID column for Panel Data id = "id", window_size = 12 ) %>% set_engine( engine = "window_function", # Create a Weighted Average window_function = ~ sum(tail(.x, 3) * c(0.1, 0.3, 0.6)), ) # Fit Spec model_fit <- model_spec %>% fit(log(value) ~ date + id, data = training(splits)) model_fit#> parsnip model object #> #> Fit time: 17ms #> WINDOW FUNC [12] #> -------- #> Model: #> # A tibble: 1 × 2 #> id value #> <fct> <dbl> #> 1 M750 9.29#> # A tibble: 62 × 1 #> .pred #> <dbl> #> 1 9.29 #> 2 9.29 #> 3 9.29 #> 4 9.29 #> 5 9.29 #> 6 9.29 #> 7 9.29 #> 8 9.29 #> 9 9.29 #> 10 9.29 #> # … with 52 more rows# ---- BROADCASTING PANELS (REPEATING) ---- # Simulating a Seasonal Naive Forecast by # broadcasted model the last 12 observations into the future model_spec <- window_reg( id = "id", window_size = Inf ) %>% set_engine( engine = "window_function", window_function = ~ tail(.x, 12), ) # Fit Spec model_fit <- model_spec %>% fit(log(value) ~ date + id, data = training(splits)) model_fit#> parsnip model object #> #> Fit time: 16ms #> WINDOW FUNC [Inf] #> -------- #> Model: #> # A tibble: 12 × 2 #> id value #> <fct> <dbl> #> 1 M750 9.27 #> 2 M750 9.27 #> 3 M750 9.15 #> 4 M750 9.19 #> 5 M750 9.18 #> 6 M750 9.25 #> 7 M750 9.26 #> 8 M750 9.27 #> 9 M750 9.26 #> 10 M750 9.26 #> 11 M750 9.29 #> 12 M750 9.29# Predict: The sequence is broadcasted (repeated) during prediction predict(model_fit, testing(splits))#> # A tibble: 62 × 1 #> .pred #> <dbl> #> 1 9.27 #> 2 9.27 #> 3 9.15 #> 4 9.19 #> 5 9.18 #> 6 9.25 #> 7 9.26 #> 8 9.27 #> 9 9.26 #> 10 9.26 #> # … with 52 more rows


HocoHacks is Howard County's high school hackathon, where students from various middle and high schools across the county will get the opportunity to collaborate on coding projects and compete for prizes. Whether you want to learn to code, or to flex your coding abilities, HocoHacks brings together coders of all different skill sets to collectively promote the knowledge of code. Additionally, this year we will have two divisions a middle school and high school division. Middle schoolers can compete in the high school division at their own discretion. If one member on the team is in high school, then that team must compete in the high school division. The theme of the hackathon will be revealed day of, but you can always start brainstorming ideas!
Adam is a senior at Centennial High School. He participates in a variety of Mock Trial, business, and computer science clubs and organizations. He also plays percussion in a number of school bands. In his free time, he enjoys computer science, food, and music.
Sakshi is a senior at Centennial High School where she is actively involved in her schools’s clubs and honor societies including President of Girls Who Code, Director of Technology in girlSTEMpowerment, Tutoring Chair of Science National Honor Society, and Member at Large of National Honor Society. She also loves to dance and is part of her school’s dance team and president of the indian dance club. In her free time, she teaches and learns karate, and enjoys being with her friends.
Keshav is a senior at Centennial High School, where he is part of the school's tennis team, computer science club, robotics club, and multiple honor societies. Outside of school, he is a part of APL’s ASPIRE program, a tutor for Teens Give, and is the co-founder of a volunteer organization called WebPoint. In his free time, Keshav competes at hackathons, plays basketball, and listens to music.
Aditya is a senior at Centennial High School, where he is part of the school's soccer team, President of Speech & Debate and FBLA (future business leaders of America), Vice President of National Math Honor Society, a member of Red Cross, and National Honor Society. Outside of school, he is a programming volunteer at FoodonThe15th, a developer creating a chrome extension, and an aspiring card magician. In his free time, Aditya competes at hackathons, plays the game Among Us, and occasionally takes a leisurely jog through his neighborhood.
Annabel is a junior at Centennial High School, where she is on the school dance team, co-president of Girl Up, a member of Class Board, Best Buddies, and Young Democrats, and a part of multiple honor societies. She also serves as Howard County’s representative to the Maryland SMOB Advisory Council. Outside of school, she is the Chief Operating Officer of a STEM-based nonprofit called Girls Click, a tutor for Global Guru, and part of the Maryland High School Democrats Expansion Committee. In her free time, Annabel enjoys listening to music and working at a local pizzeria.
A Hackathon is an event that brings novice and experienced coders together in order to create innovative projects involving code.
No, you don't! Even if you aren't able to code beforehand, you can attend workshops to learn some code, and still submit a project.
HocoHacks is open to all middle and high school students. However, anyone is welcome to drop by and see what participants are working on.
No problem! Many participants arrive without a team, and you can meet and work with new people. You can also choose to work alone. The limit is 4 people per team.
The topic will be revealed on the day of the hackathon (so as to avoid cheating). For your hack, possibilities are websites, mobile or desktop apps, or even hardware projects.
HocoHacks is free for all participants! You can visit excitign workshopws and have the opportuntiy to get swag (free stuff)!
You will probably need a laptop!
Anyone caught working on past projects will be forced to sit in the corner and wear the dunce hat. Don't give yourself an unfair advantage over your fellow competitors.
Due to the virtual format, hardware unfortunately won't be provided.
The judges are looking for original, innovative, and well-functioning projects. Bonus points for a project with real-world application!
All normal Howard County school rules apply.
Feel free to contact us at<EMAIL_ADDRESS>| Time | Activity |
|---|---|
| 8:30 AM - 9:00 AM | Opening Ceremony |
| 10:00 AM - 11:00 AM | Introduction Workshops (Java, Python, and Web Development) |
| 11:15 AM- 12:00 PM | Typer Racer Tournament! |
| 12:00 PM - 1:00 PM | Jessica Goodard on ASPIRE, Internships, Resume-Building, and More! |
| 2:00 PM - 3:00 PM | Krunker.io Tournament! |
| 3:15 PM - 3:45 PM | Devpost Walkthrough! |
| 4:00 PM - 5:00 PM | Career paths and skills in software engineering with QA Engineer Brian Wu from UChicago. |
| 5:00 PM - 6:00 PM | Guiding the College Application process as a Computer Science major |
| 6:30 PM - 7:30 PM | Mathematical Muffin Morsels: Nobody wants a small piece. Presented by Dr. William Gasarch from the University of Maryland College Park. |
| 8:00 PM | Devpost Submissions due |
| 8:00 PM - 8:30 PM | Judges ask questions with video submissions |
| 8:30 PM - 9:00 PM | Compile Results |
| 9:00 PM - 9:30 PM | Closing Ceremonies and Winners! |


Frequent Issues
How to download
To download, please click how to
download.
Error while downloading
File hosting server is probably down. If this happens, wait for about a minute then refresh and
download again.
Download speed is slow
If you are using Google Chrome or Firefox while downloading, try using Internet Download Manager to
improve download speed as it uses multiple servers to download.
Cannot find the file to download
To find the file you want to download use the search bar to search for it.
Download links redirects to an Ad website
Download links have been shortened via Shorte.st, which allows ad revenues from links. This helps me earn small of
amount of money (not much since only few downloads from me). If you cannot continue, disable any adblocker
you use and reload.


|
Task Description
You've decided to
join the digital music revolution, and convert all of
your CD's to digital media. You want your music to
sound its best by using a high-bitrate MP3 format.

Using a list of
CD's and MP3's, calculate the number of MP3CD's required
to hold your entire collection, using a given target
bitrate. Your supported bitrates (used as keywords in
the input file) are:
MP3-128 = 128 kilobit/second MP3
MP3-160 = 160 kilobit/second MP3
MP3-192 = 192 kilobit/second MP3
MP3-256 = 256 kilobit/second MP3
MP3-320 = 320 kilobit/second MP3
FLAC = 700 kilobit/second Lossless
(assumes a 2:1 compression from CD Audio)
CD = 1411 kilobit/second CD Audio (WAV
file)
For example, a 10
second CD Audio clip (WAV) uses 1.764MB of disk space
(note that for our purposes, 1MB = 1000 kilobytes).
Program Input
The first line of
the input file (prob08.in) contains the target bitrate
(format) for encoding. Each line that follows will
contain four fields about each CD or MP3 album in your
collection, in the following format:
<artist name>, <album name>, <album length in
minutes:seconds>, <format>
Sample Input
file:
TARGET_BITRATE=MP3-256
Duran Duran, Rio, 45:44, CD
Flock of Seagulls, One Hit Wonder, 39:10, CD
Orbital, Orbital 2, 54:33, MP3-192
Beethoven, 9th Symphony, 73:52, CD
Britney Spears, Blah Blah Blah, 33:33, 128
Metallica, Please Give Us Money, 46:58, MP3-256
The Barking Dogs, A Barking Dog Christmas, 68:04, CD
Note that if a
particular album is already encoded at a lower bitrate
than the target bitrate, you will just store the album
as is, because converting it to a higher-rate format
would be a waste of disk space. For example, Britney
Spears' "Blah Blah Blah" is shown as being in the
MP3-128 format, and the target bitrate is MP3-256, so
that album would just be stored as an MP3-128. But the
Matrix Reloaded Soundtrack is in the CD format, and
therefore would be encoded in the MP3-256 format.
Program Output
Your output must
be written to a file (prob08.out) and contain an album
listing for each MP3CD, with a header that includes the
CD number (start at #1) separating each MP3CD. The
album listing must show the artist, album name, time,
and file size in megabytes (in whole MB, round up). And
finally, the total amount of space used on the MP3CD
must be shown (in whole MB, round up).
To calculate the
number of MP3 CD's correctly, fill each MP3CD in the
order the albums are shown in the input file. If there
isn't enough space left to hold the next album, start on
the next CD.
Sample output
file:
MP3 CD #1
-------------------
Duran Duran, Rio, 45:44, 88MB
Flock of Seagulls, One Hit Wonder, 39:10, 76MB
Orbital, Orbital 2, 54:33, 79MB
Beethoven, 9th Symphony, 73:52, 142MB
Britney Spears, Blah Blah Blah, 33:33, 33MB
Metallica, Please Give Us Money, 46:58, 91MB
The Barking Dogs, A Barking Dog Christmas, 68:04,
131MB
Total: 637MB
|


Leap Motion • Myo Armband
Myo API • Leap Motion API • Web Audio API
Javascript: Node.js • Three.js • jQuery
Eclipse • Java • libGDX
• Active tracking on character collision detection
Three Estimote BLE beacon • Relays • Coffeemaker
Estimote Android SDK • Bluetooth LE API
TI MSP430 microcontroller • Pololu 6V motor driver • Two hydrogen fuel cells • QTR-1A Reflectance Sensors • DC motors • Touch sensors
C++ • IAR embedded workbench
NXT Mindstorm brick • 2 Motors (w/ encoders) • Ultrasonic sensor • Touch sensor • DC motors • Touch sensors
C++ • Mindstorm EV3 programming software
• Machining of core components of solar vehicle • Detecting and remodeling of design flaws using SolidWorks • Working to manufacture and assemble suspension systems
Learn more about what we do by visiting our siteBack to top


{% extends 'base.html' %}
{% block header %}
Server Encountered an Error
{% endblock header %}
{% block content %}
This is awfully embarrassing, but it appears that something has gone wrong.
Don't worry, though, it's already been reported to the proper authorities.
Feel free to continue using the site, and hopefully you won't see this message again.
{% endblock content %}


State of Hawaii
Office of Elections
Back to list
Volunteer
User ID
:
Name
:
Email
:
Precinct Official - Name Verifier
Training
Pearl City Highlands Elementary School Cafeteria
6/14/2018
6:30 - 8:00 p.m.
Work
Pearl City Highlands Elementary School Cafeteria
8/11/2018
7:00 a.m.
Work
Pearl City Highlands Elementary School Cafeteria
11/6/2018
7:00 a.m.


Icons
Logo
Search
Dashboard
Dashboard
User
User
Message
Message
Analytics
Analytics
File Manager
File Manager
Order
Order
Saved
Saved
Settings
Settings
Joabe Galvao
Web Designer
Home Content


Install the chrome extension using developer mode. Open extension and set manual positon or load from file. See the position change in text below Repository


the and for with from The were Malagasy Geogale are that phylogenetic tenrec was this between not {background have tenrecs within [], species all sampling which This margin one results study GHR analyses group {border-style AM* been more partitions position support two Madagascar []. colonization estimated four px;} sequences than time tree #ffffff;} Mya morphological number our taxon these (ADRAB, AR, divergence model molecular sister combined data each genes may order age clade has into radiation studies gene genera mammalian only present sequence used using Bayesian Limnogale after analysis calibration its most now when (Figure Biol Oryzorictinae concatenated high maximum might other partitioning result three African DNA Microgale Olson adaptive al. also both but calculated could dispersal genus nuclear (Table Asher Figure Hofreiter However, Phylogenetic These University available dataset dating different diversification estimates exon first influence new nodes phylogeny relationships same tenrecs, their would (vWF) GHR) Goodman Poux Press Table best clades estimate evolution evolutionary file node px; speciation split therefore times {font-family (GHR) Afrotheria Biol./ Evol aurita based endemic events evidence following font-size grouping minimum older orders parameters placental points remaining tenrecs. vWF (PP Afroinsectiphillia For Mya, PCR ages assess codon did difference differences displayed double; either five found including indicate likelihood method mitochondrial numbers point previously radiation, rate root sp. standard strong supported understand vWF) without (i.e., ADRAB, Age All Echinops Limnogale, MODELTEST Phylogenet Sci./rspb.. Tenrec [,]. [-]. among analysis. around basal bold border-color border-width calibrations cf. clade. clock compared complete data, dates datings deviations diversity due fact fast fossil highly hypothesis inferred island level mammals monophyly morphology needed nested nine none obtained ones out package partition pattern performed possible posterior prior removed results, results. rodents semi-aquatic sequencing shrew similar solid; some synonymous they timing under until various whereas yet {font-style {font-weight ADRAB Additional Africa Afrotherian Chicago Evol./S-()- Molecular Moreover, Only Oryzorictes Setifer TVMΓ Therefore, []; analyses. approach authors base branching can carnivores circles colonization. conclusion confirm constraints courier; described difficult divided ecological em; estimates. even few final fitting full gave genera, genome here history however hypotheses hyrax impact included increased just large-eared lead least led like min nonsynonymous over paenungulate per primers probably pt;} radiations reached receptor represented resolve selected shows site) solid species. split, strongly study, substitutions taken too vWF, very web-footed well whether while


Apache Flink 1.11.2 Released
September 17, 2020 - Zhu Zhu (@zhuzhv)The Apache Flink community released the second bugfix version of the Apache Flink 1.11 series.
This release includes 96 fixes and minor improvements for Flink 1.11.1. The list below includes a detailed list of all fixes and improvements.
We highly recommend all users to upgrade to Flink 1.11.2.
Updated Maven dependencies:
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-java</artifactId>
<version>1.11.2</version>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-streaming-java_2.11</artifactId>
<version>1.11.2</version>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-clients_2.11</artifactId>
<version>1.11.2</version>
</dependency>
You can find the binaries on the updated Downloads page.
List of resolved issues:
Sub-task
- [FLINK-16087] - Translate "Detecting Patterns" page of "Streaming Concepts" into Chinese
- [FLINK-18264] - Translate the "External Resource Framework" page into Chinese
- [FLINK-18628] - Invalid error message for overloaded methods with same parameter name
- [FLINK-18801] - Add a "10 minutes to Table API" document under the "Python API" -> "User Guide" -> "Table API" section
- [FLINK-18910] - Create the new document structure for Python documentation according to FLIP-133
- [FLINK-18912] - Add a Table API tutorial link(linked to try-flink/python_table_api.md) under the "Python API" -> "GettingStart" -> "Tutorial" section
- [FLINK-18913] - Add a "TableEnvironment" document under the "Python API" -> "User Guide" -> "Table API" section
- [FLINK-18917] - Add a "Built-in Functions" link (linked to dev/table/functions/systemFunctions.md) under the "Python API" -> "User Guide" -> "Table API" section
- [FLINK-19110] - Flatten current PyFlink documentation structure
Bug
- [FLINK-14087] - throws java.lang.ArrayIndexOutOfBoundsException when emiting the data using RebalancePartitioner.
- [FLINK-15467] - Should wait for the end of the source thread during the Task cancellation
- [FLINK-16510] - Task manager safeguard shutdown may not be reliable
- [FLINK-16827] - StreamExecTemporalSort should require a distribution trait in StreamExecTemporalSortRule
- [FLINK-18081] - Fix broken links in "Kerberos Authentication Setup and Configuration" doc
- [FLINK-18212] - Init lookup join failed when use udf on lookup table
- [FLINK-18341] - Building Flink Walkthrough Table Java 0.1 COMPILATION ERROR
- [FLINK-18421] - Elasticsearch (v6.3.1) sink end-to-end test instable
- [FLINK-18468] - TaskExecutorITCase.testJobReExecutionAfterTaskExecutorTermination fails with DuplicateJobSubmissionException
- [FLINK-18552] - Update migration tests in master to cover migration from release-1.11
- [FLINK-18581] - Cannot find GC cleaner with java version previous jdk8u72(-b01)
- [FLINK-18588] - hive ddl create table should support 'if not exists'
- [FLINK-18595] - Deadlock during job shutdown
- [FLINK-18600] - Kerberized YARN per-job on Docker test failed to download JDK 8u251
- [FLINK-18608] - CustomizedConvertRule#convertCast drops nullability
- [FLINK-18612] - WordCount example failure when setting relative output path
- [FLINK-18632] - RowData's row kind do not assigned from input row data when sink code generate and physical type info is pojo type
- [FLINK-18639] - Error messages from BashJavaUtils are eaten
- [FLINK-18641] - "Failure to finalize checkpoint" error in MasterTriggerRestoreHook
- [FLINK-18646] - Managed memory released check can block RPC thread
- [FLINK-18650] - The description of dispatcher in Flink Architecture document is not accurate
- [FLINK-18655] - Set failOnUnableToExtractRepoInfo to false for git-commit-id-plugin in module flink-runtime
- [FLINK-18656] - Start Delay metric is always zero for unaligned checkpoints
- [FLINK-18659] - FileNotFoundException when writing Hive orc tables
- [FLINK-18663] - RestServerEndpoint may prevent server shutdown
- [FLINK-18665] - Filesystem connector should use TableSchema exclude computed columns
- [FLINK-18672] - Fix Scala code examples for UDF type inference annotations
- [FLINK-18677] - ZooKeeperLeaderRetrievalService does not invalidate leader in case of SUSPENDED connection
- [FLINK-18682] - Vector orc reader cannot read Hive 2.0.0 table
- [FLINK-18697] - Adding flink-table-api-java-bridge_2.11 to a Flink job kills the IDE logging
- [FLINK-18700] - Debezium-json format throws Exception when PG table's IDENTITY config is not FULL
- [FLINK-18705] - Debezium-JSON throws NPE when tombstone message is received
- [FLINK-18708] - The links of the connector sql jar of Kafka 0.10 and 0.11 are extinct
- [FLINK-18710] - ResourceProfileInfo is not serializable
- [FLINK-18748] - Savepoint would be queued unexpected if pendingCheckpoints less than maxConcurrentCheckpoints
- [FLINK-18749] - Correct dependencies in Kubernetes pom
- [FLINK-18750] - SqlValidatorException thrown when select from a view which contains a UDTF call
- [FLINK-18769] - MiniBatch doesn't work with FLIP-95 source
- [FLINK-18821] - Netty client retry mechanism may cause PartitionRequestClientFactory#createPartitionRequestClient to wait infinitely
- [FLINK-18832] - BoundedBlockingSubpartition does not work with StreamTask
- [FLINK-18856] - CheckpointCoordinator ignores checkpointing.min-pause
- [FLINK-18859] - ExecutionGraphNotEnoughResourceTest.testRestartWithSlotSharingAndNotEnoughResources failed with "Condition was not met in given timeout."
- [FLINK-18862] - Fix LISTAGG throws BinaryRawValueData cannot be cast to StringData exception in runtime
- [FLINK-18867] - Generic table stored in Hive catalog is incompatible between 1.10 and 1.11
- [FLINK-18900] - HiveCatalog should error out when listing partitions with an invalid spec
- [FLINK-18902] - Cannot serve results of asynchronous REST operations in per-job mode
- [FLINK-18941] - There are some typos in "Set up JobManager Memory"
- [FLINK-18942] - HiveTableSink shouldn't try to create BulkWriter factory when using MR writer
- [FLINK-18956] - StreamTask.invoke should catch Throwable instead of Exception
- [FLINK-18959] - Fail to archiveExecutionGraph because job is not finished when dispatcher close
- [FLINK-18992] - Table API renameColumns method annotation error
- [FLINK-18993] - Invoke sanityCheckTotalFlinkMemory method incorrectly in JobManagerFlinkMemoryUtils.java
- [FLINK-18994] - There is one typo in "Set up TaskManager Memory"
- [FLINK-19040] - SourceOperator is not closing SourceReader
- [FLINK-19061] - HiveCatalog fails to get partition column stats if partition value contains special characters
- [FLINK-19094] - Revise the description of watermark strategy in Flink Table document
- [FLINK-19108] - Stop expanding the identifiers with scope aliased by the system with 'EXPR$' prefix
- [FLINK-19109] - Split Reader eats chained periodic watermarks
- [FLINK-19121] - Avoid accessing HDFS frequently in HiveBulkWriterFactory
- [FLINK-19133] - User provided kafka partitioners are not initialized correctly
- [FLINK-19148] - Table crashed in Flink Table API & SQL Docs
- [FLINK-19166] - StreamingFileWriter should register Listener before the initialization of buckets
Improvement
- [FLINK-16619] - Misleading SlotManagerImpl logging for slot reports of unknown task manager
- [FLINK-17075] - Add task status reconciliation between TM and JM
- [FLINK-17285] - Translate "Python Table API" page into Chinese
- [FLINK-17503] - Make memory configuration logging more user-friendly
- [FLINK-18598] - Add instructions for asynchronous execute in PyFlink doc
- [FLINK-18618] - Docker e2e tests are failing on CI
- [FLINK-18619] - Update training to use WatermarkStrategy
- [FLINK-18635] - Typo in 'concepts/timely stream processing' part of the website
- [FLINK-18643] - Migrate Jenkins jobs to ci-builds.apache.org
- [FLINK-18644] - Remove obsolete doc for hive connector
- [FLINK-18730] - Remove Beta tag from SQL Client docs
- [FLINK-18772] - Hide submit job web ui elements when running in per-job/application mode
- [FLINK-18793] - Fix Typo for api.common.eventtime.WatermarkStrategy Description
- [FLINK-18797] - docs and examples use deprecated forms of keyBy
- [FLINK-18816] - Correct API usage in Pyflink Dependency Management page
- [FLINK-18831] - Improve the Python documentation about the operations in Table
- [FLINK-18839] - Add documentation about how to use catalog in Python Table API
- [FLINK-18847] - Add documentation about data types in Python Table API
- [FLINK-18849] - Improve the code tabs of the Flink documents
- [FLINK-18881] - Modify the Access Broken Link
- [FLINK-19055] - MemoryManagerSharedResourcesTest contains three tests running extraordinary long
- [FLINK-19105] - Table API Sample Code Error
Task
- [FLINK-18666] - Update japicmp configuration for 1.11.1
- [FLINK-18667] - Data Types documentation misunderstand users
- [FLINK-18678] - Hive connector fails to create vector orc reader if user specifies incorrect hive version


SAVOIR ${savoir.release.ver} Vader Sample Device Guide
Table of Contents
- Introduction
- Initial Preparation
- Running the Vader Desktop Application
- Testing the Session
- Cleaning Up
In order to test SAVOIR sessions, a simple session has been stored within the default database named
Vader Sample Device Demo. Running this session will demonstrate how a change in one
device can start a second device. The two devices are
- The Vader Web Tutorial
- The Vader Desktop
The Vader Web Tutorial is a simple Flash website that allows the user (for this demo) to
enter in a respiration rate and send this to the Vader Desktop application.
The Vader Desktop application runs on your local computer and waits for a message from the
Vader Web Tutorial. When the message arrives, it updates it's display and then plays a
sound similar to Darth Vader breathing.
The Vader Web Tutorial should have been installed on the SAVOIR server during the
installation process. Therefore, there is no need for any further installation or configuration.
The Vader Desktop application will need to be downloaded from the SAVOIR server since it is
required to run on your local computer. It is simply a jar file, and can be found at the following
location.
- http://${savoir.vadr.deploy.host}/sampleDevices/vaderDesktop/
This website simply lists the VadarDesktop.jar file. Once you download the file, it
can be stored in any convenient location.
NEED TO MENTION SAVOIR LAUNCH FILE
To run the the Vader Desktop application you should be able to just double click
on the icon of the VadarDesktop.jar file. If this fails, you can alternatively run
the application from the command line. Simply change directory to the folder containing the
VadarDesktop.jar file and then run the following command
- java -jar VaderDesktop.jar
Once the application is running you should see a window similar to the one below:
In order to start the application so that it is listening for messages, you need to start the
bus interface. To do this, simply click on the File menu button and select
Start BusInterface as shown below:
When the application is listening, the status window will indicate that the bus interface has
started, as shown below:
Before you can test the Vader Sample Device Demo session, you need to ensure that
the Vader Desktop application is running and listening to the bus
interface
If you haven't already done so, log in to SAVOIR at the following URL:
- http://${savoir.logn.deploy.host}/savoir/
Once you're logged in, you should see a page similar to the following:
Click the Vader Sample Device Demo 3904 link and a window should pop up like the
one below:
Next, click the Start Session button and the Vader Web Tutorial website
should start as indicated below:
Type in a respiration rate greater than 30 as shown in the following and then click the Set
Respiration Rate button
If your computer speakers are working properly, then you should start to hear a breathing sound and
the Vader Desktop application should have been updated similar to the following:
To stop the breathing sound simply quit the Vader Desktop application by clicking
File then Exit as indicated below:
Then you can close the now paused Flash web page for the Vader Web Tutorial and
then click the End Session button on the session pop up window as shown in the
following:
Copyright © , National Research Council of Canada


Implements interfaces:
This class proviceds structs which can be used as a "rich" array.
Located in /lib/sfFilebasePluginStruct.php (line 18)
| Class | Description |
|---|---|
| sfFilebasePluginFileExif | sfFilebasePluginFileExif represents exif-data of a sfFilebasePluginImage |
Constructor. Takes an array with store-values as an optional argument.
Returns Array Iterator over struct data
Calculates the substring of a getter/setter method. E.g. getHanswurst() => hanswurst
Returns this store as an instance of Array Iterator. Wrapper for getIterator()
Sets the variable store of this struct.
Converts all nested arrays into a Struct, leaving instances of Traversable untouchted.
Sets the class name for sub-structs
Provides data access by using standard getter/setter- syntax. E.g.:
Adds a new Value to this struct. Converts all nested arrays into structs.
Documentation generated on Mon, 25 May 2009 15:21:38 +0200 by phpDocumentor 1.4.2


public abstract class CustomTaskLifeCycleEventListener
extends java.lang.Object
| Constructor and Description |
|---|
CustomTaskLifeCycleEventListener() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterTaskActivatedEvent(TaskEvent event) |
void |
afterTaskAddedEvent(TaskEvent event) |
void |
afterTaskClaimedEvent(TaskEvent event) |
void |
afterTaskCompletedEvent(TaskEvent event) |
void |
afterTaskDelegatedEvent(TaskEvent event) |
void |
afterTaskExitedEvent(TaskEvent event) |
void |
afterTaskFailedEvent(TaskEvent event) |
void |
afterTaskForwardedEvent(TaskEvent event) |
void |
afterTaskNominatedEvent(TaskEvent event) |
void |
afterTaskNotificationEvent(TaskEvent event) |
void |
afterTaskReassignedEvent(TaskEvent event) |
void |
afterTaskReleasedEvent(TaskEvent event) |
void |
afterTaskResumedEvent(TaskEvent event) |
void |
afterTaskSkippedEvent(TaskEvent event) |
void |
afterTaskStartedEvent(TaskEvent event) |
void |
afterTaskStoppedEvent(TaskEvent event) |
void |
afterTaskSuspendedEvent(TaskEvent event) |
void |
afterTaskUpdatedEvent(TaskEvent event) |
void |
beforeTaskActivatedEvent(TaskEvent event) |
void |
beforeTaskAddedEvent(TaskEvent event) |
void |
beforeTaskClaimedEvent(TaskEvent event) |
void |
beforeTaskCompletedEvent(TaskEvent event) |
void |
beforeTaskDelegatedEvent(TaskEvent event) |
void |
beforeTaskExitedEvent(TaskEvent event) |
void |
beforeTaskFailedEvent(TaskEvent event) |
void |
beforeTaskForwardedEvent(TaskEvent event) |
void |
beforeTaskNominatedEvent(TaskEvent event) |
void |
beforeTaskNotificationEvent(TaskEvent event) |
void |
beforeTaskReassignedEvent(TaskEvent event) |
void |
beforeTaskReleasedEvent(TaskEvent event) |
void |
beforeTaskResumedEvent(TaskEvent event) |
void |
beforeTaskSkippedEvent(TaskEvent event) |
void |
beforeTaskStartedEvent(TaskEvent event) |
void |
beforeTaskStoppedEvent(TaskEvent event) |
void |
beforeTaskSuspendedEvent(TaskEvent event) |
void |
beforeTaskUpdatedEvent(TaskEvent event) |
public CustomTaskLifeCycleEventListener()
event
- public void beforeTaskActivatedEvent(TaskEvent event)
event
- public void afterTaskActivatedEvent(TaskEvent event)
event
- public void beforeTaskClaimedEvent(TaskEvent event)
event
- public void afterTaskClaimedEvent(TaskEvent event)
event
- public void beforeTaskReleasedEvent(TaskEvent event)
event
- public void afterTaskReleasedEvent(TaskEvent event)
event
- public void beforeTaskReassignedEvent(TaskEvent event)
event
- public void afterTaskReassignedEvent(TaskEvent event)
event
- public void beforeTaskForwardedEvent(TaskEvent event)
event
- public void afterTaskForwardedEvent(TaskEvent event)
event
- public void beforeTaskDelegatedEvent(TaskEvent event)
event
- public void afterTaskDelegatedEvent(TaskEvent event)
event
- public void beforeTaskNominatedEvent(TaskEvent event)
event
- public void afterTaskNominatedEvent(TaskEvent event)
event
- public void beforeTaskStartedEvent(TaskEvent event)
event
- public void afterTaskStartedEvent(TaskEvent event)
event
- public void beforeTaskCompletedEvent(TaskEvent event)
event
- public void afterTaskCompletedEvent(TaskEvent event)
event
- public void beforeTaskExitedEvent(TaskEvent event)
event
- public void afterTaskExitedEvent(TaskEvent event)
event
- public void beforeTaskSuspendedEvent(TaskEvent event)
event
- public void afterTaskSuspendedEvent(TaskEvent event)
event
- public void beforeTaskResumedEvent(TaskEvent event)
event
- public void afterTaskResumedEvent(TaskEvent event)
event
- public void beforeTaskStoppedEvent(TaskEvent event)
event
- public void afterTaskStoppedEvent(TaskEvent event)
event
- public void beforeTaskSkippedEvent(TaskEvent event)
event
- public void afterTaskSkippedEvent(TaskEvent event)
event
- public void beforeTaskFailedEvent(TaskEvent event)
event
- public void afterTaskFailedEvent(TaskEvent event)
event
- public void beforeTaskNotificationEvent(TaskEvent event)
event
- public void afterTaskNotificationEvent(TaskEvent event)
event
- public void beforeTaskUpdatedEvent(TaskEvent event)
event
- public void afterTaskUpdatedEvent(TaskEvent event)
event
- public void beforeTaskAddedEvent(TaskEvent event)
event
- public void afterTaskAddedEvent(TaskEvent event)
event
-


@(useContactless: Boolean) @main("Explanation of Business Properties", None, useContactless) {
"PIN pad" means that there is a customer-facing device with a PIN pad. Businesses with only a merchant facing terminal but that pass the terminal to the customer for PIN preferring chip cards do not count despite allowing PIN entry. Businesses without this checked have a higher probability of acceptance issues with PIN preferring cards due to many of them having poor terminal positioning.
@if(useContactless) {This means that the terminal has a working slot intended for insertion of credit and debit cards. Such a terminal should not let you swipe a card with a chip and instead should force you (or the cashier/server) to insert the card into the slot instead.
} else {If this is checked, the business has a terminal that:
Due to poor terminal positioning and training, many smaller businesses satisfy (1) and (2) but do not satisfy (3), in effect meaning that they do not accept contactless payment.
If this is checked, gas pumps at the listed service station enforce the service code on a chip-enabled card and require that the chip be used. This will likely manifest itself as being required to re-insert the card or not show any "remove card quickly" or similar prompts after insertion. Receipts will also print a line showing the card's AID.
If this is checked, the business has EMV-enabled terminals that do not have an attendant readily available to check a signature and cannot accept one. These types of terminals are common at e.g. train stations in Europe and have been known to cause problems with most American credit cards (though it's unlikely that our cards will have issues at domestic unattended terminals). NOTE: this does not include self-checkouts as they are technically "attended" terminals and can accept a signature if required.
If this is checked, the business has EMV-enabled terminals that allow customers to insert and remove their cards before the transaction has finished authorizing. This is an "optimization" measure designed for the US market to approximately match the pre-EMV behavior of some stores. Unfortunately, this also means that PIN changes for offline PIN capable cards will likely not be pushed at these stores; time will tell whether this becomes a significant problem.
}If this is checked, payment was performed by the server or by the customer using a device located at or brought to the table. This is usually accomplished by Ziosk tablets or similar at every table or by a device carried by the server such as Clover Mobile and the Ingenico iWL series.


Module Description - What the module does and why it is useful
Reference - An under-the-hood peek at what the module is doing and how
This module constructs files from multiple fragments in an ordered way.
This module lets you use many concat::fragment{} resources throughout your modules to construct a single file at the end. It does this through a shell (or ruby) script and a temporary holding space for the fragments.
Installs concatfragments. based on platform.
Adds a concat/ directory into Puppets vardir
.
To start using concat you need to create:
A concat{} resource for the final file.
One or more concat::fragment{}'s.
A minimal example might be:
concat { '/tmp/file': ensure => present, } concat::fragment { 'tmpfile': target => '/tmp/file', content => 'test contents', order => '01' }
Please be aware that there have been a number of API deprecations.
If you wanted a /etc/motd file that listed all the major modules on the machine. And that would be maintained automatically even if you just remove the include lines for other modules you could use code like below, a sample /etc/motd would be:
Puppet modules on this server: -- Apache -- MySQL
Local sysadmins can also append to the file by just editing /etc/motd.local their changes will be incorporated into the puppet managed motd.
class motd { $motd = '/etc/motd' concat { $motd: owner => 'root', group => 'root', mode => '0644' } concat::fragment{ 'motd_header': target => $motd, content => "\nPuppet modules on this server:\n\n", order => '01' } # local users on the machine can append to motd by just creating # /etc/motd.local concat::fragment{ 'motd_local': target => $motd, source => '/etc/motd.local', order => '15' } } # used by other modules to register themselves in the motd define motd::register($content="", $order='10') { if $content == "" { $body = $name } else { $body = $content } concat::fragment{ "motd_fragment_$name": target => '/etc/motd', order => $order, content => " -- $body\n" } }
To use this you'd then do something like:
class apache { include apache::install, apache::config, apache::service motd::register{ 'Apache': } }
concat::setup
: Sets up the concat script/directories.
ensure
¶ ↑Controls if the combined file is present or absent.
ensure => present
ensure => absent
path
¶ ↑Controls the destination of the file to create.
path => '/tmp/filename'
owner
¶ ↑Set the owner of the combined file.
owner => 'root'
group
¶ ↑Set the group of the combined file.
group => 'root'
mode
¶ ↑Set the mode of the combined file.
mode => '0644'
warn
¶ ↑Determine if a warning message should be added at the top of the file to let users know it was autogenerated by Puppet. It should be a boolean or a string containing the contents of the warning message.
warn => true
warn => false
warn => '# This file is autogenerated!'
force
¶ ↑Determine if empty files are allowed when no fragments were added.
force => true
force => false
backup
¶ ↑Controls the filebucket behavior used for the file.
backup => 'puppet'
replace
¶ ↑Controls if Puppet should replace the destination file if it already exists.
replace => true
replace => false
order
¶ ↑Controls the way in which the shell script chooses to sort the files. It's rare you'll need to adjust this.
order => 'alpha'
order => 'numeric'
ensure_newline
¶ ↑Ensure there's a newline at the end of the fragments.
ensure_newline => true
ensure_newline => false
target
¶ ↑Choose the destination file of the fragment.
target => '/tmp/testfile'
content
¶ ↑Create the content of the fragment.
content => 'test file contents'
source
¶ ↑Find the sources within Puppet of the fragment.
source => 'puppet:///modules/test/testfile'
source => ['puppet:///modules/test/1', 'puppet:///modules/test/2']
order
¶ ↑Order the fragments.
order => '01'
Best practice is to pass a string to this parameter but integer values are accepted.
ensure
¶ ↑Control the file of fragment created.
ensure => 'present'
ensure => 'absent'
mode
¶ ↑Set the mode of the fragment.
mode => '0644'
owner
¶ ↑Set the owner of the fragment.
owner => 'root'
group
¶ ↑Set the group of the fragment.
group => 'root'
backup
¶ ↑Control the filebucket behavior for the fragment.
backup => 'puppet'
1.0.0
¶ ↑concat{}
warn
parameter¶ ↑concat { '/tmp/file': ensure => present, warn => 'true', # generates stringified boolean value warning }
Using stringified Boolean values as the warn
parameter to
concat
is deprecated, generates a catalog compile time
warning, and will be silently treated as the concatenated file
header/warning message in a future release.
The following strings are considered a stringified Boolean value:
'true'
'yes'
'on'
'false'
'no'
'off'
Please migrate to using the Puppet DSL's native Boolean data type.
concat{}
gnu
parameter¶ ↑concat { '/tmp/file': ensure => present, gnu => $foo, # generates deprecation warning }
The gnu
parameter to concat
is deprecated,
generates a catalog compile time warning, and has no effect. This parameter
will be removed in a future release.
Note that this parameter was silently ignored in the 1.0.0
release.
concat::fragment{}
ensure
parameter¶ ↑concat::fragment { 'cpuinfo': ensure => '/proc/cpuinfo', # generates deprecation warning target => '/tmp/file', }
Passing a value other than 'present'
or
'absent'
as the ensure
parameter to
concat::fragment
is deprecated and generates a catalog compile
time warning. The warning will become a catalog compilation failure in a
future release.
This type emulates the Puppet core file
type's disfavored
ensure
semantics of treating a file path as a directive to create a symlink.
This feature is problematic in several ways. It copies an API semantic of
another type that is both frowned upon and not generally well known.
It's behavior may be surprising in that the target concatenated file
will not be a symlink nor is there any common file system that has a
concept of a section of a plain file being symbolically linked to another
file. Additionally, the behavior is generally inconsistent with most Puppet
types in that a missing source file will be silently ignored.
If you want to use the content of a file as a fragment please use the
source
parameter.
concat::fragment{}
mode/owner/group
parameters¶ ↑concat::fragment { 'foo': target => '/tmp/file', content => 'foo', mode => $mode, # generates deprecation warning owner => $owner, # generates deprecation warning group => $group, # generates deprecation warning }
The mode
parameter to concat::fragment
is
deprecated, generates a catalog compile time warning, and has no effect.
The owner
parameter to concat::fragment
is
deprecated, generates a catalog compile time warning, and has no effect.
The group
parameter to concat::fragment
is
deprecated, generates a catalog compile time warning, and has no effect.
These parameters had no user visible effect in version 1.0.0
and will be removed in a future release.
concat::fragment{}
backup
parameter¶ ↑concat::fragment { 'foo': target => '/tmp/file', content => 'foo', backup => 'bar', # generates deprecation warning }
The backup
parameter to concat::fragment
is
deprecated, generates a catalog compile time warning, and has no effect. It
will be removed in a future release.
In the 1.0.0
release this parameter controlled file bucketing
of the file fragment. Bucketting the fragment(s) is redundant with
bucketting the final concatenated file and this feature has been removed.
class { 'concat::setup': }
¶ ↑include concat::setup # generates deprecation warning class { 'concat::setup': } # generates deprecation warning
The concat::setup
class is deprecated as a public API of this
module and should no longer be directly included in the manifest. This
class may be removed in a future release.
While not an API depreciation, users should be aware that all public parameters in this module are now validated for at least variable type. This may cause validation errors in a manifest that was previously silently misbehaving.
This module has been tested on:
RedHat Enterprise Linux (and Centos) 5/6
Debian 6/7
Ubuntu 12.04
Testing on other platforms has been light and cannot be guaranteed.
Puppet Labs modules on the Puppet Forge are open projects, and community contributions are essential for keeping them great. We can’t access the huge number of platforms and myriad of hardware, software, and deployment configurations that Puppet is intended to serve.
We want to keep it as easy as possible to contribute changes so that our modules work in your environment. There are a few guidelines that we need contributors to follow so that we can have a chance of keeping on top of things.
You can read the complete module contribution guide on the Puppet Labs wiki.
The list of contributors can be found at: