X
: other
This document is a placeholder for the language-specific documentation
for X
.
Treebank Statistics (UD_Vietnamese)
There are 199 X
lemmas (4%), 199 X
types (4%) and 2574 X
tokens (8%).
Out of 14 observed tags, the rank of X
is: 4 in number of lemmas, 4 in number of types and 4 in number of tokens.
The 10 most frequent X
lemmas: không, đã, cũng, lại, sẽ, rất, được, chỉ, đang, ra
The 10 most frequent X
types: không, đã, cũng, lại, sẽ, rất, được, chỉ, đang, ra
The 10 most frequent ambiguous lemmas: lại (X 162, VERB 3), được (VERB 148, X 92, PART 1, ADJ 1), chỉ (X 79, VERB 1, NOUN 1), ra (X 67, VERB 52, ADP 5), mới (X 49, ADJ 18), đều (X 43, ADJ 1), còn (X 38, VERB 26, CCONJ 11), có thể (X 32, ADJ 10), cứ (X 29, VERB 1), lên (X 35, VERB 31, ADP 8)
The 10 most frequent ambiguous types: lại (X 162, VERB 3), được (VERB 148, X 92, PART 1, ADJ 1), chỉ (X 79, VERB 1, NOUN 1), ra (X 67, VERB 52, ADP 5), mới (X 49, ADJ 18), đều (X 43, ADJ 1), còn (X 38, VERB 26, CCONJ 11), có thể (X 32, ADJ 10), cứ (X 29, VERB 1), lên (X 35, VERB 31, ADP 8)
- lại
- được
- VERB 148: Và tôi được cử sang VN để giúp người VN chống phát xít Nhật .
- X 92: Nếu Tùng học được hai tuần nghiêm túc thì mẹ mua xe .
- PART 1: việc này liên quan nhiều khâu , qua khâu khác là của người khác , không sờ mó tới được “ .
- ADJ 1: bởi rứa mình bàn với đám trai trẻ : hay là dân mình phải học cho được cái nghề ni ?
- chỉ
- ra
- mới
- đều
- còn
- có thể
- cứ
- lên
Morphology
The form / lemma ratio of X
is 1.000000 (the average of all parts of speech is 1.000000).
The 1st highest number of forms (1) was observed with the lemma “&”: &.
The 2nd highest number of forms (1) was observed with the lemma “Bất cứ”: Bất cứ.
The 3rd highest number of forms (1) was observed with the lemma “Bỗng”: Bỗng.
X
occurs with 1 features: vi-feat/Polarity (401; 16% instances)
X
occurs with 1 feature-value pairs: Polarity=Neg
X
occurs with 2 feature combinations.
The most frequent feature combination is _
(2173 tokens).
Examples: đã, cũng, lại, sẽ, rất, được, chỉ, đang, ra, vẫn
Relations
X
nodes are attached to their parents using 15 different relations: vi-dep/advmod (2358; 92% instances), vi-dep/dep (101; 4% instances), vi-dep/aux (36; 1% instances), vi-dep/discourse (18; 1% instances), vi-dep/aux:pass (16; 1% instances), vi-dep/conj (8; 0% instances), vi-dep/parataxis (8; 0% instances), vi-dep/root (6; 0% instances), vi-dep/advcl (5; 0% instances), vi-dep/obl (5; 0% instances), vi-dep/amod (4; 0% instances), vi-dep/obj (4; 0% instances), vi-dep/nsubj (2; 0% instances), vi-dep/punct (2; 0% instances), vi-dep/nmod (1; 0% instances)
Parents of X
nodes belong to 10 different parts of speech: VERB (1899; 74% instances), ADJ (371; 14% instances), NOUN (232; 9% instances), PROPN (31; 1% instances), X (13; 1% instances), ADP (8; 0% instances), PUNCT (7; 0% instances), ROOT (6; 0% instances), CCONJ (5; 0% instances), NUM (2; 0% instances)
2540 (99%) X
nodes are leaves.
22 (1%) X
nodes have one child.
5 (0%) X
nodes have two children.
7 (0%) X
nodes have three or more children.
The highest child degree of a X
node is 10.
Children of X
nodes are attached using 16 different relations: vi-dep/punct (21; 30% instances), vi-dep/advmod (13; 19% instances), vi-dep/nsubj (6; 9% instances), vi-dep/nmod (5; 7% instances), vi-dep/aux (3; 4% instances), vi-dep/aux:pass (3; 4% instances), vi-dep/cc (3; 4% instances), vi-dep/advcl (2; 3% instances), vi-dep/case (2; 3% instances), vi-dep/conj (2; 3% instances), vi-dep/det (2; 3% instances), vi-dep/discourse (2; 3% instances), vi-dep/xcomp (2; 3% instances), vi-dep/amod (1; 1% instances), vi-dep/ccomp (1; 1% instances), vi-dep/compound (1; 1% instances)
Children of X
nodes belong to 10 different parts of speech: PUNCT (21; 30% instances), X (13; 19% instances), NOUN (12; 17% instances), VERB (10; 14% instances), ADJ (3; 4% instances), ADP (3; 4% instances), CCONJ (2; 3% instances), PART (2; 3% instances), PROPN (2; 3% instances), SCONJ (1; 1% instances)
X in other languages: [am] [ar] [bg] [bxr] [ca] [ckb] [cop] [cs] [cu] [da] [de] [el] [en] [es] [et] [eu] [fa] [fi] [fo] [fr] [ga] [gl] [got] [grc] [he] [hi] [hr] [hu] [id] [it] [ja] [kk] [kmr] [ko] [la] [lv] [mr] [nl] [no] [pl] [pt] [ro] [ru] [sa] [sk] [sla] [sl] [so] [sr] [sv] [swl] [ta] [tr] [ug] [uk] [u] [urj] [ur] [vi] [yue] [zh]


I am a professional Data y
Motivated by data and results, my passion and intern experience combined will exceed expectations at a company like Simplex. Ready to join a team of critical thinkers to build a data stack from scratch for the e-commerce space.
Some quick example text to build on the card title and make up the bulk of the card's content. Some quick example text to build on the card title and make up the bulk of the card's content.


Get advice from an architect<PHONE_NUMBER>
Plans printed by MonsterHousePlans.com’s designers are refundable within 10 business days of purchase under the following conditions:
Plans are in their sealed, original packaging and have not been opened (to be determined by the firm that shipped the original order). Customer will pay a 20% re-stocking fee plus all shipping charges. Reproducibles, CAD Files & PDF’s are not refundable under any circumstances due to copyright issues.
Plans ordered from MonsterHousePlans.com may be exchanged within 30 days of purchase under the following conditions:
Upon designer approval, customer may exchange for a plan within the same designer’s collection (plan number to have same prefix). Customer will pay 20- 40% of the amount of the original order for re-stocking, plus the difference in cost if exchanging for a higher priced plan. Customer will also be responsible for all shipping charges. Reproducibles, CAD Files & PDF’s are not exchangeable under any circumstances due to copyright issues.
MonsterHousePlans provides house plans for construction purposes but does not oversee the construction. The plan purchaser is responsible for assuring the plan meets local codes and regulations. It is the responsibility of the plan purchaser to obtain any and all structural analysis, engineering and specifications that may be required in the municipality in which it is to be built. Plan purchaser is to verify all lot conditions and measurements before construction. Purchaser is responsible for additional expenses incurred in order to meet local code and engineering requirements.
Customer understands that the following conditions in your specific area may require additional engineering:
Customer understands that HVAC, Plumbing & Electrical will not be included in plans (other than location of plumbing fixtures and electrical lights, plugs & switches*).
Purchaser agrees that the use of the plan is for the construction of one house only*, and that the plan or any part of it will not be reproduced by any means without the written consent of the copyright owner.
*Unless otherwise noted.


This is only applicable when logging in using the Universal Login Page.
Paste in an invitation URL and be logged in


Use This Button Please
New York Times Search
Search Term
Number of Records to Retrieve:
Start Year (Optional):
End Year (Optional):
Search
Clear Results


Class to unparse json instances into JSON messages.
More...
#include <unparser.hpp>
|
| | unparser (writer &w, const char *space=" ", const char *newline="", const char *indent=" ", int indent_inc=0) |
| |
| void | unparse (const json &j, int indent_level=0) |
| |
|
| static void | unparse (std::ostream &o, const json &j, const char *space=" ", const char *newline="", const char *indent=" ", int indent_inc=0) |
| |
| static void | unparse (int fd, const json &j, const char *space=" ", const char *newline="", const char *indent=" ", int indent_inc=0) |
| |
| static void | unparse (FILE *s, const json &j, const char *space=" ", const char *newline="", const char *indent=" ", int indent_inc=0) |
| |
| static void | save (const json &j, const std::string &file_name, const char *space=" ", const char *newline="", const char *indent=" ", int indent_inc=0) |
| |
Class to unparse json instances into JSON messages.
Class to unparse json instances into JSON messages. Various convenience methods are supplied for different IO models.
Definition at line 54 of file unparser.hpp.
| unparser::unparser |
( |
writer & |
w, |
|
|
const char * |
space = " " , |
|
|
const char * |
newline = "" , |
|
|
const char * |
indent = " " , |
|
|
int |
indent_inc = 0 |
|
) |
| |
Construct a new unparser given a writer instance.
- Parameters
-
| w | The writer to use for output. |
| space | What to print for the spacing around ":" and after ",". |
| newline | What to print for a newline after name/value pairs and array items. |
| indent | What to print for indents after a newline. |
| indent_inc | How much to increment by when indenting a new object or array. 1 == one indent string parameter value. |
- Exceptions
-
Definition at line 44 of file unparser.cpp.
| void unparser::save |
( |
const json & |
j, |
|
|
const std::string & |
file_name, |
|
|
const char * |
space = " " , |
|
|
const char * |
newline = "" , |
|
|
const char * |
indent = " " , |
|
|
int |
indent_inc = 0 |
|
) |
| |
|
static |
Convenience method. Create a new file, write a single JSON message to it and then close it. See documentation for unparse to stream for other parameter details.
- Exceptions
-
Definition at line 204 of file unparser.cpp.
| void unparser::unparse |
( |
std::ostream & |
o, |
|
|
const json & |
j, |
|
|
const char * |
space = " " , |
|
|
const char * |
newline = "" , |
|
|
const char * |
indent = " " , |
|
|
int |
indent_inc = 0 |
|
) |
| |
|
static |
Unparse a json instance to an ostream.
- Parameters
-
| o | The ostream to write to. |
| j | The json instance to write. |
| space | What to print for the spacing around ":" and after ",". |
| newline | What to print for a newline after name/value pairs and array items. |
| indent | What to print for indents after a newline. |
| indent_inc | How much to increment by when indenting a new object or array. 1 == one indent string parameter value. |
- Exceptions
-
Definition at line 163 of file unparser.cpp.
| void unparser::unparse |
( |
int |
fd, |
|
|
const json & |
j, |
|
|
const char * |
space = " " , |
|
|
const char * |
newline = "" , |
|
|
const char * |
indent = " " , |
|
|
int |
indent_inc = 0 |
|
) |
| |
|
static |
Unparse a json instance to a POSIX file descriptor. See documentation for unparse to stream for other parameter details.
- Exceptions
-
Definition at line 177 of file unparser.cpp.
| void unparser::unparse |
( |
FILE * |
s, |
|
|
const json & |
j, |
|
|
const char * |
space = " " , |
|
|
const char * |
newline = "" , |
|
|
const char * |
indent = " " , |
|
|
int |
indent_inc = 0 |
|
) |
| |
|
static |
Unparse a json instance to a stdio FILE. See documentation for unparse to stream for other parameter details.
- Exceptions
-
Definition at line 191 of file unparser.cpp.
| void unparser::unparse |
( |
const json & |
j, |
|
|
int |
indent_level = 0 |
|
) |
| |
Unparse a single json instance.
- Parameters
-
| j | The json instance to output. |
| indent_level | The indent level to start at (usually 0). |
- Exceptions
-
Definition at line 119 of file unparser.cpp.
The documentation for this class was generated from the following files:


