Last updated: 2019-08-08
Checks: 7 0
Knit directory: scRNA-seq-workshop-Fall-2019/
This reproducible R Markdown analysis was created with workflowr (version 1.4.0). The Checks tab describes the reproducibility checks that were applied when the results were created. The Past versions tab lists the development history.
Great! Since the R Markdown file has been committed to the Git repository, you know the exact version of the code that produced these results.
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(20190718)
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 job! Using relative paths to the files within your workflowr project makes it easier to run your code on other machines.
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: .DS_Store
Ignored: .Rhistory
Ignored: .Rproj.user/
Untracked files:
Untracked: data/pbmc10k/
Untracked: data/pbmc5k/
Untracked: docs/assets/
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.
These are the previous versions of the R Markdown and HTML files. If you’ve configured a remote Git repository (see ?wflow_git_remote
), click on the hyperlinks in the table below to view them.
| File | Version | Author | Date | Message |
|---|---|---|---|---|
| html | 1a11bed | Ming Tang | 2019-08-08 | Build site. |
| Rmd | 04fc259 | Ming Tang | 2019-08-08 | wflow_publish(c(“analysis/scRNAseq_workshop_0.Rmd”)) |
| html | ce10b9a | Ming Tang | 2019-08-08 | Build site. |
| Rmd | 0cf484c | Ming Tang | 2019-08-08 | wflow_publish(c(“analysis/scRNAseq_workshop_0.Rmd”, “analysis/scRNAseq_workshop_1.Rmd”, |
| html | b27f0e8 | Ming Tang | 2019-07-30 | Build site. |
| html | ac73193 | Ming Tang | 2019-07-30 | Build site. |
| html | 614d882 | Ming Tang | 2019-07-29 | Build site. |
cellranger
In this section, I will show you how to prepare the fastq files and count the scRNAseq matrix by cellranger
. After sequencing, one usually gets a folder from the sequencing core with a folder structure like:
The bcl
(Binary Base Call) files in the Data folder contains the raw data generated from the illumina sequencers. cellranger
wraps the illumina bcl2fastq
command into cellranger mkfastq
to convert it to fastq files for single-cell RNAseq data.
For details, check the tutorial from 10x Genoimcs.
On Odyssey
computing cluster:
module load bcl2fastq2
cellranger mkfastq --id=test \
--run=/path/to/the/run/folder \
--csv=test.csv \
--jobmode=local \
--localmem=40 \
--localcores=12
test.csv
is a comma seprated file with three columns:
Lane,Sample,Index
1,test_sample,SI-GA-A3
After cellranger mkfastq
, we are ready to align the fastqs to the reference genome and count how many reads per gene per cell. These steps are wraped in cellranger count
command.
cellranger count --id=sample345 \
--transcriptome=/opt/refdata-cellranger-GRCh38-3.0.0 \
--fastqs=/home/test/outs/fastq_path/HAWT7ADXX/test_sample/ \
--sample=mysample \
--expect-cells=6000
What does the output of cellranger count
look like?
In the sample345
folder there is an outs
folder, and you will find the files Seurat
works with in the filtered_feature_bc_matrix
folder. There are 3 files in the folder:
ls -sh filtered_feature_bc_matrix/
total 90M
60K barcodes.tsv.gz 300K features.tsv.gz 90M matrix.mtx.gz
# The `barcodes.tsv.gz` contains the cell barcode that passed the `cellranger` filter.
zcat barcodes.tsv.gz | head -5
AAACCCAAGCGCCCAT-1
AAACCCAAGGTTCCGC-1
AAACCCACAGAGTTGG-1
AAACCCACAGGTATGG-1
AAACCCACATAGTCAC-1
# how many cells (barcodes)?
zcat barcodes.tsv.gz | wc -l
11769
# The `features.tsv.gz` contains the ENSEMBLE id and gene symbol
zcat features.tsv.gz | head -5
ENSG00000243485 MIR1302-2HG Gene Expression
ENSG00000237613 FAM138A Gene Expression
ENSG00000186092 OR4F5 Gene Expression
ENSG00000238009 AL627309.1 Gene Expression
ENSG00000239945 AL627309.3 Gene Expression
## how many genes?
zcat features.tsv.gz | wc -l
33538
# matrix.mtx.gz is a sparse matrix which contains the non-zero counts
zcat matrix.mtx.gz | head -10
%%MatrixMarket matrix coordinate integer general
%metadata_json: {"format_version": 2, "software_version": "3.0.0"}
33538 11769 24825783
33509 1 1
33506 1 4
33504 1 2
33503 1 10
33502 1 5
33500 1 20
33499 1 9
Most of the entries in the final gene x cell
count matrix are zeros. Sparse matrix efficiently save the disk space by only recording the non-zero entries.
You see the dimension of the matrix is 33538 x 11769
and the number of non-zero entries is 24825783
e.g. for the subsequent two rows in the sparse matrix:
33509 1
is the index of the row (gene) and column(cell) of that non-zero entry in the matrix, and 1
is the count number.
33506 1
is the index of the row and column of that non-zero entry in the matrix, and 4
is the count number.
cellranger
cellranger
is very slow. It can take several days to run a mouse single-cell RNAseq data set with even 20 CPUs. There are other tools which can process single-cell RNAseq data set much faster and accurate as well.
Paper : Alevin efficiently estimates accurate gene abundances from dscRNA-seq data
It supports Drop-seq and 10x-Chromium v1/2/3.
Paper: Modular and efficient pre-processing of single-cell RNA-seq
the bustoools commands we implemented are generic and will work with any BUS file, generated with data from any scRNA-seq technology. Distinct technology encodes barcode and UMI information differently, but the kallisto bus command can accept custom formatting rules. While the pre-processing steps for error correction and counting may need to be optimized for the distinguishing characteristics of different technologies, the modularity of the bustools based workflow makes such customization possible and easy.
scumi is a flexible Python package to process fastq files generated from different single-cell RNA-sequencing (scRNA-seq) protocols to produce a gene-cell sparse expression matrix for downstream analyses, e.g., discovering cell types and inferring cell lineages.
It supports CEL-Seq2, 10x Chromium, Drop-seq, Seq-Well, CEL-Seq2, inDrops, and SPLiT-seq.
If you want to analyze public single-cell data, there are databases you can go to:
Click the Terminal
tab in your Rstudio
# go to your home directory
cd ~
# clone the github repo
git clone https://github.com/crazyhottommy/scRNA-seq-workshop-Fall-2019
go to Files
—> scRNA-seq-workshop-Fall-2019
folder and double click the scRNA-seq-workshop-Fall-2019.Rproj
file. Inside the analysis
folder, you can find all the Rmd
files which you can execute the commands.
sessionInfo()
R version 3.5.1 (2018-07-02)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS High Sierra 10.13.6
Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] workflowr_1.4.0 Rcpp_1.0.0 digest_0.6.18 rprojroot_1.3-2
[5] backports_1.1.3 git2r_0.23.0 magrittr_1.5 evaluate_0.12
[9] stringi_1.2.4 fs_1.2.6 whisker_0.3-2 rmarkdown_1.11
[13] tools_3.5.1 stringr_1.3.1 glue_1.3.0 xfun_0.4
[17] yaml_2.2.0 compiler_3.5.1 htmltools_0.3.6 knitr_1.21


Weddings - Funerals - Holiday Parties - Private Celebrations - Restaurant Easy Listening Entertainment
Popular Folk Tunes - Inspirational Gospel - Delta Blues - Traditional Country - Easy Listening - Contemporary Rock - Classic Holiday - Popular Wedding
With a distinguished career as a musical recording artist and guest television performer, Shannon has traveled the world to entertain. Whether it’s thousands of troops overseas or enhancing the ambiance of a private party closer to home, she is at ease in any venue.
An accomplished Guitar and Hammer Dulcimer artist, Shannon performs a repetoire of nearly 300 songs—easily transitioning from traditional folk melodies to contemporary numbers.


Vim has six basic modes:
Here you can enter normal editor commands. When you
start Vim, you are in normal mode. Normal mode is also known as
command mode. There are many different ways to reach normal mode. To
access normal mode from visual mode, type [Esc]+v, v, or [CTRL]+V.
From select mode, type any non-printable command to move the cursor
(without holding the shift key). From insert mode and replace mode,
type
This is like normal mode, but all of your movement commands will extend a highlighted area. Non-movement commands will be executed for the highlighted area as well. To access visual from normal mode, just type "V" (non case-sensitive) or "^V". From all other modes, type "^O" or "^G".
This mode looks similar to the MS-Windows selection mode. If you type a printable character, the selection is deleted and insert mode will begin. To access select mode from normal mode, select text with the mouse while the 'selectmode' option contains 'mouse' OR hold the shift key and use a non-printable command to move the cursor while the 'selectmode' option contains 'key'. From all other modes, type "^G".
Here, all the text you type is inserted in to the
buffer. To access insert mode from normal mode, type type "I", "A",
"O", "C", or "S" (non case-sensitive). From visual mode, type "C"
(non case-sensitive). From select mode, type a printable character,
which will insert the character and delete the selection. From
replace mode, type the
This mode is more Ex commands (:), search commands (? and /), and the filter command (!). Here you can enter one line of text at the bottom of the window. To access command-line mode from normal mode, type ":", "/", "?", or "!". From all other modes, type ":".
Here you can also edit the command line, as in command-line mode, but this is very limited. To access ex mode, simply type ":Q". This will work no matter what mode you're in.
This is like normal mode, except while Vim waits for specification on the type of text on which the operator will work after an operator command has started.
This is the same as insert mode except an existing character of the text is deleted for every character you enter.
This is like replace mode, but you are replacing screen space instead of characters.

This mode is entered when you start select mode from insert mode. You return to insert mode when select mode ends.


this is the first character
I have ever drawn
that is not in pixel art style
color pallate:
blue, red, yellow (totodile) and black / white (basic)
thoughts:
shark-styled character supposed to flex
hence the GG gucci belt, the gold chain,
golden shark grillz, big muscles, red fur
sharingan, cheesy smile and scar under the eye
my hero academia: bakugo katsuki
"Shinu"
this is the second character
I have ever drawn
that is not in pixel art style
I drew after watching demon slayer
color pallate:
yellow, brown, white (zenitsu)
thoughts:
making my character more humanoid
hence the smaller arms, feet and head
and of course making him similiar to zenitsu
(color pallete, white eyes, electric sword, clothes)
pokemon #158: totodile
best pokemon ever change my mind
this is the third character
I have ever drawn
that is not in pixel art style
I drew after / while making this website
color pallate:
yellow brown (zenitsu)
white (zenitsu and sans) and blue (sans)
thoughts:
making my character more interesting
hence the skeleton head, return of blue as a color
the dual colored scarf and addition of details
(lightning on head, fire on eye, scar)
and of course sort of making him like sans
(skeleton head with blue fire on eye)


Your enrollment for the Front End Development course has been received. Course details will be sent to you via email. Looking forward to watching you grow!
TELL YOUR FRIENDS


Joe Ganz Career Information
Quarterback Joe Ganz took the reins of the Nebraska offense late in the 2007 season and immediately began re-writing the Cornhusker record book. Ganz went on to post one of the most prolific offensive seasons in school history in 2008, and by the end of his career he held more than 20 school records. The 6-1, 210-pound Ganz engineered a Nebraska offense that became one of the most complete units in the country in the second half of the 2008 season. The Huskers ranked in the top 20 nationally in passing offense, total offense and scoring offense. Ganz also transformed Nebraska into one of the most efficient units in the country. The Huskers ranked second in the nation in time of possession and were among the Big 12 leaders in third-down conversions. In the process of leading the Husker offense Ganz, set Nebraska season records for with 3,568 passing yards and 3,826 yards of total offense. Ganz was extremely accurate throughout the season, completing 67.9 percent of his passes and set NUŐs record for season completions and percentage. He has also shattered the Nebraska career record for accuracy by completing nearly 66 percent of his 549 career pass attempts. He threw for 25 touchdown passes in 2008, the second-most in NU history and his 45 career touchdown passes also rank second in the Nebraska record book. Ganz finished his senior season ranked among Big 12 and national leaders in several categories, including passing yards per game, total offense and pass efficiency. Following his final game, GanzŐs career pass efficiency ranking was fourth among all 2008 active players trailing only Heisman finalists Sam Bradford, Tim Tebow and Colt McCoy. Ganz threw for more than 300 yards five times in 2008, and topped that number eight times in 16 career starts. In 2008, Ganz also showed his dual-threat ability. He ran for 258 yards and five touchdowns on the season, including 95 yards and two touchdowns at Kansas StateĐthe most rushing yards by an NU quarterback in five seasons. Ganz also joined elite company against New Mexico State when he became just the third player in school history to rush, pass and catch a touchdown in the same game. The only other Huskers to accomplish that feat are Heisman Trophy winners Johnny Rodgers and Eric Crouch. The leadership of Ganz allowed Nebraska to surpass 30 points 10 times in 2008 and in 13 of his 16 career starts. The Huskers passed for at least 200 yards in all 12 games in 2008 and gained more than 400 yards of total offense nine times. His poise was evident as Nebraska rallied from a second-half deficit to win four games in 2008, including three of the seasonŐs final four games. Ganz was voted one of four team captains for the 2008 season. Ganz was also named the HuskersŐ MVP and capped his career by being named the MVP of the 2009 Konica Minolta Gator Bowl.
Ganz threw for 1,399 yards and 15 touchdowns in his three 2007 starts, while posting the top two passing days in school history. His 15 touchdown passes in a three-game stretch were a school record and he guided Nebraska to an average of 598.7 yards of total offense in his three starts. Ganz threw for 405 yards and four touchdowns in his first start at Kansas, then threw for a school-record 510 yards and an NU record seven touchdowns in a rout of Kansas State. He added 484 yards and four touchdowns at Colorado. *source www.Huskers.com


| viewLevel value | user roles |
|---|---|
| for internal department program use only | department Faculty Role, department Administrator Role |
| for internal division Division use only | above plus division Administrator Role |
| shared with other academic programs for assessment & accreditation purposes only | Faculty Role |
| shared with college depts. and academic programs | Faculty Role & Staff Role |
| shared with college depts., academic programs, and students | Faculty Role, Staff Role, & Student Contributor Role |
| public | everyone |
For the purposes of viewLevel settings, the ACLs assigned are Discover and View.
Replace department with the name of the collection's program, e.g. "Glass", and division with the name of the program's division, e.g. "Fine Arts".


View the collection of entries from Mental Health Hacks.
Designed by BitScript Technologies of Xavier School, the application prototype showcases an innovative way of providing resources to people with narcissism in Narsio.
Software (Prototype) NarcissismWritten by Regina Mison, the Will and Testament of Asher Adams is a delve into the despondent hollow of the empty.
Creative Writing Grief and LossWritten and illustrated by Aleeza Kira Abinuman, "The Silsence of Holding On" is an hour after hour day experience of the feeling.
Poem and Illustration AnxietyMaster Siopao and Co. capture phobias in "When Alone," a cinematographic experience traveling to and through the sonder of lives.
Film PhobiasIn "Believe in Yourself," Ramon Virrey explores the pang of panic disorders in both mind and body, and the story of survival that comes with all hurt.
Interactive Fiction Panic Disorders"Caught Between" explores the turn of the future, of life, and of everything known in a poem about teenagers by Rocio Castillo.
Creative Writing TeenagersA blend of art and photography, Jacqui Reyes portrays the healing, corruption, and wave of feelings in Scizophrenia through "She Needs Help."
Gif SchizophreniaTaken by Gem Tan, "Anger Blinds" is a raw photo that depicts the blinding effects of anger through color, emotion, etc.
Photography Anger"Miracle Cure" is a colorful artwork by Corinne Sison that depicts one's unique experience with the effects of medication.
Illustration Medication"Go Leave" is an original acoustic song written and sung by Hanna Padilla about the pain of being left behind by a loved one due to the other's mental illness.
Song RelationshipsDesigned and coded by Sugar Cubs, "StressBoard" is a website for those who need help in coping with anger or stress.
Website Anger"Lighthouse" is a website made by Bianca Aguilar for a hypothetical security software which scans a family's devices for underlying secrets.
Website Family IssuesQijel Mariano's mend of anger is shared in essay, illustration, and photography as he tells of story in different mediums.
Essay, Illustration, and Photography Anger"Wildcard" is an illustration on teenagers from Team Isinantabi minimally depicting the fragility in mind.
Illustration TeenagersAn unfinished, light kick towards LGBT issues -- Canp Tram presents an interactive fiction in the realm of high school life.
Interactive Fiction LGBT Issues"You Are What You'll Be" is a collective of poetry from Team Better Days tackling different gender issues. From the gentleness of "warm like flowers in the summer"...
Poems Gender IssuesThe Blue Dolphin website is Mega Minds' solution to LGBT issues; this exploration towards a platform for a community.
Website LGBT IssuesWritten and designed by BGL.Signal, "Bottoms Up" is an interactive fiction describing eye-opening fear and dual diagnosis through the eyes of one girl.
Interactive Fiction PhobiasNoleil's "Never-ending War" is a take on self-harm in soft melodic tunes, digging into self-harm in a confessional lull.
Song Self-harm"PANIC" is a film by Felix Culpa that shows a variety of people undergoing the pressuring experience of a panic disorder.
Video Panic DisordersIn whimsical color, Isabella Hilario's light illustrations on adolescence and growth tell of the stories and pain behind coming-of-age and the rise of heart and spirit that comes in all inevitability in this video series.
Animated Comic AdolescenceDrawn by Aaron Natividad, "Symptoms of Depression" is an illustration set composed of "Loneliness", "Anxiety", and "Guilt".
Illustration DepressionTeam Rocket, in gorgeous amateur cinematography and sound is a film on the struggles of teenagers of different backgrounds.
Short Film/Video Teenagers"Halina sa Hapagkainan" is a memoir on eating disorders, the crunch and twist of a body given up in growth, self-hatred, and loss of mind. A special award winner, this interactive fiction is a confessional vow towards the Filipino mental health struggle.
Interactive Fiction Eating DisordersGiven the Silakbo award, meraki; -- in photo, prose, and poetry, depicts both the fall, recovery, and stillness.
Photography + Text Self-harmAn interactive fiction, "In Memory Of" deals with a cold story on abuse, rival and telling of its hidden figures and captive nature.
Interactive Fiction AbuseGia Duran expresses the pangs of abuse in an illustration brooding of story, pain, and melancholy entitled "Scars and Scarring."
Illustration AbuseBGL.Tora's RPG Maker game on Grief and Loss revisits the phrase "only time can heal all wounds" in this solemn exploration.
Game Grief and LossDianne Axalan explores Ate Ryza in a short webcomic patterned with gorgeously simple illustrations that tell of a close Filipino tale, the bind of family and the healing that comes with understanding.
Illustration (Webcomic) SchizophreniaAnxiety Attack is a colorful, winding delve into the frustration and loss of control brought about by an attack in the open. Maxine Yap's illustration is a blend of color, life, and jagged uncertainty.
Illustration Anxiety"Soul" is Jasper Leyson's whimsical, soft capture on LGBT issues through song. Without lyric, the riveting life of woodwind, piano, and tranquil beats breathe life into the humanity of every LGBT person.
Song LGBT IssuesAmalgamated in a poetry and song is Trisha Esparanza's take on PTSD called "Half of Me is Her". Of pain, mind, and memory in lyric.
Poem, Song PTSD"Deep Scars" is Dara Eoy's take on trauma in literature. Reflecting on Marnie (1964) by Alfred Hitchcock, a dissection of Margaret Edgar reveals the workings of scar and past.
Writing TraumaThree pieces of fried chicken showcase ADHD/ADD through an interactive fiction on the pacing of life, illness, and support.
Interactive Fiction ADHD/ADDIn simplicity, Clarence Cambas illustrates depression in his work titled "Marie" as a fleeting picture of soul, engorged in disillusion and loss of light.
Illustration DepressionA winner of the special award, Paradigm Shift presents "Facade," a song on the issues of frustration, guilt, and abuse in a melody of release.
Song Abuse"jusque la" is Team Kaleidoscope's take on grief and loss; of growth, lack of self-control, and a spiral, a familiar story is expressed in art, word, and mind.
Illustration + Writing Grief and LossStress in its most vulgar and grimacing is indulged in through Jeri Cambas' "Can't Breathe" - of visuals and words, a portrait on the little build-up of everyday realities tip the edge.
Photography + Poetry Stress


@* * Copyright 2020 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *@ @import config.ApplicationConfig @import controllers.auth.AuthenticatedRequest @import uk.gov.hmrc.play.partials.FormPartialRetriever @()(implicit lang: Lang, request: AuthenticatedRequest[_], messages: Messages, formPartialRetriever: FormPartialRetriever, appConfig: ApplicationConfig) @headerContent = { @includes.taxs_breadcrumb(List("breadcrumbs.taxs.select_tax_year"), "breadcrumbs.taxs.no_ats", 0) @helpers.back_link(Messages("generic.back")) } @includes.taxs_main(title = Messages("no.ats.html.title"), utils.AccountUtils.getAccountId(request), contentHeader = Option(headerContent)) {
@Html(Messages("no.ats.line1"))
@Html(Messages("no.ats.line2"))
}


|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface HibernateOperations
Interface that specifies a basic set of Hibernate operations,
implemented by HibernateTemplate
. Not often used, but a useful
option to enhance testability, as it can easily be mocked or stubbed.
Defines HibernateTemplate
's data access methods that
mirror various Session
methods. Users are
strongly encouraged to read the Hibernate Session
javadocs
for details on the semantics of those methods.
Note that operations that return an Iterator
(i.e.
iterate(..)
) are supposed to be used within Spring-driven
or JTA-driven transactions (with HibernateTransactionManager
,
JtaTransactionManager
,
or EJB CMT). Else, the Iterator
won't be able to read
results from its ResultSet
anymore, as the underlying
Hibernate Session
will already have been closed.
Note that lazy loading will just work with an open Hibernate
Session
, either within a transaction or within
OpenSessionInViewFilter
/
OpenSessionInViewInterceptor
.
Furthermore, some operations just make sense within transactions,
for example: contains
, evict
, lock
,
flush
, clear
.
HibernateTemplate
,
Session
,
HibernateTransactionManager
,
JtaTransactionManager
,
OpenSessionInViewFilter
,
OpenSessionInViewInterceptor
| Method Summary | ||
|---|---|---|
int |
bulkUpdate(String queryString)
Update/delete all objects according to the given query. |
|
int |
bulkUpdate(String queryString,
Object... values)
Update/delete all objects according to the given query, binding a number of values to "?" parameters in the query string. |
|
int |
bulkUpdate(String queryString,
Object value)
Update/delete all objects according to the given query, binding one value to a "?" parameter in the query string. |
|
void |
clear()
Remove all objects from the Session cache, and
cancel all pending saves, updates and deletes. |
|
void |
closeIterator(Iterator it)
Immediately close an Iterator created by any of the various
iterate(..) operations, instead of waiting until the
session is closed or disconnected. |
|
boolean |
contains(Object entity)
Check whether the given object is in the Session cache. |
|
void |
delete(Object entity)
Delete the given persistent instance. |
|
void |
delete(Object entity,
org.hibernate.LockMode lockMode)
Delete the given persistent instance. |
|
void |
delete(String entityName,
Object entity)
Delete the given persistent instance. |
|
void |
delete(String entityName,
Object entity,
org.hibernate.LockMode lockMode)
Delete the given persistent instance. |
|
void |
deleteAll(Collection entities)
Delete all given persistent instances. |
|
org.hibernate.Filter |
enableFilter(String filterName)
Return an enabled Hibernate Filter for the given filter name. |
|
void |
evict(Object entity)
Remove the given object from the Session cache. |
|
|
execute(HibernateCallback<T> action)
Execute the action specified by the given action object within a Session . |
|
List |
executeFind(HibernateCallback<?> action)
Execute the specified action assuming that the result object is a List . |
|
List |
find(String queryString)
Execute an HQL query. |
|
List |
find(String queryString,
Object... values)
Execute an HQL query, binding a number of values to "?" parameters in the query string. |
|
List |
find(String queryString,
Object value)
Execute an HQL query, binding one value to a "?" parameter in the query string. |
|
List |
findByCriteria(org.hibernate.criterion.DetachedCriteria criteria)
Execute a query based on a given Hibernate criteria object. |
|
List |
findByCriteria(org.hibernate.criterion.DetachedCriteria criteria,
int firstResult,
int maxResults)
Execute a query based on the given Hibernate criteria object. |
|
List |
findByExample(Object exampleEntity)
Execute a query based on the given example entity object. |
|
List |
findByExample(Object exampleEntity,
int firstResult,
int maxResults)
Execute a query based on a given example entity object. |
|
List |
findByExample(String entityName,
Object exampleEntity)
Execute a query based on the given example entity object. |
|
List |
findByExample(String entityName,
Object exampleEntity,
int firstResult,
int maxResults)
Execute a query based on a given example entity object. |
|
List |
findByNamedParam(String queryString,
String[] paramNames,
Object[] values)
Execute an HQL query, binding a number of values to ":" named parameters in the query string. |
|
List |
findByNamedParam(String queryString,
String paramName,
Object value)
Execute an HQL query, binding one value to a ":" named parameter in the query string. |
|
List |
findByNamedQuery(String queryName)
Execute a named query. |
|
List |
findByNamedQuery(String queryName,
Object... values)
Execute a named query binding a number of values to "?" parameters in the query string. |
|
List |
findByNamedQuery(String queryName,
Object value)
Execute a named query, binding one value to a "?" parameter in the query string. |
|
List |
findByNamedQueryAndNamedParam(String queryName,
String[] paramNames,
Object[] values)
Execute a named query, binding a number of values to ":" named parameters in the query string. |
|
List |
findByNamedQueryAndNamedParam(String queryName,
String paramName,
Object value)
Execute a named query, binding one value to a ":" named parameter in the query string. |
|
List |
findByNamedQueryAndValueBean(String queryName,
Object valueBean)
Execute a named query, binding the properties of the given bean to ":" named parameters in the query string. |
|
List |
findByValueBean(String queryString,
Object valueBean)
Execute an HQL query, binding the properties of the given bean to named parameters in the query string. |
|
void |
flush()
Flush all pending saves, updates and deletes to the database. |
|
|
get(Class<T> entityClass,
Serializable id)
Return the persistent instance of the given entity class with the given identifier, or null if not found. |
|
|
get(Class<T> entityClass,
Serializable id,
org.hibernate.LockMode lockMode)
Return the persistent instance of the given entity class with the given identifier, or null if not found. |
|
Object |
get(String entityName,
Serializable id)
Return the persistent instance of the given entity class with the given identifier, or null if not found. |
|
Object |
get(String entityName,
Serializable id,
org.hibernate.LockMode lockMode)
Return the persistent instance of the given entity class with the given identifier, or null if not found. |
|
void |
initialize(Object proxy)
Force initialization of a Hibernate proxy or persistent collection. |
|
Iterator |
iterate(String queryString)
Execute a query for persistent instances. |
|
Iterator |
iterate(String queryString,
Object... values)
Execute a query for persistent instances, binding a number of values to "?" parameters in the query string. |
|
Iterator |
iterate(String queryString,
Object value)
Execute a query for persistent instances, binding one value to a "?" parameter in the query string. |
|
|
load(Class<T> entityClass,
Serializable id)
Return the persistent instance of the given entity class with the given identifier, throwing an exception if not found. |
|
|
load(Class<T> entityClass,
Serializable id,
org.hibernate.LockMode lockMode)
Return the persistent instance of the given entity class with the given identifier, throwing an exception if not found. |
|
void |
load(Object entity,
Serializable id)
Load the persistent instance with the given identifier into the given object, throwing an exception if not found. |
|
Object |
load(String entityName,
Serializable id)
Return the persistent instance of the given entity class with the given identifier, throwing an exception if not found. |
|
Object |
load(String entityName,
Serializable id,
org.hibernate.LockMode lockMode)
Return the persistent instance of the given entity class with the given identifier, throwing an exception if not found. |
|
|
loadAll(Class<T> entityClass)
Return all persistent instances of the given entity class. |
|
void |
lock(Object entity,
org.hibernate.LockMode lockMode)
Obtain the specified lock level upon the given object, implicitly checking whether the corresponding database entry still exists. |
|
void |
lock(String entityName,
Object entity,
org.hibernate.LockMode lockMode)
Obtain the specified lock level upon the given object, implicitly checking whether the corresponding database entry still exists. |
|
|
merge(String entityName,
T entity)
Copy the state of the given object onto the persistent object with the same identifier. |
|
|
merge(T entity)
Copy the state of the given object onto the persistent object with the same identifier. |
|
void |
persist(Object entity)
Persist the given transient instance. |
|
void |
persist(String entityName,
Object entity)
Persist the given transient instance. |
|
void |
refresh(Object entity)
Re-read the state of the given persistent instance. |
|
void |
refresh(Object entity,
org.hibernate.LockMode lockMode)
Re-read the state of the given persistent instance. |
|
void |
replicate(Object entity,
org.hibernate.ReplicationMode replicationMode)
Persist the state of the given detached instance according to the given replication mode, reusing the current identifier value. |
|
void |
replicate(String entityName,
Object entity,
org.hibernate.ReplicationMode replicationMode)
Persist the state of the given detached instance according to the given replication mode, reusing the current identifier value. |
|
Serializable |
save(Object entity)
Persist the given transient instance. |
|
Serializable |
save(String entityName,
Object entity)
Persist the given transient instance. |
|
void |
saveOrUpdate(Object entity)
Save or update the given persistent instance, according to its id (matching the configured "unsaved-value"?). |
|
void |
saveOrUpdate(String entityName,
Object entity)
Save or update the given persistent instance, according to its id (matching the configured "unsaved-value"?). |
|
void |
saveOrUpdateAll(Collection entities)
Deprecated. as of Spring 2.5, in favor of individual saveOrUpdate or merge usage |
|
void |
update(Object entity)
Update the given persistent instance, associating it with the current Hibernate Session . |
|
void |
update(Object entity,
org.hibernate.LockMode lockMode)
Update the given persistent instance, associating it with the current Hibernate Session . |
|
void |
update(String entityName,
Object entity)
Update the given persistent instance, associating it with the current Hibernate Session . |
|
void |
update(String entityName,
Object entity,
org.hibernate.LockMode lockMode)
Update the given persistent instance, associating it with the current Hibernate Session . |
| Method Detail |
|---|
<T> T execute(HibernateCallback<T> action) throws DataAccessException
Session
.
Application exceptions thrown by the action object get propagated to the caller (can only be unchecked). Hibernate exceptions are transformed into appropriate DAO ones. Allows for returning a result object, that is a domain object or a collection of domain objects.
Note: Callback code is not supposed to handle transactions itself!
Use an appropriate transaction manager like
HibernateTransactionManager
. Generally, callback code must not
touch any Session
lifecycle methods, like close,
disconnect, or reconnect, to let the template do its work.
action
- callback object that specifies the Hibernate action
null
DataAccessException
- in case of Hibernate errorsHibernateTransactionManager
,
org.springframework.dao
,
org.springframework.transaction
,
Session
List executeFind(HibernateCallback<?> action) throws DataAccessException
List
.
This is a convenience method for executing Hibernate find calls or queries within an action.
action
- calback object that specifies the Hibernate action
null
DataAccessException
- in case of Hibernate errors<T> T get(Class<T> entityClass, Serializable id) throws DataAccessException
null
if not found.
This method is a thin wrapper around
Session.get(Class, java.io.Serializable)
for convenience.
For an explanation of the exact semantics of this method, please do refer to
the Hibernate API documentation in the first instance.
entityClass
- a persistent classid
- the identifier of the persistent instance
null
if not found
DataAccessException
- in case of Hibernate errorsSession.get(Class, java.io.Serializable)
<T> T get(Class<T> entityClass, Serializable id, org.hibernate.LockMode lockMode) throws DataAccessException
null
if not found.
Obtains the specified lock mode if the instance exists.
This method is a thin wrapper around
Session.get(Class, java.io.Serializable, LockMode)
for convenience.
For an explanation of the exact semantics of this method, please do refer to
the Hibernate API documentation in the first instance.
entityClass
- a persistent classid
- the identifier of the persistent instancelockMode
- the lock mode to obtain
null
if not found
DataAccessException
- in case of Hibernate errorsSession.get(Class, java.io.Serializable, org.hibernate.LockMode)
Object get(String entityName, Serializable id) throws DataAccessException
null
if not found.
This method is a thin wrapper around
Session.get(String, java.io.Serializable)
for convenience.
For an explanation of the exact semantics of this method, please do refer to
the Hibernate API documentation in the first instance.
entityName
- the name of the persistent entityid
- the identifier of the persistent instance
null
if not found
DataAccessException
- in case of Hibernate errorsSession.get(Class, java.io.Serializable)
Object get(String entityName, Serializable id, org.hibernate.LockMode lockMode) throws DataAccessException
null
if not found.
Obtains the specified lock mode if the instance exists.
This method is a thin wrapper around
Session.get(String, java.io.Serializable, LockMode)
for convenience.
For an explanation of the exact semantics of this method, please do refer to
the Hibernate API documentation in the first instance.
entityName
- the name of the persistent entityid
- the identifier of the persistent instancelockMode
- the lock mode to obtain
null
if not found
DataAccessException
- in case of Hibernate errorsSession.get(Class, java.io.Serializable, org.hibernate.LockMode)
<T> T load(Class<T> entityClass, Serializable id) throws DataAccessException
This method is a thin wrapper around
Session.load(Class, java.io.Serializable)
for convenience.
For an explanation of the exact semantics of this method, please do refer to
the Hibernate API documentation in the first instance.
entityClass
- a persistent classid
- the identifier of the persistent instance
ObjectRetrievalFailureException
- if not found
DataAccessException
- in case of Hibernate errorsSession.load(Class, java.io.Serializable)
<T> T load(Class<T> entityClass, Serializable id, org.hibernate.LockMode lockMode) throws DataAccessException
This method is a thin wrapper around
Session.load(Class, java.io.Serializable, LockMode)
for convenience.
For an explanation of the exact semantics of this method, please do refer to
the Hibernate API documentation in the first instance.
entityClass
- a persistent classid
- the identifier of the persistent instancelockMode
- the lock mode to obtain
ObjectRetrievalFailureException
- if not found
DataAccessException
- in case of Hibernate errorsSession.load(Class, java.io.Serializable)
Object load(String entityName, Serializable id) throws DataAccessException
This method is a thin wrapper around
Session.load(String, java.io.Serializable)
for convenience.
For an explanation of the exact semantics of this method, please do refer to
the Hibernate API documentation in the first instance.
entityName
- the name of the persistent entityid
- the identifier of the persistent instance
ObjectRetrievalFailureException
- if not found
DataAccessException
- in case of Hibernate errorsSession.load(Class, java.io.Serializable)
Object load(String entityName, Serializable id, org.hibernate.LockMode lockMode) throws DataAccessException
Obtains the specified lock mode if the instance exists.
This method is a thin wrapper around
Session.load(String, java.io.Serializable, LockMode)
for convenience.
For an explanation of the exact semantics of this method, please do refer to
the Hibernate API documentation in the first instance.
entityName
- the name of the persistent entityid
- the identifier of the persistent instancelockMode
- the lock mode to obtain
ObjectRetrievalFailureException
- if not found
DataAccessException
- in case of Hibernate errorsSession.load(Class, java.io.Serializable)
<T> List<T> loadAll(Class<T> entityClass) throws DataAccessException
entityClass
- a persistent class
List
containing 0 or more persistent instances
DataAccessException
- if there is a Hibernate errorSession.createCriteria(java.lang.Class)
void load(Object entity, Serializable id) throws DataAccessException
This method is a thin wrapper around
Session.load(Object, java.io.Serializable)
for convenience.
For an explanation of the exact semantics of this method, please do refer to
the Hibernate API documentation in the first instance.
entity
- the object (of the target class) to load intoid
- the identifier of the persistent instance
ObjectRetrievalFailureException
- if not found
DataAccessException
- in case of Hibernate errorsSession.load(Object, java.io.Serializable)
void refresh(Object entity) throws DataAccessException
entity
- the persistent instance to re-read
DataAccessException
- in case of Hibernate errorsSession.refresh(Object)
void refresh(Object entity, org.hibernate.LockMode lockMode) throws DataAccessException
entity
- the persistent instance to re-readlockMode
- the lock mode to obtain
DataAccessException
- in case of Hibernate errorsSession.refresh(Object, org.hibernate.LockMode)
boolean contains(Object entity) throws DataAccessException
entity
- the persistence instance to check
DataAccessException
- if there is a Hibernate errorSession.contains(java.lang.Object)
void evict(Object entity) throws DataAccessException
Session
cache.
entity
- the persistent instance to evict
DataAccessException
- in case of Hibernate errorsSession.evict(java.lang.Object)
void initialize(Object proxy) throws DataAccessException
proxy
- a proxy for a persistent object or a persistent collection
DataAccessException
- if we can't initialize the proxy, for example
because it is not associated with an active SessionHibernate.initialize(java.lang.Object)
org.hibernate.Filter enableFilter(String filterName) throws IllegalStateException
Filter
for the given filter name.
The returned Filter
instance can be used to set filter parameters.
filterName
- the name of the filter
Filter
(either already
enabled or enabled on the fly by this operation)
IllegalStateException
- if we are not running within a
transactional Session (in which case this operation does not make sense)void lock(Object entity, org.hibernate.LockMode lockMode) throws DataAccessException
entity
- the persistent instance to locklockMode
- the lock mode to obtain
ObjectOptimisticLockingFailureException
- if not found
DataAccessException
- in case of Hibernate errorsSession.lock(Object, org.hibernate.LockMode)
void lock(String entityName, Object entity, org.hibernate.LockMode lockMode) throws DataAccessException
entityName
- the name of the persistent entityentity
- the persistent instance to locklockMode
- the lock mode to obtain
ObjectOptimisticLockingFailureException
- if not found
DataAccessException
- in case of Hibernate errorsSession.lock(String, Object, org.hibernate.LockMode)
Serializable save(Object entity) throws DataAccessException
entity
- the transient instance to persist
DataAccessException
- in case of Hibernate errorsSession.save(Object)
Serializable save(String entityName, Object entity) throws DataAccessException
entityName
- the name of the persistent entityentity
- the transient instance to persist
DataAccessException
- in case of Hibernate errorsSession.save(String, Object)
void update(Object entity) throws DataAccessException
Session
.
entity
- the persistent instance to update
DataAccessException
- in case of Hibernate errorsSession.update(Object)
void update(Object entity, org.hibernate.LockMode lockMode) throws DataAccessException
Session
.
Obtains the specified lock mode if the instance exists, implicitly checking whether the corresponding database entry still exists.
entity
- the persistent instance to updatelockMode
- the lock mode to obtain
ObjectOptimisticLockingFailureException
- if not found
DataAccessException
- in case of Hibernate errorsSession.update(Object)
void update(String entityName, Object entity) throws DataAccessException
Session
.
entityName
- the name of the persistent entityentity
- the persistent instance to update
DataAccessException
- in case of Hibernate errorsSession.update(String, Object)
void update(String entityName, Object entity, org.hibernate.LockMode lockMode) throws DataAccessException
Session
.
Obtains the specified lock mode if the instance exists, implicitly checking whether the corresponding database entry still exists.
entityName
- the name of the persistent entityentity
- the persistent instance to updatelockMode
- the lock mode to obtain
ObjectOptimisticLockingFailureException
- if not found
DataAccessException
- in case of Hibernate errorsSession.update(String, Object)
void saveOrUpdate(Object entity) throws DataAccessException
Session
.
entity
- the persistent instance to save or update
(to be associated with the Hibernate Session
)
DataAccessException
- in case of Hibernate errorsSession.saveOrUpdate(Object)
void saveOrUpdate(String entityName, Object entity) throws DataAccessException
Session
.
entityName
- the name of the persistent entityentity
- the persistent instance to save or update
(to be associated with the Hibernate Session
)
DataAccessException
- in case of Hibernate errorsSession.saveOrUpdate(String, Object)
@Deprecated void saveOrUpdateAll(Collection entities) throws DataAccessException
saveOrUpdate
or merge
usage
Session
.
entities
- the persistent instances to save or update
(to be associated with the Hibernate Session
)
DataAccessException
- in case of Hibernate errorsvoid replicate(Object entity, org.hibernate.ReplicationMode replicationMode) throws DataAccessException
entity
- the persistent object to replicatereplicationMode
- the Hibernate ReplicationMode
DataAccessException
- in case of Hibernate errorsSession.replicate(Object, org.hibernate.ReplicationMode)
void replicate(String entityName, Object entity, org.hibernate.ReplicationMode replicationMode) throws DataAccessException
entityName
- the name of the persistent entityentity
- the persistent object to replicatereplicationMode
- the Hibernate ReplicationMode
DataAccessException
- in case of Hibernate errorsSession.replicate(String, Object, org.hibernate.ReplicationMode)
void persist(Object entity) throws DataAccessException
Similar to save
, associating the given object
with the current Hibernate Session
.
entity
- the persistent instance to persist
DataAccessException
- in case of Hibernate errorsSession.persist(Object)
,
save(java.lang.Object)
void persist(String entityName, Object entity) throws DataAccessException
Similar to save
, associating the given object
with the current Hibernate Session
.
entityName
- the name of the persistent entityentity
- the persistent instance to persist
DataAccessException
- in case of Hibernate errorsSession.persist(String, Object)
,
save(java.lang.Object)
<T> T merge(T entity) throws DataAccessException
Similar to saveOrUpdate
, but never associates the given
object with the current Hibernate Session. In case of a new entity,
the state will be copied over as well.
Note that merge
will not update the identifiers
in the passed-in object graph (in contrast to TopLink)! Consider
registering Spring's IdTransferringMergeEventListener
if
you would like to have newly assigned ids transferred to the original
object graph too.
entity
- the object to merge with the corresponding persistence instance
DataAccessException
- in case of Hibernate errorsSession.merge(Object)
,
saveOrUpdate(java.lang.Object)
,
IdTransferringMergeEventListener
<T> T merge(String entityName, T entity) throws DataAccessException
Similar to saveOrUpdate
, but never associates the given
object with the current Hibernate Session
. In
the case of a new entity, the state will be copied over as well.
Note that merge
will not update the identifiers
in the passed-in object graph (in contrast to TopLink)! Consider
registering Spring's IdTransferringMergeEventListener
if you would like to have newly assigned ids transferred to the
original object graph too.
entityName
- the name of the persistent entityentity
- the object to merge with the corresponding persistence instance
DataAccessException
- in case of Hibernate errorsSession.merge(String, Object)
,
saveOrUpdate(java.lang.Object)
void delete(Object entity) throws DataAccessException
entity
- the persistent instance to delete
DataAccessException
- in case of Hibernate errorsSession.delete(Object)
void delete(Object entity, org.hibernate.LockMode lockMode) throws DataAccessException
Obtains the specified lock mode if the instance exists, implicitly checking whether the corresponding database entry still exists.
entity
- the persistent instance to deletelockMode
- the lock mode to obtain
ObjectOptimisticLockingFailureException
- if not found
DataAccessException
- in case of Hibernate errorsSession.delete(Object)
void delete(String entityName, Object entity) throws DataAccessException
entityName
- the name of the persistent entityentity
- the persistent instance to delete
DataAccessException
- in case of Hibernate errorsSession.delete(Object)
void delete(String entityName, Object entity, org.hibernate.LockMode lockMode) throws DataAccessException
Obtains the specified lock mode if the instance exists, implicitly checking whether the corresponding database entry still exists.
entityName
- the name of the persistent entityentity
- the persistent instance to deletelockMode
- the lock mode to obtain
ObjectOptimisticLockingFailureException
- if not found
DataAccessException
- in case of Hibernate errorsSession.delete(Object)
void deleteAll(Collection entities) throws DataAccessException
This can be combined with any of the find methods to delete by query in two lines of code.
entities
- the persistent instances to delete
DataAccessException
- in case of Hibernate errorsSession.delete(Object)
void flush() throws DataAccessException
Only invoke this for selective eager flushing, for example when JDBC code needs to see certain changes within the same transaction. Else, it is preferable to rely on auto-flushing at transaction completion.
DataAccessException
- in case of Hibernate errorsSession.flush()
void clear() throws DataAccessException
Session
cache, and
cancel all pending saves, updates and deletes.
DataAccessException
- in case of Hibernate errorsSession.clear()
List find(String queryString) throws DataAccessException
queryString
- a query expressed in Hibernate's query language
List
containing the results of the query execution
DataAccessException
- in case of Hibernate errorsSession.createQuery(java.lang.String)
List find(String queryString, Object value) throws DataAccessException
queryString
- a query expressed in Hibernate's query languagevalue
- the value of the parameter
List
containing the results of the query execution
DataAccessException
- in case of Hibernate errorsSession.createQuery(java.lang.String)
List find(String queryString, Object... values) throws DataAccessException
queryString
- a query expressed in Hibernate's query languagevalues
- the values of the parameters
List
containing the results of the query execution
DataAccessException
- in case of Hibernate errorsSession.createQuery(java.lang.String)
List findByNamedParam(String queryString, String paramName, Object value) throws DataAccessException
queryString
- a query expressed in Hibernate's query languageparamName
- the name of the parametervalue
- the value of the parameter
List
containing the results of the query execution
DataAccessException
- in case of Hibernate errorsSession.getNamedQuery(String)
List findByNamedParam(String queryString, String[] paramNames, Object[] values) throws DataAccessException
queryString
- a query expressed in Hibernate's query languageparamNames
- the names of the parametersvalues
- the values of the parameters
List
containing the results of the query execution
DataAccessException
- in case of Hibernate errorsSession.getNamedQuery(String)
List findByValueBean(String queryString, Object valueBean) throws DataAccessException
queryString
- a query expressed in Hibernate's query languagevalueBean
- the values of the parameters
List
containing the results of the query execution
DataAccessException
- in case of Hibernate errorsQuery.setProperties(java.lang.Object)
,
Session.createQuery(java.lang.String)
List findByNamedQuery(String queryName) throws DataAccessException
A named query is defined in a Hibernate mapping file.
queryName
- the name of a Hibernate query in a mapping file
List
containing the results of the query execution
DataAccessException
- in case of Hibernate errorsSession.getNamedQuery(String)
List findByNamedQuery(String queryName, Object value) throws DataAccessException
A named query is defined in a Hibernate mapping file.
queryName
- the name of a Hibernate query in a mapping filevalue
- the value of the parameter
List
containing the results of the query execution
DataAccessException
- in case of Hibernate errorsSession.getNamedQuery(String)
List findByNamedQuery(String queryName, Object... values) throws DataAccessException
A named query is defined in a Hibernate mapping file.
queryName
- the name of a Hibernate query in a mapping filevalues
- the values of the parameters
List
containing the results of the query execution
DataAccessException
- in case of Hibernate errorsSession.getNamedQuery(String)
List findByNamedQueryAndNamedParam(String queryName, String paramName, Object value) throws DataAccessException
A named query is defined in a Hibernate mapping file.
queryName
- the name of a Hibernate query in a mapping fileparamName
- the name of parametervalue
- the value of the parameter
List
containing the results of the query execution
DataAccessException
- in case of Hibernate errorsSession.getNamedQuery(String)
List findByNamedQueryAndNamedParam(String queryName, String[] paramNames, Object[] values) throws DataAccessException
A named query is defined in a Hibernate mapping file.
queryName
- the name of a Hibernate query in a mapping fileparamNames
- the names of the parametersvalues
- the values of the parameters
List
containing the results of the query execution
DataAccessException
- in case of Hibernate errorsSession.getNamedQuery(String)
List findByNamedQueryAndValueBean(String queryName, Object valueBean) throws DataAccessException
A named query is defined in a Hibernate mapping file.
queryName
- the name of a Hibernate query in a mapping filevalueBean
- the values of the parameters
List
containing the results of the query execution
DataAccessException
- in case of Hibernate errorsQuery.setProperties(java.lang.Object)
,
Session.getNamedQuery(String)
List findByCriteria(org.hibernate.criterion.DetachedCriteria criteria) throws DataAccessException
criteria
- the detached Hibernate criteria object.
Note: Do not reuse criteria objects! They need to recreated per execution,
due to the suboptimal design of Hibernate's criteria facility.
List
containing 0 or more persistent instances
DataAccessException
- in case of Hibernate errorsDetachedCriteria.getExecutableCriteria(org.hibernate.Session)
List findByCriteria(org.hibernate.criterion.DetachedCriteria criteria, int firstResult, int maxResults) throws DataAccessException
criteria
- the detached Hibernate criteria object.
Note: Do not reuse criteria objects! They need to recreated per execution,
due to the suboptimal design of Hibernate's criteria facility.firstResult
- the index of the first result object to be retrieved
(numbered from 0)maxResults
- the maximum number of result objects to retrieve
(or <=0 for no limit)
List
containing 0 or more persistent instances
DataAccessException
- in case of Hibernate errorsDetachedCriteria.getExecutableCriteria(org.hibernate.Session)
,
Criteria.setFirstResult(int)
,
Criteria.setMaxResults(int)
List findByExample(Object exampleEntity) throws DataAccessException
exampleEntity
- an instance of the desired entity,
serving as example for "query-by-example"
List
containing 0 or more persistent instances
DataAccessException
- in case of Hibernate errorsExample.create(Object)
List findByExample(String entityName, Object exampleEntity) throws DataAccessException
entityName
- the name of the persistent entityexampleEntity
- an instance of the desired entity,
serving as example for "query-by-example"
List
containing 0 or more persistent instances
DataAccessException
- in case of Hibernate errorsExample.create(Object)
List findByExample(Object exampleEntity, int firstResult, int maxResults) throws DataAccessException
exampleEntity
- an instance of the desired entity,
serving as example for "query-by-example"firstResult
- the index of the first result object to be retrieved
(numbered from 0)maxResults
- the maximum number of result objects to retrieve
(or <=0 for no limit)
List
containing 0 or more persistent instances
DataAccessException
- in case of Hibernate errorsExample.create(Object)
,
Criteria.setFirstResult(int)
,
Criteria.setMaxResults(int)
List findByExample(String entityName, Object exampleEntity, int firstResult, int maxResults) throws DataAccessException
entityName
- the name of the persistent entityexampleEntity
- an instance of the desired entity,
serving as example for "query-by-example"firstResult
- the index of the first result object to be retrieved
(numbered from 0)maxResults
- the maximum number of result objects to retrieve
(or <=0 for no limit)
List
containing 0 or more persistent instances
DataAccessException
- in case of Hibernate errorsExample.create(Object)
,
Criteria.setFirstResult(int)
,
Criteria.setMaxResults(int)
Iterator iterate(String queryString) throws DataAccessException
Returns the results as an Iterator
. Entities returned are
initialized on demand. See the Hibernate API documentation for details.
queryString
- a query expressed in Hibernate's query language
Iterator
containing 0 or more persistent instances
DataAccessException
- in case of Hibernate errorsSession.createQuery(java.lang.String)
,
Query.iterate()
Iterator iterate(String queryString, Object value) throws DataAccessException
Returns the results as an Iterator
. Entities returned are
initialized on demand. See the Hibernate API documentation for details.
queryString
- a query expressed in Hibernate's query languagevalue
- the value of the parameter
Iterator
containing 0 or more persistent instances
DataAccessException
- in case of Hibernate errorsSession.createQuery(java.lang.String)
,
Query.iterate()
Iterator iterate(String queryString, Object... values) throws DataAccessException
Returns the results as an Iterator
. Entities returned are
initialized on demand. See the Hibernate API documentation for details.
queryString
- a query expressed in Hibernate's query languagevalues
- the values of the parameters
Iterator
containing 0 or more persistent instances
DataAccessException
- in case of Hibernate errorsSession.createQuery(java.lang.String)
,
Query.iterate()
void closeIterator(Iterator it) throws DataAccessException
Iterator
created by any of the various
iterate(..)
operations, instead of waiting until the
session is closed or disconnected.
it
- the Iterator
to close
DataAccessException
- if the Iterator
could not be closedHibernate.close(java.util.Iterator)
int bulkUpdate(String queryString) throws DataAccessException
queryString
- an update/delete query expressed in Hibernate's query language
DataAccessException
- in case of Hibernate errorsSession.createQuery(java.lang.String)
,
Query.executeUpdate()
int bulkUpdate(String queryString, Object value) throws DataAccessException
queryString
- an update/delete query expressed in Hibernate's query languagevalue
- the value of the parameter
DataAccessException
- in case of Hibernate errorsSession.createQuery(java.lang.String)
,
Query.executeUpdate()
int bulkUpdate(String queryString, Object... values) throws DataAccessException
queryString
- an update/delete query expressed in Hibernate's query languagevalues
- the values of the parameters
DataAccessException
- in case of Hibernate errorsSession.createQuery(java.lang.String)
,
Query.executeUpdate()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


RCBasic_Android_Interface$( arg$ )
Passes arg$ to the rcbasic_android_interface() method in the java code for your android app. The java method returns a string.
Example:
Print
"Java method returned "
;
RCBasic_Android_Interface
(
"Hello World"
)


Halsey Stuns In Low-Cut Floral Marc Jacobs Dress At The 2019 American Music Awards
November 25, 2019
Halsey Stuns In Low-Cut Floral Marc Jacobs Dress At The 2019 American Music Awards
Halsey was one of many high profile names that turned up to the American Music Awards last night in Los Angeles, California, at the Microsoft Theater. The “New Americana” songstress showed up in a floral Marc Jacobs garment, and it didn’t go unnoticed.
On Instagram, Halsey shared numerous photos to her Instagram account from the night. In the first shot, she is walking down the stairs in her eye-catching dress. She is looking up at the person who is taking a photo of her while people are holding onto the train behind her. The “Nightmare” hitmaker is smiling and placing her hands onto the rails. The low-cut outfit is short, multicolored and has long sleeves. Halsey displays her tattoos on her leg and shoulder and leaves her chest bare with no accessories.
In the second photo, Halsey appears backstage while getting ready for the red carpet. She is looking down as her glam squad is helping her out.
In the third and final shot, she is posing on the carpet with her hands on her hip. She is rocking a big circular earring while fiercely looking into the photographers’ camera lens.
For her caption, she credits Marc Jacobs for the dress and her “glam team” Zoe Costello and Martin-Christopher Harper for helping her out.
In the span of six hours, her post racked up more than 412,000 likes and over 1,400 comments, proving to be popular with her 17 million followers.
“Thank you for being an outlet to express one selves and never having to be scared to just do it. I love you,” one user wrote.
“I am so proud of you, you make me feel so bold thank you for always speaking your truth I love you forever,” another shared.
“You were amazing tonight with graveyard’s performance, your speech and everything else. I’m so incredibly proud,” a third fan remarked.
“YES BABY YOU KILLED THIS LOOK,” a fourth follower commented passionately in capital letters.
On the night, Halsey picked up an award for Favorite Song — Pop/Rock for her chart-topping single, “Without Me.”
Loading...
In her speech, she called out award shows for not always being what they seem but praised the AMAs for being the world’s largest fan-voted show.
She joined Taylor Swift on stage for a performance to honor the “We Are Never Getting Back Together” singer for winning Artist of the Decade.
Halsey is no stranger to performing and winning trophies at big award ceremonies as she recently performed her latest single, “Graveyard,” and won Best Pop at the MTV Europe Music Awards earlier this month.


1) Print all no between -10 and 19
2) print all no. between 10 and 40
3) print all odd no. between 300 and 333
Print all no. divisible by 5 and 3 between 5 and 50


