26 May 2006 - Release 2.0.0 available
This is mostly a bugfix release from release 1.9.1.
Note however that deprecated 1.x features have now
been removed. Any code that compiles against Lucene
1.9.1 without deprecation warnings should work without
further changes with any 2.x release. For more
information about this release, please read CHANGES.txt.
Binary and source distributions are
available here.
2 March 2006 - Release 1.9.1 available
This fixes a serious bug in release 1.9-final. CHANGES.txt
for details.
Binary and source distributions are
available here.
27 February 2006 - 1.9 final available
This release has many improvements since release
1.4.3, including new features, performance
improvements, bug fixes, etc. See CHANGES.txt
for details.
1.9 will be the last 1.x release. It is both
back-compatible with 1.4.3 and forward-compatible with
the upcoming 2.0 release. Many methods and classes in
1.4.3 have been deprecated in 1.9 and will be removed
in 2.0. Applications must compile against 1.9 without
deprecation warnings before they are compatible with
2.0.
Binary and source distributions are
available here.
26 January 2006 - Nightly builds available
Nightly builds of the current development version of Lucene, to be released as Lucene 1.9,
are now available at http://cvs.apache.org/dist/lucene/java/nightly/.
28 October 2005 - Lucene at ApacheCon
Monday, December 12, 2005 at 3pm by Grant Ingersoll:
Abstract:
Lucene is a high performance, scalable, cross-platform search engine that contains many advanced features that often go untapped by the majority of users. In this session, designed for those familiar with Lucene, we will examine some of Lucene's more advanced topics and their application, including:
- Term Vectors: Manual and Pseudo relevance feedback; Advanced document collection analysis for
domain specialization
- Span Queries: Better phrase matching; Candidate Identification for Question Answering
- Tying it all Together: Building a search framework for experimentation and rapid deployment
- Case Studies from CNLP: Crosslingual/multilingual retrieval in Arabic, English and Dutch;
Sublanguage specialization for commercial trouble ticket analysis; Passage retrieval and
analysis for Question Answering application
Topics 1 through 3 will provide technical details on implementing the advanced Lucene features, while the fourth topic will provide a broader context for understanding when and where to use these features.
14 February 2005 - Lucene moves to Apache top-level
Lucene has migrated from Apache's Jakarta project to the top-level. Along with this migration,
the source code repository has been converted to Subversion. The migration is in progress with
some loose ends. Please stay tuned!
December 2004 - Lucene in Action is published
The first book dedicated solely to Lucene is published. The
"search inside the book" feature implemented with Lucene can
be seen at lucenebook.com.
29 November 2004 - Lucene 1.4.3 Released
This fixes a few bugs in 1.4.2. See CHANGES.txt
for details. Binary and source distributions are
available here.


Aspiring web developer, code bootcamp graduate, renewable energy enthusiast, amateur photographer, lover of long bike rides.
Take a look
A javascript role-player game based on Game of Thrones.
A swipe-style app to help you make the most of your weekend.
A jQuery app powered by the GIPHY API.
View more on my GitHub


My name is Colin Burns, I was born in Naperville, Illinois, but have lived about 99% of my life just outside of Cleveland, Ohio.
I graduated from Solon High School and studied at both Rochester Institute of Technology and later at Kent State University. My greatest
passions are technology, film/pop-culture, and my family.
The completion of the Case Western Reserve Coding Bootcamp is my current pursuit,
I am learning Full-Stack Web Development based on the MERN stack.
I am dedicated and loyal, and I am eager to see what's next in my career!
Need to know more? Check out my LinkedIn page below!
-Colin Burns