Architectural Performance Monitoring Information
This tab displays architectural performance monitoring information retrieved from the CPUID instruction.
The version, identifying the version of the architectural performance monitoring hardware.
The counter number, identifying the number of general-purpose or fixed-function counters available.
The counter width, identifying the width in bits of the general-purpose or fixed-function counters.
The events that are available in the performance monitoring hardware.
For each version of architectural performance monitoring capability, software must enumerate this leaf to discover the programming facilities and the architectural performance events available in the processor. The details are described in Chapter 18, "Debugging and Performance Monitoring," in the Intel® 64 and IA-32 Architectures Software Developer's Manual, Volume 3B.


- balance - Variable in class com.boyanstoynov.littlebigspender.db.model.Account
-
- balanceInput - Variable in class com.boyanstoynov.littlebigspender.main.accounts.AddAccountActivity
-
- balanceInput - Variable in class com.boyanstoynov.littlebigspender.main.accounts.AddCryptoActivity
-
- balanceInput - Variable in class com.boyanstoynov.littlebigspender.main.accounts.EditAccountDialog
-
- balanceIsValid() - Method in class com.boyanstoynov.littlebigspender.main.accounts.AddCryptoActivity
-
Checks balance user input and return boolean whether it is
valid or not.
- BarChartStatisticFragment - Class in com.boyanstoynov.littlebigspender.statistics
-
Bar chart fragment which gets the data for each fiat account's
income and expense and visualises it with a stacked bar chart.
- BarChartStatisticFragment() - Constructor for class com.boyanstoynov.littlebigspender.statistics.BarChartStatisticFragment
-
- BaseActivity - Class in com.boyanstoynov.littlebigspender
-
Base class for Activities.
- BaseActivity() - Constructor for class com.boyanstoynov.littlebigspender.BaseActivity
-
- BaseDao<T extends io.realm.RealmObject> - Class in com.boyanstoynov.littlebigspender.db.dao
-
Base Data Access Object that serves to abstract database
operations on entities stored in the Realm database.
- BaseDao(Realm) - Constructor for class com.boyanstoynov.littlebigspender.db.dao.BaseDao
-
Constructor that takes a Realm instance on which to execute
transactions and queries.
- BaseEditorDialog<E extends io.realm.RealmObject> - Class in com.boyanstoynov.littlebigspender
-
Base class for Editor Dialogs that provides display of data
of an item in the database and allows it to be updated by the user.
- BaseEditorDialog() - Constructor for class com.boyanstoynov.littlebigspender.BaseEditorDialog
-
- BaseEditorDialog.DialogListener<E extends io.realm.RealmObject> - Interface in com.boyanstoynov.littlebigspender
-
Interface that must be implemented by controllers that want to be
notified whenever the positive (save) button has been clicked on
the EditDialog.
- BaseFragment - Class in com.boyanstoynov.littlebigspender
-
Base class for Fragments.
- BaseFragment() - Constructor for class com.boyanstoynov.littlebigspender.BaseFragment
-
- BaseRecyclerAdapter<E extends io.realm.RealmObject> - Class in com.boyanstoynov.littlebigspender
-
Base class for Recycler View Adapters which provides storage of dataSet
that is used and means to update it.
- BaseRecyclerAdapter(BaseRecyclerAdapter.RecyclerViewListener<E>) - Constructor for class com.boyanstoynov.littlebigspender.BaseRecyclerAdapter
-
Constructor that takes the listener that will process the events
passed from this RecyclerView.
- BaseRecyclerAdapter.RecyclerViewListener<E extends io.realm.RealmObject> - Interface in com.boyanstoynov.littlebigspender
-
Interface that must be implemented by controllers that want to be
notified whenever the Delete or Edit buttons has been clicked on
one of the ViewHolders.
- BaseRecyclerAdapter.ViewHolder<E extends io.realm.RealmObject> - Class in com.boyanstoynov.littlebigspender
-
Base ViewHolder inner static class which stores the item that
populates it and binds ButterKnife.
- bindItem(E) - Method in class com.boyanstoynov.littlebigspender.BaseRecyclerAdapter.ViewHolder
-
Binds data item to this ViewHolder.
- bottomNavigationView - Variable in class com.boyanstoynov.littlebigspender.main.MainActivity
-


Dolph Ziggler and Robert Roode win the Tag Team Battle Royal to get the first point for WWE SmackDown
by Shubham RoyTonight's WWE Survivor Series emanates from the Allstate Arena in Chicago, Illinois. The pre-show kicked off with a Tag Team Battle Royal between 10 teams from WWE RAW, SmackDown and NXT competing for brand supremacy.
The team of Dolph Ziggler & Robert Roode from SmackDown won the battle royal to score the first point for the Blue Brand.
The Tag Team Battle Royal
The Battle Royal match featured 3 teams from RAW (The OC, Zack Ryder & Curt Hawkins, and The Street Profits), 3 teams from NXT (The Forgotten Sons, Breezango and Imperium) and 4 teams from SmackDown (The Revival, Dolph Ziggler & Robert Roode, Lucha House Party and Heavy Machinery).
According to the rules, if one member of the team gets eliminated by getting thrown over the top rope, the whole team gets eliminated. The Forgotten Sons were the first team to get eliminated after Steve Cutler was tossed out.
Gradually, the number of Superstars in the ring got lesser as more and more tag teams got eliminated and it was down to The Street Profits and Ziggler & Roode. At one point it looked like The Street Profits were going to pick up the win but in the end, Roode eliminated Montez Ford to get the win.
Want us to know your thoughts on the matches that you see on TV? Go to our WWE section to rate and comment about them!


Based on this video by Jean Tampon
Click to add an orbiting ball. When balls collide, they turn pink, then fade to green when they don't collide.
It seems that eventually the balls will find an orbit where they don't collide!
Use the buttons to clear objects and adjust the speed. The "Solve" button will run the simulation without updating the display until a stable orbit has been reached for a certain amount of time. This does not mean the orbits will forever be stable, but the collisions will be very infrequent.


{% extends "includes/base.html" %} {% block title %}The current time{% endblock %} {% block content %}
It is now {{ current_date }}. And you are in {{ path }}
You're using {{ your_browser }}


{% extends 'base_generic.html' %} {% block title %}
You have no characters, why not create a new character?
Create a new character {% else %}Characters
{% for character in user.character_set.all %}| Name: | {{ character.name }} |
|---|---|
| Xp: | {{ character.xp }} |
| Belt: | {{ character.belt }} |
| Wins: | {{ character.wins }} |
| Loses: | {{ character.loses }} |
| Draws: | {{ character.draws }} |


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
32 33 34 35
36 requires ti.sysbios.interfaces;
37
38 /*!
39 * ======== ti.sysbios.family ========
40 * Contains family-specific modules for SYS/BIOS
41 *
42 * The ti.sysbios.family package contains family-specific implementations
43 * of modules in the Hardware Abstraction Layer
44 * ({@link ti.sysbios.hal HAL}) package.
45 *
46 * The SYS/BIOS ti.sysbios.hal
47 * package requires target/device-specific API
48 * implementations to achieve their functionality. To provide a common set
49 * of APIs for these modules across all supported families/devices, SYS/BIOS
50 * uses the RTSC proxy-delegate module mechanism. That is, the HAL
51 * modules serve as a proxies for a corresponding
52 * family-specific module implementation.
53 *
54 * The generic HAL APIs are designed to cover the great majority of use
55 * cases. If you are concerned with easy portability between
56 * different TI devices, you should use the generic HAL APIs as much
57 * as possible. However, if the generic APIs cannot enable use of a
58 * device-specific hardware feature that is advantageous to the software
59 * application, you may choose to use the target/device-specific APIs.
60 *
61 * During the configuration step of the application build, the
62 * modules in the ti.sysbios.hal package locate and bind
63 * themselves to appropriate delegate module implementations based on the
64 * current target
65 * and platform specified in your config.bld file. The delegate binding
66 * process is done internally.
67 *
68 * For example, if your config.bld file specifies that one of your build
69 * targets is the C64P family, the {@link ti.sysbios.hal.Hwi} knows to
70 * bind itself to the {@link ti.sysbios.family.c64p.Hwi} implementation.
71 *
72 * The {@link ./doc-files/delegates.html SYS/BIOS Delegates Usage} page
73 * lists the delegates available for every target and platform.
74 *
75 */
76 package ti.sysbios.family [2,0,0,0] {
77 module Settings;
78 }
79


Channel Islands July 2007
Previous
4
5
6
7
8
9
Next
Aboard the Vision
Channel Islands 2007-07-17 08-50-07
|
White-spotted Dorrid (Doriopsilla albopunctata)
Channel Islands 2007-07-17 09-00-08
|
Clown Dorid (Triopha catalinae)
Channel Islands 2007-07-17 09-05-55
|
White-spotted Dorrid (Doriopsilla albopunctata)
Channel Islands 2007-07-17 09-17-55
|
Spanish Shawl (Flabellina iodinea)
Channel Islands 2007-07-17 10-55-39
|
Spanish Shawl (Flabellina iodinea)
Channel Islands 2007-07-17 10-56-04
|
Spanish Shawl (Flabellina iodinea)
Channel Islands 2007-07-17 11-03-28
Channel Islands 2007-07-17 11-09-50
|
Porter's Chromodorid (Mexichromis porterae)
Channel Islands 2007-07-17 11-14-02
|
White-spotted Dorrid (Doriopsilla albopunctata)


To verify a signature, it is necessary to inform CrypTool manually (through appropriate selections in the Signature Verification dialog) who created a signature (or rather, with which key pair the signature was generated):
For RSA and DSA signatures CrypTool automatically filters out the rest of the information needed to verify the signature (such as, for example, which hash function was used to sign the message) from the signature output.
Under both of the elliptic curve signature algorithms (ECSP-DSA and ECSP-NR) as well as entering the name of the person who created the signature it is also necessary to select the hash function used and the procedure used. All this information will be found in the output window which opened following the selection of the Sign message menu option. Automatic recognition of the hash function used and the procedure used was deliberately omitted in order to enable experimentation.


Home
About Us
Have a Wonderful Day!
Welcome Back Home!
Start your day over
Join your friends for lunch


