Thousands rally in Georgia as ruling party backtracks on reforms
TBILISI: Thousands of opposition supporters demonstrated on the streets of Georgia on Thursday (Nov 14) after the ruling party failed to push through promised electoral reforms.
Protesters began gathering outside the parliament in central Tbilisi minutes after lawmakers voted down the legislation and blocked traffic on the city's main thoroughfare.
In the evening, their ranks grew to some 10,000 in peaceful protests with a heavy police presence, AFP journalists saw.
The protests came after the parliament dominated by the ruling Georgian Dream party failed to pass legislation to hold parliamentary elections next year under a new proportional voting system.
Opposition parties accused the party's leader, Bidzina Ivanishvili, of orchestrating the bill's failure.
Protesters say the current voting system favours the increasingly unpopular ruling party.
Ivanishvili, Georgia's richest man, had announced "large-scale political reform" under pressure following mass street protests in June.
Demonstrators on Thursday vowed to hold permanent protests until early parliamentary polls are held under the proposed proportional system.
UNITED OPPOSITION
Leaders of almost all the opposition parties on Thursday held unprecedented talks, promising to set aside their differences and form a united front against Georgian Dream.
"The holding of snap parliamentary polls is the joint demand of Georgia's entire political spectrum," Tina Bokuchava, one of the leaders of Georgia's main opposition force, ex-president Mikheil Saakashvili's United National Movement party, said after the talks.
"This goal will be achieved through a mass protest movement," she told AFP.
Another opposition MP, Irma Inashvili of the Alliance of Patriots anti-Western party, called on all opposition parties to take to the streets, saying Georgian Dream "must be ousted from power."
Parliament Speaker Archil Talakvadze, a member of Georgian Dream, ruled out early polls, saying there was "no constitutional grounds at the moment to consider such a possibility."
"We urge all the political parties to engage in constructive political dialogue in the run-up to the parliamentary elections scheduled for next October," he told AFP.
Several Georgian Dream MPs left the party in protest at the vote.
Georgian Dream - in power since 2012 - has seen its popularity plummet amid widespread discontent over its failure to address economic stagnation and perceived backsliding on its commitment to democracy.
Critics have accused Ivanishvili of persecuting political opponents and creating a corrupt political system where private interests dominate decision-making processes.
In June and July, tens of thousands took to streets in Tbilisi and 240 people were injured during a violent police crackdown. Two peaceful protesters lost an eye, including a teenage girl.


+callout-info
RAMADDA version 13.73.0 is available for download at:
See the
Installation Guide for more information.
-callout
Installing and Upgrading
Note: Many users ask if upgrading RAMADDA will effect any existing content. All of the content and files are kept in the RAMADDA home directory and in the database. As long as those directories remain untouched there should not be any problem in upgrading. However, you will need to update any plugins you have installed in the RAMADDA plugins directory.
To update an existing RAMADDA installation:
- Update plugins
- RAMADDA comes with 3 plugin collections - core, geo and bio. A new update of RAMADDA will automatically
update these plugin collections.
- If you have individual plugins installed then you should update them to the latest
versions.
- If you are running stand-alone then download and unzip the ramaddaserver.zip from the
ramadda.org site.
- If you are running under Tomcat or Glassfish then download and install the repository.war
from the ramadda.org site.


Adds a sidebar node or nodes.
add([parent], nodes)
| parent |
string, id of the parent node (optional) |
| nodes |
object or array, sidebar nodes to add |
Returns object.
Description
The nodes argument can be either an object or array of objects. If it is an object it
represents a sidebar node that will be added to .nodes array.
If it is an array then each element of the array will be treated as a separate sidebar node object.
The first optional argument parent is an id of the parent node or parent node itself. If
parent node is not specified, new nodes will be inserted at the root level.
The method will return last inserted node.
If you defined the object in the following way:
You can:


Library
The Library page in the SVL Simulator user interface displays the set of maps and vehicles that you have added to your account, and which are available for use in simulations.
Introduction top#
Library is the central place for all of the content and data associated with your SVL Simulator account. You can access your maps and vehicles from anywhere once you log in to your account, allowing you to save your content in the cloud, including your own map environments, plugins, vehicle models, and sensor configurations.
Maps top#
When you log in for the first time, your Library page will be empty.
You can click:
- "All" to see all maps that you have added to your Library.
- "Owned by me" lists maps for which you are the owner (meaning they were built and uploaded by you).
- "Shared by me" lists maps that are owned by you and were to other users (using the Sharing feature).
- "Shared with me" lists maps that were shared with you by others users.
Adding a map top#
You can add maps to your Library from either the Store page or by clicking the "Add new" button at the top right.
To upload your own map:
-
From the Library, click the "Add new" button.
-
Drag and drop or click to upload an AssetBundle which you have built for the version of SVL Simulator you are running.
-
Once the upload has finished and the AssetBundle has been processed, fill in the details about your new map, including Map Name, Description, License, Copyright, and Tags.
-
Click "Publish" to publish the map to your personal library, allowing it to be used in your simulation configurations. You can click "Keep as draft" to save and publish later.
Viewing a map top#
Once you have successfully added a map to your Library, you will be able to see the map and its details when you select it.
There are several additional actions possible on a map page:
- Edit: You can edit the map's detail information.
- Share: You can share your private maps with other users to allow them to use the map in their simulations.
- Download the associated HD map in various supported formats that were built into the asset.
Editing a map top#
Editing a map allows you to update the details about your new map, including Map Name, Description, License, Copyright, and Tags. If the map is your own, then you can also update the asset bundle of the map and also upload new asset bundles for supporting various 'SVL Simulator' versions.
There are several additional actions possible when editing:
- Add to Store: You can make the map public so that other users may add it to their library.
- Unpublish: You can "unpublish" the map and return it to the "draft" status, disabling the ability for you to use it in a valid simulation.
- Delete Map: Delete the map entirely from your account and library. Once you do this, you will need to go back to where you obtained the map (or re-upload it) in order to add it to your library again.
NOTE: Any changes to the map such as Removing from the Store, or Unpublishing it, or Deleting will not be retroactively applied. That is the changes will have no impact on the users who already have the map in their library. For example, if a map is already in a user's library, then that user can continue to use the map in the simulations even if the map has been removed from the store or has been deleted or unpublished by the owner.
Creating a map top#
Please see the Assets document for more information on creating and building custom maps and vehicles for SVL Simulator in Developer Mode. You can read the Map Annotation page for instructions on annotating, importing, and exporting HD maps.
Vehicles top#
The Vehicle tab under Library contains the list of vehicles available for you to use in your simulations.
Adding a vehicle top#
You can add vehicles to your Library from either the Store page or by clicking the "Add new" button at the top right.
To upload your own vehicle:
-
From your Library, click the "Add new" button.
-
Drag and drop or click to upload an AssetBundle which you have built for the version of 'SVL Simulator' you are running. You can see how to create and build your own vehicle here.
-
Once your vehicle has successfully uploaded, you can fill in its information. Click "Next" to configure the sensors for this vehicle.
-
Each vehicle can have multiple configurations and must have at least one configuration to use the vehicle in a simulation. Click "Create New Configuration" to create a new configuration or "Next" to continue without a configuration. You can create a configuration later by editing the vehicle.
-
If you have created a configuration, enter a name for the configuration, select a Bridge, and click "Create".
-
Once you have created a configuration, you may add sensors using the "+" icon next to the "Root (Base Link)". More information about sensor configuration is available in Editing Vehicles
-
Click "Publish" to publish the vehicle to your personal Library, allowing it to be used in your simulation configurations. You can click "Keep as draft" to save and publish later.
Viewing a Vehicle top#
Once you have successfully added a vehicle to your Library page, you will be able to see the vehicle and its details when you select it.
On a vehicle page, there are several additional actions you can take:
- Share: You can share your private vehicles with other users to allow them to use the vehicle in their simulations.
- Edit: Change the vehicle's detailed information including Name, Description, License, Copyright, and Tags.
- Sensor Configurations: Add, Modify, Copy, or Delete a sensor configuration for the vehicle.
Editing a Vehicle top#
Editing a vehicle allows you to update the details about your new vehicle, including Name, Description, License, Copyright, and Tags. If the vehicle is your own, then you can also update the asset bundle of the vehicle and also upload new asset bundles for supporting various 'SVL Simulator' versions.
There are several additional actions possible when editing:
- Add to Store: You can make the vehicle public so that other users may add it to their library.
- Unpublish: You can "unpublish" the vehicle and return it to the "draft" status, disabling the ability for you to use it in a valid simulation.
- Delete Vehicle: Delete the vehicle entirely from your account and library. Once you do this, you will need to go back to where you obtained the vehicle (or re-upload it) in order to add it to your library again.
NOTE: Any changes to the vehicle such as Removing from the Store, or Unpublishing it, or Deleting will not be retroactively applied. That is the changes will have no impact on the users who already have the vehicle in their library. For example, if a vehicle is already in a user's library, then that user can continue to use the vehicle in the simulations even if the vehicle has been removed from the store or has been deleted or unpublished by the owner.
Managing Sensor Configurations top#
Each vehicle can have multiple sensor configurations. When you use a vehicle in a simulation, you will have an opportunity to select the sensor configuration to use in that simulation. The currently available sensor configurations are listed on the vehicle page. If a vehicle was added from the Store or if a vehicle is shared with you, you will also see the configurations created by the owner of the vehicle.
To create or modify a new sensor configuration when viewing a vehicle, click the icon to the right of "Sensor Configurations". When editing a vehicle, click the "Sensor Configurations" tab at the top of the view.
The Sensor Configurations tab provides several actions:
- Create: You can create a new configuration using the "Create New Configuration" button.
- View / Edit: You can view any configuration or edit a configuration you own by selecting the configuration or the Edit icon for a configuration.
- Copy: You can create a copy of an existing configuration using the Copy icon. If you want to modify a configuration from a different users, you must first create your own copy of that configuration and then modify the copy.
- Delete: You can delete any configuration that you own using the Delete icon which will permanently remove it entirely from the vehicle. You will be prompted to confirm the deletion before continuing.
Modifying a Sensor Configuration top#
The sensor configuration editor allows you to visually update the position and properties of a sensor used in this configuration.
Each sensor has a parent which is either the "Root (Base Link)" or is another sensor. To add new sensors, click the "+" icon next to the parent and select the sensors you wish to add.
Each sensor can be customized by selecting the senor from the tree view and modifying the values in the form that loads below.
- The "Sensor Type" field is read-only and represents the plugin name.
- The "Name" field must be unique for this sensor configuration and helps to identify the sensor in the tree view and in the simulation.
- The transformation fields, "X", "Y", "Z", "Pitch", "Yaw", and "Roll" configure the position of the sensor relative to its parent position and orientation.
Many sensors have additional configuration properties that can be customized. These fields are displayed below the transformation fields.
Note: You do not need to "Save" after editing a sensor but must click "Save" to commit all of the changes you have made.
Migrating Legacy Sensor Configurations top#
If you have an older legacy sensor configuration that uses the type
instead of the plugin
field to identify the plugins, you can select the "<>" icon in the Preview header to paste this configuration into the JSON Editor. Clicking "Save" will validate and save the configuration and return an updated version compatible with the current schema.
NOTE: Most of the sensor type
names have changed since 2021.1 release. You can find the latest type
names from sensors documentation.
Working with Sensor Configurations created by other users top#
When a vehicle is shared with you or when a vehicle is added to the library, you also gain access to the sensor configurations created by the owner of the vehicle. Sometimes, these sensor configurations may contain plugins that you do not have in your library. When that occurs, you will see warning messages with available actions for each type of problem.
- If a plugin is available in the store but not in your Library, you can add it by clicking "Add to Library" next to the warning.
- If a plugin is owned by another user but not in the Store, you can request access to it from the owner by clicking "Request Access" next to the warning.
- If a plugin has been deleted by the owner but still exists in the sensor configuration, it must be removed by the owner before you can use this sensor configuration in a simulation.
Bridge Types#
No bridge
: This is the default. This is used when there is no need to connect to an AD Stack. This selection does not require any additional information while setting up the Simulation.ROS
: This bridge allows connecting to ROS1 based AV stacks. (like Autoware). The ROS1 Bridge requires an IP address and port number while setting up the Simulation.ROS Apollo
: This bridge allows connecting to ROS1 based AV stacks which requires protobuf message format. (like Apollo 3.0). ROS1 Apollo Bridge requires an IP address and port number while setting up the Simulation.ROS2
: This bridge allows connecting to ROS2 based AV stacks. ROS2 Bridge requires an IP address and port number while setting up the Simulation.CyberRT
: This bridge allows connections to Apollo 5.0. CyberRT Bridge. CyberRT requires an IP address and port number while setting up the Simulation.
Example sensor configuration JSON#
You can find example sensor configurations for several Autopilot systems on the following pages:
Below is a shortened version of the JSON configuration on the Jaguar2015XE (Autoware)
default vehicle. It uses a ROS
bridge type.
The JSON includes:
- a GPS sensor in the center of the vehicle that publishes data on the "/nmea_sentence" topic
- a LiDAR sensor 2.312m above the center of the vehicle that publishes data on the "/points_raw" topic
- a Keyboard Control input which allows the keyboard input to control the car
- a Vehicle Control input which subscribes to the Autoware AD Stack control commands
[
{
"type": "GPS Device",
"name": "GPS",
"params": {
"Frequency": 12.5,
"Topic": "/nmea_sentence",
"Frame": "gps",
"IgnoreMapOrigin": true
},
"transform": {
"x": 0,
"y": 0,
"z": 0,
"pitch": 0,
"yaw": 0,
"roll": 0
}
},
{
"type": "Lidar",
"name": "Lidar",
"params": {
"LaserCount": 32,
"MinDistance": 0.5,
"MaxDistance": 100,
"RotationFrequency": 10,
"MeasurementsPerRotation": 360,
"FieldOfView": 41.33,
"CenterAngle": 10,
"Compensated": true,
"PointColor": "#ff000000",
"Topic": "/points_raw",
"Frame": "velodyne"
},
"transform": {
"x": 0,
"y": 2.312,
"z": -0.3679201,
"pitch": 0,
"yaw": 0,
"roll": 0
}
},
{
"type": "Keyboard Control",
"name": "Keyboard Car Control"
},
{
"type": "Vehicle Control",
"name": "Autoware Car Control",
"params": {
"Topic": "/vehicle_cmd"
}
}
]
Plugins top#
When you log in for the first time, your Library page will contain the default Bridge plugins.
You can click:
- "All" to see all plugins that you have added to your Library.
- "Owned by me" lists plugins for which you are the owner (meaning that these were built and uploaded by you).
- "Shared by me" lists plugins for which you are the owner were shared to other users by you.
- "Shared with me" lists plugins that were shared to you by other users.
Adding a plugin top#
You can add plugins to your Library from either the Store page or by clicking the "Add new" button at the top right.
To upload your own plugin:
-
From the Library, click the "Add new" button.
-
Drag and drop, or click to upload an AssetBundle which you have built for the version of SVL Simulator you are running.
-
Once the upload has finished and the AssetBundle has been processed, fill in the details about your new plugin, including Plugin Name, Description, License, Copyright, and Tags.
-
Click "Publish" to publish the plugin to your personal library, allowing it to be used in your simulations. You can click "Keep as draft" to save and publish later.
Viewing a plugin top#
Once you have successfully added a plugin to your Library page, you will be able to see the plugin and its details.
There are several additional actions possible on a plugin page:
- Edit: You can edit the plugin's detail information.
- Share: You can share your private plugins with other users to allow them to use the plugin in their simulations.
Editing a plugin top#
Editing a plugin allows you to update the details about your new plugin, including Plugin Name, Description, License, Copyright, and Tags. If the plugin is your own, then you can also update the asset bundle of the plugin and also upload new asset bundles for supporting various 'SVL Simulator' versions.
There are several additional actions possible when editing:
- Add to Store: You can make the plugin public so that other users may add it to their library.
- Unpublish: You can "unpublish" the plugin and return it to "draft" status, disabling the ability for you to use it in a valid simulation.
- Delete Plugin: Delete the plugin entirely from your account and library. Once you do this, you will need to go back to where you obtained the plugin (or re-upload it) in order to add it to your library again.
NOTE: Any changes to the plugin such as Removing from the Store, or Unpublishing it, or Deleting will not be retroactively applied. That is the changes will have no impact on the users who already have the plugin in their library. For example, if a plugin is already in a user's library, then that user can continue to use the plugin in sensor configurations and use them in simulations even if the plugin has been removed from the store or has been deleted or unpublished by the owner.