Defining and Enabling Topic Free Space Warnings for Topics
Checking this box will tell Moderate to display a warning message box whenever it updates the topic size for this topic if the topic is fuller than the threshold percentage figure you have typed into the edit box.
Appropriate values for the warning threshold depend on how busy a topic is and on how frequently you update your offline copy of its size.
Note that the global Topic size warnings check box must be set as well for warnings to appear.


{% extends "layout.html" %} {% block title %}Utility Knife{% endblock %} {% block content %}
Quickly find where the largest files are located in your Dropbox folder.
Login to Dropbox


I am a passionate developer who loves to create beautifull and creative applications for mobile and web.
My debut start from Appsimity Solutions, and its been a good challening and learning start.
Description:- Breaking the ice was a dating app where you can talk to nearby peoples within 50 meters of the radius . You can see the pings of the nearby user and their profile pic is there inside the pings and when you click on that ping it will open the profile of that person and you can send requests to him/her and chat. The app was built in react native for mobile platform and for backend its apis are made in core php
Role:- I was responsible for making the ios and android app breaking the ice, and work on the mobile development using react native and this is my first project.
Description :- Luggage Teleport is the startup company in U.S.A which provides services for hotel to hotel, the airport to airport, the airport to hotel,hotel to airport luggage .
Role:- I was the lead developer in this app who build customer app and driver app ,I also worked on backend of driver app in node.js for apis building of signup step ,their main code is on aws ec2 so i set up their backend code over there and for testing purposes and development i use heroku platform.
I made most of its UI by using react native components ,native base ,and by some third parties apis. You can check out the app link over playstore that i made Luggport Customer Luggport Driver Luggport IOS APP Luggport Driver Ios
Description : Uttar Pradesh Power Corporation Limited is the company responsible for electricity transmission and distribution within the Indian state of Uttar Pradesh. The incumbent chairman is Shri Alok Kumar. The project was a tie up between Appsimity and Larsen and Tourbo Infotech
Role: We were two mobile developers who work on this application, On a daily basis, we had client meetings and we coordinate with LTI on project progression. I implemented the graphs in this application and handle this project in its last stage. This app is live on Playstore now UPPCL having more than 100000+ downloads.
Role: I set up the application over aws beanstalk and connect it with the amazon rds
Description: This project was basically like invitations send to all the members using a QR code scanner, when a user got an invitation link then he scans the QR code using the link that he was sent to and then after scanning he need to submit the code and confirm his table booking.
Role: Handle both backend and frontend
Description: Gfunl is a platform to create funnels,ecommerce, affiliate program and course builder. Gfunl is a very vast project and still in progress
Role: I worked as a lead in this Project and worked on the ecommerce apis and web page builder apis and frontend.
Description : KulturBarometer is a rating app mainly used to rate employees.
Role: Worked on apis and mobile app
Percentage: 75%


