|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.nio.channels.Selector
public abstract class Selector
A multiplexor of SelectableChannel
objects.
A selector may be created by invoking the A selectable channel's registration with a selector is represented by a
The key set contains the keys representing the current
channel registrations of this selector. This set is returned by the
The selected-key set is the set of keys such that each
key's channel was detected to be ready for at least one of the operations
identified in the key's interest set during a prior selection operation.
This set is returned by the The cancelled-key set is the set of keys that have been
cancelled but whose channels have not yet been deregistered. This set is
not directly accessible. The cancelled-key set is always a subset of the
key set. All three sets are empty in a newly-created selector.
A key is added to a selector's key set as a side effect of registering a
channel via the channel's A key is added to its selector's cancelled-key set when it is cancelled,
whether by closing its channel or by invoking its Keys are added to the selected-key set by selection
operations. A key may be removed directly from the selected-key set by
invoking the set's During each selection operation, keys may be added to and removed from a
selector's selected-key set and may be removed from its key and
cancelled-key sets. Selection is performed by the Each key in the cancelled-key set is removed from each key set of
which it is a member, and its channel is deregistered. This step leaves
the cancelled-key set empty. The underlying operating system is queried for an update as to the
readiness of each remaining channel to perform any of the operations
identified by its key's interest set as of the moment that the selection
operation began. For a channel that is ready for at least one such
operation, one of the following two actions is performed: If the channel's key is not already in the selected-key set then
it is added to that set and its ready-operation set is modified to
identify exactly those operations for which the channel is now reported
to be ready. Any readiness information previously recorded in the ready
set is discarded. Otherwise the channel's key is already in the selected-key set,
so its ready-operation set is modified to identify any new operations
for which the channel is reported to be ready. Any readiness
information previously recorded in the ready set is preserved; in other
words, the ready set returned by the underlying system is
bitwise-disjoined into the key's current ready set. If any keys were added to the cancelled-key set while step (2) was
in progress then they are processed as in step (1). Whether or not a selection operation blocks to wait for one or more
channels to become ready, and if so for how long, is the only essential
difference between the three selection methods. Selectors are themselves safe for use by multiple concurrent threads;
their key sets, however, are not.
The selection operations synchronize on the selector itself, on the key
set, and on the selected-key set, in that order. They also synchronize on
the cancelled-key set during steps (1) and (3) above.
Changes made to the interest sets of a selector's keys while a
selection operation is in progress have no effect upon that operation; they
will be seen by the next selection operation.
Keys may be cancelled and channels may be closed at any time. Hence the
presence of a key in one or more of a selector's key sets does not imply
that the key is valid or that its channel is open. Application code should
be careful to synchronize and check these conditions as necessary if there
is any possibility that another thread will cancel a key or close a channel.
A thread blocked in one of the By invoking the selector's By invoking the selector's By invoking the blocked thread's The A selector's key and selected-key sets are not, in general, safe for use
by multiple concurrent threads. If such a thread might modify one of these
sets directly then access should be controlled by synchronizing on the set
itself. The iterators returned by these sets'
open
method of
this class, which will use the system's default selector provider
to
create a new selector. A selector may also be created by invoking the
openSelector
method of a custom selector provider. A selector remains open until it is
closed via its close
method.
SelectionKey
object. A selector maintains three sets of selection
keys:
keys
method. selectedKeys
method.
The selected-key set is always a subset of the key set. register
method. Cancelled keys are removed from the key set during
selection operations. The key set itself is not directly modifiable.
cancel
method. Cancelling a key will cause its channel to be deregistered
during the next selection operation, at which time the key will removed from
all of the selector's key sets.
remove
method or by invoking the remove
method
of an iterator
obtained from the
set. Keys are never removed from the selected-key set in any other way;
they are not, in particular, removed as a side effect of selection
operations. Keys may not be added directly to the selected-key set.
Selection
select()
, select(long)
, and selectNow()
methods, and involves three steps:
Concurrency
select()
or select(long)
methods may be interrupted by some other thread in one of
three ways:
wakeup
method,
close
method, or
interrupt
method, in which case its
interrupt status will be set and the selector's wakeup
method will be invoked. close
method synchronizes on the selector and all
three key sets in the same order as in a selection operation.
iterator
methods are fail-fast: If the set
is modified after the iterator is created, in any way except by invoking the
iterator's own remove
method, then a
ConcurrentModificationException
will be thrown.
SelectableChannel
,
SelectionKey
| Constructor Summary | |
|---|---|
protected |
Selector()
Initializes a new instance of this class. |
| Method Summary | |
|---|---|
abstract void |
close()
Closes this selector. |
abstract boolean |
isOpen()
Tells whether or not this selector is open. |
abstract Set<SelectionKey> |
keys()
Returns this selector's key set. |
static Selector |
open()
Opens a selector. |
abstract SelectorProvider |
provider()
Returns the provider that created this channel. |
abstract int |
select()
Selects a set of keys whose corresponding channels are ready for I/O operations. |
abstract int |
select(long timeout)
Selects a set of keys whose corresponding channels are ready for I/O operations. |
abstract Set<SelectionKey> |
selectedKeys()
Returns this selector's selected-key set. |
abstract int |
selectNow()
Selects a set of keys whose corresponding channels are ready for I/O operations. |
abstract Selector |
wakeup()
Causes the first selection operation that has not yet returned to return immediately. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected Selector()
| Method Detail |
|---|
public static Selector open() throws IOException
The new selector is created by invoking the openSelector
method
of the system-wide default SelectorProvider
object.
IOException
- If an I/O error occurspublic abstract boolean isOpen()
public abstract SelectorProvider provider()
public abstract Set<SelectionKey> keys()
The key set is not directly modifiable. A key is removed only after
it has been cancelled and its channel has been deregistered. Any
attempt to modify the key set will cause an UnsupportedOperationException
to be thrown.
The key set is not thread-safe.
ClosedSelectorException
- If this selector is closedpublic abstract Set<SelectionKey> selectedKeys()
Keys may be removed from, but not directly added to, the
selected-key set. Any attempt to add an object to the key set will
cause an UnsupportedOperationException
to be thrown.
The selected-key set is not thread-safe.
ClosedSelectorException
- If this selector is closedpublic abstract int selectNow() throws IOException
This method performs a non-blocking selection operation. If no channels have become selectable since the previous selection operation then this method immediately returns zero.
Invoking this method clears the effect of any previous invocations
of the wakeup
method.
IOException
- If an I/O error occurs
ClosedSelectorException
- If this selector is closedpublic abstract int select(long timeout) throws IOException
This method performs a blocking selection
operation. It returns only after at least one channel is selected,
this selector's wakeup
method is invoked, the current
thread is interrupted, or the given timeout period expires, whichever
comes first.
This method does not offer real-time guarantees: It schedules the
timeout as if by invoking the Object.wait(long)
method.
timeout
- If positive, block for up to timeout
milliseconds, more or less, while waiting for a
channel to become ready; if zero, block indefinitely;
must not be negative
IOException
- If an I/O error occurs
ClosedSelectorException
- If this selector is closed
IllegalArgumentException
- If the value of the timeout argument is negativepublic abstract int select() throws IOException
This method performs a blocking selection
operation. It returns only after at least one channel is selected,
this selector's wakeup
method is invoked, or the current
thread is interrupted, whichever comes first.
IOException
- If an I/O error occurs
ClosedSelectorException
- If this selector is closedpublic abstract Selector wakeup()
If another thread is currently blocked in an invocation of the
select()
or select(long)
methods then that invocation
will return immediately. If no selection operation is currently in
progress then the next invocation of one of these methods will return
immediately unless the selectNow()
method is invoked in the
meantime. In any case the value returned by that invocation may be
non-zero. Subsequent invocations of the select()
or select(long)
methods will block as usual unless this method is invoked
again in the meantime.
Invoking this method more than once between two successive selection operations has the same effect as invoking it just once.
public abstract void close() throws IOException
If a thread is currently blocked in one of this selector's selection
methods then it is interrupted as if by invoking the selector's wakeup
method.
Any uncancelled keys still associated with this selector are invalidated, their channels are deregistered, and any other resources associated with this selector are released.
If this selector is already closed then invoking this method has no effect.
After a selector is closed, any further attempt to use it, except by
invoking this method or the wakeup
method, will cause a
ClosedSelectorException
to be thrown.
IOException
- If an I/O error occurs
|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2004, 2010 Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.