This document describes changes to the java.beans package that were introduced in Java SE 1.4:
To support long-term persistence, the following classes were added:
| Class | Description |
|---|---|
Statement |
An object that represents a method call, possibly with
arguments, upon an object. For example:
a.setFoo(b) . |
Expression |
A statement that returns a result. For example:
a.getFoo() . |
XMLDecoder |
Reads XML documents that were created using
XMLEncoder . |
Encoder |
Uses persistence delegates to break an object graph down into a
series of Statement s and Expression s that
can be used to recreate it. |
XMLEncoder |
An Encoder that produces statements and
expressions in an XML encoding. |
PersistenceDelegate |
An abstract class that defines objects that can express the state of another object using the public methods of that object's class. |
DefaultPersistenceDelegate |
The persistence delegate used, by default, for beans. |
See JavaBeans Component API for links
to where you can find more information about long-term
persistence.
The following classes were also added in v1.4:
| Class | Description |
|---|---|
EventHandler |
Provides support for dynamically generating event listeners that have a small footprint and can be saved automatically by the persistence scheme. |
ExceptionListener |
Defines a listener to be notified when a exception was thrown
but then recovered from. You can register an exception listener on
an XMLEncoder or XMLDecoder object to be
notified when the object encounters a recoverable problem while
writing or reading a bean. |
PropertyChangeListenerProxy |
A proxy that implements PropertyChangeListener and
serves to group another PropertyChangeListener (the
real event handler) with a specific property; the proxy forwards
property change events to the real event handler. |
VetoableChangeListenerProxy |
A proxy that implements VetoableChangeListener and
serves to group another VetoableChangeListener (the
real event handler) with a specific constrained property; the proxy
forwards vetoable property change events to the real event
handler. |
The following classes have additional methods:
PropertyChangeSupport
class now contains a no-argument method to get all the registered
property change listeners:
getPropertyChangeListeners
.VetoableChangeSupport
class now contains a no-argument method to get all the registered
vetoable change listeners:
getVetoableChangeListeners
.Introspector
class has been reimplemented, and its performance has improved. The
new implementation has caused the following changes in the behavior
of the introspector:
FeatureDescriptor
s are now shared on a
per-BeanInfo
basis, rather than copied when the
BeanInfo
is returned. This change improves the
performance of the getBeanInfo
method. It also means
that when an attribute/value in a FeatureDescriptor
changes, that change is persistent among getBeanInfo
invocations as long as the BeanInfo
is not garbage
collected. (Garbage collection of BeanInfo
s is
described in Garbage Collection and Custom
Attributes.)getBeanInfo
methods no longer create a copy of
the requested BeanInfo
. Instead, they cache the
BeanInfo
and return it. If necessary, you can get the
old behavior by storing a reference to the returned
BeanInfo
and using the flushFromCaches
method to flush the bean's class from the introspector's
cache.instantiate
method can't instantiate a
particular class using the sibling or bootstrap class loader, it
now tries to load the class using the current thread's class
loader.As of v 1.4, a BeanInfo
can be garbage collected
when no direct references to it exist and the system is low on
memory. This is implemented in the Introspector
by
wrapping BeanInfo
s in SoftReference
s.
The possibility of garbage collection affects how you store
custom attributes inside BeanInfo
s. If a particular
BeanInfo
is garbage collected, then the next time you
invoke Introspector.getBeanInfo
to get the
BeanInfo
, the returned object won't contain any custom
attributes.
To avoid this problem, if you store custom attributes inside a
BeanInfo
you must ensure that the
BeanInfo
is correctly initialized with those
attributes every time you retrieve the BeanInfo
. The
following is an example of initializing a BeanInfo
class with a custom property in the bean descriptor. The code would
be similar for a custom attribute in a property descriptor, method
descriptor, or event set descriptor.
BeanInfo beanInfo = getBeanInfo(SomeBean.class); BeanDescriptor beanDescriptor = beanInfo.getBeanDescriptor(); /* * Before using the BeanInfo, check to see if our custom * property has been initialized. (Even if we initialized * it before, if the BeanInfo has been garbage collected, * then we need to initialize it again.) Since our custom * property's value could be null, we define another property * to tell us if the custom property is initialized. */ if (beanDescriptor.getValue("myProperty_init") == null) { beanDescriptor.setValue("myProperty", someValue); beanDescriptor.setValue("myProperty_init", Boolean.TRUE); }


Detect if a player is joining this game for the first time
If a player disconnects and reconnects to the server, you may want to have them continue with the same settings they left with.
This code will determine if the player has been in this same game previously.


Note: This documentation is preliminary and subject to change.
This document describes the components and purpose of the WorldWide Telescope SDK . The SDK primarily enables applications to be written to transmit data to be rendered in WorldWide Telescope, and to prepare tile pyramids in the correct format for rendering specific regions or specific datasets (such as weather or atmospheric data) for the Earth, or even entire planets or moons.
Install and configure any necessary software in the order shown below.
The SDK is installed from the WWTSDK.msi file, and by default files are written to the folder:
%Program Files%\Microsoft Research\WorldWide Telescope SDK
The main components to the SDK:
Component | Description |
Documentation |
| LCAPI (Layer Control API) Sample | The Layer Control API
provides an extensive range of functions to transmit and receive data to and
from WorldWide Telescope. The purpose of this API is that it enables custom
applications to be built that typically transmit time-series spreadsheet
data to WorldWide Telescope to be rendered appropriately, though other layer
data (point data, 3d Models, images) can also be handled. The sample displays a typical use of the LCAPI, displaying a time-series of earthquake data. | WorldWide Telescope LCAPI |
| Tile Pyramid SDK | This SDK provides samples and
source code that enable the tiling of one or multiple images into a format
suitable for WorldWide Telescope. The working samples show how to handle a
single image, multiple images, DEM (altitude) data, and specific regions
rather than an entire planet or moon. The Tile Generator is included as a fully functional application. This tool takes as input an image in Equirectangular or Mercator projection and a bounding set of coordinates in case the map only covers a section of the world. The output can be either Mercator or Toast projection, both suitable for WorldWide Telescope. An optional plate file can be created, and some details such as credits can be included in the output data files. |
WorldWide Telescope SDK
WorldWide Telescope SDK Samples |
| Sharing Service | This includes samples and source code showing how to share tiled pyramids, and also how to build communities and share tours, data and links with colleagues. | WorldWide Telescope SDK Samples |
| Sphere Toaster | The Sphere Toaster is a legacy
tool that takes as input a single image (typically of an entire planet or
moon) and generates a complete tile pyramid for the image in Toast format,
including the required thumbnail image and WTML data files to provide easy
access to the pyramid. Toast format is specific to WorldWide Telescope, and provides a projection that minimizes distortion and enables the north and south pole to be rendered. | WorldWide Telescope Data Tools Guide |
| Study Chopper | The Study Chopper is a legacy
tool that takes an image (typically a telescope image of a distant stellar
object) and tiles the image into a format that is usually added to the Sky
view of WorldWide Telescope. For example, a very detailed Hubble Space
Telescope image of a distant galaxy could be prepared for use as a
foreground image in WorldWide Telescope using this tool. Thumbnail images and WTML data files are also produced by the tool. | WorldWide Telescope Data Tools Guide |