Encounters
Search
City
Country
Date
Likelihood
Comment
Confirmations
Encounter not confirmed
Encounters


Bloc Time
time to get things done!
Add Task
Click Here to See Tasks
×
Task History
a list of todos
{{task.name}}


Bits Online
Home
(current)
Stock ROM
Flash Tools
Drivers
Other Tools
Dealers porstal
Select Your Device Chipset or Model


Specifies if the selection can be moved (default value is true).
Specifies if the selection can be resized (default value is true).
Specifies if the user can make a new selection (default value is true).
Specifies the grow proportion of the selection (default value is 0).
URL path from the background image from the selection (default is "scripts/libs/imageCrop/outline.gif").
The minimum area size to register a new selection (default value is [0, 0]).
The minimum size to make a new selection (default value is [0, 0]).
The maximum size to make a new selection (default value is [0, 0]).
The outline opacity (default value is 0.5).
The overlay background color (default is "#fff").
The overlay opacity (default value is 0.5).
The selection position (default value is [0, 0]).
The selection width (default value is 0).
The selection height (default value is 0).


You should see lots of different Unicode letters below. Last rows should also display mostly proper symbols.


These are not just meant ot be read, they are meant to be acted upon. Find one you like, ponder it, do it, then click next.


Source code for textacy.preprocessing.remove
"""
Remove
------
Remove aspects of raw text that may be unwanted for certain use cases.
"""
import re
import unicodedata
from typing import Optional
from .resources import _get_punct_translation_table
[docs]def remove_accents(text: str, *, fast: bool = False) -> str:
"""
Remove accents from any accented unicode characters in ``text``, either by
replacing them with ASCII equivalents or removing them entirely.
Args:
text
fast: If False, accents are removed from any unicode symbol
with a direct ASCII equivalent; if True, accented chars
for all unicode symbols are removed, regardless.
.. note:: ``fast=True`` can be significantly faster than ``fast=False``,
but its transformation of ``text`` is less "safe" and more likely
to result in changes of meaning, spelling errors, etc.
Returns:
str
Raises:
ValueError: If ``method`` is not in {"unicode", "ascii"}.
See Also:
For a more powerful (but slower) alternative, check out ``unidecode``:
https://github.com/avian2/unidecode
"""
if fast is False:
return "".join(
char
for char in unicodedata.normalize("NFKD", text)
if not unicodedata.combining(char)
)
else:
return (
unicodedata.normalize("NFKD", text)
.encode("ascii", errors="ignore")
.decode("ascii")
)
[docs]def remove_punctuation(text: str, *, marks: Optional[str] = None) -> str:
"""
Remove punctuation from ``text`` by replacing all instances of ``marks``
with whitespace.
Args:
text
marks: Remove only those punctuation marks specified here.
For example, ",;:" removes commas, semi-colons, and colons.
If None, *all* unicode punctuation marks are removed.
Returns:
str
Note:
When ``marks=None``, Python's built-in :meth:`str.translate()` is
used to remove punctuation; otherwise, a regular expression is used.
The former's performance is about 5-10x faster.
"""
if marks:
return re.sub("[{}]+".format(re.escape(marks)), " ", text, flags=re.UNICODE)
else:
return text.translate(_get_punct_translation_table())


