Last updated: 2019-12-13
Checks: 5 1
Knit directory: gtex-gwas-analysis/
This reproducible R Markdown analysis was created with workflowr (version 1.3.0). The Checks tab describes the reproducibility checks that were applied when the results were created. The Past versions tab lists the development history.
The R Markdown is untracked by Git. To know which version of the R Markdown file created these results, you’ll want to first commit it to the Git repo. If you’re still working on the analysis, you can ignore this warning. When you’re finished, you can run wflow_publish
to commit the R Markdown file and build the HTML.
Great job! The global environment was empty. Objects defined in the global environment can affect the analysis in your R Markdown file in unknown ways. For reproduciblity it’s best to always run the code in an empty environment.
The command set.seed(20190312)
was run prior to running the code in the R Markdown file. Setting a seed ensures that any results that rely on randomness, e.g. subsampling or permutations, are reproducible.
Great job! Recording the operating system, R version, and package versions is critical for reproducibility.
Nice! There were no cached chunks for this analysis, so you can be confident that you successfully produced the results during this run.
Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility. The version displayed above was the version of the Git repository at the time these results were generated.
Note that you need to be careful to ensure that all relevant files for the analysis have been committed to Git prior to generating the results (you can use wflow_publish
or wflow_git_commit
). workflowr only checks the R Markdown file, but you know if there are other scripts or data files that it depends on. Below is the status of the Git repository when the results were generated:
Ignored files:
Ignored: .Rhistory
Ignored: .Rproj.user/
Ignored: data/GTEx_Analysis_2017-06-05_v8_WholeGenomeSeq_838Indiv_Analysis_Freeze.lookup_table.txt.gz
Ignored: data/new_ukb_gwas/
Untracked files:
Untracked: analysis/harmonization_imputation_on_new_ukb.Rmd
Untracked: code/new_ukb_scripts/
Untracked: output/new_ukbn/
Unstaged changes:
Modified: .gitignore
Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.
There are no past versions. Publish this analysis with wflow_publish()
to start tracking its development.
We want to assess sign mismatches in ambiguous snps between thwe GTEx v8 reference and the 2018 release of the rapid GWAS project. See code/new_ukb_scripts/
for details of how the harmonized+imputed GWAS was built. In the following, we compare direction of effect sizes in a rapid GWAS trait, between original and imputed effects, for ambiguous palindromic variants.
The data processed here is simple but too large to store on github. Make sure to download it from Google Cloud (or copy from CRI) into the expected paths:
mkdir data/new_ukb_gwas
gsutil cp gs://gtex-gwas-share/aux-data data/new_ukb_gwas/imputed_50_standing_height.txt.gz
gsutil cp gs://gtex-gwas-share/aux-data/GTEx_Analysis_2017-06-05_v8_WholeGenomeSeq_838Indiv_Analysis_Freeze.lookup_table.txt.gz data/
The underlying question is how much we are affected by ambiguity in definition of palindromic SNPs, when using the rapid GWAS project or UKB in general. So we harmonize+impute a trait, and check how many variants experienced a sign swap.
By and large, mostambiguous variants have original effect size direction matching the imputed sign. There are 1204310 ambiguously defined variants in this GWAS, of which 19151 could not be imputed:
| sign_conserved | n |
|---|---|
| FALSE | 70147 |
| TRUE | 1115012 |
| NA | 19151 |
We count how many ambiguous variants are significant, and the proportion experiencing sign swap at imputation, for different significance thresholds. We observe that as significance increases, the proportion of sign swaps decreases:
| threshold | swapped_significant | significant | proportion |
|---|---|---|---|
| 1e-01 | 759 | 346469 | 0.0021907 |
| 1e-02 | 52 | 151801 | 0.0003426 |
| 1e-03 | 6 | 87748 | 0.0000684 |
| 1e-04 | 4 | 59381 | 0.0000674 |
| 1e-05 | 2 | 43785 | 0.0000457 |
| 1e-06 | 2 | 34188 | 0.0000585 |
| 1e-07 | 2 | 27587 | 0.0000725 |
| 0e+00 | 1 | 22509 | 0.0000444 |
| 0e+00 | 1 | 19187 | 0.0000521 |
| 0e+00 | 1 | 16455 | 0.0000608 |
We interpret this to mean that ambiguous variants that experience sign swaps do so because of noise. We consider that properly measured variants (in GWAS and QTL) don’t experience sign swaps, and they account for the majority of significant variants.
sessionInfo()
R version 3.5.1 (2018-07-02)
Platform: x86_64-conda_cos6-linux-gnu (64-bit)
Running under: Red Hat Enterprise Linux ComputeNode release 6.7 (Santiago)
Matrix products: default
BLAS/LAPACK: /home/abarbeira3/.conda/envs/pyr/lib/R/lib/libRblas.so
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] bindrcpp_0.2.2 kableExtra_1.1.0 viridis_0.5.1 viridisLite_0.3.0
[5] UpSetR_1.4.0 ggplot2_3.0.0 readr_1.1.1 tidyr_0.8.1
[9] dplyr_0.7.6
loaded via a namespace (and not attached):
[1] Rcpp_0.12.18 highr_0.7 pillar_1.3.0 compiler_3.5.1
[5] git2r_0.23.0 plyr_1.8.4 workflowr_1.3.0 bindr_0.1.1
[9] tools_3.5.1 digest_0.6.15 evaluate_0.11 tibble_1.4.2
[13] gtable_0.2.0 pkgconfig_2.0.1 rlang_0.2.1 rstudioapi_0.7
[17] yaml_2.2.0 gridExtra_2.3 xml2_1.2.0 httr_1.3.1
[21] withr_2.1.2 stringr_1.3.1 knitr_1.20 fs_1.3.1
[25] hms_0.4.2 webshot_0.5.1 rprojroot_1.3-2 grid_3.5.1
[29] tidyselect_0.2.4 glue_1.3.1 R6_2.2.2 rmarkdown_1.10
[33] purrr_0.2.5 magrittr_1.5 backports_1.1.2 scales_0.5.0
[37] htmltools_0.3.6 rvest_0.3.2 assertthat_0.2.0 colorspace_1.3-2
[41] stringi_1.2.4 lazyeval_0.2.1 munsell_0.5.0 crayon_1.3.4


{{multiple issues| {{Unreferenced|date=September 2008}} {{Notability|products|date=August 2009}} }}
Honey Bunches of Oats is a cold cereal by Post Holdings. Created by lifelong Post employee Vernon J. Herzing by mixing several Post's cereals together and having his daughter taste them. After three years of development, Honey Bunches of Oats was introduced to markets in 1989. The cereal is made up of three kinds of flakes and oat clusters baked with a hint of honey. It is marketed as a source of whole grain. Other varieties have almonds or fruits added into the mix.
Contents |
The ingredients of the cereal are corn, whole grain wheat, sugar, whole grain rolled oats, brown sugar, vegetable oil (canola or sunflower oil), rice flour, wheat flour, malted barley flour, salt, rice, whey (from milk), honey, malted corn and barley syrup, caramel color, artificial flavor, annato extract (color)
Current, past, and limited editions [1]:
Honey Bunches of Oats contains iron, niacinamide, vitamin B6, vitamin A palmitate, riboflavin (vitamin B2), thiamine mononitrate (vitamin B1), zinc oxide (source of zinc), folic acid, vitamin B12, vitamin D.

{{Post Holdings}}


| IFIP WG 2.4 Member's Meeting, April 2008, Bormio, Italy. |
The April 2008 member's meeting will take place in Bormio, Italy at the Hotel Rezia from Sunday April 6th to Friday April 11th, 2008. Bormio was the site of the 2005 Winter Olympics, our conference location is charming four star hotel located in the center of Bormio.
As usual the meeting will be a mixture of talks on on-going research with opportunities for members to interact in an informal setting. Formal talks will be limited to 30 WG2.4 minutes and time will be set aside for social activities (including skiing, global warming willing).
For any questions contact Jan Vitek.


--- layout: page title: subtitle: use-site-title: false ---
|
Research in Dr. Rios’s program is dedicated to using traditional and modern plant breeding techniques to develop improved varieties of forages in Florida. This integrated approach combines plant breeding, quantitative genetics, molecular biology, cytogentics, crop modeling, crop mapping, and genomics to accelerate genetic gain in forages like alfalfa, bermudagrass, clovers, cowpea, and ryegrass. |
Tweets by ForageBreeding |


The STM32-AWS web dashboard has been co-developed with Istituto Superiore Mario Boella (ISMB), a private research and innovation centre operating in the Information and Communication Technologies (ICT) domains, and in particular with the Advanced Computing and Electromagnetics Research Area, focusing on cloud computing architectures.


