|
Simbody
3.6
|
Public Member Functions | |
| Implementation () | |
| Default constructor leaves the operand measure unspecified; no base class cache entries are allocated. More... | |
| Implementation (const Measure_< T > &operand, Operation op) | |
| Construct a measure that returns the extreme value taken on by the operand measure during a time stepping study. More... | |
| void | setOperandMeasure (const Measure_< T > &operand) |
| Set the operand measure for this Extreme measure; this is a Topology stage change so you'll have to call realizeTopology() again if you call this. More... | |
| void | setOperation (Operation op) |
| Set the particular operation to be performed by this Extreme measure; this is a Topology stage change so you'll have to call realizeTopology() again if you call this. More... | |
| const Measure_< T > & | getOperandMeasure () const |
| Return a reference to the operand measure for this Extreme measure. More... | |
| Operation | getOperation () const |
| Return the particular operation being performed by this Extreme measure. More... | |
| void | setValue (State &s, const T &value) const |
| Set the current extreme value stored in this Extreme measure's state variable. More... | |
| Real | getTimeOfExtremeValue (const State &s) const |
| Return the time at which the extreme was last updated. More... | |
| Implementation * | cloneVirtual () const override |
| int | getNumTimeDerivativesVirtual () const override |
| Extreme(f(t)) has the same number of derivatives as f except that they are all zero unless f(t) is a new extreme. More... | |
| Stage | getDependsOnStageVirtual (int order) const override |
| The depends-on stage for this measure is the same as for its operand. More... | |
| const T & | getUncachedValueVirtual (const State &s, int derivOrder) const override |
| We're not using the Measure_<T> base class cache services, but we do have one of our own. More... | |
| void | initializeVirtual (State &s) const override |
| At start of a time stepping study, this should be called to set the current extreme value to the current value of the operand. More... | |
| void | realizeMeasureTopologyVirtual (State &s) const override |
| Allocate the auto-updated state variable that holds the extreme seen so far. More... | |
| void | realizeMeasureAccelerationVirtual (const State &s) const override |
| In case no one has updated the value of this measure yet, we have to make sure it gets updated before the integration moves ahead. More... | |
| bool | ensureExtremeHasBeenUpdated (const State &s) const |
| Here we make sure that the cache entry is updated if the current value of the operand is more extreme than the previous one, and return a bool indicating whether we have a new extreme. More... | |
| Public Member Functions inherited from SimTK::Measure_< T >::Implementation | |
| const T & | getValue (const State &s, int derivOrder) const |
| void | setDefaultValue (const T &defaultValue) |
| Set a new default value for this Measure. More... | |
| const T & | getDefaultValue () const |
| Return a reference to the value that this Measure will use to initialize its value-level state resource (state variable or cache entry) during the next call to realizeTopology(). More... | |
| void | setIsPresumedValidAtDependsOnStage (bool presume) |
| bool | getIsPresumedValidAtDependsOnStage () const |
Additional Inherited Members | |
| Protected Member Functions inherited from SimTK::Measure_< T >::Implementation | |
| Implementation (const T &defaultValue, int numCacheEntries=1) | |
| Implementation (int numCacheEntries=1) | |
| Argument numCacheEntries should be one greater than the number of derivatives; that is, there is room for the value ("0th" derivative) also. More... | |
| Implementation (const Implementation &source) | |
| Copy constructor copies the number of cache entries from the source, but not the cache indices themselves as those must be allocated uniquely for the copy. More... | |
| int | size () const |
| Return the number of elements in the data type of this Measure; for Vector measures this is determined by the size of the default value. More... | |
| int | getNumCacheEntries () const |
| Return the number of cache entries allocated for the value and derivatives of this Measure. More... | |
| const T & | getCacheEntry (const State &s, int derivOrder) const |
| Get a const reference to the value stored in one of this Measure's cache entries, indexed by the derivative order (with the value treated as the 0th derivative). More... | |
| T & | updCacheEntry (const State &s, int derivOrder) const |
| Get a writable reference to the value stored in one of this Measure's cache entries, indexed by the derivative order (with the value treated as the 0th derivative). More... | |
| bool | isCacheValueRealized (const State &s, int derivOrder) const |
| Determine whether a particular one of this Measure's cache entries has already been realized since the given state was modified. More... | |
| void | markCacheValueRealized (const State &s, int derivOrder) const |
| Mark one of this Measure's cache entries up to date; call this after you have calculated a value or derivative and stored it in the corresponding cache entry. More... | |
| void | markCacheValueNotRealized (const State &s, int derivOrder) const |
| Invalidate one of this Measure's cache entries. More... | |
| virtual void | calcCachedValueVirtual (const State &, int derivOrder, T &value) const |
| Concrete measures must override this if the state cache is used for precalculated values or derivatives. More... | |
| const T & | getValueZero () const |
| Return a reference to a zero of the same type and size as this Measure's value. More... | |
| Protected Member Functions inherited from SimTK::AbstractMeasure::Implementation | |
| Implementation () | |
| This default constructor is for use by concrete measure implementation classes. More... | |
| Implementation (const Implementation &src) | |
| Base class copy constructor removes the Subsystem and sets the reference count to zero. More... | |
| Implementation & | operator= (const Implementation &src) |
| Base class copy assignment operator removes the Subsystem, and sets the reference count to zero. More... | |
| int | incrRefCount () const |
| int | decrRefCount () const |
| int | getRefCount () const |
| int | getCopyNumber () const |
| Implementation * | clone () const |
| This is a deep copy of the concrete Implementation object, except the Subsystem will have been removed. More... | |
| void | realizeModel (State &s) const |
| void | realizeInstance (const State &s) const |
| void | realizeTime (const State &s) const |
| void | realizePosition (const State &s) const |
| void | realizeVelocity (const State &s) const |
| void | realizeDynamics (const State &s) const |
| void | realizeAcceleration (const State &s) const |
| void | realizeReport (const State &s) const |
| void | initialize (State &s) const |
| This should be called at the start of a time stepping study to cause this Measure to set its state variables (if any) in the supplied state to their initial conditions. More... | |
| int | getNumTimeDerivatives () const |
| Stage | getDependsOnStage (int derivOrder) const |
| void | setSubsystem (Subsystem &sub, MeasureIndex mx) |
| bool | isInSubsystem () const |
| const Subsystem & | getSubsystem () const |
| Subsystem & | updSubsystem () |
| MeasureIndex | getSubsystemMeasureIndex () const |
| SubsystemIndex | getSubsystemIndex () const |
| void | invalidateTopologyCache () const |
| Stage | getStage (const State &s) const |
| virtual | ~Implementation () |
| virtual void | realizeMeasureModelVirtual (State &) const |
| virtual void | realizeMeasureInstanceVirtual (const State &) const |
| virtual void | realizeMeasureTimeVirtual (const State &) const |
| virtual void | realizeMeasurePositionVirtual (const State &) const |
| virtual void | realizeMeasureVelocityVirtual (const State &) const |
| virtual void | realizeMeasureDynamicsVirtual (const State &) const |
| virtual void | realizeMeasureReportVirtual (const State &) const |
|
inline |
Default constructor leaves the operand measure unspecified; no base class cache entries are allocated.
|
inline |
Construct a measure that returns the extreme value taken on by the operand measure during a time stepping study.
|
inline |
Set the operand measure for this Extreme measure; this is a Topology stage change so you'll have to call realizeTopology() again if you call this.
|
inline |
Set the particular operation to be performed by this Extreme measure; this is a Topology stage change so you'll have to call realizeTopology() again if you call this.
|
inline |
Return a reference to the operand measure for this Extreme measure.
|
inline |
Return the particular operation being performed by this Extreme measure.
|
inline |
Set the current extreme value stored in this Extreme measure's state variable.
|
inline |
Return the time at which the extreme was last updated.
This will be the current time if the operand is currently at its most extreme value, otherwise it will be sometime in the past.
|
inlineoverridevirtual |
Implements SimTK::AbstractMeasure::Implementation.
|
inlineoverridevirtual |
Extreme(f(t)) has the same number of derivatives as f except that they are all zero unless f(t) is a new extreme.
Reimplemented from SimTK::AbstractMeasure::Implementation.
|
inlineoverridevirtual |
The depends-on stage for this measure is the same as for its operand.
Implements SimTK::AbstractMeasure::Implementation.
|
inlineoverridevirtual |
We're not using the Measure_<T> base class cache services, but we do have one of our own.
It looks uncached from the base class point of view which is why we're implementing it here.
Reimplemented from SimTK::Measure_< T >::Implementation.
|
inlineoverridevirtual |
At start of a time stepping study, this should be called to set the current extreme value to the current value of the operand.
Reimplemented from SimTK::AbstractMeasure::Implementation.
|
inlineoverridevirtual |
Allocate the auto-updated state variable that holds the extreme seen so far.
We'll assume that changes to this variable invalidate Dynamics (force) stage so that any forces that depend on it will be recomputed if it changes. Also allocate an auxiliary boolean variable that is used to hold whether the current value is a new extreme; that is private to the implementation and not user-accessible since you can instead check the time of last update.
Reimplemented from SimTK::Measure_< T >::Implementation.
|
inlineoverridevirtual |
In case no one has updated the value of this measure yet, we have to make sure it gets updated before the integration moves ahead.
Reimplemented from SimTK::AbstractMeasure::Implementation.
|
inline |
Here we make sure that the cache entry is updated if the current value of the operand is more extreme than the previous one, and return a bool indicating whether we have a new extreme.
We don't want to create an update entry unless the extreme value has changed, because we would like the state variable's last update value to reflect the last actual change.


Reports any calls to
java.lang.Class.newInstance().
The newInstance method propagates any
exception thrown by the no-arg constructor, including checked exceptions. Use
of this method effectively bypasses the compile-time exception checking that
would otherwise be performed by the compiler. Replacing such a method call with
a call to the java.lang.reflect.Constructor.newInstance()
method avoids this problem by wrapping any exception thrown by the constructor
in a java.lang.reflect.InvocationTargetException.
Powered by InspectionGadgets


CSS resources can be added to the Concordion output using an extension. The CSS can either be:
An extension with embedded CSS is installed.
When Concordion is run, the CSS is embedded in the <head> section of the output HTML.
An extension with linked CSS is installed for the CSS file my.css
with the target location /css/my.css
.
When Concordion is run,
the resource /css/my.css
is available in the Concordion output directory,
and a link to the external stylesheet css/my.css
is declared in the output HTML.


Google to offer checking accounts for consumers – WSJ
by Agency ReportAlphabet Inc’s Google will offer checking accounts to customers starting next year in a finance push, the Wall Street Journal reported on Wednesday.
The project, named Cache, will have accounts by Citigroup Inc and a credit union at Stanford University, according to the report.
“Our approach is going to be to partner deeply with banks and the financial system,” Caesar Sengupta, general manager and vice-president of payments at Google, told the Journal in an interview.
“It may be the slightly longer path, but it’s more sustainable,” Sengupta was quoted as saying in the report.
Google did not immediately respond to a Reuters request for comment. (Reuters/NAN)