There are three coding rules implemented in G6 Chinese Input Method:
1. For single Chinese character with number of strokes less than or equals to six, full strokes coding rules with correct hand-written stroke order is used to encode the character, which is identical with those common stroke-based Chinese Input Method.
2. For single Chinese character with number of strokes greater than six, "3 + 3" character coding rule is applied to encode the character. The former '3' represents the first three strokes of the character, indicating its first radical. The latter '3' represents the last three strokes of the character for further differentiation.
3. For multiple Chinese characters, "3 + 3" phrase coding rule is applied to encode the character. The former '3' represents the first three strokes of the first character in the phrase, while the latter '3' represents the first three strokes of the last character in the phrase.
| Functions/Features | Quick Access Key | Descriptions |
|---|---|---|
| Chinese Language Input | Enable for Chinese Input. Disable for English Input |
|
| G6 Character Input | Y / R | Enable for Chinese Input in G6 Coding Stroke Order. Disable for Full Stroke Order. |
| G6 2-characer Phrase Input | H / F | Enable for 2-character Phrase Input in G6 Coding Stroke Order |
| G6 3-characer Phrase Input | N / C | Enable for 3-character Phrase Input in G6 Coding Stroke Order |
| G6 M-characer Phrase Input | M / X | Enable for M-character Phrase Input in G6 Coding Stroke Order |
| Punctuation Input | P | Enable for Chinese Punctuation Input |
| Simplified Chinese Input | Enable for Simplified Chinese Input | |
| UIOJKL Keyboard | Enable for UIOJKL Keyboard for Chinese Strokes | |
| JKLUIO Keyboard | Enable for JKLUIO Keyboard for Chinese Strokes | |
| Single Hand Configuration | Use Number 0, 9 to 2 as Candidate Index for Selection | |
| Single Left-hand Configuration | Enable for QWEASD (or ASDQWE) Keyboard for Chinese Strokes | |
| Word Prediction | Guess the Next Character for Selected Input | |
| Adaptive Ranking | Sort Candidate List by Frequency in Descending Order |
The following figure show the keyboard assignment for Left-hand typists abd Right-hand typists through above configurations:


@use super::{header_html, footer_html}; @(series: Vec) @:header_html(Some("Blog"), None) Post Series @for set in series { @set }


Toggle navigation
IMGS
About
Contact
Sign up
Login
The Xuanxuan Image Gallery
A pictures gallery built by bootstrap


| 2G Network |
GSM 850 / 900 / 1800 / 1900 |
| 3G Network |
HSDPA 850 / 900 / 1700 / 1900 / 2100 |
| SIM |
Micro-sim |
| Announced |
2012,April |
| Status |
Available. Released 2012, June |
BODY
|
| Dimensions |
133 x 68 x 10.8 mm (5.24 x 2.68 x 0.43 in) |
| Weight |
144 g (5.08 oz) |
DISPLAY
|
| Type |
LED-backlit LCD, capacitive touchscreen, 16M colors |
| Size |
720 x 1280 pixels, 4.55 inches (~323 ppi pixel density) |
| Multitouch |
Yes, upto 4 fingers. |
| Protection |
Scratch-resistant glass |
SOUND
|
| Alert Types |
Vibration; MP3 ringtones |
| Loudspeaker |
Yes |
| 3.5mm Jack |
Yes |
MEMORY
|
| Card slot |
microSD, up to 32 GB |
| Internal |
13.2 GB (12.9 GB user available), 1 GB RAM |
FEATURES
|
| OS |
Android OS, v2.3 (Gingerbread), planned upgrade to v4.1 (Jelly Bean) |
| Chipset |
Qualcomm MSM8260 Snapdragon |
| CPU |
Dual-core 1.5 GHz |
| GPU |
Adreno 220 |
| Sensors |
Accelerometer, gyro, proximity, compass |
| Messaging |
SMS(threaded view), MMS, Email, Push Mail, IM |
| Browser |
HTML5, Adobe Flash |
| Radio |
Stereo FM radio with RDS |
| GPS |
Yes, with A-GPS support and GLONASS |
| JAVA |
Yes, via Java MIDP emulator |
| Colors |
Black, Red |


A distributed implementation of {@link org.apache.hadoop.fs.FileSystem} that uses Amazon S3.
Files are stored in S3 as blocks (represented by {@link org.apache.hadoop.fs.s3.Block}), which have an ID and a length. Block metadata is stored in S3 as a small record (represented by {@link org.apache.hadoop.fs.s3.INode}) using the URL-encoded path string as a key. Inodes record the file type (regular file or directory) and the list of blocks. This design makes it easy to seek to any given position in a file by reading the inode data to compute which block to access, then using S3's support for HTTP Range headers to start streaming from the correct position. Renames are also efficient since only the inode is moved (by a DELETE followed by a PUT since S3 does not support renames).
For a single file /dir1/file1 which takes two blocks of storage, the file structure in S3 would be something like this:
/ /dir1 /dir1/file1 block-6415776850131549260 block-3026438247347758425
Inodes start with a leading /
, while blocks are prefixed with block-
.