Introduction to quantum computing and the surface code
references: arXiv:0904.2557, arXiv:1208.0928
(This is the content of a talk I gave to other students in our department, most of whom have no background in quantum computing; hence the introduction and lightness on details of the surface code.)
Before talking about the surface code, I’ll introduce the fundamentals of quantum computing.
Quantum computing: The evaluation of quantum circuits in polynomial time.
Background on quantum computing
State A state is a d-dimensional vector in a complex Hilbert space ℋd. We require that the states are normalised to unity.
Qubit A qubit is a “two-level system”. This means it is a state with d = 2.
We are doing quantum mechanics, so we use bras and kets for vectors, and we distinguish some particular bases,
$$ \begin{aligned} |0\rangle &= \left( \begin{array}{c} 1 \\ 0 \end{array} \right), \\ |1\rangle &= \left( \begin{array}{c} 0 \\ 1 \end{array} \right). \end{aligned} $$
Note that these two vectors form a basis for ℋ2. We call this basis the standard basis. All bases here will are assumed to be orthonormal.
Written in the standard basis an arbitrary qubit is then given by
$$ \begin{aligned} |\psi\rangle = \alpha |0\rangle + \beta |1\rangle. \end{aligned} $$
For a ket |ψ⟩ the bra is given by ⟨ψ| = (|ψ⟩)†, where † means take the conjugate tranpose. So we write the inner product as ⟨ψ|φ⟩ and the outer product as |ψ⟩⟨φ|.
We will also refer to the so-called Hadamard basis, which is
$$ \begin{aligned} |+\rangle &= \frac{1}{\sqrt{2}}\left(|0\rangle + |1\rangle\right), \\ |-\rangle &= \frac{1}{\sqrt{2}}\left(|0\rangle - |1\rangle\right). \end{aligned} $$
Qubits We can form a state containing multiple qubits using the tensor product. Verbosely, one may write:
$$ \begin{aligned} |0\rangle \otimes |0\rangle \otimes \cdots \end{aligned} $$
but we will shorten this to:
$$ \begin{aligned} |00\cdots\rangle &= |0\rangle \otimes |0\rangle \otimes \cdots. \end{aligned} $$
The dimension of the Hilbert space of this state is ℋ2n, where n is the number of terms in the tensor product: the number of qubits.
Operator An operator (sometimes called a gate), M, is a 2n × 2n-dimensional matrix with elements in ℂ. We require that the operators be unitary; i.e. that MM† = M†M = 1 (this requirement comes from the fact that any such operator should preserve the norm of the states).
A note on notation Given a multi-qubit state, |abcd⟩, we can perform a single-qubit operator M on each of these qubits by constructing the appropriate tensor product of matrices, M ⊗ M ⊗ M ⊗ M, and then acting this on the state. We will often write this more concisely as M1M2M3M4|abcd⟩, indicating which qubit the operator acts on.
Pauli Matrices These play a key role in the surface code. We will define them as
$$ \begin{aligned} X &= \left( \begin{array}{cc} 0 & 1 \\ 1 & 0 \end{array} \right), \\ Z &= \left( \begin{array}{cc} 1 & 0 \\ 0 & -1 \end{array} \right), \\ Y &= \text{i}XZ. \end{aligned} $$
Note that they all square to 1. We will only be interested in the action of X and Z, so note:
$$ \begin{aligned} X|0\rangle &= |1\rangle, \\ X|1\rangle &= |0\rangle, \\ Z|+\rangle &= |-\rangle, \\ Z|-\rangle &= |+\rangle. \end{aligned} $$
And furthermore, we have XZ = − ZX (these operators anticommute).
Measurement Quantum mechanics prescribes that for an arbitrary qubit (written in the standard basis),
$$ \begin{aligned} |\psi\rangle &= \alpha|0\rangle + \beta|1\rangle, \end{aligned} $$
then measuring this qubit gives the state |0⟩ with probability |α|2 and state |1⟩ with probability |β|2.
More generally we can make projective measurements, wherein we project a state |ψ⟩ into a particular basis. It is common to observe that, in terms of eigenvalues and eigenvectors (by the spectral decomposition theorem),
$$ \begin{aligned} X &= |+\rangle\langle +| - |-\rangle\langle -|, \\ Z &= |0\rangle\langle 0| - |1\rangle\langle 1|, \end{aligned} $$
and therefore make statements such as “measure in the X basis”, where this means to project the qubit into the basis {|+⟩,| − ⟩}.
Quantum circuits
An example quantum circuit:
This enacts the operator X on the state |0⟩, and we “measure” this state at the end of the circuit in the Z basis.
The outcome of this circuit is the state |1⟩ with certainity.
Let $H = \frac{1}{\sqrt{2}} \left( \begin{array}{cc} 1 & 1 \\ 1 & -1 \end{array} \right)$ and $C_X = \left( \begin{array}{cccc} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1 \\ 0 & 0 & 1 & 0 \end{array} \right) = \left( \begin{array}{ccc} 1 & & \\ & 1 & \\ & & X \end{array} \right)$.
A more complicated circuit:
The outcome of this circuit is the state |00⟩+|11⟩. This is infact an entangled state.
Universal quantum computation
Previously I described quantum computation as the evaluation of any circuit in polynomial time i.e. we could choose any unitary operations we like.
Infact, it turns out that, due to a standard theorem (Solovay-Kitaev theorem), that if we can perform the gates {H, S, T, CX}, then we can approximate any unitary matrix (acting on the qubits involved), and hence perform any computation. (It’s not particularly important what the S and T gates are, for our purposes.)
Error correction
A natural question is - “Do we have quantum computers?”, and the answer is, “not yet”. The reason is that quantum states are decliate; they need to be well isolated from the environment; otherwise errors occur.
Classical errors
Idea of encoding
Suppose we wanted to worry about errors in bits. We could used the repitition code,
$$ \begin{aligned} 0 &\mapsto 000, \\ 1 &\mapsto 111. \end{aligned} $$
This exact procedure - copying an arbitrary state - can’t be applied in quantum computing due to the No-Cloning Theorem: There is no matrix U such that for any arbitrary |ψ⟩
$$ \begin{aligned} U(|\psi\rangle \otimes |0\rangle) = |\psi\rangle \otimes |\psi\rangle. \end{aligned} $$
Proof. Let |ψ⟩=α|0⟩ + β|1⟩ then apply U before and after enacting the tensor product, and note contradiction.
Quantum errors
For the moment, we will consider only errors that may occur on a single qubit, i.e. an erroneous unitary operation.
Any 2n × 2n unitary matrix can infact be expressed as a sum of (tensor products of) Pauli operators, with appropriate coefficients, so we consider the general single-qubit error operator
$$ \begin{aligned} E = \epsilon_1 I + \epsilon_2 X + \epsilon_3 Z + \epsilon_4 Y. \end{aligned} $$
(Recall that Y = iXZ.)
Of course, we can correct any of these errors by applying E†, but in so doing we would in principle need to know the coefficients. It turns out there is a better way.
The first step is to think completely differently about how we would encode a logical qubit.
Consider the operators X1, X2 and Z1, Z2, acting on two qubits. These operators commute, as XZ = − XZ (and operators acting on different qubits always commute.) The (un-normalised) eigenspace is
$$ \begin{aligned} \begin{array}{ccc} Z_1 Z_2 & X_1 X_2 & \text{Eigenvectors} \\ \hline +1 & +1 & |e_1\rangle = |00\rangle + |11\rangle \\ +1 & -1 & |e_2\rangle = |00\rangle - |11\rangle \\ -1 & +1 & |e_3\rangle = |01\rangle + |10\rangle \\ -1 & -1 & |e_4\rangle = |01\rangle - |10\rangle \end{array} \end{aligned} $$
They key is this. Consider an arbitrary two-qubit system expressed in this basis
$$ \begin{aligned} |\psi\rangle = \alpha |e_1\rangle + \beta|e_2\rangle + \gamma|e_3\rangle + \delta|e_4\rangle. \end{aligned} $$
If we impose the following constraint on this system,
$$ \begin{aligned} X_1 X_2 |\psi\rangle = \lambda_X |\psi\rangle \end{aligned} $$
then we cut out two of the possible basis states that the system could be in. For example, say λX = + 1.
Then this rules out the state |00⟩−|11⟩ and |01⟩−|10⟩, leaving us with:
$$ \begin{aligned} |\psi\rangle = \alpha|e_1\rangle + \gamma|e_3\rangle. \end{aligned} $$
Observations:
In general we rule out half the eigenvectors when specifying a stabilizer constraint.
Suppose we enact X1X2 on this new constrained state; it will remain the same, so we can measure in this basis as often as we like, and we will continue to obtain the same eigenvalue when there are no errors.
If either qubit undergoes say a Z error, the eigenvalue λX will change. So we can detect this error. We can also correct it, by applying Z again (if we wished), as Z2 = 1.
If either qubit undergoes a X error, this is not detectable. We will still be in the + 1 eigenstate of X1X2, but the coefficients will have switched.
This is a toy model.
The surface code is a system by which we can detect any single qubit error, E as before, along with several other kinds.
The surface code
We define the surface code on a k × k lattice. At each lattice site we place a qubit. For example, suppose k = 3, then we have
Now, we let there be two types of black cricles. Those associated with X operators, and those associated with Zs. We also label the white qubits, as these will form the quiescent state - the stable state of the surface code, and the state which we will manipulate in order to perform computation,
In the k = 3 system, the implementation of the surface code will enforce the following constraints (with the white qubits labelled as in the above image in red),
$$ \begin{aligned} Z_1 Z_2 Z_3 |\psi\rangle = \lambda^{(Z)}_{1,2,3}|\psi\rangle, \\ Z_3 Z_4 Z_5 |\psi\rangle = \lambda^{(Z)}_{3,4,5}|\psi\rangle, \\ X_1 X_3 X_4 |\psi\rangle = \lambda^{(X)}_{1,3,4}|\psi\rangle, \\ X_3 X_4 X_5 |\psi\rangle = \lambda^{(X)}_{3,4,5}|\psi\rangle. \end{aligned} $$
Any implementation of the surface code enforces these constraint at every time step.
In our lattice here, we have 5 data qubits, and 4 measurement qubits. We showed that there are 4 constraints coming from the 4 data qubits, and as we claimed earlier each of these halve the state space, so the resulting state space has dimension 25/24 = 2. In other words, it encodes one qubit.
Our goal now is to define logical operations on this qubit. In a much larger surface code (and with some modifications to the way logical qubits are encoded on the lattice), it is possible to define all the logical operations necessary to perform universal quantum computation, but here we’ll only look at XL and ZL.
Consider an X on data qubit 4. This operation commutes with the X stabilizers, but will be detected by the Z stabilier to the right. Consider then the operation XL = X4X5. This operation commutes with all the stabilizers, and cannot be written in terms of any of them.
So by performing these operators we have obtained |ψX⟩=XL|ψ⟩ - we’ve manipulated one of the degrees of freedom.
Similarly, we can define ZL = Z2Z5. Note that this anticommutes with XL.
So we’ve exhibited some logical operators.
Surface code facts and final comments
Tolerant to a 1% error rate in the physical qubit operations,
Logical qubits in the code look a bit different; they are defined with respect to “defects” in a much larger lattice.
The estimate in 2012 was that ~14,500 phsyical qubits would be necessary to build one logical qubit.
In order to factor a 2000 bit number we would require 1 billion qubits.
I’ve left out a lot of details regarding how errors are corrected - this is not trivial, and it’s actually interesting.
I’ve not commented on all the types of errors that the surface code corrects against.


This is nice for exposing more information about an image.
Any content can go here.
The English of all social groups are fitted with a sort of social GPS or class radar that registers people’s position on the class map the minute they open their mouths to speak. Class is defined by accent, wealth, education, hobbies and interests. Accent is the most obvious class indicator.