It is important to wash your hands so you can prevents the spread of germs and avoid getting sick. Did you know that many diseases and conditions are spread by not washing hands with soap and clean, running water? Look at the Diagram below to know how to properly wash your hands.


An intuitive implementation of crucial information necessary for saving the world and mantaining sanity.
The camera fires immediately and data is captured, analyzed and the results analyzed in real-time before your eyes. The live video feed can be sent over Bluetooth or connected over wifi
The technology uses AI technology to classify the images to their respective categories. The AI model is a multi-label classifier that uses the Google Cloud technology to relay data over the web.
The app can be accessed directly from an IoT embedded device or through the link provided with the trained model. Webcams of any size can be used. It is a plug and play machine.
The app has a single start button and everything is automatically done in the background. The UI is user experience oriented to suit people of all ages. It does not matter your knowledge background on waste disposal.
The testing dataset had an 93% accuracy when compared to the training data as it is founded upon quality data. The accuracy was tested over a wide range of backgrounds and objects both opened and deformed.
The app can run as a web app, an android or iOS app or or IoT implemented devices such as microcontrollers. Currenlty, only a web app is in place but multisystem and scalability capabilities are feasible.


'Show your face!' Public yells at Uyinene Mrwetyana's murder accused as case heads to High Court
by Tammy PetersenThe investigation against the man accused of the rape and murder of UCT student Uyinene Mrwetyana is complete and the case is set to be transferred to the Western Cape High Court.
Luyanda Botha appeared briefly in the Wynberg Magistrate's Court on Tuesday, where he again indicated he would not be applying for bail.
Magistrate Goolam Bawa on Tuesday lifted the order barring the media from identifying him, and allowed for him to be photographed. He is charged with murder, rape and defeating the ends of justice.
Western Cape Director of Public Prosecutions Rodney de Kock will appear for the State in the murder case.
As Botha took his seat in the dock, members in the public gallery shouted "show your face!". He refused to look up, and was wearing a hoodie.
His case was postponed to Thursday for indictment and for transfer to the High Court.
As Botha left the courtroom, some members in the public were upset that he didn't apply for bail, with someone in the crowd saying the public wants to "get him".
A handful of protesters meanwhile gathered outside the Wynberg Magistrate's Court in support of Uyinene.
Mrwetyana's murder made international headlines when it emerged that she was killed in the Clareinch Post Office in Claremont the same day she disappeared - Saturday, August 24.
She had attempted to pick up a package earlier in the day, where Botha, who had been serving her, allegedly told her to come back later in the day after business hours.


Research
Thanks to a series of academic and policy opportunities, I’ve been able to work on a variety of multidisciplinary research topics, using a variety of qualitative and quantitative methods. This page briefly describes some of my major research interests, including links to relevant publications. A full list of papers and other research outputs can be found on my ORCID profile.
Last updated 27 June 2019.
Academic institutional effectiveness
Conceptual frameworks from philosophy of science, science and technology studies, and science policy; analytic methods from statistics and data science; and institutional data sources can be combined to support understanding of how science operates. Some of the specific questions I’ve examined in this area include:
- Is novel toxicological research at the Environmental Protection Agency integrated into the broader research community?
- How have interdisciplinary funding programs fostered novel collaborations in fields such as robotics and genomics?
- What factors predict whether underrepresented groups will major in philosophy?
- What conceptual frameworks can be used to understand the academic politics of research metrics?
- How can article metadata and text mining methods be used to uncover forgotten contributions of women to philosophy of science?
Selected publications
- Hicks, Daniel J., David A. Coil, Carl G. Stahmer, and Jonathan A. Eisen. 2019. “Network Analysis to Evaluate the Impact of Research Funding on Research Community Consolidation.” PLOS ONE 14 (6): e0218273. https://doi.org/10.1371/journal.pone.0218273.
- Hicks, Daniel J., Carl Stahmer, and MacKenzie Smith. 2018. “Impacting Capabilities: A Conceptual Framework for the Social Value of Research.” Frontiers in Research Metrics and Analytics 3. https://doi.org/10.3389/frma.2018.00024.
- Hicks, Daniel. 2017. “The Underproduction of Philosophy PhDs.” Daily Nous. December 18, 2017. http://dailynous.com/2017/12/18/underproduction-philosophy-phds-daniel-hicks/.
Public scientific controversies
Public scientific controversies are my entry point into discussions of science policy and the role of expertise in democracy. Traditional models of such controversies focus on gaps between “scientists” and “the public,” and explain these gaps in terms of public ignorance and irrationality. In contrast, my approach to these controversies are based on ideas of power, structural oppression, and democratic accountability, in line with my background in feminist philosophy of science and political philosophy.
I am interested in many different specific issues that fall under the heading of “public scientific controversies.” Some of my current work in this area addresses ideals of transparency and fairness in algorithmic injustice, as well as controversies over obesity and pesticide regulation. My publications in this area are often written for policy audiences and published in venues beyond academic philosophy.
Selected publications
- Fernández Pinto, Manuela, and Daniel J. Hicks. 2019. “Legitimizing Values in Regulatory Science.” Environmental Health Perspectives 127 (3): 035001. https://doi.org/10.1289/EHP3317.
- Hicks, D. J. 2018. “The Safety of Autonomous Vehicles: Lessons from Philosophy of Science.” IEEE Technology and Society Magazine 37 (1): 62–69. https://doi.org/10.1109/MTS.2018.2795123.
- Hicks, Daniel J. 2017. “Scientific Controversies as Proxy Politics.” Issues in Science and Technology, January 2017. http://issues.org/33-2/scientific-controversies-as-proxy-politics/
- GMO project
- Hicks, Daniel J. 2017. “Genetically Modified Crops, Inclusion, and Democracy.” Perspectives on Science, July, 488–520. https://doi.org/10.1162/POSC_a_00251.
- Hicks, Daniel J. 2015. “Epistemological Depth in a GM Crops Controversy.” Studies in History and Philosophy of Science Part C: Studies in History and Philosophy of Biological and Biomedical Sciences 50 (April): 1–12. https://doi.org/10.1016/j.shpsc.2015.02.002.
Science and values
This is the most disciplinary or narrowly philosophical topic among my major research interests. My dissertation (Notre Dame 2012) developed Alasdair MacIntyre’s conception of a social practice, informed by feminist philosophy, and applied this conception to the then-current debate over the ideal of value-free science. Since finishing my dissertation, I’ve become known for defending a distinctively Aristotelean version of the “aims approach” to values in science.
Due to the nature of my employment over the last several years, I’ve been unable to devote much time to narrowly philosophical work. I have been able to give presentations in which I apply and defend my version of the “aims approach” to topics such as academic freedom and “dangerous ideas,” open science, and objectivity. I intend to write up and publish these talks over the next few years.
- Hicks, Daniel J., and Thomas A. Stapleford. 2016. “The Virtues of Scientific Practice: MacIntyre, Virtue Ethics, and the Historiography of Science.” Isis 107 (3): 449–72. https://doi.org/10.1086/688346.
- Hicks, Daniel J. 2014. “A New Direction for Science and Values.” Synthese 191 (14): 3271–95. https://doi.org/10.1007/s11229-014-0447-9.
- Hicks, Dan. 2011. “On the Ideal of Autonomous Science.” Philosophy of Science 78 (5): 1235–48. https://doi.org/10.1086/662255.


Programming is a complex process. Since it is done by human beings, errors may often occur. Programming errors are called bugs and the process of tracking them down and correcting them is called debugging. Some claim that in 1945, a dead moth caused a problem on relay number 70, panel F, of one of the first computers at Harvard, and the term bug has remained in use since. For more about this historic event, see first bug.
Three kinds of errors can occur in a program: syntax errors, runtime errors, and semantic errors. It is useful to distinguish between them in order to track them down more quickly.
Check your understanding


{% extends "layout.html" %} {% block content %}
We created GeoDJ so anyone could listen to music from all over the world. GeoDJ currently has a collection of over 2,000 popular musicians from 200+ countries.
Want your band featured on GeoDJ? Contact us at GeoDJteam@gmail.com.


The file is saved every two second if changed with the password in the first field. Passwords have to match, or neither save nor autosave will work.
| Load | Load file with password in first password field. |
| Save | Force saving the file. |
| new revision | Force a new revision and save the file. |
| Clean up | Delete all but the current revision. |
| low contrast | Switches the text to light grey on red, making it harder to read, especially from an angle. |
| File column (left) | Activate file. Create new file by entering name and pressing Create. |
| Revision column (right) | Load specific revision (c = current) with password in first field, generally forcing a new revision when saving. |


| expand {tidyr} | R Documentation |
expand()
is often useful in conjunction with left_join
if
you want to convert implicit missing values to explicit missing values.
Or you can use it in conjunction with anti_join()
to figure
out which combinations are missing.
expand(data, ...) crossing(...) nesting(...)
data |
A data frame. |
... |
Specification of columns to expand. Columns can be atomic vectors or lists. To find all unique combinations of x, y and z, including those not
found in the data, supply each variable as a separate argument.
To find only the combinations that occur in the data, use nest:
You can combine the two forms. For example,
For factors, the full set of levels (not just those that appear in the
data) are used. For continuous variables, you may need to fill in values
that don't appear in the data: to do so use expressions like
Length-zero (empty) elements are automatically dropped. |
crossing()
is similar to expand.grid()
, this never
converts strings to factors, returns a tbl_df
without additional
attributes, and first factors vary slowest. nesting()
is the
complement to crossing()
: it only keeps combinations of all variables
that appear in the data.
complete()
for a common application of expand
:
completing a data frame with missing combinations.
library(dplyr) # All possible combinations of vs & cyl, even those that aren't # present in the data expand(mtcars, vs, cyl) # Only combinations of vs and cyl that appear in the data expand(mtcars, nesting(vs, cyl)) # Implicit missings --------------------------------------------------------- df <- tibble( year = c(2010, 2010, 2010, 2010, 2012, 2012, 2012), qtr = c( 1, 2, 3, 4, 1, 2, 3), return = rnorm(7) ) df %>% expand(year, qtr) df %>% expand(year = 2010:2012, qtr) df %>% expand(year = full_seq(year, 1), qtr) df %>% complete(year = full_seq(year, 1), qtr) # Nesting ------------------------------------------------------------------- # Each person was given one of two treatments, repeated three times # But some of the replications haven't happened yet, so we have # incomplete data: experiment <- tibble( name = rep(c("Alex", "Robert", "Sam"), c(3, 2, 1)), trt = rep(c("a", "b", "a"), c(3, 2, 1)), rep = c(1, 2, 3, 1, 2, 1), measurment_1 = runif(6), measurment_2 = runif(6) ) # We can figure out the complete set of data with expand() # Each person only gets one treatment, so we nest name and trt together: all <- experiment %>% expand(nesting(name, trt), rep) all # We can use anti_join to figure out which observations are missing all %>% anti_join(experiment) # And use right_join to add in the appropriate missing values to the # original data experiment %>% right_join(all) # Or use the complete() short-hand experiment %>% complete(nesting(name, trt), rep) # Generate all combinations with expand(): formulas <- list( formula1 = Sepal.Length ~ Sepal.Width, formula2 = Sepal.Length ~ Sepal.Width + Petal.Width, formula3 = Sepal.Length ~ Sepal.Width + Petal.Width + Petal.Length ) data <- split(iris, iris$Species) crossing(formula = formulas, data)