Incremental Rendering
Incremental rendering was removed because in real applications it caused significant increase in frame drops.
It is a nice idea and in simple demo applications it can show amazing results, but when it is done in a complicated document with an average stylesheet, it is way much better to apply all DOM changes as fast as possible instead of triggering long-running style recalculations, layout, etc on several consecutive frames, kivi is quite fast and it isn't worth to apply changes incrementally, because it probably won't be a bottleneck. Even with newest features like css containment, incremental rendering didn't showed a good results in real applications.
Incremental rendering in kivi was implemented in a way that it incrementally performed diffs and applied DOM changes. It is possible that incremental rendering that just performs diffs incrementally and then atomically applies all DOM changes will not increase frame drops, but it isn't possible to implement it this way with kivi architecture, virtual dom implementation with such architecture works significantly slower, so instead of incremental rendering it is better to have a fast virtual dom implementation.


Add a New Store!
Name of Location:
Min Customers Per Hour:
Max Customers Per Hour:
Average Cookies Sold:
Submit Changes!


Module stick/helpers
A collection of helper functions that makes working with Stick middleware easier.
Functions
- linkTo(app, bindings, text)
- redirectTo(app, bindings)
- resolveApp(app)
- urlFor(app, bindings)
linkTo (app, bindings, text)
Return a link to an action configured using the route
middleware.
The link's URL is generated from the bindings argument as described for the urlFor helper.
Parameters
| object|string | app | the application to link to |
| object | bindings | an object containing the bindings for the target URL. |
| string | text | the link text. |
redirectTo (app, bindings)
Create a response that redirects the client to a different URL.
Parameters
| string|object | app | either the URL as string or an app to be passed to `urlFor` |
| bindings | bindings | to pass to `urlFor` if first argument is an app. |
Returns
| object | a JSGI response that will redirect the client to the specified target |
urlFor (app, bindings)
Return a URL for an action configured using the mount
and route
middlewares.
The app
argument specifies the Stick application to link to, either as reference
to the app itself or as module id of a module exporting the app as app
.
The bindings
argument contains information needed to determine the target
action within that application. Properties in the bindings argument are interpreted
as follows:
The
action
property, if present, identifies the name of the action to link to. Action names are determined from the path arguments provided to theroute
middleware by removing all placeholders and the leading slash. For example, the name for an action routed with/edit/:id
is "edit".Properties in the bindings object that have a placeholder with the same name in the target route are used to provide the value for this placeholder. For example, to URI path to an action in application
app
routed with "/edit/:id" with id5
can be generated as follows:urlFor(app, {action: "edit", id: 5})
All other properties in the bindings object are set as query parameters in the generated URL. For example, if "index" is a route with no placeholders then calling
urlFor("index", {do: "search"})
will generate the URL "/?do=search".
Note that the values for the current request are used as default values for action
and route placehoders, so if you want to use to a different action or placeholder value
you need to make that explicit.
Parameters
| object|string | app | the application to link to |
| object | bindings | an object containing the bindings for the target URL. |


WeatherApp
Choose what you want:
Check weather for your's current position
Your's city:
Check
Check weather for chosen place
Check
City
Weather
Temperature
Pressure
Wind Speed


@* * Copyright 2019 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *@ @(params: Map[String, Any]) @uk.gov.hmrc.hmrcemailrenderer.templates.helpers.html.template_main(params, "Someone’s asked if you’ll become their Trusted Helper") {
Dear @{params("helperFirstName")} @{params("helperLastName")}
@{params("helpeeFirstName")} @{params("helpeeLastName")} has asked you to become their Trusted Helper and help with their tax online.
Trusted Helper is an online service from HM Revenue and Customs (HMRC) which allows people to help their friends and family manage their tax affairs online.
You’ll need your National Insurance number to hand.
You’ll also need to set up an account with GOV.UK Verify, if you don’t already have one.
Click on the link below to accept @{params("helpeeFirstName")}’s request for help.
https://www.gov.uk/help-friends-family-tax
You have 28 days to respond.
From HMRC Trusted Helper
}


Question
You are playing the following Flip Game with your friend: Given a string that contains only these two characters: +
and -
, you and your friend take turns to flip two consecutive "++"
into "--"
. The game ends when a person can no longer make a move and therefore the other person will be the winner.
Write a function to determine if the starting player can guarantee a win.
For example, given s = "++++"
, return true. The starting player can guarantee a win by flipping the middle "++"
to become "+--+"
.
Follow up:
Derive your algorithm's runtime complexity.
Analysis
这道题我们可以使用上一题Flip Game的方法生成下一组可能的moves，然后递归调用本身来判断里面是否有对手一定不赢的情况（即最初回合先手必赢）。考虑到单纯暴力递归耗时太长，而且很多分支都是重复的，容易造成TLE，我们最好使用一个dict储存已经得到的结果，对递归树进行剪枝。代码如下。
Code
class Solution(object):
def __init__(self):
self.d = {}
def canWin(self, s):
"""
:type s: str
:rtype: bool
"""
if s in self.d:
return self.d[s]
result = False
for i in xrange(len(s)-1):
if s[i:i+2] == '++' and not self.canWin(s[:i]+'--'+s[i+2:]):
result = True
break
self.d[s] = result
return result


