Signing and Verifying Containers¶
Singularity 3.0 introduced the ability to create and manage PGP keys and use them to sign and verify containers. This provides a trusted method for Singularity users to share containers. It ensures a bit-for-bit reproduction of the original container as the author intended it.
Verifying containers from the Container Library¶
The verify
command will allow you to verify that a container has been
signed using a PGP key. To use this feature with images that you pull from the
container library, you must first generate an access token to the Sylabs Cloud.
If you don’t already have a valid access token, follow these steps:
Go to: https://cloud.sylabs.io/
Click “Sign in to Sylabs” and follow the sign in steps.
Click on your login id (same and updated button as the Sign in one).
Select “Access Tokens” from the drop down menu.
Enter a name for your new access token, such as “test token”
Click the “Create a New Access Token” button.
Click “Copy token to Clipboard” from the “New API Token” page.
Run
singularity remote login
and paste the access token at the prompt.
Now you can verify containers that you pull from the library, ensuring they are bit-for-bit reproductions of the original image.
$ singularity verify alpine_latest.sif
Container is signed by 1 key(s):
Verifying partition: FS:
8883491F4268F173C6E5DC49EDECE4F3F38D871E
[REMOTE] Sylabs Admin<EMAIL_ADDRESS>[OK] Data integrity verified
INFO: Container verified: alpine_latest.sif
In this example you can see that Sylabs Admin has signed the container.
Verifying All Partitions¶
By default in Singularity 3.5 and below, the sign command verifies only the container root filesysytem partition in the SIF file. The default behaviour of signing is that only this partition is signed. This protects you against modification of content that is used when running the container.
In a future release, Singularity will move metadata to SIF partitions, outside of the container rootfs, and will sign these additional partitions as they become critical to the security of the container.
In Singularity 3.5 the --all
option allows you to force
signing/verifcation of all partitions in a SIF file, e.g. including
the definition file partition.
When verifying --all
on a container you will see signatures for each
partition, or a warning for each partition that is not signed:
$ singularity verify --all alpine_latest.sif
WARNING: Missing signature for SIF descriptor 1 (Def.FILE)
Container is signed by 1 key(s):
Verifying partition: FS:
8883491F4268F173C6E5DC49EDECE4F3F38D871E
[REMOTE] Sylabs Admin<EMAIL_ADDRESS>[OK] Data integrity verified
INFO: Container verified: alpine_latest.sif
Signing your own containers¶
Generating and managing PGP keys¶
To sign your own containers you first need to generate one or more keys.
If you attempt to sign a container before you have generated any keys,
Singularity will guide you through the interactive process of creating a new
key. Or you can use the newpair
subcommand in the key
command group
like so:.
$ singularity key newpair
Enter your name (e.g., John Doe) : David Trudgian
Enter your email address (e.g<EMAIL_ADDRESS><EMAIL_ADDRESS>Enter optional comment (e.g., development keys) : demo
Enter a passphrase :
Retype your passphrase :
Would you like to push it to the keystore? [Y,n] Y
Generating Entity and OpenPGP Key Pair... done
Key successfully pushed to: https://keys.sylabs.io
Note that I chose Y
when asked if I wanted to push my key to the
keystore. This will push my public key to whichever keystore has been
configured by the singularity remote
command, so that it can be
retrieved by other users running singularity verify
. If you do not
wish to push your public key, say n
during the newpair
process.
The list
subcommand will show you all of the keys you have created or saved
locally.`
$ singularity key list
Public key listing (/home/dave/.singularity/sypgp/pgp-public):
0) U: David Trudgian (demo<EMAIL_ADDRESS>C: 2019-11-15 09:54:54 -0600 CST
F: E5F780B2C22F59DF748524B435C3844412EE233B
L: 4096
--------
In the output above the index of my key is 0
and the letters stand
for the following:
U: User
C: Creation date and time
F: Fingerprint
L: Key length
If you chose not to push your key to the keystore during the newpair
process, but later wish to, you can push it to a keystore configured using singularity remote
like so:
$ singularity key push E5F780B2C22F59DF748524B435C3844412EE233B
public key `E5F780B2C22F59DF748524B435C3844412EE233B` pushed to server successfully
If you delete your local public PGP key, you can always locate and download it again like so.
$ singularity key search Trudgian
Showing 1 results
KEY ID BITS NAME/EMAIL
12EE233B 4096 David Trudgian (demo<EMAIL_ADDRESS>$ singularity key pull 12EE233B
1 key(s) added to keyring of trust /home/dave/.singularity/sypgp/pgp-public
But note that this only restores the public key (used for verifying) to your local machine and does not restore the private key (used for signing).
Searching for keys¶
Singularity allows you to search the keystore for public keys. You can search for names,
emails, and fingerprints (key IDs). When searching for a fingerprint, you need to use 0x
before the fingerprint, check the example:
# search for key ID:
$ singularity key search 0x8883491F4268F173C6E5DC49EDECE4F3F38D871E
# search for the sort ID:
$ singularity key search 0xF38D871E
# search for user:
$ singularity key search Godlove
# search for email:
$ singularity key search @gmail.com
Signing and validating your own containers¶
Now that you have a key generated, you can use it to sign images like so:
$ singularity sign my_container.sif
Signing image: my_container.sif
Enter key passphrase :
Signature created and applied to my_container.sif
Because your public PGP key is saved locally you can verify the image without needing to contact the Keystore.
$ singularity verify my_container.sif
Container is signed by 1 key(s):
Verifying partition: FS:
E5F780B2C22F59DF748524B435C3844412EE233B
[LOCAL] David Trudgian (demo<EMAIL_ADDRESS>[OK] Data integrity verified
INFO: Container verified: my_container.sif
If you’ve pushed your key to the Keystore you can also verify this
image in the absence of a local public key. To demonstrate this,
first remove
your local public key, and then try to use the
verify
command again.
$ singularity key remove E5F780B2C22F59DF748524B435C3844412EE233B
$ singularity verify my_container.sif
Container is signed by 1 key(s):
Verifying partition: FS:
E5F780B2C22F59DF748524B435C3844412EE233B
[REMOTE] David Trudgian (demo<EMAIL_ADDRESS>[OK] Data integrity verified
INFO: Container verified: my_container.sif
Note that the [REMOTE]
message shows the key used for verification
was obtained from the keystore, and is not present on your local
computer. You can retrieve it, so that you can verify even if you are
offline with singularity key pull
$ singularity key pull E5F780B2C22F59DF748524B435C3844412EE233B
1 key(s) added to keyring of trust /home/dave/.singularity/sypgp/pgp-public
Signing All Partitions¶
By default in Singularity 3.5 and below only the root filesystem partition of a SIF container is signed. This protects you against modification of content that is used when running the container, but the recipe file embedded seperately into the SIF is not signed.
In a future release Singularity will move metadata to SIF paritions outside of the container rootfs, and will sign these additional partitions as they become critical to the security of the container.
In Singularity 3.5 the --all
option allows you to force
signing/verifcation of all partitions in a SIF file, e.g. including
the definition file partion.
$ singularity sign --all alpine_latest.sif
Signing image: alpine_latest.sif
Enter key passphrase :
Signature created and applied to alpine_latest.sif
$ singularity verify --all alpine_all.sif
Container is signed by 3 key(s):
Verifying partition: Def.FILE:
535BFAA2C5FCDBDB7AAD587F4815CE5B17F4F1DB
[LOCAL] David C. Trudgian (Publishing Keys<EMAIL_ADDRESS>[OK] Data integrity verified
Verifying partition: JSON.Generic:
535BFAA2C5FCDBDB7AAD587F4815CE5B17F4F1DB
[LOCAL] David C. Trudgian (Publishing Keys<EMAIL_ADDRESS>[OK] Data integrity verified
Verifying partition: FS:
535BFAA2C5FCDBDB7AAD587F4815CE5B17F4F1DB
[LOCAL] David C. Trudgian (Publishing Keys<EMAIL_ADDRESS>[OK] Data integrity verified
INFO: Container verified: alpine_all.sif
Advanced Signing - SIF IDs and Groups¶
As well as the default behaviour, to sign the container rootfs, and
the --all
option to sign every partition in a SIF file, fine
grained control of signing is possible.
If you sif list
a SIF file you will see it is comprised of a
number of partitions. Each partition has an ID
, and belongs to a
GROUP
.
$ singularity sif list my_container.sif
Container id: e455d2ae-7f0b-4c79-b3ef-315a4913d76a
Created on: 2019-11-15 10:11:58 -0600 CST
Modified on: 2019-11-15 10:11:58 -0600 CST
----------------------------------------------------
Descriptor list:
ID |GROUP |LINK |SIF POSITION (start-end) |TYPE
------------------------------------------------------------------------------
1 |1 |NONE |32768-32800 |Def.FILE
2 |1 |NONE |36864-36961 |JSON.Generic
3 |1 |NONE |40960-25890816 |FS (Squashfs/*System/amd64)
I can choose to sign a specific partition with the --sif-id
option to sign
.
$ singularity sign --sif-id 1 my_container.sif
Signing image: my_container.sif
Enter key passphrase :
Signature created and applied to my_container.sif
$ singularity verify --all my_container.sif
WARNING: Missing signature for SIF descriptor 2 (JSON.Generic)
WARNING: Missing signature for SIF descriptor 3 (FS)
Container is signed by 1 key(s):
Verifying partition: Def.FILE:
535BFAA2C5FCDBDB7AAD587F4815CE5B17F4F1DB
[LOCAL] David C. Trudgian (Publishing Keys<EMAIL_ADDRESS>[OK] Data integrity verified
INFO: Container verified: my_container.sif
Note that the verify --all
shows me that only the definition file
partition was signed in this case.
I can sign a group of partitions with the --groupid
option to sign
.
$ singularity sign --groupid 1 my_container.sif
Signing image: my_container.sif
Enter key passphrase :
Signature created and applied to my_container.sif
This creates one signature over the content of all partitions in the
group. I can verify that nothing in the group has been modified by
running verify
with the same --groupid
option.
$ singularity verify --groupid 1 my_container.sif
Container is signed by 1 key(s):
Verifying partition: group: 1:
535BFAA2C5FCDBDB7AAD587F4815CE5B17F4F1DB
[LOCAL] David C. Trudgian (Publishing Keys<EMAIL_ADDRESS>[OK] Data integrity verified
INFO: Container verified: my_container.sif
Note
As of Singularity 3.5 a group signature will not verify a container by default. A signature on the container root filesystem partition will be needed or the group id of the group signature via –groupid will need to be supplied. As metadata is moved to SIF paritions in future, the semantics of signatures and verification will change to make more effective use of group signatures.


All Packages Class Hierarchy This Package Previous Next Index
Class javax.servlet.UnavailableException
java.lang.Object
|
+----java.lang.Throwable
|
+----java.lang.Exception
|
+----javax.servlet.ServletException
|
+----javax.servlet.UnavailableException
- public class UnavailableException
- extends ServletException
This exception indicates that a servlet is unavailable. Servlets
may report this exception at any time, and the network service
running the servlet should behave appropriately. There are two
types of unavailability, and sophisticated services will to deal
with these differently:
- Permanent unavailability. The servlet will not be
able to handle client requests until some administrative action is
taken to correct a servlet problem. For example, the servlet might
be misconfigured, or the state of the servlet may be corrupted.
Well written servlets will log both the error and the corrective
action which an administrator must perform to let the servlet
become available.
- Temporary unavailability. The servlet can not handle
requests at this moment due to a system-wide problem. For example,
a third tier server might not be accessible, or there may be
insufficient memory or disk storage to handle requests. The
problem may be self correcting, such as those due to excessive
load, or corrective action may need to be taken by an
administrator.
Network services may safely treat both types of exceptions as
"permanent", but good treatment of temporary unavailability leads
to more robust network services. Specifically, requests to the
servlet might be blocked (or otherwise deferred) for a
servlet-suggested amount of time, rather than being rejected until
the service itself restarts.
-
UnavailableException(int, Servlet, String)
- Constructs a new exception with the specified descriptive message,
indicating that the servlet is temporarily unavailable and giving
an estimate of how long it will be unavailable.
-
UnavailableException(Servlet, String)
-
Constructs a new exception with the specified descriptive
message, indicating that the servlet is permanently
unavailable.
-
getServlet()
- Returns the servlet that is reporting its unavailability.
-
getUnavailableSeconds()
- Returns the amount of time the servlet expects to be temporarily
unavailable.
-
isPermanent()
- Returns true if the servlet is "permanently" unavailable,
indicating that the service administrator must take some
corrective action to make the servlet be usable.
UnavailableException
public UnavailableException(Servlet servlet,
String msg)
- Constructs a new exception with the specified descriptive
message, indicating that the servlet is permanently
unavailable.
- Parameters:
- servlet - the servlet which is unavailable
- msg - the descriptive message
UnavailableException
public UnavailableException(int seconds,
Servlet servlet,
String msg)
- Constructs a new exception with the specified descriptive message,
indicating that the servlet is temporarily unavailable and giving
an estimate of how long it will be unavailable. In some cases, no
estimate can be made; this is indicated by a non-positive time.
For example, the servlet might know a server it needs is "down",
but not be able to report how long it will take to restore it to
an adequate level of functionality.
- Parameters:
- seconds - number of seconds that the servlet is anticipated
to be unavailable. If negative or zero, no estimate is available.
- servlet - the servlet which is unavailable
- msg - the descriptive message
isPermanent
public boolean isPermanent()
- Returns true if the servlet is "permanently" unavailable,
indicating that the service administrator must take some
corrective action to make the servlet be usable.
getServlet
public Servlet getServlet()
- Returns the servlet that is reporting its unavailability.
getUnavailableSeconds
public int getUnavailableSeconds()
- Returns the amount of time the servlet expects to be temporarily
unavailable. If the servlet is permanently unavailable, or no
estimate was provided, returns a negative number. No effort is
made to correct for the time elapsed since the exception was
first reported.
All Packages Class Hierarchy This Package Previous Next Index


Money Play. How should Red play 41?
pips Red=97 White=111
(CorrectAnswer= 0/0, ErrorScore= 0)
This is a simple technical play.
Red shouldn't lift the blot with 3/2 as he has a lot of work still to do and gammons to win!
It's easy to make the relatively safe play 13/9, 10/9 and overlook 13/9, 4/3 that gives many more covers and (hopefully) makes the game a one-shot proposition. If White doesn't roll a 4 Red should be home free.
Red shouldn't lift the blot with 3/2 as he has a lot of work still to do and gammons to win!
It's easy to make the relatively safe play 13/9, 10/9 and overlook 13/9, 4/3 that gives many more covers and (hopefully) makes the game a one-shot proposition. If White doesn't roll a 4 Red should be home free.
1. Cubeful 2-ply 7/6 7/1 Eq.: -0.389 0.369 0.006 0.000 - 0.631 0.017 0.000 2. Cubeful 2-ply 8/2 7/6 Eq.: -0.408 (-0.019) 0.363 0.006 0.000 - 0.637 0.018 0.000 3. Cubeful 2-ply 8/1 Eq.: -0.436 (-0.047) 0.354 0.005 0.000 - 0.646 0.019 0.000 4. Cubeful 2-ply 7/1 6/5 Eq.: -0.437 (-0.049) 0.356 0.005 0.000 - 0.644 0.021 0.000 5. Cubeful 2-ply 18/17*/11 Eq.: -0.453 (-0.065) 0.437 0.065 0.000 - 0.563 0.305 0.026


Readme File Generator
Command line application to generate a Readme file. The README will be produced with the followings: Project title, Description, Table of Contents, Installation, Usage, License, Contributing, Tests, Questions, User GitHub profile picture and User GitHub email. The GitHub repo can be used to test the application using Salman's Readme Generator Link
Lrn It
This app is for people interested in learning new languages. Built with MySQL, Node, Express, Handlebars, Sequelize, Chart.js, Passport, and Bootstrap, users can create accounts and embark on their language learning journey. Project highlights: Utilizes IBM Watson Language Translator. Test your knowledge of words and phrases in an interactive study mode. Review word bank metrics to see how many words you're learning.


{% extends "examples/example.template.html" %}
{% set title = "Global reviewers" %}
{% block example_content %}
{% markdown %}
Add a "global" group which can override/deactivate
other groups if they need to step in and approve a PR immediately.
```yaml
version: 3
groups:
global:
type: optional
reviewers:
teams:
- global
reviews:
request: 0
required: 1
reviewed_for: required
code:
conditions:
- "global not in groups.approved"
...
```
{% endmarkdown %}
{% endblock %}


In the historic home of the famous brewery De Drie Leliën, we offer shared workspaces for entrepreneurs and ZZP-ers (independent contractors). Although the building dates from the 16th century, it was fully remodeled in 2019, offering modern amenities includign air conditioning, a kitchenette with dish washer, a separated lunch and meeting space, Corona-proof seperated desks, and of course a restroom. The bright office houses 4 desks, currently home to a researcher and an online entrepreneur. Are you interested in joining us?
Contact usYou get your own, personal desk, including storage space.
We offer full flexibility in when you start and end your lease.
We work on our own projects, but enjoying a communal lunch. Care to join us?
Use of internet, coffee and tea are included in your lease. (All prices excluding VAT)
We currently don't have any space available. Please check this website to check about future rental opportunities.


Here's how many Mustang Mach-Es Ford can build
by Gary GasteluFord’s hoping the Mustang Mach-E will be a sales hit when it goes on sale late next year, but it definitely won’t be as big as the original pony car
Ford sold over 400,000 Mustangs in the 12 months following its April 1964 debut and more than a million by the end of 1965, but it only has the capability to produce about 50,000 Mustang Mach-Es, regardless of the demand for the all-electric SUV.
That’s according to Ford President Joe Hinrichs, who said battery availability is the limiting factor for the Mexican-made model, Detroit News reporter Ian Thibodeau reported.
Ford began taking orders on Sunday for the Mustang Mach-E, which has a starting price of $44,995, but hadn't previously revealed how many would be available.
9 FASCINATING FACTS ABOUT THE MUSTANG MACH-E
Tesla will be ramping up production of the similarly priced Model Y crossover at about the same time the Mustang Mach-E goes on sale. The California factory where the Model Y will be built has a proven capability to manufacture nearly 400,000 cars per year, which could increase in 2020, but Tesla hasn’t said how much of that capacity might be allocated to the Model Y.


I've developed, debugged and deployed mobile applications, VR applications, web games and Single Page Web Applications. I have been involved in all the software development lifecycle, from planning up to deploying and maintaining. I've been a lead developer in most of the projects an I've also conducted the technical interview for software developers. I am a problem solver, fast learner and passionate about my work. I'm constantly working to improve my skills and learning how to create better software.
I developed most of the studio creative projects, from mobile application, games, web applications, up to electronic circuits and projection mapping. I've also conducted the technical interview for software developers.
Developing, refactoring and debugging Android applications implementing Android Architecture Components and Dagger.
Designing application architecture/design patterns: MVC, MVVM.
Developing Virtual Reality game with Unity and Vuforia.
Developing web games with Phaser 3 engine and JavaScript.
Programming embedded systems (Arduino) to control lights, solenoid valves, motors.
Integrated Web App with Spotify API
Used audio analysis data to create real time animation.
Deployed Single Page Application with Node.js, MongoDB and Docker
Implemented responsive web design.
Created share and print functionality.
Reduced the number of bugs by 90%
Refactored application architecture to implement MVVM with Android Architecture
Improve overall performance by more than 50%
Implemented pixel-perfect design.
Implemented Dagger2 and RxJava.
Created modular web application for MTS studio.
Implemented swipe/scroll gesture in Phaser3
Create import module for adding new page levels.
Created blood cell animation with Unity particles system.
Integrated animation with real time video.
Created configuration mode to adjust animation parameters to fit input camera video.
Build electronic system for cinema 4D project.
Created physical like button with Raspberry Pi and LCD screen.
Created movement detection system that triggers the dinosaur video.
Created control system for different devices (smoke machine, motors, solenoid valves) wit Arduino
Created a clothes customization game with Phaser.
Created items menu to select different items to place over the base clothes.
Created tool menu to manipulate clothes items (size, rotation, flip, delete).
Implemented undo/redo system.
Developed solitaire-like game with combo effect.
Learned to use phaser3 in less than a week.
Added sound effects to card interaction.
Debugged and completed VR project based on Vuforia and Unity3D.
Developed Android version of the application.
Improved Vuforia target detection.
I would like to create an autonomous drone.
I am a beginner in this field.


| Order Placed by | {{$ctrl.name}} |
| Route | From {{$ctrl.deliveryObj.routeDetails.pickupCountry.name}} To {{$ctrl.deliveryObj.routeDetails.deliveryCountry.name}} |
| Estimated Distance | {{$ctrl.deliveryObj.calculations.estimatedDistance}} kms |
| Estimated Fare | {{$ctrl.deliveryObj.calculations.estimatedFare}} euros |
| Pickup Date | {{$ctrl.deliveryObj.dateTimeDetails.pickupDate.toLocaleDateString()}} |


--- layout: post title: New Simple Tools date: 2014-01-19 17:48:42.000000000 -06:00 categories: - Projects tags: - new - php - programming - projects - website status: publish type: post published: true meta: _edit_last: '1' author: login: Blake email<EMAIL_ADDRESS>display_name: Blake first_name: Blake last_name: Harley ---
I created a few new simple tools for myself. I know there are already replacements for these only a Google search away, but I wanted to make my own.
The source for both of these apps are available on my Github page.


The Armory.js module provides information for a known weapon. The syntax is as follows:
Armory.getInfo(n); //retrieve the weapon stats for weapon n
Armory.getAllInfo(); //retrieve the ArmoryInfo data for custom presentation
Enter a weapon name like 'Bazooka' or 'Fists' or 'Bolt-action Rifle'


{% if default_content %}
The {{ agency_name }} has re-opened your FOIL request {{ request_id }} for the following reason:
{{ reason | safe }}
You can expect a response on or about {{ moment(date).format('dddd, MMMM D, YYYY') }}.
Please visit {{ request_id }} to view additional information and take any necessary action.
{% else %} {{ content | safe }} {% endif %}


{include file="public/header-new" /} {include file="public/top_null" /} {include file="public/mobile-header" /}
Macarthur Square


---
layout: page
title: Projects List
description: Projects in my portfolio, displayed in a detailed list.
permalink: projects-list/
extra_css: /assets/css/projects.css
---
{% include JB/setup %}
{% for post in site.posts %}
{% unless post.archive %}
{% capture this_year %}{{ post.date | date: "%Y" }}{% endcapture %}
{% capture next_year %}{{ post.previous.date | date: "%Y" }}{% endcapture %}
{% if forloop.first %}


AngularJS Touch Carousel
Transform any ng-repeat in a mobile friendly carousel, just by adding a 'rn-carousel' attribute to your 'ul' element. AngularJS magic :)
Try to swipe these demos with your mouse or your finger :
Discover cities
This carousel has indicator enabled, two way data-binding and custom controls.
Our Public GitHub repos
This carousel has a more advanced template, but works the same way.
-
{{ repo.name }}
{{ repo.description }}
watchers : {{ repo.watchers_count }}
forks : {{ repo.forks_count }}
open issues : {{ repo.open_issues_count }}


Click to add points, drag and drop to change, right click to insert and delete, shift click to select group of points
B-splines explained Github repo


--- layout: post status: publish published: true title: Donnie Murphy and George Kottaras Gone author: display_name: Corey Fineran login: Corey email<EMAIL_ADDRESS>url: '' author_login: Corey author_email<EMAIL_ADDRESS>wordpress_id: 9337 wordpress_url: http://ivyenvy.com/?p=9337 date: '2014-03-26 12:55:26 +0000' date_gmt: '2014-03-26 17:55:26 +0000' categories: - Catchers - Infield tags: - Carrie Muskat - Welington Castillo - Luis Valbuena - George Kottaras - Emilio Bonafacio - Donnie Murphy - John Baker - Eli Whiteside comments: - id: 10440 author: Kurtis Tucker author_email<EMAIL_ADDRESS>author_url: '' date: '2014-03-26 16:26:34 +0000' date_gmt: '2014-03-26 21:26:34 +0000' content: Rangers fans must hate the Cubs. Jon Daniels openly talks about the pain of the Garza deal. They were reportedly interested in Kottaras to fill in for an injured Geovany Soto (but didn't claim him). Then snag Donnie Murphy to fill a spot Mike Olt would have been ready for. That stings. ---
In a move that pretty much indicates that Mike Olt will be the starting third baseman with the Chicago Cubs rather than Iowa, the Rangers have claimed Donnie Murphy off waivers. With Luis Valbuena and Emilio Bonafacio performing fairly well this spring, it seemed that Murphy would probably be the odd man out.
Murphy was a bit of a pleasant surprise hitting .255/.319/.530, but it was the uptick in power that led to Murphy finding his way into the lineup. Murphy had career high numbers with 11 HR and 23 RBIs. The departure of Murphy means the departure of his salary, $825,000. Murphy performed better than I ever expected him to, but I definitely prefer the alternatives over him in 2014.
In other roster news, Carrie Muskat tweeted this:
George Kottaras cleared waivers. Given unconditional release. #Cubs
— Carrie Muskat (@CarrieMuskat) March 26, 2014
This unexpected move leaves the backup catcher position to either John Baker or Eli Whiteside.
It's safe to say these next four or five days could be pretty active for the Cubs, roster-wise.
***EDIT 2:03pm***
It's been reported that John Baker will back up Welington Castillo.


Around 16 km to the south of northernmost district in Kerala, Kasaragod, lies the massive Bekal Fort. It is among the biggest forts in Kerala and has been impeccably maintained throughout the years. It rises to 130 feet above sea level and is situated on a headland spanning 35km. Much effort has been put to develop a beautiful beach here called the Bekal Fort Beach. People flock to these spots in great numbers. Situated comfortably on steep hills by the sea, the fort provides for an imposing view from the beach.


This is a demo of two Blockly instances with a custom Backpack "sharing" Backpack contents.
10
123
1
1
9
0
abc
abc


First, you'll need to get a Okta Application Client ID and Client secret. Follow these steps:
-
Visit https://okta.com and login as admin to create an Okta app
-
Fill in the form to create your Okta Application
-
When redirected to the edit page, on the left sidebar, go to "API Settings"
-
Set Authorized Redirect URLs to: {{siteUrl}}
-
Finish by clicking "Save"
-
On the left sidebar, go to "App Settings" to find the "Client ID" and "Client secret"


The non-nodelet version of Drain. More...
#include <my_nodes.h>
Public Member Functions | |
| Drain_independent () | |
| Constructor Calls selfInit. More... | |
| virtual | ~Drain_independent () |
| Deletes all parameters (diversity, base_path) related to the drain. More... | |
| Public Member Functions inherited from camera::Drain_base | |
| Drain_base () | |
| Initializes depth_sub and rgb_sub as nullptr. More... | |
| virtual | ~Drain_base () |
| Deletes depth_sub and rgb_sub. More... | |
Protected Member Functions | |
| virtual ros::NodeHandle & | getMyNodeHandle () override |
| Returns nh. More... | |
| virtual ros::NodeHandle & | getMyPrivateNodeHandle () override |
| Returns nph. More... | |
| Protected Member Functions inherited from camera::Drain_base | |
| void | initialize () |
| Initialize and start the drain node. More... | |
Private Member Functions | |
| void | selfInit () |
| Private node handle. More... | |
Private Attributes | |
| ros::NodeHandle | nh |
| ros::NodeHandle | nph |
| Public node handle. More... | |
The non-nodelet version of Drain.
Definition at line 678 of file my_nodes.h.
|
inline |
Constructor Calls selfInit.
Definition at line 684 of file my_nodes.h.
|
virtual |
Deletes all parameters (diversity, base_path) related to the drain.
Definition at line 7 of file drain_independent.cpp.
|
overrideprotectedvirtual |
|
overrideprotectedvirtual |
|
private |
Private node handle.
Counterpart of Drain_nodelet::onInit Sets up private node handle then calls Drain_independent::initialize.
Definition at line 21 of file drain_independent.cpp.
|
private |
Definition at line 701 of file my_nodes.h.
|
private |
Public node handle.
Definition at line 702 of file my_nodes.h.


meter
element testmeter
element
meter
with aria-label
aria-label
should be used as accessible name.
No accessible description.
meter
with aria-labelledby
p
referenced by aria-labelledby
aria-labelledby
should be used as accessible name.
No accessible description.
meter
with label
label
should be used as accessible name.
No accessible description.
meter
with title
attribute
title
should be used as accessible name.
No accessible description.
meter
with aria-describedby
p
referenced by aria-describedby
aria-describedby
should be used as accessible description.
No accessible name.
meter
with label
element
& title
attribute
label
should be used as accessible name.
title
should be used as accessible description.


concordance
function from package survival
Major revision with added functionality. Any GLM family can be used now with glmnet
, not just the built-in families. By passing a “family” object as the family argument (rather than a character string), one gets access to all families supported by glm
. This development was programmed by our newest member of the glmnet
team, Kenneth Tay.
Bug fixes
Intercept=FALSE
with “Gaussian” is fixed. The dev.ratio
comes out correctly now. The mortran code was changed directly in 4 places. look for “standard”. Thanks to Kenneth Tay.Bug fixes
confusion.glmnet
was sometimes not returning a list because of apply collapsing structurecv.mrelnet
and cv.multnet
dropping dimensions inappropriatelystorePB
to avoid segfault. Thanks Tomas Kalibera!assess.glmnet
and cousins to be more helpful!lambda.interp
to avoid edge cases (thanks David Keplinger)Minor fix to correct Depends in the DESCRIPTION to R (>= 3.6.0)
This is a major revision with much added functionality, listed roughly in order of importance. An additional vignette called relax
is supplied to describe the usage.
relax
argument added to glmnet
. This causes the models in the path to be refit without regularization. The resulting object inherits from class glmnet
, and has an additional component, itself a glmnet object, which is the relaxed fit.relax
argument to cv.glmnet
. This allows selection from a mixture of the relaxed fit and the regular fit. The mixture is governed by an argument gamma
with a default of 5 values between 0 and 1.predict
, coef
and plot
methods for relaxed
and cv.relaxed
objects.print
method for relaxed
object, and new print
methods for cv.glmnet
and cv.relaxed
objects.trace.it=TRUE
to glmnet
and cv.glmnet
. This can also be set for the session via glmnet.control
.assess.glmnet
, roc.glmnet
and confusion.glmnet
for displaying the performance of models.makeX
for building the x
matrix for input to glmnet
. Main functionality is one-hot-encoding of factor variables, treatment of NA
and creating sparse inputs.bigGlm
for fitting the GLMs of glmnet
unpenalized.In addition to these new features, some of the code in glmnet
has been tidied up, especially related to CV.
coxnet.deviance
to do with input pred
, as well as saturated loglike
(missing) and weightscoxgrad
function for computing the gradientcv.glmnet
, for cases when wierd things happeninst/mortran
inst/mortran
-Wall
warningsnewoffset
created problems all over - fixed theseexact=TRUE
calls to coef
and predict
. See help file for more detailsy
blows up elnet
; error trap includedlambda.interp
which was returning NaN
under degenerate circumstances.Surv
objectpredict
and coef
with exact=TRUE
. The user is strongly encouraged to supply the original x
and y
values, as well as any other data such as weights that were used in the original fit.lognet
when some weights are zero and x
is sparsepredict.glmnet
, predict.multnet
and predict.coxnet
, when s=
argument is used with a vector of values. It was not doing the matrix multiply correctlyintercept
optionglmnet.control
for setting systems parameterscoxnet
exact=TRUE
option for prediction and coef functionsmgaussian
family for multivariate responsegrouped
option for multinomial familynewx
and make dgCmatrix
if sparselognet
added a classnames component to the objectpredict.lognet(type="class")
now returns a character vector/matrixpredict.glmnet
: fixed bug with type="nonzero"
glmnet
: Now x can inherit from sparseMatrix
rather than the very specific dgCMatrix
, and this will trigger sparse mode for glmnetglmnet.Rd
(lambda.min
) : changed value to 0.01 if nobs < nvars
, (lambda
) added warnings to avoid single value, (lambda.min
): renamed it lambda.min.ratio
glmnet
(lambda.min
) : changed value to 0.01 if nobs < nvars
(HessianExact
) : changed the sense (it was wrong), (lambda.min
): renamed it lambda.min.ratio
. This allows it to be called lambda.min
in a call thoughpredict.cv.glmnet
(new function) : makes predictions directly from the saved glmnet
object on the cv objectcoef.cv.glmnet
(new function) : as abovepredict.cv.glmnet.Rd
: help functions for the abovecv.glmnet
: insert drop(y)
to avoid 1 column matrices; now include a glmnet.fit
object for later predictionsnonzeroCoef
: added a special case for a single variable in x
; it was dying on thisdeviance.glmnet
: includeddeviance.glmnet.Rd
: includedglmnet_1.4
.


Description:
Theme:
Language: ()
Public:
Approved:
Countries:
Created:
Manifest version:
Private:
Total modules:
Total RPCs:


This website documents on the research i did on the pre-historic creatures and how they met their end and it also includes pictures on various dinosaures.
Ithis website is also a compilation of more oding elemnts that i have learnt and been able to incooperate into the code compare to the fist code i madef\ fo example:
adding background images
adding links
adding other htmls to the original code
creating and merging branches
to check out on the code you can follow the link. my pet website. !


Phobiq
Hi,
. Welcome to our site.
Save performance
Clear images
Sign out
Click above or move the slider to change the blur.
0%


thread.newthread(func, arg)
Creates a new thread of execution.
Func is the function that will be executed in the new thread. Arg is a table with the arguments to be passed to func as in func(unpack(arg)).
The new execution thread lasts until func returns.
thread.newmutex()
Creates new mutex, a mutual exclusion synchronization object. A mutex can be in locked or unlocked state (initially unlocked). The thread has locked a mutex is said to own the mutex. A mutex can be owned by only one thread at any given time. If a thread attempts to lock a mutex owned by another thread, it will be blocked until the owner thread unlocks the mutex.
The function returns the newly created unlocked mutex.
Note: LuaThread mutexes are recursive in the sense that successive calls to mutex:lock() nest. If the mutex owner locks a mutex n times, it has to unlock the mutex the same n times before the mutex switches to unlocked state.
mutex:lock()
Locks a mutex. If the mutex is owned by another thread, the function blocks the caller thread until the owner unlocks the mutex.
mutex:unlock()
Unlocks the given mutex. Calling mutex:unlock() without owning the mutex is an error.
thread.newcond()
Creates and a new cond, a condition variable. Condition variables allow threads to wait for a predicate to be satisfied, and to signal to waiting threads that the predicate status has been changed.
The condition variable is used in association with a mutex that protects the predicate from race conditions. Before waiting or signaling a condition variable, the mutex associated with the predicate has to be locked.
The function returns the newly created condition variable.
cond:wait(mutex)
Waits on a condition variable.
Mutex is the mutex associated with the predicate. In order to use this function, the calling thread has to own the mutex. Before the thread is put to wait (if need be), however, the mutex is unlocked (see comments). Upon return, the thread owns the mutex again.
To wait on a condition variable, proceed as follows:
-- make sure we are the only currently accessing the predicate predicate.mutex:lock() -- while the predicate is not what we want while unsatisfactory(predicate) do -- wait until someone changes the predicate predicate.cond:wait(predicate.mutex) end -- at this point, the predicate is valid AND we own it use(predicate) -- unlock the mutex, so that other threads can access the predicate predicate.mutex:unlock()
Note: LuaThread conditions are safe in the sense that even if a thread has more than one lock over a mutex, cond:wait(mutex) manages to unlock the mutex before blocking the caller thread. Upon return, the same number of locks is restored into the mutex.
cond:signal()
Releases one of the threads blocked on the condition variable. Before signaling, the caller thread should own the mutex associated to the predicate.
To signal a condition variable, proceed as follows:
-- make sure we are the only currently accessing the predicate predicate.mutex:lock() -- change the predicate update(predicate) -- release one of the threads blocked on cond predicate.cond:signal() -- unlock the mutex, so that other threads can access the predicate predicate.mutex:unlock()
cond:broadcast()
Similar to cond:signal(), but releases all threads blocked on the condition variable.


Betsie loves to play with boxes. She digs her head in and sniffs around, hoping to find some new friends to play. She sometimes like to get in a box and twirl around a few times before settling in.
Betsie is an observer by nature. She loves to stare at things, especially small bugs and birds. She would speak to the flies in a language only she knows.
 Betsie likes to take long naps in sunny, bright areas so that she can watch the small creatures outside and wait for me to get home.
Back to Home Page


BREAKING | Body found in sleeping bag at Tweed Heads park
by Shanee DobesonA major investigation is underway after the body of a man was found inside a sleeping bag at a Tweed Heads park.
A couple walking their dog made the grim discovery near the Jack Evans Boat Harbour Park on Coral Street about 11.00am Friday NSW time.
Emergency crews rushed to the park, where they quickly established a crime scene.
It’s believed the man is aged in his 50s, however a post mortem will be conducted in the coming day to determine his cause of death and identity.
Tweed Detectives have swarmed the area and are currently conducting a canvas, with detectives from State Crime Command’s Homicide Squad also called in to investigate the circumstances surrounding the man’s death.
Police are appealing for anyone with information to come forward.
If you have information for Police, please contact NSW Police on 131 444 or provide information using their online form 24 hours per day.
You can report also information about crime anonymously to Crime Stoppers by calling 1800 333 000 or via nsw.crimestoppers.com.au 24 hours per day. Crime Stoppers is a registered charity and community volunteer organisation.


Essentially, the DropBox website has 6 sections and they are as follows:
(1) Main Page/Initial screen page
(2-5) Information Sections
(6) Footer Section
The website's main purpose is to empower its visitors with the content needed to inform their decision to sign-up for dropbox. I'd dare to say that this website is landing page-inspired, with added access to company content in the footer.
The Main Page section can be further broken down 4 components.
a) Top component. This component does not contain a navigation menu, it is simply a download link in the top right corner.
b) Image-Left. It is an animation between three components, a computer, a tablet, and a cell phone. An image appears on the screen of the laptop and the same image is then pushed out to the other two instruments.
c) Content-Right. This section has the company icon at the top, their value proposition is centered and immediately follows that vertically (Your stuff, anywhere), followed by the main action button (sign-up), and is then concluded by a Sign-in link immediately below that.
d) Bottom Link Section. This link is a local link that simply scrolls the page down to the following content section.
The purpose of this section is to give the visitor enough information about the product to try to get them to sign-up immediately. Upon landing on the site, one can "see" what dropbox does in the first 5 seconds, thanks to the short animation/valueprop/icon, and the user can also click on the conveniently located Sign-Up button.
Each one of these sections is essentially the same and can be broken down into two components.
a) Picture. The picture illustrates what the content mentions
b) Content. The content is next to the image and is essentially a Title with a couple of sentences below it.
These section are, Wherever You Are, Share with Confidence, Safe and Secure, and Drop Box for business, with a corresponding link top the dropbox for business page.
The purpose of these sections are to address any objections that the potential client might have, in case they weren't immediately convinced to sign-up for dropbox after seeing the initial section and wanted to "learn more" about the product. The objections are essentially doubts or questions that the potential client might have and that may become sign-up deterrents as a result of going unanswered or unaddressed.
This section can be further broken down into two components, which are distributed vertically.
a) A Blue Sign up button and a white Download button of the same size.
b) Horizontally distributed links. 8 of them.
The purpose of this section is to allow those that have scrolled the entire page to sign-up or download the product. Furthermore, in case the person visiting the information is looking for other information (aside from downloading or enrolling) or is already a client, the links below the buttons can be clicked on to take you to their respective pages. This is very useful because this information is kept out of view for those that don't want to see and is made accessible for those that are looking for it.
All in all, I believe the dropbox design team did an extraordinary job of managing their screen real estate by including only that which is vital, carrying a tasteful aesthetic, and distributing their content ideally for conversion.


Forms
Checkbox
Default checkbox
Checked checkbox
Disabled checkbox
Material inputs
Email address
Password
Large
Invalid input
This input is not valid
Only letters and digits
Start with a letter
Do not enter your email address
Input group
@example.com
This input is not valid
Input with a select
Foo
Bar
Baz
Input with a dropdown
Dropdown
Action
Another action
Something else here
Separated link
Forms
Checks
Default checkbox
Checked checkbox
Disabled checkbox
Material inputs
Email address
Password
Large
Invalid input
This input is not valid
Only letters and digits
Start with a letter
Do not enter your email address
Input group
@example.com
This input is not valid
Input with a select
Foo
Bar
Baz
Input with a dropdown
Dropdown
Action
Another action
Something else here
Separated link
Forms
Checks
Default checkbox
Checked checkbox
Disabled checkbox
Material inputs
Email address
Password
Large
Invalid input
This input is not valid
Only letters and digits
Start with a letter
Do not enter your email address
Input group
@example.com
This input is not valid
Input with a select
Foo
Bar
Baz
Input with a dropdown
Dropdown
Action
Another action
Something else here
Separated link


HTML stands for Hypertext Markup Language. HTML documents form the majority of the content on the web. HTML 5 is the current version we are using on the web.
HTML TagsTags tell the browser how the HTML document should look and contain.
HTML Characterics1. There are two types: Inline and Block. Inline means it the text stays on the same line, while Block places an invisble box around the content.
2. HTML tags can be nested: This means you can have more than one tag inside another tag.
3. HTML tags can also have attributes: This is a property of the HTML tag.
This video
explains the distinction well.
All HTML tags have to be contained between "<"opening tag and closing tag "/>" There are exceptions Some tag are call Void tags and they do not need a closing tag.
"b" = bold
"em" = italics
"br" = break
"a" = anchor (used for links)
Computers are stupid and you must pay attention to detail. Misspelled words; unclosed tags; and missed puncutation cn cause your page to break or cause it to be unreadable.


--- layout: default title: OCHA Basic theme page-title: Dropdown include_ocha_basic: true ---
Bootstrap dropdown. Requires jQuery and the dropdown JS, see https://github.com/UN-OCHA/ocha_basic/blob/master/js/bootstrap-dropdown.js
Sass: components/_dropdown.scss


I built this guide because I could never quite wrap my head around Makefiles. They seemed awash with hidden rules and esoteric symbols, and asking simple questions didn’t yield simple answers. To solve this, I sat down for several weekends and read everything I could about Makefiles. I've condensed the most critical knowledge into this guide. Each topic has a brief description and a self contained example that you can run yourself.
If you mostly understand Make, consider checking out the Makefile Cookbook, which has a template for medium sized projects with ample comments about what each part of the Makefile is doing.
Good luck, and I hope you are able to slay the confusing world of Makefiles!
Getting Started
Why do Makefiles exist?
Makefiles are used to help decide which parts of a large program need to be recompiled. In the vast majority of cases, C or C++ files are compiled. Other languages typically have their own tools that serve a similar purpose as Make. Make can also be used beyond compilation too, when you need a series of instructions to run depending on what files have changed. This tutorial will focus on the C/C++ compilation use case.
Here's an example dependency graph that you might build with Make. If any file's dependencies changes, then the file will get recompiled:
What alternatives are there to Make?
Popular C/C++ alternative build systems are SCons, CMake, Bazel, and Ninja. Some code editors like Microsoft Visual Studio have their own built in build tools. For Java, there's Ant, Maven, and Gradle. Other languages like Go, Rust, and TypeScript have their own build tools.
Interpreted languages like Python, Ruby, and raw Javascript don't require an analogue to Makefiles. The goal of Makefiles is to compile whatever files need to be compiled, based on what files have changed. But when files in interpreted languages change, nothing needs to get recompiled. When the program runs, the most recent version of the file is used.
The versions and types of Make
There are a variety of implementations of Make, but most of this guide will work on whatever version you're using. However, it's specifically written for GNU Make, which is the standard implementation on Linux and MacOS. All the examples work for Make versions 3 and 4, which are nearly equivalent other than some esoteric differences.
Running the Examples
To run these examples, you'll need a terminal and "make" installed. For each example, put the contents in a file called Makefile
, and in that directory run the command make
. Let's start with the simplest of Makefiles:
hello:
echo "Hello, World"
Note: Makefiles must be indented using TABs and not spaces or
make
will fail.
Here is the output of running the above example:
$ make
echo "Hello, World"
Hello, World
That's it! If you're a bit confused, here's a video that goes through these steps, along with describing the basic structure of Makefiles.
Makefile Syntax
A Makefile consists of a set of rules. A rule generally looks like this:
targets: prerequisites
command
command
command
- The targets are file names, separated by spaces. Typically, there is only one per rule.
- The commands are a series of steps typically used to make the target(s). These need to start with a tab character, not spaces.
- The prerequisites are also file names, separated by spaces. These files need to exist before the commands for the target are run. These are also called dependencies
The essence of Make
Let's start with a hello world example:
hello:
echo "Hello, World"
echo "This line will print if the file hello does not exist."
There's already a lot to take in here. Let's break it down:
- We have one target called
hello
- This target has two commands
- This target has no prerequisites
We'll then run make hello
. As long as the hello
file does not exist, the commands will run. If hello
does exist, no commands will run.
It's important to realize that I'm talking about hello
as both a target and a file. That's because the two are directly tied together. Typically, when a target is run (aka when the commands of a target are run), the commands will create a file with the same name as the target. In this case, the hello
target does not create the hello
file.
Let's create a more typical Makefile - one that compiles a single C file. But before we do, make a file called blah.c
that has the following contents:
// blah.c
int main() { return 0; }
Then create the Makefile (called Makefile
, as always):
blah:
cc blah.c -o blah
This time, try simply running make
. Since there's no target supplied as an argument to the make
command, the first target is run. In this case, there's only one target (blah
). The first time you run this, blah
will be created. The second time, you'll see make: 'blah' is up to date
. That's because the blah
file already exists. But there's a problem: if we modify blah.c
and then run make
, nothing gets recompiled.
We solve this by adding a prerequisite:
blah: blah.c
cc blah.c -o blah
When we run make
again, the following set of steps happens:
- The first target is selected, because the first target is the default target
- This has a prerequisite of
blah.c
- Make decides if it should run the
blah
target. It will only run ifblah
doesn't exist, orblah.c
is newer thanblah
This last step is critical, and is the essence of make. What it's attempting to do is decide if the prerequisites of blah
have changed since blah
was last compiled. That is, if blah.c
is modified, running make
should recompile the file. And conversely, if blah.c
has not changed, then it should not be recompiled.
To make this happen, it uses the filesystem timestamps as a proxy to determine if something has changed. This is a reasonable heuristic, because file timestamps typically will only change if the files are modified. But it's important to realize that this isn't always the case. You could, for example, modify a file, and then change the modified timestamp of that file to something old. If you did, Make would incorrectly guess that the file hadn't changed and thus could be ignored.
Whew, what a mouthful. Make sure that you understand this. It's the crux of Makefiles, and might take you a few minutes to properly understand. Play around with the above examples or watch the video above if things are still confusing.
More quick examples
The following Makefile ultimately runs all three targets. When you run make
in the terminal, it will build a program called blah
in a series of steps:
- Make selects the target
blah
, because the first target is the default target blah
requiresblah.o
, so make searches for theblah.o
targetblah.o
requiresblah.c
, so make searches for theblah.c
targetblah.c
has no dependencies, so theecho
command is run- The
cc -c
command is then run, because all of theblah.o
dependencies are finished - The top
cc
command is run, because all theblah
dependencies are finished - That's it:
blah
is a compiled c program
blah: blah.o
cc blah.o -o blah # Runs third
blah.o: blah.c
cc -c blah.c -o blah.o # Runs second
# Typically blah.c would already exist, but I want to limit any additional required files
blah.c:
echo "int main() { return 0; }" > blah.c # Runs first
If you delete blah.c
, all three targets will be rerun. If you edit it (and thus change the timestamp to newer than blah.o
), the first two targets will run. If you run touch blah.o
(and thus change the timestamp to newer than blah
), then only the first target will run. If you change nothing, none of the targets will run. Try it out!
This next example doesn't do anything new, but is nontheless a good additional example. It will always run both targets, because some_file
depends on other_file
, which is never created.
some_file: other_file
echo "This will always run, and runs second"
touch some_file
other_file:
echo "This will always run, and runs first"
Make clean
clean
is often used as a target that removes the output of other targets, but it is not a special word in Make. You can run make
and make clean
on this to create and delete some_file
.
Note that clean
is doing two new things here:
- It's a target that is not first (the default), and not a prerequisite. That means it'll never run unless you explicitly call
make clean
- It's not intended to be a filename. If you happen to have a file named
clean
, this target won't run, which is not what we want. See.PHONY
later in this tutorial on how to fix this
some_file:
touch some_file
clean:
rm -f some_file
Variables
Variables can only be strings. You'll typically want to use :=
, but =
also works. See Variables Pt 2.
Here's an example of using variables:
files := file1 file2
some_file: $(files)
echo "Look at this variable: " $(files)
touch some_file
file1:
touch file1
file2:
touch file2
clean:
rm -f file1 file2 some_file
Single or double quotes have no meaning to Make. They are simply characters that are assigned to the variable. Quotes are useful to shell/bash, though, and you need them in commands like printf
. In this example, the two commands behave the same:
a := one two # a is set to the string "one two"
b := 'one two' # Not recommended. b is set to the string "'one two'"
all:
printf '$a'
printf $b
Reference variables using either ${}
or $()
x := dude
all:
echo $(x)
echo ${x}
# Bad practice, but works
echo $x
Targets
The all target
Making multiple targets and you want all of them to run? Make an all
target.
Since this is the first rule listed, it will run by default if make
is called without specifying a target.
all: one two three
one:
touch one
two:
touch two
three:
touch three
clean:
rm -f one two three
Multiple targets
When there are multiple targets for a rule, the commands will be run for each target. $@
is an automatic variable that contains the target name.
all: f1.o f2.o
f1.o f2.o:
echo $@
# Equivalent to:
# f1.o:
# echo f1.o
# f2.o:
# echo f2.o
Automatic Variables and Wildcards
* Wildcard
Both *
and %
are called wildcards in Make, but they mean entirely different things. *
searches your filesystem for matching filenames. I suggest that you always wrap it in the wildcard
function, because otherwise you may fall into a common pitfall described below.
# Print out file information about every .c file
print: $(wildcard *.c)
ls -la $?
*
may be used in the target, prerequisites, or in the wildcard
function.
Danger: *
may not be directly used in a variable definitions
Danger: When *
matches no files, it is left as it is (unless run in the wildcard
function)
thing_wrong := *.o # Don't do this! '*' will not get expanded
thing_right := $(wildcard *.o)
all: one two three four
# Fails, because $(thing_wrong) is the string "*.o"
one: $(thing_wrong)
# Stays as *.o if there are no files that match this pattern :(
two: *.o
# Works as you would expect! In this case, it does nothing.
three: $(thing_right)
# Same as rule three
four: $(wildcard *.o)
% Wildcard
%
is really useful, but is somewhat confusing because of the variety of situations it can be used in.
- When used in "matching" mode, it matches one or more characters in a string. This match is called the stem.
- When used in "replacing" mode, it takes the stem that was matched and replaces that in a string.
%
is most often used in rule definitions and in some specific functions.
See these sections on examples of it being used:
Automatic Variables
There are many automatic variables, but often only a few show up:
hey: one two
# Outputs "hey", since this is the target name
echo $@
# Outputs all prerequisites newer than the target
echo $?
# Outputs all prerequisites
echo $^
touch hey
one:
touch one
two:
touch two
clean:
rm -f hey one two
Fancy Rules
Implicit Rules
Make loves c compilation. And every time it expresses its love, things get confusing. Perhaps the most confusing part of Make is the magic/automatic rules that are made. Make calls these "implicit" rules. I don't personally agree with this design decision, and I don't recommend using them, but they're often used and are thus useful to know. Here's a list of implicit rules:
- Compiling a C program:
n.o
is made automatically fromn.c
with a command of the form$(CC) -c $(CPPFLAGS) $(CFLAGS) $^ -o $@
- Compiling a C++ program:
n.o
is made automatically fromn.cc
orn.cpp
with a command of the form$(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $^ -o $@
- Linking a single object file:
n
is made automatically fromn.o
by running the command$(CC) $(LDFLAGS) $^ $(LOADLIBES) $(LDLIBS) -o $@
The important variables used by implicit rules are:
CC
: Program for compiling C programs; defaultcc
CXX
: Program for compiling C++ programs; defaultg++
CFLAGS
: Extra flags to give to the C compilerCXXFLAGS
: Extra flags to give to the C++ compilerCPPFLAGS
: Extra flags to give to the C preprocessorLDFLAGS
: Extra flags to give to compilers when they are supposed to invoke the linker
Let's see how we can now build a C program without ever explicitly telling Make how to do the compililation:
CC = gcc # Flag for implicit rules
CFLAGS = -g # Flag for implicit rules. Turn on debug info
# Implicit rule #1: blah is built via the C linker implicit rule
# Implicit rule #2: blah.o is built via the C compilation implicit rule, because blah.c exists
blah: blah.o
blah.c:
echo "int main() { return 0; }" > blah.c
clean:
rm -f blah*
Static Pattern Rules
Static pattern rules are another way to write less in a Makefile, but I'd say are more useful and a bit less "magic". Here's their syntax:
targets...: target-pattern: prereq-patterns ...
commands
The essence is that the given target
is matched by the target-pattern
(via a %
wildcard). Whatever was matched is called the stem. The stem is then substituted into the prereq-pattern
, to generate the target's prereqs.
A typical use case is to compile .c
files into .o
files. Here's the manual way:
objects = foo.o bar.o all.o
all: $(objects)
# These files compile via implicit rules
foo.o: foo.c
bar.o: bar.c
all.o: all.c
all.c:
echo "int main() { return 0; }" > all.c
%.c:
touch $@
clean:
rm -f *.c *.o all
Here's the more efficient way, using a static pattern rule:
objects = foo.o bar.o all.o
all: $(objects)
# These files compile via implicit rules
# Syntax - targets ...: target-pattern: prereq-patterns ...
# In the case of the first target, foo.o, the target-pattern matches foo.o and sets the "stem" to be "foo".
# It then replaces the '%' in prereq-patterns with that stem
$(objects): %.o: %.c
all.c:
echo "int main() { return 0; }" > all.c
%.c:
touch $@
clean:
rm -f *.c *.o all
Static Pattern Rules and Filter
While I introduce functions later on, I'll foreshadow what you can do with them. The filter
function can be used in Static pattern rules to match the correct files. In this example, I made up the .raw
and .result
extensions.
obj_files = foo.result bar.o lose.o
src_files = foo.raw bar.c lose.c
all: $(obj_files)
# Note: PHONY is important here. Without it, implicit rules will try to build the executable "all", since the prereqs are ".o" files.
.PHONY: all
# Ex 1: .o files depend on .c files. Though we don't actually make the .o file.
$(filter %.o,$(obj_files)): %.o: %.c
echo "target: $@ prereq: $<"
# Ex 2: .result files depend on .raw files. Though we don't actually make the .result file.
$(filter %.result,$(obj_files)): %.result: %.raw
echo "target: $@ prereq: $<"
%.c %.raw:
touch $@
clean:
rm -f $(src_files)
Pattern Rules
Pattern rules are often used but quite confusing. You can look at them as two ways:
- A way to define your own implicit rules
- A simpler form of static pattern rules
Let's start with an example first:
# Define a pattern rule that compiles every .c file into a .o file
%.o : %.c
$(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@
Pattern rules contain a '%' in the target. This '%' matches any nonempty string, and the other characters match themselves. ‘%’ in a prerequisite of a pattern rule stands for the same stem that was matched by the ‘%’ in the target.
Here's another example:
# Define a pattern rule that has no pattern in the prerequisites.
# This just creates empty .c files when needed.
%.c:
touch $@
Double-Colon Rules
Double-Colon Rules are rarely used, but allow multiple rules to be defined for the same target. If these were single colons, a warning would be printed and only the second set of commands would run.
all: blah
blah::
echo "hello"
blah::
echo "hello again"
Commands and execution
Command Echoing/Silencing
Add an @
before a command to stop it from being printed
You can also run make with -s
to add an @
before each line
all:
@echo "This make line will not be printed"
echo "But this will"
Command Execution
Each command is run in a new shell (or at least the effect is as such)
all:
cd ..
# The cd above does not affect this line, because each command is effectively run in a new shell
echo `pwd`
# This cd command affects the next because they are on the same line
cd ..;echo `pwd`
# Same as above
cd ..; \
echo `pwd`
Default Shell
The default shell is /bin/sh
. You can change this by changing the variable SHELL:
SHELL=/bin/bash
cool:
echo "Hello from bash"
Double dollar sign
If you want a string to have a dollar sign, you can use $$
. This is how to use a shell variable in bash
or sh
.
Note the differences between Makefile variables and Shell variables in this next example.
make_var = I am a make variable
all:
# Same as running "sh_var='I am a shell variable'; echo $sh_var" in the shell
sh_var='I am a shell variable'; echo $$sh_var
# Same as running "echo I am a make variable" in the shell
echo $(make_var)
Error handling with -k
, -i
, and -
Add -k
when running make to continue running even in the face of errors. Helpful if you want to see all the errors of Make at once.
Add a -
before a command to suppress the error
Add -i
to make to have this happen for every command.
one:
# This error will be printed but ignored, and make will continue to run
-false
touch one
Interrupting or killing make
Note only: If you ctrl+c
make, it will delete the newer targets it just made.
Recursive use of make
To recursively call a makefile, use the special $(MAKE)
instead of make
because it will pass the make flags for you and won't itself be affected by them.
new_contents = "hello:\n\ttouch inside_file"
all:
mkdir -p subdir
printf $(new_contents) | sed -e 's/^ //' > subdir/makefile
cd subdir && $(MAKE)
clean:
rm -rf subdir
Export, environments, and recursive make
When Make starts, it automatically creates Make variables out of all the environment variables that are set when it's executed.
# Run this with "export shell_env_var='I am an environment variable'; make"
all:
# Print out the Shell variable
echo $$shell_env_var
# Print out the Make variable
echo $(shell_env_var)
The export
directive takes a variable and sets it the environment for all shell commands in all the recipes:
shell_env_var=Shell env var, created inside of Make
export shell_env_var
all:
echo $(shell_env_var)
echo $$shell_env_var
As such, when you run the make
command inside of make, you can use the export
directive to make it accessible to sub-make commands. In this example, cooly
is exported such that the makefile in subdir can use it.
new_contents = "hello:\n\techo \$$(cooly)"
all:
mkdir -p subdir
printf $(new_contents) | sed -e 's/^ //' > subdir/makefile
@echo "---MAKEFILE CONTENTS---"
@cd subdir && cat makefile
@echo "---END MAKEFILE CONTENTS---"
cd subdir && $(MAKE)
# Note that variables and exports. They are set/affected globally.
cooly = "The subdirectory can see me!"
export cooly
# This would nullify the line above: unexport cooly
clean:
rm -rf subdir
You need to export variables to have them run in the shell as well.
one=this will only work locally
export two=we can run subcommands with this
all:
@echo $(one)
@echo $$one
@echo $(two)
@echo $$two
.EXPORT_ALL_VARIABLES
exports all variables for you.
.EXPORT_ALL_VARIABLES:
new_contents = "hello:\n\techo \$$(cooly)"
cooly = "The subdirectory can see me!"
# This would nullify the line above: unexport cooly
all:
mkdir -p subdir
printf $(new_contents) | sed -e 's/^ //' > subdir/makefile
@echo "---MAKEFILE CONTENTS---"
@cd subdir && cat makefile
@echo "---END MAKEFILE CONTENTS---"
cd subdir && $(MAKE)
clean:
rm -rf subdir
Arguments to make
There's a nice list of options that can be run from make. Check out --dry-run
, --touch
, --old-file
.
You can have multiple targets to make, i.e. make clean run test
runs the clean
goal, then run
, and then test
.
Variables Pt. 2
Flavors and modification
There are two flavors of variables:
- recursive (use
=
) - only looks for the variables when the command is used, not when it's defined. - simply expanded (use
:=
) - like normal imperative programming -- only those defined so far get expanded
# Recursive variable. This will print "later" below
one = one ${later_variable}
# Simply expanded variable. This will not print "later" below
two := two ${later_variable}
later_variable = later
all:
echo $(one)
echo $(two)
Simply expanded (using :=
) allows you to append to a variable. Recursive definitions will give an infinite loop error.
one = hello
# one gets defined as a simply expanded variable (:=) and thus can handle appending
one := ${one} there
all:
echo $(one)
?=
only sets variables if they have not yet been set
one = hello
one ?= will not be set
two ?= will be set
all:
echo $(one)
echo $(two)
Spaces at the end of a line are not stripped, but those at the start are. To make a variable with a single space, use $(nullstring)
with_spaces = hello # with_spaces has many spaces after "hello"
after = $(with_spaces)there
nullstring =
space = $(nullstring) # Make a variable with a single space.
all:
echo "$(after)"
echo start"$(space)"end
An undefined variable is actually an empty string!
all:
# Undefined variables are just empty strings!
echo $(nowhere)
Use +=
to append
foo := start
foo += more
all:
echo $(foo)
String Substitution is also a really common and useful way to modify variables. Also check out Text Functions and Filename Functions.
Command line arguments and override
You can override variables that come from the command line by using override
.
Here we ran make with make option_one=hi
# Overrides command line arguments
override option_one = did_override
# Does not override command line arguments
option_two = not_override
all:
echo $(option_one)
echo $(option_two)
List of commands and define
The define directive is not a function, though it may look that way. I've seen it used so infrequently that I won't go into details, but it's mainly used for defining canned recipes and also pairs well with the eval function.
define
/endef
simply creates a variable that is set to a list of commands. Note here that it's a bit different than having a semi-colon between commands, because each is run in a separate shell, as expected.
one = export blah="I was set!"; echo $$blah
define two
export blah="I was set!"
echo $$blah
endef
all:
@echo "This prints 'I was set'"
@$(one)
@echo "This does not print 'I was set' because each command runs in a separate shell"
@$(two)
Target-specific variables
Variables can be set for specific targets
all: one = cool
all:
echo one is defined: $(one)
other:
echo one is nothing: $(one)
Pattern-specific variables
You can set variables for specific target patterns
%.c: one = cool
blah.c:
echo one is defined: $(one)
other:
echo one is nothing: $(one)
Conditional part of Makefiles
Conditional if/else
foo = ok
all:
ifeq ($(foo), ok)
echo "foo equals ok"
else
echo "nope"
endif
Check if a variable is empty
nullstring =
foo = $(nullstring) # end of line; there is a space here
all:
ifeq ($(strip $(foo)),)
echo "foo is empty after being stripped"
endif
ifeq ($(nullstring),)
echo "nullstring doesn't even have spaces"
endif
Check if a variable is defined
ifdef does not expand variable references; it just sees if something is defined at all
bar =
foo = $(bar)
all:
ifdef foo
echo "foo is defined"
endif
ifndef bar
echo "but bar is not"
endif
$(MAKEFLAGS)
This example shows you how to test make flags with findstring
and MAKEFLAGS
. Run this example with make -i
to see it print out the echo statement.
all:
# Search for the "-i" flag. MAKEFLAGS is just a list of single characters, one per flag. So look for "i" in this case.
ifneq (,$(findstring i, $(MAKEFLAGS)))
echo "i was passed to MAKEFLAGS"
endif
Functions
First Functions
Functions are mainly just for text processing. Call functions with $(fn, arguments)
or ${fn, arguments}
. Make has a decent amount of builtin functions.
bar := ${subst not, totally, "I am not superman"}
all:
@echo $(bar)
If you want to replace spaces or commas, use variables
comma := ,
empty:=
space := $(empty) $(empty)
foo := a b c
bar := $(subst $(space),$(comma),$(foo))
all:
@echo $(bar)
Do NOT include spaces in the arguments after the first. That will be seen as part of the string.
comma := ,
empty:=
space := $(empty) $(empty)
foo := a b c
bar := $(subst $(space), $(comma) , $(foo))
all:
# Output is ", a , b , c". Notice the spaces introduced
@echo $(bar)
String Substitution
$(patsubst pattern,replacement,text)
does the following:
"Finds whitespace-separated words in text that match pattern and replaces them with replacement. Here pattern may contain a ‘%’ which acts as a wildcard, matching any number of any characters within a word. If replacement also contains a ‘%’, the ‘%’ is replaced by the text that matched the ‘%’ in pattern. Only the first ‘%’ in the pattern and replacement is treated this way; any subsequent ‘%’ is unchanged." (GNU docs)
The substitution reference $(text:pattern=replacement)
is a shorthand for this.
There's another shorthand that replaces only suffixes: $(text:suffix=replacement)
. No %
wildcard is used here.
Note: don't add extra spaces for this shorthand. It will be seen as a search or replacement term.
foo := a.o b.o l.a c.o
one := $(patsubst %.o,%.c,$(foo))
# This is a shorthand for the above
two := $(foo:%.o=%.c)
# This is the suffix-only shorthand, and is also equivalent to the above.
three := $(foo:.o=.c)
all:
echo $(one)
echo $(two)
echo $(three)
The foreach function
The foreach function looks like this: $(foreach var,list,text)
. It converts one list of words (separated by spaces) to another. var
is set to each word in list, and text
is expanded for each word.
This appends an exclamation after each word:
foo := who are you
# For each "word" in foo, output that same word with an exclamation after
bar := $(foreach wrd,$(foo),$(wrd)!)
all:
# Output is "who! are! you!"
@echo $(bar)
The if function
if
checks if the first argument is nonempty. If so, runs the second argument, otherwise runs the third.
foo := $(if this-is-not-empty,then!,else!)
empty :=
bar := $(if $(empty),then!,else!)
all:
@echo $(foo)
@echo $(bar)
The call function
Make supports creating basic functions. You "define" the function just by creating a variable, but use the parameters $(0)
, $(1)
, etc. You then call the function with the special call
builtin function. The syntax is $(call variable,param,param)
. $(0)
is the variable, while $(1)
, $(2)
, etc. are the params.
sweet_new_fn = Variable Name: $(0) First: $(1) Second: $(2) Empty Variable: $(3)
all:
# Outputs "Variable Name: sweet_new_fn First: go Second: tigers Empty Variable:"
@echo $(call sweet_new_fn, go, tigers)
The shell function
shell - This calls the shell, but it replaces newlines with spaces!
all:
@echo $(shell ls -la) # Very ugly because the newlines are gone!
Other Features
Include Makefiles
The include directive tells make to read one or more other makefiles. It's a line in the makefile that looks like this:
include filenames...
This is particularly useful when you use compiler flags like -M
that create Makefiles based on the source. For example, if some c files includes a header, that header will be added to a Makefile that's written by gcc. I talk about this more in the Makefile Cookbook
The vpath Directive
Use vpath to specify where some set of prerequisites exist. The format is vpath <pattern> <directories, space/colon separated>
<pattern>
can have a %
, which matches any zero or more characters.
You can also do this globallyish with the variable VPATH
vpath %.h ../headers ../other-directory
# Note: vpath allows blah.h to be found even though blah.h is never in the current directory
some_binary: ../headers blah.h
touch some_binary
../headers:
mkdir ../headers
# We call the target blah.h instead of ../headers/blah.h, because that's the prereq that some_binary is looking for
# Typically, blah.h would already exist and you wouldn't need this.
blah.h:
touch ../headers/blah.h
clean:
rm -rf ../headers
rm -f some_binary
Multiline
The backslash ("\") character gives us the ability to use multiple lines when the commands are too long
some_file:
echo This line is too long, so \
it is broken up into multiple lines
.phony
Adding .PHONY
to a target will prevent Make from confusing the phony target with a file name. In this example, if the file clean
is created, make clean will still be run. Technically, I should have used it in every example with all
or clean
, but I didn't to keep the examples clean. Additionally, "phony" targets typically have names that are rarely file names, and in practice many people skip this.
some_file:
touch some_file
touch clean
.PHONY: clean
clean:
rm -f some_file
rm -f clean
.delete_on_error
The make tool will stop running a rule (and will propogate back to prerequisites) if a command returns a nonzero exit status.DELETE_ON_ERROR
will delete the target of a rule if the rule fails in this manner. This will happen for all targets, not just the one it is before like PHONY. It's a good idea to always use this, even though make does not for historical reasons.
.DELETE_ON_ERROR:
all: one two
one:
touch one
false
two:
touch two
false
Makefile Cookbook
Let's go through a really juicy Make example that works well for medium sized projects.
The neat thing about this makefile is it automatically determines dependencies for you. All you have to do is put your C/C++ files in the src/
folder.
# Thanks to Job Vranish (https://spin.atomicobject.com/2016/08/26/makefile-c-projects/)
TARGET_EXEC := final_program
BUILD_DIR := ./build
SRC_DIRS := ./src
# Find all the C and C++ files we want to compile
# Note the single quotes around the * expressions. The shell will incorrectly expand these otherwise, but we want to send the * directly to the find command.
SRCS := $(shell find $(SRC_DIRS) -name '*.cpp' -or -name '*.c' -or -name '*.s')
# Prepends BUILD_DIR and appends .o to every src file
# As an example, ./your_dir/hello.cpp turns into ./build/./your_dir/hello.cpp.o
OBJS := $(SRCS:%=$(BUILD_DIR)/%.o)
# String substitution (suffix version without %).
# As an example, ./build/hello.cpp.o turns into ./build/hello.cpp.d
DEPS := $(OBJS:.o=.d)
# Every folder in ./src will need to be passed to GCC so that it can find header files
INC_DIRS := $(shell find $(SRC_DIRS) -type d)
# Add a prefix to INC_DIRS. So moduleA would become -ImoduleA. GCC understands this -I flag
INC_FLAGS := $(addprefix -I,$(INC_DIRS))
# The -MMD and -MP flags together generate Makefiles for us!
# These files will have .d instead of .o as the output.
CPPFLAGS := $(INC_FLAGS) -MMD -MP
# The final build step.
$(BUILD_DIR)/$(TARGET_EXEC): $(OBJS)
$(CXX) $(OBJS) -o $@ $(LDFLAGS)
# Build step for C source
$(BUILD_DIR)/%.c.o: %.c
mkdir -p $(dir $@)
$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
# Build step for C++ source
$(BUILD_DIR)/%.cpp.o: %.cpp
mkdir -p $(dir $@)
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $< -o $@
.PHONY: clean
clean:
rm -r $(BUILD_DIR)
# Include the .d makefiles. The - at the front suppresses the errors of missing
# Makefiles. Initially, all the .d files will be missing, and we don't want those
# errors to show up.
-include $(DEPS)


Each Java object handle is also the name of a Tcl command that can be used to invoke accessible methods of that object from Tcl. The signature argument specifies which instance method to invoke. The Signatures section covers the form of the signature argument in more detail. Additional parameters to an object command are converted to Java objects or primitive Java values and passed to the method. It is not possible to invoke static methods via a javaObj handle, use the java::call method instead.
The Conversions section describes the result and possible error conditions of the object command, including the effect of the optional -noconvert flag.
Copyright © 1997-1998 Sun Microsystems, Inc.


#include <boost/preprocessor/cat.hpp>
#include <boost/preprocessor/list/for_each_i.hpp>
#define LIST (w, (x, (y, (z, BOOST_PP_NIL))))
#define MACRO(r, data, i, elem) BOOST_PP_CAT(elem, BOOST_PP_CAT(data, i))
BOOST_PP_LIST_FOR_EACH_I(MACRO, _, LIST) // 展开为 w_0 x_1 y_2 z_3
Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at www.boost.org/LICENSE_1_0.txt)


fun KeyPair.verify(signatureData: ByteArray, clearData: ByteArray): Boolean
Helper function for the signers to verify their own signature.
signature
- the signature on a message.
clearData
- the clear data/message that was signed (usually the Merkle root).
InvalidKeyException
- if the key is invalid.
SignatureException
- if this signatureData object is not initialized properly,
the passed-in signatureData is improperly encoded or of the wrong type,
if this signatureData algorithm is unable to process the input data provided, etc.
IllegalArgumentException
- if the signature scheme is not supported for this private key or if any of the clear or signature data is empty.


This is the sxmlc project.
This is a Simple XML parser written in C.
"Simple" means that it does not implement all XML specifications, only the most widely used ones.
It is not an attempt to re-write the fine 'libxmlc' or 'expat'! :-)
It is also not an XML-validation tool!
It is just intended to give C developers an API for XML handling as simple and flexible as possible,
being fast and memory-efficient.
It can be compiled as a stand-alone library to be included in other applications, possibly written in other languages,
or be included directly in C projects (add ~20 KB to your executable).
To join this project, please contact the project administrators, as shown on the project summary page.
Source code for this project may be available as downloads or through one of the SCM repositories used by the project, as accessible from the project develop page.
This page is the default project web page supplied by SourceForge.net. If you are a member of this project, you can deploy your own project web pages as per our site documentation.
If you are a web page developer interested in this project, please consider reaching out to the project admin (per the "Join this project" section, above) to offer your assistance.
©Copyright 1999-2010 - Geeknet, Inc., All Rights Reserved


Two dead in shack fire in Khayelitsha
by Alex MitchleyTwo people have died in a shack fire at the TR Section in Khayelitsha during the early hours of Sunday morning.
According to City of Cape Town's Fire and Rescue Services spokesperson Jermaine Carelse, firefighters responded to the fire at around 03:30 in the morning.
“Upon arrival the fire crew from Lansdowne Road Fire found a single informal structure alight,” Carelse said.
“The fire was extinguished at 04:17 and upon clearing the debris, the bodies of an adult male and adult female were discovered.”
The scene was handed over to the police.


This dialog appears when you invoke the Insert Block command. It allows you to insert a block into active file of any size filled in various way.
You may insert a block of any size, but a large block may take some time to create. Also for very large blocks HexEdit Pro will create a temporary file on disk, which can also later delay saving the file (since HexEdit Pro must copy from the temporary file into the saved file).
Size
Several options are available for specifying the block size. If the size to be used is greater than the length of the data then the bytes of the data are repeated up to the desired length.
Data
The size is taken from the length of the selected data (see Fill With options below) -- for example, the length of the entered string or the length of the data on the clipboard -- and multiplied by the "by:" factor to the right.
by:
The inserted block length is the length of the data multiplied by this factor. The actual size is displayed to the right, after the equals sign (=).
Take Size from Calculator
The size of the block is the value currently shown in the calculator. This option can be useful in keystroke macros.
Specified
The size is specified explicitly as either hex or decimal.
Decimal:
Enter the size of the block you want in decimal.
Hex:
Enter the size you want in hex.
Fill With
Choose how the values used to fill the block are created by selecting from the radio buttons described below. The bytes are repeated until the size specified is filled.
Hex
Enter one or more byte values in hex. To make a file just containing null bytes simply use "00".
String
Enter one or more characters. The values are taken from the character set specified below.
Char Set
The character set used to generate byte values from the string. You can create ASCII, EBCDIC or Unicode data.
Clipboard
The data is taken from the clipboard (binary data or text if no binary data is available). A preview of the data on the clipboard is shown (as hex for binary data or as a string for text). If no valid formats are on the clipboard this option is disabled.
Length
Displays the number of bytes currently on the clipboard.
Random
Generates random byte values. You can enter one or more ranges. For example, use "65-90, 97-122" to generate random uppercase and lowercase ASCII letters. Use the range "0-255" to generate all possible byte values. The PRNG algorithm is seeded by the Random Seed command or the Seed Random Number Generator from Calculator command.
Note that you can use this to generate random integers too (of any size). However, you cannot use it to generate random floating point values - for one, you will generate some invalid floating point values (NaNs) - see Floating Point Numbers for more information. (A facility to generate random floating point number may be added in the future.)
The algorithm used quickly generates adequate random numbers. For a high quality PRNG use the "Operations/Random Fill/Generate Good" menu item.
Number
Enter a number that is used to fill the file up to the size entered (above). To use IEEE floating point numbers enter a number with a decimal point (such as "1.0") and/or an exponent (such as "-1e30").
Type
The type of integer or floating point number. You can use 1, 2, 4 or 8 byte integers, or 4 or 8 byte IEEE floating point numbers.
Big-endian
Determines the byte order of the number entered. (See the information on byte order in Numeric Operations.)


Super
Co
Apple
Pear
Pig
Cola
Soccer
Phone
Book
School
Note
Human
Code
Operate
Man
Program
Element
Cat
Glass
Fish


> Docs > Http Server
An HttpServer
receives requests from clients, sends back responses, through an HttpHandler
.
Interface HttpHandler
has a single abstract method for creating responses for requests.
Async<HttpResponse> handle(HttpRequest request);
An HttpServer
requires an HttpHandler
, for example
HttpHandler handler = request -> HttpResponse.text(200, "Hello"); new HttpServer(handler).start(); // localhost:8080
Usually, http handlers are more complex that that, and it's better to define a class for you handler.
public class MyHandler implements HttpHandler { @Override public Async<HttpResponse> handle(HttpRequest request) { switch(request.uriPath()) { case "/hello" : return HttpResponse.text(200, "Hello"); ... default: return HttpResponse.text(404, "Not Found"); } } public static void main(String... args) throws Exception { HttpHandler handler = new MyHandler(); HttpServer server = new HttpServer(handler); server.conf() .port(8080) .trafficDump(System.out::print) // for debugging ; server.start(); } }
The http handler does not need to worry about HEAD, Range, Conditional requests; treat them as normal GET requests, and the server will transform the response appropriately.
Use HotHttpHandler
to hot-reload the server app when source code changes. This is a convenience during development, but not recommended on a production server.
// HttpHandler handler = new MyHandler(); HotHttpHandler handler = new HotHttpHandler(MyHandler.class).onJavaFiles(SRC_DIR); HttpServer server = new HttpServer(handler); ...
The hot handler will create an instance of MyHandler
in a separate classloader, and forward handle(request)
calls to it. Whenever HotHttpHandler.handle(request)
is called, if some .java
files under SRC_DIR
have been created/updated/deleted since the last handle(request)
call, the source files will be recompiled, and a new instance of MyHandler
will be created in a new classloader.
When reloading occurs, new requests will be handled by the new handler instance; previous outstanding requests are still being served by the old handler instance.
Reloading only applies to MyHandler
and code it can reach. If other parts of the code are changed, e.g. server configuration, you may need to restart the JVM.
Sometimes, java recompilation does not work perfectly (e.g. when a constant field is changed). When in doubt, restart JVM.
If you prefer to reload on .class
file changes instead (because your IDE does auto-compile on save), do
HotHttpHandler handler = new HotHttpHandler(MyHandler.class).onClassFiles();
You may also want to reload on changes of other types of files, for example
HotHttpHandler handler = new HotHttpHandler(MyHandler.class) .onJavaFiles(SRC_DIR) .onFiles("prop file", "glob:**.properties", SRC_DIR);
For detailed mechanism of hot reloading, see HotReloader
.
The HttpRequest
interface contains request information like method
, uri
, headers
.
If a request contains a body (for example, POST form data), it is represented in the request entity
. See Entity and Body. See also Form Handling and Json.
When the server invokes handle(request)
on the http handler, the request becomes the current fiber-local request, which can be retrieved by HttpRequest.current()
.
An http handler returns Async<HttpResponse>
, i.e. it produces responses asynchronously. See Async Programming. For example, to add a delay to a response:
case "/delay" : return Fiber.sleep(Duration.ofSeconds(1)) .then( v -> HttpResponse.text(200, "yes?") );
The HttpResponse
interface is readonly, describing the response status
, headers
, cookies
, entity
.
To create an instance of HttpResponse
, use mutable HttpResponseImpl
. For example
HttpEntity entity = new TextHttpEntity("Bye"); HttpResponseImpl response = new HttpResponseImpl( HttpStatus.c200_OK, entity ) .header(Headers.Connection, "close") .cookie("c1", "v1", Cookie.SESSION); return response;
HttpResponseImpl
implements Async<HttpResponse>
therefore it can be returned directly in HttpHandler.handle(request)
.
There are static factory methods in HttpResponse
for common responses, for example, text(status, texts)
, file(status, filePath)
, redirect(uri)
. Most of these methods return mutable HttpResponseImpl
which the caller can make further modifications, for example
return HttpResponse.text(200, "Bye") .header(Headers.Connection, "close") .cookie("c1", "v1", Cookie.SESSION);
To create HTML responses, consider Html Builder.
To create custom responses, see Entity and Body.
One instance of HttpResponse
may be used to serve multiple requests, for example,
final Async<HttpResponse> stockResponse = HttpResponse.file(200, "/tmp/big.txt") .then(HttpResponse::gzip) // compress .then(HttpResponse::cache); // cache in memory public Async<HttpResponse> handle(HttpRequest request) { ... return stockResponse;
Currently Bayou does not directly support Json. However, it shouldn't be too hard to plug in your favorite Json library. Suppose you have the following methods for conversion between Json strings and Java objects:
static Object json2obj(String json){ ... } static String obj2json(Object obj ){ ... }
you can then parse Json requests and generate Json responses like
static Async<Object> parseJsonRequest(HttpRequest request) { HttpEntity entity = request.entity(); if(entity==null || !entity.contentType().types().equals("application/json")) return Async.failure(new Exception("no json entity")); Async<String> json = entity.body().asString(1000); return json.map( str->json2obj(str) ); } static HttpResponseImpl createJsonResponse(Object obj) { String json = obj2json(obj); ContentType contentType = ContentType.parse("application/json; charset=UTF-8"); HttpEntity entity = new TextHttpEntity( contentType, json ); return new HttpResponseImpl( HttpStatus.c200_OK, entity ); }
Request cookies can be read from HttpRequest.cookies()
, and response cookies can be specified in HttpResponse.cookies()
.
String v1 = request.cookie("c1"); HttpResponseImpl response = HttpResponse.text(200, "foo"); response.cookie("c1", "", Cookie.DELETE ); response.cookie("c2", "v2", Cookie.SESSION);
However, it may be more convenient to use CookieJar
which models cookies as a mutable map-like data structure.
CookieJar cookieJar = CookieJar.current(); // for the current request-response cycle String foo = cookieJar.get("foo"); if(foo==null) cookieJar.put("foo", foo="bar", Cookie.SESSION); String flashMsg = CookieJar.current().remove("flashMsg");
This gives the illusion that we are directly reading and modifying the client's cookie storage.
CookieJar is a fiber-local concept, it can be used without reference to the current request/response.
The properties of cookies, particularly the values
, are constrained, see Cookie
class. That means you cannot put arbitrary strings in a CookieJar
. We leave it to programmers to build higher abstractions on top of CookieJar
, for example, to encode/sign/encrypt cookie values.
To serve multiple static files under a directory, use StaticHandler
, which maps a URI prefix to a directory prefix.
new StaticHandler("/", ROOT_DIR); new StaticHandler("/data", DATA_DIR);
A StaticHandler
can be used directly for an HttpServer
HttpHandler handler = new StaticHandler("/", ROOT_DIR); HttpServer server = new HttpServer(handler);
However, usually a StaticHandler
is used in a parent handler:
public class MyHandler implements HttpHandler { final StaticHandler staticHandler = new StaticHandler("/", ROOT_DIR); @Override public Async<HttpResponse> handle(HttpRequest request) { // try static files first HttpResponseImpl resp = staticHandler.handle(request); if(resp.statusCode()!=404) // 200, or error return resp; // 404 from staticHandler, request is not mapped to a static file. ... };
Each file in a static handler can be configured individually through StaticFileConf
. For example
... new StaticHandler("/", ROOT_DIR, this::confMod) void confMod(StaticFileConf conf) { if(conf.fileSize<5000) conf.cache(true); // cache the file in memory if it's small conf.header("Cache-Control", "public"); // for every file }
StaticHandler
supports "tagged" URI, which contains the ETag of the file. The response for a tagged URI never expires, therefore the browser can cache the response indefinitely. The tagged URI for a file can be obtained by StaticHandler.uri( relativeFilePath )
// in an html template _link().rel("stylesheet").type("text/css").href( staticHandler.uri("css/main.css") )
Configuration of an HttpServer
is done on HttpServerConf
, which can be retrieved by HttpServer.conf()
. Configuration must be done before server starts.
server.conf().port( 8080 ); server.conf().trafficDump( System.out::print ); server.start();
The config methods can be chained if you prefer.
server.conf() .port( 8080 ) .maxConnectionsPerIp( 5 ) .autoGzip( true ) //.trafficDump( System.out::print ) ;
See also


--- layout: default permalink: /classes/artg5330-2017/index.html --- Visualization Technologies ARTG5330-2017 Syllabus PDF Download Lectures All slides are made using revealjs. To navigate, use the arrow keys both left/right and up/down. At any time, press ESC to zoom out to get a better view of things. September 11th - Intro to Web Development and Github September 18th - Coding a website with HTML, CSS and SVG September 25th - SCSS and Javascript Roster Dustin Bell Shen Chen Shilin Chen Sarina Dass Shuyao He Vasyl Kochura Wen Lei Zhejun "Emerald" Li Megan J. McKee Daniel "Dan" Spector Shiyuan Sun Zhaoqi Wu Chenrui "Cherry" Ye
All slides are made using revealjs. To navigate, use the arrow keys both left/right and up/down. At any time, press ESC to zoom out to get a better view of things.


|
数字式立体视觉刺激系统
1.0.1
Digital Stereo System
|
#include <nvapi.h>
Public 属性 | |
| NvU32 | version |
| Version of this structure. 更多... | |
| NV_MOSAIC_TOPO_BRIEF | brief |
| The brief details of this topo. 更多... | |
| NvU32 | count |
| Number of topos in array below. 更多... | |
| NV_MOSAIC_TOPO_DETAILS | topos [NV_MOSAIC_MAX_TOPO_PER_TOPO_GROUP] |
This structure defines a group of topologies that work together to create one overall layout. All of the supported topologies are represented with this structure.
For example, a 'Passive Stereo' topology would be represented with this structure, and would have separate topology details for the left and right eyes. The count would be 2. A 'Basic' topology is also represented by this structure, with a count of 1.
The structure is primarily used internally, but is exposed to applications in a read-only fashion because there are some details in it that might be useful (like the number of rows/cols, or connected display information). A user can get the filled-in structure by calling NvAPI_Mosaic_GetTopoGroup().
You can then look at the detailed values within the structure. There are no entrypoints which take this structure as input (effectively making it read-only).
| NV_MOSAIC_TOPO_BRIEF NV_MOSAIC_TOPO_GROUP::brief |
The brief details of this topo.
| NvU32 NV_MOSAIC_TOPO_GROUP::count |
Number of topos in array below.
| NV_MOSAIC_TOPO_DETAILS NV_MOSAIC_TOPO_GROUP::topos[NV_MOSAIC_MAX_TOPO_PER_TOPO_GROUP] |
| NvU32 NV_MOSAIC_TOPO_GROUP::version |
Version of this structure.


Copyright © 2013 Cromwell Enage
Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
Table of Contents
Returns boost::mpl::true_
if the bound argument type
models the MPL Integral Constant concept, boost::mpl::false_
otherwise.
| Warning | |
|---|---|
The |
Last revised: June 06, 2013 at 14:15:31 GMT |


By providing Agility 360 with accurate details of your job history we are able to blah blah blah.
Research shows that blah blah blah.
{{ card.job_title}}
{{ card.department.toString().replace("None", "") }}
Start Date
{{ card.start_date | date:"MMM dd, yyyy" }}
End Date
{{ card.end_date | date:"MMM dd, yyyy" }}
{{ card.description }}
Final Compensation:
0">{{ card.final_salary | currency:'USD':true:'1.0-0' }} / Hour / Month / Year


Home
(current)
Active Issues
Inactive Issues
Confirm Activation
Are you sure you want to activate this issue?
Take into consideration that the server will be restarted.
Confirm Activation
Enter the value for this property:
Are you sure you want to activate this issue?
Take into consideration that the server will be restarted.
Confirm Activation
Are you sure you want to deactivate this issue?
Take into consideration that the server will be restarted.