dominic mussack
graduate student in computational psychology
researching human motivation and decision making
about
|
blog
|
- Dominic Mussack


Windows / Desktop
- Distance
Config file:
Adjust the DPI of your mouse
Path:
N/A
Sensitivity 1
Minimum:
0
Default:
Maximum:
99999
Console:
N/A
Notes:
Engine:
Windows
Affected by:
FOV:
No
| WPS:
Yes
| Resolution:
No
Default FOV:
|
N/A
Added:
2015-01-01 12:00:00
Updated:
N/A


Welcome To
Pathfinding and Maze Generation World
By Ismail El Shinnawy
This web app is made to visiualize different Pathfinding & Maze
Generation
Algorithms. The source code for this project is available at
this
Github
repo.
The project is inspired from Clément
Mihailescu
project
.
This is a short tutorial to walk you through using the app, but you can skip it if you want :)
Moving Start and End
You can change the start and end positions by simply dragging and dropping
the
icons
Different Maze Generators
Maze generators
- Random Maze: Randomly scatters walls over the grid
- Random Weighted Maze: Randomly scatters weights over the grid
- DFS and Backtracking: Generates a random maze that is guranteed to have a path from
start to
end
You can choose the generator that you want to visiualize from here and it will automatically
start
And that is it 🥳!! You can start experimentting on your own now. :)
you can always come back to the tutorial using the button at the top
right