Class that will encode a jpeg in the background and fire an event when it's done.
protected var _encoder:JPGEncoder
protected var _timer:Timer
protected var _timeSlice:int
public function BackgroundJPGEncoder(image:BitmapData, quality:Number = 50, timeSlice:int = 100)
Construct a jpeg encoder. Once started, the encoder will encode a jpeg over the course
of multiple frames, generating an event to deliver the finished jpeg when it is done.
Parameters
| image:BitmapData — The bitmap to encode.
|
| |
| quality:Number (default = 50 ) — The jpeg quality from 1 to 100 which determines the compression level.
|
| |
| timeSlice:int (default = 100 ) — The number of milliseconds of processing to do per frame.
|
public function cancel():void
Cancel encoding and discard any intermediate results.
public function start():void
Start encoding
protected function timerHandler(event:TimerEvent):void
Parameters
Event object type: com.threerings.util.ValueEvent
Dispatched when the jpeg is complete.
The 'value' property will contain the received data.
protected const PIXEL_GRANULARITY:int = 100
Copyright © 2007-2009 Three Rings Design, Inc.


US directors: older and staler
Average director age and tenure length
US
Tenure length
8.0
Canada
South Africa
7.5
Spain
Ireland
7.0
France
Italy
Switzerland
6.5
Germany
6.0
Sweden
UK
Denmark
5.5
5.0
Brazil
Norway
Netherlands
Finland
4.5
Russia
Age
4.0
52
54
56
58
60
62
Source: FT analysis of ISS Analytics data