In January 1967, the Beatles' manager Brian Epstein hired playwright Joe Orton to write their third film. Orton produced a script called Up Against It, which was never produced. According to Paul McCartney:
"Wherever we went there's always a few seats laid aside for cripples and people in wheelchairs... they're pushing them at you like you're Christ or something. You'd open up every night, and instead of seeing kids there you'd just see a row full of cripples on the front... It seemed like (we were) just surrounded by cripples and blind people all the time. And when we'd go through corridors, everybody would be -- they'd be all touching us. It got horrifying." --John Lennon
| 15 Jul 1958 |
Julia Lennon, John's mother, killed in an automobile accident. |
| Jan 1964 |
The Beatles appear on Jack Paar's Tonight Show. |
| 9 Feb 1964 |
The Beatles appear on The Ed Sullivan Show. |
| 28 Aug 1964 |
The Beatles are introduced to marijuana. |
| Aug 1965 |
Brian Epstein meets with Walt Disney to discuss the possibility of the Beatles performing songs for the upcoming animated film The Jungle Book. Later, John Lennon nixes the idea. Disney ends up using semi-soundalikes (a "tribute" might be more fitting) playing four vultures in the film. |
| 27 Aug 1965 |
The Beatles spend a day with Elvis Presley at his home in California. Elvis doesn't know any of their names, so he refers to each of them as "Beatle." |
| 4 Mar 1966 |
The London Evening Standard publishes an interview with John Lennon in which he claims that the Beatles are "more popular than Jesus." |
| 5 Jul 1966 |
Philippine military police awaken Brian Epstein and demand that the Beatles attend a party at the home of Imelda Marcos, wife of dictator Ferdinand Marcos. Epstein refuses, and the band is forced to flee the country ASAP. |
| 28 Aug 1966 |
After playing a sold-out show at Dodger Stadium in Los Angeles, the Beatles are blocked from exiting through the main gate by the throng of fans. Instead, they are forced to egress from the rear of the stadium, in an armored car. Dozens of fans are beaten by LAPD in their attempts to maintain order. |
| Jul 1967 |
"All You Need Is Love" telecast. |
| 24 Aug 1967 |
The Beatles are introduced to Maharishi Mahesh Yogi in London. |
| 27 Aug 1967 |
While the Beatles are away in Bangor, Brian Epstein is found dead in his home. Officially, the cause of death was accidental overdose of sleeping pills, but many believe it was suicide. He was becoming increasingly depressed over his lack of involvement with the Beatles and also his personal turmoil caused by trying to keep his homosexuality a secret. |
| 18 Oct 1968 |
A police raid nets 168 grains of dope resin in the apartment of John Lennon and Yoko Ono. The couple is fined UKP 150. |
| 30 Jan 1969 |
The Beatles perform an impromptu concert on the rooftop of the Apple building, during the filming of Let It Be. It will be the last time they ever play together as a band. |
| 12 Oct 1969 |
According to rumor, Paul is dead. However, the Beatle somehow persists in making several public appearances for years. |
| 1970 |
Let It Be wins the Academy Award for best original song score. |
| 31 Dec 1970 |
Paul McCartney files suit to dissolve the partnership with his fellow Beatles. |
| 19 Jan 1971 |
The Beatles song "Helter Skelter" is played during the Charles Manson court trial. |
| 10 Aug 1972 |
Paul McCartney and his wife Linda are arrested in Sweden after postal officials intercept a parcel of hashish addressed to their band, Wings.
|
| Nov 1973 |
Beatles manager Allen Klein is sued by the band (minus Ringo). Paul declares: "The only thing that has prevented us from getting together again has been Klein's contractual hold over the Beatles' name. When he's out of the way, there is no real reason why we shouldn't get together again." |
| 1974 |
After Paul McCartney hints that a Beatles reunion is in the works, George Harrison declares publicly that he "never wants to play in a band with Paul McCartney again." |
| 24 Apr 1976 |
On the air, Saturday Night Live producer Lorne Michaels offers $3,000 to the Beatles if they will reunite and perform one of their songs on SNL. |
| 16 Jan 1980 |
Paul McCartney is arrested at Narita International Airport for possession of 7.7 ounces of marijuana. He spends the next nine days in jail before being deported. |
| 8 Dec 1980 |
Mark David Chapman shoots John Lennon four times in the back outside The Dakota in New York. Lennon dies shortly thereafter at St. Luke's Roosevelt Hospital Center. |
| 1985 |
Michael Jackson buys the publishing rights of over 100 Beatle songs to the tune of $47.5 million, outbidding the combined efforts of Paul McCartney and Yoko Ono. McCartney had recommeded to Jackson buying publishing rights as a wise business investment. McCartney has cursed Jackson (and probably himself) ever since. |
| 1996 |
Estimated income: $98M. Forbes. |
| 15 Jun 1996 |
Beatles producer George Martin knighted by Queen Elizabeth II. |
| 11 Mar 1997 |
Paul McCartney knighted by Queen Elizabeth II. |
| 17 Apr 1998 |
Paul McCartney's wife Linda dies of breast cancer. |
| 30 Dec 1999 |
Paranoid schizophrenic Michael Abram breaks into the home of George Harrison and stabs him several times in the chest. Voices in Abram's head told him that the former Beatles were witches. |
| 30 Nov 2001 |
George Harrison dies of cancer. |
| 11 Jun 2002 |
Widower Paul McCartney, 59, marries one-legged ex-model Heather Mills, 34. |
| Dec 2002 |
Paul McCartney announces his intention to change the credit on certain Beatles songs to "McCartney/Lennon" instead of "Lennon/McCartney." |
| 27 Mar 2003 |
John Lennon's childhood home is opened as a public museum. |