| I l@ve RuBoard |
8.4 TextIt's been said that Tkinter's strongest points may be its text and canvas widgets. Both provide a remarkable amount of functionality. For instance, the Tkinter Text widget was powerful enough to implement the Grail web browser, discussed in Chapter 15; it supports complex font style settings, embedded images, and much more. The Tkinter Canvas widget, a general-purpose drawing device, has also been the basis of sophisticated image processing and visualization applications. In Chapter 9, we'll put these two widgets to use to implement text editors (PyEdit), paint programs (PyDraw), clock GUIs (PyClock), and photo slideshows (PyView). For the purposes of this tour chapter, though, let's start out using these widgets in simpler ways. Example 8-10 implements a simple scrolled-text display, which knows how to fill its display with a text string or file. Example 8-10. PP2E\Gui\Tour\scrolledtext.py# a simple text or file viewer component print 'PP2E scrolledtext' from Tkinter import * class ScrolledText(Frame): def __init__(self, parent=None, text='', file=None): Frame.__init__(self, parent) self.pack(expand=YES, fill=BOTH) # make me expandable self.makewidgets() self.settext(text, file) def makewidgets(self): sbar = Scrollbar(self) text = Text(self, relief=SUNKEN) sbar.config(command=text.yview) # xlink sbar and text text.config(yscrollcommand=sbar.set) # move one moves other sbar.pack(side=RIGHT, fill=Y) # pack first=clip last text.pack(side=LEFT, expand=YES, fill=BOTH) # text clipped first self.text = text def settext(self, text='', file=None): if file: text = open(file, 'r').read() self.text.delete('1.0', END) # delete current text self.text.insert('1.0', text) # add at line 1, col 0 self.text.mark_set(INSERT, '1.0') # set insert cursor self.text.focus() # save user a click def gettext(self): # returns a string return self.text.get('1.0', END+'-1c') # first through last if __name__ == '__main__': root = Tk() try: st = ScrolledText(file=sys.argv[1]) # filename on cmdline except IndexError: st = ScrolledText(text='Words\ngo here') # or not: 2 lines def show(event): print repr(st.gettext()) # show as raw string root.bind('<Key-Escape>', show) # esc = dump text root.mainloop() Like the ScrolledList of Example 8-9, the ScrolledText object in this file is designed to be a reusable component, but can also be run standalone to display text file contents. Also like the last section, this script is careful to pack the scrollbar first so that it is cut out of the display last as the window shrinks, and arranges for the embedded Text object to expand in both directions as the window grows. When run with a filename argument, this script makes the window shown in Figure 8-15; it embeds a Text widget on the left, and a cross-linked Scrollbar on the right. Figure 8-15. scrolledtext in actionJust for fun, I populated the text file displayed in the window with the following code and command lines (and not just because I happen to live near an infamous hotel in Colorado): C:\...\PP2E\Gui\Tour>type temp.py f = open('temp.txt', 'w') for i in range(250): f.write('%03d) All work and no play makes Jack a dull boy.\n' % i) f.close() C:\...\PP2E\Gui\Tour>python temp.py C:\...\PP2E\Gui\Tour>python scrolledtext.py temp.txt PP2E scrolledtext To view a file, pass its name on the command line -- its text is automatically displayed in the new window. By default, it is shown in a non-fixed-width font, but we'll pass a font option to the text widget in the next example to change that. Notice the "PP2E scrolledtext" message printed when this script runs. Because there is also a ScrolledText.py file in the standard Python distribution with a very different interface, the one here identifies itself when run or imported so you can tell which one you've got. If the standard one ever goes away, import the one listed here for a simple text browser, and adjust configuration calls to include a ".text" qualifier level (the library version subclasses Text, not Frame). 8.4.1 Programming the Text WidgetTo understand how this script works at all, though, we have to detour into a few Text widget details here. Earlier we met the Entry and Message widgets, which address a subset of the Text widget's uses. The Text widget is much richer in both features and interfaces -- it supports both input and display of multiple lines of text, editing operations for both programs and interactive users, multiple fonts and colors, and much more. Text objects are created, configured, and packed just like any other widget, but they have properties all their own. <IP_ADDRESS> Text is a Python stringAlthough the Text widget is a powerful tool, its interface seems to boil down to two core concepts. First of all, the content of a Text widget is represented as a string in Python scripts, and multiple lines are separated with the normal \n line terminator. The string 'Words\ngo here', for instance, represents two lines when stored in or fetched from a Text widget; it would normally have a trailing \n too, but doesn't have to. To help illustrate this point, this script binds the Escape key press to fetch and print the entire contents of the Text widget it embeds: C:\...\PP2E\Gui\Tour>python scrolledtext.py PP2E scrolledtext 'Words\012go here' 'Always look\012on the bright\012side of life\012' When run with arguments, the script stores a file's contents in the text widget. When run without arguments, the script stuffs a simple literal string into the widget, displayed by the first Escape press output here (recall that \012 is the octal escape form of the \n line terminator). The second output here happens when pressing Escape in the shrunken window captured in Figure 8-16. Figure 8-16. scrolledtext gets a positive outlook<IP_ADDRESS> String positionsThe second key to understanding Text code has to do with the ways you specify a position in the text string. Like the listbox, text widgets allow you to specify such a position in a variety of ways. In Text, methods that expect a position to be passed in will accept an index, a mark, or a tag reference. Moreover, some special operations are invoked with predefined marks and tags -- the insert cursor is mark INSERT, and the current selection is tag SEL. <IP_ADDRESS>.1 Text indexesBecause it is a multiple-line widget, Text indexes identify both a line and a column. For instance, consider the interfaces of the basic insert, delete, and fetch text operations used by this script: self.text.insert('1.0', text) # insert text at the start self.text.delete('1.0', END) # delete all current text return self.text.get('1.0', END+'-1c') # fetch first through last In all of these, the first argument is an absolute index that refers to the start of the text string: string "1.0" means row 1, column (rows are numbered from 1 and columns from 0). An index "2.1" refers to the second character in the second row. Like the listbox, text indexes can also be symbolic names: the END in the preceding delete call refers to the position just past the last character in the text string (it's a Tkinter variable preset to string "end"). Similarly, the symbolic index INSERT (really, string "insert") refers to the position immediately after the insert cursor -- the place where characters would appear if typed at the keyboard. Symbolic names like INSERT can also be called marks, described in a moment. For added precision, you can add simple arithmetic extensions to index strings. The index expression END+'-1c' in the get call in the previous example, for instance, is really the string "end-1c", and refers to one character back from END. Because END points to just beyond the last character in the text string, this expression refers to the last character itself. The -1c extension effectively strips the trailing \n that this widget adds to its contents (and may add a blank line if saved in a file). Similar index string extensions let you name characters ahead (+1c), lines ahead and behind (+2l, -2l), and specify things like word and line starts around an index (lineend, wordstart). Indexes show up in most Text widget calls. <IP_ADDRESS>.2 Text marksBesides row/column identifier strings, you can also pass positions as names of marks -- symbolic names for a position between two characters. Unlike absolute row/column positions, marks are virtual locations that move as new text is inserted or deleted (by your script or your user). A mark always refers to its original location, even if that location shifts to a different row and column over time. To create a mark, call the text mark_set method with a string name and an index to give its logical location. For instance, this script sets the insert cursor at the start of the text initially, with a call like the first one here: self.text.mark_set(INSERT, '1.0') # set insert cursor to start self.text.mark_set('linetwo', '2.0') # mark current line 2 The name INSERT is a predefined special mark that identifies the insert cursor position; setting it changes the insert cursor's location. To make a mark of your own, simply provide a unique name as in the second call here, and use it anywhere you need to specify a text position. The mark_unset call deletes marks by name. <IP_ADDRESS>.3 Text tagsIn addition to absolute indexes and symbolic mark names, the Text widget supports the notion of tags -- symbolic names associated with one or more substrings within the Text widget's string. Tags can be used for many things, but they also serve to represent a position anywhere you need one: tagged items are named by their beginning and ending indexes, which can be later passed to position-based calls. For example, Tkinter provides a built-in tag name SEL -- a Tkinter name preassigned to string "sel" -- which automatically refers to currently selected text. To fetch the text selected (highlighted) with a mouse, run either of these calls: text = self.text.get(SEL_FIRST, SEL_LAST) # use tags for from/to indexes text = self.text.get('sel.first', 'sel.last') # strings and constants work The names SEL_FIRST and SEL_LAST are just preassigned variables in the Tkinter module that refer to the strings used in the second line here. The text get method expects two indexes; to fetch text names by a tag, add .first and .last to the tag's name to get its start and end indexes. To tag a substring, call the text widget's tag_add method with a tag name string and start and stop positions (text can also be tagged as added in insert calls). To remove a tag from all characters in a range of text, call tag_remove: self.text.tag_add('alltext', '1.0', END) # tag all text in the widget self.text.tag_add(SEL, index1, index2) # select from index1 up to index2 self.text.tag_remove(SEL, '1.0', END) # remove selection from all text The first line here creates a new tag that names all text in the widget -- from start through end positions. The second line adds a range of characters to the built-in SEL selection tag -- they are automatically highlighted, because this tag is predefined to configure its members that way. The third line removes all characters in the text string from the SEL tag (all selections are unselected). Note that the tag_remove call just untags text within the named range; to really delete a tag completely, call tag_delete instead. You can map indexes to tags dynamically too. For example, the text search method returns the row.column index of the first occurrence of a string between start and stop positions. To automatically select the text thus found, simply add its index to the built-in SEL tag: where = self.text.search(target, INSERT, END) # search from insert cursor pastit = where + ('+%dc' % len(target)) # index beyond string found self.text.tag_add(SEL, where, pastit) # tag and select found string self.text.focus() # select text widget itself If you only want one string to be selected, be sure to first run the tag_remove call listed earlier -- this code adds a selection in addition to any selections that already exist (it may generate multiple selections in the display). In general, you can add any number of substrings to a tag to process them as a group. To summarize: indexes, marks, and tag locations can be used anytime you need a text position. For instance, the text see method scrolls the display to make a position visible; it accepts all three kinds of position specifiers: self.text.see('1.0') # scroll display to top self.text.see(INSERT) # scroll display to insert cursor mark self.text.see(SEL_FIRST) # scroll display to selection tag Text tags can also be used in broader ways for formatting and event bindings, but I'll defer those details until the end of this section. 8.4.2 Adding Text-Editing OperationsExample 8-11 puts some of these concepts to work. It adds support for four common text-editing operations -- file save, text cut and paste, and string find searching -- by subclassing ScolledText to provide additional buttons and methods. The Text widget comes with a set of default keyboard bindings that perform some common editing operations too, but they roughly mimic the Unix Emacs editor, and are somewhat obscure; it's more common and user-friendly to provide GUI interfaces to editing operations in a GUI text editor. Example 8-11. PP2E\Gui\Tour\simpleedit.py######################################################### # add common edit tools to scrolled text by inheritance; # composition (embedding) would work just as well here; # this is not robust! see PyEdit for a feature superset; ######################################################### from Tkinter import * from tkSimpleDialog import askstring from tkFileDialog import asksaveasfilename from quitter import Quitter from scrolledtext import ScrolledText # here, not Python's class SimpleEditor(ScrolledText): # see PyEdit for more def __init__(self, parent=None, file=None): frm = Frame(parent) frm.pack(fill=X) Button(frm, text='Save', command=self.onSave).pack(side=LEFT) Button(frm, text='Cut', command=self.onCut).pack(side=LEFT) Button(frm, text='Paste', command=self.onPaste).pack(side=LEFT) Button(frm, text='Find', command=self.onFind).pack(side=LEFT) Quitter(frm).pack(side=LEFT) ScrolledText.__init__(self, parent, file=file) self.text.config(font=('courier', 9, 'normal')) def onSave(self): filename = asksaveasfilename() if filename: alltext = self.gettext() # first through last open(filename, 'w').write(alltext) # store text in file def onCut(self): text = self.text.get(SEL_FIRST, SEL_LAST) # error if no select self.text.delete(SEL_FIRST, SEL_LAST) # should wrap in try self.clipboard_clear() self.clipboard_append(text) def onPaste(self): # add clipboard text try: text = self.selection_get(selection='CLIPBOARD') self.text.insert(INSERT, text) except TclError: pass # not to be pasted def onFind(self): target = askstring('SimpleEditor', 'Search String?') if target: where = self.text.search(target, INSERT, END) # from insert cursor if where: # returns an index print where pastit = where + ('+%dc' % len(target)) # index past target #self.text.tag_remove(SEL, '1.0', END) # remove selection self.text.tag_add(SEL, where, pastit) # select found target self.text.mark_set(INSERT, pastit) # set insert mark self.text.see(INSERT) # scroll display self.text.focus() # select text widget if __name__ == '__main__': try: SimpleEditor(file=sys.argv[1]).mainloop() # filename on command line except IndexError: SimpleEditor().mainloop() # or not This, too, was written with one eye toward reuse -- the SimpleEditor class it defines could be attached or subclassed by other GUI code. As I'll explain at the end of this section, though, it's not yet as robust as a general-purpose library tool should be. Still, it implements a functional text editor in a small amount of portable code. When run standalone, it brings up the window in Figure 8-17 (shown running in Windows); index positions are printed on stdout after each successful find operation: C:\...\PP2E\Gui\Tour>python simpleedit.py simpleedit.py PP2E scrolledtext 14.4 24.4 Figure 8-17. simpleedit in actionThe save operation pops up the common save dialog available in Tkinter, and tailored to look native on each platform. Figure 8-18 shows this dialog in action on Windows. Find operations also pop up a standard dialog box to input a search string (Figure 8-19); in a full-blown editor, you might want to save this string away to repeat the find again (we will, in the next chapter's PyEdit). Figure 8-18. Save pop-up dialog on WindowsFigure 8-19. Find pop-up dialog<IP_ADDRESS> Using the clipboardBesides text widget operations, Example 8-11 applies the Tkinter clipboard interfaces in its cut and paste functions. Together, these operations allow you to move text within a file (cut in one place, paste in another). The clipboard they use is just a place to store data temporarily -- deleted text is placed on the clipboard on a cut, and text is inserted from the clipboard on a paste. If we restrict our focus to this program alone, there really is no reason that the text string cut couldn't simply be stored in a Python instance variable. But the clipboard is actually a much larger concept. The clipboard used by this script is an interface to a systemwide storage space, shared by all programs on your computer. Because of that, it can be used to transfer data between applications, even ones that know nothing of Tkinter. For instance, text cut or copied in a Microsoft Word session can be pasted in a SimpleEditor window, and text cut in SimpleEditor can be pasted in a Microsoft Notepad window (try it). By using the clipboard for cut and paste, SimpleEditor automatically integrates with the window system at large. Moreover, the clipboard is not just for the text widget -- it can also be used to cut and paste graphical objects in the Canvas widget (discussed next). As used in this script, the basic Tkinter clipboard interface looks like this: self.clipboard_clear() # clear the clipboard self.clipboard_append(text) # store a text string on it text = self.selection_get(selection='CLIPBOARD') # fetch contents, if any All of these calls are available as methods inherited by all Tkinter widget objects because they are global in nature. The CLIPBOARD selection used by this script is available on all platforms (a PRIMARY selection is also available, but is only generally useful on X Windows, so we'll ignore it here). Notice that the clipboard selection_get call throws a TclError exception if it fails; this script simply ignores it and abandons a paste request, but we'll do better later. <IP_ADDRESS> Composition versus inheritanceAs coded, SimpleEditor uses inheritance to extend ScrolledText with extra buttons and callback methods. As we've seen, it's also reasonable to attach (embed) GUI objects coded as components, like ScrolledText. The attachment model is usually called composition; some people find it simpler to understand, and less prone to name clashes than extension by inheritance. To give you an idea of the differences between these two approaches, the following sketches the sort of code you would write to attach a ScrolledText to SimpleEditor with changed lines in bold font (see file simpleedit-2.py on the CD for a complete composition implementation). It's mostly a matter of passing in the right parents, and adding an extra "st" attribute name to get to the Text widget's methods: class SimpleEditor(Frame): def __init__(self, parent=None, file=None): Frame.__init__(self, parent) self.pack() frm = Frame(self) frm.pack(fill=X) Button(frm, text='Save', command=self.onSave).pack(side=LEFT) ...more... Quitter(frm).pack(side=LEFT) self.st = ScrolledText(self, file=file) # attach, not subclass self.st.text.config(font=('courier', 9, 'normal')) def onSave(self): filename = asksaveasfilename() if filename: alltext = self.st.gettext() # go through attribute open(filename, 'w').write(alltext) def onCut(self): text = self.st.text.get(SEL_FIRST, SEL_LAST) self.st.text.delete(SEL_FIRST, SEL_LAST) ...more... The window looks identical when such code is run. I'll let you be the judge of whether composition or inheritance is better here. If you code your Python GUI classes right, they will work under either regime. <IP_ADDRESS> It's called "Simple" for a reasonFinally, before you change your system registry to make SimpleEditor your default text file viewer, I should mention that although it shows the basics, it's something of a stripped-down version of the PyEdit example we'll meet in Chapter 9. In fact, you should study that example now if you're looking for more complete Tkinter text processing code in general. Because the text widget is so powerful, it's difficult to demonstrate more of its features without the volume of code that is already listed in the PyEdit program. I should also point out that SimpleEditor is not only limited in function, it's just plain careless -- many boundary cases go unchecked and trigger uncaught exceptions that don't kill the GUI, but are not handled or reported. Even errors that are caught are not reported to the user (e.g., a paste, with nothing to be pasted). Be sure to see the PyEdit example for a more robust and complete implementation of the operations introduced in SimpleEditor. 8.4.3 Advanced Text and Tag OperationsBesides position specifiers, text tags can also be used to apply formatting and behavior to both all characters in a substring, and all substrings added to a tag. In fact, this is where much of the power of the text widget lies:
With tags, it's possible to display multiple configurations within the same text widget; for instance, you can apply one font to the text widget at large, and other fonts to tagged text. In addition, the text widget allows you to embed other widgets at an index (they are treated like a single character), as well as images. Example 8-12 illustrates the basics of all these advanced tools at once, and draws the interface captured in Figure 8-20. This script applies formatting and event bindings to three tagged substrings, displays text in two different font and color schemes, and embeds an image and a button. Double-clicking any of the tagged substrings (or the embedded button) with a mouse triggers an event that prints a "Got tag event" message to stdout. Example 8-12. PP2E\Gui\Tour\texttags.py# demo advanced tag and text interfaces from Tkinter import * root = Tk() def hello(event): print 'Got tag event' # make and config a Text text = Text() text.config(font=('courier', 15, 'normal')) # set font for all text.config(width=20, height=12) text.pack(expand=YES, fill=BOTH) text.insert(END, 'This is\n\nthe meaning\n\nof life.\n\n') # insert 6 lines # embed windows and photos btn = Button(text, text='Spam', command=lambda: hello(0)) # embed a button btn.pack() text.window_create(END, window=btn) # embed a photo text.insert(END, '\n\n') img = PhotoImage(file='../gifs/PythonPowered.gif') text.image_create(END, image=img) # apply tags to substrings text.tag_add('demo', '1.5', '1.7') # tag 'is' text.tag_add('demo', '3.0', '3.3') # tag 'the' text.tag_add('demo', '5.3', '5.7') # tag 'life' text.tag_config('demo', background='purple') # change colors in tag text.tag_config('demo', foreground='white') # not called bg/fg here text.tag_config('demo', font=('times', 16, 'underline')) # change font in tag text.tag_bind('demo', '<Double-1>', hello) # bind events in tag root.mainloop() Figure 8-20. Text tags in actionSuch embedding and tag tools could ultimately be used to render a web page. In fact, Python's standard htmllib HTML parser module can help automate web page GUI construction. As you can probably tell, though, the text widget offers more GUI programming options than we have space to list here. For more details on tag and text options, consult other Tk and Tkinter references. Right now, art class is about to begin. |
| I l@ve RuBoard |