I'm A Celebrity's Kate Garraway squeals in first look at tonight’s Bushtucker trial
She took on the trial with campmate Caitlyn Jenner
by Rebecca CarterKate Garraway squeals as she takes on her first Bushtucker trial on tonight's I'm A Celebrity.
We saw the Good Morning Britain presenter enter the jungle last night alongside nine other famous faces including Caitlyn Jenner, Jacqueline Jossa and James Haskell.
ITV shared a preview clip of tonight's trial, Bugged off, and it shows Caitlyn and Kate take on the critter-infested challenge.
Read more: I'm A Celebrity: Extra Camp fans beg Joe Swash to return
In the footage, Kate and Caitlyn are seen strapped down inside transparent boxes, which have been lifted in the air.
They have to chuck a ball into a bucket below them and have 10 minutes to try and get as many as they can.
However, of course, a bunch of critters will join them in the box including 30,000 cockroaches.
Caitlyn says: "Oh boy... we've got lots of friends!" as the cockroaches are poured into the box.
Host Ant McPartlin tells the pair: "That's right, lots of friends in there with you now..."
Kate says: "Oh no, oh no, oh no. There's so many of them! Oh God, oh God."
Kate then tries to drop one of her balls into the bucket below but fails to get it in.
She says: "Oh, missed it, ah!"
As the critters start crawling over her, she screams: "Ah! Oh no!"
Viewers have already predicted how tonight's trial will go as they shared their thoughts on Twitter.
One person said: "Kate can do it, in fact I think they will both encourage and support each other during the trial. She might get a bit nervous at the start but she will be fine."
Another wrote: "These two are gonna be hilarious."
A third tweeted: "Kate can do it. She did the plank walking in the end. @Caitlyn_Jenner will help her through it I think. Come on ladies."
Last night, Kate was terrified as she walked across a 300ft high plank in one of the show's first challenges.
Read more: Dec Donnelly explains mystery wound on his arm to concerned I'm A Celebrity fans
I'm A Celebrity...Get Me Out Of Here! continues Monday 18 November at 9pm on ITV.
Do you think Kate and Caitlyn will complete the Bushtucker trial tonight? Leave us a comment on our Facebook page @EntertainmentDailyFix and let us know.


Police say missing Banchory man David Strachan could be in Dundee
Police say a Banchory man reported missing could be in the Dundee area.
by Jake KeithDavid Murray Strachan, 51, has been missing from the Wilson Road area of the town since 9pm on Tuesday November 19.
David is described as being 5 feet 10 inches tall and having short, fair/blonde hair.

Huntly Police Station sergeant Graeme Forbes, said: “We are keen to hear from anyone who may have seen David, or maybe knows where he is, to get in touch. His family are concerned for him.
“We would also ask that David call us or his family to let everyone know he is OK.”
Anyone with information should call 1o1 quoting reference number 2400 of 21 November 2019.