| Our Vision | |||||||
| To implement impenetrable security in our Internet of Things network | To give control of data back to its rightful owner | To provide unparalleled stability and speed for data transfer | To promote the development of artificial intelligence through user data |
| Our Vision | |||||||
| To implement impenetrable security in our Internet of Things network | |||||||
| To give control of data back to its rightful owner | |||||||
| To provide unparalleled stability and speed for data transfer | |||||||
| To promote the development of artificial intelligence through user data |
IoT Chain (ITC) is developed as a lite operating system using the blockchain concept and implementing VRF+BFT, DAG and SPV technology, allowing data to be layered and stored in a decentralized manner and providing protection with the combined strength of the millions of IoT nodes within the network.
The technology will result in an economy of sharing for Internet of Things (IoT) devices in a decentralized and energy efficient environment while producing a wealth of valuable user data which can be used as fuel for the development of AI with users rewarded for providing this fuel.
Under this network, the interconnection of IoT devices of a home, a business or even a city can truly flourish without worry of transfer congestion, malicious attacks or losing privacy.
The implementation and monetization of ITC is not just a concept but has very real applications in the near future.


--- layout: post title: BattlelogApi v1.3 date: 2011-10-27 17:31:27.000000000 -05:00 categories: - Projects tags: - battlelog - battlelogapi - bf3 - php - programming - projects - update status: publish type: post published: true meta: _edit_last: '1' author: login: Blake email<EMAIL_ADDRESS>display_name: Blake first_name: Blake last_name: Harley ---
This is probably the biggest update to the API since it was introduced. Scratch that, this is the biggest update. Most of the changes have been structural. I have created several classes for different content types, split classes into their own files and created a proper class hierarchy. As far as usable features, I added award information (ribbons and medals) and server information. An unfortunate side effect of the cached language file (used for ribbons, medals, etc) is that the size of the API has increased from 5KB to 153KB (zipped sizes), but I think a larger file size is better than querying Battlelog for the language file every time (though the API allows you to so that too, albeit experimentally).
Hit up the project page for more information and the download link. Let me know if there are any issues with this release.
Small warning: When getting friends data (by invoking $soldier['friends']
), note that the ID is not the nine-digit soldier ID. It is the main Battlelog user ID. I will be working on a way to remedy this situation if possible.


# Copyright (c) 2016, Xilinx, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# 3. Neither the name of the copyright holder nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION). HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
__author__ = "Anurag Dubey"
__copyright__ = "Copyright 2016, Xilinx"
__email__ =<EMAIL_ADDRESS>import os
import signal
import sys
import cffi
import resource
if os.getuid() != 0:
raise RuntimeError("Root permission needed by the library.")
# Cleanup on Segfaults
[docs]def sig_handler(signum, frame):
print("Invalid Memory Access!")
xlnk().xlnk_reset()
sys.exit(127)
signal.signal(signal.SIGSEGV, sig_handler)
ffi = cffi.FFI()
ffi.cdef("""
static uint32_t xlnkBufCnt = 0;
uint32_t cma_mmap(uint32_t phyAddr, uint32_t len);
uint32_t cma_munmap(void *buf, uint32_t len);
void *cma_alloc(uint32_t len, uint32_t cacheable);
uint32_t cma_get_phy_addr(void *buf);
void cma_free(void *buf);
uint32_t cma_pages_available();
void _xlnk_reset();
""")
libxlnk = ffi.dlopen("/usr/lib/libsds_lib.so")
[docs]class xlnk:
"""Class to enable CMA memory management.
The CMA state maintained by this class is local to the
application except for the `CMA Memory Available` attribute
which is global across all the applications.
Attributes
----------
bufmap : dict
Mapping of allocated memory to the buffer sizes in bytes.
"""
def __init__(self):
"""Initialize new xlnk object.
Parameters
----------
None
Returns
-------
None
"""
self.bufmap = {}
def __del__(self):
"""Destructor for the current xlnk object.
Frees up all the memory which was allocated through current object.
Parameters
----------
None
Returns
-------
None
"""
for key in self.bufmap.keys():
libxlnk.cma_free(key)
def __check_buftype(self, buf):
"""Internal method to check for a valid buffer.
Parameters
----------
buf : cffi.FFI.CData
A valid buffer object which was allocated through `cma_alloc`.
Returns
-------
None
"""
if "cdata" not in str(buf):
raise RuntimeError("Unknown buffer type")
[docs] def cma_alloc(self, length, cacheable = 0, data_type = "void"):
"""Allocate physically contiguous memory buffer.
Allocates a new buffer and adds it to `bufmap`.
Possible values for parameter `cacheable` are:
`1`: the memory buffer is cacheable.
`0`: the memory buffer is non-cacheable.
Examples
--------
memmanager = xlnk.xlnk()
# Allocate 10 `void *` memory locations.
m1 = memmanager.cma_alloc(10)
# Allocate 10 `float *` memory locations.
m2 = memmanager.cma_alloc(10, data_type = "float")
Notes
-----
1. Total size of buffer is automatically calculated as
size = length * sizeof(data_type)
2. This buffer is allocated inside the kernel space using
xlnk driver. The maximum allocatable memory is defined
at kernel build time using the CMA memory parameters.
For Pynq-Z1 kernel, it is specified as 128MB.
The unit of `length` depends upon the `data_type` argument.
Parameters
----------
length : int
Length of the allocated buffer. Default unit is bytes.
cacheable : int
Indicating whether or not the memory buffer is cacheable.
data_type : str
CData type of the allocated buffer. Should be a valid C-Type.
Returns
-------
cffi.FFI.CData
An CFFI object which can be accessed similar to arrays.
"""
if data_type != "void":
length = ffi.sizeof(data_type) * length
buf = libxlnk.cma_alloc(length, cacheable)
if buf == ffi.NULL:
raise RuntimeError("Failed to allocate Memory!")
self.bufmap[buf] = length
return ffi.cast(data_type+"*",buf)
[docs] def cma_get_buffer(self, buf, length):
"""Get a buffer object.
Used to get an object which supports python buffer interface.
The return value thus, can be cast to objects like
`bytearray`, `memoryview` etc.
Parameters
----------
buf : cffi.FFI.CData
A valid buffer object which was allocated
through `cma_alloc`.
len : int
Length of buffer in Bytes.
Returns
-------
cffi.FFI.CData
A CFFI object which supports buffer interface.
"""
self.__check_buftype(buf)
return(ffi.buffer(buf, length))
@staticmethod
[docs] def cma_memcopy(dest, src, nbytes):
"""High speed memcopy between buffers.
Used to perform a byte level copy of data from source buffer to
the destination buffer.
Parameters
----------
dest : cffi.FFI.CData
Destination buffer object which was allocated through `cma_alloc`.
src : cffi.FFI.CData
Source buffer object which was allocated through `cma_alloc`.
nbytes : int
Number of bytes to copy.
Returns
-------
None
"""
ffi.memmove(dest, src, nbytes)
@staticmethod
[docs] def cma_cast(data, data_type = "void"):
"""Cast underlying buffer to a specific C-Type.
Input buffer should be a valid object which was allocated through
`cma_alloc` or a CFFI pointer to a memory buffer. Handy for changing
void buffers to user defined buffers.
Parameters
----------
data : cffi.FFI.CData
A valid buffer pointer allocated via `cma_alloc`.
data_type : str
New data type of the underlying buffer.
Returns
-------
cffi.FFI.CData
Pointer to buffer with specified data type.
"""
return ffi.cast(data_type+"*", data)
[docs] def cma_free(self, buf):
"""Free a previously allocated buffer.
Input buffer should be a valid object which was allocated through
`cma_alloc` or a CFFI pointer to a memory buffer.
Parameters
----------
buf : cffi.FFI.CData
A valid buffer pointer allocated via `cma_alloc`.
Returns
-------
None
"""
if buf in self.bufmap:
self.bufmap.pop(buf, None)
self.__check_buftype(buf)
libxlnk.cma_free(buf)
[docs] def cma_stats(self):
"""Get current CMA memory Stats.
`CMA Memory Available` : Systemwide CMA memory availability.
`CMA Memory Usage` : CMA memory used by current object.
`Buffer Count` : Buffers allocated by current object.
Parameters
----------
None
Returns
-------
dict
Dictionary of current stats.
"""
stats = {}
free_pages = libxlnk.cma_pages_available()
stats['CMA Memory Available'] = resource.getpagesize() * free_pages
memused = 0
for key in self.bufmap:
memused += self.bufmap[key]
stats['CMA Memory Usage'] = memused
stats['Buffer Count'] = len(self.bufmap)
return stats
[docs] def xlnk_reset(self):
"""Systemwide Xlnk Reset.
Notes
-----
This method resets all the CMA buffers allocated across the system.
Parameters
----------
None
Returns
-------
None
"""
self.bufmap = {}
libxlnk._xlnk_reset()


