--- layout: page title: "Learning GNU Emacs, 3rd Edition" prev: OEBPS/apb.html next: OEBPS/apd.html book_path: books/learning-gnu-emacs--_oeb/ --- {% include JB/setup %} {% raw %}
There are no perfect programs. GNU Emacs is very thoroughly debugged, but it is certainly possible to find things that don't work correctly.
The Free Software Foundation (FSF) welcomes problem reports. However, they need to be real problem reports; simple differences of opinion about how something should work are not bugs. If you think that a certain command should work differently, remember that Emacs has been around for a long time and has many users; it can't be changed to satisfy a single user. (On the other hand, in most cases, you could write some Lisp to change it yourself.) In the GNU Emacs Manual, the FSF publishes some excellent guidelines for reporting bugs, which we'll summarize very quickly:
Before you report a bug, see if it's on the list of known problems. You can view this list by typing C-h C-e.
You most certainly have a bug if you run into some kind of system error (Emacs dumps core, terminates with a segmentation fault, crashes, hangs, or does something else antisocial).
When reporting bugs, be as specific as possible. A few commands will help you report exactly what was happening when things went awry. C-h l (for view-lossage) reports the last 100 or so keystrokes you made; M-x open-dribble-file filename saves every keystroke you type in the specified filename.
The FSF discourages you from trying to interpret bugs in the bug report. "I did thus-and-such and this happened" is useful, particularly if the problem is repeatable; "I think there's a problem with font handling" doesn't give any useful information at all.
Always report which version of Emacs you are using. The command M-x emacs-version gives you the relevant information.
Always report the contents of the file you were editing (if it makes a difference), the contents of your .emacs file, which mode you were in, and any Lisp libraries (custom or otherwise) that you have to load in order to create the problem.
We will add one very important guideline:
Although we have taken every effort to write a book that is accurate, we are far from perfect. With that in mind, please do not cite this book as an authority when reporting a bug. Although we haven't asked, the Free Software Foundation would be completely justified in rejecting any bug reports based on a third-party publication. If you suspect a bug, use the GNU Emacs Manual or the help facility to find out what the command that's giving you trouble is really supposed to do. In doing so, you may find out that this book is incorrect; if you do, please report the problem to<EMAIL_ADDRESS>If you do have a bug to report, type M-x report-emacs-bug to send it from within Emacs. You'll be prompted for a subject line and dropped into Emacs' interface for sending mail. If mail from Emacs isn't set up properly, you can email<EMAIL_ADDRESS>using your preferred mail client. Be sure to include an informative subject line that summarizes the problem.


CheckStyle Audit |
|
| Designed for use with CheckStyle and Ant. |
| Files | Errors |
|---|---|
| 53 | 87 |
| Error Description | Line |
|---|---|
| ',' is preceded with whitespace. | 52 |
| Error Description | Line |
|---|---|
| Missing a Javadoc comment. | 33 |
| Error Description | Line |
|---|
| Error Description | Line |
|---|
| Error Description | Line |
|---|---|
| WhitespaceAround: '{' is not preceded with whitespace. | 66 |
| Error Description | Line |
|---|---|
| Missing a Javadoc comment. | 20 |
| Missing a Javadoc comment. | 27 |
| Error Description | Line |
|---|---|
| Missing a Javadoc comment. | 45 |
| 'ctor def' child has incorrect indentation level 3, expected level should be 4. | 52 |
| Missing a Javadoc comment. | 67 |
| Missing a Javadoc comment. | 73 |
| WhitespaceAround: '+' is not preceded with whitespace. | 114 |
| WhitespaceAround: '+' is not followed by whitespace. Empty blocks may only be represented as {} when not part of a multi-block statement (4.1.3) | 114 |
| Missing a Javadoc comment. | 126 |
| Missing a Javadoc comment. | 146 |
| Distance between variable 'fullUrl' declaration and its first usage is 4, but allowed 3. Consider making that variable final if you still need to store its value in advance (before method calls that might have side effects on the original value). | 154 |
| Missing a Javadoc comment. | 175 |
| Distance between variable 'artifactUrl' declaration and its first usage is 4, but allowed 3. Consider making that variable final if you still need to store its value in advance (before method calls that might have side effects on the original value). | 177 |
| Missing a Javadoc comment. | 198 |
| Distance between variable 'fileUrl' declaration and its first usage is 4, but allowed 3. Consider making that variable final if you still need to store its value in advance (before method calls that might have side effects on the original value). | 200 |
| Error Description | Line |
|---|
| Error Description | Line |
|---|---|
| Missing a Javadoc comment. | 26 |
| Error Description | Line |
|---|
| Error Description | Line |
|---|---|
| Missing a Javadoc comment. | 26 |
| Missing a Javadoc comment. | 32 |
| Error Description | Line |
|---|---|
| WhitespaceAround: '{' is not preceded with whitespace. | 132 |
| Line is longer than 120 characters (found 122). | 174 |
| Error Description | Line |
|---|
| Error Description | Line |
|---|---|
| Unused @param tag for 'orderReviewRequest'. | 39 |
| Comment has incorrect indentation level 0, expected is 2, indentation should be the same level as line 76. | 74 |
| Line is longer than 120 characters (found 127). | 76 |
| Error Description | Line |
|---|---|
| Unused @param tag for 'orderReviewRequest'. | 58 |
| Comment has incorrect indentation level 0, expected is 2, indentation should be the same level as line 111. | 109 |
| Error Description | Line |
|---|---|
| Line is longer than 120 characters (found 129). | 55 |
| Line is longer than 120 characters (found 156). | 79 |
| Line is longer than 120 characters (found 128). | 111 |
| Error Description | Line |
|---|---|
| Line is longer than 120 characters (found 132). | 61 |
| Line is longer than 120 characters (found 147). | 87 |
| Line is longer than 120 characters (found 124). | 119 |
| Error Description | Line |
|---|---|
| At-clause should have a non-empty description. | 63 |
| Distance between variable 'card' declaration and its first usage is 7, but allowed 3. Consider making that variable final if you still need to store its value in advance (before method calls that might have side effects on the original value). | 67 |
| Error Description | Line |
|---|
| Error Description | Line |
|---|---|
| Missing a Javadoc comment. | 27 |
| WhitespaceAround: '{' is not preceded with whitespace. | 27 |
| WhitespaceAround: '{' is not preceded with whitespace. | 28 |
| WhitespaceAround: '{' is not preceded with whitespace. | 37 |
| Error Description | Line |
|---|
| Error Description | Line |
|---|
| Error Description | Line |
|---|---|
| Missing a Javadoc comment. | 102 |
| Missing a Javadoc comment. | 114 |
| WhitespaceAround: '{' is not preceded with whitespace. | 120 |
| Error Description | Line |
|---|---|
| Missing a Javadoc comment. | 42 |
| Error Description | Line |
|---|
| Error Description | Line |
|---|
| Error Description | Line |
|---|
| Error Description | Line |
|---|---|
| Missing a Javadoc comment. | 27 |
| WhitespaceAround: '{' is not preceded with whitespace. | 35 |
| WhitespaceAround: '{' is not preceded with whitespace. | 42 |
| Line is longer than 120 characters (found 123). | 62 |
| Line is longer than 120 characters (found 162). | 66 |
| Error Description | Line |
|---|---|
| Missing a Javadoc comment. | 19 |
| Error Description | Line |
|---|---|
| Missing a Javadoc comment. | 26 |
| Line is longer than 120 characters (found 148). | 48 |
| Line is longer than 120 characters (found 133). | 49 |
| '}' at column 5 should be on the same line as the next part of a multi-block statement (one that directly contains multiple blocks: if/else-if/else, do/while or try/catch/finally). | 51 |
| Line is longer than 120 characters (found 126). | 67 |
| Line is longer than 120 characters (found 142). | 79 |
| Line is longer than 120 characters (found 142). | 86 |
| Error Description | Line |
|---|---|
| Missing a Javadoc comment. | 48 |
| Missing a Javadoc comment. | 72 |
| Missing a Javadoc comment. | 88 |
| WhitespaceAround: '{' is not preceded with whitespace. | 93 |
| Missing a Javadoc comment. | 98 |
| WhitespaceAround: '{' is not preceded with whitespace. | 125 |
| WhitespaceAround: '-' is not preceded with whitespace. | 128 |
| WhitespaceAround: '-' is not followed by whitespace. Empty blocks may only be represented as {} when not part of a multi-block statement (4.1.3) | 128 |
| WhitespaceAround: '{' is not preceded with whitespace. | 139 |
| WhitespaceAround: '{' is not preceded with whitespace. | 160 |
| Error Description | Line |
|---|
| Error Description | Line |
|---|
| Error Description | Line |
|---|---|
| Missing a Javadoc comment. | 92 |
| Missing a Javadoc comment. | 112 |
| WhitespaceAround: '{' is not preceded with whitespace. | 113 |
| Line is longer than 120 characters (found 142). | 121 |
| Error Description | Line |
|---|
| Error Description | Line |
|---|---|
| Missing a Javadoc comment. | 27 |
| Error Description | Line |
|---|---|
| WhitespaceAround: '{' is not preceded with whitespace. | 33 |
| WhitespaceAround: '{' is not preceded with whitespace. | 47 |
| Error Description | Line |
|---|
| Error Description | Line |
|---|
| Error Description | Line |
|---|
| Error Description | Line |
|---|
| Error Description | Line |
|---|
| Error Description | Line |
|---|
| Error Description | Line |
|---|
| Error Description | Line |
|---|---|
| Missing a Javadoc comment. | 93 |
| 'CTOR_DEF' should be separated from previous statement. | 98 |
| Missing a Javadoc comment. | 98 |
| Comment has incorrect indentation level 0, expected is 6, indentation should be the same level as line 115. | 114 |
| Missing a Javadoc comment. | 123 |
| 'METHOD_DEF' should be separated from previous statement. | 134 |
| Missing a Javadoc comment. | 143 |
| Comment has incorrect indentation level 0, expected is 4, indentation should be the same level as line 148. | 147 |
| 'METHOD_DEF' should be separated from previous statement. | 152 |
| Error Description | Line |
|---|
| Error Description | Line |
|---|
| Error Description | Line |
|---|
| Error Description | Line |
|---|---|
| Line is longer than 120 characters (found 176). | 51 |
| Missing a Javadoc comment. | 51 |
| Line is longer than 120 characters (found 168). | 66 |
| Missing a Javadoc comment. | 66 |
| Error Description | Line |
|---|
| Error Description | Line |
|---|
| Error Description | Line |
|---|
| Error Description | Line |
|---|


Join the numbers and get to the 2048 tile!
1 user online
How to play: Use your arrow keys to move the tiles. When two tiles with the same number touch, they merge into one!
However, this is HN plays 2048, which means anybody who is online can move your pieces!