Frawea
Frawea
repo for testing thwlfu's stuff
Add to Cydia
Add to Sileo
Add to Zebra
Packages
Blasis beta
Blasis beta theme with custom ui,respring animation,dock,badges and other stuff you like see on your jailbroken device!
More info
SuperGrade beta
SuperGrade theme
View SuperGrade Beta 1.0


This page is an example of how cubes can be resized both vertically and horizontally based on a percentage of the window width. These cubes are set at 20 and 25 percent respectively (decimal numbers are also allowed for more exact sizing). The resizing of first 4 cubes is done by a small bit of JavaScript, see source code of this page for details. There is a minimum width defined for window size which is 400, so the first cube would always be at least 80 pixels wide.
Next 2 cubes are a little larger because the height is increased to adjust
for the button bar and slider (see best appearance recommendation in the Using Simulator in Web Pages section in AnimCubeJS documentation).
The resizing of next 4 cubes is done by a small bit of CSS (without using JavaScript), see source code of this page for details. There is a minimum width defined for first cube which is 80 pixels.
Next 2 cubes are a little larger because the height is increased to adjust
for the button bar and slider (see best appearance recommendation in the Using Simulator in Web Pages section in AnimCubeJS documentation).


This is a shadow
Thisshowsaproblemwithaverylongword
Thisshowsaproblemwithaverylongword
Thisshowsaproblemwithaverylongword
Thisshowsaproblemwithaverylongword


The media player component can be used to view video and audio files. It supports a range of the most popular video and audio file formats. A comprehensive list of supported formats in each browser can be found here.
To add a media player to your page use the ux-media-player
selector. The following attributes can be used to
configure the appearance and behavior of the media player:
video
and audio
.
The media player will adapt it's appearance to best suit the type specified.
anonymous
keyword means that there will be no exchange of user credentials when the media source is fetched.
To provide subtitles or closed captions add an HTML track
element as a child of the ux-media-player
.
More information on the track
element can be found here.
Custom controls can be added to the media player by adding a child element with a uxMediaPlayerCustomControl
attribute.
To programmatically control the media player you can either:
MediaPlayerService
.MediaPlayerService
on the ux-media-player
component.The following code can be used to create the example above:


{% extends "about.html" %} {% block entry %}
Target IP - The server IP you are attacking. It is recommended to not use a hostname, as DNS lookups significantly slow the current version of Jawfish down. Example: <IP_ADDRESS>
Address - The path URL to the vulnerable page. Example: /herp/derp/vuln.php
Vulnerability - This is the POST or GET variable to be exploited.
Method - This can be either POST or GET, for the penetration test method. Defines the behavior of Jawfish as it communicates over HTTP POSTs and GETs.
Previous page Next page {% endblock %}


Note: Files will not be uploaded to the server by the demo control. Application teams must implement server code.
Angular File Upload provides a control for uploading files. It supports native HTML5 uploads and degrades to an iframe target implementation for legacy browsers.
To create an area where files can be dragged for upload, use the nv-file-drop
directive.
If the nv-file-over
directive is placed on an element, it will have a class added to it when a file is about
to be placed into the drop area. By default this class is nv-file-over
but can be set with the parameter attribute
over-class="className"
.
Alternatively the nv-file-select
attribute can be added to an <input type="file">
element
to create a button which will open a standard file browsing dialogue.
When creating a control with nv-file-drop
or nv-file-select
, you must also pass an instance of
FileUploader to the uploader attribute. FileUploader at minimum should be instantiated with the url to upload to, but can
take additional parameters including formData for POST requests and filters to be applied to files before they are added
to the upload queue.
Attributes are defined in the controller: uploader
- mandatory, instance of FileUploader.
The FileUploader object has the following callbacks for adding custom logic:
(item, filter, options)
.
(item)
.
(addedFileItems)
.
(item)
.
(item, progress)
.
(progress)
.
(item, response, status, headers)
.
(item, response, status, headers)
.
(item, response, status, headers)
.
(item, response, status, headers)
.
Below you can see the methods available on the FileUploader object.
(files, options, filters)
where files is a FileList|File|HTMLInputElement
,
options is an object and filters is a string.
FileItem
or index of item.
FileItem
or index of item.
FileItem
or index of item.
Below is a brief description of the parameters:
These callbacks return FileItem objects, which contain the data of your uploaded file. You can then apply your own processing or use the upload method on the FileItem object to send the file to the url you previously set.
If creating a file drop zone, hide the file input with the sr-only
class, as this will allow users of assistive
technologies to access it via the keyboard.
File upload on click is also available in this drop area by adding the <input type="file">
element. The
for
attribute of the label
should refer to the id
of the input
element.
Below you can see the sample code used in our example:
Refer to AngularFileUpload for further details on methods and options available.


