1> unicode:characters_to_binary("UniText") == <<"UniText"/utf8>>.
I.e. in N2O DSL you should use:
2> io:format("~tp",[ #button{body= <<"Unicode Name"/utf8>>} ]).
> utf_toByteArray(document.getElementById('phone').value);
However we created shortcut for that purposes which knows about radio, fieldset and other types of DOM nodes. So you should use just:
> querySource('phone');
querySource JavaScript function ships in nitrogen.js which is part of N2O JavaScript library. Whenever you get unicode data from server you should prepare it before place in DOM with utf8_decode:
> console.log(utf8_decode(receivedMessage));


| Package | Description |
|---|---|
| net.glowstone.chunk |
| Modifier and Type | Method and Description |
|---|---|
static ChunkSection |
ChunkSection.fromIdArray(byte[] types)
Creates a new unlit chunk section containing the given types.
|
static ChunkSection |
ChunkSection.fromIdArray(short[] types)
Creates a new unlit chunk section containing the given types.
|
static ChunkSection |
ChunkSection.fromNbt(CompoundTag sectionTag)
Creates a new chunk section from the given NBT blob.
|
static ChunkSection |
ChunkSection.fromStateArray(short[] types)
Creates a new unlit chunk section containing the given types.
|
ChunkSection[] |
GlowChunkSnapshot.getRawSections()
The ChunkSection array backing this snapshot.
|
ChunkSection[] |
GlowChunk.getSections()
The array of chunk sections this chunk contains, or null if it is unloaded.
|
ChunkSection |
ChunkSection.snapshot()
Take a snapshot of this section which will not reflect future changes.
|
| Modifier and Type | Method and Description |
|---|---|
void |
GlowChunk.initializeSections(ChunkSection[] initSections)
Initialize this chunk from the given sections.
|
| Constructor and Description |
|---|
GlowChunkSnapshot(int x,
int z,
org.bukkit.World world,
ChunkSection[] sections,
byte[] height,
byte[] biomes,
boolean svTemp,
boolean isSlimeChunk)
Creates a snapshot of a chunk.
|
Copyright © 2021. All rights reserved.


As an adult, come and discover our irresistible clowns, between practical jokes and pranks let yourself be carried away by their joy and fall back into childhood.
Let yourself be carried away in a world where the real and the imaginary are one, in the company of our talented magicians, discover a wonderful world limited only by your imagination.
Tame the untameable in the company of our tamers, between roar and razor-sharp claws, watch these fierce felines turn into sweet kittens.
Since 1903, our circus has never stopped mesmerising young and old alike. But you know, sometimes words are not enough... So check out the video below to step into our fairy world ! We look forward to welcome you soon !
| Adults | Children under 12 | Groups (over 10 people) | Schools | |
|---|---|---|---|---|
| Any weekday but Wednesday | 10 £ | 7 £ | 8 £ per person | 5 £ per child |
| Weekend and Wednesday | 15 £ | 9 £ | 10 £ per person | 7 £ per child |
Please feel free to contact us for further information !


This example loads a file (or multiple files) that are selected by a user from their local drive. The files are selected by dragging and dropping them onto the "drop zone" below. If the file is an image, an image element is displayed. For a text file, a paragraph element is created to display the text.


Making a differnce in Akrom, Ohio
We are commited in helping the youth of Akrom achieve success through guidance and excellence in life, education, and community.Attendance equals more points. Points are used for rewards.
Communication with mentors and foundation members will only be a few clicks away
The community has changed to have a better future for the next generation.
Lebron has shown his decication for his hometown and has reenforced it every year.


Lichess game download API
Sections
check to include section in link
Section values
Source code:
https://github.com/smartchessguiapp/ligamedl


| bm {spatPomp} | R Documentation |
Generate a class ‘spatPomp’ object representing a U
-dimensional
Brownian motion with spatial correlation decaying geometrically with
distance around a circle. The model is defined in continuous time
though in this case an Euler approximation is exact at the evaluation
times.
bm(U = 5, N = 100, delta_t = 0.1)
U |
A length-one numeric signifying dimension of the process. |
N |
A length-one numeric signifying the number of observation time steps to evolve the process. |
delta_t |
Process simulations are performed every |
An object of class ‘spatPomp’ representing a simulation from a U
-dimensional
Brownian motion
Edward L. Ionides
Other spatPomp examples:
he10()
,
lorenz()
,
measles()
# Complete examples are provided in the package tests
## Not run:
b <- bm(U=4, N=20)
# See all the model specifications of the object
spy(b)
# Examples of methodologies applied to this model
# are provided in the tests directory
## End(Not run)


`Joan' Lacks Dramatic Arc
Sinner or Saint? Heretic or Savior? The history surrounding Joan of Arc has been subject to plenty of interpretation by scholars over the last 5 centuries. And, it was only 500 years after her death that the Vatican finally canonized her. Why might have it taken so long? I would suspect that their was much discussion on both sides as to whether Joan indeed was a messenger from God or just a poor peasant girl with delusional visions, incredible amounts of courage, and tremendous luck. This movie doesn't advocate either side, and that was one of the problems with `The Messenger: The Story of Joan of Arc,' a somewhat flat depiction of one of history's most enigmatic icons.
Joan, pronounced `Junne' (played by Milla Jovovich), has received hints throughout her young life that portends to a future that no 19 year-old girl could ever be prepared to handle. These hints include various visions and even a sword that she finds while frolicking through the countryside. Junne believes that God is trying to give her a message. She must free France from her enemies (based on a historical occurrence when England was supposed to annex France through a treaty). She visits Charles, dauphin of France (John Malkovich), to tell him of her divine role, and is given an army with which to cleanse the French countryside of English troops. Charles and his advisors may be skeptical of her baseless claims, which really has to be taken on faith, but any kind of victory would garner him support among the masses as he prepares to accept his crown. Meanwhile, Junne, who is only a messenger, has a strange effect on the French army. Their strength seems greater while their morale increases, believing that God is on their side. Against all odds, they score unlikely but critical victories in the war. Junne is regarded a hero. Charles' popularity soars. All of this takes place in the first half of the movie, and for the most part, I am more or less satisfied with how the movie has unfolded.
Director Luc Besson is true to form in bringing to life a 15th century world when miracles in France were sorely needed. You may recall Besson's eye-popping `Fifth Element', and here, his visualizations are equally impressive. Take note of the sheer pageantry of Charles' coronation. I was also impressed with the medieval warfare, meticulously presented from the inner workings of a catapult to the various defenses (such as cauldrons of boiling oil) that the attacking French must navigate. The siege of an enemy tower is the highlight of the film. Melee is depicted graphically with arrows piercing bodies and flails crushing heads to a bloody pulp.
But the 150-minute movie wanes in the second act as attention turns towards Junne's inner demons. Now King, Charles withdraws his support for Junne. She is eventually captured and tried for heresy. While awaiting trial, she is visited by another vision (who looks like Dustin Hoffman). He asks her to explain her actions, which seem so contradictory to all of His commandments. Junne is naturally confused about her current state, and the vision tries to help Junne discover her own answers.
Besson is ambitious in his portrayal of Joan of Arc. Jovavich would have been more likeable if she wasn't screaming at the top of her lungs throughout the film. Of course, it's hard to hear a 19-year old girl when there are thousands fighting around you. The film's strength is in its visuals. But dramatically, the movie couldn't generate the power and seemed fearful in committing one way or another to her cause. Perhaps God motivated her. Perhaps vengeance did. Sinner or Saint? Heretic or Savior? Perhaps only God will ever know.
Grade: C+
=====
Do You Yahoo!? Bid and sell for free at http://auctions.yahoo.com
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


io.ktor.request
接口
ApplicationRequest
类
ApplicationReceiveFunctionsKt
ApplicationReceivePipeline
ApplicationReceiveRequest
ApplicationRequestPropertiesKt
RequestCookies
异常错误
ContentTransformationException


Package algorithms.imageProcessing
Class CannyEdgeColorAdaptive
- java.lang.Object
-
- algorithms.imageProcessing.CannyEdgeColorAdaptive
-
public class CannyEdgeColorAdaptive extends java.lang.Object
NOTE: need to edit these comments. for this color version of canny, using the "L" and "C" images of LCH CIELUV color space. May also add use of "H"...still experimenting. The CannyEdge filter is an algorithm to operate on an image to replace objects with their edges. The class began by following the general advice given in "Performance Analysis of Adaptive Canny Edge Detector Using Bilateral Filter" by Rashmi, Kumar, Jaiswal, and Saxena, but made modifications afterwards and added a "C" gradient of colorspace LCH to the greyscale gradient. Their paper has the following qualities:-- instead of a Gaussian filter, uses a bilateral filter -- an adaptive threshold algorithm is used in the 2 layer filter
This class uses 2 one dimensional binomial filters for smoothing.Usage: Note, by default, a histogram equalization is not performed. By default, the number of neighbor histogram levels is 1 in the adaptive thresholding. To use the filter in adaptive mode, use filter.overrideDefaultNumberOfLevels and a number 16 of higher is recommended. To see a difference in the adaptive approach, run this class on the test image susan-in.gif using filter.overrideToUseAdaptiveThreshold() To adjust the filter to remove lower intensity edges, use filter.setOtsuScaleFactor. The default factor is 0.45 (determined w/ a checkerboard image). For the Lena test image for example, one might prefer only the brightest edges, so use a higher setting than the default. Not ready for use yet...
- Author:
- nichole
-
-
Field Summary
Fields Modifier and Type Field Description protected float
factorBelowHighThreshold
the factor that the low threshold is below the high threshold in the 2 layer filter.protected java.util.logging.Logger
log
protected boolean
useLineThinner
-
Constructor Summary
Constructors Constructor Description CannyEdgeColorAdaptive()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
applyFilter(Image input)
apply the filter.EdgeFilterProducts
getFilterProducts()
get the filter products for gradient and orientation.void
override2LayerFactorBelowHighThreshold(float factor)
override the default factor of low threshold below high threshold, which is 2.void
overrideToNotUseLineThinner()
void
overrideToUseAdaptiveThreshold()
set this to use the adaptive threshold in the 2 layer filter.void
setOtsuScaleFactor(float factor)
by default this is 0.45.void
setToDebug()
void
setToNotRestoreJunctions()
to enable more complete contours, use this to restore pixels that were removed during non-maximum suppression that disconnected edges and have values above the low threshold of the 2 layer adaptive filter.void
setToNotUseNonMaximumSuppression()
void
setToUseSingleThresholdIn2LayerFilter()
-
-
-
Method Detail
-
setToDebug
public void setToDebug()
-
overrideToNotUseLineThinner
public void overrideToNotUseLineThinner()
-
setToNotRestoreJunctions
public void setToNotRestoreJunctions()
to enable more complete contours, use this to restore pixels that were removed during non-maximum suppression that disconnected edges and have values above the low threshold of the 2 layer adaptive filter.
-
setOtsuScaleFactor
public void setOtsuScaleFactor(float factor)
by default this is 0.45.- Parameters:
factor
-
-
setToNotUseNonMaximumSuppression
public void setToNotUseNonMaximumSuppression()
-
overrideToUseAdaptiveThreshold
public void overrideToUseAdaptiveThreshold()
set this to use the adaptive threshold in the 2 layer filter. it adjusts the threshold by regions of size 15. Note that if the image has alot of noise, this will include alot of noise in the result.
-
setToUseSingleThresholdIn2LayerFilter
public void setToUseSingleThresholdIn2LayerFilter()
-
override2LayerFactorBelowHighThreshold
public void override2LayerFactorBelowHighThreshold(float factor)
override the default factor of low threshold below high threshold, which is 2.- Parameters:
factor
-
-
applyFilter
public void applyFilter(Image input)
apply the filter. note that unlike the other canny filters in this project, the input is not modified.- Parameters:
input
-
-
getFilterProducts
public EdgeFilterProducts getFilterProducts()
get the filter products for gradient and orientation. note that the orientation image has values between 0 and 180.- Returns:
- the filterProducts
-
-


Dwayne Johnson reveals ‘Black Adam’ release date while declaring his “superhero dreams have come true”
DC fans, get excited!
Dwayne “The Rock” Johnson has revealed the release date for upcoming DC movie Black Adam – he also shared some concept art of his character.
Due to arrive in cinemas on December 22, 2021, Johnson said that he was “honoured to join the iconic #DCUniverse and it’s a true pleasure to become, BLACK ADAM.”
Also sharing some concept art for his anti-hero character, he captioned the picture with a lengthy post.
“Like most kids growing up, I dreamed about being a superhero. Having cool superpowers, fighting for what’s right and always protecting the people,” his post read.
“It all changed for me, when I was 10yrs old and was first introduced to the greatest superhero of all time – SUPERMAN. As a kid, Superman was the hero I always wanted to be. But, a few years into my fantasy, I realised that Superman was the hero, I could never be. I was too rebellious. Too rambunctious. Too resistant to convention and authority.
“Now, years later as a man, with the same DNA I had as a kid – my superhero dreams have come true.”
Continuing, he added: “I’m honoured to join the iconic #DCUniverse and it’s a true pleasure to become, BLACK ADAM. BLACK ADAM is blessed by magic with the powers equal to SUPERMAN, but the difference is he doesn’t toe the mark or walk the line. He’s a rebellious, one of a kind superhero, who’ll always do what’s right for the people – but he does it his way. Truth and justice – the BLACK ADAM way.”
 BLACK ADAM. 12.22.21.”
See Johnson’s post below:
In the DC Universe, Black Adam is the arch enemy of Shazam. Released earlier this year, Shazam! tells the story of 14-year-old Billy Batson who is able to transform into the titular hero (played by Zachary Levi) whenever he shouts his name, after a chance meeting with an ancient wizard.
Meanwhile, the first official trailer for Disney’s upcoming release Jungle Cruise has arrived.
Starring Dwayne Johnson and Emily Blunt, the film sees the pair searching for a mythical place which is said to offer “incredible healing powers.”


It’s point is to repeat a given HTML template once for each value in an array, each time passing it the array value as context for string interpolation or binding.


Create Instance
This is the content of modal.
Create
Delete Instance
This is the content of modal.
Delete
Cancel
Update Instance
This is the content of modal.
Update
Cancel


--- title: Why antidepressants don't work for everyone layout: post ---
The rats, after decades of development, are believed to be the most depressed in the world.


There are many version variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable.
Contrary to popular belief, Lorem Ipsum is not simply random text.  Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in claassical literature, discovered the undoubtable source.
Switch between your computer, tablet or mobile device
Learn from industry expers who are passionate about teaching.
Choose what you'd like to learn from our extensive subscription library.
Contrary to popular belief, Lorem Ipsum is not simply rendom text.  Richard McClintock, a Latin professor at Hampden
Contrary to popular belief, Lorem Ipsum is not simply random text.


Location Internals
Start Watching Position
Download the location-internals dump
Error fetching Geolocation API internals


(That's me )
I am Narendiran CG, a senior undergraduate at the Department of Mechanical Engineering, Indian Institute of Technology Madras.
My primary focus area is Machine Learning.
| Non-linear Control | Structural Control | System Identification |
| Optimal Control | Non-linear dynamics/bifurcations | Robust Control |
I am looking for opportunities to join a leading research group and work along these lines.
About the field
Non-linear dynamics is rich in nature, from simple coupled pendula to complex chemical reactions. Study of these systems is non-trivial, and abounds with unexpected phenomena. Similarly, some control systems do not conform to simple linearization methods, and need to be treated with their non-linearities, either by reducing them, or adapting controllers that are also non-linear. This is a very important field especially is control of smart actuators, used for example in a atomic-force microscope. Precise motion control requires consideration of hysteritic properties of the material, and hence non-linear control is required. Optimal control brings two diverse areas of optimization and controller development and has numerous numerical challenges. These areas are new and emerging, and are finding new applications, and is extremely interdisciplinary. I am very excited about working in these broad areas.
Find Out MoreStart Bootstrap has everything you need to get your new website up and running in no time! All of the templates and themes on Start Bootstrap are open source, free to download, and easy to use. No strings attached!
Get Started!Our templates are updated regularly so they don't break.
You can use this theme as is, or you can make changes!
We update dependencies to keep things fresh.
You have to make your websites with love these days!
Ready to start your next project with us? That's great! Give us a call or send us an email and we will get back to you as soon as possible!
123-456-6789


In the times of the Goths, after their king Totila heard that a holy man had a spirit of prophecy, he went to his monastery and halted a little way away and sent word that he had come to visit him. And as soon as the commission from the monastery came for him to come, since he was of a deceitful bent, he endeavored to test whether the man of God did have a spirit of prophecy.
Now a certain man, called Riggo, was his swordbearer. The king gave him his own shoes and had him dressed in royal garments, and instructed him to proceed to the man of God as if in his own person. And he sent three counts in his retinue, namely Vulteric, Ruderic and Blidin, who were accustomed to stick close to him in front of everyone else, to walk beside Riggo before the eyes of the servant of God, pretending that he was King Totila. And he also gave him attendants and swordbearers so that he'd be taken as the king, as much from these same attendants as from his purple garments.
And after this same Riggo, distinguished with robes and accompanied by a large retinue of attendants, entered the monastery, the man of God was sitting some ways away. And he observed the new arrival, and cried out as soon as he got within earshot, saying: "My son, take off what you're wearing; it is not yours. And this Riggo immediately fell to the ground in fear for presuming to mock such a man, and all who were coming with him to the man of God fell on the ground in consternation. Then they got up and dared to approach a bit closer to him, but after they returned to their king, the frightened men reported how quickly they'd been exposed.


Police appeal after jewellery stolen in Hamilton house raid
The incident took place at a property in Old Avon Road, Hamilton.
by Shirley Bartynek, https://www.dailyrecord.co.uk/authors/shirley-bartynek/Police are appealing for information after jewellery worth a five-figure sum was stolen from an elderly couple’s home.
The incident took place at a property on Old Avon Road, Ferniegair, at between 6.30pm and 7pm on Saturday, November 2.
Officers say a variety of jewellery, including gold watches and diamond rings were stolen from inside.
The upset couple this week told the Advertiser that some of the items stolen were sentimental to them and were irreplaceable.
They said: “We’ve had many pieces of jewellery stolen from our home.
“ Many had sentimental value and it was a horrible experience. We would urge anyone who has any information to contact the police, anonymously or otherwise.”
Among the items taken was a gold Omega ladies’ watch. It was in a red leather box and had a round face.
A gold three-diamond twist setting ring was also taken from the home.
Inspector Derek Hamilton said: “Police Scotland are requesting any member of the public who have information about any individuals’ involvement.
“Or if they have been approached by individuals trying to sell this jewellery could they please get in contact with us via 101 or Crimestoppers.
“The items stolen were not only valuable in monetary terms, but were of great sentimental value to the couple and we are doing everything we can to find their property for them.”


Apples (Fruit Station at Kennedy or Marketplace) Peanut Butter (C-store)
Scrambled Eggs (Breakfast Station) Cheese (Salad Bar)


Attach sticker to the objects you care like iphone, passport, notebook or wallet.
Description: 4 tickers helping you reward people who find the items you care about like you iphone, notebook or passport.
Technical details: Our round stickers are printed on thick, durable vinyl with a glossy finish. There are four stickers printed on a perforated sheet.
Safe and Secure Credit Card payments
are processed by Stripe.
We do not store or see your credit card data.


The xWordPress module is a part of the Windows PowerShell Desired State Configuration (DSC) Resource Kit, which is a collection of DSC Resources produced by the PowerShell Team. This module contains the xWordPressSite and xIisWordPressSite resources. This DSC Resource allows you to setup a WordPress Site.
All of the resources in the DSC Resource Kit are provided AS IS, and are not supported through any Microsoft standard support program or service. The ""x" in xWordPress stands for experimental, which means that these resources will be fix forward and monitored by the module owner(s).
Please leave comments, feature requests, and bug reports in the Q & A tab for this module.
If you would like to modify xWordPress module, feel free. When modifying, please update the module name, resource friendly name, and MOF class name (instructions below). As specified in the license, you may copy or modify this resource as long as they are used on the Windows Platform.
For more information about Windows PowerShell Desired State Configuration, check out the blog posts on the PowerShell Blog (this is a good starting point). There are also great community resources, such as PowerShell.org , or PowerShell Magazine . For more information on the DSC Resource Kit, check out this blog post.
To install xWordPress module
To confirm installation:
This module requires the Windows Management Framework (WMF) 5.0 Experimental Release July 2014, which contains functionality that has been updated from WMF 4.0. TheWMF 5.0 Experimental Release July 2014 is available for installation on Windows 8.1 and Windows
Server 2012 R2. More information about the content of the WMF 5.0 Experimental Release July 2014 is available in its dedicated release notes, included in the download links below.
Notice: WMF 5.0 Experimental Release July 2014 is delivered as an MSU installation package via the links below. Installing this will update the PowerShell, WMI, and WinRM components of your Windows installation. change the state of your machine,
as opposed to the scripts in Resource Kit. If you choose “Open” from either the x64 or x86 direct download links, the package will be downloaded, and the install will update your system with these new components.
Disclaimer: There is some scenarios in WMF 5.0 Experimental July 2014 with incomplete or missing functionality. This is also included in the dedicated release notes, which are included in the download links below.
Direct Download Links:
The xWordPress module contains the xIisWordPressSite DSC Resource. This DSC Composite Configuration allows you to configure an IIS site with the file required to run WordPress and set the contents of the WordPress configuration file.
The xWordPress module also contains the xWordPressSite DSC Resource. This DSC Resource allows you to configure a WordPress Site.
xIisWordPressSite resource has following properties:
xWordPressSite resource has following properties:
When making changes to these resources, we suggest the following practice:
We reserve resource and module names without prefixes ("x" or "c") for future use (e.g. "MSFT_WordPressSite" or "WordPressSite"). If the next version of Windows Server ships with a "WordPressSite" resource, we don't want to break any configurations that use any community modifications. Please keep a prefix such as "c" on all community modifications.
<IP_ADDRESS>
# This configuration configures a Basic WordPress Site # It requires xPhp, xMySql, xWordPress, and xWebAdministration # Please review the note about the FQDN variable and # about the URLs, they may need to be updated. # ********* NOTE *********** # If you are not targetting the local machine, # or this does not resolve to the correct FQDN for the machine # Update this to the FQDN of the target machine # ************************** [string] $fqdn = [System.Net.Dns]::GetHostByName(($env:computerName)).HostName Write-Host "Target Machine FQDN: $fqdn" [string] $role = "WordPress" $dataRoot = Split-Path $MyInvocation.MyCommand.Path $phpTemplatePath = join-Path $dataRoot "phpConfigTemplate.txt" $WordPressTemplatePath = Join-Path $dataRoot "WordPressConfigurationTemplate.ps1" if (-not (Test-Path $WordPressTemplatePath)) { $message = "Missing required file $WordPressTemplatePath" # This file is in the samples folder of the resource throw $message } $plainPassword = "pass@word1" $pwd = convertTo-SecureString -String $plainPassword -AsPlainText -Force $WordPressUserName = "WordPressUser" $WordPressDatabase = "WordPress" # Generate the contents of the WordPress configuration $wordPressConfig = & $WordPressTemplatePath -WordPressDatabase $WordPressDatabase -WordPressUserName $WordPressUserName -PlainPassword $plainPassword # ********* NOTE *********** # PHP and My SQL change their download URLs frequently. Please verify the URLs. # the WordPress and VC Redist URL change less frequently, but should still be verified. # After verifying the download URLs for the products and update them appropriately. # ************************** $configurationData = @{ AllNodes = @( @{ Role = $role NodeName = $fqdn PSDscAllowPlainTextPassword = $true; WordPress = @{ Title = "DSC WordPress Site Title" Admin = New-Object -TypeName System.Management.Automation.PSCredential -argumentlist (“DscAdmin”,$pwd) Email =<EMAIL_ADDRESS>Uri = "http://$fqdn" DownloadURI = "http://WordPress.org/latest.zip" Path = (Join-Path $env:SystemDrive "wwwWordPress") Config = $wordPressConfig SiteName = "WordPress" TemplatePath = $WordPressTemplatePath UserName = $WordPressUserName Database = $WordPressDatabase User = New-Object -TypeName System.Management.Automation.PSCredential -argumentlist (“$WordPressUserName”,$pwd) } Php = @{ # Update with the latest "VC11 x64 Non Thread Safe" from http://windows.php.net/download/ DownloadURI = "http://windows.php.net/downloads/releases/php-5.5.14-nts-Win32-VC11-x64.zip" TemplatePath = $phpTemplatePath Path = "$env:SystemDrive\php" Vc2012RedistUri = "http://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x64.exe" } PackageFolder = "$env:SystemDrive\packages" MySqlDownloadURI = "http://dev.mysql.com/get/Downloads/MySQLInstaller/mysql-installer-community-<IP_ADDRESS>.msi" Credential = New-Object -TypeName System.Management.Automation.PSCredential -argumentlist (“userNameNotUsed”,$pwd) #the password for root. no user name is needed as MySql installer is using only the user "root". PlainPassword = $plainPassword } ) } # Configuration to configure a Single machine WordPress Site Configuration WordPress { # Import composite resources Import-DscResource -module xMySql Import-DscResource -module xPhp Import-DscResource -module xWordPress Node $AllNodes.NodeName { # Make sure we have a folder for the packages File PackagesFolder { DestinationPath = $Node.PackageFolder Type = "Directory" Ensure = "Present" } # Make sure PHP is installed in IIS xPhp php { InstallMySqlExt = $true PackageFolder = $Node.PackageFolder DownloadUri = $Node.Php.DownloadURI DestinationPath = $Node.Php.Path ConfigurationPath = $Node.Php.TemplatePath Vc2012RedistDownloadUri = $Node.Php.Vc2012RedistUri } # Make sure MySql is installed with a WordPress database xMySqlProvision mySql { ServiceName = "MySqlService" DownloadURI = $Node.MySqlDownloadURI RootCredential = $Node.Credential DatabaseName = "WordPress" UserCredential = $Node.WordPress.User } # Make sure the IIS site for WordPress is created # Note, you still need to create the actuall WordPress Site after this. xIisWordPressSite iisWordPressSite { DestinationPath = $Node.WordPress.Path DownloadUri = $Node.WordPress.DownloadURI PackageFolder = $Node.PackageFolder Configuration = $Node.WordPress.Config } # Make sure the WordPress site is present xWordPressSite WordPressSite { Uri = $Node.WordPress.Uri Title = $Node.WordPress.Title AdministratorCredential = $Node.WordPress.Admin AdministratorEmail = $Node.WordPress.Email } # Make sure LCM will reboot if needed LocalConfigurationManager { RebootNodeIfNeeded = $true # uncomment when debugging on WMF 5 and above. # DebugMode = $true } } } $outputFolder = "$env:USERPROFILE\Desktop\WordPress" Wordpress -OutputPath $outputFolder -ConfigurationData $configurationData Set-DscLocalConfigurationManager -path $outputFolder -verbose Start-DscConfiguration -Wait -Verbose -path $outputFolder
# This configuration configures a Basic WordPress Site # It requires xPhp, xMySql, xWordPress, and xWebAdministration # Please review the note about the FQDN variable and # about the URLs, they may need to be updated. # ********* NOTE *********** # If you are not targetting the local machine, # or this does not resolve to the correct FQDN for the machine # Update this to the FQDN of the target machine # ************************** [string] $fqdn = [System.Net.Dns]::GetHostByName(($env:computerName)).HostName Write-Host "Target Machine FQDN: $fqdn" [string] $role = "WordPress" $dataRoot = Split-Path $MyInvocation.MyCommand.Path $phpTemplatePath = join-Path $dataRoot "phpConfigTemplate.txt" $WordPressTemplatePath = Join-Path $dataRoot "WordPressConfigurationTemplate.ps1" if (-not (Test-Path $WordPressTemplatePath)) { $message = "Missing required file $WordPressTemplatePath" # This file is in the samples folder of the resource throw $message } $plainPassword = "pass@word1" $pwd = convertTo-SecureString -String $plainPassword -AsPlainText -Force $WordPressUserName = "WordPressUser" $WordPressDatabase = "WordPress" # Generate the contents of the WordPress configuration $wordPressConfig = & $WordPressTemplatePath -WordPressDatabase $WordPressDatabase -WordPressUserName $WordPressUserName -PlainPassword $plainPassword # ********* NOTE *********** # PHP and My SQL change their download URLs frequently. Please verify the URLs. # the WordPress and VC Redist URL change less frequently, but should still be verified. # After verifying the download URLs for the products and update them appropriately. # ************************** $configurationData = @{ AllNodes = @( @{ Role = $role NodeName = $fqdn PSDscAllowPlainTextPassword = $true; WordPress = @{ Title = "DSC WordPress Site Title" Admin = New-Object -TypeName System.Management.Automation.PSCredential -argumentlist (“DscAdmin”,$pwd) Email =<EMAIL_ADDRESS>Uri = "http://$fqdn" DownloadURI = "http://WordPress.org/latest.zip" Path = (Join-Path $env:SystemDrive "wwwWordPress") Config = $wordPressConfig SiteName = "WordPress" TemplatePath = $WordPressTemplatePath UserName = $WordPressUserName Database = $WordPressDatabase User = New-Object -TypeName System.Management.Automation.PSCredential -argumentlist (“$WordPressUserName”,$pwd) } Php = @{ # Update with the latest "VC11 x64 Non Thread Safe" from http://windows.php.net/download/ DownloadURI = "http://windows.php.net/downloads/releases/php-5.5.14-nts-Win32-VC11-x64.zip" TemplatePath = $phpTemplatePath Path = "$env:SystemDrive\php" Vc2012RedistUri = "http://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x64.exe" } PackageFolder = "$env:SystemDrive\packages" MySqlDownloadURI = "http://dev.mysql.com/get/Downloads/MySQLInstaller/mysql-installer-community-<IP_ADDRESS>.msi" Credential = New-Object -TypeName System.Management.Automation.PSCredential -argumentlist (“userNameNotUsed”,$pwd) #the password for root. no user name is needed as MySql installer is using only the user "root". PlainPassword = $plainPassword } ) } # Configuration to configure a Single machine WordPress Site Configuration WordPress { # Import composite resources Import-DscResource -module xMySql Import-DscResource -module xPhp Import-DscResource -module xWordPress Node $AllNodes.NodeName { # Make sure we have a folder for the packages File PackagesFolder { DestinationPath = $Node.PackageFolder Type = "Directory" Ensure = "Present" } # Make sure PHP is installed in IIS xPhp php { InstallMySqlExt = $true PackageFolder = $Node.PackageFolder DownloadUri = $Node.Php.DownloadURI DestinationPath = $Node.Php.Path ConfigurationPath = $Node.Php.TemplatePath Vc2012RedistDownloadUri = $Node.Php.Vc2012RedistUri } # Make sure MySql is installed with a WordPress database xMySqlProvision mySql { ServiceName = "MySqlService" DownloadURI = $Node.MySqlDownloadURI RootCredential = $Node.Credential DatabaseName = "WordPress" UserCredential = $Node.WordPress.User } # Make sure the IIS site for WordPress is created # Note, you still need to create the actuall WordPress Site after this. xIisWordPressSite iisWordPressSite { DestinationPath = $Node.WordPress.Path DownloadUri = $Node.WordPress.DownloadURI PackageFolder = $Node.PackageFolder Configuration = $Node.WordPress.Config } # Make sure the WordPress site is present xWordPressSite WordPressSite { Uri = $Node.WordPress.Uri Title = $Node.WordPress.Title AdministratorCredential = $Node.WordPress.Admin AdministratorEmail = $Node.WordPress.Email } # Make sure LCM will reboot if needed LocalConfigurationManager { RebootNodeIfNeeded = $true # uncomment when debugging on WMF 5 and above. # DebugMode = $true } } } $outputFolder = "$env:USERPROFILE\Desktop\WordPress" Wordpress -OutputPath $outputFolder -ConfigurationData $configurationData Set-DscLocalConfigurationManager -path $outputFolder -verbose Start-DscConfiguration -Wait -Verbose -path $outputFolder
# This Script installs the required modules for the WordPress Sample
# It uses the PowerShell Resource Gallery, see https://msconfiggallery.cloudapp.net/
# This requires WMF 5.
If you don't have WMF 5, Please install the modules manually.
Write-Host "Installing required modules..."
Install-Module
xWebAdministration
-MinimumVersion
1.3.2
-Force
Install-Module
xPSDesiredStateConfiguration
-MinimumVersion
3.0.1
-Force
Install-Module
xMySql -MinimumVersion
1.0 -Force
Install-Module
xWordPress -MinimumVersion
1.0 -Force
Install-Module
xPhp -MinimumVersion
1.0.1 -Force


Blog
Meet the ancestors in medieval Swansea!
After the screening of the report on the medieval Swansea project on BBC Wales News last week, I received an email from Steve Davies, who lives near Swansea, and who has been researching the history of his family. Steve has traced his ancestors through a number of gentry families in Glamorgan, right back into the fourteenth century! He has produced a book to share with his family - a tremendous piece of research which brings alive medieval Swansea and the surrounding area through the names and identities of individuals who lived there, as well as through links to family members living today.
Steve has done some very detailed research on the Hopkin family of Danygraig near Swansea (the modern-day Port Tennant area) and kindly shared some of the material with me. A Hopkin David Edwards of Danygraig who died in 1626 was at one time Portreeve of Swansea. His will bequeaths houses to his children in Goat Street, Wind Street and Castle Street.
Steve's 15x great grandfather, David ap Hopkin ap Grifith Gethin, quit a 'burgage in the street of the fishermen' (presumably Fisher Street) in 1422. In 1417 there was a grant by John, Earl Marshall and of Nottingham, Marshal of England, Lord of Mowbray, of Segrave, and of Gower, to Roger Joudrell, of a burgage at Swansea, between the tenements of Thomas Gibbe and Richard Horton, with the ditch of the Castle bailey on the north and the highroad on the south, to which David ap Hopkin was a witness. He is described there as a lieutenant. David’s grandfather, Gruffudd Gethin, was mentioned in Glamorgan charters in 1328 and 1333. He married a daughter of Leisan D’Avene, Lord of Afan (Aberafan).
Just like the story of William Cragh, Steve's painstaking research really adds human detail and colour to the history of Swansea. We've also been able to share some of our project images with Steve for inclusion in his book. We're always pleased for our project research to be used in interesting contexts, so do please get in touch if you would like to draw on the website materials.
Share on Twitter Share on Facebook


Login to PostIt
Email:
Password:
Log In
Don't have a PostIt account?
Signup
Create a PostIt Account
Name:
Email:
Phone No:
Password:
Sign Up
Have a PostIt account?
Login


|
Vienna Vulkan Engine
|
Subrenderer that manages draws the shadow pass. More...
#include <VESubrenderFW_Shadow.h>
Public Member Functions | |
| VESubrenderFW_Shadow () | |
| Constructor. | |
| virtual | ~VESubrenderFW_Shadow () |
| Destructor. | |
| virtual veSubrenderClass | getClass () |
| virtual veSubrenderType | getType () |
| virtual void | initSubrenderer () |
| Initialize the subrenderer. More... | |
| virtual void | addEntity (VEEntity *pEntity) |
| Add an entity to the list of associated entities. More... | |
| void | bindDescriptorSetsPerEntity (VkCommandBuffer commandBuffer, uint32_t imageIndex, VEEntity *entity) |
| Bind default descriptor sets. More... | |
| virtual void | draw (VkCommandBuffer commandBuffer, uint32_t imageIndex, uint32_t numPass, VECamera *pCamera, VELight *pLight, std::vector< VkDescriptorSet > descriptorSetsShadow) |
| Draw all associated entities for the shadow pass. More... | |
| Public Member Functions inherited from ve::VESubrender | |
| VESubrender () | |
| Constructor of subrender class. | |
| virtual | ~VESubrender () |
| Destructor of subrender class. | |
| virtual void | closeSubrenderer () |
| Close down the subrenderer and destroy all local resources. | |
| virtual void | recreateResources () |
| If the window size changes then some resources have to be recreated to fit the new size. | |
| virtual void | bindPipeline (VkCommandBuffer commandBuffer) |
| Bind the subrenderer's pipeline to a commandbuffer. More... | |
| virtual void | bindDescriptorSetsPerFrame (VkCommandBuffer commandBuffer, uint32_t imageIndex, VECamera *pCamera, VELight *pLight, std::vector< VkDescriptorSet > descriptorSetsShadow) |
| Bind per frame descriptor sets to the pipeline layout. More... | |
| virtual void | setDynamicPipelineState (VkCommandBuffer commandBuffer, uint32_t numPass) |
| Set the dynamic state of the pipeline - does nothing for the base class. | |
| virtual void | prepareDraw () |
| Prepare to perform draw operation. | |
| virtual VkSemaphore | draw (uint32_t imageIndex, VkSemaphore wait_semaphore) |
| virtual void | drawEntity (VkCommandBuffer commandBuffer, uint32_t imageIndex, VEEntity *entity) |
| Draw one entity. More... | |
| virtual void | removeEntity (VEEntity *pEntity) |
| Removes an entity from this subrenderer - does NOT delete it. More... | |
| uint32_t | getNumberEntities () |
| VkPipelineLayout | getPipelineLayout () |
| return the layout of the local pipeline | |
Subrenderer that manages draws the shadow pass.
|
virtual |
Add an entity to the list of associated entities.
| [in] | pEntity | Pointer to the entity to include into the list. |
Reimplemented from ve::VESubrender.
|
virtual |
Bind default descriptor sets.
The function binds the default descriptor sets. Can be overloaded.
| [in] | commandBuffer | The command buffer to record into all draw calls |
| [in] | imageIndex | Index of the current swap chain image |
| [in] | entity | Pointer to the entity to draw |
Reimplemented from ve::VESubrender.
|
virtual |
Draw all associated entities for the shadow pass.
The subrenderer maintains a list of all associated entities. In this function it goes through all of them and draws them. A vector is used in order to be able to parallelize this in case thousands or objects are in the list
| [in] | commandBuffer | The command buffer to record into all draw calls |
| [in] | imageIndex | Index of the current swap chain image |
| [in] | numPass | The number of the light that has been rendered |
| [in] | pCamera | Pointer to the current light camera |
| [in] | pLight | Pointer to the current light |
| [in] | descriptorSetsShadow | The shadow maps to be used. |
Reimplemented from ve::VESubrender.
|
inlinevirtual |
Implements ve::VESubrender.
|
inlinevirtual |
Implements ve::VESubrender.
|
virtual |
Initialize the subrenderer.
Create descriptor set layout, pipeline layout and the PSO
Reimplemented from ve::VESubrender.


Bob
Manager
- Email<EMAIL_ADDRESS>- Employee ID: 410
- office:<PHONE_NUMBER>
Sarehon Taylor
Employee
- Email<EMAIL_ADDRESS>- Employee ID: 410555
Donald Duck
Engineer
- Email<EMAIL_ADDRESS>- Employee ID: 44
- GitHub : donaldduck
Chris Smith
Intern
- Email<EMAIL_ADDRESS>- Employee ID: 41077
- school: TheOhioStateUniversity


|
|||||||||||
| PREV NEXT | FRAMES NO FRAMES |
| Packages that use org.joone.engine | |
| org.joone.edit | |
| org.joone.edit.visad | |
| org.joone.engine | |
| org.joone.engine.learning | |
| org.joone.io | |
| org.joone.net | |
| org.joone.script | |
| org.joone.util |
| Classes in org.joone.engine used by org.joone.edit | |
| InputPatternListener
This interface represents an input synapse for a generic layer. |
|
| Layer
The Layer object is the basic element forming the neural net. |
|
| Monitor
The Monitor object is the controller of the behavior of the neural net. |
|
| NeuralElement
This interface represents a generic element of a neural network |
|
| NeuralNetEvent
|
|
| NeuralNetListener
|
|
| OutputPatternListener
This interface represents an output synapse for a generic layer. |
|
| Pattern
The pattern object contains the data that must be processed from a neural net. |
|
| Synapse
The Synapse is the connection element between two Layer objects. |
| Classes in org.joone.engine used by org.joone.edit.visad | |
| Monitor
The Monitor object is the controller of the behavior of the neural net. |
|
| NeuralElement
This interface represents a generic element of a neural network |
|
| NeuralNetEvent
|
|
| NeuralNetListener
|
|
| OutputPatternListener
This interface represents an output synapse for a generic layer. |
|
| Pattern
The pattern object contains the data that must be processed from a neural net. |
| Classes in org.joone.engine used by org.joone.engine | |
| AbstractEventNotifier
This class raises an event notification invoking the corrisponnding Monitor.fireXXX method. |
|
| FIRFilter
Element of a connection representing a FIR filter (Finite Impulse Response). |
|
| FullSynapse
|
|
| InputPatternListener
This interface represents an input synapse for a generic layer. |
|
| Layer
The Layer object is the basic element forming the neural net. |
|
| Learnable
|
|
| LearnableLayer
|
|
| LearnableSynapse
|
|
| Learner
|
|
| Matrix
The Matrix object represents the connection matrix of the weights of a Synapse: it contains the weight of each connection, its last modification and 2 boolean values indicating whether the weight is on/off and trainable/fixed. |
|
| MemoryLayer
|
|
| Monitor
The Monitor object is the controller of the behavior of the neural net. |
|
| NeuralElement
This interface represents a generic element of a neural network |
|
| NeuralLayer
This is the interface for all the layer objects of the neural network |
|
| NeuralNetEvent
|
|
| NeuralNetListener
|
|
| OutputPatternListener
This interface represents an output synapse for a generic layer. |
|
| Pattern
The pattern object contains the data that must be processed from a neural net. |
|
| SimpleLayer
This abstract class represents layers that are composed by neurons that implement some transfer function. |
|
| SpatialMap
SpatialMap is intended to be an abstract spatial map for use with a GaussianLayer. |
|
| Synapse
The Synapse is the connection element between two Layer objects. |
| Classes in org.joone.engine used by org.joone.engine.learning | |
| Fifo
The Fifo class represents a first-in-first-out
(FIFO) stack of objects. |
|
| InputPatternListener
This interface represents an input synapse for a generic layer. |
|
| Learnable
|
|
| LinearLayer
The output of a linear layer neuron is the sum of the weighted input values, scaled by the beta parameter. |
|
| Monitor
The Monitor object is the controller of the behavior of the neural net. |
|
| NeuralElement
This interface represents a generic element of a neural network |
|
| NeuralNetEvent
|
|
| NeuralNetListener
|
|
| OutputPatternListener
This interface represents an output synapse for a generic layer. |
|
| Pattern
The pattern object contains the data that must be processed from a neural net. |
|
| Synapse
The Synapse is the connection element between two Layer objects. |
| Classes in org.joone.engine used by org.joone.io | |
| Fifo
The Fifo class represents a first-in-first-out
(FIFO) stack of objects. |
|
| InputPatternListener
This interface represents an input synapse for a generic layer. |
|
| Learnable
|
|
| Monitor
The Monitor object is the controller of the behavior of the neural net. |
|
| NeuralElement
This interface represents a generic element of a neural network |
|
| OutputPatternListener
This interface represents an output synapse for a generic layer. |
|
| Pattern
The pattern object contains the data that must be processed from a neural net. |
|
| Synapse
The Synapse is the connection element between two Layer objects. |
| Classes in org.joone.engine used by org.joone.net | |
| InputPatternListener
This interface represents an input synapse for a generic layer. |
|
| Layer
The Layer object is the basic element forming the neural net. |
|
| Learnable
|
|
| Matrix
The Matrix object represents the connection matrix of the weights of a Synapse: it contains the weight of each connection, its last modification and 2 boolean values indicating whether the weight is on/off and trainable/fixed. |
|
| Monitor
The Monitor object is the controller of the behavior of the neural net. |
|
| NeuralLayer
This is the interface for all the layer objects of the neural network |
|
| NeuralNetEvent
|
|
| NeuralNetListener
|
|
| OutputPatternListener
This interface represents an output synapse for a generic layer. |
| Classes in org.joone.engine used by org.joone.script | |
| NeuralNetListener
|
| Classes in org.joone.engine used by org.joone.util | |
| InputPatternListener
This interface represents an input synapse for a generic layer. |
|
| Learnable
|
|
| Monitor
The Monitor object is the controller of the behavior of the neural net. |
|
| NeuralElement
This interface represents a generic element of a neural network |
|
| NeuralNetEvent
|
|
| NeuralNetListener
|
|
| OutputPatternListener
This interface represents an output synapse for a generic layer. |
|
| Pattern
The pattern object contains the data that must be processed from a neural net. |
|
| Synapse
The Synapse is the connection element between two Layer objects. |
|
|||||||||||
| PREV NEXT | FRAMES NO FRAMES |


The corpus comprises audio recordings and transcripts from TEDx Talks in 8 languages (Spanish, French, Portuguese, Italian, Russian, Greek, Arabic, German) with translations into up to 5 languages (English, Spanish, French, Portguese, Italian).
The audio recordings are automatically aligned at the sentence level with their manual transcriptions and translations.
Each .tgz
file contains two directories: data
and docs
. docs
contains a README detailing the files provided in data
and their structure.
Test sets for all IWSLT 2021 language pairs are released in mtedx_iwslt2021.tgz
. The references will be released after the evaluation period in April.
The ST training data for pt-es, it-es, it-en are being held out for IWSLT 2021 and will be released after the evaluation period in April.
Contact: Elizabeth Salesky, Matthew Wiesner<EMAIL_ADDRESS><EMAIL_ADDRESS>Citation: Please cite the data using the following BibTeX entry:
@misc{salesky2021mtedx, title={Multilingual TEDx Corpus for Speech Recognition and Translation}, author={Elizabeth Salesky and Matthew Wiesner and Jacob Bremerman and Roldano Cattoni and Matteo Negri and Marco Turchi and Douglas W. Oard and Matt Post}, year={2021}, }


Commands
| Filename | ||
| Meaning: | Sets file name for the generated image. | |
| Syntax: | Filename(name) |
|
| Argument types: | name: |
string |
| Usage example: |
|
|
| Import | ||
| Meaning: | Imports the specified package. After a package is imported, functions and variables from it can be used without being prefixed with the package name. The prefix is still needed in case of a conflict (e.g. two functions from different packages having the same name). | |
| Syntax: | Import(name) |
|
| Argument types: | name: |
packageName |
| Usage example: |
|
|
| Load | ||
| Meaning: | Loads an image from the specified file and stores it as a generator in a new variable. Note: the variable must not have any value before this command is used. |
|
| Syntax: | Load(variable, filename) |
|
| Argument types: | variable: |
variable name |
filename: |
string |
|
| Usage example: |
|
|
| Randomize | ||
| Meaning: | Enables or disables randomization. By default, filters with the same seed and arguments always generate the same output. Enabling randomization changes this behavior, so that the generation is fully randomized. | |
| Syntax: | Randomize(doRandomize) |
|
| Argument types: | doRandomize: |
boolean ($TRUE or $FALSE) |
| Usage example: |
|
|
| Size | ||
| Meaning: | Sets size (in pixels) of the output image. | |
| Syntax: | Size(size) |
|
| Argument types: | size: |
integer between 1 and 8192 |
| Usage example: |
|
|
| Smoothing | ||
| Meaning: | Sets texture smoothing (antialiasing) level. 0 means no smoothing, higher values will slow down image generation. | |
| Syntax: | Smoothing(level) |
|
| Argument types: | level: |
0, 1 or 2 |
| Usage example: |
|
|
| Texture | ||
| Meaning: | Generates image with the currently set size and saves it in a file with the currently set file name in PNG format. | |
| Syntax: | Texture(generator) |
|
| Argument types: | generator: |
any generator |
| Usage example: |
|
|
| Video | ||
| Meaning: | Like Texture, but generates multiple images/frames. First argument determines how many frames should be generated, filters from the video package can be used to change the output according to the current frame/time. | |
| Syntax: | Video(frames, generator) |
|
| Argument types: | frames: |
integer between 1 and 7,500 |
generator: |
any generator |
|
| Usage example: |
|
|
| Debugtex | ||
| Meaning: | Generates image for each currently defined custom variable, all images will have the specified size. | |
| Syntax: | Debugtex(size) |
|
| Argument types: | size: |
integer between 1 and 8192 |
| Usage example: |
|
|
| Debugtime | ||
| Meaning: | Enables or disables time measurement. When enabled, every Texture and Video command will measure the time it takes to generate each image/frame. | |
| Syntax: | Debugtime(measureTime) |
|
| Argument types: | measureTime: |
boolean ($TRUE or $FALSE) |
| Usage example: |
|
|


| Toni, a tomboyish boxer, lands a spot on an after-school drill team in the West End community of Cincinnati. She eagerly absorbs routines, masters drills, and even pierces her own ears to fit in. It’s the joy of her first friendships and her discovery of dance. Shortly after Toni joins the team, most of the girls on the team suffer from episodes of fainting, swooning, and shaking in a seemingly uncontrollable catharsis. Nobody can explain the mysterious outbreak. These fits soon transform into a rite of passage as the trauma draws the other girls closer together. Caught between her need for control and her desire for acceptance, Toni must decide how far she will go to embody her new ideals. | |
| Genres: | Drama |
| Director: | Anna Rose Holmer |
| Writer: | Saela Davis, Anna Rose Holmer, Lisa Kjerulff |
Cast: | Toni - Royalty Hightower Beezy - Alexis Neblett Maia - Lauren Gibson Jermaine - Da'Sean Minor Karisma - Inayah Rodgers Legs - Makyla Burnam Donté - Antonio A.B. Grant Jr. |


Contact
Portfolio
About
Contact Me
Name:
Email:
Phone number:
Preferred contact method:
E-mail
Phone
Message:
Submit
Reset
Connect With Me


-The Day
It was a Wednesday night and I had just gotten off work. I was walking down the street when I'd met some kids from the neighborhood. They’d asked me if I needed a drink and I absolutely did.  Then we decided to try and score some meth.  He said he could hook us up. They needed to drive home because one friend was vomiting and needed to rest. I was left with this stranger, completely inviting and cool nonetheless, to score some dope.
He got me a baggy and I did a line. I was already hammered off of vodka. We went to his house and smoked some bowls of speed too. He told me I should be sober by now. I was still really drunk.
-The Plan
We started talking about shooting up. For some reason, after being against shooting up for so long, I thought it could be cool.
-The Syringe
He was cleaning a syringe off with bleach and I said, 'hell no, you're getting me a new one' so he got me a new packaged one and found my vein.
-The Shot
I told him to only inject half of what he had in the syringe, I'm so sensitive to speed and I already had so much in my system. he tried injecting the full thing and I pushed the needle away as I lost the ability to breathe and stumbled on to the bed. I couldn't breath for what seemed like hours but was probably a few seconds. I felt more than I'd ever felt in my life. Euphoria like none other. Then I felt like I'd pissed my pants. I ran to the bathroom and peed what felt like a gallon of clearness, alcohol maybe? I looked in the mirror and my eyes were huge. I looked like an insane tweaker pokemon. My eyes were opened so wide that I could see the whole iris (or mostly pupil) and the white all around it.
-Sexual
When I got back from peeing the Mississippi river, he was there, unclothed. I told him I wasn't going to sleep with him and honestly, I was in no mood to make out. He tried convincing me but I needed to just lie down and relax. Being in someone's house shooting up speed was freaking me out. I'd definitely reached my peak and kept mumbling 'this is too much of a feeling… too much of a feeling... can't take it this is more than I've felt in my whole life'. I had to lie down and keep moving so I was rolling around with this euphoric rush everywhere.
-The Decline
Here come the cold sweats.  I was clenching my jaw and biting my nails to the bone. My eyes were still too scary to look at people with. I was too uncomfortable to be active, and too inactive to be comfortable. I started with illusions.
-The Illusions:
Spiders everywhere, regular objects turning into cameras, random objects getting wavy, bottled waters breathing, People in the windows, shadows moving. Horrible short nightmares of the cops and people with guns coming in and shooting at me. I was no longer euphoric. now I just felt like a paranoid tweaker and I looked like one too. I was also in the constant paranoia of pissing my pants so I would make runs to the bathroom every minute.
-The Aftermath
That was all Wednesday night. It's Friday night now and thank god for sleeping pills and benzodiazepines otherwise I'd probably have had a heart attack. My pupils are still a bit large but what bothers me the most is the slight paranoia that I still feel in the comfort of my own house. I hope that if I take a sleeping pill now, everything will be ok in the morning.
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.


In Postgres you have the ability to write recursive queries that refer to
themselves. This is a very powerful construct, and among other use cases can
greatly simplify fetching any type of hierarchical data, such as any data where
an attribute refers to another row on the same table.
For example, a graph structure where a parent identifier refers to the an ID on
the same table. Another example can be seen on audit trail type tables,
containing prior and new versions of some value.
Let’s prepare an example to show showcase recursive querying in postgres.
First, a table holding old and new email address values:
A few potentially new concepts in here. First of all we have WITH queries,
formally called Common Table Expressions. CTEs can be used as a a view, but
they have the important property that they are performance gates: postgres is
guaranteed to execute each CTE in a query indepently. CTEs are much more than
a view however: they can return data from a DELETE operation that can be
consequently operated on, they can define updatable datasets, and more to the
point, they can be self-referential or recursive.
Recursive CTEs are those that refer to themselves in the body, such as the
above query. They’re not really recursive, but rather iterative, but the SQL
standard is the law around here, so we live with it.
Breaking apart the above query, here’s what happens:
SELECT * FROM all_emails; invokes the all_emails CTE.
all_emails has two parts, the non-recursive and the recursive terms,
which are separated by the UNION keyword. It could also be UNION ALL;
the former removes dupes and the latter doesn’t. At this stage, the
non-recursive term is executed and placed on a data structure called the working table.
The working table now contains one row:
The contents of the working table are appended to the result of the recursive
query at this point.
Then the recursive term is executed, where the self-reference is
substituted with the contents of the working table, placing the result
in another data structure called an intermediate table. Thus, the
intermediate table looks like so:
The contents of the working table are now replaced by those of the
intermediate table, and the intermediate table is emptied.
Because the working table is not empty, steps 2 through 4 are repeated.
When the working table is empty, return the query results
Whether it’s for OLTP/application usage, or for ad-hoc reporting, Recursive
CTEs can help optimize and simplify code required to get at the data you need.
To learn more about other powerful operations that can be done with CTEs, see
the official postgres
docs.
Postgres has a few handy primitives for dealing with distributed process level
locking. Because these locks are atomic and handled by the database, they are
well suited for coordinating concurrent processes’ access to shared resources.
For example, a checkout endpoint on an ecommerce site should be placed behind
such an advisory lock, so that if the user initiates two check out processes
consecutively, only one occurs. Even if the two requests make it to different
web processes, the second attempt should gracefully be rolled back.
Another example can be seen in worker processes that perform some sort of
action in a loop or on a schedule, but for which only one process should be
executing at a time. You may spin up two such processes ensuring high
availability, but they only operate if a lock is acquired. In this way, the
first process acquires the lock, and the second blocks until the first one
releases it, either because it crashed or it gracefully exited.
Postgres locking
Postgres has various functions that can be used for creating locks. The topic
of this article is advisory locks. Explicit locks are those taken by database
operations such as concurrent writes, and they are guaranteed to be obeyed no
matter what. For example, one process updating a column and another trying to
drop the very same column, would be a situation that cannot be handled
concurrently, and one will inevitably have to wait for the other to complete
in order to do it’s job.
In the advisory lock case, the application requests a lock in order to perform
some operation, and releases it when it’s done. It’s up to the application
itself to obey this lock, hence the name. It’s entirely possible for a missbehaved
application to simply ignore the lock.
In the advisory lock family of functions, we can categorize them as:
Session level: those that affect a session or connection. When taking a
session level lock, if a transaction fails and rolls back, the lock will
continue to be held until it is explicitely released.
Transaction level: locks that automatically get released at the end of a
transaction. In many cases the semantics offered by transaction level locking
are a better fit for the underlying problem. In general, if the action being
performed is wrapped in a transaction, this is likely the best suited locking
scope.
Beyond the above, locks can be blocking or non-blocking. In the blocking case,
the request for a lock will wait until it can be obtained, whereas in the non-blocking
case the request returns immediately but returns false.
Usage examples
Session level
Let’s look at session level locks first. Opening up two psql sessions we can
experiment with the locking semantics:
psql session 1
12345
SELECTpg_advisory_lock(1);
pg_advisory_lock
------------------
(1row)
psql session 2
1
SELECTpg_advisory_lock(1);
Here, session 2 just blocks until the lock is acquired. On a third session we
can check in pg_locks and pg_stat_activity to verify this:
Because this is a session level lock, failing or rolling back any transaction
while holding a lock does not release the lock at all. Only explicitely unlocking
or disconnecting the client would release the lock.
Transaction level
Now let’s take a look at how transaction level locks work:
psql session 1
123456
BEGIN;
SELECTpg_try_advisory_xact_lock(1);
pg_try_advisory_xact_lock
---------------------------
t
(1row)
Note also that we’re using the try variant of locking functions. Instead of
blocking on a lock to be obtained, the try variants return true or false
depending on whether a lock could be obtained.
On session 2, we can try grabbing a lock as well:
psql session 2
123456
BEGIN;
SELECTpg_try_advisory_xact_lock(1);
pg_try_advisory_xact_lock
---------------------------
f
(1row)
It returned false, because the first session already has said lock. If we were
to complete this transaction either by failing, a COMMIT or a ROLLBACK, then
this lock can be acquired. Let’s try that:
psql session 1
1
ROLLBACK;
After exiting the transaction on one session, the other ought to be able to
acquire it:
psql session 2
12345
SELECTpg_try_advisory_xact_lock(1);
pg_try_advisory_xact_lock
---------------------------
t
(1row)
All postgres locking functions take an application defined key in the form of
one 64-bit integers or two 32-bit integers. An application may create CRC
values from higher level abstractions to be supplied as locking keys. For
example, a suitable integer for a lock on user ID 4232 may be the CRC of the
string “user4232”. This pattern is implemented in the
locksmith
ruby library as well as python’s
tusk
library, and works well as an easy to understand application level abstraction.
Conclusion
Applications in modern software development and delivery are distributed in
nature. Distributed mutexes and locks are an important primitive to help
synchronize and ensure correctness of behavior under concurrent environments.
Many projects and products with distributed lock managers exist (Zookeeper,
Google Chubby, Doozer, etc), but Postgres provides a lightweight mechanism that
is suitable for many locking needs, without incurring the cost of additional
infrastructure dependencies to an environment that already makes use of
Postgres for data storage.
More information about advisory locks in postgres can be found here and here.
At Heroku we have APIs for pretty much everything. Need logs for an app? Is
that database available? You just beat someone at ping pong? There’s an API for
that. Having such rich datasets available is great. It allows us to build
dashboards with mashups of different datasets and serve them from a web
browser.
Here are some of the techniques implemented in order to wire up a Backbone.js
application speaking to remote hosts in a secure manner. We will explore
Cross-Origin Resource Sharing (CORS) as well as HMAC based auth tokens with
cryptographically timestamped data that an attacker wouldn’t be able to
auto-replay. The end goal is to have an application running on a browser, and
securely request data from an API running on a remote host.
The first problem when issuing XHR requests across hosts will be the
same-origin policy violation. Go ahead, issue an AJAX request against a remote
host. The browser should fail with an error similar to the following:
1
XMLHttpRequest cannot load https://some.remote.com. Origin https://your.site.com is not allowed by Access-Control-Allow-Origin
This is where Cross Origin Resource Sharing (CORS)
comes in. The way it works is that the Origin (the client) will issue what’s
called a pre-flight request, asking the server “hey, can I make a request with
HTTP verb foo to path /bar with headers x-baz?”, to which the server responds,
“Sure, bring it!”, or “No, you may not”. This pre-flight request is made to the
same path as the actual request, but the HTTP OPTIONS verb is used instead.
The server responds with the following headers, should the request be allowed:
Access-Control-Allow-Origin: Specifies what Origins are allowed remote XHR
requests to be made against this server. Allowed values include a URL (eg:
https://your.site.com), a comma separated list of URLs, or an asterisk
indicating all origins are allowed.
Access-Control-Allow-Headers: Specifies a comma separated list of headers
that the Origin is allowed to include in requests to this server. There are
many reasons to include custom headers - we’ll see an example of this further
down.
Access-Control-Max-Age: This is optional, but it allows the browser to
cache this response for the given number of seconds, so browsers will save
themselves the pre-flight request any subsequent times. Freely set it to a
large number, like 30 days (2592000)
There are more headers that allow you to whitelist and otherwise control access to the resource. Be sure to read up on CORS.
Thus, a Sinatra app acting as the remote end of the system can respond to pre-flight OPTIONS requests like so:
Inclusion of the Allow Origin and Allow Headers headers is also necessary on responses to any other remote XHR requests. We can extract the headers directive to a helper and use it on both pre-flight and other requests:
And just like that, browsers can now issue XHR requests against remote APIs. Of
course, there is no authentication in place yet.
We will implement an HMAC based auth token mechanism. Both the remote server
and your app share a secret. This secret is used to generate a token containing
a timestamp that is used for validating token recency. The HMAC digest is a
signature that is generated with the shared secret, and it can be used to
verify the authenticity of the entity that generated the token. It answers
the question of whether the the client of the API request is authentic.
To generate the token, we create a JSON document containing an issued_at
timestamp, and we calculate its sha256 HMAC token using the secret known to
both parties. Finally, we append this signature to the JSON document and we
base64 encode it to make it safe to send over the wire. Here’s an example
implementation:
This token is used on the API server to authenticate requests. The client can
be made to send a custom header, let’s call it X_APP_AUTH_TOKEN, which it must
be able to reconstruct the token from the JSON data, and then validate that the
request is recent enough. For example in a Sinatra application:
In the above code, we consider a token invalid if it was issued more than 2
minutes ago. Real applications will probably include more data in the auth
token, such as the email address or some user identifier that can be used for
auditing and whitelisting. All of the above data token generation and
verification has been extracted to a handy little gem called
fernet.
Do not reimplement this, just use fernet. In addition to HMAC signature,
fernet also makes it easy to encrypt the message’s payloads, which opens it up
for other interesting use cases.
The authenticate! method must be invoked before serving any request. This
means that the auth token must be included on every request the client makes.
There are many ways of doing this. One approach, if you’re using JQuery to back
Backbone.sync(), is to use its $.ajax beforeSend hook to include the header, as
can be seen in the following coffeescript two-liner:
App.authToken can come from a number of places. I decided to bootstrap it
when the page is originally served, something like:
123
<scripttype="text/javascript">
App.authToken="<%= auth_token %>";
</script>
In addition to that, it should be updated in an interval, so that on a single
page app, that doesn’t request any page refreshes, the auth token is always
fresh and subsequent API requests can be made.
The final client side code that provides the auth token and keeps it updated
looks like so:
123456789
<scripttype="text/javascript">
App.authToken="<%= auth_token %>";//bootstrap an initial value
The /auth_token server side endpoint simply responds with a new valid
token.
The fernet token expires every minute by default. I decided to update it
every 29 seconds instead so that it can be updated at least twice
before it has a chance to hold and use an expired token against a remote API.
In this app, the server side is used for one thing only: user authentication.
The way it works is that when a request is made, the sinatra app performs oauth
authentication against our google apps domain. Once the oauth dance has
suceeded, the app generates a token that is handed on to the client for
authenticating against backend, remote APIs.
This whole setup has worked great for some months now.
Some developers like writing tests first, letting your tests drive the implementation, essentially becoming the first clients of your software. Others like writing production code first and kind of figure out how it works, and then they apply some tests after the fact. I am convinced that writing tests in this way is far less effective, but this is not an article on the merits of TDD. Others don’t like writing tests at all, so it’s a varying scale.
You can write software from the bottom up, where you are forced to figure out what the data model and base objects should be and how it is to support all known use cases. This is hard, particularly in this day and age where software requirements are unpredictable and are meant to change very rapidly - at least in the fun industries.
You can also write software from the top down. In this case you let the outer shell of your software dictate what the inner layers need. For example, start all the way on the user interactions via some sketches and HTML/CSS in a web app. Or think through the CLI that you want. Readme driven development can help with this, too.
Outside-in development puts you in a great position to practice top-down design.
The advantage of Outside-in development is twofold. Not only are you left with acceptance tests that will catch regressions and help refactor later. But also, the top layers of your software becomes a client of the code you are about to write, helping define its interface in a similar way that practicing TDD for your unit tests help guide the design of software component at a very granular level.
These practices will help you define internal APIs that feel good faster, because you will notice cumbersome interfaces sooner, and are therefore given the opportunity to fix them when they have the least possible number of dependencies.
I know of many developers who prefer writing no tests, or prefer a bottom-up strategy. This does not mean that their software is of poor quality, by no means. But I will observe that I can’t ship software of the quality standard that I put myself to unless I write tests first and follow outside-in methodologies. Indeed, this seems to indicate they are smarter than me.
Boston.io took place yesterday at the Microsoft NERD Center. The event is aimed at students in the Greater Boston area who are interested in entrepreneurship and coding, whether that’s design, development, or ambidextrous.
There were technical and talks on every aspect of the stack, from the metal all the way up to serving and consuming APIs and user experience design. There were also some not-so-technical talks about topics like the Boston startup scene, open source and hacker culture.
My talk was about PostgreSQL and it focused on how to use SQL to mine data and get information out of it. I stored the twitter stream for about 24 hours prior to the conference and showed how to look at that data showcasing CTEs, Window Functions and other Postgres features. Among the insights we saw that the tweeps who post hashtags and urls the most are spam accounts. Also, the most posted URLs come from shortener services, but also surprised to see livingsocial.com among those. We found other fun facts during the talk too. It went great.
Hopefully the talk gave a good taste of what you can do with Postgres and SQL. It was SQL heavy, but that did not come without warning
boston.io talk ready to go. SQL, do you speak it? After this you will!
Other talks worth mentioning included Mike Burns’ classic UNIX talk. This time around he used curl, sed and grep to automate a SQL injection attack on a hilarious page he staged for this purpose. Erik Michaels-Ober’s talk was also great and surely inspired a few students to put code out there for the world to see. So many great talks altogether though, by people like Nick Quaranto on TDD, Ben Orenstein on vim, Bryan Lyles on OOP and more.
Oh, and there was a dude at the afterparty with a heroku shirt. Here’s a photo.
Yesterday was a good day. @pvh and I paired for a few
hours, even though we’re at opposite coasts.
Here’s what you need:
A server somewhere that both pairs have access to. We used an EC2 instance.
We’ll use it to meet up and create the tunnel.
SSH client libs - your should already have this unless you’re on windows in
which case you probably want PuTTY.
Skype for audio.
As you know, The Internet is made of nodes connected by Tubes. Unfortunately,
there is no tube from your machine to your pair’s machine. What we’ll do here is
use a third node that has tubes to both of your machines to relay traffic
through, in essence creating an Internet Tube from your machine to your pair’s.
This kind of Internet Tube is called a Tunnel. Since we’re using SSH to do the
traffic encryption and forwarding, it’s an SSH Tunnel. Yes, that’s somewhat made
up, but sounds legit!
As it turns out, setting up a tunnel is fairly simple. For example, let’s set
up a tunnel between you and Jane using a remote server saturn.
You: Open up a shell and forward traffic to your local port 9999 over to
Saturn’s port 1235:
1
ssh -L 9999:locahost:1235 saturn_user@saturn
Jane: Open up a shell and forward traffic from saturn’s port 1235 to her port
22
1
ssh -R 1235:localhost:22 saturn_user@saturn
You: Open up another shell, and ssh into your local port 9999 specifying a
username on Jane’s machine.
1
ssh jane_user@jane -p 9999
And you’re good to go. Create a shared screen session, open up $EDITOR, use
skype, google hangouts, face time or whatever for audio and start ping ponging.
The latency was surprisingly minimal. We left this tunnel open most of the day.
It sat idle for periods of time and the connection was left active. All in all,
a great setup.
If this is something you’ll do often, you might as well add a more permanent
configuration to ~/.ssh/config. For example, you might add:
~/.ssh/config on your machine
123456789
Host tunnel_to_jane
Hostname saturn
LocalForward 9999:localhost:1235
User saturn_user
Host jane
Hostname jane
User jane_user
Port 9999
Then you’d do, on one terminal, ssh tunnel_to_jane, and on the
other ssh jane.
And Jane might add:
~/.ssh/config on Jane’s machine
1234
Host tunnel_from_you
Hostname saturn
RemoteForward 1235:localhost:22
User saturn_user
And she’d just do, ssh tunnel_from_you
This can be used not ony for remote pairing, but rather to forward any
traffic on a port, over an SSH encrypted channel, to a remote host. For more
see ssh_config(5) and ssh(1), and happy pairing!
In case you’ve missed it so far, PostgreSQL West will take place next week in San Jose, California. You should go.
This weekend I worked on the slides and content for my Redis talk. Why would I decide to speak about Redis in a PostgreSQL conference? As it turns out, we’ve had great success in using Redis to compliment our architecture, not to replace a main data store. I will speak about our experience in scaling out write heavy apps with Redis.
I will first introduce Redis from a general perspective, and then dig into the data types it offers and the operations it can do on each data type. During the course of the talk, I will demonstrate how we’ve used certain data types to solve some rather tricky scaling problems: real use cases solving real problems.
I hope this talk will be entertaining and informative to both DBAs and application developers. I will be sharing the slides here and on twitter afterwards, so stay tuned.
Additionally, on Tuesday I will be teaching a one day workshop on Ruby and Rails with a PostgreSQL focus. This is the second time I will do this at PostgreSQL conf, the last time being at PostgreSQL conf east in New York City. The class size was small, and the feedback I received was very positive in that attendees got a good grasp of the Ruby programming language and how Rails and Postgres fit in the ecosystem. I hope this time around is even better.
pg_basebackup - this can be used alongside Streaming Replication to perform a backup or clone of your database. I can imagine heroku adopting this as an even faster and reliable way to sync your production and staging databases, for example (when and if they upgrade to 9.1). However it can also be used to create plain old tarballs and create standalone backups.
Another replication goodie: Synchronous replication. On Postgres 9.0, replication was asynchronous. By enabling synchronous replication, you are basically telling the master database to only report the transaction as committed when the slave(s) have successfully written it to its own journal. You can also control this on a specific session by doing SET synchronous_commit TO off.
The new pg_stat_replication view displays the replication status of all slaves from a master node.
Unlogged tables. What? Postgres supports unlogged tables now? Yes, it does. They can be used for data you don’t necessarily care about, and a crash will truncate all data. They are much faster to write to and could be useful for caching data or keeping stats that can be rebuilt. You can create them like so:
1
CREATETABLEUNLOGGEDsome_stats(valueint)
SQL/MED gets the ability to define foreign tables. This is rich. It means that you can define a foreign data wrapper for a different database and access it from Postgres seamlessly. Some hackers have already built some nifty foreign data wrappers for mysql, oracle, and even redis and couchdb. Although I’m of the mind that if you’re actually using any of these databases to supplement your app’s data needs, just talk to them directly from your app. However, it may be possible to write some higher performance reports that use different data sources, and you let Postgres do the heavy lifting of munging all the data together.
You no longer need to specify all columns on a select list from your GROUP BY clause: functionally dependent columns are inferred by the planner, so specifying a primary key is sufficient. I talked about this before, and it’s a cause of great frustration to users coming from MySQL.
There’s much more in this release. Here are the release notes.
Today I made a few design tweaks to this blog. The goal is to move a bit away from the stock default octopress theme - but my design chops aren’t all that great and I can’t really budget the time to do a design from scratch.
A few simple changes and I’m OK with how it looks for now:
I created the basic font logo that you now see on the header. This was the idea from the beginning, but I never had a chance to include it here. Commit: 27d0107f.
Change the typography in the site, as the original seems a bit heavy for my taste. I started out by using a Helvetica Neue on headers, but decided to go with Antic from the Google web font service. Commits: 2dd8f46b4 and 84bad437.
I wanted something different for that dark background. Went hunting for tiles and patterns. There’s good stuff out there, but I settled for the dark wood background found here. Commit: 9593a00431. At this point, it also made sense to make the header and footer have a light background and dark font.
Finally, added a gradient to the header. Commit fe918b0e
I’m fine with the result for now, but will probably revisit soon. Here’s a before and after.
For the last few months we’ve been working for an awesome company on a greenfield project here in Boston/Cambridge.
The industry: Healthcare. The goal: Improve patient’s lives by changing the way the entire system works. It’s exciting, and it is happening, and you can be a part of it.
The stack
Rails 3.1, Backbone.js, Coffeescript, faye, PostgreSQL, Cucumber, RSpec and Jasmine.
The process
Daily standups, TDD, code reviews via github pull requests.
The result
A highly responsive non-trivial app with a very clean code base and beautiful design.
The future holds a mobile app, web service integrations and ongoing maintenance to the current code base.
If you live in the Boston area, you should apply. If you don’t, you should move here. Right here.


Source code for piadcs.piadcs
import spidev
import RPi.GPIO as GPIO
from time import sleep
from time import time
import sys
# opcodes
RREG = 0x20 # Read registers
WREG = 0x40 # Write registers
[docs]class Register:
""" A class used to represent a register on a TI ADC
...
Attributes
----------
address : byte
The address of the register
setvalue : byte
The value that you want to write to the register. This
should be set either by using the default value or the
setregister function
Methods
-------
setregister(data)
Takes a list of bytes representing different register settings
and combines them into a single byte to send to the register
"""
def __init__(self, address, setvalue):
"""
Parameters
----------
address : byte
The address of the register
setvalue : byte
The value that you want to write to the register. This
should be set either by using the default value or the
setregister function
"""
self.address = address
self.setvalue = setvalue
[docs] def setregister(self, settingsList):
"""
Takes a list of bytes representing different register settings
and combines them into a single byte to send to the register.
Since this function uses the OR operator it is critical to
include ALL settings for the given register even if some are left
to the default. If a setting is not included it will be set to to 0.
Parameters
----------
data : list
A list of bytes where each byte represents one setting of a given
register. The list should not be longer or shorter than the number
of settings that exist for the register you want to send them to.
"""
for setting in settingsList:
self.setvalue = setting | self.setvalue
[docs]def writeToConsecutiveRegisters(connection, startingreg, data):
"""writes a list of values to consecutive registers on an ADC.
Parameters
----------
connection : SpiDev object
See documentation for python Spidev (https://pypi.org/project/spidev/)
startingreg : byte
The address of the first register you want to write to
data : list
The values you would like to write to the register
see section 9.6 of the ADS126x datasheet for an explanations
of what values have what functions at a given register
"""
data.insert(0, len(data) - 1)
data.insert(0, WREG | startingreg)
connection.xfer3(data)
[docs]def readFromConsecutiveRegisters(connection, startingreg, numbertoread):
"""writes a list of values to consecutive registers on an ADC.
Parameters
----------
connection : SpiDev object
See documentation for python Spidev (https://pypi.org/project/spidev/)
startingreg : byte
The address of the first register you want to read from
numbertoread : byte
The number of registers you would like to read from
Returns
-------
list
Returns list of register values from consecutive registers starting
with the specified register
"""
connection.xfer2([RREG | startingreg, numbertoread - 1])
regvalues = connection.readbytes(numbertoread)
return regvalues
[docs]def writeToSingleRegister(connection, reg_address, data):
"""writes a value to a register on the ADS1262.
Parameters
----------
connection : SpiDev object
See documentation for python Spidev (https://pypi.org/project/spidev/)
reg_address : byte
The address of the register you would like to write to
data : byte
The value you would like to write to the register
see section 9.6 of the ADS1262 datasheet for an explanations
of what values have what functions at a given register
"""
wreg_address = WREG | reg_address
connection.writebytes([wreg_address, 0x00, data])


| 1 | /* | |
| 2 | * Copyright 2010 The Closure Compiler Authors. | |
| 3 | * | |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); | |
| 5 | * you may not use this file except in compliance with the License. | |
| 6 | * You may obtain a copy of the License at | |
| 7 | * | |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 | |
| 9 | * | |
| 10 | * Unless required by applicable law or agreed to in writing, software | |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, | |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| 13 | * See the License for the specific language governing permissions and | |
| 14 | * limitations under the License. | |
| 15 | */ | |
| 16 | ||
| 17 | package com.google.javascript.jscomp.jsonml; | |
| 18 | ||
| 19 | import com.google.common.base.Preconditions; | |
| 20 | import com.google.common.collect.ImmutableList; | |
| 21 | import com.google.common.collect.Lists; | |
| 22 | import com.google.javascript.jscomp.CheckLevel; | |
| 23 | import com.google.javascript.jscomp.Compiler; | |
| 24 | import com.google.javascript.jscomp.CompilerInput; | |
| 25 | import com.google.javascript.jscomp.CompilerOptions; | |
| 26 | import com.google.javascript.jscomp.CompilerOptions.Reach; | |
| 27 | import com.google.javascript.jscomp.JSError; | |
| 28 | import com.google.javascript.jscomp.JSModule; | |
| 29 | import com.google.javascript.jscomp.Result; | |
| 30 | import com.google.javascript.jscomp.SourceFile; | |
| 31 | import com.google.javascript.jscomp.VariableRenamingPolicy; | |
| 32 | ||
| 33 | import java.util.ArrayList; | |
| 34 | ||
| 35 | /** | |
| 36 | * Compilation of JavaScript code which guarantees that all security | |
| 37 | * capabilities are preserved after the process. In particular, it can be | |
| 38 | * safely applied to cajoled source. | |
| 39 | * | |
| 40 | * JS Compiler is used for code analysis and optimization. It runs a series | |
| 41 | * of passes which try to improve the code. | |
| 42 | * | |
| 43 | * For safety reasons, only a subset of local passes, which are provided by | |
| 44 | * JS Compiler, are processed. Currently it includes: | |
| 45 | * - elimination of temporary variables | |
| 46 | * | |
| 47 | * Using SecureCompiler is quite straightforward. A user just needs to create | |
| 48 | * a new instance and call compile() method. Currently the only input which | |
| 49 | * is supported is JsonML. | |
| 50 | * | |
| 51 | * @author<EMAIL_ADDRESS>(Daniel Hans) | |
| 52 | */ | |
| 53 | public class SecureCompiler { | |
| 54 | ||
| 55 | private static final String COMPILATION_UNCOMPLETED_MSG = | |
| 56 | "No compilation has been completed yet."; | |
| 57 | ||
| 58 | private static final String COMPILATION_UNSUCCESSFUL_MSG = | |
| 59 | "The last compilation was not successful."; | |
| 60 | ||
| 61 | private static final String COMPILATION_ALREADY_COMPLETED_MSG = | |
| 62 | "This instance has already compiled one source."; | |
| 63 | ||
| 64 | private Compiler compiler; | |
| 65 | private CompilerOptions options; | |
| 66 | private JsonMLAst sourceAst; | |
| 67 | ||
| 68 | /** Report from the last compilation */ | |
| 69 | private Report report; | |
| 70 | ||
| 71 | public SecureCompiler() { | |
| 72 | compiler = new Compiler(); | |
| 73 | options = getSecureCompilerOptions(); | |
| 74 | } | |
| 75 | ||
| 76 | /** | |
| 77 | * Returns compiled source in JsonML format. | |
| 78 | */ | |
| 79 | public JsonML getJsonML() { | |
| 80 |
2
1. getJsonML : negated conditional → NO_COVERAGE 2. getJsonML : removed call to com/google/common/base/Preconditions::checkState → NO_COVERAGE |
Preconditions.checkState(report != null, COMPILATION_UNCOMPLETED_MSG); |
| 81 |
1
1. getJsonML : removed call to com/google/common/base/Preconditions::checkState → NO_COVERAGE |
Preconditions.checkState(report.success, COMPILATION_UNSUCCESSFUL_MSG); |
| 82 |
1
1. getJsonML : mutated return of Object value for com/google/javascript/jscomp/jsonml/SecureCompiler::getJsonML to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return sourceAst.convertToJsonML(); |
| 83 | } | |
| 84 | ||
| 85 | /** | |
| 86 | * Returns compiled source as a JavaScript. | |
| 87 | */ | |
| 88 | public String getString() { | |
| 89 |
2
1. getString : negated conditional → NO_COVERAGE 2. getString : removed call to com/google/common/base/Preconditions::checkState → NO_COVERAGE |
Preconditions.checkState(report != null, COMPILATION_UNCOMPLETED_MSG); |
| 90 |
1
1. getString : removed call to com/google/common/base/Preconditions::checkState → NO_COVERAGE |
Preconditions.checkState(report.success, COMPILATION_UNSUCCESSFUL_MSG); |
| 91 |
1
1. getString : mutated return of Object value for com/google/javascript/jscomp/jsonml/SecureCompiler::getString to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return compiler.toSource(); |
| 92 | } | |
| 93 | ||
| 94 | /** | |
| 95 | * Returns report from the last compilation. | |
| 96 | */ | |
| 97 | public Report getReport() { | |
| 98 |
2
1. getReport : removed call to com/google/common/base/Preconditions::checkState → SURVIVED 2. getReport : negated conditional → KILLED |
Preconditions.checkState(report != null, COMPILATION_UNCOMPLETED_MSG); |
| 99 |
1
1. getReport : mutated return of Object value for com/google/javascript/jscomp/jsonml/SecureCompiler::getReport to ( if (x != null) null else throw new RuntimeException ) → KILLED |
return report; |
| 100 | } | |
| 101 | ||
| 102 | public void compile(JsonML source) { | |
| 103 |
1
1. compile : negated conditional → KILLED |
if (report != null) { |
| 104 | throw new IllegalStateException(COMPILATION_ALREADY_COMPLETED_MSG); | |
| 105 | } | |
| 106 | ||
| 107 | sourceAst = new JsonMLAst(source); | |
| 108 | ||
| 109 | CompilerInput input = new CompilerInput( | |
| 110 | sourceAst, "[[jsonmlsource]]", false); | |
| 111 | ||
| 112 | JSModule module = new JSModule("[[jsonmlmodule]]"); | |
| 113 |
1
1. compile : removed call to com/google/javascript/jscomp/JSModule::add → KILLED |
module.add(input); |
| 114 | ||
| 115 | Result result = compiler.compileModules( | |
| 116 | ImmutableList.<SourceFile>of(), | |
| 117 | ImmutableList.of(module), | |
| 118 | options); | |
| 119 | ||
| 120 | report = generateReport(result); | |
| 121 | } | |
| 122 | ||
| 123 | /** | |
| 124 | * Returns compiler options which are safe for compilation of a cajoled | |
| 125 | * module. The set of options is similar to the one which is used by | |
| 126 | * CompilationLevel in simple mode. The main difference is that variable | |
| 127 | * renaming and closurePass options are turned off. | |
| 128 | */ | |
| 129 | private CompilerOptions getSecureCompilerOptions() { | |
| 130 | CompilerOptions options = new CompilerOptions(); | |
| 131 | ||
| 132 | options.variableRenaming = VariableRenamingPolicy.OFF; | |
| 133 |
1
1. getSecureCompilerOptions : removed call to com/google/javascript/jscomp/CompilerOptions::setInlineVariables → SURVIVED |
options.setInlineVariables(Reach.LOCAL_ONLY); |
| 134 | options.inlineLocalFunctions = true; | |
| 135 | options.checkGlobalThisLevel = CheckLevel.OFF; | |
| 136 | options.coalesceVariableNames = true; | |
| 137 | options.deadAssignmentElimination = true; | |
| 138 | options.collapseVariableDeclarations = true; | |
| 139 | options.convertToDottedProperties = true; | |
| 140 | options.labelRenaming = true; | |
| 141 | options.removeDeadCode = true; | |
| 142 | options.optimizeArgumentsArray = true; | |
| 143 | options.removeUnusedVars = false; | |
| 144 | options.removeUnusedLocalVars = true; | |
| 145 | ||
| 146 |
1
1. getSecureCompilerOptions : mutated return of Object value for com/google/javascript/jscomp/jsonml/SecureCompiler::getSecureCompilerOptions to ( if (x != null) null else throw new RuntimeException ) → KILLED |
return options; |
| 147 | } | |
| 148 | ||
| 149 | public void enableFoldConstant() { | |
| 150 | options.foldConstants = true; | |
| 151 | } | |
| 152 | ||
| 153 | Report generateReport(Result result) { | |
| 154 | // a report may be generated only after actual compilation is complete | |
| 155 |
1
1. generateReport : negated conditional → KILLED |
if (result == null) { |
| 156 |
1
1. generateReport : mutated return of Object value for com/google/javascript/jscomp/jsonml/SecureCompiler::generateReport to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return null; |
| 157 | } | |
| 158 | ||
| 159 | ArrayList<JsonMLError> errors = Lists.newArrayList(); | |
| 160 |
3
1. generateReport : changed conditional boundary → KILLED 2. generateReport : Changed increment from 1 to -1 → KILLED 3. generateReport : negated conditional → KILLED |
for (JSError error : result.errors) { |
| 161 | errors.add(JsonMLError.make(error, sourceAst)); | |
| 162 | } | |
| 163 | ||
| 164 | ArrayList<JsonMLError> warnings = Lists.newArrayList(); | |
| 165 |
3
1. generateReport : Changed increment from 1 to -1 → SURVIVED 2. generateReport : changed conditional boundary → KILLED 3. generateReport : negated conditional → KILLED |
for (JSError warning : result.warnings) { |
| 166 | warnings.add(JsonMLError.make(warning, sourceAst)); | |
| 167 | } | |
| 168 | ||
| 169 |
1
1. generateReport : mutated return of Object value for com/google/javascript/jscomp/jsonml/SecureCompiler::generateReport to ( if (x != null) null else throw new RuntimeException ) → KILLED |
return new Report( |
| 170 | errors.toArray(new JsonMLError[0]), | |
| 171 | warnings.toArray(new JsonMLError[0])); | |
| 172 | } | |
| 173 | ||
| 174 | public class Report { | |
| 175 | private final boolean success; | |
| 176 | private final JsonMLError[] errors; | |
| 177 | private final JsonMLError[] warnings; | |
| 178 | ||
| 179 | private Report(JsonMLError[] errors, JsonMLError[] warnings) { | |
| 180 |
1
1. |
this.success = errors.length == 0; |
| 181 | this.errors = errors; | |
| 182 | this.warnings = warnings; | |
| 183 | } | |
| 184 | ||
| 185 | public boolean isSuccessful() { | |
| 186 |
1
1. isSuccessful : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED |
return success; |
| 187 | } | |
| 188 | ||
| 189 | public JsonMLError[] getErrors() { | |
| 190 |
1
1. getErrors : mutated return of Object value for com/google/javascript/jscomp/jsonml/SecureCompiler$Report::getErrors to ( if (x != null) null else throw new RuntimeException ) → KILLED |
return errors; |
| 191 | } | |
| 192 | ||
| 193 | public JsonMLError[] getWarnings() { | |
| 194 |
1
1. getWarnings : mutated return of Object value for com/google/javascript/jscomp/jsonml/SecureCompiler$Report::getWarnings to ( if (x != null) null else throw new RuntimeException ) → KILLED |
return warnings; |
| 195 | } | |
| 196 | } | |
| 197 | ||
| 198 | } | |
Mutations | ||
| 80 |
1.1 2.2 |
|
| 81 |
1.1 |
|
| 82 |
1.1 |
|
| 89 |
1.1 2.2 |
|
| 90 |
1.1 |
|
| 91 |
1.1 |
|
| 98 |
1.1 2.2 |
|
| 99 |
1.1 |
|
| 103 |
1.1 |
|
| 113 |
1.1 |
|
| 133 |
1.1 |
|
| 146 |
1.1 |
|
| 155 |
1.1 |
|
| 156 |
1.1 |
|
| 160 |
1.1 2.2 3.3 |
|
| 165 |
1.1 2.2 3.3 |
|
| 169 |
1.1 |
|
| 180 |
1.1 |
|
| 186 |
1.1 |
|
| 190 |
1.1 |
|
| 194 |
1.1 |


2 references to
System.Management.Automation (2)
engine\hostifaces\Pipeline.cs (1)
289
:
this
(runspace, new CommandCollection())
engine\hostifaces\pipelinebase.cs (1)
88
:
base
(runspace, command)


Drag and Drop
Drag the image back and forth between the two div elements.
Iniciado
PLanos
En Proceso
Terminado