Matt Novick, a DJ of six years, was about to perform for one of the biggest crowds of his career — the entire city of Cleveland and LeBron James.
The city was filled with a million people, as many people as Times Square on New Year’s Eve, and they were ready to rejoice Cleveland’s first championship in 52 years with a parade for the Cavaliers. Novick had his equipment ready in his Uber to help Cleveland party all day, but it appeared he was not going to make it.
While in the gridlocked traffic, Novick’s driver told him it would be best to start walking. He got out and carried his equipment, worth thousands of dollars, more than a mile in the 80-degree heat to Azure, a rooftop club downtown.
Though carrying his gear was not ideal, weaving through hundreds of Cavs fans on the way, he did what he had to do to arrive just in time to play 12 stories above the parade for one million people.
Novick, or his promotional name Mattitude, works for Rock The House Entertainment which booked him the rooftop gig as well as many other private and public events. But the company wouldn’t have given that gig to just anyone. It took Novick years to build up the Mattitude brand — deejaying is only one of his skills. He’s also the marketing assistant for Rock the House, a content coordinator for online music news site Leak Jones. He is a 2016 graduate from Bowling Green State University with a degree in telecommunication.
Novick kept the party going for Cleveland into the night. There is truth, he said, to a DJ being the lifeblood of a party, though the generalization that anyone can do it looms over professionals such as himself. DJs are bending in different ways to compensate as entertainers by giving more heart and skill to a crowd than what the stigma of a DJ implies — posing and pushing a few buttons.
DJ EQUIPMENT
“There’s more to it than just pressing play,” Bobby Fleck, an Ohio University sophomore studying music production and DJ of four years, said. “You’re going from song to song, and you’re creating a flow. You need to know when to keep the certain energy up and when to slow it down.”
Brandon “DJ B-Funk” Thompson, a 2003 OU alumnus and local DJ, said being a DJ was not nearly as cool back then as it appears to be now.
“Back in the day, you would just hear a Sublime album or a Bob Marley CD played from front to end,” Thompson, who also helps plan the annual Athens Halloween Block Party, said.
But more equipment than just a laptop is required for a professional setup. Novick’s purchases went from a “super cheap mixer from Guitar Center” for $150 to a new setup of a computer DJ and DJ mixer in April. What he has now can be found in clubs throughout the U.S. and is “up there with what Diplo uses.”
Computer DJs, a machine more commonly known as a CDJ, plug into a mixer and allow the user to manipulate the music that is on a CD or on a flash drive. DJ controllers can be plugged into a laptop with software that makes mixing much easier for beginners, Thompson said.
According to Music Trades, a trade publication dedicated to the music industry, retail sales of DJ equipment in the United States increased from $114 million in 2011 to $145 million in 2015. The study included equipment such as CD players, turntables, digital DJ controllers, DJ mixers and special effects lighting units.
Thompson’s setup is worth about $10,000, which includes his DJ mixer, MacBook Pro, two CDJs and his own speakers.
Novick said technology gives those serious about the profession more ways to do a better job. “You don’t have to carry around eight crates of vinyl records (and) two bags of CDs trying to figure out what to play,” he said.
The more professional the equipment, the harder it is to justify working at house parties as being worth the risk.
“I’ve had beer spilled on my equipment before. I’ve had my equipment stolen before, my speakers blown out,” Jarman “DJ Smit” Smith, a senior studying marketing and business pre-law, said. “So it could be somebody else’s risk. It discourages me, I’m not going to lie.”
Many hosts offer to pay if equipment is damaged at parties, but Novick said the offer is empty and unrealistic.
“Do you have $5,000 just sitting in your bank? Probably not,” he said.
Oliver Hamlin / For The Post
Jarman Smith, a senior studying marketing and pre-law, shakes his head during his performance at The Venue of Drxvms on Aug. 26, 2016.
It’s for that reason Thompson advises DJs to insure their equipment, a cost he said most “completely forget about.”
Smith said the equipment he bought in college was for his own curiosity — he had no intention of officially branding himself as a DJ like many who stumble into the side-profession during college.
Smith deejayed at Indie Fest with Juicy J in 2015 and said he enjoyed being on a stage of that size. However, he said the elaborate stage was equally as fun as a house party he did at Palmer Fest this year.
Party limitations are disrupting the growth of the DJ business in Athens, Thompson said.
“A lot of parties that would have normally gone on most nights or would have gone on a little bit later, are getting shut down pretty early,” he said.
According to sections 9.14.01 through 9.14.99 of the Athens City Ordinances, police can shut down a party if it is deemed a nuisance.
Thompson cited an example of when he was studying at OU in the early 2000s. He and his friends deejayed house parties during Mill Fest and Palmer Fest for a solid 12 hours before the noise ordinance went into place at 12 a.m.
“Now, most of the fests are done by 5 p.m.,” he said. “You’ve got to get $250 or $300 for a DJ, and your party might get shut down at 2. You’ve already paid the DJ — that’s just money lost.”
Hourly rates vary depending on what city a DJ performs in and the complexity of the setup, Thompson said.
Oliver Hamlin / For The Post
Jarman Smith performs at The Venue of Drxms on Aug. 26.
Smith said he charges anywhere from $100 to $150 an hour whereas Fleck usually incorporates one flat fee from $100 to sometimes $350. Both Smith and Fleck agreed price is also driven by competition in the area.
Thompson said DJs in bigger cities such as Columbus or Dayton are territorial when it comes to gigs, but he does not see Athens to be that way.
“If someone asks me questions about deejaying, that’s what I’m all about,” Thompson said. “It’s always good to find someone else in the game to bounce ideas off of.”
Having the tools to DJ are essential, but Thompson said a laptop and easy access to equipment don’t give anyone the right to call themselves a DJ.
“It’s an ongoing battle to know what an actual DJ is,” he said.  I just keep getting emails of people wanting to DJ at Halloween. That wasn’t the case four, five years ago.
The skill Thompson refers to is more than mixing. Fleck makes his own music — sometimes a hard concept to grasp because the sounds are virtual. At gigs he turns on switches to speed up the beat and raises bass levels at the time he thinks is right and when it’s necessary on tracks he made.
He described house parties as having a more relaxed tone when it comes to playing music. There’s more room to experiment and have fun. “Everybody is not as opinionated than in a bar or at a club,” he said.
Fleck added that being a real DJ doesn’t stop at just deejaying.
“I’m my booking agent, manager, roadie at times. I do it all,” he said.
When Fleck started deejaying, he did not trust himself enough to go to a gig without a little knowledge or a setlist under his sleeve. Now, he’s more comfortable freestyling.
“At one point I was like, ‘All right, I’m just going to wing it each time.’ It always ends up a lot more fun that way,” he said.
Fleck’s friends know him from his nickname “Bobby Booshay,” a reference to The Waterboy. He and the character from the movie are both named Bobby (although the character spells the name ‘Bobby Boucher’) and both stutter, so it morphed as a good stage name too.
When he started promoting himself four years ago in his hometown of Cleveland, he had to sell tickets for his own events to help gain notoriety.
He learned the hard way not to depend on venues and promoters for his business. “I would never hear back from them,” he said. “It got to the point where I just said ‘screw it. I’m going to do what I do and do the best I can and make a lasting impression to the point where these promoters will come to me.’ ”
Each DJ has their own way to set up for gigs. Most of the time, Thompson said it’s too expensive to own speakers and a separate laptop, so it’s normal to use the same laptop dedicated for schoolwork and rented speakers.
Novick said it takes him no more than 15 to 30 minutes to set up his equipment, but he gives himself a full hour to soundcheck. At Azure, Novick said the technology was not as complicated as some gigs, so he felt comfortable jumping right into his set.
Oliver Hamlin / For The Post
Jarman Smith, a senior studying marketing and pre-law, performs in front of a group of partygoers at the Venue of Drxvms in on Aug. 26, 2016.
There’s a power to understanding music and how it can create a memory, Fleck said. “The DJ controls the party. You’re making everybody dance, and besides alcohol, you’re making people stay.”
Like many DJs, Smith isn’t without his stories. In April, he was deejaying at the Venue of Drxvms on Stimson Avenue and invited anyone on stage. When the beat dropped on a song, everyone on stage jumped in the air at the same time, and the stage broke.
“When I’m deejaying, I’m partying too,” Smith said. “When people play music sometimes they just stand there, but I be partying at the same time.”
However, if someone’s DJ career is only a handful of stories, Thompson said that DJ has not reached his or her full potential.
“I’ve seen a lot of guys who come through OU, and they start white hot and they’re awesome and they’re rocking it and then they graduate, and they are like ‘Yeah, I don’t even DJ anymore,’ ” Thompson said. “That’s when you find that they’re not doing it for the right reasons. They did it for the popularity or wanted to be that guy or girl everyone knew at the party.”
The evolution of music is also changing how people party and the necessity of DJs. Music curators such as Spotify and Apple Music allow anyone with an oftentimes-free account to select pre-made playlists for hosts in a pinch.
Music curators are not bad, but Thompson said pre-made playlists can take out the heart and energy a DJ puts into a party.
“A computer cannot get the next big track. It can only play what people are telling it to do,” he said. “A lot of things are working against a DJ, but at the same time, people still want quality and care.”
Novick is optimistic about his deejaying career looking at the next 10 years, but he still has a contingency plan. “I probably won’t be doing it at all, or it’s all I’ll be doing. Right from the get-go, I never would have saw this five years down the line,” Novick said.
For him, though, it is moments like deejaying during the parade in Cleveland that reinforces how cool the business is.


England's Rashford feels back to his best after 'tough period'
LONDON, Nov 19 ― With nine goals in his last 10 games for Manchester United and England, forward Marcus Rashford says he has put a tough start to the season behind him and is feeling confident in front of goal once more.
The 22-year-old added that his return to form had been helped by a consistent run of games.
“It has been a tough period and now I'm getting consistent games and playing week in, week out,” said Rashford, who scored in both of England's recent Euro 2020 qualifiers against Montenegro and Kosovo. “As a forward that has huge importance.
 But when you're having a run in the team it's important to come up with the goods and once you start doing that it becomes second nature.”
England scored 11 goals in their last two qualifiers, and 37 in eight qualification matches, and Rashford said it was important to utilize all their attacking weapons.
“I have been in two tournaments now and the squad is so important,” he added. “With the qualities that every individual has in this team it is something we have to use to our advantage.
“People are going to be playing at different moments but when you are on the pitch you have to do your best, and try to come up with the goods. It is good competition.” ― Reuters


Tory police commissioner quits after 'potentially criminal' complaint
Jason Ablewhite has stepped down from his £85,000-a-year post as Peterborough and Cambridgeshire's police and crime commissioner after a complaint from a member of the public
by Maria JacovouA Tory crime chief has unexpectedly quit his £85,000-a-year post amid a probe into his conduct.
Jason Ablewhite resigned as Police and Crime Commissioner for Peterborough and Cambridgeshire after a complaint was made to the Independent Office for Police Conduct (IOPC).
No details are available about the complaint - which was made by a member of the public - have been revealed.
Today it emerged that letter from the chief executive of the office of the police and crime commissioner revealed the allegations against Mr Ablewhite are of a potentially ‘criminal nature’.
Mr Ablewhite, 47, has been the county's police commissioner since 2016 when he was elected to take over from fellow Conservative Sir Graham Bright.
A statement from the Office of the Police and Crime Commissioner said: "A referral has been made to the Independent Office for Police Conduct.
"Jason Ablewhite has today [Monday] tendered his resignation as Police and Crime Commissioner for Cambridgeshire and Peterborough.
"It would be inappropriate for us to make any further comment."
An IOPC spokesman said: “The IOPC has started an independent investigation following a referral about a public complaint into the conduct of the Police and Crime Commissioner for Cambridgeshire.
“The investigation is in its early stages and it is too soon to speculate on the outcome.”
Today it emerged that letter from the chief executive of the office of the police and crime commissioner revealed the allegations against Mr Ablewhite are of a ‘criminal nature’.
According to a letter sent by the chief executive of the office of the police and crime commissioner, Dorothy Gregson, to members of the Cambridgeshire police and crime panel the allegation had been assessed as being potentially criminal.
An acting commissioner will be appointed and serve until the next scheduled election for the post in May 2020.
He remains a district Conservative councillor for St Ives in Huntingdonshire.
Cllr Ablewhite has been contacted for comment.


data class MutablePair<A, B>
A mutable version of the Pair class.
Author
bright_spark
Since
2.2.5
<init> |
A mutable version of the Pair class. MutablePair(first: A, second: B) |
first |
var first: A |
second |
var second: B |
toString |
fun toString(): String |


|
Connected Home over IP
672cf7684
|
Public Member Functions | |
| def | scan (self, line) |
| def | runLoopUntil (self, should_tuple) |
| def | Usage (self, cmd) |
| def | ParseInputLine (self, line, cmd=None) |
| def chip.ChipBleBase.ChipBleBase.ParseInputLine | ( | self, | |
| line, | |||
cmd = None |
|||
| ) |
| def chip.ChipBleBase.ChipBleBase.runLoopUntil | ( | self, | |
| should_tuple | |||
| ) |
helper function to drive runloop until an expected event is received or the timeout expires.
| def chip.ChipBleBase.ChipBleBase.scan | ( | self, | |
| line | |||
| ) |
API to initiate BLE scanning for -t user_timeout seconds.
Reimplemented in chip.ChipBluezMgr.BluezManager, and chip.ChipCoreBluetoothMgr.CoreBluetoothManager.
| def chip.ChipBleBase.ChipBleBase.Usage | ( | self, | |
| cmd | |||
| ) |


Here is a list of all modules:
[detail level 123]
| ▼core | Homoiconic language core |
| active | Executable objects subset |
| container | Data containers |
| ▼io | Base Input/Output |
| net | Networking |
| meta | Metaprogramming (software components) |
| primitive | Primitive scalar types |
| time | Calendar and date/time |
| ▼web | Web interface & applications |
| flask | Minimized Flask-based backend |
| html | HTML code elements/generation |
| ▼db | Databases & message buses |
| ser | Serialization |
| geo | Geographic/GIS |
| gui | Graphical User Interface (native & web elements) |
| ▼gen | Code generation (source-to-source compilation) |
| erl | Erlang/Elixir |
| java | Java |
| js | JavaScript |
| ▼py | Python |
| django | Pure Django hell generation (w/o graph engine) |