This block extracts features from images in a database.
BK = BLOCK_DICTIONARY() Initializes the block with the default options.
BK = BLOCK_DICTIONARY(BK) Executes the block with options and inputs BK.
Required Inputs:
- db
The database to extract features from. All segments will be processed.
Options:
- bk.rand_seed
Set the random seed. Default is [], which does not change the random seed.
- bk.detector
The type of feature detector to use. Default 'sift'. Valid types are: sift: Standard SIFT detector (DoG) from VLFeat. ipld: Harris multiscale + DoG (IPLD implementation). iplddog: The DoG from the IPLD implementation. dsift: Dense SIFT. Only compatible with dsift descriptor. dsift-color: Same as dsift. Only compatible with dsift-color
descriptor.
- bk.descriptor
The type of feature descriptor to use. Default 'sift'. Valid types are: sift: Standard SIFT descriptor from VLFeat. siftnosmooth: Standard SIFT descriptor which ommits smoothing. ipld: Standard SIFT descriptor (IPLD implementation). dsift: Dense SIFT descriptor. dsift-color: Dense color SIFT descriptor
- bk.ref_size
Resize images to have their longest side equal to this number before processing. Default of [] means leave the images unmodified.
- bk.min_sigma
Throw away detected features whose frame size is less than min_sigma. Frame size is relative to the ref_size of the image.
- bk.max_num
A limit on how many features are extracted. Default +inf.
- bk.rescale
Descriptors are computed on regions whose radius is rescale times the scale sigma of the frame. For the standard sift descriptor, for instance, rescale is two times the magnification paramter of the descriptor. Default 6.
DSIFT and DSIFT-COLOR Options:
bk.dsift_size:
The size of a spatial bin in dsift. For example, 3 will create a descriptor which is 12x12 pixels. This option is required when using this descriptor.
bk.dsift_step:
The step size in pixels between descriptors. 1 produces a descriptor for every pixel of the image. This option is required when using this descriptor.
DSIFT-COLOR Options:
bk.dsift_minnorm:
Discard descriptors whose norm is less than dsift_minnorm in both the red and green channels.