require "num"
require "sym"
This code handles tables of data, like the following.
outlook, $temp, <humid, wind, !play
over, 64, 65, TRUE, yes
over, 64, 65, TRUE, yes
over, 72, 90, TRUE, yes
over, 83, 86, FALSE, yes
sunny, 69, 70, FALSE, yes
sunny, 69, 70, FALSE, yes
rainy, 65, 70, TRUE, no
sunny, 75, 70, TRUE, yes
sunny, 75, 70, TRUE, yes
sunny, 85, 85, FALSE, no
rainy, 71, 91, TRUE, no
rainy, 70, 96, FALSE, yes
rainy, 70, 96, FALSE, yes
Note that first row describes each columns.
The special sympols $<>!
will be defined below.
Tables can be created two ways
header
and row
to handle
the first, then subsequent linesrows
which internally calls header
and row
.These functions are discussed further, below.
data
A data
object holds lists of various things, including rows
of the actual data
plus some meta knowledge.
name[c]
is the name of column c
. w
(and w[c]==-1
means minimize
and w[c]==1 means maximize).Data
may have one (and only) one class
column.function data()
return {w={}, syms={}, nums={}, class=nil,
rows={}, name= {}, _use={}}
end
Columns can be indep
endent or dep
endent (and the goal
of learning is often to find what parts of the former
predict for the latter).
function indep(t,c) return not t.w[c] and t.class ~= c end
function dep(t,c) return not indep(t,c) end
The function header
reads and processes special symbols
that define a table.
function header(cells,t, c,w)
t = t or data()
t.indeps = {}
for c0,x in pairs(cells) do
if not x:match("%?") then
c = #t._use+1
t._use[c] = c0
t.name[c] = x
if x:match("[<>%$]")
then t.nums[c] = num()
else t.syms[c] = sym()
end
if x:match("<") then t.w[c] = -1
elseif x:match(">") then t.w[c] = 1
elseif x:match("!") then t.class = c
else t.indeps[ #t.indeps+1 ] = c end end end
return t
end
For example, the above example call to header
initializes
a data
with the following structure.
Note that columns 2 and 3
have each been given a num
object or
a sym
object (we will use those to
collect statistics on each column).
Also, observe how
column three has a weight of w[3]==-1
.
_use:
| 1: 1
| 2: 2
| 3: 3
| 4: 4
| 5: 5
class: 5
name:
| 1: outlook
| 2: $temp
| 3: <humid
| 4: wind
| 5: !play
nums:
| 2: <an empyy num>
| 3: <an empty num>
rows:
syms:
| 1: <an empty sym>
| 4: <an empty sym>
| 5: <an empty sym>
w:
| 3: -1
Another thing to observe is that the rows
and syms
and nums
are empty.
Why? Because we have yet to add any data to this data
.
That task is handled by row
.
row
The only tricky bits of adding a row is handling the string to number conversions, and when to skip cells with an unknown value.
function row(t,cells, x,r)
r= #t.rows+1
t.rows[r] = {}
for c,c0 in pairs(t._use) do
x = cells[c0]
if x ~= "?" then
if t.nums[c] then
x = tonumber(x)
numInc(t.nums[c], x)
else
symInc(t.syms[c], x)
end end
t.rows[r][c] = x end
return t
end
function clone(data0, rows, data1)
data1 = header(data0.name)
for _,cells in pairs(rows or data0.rows) do
row(data1, cells) end
return data1
end
data
from RamReading data from disk, is handled by the
rows
function (that sets some defaults), after
which time it calls rows1
to do the actually
stream over the disk data.
function rows1(stream, t,f0,f, first,line,cells)
first,line = true,io.read()
while line do
line= line:gsub("[\t\r ]*","")
:gsub("#.*","")
cells = split(line)
line = io.read()
if #cells > 0 then
if first then f0(cells,t) else f(t,cells) end end
first = false
end
io.close(stream)
return t
end
function rows(file,t,f0,f, stream,txt,cells,r,line)
return rows1( file and io.input(file) -- reading from some specified file
or io.input(), -- reading from standard input
t or data(), f0 or header, f or row) end
data
from RamNote that if your data
was in RAM, you would not use rows
. Rather,
your code would:
header
to create a data
,row
for each row of data.For example, to select all rows from old
whose last cells is happy
…
new = header(old.names)
for _,cells in pairs(old.rows) do
if cells[#cells] == 'happy' then
row(new, cells) end end


Choose the right widget for you
Acme widgets is more than just anvils. Choose the right tool for your job.
This page includes fully accessible data tables. Your automated tests should not trigger any errors.
Compare Acme Widgets
| Name | Description | Purpose | Cost |
|---|---|---|---|
| Anvil | Very heavy block of iron | Smashing the RoadRunner | $29.95 |
| Rocket | Jet power | Go as fast as the bird | $19.99 |
| Tornado Generator | Create a local tornado | Create chaos | $4,590 |
| Pseudo Tunnel | Make a rock look like a tunnel | Watch the bird run into a rock | $4.25 |
Last order
| Name | Quantity | Cost | Subtotal |
|---|---|---|---|
| Total: | $86.93 | ||
| Anvil | 1 | $29.95 | $29.95 |
| Pseudo Tunnel | 4 | $4.25 | $17.00 |
| Rocket | 2 | $19.99 | $39.98 |
Pseudo table using ARIA
We don't want to use ARIA to replace a good data table with divitis. But this is an example of a basic pseudo table that retains the data table semantics.
Name
Description
Cost
Anvil
Very heavy block of iron
$29.95
Rocket
Jet power
$19.99


Works immediately.
You can immediately use all these features, but your project is
limited to a maximum of 20 users. You'll need to apply for project
approval to remove this cap. Once approved, Open Humans will invite members
to join your project.
Access to private data.
Select which data sources you want to request access to. If a member
authorizes sharing with your project, you'll immediately have access to
any of their data from those sources via our API.
If you wish to only access public data for a member, you should instead request username access (see below).
Username information is optional.
Each member's data comes via a random project-specific member ID.
You will not receive username access unless you request it.
Not receiving username access can improve security and facilitate IRB review – if data is anonymous, the review might be expedited.
On the other hand, if you only want to work with public data, you can request username access (and no data sources). You'll be able to retrieve the member's public data using the Public Data API.
Send messages to project members.
You can request authorization to send messages to your project
members. This messaging does not reveal their email or username to you.
Messages can target specific project member IDs and can contain the project member ID within the message. That means you can use embed the ID in a custom URL for a survey, to collect additiional information from a member.
Consent occurs within Open Humans.
You give us the text you want displayed. This text can be formatted using
Markdown syntax.
Forward member to a project URL.
You may optionally specify a URL for a member to be forwarded to after
they enroll and authorize your project. This URL can have their project
member ID embedded within it (e.g. as a parameter for a form).
Consent occurs on your app or website.
We expect you to handle consent or terms for your users,
before sending them to Open Humans for project authorization.
Upload data to member accounts.
Projects can be data sources: you can upload data for a member
to their account. This data will be private, accessible only by your
project and the member. The member can download the data and manage its
sharing within Open Humans.
{% if on_site_project %}
Access and upload data through command-line tools
Use the tools
provided by open-humans-api
to download the data of your
project's members in bulk and bulk-upload new data.
{% elif oauth2_project %}
Use existing Python packages to interface with Open Humans
If you are using Python for your programming we have you covered:
You can use either our
reusable application for the Django web framework to interact with
Open Humans or
use our API library, which conveniently wraps all of our API methods
for you.
{% endif %}


- beforeRulePostNodes - Variable in class bpmnCore.ServiceGraph
-
holds all post nodes for a given pre rule defined by before rules.
- boundPrefix - Variable in class bpmnExport.BPMNSerializer
-
The bound prefix.
- Bounds - Class in bpmnCore
-
The Class Bounds holds graphical information of a shape.
- Bounds(double, double, double, double) - Constructor for class bpmnCore.Bounds
-
Class constructor instantiates a new bounds.
- bounds - Variable in class bpmnCore.Shape
-
The bounds of this shape.
- bpmImport - package bpmImport
-
Provides a parser for the ServiceModeller configuration files and classes for internal representation of their XML data,
Provides an importer for transformation of the temporal service graph structure to Business Process Model memory model.
- bpmImport.smParser - package bpmImport.smParser
-
Provides a parser for the ServiceModeller configuration files and classes for internal representation of their XML data.
- bpmLayout - package bpmLayout
-
Provides an interface to produce the graphical layout of the BPM memory model and an implementation of a simple layout algorithm.
- bpmnCore - package bpmnCore
-
Provides classes for transformation of the internal XML representation of an configuration file to a temporal service graph.
- bpmnExport - package bpmnExport
-
Provides an interface to export the memory model to a specific output format like BPMN or XPDL.
- BPMNGraph - Class in bpmnCore
-
The Class BPMNGraph.
- BPMNGraph() - Constructor for class bpmnCore.BPMNGraph
-
- BPMNSerializer - Class in bpmnExport
-
The Class BPMNSerializer serializes a memory model to BPMN output format.
- BPMNSerializer() - Constructor for class bpmnExport.BPMNSerializer
-
Class constructor instantiates a new BPMN serializer.
- buildGateways(HashSet<String>, HashSet<String>) - Method in class bpmImport.SMImport
-
Builds the gateways.
- buildLayer() - Method in class bpmImport.SMImport
-
first Layer.
- buildMemoryModel() - Method in class bpmImport.SMImport
-
Builds the memory model.
- buildNextLayer(HashSet<String>) - Method in class bpmImport.SMImport
-
Builds the next layer.


Overview
Have you ever wanted to display a QR code in the terminal using node? Probably not, but if your answer is yes then you'll be happy to know about qrcode-terminal!
qrcode-terminal is a tiny npm module that allows you to encode text as a QR code and render it to a UNIX-compatible terminal.
Usage
It looks something like this:
And has a very simple JavaScript interface:
// render QR code to the console
qrcode.generate('http://michaelbrooks.ca');
// return QR code as a string
qrcode.generate('http://michaelbrooks.ca', function (qrcode) {
console.log(qrcode);
});
And a command-line interface:
$ qrcode "http://michaelbrooks.ca"
Gotcha
One gotcha is that the size of the QR code is related to the amount of data encoded. For longer URLs, I recommend you use a URL shortener service, otherwise the QR code may be larger than the terminal screen!
Why
Gord Tanner and I created this library because there are no functional QR code libraries for node that can render to text or the terminal.
We needed the library for the PhoneGap/Build CLI. The library has to be lightweight, because we expect average users to be downloading and installing it. It also has to work on both Windows, OS X, and ideally Linux.
Alternatives
There are existing QR code libraries for node. Almost all of them will render to a Canvas
object and at least one can render as text.
Text from Canvas
With the Canvas
object, you can get a text representation of a QR code. This is done by rendering the canvas image to a 2D context, getting the image data from the context, and then converting each pixel value to the appropriate binary text value. But why would you want to do this? It requires the canvas
npm module and does double duty processing by rendering the QR code twice - once as an image and once as text.
node-qrcode
There is also a rich QR code library for node called node-qrcode. However, the library is primarily focused on server-side rendering. It does have a client-side text rendering option, but I could not successfully scan the QR code on an iPhone, Android, or BlackBerry. Perhaps it's my terminal's font, but the user should be free to change their font.
Here is an example of node-qrcode
rendering to the terminal:
Now, why not contributor back to node-qrcode? It's a heavy library with a compiled dependency (canvas
). As I mentioned before, my project requires a light-weight library that works on both Windows and OS X.


{ productName } provides a now syntax to your inline script code. It basically allows you to return HTML elements with ease. You can use this syntax by putting your html element inside parentheses.

{{ (
Hello, world
) }}

You can also set this to a regular variable like following:

{{ let element = (

); element.innerHTML = 'Hello, world'; element }}

This will return a new element with the content 'Hello, world'.
This also works with arrays. If you fill an array with HTMLElements, each one will get appended to the parent element.

{{ let elementA = (
Hello
); let elementB = (
world
); [elementA, elementB]; }}

One of the most practical ways to use this syntax is to nest it in itself. Like with regular elements, an element that got defined by the new syntax can also use the inline script syntax like following:

{{ (
{ Math.random(); }
) }}

Why is this useful? Maybe you want to generate different kinds of elements based on some input. In this example 50% of the time a red text will appear and the other 50% of the time a blue text will appear. This can be implemented as follows:

{{ Math.random() > 0.5 ? (
red
) : (
blue
) }}

It's also possible to use the inline syntax on a child of the html element.
If you define a variable inside the inline script syntax, you can access the variable inside this scope. For example you want to display a text based on some input that returns a random word. You can implement this as follows:

{{ const text = ['lorem', 'ipsum', 'dolor', 'sit'][Math.floor(Math.random() * 4)]; (
{ text }
) }}

You can nest these element indefinitely so this is a valid syntax as well:

{{ const text1 = ['lorem', 'ipsum', 'dolor', 'sit'][Math.floor(Math.random() * 4)]; (
{ const text2 = ['lorem', 'ipsum', 'dolor', 'sit'][Math.floor(Math.random() * 4)]; (
{ text1 + ' ' + text2 }
) }
) }}

A very good use case for this syntax is to dynamically generate a navigation bar based on a variable. In this example, we're going to define a variable called navigation and generate a navigation bar from it.
To do this we need to define our header. Inside the inline script syntax we're going to map the array and return a new element. At the end it should look something like this:
 {{ navigation.map(item => { return ({ item }) }) }}


Quickstart¶
Local setup with Docker¶
Let’s assume that you want to create a project called “hello_world”, one that makes a separation between a React-based front end and a Django-based backend, all set up locally using Docker and production ready in Heroku.
Most tutorials will give you a partial solution, so the only way is painstakingly piecing together a solution from multiple guides/tutorials that did some aspect of what you want without covering the whole.
Side projects don’t exactly require optimal productivity, but, unlike jobs, if they become a pain to work on, it’s pretty easy to just quit.
Instead, we can do as follows. First, get Cookiecutter. Trust me, it’s awesome:
$ pip install "cookiecutter>=1.7.0"
Now run it against this repo:
$ cookiecutter https://github.com/ohduran/cookiecutter-react-django
You’ll be prompted for some values. Provide them, then the project will be created for you.
Now, on your terminal, simply do docker-compose up –build, and wait for the containers to build. Eventually, you’ll be able to see the index page by going to http://<IP_ADDRESS>/
You will be able to see the following:
Write something on that box over there, it will get you the number of characters via your Django API!


Say Hello to New Music
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the ard dummy text ever since the 1500s.
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the ard dummy text ever since the 1500s.


--- layout: default title: Lillian Warner, Computer Network Defender ---
Under Blog I record neat commands and scripts to remember for later
If you're curious about who I am, see About or ask me a question via the Contact Me page


Authentication using Neural Network Analysis of Pattern Tracing
To log in, you must first train the system to recognize how you trace a shape. You will train the system six times in a row. Each training will consist of tracing the black square shown below. You may re-trace the shape as many times as you would like to for each training.
When you are happy with your tracing for the current training, click the "Next" button below the shape. After the sixth training is complete you will have successfully trained the system.
If you are using a device with a touchscreen, please trace the shape using the touchscreen. Tracing with the mouse will work, but will not provide as good of data.
After you have finished training, you will be asked to log in to the system by tracing the shape once more.
Progress: 0/0


Start Your Imaginations
Ready to use
Phoenix works perfect in all modern browsers (Chrome, Safari, Firefox etc).
Clean design
A combination of the unique layout and material design best practices is what the Phoenix loved for.
Bootstrap based
Most popular 1170px grid and all the Bootstrap components are at your service.
Unique icons
Phoenix is an SVG based instrument, meaning all icons are sharp and look awesome everywhere.


| plain method definition |
denotes a method whose
execution is not affected by layers
|
| layered method definition |
consists of a base method definition and at
least one partial method definition
|
| base method definition |
is executed when no active
layer provides a corresponding partial method
|
| partial method definition | A partial method definition
can proceed to a corresponding partial method in another
active layer or, if such method does not exist, to the base
method definition
|
| class-in-layer |
the layer is defined outside the lexical scope of the modules (e. g., classes) for which it provides behavioral variations |
| layer-in-class |
the declaration of a layer within the lexical scope of the module it augments |
| Implementing Layer Activation: proxy objects |
call-time lookup |


Start
Components
Demo
Github
Settings
Starts
Components
No component selected
Your browser does not support iframes.
Mobile Demo
OK
Settings
WeUI verision: 0.3.0
Preview Size
iPhone 6S
iPhone 6S+
Nexus 6
Made with
By n7best
OK


Qt Quick Examples - Animation
Animation is a collection of small QML examples relating to animation. Each example is a small QML file emphasizing a particular type or feature.
For more information about animations, visit Important Concepts in Qt Quick - States, Transitions and Animations.
Running the Example
To run the example from Qt Creator, open the Welcome mode and select the example from Examples. For more information, visit Building and Running an Example.
ColorAnimation
ColorAnimation uses color animations to fade a sky from day to night.
gradient: Gradient { GradientStop { position: 0.0 SequentialAnimation on color { loops: Animation.Infinite ColorAnimation { from: "#14148c"; to: "#0E1533"; duration: 5000 } ColorAnimation { from: "#0E1533"; to: "#14148c"; duration: 5000 } } } GradientStop { position: 1.0 SequentialAnimation on color { loops: Animation.Infinite ColorAnimation { from: "#14aaff"; to: "#437284"; duration: 5000 } ColorAnimation { from: "#437284"; to: "#14aaff"; duration: 5000 } } } }
PropertyAnimation
PropertyAnimation uses number animations to bounce a circle up and down.
// Animate the y property. Setting loops to Animation.Infinite makes the // animation repeat indefinitely, otherwise it would only run once. SequentialAnimation on y { loops: Animation.Infinite // Move from minHeight to maxHeight in 300ms, using the OutExpo easing function NumberAnimation { from: smiley.minHeight; to: smiley.maxHeight easing.type: Easing.OutExpo; duration: 300 } // Then move back to minHeight in 1 second, using the OutBounce easing function NumberAnimation { from: smiley.maxHeight; to: smiley.minHeight easing.type: Easing.OutBounce; duration: 1000 } // Then pause for 500ms PauseAnimation { duration: 500 } }
Animators
Animators uses animators to bounce an icon up and down.
SequentialAnimation { SequentialAnimation { ParallelAnimation { YAnimator { target: smiley; from: smiley.minHeight; to: smiley.maxHeight easing.type: Easing.OutExpo; duration: 300 } ScaleAnimator { target: shadow from: 1 to: 0.5 easing.type: Easing.OutExpo; duration: 300 } } ParallelAnimation { YAnimator { target: smiley; from: smiley.maxHeight; to: smiley.minHeight easing.type: Easing.OutBounce; duration: 1000 } ScaleAnimator { target: shadow from: 0.5 to: 1 easing.type: Easing.OutBounce; duration: 1000 } } } PauseAnimation { duration: 500 } running: true loops: Animation.Infinite }
Behaviors
Behaviors uses behaviors to move a rectangle to where you click.
// Set an 'elastic' behavior on the focusRect's y property. Behavior on y { NumberAnimation { easing.type: Easing.OutElastic; easing.amplitude: 3.0; easing.period: 2.0; duration: 300 } }
Wiggly Text
Wiggly Text demonstrates using more complex behaviors to animate and wiggle some text around as you drag it. It does this by assigning a complex binding to each letter:
x: follow ? follow.x + follow.width : container.width / 6 y: follow ? follow.y : container.height / 2
Then, it uses behaviors to animate the movement of each letter:
Behavior on x { enabled: container.animated; SpringAnimation { spring: 3; damping: 0.3; mass: 1.0 } } Behavior on y { enabled: container.animated; SpringAnimation { spring: 3; damping: 0.3; mass: 1.0 } }
Tv Tennis
Tv Tennis uses complex behaviors to make the paddles follow a ball to simulate an infinite tennis game. Again, a binding which depends on other values is applied to the position and a behavior provided the animation.
y: ball.direction == 'left' ? ball.y - 45 : page.height/2 -45; Behavior on y { SpringAnimation{ velocity: 300 } }
Easing Curves
Easing Curves shows off all the easing curves available in Qt Quick animations.
States
States demonstrates how the properties of an item can vary between states.
It defines several states:
// In state 'middleRight', move the image to middleRightRect State { name: "middleRight" PropertyChanges { target: userIcon; x: middleRightRect.x; y: middleRightRect.y } }, // In state 'bottomLeft', move the image to bottomLeftRect State { name: "bottomLeft" PropertyChanges { target: userIcon; x: bottomLeftRect.x; y: bottomLeftRect.y } }
Transitions
Transitions takes the States example and animates the property changes by setting transitions:
// Transitions define how the properties change when the item moves between each state transitions: [ // When transitioning to 'middleRight' move x,y over a duration of 1 second, // with OutBounce easing function. Transition { from: "*"; to: "middleRight" NumberAnimation { properties: "x,y"; easing.type: Easing.OutBounce; duration: 1000 } }, // When transitioning to 'bottomLeft' move x,y over a duration of 2 seconds, // with InOutQuad easing function. Transition { from: "*"; to: "bottomLeft" NumberAnimation { properties: "x,y"; easing.type: Easing.InOutQuad; duration: 2000 } }, // For any other state changes move x,y linearly over duration of 200ms. Transition { NumberAnimation { properties: "x,y"; duration: 200 } }
PathAnimation
PathAnimation animates an image along a bezier curve using a PathAnimation.
PathAnimation { id: pathAnim duration: 2000 easing.type: Easing.InQuad target: box orientation: PathAnimation.RightFirst anchorPoint: Qt.point(box.width/2, box.height/2) path: Path { startX: 50; startY: 50 PathCubic { x: window.width - 50 y: window.height - 50 control1X: x; control1Y: 50 control2X: 50; control2Y: y } onChanged: canvas.requestPaint() } }
PathInterpolator
PathInterpolator animates an image along the same bezier curve, using a PathInterpolator instead.
PathInterpolator { id: motionPath path: Path { startX: 50; startY: 50 PathCubic { x: window.width - 50 y: window.height - 50 control1X: x; control1Y: 50 control2X: 50; control2Y: y } onChanged: canvas.requestPaint() } SequentialAnimation on progress { running: true loops: -1 PauseAnimation { duration: 1000 } NumberAnimation { id: progressAnim running: false from: 0; to: 1 duration: 2000 easing.type: Easing.InQuad } } }
Files:
- animation/animation.qml
- animation/basics/animators.qml
- animation/basics/color-animation.qml
- animation/basics/property-animation.qml
- animation/behaviors/SideRect.qml
- animation/behaviors/behavior-example.qml
- animation/behaviors/tvtennis.qml
- animation/behaviors/wigglytext.qml
- animation/easing/easing.qml
- animation/pathanimation/pathanimation.qml
- animation/pathinterpolator/pathinterpolator.qml
- animation/states/states.qml
- animation/states/transitions.qml
- animation/main.cpp
- animation/animation.pro
- animation/animation.qmlproject
- animation/animation.qrc


Tutorials¶
The following tutorials are quantitative risk methods with the least amount of rigor.
All risk measurement must start somewhere, and this tutorial represents the earliest examples of scenario measurement. (See Scenarios)
These example scenarios and their forecasts are similar to using your shoe to measure “one foot”. Low rigor measurements are still useful for day to day, “back of envelope” risk modeling with low cost and effort. They can easily be expanded upon as requirements demand more rigor. (See Rigor)
Risk Analysis¶
In this example, we are concerned with a single risk. First, we develop a scenario.
Scenario
A bank robber threatens a teller next quarter. (Yes / No)
This meets the criteria of a scenario by including an observable event, and includes a specific timeframe.
The observable judgment criteria could be the bank’s security team, or the creation of a police report.
The forecaster who is asked to measure the risk would then assign a likelihood to “Yes” or “No”. (See: Forecasting)
As an example, we’ll say that the forecaster believes that “Yes” has a likelihood of 5%, which would estimate an occurrence of every five years.
That is an example of risk analysis done quickly and simply.
Risk Assessment¶
In this example, we are concerned with gathering, and comparing more than one risk.
In our example, lets say that we are assessing the risks involved with our CEO getting a virus on their laptop based on their request for an assessment.
In this case we will use two similar scenarios, and we’ll just have to pretend that these were all the scenarios found in a risk discovery effort.
We develop two scenarios.
Scenario
A: A malicious insider employee infects our CEO’s laptop with a virus next quarter. (Yes / No)
Scenario
B: A malicious website infects our CEO’s laptop with a virus next quarter. (Yes / No)
We have two scenarios with similar outcomes (The CEO gets a virus), but differing threats (A malicious insider or a malicious website). Both share a similar timeframe.
We would perform a Risk Analysis on both of these scenarios. Given that they are similar, a forecaster would likely rely on useful data for both.
As an example, let’s say the forecaster believes that Scenario A has a “Yes” likelihood of 1%, while Scenario B has a likelihood of 35%.
Those likelihoods, when simulated (See: The Monte Carlo simulation), would indicate that the forecaster believes Scenario B (a malicious website) to occur a bit more than annually (every 2.8 quarters), while an insider employee would occur once every twenty five years (every 100 quarters).
Under the assumption that the “virus” is equally bad in both cases, we can numerically compare both of these risks.
Risk Management¶
In this example we are concerned with mitigating our risks over time, with our efforts and resources.
Let’s use our first scenario from Risk Analysis again. In that example, our forecaster assigned a 5% likelihood to the following scenario:
Scenario
A bank robber threatens a teller next quarter. (Yes / No)
Imagine if the bank wasn’t OK with this level of risk to their employees, and decided to invest in a mitigation, like an armed guard near the tellers. Maybe they make this decision because other banks in the area don’t have an armed guard, making them the least attractive target.
Assume that this information is valuable to the forecaster. Given that no other substantial information has changed regarding the risk, they would forecast again next quarter, let’s say at 3%, a reduction of 2% from the original 5%.
If these assumptions weren’t correct, and for some reason this mitigation increased risks in the mind of the forecaster, then it would reflect itself with an increasing likelihood in the measurement.


speed
—
km/h
cadence
—
rpm
power
—
watts
heartrate
—
bpm
distance
—
km
speed avg
—
km/h
lorem
—
tbd
ipsum
—
tbd
tbd
—
bpm
tbd
—
tbd
tbd
—
tbd
tbd
—
km


A Free Society
Humanity is at a fork - we have a choice to make as a global society. We can change our ways or we can assure our own destruction. Our global system of governments, banking, education, and culture are destroying the fabric of human society. They impede, not create, true order, wealth, knowledge and culture. We are conditioned to feel dependent on these systems. But this is a deception. Without these limiting institutions, humanity will be able to reach its true potential, marking the dawn of The Golden Age of mankind, a renaissance of enlightenment in human evolution.
We Are Being Lied To
We are all being lied to. We are all kept on a need-to-know basis.  The rest of your time is taken up by distraction from the truth. What is the truth? The whole system is a Lie. We have a criminal justice system all around the world. The world is run by various mafia organizations who control all governments, religions, banks, economies, media, education, health care, etc. This is why war and poverty and slavery run rampant in this world. Humanity has been told for 5000 years that without these systems, we would collapse. This is the biggest lie of all. Read More...
article section h2
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam sodales urna non odio egestas tempor. Nunc vel vehicula ante. Etiam bibendum iaculis libero, eget molestie nisl pharetra in. In semper consequat est, eu porta velit mollis nec. Curabitur posuere enim eget turpis feugiat tempor. Etiam ullamcorper lorem dapibus velit suscipit ultrices. Proin in est sed erat facilisis pharetra.


This is basically a normal listview with the following

-information:

...

Birds name

...


1. With INCC in maintenance mode select Maintain | Glovebox Add/Edit/Delete and enter the number of measurement positions for the glovebox to be assayed.
2. Set the passive background rates to zero. Background corrections are usually not made with holdup measurements.
3. Select Acquire | Holdup.
4. Select a glovebox id, an MBA, a stratum id, and the item material type.
5. Select an item id from the drop down list or type in a new item id. If the item id is new, the isotopics dialog box will appear. Enter the isotopics for the item being assayed at this time.
6. If you want to do a verification measurement, that is, if you want to compare the assay mass with a declared mass, enter the declared mass. Otherwise, enter zero for the declared mass.
7. Type in any comment you want to make.
8. Enter the count time per cycle in seconds and the number of cycles.
9. Select “Shift register” as the data source.
10. Select quality control (QC) tests on, that is, check the box.
11. Check the print box if you want printed results at the end of the measurement. You can always print results later under Report | Holdup if you do not want to print now.
12. Check the ending comment box if you want to be able to add a description of the measurement when it has completed.
13. Select the “Isotopics” button and enter the isotopic composition for your item if it has not already been entered.
14. Select the “OK” button, and the holdup measurement position screen will be displayed.
15. Click on the box that corresponds to the location of the detector relative to the glovebox. The selected box will change color and display the message “Measure Next”. Select the “Measure selected glovebox position” button and the measurement will begin. When the measurement for the position starts, a single results window is displayed showing the cycle data at this position. You can end the measurement early, if desired, by selecting “Quit measurement with results” or “Abort measurement” button. If you choose the quit option, the measurement will stop with the data from the cycles completed so far. If you choose the abort option the data from the current measurement position will be destroyed.
16. Once the measurement finishes, move the detector to the next location and select the next position to be measured in the software. Repeat this process until all the positions are measured. A cycle results window is generated for every position measured or remeasured.
17. A previously measured position can be remeasured by clicking on the box that corresponds to the location to be remeasured and selecting the “Measure selected glovebox position” button. The new data will replace the old data in the analysis.
18. Once all the positions have been measured, select the “Quit measurements with results” button on the measurement position screen. A final results window is opened showing all the count rate results from the individual measurement positions, the calculated average count rates for the whole glovebox, and assay mass and standard deviation for each analysis method that you selected. In addition, if you entered a declared mass, you will get a comparison between the assay and declared mass for each analysis method that you selected. If the “Abort measurement” button is selected, all the data for the entire glovebox will be destroyed.


{% extends 'base.html' %} {% block content %}
{{pitch.content}}
Posted by {{pitch.user.username}} at {{pitch.posted}}


Class Solution¶
- Defined in File utils.hpp
Inheritance Relationships¶
Derived Types¶
public GASolution
(Class GASolution)public GreedySolution
(Class GreedySolution)public LocalSearchInterIntraSolution
(Class LocalSearchInterIntraSolution)public LocalSearchIntraSolution
(Class LocalSearchIntraSolution)public SimulatedAnnealingSolution
(Class SimulatedAnnealingSolution)public TabuSearchSolution
(Class TabuSearchSolution)
Class Documentation¶
-
class
Solution
¶ Subclassed by GASolution, GreedySolution, LocalSearchInterIntraSolution, LocalSearchIntraSolution, SimulatedAnnealingSolution, TabuSearchSolution
Public Functions
-
Solution
(std::vector<Node> nodes, std::vector<Vehicle> vehicles, std::vector<std::vector<double>> distanceMatrix)¶ Constructor.
Constructor for solution class
- Return
- no return type
- Parameters
nodes
: Vector of all nodesvehicles
: Vector of vehiclesdistanceMatrix
: Matrix containing distance between each pair of nodes
-
Solution
(Problem p)¶ Constructor.
Constructor for solution class
- Return
- no return type
- Parameters
p
: Instance of Problem class defining the problem parameters
-
void
CreateInitialSolution
()¶ Creates initial solution.
Creates initial solution, currently set to greedy.
- Return
- void
-
bool
CheckSolutionValid
()¶ Check whether the solution is valid.
Check whether the solution is valid by checking whether all the nodes are reached and whether the total edmand of all the nodes on any of the routes exceed the capacity of the respective vehicles
- Return
- bool True is solution is valid
-
virtual void
Solve
()¶ Virtual function overloaded by solution classes to solve the given problem.
Virtual function overloaded by solution classes to solve the given problem.
- Return
- void
-
Node
find_closest
(Vehicle &v)¶ find closest node
Finds the node nearest to the last node in the route of the vehicle under constideration that has not been routed already
- Return
- Node nearest node
- Parameters
v
: vehicle under consideration
-
void
PrintSolution
(const std::string &option = "")¶ Prints the status of solution.
Prints the solution status including cost, the vehicle status, and solution validity
- Return
- void
- Parameters
option
: allows the option to print routes or vehicle statuses
-


I've been writing software in some form or another for almost 35 years, and it shows.
I got my start with a RadioShack TRS-80, given to me as a birthday present, along with two thick books on BASIC. My grandfather, who had been involved with old punch card mainframes, told me, "Computers are the future. Learn how to use this." Now, if you're familiar with the TRS-80, you'll already know this, but it didn't come installed with any sort of software other than the BASIC language. Thus, if I wanted to do anything with it, I needed to learn how to write software.
I threw myself into it with a passion and discovered that I had a true natural talent for understanding code. Have you ever had a friend who was a particularly talented musician? The kind who can pick up an instrument and, with a month of seemingly effortless practice, be better than a person who has been playing for years? That's how I am with code. Programming languages simply make sense to me. I learn new ones incredibly quickly, and then apply all the previous lessons I've learned to truly excel with them.
On a personal note, I'm the proud father of two amazing girls who are way too smart for their own good. Together, we love playing all kinds of games (video, board, card). I'm also a passionate consumer of pop culture. I love movies and music and can talk about both for hours on end.
View ResumeThis is a website I built almost a decade ago, for the local movie theater. At the time, I was still learning a lot about web development. I used ASP.NET MVC to build the site. While it looks primitive by today's standards, it still functions quite well. I'm currently in the process of rebuilding it using a much more responsive design.
Hire Me!
Call to Action


64,450/Frw
- 1 Website
- ♦ For small business
- 1 Domain Name
- ♦ Hosting
- ♦ responsive design
- ♦ moblie feindily
Order Now
90,000/Frw
- 2 Websites
- ♦ Mobile freindly
- ♦ Responsive design
- ♦ Free SSL
- ♦ web animations
- ♦ Free SSL
- ♦ Android App
Order Now
120,000/Frw
- 1 Websites
- ♦ Payment option
- ♦ Responsive design
- ♦ Free SSL
- ♦ Responsive design
- ♦ Free SSL
- ♦
Order Now
160,000/Frw
- 2 Websites
- ♦ Free SSL
- ♦ Responsive design
- ♦ Free SSL
- ♦ Android App
- ♦ Free SSL/HTTPS
Order Now
70,000 +/Frw
- ♦ School Ms
- ♦ Stock Ms
- ♦ Hospital ms
- ♦ House renting Ms
- ♦ Car parking Ms
- ♦ And many more ...
Order Now
20,000/Frw
- ♦ Google listing
- ♦ Google analytics
- ♦ Domain value
- ♦ Yandex listing
- ♦ Local search listing
Order Now
50,400/Ftw
- ♦ Google Advertisment
- ♦ Youtube Advertisment
- ♦ Facebook Advertisment
- ♦ Pinterest Advertisment
- ♦ Amazon Advertisment
Order Now


--- layout: post title: Sharing the Inheritance Hierarchy post_id: 2 categories: - essays and rants date: 2011-06-07 15:32:00.000000000 -06:00 author: Jamis permalink: 2011/6/7/sharing-the-inheritance-hierarchy.html summary: > Part rant, part exhortation—the dangers of naively implementing Ruby's inheritance hierarchy callbacks ---
I’ve been working more closely with Ruby 1.9 and Rails 3 lately, and while in general it’s been smooth going, there was one particularly disappointing road bump today.
Consider the following code, from a Rails functional test:
1 2 3 4 5 6 7 8 9 10 11 12 |
class SessionControllerTest < ActionController::TestCase tests SessionController # ... end class LoginTest < SessionControllerTest # ... end class LogoutTest < SessionControllerTest # ... end |
This works great with ruby 1.8.7. The tests
call sets the SessionController as the controller under test, and the subclasses gain access to that via the “inheritable attributes” feature of ActiveSupport.
Sadly, this does not work in ruby 1.9. Those tests have errors now, saying that the controller instance variable needs to be set in the setup method, because the inheritable attribute of the parent is no longer being inherited.
Some digging and experimenting helped me pare this down to a simpler example:
1 2 3 4 5 6 7 8 9 10 11 |
require 'minitest/unit' require './config/application' class A < MiniTest::Unit::TestCase write_inheritable_attribute "hi", 5 end p A.read_inheritable_attribute("hi") class B < A end p B.read_inheritable_attribute("hi") |
If you run this example with ruby 1.9, it will print “5”, and then “nil”. And the most telling bit: if you comment out the superclass from A’s definition, the program will then print “5” and “5”. It was obviously something that MiniTest was doing.
Another 30 minutes later, I had my answer. MiniTest::Unit::TestCase was defining an inherited
callback method, to be invoked every time it was subclassed:
1 2 3 |
def self.inherited klass # :nodoc: @@test_suites[klass] = true end |
ActiveSupport, too, is defining a version of the inherited method, monkeypatching the Class object directly so that subclasses can get a copy of their parent’s inheritable attribute collection. And because MiniTest is descended from Class, MiniTest’s version was overriding ActiveSupport’s version, causing the inheritable attributes to never be copied on inheritance.
Frustrating!
All it takes is the addition of one line—just a single word!—to “fix” MiniTest’s version:
1 2 3 4 |
def self.inherited klass # :nodoc: @@test_suites[klass] = true super # <-- THIS RIGHT HERE end |
You can argue that ActiveSupport shouldn’t be monkeypatching system classes like that. Maybe, maybe not. The point is, it is, and it actually does it in a pretty “good neighbor” way. It saves a reference to any prior “inherited” definition, and calls it from within its version, chaining the calls together.
Sadly, MiniTest’s assumption that it would be the only consumer of the inherited hook in its ancestor chain totally kills ActiveSupport’s attempts at working together. I’ve had to resort to calling the tests
helper in each test subclass, explicitly. Not a huge deal, but I’d sure love to have back the two hours I spent debugging this.
The lesson? Always be a good neighbor. Never assume you are the only kid on the playset. Call super when you override a method. Create a call chain when you replace a method in situ. Think of the children!


public class BackupOptions
extends java.lang.Object
implements java.lang.Cloneable
Environment.backup(java.lang.String, com.sleepycat.db.BackupOptions)
operations.| Modifier and Type | Field and Description |
|---|---|
static BackupOptions |
DEFAULT
Default configuration used if null is passed to methods that create a
cursor.
|
| Constructor and Description |
|---|
BackupOptions()
Construct a default options object for backup operations.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
getAllowCreate()
Whether the target directory will be created if it does not already exist.
|
boolean |
getClean()
Whether the target backup directory should be cleaned.
|
boolean |
getExclusiveCreate()
Whether the target directory will be exclusively created.
|
boolean |
getFiles()
Whether ordinary files are included in the hot backup.
|
boolean |
getNoLogs()
Whether log files are included in the backup.
|
boolean |
getSingleDir()
Whether all backed up files are to be placed in a single directory.
|
boolean |
getUpdate()
Whether an incremental backup will be performed.
|
void |
setAllowCreate(boolean allowcreate)
Sets whether the target directory will be created if it does not
already exist.
|
void |
setClean(boolean clean)
Sets whether to clean the target backup directory.
|
void |
setExclusiveCreate(boolean exclusivecreate)
Sets whether the target directory will be exclusively created.
|
void |
setFiles(boolean files)
Sets whether all ordinary files will be backed up.
|
void |
setNoLogs(boolean nologs)
Sets whether log files are skipped in the backup.
|
void |
setSingleDir(boolean singledir)
Sets whether all backed up files are to be placed in a single directory.
|
void |
setUpdate(boolean update)
Sets whether to perform an incremental back up.
|
public static final BackupOptions DEFAULT
public BackupOptions()
public void setClean(boolean clean)
clean
- If true, all files are removed from the target backup directory before
the back up is performed.public boolean getClean()
public void setFiles(boolean files)
files
- If true, all ordinary files that might exist in the environment, as well
as might exist in the environment's subdirectories, are backed up; otherwise,
only files necessary for the proper operation of Berkeley DB are backed up.public boolean getFiles()
public void setNoLogs(boolean nologs)
nologs
- If true, log files are not included in the backup. Instead, only *.db
files are copied to the target directory.public boolean getNoLogs()
public void setSingleDir(boolean singledir)
singledir
- If true, then regardless of the directory structure used by the source
environment, place all back up files in the single target directory
Use this option if absolute path names to your environment directory
and the files within that directory are required by your application.public boolean getSingleDir()
public void setUpdate(boolean update)
update
- If true, perform an incremental back up, instead of a full back up.
When this option is specified, only log files are copied to the target
directory.public boolean getUpdate()
public void setAllowCreate(boolean allowcreate)
allowcreate
- If true, then create the target directory and any subdirectories as
required to perform the backup; otherwise, any missing directories
will result in the backup operation throwing a
DatabaseException
exception.public boolean getAllowCreate()
DatabaseException
exception.public void setExclusiveCreate(boolean exclusivecreate)
exclusivecreate
- If true, then the backup operation will create the target directory and
any required subdirectories. If the target directory currently exists,
the backup operation will throw a
DatabaseException
exception.public boolean getExclusiveCreate()
DatabaseException
exception.Copyright (c) 1996, 2016 Oracle and/or its affiliates. All rights reserved.


This tiny image should be served as Base64 URI:
This average-sized image should be served from dist folder


First prepare your data you want to show on your chart.
react-d3
only support one kind of data format, which is an array with objects (the objects have to have the same keys). Which means you have to have a data like below for example. (data source)
[
{
name: "Lavon Hilll I",
BMI: 20.57,
age: 12,
birthday: "1994-10-26T00:00:00.000Z",
city: "Annatown",
married: true,
index: 1
},
{
name: "Clovis Pagac",
BMI: 24.28,
age: 26,
birthday: "1995-11-10T00:00:00.000Z",
city: "South Eldredtown",
married: false,
index: 3
},
{
name: "Gaylord Paucek",
BMI: 24.41,
age: 30,
birthday: "1975-06-12T00:00:00.000Z",
city: "Koeppchester",
married: true,
index: 5
},
{
name: "Ashlynn Kuhn MD",
BMI: 23.77,
age: 32,
birthday: "1985-08-09T00:00:00.000Z",
city: "West Josiemouth",
married: false,
index: 6
},
...
]
If you have a csv, tsv file, you can use a csv converter to convert it to JSON format. Or using webpack
to require your csv via dsv-loader
var data = require('dsv?delimiter=\t!./data/letter.tsv')
// or
var data = require('csv?delimiter=,!./data/test.csv')
Pick one react-d3
you want to install (see gallery). Here we are going to demo using react-d3-basic
library to draw a simple line chart.
Install react-d3-basic
:
npm install --save react-d3-basic
react-d3
packages require to be bundled with webpack
or browserify
install wepback:
npm install webpack -g
Sample webpack
setting:
'use strict';
var path = require('path');
var webpack = require('webpack');
var js_dist = path.join(__dirname, './dist');
module.exports = [{
name: 'chartComponent',
entry: {
line: './line.jsx',
},
output: {
path: js_dist,
filename: '[name].js'
},
module: {
loaders: [
{
test: [/\.jsx$/],
loaders: ["jsx-loader?insertPragma=React.DOM&harmony"],
}
],
},
resolve: {
extensions: ['', '.webpack.js', '.web.js', '.js', '.jsx']
}
}];
Compile by run:
webpack
You can use reactify to bundle your .jsx
or .js
file.
browserify -t reactify main.js
Create a new file called line.jsx
(which we have setup webpack to compile).
We need to require some library we need to use:
// first of course react!
var React = require('react');
// require `react-d3-core` for Chart component, which help us build a blank svg and chart title.
var Chart = require('react-d3-core').Chart;
// require `react-d3-basic` for Line chart component.
var LineChart = require('react-d3-basic').LineChart;
Load your data using webpack
var chartData = require('dsv?delimiter=,!../../data/garbage.csv');
Not using webpack
var chartData = [
// put your data here!
]
your chart settings (such as settings for axis, legend, lines, chart basic settings)
var width = 700,
height = 300,
margins = {left: 100, right: 100, top: 50, bottom: 50},
title = "User sample",
// chart series,
// field: is what field your data want to be selected
// name: the name of the field that display in legend
// color: what color is the line
chartSeries = [
{
field: 'BMI',
name: 'BMI',
color: '#ff7f0e'
}
],
// your x accessor
x = function(d) {
return d.index;
}
Render it in React!
ReactDOM.render(
<Chart
title={title}
width={width}
height={height}
margins= {margins}
>
<LineChart
margins= {margins}
title={title}
data={chartData}
width={width}
height={height}
chartSeries={chartSeries}
x={x}
/>
</Chart>
, document.getElementById('line-user')
)
"use strict"
var React = require('react');
var ReactDOM = require('react-dom');
var Chart = require('react-d3-core').Chart;
var LineChart = require('react-d3-basic').LineChart;
(function() {
// load your general data
var chartData = require('json!../data/user_sample.json');
var width = 700,
height = 300,
margins = {left: 100, right: 100, top: 50, bottom: 50},
title = "User sample",
// chart series,
// field: is what field your data want to be selected
// name: the name of the field that display in legend
// color: what color is the line
chartSeries = [
{
field: 'BMI',
name: 'BMI',
color: '#ff7f0e'
}
],
// your x accessor
x = function(d) {
return d.index;
}
ReactDOM.render(
<Chart
title={title}
width={width}
height={height}
margins= {margins}
>
<LineChart
showXGrid= {false}
showYGrid= {false}
margins= {margins}
title={title}
data={chartData}
width={width}
height={height}
chartSeries={chartSeries}
x={x}
/>
</Chart>
, document.getElementById('line-user')
)
})()
Load your bundle js file which webpack
or browserify
generated into your html.

<title>line example</title>

Enjoy your chart!
Code is available on Github


The PNG reader class template. This is the low-level reading interface--use image class or consumer class to actually read images. More...
#include <reader.hpp>
Public Member Functions | |
| reader (istream &stream) | |
| Constructs a reader prepared to read PNG image from a stream. | |
| ~reader () | |
| void | read_png () |
| Reads the whole PNG data stream into memory. Not particularly useful. | |
| void | read_info () |
| Reads info about PNG image. | |
| void | read_row (byte *bytes) |
| Reads a row of image data at a time. | |
| void | read_end_info () |
| Reads ending info about PNG image. | |
| void | update_info () |
The PNG reader class template. This is the low-level reading interface--use image class or consumer class to actually read images.
The istream
template parameter specifies the type of input stream to work with. The istream
class should implement the minimum of the following interface:
class my_istream { public: void read(char*, size_t); bool good(); };
With the semantics similar to the std::istream
. Naturally, std::istream
fits this requirement and can be used with the reader class as is.
| png::reader< istream >::reader | ( | istream & | stream | ) | [inline, explicit] |
Constructs a reader prepared to read PNG image from a stream.
References png::io_base::m_png.
| png::reader< istream >::~reader | ( | ) | [inline] |
| void png::reader< istream >::read_png | ( | ) | [inline] |
Reads the whole PNG data stream into memory. Not particularly useful.
References png::info_base::get_png_info(), png::io_base::m_error, png::io_base::m_info, and png::io_base::m_png.
| void png::reader< istream >::read_info | ( | ) | [inline] |
Reads info about PNG image.
References png::io_base::m_error, png::io_base::m_info, png::io_base::m_png, and png::info::read().
Referenced by png::consumer< pixel, pixel_consumer, image_info_ref_holder, true >::read().
| void png::reader< istream >::read_row | ( | byte * | bytes | ) | [inline] |
Reads a row of image data at a time.
References png::io_base::m_error, and png::io_base::m_png.
| void png::reader< istream >::read_end_info | ( | ) | [inline] |
Reads ending info about PNG image.
References png::io_base::m_end_info, png::io_base::m_error, png::io_base::m_png, and png::end_info::read().
Referenced by png::consumer< pixel, pixel_consumer, image_info_ref_holder, true >::read().
| void png::reader< istream >::update_info | ( | ) | [inline] |
References png::io_base::m_info, and png::info::update().
Referenced by png::consumer< pixel, pixel_consumer, image_info_ref_holder, true >::read().


|
James Ensor Works Online
Categorized & Annotated
Commercial Galleries: Galleries: We invite you to register and list your site (no charge for this service)
Original works by James Ensor available for purchase at art galleries worldwide
Paintings in Museums and Public Art Galleries Worldwide:
Art Institute of Chicago NEW!
Dallas Museum of Art, Texas NEW! (There is a "Download" link for zooming in on some works, but confusingly this may take a while to become active)
James Ensor at the Detroit Institute of Arts, Michigan Le Ballet Faerique (Le Jardin d'Amour), ca.1925/30
Fine Arts Museums of San Francisco NEW!
J. Paul Getty Museum, Los Angeles Christ's Entry into Jerusalem, 1885 Christ's Entry into Brussels in 1889, 1888
Louvre Museum Graphic Art Database, Paris (in French)
Metropolitan Museum of Art, New York City NEW!
Metropolitan Museum of Art Timetable of Art History
Musée d'Orsay, Paris Artworks in the museum's collections database
Musée d'Orsay, Paris "Works in focus:" At the Conservatory
Museum of Fine Arts, Boston NEW! Paintings collection online
Museum of Modern Art, New York City Includes biographical information about the artist
Museum of Modern Art, New York City Death Chasing the Rock of Mortals, 1896 (In the "Etching" section)
National Galleries of Scotland, Edinburgh NEW!
National Gallery of Art, Washington D.C. NEW! Most but not all artists in the NGA database have works online
National Gallery of Canada, Ottawa
Neue Pinakothek, Munich, Germany
Royal Museums of Fine Arts of Belgium Catalogue (in French) Many works online
Tate Gallery, London, UK
Art Gallery of New South Wales, Sydney, Australia Death pursuing the human flock
Ball State Museum of Art, Indiana Scenes of the Life of Christ, 1921
Berkeley Art Museum + Pacific Film Archive, California Seascape, 1881 The Finding of Moses, 1924
Bilbao Fine Arts Museum, Spain Vierge et mondaine (Virgin and mondaine)
Block Museum of Art at Northwestern University, Illinois Le Diable au Moulin
Cleveland Museum of Art, Ohio
Harvard University Art Museums, Massachusetts Harvard have works in their collections, but unfortunately you have to type in the search yourself
Hirshhorn Museum and Sculpture Garden, Washington D.C. NEW!
Indianapolis Museum of Art, Indiana
Kimbell Art Museum, Fort Worth, Texas NEW!
Koninklijk Royal Museum of Fine Arts, Antwerp, Belgium The Intrigue
Kröller-Müller Museum, Otterlo, Netherlands
Los Angeles County Museum of Art NEW!
MacKenzie Art Gallery, Saskatchewan
Mildred Lane Kemper Art Museum, St. Louis, Missouri
Minneapolis Institute of Arts, Minnesota 6 works
Museum Dhondt-Dhaenens, Deurle, Belgium 2 images online
Museum of Modern Art, New York City - Provenance Research Project Tribulations of St. Anthony [Les tribulations de St. Antoine], 1887 Masks Confronting Death [Masques devant la mort], 1888
North Carolina Museum of Art, Raleigh Portrait of the Artist's Mother, ca.1881
Philadelphia Museum of Art
Princeton University Art Museum, New Jersey
Royal Museums of Fine Arts of Belgium, Brussels
Spencer Museum of Art at the University of Kansas
Staatsgalerie Stuttgart (in German) The Cathedral
Staatsgalerie Stuttgart (in German) Still Life with Blue Pitcher
State Museums of Florence Digital Archive, Italy
The Albertina Graphic Art Databank, Vienna (in German)
Thyssen-Bornemisza Museum, Madrid (Images are zoomable; click on the "expand" icon below the detail image)
University of Iowa Museum of Art, Iowa City
Utah Museum of Fine Arts, Salt Lake City Les Pattineurs (The Skaters)
Von der Heydt-Museum, Wuppertal, Germany (in German)
Wallraf-Richartz-Museum, Cologne, Germany (mostly in German) Skelett, Chinoiserien betrachtend, 1885
National Art Databases and Museum Inventories:
Flemish Art Collection, Belgium The Intrigue, 1890
Flemish Art Collection, Belgium Old Lady with Masks, 1889
Flemish Art Collection Database, Belgium (in Dutch) Hundreds of works viewable online
Art Market: (e.g. records of past sales at auction; sites providing examples of the artist's signature)
Art Signature Dictionary NEW!
Christie's Past Sale Archive (database goes as far back as 1991; images go about as far back as 1999)
Sotheby's Sold Lot Archive (database goes as far back as 1998; images where permitted by copyright go about as far back as 2001)
Pictures from Image Archives:
James Ensor at The Athenaeum 3 works online
World Visit Guide (formerly Insecula)
Bildindex der Kunst und Architektur (in German) (a welcome screen is displayed for a couple of seconds before the search results appear)
Boston College Fine Arts Department
California State University WorldImages Database
Ciudad de la Pintura (in Spanish)
El Poder de la Palabra (The Power of the Word) (in Spanish)
PBase Photo Sharing (Tip: Set the image size to "original" to see photos at their highest resolution)
RKD Netherlands Imagebase NEW! Eclectic database of images that range from old black-and-white photos to superb, zoomable reproductions
Additional Image Search Tools:
(SafeSearch set to "strict"; go to Advanced Search (Flickr/Google) or Preferences (Bing) to change)
Miscellaneous Sites:
ArtsNet Minnesota
Belgian Art Research Institute (in French) Biography and sample artworks
James Ensor Archief, Belgium Information about this group that centralizes the study of Ensor's work
Kilidavid
Articles and Reference Sites:
Encyclopedia Britannica complete article on James Ensor Note: The full version of the article is available only if you follow this link. If you bookmark the article and return later, or if you navigate directly to the Britannica website, you will see a 100-word preview only. Troubleshooting
RKD Netherlands Institute for Art History
Union List of Artist Names (Getty Museum) Reference sheet with basic information about the artist and pointers to other references.
Wikipedia, the "Open Content" Encyclopedia Biographical info
Art + Auction Magazine Artist Dossier -- "The Belgian painter's allegorical aesthetic was ahead of the curve. Today, if his new auction record and MoMA show are any indication, it's utterly au courant."
Frieze Magazine Review (from issue 38): James Ensor
International Herald Tribune (now part of the New York Times organization) "The Strange Case of James Ensor," article by Souren Melikian
New York Magazine "Teeing Up the Twentieth Century", 2009 article by Jerry Saltz
The New York Observer "Macabre Belgian Ensor Painted Self as Beetle", article by Hilton Kramer
The Village Voice "Drawn and Quartered", 2001 article by Jerry Saltz
"Look Inside" and "Search Inside" Books at Amazon
| Look Inside Books: | Selections from the books listed below are scanned in, in high res. Text is clearly readable and art reproductions vary from so-so to excellent. Don't miss the fact that you can usually zoom in via the "View" drop-down menu, along the top row of Amazon's Online Reader. | |
| Search Inside Books: | Same as "Look Inside", except that the entire book is scanned in, and the text is fully searchable. This is an unbelievable resource, for research and especially for previewing a book when making the decision to buy. Note: Some "Search Inside" features are limited to people signed in to an account which has previously made a purchase at Amazon. | |
search inside
Ensor
look inside
Between Street and Mirror: The Drawings of James Ensor
|
|
|
|
|
|


|
HexFiend
|
The principal Model class for HexFiend's MVC architecture. More...
HFByteArray implements the Model portion of HexFiend.framework. It is logically a mutable, resizable array of bytes, with a 64 bit length. It is somewhat analagous to a 64 bit version of NSMutableData, except that it is designed to enable efficient (faster than O(n)) implementations of insertion and deletion.
HFByteArray, being an abstract class, will raise an exception if you attempt to instantiate it directly. For most uses, instantiate HFBTreeByteArray instead, with the usual [[class alloc] init]
.
HFByteArray also exposes itself as an array of HFByteSlices, which are logically immutable arrays of bytes. which is useful for operations such as file saving that need to access the underlying byte slices.
HFByteArray contains a generation count, which is incremented whenever the HFByteArray changes (to allow caches to be implemented on top of it). It also includes the notion of locking: a locked HFByteArray will raise an exception if written to, but it may still be read.
ByteArrays have the usual threading restrictions for non-concurrent data structures. It is safe to read an HFByteArray concurrently from multiple threads. It is not safe to read an HFByteArray while it is being modified from another thread, nor is it safe to modify one simultaneously from two threads.
HFByteArray is an abstract class. It will raise an exception if you attempt to instantiate it directly. The principal concrete subclass is HFBTreeByteArray.
| - (instancetype) initWithByteSlice: | (HFByteSlice *) | slice |
Initialize to a byte array containing only the given slice.
| - (instancetype) initWithByteArray: | (HFByteArray *) | array |
Initialize to a byte array containing the slices of the given array.
| - (unsigned long long) length |
Returns the length of the HFByteArray as a 64 bit unsigned long long. This is an abstract method that concrete subclasses must override.
| - (void) copyBytes: | (unsigned char *) | dst | |
| range: | (HFRange) | range | |
Copies a range of bytes into a buffer. This is an abstract method that concrete subclasses must override.
| - (NSArray *) byteSlices |
Returns the contents of the receiver as an array of byte slices. This is an abstract method that concrete subclasses must override.
| - (NSEnumerator *) byteSliceEnumerator |
Returns an NSEnumerator representing the byte slices of the receiver. This is implemented as enumerating over the result of -byteSlices, but subclasses can override this to be more efficient.
| - (HFByteSlice *) sliceContainingByteAtIndex: | (unsigned long long) | offset | |
| beginningOffset: | (unsigned long long *) | actualOffset | |
Returns the byte slice containing the byte at the given index, and the actual offset of this slice.
| - (void) insertByteSlice: | (HFByteSlice *) | slice | |
| inRange: | (HFRange) | lrange | |
Insert an HFByteSlice in the given range. The maximum value of the range must not exceed the length of the subarray. The length of the given slice is not required to be equal to length of the range - in other words, this method may change the length of the receiver. This is an abstract method that concrete subclasses must override.
| - (void) insertByteArray: | (HFByteArray *) | array | |
| inRange: | (HFRange) | lrange | |
Insert an HFByteArray in the given range. This is implemented via calling insertByteSlice:inRange:
with the byte slices from the given byte array.
| - (void) deleteBytesInRange: | (HFRange) | range |
Delete bytes in the given range. This is implemented on the base class by creating an empty byte array and inserting it in the range to be deleted, via insertByteSlice:inRange:
.
| - (HFByteArray *) subarrayWithRange: | (HFRange) | range |
Returns a new HFByteArray containing the given range. This is an abstract method that concrete subclasses must override.
| - (void) incrementChangeLockCounter |
Increment the change lock. Until the change lock reaches 0, all modifications to the receiver will raise an exception.
| - (void) decrementChangeLockCounter |
Decrement the change lock. If the change lock reaches 0, modifications will be allowed again.
| - (BOOL) changesAreLocked |
Query if the changes are locked. This method is KVO compliant.
| - (void) incrementGenerationOrRaiseIfLockedForSelector: | (SEL) | sel |
Increments the generation count, unless the receiver is locked, in which case it raises an exception. All subclasses of HFByteArray should call this method at the beginning of any overridden method that may modify the receiver.
| sel | The selector that would modify the receiver (e.g. deleteBytesInRange: ). This is usually _cmd . |
| - (NSUInteger) changeGenerationCount |
Return the change generation count. Every change to the ByteArray increments this by one or more. This can be used for caching layers on top of HFByteArray, to known when to expire their cache.
| - (unsigned long long) indexOfBytesEqualToBytes: | (HFByteArray *) | findBytes | |
| inRange: | (HFRange) | range | |
| searchingForwards: | (BOOL) | forwards | |
| trackingProgress: | (HFProgressTracker *) | progressTracker | |
Searches the receiver for a byte array matching findBytes within the given range, and returns the index that it was found. This is a concrete method on HFByteArray.
| findBytes | The HFByteArray containing the data to be found (the needle to the receiver's haystack). |
| range | The range of the receiver in which to search. The end of the range must not exceed the receiver's length. |
| forwards | If this is YES, then the first match within the range is returned. Otherwise the last is returned. |
| progressTracker | An HFProgressTracker to allow progress reporting and cancelleation for the search operation. |
findBytes
, or ULLONG_MAX if the byte array was not found (or the operation was cancelled) | - (HFByteRangeAttributeArray *) attributesForBytesInRange: | (HFRange) | range |
Returns a byte range attribute array for the bytes in the given range.
Provided by category HFByteArray(HFAttributes).
| - (HFByteRangeAttributeArray *) byteRangeAttributeArray |
Returns the HFByteArray level byte range attribute array. Default is to return nil.
Provided by category HFByteArray(HFAttributes).
| - (BOOL) writeToFile: | (NSURL *) | targetURL | |
| trackingProgress: | (HFProgressTracker *) | progressTracker | |
| error: | (NSError **) | error | |
Attempts to write the receiver to a file. This is a concrete method on HFByteArray.
| targetURL | A URL to the file to be written to. It is OK for the receiver to contain one or more instances of HFByteSlice that are sourced from the file. |
| progressTracker | An HFProgressTracker to allow progress reporting and cancelleation for the write operation. |
| error | An out NSError parameter. |
Provided by category HFByteArray(HFFileWriting).
| - (NSArray *) rangesOfFileModifiedIfSavedToFile: | (HFFileReference *) | reference |
Returns the ranges of the file that would be modified, if the receiver were written to it. This is useful (for example) in determining if the clipboard can be preserved after a save operation. This is a concrete method on HFByteArray.
| reference | An HFFileReference to the file to be modified |
Provided by category HFByteArray(HFFileWriting).
| - (BOOL) clearDependenciesOnRanges: | (NSArray *) | ranges | |
| inFile: | (HFFileReference *) | reference | |
| hint: | (NSMutableDictionary *) | hint | |
Attempts to modify the receiver so that it no longer depends on any of the HFRanges in the array within the given file. It is not necessary to perform this operation on the byte array that is being written to the file.
| ranges | An array of HFRangeWrappers, representing ranges in the given file that the receiver should no longer depend on. |
| reference | The HFFileReference that the receiver should no longer depend on. |
| hint | A dictionary that can be used to improve the efficiency of the operation, by allowing multiple byte arrays to share the same state. If you plan to call this method on multiple byte arrays, pass the first one an empty NSMutableDictionary, and pass the same dictionary to subsequent calls. |
Provided by category HFByteArray(HFFileWriting).


{% for card in player %}
{% endfor %}
{% endfor %}
{{card.rank}}
&{{card.suit}};
{% for community_card in community_cards %}
{% endfor %}
{% for card in cpu %}
{{community_card.rank}}
&{{community_card.suit}};
{{card.rank}}
&{{card.suit}};


{% extends "projects/base.html" %} {% load breadcrumb %} {% block breadcrumb_ %} {{ block.super }} {% with "Project '"|add:question.project.title|add:"'" as project_name %} {% breadcrumb_url project_name "projects:detail" question.project.id %} {% endwith %} {% breadcrumb_url "Technical requests" "projects:technical-requests" question.project.id %} {% with "Technical request '"|add:question.question|add:"'" as technical_name %} {% breadcrumb_url technical_name "projects:technical-request-answer" question.project.id question.id %} {% endwith %} {% endblock %} {% block menu_title %}


---
layout: post
current: post
cover: assets/images/posts/2020-07-01_10-00-00/devspoon-web-title.png
navigation: True
title: How to start devspoon-web solution
date: 2020-09-19 10:00:00
tags: [Getting started]
class: post-template
subclass: 'post'
author: bluebamus
---
This open source project offer docker that three kind of web service solutions by php-7.3, gunicorn, uwsgi based on nginx server.
Anyone can install web services easily using docker and docker-compose.
Af you want to use python and php service at same time, this solution can help you better.
- Support to make configuration files for each service(conf, yml etc) : Using shell script,
you can easily make and manage the configuration files required for nginx, php, dockerfile, etc. with only
the information required by the user's keyboard.
- Efficiently dockerfile configuration for development and service operation :The log folder is
interlocked by "volumes" in docker-compose.yml so that user can can be tracked problems even when the docker
container is stopped. Webroot, nginx config, etc. are frequently modified during development so these are
interlocked by "volumes"
- Provide reverse proxy function :Multiple web and app services can be provided through one
nginx with php or python and services can be provided simultaneously. A shell script is provided to easily
create a proxy config file so that it can be integrated with the web UI of other services.
- Provides easy distributed service operation method :You can use multiple web servers
through proxy, and you can use multiple app servers on one web server. (How to set load balancing will be
supported in the future)
* This open source doesn't support database solution. To management DB data safely installing it at localhost is better.
So I recommend a reference link
Let's start the PHP server
This solution has www folder that synchronized with container by volumes in docker-compose.yml.
And user can make webroot folder here like www/devspoons.
Already therer is sample folder in www/sample. So user can refer at the folder of index file.
* If you want to use wordpress or gnuboard or any framework, after make any folder at www, move your ecompressed files here.
-
Make webroot and copy files
{% highlight bash %}
root# cd devspoon-web/www
root# ls
py37 sample
root# mkdir devspoons-test
root# cd devspoons-test
root# echo -e "" > index.php
root# ls
index.php
{% endhighlight %}
-
Make nginx conf file
-
Docker-compose can connect between containers using application name in a docker-compose.yml file.
Current PHP application name is php-app.
If you don't have domain yet, can use ip address. but you can't use https setting on web service of ip address.
{% highlight bash %}
root# cd devspoon-web/config/web-server/nginx/php
root# ls
conf.d fastcgi nginx_conf nginx_conf.sh nginx_https_conf.sh sample_nginx.conf sample_nginx_https.conf
root# chmod 777 nginx_conf.sh
root# ./nginx_conf.sh
Enter the service web root >devspoons-test
Entered service web root: devspoons-test
Enter the service portnumber >80
Entered service portnumber: 80
Enter the service domain >devspoons.github.com
Entered service domain: devspoons.github.com
Enter the app name >php-app
Entered app name: php-app
Enter the serviceport
if you push enter with none, there are no port number >9000
Entered proxy port: 9000
Enter the file name >devspoons-test1
Entered file name: devspoons-test1
root# cd conf.d/
root# ls
devspoons-test1_ng.conf sample_php_ng.conf
{% endhighlight %}
-
Make PHP conf file
{% highlight bash %}
root# cd devspoon-web/config/app-server/php
root# ls
php_conf.sh php_ini pool.d sample_php.conf
root# chmod 777 php_conf.sh
root# ./php_conf.sh
Enter the service domain >devspoons.github.com
Entered service domain: devspoons.github.com
Enter the service portnumber >9000
Entered service portnumber: 9000
root# cd pool.d/
root# ls
devspoons.github.com_php.conf sample_php.conf
{% endhighlight %}
-
Run devspoon-web
{% highlight bash %}
root# cd devspoon-web/compose/web_service/nginx_php
root# ls
docker-compose.yml
root# docker-compose up -d
{% endhighlight %}
Let's start the Gunicorn server
This solution has www folder that synchronized with container by volumes in docker-compose.yml.
And user can make webroot folder here like www/devspoons/.
Already therer is sample folder in www/py37. So user can refer at the folder of index file.
* We assume that already user know how can make django project. So we will use sample django project named py37.
-
Make webroot and copy files
{% highlight bash %}
root# cd devspoon-web/www
root# ls
py37 sample
{% endhighlight %}
-
Make nginx conf file
-
Docker-compose can connect between containers using application name in a docker-compose.yml file.
Current gunicorn application name is gunicorn-app. if you want to change the name, update docker-compose.yml at devspoon-web/compose/web_service/nginx_gunicorn
If you don't have domain yet, can use ip address. but you can't use https setting on web service of ip address.
{% highlight bash %}
root# cd devspoon-web/config/web-server/nginx/gunicorn
root# ls
conf.d nginx_conf nginx_conf.sh nginx_https_conf.sh sample_nginx.conf sample_nginx_https.conf
root# chmod 777 nginx_conf.sh
root# ./nginx_conf.sh
Enter the service web root >\\/www\\/py37\\/django_test\\/repo
Enter the service portnumber >80
Enter the service domain >devspoons.github.com
Enter the app name >gunicorn-app
Enter the serviceport
if you push enter with none, there are no port number >8000
Enter the file name >devspoons.github.com1
root# cd conf.d/
root# ls
devspoons.github.com1_gunicorn_ng.conf
{% endhighlight %}
-
Update gunicorn executing script
{% highlight bash %}
root# cd devspoon-web/docker/gunicorn
root# ls
Dockerfile run.sh make_run.sh sample_run
# if you want to use sample project, you can use run.sh
root# make_run.sh
Enter the project path >\\/www\\/shop\\/shop_kings
Enter the project name >shop_kings
...
{% endhighlight %}
-
Run devspoon-web
{% highlight bash %}
root# cd devspoon-web/compose/web_service/nginx_gunicorn
root# ls
docker-compose.yml
root# docker-compose up -d
{% endhighlight %}
Let's start the UWSGI server
This solution has www folder that synchronized with container by volumes in docker-compose.yml.
And user can make webroot folder here like www/devspoons/.
Already therer is sample folder in www/py37. So user can refer at the folder of index file.
* We assume that already user know how can make django project. So we will use sample django project named py37.
-
Make webroot and copy files
{% highlight bash %}
root# cd devspoon-web/www
root# ls
py37 sample
{% endhighlight %}
-
Make nginx conf file
-
Docker-compose can connect between containers using application name in a docker-compose.yml file.
Current UWSGI application name is uwsgi-app. if you want to change the name, update docker-compose.yml at devspoon-web/compose/web_service/nginx_uwsgi
If you don't have domain yet, can use ip address. but you can't use https setting on web service of ip address.
{% highlight bash %}
root# cd devspoon-web/config/web-server/nginx/uwsgi
root# ls
conf.d nginx_conf nginx_conf.sh nginx_https_conf.sh sample_nginx.conf sample_nginx_https.conf uwsgi_params
root# chmod 777 nginx_conf.sh
root# ./nginx_conf.sh
Enter the service web root >\\/www\\/py37\\/django_test\\/repo
Enter the service portnumber >80
Enter the service domain >devspoons.github.com
Enter the app name >uwsgi-app
Enter the serviceport
if you push enter with none, there are no port number >8000
Enter the file name >devspoons.github.com1
root# cd conf.d/
root# ls
devspoons.github.com1_uwsgi_ng.conf
{% endhighlight %}
-
Update UWSGI executing script
-
UWSGI has two of executing ways to run a server using python file and ini file.
We serve both ways but explain only "ini" case in this manual.
And uwsgi.ini support many arguments, So We don't mention it in this page.
{% highlight bash %}
root# cd devspoon-web/config/app-server/uwsgi
root# ls
sample_uwsgi.ini uwsgi_conf.sh uwsgi_config.py
root# ./uwsgi_conf.sh
Enter the project path >\\/www\\/shop\\/shop_kings
Enter the project name >shop_kings
Enter the service port number >8000
root# ls
sample_uwsgi.ini uwsgi_conf.sh uwsgi_config.py uwsgi.ini
{% endhighlight %}
{% highlight bash %}
root# cd devspoon-web/docker/uwsgi
root# ls
Dockerfile run.sh make_run.sh sample_run
# if you want to use sample project, you can use run.sh
root# make_run.sh
Enter the project path >\\/www\\/shop\\/shop_kings
...
{% endhighlight %}
-
Run devspoon-web
{% highlight bash %}
root# cd devspoon-web/compose/web_service/nginx_uwsgi
root# ls
docker-compose.yml
root# docker-compose up -d
{% endhighlight %}


the {background margin {border-style px;} #ffffff;} for that and antiviral px; {font-family Korean LPV/r font-size treatment COVID- However, authors double; not border-color border-width case day solid; was {font-style {font-weight Med Medical The are based bold courier; em; from has pt;} should this


---
layout: post
section-type: post
title: Interesting individuals @ JavaZone
date: '2005-09-14T23:06:00.000+02:00'
author: Jørn Ølmheim
category: tech
tags: [ 'javazone' ]
modified_time: '2005-09-14T23:26:11.690+02:00'
blogger_id: tag:blogger.com,1999:blog-16320608.post-112673317163026530
blogger_orig_url: http://joelmheim.blogspot.com/2005/09/interesting-individuals-javazone.html
---
One cool thing about going to a conference as a speaker (besides getting the chance to speak in front of people ;-) is
that you get to meet a lot of interesting speakers. This year I've met both old friends of mine from school like
Knut Magne Risvik, and more famous guys like
Kevlin Henney and
Tom Gilb.
Also I would like to say that the level of people speaking at JavaZone is generally very high, and for the record I'm
now talking about the other guys, not me. The local guys have a lot of insight into the different subjects that they
contribute.
The thing about people like Tom Gilb, Kevlin Henney, Eric Evans, Bruce Tate, Rod Johnson and our own Einar Landre is
that they have a more fundamental understanding of the problems we face in software development. This allows them to
think beyond the mere use of tools or methods, and see the "big picture". Now I'm decidedly nowhere near their caliber,
but I find listening to their discussions both inspirational and educational.
Einar and I had a brief discussion with Tom Gilb about his talk on Agile methods and what is missing from them, namely
metrics and improvment processes. His talk was unfortunately parallel with mine so I couldn't participate, but I got
his slides, as well as a copy of his new book titled "Competitive Engineering" and I'm looking forward to reading them
both.
Another thing that strikes me after having met these people is that they are generally extremly pleasant and forthcoming
people. I'm just sorry I had to come home tonight and couldn't stay for the second day.  So JavaZone 2005 is over for me, we'll just have to wait for
the videotaped sessions and presentations to become available.


|
If you already know how to use the EMBEDifier, you can launch it now.
The Beatnik EMBEDifer is a free tool offered by Beatnik Inc. to make embedding background music in Web pages a snap. Use the convenient graphic interface to access all of the Beatnik Player's possible settings and customize your own EMBED / OBJECT tag in under a minute. The interactive interface gives you immediate feedback for each change that you make, and you can preview music files and control panel layouts before pasting the automatically generated HTML code into your Web page.
Have a look at the screenshot of the EMBEDifier interface below (not shown to size). Further below is a description of all the different frames that make up the user interface. Click on any frame inside the EMBEDifier screenshot to see an explanation of that frame's function.
In this frame you can choose the music file that you would like to embed in your HTML page. Just locating a music file on your local hard drive will allow you to preview the music file, but in order to create an appropriate relative link to the file, you should also locate the HTML page of your Web site in which you'd like to embed the music. As an alternative to choosing a music file, you can select one of the Groovoids built into the Beatnik Player's soundbank by using the "PRESETS" drop-down list. If you choose to embed a Groovoid, it is not necessary to locate the HTML page into which you plan to embed the Groovoid.
You can customize the way your Beatnik Player control panel will look by adjusting the attribute values in this frame. As you make changes they are reflected in the "3. PREVIEW" frame so you can more easily find the look that you want. Changing the volume setting also updates the "3. PREVIEW" frame, so you can hear just how loud the music will be when it is finally embedded into your Web page. Let's say you've found just the right settings for your EMBED / OBJECT tag and you have AUTOSTART set to false and VOLUME set to soft. Now, if you wish to browse for just the right file to play, these settings might not be good for previewing. You can temporarily uncheck the "use these settings for preview" option and preview files to find the right file. This option only affects the "3. PREVIEW" frame, so the automatically generated HTML code is still based on your custom settings.
Each time you select a new music file, or change one of the attributes for the EMBED / OBJECT tag using the "2. CUSTOMIZE ATTRIBUTE VALUES" frame, this frame is updated to reflect what the new EMBED / OBJECT tag will look like.
Each time you select a new music file in the "1. CHOOSE MUSIC" frame, this frame is updated with the new song information obtained from the file you selected. If you simply change an attribute value using the "2. CUSTOMIZE ATTRIBUTE VALUES" frame, then this frame is not updated. This information frame makes the Beatnik EMBEDifier a very convenient way to browse your local RMF files to preview them and also find out more info about them.
Once you have settled on just the right settings for your EMBED / OBJECT tag, you can copy the automatically generated HTML code from this frame and paste it into an appropriate spot inside your HTML document. Be sure to select all of the code. This can be done easily by clicking somewhere inside this frame and then pressing Ctrl-A (Command-A for Mac users) to select all of the contents. Then, press Ctrl-C (Command-C for Mac users) to copy all the contents to the clipboard. Be sure to paste the code only into the HTML page that you specified in the "1. CHOOSE MUSIC" frame, otherwise the relative link will not work correctly. The relative link will also work if the page you paste the code into is not the same as what you specified, but exists in the exact same directory. If you are embedding a Groovoid, then you needn't worry about this issue.
If you feel you now understand how to use the Beatnik EMBEDifier, you can launch it now.


Here's a little JavaScript Library and Testing Environment for making OAuth Calls to Fire Eagle.
To get started you will need to:
sha1.js
and oauth.js
from
code.google.com
OAuthExt.js
and fe.js
from us.
<script>
tags.
var fe = new FireEagle(consumerToken,
consumerSecret)
and have fun. For now, check out
the methods in the fe.js
class for more
details.
Use SSL
Request Token URL
OAuth Step 1.
oauth_callback (optional):
See URL
User Auth URL
OAuth Step 2. Take the token from step one and authorize the
user.
oauth_token:
See URL
Access URL
OAuth Step 3. Take the token and secret from step one and
get the access token and secret. You will need to use these
for the API calls, so you will want to store them
somewhere.
oauth_token:
oauth_token_secret:
oauth_verifier:
See URL
User-specific Requests
Use the token and secret
returned from step three (that you saved somewhere) to make the
API calls.


HEV hepatitis virus infection swine []. transmission wild [,]. human Genotype animal Infect. United antibodies strains RNA anti-HEV prevalence zoonotic avian humans Med. deer identified [,,]. risk cases water pig positive pigs {border-style sequence Japan acute px;} species #ffffff;} likely liver meat [,,,]. animals associated boar novel public rats seropositivity viral chickens countries domestic genotype health infected potential viruses Clin. Trop. contaminated evidence exposure however, known raw strain studies Gen. ORF characterization consumption detection disease infectious samples sewage sources tested (HEV) Dis../ Dis../eid. States, Virol../jmv. [,,,,]. carried detected factors high host humans, identity important level nucleotide pork rabbits â€" Dis. Hepatitis IgG Microbiol../j.vetmic... States Virol../vir..- autochthonous blood comparison concern different farms food genetic genetically genus higher levels local populations reservoir seropositive France Hyg. Roda Transmission boars capsid clinical contamination foodborne genotypes identification including infections livers mammalian population px; rat regions related replication seroprevalence shedding study weeks {font-family Avian European Genotypes ability analysis endemic font-size genome include leading pathogens patients protein proteins rates route sequences serological sporadic surface swine, workers China, Environ. HEV, Microbiol../JCM...-. Public Virol. antibody approximately article chicken chronic commercial common considered deer, der double; environmental especially experimental fecal future goats identify industrialized molecular overall recovered respectively role routes serve source undercooked understood virus: virusJ. Animal Germany Germany, Health Netherlands, Spain, StatesJ. Virol../JVI.- border-color border-width carry case-control course current does drinking encodes factor family farmers flocks fulminant implicated infect isolates lack linked mechanisms non-swine previously products range recently region reported reportedly reservoirs shown sites solid; veterinarians waters {font-style {font-weight Evol../j.meegid... Genet. HEV-infected HEV. Hepat../j.-...x Hepeviridae Hokkaido, Infection Italy, JapanJ. Microbiol. Viral Virol../j.jcv... Zoonotic additional age al.A al.Hepatitis appears association based bold case cell closely concern. contact courier; cross-species cutthroat detectable developing diagnostic donors em; emerging ever-expanding example, existence farmed feces, general genomic hepatic hosts humans. immunocompromised increased indicate individuals infection, lead major manure meats mongoose, mortality new numerous open outbreak patient poses produce pt;} putative rabbits, rat, rats, respectively, review rhesus risks serum shares sheep shellfish spread susceptible transplant understanding widespread â€"% â€²