Contents
We are open to all types of contributions, from bugfixes to functionality enhancements. mne-python is meant to be maintained by a community of labs, and as such, we seek enhancements that will likely benefit a large proportion of the users who use the package.
Before starting new code, we highly recommend opening an issue on mne-python GitHub to discuss potential changes. Getting on the same page as the maintainers about changes or enhancements before too much coding is done saves everyone time and effort!
#. A good python editor: Atom and Sublime Text are modern general-purpose text editors and are available on all three major platforms. Both provide plugins that facilitate editing python code and help avoid bugs and style errors. See for example linterflake8 for Atom. The Spyder IDE is espectially suitable for those migrating from Matlab. EPD and Anaconda both ship Spyder and all its dependencies. As always, Vim or Emacs will suffice as well.
We highly recommend using a code editor that uses both pep8 and pyflakes, such as Spyder. Standard python style guidelines are followed, with very few exceptions.
You can also manually check pyflakes and pep8 warnings as:
pip install pyflakes
pip install pep8
pyflakes path/to/module.py
pep8 path/to/module.py
AutoPEP8 can then help you fix some of the easy redundant errors:
pip install autopep8
autopep8 path/to/pep8.py
mne-python adheres to the same docstring formatting as seen on numpy style. New public functions should have all variables defined. The test suite has some functionality that checks docstrings, but docstrings should still be checked for clarity, uniformity, and completeness.
New functionality should be covered by appropriate tests, e.g. a method in
mne/evoked.py
should have a corresponding test in
mne/tests/test_evoked.py
. You can use the coverage
module in
conjunction with nosetests
(nose can automatically determine the code
coverage if coverage
is installed) to see how well new code is covered.
The ambition is to achieve around 85% coverage with tests.
After changes have been made, ensure all tests pass. This can be done
by running the following from the mne-python
root directory:
make
To run individual tests, you can also run any of the following:
make clean
make inplace
make test-doc
make inplace
nosetests
To explicitly download and extract the mne-python testing dataset (~320 MB) run:
make testing_data
Alternatively:
python -c "import mne; mne.datasets.testing.data_path(verbose=True)"
downloads the test data as well. Having a complete testing dataset is necessary for running the tests. To run the examples you’ll need the mne-python sample dataset which is automatically downloaded when running an example for the first time.
You can also run nosetests -x
to have nose stop as soon as a failed
test is found, or run e.g., nosetests mne/tests/test_event.py
to run
a specific test. In addition, one can run individual tests from python:
>>> from mne.utils import run_tests_if_main
>>> run_tests_if_main()
For more details see troubleshooting.
Update relevant documentation. Update whats_new.rst for new features and python_reference.rst for new classes and standalone functions. whats_new.rst is organized in chronological order with the last feature at the end of the document.
To ensure that these files were rendered correctly, run the following command:
make html-noplotThis will build the docs without building all the examples, which can save some time.
Please, ideally address one and only one issue per pull request (PR).
Avoid unnecessary cosmetic changes if they are not the goal of the PR, this will help keep the diff clean and facilitate reviewing.
Use underscores to separate words in non class names: n_samples rather than nsamples.
Use CamelCase for class names.
Use relative imports for references inside mne-python.
Use nested imports for matplotlib
, sklearn
, and pandas
.
Use RdBu_r
colormap for signed data and Reds
for unsigned data in visualization functions and examples.
All visualization functions must accept a show
parameter and return a fig
handle.
Efforts to improve test timing without decreasing coverage is well appreciated. To see the top-30 tests in order of decreasing timing, run the following command:
nosetests --with-timer --timer-top-n 30
Instance methods that update the state of the object should return self.
Use single quotes whenever possible.
Prefer generator or list comprehensions over filter
, map
and other functional idioms.
Use explicit functional constructors for builtin containers to improve readability. E.g. list()
, dict()
.
Avoid nested functions if not necessary and use private functions instead.
When adding visualization methods, add public functions to the mne.viz package and use these in the corresponding method.
If not otherwise required, methods should deal with state while functions should return copies. There are a few justified exceptions though, e.g. equalize_channels
, for memory reasons for example.
Update the whats_new.rst file at the end, otherwise merge conflicts are guaranteed to occur.
Avoid **kwargs
and *args
in function signatures, they are not user friendly (inspection).
Avoid single character variable names if you can. They are not readable and often they don’t comply with the builtin debugger.
Add at least some brief comment to a private function to help us guess what it does. For complex private functions please write a full documentation.
To learn more about profiling python codes please see the scikit learn profiling site.
Any contributions to the core mne-python package, whether bug fixes, improvements to the documentation, or new functionality, can be done via pull requests on GitHub. The workflow for this is described here. [Many thanks to Astropy for providing clear instructions that we have adapted for our use here!]
The only absolutely necessary configuration step is identifying yourself and your contact info:
git config --global user.name "Your Name"
git config --global user.email<EMAIL_ADDRESS>If you are going to Set up and configure a GitHub account eventually, this email address should be the same as the one used to sign up for a GitHub account. For more information about configuring your git installation, see:
The following sections cover the installation of the git software, the basic configuration, and links to resources to learn more about using git. However, you can also directly go to the GitHub help pages which offer a great introduction to git and GitHub.
In the present document, we refer to the mne-python master
branch, as the
trunk.
You need to do this only once for each package you want to contribute to. The instructions here are very similar to the instructions at https://help.github.com/fork-a-repo/ — please see that page for more details. We’re repeating some of it here just to give the specifics for the mne-python project, and to suggest some default names.
If you don’t have a GitHub account, go to the GitHub page, and make one.
You then need to configure your account to allow write access — see the Generating SSH keys help on GitHub Help.
Now you should fork the core mne-python
repository (although you could
in principle also fork a different one, such as mne-matlab`
):
Log into your GitHub account.
Go to the mne-python GitHub home.
Click on the fork button:
Now, after a short pause and some ‘Hardcore forking action’, you should find yourself at the home page for your own forked copy of mne-python.
Briefly, this is done using:
git clone git@github.com:your-user-name/mne-python.git
cd mne-python
git remote add upstream git://github.com/mne-tools/mne-python.git
These steps can be broken out to be more explicit as:
Clone your fork to the local computer:
git clone git@github.com:your-user-name/mne-python.git
Change directory to your new repo:
cd mne-python
Then type:
git branch -a
to show you all branches. You’ll get something like:
* master
remotes/origin/master
This tells you that you are currently on the master
branch, and
that you also have a remote
connection to origin/master
.
What remote repository is remote/origin
? Try git remote -v
to
see the URLs for the remote. They will point to your GitHub fork.
Now you want to connect to the mne-python repository, so you can merge in changes from the trunk:
cd mne-python
git remote add upstream git://github.com/mne-tools/mne-python.git
upstream
here is just the arbitrary name we’re using to refer to the
main mne-python repository.
Note that we’ve used git://
for the URL rather than git@
. The
git://
URL is read only. This means we that we can’t accidentally (or
deliberately) write to the upstream repo, and we are only going to use it
to merge into our own code.
Just for your own satisfaction, show yourself that you now have a new
‘remote’, with git remote -v show
, giving you something like:
upstream git://github.com/mne-tools/mne-python.git (fetch)
upstream git://github.com/mne-tools/mne-python.git (push)
origin git@github.com:your-user-name/mne-python.git (fetch)
origin git@github.com:your-user-name/mne-python.git (push)
Your fork is now set up correctly.
Install mne with editing permissions to the installed folder:
To be able to conveniently edit your files after installing mne-python, install using the following setting:
$ python setup.py develop --user
To make changes in the code, edit the relevant files and restart the ipython kernel for changes to take effect.
Ensure unit tests pass and html files can be compiled
Make sure before starting to code that all unit tests pass and the
html files in the doc/
directory can be built without errors. To build
the html files, first go the doc/
directory and then type:
$ make html
Once it is compiled for the first time, subsequent compiles will only recompile what has changed. That’s it! You are now ready to hack away.
This section gives a summary of the workflow once you have successfully forked the repository, and details are given for each of these steps in the following sections.
master
branch for anything. Consider deleting it.bugfix-for-issue-14
or refactor-database-code
.This way of working helps to keep work well organized, with readable history. This in turn makes it easier for project maintainers (that might be you) to see what you’ve done, and why you did it.
See linux git workflow and ipython git workflow for some explanation.
It may sound strange, but deleting your own master
branch can help reduce
confusion about which branch you are on. See deleting master on github for
details.
From time to time you should fetch the upstream (trunk) changes from GitHub:
git fetch upstream
This will pull down any commits you don’t have, and set the remote branches to
point to the right commit. For example, ‘trunk’ is the branch referred to by
(remote/branchname) upstream/master
- and if there have been commits since
you last checked, upstream/master
will change after you do the fetch.
When you are ready to make some changes to the code, you should start a new branch. Branches that are for a collection of related edits are often called ‘feature branches’.
Making an new branch for each set of related changes will make it easier for someone reviewing your branch to see what you are doing.
Choose an informative name for the branch to remind yourself and the rest of
us what the changes in the branch are for. For example add-ability-to-fly
,
or buxfix-for-issue-42
.
# Update the mirror of trunk
git fetch upstream
# Make new feature branch starting at current trunk
git branch my-new-feature upstream/master
git checkout my-new-feature
Generally, you will want to keep your feature branches on your public GitHub
fork. To do this, you git push this new branch up to your
github repo. Generally (if you followed the instructions in these pages, and
by default), git will have a link to your GitHub repo, called origin
. You
push up to your own repo on GitHub with:
git push origin my-new-feature
In git > 1.7 you can ensure that the link is correctly set by using the
--set-upstream
option:
git push --set-upstream origin my-new-feature
From now on git will know that my-new-feature
is related to the
my-new-feature
branch in the GitHub repo.
Make some changes
See which files have changed with git status
(see git status).
You’ll see a listing like this one:
# On branch ny-new-feature
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: README
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# INSTALL
no changes added to commit (use "git add" and/or "git commit -a")
Check what the actual changes are with git diff
(git diff).
Add any new files to version control git add new_file_name
(see
git add).
Add any modified files that you want to commit using
git add modified_file_name
(see git add).
Once you are ready to commit, check with git status
which files are
about to be committed:
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# modified: README
Then use git commit -m 'A commit message'
. The m
flag just
signals that you’re going to type a message on the command line. The git
commit manual page might also be useful.
It is also good practice to prefix commits with the type of change, such as
FIX:
, STY:
, or ENH:
for fixes, style changes, or enhancements.
To push the changes up to your forked repo on GitHub, do a git
push
(see git push).
When you are ready to ask for someone to review your code and consider a merge:
Go to the URL of your forked repo, say
https://github.com/your-user-name/mne-python
.
Use the ‘Switch Branches’ dropdown menu near the top left of the page to select the branch with your changes:
Click on the ‘Pull request’ button:
Enter a title for the set of changes, and some explanation of what you’ve done. Say if there is anything you’d like particular attention for - like a complicated change or some code you are not happy with.
If you don’t think your request is ready to be merged, prefix WIP:
to
the title of the pull request, and note it also in your pull request
message. This is still a good way of getting some preliminary code review.
Submitting a pull request early on in feature development can save a great
deal of time for you, as the code maintainers may have “suggestions” about
how the code should be written (features, style, etc.) that are easier to
implement from the start.
Finally, make travis happy. Ensure that builds in all four jobs pass. To make code python3 compatible, refer to externals/six.py
. Use virtual environments to test code on different python versions. Please remember that travis only runs a subset of the tests and is thus not a substitute for running the entire test suite locally.
For the code to be mergeable, please rebase w.r.t master branch.
Once, you are ready, prefix MRG:
to the title of the pull request to indicate that you are ready for the pull request to be merged.
If you are uncertain about what would or would not be appropriate to contribute to mne-python, don’t hesitate to either send a pull request, or open an issue on the mne-python GitHub site to discuss potential changes.
# change to the master branch (if you still have one, otherwise change to another branch)
git checkout master
# delete branch locally
git branch -D my-unwanted-branch
# delete branch on GitHub
git push origin :my-unwanted-branch
(Note the colon :
before test-branch
. See also:
https://help.github.com/remotes
If you want to work on some stuff with other people, where you are all committing into the same repository, or even the same branch, then just share it via GitHub.
First fork mne-python into your account, as from Creating a fork.
Then, go to your forked repository GitHub page, say
http://github.com/your-user-name/mne-python
Click on the ‘Admin’ button, and add anyone else to the repo as a collaborator:
Now all those people can do:
git clone git@githhub.com:your-user-name/mne-python.git
Remember that links starting with git@
use the ssh protocol and are
read-write; links starting with git://
are read-only.
Your collaborators can then commit directly into that repo with the usual:
git commit -am 'ENH: much better code'
git push origin master # pushes directly into your repo
To see a graphical representation of the repository branches and commits:
gitk --all
To see a linear list of commits for this branch:
git log
You can also look at the network graph visualizer for your GitHub repo.
Finally the lg
alias will give you a reasonable text-based graph of the
repository.
If you are making extensive changes, git grep
is also very handy.
Let’s say you thought of some work you’d like to do. You
Updating the mirror of trunk and Making a new feature branch called
cool-feature
. At this stage trunk is at some commit, let’s call it E. Now
you make some new commits on your cool-feature
branch, let’s call them A,
B, C. Maybe your changes take a while, or you come back to them after a while.
In the meantime, trunk has progressed from commit E to commit (say) G:
A---B---C cool-feature
/
D---E---F---G trunk
At this stage you consider merging trunk into your feature branch, and you remember that this here page sternly advises you not to do that, because the history will get messy. Most of the time you can just ask for a review, and not worry that trunk has got a little ahead. But sometimes, the changes in trunk might affect your changes, and you need to harmonize them. In this situation you may prefer to do a rebase.
Rebase takes your changes (A, B, C) and replays them as if they had been made
to the current state of trunk
. In other words, in this case, it takes the
changes represented by A, B, C and replays them on top of G. After the rebase,
your history will look like this:
A'--B'--C' cool-feature
/
D---E---F---G trunk
See rebase without tears for more detail.
To do a rebase on trunk:
# Update the mirror of trunk
git fetch upstream
# Go to the feature branch
git checkout cool-feature
# Make a backup in case you mess up
git branch tmp cool-feature
# Rebase cool-feature onto trunk
git rebase --onto upstream/master upstream/master cool-feature
In this situation, where you are already on branch cool-feature
, the last
command can be written more succinctly as:
git rebase upstream/master
When all looks good you can delete your backup branch:
git branch -D tmp
If it doesn’t look good you may need to have a look at Recovering from mess-ups.
If you have made changes to files that have also changed in trunk, this may generate merge conflicts that you need to resolve - see the git rebase man page for some instructions at the end of the “Description” section. There is some related help on merging in the git user manual - see resolving a merge.
 If the branch you rebased is
called cool-feature
and your GitHub fork is available as the remote called origin
,
you use this command to force-push:
git push -f origin cool-feature
Note that this will overwrite the branch on GitHub, i.e. this is one of the few ways
you can actually lose commits with git.
Also note that it is never allowed to force push to the main mne-python repo (typically
called upstream
), because this would re-write commit history and thus cause problems
for all others.
Sometimes, you mess up merges or rebases. Luckily, in git it is relatively straightforward to recover from such mistakes.
If you mess up during a rebase:
git rebase --abort
If you notice you messed up after the rebase:
# Reset branch back to the saved point
git reset --hard tmp
If you forgot to make a backup branch:
# Look at the reflog of the branch
git reflog show cool-feature
8630830 cool-feature@{0}: commit: BUG: io: close file handles immediately
278dd2a cool-feature@{1}: rebase finished: refs/heads/my-feature-branch onto 11ee694744f2552d
26aa21a cool-feature@{2}: commit: BUG: lib: make seek_gzip_factory not leak gzip obj
...
# Reset the branch to where it was before the botched rebase
git reset --hard cool-feature@{2}
Otherwise, googling the issue may be helpful (especially links to Stack Overflow).
Note
Do this only for your own feature branches.
 Or perhaps the you made several false starts you would like the posterity not to see.
This can be done via interactive rebasing.
Suppose that the commit history looks like this:
git log --oneline
eadc391 Fix some remaining bugs
a815645 Modify it so that it works
2dec1ac Fix a few bugs + disable
13d7934 First implementation
6ad92e5 * masked is now an instance of a new object, MaskedConstant
29001ed Add pre-nep for a copule of structured_array_extensions.
...
and 6ad92e5
is the last commit in the cool-feature
branch. Suppose we
want to make the following changes:
13d7934
to something more sensible.2dec1ac
, a815645
, eadc391
into a single one.We do as follows:
# make a backup of the current state
git branch tmp HEAD
# interactive rebase
git rebase -i 6ad92e5
This will open an editor with the following text in it:
pick 13d7934 First implementation
pick 2dec1ac Fix a few bugs + disable
pick a815645 Modify it so that it works
pick eadc391 Fix some remaining bugs
# Rebase 6ad92e5..eadc391 onto 6ad92e5
#
# Commands:
# p, pick = use commit
# r, reword = use commit, but edit the commit message
# e, edit = use commit, but stop for amending
# s, squash = use commit, but meld into previous commit
# f, fixup = like "squash", but discard this commit's log message
#
# If you remove a line here THAT COMMIT WILL BE LOST.
# However, if you remove everything, the rebase will be aborted.
#
To achieve what we want, we will make the following changes to it:
r 13d7934 First implementation
pick 2dec1ac Fix a few bugs + disable
f a815645 Modify it so that it works
f eadc391 Fix some remaining bugs
This means that (i) we want to edit the commit message for 13d7934
, and
(ii) collapse the last three commits into one. Now we save and quit the
editor.
Git will then immediately bring up an editor for editing the commit message. After revising it, we get the output:
[detached HEAD 721fc64] FOO: First implementation
2 files changed, 199 insertions(+), 66 deletions(-)
[detached HEAD 0f22701] Fix a few bugs + disable
1 files changed, 79 insertions(+), 61 deletions(-)
Successfully rebased and updated refs/heads/my-feature-branch.
and the history looks now like this:
0f22701 Fix a few bugs + disable
721fc64 ENH: Sophisticated feature
6ad92e5 * masked is now an instance of a new object, MaskedConstant
If it went wrong, recovery is again possible as explained above.
To fetch a pull request on the main repository to your local working directory as a new branch, just do:
git fetch upstream pull/<pull request number>/head:<local-branch>
As an example, to pull the realtime pull request which has a url
https://github.com/mne-tools/mne-python/pull/615/
, do:
git fetch upstream pull/615/head:realtime
If you want to fetch a pull request to your own fork, replace
upstream
with origin
. That’s it!
The builds when the pull request is in WIP state can be safely skipped. The important thing is to ensure that the builds pass when the PR is ready to be merged. To skip a Travis build, add [ci skip]
to the commit message:
FIX: some changes [ci skip]
This will help prevent clogging up Travis and Appveyor and also save the environment.
Add the example to the correct subfolder in the examples/
directory and
prefix the file with plot_
. To make sure that the example renders correctly,
run make html
in the doc/
folder
To build only a subset of examples, it is possible to provide a regular expression which searches on the full pathname of the file. For example, you can do:
make html_dev-pattern PATTERN='/decoding/plot_'
It will run only the examples in the decoding
folder. Consult the sphinx gallery documentation
for more details.
These are reStructuredText files. Consult the Sphinx documentation to learn more about editing them.
Listed below are miscellaneous issues that you might face:
If the unit tests fail due to missing files, you may need to run
mne-scripts on the sample dataset. Go to bash
if you are using some
other shell. Then, execute all three shell scripts in the
sample-data/
directory within mne-scripts/
.
You need to update the corresponding __init__.py
file and then
restart the ipython kernel.
If the make test command fails with the error ICE default IO error
handler doing an exit()
, try backing up or removing .ICEauthority:
mv ~/.ICEauthority ~/.ICEauthority.bak


|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object interbase.interclient.ServerManager
public final class ServerManager
Provides a session for servicing an InterBase server.
A server manager object is obtained thru a DataSource
using
DataSource.getServerManager()
.
The DataSource property named serverManagerHost
must be
set using
DataSource.setServerManagerHost(hostName)
.
See DataSource Properties
for a list of other DataSource and Connection properties.
The ServerManager may be used for setting persistent database properties,
and for making service requests on databases and the server as a whole.
Use connection properties for
configuring transient properties of a connection.
Use the DatabaseMetaData
class for
querying persistent database properties in general.
See the InterClient Extension API for a complete list of available InterBase extensions to JDBC.
| Method Summary | |
|---|---|
void |
activateShadow(java.lang.String shadow)
Activate a database shadow file. |
void |
addInterBaseLicense(java.lang.String licenseKey,
java.lang.String licenseId)
Converts the license id and key to a valid license and adds it to the server's license file. |
void |
addUser(java.lang.String user,
java.lang.String password,
java.util.Map userInformation)
Registers a user with the InterBase server. |
java.lang.String |
backup(java.lang.String database,
java.lang.String[] backupFiles,
int[] backupFileLengths,
java.util.Map backupOptions)
Backs up a database to multiple backup files. |
java.lang.String |
backup(java.lang.String database,
java.lang.String backupFile,
java.util.Map backupOptions)
Backs up a database to a single backup file. |
void |
bringOnline(java.lang.String database)
Brings an offline database back online. |
void |
clearWarnings()
After this call, getWarnings returns null until a new warning is reported for this ServerManager. |
void |
close()
Close the server manager connection and release server manager resources. |
void |
commitTransactions(java.lang.String database,
int[] transactionIds)
Attempt to commit limbo transactions. |
void |
createDatabase(java.lang.String database)
Creates a single file database using the specified persistent database properties. |
void |
createShadow(java.lang.String database,
java.lang.String[] shadowFiles,
int[] shadowFileLengths,
java.util.Map shadowProperties)
Creates a multi-file shadow for a database. |
void |
createShadow(java.lang.String database,
java.lang.String shadow,
java.util.Map shadowProperties)
Creates a single shadow file for a database. |
void |
deleteDatabase(java.lang.String database)
Remove the database file. |
void |
deleteInterBaseLicense(java.lang.String licenseKey)
Removes the license specified by the licenseKey . |
void |
deleteShadow(java.lang.String database)
Deletes the shadow file for a database. |
void |
deleteUser(java.lang.String user)
Removes a registered user. |
java.lang.String[] |
getDatabasesInUse()
Gets the names of databases with current connections. |
java.lang.String[][] |
getInterBaseLicenses()
Gets all the InterBase license keys and IDs from the InterBase license file. |
java.lang.String |
getInterBaseVersion()
What's the version string for the InterBase server. |
int |
getInterServerBuildCertificationLevel()
Gets the build certification level for this version of InterServer. |
int |
getInterServerBuildNumber()
What's the build number for InterServer. |
java.util.Date |
getInterServerExpirationDate()
Get the expiration date for the server side JDBC middleware server (InterServer). |
int |
getInterServerJDBCNetProtocolVersion()
Get the JDBC/Net protocol used by InterServer. |
int |
getInterServerMajorVersion()
What's the major version number for InterServer. |
int |
getInterServerMinorVersion()
What's the minor version number for InterServer. |
java.lang.Object[] |
getLimboTransactions(java.lang.String database)
Gets limbo transaction information for the database. |
java.io.InputStream |
getLockActivityStream(java.util.Map options)
Gets a continuous stream of InterBase lock activity from the server. |
int |
getNumberOfInterBaseConnectionsInUse()
Returns the total number of database connections to the InterBase server. |
java.util.Map |
getRegisteredUsers()
Returns registered user information as a map from username to a userInformation array object. |
java.lang.String |
getStatisticsText(java.lang.String database,
java.util.Map options)
Gets database statistics as a text string. |
java.sql.SQLWarning |
getWarnings()
The first warning reported by calls on this ServerManager is returned. |
void |
modifyUser(java.lang.String user,
java.util.Map newUserInformation)
Change the user information for a registered user. |
void |
modifyUser(java.lang.String user,
java.lang.String newPassword)
Change the password for a registered user. |
java.lang.String |
repair(java.lang.String database,
java.util.Map repairOptions)
Validate and mend the database where possible. |
void |
reserveSpaceForVersioning(java.lang.String database,
boolean reserveSpace)
Specify whether or not space is reserved on each newly created database page for anticipated record versions. |
java.lang.String |
restore(java.lang.String backupFile,
java.lang.String[] databaseFiles,
int[] databaseFileLengths,
java.util.Map restoreOptions)
Restores a backup to multiple database files. |
java.lang.String |
restore(java.lang.String backupFile,
java.lang.String database,
java.util.Map restoreOptions)
Restores a backup to a single working database file. |
void |
rollbackTransactions(java.lang.String database,
int[] transactionIds)
Rollback limbo transactions. |
void |
setDatabaseCachePages(java.lang.String database,
int numCachePages)
Sets the number of cache page buffers to use for all connections to the specified database . |
void |
setDatabaseReadWrite(java.lang.String database,
boolean readWrite)
Configure the database as read/write or read-only. |
void |
setSweepInterval(java.lang.String database,
int interval)
Sets the periodicity of automatic garbage collection for the database. |
void |
startInterBase(int defaultCachedPages,
int defaultPageSize)
Start the InterBase service to allow for database connections. |
void |
stopInterBase()
Stop the InterBase service. |
java.lang.String |
sweep(java.lang.String database)
Manually sweep the database of old record versions. |
void |
takeOffline(java.lang.String database,
boolean forceOffline,
boolean blockNewConnections,
boolean blockNewTransactions,
int timeout)
Prevent further database connections or transactions, or force the shutdown of existing ones. |
void |
twoPhaseCommitTransactions(java.lang.String database,
int[] transactionIds)
Attempt to resolve limbo transactions using the two-phase commit protocol. |
void |
useSynchronousWrites(java.lang.String database,
boolean synchronous)
Enable or disable synchronous writes to disk on commit. |
java.lang.String |
verify(java.lang.String database,
java.util.Map verifyOptions)
Verifies the database's internal page structures. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public int getInterServerMajorVersion()
Driver.getMajorVersion()
public int getInterServerMinorVersion()
Driver.getMinorVersion()
public int getInterServerBuildNumber()
Driver.getBuildNumber()
public int getInterServerBuildCertificationLevel()
Driver.testBuild
Test builds are experimental and uncertified with
no level of quality assurance whatsoever.
Driver.betaBuild
Beta builds are certified for quality assurance,
but remain experimental.
Driver.finalBuild
The highest level of build certification.
A final build is certified for quality assurance,
but is not experimental.
The progression from test, beta, to final build is not static functionally. That is, new functionality may be added to a beta build that does not exist in a test build, and likewise, there may be new functionality in a final build which does not exist in a beta build of the same version.
Driver.getBuildCertificationLevel()
public int getInterServerJDBCNetProtocolVersion()
public java.util.Date getInterServerExpirationDate()
Driver.getExpirationDate()
public java.lang.String getInterBaseVersion() throws java.sql.SQLException
java.sql.SQLException
- if a database access error occurs.DatabaseMetaData.getDatabaseProductVersion()
public java.lang.String[] getDatabasesInUse() throws java.sql.SQLException
java.sql.SQLException
- if a server access error occurspublic int getNumberOfInterBaseConnectionsInUse() throws java.sql.SQLException
java.sql.SQLException
- if a server access error occurspublic java.lang.String[][] getInterBaseLicenses() throws java.sql.SQLException
isc_license.dat
.
This represents iblicense -display
functionality.
See the InterBase Operations Guide for details.
java.sql.SQLException
- if a server access error occurspublic java.util.Map getRegisteredUsers() throws java.sql.SQLException
isc4.gdb
.
This represents gsec display
functionality.
See the InterBase Operations Guide for details.
The user information array object for each user in the map is a 5-tuple containing
java.sql.SQLException
- if a server access error occurspublic java.io.InputStream getLockActivityStream(java.util.Map options) throws java.sql.SQLException
iblockpr
functionality.
See the InterBase Operations Guide for details.
Parameter options
maps the following string-based keys:
TBD.
This method is a placeholder for possible future functionality.
java.sql.SQLException
- if a server access error occurspublic void startInterBase(int defaultCachedPages, int defaultPageSize) throws java.sql.SQLException
ibmgr -start
functionality.
See the InterBase Operations Guide for details.
defaultPageSize
is the page size that will be used
by the InterBase server when a new database is created.
This affects the page size of a database created with the
createDatabase
method.
defaultCachedPages
suggests the number of cached pages the InterBase server will use for
database attachments.
Database cache is the number of memory pages reserved for each attached database. If the figure is set high enough to accommodate the page requirements for all attached databases, overall performance is maximized because all database activity can be handled in physical RAM rather than having it swapped to disk. If too many pages are reserved, however, and you have many databases running simultaneously, your request may exceed the amount of physical RAM available to the system. If that happens, some of your operations would be swapped to disk as the operating system tries to manage the excessive demands of your databases and the needs of other running applications.
On Classic, the default number of pages cached is 75 for each connection. The minimum is 50 pages.
On SuperServer, a single page buffer cache is allocated per database, and shared between connections. The default allocation is 256 cached pages.
There are 3 ways to programmatically specify the number of cache pages:
createDatabase
.
If this default is not set, the default is 256 for SuperServer and 75
for Classic.
setDatabaseCachePages
.
By default, createDatabase
stamps a zero onto the database header page.
If this value is non-zero, it takes precedence over both the server-wide and
connection-wide settings.
suggestedCachePages
connection property, or
DataSource.setSuggestedCachePages
,
but this value is transient and not stamped onto the database header page.
This transient setting takes precedence over the server-wide default,
but not any database-wide setting.
The number of cached database pages may also be set manually in the
server's ibconfig
file by
assigning the configuration parameter DATABASE_CACHE_PAGES
.
This manual server-wide setting takes precedence over any programmatic server-wide
setting, but is overriden by the database-wide and connection-wide programmatic
settings.
This method is a placeholder for possible future functionality.
java.sql.SQLException
- if a server access error occursDatabaseMetaData.getActualCachePagesInUse()
,
DatabaseMetaData.getPersistentDatabaseCachePages()
,
stopInterBase()
public void stopInterBase() throws java.sql.SQLException
ibmgr -shut
functionality.
See the InterBase Operations Guide for details.
This command rolls back all active transactions and forces immediate shutdown of the server. Use with caution.
This method is a placeholder for possible future functionality.
java.sql.SQLException
- if a server access error occursstartInterBase(int, int)
public void addInterBaseLicense(java.lang.String licenseKey, java.lang.String licenseId) throws java.sql.SQLException
isc_license.dat
.
This represents iblicense -add
functionality.
See the InterBase Operations Guide for details.
The server will need to be restarted if the license being added changes the server from a local server to a remote server. This is necessary because the listener threads are started and allocated once the server starts up. If the license id and key being added simply adds user licenses to the server, no server restart is needed.
This service can also be used to add evaluation licenses. Evaluation licenses, however, can not be removed using the ServerManager or any other means.
java.sql.SQLException
- if a server access error occurspublic void deleteInterBaseLicense(java.lang.String licenseKey) throws java.sql.SQLException
licenseKey
.
The InterBase server maintains a license file named isc_license.dat
.
This represents iblicense -remove -key
functionality.
See the InterBase Operations Guide for details.
The server will need to be restarted if the license being removed changes server's state from a remote server to a local server. This is necessary because the listener threads will need to be shut down to complete the operation and cannot be shutdown while the server is in use. If the license id and key being removed simply removes user licenses to the server, no server restart is needed.
java.sql.SQLException
- if a server access error occurspublic void addUser(java.lang.String user, java.lang.String password, java.util.Map userInformation) throws java.sql.SQLException
isc4.gdb
.
This represents gsec add
functionality.
See the InterBase Operations Guide for details.
userInformation
maps any of the following keys
to String or Integer objects:
firstName
gsec add -fname
functionality.
The first name of the user being added.
middleName
gsec add -mname
functionality.
The middle name of the user being added.
lastName
gsec add -lname
functionality.
The last name of the user being added.
unixUserId
gsec add -uid
functionality.
unixGroupId
gsec add -gid
functionality.
All such properties are optional.
Furthermore, the userInformation
map itself may be null.
When adding users to the security database, the only information required is the username and password and are restricted to ASCII characters. The information for first, middle, and last names are stored in Unicode.
By default, only SYSDBA is allowed to add user information in the security database, however, no checks are made by this API to enforce this. Since this is strictly enforced at the database level, it is possible for SYSDBA to grant update priviledges to those fields that can be updatable by end users.
The SQL role name used for this operation is the roleName
property
inherited from the DataSource
that produced this ServerManager.
java.sql.SQLException
- if a server access error occurspublic void deleteUser(java.lang.String user) throws java.sql.SQLException
isc4.gdb
.
This represents gsec delete
functionality.
See the InterBase Operations Guide for details.
Once a user has been removed from the security database,
you will need to create a new user record using addUser
before that user can connect to the server.
By default, only SYSDBA is allowed to remove user information in the security database, however, no checks are made by this API to enforce this. This is strictly enforced at the database level. This would allow the SYSDBA to grant update priviledges to those fields that can be updatable by end-users.
The SQL role name used for this operation is the roleName
property
inherited from the DataSource
that produced this ServerManager.
java.sql.SQLException
- if a server access error occurspublic void modifyUser(java.lang.String user, java.util.Map newUserInformation) throws java.sql.SQLException
isc4.gdb
.
This represents gsec modify
functionality.
See the InterBase Operations Guide for details.
newUserInformation
maps any of the following keys
to String or Integer objects:
password
gsec modify -pw
functionality.
The new password of the user being modified.
firstName
gsec modify -fname
functionality.
The new first name of the user being modified.
middleName
gsec modify -mname
functionality.
The new middle name of the user being modified.
lastName
gsec modify -lname
functionality.
The new last name of the user being modified.
unixUserId
gsec modify -uid
functionality.
unixGroupId
gsec modify -gid
functionality.
Only information that has a corresponding parameter will be modified. To change the user name, that user must be removed from the security database and then re-added.
By default only SYSDBA is allowed to modify user information in the security database. However, no checks are made by this API to enforce this. This is strictly enforced at the database level. This would allow SYSDBA to grant update priviledges to those fields that can be updatable by end-users.
The SQL role name used for this operation is the roleName
property
inherited from the DataSource
that produced this ServerManager.
java.sql.SQLException
- if a server access error occurspublic void modifyUser(java.lang.String user, java.lang.String newPassword) throws java.sql.SQLException
This method is less general than
modifyUser(user, newUserInformation)
,
but is convenient for the common task of changing a user's password.
java.sql.SQLException
- if a server access error occurspublic void reserveSpaceForVersioning(java.lang.String database, boolean reserveSpace) throws java.sql.SQLException
This represents gfix -use full
, and
gfix -use reserve
functionality.
By default, an 80% fill ratio is used for newly created pages. If space reservation is disabled, then a 100% fill ratio is used.
The default is to reserve space for back versions in a database. It's only if the database is mostly archival (read only loosely-speaking) that no reserve space is recommended.
java.sql.SQLException
DatabaseMetaData.reservingSpaceForVersioning()
public void setDatabaseCachePages(java.lang.String database, int numCachePages) throws java.sql.SQLException
database
.
This is a persistent property of the database and is stamped
onto the database header page.
This represents gfix -buffers
functionality.
See the InterBase Operations Guide for details.
This persistent property of the database overrides
the suggestedCachePages
connection property (see
Connection Properties),
and also overrides the server-wide default set by
DATABASE_CACHE_PAGES
in the InterBase
ibconfig
startup file or by
startInterBase(defaultCachePages, defaultPageSize)
.
Upon connection, if a persistent database-wide cache pages property is not set, then the connection-wide setting is used if specified on connect, otherwise the server-wide default is used.
By default,
createDatabase
stamps a zero onto the database header page.
If this value is non-zero, it takes precedence over both the server-wide and
connection-wide settings. A connection-wide setting may be established using
the suggestedCachePages
connection property, see
DataSourceProperties,
or by DataSource.setSuggestedCachePages
.
A server-wide setting may be established using
DATABASE_CACHE_PAGES
in the InterBase
ibconfig
startup file or by
startInterBase(defaultCachedPages, defaultPageSize)
.
The SuperServer architecture allocates a separate page buffer cache per database.
There is an absolute limitation of MAX_PAGE_BUFFERS (65535) pages imposed by InterBase code. So the cache memory size for a database cannot go beyond a maximum of MAX_PAGE_BUFFERS*PageSize bytes which amounts to 512MB for an 8K page size. 8K here is the maxiumum database page size currently allowed. If this property is 0 or unspecified, and there is no server-wide or database-wide default set, the default pages used is 256 cache pages.
java.sql.SQLException
DatabaseMetaData.getActualCachePagesInUse()
,
DatabaseMetaData.getPersistentDatabaseCachePages()
public void setDatabaseReadWrite(java.lang.String database, boolean readWrite) throws java.sql.SQLException
gfix
flag for this functionality to be determined.
See the InterBase Operations Guide for details.
By default, a database is read/write.
java.sql.SQLException
DatabaseMetaData.isDatabaseReadWrite()
public void setSweepInterval(java.lang.String database, int interval) throws java.sql.SQLException
gfix -housekeeping interval
functionality.
See the InterBase Operations Guide for more details.
The default sweep interval is 20,000.
To turn off automatic sweeping altogether, set the sweep interval to 0.
java.sql.SQLException
DatabaseMetaData.getSweepInterval()
public void useSynchronousWrites(java.lang.String database, boolean synchronous) throws java.sql.SQLException
gfix -write {sync | async}
functionality.
See the InterBase Operations Guide for more details.
If writes are asynchronous then data may not be physically written to disk on a database write, since operating systems buffer disk writes. If there is a system failure before the data is written to disk, then information can be lost.
Performing synchronous writes ensures data integrity and safety, but slower performance. In particular, operations which involve data modification are slower.
There are two significant shortcomings of using asynchronous writes:
So there are risks for database corruption if async writes are being used. The window of risk is the amount of time it takes your OS to write pages to disk once we have written them out to the OS cache. While this may seem like a small window, imagine a system under full load, pages being constantly updated. At any given time you may lose power, and certain pages will not be written out, or even worse pages may be written which expect the presence of other pages.
Sometimes the loss of a page is easily recoverable, such as when a new record is added to a data page. You will merely lose that new record. Other times the damage could be more severe. Some things can be fixed by gfix -mend. If that doesn't work, sometimes data can be recovered from a damaged database by copying it to another database one table at a time. But you do have to face the possibility of complete non-recovery of the database, though this is relatively rare.
So to be safe, those using asynchronous write should use a UPS, or at the very least take a backup once a day and be prepared, in the worst case, to lose that day's changes.
java.sql.SQLException
DatabaseMetaData.usingSynchronousWrites()
public void takeOffline(java.lang.String database, boolean forceOffline, boolean blockNewConnections, boolean blockNewTransactions, int timeout) throws java.sql.SQLException
gfix -shut -force timeout
,
gfix -shut -attach timeout
,
and
gfix -shut -tran timeout
functionality.
See the InterBase Operations Guide for details.
During the timeout period, new connections and/or transactions may
be prevented from starting.
If the forceOffline
option is disabled,
then at the end of the specified timeout
period,
if there are still open connections, this method is aborted and the
database is not taken offline.
If the forceOffline
option is enabled,
then at the end of the timeout period any open transactions
are rolled back, connections are disconnected, and the
database is taken offline.
This option should only be used as a last resort.
To force an immediate database shutdown,
specify forceOffline
with a timeout
period of 0.
Only the SYSDBA user or the database owner may invoke this method. Once a database is offline, sysdba or the database owner may connect to the offline database and operate on it in the normal fashion. Other users will be denied access.
Periodically you will want to shut down a database for backups and restores. Backup saves only the current committed version of each record while also putting all the data for each relation on contiguous pages in the database. Restore will rebuild all the indices and reset the statistics for each. This usually will increase performance significantly.
java.sql.SQLException
- if a server access error occurspublic void bringOnline(java.lang.String database) throws java.sql.SQLException
gfix -online
functionality.
See the InterBase Operations Guide for more details.
java.sql.SQLException
- if a server access error occurspublic java.lang.String backup(java.lang.String database, java.lang.String[] backupFiles, int[] backupFileLengths, java.util.Map backupOptions) throws java.sql.SQLException
gbak -backup_database
functionality.
See the InterBase Operations Guide for details.
Parameter backupOptions
maps any of the following String-based keys
to String, Boolean, or Integer objects:
tapeDeviceBlockingFactor
gbak -backup_database -factor n
.
Use blocking factor n for a tape device.
nonTransportable
gbak -backup_database -nt
.
Create a non-transportable backup which may not be restored on another
machine architecture.
By default, gbak -backup_database -transportable
is used to produce
an architecture independent backup file in XDR format.
ignoreLimboTransactions
gbak -backup_database -limbo
.
Ignore limbo transactions during backup.
ignoreChecksums
gbak -backup_database -ignore
.
Ignore checksums during backup.
metaDataOnly
gbak -backup_database -metadata
.
Backup metadata only, no data.
inhibitGarbageCollection
gbak -backup_database -garbage_collect
.
Do not garbage collect during backup.
convertExternalFilesToInternalTables
gbak -backup_database -convert
.
Convert external files as internal tables.
verbose
gbak -backup_database -verify
.
Report details of the backup process.
This is the return value of the backup method.
oldDescriptions
gbak -backup_database -old_descriptions
.
Backup metadata in old-style format.
All such configuration information is optional.
Furthermore, the backupOptions
map itself may be null.
All boolean options are false
by default.
The user name and password used to obtain the ServerManager will be used to connect to the database for backup. This helps add some degree of security for this operation. Only SYSDBA or the database owner will be able to backup a database.
The SQL role name used for this operation is the roleName
property
inherited from the DataSource
that produced this ServerManager.
Under normal circumstances, when backing up a database, the backup file will always be located on the InterBase server machine since the backup service cannot open a file over a network connection. The backup service can create a remote file if the following conditions are true:
java.sql.SQLException
- if a server access error occursbackup(String,String,java.util.Map)
public java.lang.String backup(java.lang.String database, java.lang.String backupFile, java.util.Map backupOptions) throws java.sql.SQLException
See the more general
backup(database, backupFiles[], fileLengths[], infoMap)
for details.
java.sql.SQLException
- if a server access error occurspublic java.lang.String restore(java.lang.String backupFile, java.lang.String[] databaseFiles, int[] databaseFileLengths, java.util.Map restoreOptions) throws java.sql.SQLException
gbak -c[reate_database]
or
gbak -r[eplace_database]
functionality.
See the InterBase Operations Guide for details.
Parameter restoreOptions
maps any of the following String-based keys
to String, Boolean, or Integer objects:
replaceDatabase
gbak -r[eplace_database]
.
Restore database to new file or replace existing file.
By default gbak -c[reate_database]
functionality is used
so that you can restore to a new file only;
an existing database file is not replaced.
pageSize
gbak {-r|-c} -page_size
.
The default is 1024 (1K).
cachePages
gbak {-r|-c} -buffers
.
See setDatabaseCachePages()
.
deactivateIndices
gbak {-r|-c} -inactive
.
dropValidityConstraints
gbak {-r|-c} -novalidity
.
Do not restore validity constraints when restoring metadata;
allows restoration of data that would otherwise not meet
validity constraints.
noShadow
gbak {-r|-c} -kill
.
Do not restore metadata references to shadows that were previously defined.
Subsequent database operations will not be shadowed.
oneTableAtATime
gbak {-r|-c} -one_at_a_time
.
Restore one table at a time.
This is useful for partial recovery of a database that contains corrupt data.
verbose
gbak {-r|-c} -verify
.
Report details of the restore.
This is the return value of the restore method.
reserveNoSpaceForVersioning
gbak {-r|-c} -use_all_space
.
See reserveSpaceForVersioning()
.
All such configuration information is optional.
Furthermore, the restoreOptions
map itself may be null.
All boolean options are false
by default.
The user name and password inherited from the DataSource
used to obtain this ServerManager is used to connect to the database
for restore. This adds some degree of security for this operation.
The SQL role name used for this operation is the roleName
property
inherited from the DataSource
that produced this ServerManager.
java.sql.SQLException
- if a server access error occurspublic java.lang.String restore(java.lang.String backupFile, java.lang.String database, java.util.Map restoreOptions) throws java.sql.SQLException
See the more general
restore(backupFile, databaseFiles[], fileLengths[], infoMap)
for details.
java.sql.SQLException
- if a server access error occurspublic java.lang.String sweep(java.lang.String database) throws java.sql.SQLException
gfix -sweep
functionality.
See the InterBase Operations Guide for details.
Sweep does not require exclusive access, but if there are no active transactions on the database, then sweep can update certain data and transaction state information.
java.sql.SQLException
- if a server access error occurssetSweepInterval(java.lang.String, int)
public java.lang.String verify(java.lang.String database, java.util.Map verifyOptions) throws java.sql.SQLException
gfix -validate -no_update
functionality,
with other switches specified in the verifyOptions
map.
No database structures are updated.
See the InterBase Operations Guide for details.
Parameter verifyOptions
maps any of the following String-based keys
to Boolean objects:
full
gfix -validate -noupdate -full
.
This validate all records.
Without full validation, only page structures will be validated, which does
involve some limited checking of records.
ignoreChecksums
gfix -validate -noupdate -ignore
All such configuration information is optional.
Furthermore, the verifyOptions
map itself may be null.
This method will attempt to obtain exclusive access to the database. Verification requires exclusive access to ensure that database structures are not modified during validation. If there are other connections to the database, a SQLException will be thrown and the connection refused.
java.sql.SQLException
- if a server access error occurspublic java.lang.String repair(java.lang.String database, java.util.Map repairOptions) throws java.sql.SQLException
gfix -validate -mend
functionality.
See the InterBase Operations Guide for details.
Note: Clearly this cannot repair all corrupt databases in general.
Parameter repairOptions
maps any of the following String-based keys
to Boolean objects:
full
gfix -validate -mend -full
.
Validate and mend record fragments.
Without full validation, only page structures will be validated,
which does involve some limited checking of records.
ignoreChecksums
gfix -validate -mend -ignore
.
killShadows
gfix -validate -mend -kill
..
Drops any shadow files associated with the database.
sweep
gfix -validate -mend -sweep
.
Sweeps the database.
All such configuration information is optional.
Furthermore, the repairOptions
map itself may be null.
This method will attempt to obtain exclusive access to the database. Verification and repair requires exclusive access to ensure that database structures are not modified during validation. If there are other connections to the database, a SQLException will be thrown and the connection refused.
java.sql.SQLException
- if a server access error occurspublic void createShadow(java.lang.String database, java.lang.String[] shadowFiles, int[] shadowFileLengths, java.util.Map shadowProperties) throws java.sql.SQLException
Shadows are carbon copies of the database, and may be used
as a protection against hardware failures by setting up
a shadow file on a separate disk partition or even a separate machine
from the database file.
If your primary disk or server fails, the shadow file may be
activated for use as a regular database file by using
activateShadow(shadowFile)
.
On activation, the shadow is no longer a shadow but becomes
a regular database file.
Users may then reconnect to the activated shadow file as a regular
database file.
Recovering in this way from a shadow file is quicker than restoring from a backup.
Shadows can be composed of multiple files just like normal databases.
A drawback to using shadows is that it doubles the number of writes the database server must perform.
Parameter shadowProperties
maps any of the following String-based keys
to Integer objects:
pageSize
All such properties are optional.
Furthermore, the shadowProperties
map itself may be null.
See the InterBase Operations Guide for further details on shadows.
This method is a placeholder for possible future API functionality.
Currently a shadow file may only be created by executing the SQL command
CREATE SHADOW
on a connection to the database.
Reviewers Note: Are there other shadow properties that should be specified?
java.sql.SQLException
- if a server access error occurspublic void createShadow(java.lang.String database, java.lang.String shadow, java.util.Map shadowProperties) throws java.sql.SQLException
See the more general
createShadow(database, shadowFiles[], lengths[], shadowProperties)
for details.
java.sql.SQLException
- if a server access error occurspublic void activateShadow(java.lang.String shadow) throws java.sql.SQLException
gfix -activate
functionality.
See the InterBase Operations Guide for details.
Warning: Be sure the main database is offline with no attachments before activating its shadow. If a shadow is activated while the main database is online the shadow can be corrupted by existing attachments to the main database.
See the InterBase Operations Guide for further details on shadows.
java.sql.SQLException
- if a server access error occurspublic void deleteShadow(java.lang.String database) throws java.sql.SQLException
gfix -kill
functionality.
See the InterBase Operations Guide for details.
A shadow file may also be deleted by executing the SQL command
DROP SHADOW
on a connection to the database.
java.sql.SQLException
- if a server access error occurspublic void createDatabase(java.lang.String database) throws java.sql.SQLException
Parameter databaseProperties
maps any of the following String-based keys
to Boolean or Integer objects:
pageSize
reserveSpaceForVersioning
reserveSpaceForVersioning(database, boolean)
.
useSynchronousWrites
useSynchronousWrites(database, boolean)
.
cachePages
setDatabaseCachePages(database, int)
.
sweepInterval
setSweepInterval(database, int)
.
All such properties are optional.
Furthermore, the databaseProperties
map itself may be null.
All boolean configurables default to true
,
the page size defaults to 1024 (1K), the sweep interval defaults
to 20,000, and the cachePages
default stamped onto the database header page is 0.
The server-wide defaults for page size and cache pages can be configured using
DATABASE_CACHE_PAGES
in the InterBase ibconfig
startup file or
when starting the server dynamically with
ServerManager.startInterBase(defaultCachePages, defaultPageSize)
.
Note:
The SQL string CREATE DATABASE ...
cannot be executed with InterClient
because SQL is executed within the context of a Connection in JDBC.
Connectionless SQL is not allowed.
Reviewers Note: Do we need sqlDialect as an option as well?
java.sql.SQLException
- if a server access error occurspublic void deleteDatabase(java.lang.String database) throws java.sql.SQLException
java.sql.SQLException
- if a server access error occurspublic java.lang.Object[] getLimboTransactions(java.lang.String database) throws java.sql.SQLException
gfix -list
functionality.
See the InterBase Operations Guide for more details.
The object[]
array returned contains the following information:
TBD.
java.sql.SQLException
- if a server access error occurspublic void rollbackTransactions(java.lang.String database, int[] transactionIds) throws java.sql.SQLException
gfix -rollback
functionality.
See the InterBase Operations Guide for more details.
java.sql.SQLException
- if a server access error occurspublic void commitTransactions(java.lang.String database, int[] transactionIds) throws java.sql.SQLException
gfix -commit
functionality.
See the InterBase Operations Guide for more details.
java.sql.SQLException
- if a server access error occurspublic void twoPhaseCommitTransactions(java.lang.String database, int[] transactionIds) throws java.sql.SQLException
gfix -two_phase
functionality.
See the InterBase Operations Guide for more details.
java.sql.SQLException
- if a server access error occurspublic java.lang.String getStatisticsText(java.lang.String database, java.util.Map options) throws java.sql.SQLException
gstat
functionality.
See the InterBase Operations Guide for details.
Parameter options
maps the following string-based keys to Boolean objects:
header
gstat -header
functionality.
Stop reporting statistics after reporting the information on the header page.
False by default.
log
gstat -log
functionality.
Stop reporting statistics after reporting the information on the log pages.
False by default.
index
gstat -index
functionality.
Retrieve and display statistics on indexes in the database.
True by default.
data
gstat -data
functionality.
Retrieve and display statistics on data tables in the database.
True by default.
system
gstat -system
functionality.
Retrieve statistics on system tables and indexes in addition to user tables
and indices.
False by default.
Reading header information would normally not require that the server be running. However, in order to read the header information using this API, the server must be running as the logic for doing this is not in the client.
Only the SYSDBA user or the database owner may run this service.
This method is a placeholder for possible future functionality.
java.sql.SQLException
- if a server access error occurspublic java.sql.SQLWarning getWarnings() throws java.sql.SQLException
java.sql.SQLException
- if a server access error occurspublic void clearWarnings() throws java.sql.SQLException
java.sql.SQLException
- if a server access error occurspublic void close() throws java.sql.SQLException
In most cases, it is desirable to immediately release a
ServerManager connection instead of waiting for
it to be automatically released; the close
method provides this
immediate release.
Note: A ServerManager connection is automatically closed when it is garbage collected. Certain fatal errors also result in a closed ServerManager.
java.sql.SQLException
- if a server access error occurs
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


This is a test app that supports shipping and contact info delegation
Name:
Email:
Phone:
Street:
City:
State:
Country:
Zip:
Total:
N/A
N/A
Confirm
Please wait...


Join the letters and get to K!
New GameHow to play: Use your arrow keys to move the tiles. When two tiles with the same letter touch, they merge into the next letter in the alphabet! The goal is to create the letter K.
Note: This is a clone of the official open-sourced game called 2048, which is itself a clone of the game called 1024, which was already very similar to a game called Threes. The graphics in this version are inspired by our word game WordIt 2.
Created by Creative Spark Studios.


Welcome to my personal website! My name is Marco Rougeth and I'm a programmer, active member of the Brazilian Python Community and Open Source enthusiast. Currently I'm part of an awesome team at Olist.


--- title: Text analysis Star Wars author: admin date: '2020-05-28' slug: text-analysis-star-wars categories: - text analysis tags: [] subtitle: '' summary: 'Quick text analysis of Star Wars original triology movies scripts' authors: [] lastmod: '2020-05-28T17:42:06+02:00' featured: no image: caption: '' focal_point: '' preview_only: no projects: [] ---
Data source : Kaggle
library(tidyverse)
library(tidytext)
library(here)
episode <- c(4, 5, 6)
sw_list <- list.files(here("static/inputs/star wars/"), pattern = "SW") %>%
map2_dfr(episode,
~read_delim(here(paste0("static/inputs/star wars/", .x)),
delim = " ",
skip = 1,
col_names = c("line", "character", "dialogue"),
escape_backslash = TRUE,
escape_double = FALSE) %>%
mutate(episode = .y))
movies_names <- tribble(
~episode, ~episode_long, ~episode_name, ~name,
4, "Episode IV", "Episode IV: A New Hope", "A New Hope",
5, "Episode V", "Episode V: The Empire Strikes Back", "The Empire Strikes Back",
6, "Episode VI", "Episode VI: Return of the Jedi", "Return of the Jedi"
)
sw_list <- sw_list %>%
left_join(movies_names)
extrafont::loadfonts(device = "win")
library(hrbrthemes)
theme_set(theme_ipsum_ps(base_family = "IBM Plex Sans",
plot_title_family = "IBM Plex Sans SemiBold",
subtitle_family = "IBM Plex Sans Light",
strip_text_family = "IBM Plex Sans Medium",
caption_family = "IBM Plex Sans Thin"))
sw_pal <- c(
"#D4C07B",
"#605770",
"#9E7682",
"#F7C4A5",
"#4D4861",
"#439A86")
sw_list %>%
count(character, sort = TRUE) %>%
slice(1:15) %>%
ggplot(aes(n, fct_reorder(str_to_sentence(character), n))) +
geom_col(width = 0.5,
fill = "#605770") +
geom_vline(xintercept = 0) +
labs(title = "Luke and Han are speaking the most",
subtitle = "And 3-PO has more lines than the Princess !",
x = "Number of lines",
y = NULL) +
scale_x_continuous(expand = expansion(0.01)) +
theme(panel.grid.major.y = element_blank(),
panel.grid.minor = element_blank(),
legend.position = "none")
library(gt)
sw_list %>%
count(episode_name, sort = TRUE) %>%
rename("Episode" = episode_name,
"Lines" = n) %>%
gt() %>%
tab_header("The number of lines decreases a lot !") %>%
tab_style(cell_text(font = "IBM Plex Sans"),
locations = cells_body()) %>%
tab_style(cell_text(font = "IBM Plex Sans",
weight = "bold"),
locations = cells_title(groups = "title"))
| The number of lines decreases a lot ! | |
|---|---|
| Episode | Lines |
| Episode IV: A New Hope | 1010 |
| Episode V: The Empire Strikes Back | 839 |
| Episode VI: Return of the Jedi | 674 |
sw_list %>%
group_by(episode_name) %>%
count(character, sort = TRUE) %>%
slice(1:5) %>%
ungroup() %>%
mutate(character = str_to_sentence(character),
character = reorder_within(character, n, episode_name)) %>%
ggplot(aes(n, character, fill = episode_name)) +
geom_col(width = 0.5) +
geom_vline(xintercept = 0) +
scale_y_reordered() +
scale_x_continuous(expand = expansion(0.01)) +
scale_fill_manual(values = sw_pal) +
facet_wrap(~episode_name, scales = "free_y") +
labs(title = "It is mostly the nice guys speaking",
x = "Number of lines",
y = NULL) +
theme(panel.grid.major.y = element_blank(),
panel.grid.minor = element_blank(),
legend.position = "none")
sw_tokens <- sw_list %>%
unnest_tokens("word", dialogue) %>%
anti_join(stop_words)
sw_tokens %>%
count(word,sort = TRUE) %>%
filter(n >= 30) %>%
mutate(word = str_to_sentence(word)) %>%
ggplot(aes(n, fct_reorder(word, n))) +
geom_col(fill = "#d4c07b",
width = 0.5) +
geom_vline(xintercept = 0) +
scale_x_continuous(expand = expansion(mult = 0.01)) +
labs(title = "Most frequent words in Star Wars original triology...",
subtitle = "...the story of Luke",
y = NULL,
x = NULL) +
theme(panel.grid.major.y = element_blank(),
panel.grid.minor.x = element_blank())
episode_words <- sw_tokens %>%
group_by(episode, episode_name, word) %>%
summarise(n = n()) %>%
ungroup() %>%
bind_tf_idf(word, episode_name, n)
episode_words %>%
group_by(episode_name) %>%
arrange(desc(tf_idf)) %>%
slice(1:10) %>%
ungroup() %>%
mutate(word = str_to_sentence(word),
word = reorder_within(word, tf_idf, episode_name)) %>%
ggplot(aes(tf_idf, word, fill = episode_name)) +
geom_col(width = 0.5) +
geom_vline(xintercept = 0) +
scale_y_reordered() +
facet_wrap(~episode_name, scales = "free_y") +
scale_fill_manual(values = sw_pal) +
labs(title = "Which words are the most unique to each episode?",
x = "Inverse document frequency",
y = NULL) +
theme(panel.grid.major.y = element_blank(),
panel.grid.minor.x = element_blank(),
legend.position = "none")
character_words <- sw_tokens %>%
group_by(character, word) %>%
summarise(n = n()) %>%
ungroup() %>%
bind_tf_idf(word, character, n)
character_words %>%
add_count(character, wt = n, name = "total_n") %>%
filter(total_n > 500) %>%
arrange(desc(tf_idf)) %>%
group_by(character) %>%
slice(1:10) %>%
ungroup() %>%
mutate(word = str_to_sentence(word),
word = reorder_within(word, tf_idf, character)) %>%
ggplot(aes(tf_idf, word, fill = character)) +
geom_col(width = 0.5) +
geom_vline(xintercept = 0) +
scale_y_reordered() +
facet_wrap(~character, scales = "free_y") +
scale_fill_manual(values = sw_pal) +
labs(title = "Which words are the most unique to each character?",
subtitle = "Where is R2?",
x = "Inverse document frequency",
y = NULL) +
theme(panel.grid.major.y = element_blank(),
panel.grid.minor.x = element_blank(),
legend.position = "none")
sw_tokens %>%
semi_join(sw_list %>%
count(character) %>%
filter(n > 35)) %>%
group_by(character, line) %>%
summarise(n = n()) %>%
summarise(mean = mean(n)) %>%
ggplot(aes(mean, fct_reorder(str_to_sentence(character), mean))) +
geom_col(width = 0.5,
fill = "#D4C07B") +
geom_vline(xintercept = 0) +
labs(title = "Yoda sentences not only are not in order\nbut are the longest !",
subtitle = "Red Leader knows how to keep it short...",
x = "Average number of word per line",
y = NULL) +
scale_x_continuous(expand = expansion(0.01)) +
theme(panel.grid.major.y = element_blank(),
panel.grid.minor = element_blank(),
legend.position = "none")
library(widyr)
word_cor <- sw_tokens %>%
group_by(word) %>%
filter(n() > 20) %>%
pairwise_cor(word,
line,
sort = TRUE)
word_cor %>%
filter(item1 %in% c("force",
"jedi",
"father",
"skywalker")) %>%
group_by(item1) %>%
top_n(6) %>%
ungroup() %>%
mutate(item1 = str_to_sentence(item1),
item2 = str_to_sentence(item2),
item2 = reorder_within(item2, correlation, item1)) %>%
ggplot(aes(correlation, item2)) +
geom_col(width = 0.6) +
geom_vline(xintercept = 0) +
scale_y_reordered() +
scale_x_continuous(expand = expansion(0.01)) +
facet_wrap(~item1, scales = "free_y") +
labs(title = "Correlation of selected words in dialogue lines",
subtitle = "I am your Father !",
x = "Correlation",
y = NULL) +
theme(panel.grid.major.y = element_blank(),
panel.grid.minor = element_blank(),
legend.position = "none")
word_cor %>%
filter(item1 %in% c("luke",
"vader",
"han",
"leia")) %>%
group_by(item1) %>%
top_n(6) %>%
ungroup() %>%
mutate(item1 = str_to_sentence(item1),
item2 = str_to_sentence(item2),
item2 = reorder_within(item2, correlation, item1)) %>%
ggplot(aes(correlation, item2)) +
geom_col(width = 0.6) +
geom_vline(xintercept = 0) +
scale_y_reordered() +
scale_x_continuous(expand = expansion(0.01)) +
facet_wrap(~item1, scales = "free_y") +
labs(title = "Correlation of selected words in dialogue lines",
subtitle = "Vader is always a lord, Leia often a princess and Luke sometimes a Master",
x = "Correlation",
y = NULL) +
theme(panel.grid.major.y = element_blank(),
panel.grid.minor = element_blank(),
legend.position = "none")
word_cor %>%
filter(item1 %in% c("chewie",
"artoo")) %>%
group_by(item1) %>%
top_n(6) %>%
ungroup() %>%
mutate(item1 = str_to_sentence(item1),
item2 = str_to_sentence(item2),
item2 = reorder_within(item2, correlation, item1)) %>%
ggplot(aes(correlation, item2)) +
geom_col(width = 0.6) +
geom_vline(xintercept = 0) +
scale_y_reordered() +
scale_x_continuous(expand = expansion(0.01)) +
facet_wrap(~item1, scales = "free_y") +
labs(title = "Correlation of selected words in dialogue lines",
subtitle = "Chewie and R2 are being bossed around",
x = "Correlation",
y = NULL) +
theme(panel.grid.major.y = element_blank(),
panel.grid.minor = element_blank(),
legend.position = "none")