Android power consumption and WakeLock
Feb 04, 2015
Battery resource is precious in mobile devices. Android system will put the screen, keyboard(if any) and CPU to sleep if there is no user activity for a given time span. As the device may enter sleep mode at any time, we as programmers need to manage WakeLocks manually for long-term operations.
Foreground activity need to proceed for a long time with screen on, like a media player. If the app is not neccessary to keep running at background, then we should apply FLAG_KEEP_SCREEN_ON flag instead, or use android:keepScreenOn="true" in the layout file instead. WindowManager will automatically handle the lifecycles of WakeLocks for us during Acitivity switches, and we don't need to request additional permission WAKE_LOCK.
Under belowing conditions, the use of WakeLock should be minimized:The results of the background calculation is not sensible from foreground, or any delay of the result doesn't affect the main functionalities. An example is a news app which synchronizes latest news at background. However, as the app is not at foreground, users may not be highly interested at the news. So too much synchronization is not as beneficial as expected, while consuming too much power and network resources, which offends the user greatly.
PARTIAL_WAKE_LOCK:
keeps CPU on, doesn't keep screen and keyboard. It should be used for long-time running background tasks, like Service.
SCREEN_DIM_WAKE_LOCK:
keeps CPU on, screen on but dim, doesn't keep keyboard. Mostly we should use FLAG_KEEP_SCREEN_ON instead of using this type of WakeLock directly.
SCREEN_BRIGHT_WAKE_LOCK:
keeps CPU and screen on, doesn't keep keyboard. Mostly we should use FLAG_KEEP_SCREEN_ON instead of using this type of WakeLock directly.
FULL_WAKE_LOCK:
keeps CPU, screen, and keyboard on. Mostly we should use FLAG_KEEP_SCREEN_ON instead of using this type of WakeLock directly.
Despite PARTIAL_WAKE_LOCK, all other 3 types of WakeLocks will be automatically released by Android system when power button is pressed by user. With PARTIAL_WAKE_LOCK, when power button is pressed, screen is put off, but CPU will still keep running until the WakeLock is explicitly released. So in case a partial WakeLock is released too late or not released at all, the device keeps in high power-consumption mode, in a very short time the battery will be drained.
In addition, setReferenceCounted(false) is invoked to close the reference-counted property. If it's off, no matter how many times a WakeLock is acquired, only one release() is required to withdrawn the WakeLock. On contrast, if the property is on, the WakeLock object keeps a reference counter, if and only if the number of invokations of release() is equal to acquire(), the WakeLock will be released. As the property is on by default, so I recommend to close it before acquiring the WakeLock in most normal cases.
The static method startWakefulService() of WakefulBroadcastReceiver (WBR) inserts an integer into the extra field of the Intent, which relates to the newly obtained WakeLock object. In Service class, after the completion of business logic, just pass the Intent object from onStartCommand() paramters to completeWakefulIntent(), which reads out the integer value inserted before from the Intent, gets the WakeLock and releases it.
It should be noted that, the hosting process of Service may be killed by system at any time due to memory restriction. If it's a START_REDELIVER_INTENT Service, Android will restart it at proper time and re-deliver the same Intent object to the Service. However, as previous process is killed, the related WakeLocks have all been released (link-to-death), and the static fields of WBR have been reseted. So calling completeWakefulIntent() in a restarted Service is not only meaningless, but may mistakenly release the WakeLock held by another module (with the same integer value). In such a case, we should take case of it inside onStartCommand(): So the main purpose of using WBR is to ensure that device will not sleep during transition from Receiver to Service.
In the sample of Android SDK about WBR, IntentService is used with WBR. However, as IntentService.onHandleIntent() doesn't have a parameter like the second parameter 'flags' of onStartCommand(), we are unable to identify whether the Service is started from Receiver, or re-started by Android system, which may cause the wrong releasing of WakeLock mentioned above.
Do not use WakeLock frequently
Any usage of WakeLock has impact on battery power, so care must be taken. It's not proper to use WakeLock in following circumstance(s):Under belowing conditions, the use of WakeLock should be minimized:
Types of WakeLocks
The first parameter of PowerManager.newWakeLock() specifies the type of WakeLock:keeps CPU on, doesn't keep screen and keyboard. It should be used for long-time running background tasks, like Service.
keeps CPU on, screen on but dim, doesn't keep keyboard. Mostly we should use FLAG_KEEP_SCREEN_ON instead of using this type of WakeLock directly.
keeps CPU and screen on, doesn't keep keyboard. Mostly we should use FLAG_KEEP_SCREEN_ON instead of using this type of WakeLock directly.
keeps CPU, screen, and keyboard on. Mostly we should use FLAG_KEEP_SCREEN_ON instead of using this type of WakeLock directly.
Despite PARTIAL_WAKE_LOCK, all other 3 types of WakeLocks will be automatically released by Android system when power button is pressed by user. With PARTIAL_WAKE_LOCK, when power button is pressed, screen is put off, but CPU will still keep running until the WakeLock is explicitly released. So in case a partial WakeLock is released too late or not released at all, the device keeps in high power-consumption mode, in a very short time the battery will be drained.
Simple case to ensure WakeLock release
A simple solution to ensure the release of WakeLock is try-catch-finally pattern. In code above, we use acquire(long timeout) instead of acquire(). It is used to ensure that for any case that release() is not called, the WakeLock will still be released by system after 'timeout' milli-seconds.In addition, setReferenceCounted(false) is invoked to close the reference-counted property. If it's off, no matter how many times a WakeLock is acquired, only one release() is required to withdrawn the WakeLock. On contrast, if the property is on, the WakeLock object keeps a reference counter, if and only if the number of invokations of release() is equal to acquire(), the WakeLock will be released. As the property is on by default, so I recommend to close it before acquiring the WakeLock in most normal cases.
WakefulBroadcastReceiver and its drawbacks
Normally, a background task is triggered from a broadcast. If we don't obtain a WakeLock, the device may get to sleep at any point right after onReceive(). So if a Serivce is started from onReceive(), we need to acquire a WakeLock inside onReceive(), and release the WakeLock in Service when the task is completed. As the acquiring and releasing of WakeLocks are distributed among different software modules, the complexity of code logic thus increases a lot. Officially Android SDK suggests the using of a utility class named WakefulBroadcastReceiver to handle this issue.The static method startWakefulService() of WakefulBroadcastReceiver (WBR) inserts an integer into the extra field of the Intent, which relates to the newly obtained WakeLock object. In Service class, after the completion of business logic, just pass the Intent object from onStartCommand() paramters to completeWakefulIntent(), which reads out the integer value inserted before from the Intent, gets the WakeLock and releases it.
It should be noted that, the hosting process of Service may be killed by system at any time due to memory restriction. If it's a START_REDELIVER_INTENT Service, Android will restart it at proper time and re-deliver the same Intent object to the Service. However, as previous process is killed, the related WakeLocks have all been released (link-to-death), and the static fields of WBR have been reseted. So calling completeWakefulIntent() in a restarted Service is not only meaningless, but may mistakenly release the WakeLock held by another module (with the same integer value). In such a case, we should take case of it inside onStartCommand(): So the main purpose of using WBR is to ensure that device will not sleep during transition from Receiver to Service.
In the sample of Android SDK about WBR, IntentService is used with WBR. However, as IntentService.onHandleIntent() doesn't have a parameter like the second parameter 'flags' of onStartCommand(), we are unable to identify whether the Service is started from Receiver, or re-started by Android system, which may cause the wrong releasing of WakeLock mentioned above.


---
layout: default
---
This section contains various white papers about multiple Particl protocols. A white paper is defined as an authoritative report or guide that informs readers concisely about a complex issue and presents the issuing body's philosophy on the matter.
Whitepapers