6 Grades
Final grades for each semester will be calculated as follows:
- 20% Midterm
- 20% Final Exam
- 20% Homework
- 10% Participation
- 10% Free-Response Questions
- 10% First Monthly Exam
- 10% Second Monthly Exam
6.1 Course Exams
Each semester, the math department will administer two monthly exams, a midterm, and a final exam. Once the exam dates are finalized, they will be listed in the Calendar section of the course website.
6.2 Homework
Homework assignment for Calculus AB and BC will be listed in the AB Schedule and AB Schedule sections of the course website, respectively. Unless otherwise stated, assignments are due the following school day.
The schedules have three main assignment columns:
6.2.1 Khan Academy
Since I can track your progress on Khan Academy, I will not ask you to turn in assignments from Khan Academy. However, I highly recommend that you work on Khan Academy questions on paper and keep your work organized for exam review.
6.2.2 Other Homework
Other homework may include Khan Academy quizzes, AP Question Bank problems, AP Progress Check questions, and textbook problems.
For all non-Khan Academy assignments in this column, I expect the following:
Write your name, date, and period on the top-right corner of the first page. For subsequent pages, place just your name (without date/period) on the top-right corner.
On the first page, write down the assignment as the title. Example: Section 1.1 (pages 10-11, #1-36 odd)
For short questions, copy down the entire problem. For longer questions, outline the problem with enough information so that you can understand the question without referring back to the textbook. The point of copying down short problems and outlining longer problems is to allow you to reference your homework problems easily for review and exam preparation.
Any of the non-Khan Academy items under the “Other Homework” column may be collected on the following school day. You will receive full credit for all collected homework as long as you write your own homework solutions and make complete corrections with a pen when we go over solutions in class.
6.2.3 Classwork
After you finish the required homework assignments in the “Khan Academy” and “Other Homework” columns, I highly recommend that you look through the problems listed in the “Classwork (next day)” column and work through as many of them as possible. These are the problems that I will focus on class the following day, so attempting these problems beforehand will give you time to absorb the material and ask questions in class.
While classwork will not be collected for grading, working through these problems in class will constitute the majority of your participation grade.
6.3 Participation
During class, you will have the opportunity to solve problems on the board. This is not only good practice for verbal communication of mathematics but also a great way to solidify your understanding of concepts. After each time at the board, you will sign your name on a sheet so I can tally your participation frequency. As long as you maintain regular participation, you will receive full points in this area.
6.4 Free Response Questions
In class, we will work on previous free response questions that relate to the concepts that we cover in each unit. To simulate the scoring process, I will ask students to exchange free response papers to grade as I go through the solutions and assignment of points. After you receive your scored free response paper, you should use a pen with a different color to correct your mistakes to receive full credit.


Last Published: Sun Apr 30 13:41:07 CDT 2006
Extended CAS
Introduction
Configuration
Download
Release Notes
Using CAS: HOW-TO
Config via JNDI
Dummy Trust
Multiple Host Names
Project Collaboration
Google Group
Source Code (SVN)
Develoment Team
License
Issue Tracking
No issue management system is defined. Please check back at a later date.


Onyango’s Substitution Explained After Downs TKO Win
by Soccer LadumaMamelodi Sundowns suffered an early blow during their 2-1 win over Golden Arrows at the weekend, though they were still able to secure a spot in the final of the Telkom Knockout next month to face Maritzburg United.
Read: Lakay: Obviously We Want Chiefs, But...
At half-time, goalkeeper Denis Onyango was replaced by Kennedy Mweene and coach Pitso Mosimane explained after the match why the Ugandan shot-stopper had to make way for his deputy midway through the cup tie.
“He’s got a hamstring problem,” Mosimane told reporters.
“There are a lot of games and then they come from the international duty. He played two games, kept two clean sheets and he has been travelling as well. All those things contribute. Sometimes they train hard these national teams.”
Sundowns host AmaZulu at Loftus Versfeld tomorrow night as they resume their Absa Premiership campaign and look to close the gap on log leaders Kaizer Chiefs, who lead by a healthy 10 points.
It’s not clear yet whether Onyango will return to action, but the early substitution on Saturday afternoon suggests he may need more time to recover.


De Novo Settings
Precursor Mass Tolerance
The precursor mass tolerance can be set between 0 and 5.0 Da.
Fragment Mass Tolerance
The fragment mass tolerance can be set between 0 and 0.75 Da.
No. Solutions
This parameter presents the number of possible peptide suggestions for each spectrum (1-20).
The default setting is 20 solutions.
No. Threads/Cores
The number of threads is given by the number of available CPU cores by default.
This parameter is important to speed up the de novo sequencing.
Use Spectrum Precursor m/z
When activated, the given spectrum precursor m/z is used and no correction for the spectrum precursor m/z is executed.
This setting is disabled by default.
Use Spectrum Charge
When activated, the given spectrum charge is used and no correction for the spectrum charge is executed.
This setting is disabled by default.
Modifications
There are two types of modifications, fixed and variable. Fixed modifications will
be added to every residue that can be modified by the given modification, while the variable modifications
are sometimes added and sometimes not. Which type to choose depends on your experimental setup.
You can add multiple modifications of each type, but remember that the more variable modifications you
add the more complex the search becomes which increases the risk of false positives.
Initially only the most used modifications are shown. To show all modifications simply select 'All
Modifications' in the drop down menu above the list of modifications. Here you can also see more
details about each modification.
Note that PepNovo+ does not support fixed modifications on the terminals, and these will therefore be
treated as variable.
De Novo Model
PepNovo+ has been trained using a dataset based on
tryptic peptides using CID fragmentation, but should also work reasonably well for other data types. While it is
possible to train PepNovo+ using other dataset the procedure is rather complicated. If you want to support other
data types we therefore recommend contacting the PepNovo+ developers.


{% extends 'base.html' %} {% block content %}
This is a blogging web application that facilities sharing of information among people of all walks of life all over the world. Join today and share your blogs with the world!


xlink-score-spectrum
Usage:
crux xlink-score-spectrum [options] <peptide A> <peptide B> <pos A> <pos B> <link mass> <charge state> <scan number> <ms2 file>
Description:
Given a cross-linked peptide and a spectrum calculate the corresponding XCorr score a number of different ways, depending upon the xlink-score-method parameter:- composite – compute a combined XCorr score
- modification - score the two peptides separately, treating the second peptide as a variable modification on the first peptide
- concatenated - score as the concatenation of the two peptides. Note that this mode gives four scores, corresponding to the two relative orders of the peptides (AB and BA) and the modification appearing on the first or second peptide.
Input:
peptide A
– The sequence of peptide A.peptide B
– The sequence of peptide B.pos A
– Position of cross-link on peptide Apos B
– Position of cross-link on peptide Blink mass
– The mass modification of the linker when attached to a peptide.charge state
– The charge state of the peptide.scan number
– Scan number identifying the spectrum.ms2 file
– File containing spectra to be searched.
Output:
stdout
– XCorr score(s) in descending order
Options:
-
xlink-score-spectrum options
--xlink-score-method composite|modification|concatenated
– Score method for xlink {composite, modification, concatenated}. Default =composite
.
-
Search parameters
--use-flanking-peaks T|F
– Include flanking peaks around singly charged b and y theoretical ions. Each flanking peak occurs in the adjacent m/z bin and has half the intensity of the primary peak. Default =false
.
-
Fragment ion parameters
--use-a-ions T|F
– Consider a-ions in the search? Note that an a-ion is equivalent to a neutral loss of CO from the b-ion. Peak height is 10 (in arbitrary units). Default =false
.--use-b-ions T|F
– Consider b-ions in the search? Peak height is 50 (in arbitrary units). Default =true
.--use-c-ions T|F
– Consider c-ions in the search? Peak height is 50 (in arbitrary units). Default =false
.--use-x-ions T|F
– Consider x-ions in the search? Peak height is 10 (in arbitrary units). Default =false
.--use-y-ions T|F
– Consider y-ions in the search? Peak height is 50 (in arbitrary units). Default =true
.--use-z-ions T|F
– Consider z-ions in the search? Peak height is 50 (in arbitrary units). Default =false
.
-
Input and output
--verbosity <integer>
– Specify the verbosity of the current processes. Each level prints the following messages, including all those at lower verbosity levels: 0-fatal errors, 10-non-fatal errors, 20-warnings, 30-information on the progress of execution, 40-more progress information, 50-debug info, 60-detailed debug info. Default =30
.


Calling Methods¶ ↑
Calling a method sends a message to an object so it can perform some work.
In ruby you send a message to an object like this:
my_method()
Note that the parenthesis are optional:
my_method
Except when there is difference between using and omitting parentheses, this document uses parenthesis when arguments are present to avoid confusion.
This section only covers calling methods. See also the syntax documentation on defining methods.
Receiver¶ ↑
self
is the default receiver. If you don't specify any
receiver self
will be used. To specify a receiver use
.
:
my_object.my_method
This sends the my_method
message to my_object
.
Any object can be a receiver but depending on the method's visibility
sending a message may raise a NoMethodError.
You may use &.
to designate a receiver, then
my_method
is not invoked and the result is nil
when the receiver is nil
. In that case, the arguments of
my_method
are not evaluated.
You may also use ::
to designate a receiver, but this is
rarely used due to the potential for confusion with ::
for
namespaces.
Arguments¶ ↑
There are three types of arguments when sending a message, the positional arguments, keyword (or named) arguments and the block argument. Each message sent may use one, two or all types of arguments, but the arguments must be supplied in this order.
All arguments in ruby are passed by reference and are not lazily evaluated.
Each argument is separated by a ,
:
my_method(1, '2', :three)
Arguments may be an expression, a hash argument:
'key' => value
or a keyword argument:
key: value
Hash and keyword arguments must be contiguous and must appear after all positional arguments, but may be mixed:
my_method('a' => 1, b: 2, 'c' => 3)
Positional Arguments¶ ↑
The positional arguments for the message follow the method name:
my_method(argument1, argument2)
In many cases, parenthesis are not necessary when sending a message:
my_method argument1, argument2
However, parenthesis are necessary to avoid ambiguity. This will raise a SyntaxError because ruby does not know which method argument3 should be sent to:
method_one argument1, method_two argument2, argument3
If the method definition has a *argument
extra positional
arguments will be assigned to argument
in the method as an
Array.
If the method definition doesn't include keyword arguments the keyword or hash-type arguments are assigned as a single hash to the last argument:
def my_method(options) p options end my_method('a' => 1, b: 2) # prints: {'a'=>1, :b=>2}
If too many positional arguments are given, an ArgumentError is raised.
Default Positional Arguments¶ ↑
When the method defines default arguments you do not need to supply all the arguments to the method. Ruby will fill in the missing arguments in-order.
First we'll cover the simple case where the default arguments appear on the right. Consider this method:
def my_method(a, b, c = 3, d = 4) p [a, b, c, d] end
Here c
and d
have default values which ruby will
apply for you. If you send only two arguments to this method:
my_method(1, 2)
You will see ruby print [1, 2, 3, 4]
.
If you send three arguments:
my_method(1, 2, 5)
You will see ruby print [1, 2, 5, 4]
Ruby fills in the missing arguments from left to right.
Ruby allows default values to appear in the middle of positional arguments. Consider this more complicated method:
def my_method(a, b = 2, c = 3, d) p [a, b, c, d] end
Here b
and c
have default values. If you send
only two arguments to this method:
my_method(1, 4)
You will see ruby print [1, 2, 3, 4]
.
If you send three arguments:
my_method(1, 5, 6)
You will see ruby print [1, 5, 3, 6]
.
Describing this in words gets complicated and confusing. I'll describe it in variables and values instead.
First 1
is assigned to a
, then 6
is
assigned to d
. This leaves only the arguments with default
values. Since 5
has not been assigned to a value yet, it is
given to b
and c
uses its default value of
3
.
Keyword Arguments¶ ↑
Keyword arguments follow any positional arguments and are separated by commas like positional arguments:
my_method(positional1, keyword1: value1, keyword2: value2)
Any keyword arguments not given will use the default value from the method definition. If a keyword argument is given that the method did not list an ArgumentError will be raised.
Block Argument¶ ↑
The block argument sends a closure from the calling scope to the method.
The block argument is always last when sending a message to a method. A
block is sent to a method using do ... end
or { ...
}
:
my_method do # ... end
or:
my_method { # ... }
do end
has lower precedence than { }
so:
method_1 method_2 { # ... }
Sends the block to method_2
while:
method_1 method_2 do # ... end
Sends the block to method_1
. Note that in the first case if
parentheses are used the block is sent to method_1
.
A block will accept arguments from the method it was sent to. Arguments
are defined similar to the way a method defines arguments. The block's
arguments go in | ... |
following the opening do
or {
:
my_method do |argument1, argument2| # ... end
Block Local Arguments¶ ↑
You may also declare block-local arguments to a block using ;
in the block arguments list. Assigning to a block-local argument will not
override local arguments outside the block in the caller's scope:
def my_method yield self end place = "world" my_method do |obj; place| place = "block" puts "hello #{obj} this is #{place}" end puts "place is: #{place}"
This prints:
hello main this is block place is world
So the place
variable in the block is not the same
place
variable as outside the block. Removing ;
place
from the block arguments gives this result:
hello main this is block place is block
Array to Arguments Conversion¶ ↑
Given the following method:
def my_method(argument1, argument2, argument3) end
You can turn an Array into an argument list with *
(or splat)
operator:
arguments = [1, 2, 3] my_method(*arguments)
or:
arguments = [2, 3] my_method(1, *arguments)
Both are equivalent to:
my_method(1, 2, 3)
If the method accepts keyword arguments, the splat operator will convert a hash at the end of the array into keyword arguments:
def my_method(a, b, c: 3) end arguments = [1, 2, { c: 4 }] my_method(*arguments)
You may also use the **
(described next) to convert a Hash into keyword arguments.
If the number of objects in the Array do not match the number of arguments for the method, an ArgumentError will be raised.
If the splat operator comes first in the call, parentheses must be used to avoid a warning.
Hash to Keyword Arguments Conversion¶ ↑
Given the following method:
def my_method(first: 1, second: 2, third: 3) end
You can turn a Hash into keyword arguments with
the **
operator:
arguments = { first: 3, second: 4, third: 5 } my_method(**arguments)
or:
arguments = { first: 3, second: 4 } my_method(third: 5, **arguments)
Both are equivalent to:
my_method(first: 3, second: 4, third: 5)
If the method definition uses **
to gather arbitrary keyword
arguments, they will not be gathered by *
:
def my_method(*a, **kw) p arguments: a, keywords: kw end my_method(1, 2, '3' => 4, five: 6)
Prints:
{:arguments=>[1, 2, {"3"=>4}], :keywords=>{:five=>6}}
Unlike the splat operator described above, the **
operator has
no commonly recognized name.
Proc to Block Conversion¶ ↑
Given a method that use a block:
def my_method yield self end
You can convert a proc or lambda to a block argument with the
&
operator:
argument = proc { |a| puts "#{a.inspect} was yielded" } my_method(&argument)
If the splat operator comes first in the call, parenthesis must be used to avoid a warning.
Unlike the splat operator described above, the &
operator
has no commonly recognized name.
Method Lookup¶ ↑
When you send a message, Ruby looks up the method that matches the name of the message for the receiver. Methods are stored in classes and modules so method lookup walks these, not the objects themselves.
Here is the order of method lookup for the receiver's class or module
R
:
-
The prepended modules of
R
in reverse order -
For a matching method in
R
-
The included modules of
R
in reverse order
If R
is a class with a superclass, this is repeated with
R
's superclass until a method is found.
Once a match is found method lookup stops.
If no match is found this repeats from the beginning, but looking for
method_missing
. The default method_missing
is BasicObject#method_missing
which raises a NameError when invoked.
If refinements (an experimental feature) are active, the method lookup changes. See the refinements documentation for details.


It’s time to see what Twitter thinks you are into
by SururTwitter has made it increasingly difficult to use 3rd party clients for your news feed, meaning it is also more difficult to avoid their personalized algorithm and ads.
If there is one thing worse than a personalized news feed it is one that is personalized badly, based on an incorrect understanding of your interests.
Fortunately, Twitter does let you see your twitter interest list and view what it thinks you are interested in, simply by visiting:
twitter.com/settings/your_twitter_data/twitter_interests/interest .
The data appears to consist largely of items you may have searched for or liked, but also includes some pretty odd deductions by twitter’s AI (no, I’m not a fan of Pre or Post Malone).
Fortunately, Twitter allows you to easily edit the list and remove (though not add) items from the list.
In any case, see your twitter interest list and clean up your interests today and by visiting your page at twitter here.
To do the same on Google:
- Go to your Google Account.
- On the left navigation panel, click Data & personalization.
- On the Ad personalization panel, click Go to ad settings.
- Turn on Ad Personalization if it’s off.
-
Under “How your ads are personalized,” select your personal info or interests.
- To update your info, select Update. Follow the steps on the screen.
- To remove an interest, select Turn off. Confirm by selecting Turn off.
 Choose an interest and select Turn back on.
Lastly, for Facebook, go to www.facebook.com/ads/preferences .


I am running for council because I feel that my career experience serving our community and helping people resolve problems will fill the void in leadership and experience that will be coming to the Common Council. I will not be outworked. I have spent over a decade working a full-time job and raising a family while attending night school to obtain my degrees. I also feel that as the law writing legislative body of our city, there is a huge benefit to the council and community by having a practicing attorney as a member of the body.
I feel that I can provide the leadership and build the bridges that our city legislative body needs to be successful. The City has seen recent growth and revitalization over the past seven years, and keeping that momentum going, while spreading it out more broadly in our community will be a priority.
My key issues will be assisting with growth and improvement in our neighborhoods and stimulating economic growth and development without putting our city into a long-term fiscal crisis. Many parts of our city have deteriorating infrastructure ranging from crumbling sidewalks and streets to stormwater and sewage overflow breakdowns.
Our city also has a crime problem that is neither a simple nor an easy fix. It is driven by addictions, untreated mental health needs, failure of our educational systems and systemic poverty. We cannot cure all these ailments, but the city has been and should continue to work to address them. Additionally, through my work at the Juvenile Justice Center I have seen first-hand the challenges many of our youth experience that lead them to patterns of crime and drug use, and I believe we need to be proactive, in order to reduce crime and change the course of their lives before it is too late.
I am currently a solo general practicing attorney, but I actually began my working career as a ditch digger and jackhammer operator for Trans Tech Electric in the mid-1990s. In 2000, I was fortunate to secure an apprenticeship in the Electrical Workers Local 153 and continued to work in construction. Being a union electrical apprentice led me to get involved both in my union and our community. I started volunteering on community projects and helping political candidates who supported ideals that fit with those of the IBEW; economic growth, strong wages to build the middle class; equal opportunity for all races, genders and economic backgrounds; using local tax dollars to support local jobs for local workers; providing support for families and people in their time of need; and using the power of collective action to bring about positive change.
During the five years of my electrical apprenticeship, I worked on the jobsite during the day and attended apprentice classes at night. In 2005, I received my associate’s degree, and then I started attending night classes and completing online courses at IUSB, intending to work towards a Bachelor of Labor Studies and Business Management. I continued to work construction until 2009, when I was offered a full-time position in the IBEW union office as an assistant business agent and organizer. During that time, I worked on community relations and community projects, and solved problems dealing with healthcare law, pension law, construction law, labor law, employment law, and business law.
In 2012, I was offered a scholarship to Valparaiso Law School that generously covered roughly 85% of my tuition and fees. I nervously quit my job and began commuting to Valparaiso for my law courses for the next three years. I attended class all day, came home to do chores and spend time with my children, and studied late into the morning. My hard work paid off, and I finished my first semester ranked 5th in my class. Outside of class, I approached law school as another apprenticeship. I tried to get as much as “on the job” training to supplement my classes as I could. I interned and volunteered for our South Bend City legal department, for several judges in both the state and federal court systems, with the public defender’s office, and finally, with a small firm specializing in general civil and business law. I graduated in 2015 with Honors and ranked 7th in my class.
Since then, I have been a licensed attorney and have spent the past three years in general law practice. I currently own and operate my own law firm, Warner Legal Services, through which I offer a variety of legal services. I assist small businesses and working-class families with a variety of legal issues and problems. In addition, I have also served part-time public defender for the past two years, providing criminal defense to members of our community without the financial means to afford legal representation. In January 2019, I left my position as a public defender to become the attorney for the St. Joseph County Sheriff and Police Department.
I am proud to say that I have lived most of my life in South Bend. My wife of almost twenty years is the strong wonderful, amazing and spell-binding artist Erin Ambler-Warner. We have spent nineteen of our years of marriage living within the city limits, half of which have been in the Northshore Triangle neighborhood, first on the east end of Marquette Ave. and then in the 600 block of Marquette Ave. We have two fantastic, independent, strong and beautiful daughters - one who is in school at Lake Michigan College and the other who is enrolled at Clay High School.
Over the past two decades I have been involved and active in our community. I have helped coach little league softball at Chet Waggoner, donated time and money to community organizations through events such as Stuff-A-Bus, Art Beat, On the River, Re-Building Together, Habitat for Humanity and others. I have also been a regular supporter of Youth Services Bureau and the South Bend Center for Homeless.
My political involvement over the past 15 years has taken many shapes and roles on over 30 different campaigns. These experiences have ranged from assisting with small township races and local campaigns for city offices, but I have also advised and consulted with the local campaign offices for larger Congressional and Presidential campaigns, as well as advising on Pete Buttigieg’s mayoral campaigns. After 15 years of working on other people’s election campaigns, I have decided it is now time for me to run for South Bend Common Council.


Instructions For Installation
- Install the plugin
- Open new tab and visit to Amazon.com
- Click on "Allow" notifications. (Chrome will not show any notifications if you don't allow notifications)
- Click on your Cart
- Click on "Checkout Amazon Fresh Cart" or "Checkout Whole Foods Market Cart" according to your preferences
- Click "Continue" until you land "Schedule your order" page. Leave the tab open. You will get a notification when the delivery window is available.


{% extends 'base.html' %} {% block content %}
Amount: ${{ scholarship.amount }}, Upper Amount: ${{ scholarship.upperAmount }}
Deadline Month: {{ scholarship.deadlineMonth }}, Deadline Day: {{ scholarship.deadlineDay }}
{{ scholarship.description }}
Learn More


A decade on after Sidr: Damaged dams yet to be repaired
by bdnews24.comEmbankments damaged in Sidr a decade ago have not been repaired to protect the residents of the southern coastal areas from water surge.
In many areas, the construction work for the embankments started a long time ago but has still not been completed, adding sufferings and uncertainties to the lives of the coastal residents of Barguna and Bagerhat.
The severe cyclonic storm killed over 1,000 people, rendered thousands of others homeless and destroyed infrastructure on Nov 15, 2007.
The residents of the areas are still bearing the brunt of Cyclone Sidr that killed more than 800 people of Bogi, Gabtola and Southkhali villages under Bagerhat’s Sarankhola Upazila adjacent to the Sundarbans.
The Baleshwar and Bhola rivers flow over Sarankhola Upazila. The population of the upazila is about 160,000. The main source of income for the people of the region is the Sundarbans, sea, river and canal fish.
"After Sidr, we were delighted to know that the government took steps to build a dam to protect us from the tide. But the construction work has not been completed yet. We don't want any more relief,” said Mujibur Rahman Howlader, a shopkeeper in the Bogi port on the bank of Baleshwar.
Local journalist Ismail Hossain Liton told bdnews24.com that many people died in the Upazila as during high tide by Sidr, water entered through the breaches on the embankment.”
“As a result, the residents are worried once they hear any news of a disaster. The recent Cyclone Bulbul scared them.”
Southkhali Union Council Chairman Mozammel Hossain said people demanded of the administration to construct a 62 kilometres embankment along the Baleshwar and Bhairab rivers.
Later, the government took steps to meet the demand, he added.
Construction of the barrage started on Jan 23, 2016 and was expected to complete by June this year. More than 40 percent of the project has been completed, according to the local representative.
Ashraful Alam, executive engineer of the Coastal Embankment Development Project or CEIP, said a 62 km stretch of the 35/1 polder in the Sharankhola Upazila is being constructed with the World Bank’s fund.
The Tk 6.96 billion project funded by the World Bank is expected to be completed by June 2020, he said adding, "If it is built, local residents will be protected from the storm surge."
More than 38km stretch of the embankment had been damaged by the storm, said Deputy Commissioner Mostaine Billah.
Asked why the damaged embankments in the district have not been repaired yet, he said, “The dams could not be repaired due to the fund crisis. Rebuilding is not possible with the fund allotted so far. ”


{% extends "navbar2.html" %} {% block body %}
{{ lab.description }}
This site is currently under construction.


Bayern Munich ‘target Jose Mourinho appointment’ as Arsenal deny meeting
Bundesliga champions Bayern Munich axed Niko Kovac on Sunday following a damaging 5-1 defeat to Eintracht Frankfurt
by Alex HarrisBayern Munich have reportedly identified Jose Mourinho as their top target to replace Niko Kovac.
The Croatian was dismissed on Sunday following talks with CEO Karl-Heinz Rummenigge, president Uli Hoeness and sporting director Hasan Salihamidzic.
Pressure was building on Kovac as Saturday’s 5-1 thrashing at Eintracht Frankfurt continued the team’s underwhelming start to the season.
Mourinho has been out of work since leaving Manchester United last December.
He has been credited with an interest in succeeding Unai Emery at Arsenal but Bayern look set to make a play for his services, according to journalist Nicolo Schira.
Arsenal were forced to refute claims Mourinho 'dined' with Head of Football Raul Sanllehi amid growing speculation over Emery’s future.
Former Juventus boss Massimiliano Allegri and former Gooner Mikel Arteta are among the candidates to replace the Spaniard if Emirates Stadium bosses pull the trigger.
A move for Mourinho is unlikely because of his previous jibes at Arsene Wenger and the club.
Mourinho has never managed in Germany during his glittering career so the chance to sample life in the Bundesliga with Bayern could appeal.
He has also been linked with Borussia Dortmund, and ex-United midfielder Bastian Schweinsteiger claims ‘the Special One’ is curious about German football.
“In any case, I can imagine Jose Mourinho in Germany, I remember well that he always asked me about Bayern and the Bundesliga,” Schweinsteiger told Bild am Sonntag.
"He has not worked in the Bundesliga, so I can well imagine that he would be tempted by a commitment in Germany.”


A MIDWINTER'S TALE (IN THE BLEAK MIDWINTER) A film review by Steve Rhodes Copyright 1996 Steve Rhodes
RATING (0 TO ****): *** 1/2
Director and Writer Kenneth Branagh's A MIDWINTER'S TALE (called IN THE BLEAK MIDWINTER in Britain) is a wonderful celebration of the pure joy of acting. It is full of exuberant energy and literally bursts at the seams with happiness. It is a comedy that kept a smile on my face from start to finish. Since one of my least favorite movie genres is comedy especially British comedy as this one is, I was really surprised at how much I thoroughly enjoyed this film. My only problem was that I had to make myself stopping laughing out loud sometimes so that I would not miss any of the excellent dialog, and this was sometime extremely difficult.
Opening to the strains of "Why must the show go on, oh mammy", the picture tells the story of a director named Joe Harper (Michael Maloney) who wants to produce and star in a production of Hamlet. He auditions actors and actresses for the play, and these auditions are perhaps the best part of the movie. The thespians he recruits appear to be the dregs of the acting world, and each audition is hilarious. In Tom Newman's (Nicholas Farrell) interview for the part he explains to Joe that, "Hamlet isn't just Hamlet. Hamlet is me. Hamlet is Bosnia. Hamlet is the desk. Hamlet is the air. Hamlet is my grandmother." The actors appear to share a single trait - they are hungry and need the work badly. Joe solves the problem by hiring all of them.
His "friend, agent, and personal investor" Margaretta D'Arcy (Joan Collins) arranges for them to do the play in a dying town called Hope, of which it had little. They setup shop in an abandoned church that has been taken over by developers. They will live there, eat all of their meals together there, and open the play in a few weeks on Christmas Eve. A constant subplot is will they sell any tickets or will they go bust and be thrown out before opening night.
The best part of the film other than the script and the directing is Michael Maloney's acting. He is so infectiously happy and naive that you begin to feel sorry for him since the actors he has to work with are the pits. Eventually they will become a team and more than that a family, and it is this considerable camaraderie that gives the audience such a warm feeling of joy.
Nina Raymond (Julia Sawalha), who plays Ophelia, is not optimistic on their chances of getting kids out on Christmas Eve to see Hamlet. She asks, what are we going to tell them, "Hello kids, do stop watching The Mighty Morphin Power Rangers and see a four hundred year old play about depressed aristocrats." I nearly fell over in my seat when she delivered that line.
All of Joe's happiness finally begins to crumble when opening night draws nigh and the play is not coming together.  Branagh creates Joe as a director with whom the audience easily empathizes. You want such an incredibly energetic, albeit naive, guy to succeed no matter how small the odds.
After initial bickering, the cast finally comes together. When Joe's sister Molly (Hetta Charnley) is worried about forgetting her lines, Carnforth (Gerard Horan) advises her to do what he always does. He tells her, "If I forget my lines in Shakespeare, I always say, 'crouch we here a while' and wait."
The casts thinks the set decorator is named Vag (Celia Imrie). Carnforth tells her he is glad she uses her nickname. She then corrects them telling them that her name is Fadge. She lets Molly call her Pher, which Molly says she appreciates but that Pher is even harder to say than Fadge. Fadge is a great quirky little character who keeps the cast guessing as to what the set will look like. Eventually they come to believe she is such a minimalist that the set may have no external manifestations at all. I will not spoil it by describing what she decides. It is major funny.
The cast in the show is great from top to bottom. I can only scratch the surface with this review. As well as the ones above, there is Henry (Richard Briers), Vernon (Mark Hadfield), Nancy (Jennifer Saunders), Terry (John Sessions), Tim (James White), and Mortimer (Robert Hines) among others.
The movie is filmed in a low contrast and a little hazy black and white by Roger Lanser. I thought this look worked very well with the material. The sets by Tim Harvey and the costumes by Caroline Harris are suitably hokey.
A MIDWINTER'S TALE flies by at 1:39 thanks to crisp editing by Neil Farrell. It is incorrectly rated R for a tiny bit of bad language. There is no sex, nudity, or violence of any kind. I would class the film as a mild PG-13 and would have no trouble taking a kid of any age who was genuinely interested in the theater to it. This is an energetic, funny, but not slapstick comedy. It makes you feel good to be alive and reminds you what is special about the acting profession. I recommend it to everyone highly and award it *** 1/2.
**** = One of the top few films of this or any year. A must see film. *** = Excellent show. Look for it. ** = Average movie. Kind of enjoyable. * = Poor show.  Totally unbearable.
REVIEW WRITTEN ON: February 27, 1996
Opinions expressed are mine and not meant to reflect my employer's.
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


We are your number one choice in-house mobile carwash services for a few select apartment communities located in west Houston. Don't have time to drive, and then WAIT at the carwash? Choose your apartment complex, find the day that we will be in your community, schedule, and sit back and relax, sleep in, lounge by the pool, whatever, while we clean your ride!
Choose from one of our three services below:


Displaying the AST
The Access command tree print takes an ast_node and prints a graphical representation of the node and its descendants, for example:
tree print [data node main]
returns
function_def 13809 4976 : ‘int main (arg ... warning */ }’
ast_declspec 13809 3 : ‘int’
function_decl 13813 17 : ‘main (argc, argv)’
| global_id 13813 4 : ‘main’
| parm_decl 13835 9 : ‘int argc;’
| | ast_declspec 13835 3 : ‘int’
| | local_id 13839 4 : ‘argc’
| parm_decl 13849 12 : ‘char **argv;’
| ast_declspec 13849 4 : ‘char’
| local_id 13856 4 : ‘argv’
ast_block 13862 4923 : ‘{ int fil ... warning */ }’
list_decl 13868 15 : ‘int file_count;’
| ast_declspec 13868 3 : ‘int’
| var_decl 13872 11 : ‘file_count;’
| local_id 13872 10 : ‘file_count’
list_decl 13925 12 : ‘int proglen;’
| ast_declspec 13925 3 : ‘int’
| var_decl 13929 8 : ‘proglen;’
| local_id 13929 7 : ‘proglen’
[...]
Here you see the function definition for main: its return type followed by its signature, which in turn is made up of its name and full specifications of its parameters. The body of the function follows, starting with the local variable declarations.
The tree print command is essential for understanding and debugging TPM scripts. C++ in particular is a rich language with many subtleties; often the easiest way to build a TPM expression to match a construct is to take a sample of that construct to understand its exact structure.


CountdownEvent Class
Package: @esfx/threading-countdown
Declaration
export declare class CountdownEvent implements Disposable
Constructors
constructor(initialCount)
Constructs a new instance of the CountdownEvent
class
Declaration
constructor(initialCount: number);
Parameters
- initialCount
- number
constructor(buffer, byteOffset)
Constructs a new instance of the CountdownEvent
class
Declaration
constructor(buffer: SharedArrayBuffer, byteOffset?: number);
Parameters
- buffer
- SharedArrayBuffer
- byteOffset
- number
Properties
buffer
Gets the SharedArrayBuffer
for this object.
Declaration
get buffer(): SharedArrayBuffer;
Property Value
byteLength
Gets the number of bytes occupied by this object in its buffer.
Declaration
get byteLength(): number;
Property Value
byteOffset
Gets the byte offset of this object in its buffer.
Declaration
get byteOffset(): number;
Property Value
initialCount
Gets the number of participants initially required to signal the event.
Declaration
get initialCount(): number;
Property Value
isSet
Gets a value indicating whether the event is signaled (all participants are accounted for).
Declaration
get isSet(): boolean;
Property Value
remainingCount
Gets the number of remaining participants required to signal the event.
Declaration
get remainingCount(): number;
Property Value
SIZE
Declaration
static readonly SIZE = 12;
Methods
[Disposable.dispose]()
Releases all resources for this object.
Declaration
[Disposable.dispose](): void;
Returns
add(count)
Adds one or more required participants to the event.
Declaration
add(count?: number): void;
Parameters
- count
- number
Returns
close()
Releases all resources for this object.
Declaration
close(): void;
Returns
reset(count)
Resets the countdown to the specified count.
Declaration
reset(count?: number): void;
Parameters
- count
- number
The new number of participants required. If this is undefined
, the current value of initialCount
is used.
Returns
signal(count)
Signals a participant is ready, decrementing the number of remaining required participants by the provided value.
Declaration
signal(count?: number): boolean;
Parameters
Returns
true
if all participants were accounted for and the event became signaled; otherwise, false
.
tryAdd(count)
Adds one or more required participants to the event if the event is not already signaled.
Declaration
tryAdd(count?: number): boolean;
Parameters
- count
- number
Returns
true
if the participants were added; otherwise, false
.
wait(ms)
Blocks the current thread until the countdown is set.
Declaration
wait(ms?: number): boolean;
Parameters
Returns
true
if the event was signaled before the timeout period elapsed; otherwise, false
.


Practice
What is your home state?
Wyoming
Utah
Idaho
Montana
Colorado
Your HomeStyle
Single
Apartment
Multi-Family
Mobile Home
Run script


Create a password, user determines length, which characters, letters, numbers are included. A password is chosen at random.
Take me to the repo!Current weather and 5 day forecast displayed with a special UV Indext indicator. This app utilizes various APIs to gather all data as well as local storage to see a list of previously searched cities.
Take me to the repo!Command-line application that takes in information about employees on a software engineering team, then generates an HTML webpage that displays summaries for each person.
Take me to the repo!Employee Management System allows a business owner to organize and plan their business by viewing and managing the departments, roles, and employees in my company.
Take me to the repo!An application that can be used to write and save notes. write and save notes. The notes can help organize and keep track of tasks I need to complete. This application will use an Express.js back end and will save and retrieve note data from a JSON file.
Take me to the repo!


iOS and Android Application for Childcare Employees - Norway
- Implemented application for managing children and childcare operations.
- iOS technologies: MagicalRecord (CoreData), Push notifications, Mantle, Masonry, AFNetworking
- Android technologies: Bolts, OhHttp, Gradle, Gson, Push notifications
Family of iOS Applications for Childcare and School Parents - Norway
- Designed architecture and developed multi-modular family of iOS applications with cocoapods and project-level customizable appearance.
- Incorporated Continuous Integration and Delivery with Jenkins and automated test builds deployed to Hockey App.
iOS Application for Construction Site Teams - Norway
- Implemented app based on JSON-configured forms for project reporting with offline request caching.
- Technologies: FMDB, AFNetworking, QuickDialog, Push notifications
iOS Application for Health Monitoring – Norway
- Implemented health monitoring graphs and scheduled reminders with local notifications.
iOS and Android Application for the 2013 “Slottsfjell” Festival – Norway
- Added location based augmented reality for festival spots and Google maps with festival sections and Points of Interest.
iOS Application for Drawing and Creation of Multimedia Slides – Perú
- Implemented brush drawing with softening algorithm, image and text manipulation, layer blending, sound recording and playback, video creation and youtube integration.
Other iOS and Android Apps
- RESTful service consumption, JSON manipulation, image caching, CoreData and SQLite, custom drawn UIViews and Canvas.


|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.imageio.spi.IIOServiceProvider javax.imageio.spi.ImageReaderWriterSpi
public abstract class ImageReaderWriterSpi
A superclass containing instance variables and methods common to
ImageReaderSpi
and ImageWriterSpi
.
IIORegistry
,
ImageReaderSpi
,
ImageWriterSpi
| Field Summary | |
|---|---|
protected String[] |
extraImageMetadataFormatClassNames
An array of String s containing the class names of
any additional image metadata formats supported by this
plug-in, initially null . |
protected String[] |
extraImageMetadataFormatNames
An array of String s containing the names of any
additional image metadata formats supported by this plug-in,
initially null . |
protected String[] |
extraStreamMetadataFormatClassNames
An array of String s containing the class names of
any additional stream metadata formats supported by this plug-in,
initially null . |
protected String[] |
extraStreamMetadataFormatNames
An array of String s containing the names of any
additional stream metadata formats supported by this plug-in,
initially null . |
protected String[] |
MIMETypes
An array of strings to be returned from getMIMETypes , initially null . |
protected String[] |
names
An array of strings to be returned from getFormatNames , initially null . |
protected String |
nativeImageMetadataFormatClassName
A String containing the class name of the
native stream metadata format supported by this plug-in,
initially null . |
protected String |
nativeImageMetadataFormatName
A String containing the name of the
native stream metadata format supported by this plug-in,
initially null . |
protected String |
nativeStreamMetadataFormatClassName
A String containing the class name of the native
stream metadata format supported by this plug-in, initially
null . |
protected String |
nativeStreamMetadataFormatName
A String containing the name of the native stream
metadata format supported by this plug-in, initially
null . |
protected String |
pluginClassName
A String containing the name of the associated
plug-in class, initially null . |
protected String[] |
suffixes
An array of strings to be returned from getFileSuffixes , initially null . |
protected boolean |
supportsStandardImageMetadataFormat
A boolean indicating whether this plug-in supports the standard metadata format for image metadata, initially false . |
protected boolean |
supportsStandardStreamMetadataFormat
A boolean indicating whether this plug-in supports the standard metadata format for stream metadata, initially false . |
| Fields inherited from class javax.imageio.spi.IIOServiceProvider |
|---|
vendorName, version |
| Constructor Summary | |
|---|---|
ImageReaderWriterSpi()
Constructs a blank ImageReaderWriterSpi . |
|
ImageReaderWriterSpi(String vendorName,
String version,
String[] names,
String[] suffixes,
String[] MIMETypes,
String pluginClassName,
boolean supportsStandardStreamMetadataFormat,
String nativeStreamMetadataFormatName,
String nativeStreamMetadataFormatClassName,
String[] extraStreamMetadataFormatNames,
String[] extraStreamMetadataFormatClassNames,
boolean supportsStandardImageMetadataFormat,
String nativeImageMetadataFormatName,
String nativeImageMetadataFormatClassName,
String[] extraImageMetadataFormatNames,
String[] extraImageMetadataFormatClassNames)
Constructs an ImageReaderWriterSpi with a given
set of values. |
| Method Summary | |
|---|---|
String[] |
getExtraImageMetadataFormatNames()
Returns an array of String s containing the names
of additional document formats, other than the native and
standard formats, recognized by the
getAsTree and setFromTree methods on
the image metadata objects produced or consumed by this
plug-in. |
String[] |
getExtraStreamMetadataFormatNames()
Returns an array of String s containing the names
of additional document formats, other than the native and
standard formats, recognized by the
getAsTree and setFromTree methods on
the stream metadata objects produced or consumed by this
plug-in. |
String[] |
getFileSuffixes()
Returns an array of String s containing a list of
file suffixes associated with the formats that are generally
usable by the ImageReader or
ImageWriter implementation associated with this
service provider. |
String[] |
getFormatNames()
Returns an array of String s containing
human-readable names for the formats that are generally usable
by the ImageReader or ImageWriter
implementation associated with this service provider. |
IIOMetadataFormat |
getImageMetadataFormat(String formatName)
Returns an IIOMetadataFormat object describing the
given image metadata format, or null if no
description is available. |
String[] |
getMIMETypes()
Returns an array of String s containing a list of
MIME types associated with the formats that are generally
usable by the ImageReader or
ImageWriter implementation associated with this
service provider. |
String |
getNativeImageMetadataFormatName()
Returns the name of the "native" image metadata format for this plug-in, which typically allows for lossless encoding and transmission of the image metadata stored in the format handled by this plug-in. |
String |
getNativeStreamMetadataFormatName()
Returns the name of the "native" stream metadata format for this plug-in, which typically allows for lossless encoding and transmission of the stream metadata stored in the format handled by this plug-in. |
String |
getPluginClassName()
Returns the fully-qualified class name of the ImageReader or ImageWriter plug-in
associated with this service provider. |
IIOMetadataFormat |
getStreamMetadataFormat(String formatName)
Returns an IIOMetadataFormat object describing the
given stream metadata format, or null if no
description is available. |
boolean |
isStandardImageMetadataFormatSupported()
Returns true if the standard metadata format is
among the document formats recognized by the
getAsTree and setFromTree methods on
the image metadata objects produced or consumed by this
plug-in. |
boolean |
isStandardStreamMetadataFormatSupported()
Returns true if the standard metadata format is
among the document formats recognized by the
getAsTree and setFromTree methods on
the stream metadata objects produced or consumed by this
plug-in. |
| Methods inherited from class javax.imageio.spi.IIOServiceProvider |
|---|
getDescription, getVendorName, getVersion, onDeregistration, onRegistration |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected String[] names
getFormatNames
, initially null
.
Constructors should set this to a non-null
value.
protected String[] suffixes
getFileSuffixes
, initially null
.
protected String[] MIMETypes
getMIMETypes
, initially null
.
protected String pluginClassName
String
containing the name of the associated
plug-in class, initially null
.
protected boolean supportsStandardStreamMetadataFormat
false
.
protected String nativeStreamMetadataFormatName
String
containing the name of the native stream
metadata format supported by this plug-in, initially
null
.
protected String nativeStreamMetadataFormatClassName
String
containing the class name of the native
stream metadata format supported by this plug-in, initially
null
.
protected String[] extraStreamMetadataFormatNames
String
s containing the names of any
additional stream metadata formats supported by this plug-in,
initially null
.
protected String[] extraStreamMetadataFormatClassNames
String
s containing the class names of
any additional stream metadata formats supported by this plug-in,
initially null
.
protected boolean supportsStandardImageMetadataFormat
false
.
protected String nativeImageMetadataFormatName
String
containing the name of the
native stream metadata format supported by this plug-in,
initially null
.
protected String nativeImageMetadataFormatClassName
String
containing the class name of the
native stream metadata format supported by this plug-in,
initially null
.
protected String[] extraImageMetadataFormatNames
String
s containing the names of any
additional image metadata formats supported by this plug-in,
initially null
.
protected String[] extraImageMetadataFormatClassNames
String
s containing the class names of
any additional image metadata formats supported by this
plug-in, initially null
.
| Constructor Detail |
|---|
public ImageReaderWriterSpi(String vendorName, String version, String[] names, String[] suffixes, String[] MIMETypes, String pluginClassName, boolean supportsStandardStreamMetadataFormat, String nativeStreamMetadataFormatName, String nativeStreamMetadataFormatClassName, String[] extraStreamMetadataFormatNames, String[] extraStreamMetadataFormatClassNames, boolean supportsStandardImageMetadataFormat, String nativeImageMetadataFormatName, String nativeImageMetadataFormatClassName, String[] extraImageMetadataFormatNames, String[] extraImageMetadataFormatClassNames)
ImageReaderWriterSpi
with a given
set of values.
vendorName
- the vendor name, as a non-null
String
.version
- a version identifier, as a non-null
String
.names
- a non-null
array of
String
s indicating the format names. At least one
entry must be present.suffixes
- an array of String
s indicating the
common file suffixes. If no suffixes are defined,
null
should be supplied. An array of length 0
will be normalized to null
.MIMETypes
- an array of String
s indicating
the format's MIME types. If no MIME types are defined,
null
should be supplied. An array of length 0
will be normalized to null
.pluginClassName
- the fully-qualified name of the
associated ImageReader
or ImageWriter
class, as a non-null
String
.supportsStandardStreamMetadataFormat
- a
boolean
that indicates whether a stream metadata
object can use trees described by the standard metadata format.nativeStreamMetadataFormatName
- a
String
, or null
, to be returned from
getNativeStreamMetadataFormatName
.nativeStreamMetadataFormatClassName
- a
String
, or null
, to be used to instantiate
a metadata format object to be returned from
getNativeStreamMetadataFormat
.extraStreamMetadataFormatNames
- an array of
String
s, or null
, to be returned from
getExtraStreamMetadataFormatNames
. An array of length
0 is normalized to null
.extraStreamMetadataFormatClassNames
- an array of
String
s, or null
, to be used to instantiate
a metadata format object to be returned from
getStreamMetadataFormat
. An array of length
0 is normalized to null
.supportsStandardImageMetadataFormat
- a
boolean
that indicates whether an image metadata
object can use trees described by the standard metadata format.nativeImageMetadataFormatName
- a
String
, or null
, to be returned from
getNativeImageMetadataFormatName
.nativeImageMetadataFormatClassName
- a
String
, or null
, to be used to instantiate
a metadata format object to be returned from
getNativeImageMetadataFormat
.extraImageMetadataFormatNames
- an array of
String
s to be returned from
getExtraImageMetadataFormatNames
. An array of length 0
is normalized to null
.extraImageMetadataFormatClassNames
- an array of
String
s, or null
, to be used to instantiate
a metadata format object to be returned from
getImageMetadataFormat
. An array of length
0 is normalized to null
.
IllegalArgumentException
- if vendorName
is null
.
IllegalArgumentException
- if version
is null
.
IllegalArgumentException
- if names
is null
or has length 0.
IllegalArgumentException
- if pluginClassName
is null
.public ImageReaderWriterSpi()
ImageReaderWriterSpi
. It is up
to the subclass to initialize instance variables and/or
override method implementations in order to provide working
versions of all methods.
| Method Detail |
|---|
public String[] getFormatNames()
String
s containing
human-readable names for the formats that are generally usable
by the ImageReader
or ImageWriter
implementation associated with this service provider. For
example, a single ImageReader
might be able to
process both PBM and PNM files.
null
array of String
s
or length at least 1 containing informal format names
associated with this reader or writer.public String[] getFileSuffixes()
String
s containing a list of
file suffixes associated with the formats that are generally
usable by the ImageReader
or
ImageWriter
implementation associated with this
service provider. For example, a single
ImageReader
might be able to process files with
'.pbm' and '.pnm' suffixes, or both '.jpg' and '.jpeg'
suffixes. If there are no known file suffixes,
null
will be returned.
Returning a particular suffix does not guarantee that files with that suffix can be processed; it merely indicates that it may be worthwhile attempting to decode or encode such files using this service provider.
String
s or length at least 1
containing common file suffixes associated with this reader or
writer, or null
.public String[] getMIMETypes()
String
s containing a list of
MIME types associated with the formats that are generally
usable by the ImageReader
or
ImageWriter
implementation associated with this
service provider.
Ideally, only a single MIME type would be required in order
to describe a particular format. However, for several reasons
it is necessary to associate a list of types with each service
provider. First, many common image file formats do not have
standard MIME types, so a list of commonly used unofficial
names will be required, such as image/x-pbm
and
image/x-portable-bitmap
. Some file formats have
official MIME types but may sometimes be referred to using
their previous unofficial designations, such as
image/x-png
instead of the official
image/png
. Finally, a single service provider may
be capable of parsing multiple distinct types from the MIME
point of view, for example image/x-xbitmap
and
image/x-xpixmap
.
Returning a particular MIME type does not guarantee that files claiming to be of that type can be processed; it merely indicates that it may be worthwhile attempting to decode or encode such files using this service provider.
String
s or length at least 1
containing MIME types associated with this reader or writer, or
null
.public String getPluginClassName()
ImageReader
or ImageWriter
plug-in
associated with this service provider.
null
String
.public boolean isStandardStreamMetadataFormatSupported()
true
if the standard metadata format is
among the document formats recognized by the
getAsTree
and setFromTree
methods on
the stream metadata objects produced or consumed by this
plug-in.
true
if the standard format is supported
for stream metadata.public String getNativeStreamMetadataFormatName()
null
will be returned.
The default implementation returns the
nativeStreamMetadataFormatName
instance variable,
which is typically set by the constructor.
null
.public String[] getExtraStreamMetadataFormatNames()
String
s containing the names
of additional document formats, other than the native and
standard formats, recognized by the
getAsTree
and setFromTree
methods on
the stream metadata objects produced or consumed by this
plug-in.
If the plug-in does not handle metadata, null should be returned.
The set of formats may differ according to the particular images being read or written; this method should indicate all the additional formats supported by the plug-in under any circumstances.
The default implementation returns a clone of the
extraStreamMetadataFormatNames
instance variable,
which is typically set by the constructor.
String
s, or null.IIOMetadata.getMetadataFormatNames()
,
getExtraImageMetadataFormatNames()
,
getNativeStreamMetadataFormatName()
public boolean isStandardImageMetadataFormatSupported()
true
if the standard metadata format is
among the document formats recognized by the
getAsTree
and setFromTree
methods on
the image metadata objects produced or consumed by this
plug-in.
true
if the standard format is supported
for image metadata.public String getNativeImageMetadataFormatName()
null
will be returned.
The default implementation returns the
nativeImageMetadataFormatName
instance variable,
which is typically set by the constructor.
null
.getExtraImageMetadataFormatNames()
public String[] getExtraImageMetadataFormatNames()
String
s containing the names
of additional document formats, other than the native and
standard formats, recognized by the
getAsTree
and setFromTree
methods on
the image metadata objects produced or consumed by this
plug-in.
If the plug-in does not handle image metadata, null should be returned.
The set of formats may differ according to the particular images being read or written; this method should indicate all the additional formats supported by the plug-in under any circumstances.
The default implementation returns a clone of the
extraImageMetadataFormatNames
instance variable,
which is typically set by the constructor.
String
s, or null.IIOMetadata.getMetadataFormatNames()
,
getExtraStreamMetadataFormatNames()
,
getNativeImageMetadataFormatName()
public IIOMetadataFormat getStreamMetadataFormat(String formatName)
IIOMetadataFormat
object describing the
given stream metadata format, or null
if no
description is available. The supplied name must be the native
stream metadata format name, the standard metadata format name,
or one of those returned by
getExtraStreamMetadataFormatNames
.
formatName
- the desired stream metadata format.
IIOMetadataFormat
object.
IllegalArgumentException
- if formatName
is null
or is not a supported name.public IIOMetadataFormat getImageMetadataFormat(String formatName)
IIOMetadataFormat
object describing the
given image metadata format, or null
if no
description is available. The supplied name must be the native
iamge metadata format name, the standard metadata format name,
or one of those returned by
getExtraImageMetadataFormatNames
.
formatName
- the desired image metadata format.
IIOMetadataFormat
object.
IllegalArgumentException
- if formatName
is null
or is not a supported name.
|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2004, 2010 Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.


You have a problem that you want to solve by assigning values to data. The values will have some interrelated constraints. You attempt to solve it by assigning all possible values to the first piece of data. When you assign a value, you make a recursive call to solve the rest of the problem. If successful, you're done. However, if solving the rest of the problem is unsuccessful, then you'll be alerted to this fact when the recursive call returns. You then remove the value that you have assigned, and assign the next value.
The example problem that we'll work on is Sudoku. A Sudoku puzzle is a 9x9 grid of numbers between 1 and 9. You are given a grid that is partially filled in, and your job is to fill the rest of the grid in so that:
Example Problem | Example Solution |
#include <vector> #include <iostream> using namespace std; class Sudoku { public: Sudoku(); void Print_Screen(); void Print_Convert(); int Solve(); protected: int Is_Row_Valid(int r); int Is_Col_Valid(int c); int Is_Panel_Valid(int sr, int sc); int Recursive_Solve(int r, int c); vector <string> Grid; vector <int> checker; }; |
Let's define the public methods:
#include <cstdio> #include <cstdlib> #include "sudoku.h" void usage(string s) { cerr << "usage: sudoku solve(yes|no) output-type(screen|convert) - puzzle on stdin\n"; if (s != "") cerr << s << endl; exit(0); } main(int argc, char **argv) { string solve, output; Sudoku *sud; if (argc != 3) usage(""); solve = argv[1]; output = argv[2]; if (solve != "yes" && solve != "no") usage("bad solve"); if (output != "screen" && output != "convert") usage("bad output"); sud = new Sudoku; if (solve == "yes") { if (!sud->Solve()) { printf("Cannot solve puzzle\n"); exit(0); } } if (output == "screen") { sud->Print_Screen(); } else { sud->Print_Convert(); } exit(0); } |
We start with sudoku1.cpp, which simply defines dummy implementations for all the methods. It compiles, but doesn't do anything. If you try to "solve" the puzzle, it will say that there is no solution:
UNIX> sudoku1 usage: sudoku solve(yes|no) output-type(screen|convert) - puzzle on stdin UNIX> sudoku1 no screen UNIX> sudoku1 yes convert Cannot solve puzzle UNIX>
#include <cstdio> #include <cstdlib> #include "sudoku.h" Sudoku::Sudoku() { int i, j; char c; Grid.resize(9); for (i = 0; i < 9; i++) { for (j = 0; j < 9; j++) { if (!(cin >> c)) { cerr << "Bad Sudoku File -- not enough entries\n"; exit(1); } if (c == '-' || (c >= '0' && c <= '9')) { Grid[i].push_back(c); } else { cerr << "Bad Sudoku File -- entry: " << c << endl; exit(1); } } } } void Sudoku::Print_Screen() { int i, j; for (i = 0; i < Grid.size(); i++) { for (j = 0; j < Grid[i].size(); j++) { if (j != 0) printf(" "); printf("%c ", Grid[i][j]); if (j == 2 || j == 5) printf(" "); } printf("\n"); if (i == 2 || i == 5) printf("\n"); } } |
I have three example puzzles in example1.txt, example2.txt and example3.txt. The last one is the one pictured above.
 However, this is more efficient. The constructor now checks the input's rows and columns for validity. I only include the code for Is_Row_Valid(). Is_Col_Valid() is similar.
int Sudoku::Is_Row_Valid(int r) { int i; for (i = '0'; i <= '9'; i++) checker[i] = 0; for (i = 0; i < 9; i++) { if (Grid[r][i] != '-') { if (checker[Grid[r][i]]) return 0; checker[Grid[r][i]] = 1; } } return 1; } |
We can now identify that bad2.txt and bad3.txt are indeed bad:
UNIX> make sudoku3 g++ -c -o sudoku3.o sudoku3.cpp g++ -o sudoku3 sudoku_main.o sudoku3.o UNIX> sudoku3 no screen < bad2.txt Bad Sudoku File -- Bad row 5 UNIX> sudoku3 no screen < bad3.txt Bad Sudoku File -- Bad col 6 UNIX>
int Sudoku::Is_Panel_Valid(int sr, int sc) { int r, c, i; for (i = '0'; i <= '9'; i++) checker[i] = 0; for (r = sr; r < sr+3; r++) { for (c = sc; c < sc+3; c++) { if (Grid[r][c] != '-') { if (checker[Grid[r][c]]) return 0; checker[Grid[r][c]] = 1; } } } return 1; } |
Now we can identify that bad4.txt is bad:
UNIX> make sudoku4 g++ -c -o sudoku4.o sudoku4.cpp g++ -o sudoku4 sudoku_main.o sudoku4.o UNIX> sudoku4 no screen < bad4.txt Bad Sudoku File -- Bad panel starting at row 6 col 6 UNIX>
int Sudoku::Solve() { return Recursive_Solve(0, 0); } |
We will go over each part of Recursive_Solve() separately. The first part of it checks successive elements of the grid until it gets to the end of the grid, or it gets to a dash character. If it reaches the end of the grid, then the puzzle is solved, and it returns 1. Those are C-style comments, by the way. I'm an old man.
int Sudoku::Recursive_Solve(int r, int c) { int i; /* Skip all non-dash characters */ while (r < 9 && Grid[r][c] != '-') { c++; if (c == 9) { r++; c = 0; } } /* Base case -- we're done */ if (r == 9) return 1; |
Next comes the recursive part. Once we've found a dash, we try to insert each value from '1' to '9'. When we insert a value, we test to see if the value's row, column and panel are valid. If so, then we call the solver recursively. We do that on r and c, because the recursive solver will skip over that element, now that it is no longer a dash. If the recursive solver returns 1, then we have found a solution, and we return one:
/* Try each value. If successful, then return true. */ for (i = '1'; i <= '9'; i++) { Grid[r][c] = i; if (Is_Row_Valid(r) && Is_Col_Valid(c) && Is_Panel_Valid(r-r%3, c-c%3) && Recursive_Solve(r, c)) { return 1; } } |
If we fall out of the for loop, that means that there was no solution. Therefore, we reset the element to a dash, and return 0. That way, the calling function can try another value and continue. If r and c are zero, the calling function is Solve(), and it will return that there is no solution to the puzzle:
/* If unsuccessful, reset the element and return false. */ Grid[r][c] = '-'; return 0; } |
See how recursion makes this complex process of trying and backtracking so simple? There is no explicit backtracking really -- the important part is that if the recursive solver fails, it restores the state of the grid to the state when it was called, so that the caller can try something new.
When we run this, it solves the puzzles:
UNIX> sudoku5 yes screen < example1.txt 9 6 3 1 7 4 2 5 8 1 7 8 3 2 5 6 4 9 2 5 4 6 8 9 7 3 1 8 2 1 4 3 7 5 9 6 4 9 6 8 5 2 3 1 7 7 3 5 9 6 1 8 2 4 5 8 9 7 1 3 4 6 2 3 1 7 2 4 6 9 8 5 6 4 2 5 9 8 1 7 3 UNIX> sudoku5 yes screen < example2.txt 4 3 6 7 2 8 5 1 9 9 2 5 3 1 4 6 7 8 1 7 8 5 9 6 2 3 4 8 6 9 1 5 7 3 4 2 3 5 2 6 4 9 1 8 7 7 4 1 2 8 3 9 5 6 6 1 4 8 3 2 7 9 5 5 8 7 9 6 1 4 2 3 2 9 3 4 7 5 8 6 1 UNIX> sudoku5 yes screen < example3.txt 1 3 7 8 9 4 6 5 2 5 8 2 6 7 1 3 9 4 4 6 9 3 5 2 1 8 7 8 5 6 7 3 9 4 2 1 7 9 4 2 1 6 5 3 8 3 2 1 5 4 8 7 6 9 2 7 8 1 6 3 9 4 5 9 1 3 4 2 5 8 7 6 6 4 5 9 8 7 2 1 3 UNIX>It's pretty quick too. It may be disappointing to you that a program so simple can solve Sudoku problems so quickly. If you really wanted it to be fast, or if you wanted to solve larger puzzles, you would probably have to put some more smarts into the program. However, for puzzles of this size, the simple recursive solution works very well.
 However, the mechanics of Print_Convert() are not that bad.  I use the following variables:
void Sudoku::Print_Convert() { int PPS = 24; int Border = 3; int CW = 1; int PW = 2; int i, j, x, y; printf("convert -size %dx%d xc:Black \\\n", PPS*9+Border*2+CW*8+PW*2, PPS*9+Border*2+CW*8+PW*2); printf(" -background White -fill Black \\\n"); x = Border; for (i = 0; i < 9; i++) { y = Border; for (j = 0; j < 9; j++) { printf("\\( -size %dx%d -gravity Center label:%c \\)", PPS, PPS, Grid[i][j]); printf(" -geometry %dx%d+%d+%d -gravity NorthWest -composite \\\n", PPS, PPS, x, y); y += (PPS+CW); if (j == 2 || j == 5) y += PW; } x += (PPS+CW); if (i == 2 || i == 5) x += PW; } printf(" Sudoku.jpg\n"); } |
If you like messing with pictures, I recommend convert, as it is a super-powerful program. Of course, it's beyond the scope of this class. I just include this code in case it interests you.


When you define a class completely in PHP, you can add properties (member variables) to it. When you add member variables to a native C++ class however, you better use regular native member variables for that, instead of PHP variables. Native variables have an immensely better performance than PHP variables, and it would be insane to store integers or strings in Php::Value objects if you can store them in int's and std::string objects as well.
It is difficult to imagine that someone in the world would like to create a native class, with regular non-typed public PHP properties on it. However, if you insist, you can use the PHP-CPP library for this. Let's take an example class in PHP, and see what it would look like in C++.
<?php
/**
* PHP example class
*/
class Example
{
/**
* Define a public property
*/
public $property1;
/**
* Constructor
*/
public function __construct()
{
// initialize the property
$this->property1 = "xyz";
}
/**
* Example method
*/
public function method()
{
// do something with the public property (like changing it)
$this->property = "abc";
}
}
// create an instance
$example = new Example();
// overwrite the public property
$example->property1 = "new value";
?>
The above example creates a class with one public property. This property can be accessed by the Example class, and because it is public also by everyone else, as is shown in the example. If you like such classes, you can write something similar with PHP-CPP.
#include <phpcpp.h>
/**
* C++ Example class
*/
class Example : public Php::Base
{
public:
/**
* c++ constructor
*/
Example() {}
/**
* c++ destructor
*/
virtual ~Example() {}
/**
* php "constructor"
* @param params
*/
void __construct()
{
// get self reference as Php::Value object
Php::Value self(this);
// initialize a public property
self["property1"] = "xyz";
}
/**
* Example method
*/
void method()
{
// get self reference as Php::Value object
Php::Value self(this);
// overwrite the property
self["property1"] = "abc";
}
};
/**
* Switch to C context so that the get_module() function can be
* called by C programs (which the Zend engine is)
*/
extern "C" {
/**
* Startup function for the extension
* @return void*
*/
PHPCPP_EXPORT void *get_module() {
// create static extension object
static Php::Extension myExtension("my_extension", "1.0");
// description of the class so that PHP knows which methods are accessible
Php::Class<Example> example("Example");
// register the methods
example.method("__construct", &Example::__construct);
example.method("method", &Example::method);
// the Example class has one public property
example.property("property1", "xyz", Php::Public);
// add the class to the extension
myExtension.add(std::move(example));
// return the extension
return myExtension;
}
}
The example code shows how you initialize the properties inside the get_module() function.
Instead of public properties, you can also define private or protected properties, but even that is probably not what you want, as storing data in native C++ variables is much faster.
Static properties and class class constants can be defined in a similar way as properties. The only difference is that you have to pass in either the flag 'Php::Static' or 'Php::Const' instead of one of the Php::Public, Php::Private or Php::Protected access modifiers.
#include <phpcpp.h>
// @todo you class definition
/**
* Switch to C context so that the get_module() function can be
* called by C programs (which the Zend engine is)
*/
extern "C" {
/**
* Startup function for the extension
* @return void*
*/
PHPCPP_EXPORT void *get_module() {
// create static extension object
static Php::Extension myExtension("my_extension", "1.0");
// description of the class so that PHP knows which methods are accessible
Php::Class<Example> example("Example");
// the Example class has a class constant
example.property("MY_CONSTANT", "some value", Php::Const);
// and a public static propertie
example.property("my_property", "initial value", Php::Public | Php::Static);
// add the class to the extension
myExtension.add(std::move(example));
// return the extension
return myExtension;
}
}
The class constant can be accessed from PHP scripts using Example::MY_CONSTANT, and the static properties with Example::$my_property.
Besides using the property() method, you can also create class constants using the constant() method, or using the Php::Constant class. More information about this can be found in our article about constants.
With the magic methods __get() and __set() you can make more advanced properties that are directly mapped to C++ variables, and that allow you to perform additional checks when a property is overwritten, so that an object always remains in a valid state.
On top of that, with the PHP-CPP library you can also assign getter and setter methods to properties. Every time a property is accessed, your getter or setter method is automatically called.
#include <phpcpp.h>
/**
* C++ Example class
*/
class Example : public Php::Base
{
private:
/**
* Example property
* @var int
*/
int _value = 0;
public:
/**
* c++ constructor
*/
Example() {}
/**
* c++ destructor
*/
virtual ~Example() {}
/**
* Method to get access to the property
* @return Php::Value
*/
Php::Value getValue() const
{
return _value;
}
/**
* Method to overwrite the property
* @param value
*/
void setValue(const Php::Value &value)
{
// overwrite property
_value = value;
// sanity check: the value should never exceed 100
if (_value > 100) _value = 100;
}
/**
* Method to retrieve the double property value
* @return Php::Value
*/
Php::Value getDouble() const
{
return _value * 2;
}
};
/**
* Switch to C context so that the get_module() function can be
* called by C programs (which the Zend engine is)
*/
extern "C" {
/**
* Startup function for the extension
* @return void*
*/
PHPCPP_EXPORT void *get_module() {
// create static extension object
static Php::Extension myExtension("my_extension", "1.0");
// description of the class so that PHP knows which methods are accessible
Php::Class<Example> example("Example");
// register the "value" property, with the methods to get and set it
example.property("value", &Example::getValue, &Example::setValue);
// register a read-only "double" property, with a method to get it
example.property("double", &Example::getDouble);
// add the class to the extension
myExtension.add(std::move(example));
// return the extension
return myExtension;
}
}
The following PHP script uses this. It created an example object, sets the value property to 500 (which is not allowed, values higher than 100 are rounded to 100), and then it reads out the double value.
<?php
// create object
$object = new Example();
// set the value
$object->value = 500;
// show the double value
echo($object->double."\n");
// update the double value
// (this will trigger an error, this is a read-only property)
$object->double = 300;
?>


Flexbox
Visual examples with all the CSS properties related to Flexbox
01. display: flex; + justify-content: center;
Parent properties to align horizontal elements to the right, left, center or distribute them inside the container.
&:nth-child(1)
&:nth-child(2)
&:nth-child(3)
&:nth-child(4)
The blue border is the representation of the Flex Container, holding the parent properties:
display: flex;
justify-content: center;
02. display: flex; + flex-direction: row-reverse;
Parent properties for aligning elements to the right, left, top or bottom of the container
&:nth-child(1)
&:nth-child(2)
&:nth-child(3)
&:nth-child(4)
The blue border is the representation of the Flex Container, holding the parent properties:
display: flex;
flex-direction: row-reverse;
03. display: flex; + flex-direction: row;
Parent properties for aligning elements to the right, left, top or bottom of the container
&:nth-child(1)
&:nth-child(2)
&:nth-child(3)
&:nth-child(4)
The blue border is the representation of the Flex Container, holding the parent properties:
display: flex;
flex-direction: row;
04. display: flex; + justify-content: space-between;
Parent properties to align horizontal elements to the right, left, center or distribute them inside the container.
&:nth-child(1)
&:nth-child(2)
&:nth-child(3)
&:nth-child(4)
The blue border is the representation of the Flex Container, holding the parent properties:
display: flex;
justify-content: space-between;
05. display: flex; + flex-flow: column;
Parent properties for aligning elements horizontally (to right or to the left) and vertically (to the top or to the bottom)
&:nth-child(1)
&:nth-child(2)
&:nth-child(3)
&:nth-child(4)
The blue border is the representation of the Flex Container, holding the parent properties:
display: flex;
flex-flow: column;
06. display: flex; + align-items: center; + justify-content: center;
Parent properties for aligning elements to center of the taller item and to the content wrapper
&:nth-child(1)
&:nth-child(2)
&:nth-child(3)
&:nth-child(4)
The blue border is the representation of the Flex Container, holding the parent properties:
display: flex;
align-items: center;
justify-content: center;
07. display: flex; + align-items: flex-end; + justify-content: space-around;
Parent properties for aligning elements to the bottom of the container and distribute them around the available space
&:nth-child(1)
&:nth-child(2)
&:nth-child(3)
&:nth-child(4)
The blue border is the representation of the Flex Container, holding the parent properties:
display: flex;
align-items: flex-end;
justify-content: space-around;
08. display: flex; + align-items: flex-startr; + justify-content: center;
Parent properties for aligning elements to the top of the container
&:nth-child(1)
&:nth-child(2)
&:nth-child(3)
&:nth-child(4)
The blue border is the representation of the Flex Container, holding the parent properties:
display: flex;
align-items: center;
justify-content: center;
09. display: flex; + align-items: stretch; + justify-content: center;
Parent properties to vertically fulfill the container
&:nth-child(1)
&:nth-child(2)
&:nth-child(3)
&:nth-child(4)
The blue border is the representation of the Flex Container, holding the parent properties:
display: flex;
align-items: stretch;
justify-content: center;


--- layout: post title: NetBeans + Maven + Lombok date: 2017-05-20 03:55:05.000000000 -03:00 type: post published: true status: publish tags: [java] ---
It's not so easy to use the latest versions of lombok, netbeans and maven together, I found a good solution in this blog post where you have more details. But I'll give a simplified explanation here and make a sample project available in github.
1- Configure your pom. {% gist bdmstyle/5c1f13825314ca794688c517706b5526 %}
2 - At Project Properties->Actions->Activate Profiles and activate "lombok-build" to all operations you need like "build".
3- It works! Note that on command line mvn clean package is working normal (for non netbeans users like jenkins or eclipse users for example).
Here is a complete example project.


Space Flights
Rockets
Submenu 1
Submenu 2
Submenu 3
Submenu 4
Pictures
Submenu 1
Submenu 2
Submenu 3
Submenu 4
Submenu 5
Submenu 6
Submenu 7
Submenu 8
About
Submenu 1
Submenu 2
Submenu 3
Submenu 4
Submenu 5
Submenu 6
Submenu 7
Submenu 8
Submenu 9
Submenu 10
Submenu 11
Submenu 12
Rockets
Best Rockets EU
You've just been Notified
Notify me
All rockets took off


episode:00
episode:01
episode:02
episode:03
episode:04
episode:05
episode:06
episode:07
episode:08
episode:09
episode:10
episode:11


Review: Fast-rising R&B and soul star Mahalia at Bristol's O2 Academy
A joyful performer with a stunning voice
by Robin MurrayMahalia kicks off her show at Bristol's O2 Academy on Monday night with two disclaimers.
One being that she likes to talk a lot, the other that she is prone to burping after drinking water.
While there aren't any audible belches throughout the performance, the 21-year-old definitely wasn't lying about the talking, with songs punctuated by lengthy epilogues on what inspired them and nuggets of advice for younger audience members.
While some people in the crowd express frustration as she launches into yet another oration, keen to hear more music instead, they are very much the minority as the vast majority in the packed-out venue are hanging on every word.
That's because whether talking or singing, the fast-rising R&B and soul star is an infectious performer who genuinely looks like she loves what she's doing.
After signing to Warner subsidiary Asylum Records at the tender age of 13, she has worked hard to get where she is now and is finally earning the kind of praise she deserves.
Her debut LP, Love and Compromise, was a long time in the making but received glowing reviews, and it is tracks from it which stand out as highlights of the set.
On Simmer she throws off her green coat to reveal a black leotard underneath which draws one of many deafening cheers from the crowd on the night, while Sober is preceded with a stripped-back vocal version which shows off the true brilliance of the Leicester-born's vocals, before ending with an adapted disco alternative which gets everyone moving.
After telling female members of the crowd that they don't need to wear a bra if they don't want to, someone who clearly took her message fully to heart throws theirs onto the stage.
Mahalia then temporarily wears it over her clothing before stating, 'That's the third bra I've been thrown on the tour so far and it's only the fourth night' - one of a handful of moments which highlights her sense of humour.
The set finishes with the fantastic I Wished I Missed My Ex, her most well-known release to date, ensuring everyone leaves with a spring in their step - and there's also time in the encore for a mass singalong of happy birthday for a lucky 15-year-old in the front row.
It's likely the youngster will remember that moment for a long time, but then again it was a memorable gig for everyone in attendance, not just the birthday girl.
Follow Discover Bristol
We have a dedicated Facebook page for all the latest on where to drink, eat, go out and events across Bristol.
From the best food and drink deals to exclusive sneak peeks at new restaurants and bars, gig reviews and weekend plans - Discover Bristol has got you covered.
You can follow the page here for all the latest news.


We're sorry but cyanic doesn't work properly without JavaScript enabled. Please enable it to continue.


|
LOC
0.2
Count lines of code
|
Class responsible for holding statistics. More...
#include <statistics.hh>
Public Member Functions | |
| statistics () | |
| Default Class constructor. | |
| statistics (const statistics &s) | |
| Class constructor using another statistics object. | |
| ~statistics () | |
| Class destructor. | |
| void | reset (void) |
| Reset statistics. | |
| void | addLoc (void) |
| Add a line of code to statistics. | |
| void | addLine (void) |
| Add one more processed line to statistics. | |
| void | addEmptyLine (void) |
| Add one more empty line to statistics. | |
| void | addComment (void) |
| Add one more empty line to statistics. | |
| uint64_t | getLoc (void) |
| Get the number of lines of code from statistics. More... | |
| uint64_t | getLines (void) |
| Get the number of processed lines from statistics. More... | |
| uint64_t | getEmptyLines (void) |
| Get the number of empty lines from statistics. More... | |
| uint64_t | getComments (void) |
| Get the number of comments from statistics. More... | |
| void | addComments (std::size_t n) |
| Add one more empty line to statistics. | |
| bool | areAvailable (void) |
| Get the availability of statistics. More... | |
| void | setAvailable (bool b) |
| Set statistics to an available state. More... | |
| void | add (statistics &s) |
| Add the provided statistics to the current ones. More... | |
| statistics & | operator= (const statistics &)=default |
| Define the default operator for the assignment operator. | |
Class responsible for holding statistics.
| void add | ( | statistics & | s | ) |
Add the provided statistics to the current ones.
| [in] | s | - Statistics to add |
|
inline |
Get the availability of statistics.
|
inline |
Get the number of comments from statistics.
|
inline |
Get the number of empty lines from statistics.
|
inline |
Get the number of processed lines from statistics.
|
inline |
Get the number of lines of code from statistics.
|
inline |
Set statistics to an available state.
| [in] | b | - Available (or true) or not available (false) |