voice-recognition.js
Home
Voice analysis & comparison
Voice recognition
Input
Microphone
Input file
Input file
Recognize
Models
Default models
Custom models file
Custom models data
Use
default models file
.
Models file
Models data
Result
Deviation rate :
Standard deviation :
Error rate :
Options
Features
Log messages in console
Show FFT
Voice recording
Delay for speaking
seconds
Voice retrieving
Frequencies IDs
Voice delimiting
Tolerance
Precision
Voice shifting
Enable voice shifting when comparing
Max. point shifting
Tolerated ratio


Each video is between 15-30 seconds in length. While watching these videos we want you to document all the things you thought the drawing was going to turn into. Once you are certain of your answer, you will finish watching the rest of the video. After, you will answer some brief questions about the video and your experience.
It is important that you try to identify the image being drawn as quickly as you can. You must have at least one guess before the video ends to receive credit for that trial.


We have tailored engagement models to suit your size and needs.
We can provide tailored advice and guidance to you and your team whether you are starting a new project or looking to improve on an existing project. Our support is available for short engagements or we can embed our expert Craftsmen in your team for longer periods of time to help your developers improve or master skills.
We are skilled professionals - we have honed our skills through years of experience and practice.
Scrum, Kanban
Delivery Pipeline, DevOps
TDD, Pair Programming, CI
Enterprise Architecture, EPOS Systems
Web Applications, Web Services, CMS
Android, IOS
After a successful launch you now have a significant customer base, however new features are becoming increasingly slower to develop. Possibly, stability is also an issue—especially immediately after new releases.
We will provide an initial assessment and embed craftsmen into your team to steadily increase the quality and flexibility of the system(s) so that your software can evolve at the same rate as your business.
You have a great product in the inception phase and are looking for a CTO to help you develop, as well as drive, the future IT strategy of you business.
We will allow you to delay the hiring of the CTO by providing advice and consultancy on hiring, technology choices and development practices. You can invest your initial capital on ‘makers’ who are actively developing the product under our guidance. We will also help hire the CTO at the right time.
Your company has seen exceptional growth and with that the size of your codebase has also grown. It is getting to a point where the complexity has effectively halted change.
We will help you create an improvements roadmap that will focus on improving quality and removing barriers (process, technological and cultural) to change. We realise that startup have limited access to funds. Hence we’ll provide competitive rates, sparingly using our senior craftsmen and by providing embedded craftsman who are actively mentored by the senior craftsmen from Codurance.
You possibly have an in-house development team who do not have the capacity to build all the features in time for your business needs.
We will provide craftsmen who will work with your team to produce software with high quality and in time to suite the needs of your business.
You have a brand new project or a well defined piece of software that you need to outsource.
We will provide a team of craftsmen to deliver an on-going or fixed scope piece of work. Ideally a team would be composed of 2 to 4 of our craftsmen and a Product Owner from your company. We will manage the day-to-day running of the team and can run the project on our own premises if required.
Your teams have a mountain of technical debt. Your builds take hours and test cycles take days if not weeks. You release into production a handful of times in a year and every release brings a number of defects.
We will embed a senior craftsman who will help your teams improve their development processes by continuously training and mentoring them in XP practices. The craftsman will also help them achieve measurable goals in a well-defined improvements programme.