Having been influenced by Sentai, many Magical Girl shows are Color-Coded for Your Convenience. And in these shows the protagonist and/or leader of the team is often the one in pink.
For a character to fall under this trope, they must meet two requirements:
- The character must be a magical girl/boy or superhero
- The character must be the protagonist OR the leader of their team.
There's usually a good chance this character will have a Heart Beat-Down or Petal Power attack.
This trope often crosses over with Rose-Haired Sweetie and Princess Protagonist.
A Sub-Trope of Red Is Heroic and Pink Means Feminine.
Compare Princesses Prefer Pink, Pink Product Ploy.
Examples
open/close all folders
Anime and Manga
- In the Pretty Cure franchise, the protagonist of each series is always decked out in pink. They also tend to overlap with Cheery Pink.
- Futari wa Pretty Cure and Futari Wa Pretty Cure MaX Heart: Although Cure Black's theme color is, well, ...black, her secondary color is pink. In official games and merchandise Cure Black is consistently grouped along with other pink Cures.
- Futari wa Pretty Cure Splash★Star: Cure Bloom/Bright begins the trend of having the heroine of the show decked out in pink, with a primarily magenta uniform.
- Yes! Pretty Cure 5 and Yes! Pretty Cure 5 GoGo: Cure Dream manages to top Cure Bloom by having pink hair as well as a pink uniform.
- Fresh Pretty Cure!: Cure Peach manages to top Cure Dream by having a name that alludes to the color pink (Momozono/Peach), two shades of pink in her uniform, and even pink eyes.
- Pink hair, however, is reserved for Cure Passion, whose theme color is otherwise red.
- Heart Catch Pretty Cure: Cure Blossom manages to top Cure Peach by having all of her design points (two shades-of-pink uniform, pink-alluding name, and pink eyes), along with pink hair.
- Her predecessor and grandmother, Cure Flower, also had an equally as pink design.
- Suite Pretty Cure ♪: At this point, it's easier to just name aspects of the lead that AREN'T pink. The only aspect of Cure Melody that isn't pink are her eyes, which are blue. Interestingly, Cure Rhythm's color scheme is the inverse of Melody's (white with touches of pink).
- Smile Pretty Cure!: Cure Happy manages to top all the previous heroines by having pink hair and eyes both transformed and untransformed (although it's a much darker pink untransformed).
- DokiDoki! PreCure: Cure Heart is the first Cure to get less pink when she transforms, with her pink hair turning blonde (although she keeps her pink eyes).
- Happiness Charge Pretty Cure: Cure Lovely's uniform is comparatively less pink than previous Cures, though it's still her theme color. Her hair and eyes are also pink.
- Go! Princess Pretty Cure: Like Cure Heart, Cure Flora's hair turns blonde when she transforms - unlike Heart, however, she gains pink streaks in her hair. Her outfit is also pink.

- Hugtto! Pretty Cure: Cure Yell has pink eyes and hair in both civilian and Cure form (although her hair is darker as a civilian), and her outfit is pink.
- Her successor, Cure Tomorrow, aka Hugtan, also has a pink outfit in her Cure form.
- If we focus just on the plus two part of the Three Plus Two team, the leader of that part, the nominally red Cure Macherie, also has a lot of pink in her design.
- In episode 37, an explosion aftermath shows all thirteen pink leader cures jumping out at once (see the picture above).

- Sailor Moon
- All of Usagi's transformation sequences involve pink ribbons swirling around her. Her first, second, and fourth brooches are also heavily pink. Her standard uniform is actually equal parts red and royal blue, though it was often a pink shade of red. Her eternal form also has big pink puffy sleeves. And in the first manga artbook, Usagi is associated with the color pink. Some of her early designs also show her with pink hair. This was subverted as the series went on, as Usagi came to be associated more with white/silver while her future daughter becomes heavily associated with the color pink.
- Both Chibi Moon's transformation and uniform are predominantly pink. Like Usagi, she also has her own guardians that protect her, which also makes her the "center" of her group. Her pink hair and red eyes are meant to evoke the image of an albino rabbit's ears and eyes, and possibly the idea that Princesses Prefer Pink.
- All mages in the Lyrical Nanoha series have a "magic color": the default tint of their released magical energy. The title character's is pink (though as a character, she's more associated with the color white).
- In Wedding Peach, the main character has pink hair, a pink themed name (Momoko, meaning "Peach"), and a pink frill at the bottom of her dress in her Wedding Angel form. In the manga, her Fighter Angel outfit is pink as well, though the anime makes it red.
- In Tokyo Mew Mew, team leader Mew Ichigo has pink hair and eyes while transformed, as well as a pink dress and weapon.
- The main character of Ojamajo Doremi retains an entirely pink color scheme throughout her outfit, which changes between seasons.
- Mermaid Melody Pichi Pichi Pitch: Main character Lucia's tail as a mermaid is pink, and her idol form outfit consists of a pink dress, pink gloves, and pink boots.
- Cardcaptor Sakura's wands are pink. Her most iconic costume is also the pink dress and cap from the first opening of the anime. And when the Clow Cards are converted into Sakura Cards, they become pink. The predominance of pink in her design is likely due to her name meaning "cherry blossom" in Japanese.
- Chocolat of Sugar Sugar Rune's witch dress is hot pink, complete with hot pink hat. It was black in the manga, however.
- The online avatar of Corrector Yui's default outfit, her fairy corrector suit, is pink.
- Yuna from Yuki Yuna is a Hero is a redhead. Her magical girl appearance has pink hair and an equally pink attire.
- Kaname Madoka, the principal mahou shoujo of Puella Magi Madoka Magica, has pink hair and, when transformed, wears pink and white though when she goes Goddess near the end of the anime, her costume is a pure white and her eyes are gold.
- Utena of Revolutionary Girl Utena has pink hair and turns into a pink car at the end of Adolescence of Utena. In the beginning of the manga, her school jacket was pink (although her hair was strawberry blonde).
- When Cutey Honey officially became a magical girl in Cutey Honey Flash, her fiery red hair was changed to hot pink. This change stuck in all future incarnations.
- In the Magic Knight Rayearth manga, the protagonist, Hikaru, has pink hair.
- The heroine of Prétear, Himeno, has both pink hair and pink eyes.
- The protagonist of Kaitou Saint Tail's costume is pink and black.
- Magical Princess Minky Momo's trademark pink hair stays with her no matter what form she takes. Her name, Momo, means peach in Japanese, which is typically associated with the color pink.
- Fate/kaleid liner PRISMA☆ILLYA: The protagonist, Illyasviel von Einzbern, wears a very frilly, pink outfit as a magical girl.
- Ahiru of Princess Tutu has pink-orange hair and a pink and white ballet outfit. In the manga, her outfit is completely pink.
- Like her Western Animation counterpart, Momoko of Demashita!
- Karin of Super Pig transforms into a pink pig.
- Tsubomi of Papillon Rose - her outfit is pink, her hair is pink, and her Lingerie Soldier name means "Pink Butterfly".
- Ririka from Nurse Angel Ririka SOS wears a very pink Magical Girl outfit. Even in casual attire she often wears pink.
- Amu from Shugo Chara! has a largely pink color scheme (and hair), and her default form, Amulet Heart, is the pink one.
- Riko Mikogami, the lead character in Animal Detectives Kiruminzoo has, in her transformed state, the powers of a large, noticeably pink, cat.
- Nanako SOS: Nanako's "superhero" costume is pink.
- Mahou Shoujo Ore: Saki has light pink hair, and both her idol and magical boy form wear an all-pink ensemble.
Asian Animation
- Ari from Flowering Heart. Her hair is pink, and so are all of her outfits.
Comic Books
- Emma of Zodiac Starforce has a predominately pink-and-red outfit, unlike her teammates, who have light blue-and-white outfits (with their own individual color scheme). She also gains pink hair in Magical Girl form.
- Wonder Woman and the Star Riders: While all the Star Riders but Dolphine have a little pink in their outfits Wonder Woman is decked in almost all pink, with a magenta top, cape, boots and accents, light pink vambraces and belt and pink stars on her tights.
- The Unbelievable Gwenpool: Gwen has pink highlights in her hair, wears a pink and white version of Deadpool's costume, and she (along with everyone from her home dimension) speaks in pink word bubbles. As she learns to use her Reality Warper powers, they show up with a pink motif.
Fan Works
- Cure Rosa from Pretty Cure Perfume Preppy. Her outfit is white with pink lining, her boots are pink, her hair is pink, her theme is the pink rose, her Cure name is Spanish for "pink" and she's the main heroine.
- Cure Taffy of Pretty Cure Seasons Delight. Her outfit is pink, her hair is pink in both civilian and Cure form, and her surname refers to pink cherry blossoms.

- In the Weird Sisters series, Helga, Rhonda, Phoebe and Lila are exposed to a strange geode and develop four arms, three eyes, wings, super-powers and brightly-coloured skin. Naturally, Helga, the protagonist, has bright pink skin.
Video Games
- Princess Elodie from Long Live the Queen has bright pink hair, the option to learn magic, and the outfit you unlock for leveling up her magical powers is a frilly, pink affair.
- In League of Legends, there are two five-person teams in the Star Guardian skinline, styled after Magical Girls. Their respective leaders, Lux and Ahri, are both pink to their teammates' blue, red, green, and purple.
- Magical Girl Pretty Miyuki, the Show Within a Show from Yandere Simulator, has the titular character's theme color be pink.
- Sakura Shinguuji and her successor Sakura Amamiya from Sakura Wars are rare mecha examples. Both characters in-story are at the front of the (mostly female) Flower Division in the Imperial Combat Revue, wear pink in their civillian and pilot clothes, and have a bright pink mecha to match due to having Cherry Blossoms as a motif.
- In Persona 4: Arena Ultimax, Yukari plays the Pink Argus ranger in Pheonix Ranger Featherman Victory. Unlike many of the sentai shows the Featherman series parodies, and even some of its own installments, Feather Pink is the center ranger here.
Web Animation
- Sakura-nyan from Acedemy Sugoi Seiun.
Web Comics
- Pink Starlight from M9 Girls!. Justified since she fully embraced the magical girl look when she designed the hero costumes for the team.
- Princess Love Pon from the comic of the same name wears a white and pink-outfit.
- Farah from Shattered Starlight has pink hair and is the protagonist and former leader of a magical girl team.
- Tessa from Sleepless Domain has pink as her signature color, and is the leader of a magical girl team.
Western Animation
- Iris in LoliRock tends to wear pink even when not transformed, but her Magical Girl form is pink and white as well as giving her pink hair.
- Blossom, leader of The Powerpuff Girls, sports a pink dress as well as pink eyes.
- Will from W.I.T.C.H. wears a combination of pink and red, wields the pink Heart of Kandrakar, has a pink transformation sequence, and gains the power of pink lightning. That said, she's a tomboy and not a hugely feminine girl.
- Double-subverted in Winx Club, where the main character Bloom is primarily associated with the color blue. As the series goes on she starts adding more and more pink to her outfits. However Flora remains the main source of pink among the team.
- The little superheroine Atomic Betty sports a pink dress.
- Happy Ness, the main protagonist in Happy Ness: The Secret of the Loch, is pink in color.
- The lead singer and protagonist of Jem is pink-haired and often pink-clad. In her civilian identity, Jerrica Benton, she is a blonde but still tends to wear pink.
- Steven Universe:
- This show plays with this trope. Having been hugely influenced by the magical girl genre, the main character is indeed the one with the pink shirt and gem... the twist is that the protagonist is a boy.
 She was also the leader of the Crystal Gems. To top it off, her true identity was PINK Diamond.