The CoAP stack's global state is stored in a coap_context_t object.
More...
#include <net.h>
The CoAP stack's global state is stored in a coap_context_t object.
Definition at line 76 of file net.h.
§ async_state
list of asynchronous transactions
Definition at line 83 of file net.h.
§ endpoint
the endpoint used for listening
Definition at line 91 of file net.h.
§ known_options
Definition at line 77 of file net.h.
§ message_id
| unsigned short coap_context_t::message_id |
§ network_read
§ network_send
§ observe
| unsigned int coap_context_t::observe |
The next value to be used for Observe.
This field is global for all resources and will be updated when notifications are created.
Definition at line 120 of file net.h.
§ resources
hash table or list of known resources
Definition at line 78 of file net.h.
§ response_handler
§ sendqueue
Definition at line 90 of file net.h.
§ sendqueue_basetime
The time stamp in the first element of the sendqeue is relative to sendqueue_basetime.
Definition at line 89 of file net.h.
§ sockfd
| int coap_context_t::sockfd |
send/receive socket
Definition at line 94 of file net.h.
The documentation for this struct was generated from the following file:


--- layout: post status: publish published: true title: "如雨天般宁静" author: Leask author_login: leask author_email<EMAIL_ADDRESS>author_url: https://leaskh.com wordpress_id: 565 wordpress_url: http://leaskh.wordpress.com/2006/05/19/%e5%a6%82%e9%9b%a8%e5%a4%a9%e8%88%ac%e5%ae%81%e9%9d%99 date: '2006-05-19 19:28:44 +0800' date_gmt: '2006-05-19 19:28:44 +0800' categories: - Life tags: [] comments: [] ---


- getDatabaseUrl() - Static method in class databasecontroller.DatabaseInfo
-
This method is used to get the database url.
- getDay() - Method in class users.User
-
Gets the date the user is to be picked up.
- getDayOf() - Method in class main.MainMenuDriveController
-
Gets the day the user entered.
- getDestination() - Method in class users.User
-
Gets the destination of the user.
- getDriver() - Method in class scheduled.ViewDriverController
-
This method allows the user type driver to be passed to another class.
- getDriverOrRiderScene(User) - Method in class accountsettings.AccountSettingsController
-
This method will change to the main.MinaMenuDrive.fxml scene if the isAdriver boolean for the
type users.user is true.
- getEmail() - Method in class users.User
-
Gets the email of the user.
- getIsAdriver() - Method in class users.User
-
Gets the isAdriver value.
- getLocation() - Method in class users.User
-
Gets the pick location of the user from the database.
- getPassword() - Method in class users.User
-
Gets the password of the user.
- getPerson() - Method in class main.MainMenuDriveController
-
Allows the info from the table in the drive tab that the user selected to be passed
to other classes.
- getPrimaryStage() - Static method in class main.MainLogin
-
gets the primary scene.
- getRating() - Method in class users.User
-
Gets the users rating from 0-5.
- getResultSet(ObservableList<User>, ResultSet) - Method in class main.MainMenuDriveController
-
When this method is called, it will create a new row in the table in the drive tab with
information from the SCEDHULEINFO table.
- getRiderInfo() - Method in class main.MainMenuDriveController
-
When this method is called, the table SCHEDULEINFO will be searched.
- getRiderInfo() - Method in class scheduled.EditScheduleController
-
When this method is called, it will set the values inside the table.
- getRiderInfo() - Method in class scheduled.ViewDriverController
-
When this method is called, it will get the information from the
SCHEDULEINFO table column's DRIVER, LOCATION, DESTINATION, DATE, TIME and the information
based on the users username USERNAME column form the SCHEDULEINFO table and
from the USERINFO table column RATING based on the DRIVER column in the SCHEDULEINFO table.
- getRiderRating() - Method in class thankyoubox.ThankYouDriveController
-
When this method is called, it will get the RATING of the rider's USERNAME from the
USERINFO table.
- getStartUp() - Method in class main.MainMenuDriveController
-
Method used for initial start up of scene.
- getTime() - Method in class users.User
-
Gets the time the user is to be picked up.
- getTimeOf() - Method in class main.MainMenuDriveController
-
Gets the time the user entered.
- getUser() - Method in class login.LoginController
-
This method is used to transfer the contents of the user who signed in to other classes.
- getUser() - Method in class main.MainMenuDriveController
-
This method allows the user's information to be passed to another class.
- getUserId() - Method in class users.User
-
The user ID in the database.
- getUserName() - Method in class users.User
-
Gets the user name of the user.


Page-relative link
Hostname-relative link
Absolute link on same domain
Absolute link on different domain


--- layout: base title: "Privacy policy" description: "All about privacy and data collection. Though, I collect none and only use a privacy friendly analytics tool." ---
My website may be used without entering personal information. Information is considered personal if it can be associated exclusively to a specific natural person. The provisions below serve to provide information as to the manner, extent and purpose for collecting, using and processing personal information.
Please be aware that data transfer via the internet is subject to security risks and, therefore, complete protection against third-party access to transferred data cannot be ensured.
There are no cookies here. Nothing, zero, nada.
This website uses Plausible Analytics, a privacy-friendly, open source web analytics software hosted inside the EU. Plausible Analytics does not track, collect nor store any personal data or personally identifiable information. It is GDPR, CCPA and cookie law compliant. Read more about Plausible Data Policy or have a direct look at the public dashboard of this website.
You may contact my at no cost if you have questions relating to the collection, processing or use of your personal information, if you wish to request the correction, blocking or deletion of the same, or if you wish to cancel explicitly granted consent. Please note that you have the right to have incorrect data corrected or to have personal data deleted, where such claim is not barred by any legal obligation to retain this data.