Goodbye
Signed out successfully.
To ensure the next login from this computer prompts for a password (recommended on shared computers), visit
Persona home
and click 'sign out' in the upper-right corner.


{% extends "base.html" %} {% load staticfiles i18n compress%} {% block content %}
|
More people die from poor quality water annually than from all forms of violence, including war. |
| |
|
As water quality declines, more than 50% of freshwater fish species are at risk of extinction. |
| |
|
Food and agriculture are the largest consumers of water, requiring one hundred times more than we use for personal needs. |
| |
|
Water is in heart of physical, mental & emotional health. |


Over the years emoncms has stored data in different ways starting with mysql then a timeseries database called timestore then phptimestore. Since February 2014 emoncms has used 3 feed engines called:
phpfiwa: php fixed interval with averaging
phpfina: php fixed interval no averaging
phptimeseries. php variable interval (no averaging)
These 3 feed engines have now been stable for almost a year, they provide a number of benefits both over the original mysql feed engine and timestore/phptimestore. If your interested in learning more about timeseries engine development in emoncms you may be interested in reading more about it here: https://github.com/openenergymonitor/documentation/tree/master/BuildingB...
With these 3 engines stable Id like to depreciate the older engines so that I can focus new developments like the new get data method that is used in the application specific dashboards on the new engines. Ensuring that all engines maintain the same api and provide the same output adds a lot of extra development work.
Im aware that there are many systems out there running these older feed engines partly because there isnt any documentation at the moment on how to upgrade existing data to the newer engines so Id like to change that and open this thread to help people upgrade!
Upgrading timestore/phptimestore to phpfina
Both timestore and phptimestore store the data in layer 0 in the same format as phpfina does. So this conversion is just a simple move and file rename of the main timestore/phptimestore data file, then the writing of the phpfina format meta data file and updating of emoncms to tell it that the feed engine has changed for that feed. There's already a script to do this in the emoncms/usefulscripts repository on github and this is the script I used on emoncms.org to upgrade the feeds there. I've updated it a bit today to put the config all in the same place and add a couple of checks.
Before starting you will want to note the location where emoncms is installed on your system (usually /var/www/emoncms on linux) and the location of the timestore data folder (usually (/var/lib/timestore) and its probably wise to do a backup following the backing up a full emoncms installation documentation here: https://github.com/emoncms/emoncms/blob/master/docs/Backup.md
1) Start by checking that you have created the phpfina feed directory and set the correct permissions:
sudo mkdir /var/lib/phpfina
sudo chown www-data:root /var/lib/phpfina
2) Then download the "usefulscripts" folder:
git clone https://github.com/emoncms/usefulscripts.git
or download zip: https://github.com/emoncms/usefulscripts/archive/master.zip
3) Navigate to the "convertdata" directory: cd convertdata
4) Open to edit the script called: phptimestore_to_phpfina_mv.php
5) check that line 5 corresponds to your emoncms installation location, line 6 corresponds to your timestore folder location and 7 to your phpfina folder location.
6) run the script from the command line with:
sudo php phptimestore_to_phpfina_mv.php
That should now run through and convert the timestore/phptimestore feeds to phpfina.
7) You may need to check that your emoncms/settings.php file has the feed engine entry for phpfina. If its an old settings file it may be easiest to start by creating a new settings.php file from default.settings.php
I will detail a method for converting mysql timeseries feeds to phptimeseries feeds next.
Re: Upgrading mysql, timestore, phptimestore feed engines to phpfina and phptimeseries
Hi Trystan, I think this is a good move, but often the HowTo's assume a level of knowledge that simply the end user does not have. I'm not without knowledge completely here so I'll have a go at the weekend and post questions as I go along.
First question is, do I upgrade emoncms first before running the above? If so does it matter what version I am on? If so how do I find out the version? :)
Re: Upgrading mysql, timestore, phptimestore feed engines to phpfina and phptimeseries
Hi Trystan, OK ran that on a fresh install of 8.4 with database previously converted / updated. The question is - so what? Does emoncms now update all the different engines? I feel I am missing something :)
Re: Upgrading mysql, timestore, phptimestore feed engines to phpfina and phptimeseries
Ok I've goosed something as all the feeds have gone :(
Re: Upgrading mysql, timestore, phptimestore feed engines to phpfina and phptimeseries
What about emoncms.org feeds ? Tnx
Re: Upgrading mysql, timestore, phptimestore feed engines to phpfina and phptimeseries
Ok solved (sleep helps!) When I went into the logs it was clear that emoncms could not open the new files. Once I had changed the ownership of all the files in the phpfina folder everything came back up again.
Re: Upgrading mysql, timestore, phptimestore feed engines to phpfina and phptimeseries
Hi, I just run emoncms locally.
Re: Upgrading mysql, timestore, phptimestore feed engines to phpfina and phptimeseries
The latest version of emoncms v8.5 no longer contains the timestore, phptimestore and mysqltimeseries feed engines focusing on phpfina, phpfiwa and phptimeseries. (mysqltimeseries is still supported in emoncms v8.5.0 XT maintained by chaveiro for anyone keen to use mysql)
If anyone wants to try upgrading to emoncms v8.5 from an older installation using either timestore or phptimestore Id be happy to help through the process described above.
If there is enough interest I could try putting the steps above together into a script.
Re: Upgrading mysql, timestore, phptimestore feed engines to phpfina and phptimeseries
There's also a new script in the usefulscripts repository created 5 days ago thanks to arjenhiemstra for converting mysql to phptimeseries.
from arjenhiemstra:
I had to migrate several users from old SQL feeds to new PHPTimeSeries feeds to make the upgrade to emoncms v8.5 possible, preferably keeping to same feedid.
I have created this script that will do just that
it will:
1. Get list of SQL feeds
2. Create PHPTimeSeris feeds (with same feedid as current) and add all current data
3. (create CSV backup if requested)
4. Update SQL database to new engine
5. Feed the current feedvalue into SQL db
6. chown the created files to the specified uid and gid
This script can be ran with:
sudo php sql_to_phptimeseries_mv.php
I'd recommend backing up before running as always
Re: Upgrading mysql, timestore, phptimestore feed engines to phpfina and phptimeseries
Great work! It would be helpful (for the bit less tech savvy people) to indicate a step by step procedure on how to do this. For example: I do not have SSH/Telnet access to my hosting provider (it is a shared hosting provider). Another q: to which folder should I upload the "usefulscripts" folder?
Re: Upgrading mysql, timestore, phptimestore feed engines to phpfina and phptimeseries
thanks @fversteegen I will bear that in mind, I think I have an idea that could work for systems without SSH, Il give it a go and report back
Re: Upgrading mysql, timestore, phptimestore feed engines to phpfina and phptimeseries
Ok, I've created a simple webpage based migration tool that can be used on shared hosting or any other server to migrate from timestore and mysql to phpfina and phptimeseries. I've tested moving from emoncms v6 and v7 to v8.5 with it.
This is what it looks like:
You can download the script from here:
(click save as and save to your emoncms v8.5 folder)
https://raw.githubusercontent.com/emoncms/usefulscripts/master/convertda...
The script does not delete existing data the timestore files are left in the timestore data folder and the mysql data is left in the mysql tables. It does however change the engine field in the feeds table which you can change back if you wanted to switch back to timestore and mysql. Its advisable to make a backup of your emoncms mysql database before running the script, restoring the state of the database from before the script was run would be easiest from a mysqldump export of the emoncms database.
Run the script by going to http://emoncms-location/migrate.php
Note redis users: The script performs a redis flushall at the end, if your using redis for anything else non-emoncms related it would cause data loss, you may want to remove this line in that case.
Re: Upgrading mysql, timestore, phptimestore feed engines to phpfina and phptimeseries
Thank you for this Trystan! Worked perfectly here!
Judging by the script (bear in mind: I am in no way a php scripter) it looks like this script can also be tweaked to allow old MySQL data to be imported into ready existing phptimeseries feeds. Am I seeing this correctly? Back in january I created a new install, but I still have 2 years of data lying around in a MySQL database which I would love to include in the new system again.
Re: Upgrading mysql, timestore, phptimestore feed engines to phpfina and phptimeseries
Yes thats true, although the feed id's do stay the same, but I guess you could have multiple emoncms installs and db's with conflicting feed ids? I will add a check into the script anyway to be safe, good idea!
Re: Upgrading mysql, timestore, phptimestore feed engines to phpfina and phptimeseries
Added in a check for both phpfina and phptimeseries feeds
Re: Upgrading mysql, timestore, phptimestore feed engines to phpfina and phptimeseries
Well, that is not exactly what I am looking for. I have an old installation in which the power consumption of my house is stored under ID 10 Realtime MySQL. I want to migrate this data (covering 2012 and 2014) to my new installation which measures the power consumption of my house under ID 1 Realtime PHPTIMESERIES.
So I am actually looking for the possibility to map different ID's.
Re: Upgrading mysql, timestore, phptimestore feed engines to phpfina and phptimeseries
@fversteegen, do you want to merge current data with the old data as well? While technically possible this is quite a complex operation that would take quite a bit of development to implement. Could you migrate the old data to its own phptimeseries feed and at least have it accessible as something like house_power_archive?
Re: Upgrading mysql, timestore, phptimestore feed engines to phpfina and phptimeseries
Yes, I was actually looking to merge the old and new data. Main reason why I want to do this is to discover the trends (can also be done with seperate feeds, but analysis is much easier if you have 1 overview).
Migrating to PHPTIMERSERIES is of course, with the abovementioned script, a piece of cake.
Re: Upgrading mysql, timestore, phptimestore feed engines to phpfina and phptimeseries
Trystan, How can I tell what feeds I am using? I have a right mishmash I think. If some have already been converted what would happen if you ran this script?
Re: Upgrading mysql, timestore, phptimestore feed engines to phpfina and phptimeseries
How can I tell what feeds I am using?
Your feeds page?
If some have already been converted what would happen if you ran this script?
Nothing, if they have already been converted, there will be nothing to convert.
Paul
Re: Upgrading mysql, timestore, phptimestore feed engines to phpfina and phptimeseries
Ah OK, that was obvious!
[edit] sorry misread the answer.
But some feeds are PHPFINA and some SQL how do I just change those that need changing (the SQL ones) or should some be SQL? I am rather confused!
Cheers,
Brian
Re: Upgrading mysql, timestore, phptimestore feed engines to phpfina and phptimeseries
Emoncms uses a number of different feed storage engines, but MYSQL is the core database which records api keys, user detail, dashboard layouts, and importantly - what databases are used for storing data, such as phpfiwa, phpfina, etc.
In a up-to-date emoncms installation, you should have just one MYSQL database table, the rest will be a multitude of other types phpfina, phpfiwa, etc.
Hope this is clear!
Paul
Re: Upgrading mysql, timestore, phptimestore feed engines to phpfina and phptimeseries
I’ve been a long-time user of emoncms (currently running version 8.4.0). A while ago, I converted my temperature feeds from MYSQL to TIMESTORE. I now want to convert these to PHPFINA. I have run the migrate.php script and they appear to have converted successfully.
I also ran the sql_to_phptimeseries.php script to convert my daily feeds (Min, Max, Kwhd) from MYSQL to phptimeseries. I think that this worked – but can’t see the datestamp changing on these files – maybe because these are daily files, this won’t happen until tomorrow. I also converted one of my realtime feeds from sql to phptimeseries – I had to edit the script so that it did not restrict the datatype to 2 – this may or may not have been a mistake?
However, I have now noticed that my daily feeds no longer appear in the list of feeds. In addition, the realtime feed still appears as MYSQL. I have then noticed that if I turn off redis, all the feeds display correctly – but I am no longer able to query the api to obtain a feed value.
Here is a summary:
Any idea what is going on here please?
Re: Upgrading mysql, timestore, phptimestore feed engines to phpfina and phptimeseries
Have you updated your emoncms/settings.php file?
If not, you may need to create a new one from the v8.4.0 default.settings.php as older versions did not contain the feed engine entry for phpfina.
Paul
Re: Upgrading mysql, timestore, phptimestore feed engines to phpfina and phptimeseries
Yes - my settings file is taken from the default version in 8.4.0 and has references to the phpfina, phpfiwa, phptimeseries and phptimestore directories.
I have noticed that my realtime feed, which has an engine of '2' (phptimeseries) is showing as MYSQL in the feeds table, and values are still getting updated in the mysql database. And there has been no change to the datestamp of the files in the phptimeseries directory.
It's as if redis is out of sync with the mysql database. (I am assuming that redis gets its data from mysql on startup?). Is there something I need to do to get them back in sync? (I have tried sudo service redis-server restart).
Re: Upgrading mysql, timestore, phptimestore feed engines to phpfina and phptimeseries
You could try flushing redis and reloading the metadata;
Re: Upgrading mysql, timestore, phptimestore feed engines to phpfina and phptimeseries
So I ran the command, and all the feed engines are now showing as they should. (So that explains why changing the SQL database made no difference. I'm surprised that the redis command is not run at system startup?.).
Anyway, this has now introduced a new problem. My temperature feeds are updated every 25 seconds. However, when I look at the feeds page, the 'Updated' column is seemingly random - for example, 6 mins ago, 109 secs ago, 9 mins ago, all in the space of 10 seconds???
I have a secondary problem, in that one of my inputs logs to max and min. The max field appears to be updated in sync with the temperature, but the min field does not appear to be being updated.
Re: Upgrading mysql, timestore, phptimestore feed engines to phpfina and phptimeseries
When you see the longer update periods i.e 6min is there data missing in the graph? It sounds like not all the radio packets are getting through.
The min and max feeds will update only if a new maximum or minimum occurs, so these can go without update for long periods of time.
Re: Upgrading mysql, timestore, phptimestore feed engines to phpfina and phptimeseries
Hi all - I have finally got there - the owner on the phptimeseries files were incorrectly set to root (might be something to point out in the sql_to_phptimeseries_mv.php script). I changed the owner to www-data and everything started to work properly again (both the updating time, and the max and min feeds).
So my temperature feeds are now using phpfina. However, the documentation indicates that phpfiwa is the best engine for this type of feed. I can see that there is a script for getting from phpfiwa to phpfina, but is there a way of getting from phpfina to phpfiwa, and should I bother?
Re: Upgrading mysql, timestore, phptimestore feed engines to phpfina and phptimeseries
Both phpfina and phpfiwa are both up to date feed engines, and the main difference between them is that there is no averaging in the phpfina engine, making the phpfina 'database' smaller and therefore more suited to daily feeds rather than data that you want to analyze in graphs over different periods.
The downside to using phpfina for temperature feeds, is that it will take slightly longer to load graphs, depending upon the date/time period selected, but apart from that phpfina should be fine.
Paul
Re: Upgrading mysql, timestore, phptimestore feed engines to phpfina and phptimeseries
Sorry to bring this up (again) but I tried to migrate 4 feeds to PHPtimeseries (2 realtime feeds, 1 histogram feed and 1 daily feed, all on MYSQL engine). After running the script above I end up with a converted daily feed, but the other feeds remain in MYSQL.
By reading the script from @TrystanLea that is the expected outcome, but wouldn't it make sense to also convert the daily and histogram feeds to one of the modern engines, or am I completely missing the point here?
Re: Upgrading mysql, timestore, phptimestore feed engines to phpfina and phptimeseries
hi, I tried the script to convert from mysql that I saw that are converted only feeds with datatype=2 ("SELECT * FROM feeds WHERE `engine`= 0 AND `datatype`= 2) but I have many feeds with datatype 1 and 3.
what can I do to convert them from mysql to PHPFIWA (or phptimeseries)?


Machine learning engineer, Computer vision scientist, Data engineering enthusiast
python c++ c lua javascript java
git, spark, pandas, Tensorflow, sklearn, pandas, AWS, Docker Flask, SQL, ROS, OpenCV, WebGL, three.js, Android Studio MATLAB, Linux, vim
Using Machine Learnign to stream-line survey creation. Designed, built and deployed a multi-lingual model to production. Resulted in 3% subscription boost. Check it out on surveymonkey
more infoReal-Time floor segmentation on-board turtlebot robot with Jetson TX2. The segmentation is being done with a modified FCN8s network running on the Jetson.
Check it outRegular SLAM can localize the robot and create a map. But, the map that it creates is only a point cloud and carries no semantic meaning. Using deep learning, we can create the point cloud with semantic labels. Thanks to Jetson TX2, now, all of this can be done onboard and in real time.
Developed a single image 3D AR system with scale at Pair3D. The system is developed on an AWS and is accessible through a web API
Check it outDeveloped a 3D reconstruction API that accepts images or videos and generates and visualizes output models. Different methods are available to achieve the best performance for each scenario.
Check it outDeveloped relocalization using image matching. The video is showcasing our matching system performance. In this example, I used google street view API to get real images from streets. Two different positions of the camera were chosen each with 360-degree view. For each image in the first camera position (left image), the closest match to the second camera position (right image) was found using the system.
In this paper, we introduce a novel approach to implicitly utilize temporal data in videos for online semantic segmentation. The method relies on a fully convolutional network that is embedded into a gated recurrent architecture.
paperHelping robots to see things as humans do by teaching them.
paper


--- layout: default title: Projects permalink: /projects/ ---
{{ project.summary }}
{{ project.stack }}
{{ project.content }}