- In most of Barbie's movies, you can expect her to be the one decked out in pink.
- The titular superheroine of SheZow is decked out in several different shades of pink, though it's Played With in that she's actually male and only presents as female while on duty.
- Mia's (from Mia and Me) elf form has dark pink hair tied with a pink hair tie, she wears a short strapless pink dress, pink stocking-like boots, and has white wings with a slight touch of pink.
- Played with by Twilight Sparkle in My Little Pony: Friendship Is Magic. She is more of a lilac in color, but her magic (from Season 2 on, as in Season 1 it was a very pale pink) and sigils are all bright pink.
- In Princess Gwenevere and the Jewel Riders, Gwenevere, the main heroine, wears pink armor. Since she's also a princess, it also qualifies as Princesses Prefer Pink.


Search
Home
New Cases
New Deaths
New Recovered
Dark Mode
×
×
Country
New Cases
Active
Critical
Recovered
New Deaths
Total Deaths
Sort By Filter:
New Cases
Active
Critical
New Recovered
New Deaths
Total Deaths
{% block content %} {% endblock %}


{% extends 'base.html' %} {% block title %}Home{% endblock title %} {% block content %}
Welcome to a world where being judgemental is COOL !!
Give your judgments over several trending scenario's around the globe .....
Start here


|
|
|
@855
|
5 months |
mmckerns |
updated copyright to 2016
|
|
|
|
@776
|
17 months |
mmckerns |
copyright updated to 2015; added to examples2
|
|
|
|
@714
|
2 years |
mmckerns |
added license and copyright to every file in certain branches
|
|
|
|
@710
|
2 years |
mmckerns |
updated to match changes in klepto (archive_dict is now called 'cache')
|
|
|
|
@709
|
2 years |
mmckerns |
updated cache examples in decorate to use klepto (some should move to …
|
|
|
|
@671
|
3 years |
mmckerns |
fix: correct imports of _CacheInfo in memoize;
have test_cached use …
|
|
|
|
@670
|
3 years |
mmckerns |
fix: created module to correct import of cache.safe cache.archives …
|
|
|
|
@669
|
3 years |
mmckerns |
moved rounding and cache stuff from decorate branch into trunk
|
|
|
|
@668
|
3 years |
mmckerns |
added docstrings for caching and rounding functions, methods, etc
|
|
|
|
@667
|
3 years |
mmckerns |
added a 'safe' cache version of all caches (makes memoized obsolete)
|
|
|
|
@666
|
3 years |
mmckerns |
sync'd memoize with cache; added cache method in memoize
|
|
|
|
@665
|
3 years |
mmckerns |
added 'memoize' features (archiving, rounding, etc) to caches in cache.py; …
|
|
|
|
@664
|
3 years |
mmckerns |
refactor archive_dict to be a dict with a pointer to an archive;
rename …
|
|
|
|
@663
|
3 years |
mmckerns |
migrated keymap functions to keymap classes; enable memoize to use keymaps
|
|
|
|
@662
|
3 years |
mmckerns |
fixed import of inf_cache, already merged into cache;
added ability for …
|
|
|
|
@661
|
3 years |
mmckerns |
merged all the new cache functions into a single file;
added simple …
|
|
|
|
@660
|
3 years |
mmckerns |
added new caching algorithms, need merging with features in memoize
|
|
|
|
@659
|
3 years |
mmckerns |
added file_dict for dict with file backend; need to rethink "archive"
|
|
|
|
@658
|
3 years |
mmckerns |
merged the different variants of memoized decorator
|
|
|
|
@657
|
3 years |
mmckerns |
added pop, clear, and iterator methods to db_dict
|
|
|
|
@656
|
3 years |
juhas |
The memo table is created only if it does not yet exist in the database …
|
|
|
|
@655
|
3 years |
mmckerns |
abstracted serializer and memo in memoize.memoized; added db_memo
|
|
|
|
@646
|
3 years |
mmckerns |
moved discrete from decorate/wrapper to mystic.constraints;
added …
|
|
|
|
@645
|
3 years |
mmckerns |
migrated constraints, penalty, coupler, and symbolic to trunk;
fix: use …
|
|
|
|
@644
|
3 years |
mmckerns |
shuffing methods within constraints and penalty to better logically group; …
|
|
|
|
@643
|
3 years |
mmckerns |
enable discrete to take int or tuple for index
|
|
|
|
@638
|
3 years |
mmckerns |
fix: updated sumt penalty restarts for changes to solver internals;
fix: …
|
|
|
|
@631
|
3 years |
mmckerns |
merge energy_history with stepmonitor;
converted CONTINUE in …
|
|
|
|
@629
|
3 years |
mmckerns |
enable discrete decorator to handle negative index; updated corresponding …
|
|
|
|
@628
|
3 years |
mmckerns |
discrete decorator for ndarrays; updated test_wrapper for discrete
|
|
|
|
@627
|
3 years |
mmckerns |
fix: discrete decorator index applies to all when index=None
|
|
|
|
@626
|
3 years |
mmckerns |
discrete decorator can be applied to given indicies
|
|
|
|
@623
|
3 years |
mmckerns |
some cleanup of imports in symbolic; _symbolic.solve now imported to solve
|
|
|
|
@622
|
3 years |
mmckerns |
merge simplify_symbolic, _build_linear, _build_nonlinear, and …
|
|
|
|
@621
|
3 years |
mmckerns |
updated to new sausage model; added vaA model viewer
|
|
|
|
@620
|
3 years |
mmckerns |
pass constraint and penalty informative docstring built from underlying …
|
|
|
|
@619
|
3 years |
mmckerns |
enable use of locals in build_constraint; make use of exec more secure
|
|
|
|
@618
|
3 years |
mmckerns |
rename order to targets in build_constraint, takes list of variable names
|
|
|
|
@617
|
3 years |
mmckerns |
commented out guess and *bounds options in build_*;
throw Error for …
|
|
|
|
@616
|
3 years |
mmckerns |
added test_build_constraint, renamed test_generate_constraint in …
|
|
|
|
@615
|
3 years |
mmckerns |
added more docstrings to _symbolic; convert == to = for sympy;
make sympy …
|
|
|
|
@614
|
3 years |
mmckerns |
cleaned up documentation; bugfix for when nvars is less than list of …
|
|
|
|
@613
|
3 years |
mmckerns |
added impose_product and impose_sum to mystic.math.measures;
allow …
|
|
|
|
@612
|
3 years |
mmckerns |
better substitution of mean and range for symbolic parser
|
|
|
|
@611
|
3 years |
mmckerns |
started rewrite of alta's code in mystic's symbolic math module; …
|
|
|
|
@610
|
3 years |
mmckerns |
added isbounded; minor documentation improvements; extended as_constraints …
|
|
|
|
@609
|
3 years |
mmckerns |
rename and migrate wrap, nested, and proxify from wrapper to constraints …
|
|
|
|
@608
|
3 years |
mmckerns |
added solve, as_constraint, and as_penalty;
added tests for solve, …
|
|
|
|
@606
|
3 years |
mmckerns |
added issolution and error method to penalty
|
|
|
|
@605
|
3 years |
mmckerns |
added iterative solver method for penalties (needs work)
added …
|
|
|
|
@604
|
3 years |
mmckerns |
added SetPenalty? method for penalty functions, and penalty kwd for …
|
|
|
|
@603
|
3 years |
mmckerns |
added outer wrapper 'wrap' as opposed to inner wrapper 'nested'
added …
|
|
|
|
@602
|
3 years |
mmckerns |
added "with_constraint(target)" form of decorator;
nested now preserves …
|
|
|
|
@601
|
3 years |
mmckerns |
memoized0 functions renamed to memoized, memoized class to memoize; …
|
|
|
|
@600
|
3 years |
mmckerns |
add optimization test for penalty and (nested) constraints decorators
|
|
|
|
@599
|
3 years |
mmckerns |
added decorators for penalty functions: barrier, quadratic, lagrange
|
|
|
|
@598
|
3 years |
mmckerns |
added clip_bounded, target_bounded, and bounce_bounded decorators to …
|
|
|
|
@597
|
3 years |
mmckerns |
add 'shallow' rounding (one level deep for floats, lists, arrays)
|
|
|
|
@595
|
3 years |
mmckerns |
enable a simple round (only rounds floats, does not 'deep round')
|
|
|
|
@594
|
3 years |
mmckerns |
fix: correct more typos in test_wrapper
|
|
|
|
@593
|
3 years |
juhas |
Fixed few typos, few more remaining.
|
|
|
|
@591
|
3 years |
mmckerns |
added decorator in wrapper to provide discrete input
added test for …
|
|
|
|
@590
|
4 years |
mmckerns |
added reading and writing to disk archive for memoize
|
|
|
|
@587
|
4 years |
mmckerns |
added access to memory cache for memoizing decorators
|
|
|
|
@581
|
4 years |
mmckerns |
strong improvements to float caching in memoize, works recursively on …
|
|
|
|
@580
|
4 years |
mmckerns |
add tests for 'wrapper' decorators
|
|
|
|
@579
|
4 years |
mmckerns |
improved TimedMonitor? to use independent Timer class; added test code
|
|
|
|
@575
|
4 years |
mmckerns |
added 'info' keyword to LoggingMonitor? for logging info during init;
added …
|
|
|
|
@554
|
4 years |
mmckerns |
added Monitor with built-in timer to branches/decorate
|
|
|
|
@550
|
4 years |
mmckerns |
added decorator versions of function wrappers from mystic.tools
|
|
|
|
@535
|
4 years |
mmckerns |
hackery to allow float rounding at level zero or level one depth
|
|
|
|
@534
|
4 years |
mmckerns |
added HPC tutorial (work in progress); extended memoize to better float …
|
|
|
|
@532
|
4 years |
mmckerns |
added some simple and useful decorators
|


| Top |
ExampleAnimalExampleAnimal — Generated C code for the org.gtk.GDBus.Example.ObjectManager.Animal D-Bus interface |
| ExampleAnimal | |
| struct | ExampleAnimalIface |
| struct | ExampleAnimalProxy |
| struct | ExampleAnimalProxyClass |
| struct | ExampleAnimalSkeleton |
| struct | ExampleAnimalSkeletonClass |
GInterface ╰── ExampleAnimal GObject ├── GDBusInterfaceSkeleton │ ╰── ExampleAnimalSkeleton ╰── GDBusProxy ╰── ExampleAnimalProxy
ExampleAnimalProxy implements GDBusInterface, GInitable, GAsyncInitable and ExampleAnimal.
ExampleAnimalSkeleton implements GDBusInterface and ExampleAnimal.
This section contains code for working with the org.gtk.GDBus.Example.ObjectManager.Animal D-Bus interface in C.
GDBusInterfaceInfo *
example_animal_interface_info (void
);
Gets a machine-readable description of the org.gtk.GDBus.Example.ObjectManager.Animal D-Bus interface.
Since 2.30
guint example_animal_override_properties (GObjectClass *klass
,guint property_id_begin
);
Overrides all GObject properties in the ExampleAnimal interface for a concrete class. The properties are overridden in the order they are defined.
klass |
The class structure for a GObject-derived class. |
|
property_id_begin |
The property id to assign to the first overridden property. |
Since 2.30
void example_animal_call_poke (ExampleAnimal *proxy
,gboolean arg_make_sad
,gboolean arg_make_happy
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Asynchronously invokes the Poke()
D-Bus method on proxy
.
When the operation is finished, callback
will be invoked in the thread-default main loop of the thread you are calling this method from.
You can then call example_animal_call_poke_finish()
to get the result of the operation.
See example_animal_call_poke_sync()
for the synchronous, blocking version of this method.
proxy |
||
arg_make_sad |
Argument to pass with the method invocation. |
|
arg_make_happy |
Argument to pass with the method invocation. |
|
cancellable |
A GCancellable or |
[allow-none] |
callback |
A GAsyncReadyCallback to call when the request is satisfied or |
|
user_data |
User data to pass to |
Since 2.30
gboolean example_animal_call_poke_finish (ExampleAnimal *proxy
,GAsyncResult *res
,GError **error
);
Finishes an operation started with example_animal_call_poke()
.
proxy |
||
res |
The GAsyncResult obtained from the GAsyncReadyCallback passed to |
|
error |
Return location for error or |
Since 2.30
gboolean example_animal_call_poke_sync (ExampleAnimal *proxy
,gboolean arg_make_sad
,gboolean arg_make_happy
,GCancellable *cancellable
,GError **error
);
Synchronously invokes the Poke()
D-Bus method on proxy
. The calling thread is blocked until a reply is received.
See example_animal_call_poke()
for the asynchronous version of this method.
proxy |
||
arg_make_sad |
Argument to pass with the method invocation. |
|
arg_make_happy |
Argument to pass with the method invocation. |
|
cancellable |
A GCancellable or |
[allow-none] |
error |
Return location for error or |
Since 2.30
void example_animal_complete_poke (ExampleAnimal *object
,GDBusMethodInvocation *invocation
);
Helper function used in service implementations to finish handling invocations of the Poke()
D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error()
or similar.
This method will free invocation
, you cannot use it afterwards.
Since 2.30
void example_animal_emit_jumped (ExampleAnimal *object
,gdouble arg_height
);
Emits the "Jumped" D-Bus signal.
Since 2.30
const gchar *
example_animal_get_mood (ExampleAnimal *object
);
Gets the value of the "Mood" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
object
was constructed. Use example_animal_dup_mood()
if on another thread. The property value or NULL
if the property is not set. Do not free the returned value, it belongs to object
.
[transfer none]
Since 2.30
const gchar *
example_animal_get_foo (ExampleAnimal *object
);
Gets the value of the "Foo" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
object
was constructed. Use example_animal_dup_foo()
if on another thread. The property value or NULL
if the property is not set. Do not free the returned value, it belongs to object
.
[transfer none]
Since 2.30
const gchar *
example_animal_get_bar (ExampleAnimal *object
);
Gets the value of the "Bar" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
object
was constructed. Use example_animal_dup_bar()
if on another thread. The property value or NULL
if the property is not set. Do not free the returned value, it belongs to object
.
[transfer none]
Since 2.36
gchar *
example_animal_dup_mood (ExampleAnimal *object
);
Gets a copy of the "Mood" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
The property value or NULL
if the property is not set. The returned value should be freed with g_free()
.
[transfer full]
Since 2.30
gchar *
example_animal_dup_foo (ExampleAnimal *object
);
Gets a copy of the "Foo" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
The property value or NULL
if the property is not set. The returned value should be freed with g_free()
.
[transfer full]
Since 2.30
gchar *
example_animal_dup_bar (ExampleAnimal *object
);
Gets a copy of the "Bar" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
The property value or NULL
if the property is not set. The returned value should be freed with g_free()
.
[transfer full]
Since 2.36
void example_animal_set_mood (ExampleAnimal *object
,const gchar *value
);
Sets the "Mood" D-Bus property to value
.
Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
Since 2.30
void example_animal_set_foo (ExampleAnimal *object
,const gchar *value
);
Sets the "Foo" D-Bus property to value
.
Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
Since 2.30
void example_animal_set_bar (ExampleAnimal *object
,const gchar *value
);
Sets the "Bar" D-Bus property to value
.
Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
Since 2.36
void example_animal_proxy_new (GDBusConnection *connection
,GDBusProxyFlags flags
,const gchar *name
,const gchar *object_path
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Asynchronously creates a proxy for the D-Bus interface org.gtk.GDBus.Example.ObjectManager.Animal. See g_dbus_proxy_new()
for more details.
When the operation is finished, callback
will be invoked in the thread-default main loop of the thread you are calling this method from.
You can then call example_animal_proxy_new_finish()
to get the result of the operation.
See example_animal_proxy_new_sync()
for the synchronous, blocking version of this constructor.
connection |
||
flags |
Flags from the GDBusProxyFlags enumeration. |
|
name |
A bus name (well-known or unique) or |
[allow-none] |
object_path |
An object path. |
|
cancellable |
A GCancellable or |
[allow-none] |
callback |
A GAsyncReadyCallback to call when the request is satisfied. |
|
user_data |
User data to pass to |
Since 2.30
ExampleAnimal * example_animal_proxy_new_finish (GAsyncResult *res
,GError **error
);
Finishes an operation started with example_animal_proxy_new()
.
res |
The GAsyncResult obtained from the GAsyncReadyCallback passed to |
|
error |
Return location for error or |
The constructed proxy object or NULL
if error
is set.
[transfer full][type ExampleAnimalProxy]
Since 2.30
ExampleAnimal * example_animal_proxy_new_sync (GDBusConnection *connection
,GDBusProxyFlags flags
,const gchar *name
,const gchar *object_path
,GCancellable *cancellable
,GError **error
);
Synchronously creates a proxy for the D-Bus interface org.gtk.GDBus.Example.ObjectManager.Animal. See g_dbus_proxy_new_sync()
for more details.
The calling thread is blocked until a reply is received.
See example_animal_proxy_new()
for the asynchronous version of this constructor.
connection |
||
flags |
Flags from the GDBusProxyFlags enumeration. |
|
name |
A bus name (well-known or unique) or |
[allow-none] |
object_path |
An object path. |
|
cancellable |
A GCancellable or |
[allow-none] |
error |
Return location for error or |
The constructed proxy object or NULL
if error
is set.
[transfer full][type ExampleAnimalProxy]
Since 2.30
void example_animal_proxy_new_for_bus (GBusType bus_type
,GDBusProxyFlags flags
,const gchar *name
,const gchar *object_path
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Like example_animal_proxy_new()
but takes a GBusType instead of a GDBusConnection.
When the operation is finished, callback
will be invoked in the thread-default main loop of the thread you are calling this method from.
You can then call example_animal_proxy_new_for_bus_finish()
to get the result of the operation.
See example_animal_proxy_new_for_bus_sync()
for the synchronous, blocking version of this constructor.
bus_type |
A GBusType. |
|
flags |
Flags from the GDBusProxyFlags enumeration. |
|
name |
A bus name (well-known or unique). |
|
object_path |
An object path. |
|
cancellable |
A GCancellable or |
[allow-none] |
callback |
A GAsyncReadyCallback to call when the request is satisfied. |
|
user_data |
User data to pass to |
Since 2.30
ExampleAnimal * example_animal_proxy_new_for_bus_finish (GAsyncResult *res
,GError **error
);
Finishes an operation started with example_animal_proxy_new_for_bus()
.
res |
The GAsyncResult obtained from the GAsyncReadyCallback passed to |
|
error |
Return location for error or |
The constructed proxy object or NULL
if error
is set.
[transfer full][type ExampleAnimalProxy]
Since 2.30
ExampleAnimal * example_animal_proxy_new_for_bus_sync (GBusType bus_type
,GDBusProxyFlags flags
,const gchar *name
,const gchar *object_path
,GCancellable *cancellable
,GError **error
);
Like example_animal_proxy_new_sync()
but takes a GBusType instead of a GDBusConnection.
The calling thread is blocked until a reply is received.
See example_animal_proxy_new_for_bus()
for the asynchronous version of this constructor.
bus_type |
A GBusType. |
|
flags |
Flags from the GDBusProxyFlags enumeration. |
|
name |
A bus name (well-known or unique). |
|
object_path |
An object path. |
|
cancellable |
A GCancellable or |
[allow-none] |
error |
Return location for error or |
The constructed proxy object or NULL
if error
is set.
[transfer full][type ExampleAnimalProxy]
Since 2.30
ExampleAnimal *
example_animal_skeleton_new (void
);
Creates a skeleton object for the D-Bus interface org.gtk.GDBus.Example.ObjectManager.Animal.
Since 2.30
typedef struct _ExampleAnimal ExampleAnimal;
Abstract interface type for the D-Bus interface org.gtk.GDBus.Example.ObjectManager.Animal.
Since 2.30
struct ExampleAnimalIface { GTypeInterface parent_iface; gboolean (*handle_poke) ( ExampleAnimal *object, GDBusMethodInvocation *invocation, gboolean arg_make_sad, gboolean arg_make_happy); const gchar * (*get_foo) (ExampleAnimal *object); const gchar * (*get_mood) (ExampleAnimal *object); void (*jumped) ( ExampleAnimal *object, gdouble arg_height); const gchar * (*get_bar) (ExampleAnimal *object); };
Virtual table for the D-Bus interface org.gtk.GDBus.Example.ObjectManager.Animal.
GTypeInterface |
The parent interface. |
|
Handler for the “handle-poke” signal. |
||
Getter for the “foo” property. |
||
Getter for the “mood” property. |
||
Handler for the “jumped” signal. |
||
Getter for the “bar” property. |
Since 2.30
struct ExampleAnimalProxy;
The ExampleAnimalProxy structure contains only private data and should only be accessed using the provided API.
Since 2.30
struct ExampleAnimalProxyClass { GDBusProxyClass parent_class; };
Class structure for ExampleAnimalProxy.
Since 2.30
struct ExampleAnimalSkeleton;
The ExampleAnimalSkeleton structure contains only private data and should only be accessed using the provided API.
Since 2.30
struct ExampleAnimalSkeletonClass { GDBusInterfaceSkeletonClass parent_class; };
Class structure for ExampleAnimalSkeleton.
Since 2.30
“bar”
property“bar” gchar *
Represents the D-Bus property "Bar".
Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.
Flags: Read / Write
Default value: NULL
Since 2.36
“foo”
property“foo” gchar *
Represents the D-Bus property "Foo".
Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.
Flags: Read / Write
Default value: NULL
Since 2.30
“mood”
property“mood” gchar *
Represents the D-Bus property "Mood".
Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.
Flags: Read / Write
Default value: NULL
Since 2.30
“handle-poke”
signalgboolean user_function (ExampleAnimal *object, GDBusMethodInvocation *invocation, gboolean arg_make_sad, gboolean arg_make_happy, gpointer user_data)
Signal emitted when a remote caller is invoking the Poke()
D-Bus method.
If a signal handler returns TRUE
, it means the signal handler will handle the invocation (e.g. take a reference to invocation
and eventually call example_animal_complete_poke()
or e.g. g_dbus_method_invocation_return_error()
on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD
error is returned.
object |
||
invocation |
||
arg_make_sad |
Argument passed by remote caller. |
|
arg_make_happy |
Argument passed by remote caller. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
Since 2.30
“jumped”
signalvoid user_function (ExampleAnimal *object, gdouble arg_height, gpointer user_data)
On the client-side, this signal is emitted whenever the D-Bus signal "Jumped" is received.
On the service-side, this signal can be used with e.g. g_signal_emit_by_name()
to make the object emit the D-Bus signal.
object |
||
arg_height |
Argument. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
Since 2.30


#include "_doctype.html"
curl - Internal Design
#include "css.t"
#define DEVEL_INTERNALS
#define CURL_URL dev/internals.html
#include "_menu.html"
#include "setup.t"
WHERE2(Development, "/dev/", Internals)
#include "internals.gen"
#include "_footer.html"


Day 1 of STP complete. 7 hr wall clock, 100.5 miles at 17.37 mph average. Now for shower, food and rest!
7/12/2014, 12:04:36 PM
Favs: 2
Retweets: 0
link--- layout: tweet ---
Day 1 of STP complete. 7 hr wall clock, 100.5 miles at 17.37 mph average. Now for shower, food and rest!
7/12/2014, 12:04:36 PM
Favs: 2
Retweets: 0
link


AMX VOLUME CONTROL LIBRARY
amx-lib-volume
This library contains the code to set up and manipulate volume controls from within an AMX Netlinx project.
THIS IS A THIRD-PARTY LIBRARY AND IS NOT AFFILIATED WITH THE AMX ORGANIZATION
Overview
[TOC]
Download
Git Users:
github.com/amclain/amx-lib-volume
Mercurial Users:
bitbucket.org/amclain/amx-lib-volume
Zip File:
Both sites above offer a feature to download the source code as a zip file. Any stable release, as well as the current development snapshot can be downloaded.
Issues, Bugs, Feature Requests
Any bugs and feature requests should be reported on the GitHub issue tracker:
github.com/amclain/amx-lib-volume/issues
Pull requests are preferred via GitHub.
Mercurial users can use Hg-Git to interact with GitHub repositories.
Snake Case Wrapper
A wrapper that converts the library functions to snake case is available as
amx-lib-volume-sc.axi
. When using this file, be sure to add
the base library amx-lib-volume.axi
to the workspace.
Usage
Conventions
VOL_
prefixes all library constants, and vol
prefixes all library functions. volArray
prefixes any
functions that operate on an array of structure volume
.
Constants are snake case (underscores separate words) with all uppercase letters.
Function names are camel case with the first letter being lowercase. If using the snake case wrapper file, then all function names are snake case with all lowercase characters.
Volume levels have a native resolution of 16 bits (integer). The
...AsByte
functions can be applied to convert these levels to
8 bit (char) values.
Volume Control Structure
All of the data for a volume control is stored in the volume
structure. These variables are considered private and therefore it is
not recommended to access them directly. Instead,
helper functions are provided to perform operations on the structure.
struct volume
{
integer lvl; // Volume level.
char mute; // Mute status (VOL_MUTED | VOL_UNMUTED).
integer max; // Max volume level limit. Assumed full-on ($FFFF) if not set.
integer min; // Min volume level limit. Assumed full-off ($0000) if not set.
integer step; // Amount to raise/lower the volume level when incremented or
// decremented.
char dim; // Level dim status (VOL_DIM_ON | VOL_DIM_OFF).
integer dimAmount; // Amount to reduce the level when dim is on.
}
Constants
In order to make it easier to distinguish a control's mute state when
reading code, the constants VOL_MUTED
and
VOL_UNMUTED
are defined.
// Volume control mute states.
VOL_UNMUTED = 0;
VOL_MUTED = 1;
Likewise, the same applies to the level dim state.
// Volume control dim states.
VOL_DIM_OFF = 0;
VOL_DIM_ON = 1;
Some of the functions in the volume control library return a status message
of type sinteger
. These codes are mapped to the following
constants, with failures being negative numbers.
// Function return messages.
VOL_SUCCESS = 0; // Operation succeded.
VOL_FAILED = -1; // Generic operation failure.
VOL_LIMITED = -2; // Input value was limited and may not have reached its
// specified value.
VOL_PARAM_NOT_SET = -3; // Parameter was not set.
VOL_OUT_OF_BOUNDS = -4; // Index boundry exceeded.
Functions
Including The Library
To include the volume control library, place the include statement just
before the DEFINE_DEVICE
section.
// Include the volume control library.
#include 'amx-lib-volume'
(***********************************************************)
(* DEVICE NUMBER DEFINITIONS GO BELOW *)
(***********************************************************)
DEFINE_DEVICE
Initializing A Control
First, define a variable of type volume
to act as a volume
control.

Call the helper function volInit()
to initialize the control
with a level, mute state, min limit, max limit, and number of steps between
the min and max limits. The min, max, and step parameters can be set to
0
if they're not needed.
(***********************************************************)
(* STARTUP CODE GOES BELOW *)
(***********************************************************)
DEFINE_START
volInit(mic1, 0, VOL_UNMUTED, 10000, 20000, 5); // Initialize the volume control.
Note that although the volume level 0
is passed, the min limit
will be applied, resulting in an actual initialization level of
10,000
.
Initializing An Array Of Controls
Initializing an array of volume controls is just as easy as initializing a single control, as the library contains functions to operate on arrays. Volume control arrays can be used to group devices, link channels, create zones, etc.
First, define an array of type volume
.
(***********************************************************)
(* VARIABLE DEFINITIONS GO BELOW *)
(***********************************************************)
DEFINE_VARIABLE
// Define a volume control array for the input devices.
volume inputs[8];
Call the helper function volArrayInit()
to initialize all
controls in the array with a level, mute state, min limit, max limit, and
number of steps. The min, max, and step parameters can be set to
0
if they're not needed.
(***********************************************************)
(* STARTUP CODE GOES BELOW *)
(***********************************************************)
DEFINE_START
// Initialize the array of volume controls.
volArrayInit(inputs, 0, VOL_UNMUTED, 10000, 20000, 5);
All eight volume controls in the array are now ready for use!
Getting Volume Levels
To read the level of a volume control, use volGetLevel()
or
volGetLevelAsByte()
. The function takes min/max limits into
account.
level = volGetLevel(mic1); // Saves the volume level of mic 1 to "level".
If you want to get the level while taking the mute state into account, use
the funtion volGetLevelPostMute()
. This can be used for
updating an audio DSP without having to manage its mute control.
level = volGetLevelPostMute(mic1); // Returns the volume level if unmuted,
// or 0 if muted.
The ...AsByte
functions provide an easy way to scale values
down to a range of 0-255, which is convenient for updating bar graphs on
touch panels.
send_level dvTouchPanel, LEVEL_MIC_1, volGetLevelAsByte(mic1);
Setting Volume Levels
Setting a volume level is performed by calling volSetLevel()
or volSetLevelAsByte()
. This function takes into account
min/max limits, but does not affect mute status. This means volume
levels can be adjusted while a channel is muted, and the change will be
heard once the channel is unmuted.
volSetLevel(mic1, 15000); // Set the volume of mic 1 to 15,000.
Volume levels for all of the controls in an array can also be set by
calling volArraySetLevel()
or
volArraySetLevelAsByte()
. This is helpful if you have an array
representing linked channels.
volArraySetLevel(inputs, 15000); // Set all levels in the input array to 15,000
Incrementing Levels
“Hey Bob, my mic needs to be louder! Set the volume to fifteen thousand!” “That's still not loud enough! Try twenty thousand!” “It's too loud now! Set it to nineteen thousand!” “Almost there! How about nineteen thousand and one? That's it! Keep it at nineteen thousand and one!”
Ok, so end-users aren't going to be setting volume levels by entering
16-bit integer values. That's where the volIncrement()
and
volDecrement()
functions come into play. These functions can
be called when a UI control is pressed.
Let's back up for a second. Remember the last parameter when initializing a volume control array?
volInit(mic1, 0, VOL_UNMUTED, 10000, 20000, 5);
The 5
specifies that there are five steps between the min and
max limits, which in this example is a step value of 2000
. The
step value is the amount that volIncrement()
and
volDecrement()
increase or decrease a control's volume
based on its current level. Here's an example.
Mic 1 starting level: 10,000
Remember, the min value 10,000 overrides the level 0 passed during
initialization.
STEP VOL LEVEL
5 ---- 20,000 MAX
| |
4 ---- 18,000
| |
3 ---- 16,000
| |
2 ---- 14,000
| |
1 ---- 12,000
| |
0 ---- 10,000 MIN <-- CURRENT LEVEL
/********************************************************/
volIncrement(mic1); // Increment mic 1's volume by 1 step.
/********************************************************/
Mic 1 level: 12,000
STEP VOL LEVEL
5 ---- 20,000 MAX
| |
4 ---- 18,000
| |
3 ---- 16,000
| |
2 ---- 14,000
| |
1 ---- 12,000 <-- CURRENT LEVEL
|XX|
0 ---- 10,000 MIN
After initialization, a control's step value can be set two ways: 1.
volSetStep()
sets the volume level amount to increase or
decrease when incremented, or 2. volSetNumberOfSteps()
sets
the number of steps between the min and max limits.
volSetStep(mic1, 2000); // Level will increase by 2,000 each time
// volIncrement() is called.
/* OR */
volSetNumberOfSteps(mic1, 5); // volIncrement() can be called 5 times before
// the max limit is reached.
Ramping
Volume ramping can be achieved by calling volIncrement()
and
volDecrement()
from PUSH
and HOLD
events. The higher the number of steps, the smoother the level will appear
to ramp.


checkerboard, squares, walkernoise
flat, hills, canyon, spikes, noise
cubes, pyramids, cylinders, towers, mushrooms, trees, apparatus, torii
default, contact, egypt, checkerboard, forest, goaland, yavapai, goldmine, threetowers, poison, arches, tron, japan, dream, volcano, starry, osiris


{% extends "interface.html" %} {% block title %}Job {{job.name}}{% endblock %} {% block content %}
{% if job.job_manual %} This is a manual job. Please schedule this to run via SSH. {% else %} This job runs once {{interval}}. The job's next schedued for {{next_run}}. {% endif %}
{% include "fragments/runs.html" %} {% endblock %}


Login
Login is required.
Login must be at least 4 characters long.
Login must be less than 30 characters long.
Only letters and digits allowed in login
Password
Password is required
Password must be at least 8 characters long
Password must be less than 40 characters long
{{loginCtrl.error}}


I'm having problems getting the format right for MQTT Messages. It may be an issue with how emoncms handles JSON strings.
I ran a small test passing the following strings into emoncms (9.2 | 2015.12.05) via an http post.json call;
An invalid json string (as validated in jsonlint)
{'time' : '1449507317','json' : '{temperature:13.1,humidity:67}',}
works whereas a valid json string
{"time" :<PHONE_NUMBER>,"json" : {"temperature":13.1,"humidity":67}}
does not.
Is this by design?
For MQTT, I have tried all of the following (some valid JSON some not)
mosquitto_pub -t 'rx/21' -m '{"13.2,69"}' (2 keys identified in emoncms values of 0)
mosquitto_pub -t 'rx/21' -m '{"13,69"}' (2 keys identified in emoncms values of 0,69)
mosquitto_pub -t 'rx/21' -m '{"13,69,10"}' (3 keys identified in emoncms values of 0,69,10)
Am I doing something wrong (wrong test strings) or is emoncms interpreting them incorrectly?
I am ultimately trying to pass values from another system.
Cheers, Brian.
Re: MQTT JSON payload format
Ok so, learnt a bit of PHP; "necessity is the mother of invention";
I edited phpmqtt_input.php, removed the explode that assumes a CSV string and replaced it with json_decode.
So the mqtt feed now accepts valid JSON. Tested with;
Note the in the input page the Key becomes the first part of the JSON element.
I honestly have little idea what the rest of the script does but this change gets the JSON data into EmonCMS so it works for me but YMMV. Unsurprisingly it also does not now accept CSV. (Need to remember to watch for changes on a git pull :) )
Cheers, Brian
Re: MQTT JSON payload format
Hi Brian,
Having just read your latest post on the "emonHub mosquitto MQTT authentication" thread I am posting here to not go off-topic on that thread. I'm not an authority but I am interested in this too. I have seen your numerous other posts on this subject on several threads, each time I wonder what you mean and hope someone in the know will shed some light, but unfortunately not as yet.
My comments are based on my own understanding and if not accurate will hopefully draw out some correcting comments and maybe we can confirm, identify or clarify if there is an issue to fix, and what if anything needs addressing.
Firstly I do not believe this is actually anything to do with MQTT itself, your comment "The current MQTT support does not comply with the MQTT standard (such as it is) as EmonCMS does not accept valid JSON." doesn't seem to be correct in that, the MQTT standard (currently v3.1.1) has no reference to JSON.
MQTT is intended to be a lightweight and universal protocol for transporting a variety of payloads without preference, The various command structures are documented in detail but the message payload is left open, the "standard" states
"The Payload contains the Application Message that is being published. The content and format of the data is application specific. The length of the payload can be calculated by subtracting the length of the variable header from the Remaining Length field that is in the Fixed Header. It is valid for a PUBLISH Packet to contain a zero length payload."
MQTT is just the "transport" and should have no effect on it's content, if it will only "accept" a certain format then it is not universal and if it is altering the content then it is not being faithful.
Many of the results I found when including "JSON" and "MQTT" as search terms led me to various forms of this "How to Send data as JSON objects over to MQTT broker" answer on stackexchange make me believe the MQTT payload CAN be JSON in a string form and it will then be down to the publishing application to ensure the payload is in "Valid JSON" IF that is the intention AND that the subscribing application is able to accept or parse the payload as JSON if that is what is intended.
So I believe the real "MQTT JSON" issue is that either "Valid JSON" is not being enforced at both ends or that JSON is not the intended format, neither of which are a fault of MQTT or a violation of the standard so the MQTT label on this issue may actually be confusing the issue and that's why there are no answers on this.
If the OEM project (or any other) choose to use csv or any other format that is fine if both ends are able to handle that input. There are 2 lines of thought in transporting data in the OEM project one is "concise" and uses a string of values in a predetermined order to conserve space and time eg JeeLib and emoncms bulk-posting etc, the other is more "verbose" using JSON type formats to include names and settings. Both are used in various places and I believe the csv v json maybe different stains of development and/or incompatible parts of the project being tied together, possibly from different stages of dev.
Just to throw the cat among the pigeons, my personal opinion is "why use JSON with MQTT at all?" Using a well formed MQTT topic tree you can "place" any value or setting precisely where it is supposed to be without any need for any payload formatting (braces and colons etc) or If the overhead of multiple publishes are a concern then use csv, don't pad the payload out with unnecessary characters and labels etc. As MQTT is intended to be lightweight JSON should be used for the more weighty http requests it was designed for and not MQTT,
There are a few posts on the format of posting (JSON) to emoncms that do not involve MQTT so I suspect the emoncms API's need clarifying and/or revising. Ultimately how (well?) the API's are defined in emoncms will determine how (or if) we can post to emoncms (not the standards themselves), although I very much agree it is better for everyone if it is uses recognized standards for both HTTP(inc JSON) and MQTT methods of posting.
I hope I've understood your concern correctly and apologize if anything I've said is misleading, I just felt including the MQTT reference in this issue may actually be distracting away from any potential JSON issue in emoncms and the use of JSON in MQTT is perhaps a separate discussion regardless of whether it's done correctly or not.
Paul
Re: MQTT JSON payload format
Hi Paul,
I had done a bit more digging and discovered my assumption (mother of all &^%$ ups) was that this link to the IOTF was also the MQTT std which obviously it isn't.
It seems it is a wider issue than just OEM and it is a shame there is less concern for the good old RFCs which are the bedrock of the internet as we know it (imagine 100's of mail protocols).
Why JSON, well it is widely used for many different applications and it has a standard and can be validated.
For OEM, if I use a JSON string as the input, the nodes are named so I do not have to guess (or work out) which one is which (and when there are 20 that takes some tme)! It will accept decimal values (which I think the CSV does not but may be wrong) and is a standard format. If I generate a JSON payload from one system, it can be used by multiple systems if they all take that format. if not I have to create multiple outputs one for each receiving system.
I think the IOTF is a good format. It includes a timestamped version as well. If all IOTF 'things' used this format life would be much simpler :)
If PHP can validate a JSON string perhaps the MQTT listener could check for valid JSON and if it fails assume CSV?
Cheers


| Name | Description | Area | Population | Time Zone |
|---|---|---|---|---|
| United States of America | United States of America | 9826675 | 318212000 | UTC -5 to -10 |
| California | The Tech State | 423970 | 38340000 | Pacific Time |
| San Francisco | The happening city | 231 | 837442 | PST |
| Los Angeles | Disco city | 503 | 3904657 | PST |
| Illinois | Not so cool | 57914 | 12882135 | Central Time Zone |
| Chicago | Financial City | 234 | 2695598 | CST |
| Texas | Rances, Oil & Gas | 268581 | 26448193 | Mountain |
| New York | The largest diverse city | 141300 | 19651127 | Eastern Time Zone |
| Manhattan | Time Square is the place | 269.403 | 0 | EST |
| Manhattan City | Manhattan island | 33.77 | 0 | EST |
| Time Square | Time Square for new year | 269.4 | 0 | EST |
| Niagra water fall | Close to Canada | 65.7 | 0 | EST |
| Long Island | Harbour to Atlantic | 362.9 | 0 | EST |
| All_Other | All_Other demographics | 0 | 0 | 0 |
| India | Hydrabad tech city | 9826675 | 318212000 | IST |
| Bangladesh | Country of love | 9826675 | 318212000 | BST |


# Golang & Flutter ![Logo](https://github.com/kjcodeacct/golang_flutter_demo/raw/master/assets/goflutter.png) --- # Prerequisites * ✅ Know golang * ✅ Have introductory knowledge of MVVM, MVC, MVP, etc (UI development) --- # What is this exactly? This is a great way to develop truly cross platform desktop and mobile applications rapidly, and beautifly. It's an intersection between: * Flutter's approach to declarative UI. * Golang's great performant and system level language. Powered by the [go-flutter project](https://github.com/go-flutter-desktop/go-flutter) --- # Who is this for? This is for anyone who wants to build an application *with* a modern UI. This could range from any of the following situations: * You have a mobile app you want to release on desktop. * Want to release a golang based app *without* electron or html. * You know golang, and want to get into mobile development or vice-versa. --- # Why? ## Flutter * Flutter is a great UI oriented language, for rapidly getting to production across *all* platforms. * Has a great UI standard that renders natively on everythin from linux to IOS. * Desktop support for dart/flutter is spotty, and unofficially in beta. ## Golang * Golang is a great system oriented language, for getting robust and fast (enough) code onto *all* platforms. * Has no real official UI tooling or even officially recommened UI. * Has primarily been developed with cli and server based applications in mind. --- # Quick Comparison ### What else is available * GTK
* desktop focused * Nuklear
* desktop focused * Fyne
* basic mobile implementation (lacks sensor data, etc) * QT
* fairly complete mobile implementation Please note this is a list of packages I've used *personally*. For a more exaustive list please go to
--- # Pros & Cons ## *AKA is this too hipster for production*? --- # Pros & Cons ## Pros * Great workflow, can build and package a release for any platform (desktop, mobile, embedded) in moments. * Flutters UI is declaritive and a part of the business logic. No need to fuss with widget declarations, complex callbacks, async threads, etc. * Can target any desktop specific features with golang, and provide any mobile specific features with flutter/golang-mobile. * Can also have 2 seperate UI's for mobile and desktop experiences. * Flutter has been proven to be a stable platform for many of the large companies seen at
--- # Pros & Cons ## Cons * [go-flutter](https://github.com/go-flutter-desktop/go-flutter) is unofficial. * Flutter is less popular than kotlin, swift, and react-native, leading to a smaller community (currently) * Flutter is a new technology. Sometimes that's scary, and a hard sell. * Google occasionally likes to [kill nice things](https://killedbygoogle.com/) * Should be noted Google dog-foods flutter for everything from Google Ads to Stadia. --- # How it works ### High Level
--- # How it works ### In depth
--- # Go Mobile ## Will this bring all of the cool features go offers to mobile? Yes, mostly. Limitations: * Go mobile lacks some features * not all packages are compatible, and assume a desktop environment --- # How it works ### Further Reading * Flutter FFI (c/c++ engine) *
* Flutter Embedders *
* Go-Flutter Summary *
* Comparison to official flutter bindings *
* Golang GLFW layer *
--- # Is this too hipster for production? ### TLDR; **No** * Essentially go-flutter at its core is just ~ 200 lines of code to compile to C byte code with GLFW support * This is **not** complex, at an implementation level, just fancy tooling * see
* All API's going to future flutter versions are deprecated but still functional * **ANY** currently working features will not break. * Go here for more information on flutter API versioning and compatibility policy *
--- # Getting Started * Install go 1.13+ * instructions can be found at
* Install flutter * instructions can be found at
* Install go-flutter * install hover (flutters unofficial go client) * ```GO111MODULE=on go get -u -a github.com/go-flutter-desktop/hover``` * Install dependencies * mac - have xcode installed * linux - install the following packages 'libgl1-mesa-dev xorg-dev' * windows - install gflw for windows
* Enable desktop builds ``` flutter config --enable-macos-desktop flutter config --enable-linux-desktop flutter config --enable-windows-desktop ``` --- # Go-Flutter Tooling ## Flutter Flutter provides a CLI tool to build and package mobile & web applications. List of commonly used commands: ``` # create your flutter app $ flutter create golang_flutter_demo ``` ``` # run your flutter app (android/ios) $ flutter run ``` ``` # build your bundled flutter app (android/ios) # stores builds in golang_flutter_demo/build/app/outputs $ flutter build apk $ flutter build ios ``` --- # Go-Flutter Tooling ## Hover Hover is the CLI tool that implements basic running, building and packaging a go-flutter application. The options below match those provided by flutter: ``` # add desktop support to your flutter app $ hover init ``` ``` # run your golang flutter app (in native env) $ hover run ``` ``` # build your bundled go-flutter app # stores builds in golang_flutter_demo/go/build/outputs $ hover build linux $ hover build macos $ hover build windows ``` --- # Go-Flutter "Plugins" What is a "plugin" ? * It sounds fancy, but it's just an interface between go & dart. ## An example plugin https://github.com/go-flutter-desktop/examples/tree/master/plugin_tutorial/go-plugin-example/complex --- # Demo * Go to golang_flutter_demo directory * Run and build the app * ```hover run``` --- # Demo
--- # Finally Some Code! Lets see what it takes to run this. --- # Creating the Binding ## Plugin Create a go package with plugin bindings > gophershop/image_editor/main.go ```go func (this *Editor) InitPlugin(messenger plugin.BinaryMessenger) error { channel := plugin.NewMethodChannel(messenger, channelName, plugin.StandardMethodCodec{}) channel.HandleFunc("editImage", this.parseEdit) return nil } ``` --- # Creating the Binding ## Register the Plugin Add package > go/cmd/options.go ```go flutter.AddPlugin(&image_editor.Editor{}), ``` --- # Using the Binding Call the plugin binding you made from your flutter code > lib/main.dart ```dart static const image_editor_lib = const MethodChannel('gophershop/image_editor'); ... ... loadedImagePath = await image_editor_lib.invokeMethod("editImage", jsonText); ``` --- # Quick Tips on Writing Plugins * use a common formats for communication i.e not raw structs * json, protobuffs, etc * write go code the same way as you would normally, error handling etc. * the plugin is not special, write it with your standard good practices for golang * if you are concerned about the layout mobile v desktop * mobile - main.dart * desktop - main_desktop.dart --- # Whats Next ? 1. Checkout the [golang_flutter_demo repo](https://github.com/kjcodeacct/golang_flutter_demo) 2. Add a different image editing feature from the [provided image package](https://github.com/anthonynsimon/bild) 3. Test the go-flutter build system and see if it's right for you. 4. ??? 4. Become a hermit for the weekend and make a really cool app with go-flutter. --- # Questions ? --- # Attribution * https://github.com/flutter/flutter * https://github.com/go-flutter-desktop/go-flutter * https://github.com/anthonynsimon/bild ---