September 12, 2019
In this post, we install Whonix 15 on a Linux computer using VirtualBox for virtualization. Our examples are all for a recent version of Debian or Ubuntu, but you can easily adapt them for other Linux distros.
For a general discussion of security for political activists, see https://program-think.blogspot.com/2019/01/Security-Guide-for-Political-Activists.html. If necessary, use https://translate.google.com to translate into your own language.
Before you begin, you will need a host computer running a Linux distribution. If you have a host computer running Windows and you want to completely replace Windows with Linux, you can refer to the posts https://arcdetri.github.io/install-ubuntu-18-04.html or https://arcdetri.github.io/install-debian-10-xfce.html.
If you are behind the GFW, you will also need the configuration details of a ShadowsocksR server. You can either use a friend's SSR server, or you can set up one yourself. Some instructions for creating an SSR server on a VPS are given in the post https://arcdetri.github.io/shadowsocksr-ssr-on-ubuntu.html.
Before you go any further, update your existing software packages on your host computer. Open a terminal emulator and issue the commands:
sudo apt update
sudo apt upgrade
The GFW blocks Tor and all public bridges. If you are behind the GFW, you can obfuscate your use of Tor using ShadowsocksR. The instructions for installing the SSR client on Linux are given in the post https://arcdetri.github.io/shadowsocksr-ssr-on-ubuntu.html. The process is similar for both Debian and Ubuntu. Here is a short summary of the necessary commands. For comments on the purpose of these commands, see the post just linked to.
sudo apt install wget zip unzip python-m2crypto libsodium23
cd ~/Downloads
wget https://github.com/shadowsocksrr/shadowsocksr/archive/manyuser.zip
unzip manyuser.zip
mv shadowsocksr-manyuser shadowsocksr
sudo vi /etc/shadowsocks.json
Edit the configuration JSON file to match the parameters required by your server. When you have done so, write the file to disk and quit the editor. You can then start the SSR client daemon running:
cd shadowsocksr/shadowsocks
sudo python local.py -c /etc/shadowsocks.json -d start
Once the SSR client is running and listening on localhost port 1080, configure Firefox to proxy traffic to localhost port 1080. Again, there are more details of how to do this on the post just linked to.
Install the prerequisites for VirtualBox and the Linux kernel headers for your distro with the command:
sudo apt install gcc make perl linux-headers-$(uname -r)
Now open Firefox and download VirtualBox for your Linux distro from https://www.virtualbox.org/wiki/Linux_Downloads. Currently the download for recent Ubuntu and Debian distros is named virtualbox-6.0_6.0.12-133076~Ubuntu~bionic_amd64.deb
. It is about 100 MB.
Also download the SHA256 checksums file from that same page. Look for the line giving the expected SHA256 checksum for your distro. In our example, that would be the line:
2258c9966a4f73fa6402c42babaab4a22f217aeb013d57186f7d878776b0bcbe *virtualbox-6.0_6.0.12-133076~Ubuntu~bionic_amd64.deb
Open a terminal emulator and issue the commands:
cd ~/Downloads
sha256sum virtualbox-6.0_6.0.12-133076~Ubuntu~bionic_amd64.deb
You should see a result that matches the stated value. For example:
2258c9966a4f73fa6402c42babaab4a22f217aeb013d57186f7d878776b0bcbe
Once you have verified the VirtualBox download, install VirtualBox with the command:
sudo dpkg -i virtualbox-6.0_6.0.12-133076~Ubuntu~bionic_amd64.deb
You likely have dependency problems that result in errors. Resolve them with the command:
sudo apt install -f
Add your user to the vboxusers group:
sudo usermod -a -G vboxusers yourusername
replacing yourusername
with your actual user name.
In Firefox, visit https://www.virtualbox.org/wiki/Downloads and download the VirtualBox Extension Pack.
It has a name that looks like Oracle_VM_VirtualBox_Extension_Pack-6.0.12.vbox-extpack
. It is currently about 22 MB.
Launch Oracle VM VirtualBox. Go to File > Preferences > Extensions. Add your downloaded VirtualBox extension pack. Click Install. Read the license agreement, and click I Agree. Enter your password and click Authenticate. Click OK to close the Preferences window.
Whonix 15 introduces unified ova downloads. Rather than separate Whonix-Gateway ™ and Whonix-Workstation ™ ova downloads, there is now only a single Whonix ova, which includes both Whonix virtual machines (VMs): Whonix-Gateway and Whonix-Workstation.
To download the Whonix virtual appliance, open Firefox and visit https://www.whonix.org/wiki/VirtualBox/XFCE.
Download the virtual appliance. This is currently named Whonix-XFCE-<IP_ADDRESS>.9.ova
. It is about 1.6 GB.
Also download the OpenPGP signature for the virtual appliance, which is currently Whonix-XFCE-<IP_ADDRESS>.9.ova.asc
. This is just 1 kB.
Download the Whonix signing key (i.e. Patrick Schleizer's OpenPGP public key) from the page at https://www.whonix.org/wiki/Patrick_Schleizer and save it as ~/Downloads/patrick.asc
. This is 61 kB.
Check the fingerprint before you do the actual import. Open a terminal emulator and issue the commands::
cd ~/Downloads
gpg --keyid-format long --import --import-options show-only --with-fingerprint patrick.asc
Verify the output. The output should look like the following:
pub rsa4096/8D66066A2EEACCDA 2014-01-16 [SC] [expires: 2021-04-17]
Key fingerprint = 916B 8D99 C38E AF5E 8ADC 7A2A 8D66 066A 2EEA CCDA
uid Patrick Schleizer<EMAIL_ADDRESS>sub rsa4096/3B1E6942CE998547 2014-01-16 [E] [expires: 2021-04-17]
sub rsa4096/10FDAC53119B3FD6 2014-01-16 [A] [expires: 2021-04-17]
sub rsa4096/CB8D50BB77BB3C48 2014-01-16 [S] [expires: 2021-04-17]
Once you have verified the fingerprint, import the signing key:
gpg --import patrick.asc
The output should confirm that 1 key was processed and 1 key was imported.
Start the cryptographic verification of the Whonix virtual appliance. It can take several minutes.
gpg --verify-options show-notations --verify Whonix-XFCE-<IP_ADDRESS>.9.ova.asc Whonix-XFCE-<IP_ADDRESS>.9.ova
If the virtual appliance download is valid, the output will tell you that you have a Good signature
.
It is normal to see messages:
gpg: WARNING: This key is not certified with a trusted signature!
gpg: There is no indication that the signature belongs to the owner.
If you have any doubts about the validity of the virtual appliance, consult the full instructions at https://www.whonix.org/wiki/VirtualBox/Verify_the_virtual_machine_images_using_the_command_line.
Launch Oracle VM VirtualBox on your host. Click File, then choose Import Appliance.
Locate and select the Whonix image (Whonix-XFCE-<IP_ADDRESS>.9.ova
in our example). Click Next.
Do not change any of the default options. Just click Import.
When you see the software license agreement, click Agree.
Wait until Whonix-XFCE-<IP_ADDRESS>.9.ova
has been imported. This can take several minutes.
In VirtualBox, select the virtual machine for Whonix-Gateway-XFCE. Click the Start button. Wait while the virtual machine starts up.
Read and then dismiss the notifications.
When you come to information screen 1/2, read it, select the radio button for Understood / Verstanden, and click Next. Again with page 2/2, read it, select the radio button for Understood / Verstanden, and click Next. Click Finish.
If you are not behind a restrictive firewall, you can connect directly. Select the radio button Connnect, and click Next.
If you are behind the GFW, you must proxy Tor through SSR.
Instead of connecting immediately, select the radio button Configure, and click Next.
Leave the checkbox for Tor bridges unchecked, and click Next.
Check the box for local proxy configuration.
<IP_ADDRESS>
.1080
.The effect of using this control panel is to add a line to /usr/local/etc/torrc.d/40_tor_control_panel.conf
:
Socks5Proxy <IP_ADDRESS>:1080
Click Next.
Click Next again.
Tor bootstrapping happens. You should see messages "Tor bootstrapping done" and "Bootstrap phase: Connected to the Tor network!"
Click Finish.
Leave the gateway machine running.
In VirtualBox, select the virtual machine for Whonix-Workstation-XFCE. Click the Start button.
The workstation VM is where you will do all your work. Wait while it start.
Read and then dismiss the notifications.
When you come to information screen 1/2, read it, select the radio button for Understood / Verstanden, and click Next. Again with page 2/2, read it, select the radio button for Understood / Verstanden, and click Next. Click Finish.
Wait a few minutes for the workstation to carry out its checks in the background.
Check end-to-end connectivity by opening the Web Browser (Tor Browser AnonDist). The first time you do this, there is some information to read about safe browsing and disabling of JavaScript. Click Yes or No according to your requirements.
In the Tor Browser, visit:You should see a message: "Congratulations. This browser is configured to use Tor."
To end your Whonix session, shut down the Whonix-Workstation first.

Then close VirtualBox.
If you have been using ShadowsocksR on the host, open a terminal emulator on the host and issue the commands:
cd ~/Downloads/shadowsocksr/shadowsocks
sudo python local.py -d stop
Also undo your proxy settings in Firefox.


BVHTriangleMeshShape3.
更多...
#include <BVHTriangleMeshShape3.h>
BVHTriangleMeshShape3.
This class define a BVHTriangleMesh Shape.
- 參閱
- Shape3
| BVHTriangleMeshShape3::BVHTriangleMeshShape3 |
( |
| ) |
|
| BVHTriangleMeshShape3::~BVHTriangleMeshShape3 |
( |
| ) |
|
| bool BVHTriangleMeshShape3::construct |
( |
const char * |
path_ | ) |
|
construct the BVHTriangleMeshShape3.
- 參數
-
| path_,the | path for the trimesh resource |
- 傳回值
- true if success, false if fail.
| void BVHTriangleMeshShape3::getMassProp |
( |
float |
density, |
|
|
float & |
mass, |
|
|
Vector3 & |
localInertia |
|
) |
| const |
|
virtual |
calculate the mass and moment of inertia according to the shape and density
- 參數
-
| density,the | density of the shape |
| mass,the | result of the mass of the shape is returned here |
| localInertia,the | result of the moment of inertia of the shape is returned here |
此類別(class) 文件是由下列檔案中產生:
- C:/EpicForceBackup/EpicForceEngine/EpicForceEngine/MagnumEngineLib/MagnumCore/BVHTriangleMeshShape3.h
- C:/EpicForceBackup/EpicForceEngine/EpicForceEngine/MagnumEngineLib/MagnumCore/BVHTriangleMeshShape3.cpp


TL;DR
Concurrency with TPL is fairly simple. In this blog post, I will reiterate over fundamentals and share with you some common patterns that you could use to compose your solutions. This blog post is focused on the concurrent processing of a collection of tasks and possible semantics that could be considered during the design of a solution.
Examples and source code can be found here: nikiforovall.blog.examples/tap-composition
Part I: Fundamentals
The Task class provides a life cycle for asynchronous operations, and that cycle is represented by the TaskStatus
enumeration. Exceptions occurring during the execution of an asynchronous method are assigned to the returned Task
. If the cancellation request is honored such that work is ended prematurely, the Task
returned from the TAP method will end in the TaskStatus.Canceled
state. Finally, await
operator unwraps the result of executing depending on TaskStatus
.
Built-in task combinators: Task.Run
, Task.FromResult
, Task.WhenAll
, Task.WhenAny
, Task.Delay
.
Task.WhenAll & Task.WhenAny
Task.WhenAll
returns a brand-new Task
. It represents the final result of batch execution. If a cancellation (or exception) happens during Task.WhenAll
the result will be in TaskStatus.Canceled
(TaskStatus.Faulted
), but other tasks are not terminated.
The Task.WhenAny
is used to asynchronously wait on multiple asynchronous operations represented as Tasks, asynchronously waiting for just one of them to complete. Unlike Task.WhenAll
, which in the case of successful completion of all tasks returns a list of their unwrapped results, Task.WhenAny
returns the Task
that completed.
I suggest you investigate the behavior of Task.WhenAll and Task.WhenAny by exploring Unit Tests, so you understand how it behaves in certain scenarios.
Part II: Combinators
Let’s compare processing algorithms by the following qualities:
- Order of processing. Indicates how tasks are scheduled and executed relative to each other.
- Process as Complete. Describes how and when the results are processed.
- Throttled. Possibility to control the amount of workload at a given point in time.
- Batch Cancellation. Possibility to cancel other tasks in case of cancellation request.
- Interleaving. Isolated result processing.
Vanilla Task.WhenAll
WhenTask.WhenAll
is used on a collection of tasks, all tasks are run to completion, i.e.: Task.IsCompleted = true
. Results could be unwrapped from Task<TResult[]>
.
| Name | Order of processing | Process as Complete | Throttled | Batch Cancellation | Interleaving |
|---|---|---|---|---|---|
Task.WhenAll |
Concurrent ⭐ | false |
false |
Pass cancellation token to each task | N/A, results are aggregated and it is up to implementor how to process them |
E.g.:
[Fact]
public async Task WhenAll_Result_Unwrapped()
{
var job1 = RunJob(100, 1);
var job2 = RunJob(300, 2);
var whenAllTask = Task.WhenAll(job1, job2);
var results = await whenAllTask;
Assert.Equal(new int[] { 1, 2 }, results);
Assert.True(whenAllTask.IsCompletedSuccessfully);
Assert.Equal(TaskStatus.RanToCompletion, whenAllTask.Status);
}
Cancellation variation:
[Fact]
public async Task WhenAll_SharedCancellationToken_AllCancelled()
{
var cancellationTokenSource = new CancellationTokenSource(50);
var t = cancellationTokenSource.Token;
var job1 = RunJob(100, 1, t);
var job2 = RunJob(150, 2, t);
var job3 = RunJob(200, 3, t);
List<Task> batch = new() { job1, job2, job3 };
var whenAllTask = Task.WhenAll(batch);
try
{ await whenAllTask; }
catch { };
Assert.All(batch, t => Assert.True(t.IsCanceled));
}
Sequential ForEachAsync
Very simple implementation, just to demonstrate the different sides of the problem.
| Name | Order of processing | Process as Complete | Throttled | Batch Cancellation | Interleaving |
|---|---|---|---|---|---|
SequentialBlockingForEachAsync |
Sequential | false , sequential nature of processing impedes this |
true , not possible to control concurrency level |
N/A, easy to add on demand | true ⭐ |
public static class SequentialBlockingForEachAsync
{
public static async Task ForEachAsync<TResult, TSource>(
this IEnumerable<TSource> list,
Func<TSource, Task<TResult>> taskSelector,
Action<TSource, TResult> resultProcessor)
{
foreach (var value in list)
{
resultProcessor(value, await taskSelector(value));
}
}
}
💡 Note, you can change the parameter resultProcessor
to run continuation or adjust to your needs.
Run the code:
private static IEnumerable<int> GenerateData()
{
yield return 3;
yield return 2;
yield return 1;
}
[Benchmark]
public async Task SequentialBlocking() =>
await GenerateData().ForEachAsync(async i =>
{
await Task.Delay(i * 100);
return i;
}, Empty);
private static void Empty<T>(T source, T result) { }
// | Method | Mean | Error | StdDev |
// |------------------- |---------:|--------:|--------:|
// | SequentialBlocking | 600.8 ms | 0.19 ms | 0.18 ms |
Concurrent Interleaved ForEachAsync
The goal of this implementation is to achieve the maximum concurrency, but process results separate from each other:
Can be described as following: (ref)
-
For each element in an enumerable, run a function that returns a
Task{TResult}
to represent the completion of processing that element. All of these functions may run asynchronously concurrently. -
As each task completes, run a second processing action over the results. All of these actions must be run sequentially, but order doesn’t matter.
| Name | Order of processing | Process as Complete | Throttled | Batch Cancellation | Interleaving |
|---|---|---|---|---|---|
ConcurrentInterleavedForEachAsync |
Concurrent ⭐ | true |
false |
N/A, easy to add on demand | true ⭐ |
public static class ConcurrentIsolatedForEachAsync
{
public static Task ForEachAsync<TSource, TResult>(
this IEnumerable<TSource> source,
Func<TSource, Task<TResult>> taskSelector, Action<TSource, TResult> resultProcessor)
{
SemaphoreSlim oneAtATime = new(initialCount: 1, maxCount: 1);
return Task.WhenAll(
from item in source
select ProcessAsync(item, taskSelector, resultProcessor, oneAtATime));
}
private static async Task ProcessAsync<TSource, TResult>(
TSource item,
Func<TSource, Task<TResult>> taskSelector, Action<TSource, TResult> resultProcessor,
SemaphoreSlim oneAtATime)
{
TResult result = await taskSelector(item);
await oneAtATime.WaitAsync();
try
{ resultProcessor(item, result); }
finally { oneAtATime.Release(); }
}
}
💡 Note, you can change the parameter resultProcessor
to run continuation or adjust to your needs.
Run the code:
private static IEnumerable<int> GenerateData()
{
yield return 3;
yield return 2;
yield return 1;
}
[Benchmark]
public async Task ConcurrentIsolated() =>
await GenerateData().ForEachAsync(
GenerateData(), async i =>
{
await Task.Delay(i * 100);
return i;
}, Empty);
private static void Empty<T>(T source, T result) { }
// | Method | Mean | Error | StdDev |
// |------------------- |---------:|--------:|--------:|
// | ConcurrentIsolated | 299.1 ms | 1.42 ms | 1.26 ms |
Concurrent Interleaved Combinator
For those who don’t like working with lambdas and ForEach
LINQ operator. Personally, I really like this approach because it produces better stack traces.
| Name | Order of processing | Process as Complete | Throttled | Batch Cancellation | Interleaving |
|---|---|---|---|---|---|
ConcurrentInterleavedCombinator |
Concurrent ⭐ | true |
false |
N/A, easy to add on demand | true ⭐ |
public static class ConcurrentInterleavedCombinator
{
public static Task<Task<T>>[] Interleaved<T>(IEnumerable<Task<T>> tasks)
{
var inputTasks = tasks.ToList();
var buckets = new TaskCompletionSource<Task<T>>[inputTasks.Count];
var results = new Task<Task<T>>[buckets.Length];
for (var i = 0; i < buckets.Length; i++)
{
buckets[i] = new TaskCompletionSource<Task<T>>();
results[i] = buckets[i].Task;
}
var nextTaskIndex = -1;
void continuation(Task<T> completed)
{
var bucket = buckets[Interlocked.Increment(ref nextTaskIndex)];
_ = bucket.TrySetResult(completed);
}
foreach (var inputTask in inputTasks)
{
_ = inputTask.ContinueWith(
continuation,
CancellationToken.None,
TaskContinuationOptions.ExecuteSynchronously,
TaskScheduler.Default);
}
return results;
}
}
Here, we create TaskCompletionSource<Task<T>>
instances to represent the buckets, one bucket per each of the tasks that will eventually complete. Then, we hook up a continuation to each input task. This continuation will get the next available bucket and store the newly completed task into it. ref
Run the code:
private static IEnumerable<int> GenerateData()
{
yield return 3;
yield return 2;
yield return 1;
}
[Benchmark]
public async Task ConcurrentInterleavedCombinator()
{
var tasks = GenerateData().Select(async i =>
{
await Task.Delay(i * 100);
return i;
});
foreach (var bucket in Interleaved(tasks))
{
var t = await bucket;
}
}
// | Method | Mean | Error | StdDev |
// |-------------------------------- |---------:|--------:|--------:|
// | ConcurrentInterleavedCombinator | 299.4 ms | 1.01 ms | 0.94 ms |
Throttled Interleaved WhenAll
Before this, we don’t really have control over consumed resources. It is a common task to implement throttling, here is how you can do that.
| Name | Order of processing | Process as Complete | Throttled | Batch Cancellation | Interleaving |
|---|---|---|---|---|---|
WhenAllThrottled |
Concurrent* | true |
true ⭐ |
N/A | true ⭐ |
public static class WhenAllThrottledExtensions
{
public static async Task WhenAllThrottled(this IEnumerable<Task> source, int throttled)
{
var tasks = new List<Task>();
throttled--;
foreach (var task in source)
{
if (tasks.Count == throttled)
{
var finishedTask = await Task.WhenAny(tasks);
_ = tasks.Remove(finishedTask);
}
tasks.Add(task);
}
await Task.WhenAll(tasks);
}
}
For more details, please see corresponding Unit Tests: Appendix - RunWhenAllThrottled.
💡 This is a simplified version without result processing. Try to convert this snippet to ThrottledForEachAsync
version.
Run the code:
private static IEnumerable<int> GenerateData()
{
yield return 2;
yield return 2;
yield return 1;
yield return 1;
}
[Benchmark]
public async Task ThrottledInterleaved() =>
await GenerateData().Select(i => Task.Delay(i * 100)).WhenAllThrottled(2);
// | Method | Mean | Error | StdDev |
// |--------------------- |---------:|--------:|--------:|
// | ThrottledInterleaved | 300.6 ms | 0.06 ms | 0.05 ms |
Throttled ControlDegreeOfParallelism ForEachAsync
You don’t always need interleaving. Let’s see the approach based on System.Collections.Concurrent.Partitioner
.
It limits the number of operations that are able to run in parallel. One way to achieve that is to partition the input data set into N partitions, where N is the desired maximum degree of parallelism, and schedule a separate task to begin the execution for each partition. ref.
| Name | Order of processing | Process as Complete | Throttled | Batch Cancellation | Interleaving |
|---|---|---|---|---|---|
ControlParallelismForEachAsync |
Concurrent* | true |
true ⭐ |
N/A | false ⭐ |
public static class ControlParallelismForEachAsyncExtensions
{
public static Task ForEachAsync<T>(this IEnumerable<T> source, int dop, Func<T, Task> body)
{
return Task.WhenAll(
from partition in Partitioner.Create(source).GetPartitions(dop)
select Task.Run(async delegate {
using (partition)
while (partition.MoveNext())
await body(partition.Current);
}));
}
}
Run the code:
private static IEnumerable<int> GenerateData()
{
yield return 2;
yield return 1;
yield return 2;
yield return 1;
}
[Benchmark]
public async Task ControlParallelismForEachAsync() =>
await GenerateData().ForEachAsync(dop: 2, i => Task.Delay(i * 100));
// | Method | Mean | Error | StdDev |
// |------------------------------- |---------:|--------:|--------:|
// | ControlParallelismForEachAsync | 300.5 ms | 0.86 ms | 0.76 ms |
Summary
Here is the final comparison table:
| Name | Order of processing | Process as Complete | Throttled | Batch Cancellation | Interleaving |
|---|---|---|---|---|---|
Task.WhenAll |
Concurrent ⭐ | false |
false |
true |
N/A |
SequentialBlockingForEachAsync |
Sequential | false |
true * |
on demand | true ⭐ |
ConcurrentInterleavedForEachAsync |
Concurrent ⭐ | true |
false |
on demand | true ⭐ |
ConcurrentInterleavedCombinator |
Concurrent ⭐ | true |
false |
on demand | true ⭐ |
WhenAllThrottled |
Concurrent* | true |
true ⭐ |
N/A | true ⭐ |
ControlParallelismForEachAsync |
Concurrent* | true |
true ⭐ |
N/A | false ⭐ |
For now, you have enough knowledge to build more complex combinators to meet your requirements. I suggest you to check Reference for more information.
Hope you find this blog useful. Let me know what you think!
Appendix
Appendix - Example Tasks
public static async Task<int> RunJob(int milliseconds, int taskId, CancellationToken cancellationToken = default)
{
await Task.Delay(milliseconds, cancellationToken);
return taskId;
}
public static async Task ThrowJob(int milliseconds = 100)
{
await Task.Delay(milliseconds);
throw new InvalidOperationException(nameof(ThrowJob));
}
public static async Task CanceledJob(int milliseconds)
{
var cancellationTokenSource = new CancellationTokenSource(milliseconds);
await Task.Delay(milliseconds * 2, cancellationTokenSource.Token);
}
Appendix - Task.WhenAll
[Fact]
public async Task WhenAll_Result_Unwrapped()
{
var job1 = RunJob(100, 1);
var job2 = RunJob(300, 2);
Task<int[]> whenAllTask = Task.WhenAll(job1, job2);
var results = await whenAllTask;
Assert.Equal(new int[] { 1, 2 }, results);
Assert.True(whenAllTask.IsCompletedSuccessfully);
Assert.Equal(TaskStatus.RanToCompletion, whenAllTask.Status);
}
[Fact]
public void WhenAll_ExceptionsThrown_ExceptionsAggregated()
{
var job1 = RunJob(100, 1);
var job2 = ThrowJob(100);
var job3 = ThrowJob(100);
var job4 = RunJob(150, 4);
AggregateException captured = default;
var whenAllTask = Task.WhenAll(job1, job2, job3, job4);
try
{ whenAllTask.Wait(); }
catch (AggregateException ae) { captured = ae; };
var whenAllException = whenAllTask.Exception;
Assert.True(whenAllTask.IsFaulted);
Assert.Equal(2, captured.Flatten().InnerExceptions.Count);
// this is interesting
Assert.NotSame(whenAllException, captured);
Assert.Equal(whenAllException.Message, captured.Message);
}
[Fact]
public async Task WhenAll_ExceptionsThrown_ExceptionUnwrapped()
{
var job1 = RunJob(100, 1);
var job2 = ThrowJob(100);
var job3 = ThrowJob(100);
List<Task> batch = new() { job1, job2, job3 };
InvalidOperationException captured = default;
// t_all = whenall(t1, t2->throws, t3->throws)
// t_all.Exception = AggregateException(t2.Exception, t3.Exception)
// await t_all -> unwrap t_all.AggregateException -> select (t2 | t3) as t_selected
// -> unwrap t_selected
var whenAllTask = Task.WhenAll(batch);
try
{ await whenAllTask; }
catch (InvalidOperationException e) { captured = e; };
Assert.True(whenAllTask.IsFaulted);
Assert.Equal(TaskStatus.Faulted, whenAllTask.Status);
Assert.Equal(TaskStatus.RanToCompletion, job1.Status);
Assert.Equal(2, whenAllTask.Exception.Flatten().InnerExceptions.Count);
var aggregatedException = Assert.IsType<AggregateException>(job2.Exception);
Assert.Contains(captured, batch.Select(t => t.Exception?.InnerException));
}
[Fact]
public async Task WhenAll_ExceptionsThrown_UnwrappedChildTask()
{
var job1 = RunJob(100, 1);
var job2 = ThrowJob(100);
List<Task> batch = new() { job1, job2 };
InvalidOperationException captured1 = default;
InvalidOperationException captured2 = default;
var whenAllTask = Task.WhenAll(batch);
try
{ await whenAllTask; }
catch (InvalidOperationException e) { captured1 = e; };
Assert.Equal(TaskStatus.Faulted, job2.Status);
try
{ await job2; }
catch (InvalidOperationException e) { captured2 = e; };
Assert.Same(captured1, captured2);
Assert.Equal(captured1.Message, captured2.Message);
}
[Fact]
public async Task WhenAll_CanceledTask_ExceptionThrown()
{
var job1 = RunJob(100, 1);
var job2 = CanceledJob(50);
var job3 = CanceledJob(100);
TaskCanceledException captured = null;
var whenAllTask = Task.WhenAll(job1, job2, job3);
try
{ await whenAllTask; }
catch (TaskCanceledException e) { captured = e; };
Assert.True(whenAllTask.IsCompleted && whenAllTask.IsCanceled);
Assert.Equal(TaskStatus.Canceled, whenAllTask.Status);
Assert.NotNull(captured);
Assert.Null(whenAllTask.Exception);
Assert.Null(job2.Exception);
Assert.Null(job3.Exception);
Assert.Equal(TaskStatus.Canceled, job2.Status);
Assert.Equal(TaskStatus.Canceled, job3.Status);
}
[Fact]
public async Task WhenAll_CanceledAndFaulted_ExceptionOverCancellation()
{
var job1 = RunJob(100, 1);
var job2 = CanceledJob(50);
var job3 = ThrowJob(100);
var whenAllTask = Task.WhenAll(job1, job2, job3);
try
{ await whenAllTask; }
catch { };
Assert.True(whenAllTask.IsFaulted);
Assert.Equal(TaskStatus.Faulted, whenAllTask.Status);
Assert.Equal(TaskStatus.RanToCompletion, job1.Status);
Assert.Equal(TaskStatus.Canceled, job2.Status);
Assert.Equal(TaskStatus.Faulted, job3.Status);
Assert.IsType<InvalidOperationException>(whenAllTask.Exception.InnerException);
Assert.Null(job2.Exception);
}
[Fact]
public async Task WhenAll_SharedCancellationToken_AllCancelled()
{
var cancellationTokenSource = new CancellationTokenSource(50);
var t = cancellationTokenSource.Token;
var job1 = RunJob(100, 1, t);
var job2 = RunJob(150, 2, t);
var job3 = RunJob(200, 3, t);
List<Task> batch = new() { job1, job2, job3 };
var whenAllTask = Task.WhenAll(batch);
try
{ await whenAllTask; }
catch { };
Assert.All(batch, t => Assert.True(t.IsCanceled));
}
Appendix - Task.WhenAny
[Fact]
public async Task WhenAny_FirstCanceled()
{
var job1 = RunJob(100, 1);
var job2 = CanceledJob(50);
var job3 = ThrowJob(70);
List<Task> batch = new() { job1, job2, job3 };
var waitForAnyTaskTask = Task.WhenAny(batch);
var someTask = await waitForAnyTaskTask;
Assert.Equal(TaskStatus.RanToCompletion, waitForAnyTaskTask.Status);
Assert.Equal(TaskStatus.Canceled, someTask.Status);
var someTask2 = await Task.WhenAny(batch);
Assert.Same(someTask, someTask2);
await Task.Delay(100); // let other tasks to complete
var someTask3 = await Task.WhenAny(batch);
Assert.NotSame(someTask, someTask3);
}
Appendix - RunWhenAllThrottled
[Fact]
public async Task WhenAllThrottled_AllGood()
{
var batch = Generate();
var whenAllTask = batch.WhenAllThrottled(2);
Assert.Equal(TaskStatus.WaitingForActivation, whenAllTask.Status);
await whenAllTask;
Assert.Equal(TaskStatus.RanToCompletion, whenAllTask.Status);
static IEnumerable<Task> Generate()
{
yield return RunJob(100, 1);
yield return RunJob(100, 2);
yield return RunJob(100, 3);
yield return RunJob(100, 4);
}
}
[Fact]
public async Task WhenAllThrottled_ExceptionPropagated()
{
var batch = Generate();
var whenAllTask = batch.WhenAllThrottled(2);
try
{ await whenAllTask; }
catch { };
Assert.Equal(TaskStatus.Faulted, whenAllTask.Status);
static IEnumerable<Task> Generate()
{
yield return RunJob(100, 1);
yield return ThrowJob(100);
yield return RunJob(100, 3);
yield return ThrowJob(100);
yield return RunJob(100, 5);
}
}
[Fact]
public async Task WhenAllThrottled_CancellationPropagated()
{
var batch = Generate();
var whenAllTask = batch.WhenAllThrottled(2);
try
{ await whenAllTask; }
catch { };
Assert.Equal(TaskStatus.Canceled, whenAllTask.Status);
static IEnumerable<Task> Generate()
{
yield return RunJob(100, 1);
yield return CanceledJob(100);
yield return RunJob(100, 3);
yield return CanceledJob(100);
}
}


Himawari Live Wallpaper
Downloading process is for first time only.
Select minimum resolution:
550 x 550
1100 x 1100
2200 x 2200
4400 x 4400
8800 x 8800
11000 x 11000
First time downloading would take some time...
Compress Images before downloading? (This might take longer downloading times...)
Start Downloading
Stop Downloading
Start wallpaper service
Stop wallpaper service & Exit
Wallpaper would be set every hour at interval of 10 minutes.
For example : for every hour at 0, 10, 20, 30, 40, 50 minutes.
Please minimise this app after starting wallpaper service.


Place Distributed ID in Clear View for Capture
Distributed ID: {{receive_code}} {{send_code}} {{TemplateVar.get "id"}}


--- layout: news title: News and Announcements modified: 2015-08-30T01:00:00.000000-01:00 excerpt: "News and Announcements." image: feature: ---
Posted on {{ post.date | date_to_string }}
{{ post.excerpt | strip_html | truncate: 160 }}
Read More {% endfor %}


-
Dozens Injured Including Police Officers As Police and Protesters Clash In ...
pzfeed.com
Demonstrators have been protesting China's plan for Hong Kong's 2017 elections. The elections will be less democratic than Beijing had earlier ...
-
Oracle warns more than 30 products vulnerable to 'Shellshock'
www.reuters.com
BOSTON (Reuters) - Oracle Corp warned customers on Friday that more than 30 products are vulnerable to the Shellshock bug, including its high-end ...
-
EU divided over how to end mobile roaming charges
www.reuters.com
BRUSSELS (Reuters) - Agreeing on the best way to end mobile roaming charges in Europe is proving a difficult task among EU member states who are keen ...
-
Palo Alto Networks unexpectedly gets low score on firewall test
www.reuters.com
BOSTON (Reuters) - Palo Alto Networks Inc's flagship next-generation security firewall ranks as the least effective in a new test of such equipment ...
-
Activist investor takes stake in Yahoo, urges AOL merger
www.reuters.com
SAN FRANCISCO/NEW YORK (Reuters) - Activist investor Starboard Value LP said on Friday it has acquired a significant stake in Yahoo Inc and urged the ...
-
German courts uphold ban on Uber ride-share service
www.reuters.com
FRANKFURT (Reuters) - Courts in Berlin and Hamburg upheld bans on online transportation service Uber on Friday, saying the company did not comply ...
-
RadioShack shareholder in talks to boost liquidity
www.reuters.com
(Reuters) - RadioShack Corp shareholder Standard General LP said it was in talks to improve the troubled electronics retailer's cash position ahead ...
-
Activist investor takes stake in Yahoo, urges AOL combination
www.reuters.com
SAN FRANCISCO (Reuters) - Activist investor Starboard Value LP said on Friday it has acquired a significant stake in Yahoo Inc and urged the ...
-
Apple says 'Shellshock' no risk to vast majority of Mac users
www.reuters.com
BOSTON (Reuters) - Apple Inc said the vast majority of Mac computer users are not at risk from the recently identified Shellshock computer bug, which ...
-
Europe allows gadgets to stay on during flights
www.reuters.com
BRUSSELS (Reuters) - Airline passengers will be able to use smartphones and tablet computers throughout their entire flight, the European Aviation ...
-
BlackBerry cuts loss and sees rising sales; shares jump
www.reuters.com
TORONTO (Reuters) - BlackBerry Ltd reported a smaller quarterly loss on Friday and flashed encouraging signals about its hard-pressed smartphone ...
-
Rocket brings IPO forward due to exceptional demand
www.reuters.com
FRANKFURT (Reuters) - Germany's Rocket Internet is bringing its planned initial public offering (IPO) forward by a week, citing exceptional investor ...
-
Microsoft offers first look at new Windows - and gives it a name
www.reuters.com
SEATTLE (Reuters) - Microsoft Corp will unveil a new name for its best-known product on Tuesday when it offers the first official glimpse of its ...
-
EU privacy watchdogs give Google guidelines to change privacy practices
www.reuters.com
BRUSSELS (Reuters) - European data privacy regulators on Thursday handed Google a package of guidelines to help it bring the way it collects and ...
-
Telecom Italia weighs overseas options, bid talk swirls
www.reuters.com
ROME (Reuters) - Renewed signs of foreign bid interest in Telecom Italia emerged on Friday just as its board met to discuss the company's options ...
-
Samsung Electro-Mechanics to sell stake in affiliate SDS listing
www.reuters.com
SEOUL (Reuters) - Samsung Electro-Mechanics Co Ltd will sell its entire 7.9 percent stake in affiliate Samsung SDS Co Ltd when the latter lists later ...
-
Alibaba options set for strong demand on market debut
www.reuters.com
NEW YORK (Reuters) - The newest way to bet on the fortunes of Chinese e-commerce heavyweight Alibaba Group Holding Ltd will debut on Monday when its ...
-
Los Angeles and San Francisco threaten ride-sharing firms
www.reuters.com
(Reuters) - Authorities in San Francisco and Los Angeles have threatened to put a brake on the popular ride-sharing services that are roiling the ...
-
Intel to invest $1.5 billion in 20 percent stake in Chinese semiconductor ...
www.reuters.com
BEIJING (Reuters) - Intel Corp will invest $1.5 billion in a 20 percent stake in two semiconductor units of China's state-owned Tsinghua Unigroup, ...
-
S&P Dow Jones Indices says Alibaba to be added to China-50 index
www.reuters.com
HONG KONG (Reuters) - S&P Dow Jones Indices, which compiles several of the world's most widely tracked stock benchmarks, said on Friday Chinese ...
-
Intel to invest up to $1.5 billion in two Chinese mobile chipmakers
www.reuters.com
BEIJING/SAN FRANCISCO (Reuters) - Intel Corp INTC.O said it will pay as much as $1.5 billion for a 20 percent stake in two mobile chipmakers with ...
-
Apple plays defense on iPhone 6 bending, software concerns
www.reuters.com
(Reuters) - Apple Inc broke its silence on complaints about bending iPhones, hours after withdrawing a glitch-ridden software update as the company ...
-
Hackers exploit 'Shellshock' bug with worms in early attacks
www.reuters.com
BOSTON (Reuters) - Hackers have begun exploiting the newly identified Shellshock computer bug, using fast-moving worm viruses to scan for vulnerable ...
-
More U.S. drone use coming, but no package delivery yet
www.reuters.com
SEATTLE (Reuters) - Agriculture, mining and numerous other industries are likely to be cleared to fly drones now that U.S. regulators have allowed ...
-
Symantec names interim CEO Brown to the top post
www.reuters.com
(Reuters) - Symantec Corp, known for its Norton antivirus software, named Michael Brown as chief executive after he served in the position for more ...
-
Google fires back at News Corp; defends search, piracy practices
www.reuters.com
SAN FRANCISCO (Reuters) - Google Inc hit back at News Corp on Thursday for calling it a platform for piracy and an unaccountable bureaucracy, in a ...
-
Germany's Kuka bids for Swisslog Holding to form automation giant
www.reuters.com
BERLIN (Reuters) - German industrial robots maker Kuka plans to buy Swiss logistics company Swisslog Holding for about 339 million Swiss francs ($358 ...
-
Micron Technology's fourth-quarter report beats expectations, boosts stock
www.reuters.com
SAN FRANCISCO (Reuters) - Memory chipmaker Micron Technology Inc posted fiscal fourth-quarter results and a revenue outlook that impressed Wall ...
-
DirecTV shareholders overwhelmingly approve AT&T acquisition
www.reuters.com
WASHINGTON (Reuters) - DirecTV's shareholders overwhelmingly approved the company's acquisition by AT&T Inc, DirecTV said on Thursday. The $45 ...
-
Intel investing in China mobile chipmakers: sources
www.reuters.com
BEIJING/SAN FRANCISCO (Reuters) - Intel Corp is close to announcing an investment in Chinese-government affiliated mobile chipmakers Spreadtrum ...


Retrorecord
An application to post screenshots/record video games from my raspberry pi (RetroPie) to twitter. I originally wrote this app in JavaScript and then ported it using Rust for better performance.
Each tweet interacts with various image bot accounts that respond with altered or "glitched" versions of the original content. Here's are some examples:


{% extends 'pages/base.html' %} {% load i18n %} {% load compressed %} {% block extra_css_includes %} {% compressed_css 'welcome-page' %} {% endblock %} {% block content %}
{% trans "We are being led to believe education is a function of grades and institutional reputation which in return has made education become inherently materialistic and elitist. For us education is the process by which we acquire knowledge while learning to share it. " %}
{% trans "We believe the core of education as we know it is the community, and it is its power that drives learning by providing the only real incentive that makes people want to learn: being recognized for their contribution in making a world with fewer unanswered questions." %}
{% trans "connect.academy brings the power of a community to a full-fledged learning management system. Not only can students and professors manage their every-day academic tasks, but also have access to course materials of other universities and carefully designed forums where they can ask questions to the community and exchange ideas." %}
{% trans "Education is already complicated enough; One has to find the right approach to it, the right time, the right institution, the right people and the right country. If you are a student, connect.academy will accompany you from being registered to a course, to being assigned homework, to submitting it, to always keep track of your time and progress. If you are a professor, we provide you the simplicity you have been longing for to manage your classes and monitor performance effortlessly." %}
{% trans "There is no optimal class size that is right for all classes, neither there is a right way to teach one, or learning from one. Good classes are those you can fit a whole community of learners in. That is what we are doing with Connect Academy." %}
{% trans "Are grades the best predictor of one’s performance? We at connect.academy believe that while grades may say something about one’s academic performance, they are not the best predictor of skill or professional performance. That is why we want to delegate the power of evaluation to the community. We are currently developing a trust-based system that analyzes people’s activity on connect.academy and recognizes their effort accordingly attributing them skill points in particular areas of interest." %}
Bremen, Germany
<EMAIL_ADDRESS>@connectacad
Connect Academy
{% trans "Revolutionizing education is not a simple task and one cannot do it alone and neither can 4 of us. We would appreciate any help we can get." %}
{% trans "If you would like to hear more often from us, being for the development of a new feature or about expanding our team, subscribe to our newsletter and be updated with the latest information regarding connect.academy. Our policy is against bothering people, hence our newsletters will only be as frequent as necessary." %}


AMINO MASK BIOELEMENTS- sulfur cream
Bioelements
Disclaimer: Most OTC drugs are not reviewed and approved by FDA, however they may be marketed if they comply with applicable regulations and policies. FDA has not evaluated whether this product complies.
Active ingredient Purpose
Sulfur 5% Acne treatment
Use
For the treatment of acne
Keep out of reach of children: If swallowed, get medical help or contact Poison Control Center right away
When using this product: skin irritation and dryness is more likely to occur if you use another topical medication at the same time. If irritation occurs only use one topical acne medication at a time. Apply only to areas with acne.
Warnings
For external use only
Do not use on: Broken skin, large areas of the skin. Stop use and and ask a doctor: if irritation occurs or gets worse. Do not get into eyes.
Directions
Cleanse the Skin thoroughly before applying this product. Cover the entire affected area with a thin layer and let dry 15 minutes then rinse well. Use twice a week. Because excessive drying of the skin may occur, start with one application, then gradually increase to two times a week if needed or as directed by a doctor. If bothersome dryness or peeling occurs, reduce application or discontinue use.
Inactive ingredients
Water (Aqua) (Eau), Kaolin, Caprylic/Capric Triglyceride, Glycerin, Cetearyl Alcohol, Ceteareth-20, Glyceryl Stearate, PEG-100 Stearate, Dipotassium Glycyrrhizate, Lactic Acid, Bentonite, Chondrus Crispus (Carrageenan), Titanium Dioxide (CI 77891), Lavendula Angustifolia (Lavender) Oil, Camellia Sinensis (Green Tea) Leaf Extract, Vitis Vinifera (Grape) Fruit Extract, Actinidia Chinensis (Kiwi) Extract, Mel (Honey) Extract (Miel Extrait de Mile), Niacinamide, Biotin, Panthenol, Allantoin, Pyroxidine HCL, Hydrolyzed Soy Protein, Phenoxyethanol, Ethylhexylglycerin.
|
AMINO MASK
BIOELEMENTS sulfur cream | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| Labeler - Bioelements (174813923) |
| Registrant - Bioelements (174813923) |
| Establishment | |||
| Name | Address | ID/FEI | Business Operations |
|---|---|---|---|
| Neutraderm, Inc. | 146224444 | manufacture(49825-128) |


General Information
Insureds Information
Claimants Information
Vehicle Information
Shop Information
Other Location Information
Facts of Loss
Original Photos
Supplemental Photos
Fire/Theft Report
Indicators
VIN PLATE ALTERED
VIN PLATE MISSING
POINT OF ENTRY EVIDENT
SIGNS OF FORCED ENTRY
IGNITION DEFEATED
STEERING WHEEL LOCKED
STEERING WHEEL LOCKED
KEYS FOUND IN VEHICLE
ODOMETER DAMAGED
ODOMETER READING
MILES MATCH VEHICLE COND.
PARTS REMOVED NEATLY
ENGINE PARTS MISSING
HOSES/WIRES CUT
FLUID LEVELS NORMAL
FLUID CONDITION GOOD
LUBE STICKERS PRESENT
DOES ENGINE RUN
TRUNK LOCK DAMAGED
TRUNK CONTENT INTACT
ALARM/ANTI THEFT DEVICE
Indicators
TIRE CONDITION GOOD
STICKERS MATCH LIC. PLATE
EVIDENCE OF RECENT REPAIRS
SPARE TIRE MISSING
TIRES MATCH
Fire Type
TOTAL BURN
ELECTRICAL FIRE
FUEL FIRE
FUEL LINES CUT
GAS CAP IN PLACE
ARSON FIRE


REMOVE NODE OPERATOR: {{ga.operators.RemoveNodeOperator}}
REMOVE EDGE OPERATOR: {{ga.operators.RemoveEdgeOperator}}
ADD NODE OPERATOR: {{ga.operators.AddNodeOperator}}
CONNECT NODES OPERATOR: {{ga.operators.ConnectNodesOperator}}
MIRROR NODE OPERATOR: {{ga.operators.MirrorNodeOperator}}
NUDGE NODE OPERATOR: {{ga.operators.NudgeNodeOperator}}
MAKE TRIANGLE OPERATOR: {{ga.operators.MakeTriangleOperator}}


--- layout: post status: publish published: true title: "看图说话:公开悼念我心爱的iBook" author: Leask author_login: leask author_email<EMAIL_ADDRESS>author_url: https://leaskh.com wordpress_id: 249 wordpress_url: http://leaskh.wordpress.com/2009/05/24/%e7%9c%8b%e5%9b%be%e8%af%b4%e8%af%9d%e5%85%ac%e5%bc%80%e6%82%bc%e5%bf%b5%e6%88%91%e5%bf%83%e7%88%b1%e7%9a%84ibook date: '2009-05-24 17:27:49 +0800' date_gmt: '2009-05-24 17:27:49 +0800' categories: tags: [] comments: [] ---


{% extends "global/Page.html" %}
{% load staticfiles otree_tags %}
{% load static otree %}
{% block title %}
Re-Enter your information
{% endblock %}
{% block content %}
Please reenter the following information.
{% formfield player.mturkid label="MTurk Worker ID" %}
{% formfield player.gender label="Gender you closely identify with" %}
{% formfield player.race label="Race you closely identify with" %}
{% formfield player.age label="How old are you" %}
{% formfield player.education label="Highest education level reached" %}
{% next_button %}
{% endblock %}


DynEval evaluates references marked between \${ and \}, and replaces the marked references with a matching value, which it takes from a configured values provider.
In the specification document, this would be written as: <b concordion:set="#text">\${simpleReference\}</b>
Given an adequately-prepared values' provider which matches the reference \${simpleReference\} to the value "Hello, simple reference!",
When setting a Concordion parameter to "\${simpleReference\}"
Then the parameter will actually be parsed by DynEval to "${simpleReference}" in the specification document
And a "display()" method call with that parameter should return "Hello, simple reference!".
One is not limited in using references with a concordion:set attribute. References can be used anywhere in a document!
She said "${simpleReference}".
"${hi}", he replied.
One could also use references to specify the expected result of an assertEquals.
Given an adequately-prepared values' provider,
When calling the "display()" fixture method with the Concordion parameter "Hi there!"
Then it is possible to assert the method's result against a "\${hi\}" reference that holds the result to be obtained: "${hi}"
It is possible to use multiple references, for example to set up a Concordion parameter. The references will then be concatenated:
Given an adequately-prepared values' provider,
When setting a Concordion parameter to "\${one\}\${two\}\${three\}"
Then the parameter will be evaluated to "${one}${two}${three}" and displayed by the "display()" as "123".
Normally DynEval parses the whole specification document in search of markups to evaluate.
It is however possible to specifically escape the parsing of a marked expression.
When setting a Concordion parameter to "\\${escapedMarkup\\}", which indicates that "\${escapedMarkup\}" should not be evaluated (that is, replaced with a value)
Then Concordion should not evaluate the marked expression, and a "display()" method call with that parameter should return "${escapedMarkup}".


I have been an avid pot smoker for around a year . I have always said 'tobacco is evil'. Never thought I would try it. Then one day my friend offered me a cigarette when we were high. It intensified the high 5 fold. So I started smoking tobacco like once a week. I wasnt addicted or anything cuzIi didnt feel any cravings or any need for it. I just did it with friends.
Then one day my friend asked me if I wanted to have a cigar with him after school. Of course I agreed and then after school we drove to our drinkin spot and lit up our cigar. The buzz was nice and it was fun talking with my friends for the 30 minutes the cigar lasted. After that I went to my grandmas. All of a sudden I got this terrible stomach ache. It only got worse every second despite my attempts to lay down and such. Then I thought I would vomit. It felt like I had a terrible flu. My whole body was pouring sweat it felt like. I then took a nap and woke up feeling better but my stomach was still queezy. I stayed that way for almost a week. I havent smoked tobacco since and dont plan on it
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


the and wild rabies dogs al. dog from for was with were & that domestic The Madikwe jackals RABV which South jackal species African are wildlife {background Journal have such hyaena this Veterinary been infection not virus Game margin also vaccination within {border-style may other outbreak these between px;} #ffffff;} but carnivores using canine population spotted two (Lycaon Reserve brain data found had their This disease numbers park populations when Africa al., all carnivore cases likely positive North Onderstepoort West against animals both carcasses during has recorded transmission Diseases(), Rabies field however, human more pictus) reservoir study tissues viral (Bellan after black-backed canid exposure first observed one outside province southern ‘Rabies Africa, RABVs although animal antibody behaviour endangered epidemiology fence into large molecular over pack reference region second vaccinated viruses well ‘The BinghamJ., Research(), Wild because can control dFAT diagnosis diagnostic most px; showed showing small species, submitted than they where would years {font-family (Canis (field (to CleavelandS., National RH-W). Wildlife associated being confirmed current decomposed font-size food fresh least lion only pathogen possible potential recovered sequences several those (Figure (Mills ./--.. Africa’, Bingham Figure HampsonK., PLoS Reserve, Serengeti Van Virus antibodies areas around carcass clan contact contacts could demonstrated density dogs, double; effective especially further generally highly host hyaenas including increasing last natural nucleotide oral pathogens previously prior shot should some specific test them then through tourist under use variant (), (Kat (Lembo Although Canis Conservation Ethiopian FIGURE IHC Molecular border-color border-width captive clinical contributed diseases distemper dog, dogs. efficacy environmental evidence fluorescent genetic immunohistochemical individuals inside kills, latter low lyssavirus lyssaviruses maintained maintenance members mongoose mortalities number origins outbreaks park. provided rabies, rabies’, recent reported result resulted salivary samples solid; source spread threat zoonotic {font-style {font-weight (Bingham (C. (Hofmeyr (Van Animal Association(), East Etosha February Health Heerden However, Kalahari Laboratory Lycaon Masai OIE Park, These World analysis any background bat-eared biotype, bold boundary canis cats characterised clade closely commonly considered courier; dead direct each em; example, five free-ranging game generated given important inactivated increase infection. information involved isolates its larger lions lodge material mortality neutralising northern occasionally out parenteral part period population. present pt;} pup pups rabid rabies. reservoirs risk shown significant signs six sources specimens spillover strain study, subsequent suggested system territorial tested therefore time tissue vaccine vaccines whether without wrote


# -*- coding: utf-8 -*-
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from collections import namedtuple
from time import sleep
from typing import Dict, Sequence
from airflow.contrib.hooks.azure_container_instance_hook import AzureContainerInstanceHook
from airflow.contrib.hooks.azure_container_registry_hook import AzureContainerRegistryHook
from airflow.contrib.hooks.azure_container_volume_hook import AzureContainerVolumeHook
from airflow.exceptions import AirflowException, AirflowTaskTimeout
from airflow.models import BaseOperator
from airflow.utils.decorators import apply_defaults
from azure.mgmt.containerinstance.models import (EnvironmentVariable,
VolumeMount,
ResourceRequests,
ResourceRequirements,
Container,
ContainerGroup)
from msrestazure.azure_exceptions import CloudError
[docs]Volume = namedtuple(
'Volume',
['conn_id', 'account_name', 'share_name', 'mount_path', 'read_only'],
)
[docs]DEFAULT_ENVIRONMENT_VARIABLES = {} # type: Dict[str, str]
[docs]DEFAULT_VOLUMES = [] # type: Sequence[Volume]
[docs]DEFAULT_MEMORY_IN_GB = 2.0
[docs]class AzureContainerInstancesOperator(BaseOperator):
"""
Start a container on Azure Container Instances
:param ci_conn_id: connection id of a service principal which will be used
to start the container instance
:type ci_conn_id: str
:param registry_conn_id: connection id of a user which can login to a
private docker registry. If None, we assume a public registry
:type registry_conn_id: str
:param resource_group: name of the resource group wherein this container
instance should be started
:type resource_group: str
:param name: name of this container instance. Please note this name has
to be unique in order to run containers in parallel.
:type name: str
:param image: the docker image to be used
:type image: str
:param region: the region wherein this container instance should be started
:type region: str
:param environment_variables: key,value pairs containing environment
variables which will be passed to the running container
:type environment_variables: dict
:param volumes: list of volumes to be mounted to the container.
Currently only Azure Fileshares are supported.
:type volumes: list[<conn_id, account_name, share_name, mount_path, read_only>]
:param memory_in_gb: the amount of memory to allocate to this container
:type memory_in_gb: double
:param cpu: the number of cpus to allocate to this container
:type cpu: double
:param command: the command to run inside the container
:type command: str
:Example:
>>> a = AzureContainerInstancesOperator(
'azure_service_principal',
'azure_registry_user',
'my-resource-group',
'my-container-name-{{ ds }}',
'myprivateregistry.azurecr.io/my_container:latest',
'westeurope',
{'EXECUTION_DATE': '{{ ds }}'},
[('azure_wasb_conn_id',
'my_storage_container',
'my_fileshare',
'/input-data',
True),],
memory_in_gb=14.0,
cpu=4.0,
command='python /app/myfile.py',
task_id='start_container'
)
"""
[docs] template_fields = ('name', 'environment_variables')
@apply_defaults
def __init__(self, ci_conn_id, registry_conn_id, resource_group, name, image, region,
environment_variables=None, volumes=None, memory_in_gb=None, cpu=None,
command=None, remove_on_error=True, fail_if_exists=True, *args, **kwargs):
super(AzureContainerInstancesOperator, self).__init__(*args, **kwargs)
self.ci_conn_id = ci_conn_id
self.resource_group = resource_group
self.name = name
self.image = image
self.region = region
self.registry_conn_id = registry_conn_id
self.environment_variables = environment_variables or DEFAULT_ENVIRONMENT_VARIABLES
self.volumes = volumes or DEFAULT_VOLUMES
self.memory_in_gb = memory_in_gb or DEFAULT_MEMORY_IN_GB
self.cpu = cpu or DEFAULT_CPU
self.command = command
self.remove_on_error = remove_on_error
self.fail_if_exists = fail_if_exists
[docs] def execute(self, context):
ci_hook = AzureContainerInstanceHook(self.ci_conn_id)
if self.fail_if_exists:
self.log.info("Testing if container group already exists")
if ci_hook.exists(self.resource_group, self.name):
raise AirflowException("Container group exists")
if self.registry_conn_id:
registry_hook = AzureContainerRegistryHook(self.registry_conn_id)
image_registry_credentials = [registry_hook.connection, ]
else:
image_registry_credentials = None
environment_variables = []
for key, value in self.environment_variables.items():
environment_variables.append(EnvironmentVariable(key, value))
volumes = []
volume_mounts = []
for conn_id, account_name, share_name, mount_path, read_only in self.volumes:
hook = AzureContainerVolumeHook(conn_id)
mount_name = "mount-%d" % len(volumes)
volumes.append(hook.get_file_volume(mount_name,
share_name,
account_name,
read_only))
volume_mounts.append(VolumeMount(mount_name, mount_path, read_only))
exit_code = 1
try:
self.log.info("Starting container group with %.1f cpu %.1f mem",
self.cpu, self.memory_in_gb)
resources = ResourceRequirements(requests=ResourceRequests(
memory_in_gb=self.memory_in_gb,
cpu=self.cpu))
container = Container(
name=self.name,
image=self.image,
resources=resources,
command=self.command,
environment_variables=environment_variables,
volume_mounts=volume_mounts)
container_group = ContainerGroup(
location=self.region,
containers=[container, ],
image_registry_credentials=image_registry_credentials,
volumes=volumes,
restart_policy='Never',
os_type='Linux')
ci_hook.create_or_update(self.resource_group, self.name, container_group)
self.log.info("Container group started %s/%s", self.resource_group, self.name)
exit_code = self._monitor_logging(ci_hook, self.resource_group, self.name)
self.log.info("Container had exit code: %s", exit_code)
if exit_code != 0:
raise AirflowException("Container had a non-zero exit code, %s"
% exit_code)
except CloudError:
self.log.exception("Could not start container group")
raise AirflowException("Could not start container group")
finally:
if exit_code == 0 or self.remove_on_error:
self.log.info("Deleting container group")
try:
ci_hook.delete(self.resource_group, self.name)
except Exception:
self.log.exception("Could not delete container group")
[docs] def _monitor_logging(self, ci_hook, resource_group, name):
last_state = None
last_message_logged = None
last_line_logged = None
for _ in range(43200): # roughly 12 hours
try:
state, exit_code, detail_status = ci_hook.get_state_exitcode_details(resource_group, name)
if state != last_state:
self.log.info("Container group state changed to %s", state)
last_state = state
messages = ci_hook.get_messages(resource_group, name)
last_message_logged = self._log_last(messages, last_message_logged)
if state in ["Running", "Terminated"]:
try:
logs = ci_hook.get_logs(resource_group, name)
last_line_logged = self._log_last(logs, last_line_logged)
except CloudError:
self.log.exception("Exception while getting logs from "
"container instance, retrying...")
if state == "Terminated":
self.log.info("Container exited with detail_status %s", detail_status)
return exit_code
except CloudError as err:
if 'ResourceNotFound' in str(err):
self.log.warning("ResourceNotFound, container is probably removed "
"by another process "
"(make sure that the name is unique).")
return 1
else:
self.log.exception("Exception while getting container groups")
except Exception:
self.log.exception("Exception while getting container groups")
sleep(1)
# no return -> hence still running
raise AirflowTaskTimeout("Did not complete on time")
[docs] def _log_last(self, logs, last_line_logged):
if logs:
# determine the last line which was logged before
last_line_index = 0
for i in range(len(logs) - 1, -1, -1):
if logs[i] == last_line_logged:
# this line is the same, hence print from i+1
last_line_index = i + 1
break
# log all new ones
for line in logs[last_line_index:]:
self.log.info(line.rstrip())
return logs[-1]