All Files (96.59% covered at 1.33 hits/line)
33 files in total.
176 relevant lines.
170 lines covered and
6 lines missed
- 1
class ApplicationController < ActionController::Base
- 1
protect_from_forgery with: :exception
end
- 1
class LeadsController < ApplicationController
- 1
def new
- 3
@lead = Lead.new
end
- 1
def create
- 2
@lead = Lead.new(insightly_params_lead)
- 2
if @lead.save
InsightlyService::Lead.create(@lead)
OnBoardMailer.welcome_email(@lead).deliver
redirect_to root_path
else
- 2
render :new
end
end
- 1
private
- 1
def insightly_params_lead
- 2
params.require(:lead).permit(
:first_name,
:last_name,
:title,
:organization_name,
:phone_number,
:email,
:training_solution,
:training_solution_description)
end
end
- 1
class StaticPagesController < ApplicationController
- 1
def blogs
@objects = ContentfulService.get_blogs
end
end
- 1
module ApplicationHelper
end
- 1
module LeadsHelper
end
- 1
module OpportunitiesHelper
end
- 1
module OrganisationsHelper
end
- 1
module StaticPagesHelper
end
- 1
class OnBoardMailer < ActionMailer::Base
- 1
default :from =><EMAIL_ADDRESS>- 1
def welcome_email(lead)
@lead = lead
mail( :to => @lead.email, :subject => 'Thanks for signing up for our amazing app')
end
end
- 1
class ApplicationRecord < ActiveRecord::Base
- 1
self.abstract_class = true
end
- 1
class Lead < ApplicationRecord
- 1
validates :first_name, :presence => true
- 1
validates :last_name, :presence => true
- 1
validates :title, :presence => true
- 1
validates :organization_name, :presence => true
- 1
validates :email, :presence => true
- 1
validates :training_solution, :presence => true
- 1
validates :training_solution_description, :presence => true
end
- 1
require_relative 'boot'
- 1
require "rails"
# Pick the frameworks you want:
- 1
require "active_model/railtie"
- 1
require "active_job/railtie"
- 1
require "active_record/railtie"
- 1
require "action_controller/railtie"
- 1
require "action_mailer/railtie"
- 1
require "action_view/railtie"
- 1
require "action_cable/engine"
- 1
require "sprockets/railtie"
# require "rails/test_unit/railtie"
# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
- 1
Bundler.require(*Rails.groups)
- 1
module Stwotwo
- 1
class Application < Rails::Application
# Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers
# -- all .rb files in that directory are automatically loaded.
end
end
- 1
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
- 1
require 'bundler/setup' # Set up gems listed in the Gemfile.
# Load the Rails application.
- 1
require_relative 'application'
# Initialize the Rails application.
- 1
Rails.application.initialize!
- 1
ActionMailer::Base.smtp_settings = {
:address => 'smtp.sendgrid.net',
:port => '587',
:authentication => :plain,
:user_name => ENV['SENDGRID_USERNAME'],
:password => ENV['SENDGRID_PASSWORD'],
:domain => "localhost:3000",
}
- 1
Rails.application.configure do
- 1
config.cache_classes = true
- 1
config.eager_load = false
- 1
config.public_file_server.enabled = true
- 1
config.public_file_server.headers = {
'Cache-Control' => 'public, max-age=3600'
}
- 1
config.consider_all_requests_local = true
- 1
config.action_controller.perform_caching = false
- 1
config.action_dispatch.show_exceptions = false
- 1
config.action_controller.allow_forgery_protection = false
- 1
config.action_mailer.perform_caching = false
- 1
config.action_mailer.delivery_method = :test
- 1
config.active_support.deprecation = :stderr
end
# Be sure to restart your server when you modify this file.
# ApplicationController.renderer.defaults.merge!(
# http_host: 'example.org',
# https: false
# )
# Be sure to restart your server when you modify this file.
# Version of your assets, change this if you want to expire all your assets.
- 1
Rails.application.config.assets.version = '1.0'
# Add additional assets to the asset load path
# Rails.application.config.assets.paths << Emoji.images_path
# Precompile additional assets.
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
# Rails.application.config.assets.precompile += %w( search.js )
# Be sure to restart your server when you modify this file.
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
# Rails.backtrace_cleaner.remove_silencers!
# Be sure to restart your server when you modify this file.
# Specify a serializer for the signed and encrypted cookie jars.
# Valid options are :json, :marshal, and :hybrid.
- 1
Rails.application.config.action_dispatch.cookies_serializer = :json
# Be sure to restart your server when you modify this file.
# Configure sensitive parameters which will be filtered from the log file.
- 1
Rails.application.config.filter_parameters += [:password]
# Be sure to restart your server when you modify this file.
# Add new inflection rules using the following format. Inflections
# are locale specific, and you may define rules for as many different
# locales as you wish. All of these examples are active by default:
# ActiveSupport::Inflector.inflections(:en) do |inflect|
# inflect.plural /^(ox)$/i, '\1en'
# inflect.singular /^(ox)en/i, '\1'
# inflect.irregular 'person', 'people'
# inflect.uncountable %w( fish sheep )
# end
# These inflection rules are supported but not enabled by default:
# ActiveSupport::Inflector.inflections(:en) do |inflect|
# inflect.acronym 'RESTful'
# end
# Be sure to restart your server when you modify this file.
# Add new mime types for use in respond_to blocks:
# Mime::Type.register "text/richtext", :rtf
# Be sure to restart your server when you modify this file.
#
# This file contains migration options to ease your Rails 5.0 upgrade.
#
# Read the Guide for Upgrading Ruby on Rails for more info on each option.
# Enable per-form CSRF tokens. Previous versions had false.
- 1
Rails.application.config.action_controller.per_form_csrf_tokens = true
# Enable origin-checking CSRF mitigation. Previous versions had false.
- 1
Rails.application.config.action_controller.forgery_protection_origin_check = true
# Make Ruby 2.4 preserve the timezone of the receiver when calling `to_time`.
# Previous versions had false.
- 1
ActiveSupport.to_time_preserves_timezone = true
# Require `belongs_to` associations by default. Previous versions had false.
- 1
Rails.application.config.active_record.belongs_to_required_by_default = true
# Do not halt callback chains when a callback returns false. Previous versions had true.
- 1
ActiveSupport.halt_callback_chains_on_return_false = false
# Configure SSL options to enable HSTS with subdomains. Previous versions had false.
- 1
Rails.application.config.ssl_options = { hsts: { subdomains: true } }
# Be sure to restart your server when you modify this file.
- 1
Rails.application.config.session_store :cookie_store, key: '_stwotwo_session'
# Be sure to restart your server when you modify this file.
# This file contains settings for ActionController::ParamsWrapper which
# is enabled by default.
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
- 1
ActiveSupport.on_load(:action_controller) do
- 2
wrap_parameters format: [:json]
end
# To enable root element in JSON for ActiveRecord objects.
# ActiveSupport.on_load(:active_record) do
# self.include_root_in_json = true
# end
- 1
Rails.application.routes.draw do
- 1
root to: 'static_pages#landing'
- 1
get 'blog', to: 'static_pages#blogs'
- 1
get 'about', to: 'static_pages#about'
- 1
get 'training_solutions', to: 'static_pages#training_solutions'
- 1
resources :leads
- 1
resources :organisations
- 1
resources :opportunities
end
- 1
require 'rails_helper'
- 1
describe LeadsController do
- 1
describe "GET new" do
- 1
it "renders a 200 response" do
- 1
get :new
- 1
expect(response.status).to eq(200)
end
- 1
it "renders the new template" do
- 1
get :new
- 1
expect(response).to render_template(:new)
end
- 1
it "assigns a new category" do
- 1
get :new
- 1
expect(assigns(:lead)).to be_a_new(Lead)
end
end
- 1
describe "POST create", :vcr => true do
- 1
it "renders a 302 response" do
- 1
@lead = attributes_for(:lead)
- 1
post :create, :lead => @lead
- 1
expect(response.status).to eq(302)
end
- 1
it "renders the new if a fields are empty" do
- 1
post :create, :lead => {:last_name => nil}
- 1
expect(response).to render_template(:new)
end
end
end
- 1
require 'rails_helper'
- 1
RSpec.describe StaticPagesController, type: :controller do
end
- 1
FactoryGirl.define do
- 1
factory :lead do
- 1
prefix "jr."
- 1
title "welder"
- 1
first_name "test"
- 1
last_name "test"
- 1
organization_name "weld_it"
- 1
phone_number "test"
- 1
email<EMAIL_ADDRESS>- 1
website "test.com"
end
end
- 1
require "rails_helper"
- 1
describe OnBoardMailer do
- 1
describe "welcome_email" do
- 1
let(:mail) { OnBoardMailer.welcome_email }
# it "renders the headers" do
# expect(mail.subject).to eq("Welcome email")
# expect(mail.to).to<EMAIL_ADDRESS># expect(mail.from).to<EMAIL_ADDRESS># end
#
# it "renders the body" do
# expect(mail.body.encoded).to match("Hi")
# end
end
end
- 1
require 'rails_helper'
- 1
describe Lead do
- 2
it { should have_db_column :title }
- 2
it { should have_db_column :first_name }
- 2
it { should have_db_column :last_name }
- 2
it { should have_db_column :organization_name }
- 2
it { should have_db_column :phone_number }
- 2
it { should have_db_column :email }
- 2
it { should have_db_column :training_solution }
- 2
it { should have_db_column :training_solution_description }
- 2
it { should validate_presence_of :first_name }
- 2
it { should validate_presence_of :last_name }
- 2
it { should validate_presence_of :title }
- 2
it { should validate_presence_of :organization_name }
- 2
it { should validate_presence_of :email }
- 2
it { should validate_presence_of :training_solution }
- 2
it { should validate_presence_of :training_solution_description }
end
- 1
ENV['RAILS_ENV'] ||= 'test'
- 1
require File.expand_path('../../config/environment', __FILE__)
- 1
abort("The Rails environment is running in production mode!") if Rails.env.production?
- 1
require 'spec_helper'
- 1
require 'rspec/rails'
- 1
require 'capybara/rails'
- 1
require 'support/factory_girl'
- 1
require 'factory_girl_rails'
- 1
require 'database_cleaner'
- 1
require 'webmock/rspec'
- 1
ActiveRecord::Migration.maintain_test_schema!
- 1
RSpec.configure do |config|
- 1
config.fixture_path = "#{::Rails.root}/spec/fixtures"
- 1
config.use_transactional_fixtures = true
- 1
config.infer_spec_type_from_file_location!
- 1
config.filter_rails_from_backtrace!
- 1
[:controller, :view, :request].each do |type|
- 3
config.include ::Rails::Controller::Testing::TestProcess, :type => type
- 3
config.include ::Rails::Controller::Testing::TemplateAssertions, :type => type
- 3
config.include ::Rails::Controller::Testing::Integration, :type => type
end
- 1
config.before(:suite) do
- 1
DatabaseCleaner.strategy = :truncation
end
- 1
config.around(:each) do |data|
- 20
DatabaseCleaner.cleaning do
- 20
data.run
end
end
end
- 1
Shoulda::Matchers.configure do |config|
- 1
config.integrate do |with|
- 1
with.test_framework :rspec
- 1
with.library :rails
end
end
- 1
VCR.configure do |config|
- 1
config.cassette_library_dir = 'spec/cassettes'
- 1
config.hook_into :webmock
- 1
config.configure_rspec_metadata!
end
- 1
RSpec.configure do |config|
- 1
config.include FactoryGirl::Syntax::Methods
end