|
Elektra
0.9.5
|
We are proud to release Elektra 0.9.3. This release again brings us a big step towards Elektra 1.0. It introduces the new soon-to-be-default storage plugin: TOML.
Elektra serves as a universal and secure framework to access configuration settings in a global, hierarchical key database. For more information, visit https://libelektra.org.
You can also read the news on our website
You can try out the latest Elektra release using our docker image elektra/elektra. This is the quickest way to get started with Elektra without compiling and other obstacles, simply run docker run -it elektra/elektra
.
The highlight of this release is the TOML plugin. The TOML plugin has a similar huge feature set as the INI plugin, but is written in a much cleaner and more maintainable way using flex and bison. Furthermore, it follows the popular TOML spec.
It has nearly no run-time dependency, it only needs base64
if binary values are needed.
A huge thanks to Jakob Fischer for this amazing work!
Warning: In one of the following
0.9.*
releases, INI will be removed and TOML will become the default plugin. If you are using INI, please migrate to TOML now.
The following section lists news about the plugins we updated in this release.
null
plugin dependency of the plugin. _(Jakob Fischer)_type
metakey is now set for numbers on reading. _(Jakob Fischer)_dump
plugin got a major update. The new version can read old files, but only write new files. The new files cannot be read by the old version of the plugin and will result in a "version error" message. _(Klemens Böswirth)_dump
files can now be imported into a different mountpoint. _(Klemens Böswirth)_dump
no longer writes unnecessary zero-bytes into files. This means that as long as all key-values are human-readable, so is the dump
output. This makes dump
usable for tests and demo purposes, as it is a very simple format closely modelled after a KeySet's structure. This also makes it much easier to manually fix broken dump
files. You only need a text editor most of the time. _(Klemens Böswirth)_Elektra 0.9.*
does not make any compatibility promises, as we want a clean 1.0.0 release. In this release, we did the following changes:
keyswitch_t
renamed to elektraKeyFlags. _(Markus Raab)_option_t
renamed to elektraLockFlags and elektraLookupFlags. _(Markus Raab)_cursor_t
renamed to elektraCursor. _(Markus Raab)_Note: We made this release before merging larger changes. Please expect more fundamental changes in the next releases.
Bindings allow you to utilize Elektra using various programming languages. This section keeps you up to date with the multi-language support provided by Elektra.
with the tab key (⇥
) (‸
represents the current cursor position) should work correctly again. _(René Schwaiger)_
npx
, which is included in npm
v5.2.0 or newer. This allows us to specify an exact version of prettier to use. _(Klemens Böswirth)_reformat-shell
script now accepts the alias shfmt2
, in case shfmt
v3 is needed for another project. _(Klemens Böswirth)_stix
(part of texlive-fonts-extra
) andstmaryrd
(part of texlive-science
or texlive-math-extra
). _(René Schwaiger)_is_not_rw_storage
function. _(Lukas Kilian)_check_import
and check_export
tests run for at least one plugin. _(Lukas Kilian)_make uninstall
also uninstalls symlinks. _(Markus Raab)_external-links.txt
and extra_install_manifest.txt
are cleaned up at cmake runs. _(Markus Raab)_testscr_check_kdb_internal_suite
due to timouts reached on slow test machines. _(Mihael Pranjić)_libgtest-dev
from docker images. _(Mihael Pranjić)_The website is generated from the repository, so all information about plugins, bindings and tools are always up to date. Furthermore, we changed:
package-lock.json
to ensure repeatable builds. _(Marvin Mall)_We are intensively working on Elektra 1.0. The last details of the semantics of Elektra 1.0 are in discussion. The decisions are documented, but some of them are not finalized.
If you are interested in the discussions, please subscribe.
We are currently working on following topics:
We closed 15 issues for this release.
About 17 authors changed 533 files with 26133 insertions(+) and 15834 deletions(-) in 545 commits.
Thanks to all authors for making this release possible!
We welcome new contributors! Read here about how to get started.
As first step, you could give us feedback about these release notes. Contact us via our issue tracker.
You can download the release from here or GitHub
The hashsums are:
The release tarball is also available signed by Mihael Pranjic using GnuPG from here or on GitHub
The following GPG Key was used to sign this release: 9C18145C22F9E746D743DEC59ECC0F4CF0359C7B
Already built API-Docu can be found here or on GitHub.
Subscribe to the RSS feed to always get the release notifications.
If you also want to participate, or for any questions and comments please contact us via our issue tracker on GitHub.
For more information, see https://libelektra.org
Best regards, Elektra Initiative


--- layout: post title: Getting Euclidean distances between centers of regions of interest categories: [neuroimaging,data-analysis] tags: [python,scipy,roi,brain] front-page: true ---
A collaborator is using connectivity data that we had generated to validate his model for Epilepsy. We have previously given him NxN connectivity matrices representing the connections between regions of interest (ROIs) for each subject but in addition to these he needs the Euclidean distance between all possible pairs of ROIs. This is all super easy using scipy’s center of mass function:
# given a *D* dimensional array *I* where *N* regions, denoted by # sequential integers starting at 1, return an NxD array *coords* # containing the centers of mass for each region (in index space) and # an NxN array *Dist* where the entry D[i,j] corresponds to the euclidean # distance between the centers of regions i and j respectively. import numpy as np from scipy.ndimage.measurements import center_of_mass D = I.ndim N = I[:].max() coords = np.asarray(center_of_mass(I,I,range(1,N+1))) euc_dist = lamda x,y: np.sqrt(np.sum((y-x)**2)) distance = np.zeros((N,N)) for i in range(0,N): for j in range(i,N): _distance = euc_dist(coords[i],coords[j]) distance[i,j] = _distance distance[j,i] = _distance