| GEOS SDK TechDocs
|
| 1 Geodes
| 1.2 Launching an Application
A geode is simply a special type of GEOS file. It has a special file header that gets loaded in as the geode's core block. This file header contains the geode's type, attributes, release and protocol levels, and many other pieces of information necessary for GEOS to work with the geode. You never will have to know the exact structure of this header as the kernel provides routines necessary to access important portions of it.
Several important items contained in the header are listed below.
-
Core Block Handle
The core block contains its own memory handle, filled in when the geode is loaded into memory.
-
Geode Attributes
Each geode has a record of type
GeodeAttrs
. The geode attributes are described below in Geode Attributes
.
-
Release and Protocol Levels
Each geode can have release and protocol levels associated with it to ensure compatibility between different versions. Release and protocol levels are discussed in Protocol Numbers
.
-
Geode Name
Each geode has a geode name and extension specified in the geode parameters (
.gp
) file.
-
Geode Token
Every geode has a token associated with it in the token database. The token describes the geode's icon and is a structure of type
GeodeToken
. Tokens and icons are discussed in Creating Icons
.
-
Geode Reference Count
The geode's reference count is stored in the core block. See above for a discussion of the reference count and how it's managed.
-
Geode File Handle
The file handle of the geode identifies the open GEO file so the kernel can locate, load, and access its various resources.
-
Geode Process Handle
Each geode that has a parent process will have the handle of the process in its core block. This is the handle of the parent process' core block. (The parent process is the owner of the thread that loaded the geode. It is notified when the geode exits, if the exiting geode is a process.)
-
Handle of the Next Geode
Because geode core blocks are stored in a linked list, each core block must contain a reference to the next geode in the list.
-
Handle of Private Data Space
Each geode that is not the kernel can have a "private data space." This private data space is discussed in Temporary Geode Memory
.
-
Resource, Library, and Driver Information
Each geode that imports or exports library or driver information must keep the import and export specifics available. Additionally, each geode must keep track of the resources it owns. All this information is stored in tables referenced from within the core block.
Geode Attributes
Each geode has in its core block a record of type
GeodeAttrs
. This record defines several things about the geode, including which aspects it uses and which of its aspects have been initialized. The
GeodeAttrs
record contains one bit for each of the following attributes.
-
GA_PROCESS
-
This geode has a process aspect and therefore an initial event-driven thread.
-
GA_LIBRARY
- This geode has a library aspect and therefore exports routines (and possibly object classes).
-
GA_DRIVER
- This geode has a driver aspect and therefore has a driver table, in which the strategy routine is specified.
-
GA_KEEP_FILE_OPEN
-
This geode must have its .GEO file kept open because its resources may be discardable or are initially discarded.
-
GA_SYSTEM
- This geode is a privileged geode and is almost certainly a system-used driver. These geodes have special exit requirements.
-
GA_MULTI_LAUNCHABLE
-
This geode may be loaded more than once and therefore may have more than one instance of its core block in memory.
-
GA_APPLICATION
-
This geode is a user-launchable application.
-
GA_DRIVER_INITIALIZED
-
This flag is set if the geode has had its driver aspect initialized (if the driver's strategy routine has been initialized). This flag will be set dynamically by the kernel.
-
GA_LIBRARY_INITIALIZED
-
This flag is set if the geode has had its library aspect initialized (if the library's entry routine has been called). This flag will be set dynamically by the kernel.
-
GA_GEODE_INITIALIZED
-
This flag is set if all aspects of the geode have been initialized.
-
GA_USES_COPROC
-
This geode uses a math coprocessor if one is available.
-
GA_REQUIRES_COPROC
-
This geode requires the presence of a math coprocessor or a coprocessor emulator.
-
GA_HAS_GENERAL_CONSUMER_MODE
-
This geode may be run in the General Consumer (appliance) Mode.
-
GA_ENTRY_POINTS_IN_C
-
This geode has its library entry routine in C rather than assembly language.
Geode Token
As stated above, every geode is associated with a token in the token database. This token is defined by the use of a
GeodeToken
structure. This structure and its uses are discussed in Creating Icons
.
| GEOS SDK TechDocs
|
| 1 Geodes
| 1.2 Launching an Application


Natco Pharma profit before tax drops 40% in Q2 to Rs 139 cr on tepid sales
The board of directors of Natco Pharma has recommended second interim dividend of Rs 1 per equity share of Rs 2 each
by BS ReporterNatco Pharma Limited has reported a 40 per cent decline in consolidated profit before tax to Rs 139.4 crore for the quarter ended September, 2019, compared with Rs 235.3 crore in the corresponding quarter last year.
Total income for quarter under review also declined 11 per cent to Rs 518.9 crore from Rs 583.5 crore in the year ago period. The company said the decline in revenues and profits compared to the same period last year was primarily due to the anticipated drop in oseltamivir product sales in the US and Hep C sales in India.
The board of directors of Natco Pharma has recommended second interim dividend of Rs 1 per equity share of Rs 2 each.


Daily Review: A Startup Uses Quantum Computing to Transform the World of Machine Learning
Machine learning applications are storing the financial services industry with institutions and regulatory bodies putting technology into real use. Real-world applications, however, are not where the change happens as talented scientists are looking to revolutionize the hardware behind machines with quantum computing capabilities. Rigetti Computing, a company based in California, is a curious example and a source of important findings.
30 Non-Financial Use Cases of Blockchain Technology
While financial use cases of blockchain technology are at the spotlight due to the significant interest of powerful parties – banks, investors, and even governments– non-financial use cases of DLT are of equally significant importance to a number of industries. Along with banks and FinTech startups, non-financial players have been paying attention and looking for ways to leverage the opportunities that DLT opens. Let’s look at some interesting examples of the applications of blockchain technology beyond financial services:
Genius of Things: Blockchain & Safety With IBM and Walmart
Frank Yiannas, VP of Food Safety at Walmart, and John Cohn, IBM Fellow & Chief Scientist for Internet of Things, share the opportunistic area of supply chain quality control in the food industry, powered by blockchain-based solution developed by IBM.
ICO Launching Services Are Proliferating Amidst Crypto-Frenzy of 2017
With demand comes supply, and the old truth proved to be working in 2017 when we saw a significant proliferation of Initial Coin Offerings (ICOs). Regulatory bodies have come through for an innovative way to fund an enterprise, extending the opportunity to invest to larger audiences.


Q - Where you can use this button?
A - In your mobile website where you want to accept UPI Payments.
Q - What happen when we click the button?
A - When customer clicks the button, it will open BHIM or anyother UPI app. You can pay using UPI app.
Q - Can I use this button for donation buttons?
A - Yes.
Q - Can I use this button on my shopping kart?
A - No. Shopping kart need database level integration where payment status needed to be tracked from Payment Gateway or Bank Server.
You can contact us or other payment gateway for UPI integration to your shopping kart or similar website
Email -<EMAIL_ADDRESS>Q - Where i can find more about this technology?
Q - Why this page looks ugly?
A - I am lazy when it comes to CSS. Source code is available at github. Send me a PR. https://github.com/billexo/UPI-Button
Narendra Sisodiya


2013-06-11
After three years of development, we're proud to release our first version of Camlistore, 0.1, codename "Grenoble", the beautiful city where we're currently releasing it from.
As reflected in the version number, Camlistore is not yet done, but it's at least ready for people to start using and playing with. We've been using it ourselves for a year.
We plan to do subsequent releases in a more timely fashion.
camput
: upload blobs, files, or directories (any size). The camput tool can also make share claims to share those resources with others, or can be used to make raw permanodes & claims.camget
: get blobs or files (not directories), either your own, or from friends' Camlistore servers if they've shared with you.cammount
: FUSE-mount your Camlistore (Linux and OS X only): either static directories (e.g. backups from camput), or a virtual "recent" directories of recent files uploaded (e.g. from your Android phone)camtool
: additional swiss-army knife tools, and manual sync tool ("camtool sync").camlistored
: the server.camlistored
: The server supports both asynchronous and synchronous replication from incoming blobs to any storage backend, which includes other remote Camlistore serverscamtool sync
: The camtool command supports syncing from servers (or local disk blob directories) to other servers (or other local disk blob directories), as well as a "third-leg" mode, where you can sync from A to B> by using the network to communicate differences, but instead copying missing blobs to destination C (e.g. a local portable harddisk to be manually transported to B)Things currently known to be broken or not yet finished:
We welcome feedback, feature requests, bug reports, and code contributions!
Feel free to email us on our mailing list, and/or file a bug (or see existing bugs).
While we welcome user bug reports, we also welcome code contributions. See the Contributing page for details. While most the codebase (the server and command-line tools) are written in Go, there's also a lot of JavaScript which needs love, as well as Java (for Android) and Objective C (for iOS). Or anything useful you'd like to contribute.


We like onepage websites, but sometimes you just need more space to show to people what you do.
So here it is, full screen modals to show any content that you like. Check it out by clicking on one of the items:
Modal #1
Don't forget that you can add anything in this modal!


Random Team Generator
Players per Team:
1
2
3
4
5
6
7
8
9
10
Input a player name then press enter:
Teams:
Roster:


Polyommatinae
Upperside of male iridescent silvery blue with narrow dark borders; female darker blue with wide borders. Both sexes have white fringe. Underside gray-brown; both wings with row of white-ringed, round black spots. Subspecies xerces (Boisduval) and pseudoxerces Emmel and Emmel have large white spots with or without black centers.
A variety of locations including open woods, coastal dunes, prairies, meadows, road edges, rocky moist woods, and brushy fields.
One flight from March-June at low elevations, June-August at high elevations.
Nectar from flowers including Asteraceae.


Search
K
Done
All Categories
Music
Entertainment
Education
Sports
Howto & Style
Comedy
Gaming
Film and Animation
Pets & Animals
Beauty & Fashion
Science & Technology
Auto & Vehicles
News & Politics
Travel & Events
Comedy
People & Blogs
Done


Preparation time
30 mins to 1 hour
Cooking time
10 to 30 mins
Serves
Serves 4
Dietary
Kaiserschmarrn is an extremely delicious Austrian pudding, like a thick, light, buttery pancake, served with fruit.
For strawberry sauce, set aside 350g/12oz of the strawberries and 60g/2¼oz of the sugar.
In a heavy saucepan, combine the remaining strawberries, 125ml/4fl oz water, 115g/4oz of the sugar, the orange juice, star anise and Grand Marnier.
Bring to a boil over medium heat, stirring occasionally to prevent scorching. Reduce the heat and simmer for 10 minutes.
Remove the strawberries from the heat and cover with cling film. Set aside to infuse for 10 minutes.
Remove the star anise and pour the strawberry mixture into a blender, and blend to a fine purée.
Strain the sauce through a fine sieve and reserve in a pan ready to use, or refrigerate if not using right away.
Preheat the oven to 210C/425F/Gas 7.
For the kaiserschmarrn, generously butter two ovenproof dishes 22cm/8½ in diameter. Dust each pan with sugar and tap out any excess.
In a medium bowl with a hand mixer, beat the egg yolks with 25g/1oz of the caster sugar until mixture is light and lemony yellow.
Beat in the fromage blanc and mix until well combined.
Beat in the crème fraîche and rum, then beat in the flour. Stir through the raisins.
In another bowl and using an electric whisk or stand mixer, whisk the egg whites on medium-low speed until they foam, then add the cream of tartar.
Turn the speed up to medium and continue to beat while slowly pouring in the remaining 150g/5½oz sugar. Whisk until stiff peaks form when the whisk is removed.
Whisk half the egg whites into the crème fraiche mixture, then gently fold in the remaining egg whites.
Divide the mixture equally between the two sugared pans.
Bake the kaiserschmarrn in the middle of the oven for 15 minutes. Turn the pans if browning unevenly and bake for another 5-8 minutes, until puffed and brown. The center should be set and slightly firm.
Meanwhile, in a large saucepan, bring the strawberry sauce to a boil over high heat. Add the reserved 60g/2¼oz sugar and stir until the sugar has dissolved. Cook the sauce over a high heat for a minute.
Add the reserved 350g/12oz cut strawberries, and stir through the sauce to coat. To serve, divide the strawberry sauce among four serving plates.
Using a serving spoon divide each one into two portions and spoon on top of the strawberry sauce. Dust with icing sugar and serve immediately.


Dr. Yao Li and Dr. Yuan Shen received their PhDs and were hooded by Evan at the graduation ceremony held by the Departments of Physics and Applied Physics on June 18, 2017. Congratulations Yuan and Yao!
Dr. Yao Li and Dr. Yuan Shen received their PhDs and were hooded by Evan at the graduation ceremony held by the Departments of Physics and Applied Physics on June 18, 2017. Congratulations Yuan and Yao!


We have deployed Suma Crm version v.1.2
We are introducing following new feature in this deployment :
-
Chat Engine : We have implemented the Group Chat facility, as soon implement the private chat as well.
-
Bell Notification : Bell Notification for company feed activity like comment, like etc.
-
Task Managment : Under this you can create task and assign and easily track the progress.
-
Group Image : As an admin of the group you can change the logo or the group image in header section.
Please visit our application : http://suma-crm.tk/
You are welcome with your suggestions
SumaSoft Development Team


--- layout: post title: Tyranny of the majority date: 2004-11-02 00:00:00 category: personal ---
Surely if very close to 50% of the population of a country disagree fundamentally over a long period with the other near-50%, then it's worth considering splitting into 2 countries and avoiding the tyranny of the majority?
I mean, what sort of mandate does 51% of the vote give you over the other 49% who didn't vote for you?


fun saveTimestamp(timeStamp: String?): Boolean?
saves the timestamp when searched
timeStamp - : String the timestamp when searched
timeStamp


Home
Info
Cards
Tokenomics
Blog
Team
LAUNCH APP
morphine Token
$MRP is here to make digital artist, and their designs, Musics and arts more successful and help them release it in form of NFT's in the digital decentralized world of crypto currency .
marketplace
Buy Morphine Token
Uniswap
Pancake
HoneySwap
Quickswap
Our Partners
Tipcc
$FIRST
Increasity
Ads Social
CCTip
Eagle Coin
Get in touch
Twitter
Discord
Telegram
Email us
Github


Distinct
In our index configuration, we apply the distinct feature on the model of the product (e.g. "Tshirt A").
It enables us to limit the number of color-variants of a product shown in the search results.
False True 2 3Distinct is disabled, we display all the variations of the products.


|
Class Summary |
| AnonProc |
The AnonProc class implements anonymous procedures,
created like so: set aproc [proc {x} { puts $x }] |
| ClassCommandInfo |
The ClassCommandInfo holds information about a class command
that may be attached to an interpreter. |
| CodeThing |
The CodeThing class implements a chunk of "compiled" code
including multiple "Stanzas", or individual commands. |
| Compare |
The Compare class exists to compare things in different ways. |
| DoubleThing |
The DoubleThing class represents a Thing that contains
a double value. |
| FractionalThing |
The FractionalThing class is for floating point
values. |
| GroupThing |
The GroupThing class is for Hecl "groups". |
| HashThing |
The HashThing class represents a hash table type in Hecl. |
| HeclTask |
|
| IntegralThing |
The IntegralThing class represents integer values - in
practice, ints and longs. |
| Interp |
Interp is the Hecl interpreter, the class responsible for
knowing what variables and commands are available. |
| Interp.WaitToken |
|
| IntThing |
The IntThing class represents an integer Thing. |
| ListThing |
The ListThing class implements lists, storing them internally
as a Vector. |
| LongThing |
The LongThing class represents a 'long' Thing. |
| MathCmds |
The MathCmds class implements a variety of math
commands, depending on which version of Java Hecl is compiled for. |
| NumberThing |
The NumberThing class is what all numeric Thing types
are derived from. |
| ObjectThing |
The ObjectThing class provides a wrapper for objects
that are not directly representable as strings. |
| Operator |
The Operator class implements a number of features
that are used in the creation of groups of commands, such as those
found in InterpCmds, ListCmds, and so on. |
| Parse |
The Parse class takes care of parsing Hecl scripts. |
| ParseList |
ParseList parses up Hecl lists. |
| ParseState |
The ParseState class is the state of the current parse. |
| PrintThing |
The PrintThing class is a utility class used to print out
Things. |
| Properties |
The Properties class is used to parse command line
arguments. |
| StringThing |
The StringThing class is the internal representation of string
types. |
| SubstThing |
The SubstThing class represents things that must be
substituted - $foo or &foo for example. |
| Thing |
The Thing class is what Hecl revolves around. |


{include file="public/css" /} {include file="public/js" /}
{include file="public/header1" /} {include file="public/header2" /} {include file="public/footer1" /} {include file="public/footer2" /} {include file="public/js_1" /} $(document).ready(function() { $('#slider').slider({ speed: 500 }); }); $('#main_nav_marketing').addClass('menu_home');


{{ partial "head.html" . }}
Formerly mobile engineering at Twitter, CTO Snip.it (acquired by Yahoo!), and Investing Partner at Builders.vc. Now helping early stage companies build the products they want to build.
In my free time I like to travel, eat fearlessly, avoid traffic, work on open source projects, and violate terms of service agreements.


November 12: Time Out: Sporting greats, Dates and a Quick Quiz blitz...
by The Irish News Archive and PABACK IN THE DAY
The Irish News, November 12 2009: Ryan Cup quarter-final: University of Ulster, Jordanstown 2-10 University College, Dublin 1-9
University of Ulster, Jordanstown turned in a brilliant display to overcome University College, Dublin in last night’s Ryan Cup quarter-final in St Patrick’s Park, Mayobridge. Played in atrocious conditions, with a strong breeze and heavy rain falling throughout, the game finished with water lying on the pitch, and it was a tribute to both teams that an exciting encounter took place.
UUJ won this game the hard way. For 40 minutes they played with only 14 players after Armagh full-forward Stefan Forker received a straight red card.
But in a sound UUJ defence, Colm Murney, Gerard McCartan and Monaghan’s Donal Morgan were outstanding. At midfield, the Monaghan duo of Shane Mulligan and Darren Hughes played their hearts out, especially in the second half when they faced the sleeting rain and strong breeze.
The Jordanstown attack played some delightful football in the conditions, but poor finishing cost them vital scores, especially in the second half.
The Tyrone trio of Kieran Donnelly, Peter Hughes and Jason McAnulla gave the UCD defence a testing time, and McAnulla’s two goals were the deciding scores in the game.

Sammy Sosa (baseball) - former major league star, born 1968.
Tonya Harding (ice skating) - former United States Olympic team member, born 1970.
Jason Lezak (swimming) - Four-time Olympic and three-time world relay champion for the US, born 1975.
Charlie Hodgson (rugby union) - former England fly-half, born 1980.
Nedum Onuoha (soccer) - Former QPR's and Manchester City defender, now with MLS side Real Salt Lake, born 1986.
Jason Day (golf) - Australian former world number one, born 1987.
Russell Westbrook (basketball) - Houston Rockets point guard, won 2012 Olympic gold with the United States, born 1988.
QUICK QUIZ
1. What was the ring-name of Belfast fighter Martin Lindsay?
2. Who was taken off on a stretcher after suffering an ankle injury in Manchester United's 3-1 defeat of Brighton on Sunday?
3. Which country has just won the Fed Cup in tennis?
4. Which club won the 2018/19 Ulster GAA Hurling Club Championship title?
5. Baseball's World Series-winning Washington Nationals were previously based in which North American city?
(See quiz answers below)
ON THIS DAY
1990: The Football Association disciplinary commission decided to fine Arsenal and Manchester United £50,000 each as punishment for the brawl involving 21 players at Old Trafford on October 20. In addition to the fine, two league points were deducted from Arsenal and one from United.
2004: John Toshack signed a five-year contract to become the new manager of Wales.
2009: Premier League clubs rejected a proposal to accept Celtic and Rangers in the English top flight.
2009: Manchester United manager Sir Alex Ferguson was given a four-match touchline ban - two of which were suspended - fined £20,000 and warned as to his future conduct by the FA following comments about referee Alan Wiley.
2015: Former Sunderland goalkeeper Marton Fulop died from cancer at the age of 32.
2016: England ended a 10-year wait for victory over South Africa with a 37-21 Test success at Twickenham which extended Eddie Jones' 100 per cent record as head coach to 10 matches.
2017: Northern Ireland failed to qualify for the World Cup after a 0-0 draw with Switzerland in Basel, losing 1-0 on aggregate.
SPORT ON TV
Today (Tuesday, November 12)
SOCCER: Women's international friendly, Czech Republic v England - BBC Four 1900.
TENNIS: ATP World Tour Finals - BBC Two 1400.
DARTS: Grand Slam of Darts - Sky Sports Main Event and Sky Sports Action 1900.
SNOOKER: Northern Ireland Open - Eurosport 1 1245 & 1845.
Tomorrow (Wednesday, November 13)
TENNIS: ATP World Tour Finals - BBC Two 1400.
DARTS: Grand Slam of Darts - Sky Sports Main Event and Sky Sports Action 1900.
SNOOKER: Northern Ireland Open - Eurosport 1 1245 & 1845.
BASKETBALL: NBA, Los Angeles Clippers v Golden State Warriors - Sky Sports Main Event 0300 (Thur).
QUICK QUIZ answers: 1. 'Mac Man'; 2. Scott McTominay; 3. France; 4. Ruairí Óg, Cushendall (beating Ballycran 1-15 to 0-10) 5. Montreal.


[1]
Just about everything; no 1080p support?
[2]
awsome HD TV; pricey for many folks - worth it!!
[3]
Great TV when it works; Customer service will NOT honor their warranties


This page tracks the new paper links made to my list of APGV 2004 papers.
Page maintained by Ke-Sen Huang.
If you have additions or changes, send an e-mail.
November 29 2009
- Added ACM DOI link for each paper
- Updated some author and paper links
December 25, 2004
September 6, 2004
July 28, 2004
July 26, 2004
July 7, 2004
June 28, 2004
kesen.huang@gmail.com


{% extends "base.html" %} {% block content %}
This example demonstrates how to create an envelope where the workflow is routed to different recipients based on the value of a transaction.
The envelope includes a .txt document.
{% if show_doc %}Documentation about this example.
{% endif %}API method used: Envelopes::create.
View source file {{ source_file }} on GitHub.
{% endblock %}


When you work with us, you are part of team of committed collaborators.All aspects of our
software development process are intergraded,interactive
and agile
Our approach unifies design, development and product management to create exceptional products.
We start each project by understanding your business goals, the user's needs and the product requirements
Then we help translate them into effective and elegant solutions.
Before we sign a contract or write a line of code our team will spend the necessary time needed to understand your prodect vision
The outcome of this scoping session is a proposal or high-level statement of work.
Based on your requirements, we can provide a complete offering or just the pieces you need.
Our design practice offers a full range of services including brand strategy,interaction and visual design and visual design and user experience testing
Thoughout your project, our designers create and implement visual design and workflows,solicit user feedback and work with you to make sure what gets built is what is needed.
All Engineers are fluent in the latest enterprise, mobile abd web development technologies.
They collaborate with your team to write, and improve code on a daily basis, using proven practices such as test-driven development and pair-programming.
Planing and developing is iterative. Beacause we are constantly coding and testing, the products we build are always ready to go live.
This iterative process allows for changes as business requirements evolve