| < Day Day Up > |
Hack 43 Spoof a MAC Address
Even good guys can use secret identities. Okay, I know what you're thinking. There's never a legitimate reason to spoof any type of address, right? Even if there were, why would you bother to spoof a MAC address, other than to prove that it can be done? Consider the following scenario. I was administrating a small network where the ISP restricted the number of IP addresses a DHCP client was allowed to receive. Their DHCP server kept track of the leased addresses by using a combination of the client's MAC address and an OS identifier. One day I needed to replace that network's external NIC. It took me a while to figure out why the new NIC refused to pick up a DHCP address from the ISP. Once the restriction was explained to me, I contemplated my available courses of action. One was to spend the afternoon listening to Musak in the hopes that I'd eventually get to speak to one of the ISP's customer service representatives. I decided my time would be better spent if I instead took 30 seconds and spoofed the old MAC address. This provided a quick solution that allowed the owner to get back online until he could make arrangements with the ISP regarding the new MAC address. 5.3.1 Spoofing on FreeBSDBefore I could accomplish the spoof, I needed two pieces of information. The first was the MAC address for the old NIC. Fortunately, I record such things in a binder. However, I initially found out that information using ifconfig. In this scenario, the interface in question was called rl0: % ifconfig rl0 rl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 inet <IP_ADDRESS> netmask 0xffffff00 broadcast <IP_ADDRESS> ether 00:05:5d:d2:19:b7 media: Ethernet autoselect (10baseT/UTP) The MAC address is the hex number immediately following ether. Second, I needed to know the identifier used by the ISP's DHCP server. This was found in the DHCP lease: % more /var/db/dhclient.leases | grep host option host-name "00-05-5d-d2-19-b7-36-33" Some ISPs use option host-name, while others use option dhcp-client-identifier. Choose the option in the lease that is associated with the MAC address. In this example, my identifier was the MAC address, followed by -36-33. Armed with the information I needed, I could spoof the old MAC address onto the new NIC card. In my case, the new card was an ed0: # ifconfig ed0 ether 00:05:5d:d2:19:b7 # # ifconfig ed0 | grep ether ether 00:05:5d:d2:19:b7 Note that you have to be the superuser to change these settings. This particular change won't survive a reboot, as the NIC will give the kernel its burnt-in MAC address during the hardware probe that occurs during bootup. If you intend to reboot before sorting out the situation with the ISP, carefully add this line to /etc/rc.conf: ifconfig_ed0_alias0="ether 00:05:5d:d2:19:b7" This will create an alias for ed0 that uses the desired MAC address, rather than the MAC address burnt into the physical card. Think of an alias as an alternate set of instructions an interface can give to the kernel—a kind of networking nickname. Next, I'll edit /etc/dhclient.conf: # vi /etc/dhclient.conf # $FreeBSD: src/etc/dhclient.conf,v 1.3 2001/10/27 03:14:37 rwatson Exp $ # # This file is required by the ISC DHCP client. # See ``man 5 dhclient.conf'' for details. # # In most cases an empty file is sufficient for most people as the # defaults are usually fine. # interface "ed0" { send host-name "00-05-5d-d2-19-b7-36-33"; send dhcp-client-identifier "00-05-5d-d2-19-b7-36-33"; } By default, this file contains only comments; I added a section for interface ed0. When editing your own file, remember to include the opening and closing curly braces ({}). Each statement must also end in a semicolon (;). Here, I've set both the host-name and the dhcp-client-identifier options to the values expected by the ISP. Now it's time to test that these changes did indeed work. You don't need to reboot in order to test that alias in /etc/rc.conf. This command will do the trick: # /etc/netstart Doing stage one network startup: Doing initial network setup:. ed0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 inet <IP_ADDRESS> netmask 0xffffff00 broadcast <IP_ADDRESS> ether 00:05:5d:d2:19:b7 lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384 inet <IP_ADDRESS> netmask 0xff000000 Additional routing options: ignore ICMP redirect=YES log ICMP redirect=YES drop SYN+FIN packets=YESsysctl: unknown oid 'net.inet.tcp.drop_synfin' . Routing daemons:. Excellent. The new NIC kept the spoofed MAC address. Now let's see how the DHCP server responds when I release and try to renew an address: # dhclient -r ed0 # Using -r with dhclient forces the DHCP client to give up its old address and request a new lease from the DHCP server. If this succeeds, the prompt will return without any error messages. Running ifconfig ed0 will show that the ISP's DHCP server did indeed give this interface a public IP address. 5.3.2 Spoofing on NetBSDThe current version of ifconfig that ships with NetBSD does not support this functionality. To allow MAC address changes, try Dheeraj Reddy's ifconfig patch, available from http://news.gw.com/netbsd.tech.net/%3C20030808072355.GA616%40bharati.sudheeraj.net%3E. You will need to apply this patch to NetBSD sources and build a new version of ifconfig. To begin, download the system sources, unpack them, and change the working directory to src/sbin/ifconfig. Download the patch and apply it with: # patch > ifconfig.patch Build a new binary with: # make Remember that this code is experimental and may not always work as advertised, so it is crucial that you back up the original ifconfig binary in some safe place. When you have the new binary, run it with: # ifconfig interface-name lladdr MAC-addr 5.3.3 Spoofing with OpenBSDThe standard ifconfig that ships with OpenBSD does not contain an option to change the MAC addresses of interface cards. If you need it, you will have to build your own tool for that purpose with sea.c. Download it from http://www.devguide.net/books/openbsdfw-02-ed/ Build sea as follows: # gcc -Wall -o sea sea.c -lkvm Next, boot OpenBSD into single-user mode: # reboot boot> boot -s Then, once in single-user mode, use sea to spoof the desired address on the specified NIC: # sea interface-name MAC-addr 5.3.4 See Also
|
| < Day Day Up > |


Static Web Hosting
This machine is serving a simple, static website at https://{{hostname}} and at all domain names that you set up an email user or alias for.
Uploading web files
You can replace the default website with your own HTML pages and other static files. This control panel won’t help you design a website, but once you have .html files you can upload them following these instructions:
- Ensure that any domains you are publishing a website for have no problems on the Status Checks page.
- On your personal computer, install an SSH file transfer program such as FileZilla or scp.
- Log in to this machine with the file transfer program. The server is {{hostname}}, the protocol is SSH or SFTP, and use the SSH login credentials that you used when you originally created this machine at your cloud host provider. This is not what you use to log in either for email or this control panel. Your SSH credentials probably involves a private key file.
- Upload your .html or other files to the directory {{storage_root}}/www/default on this machine. They will appear directly and immediately on the web.
- The websites set up on this machine are listed in the table below with where to put the files for each website.
To add a domain to this table, create a dummy mail user or alias on the domain first and see the setup guide for adding nameserver records to the new domain at your registrar (but not glue records).


Define the message to send to spark space
To display the build result:
Environment variable examples:
- $BUILD_URL
- ${BUILD_URL}
- ${env.BUILD_URL}
Commonly used variables:
- ${JOB_NAME}
- ${JOB_URL}
- ${BUILD_NUMBER}
- ${BUILD_RESULT}
- ${BUILD_URL}
- ${BUILD_DISPLAY_NAME}
- ${BUILD_ID}
- ${BUILD_TAG}
- ${JAVA_HOME}
- ${JAVA_VERSION}
- ${JENKINS_URL}
- ${JENKINS_VERSION}
- ${NODE_LABELS}
- ${NODE_NAME}
- ${PATH}
- ${PWD}
- ${EXECUTOR_NUMBER}
if using SCM or SCM trigger (see the corresponding plugin wiki for additional environment variables):
- ${BRANCH_NAME}
- ${CHANGE_ID}
- ${CHANGE_URL}
- ${CHANGE_TITLE}
- ${CHANGE_AUTHOR}
- ${CHANGE_AUTHOR_DISPLAY_NAME}
- ${CHANGE_AUTHOR_EMAIL}
- ${CHANGE_TARGET}
if using the Environment Injector Plugin:
- ${BUILD_CAUSE}
- ${BUILD_CAUSE_MANUALTRIGGER}
- ${BUILD_CAUSE_SCMTRIGGER}
- ${BUILD_CAUSE_UPSTREAMTRIGGER}
- ${ROOT_BUILD_CAUSE}
All environment variables injected into the build can also be used


Sing Up
Username
Password
Password
Email address
We'll never share your email with anyone else.
Register


Shopify JavaScript Buy SDK
Note: For help with migrating from v0 of JS Buy SDK to v1 check out the Migration Guide.
The JS Buy SDK is a lightweight library that allows you to build ecommerce into any website. It's based on Shopify's Storefront API and provides the ability to retrieve products and collections from your shop, add products to a cart, and checkout.
Full API docs are available here.
Changelog
View our Changelog for details about our releases.
Table Of Contents
- Installation
- Builds
- Examples
- Expanding the SDK
- Example Apps
- Documentation
- Contributing
- Code of Conduct
- License
Installation
With Yarn:
$ yarn add shopify-buy
With NPM:
$ npm install shopify-buy
CDN:
There is a minified UMD build of the latest release available via CDN (see the Changelog for details about the latest release):
<script src="https://sdks.shopifycdn.com/js-buy-sdk/v2/latest/index.umd.min.js"></script>
If you don't want to use the latest version, you can use a specific older release version:
<script src="https://sdks.shopifycdn.com/js-buy-sdk/1.11.0/index.umd.min.js"></script>
You can also fetch the unoptimized release for a version (2.0.1 and above). This will be larger than the optimized version, as it will contain all fields that are available in the Storefront API:
<script src="https://sdks.shopifycdn.com/js-buy-sdk/2.0.1/index.unoptimized.umd.min.js"></script>
Builds
The JS Buy SDK has four build versions: ES, CommonJS, AMD, and UMD.
ES, CommonJS:
import Client from 'shopify-buy';
AMD:
import Client from 'shopify-buy/index.amd';
UMD:
import Client from 'shopify-buy/index.umd';
UMD Unoptimized: This will be larger than the optimized version, as it will contain all fields that are available in the Storefront API. This should only be used when you need to add custom queries to supplement the JS Buy SDK queries.
import Client from 'shopify-buy/index.unoptimized.umd';
Examples
Initializing the Client
If your store supports multiple languages, Storefront API can return translated resource types and fields. Learn more about translating content.
import Client from 'shopify-buy';
// Initializing a client to return content in the store's primary language
const client = Client.buildClient({
domain: 'your-shop-name.myshopify.com',
storefrontAccessToken: 'your-storefront-access-token'
});
// Initializing a client to return translated content
const clientWithTranslatedContent = Client.buildClient({
domain: 'your-shop-name.myshopify.com',
storefrontAccessToken: 'your-storefront-access-token',
language: 'ja-JP'
});
Fetching Products
// Fetch all products in your shop
client.product.fetchAll().then((products) => {
// Do something with the products
console.log(products);
});
// Fetch a single product by ID
const productId = 'gid://shopify/Product/7857989384';
client.product.fetch(productId).then((product) => {
// Do something with the product
console.log(product);
});
// Fetch a single product by Handle
const handle = 'product-handle';
client.product.fetchByHandle(handle).then((product) => {
// Do something with the product
console.log(product);
});
Fetching Collections
// Fetch all collections, including their products
client.collection.fetchAllWithProducts().then((collections) => {
// Do something with the collections
console.log(collections);
console.log(collections[0].products);
});
// Fetch a single collection by ID, including its products
const collectionId = 'gid://shopify/Collection/369312584';
// Set a parameter for first x products, defaults to 20 if you don't provide a param
client.collection.fetchWithProducts(collectionId, {productsFirst: 10}).then((collection) => {
// Do something with the collection
console.log(collection);
console.log(collection.products);
});
Creating a Checkout
// Create an empty checkout
client.checkout.create().then((checkout) => {
// Do something with the checkout
console.log(checkout);
});
Updating checkout attributes
const checkoutId = 'gid://shopify/Checkout/e3bd71f7248c806f33725a53e33931ef?key=47092e448529068d1be52e5051603af8';
const input = {customAttributes: [{key: "MyKey", value: "MyValue"}]};
client.checkout.updateAttributes(checkoutId, input).then((checkout) => {
// Do something with the updated checkout
});
Adding Line Items
const checkoutId = 'gid://shopify/Checkout/e3bd71f7248c806f33725a53e33931ef?key=47092e448529068d1be52e5051603af8'; // ID of an existing checkout
const lineItemsToAdd = [
{
variantId: 'gid://shopify/ProductVariant/29106064584',
quantity: 5,
customAttributes: [{key: "MyKey", value: "MyValue"}]
}
];
// Add an item to the checkout
client.checkout.addLineItems(checkoutId, lineItemsToAdd).then((checkout) => {
// Do something with the updated checkout
console.log(checkout.lineItems); // Array with one additional line item
});
Updating Line Items
const checkoutId = 'gid://shopify/Checkout/e3bd71f7248c806f33725a53e33931ef?key=47092e448529068d1be52e5051603af8'; // ID of an existing checkout
const lineItemsToUpdate = [
{id: 'gid://shopify/CheckoutLineItem/194677729198640?checkout=e3bd71f7248c806f33725a53e33931ef', quantity: 2}
];
// Update the line item on the checkout (change the quantity or variant)
client.checkout.updateLineItems(checkoutId, lineItemsToUpdate).then((checkout) => {
// Do something with the updated checkout
console.log(checkout.lineItems); // Quantity of line item 'gid://shopify/Product/7857989384' updated to 2
});
Removing Line Items
const checkoutId = 'gid://shopify/Checkout/e3bd71f7248c806f33725a53e33931ef?key=47092e448529068d1be52e5051603af8'; // ID of an existing checkout
const lineItemIdsToRemove = [
'gid://shopify/CheckoutLineItem/194677729198640?checkout=e3bd71f7248c806f33725a53e33931ef'
];
// Remove an item from the checkout
client.checkout.removeLineItems(checkoutId, lineItemIdsToRemove).then((checkout) => {
// Do something with the updated checkout
console.log(checkout.lineItems); // Checkout with line item 'gid://shopify/CheckoutLineItem/194677729198640?checkout=e3bd71f7248c806f33725a53e33931ef' removed
});
Fetching a Checkout
const checkoutId = 'gid://shopify/Checkout/e3bd71f7248c806f33725a53e33931ef?key=47092e448529068d1be52e5051603af8'
client.checkout.fetch(checkoutId).then((checkout) => {
// Do something with the checkout
console.log(checkout);
});
Adding a Discount
const checkoutId = 'gid://shopify/Checkout/e3bd71f7248c806f33725a53e33931ef?key=47092e448529068d1be52e5051603af8'; // ID of an existing checkout
const discountCode = 'best-discount-ever';
// Add a discount code to the checkout
client.checkout.addDiscount(checkoutId, discountCode).then(checkout => {
// Do something with the updated checkout
console.log(checkout);
});
Removing a Discount
const checkoutId = 'gid://shopify/Checkout/e3bd71f7248c806f33725a53e33931ef?key=47092e448529068d1be52e5051603af8'; // ID of an existing checkout
// Removes the applied discount from an existing checkout.
client.checkout.removeDiscount(checkoutId).then(checkout => {
// Do something with the updated checkout
console.log(checkout);
});
Updating a Shipping Address
const checkoutId = 'gid://shopify/Checkout/e3bd71f7248c806f33725a53e33931ef?key=47092e448529068d1be52e5051603af8'; // ID of an existing checkout
const shippingAddress = {
address1: 'Chestnut Street 92',
address2: 'Apartment 2',
city: 'Louisville',
company: null,
country: 'United States',
firstName: 'Bob',
lastName: 'Norman',
phone: '555-625-1199',
province: 'Kentucky',
zip: '40202'
};
// Update the shipping address for an existing checkout.
client.checkout.updateShippingAddress(checkoutId, shippingAddress).then(checkout => {
// Do something with the updated checkout
});
Completing a checkout
The simplest way to complete a checkout is to use the webUrl property that is returned when creating a checkout. This URL redirects the customer to Shopify's online checkout to complete the purchase.
Expanding the SDK
Not all fields that are available on the Storefront API are exposed through the SDK. If you use the unoptimized version of the SDK, you can easily build your own queries. In order to do this, use the UMD Unoptimized build.
Initializing the Client
// fetch the large, unoptimized version of the SDK
import Client from 'shopify-buy/index.unoptimized.umd';
const client = Client.buildClient({
domain: 'your-shop-name.myshopify.com',
storefrontAccessToken: 'your-storefront-access-token'
});
Fetching Products
// Build a custom products query using the unoptimized version of the SDK
const productsQuery = client.graphQLClient.query((root) => {
root.addConnection('products', {args: {first: 10}}, (product) => {
product.add('title');
product.add('tags');// Add fields to be returned
});
});
// Call the send method with the custom products query
client.graphQLClient.send(productsQuery).then(({model, data}) => {
// Do something with the products
console.log(model);
});
Example Apps
For more complete examples of using JS Buy SDK, check out our storefront-api-examples project. There are JS Buy SDK specific example apps in Node, Ember, and React. You can use these examples as a guideline for creating your own custom storefront.
Documentation
Contributing
For help on setting up the repo locally, building, testing, and contributing please see CONTRIBUTING.md.
Code of Conduct
All developers who wish to contribute through code or issues, take a look at the CODE_OF_CONDUCT.md.
License
MIT, see LICENSE.md for details.


Deploy your app to Azure Web App using a Docker image, usually for a Web App on Linux.
This pipeline builds a docker container image based on your dockerfile, pushes the image to a container registry and deploys the new image to the Azure Web App.
See How to use a Docker image from a private image registry for details.


Initialize listeners and controls for display panel.
The class used to signifiy the MEI element(s).
The class used to signify the background.
Load highlight settings from localStorage
Set background image opacity button and slider listeners.
The background image selector.
Set listener on burger menu for smaller screens.
Set listener for "Display All" button in Display panel.
Set listener on staff highlighting checkbox.
Set listener on key shortcuts for switching between highlights
The current plan is to use the keys q, w, e, r, t, and y
Set click listener for each highlight dropdown option
GroupingType / The DOM element's id as highlight-${id}
Set rendered MEI opacity button and slider listeners.
Class that contains the rendered MEI.
Update MEI opacity to value from the slider.
Class that contains the rendered MEI.
Set zoom control listener for button and slider
A ZoomHandler is only necessary in Single Page mode as diva.js handles zooming otherwise.
Reset the highlight for different types based on the 'highlight-selected' class in the DOM.
Update highlight dropdown option + display
GroupingType / The DOM element's id as highlight-${id}
Generated using TypeDoc
Clickaway listener for the highlight dropdown.


journalctl - Query the systemd journal
journalctl [OPTIONS...] [MATCHES...]
journalctl may be used to query the contents of the systemd(1) journal as written by systemd-journald.service(8).
If called without parameters, it will show the full contents of the journal, starting with the oldest entry collected.
If one or more match arguments are passed, the output is filtered accordingly. A match is in the format "FIELD=VALUE", e.g. "_SYSTEMD_UNIT=httpd.service", referring to the components of a structured journal entry. See systemd.journal-fields(7) for a list of well-known fields. If multiple matches are specified matching different fields, the log entries are filtered by both, i.e. the resulting output will show only entries matching all the specified matches of this kind. If two matches apply to the same field, then they are automatically matched as alternatives, i.e. the resulting output will show entries matching any of the specified matches for the same field. Finally, if the character "+" appears as a separate word on the command line, all matches before and after are combined in a disjunction (i.e. logical OR).
As shortcuts for a few types of field/value matches, file paths may be specified. If a file path refers to an executable file, this is equivalent to an "_EXE=" match for the canonicalized binary path. Similarly, if a path refers to a device node, this is equivalent to a "_KERNEL_DEVICE=" match for the device.
Output is interleaved from all accessible journal files, whether they are rotated or currently being written, and regardless of whether they belong to the system itself or are accessible user journals.
All users are granted access to their private per-user journals. However, by default, only root and users who are members of the "systemd-journal" group get access to the system journal and the journals of other users.
The output is paged through less by default, and long lines are "truncated" to screen width. The hidden part can be viewed by using the left-arrow and right-arrow keys. Paging can be disabled; see the --no-pager option and the "Environment" section below.
When outputing to a tty, lines are colored according to priority: lines of level ERROR and higher are colored red; lines of level NOTICE and higher are highlighted; other lines are displayed normally.
The following options are understood:
--no-full, --full, -l
Ellipsize fields when they do not fit in available columns. The default is to show full fields, allowing them to wrap or be truncated by the pager, if one is used.
The old options -l/--full are not useful anymore, except to undo --no-full.
-a, --all
Show all fields in full, even if they include unprintable characters or are very long.
-f, --follow
Show only the most recent journal entries, and continuously print new entries as they are appended to the journal.
-e, --pager-end
Immediately jump to the end of the journal inside the implied pager tool. This implies -n1000 to guarantee that the pager will not buffer logs of unbounded size. This may be overridden with an explicit -n with some other numeric value on the command line. Note that this option is only supported for the less(1) pager.
-n, --lines=
Show the most recent journal events and limit the number of events shown. If --follow is used, this option is implied. The argument, a positive integer, is optional, and defaults to 10.
--no-tail
Show all stored output lines, even in follow mode. Undoes the effect of --lines=.
-r, --reverse
Reverse output so that the newest entries are displayed first.
-o, --output=
Controls the formatting of the journal entries that are shown. Takes one of the following options:
short
is the default and generates an output that is mostly identical to the formatting of classic syslog files, showing one line per journal entry.
short-iso
is very similar, but shows ISO 8601 wallclock timestamps.
short-precise
is very similar, but shows timestamps with full microsecond precision.
short-monotonic
is very similar, but shows monotonic timestamps instead of wallclock timestamps.
verbose
shows the full-structured entry items with all fields.
export
serializes the journal into a binary (but mostly text-based) stream suitable for backups and network transfer (see m[blue]Journal Export Formatm[]s-2u[1]ds+2 for more information).
json
formats entries as JSON data structures, one per line (see m[blue]Journal JSON Formatm[]s-2u[2]ds+2 for more information).
json-pretty
formats entries as JSON data structures, but formats them in multiple lines in order to make them more readable by humans.
json-sse
formats entries as JSON data structures, but wraps them in a format suitable for m[blue]Server-Sent Eventsm[]s-2u[3]ds+2.
cat
generates a very terse output, only showing the actual message of each journal entry with no metadata, not even a timestamp.
-x, --catalog
Augment log lines with explanation texts from the message catalog. This will add explanatory help texts to log messages in the output where this is available. These short help texts will explain the context of an error or log event, possible solutions, as well as pointers to support forums, developer documentation, and any other relevant manuals. Note that help texts are not available for all messages, but only for selected ones. For more information on the message catalog, please refer to the m[blue]Message Catalog Developer Documentationm[]s-2u[4]ds+2.
Note: when attaching journalctl output to bug reports, please do not use -x.
-q, --quiet
Suppresses any warning messages regarding inaccessible system journals when run as a normal user.
-m, --merge
Show entries interleaved from all available journals, including remote ones.
-b [ID][(+-offset], --boot=[ID][(+-offset]
Show messages from a specific boot. This will add a match for "_BOOT_ID=".
The argument may be empty, in which case logs for the current boot will be shown.
If the boot ID is omitted, a positive offset will look up the boots starting from the beginning of the journal, and a equal-or-less-than zero offset will look up boots starting from the end of the journal. Thus, 1 means the first boot found in the journal in chronological order, 2 the second and so on; while -0 is the last boot, -1 the boot before last, and so on. An empty offset is equivalent to specifying -0, except when the current boot is not the last boot (e.g. because --directory was specified to look at logs from a different machine).
If the 32-character ID is specified, it may optionally be followed by offset which identifies the boot relative to the one given by boot ID. Negative values mean earlier boots and a positive values mean later boots. If offset is not specified, a value of zero is assumed, and the logs for the boot given by ID are shown.
--list-boots
Show a tabular list of boot numbers (relative to the current boot), their IDs, and the timestamps of the first and last message pertaining to the boot.
-k, --dmesg
Show only kernel messages. This implies -b and adds the match "_TRANSPORT=kernel".
-u, --unit=UNIT|PATTERN
Show messages for the specified systemd unit UNIT, or for any of the units matched by PATTERN. If a pattern is specified, a list of unit names found in the journal is compared with the specified pattern and all that match are used. For each unit name, a match is added for messages from the unit ("_SYSTEMD_UNIT=UNIT"), along with additional matches for messages from systemd and messages about coredumps for the specified unit.
This parameter can be specified multiple times.
--user-unit=
Show messages for the specified user session unit. This will add a match for messages from the unit ("_SYSTEMD_USER_UNIT=" and "_UID=") and additional matches for messages from session systemd and messages about coredumps for the specified unit.
This parameter can be specified multiple times.
-p, --priority=
Filter output by message priorities or priority ranges. Takes either a single numeric or textual log level (i.e. between 0/"emerg" and 7/"debug"), or a range of numeric/text log levels in the form FROM..TO. The log levels are the usual syslog log levels as documented in syslog(3), i.e. "emerg" (0), "alert" (1), "crit" (2), "err" (3), "warning" (4), "notice" (5), "info" (6), "debug" (7). If a single log level is specified, all messages with this log level or a lower (hence more important) log level are shown. If a range is specified, all messages within the range are shown, including both the start and the end value of the range. This will add "PRIORITY=" matches for the specified priorities.
-c, --cursor=
Start showing entries from the location in the journal specified by the passed cursor.
--after-cursor=
Start showing entries from the location in the journal after the location specified by the this cursor. The cursor is shown when the --show-cursor option is used.
--show-cursor
The cursor is shown after the last entry after two dashes:
-- cursor: s=0639...
The format of the cursor is private and subject to change.
--since=, --until=
Start showing entries on or newer than the specified date, or on or older than the specified date, respectively. Date specifications should be of the format "2012-10-30 18:17:16". If the time part is omitted, "00:00:00" is assumed. If only the seconds component is omitted, ":00" is assumed. If the date component is omitted, the current day is assumed. Alternatively the strings "yesterday", "today", "tomorrow" are understood, which refer to 00:00:00 of the day before the current day, the current day, or the day after the current day, respectively. "now" refers to the current time. Finally, relative times may be specified, prefixed with "-" or "+", referring to times before or after the current time, respectively.
-F, --field=
Print all possible data values the specified field can take in all entries of the journal.
--system, --user
Show messages from system services and the kernel (with --system). Show messages from service of current user (with --user). If neither is specified, show all messages that the user can see.
-M, --machine=
Show messages from a running, local container. Specify a container name to connect to.
-D DIR, --directory=DIR
Takes a directory path as argument. If specified, journalctl will operate on the specified journal directory DIR instead of the default runtime and system journal paths.
--file=GLOB
Takes a file glob as an argument. If specified, journalctl will operate on the specified journal files matching GLOB instead of the default runtime and system journal paths. May be specified multiple times, in which case files will be suitably interleaved.
--root=ROOT
Takes a directory path as an argument. If specified, journalctl will operate on catalog file hierarchy underneath the specified directory instead of the root directory (e.g. --update-catalog will create ROOT/var/lib/systemd/catalog/database).
--new-id128
Instead of showing journal contents, generate a new 128-bit ID suitable for identifying messages. This is intended for usage by developers who need a new identifier for a new message they introduce and want to make recognizable. This will print the new ID in three different formats which can be copied into source code or similar.
--header
Instead of showing journal contents, show internal header information of the journal fields accessed.
--disk-usage
Shows the current disk usage of all journal files.
--list-catalog [128-bit-ID...]
List the contents of the message catalog as a table of message IDs, plus their short description strings.
If any 128-bit-IDs are specified, only those entries are shown.
--dump-catalog [128-bit-ID...]
Show the contents of the message catalog, with entries separated by a line consisting of two dashes and the ID (the format is the same as .catalog files).
If any 128-bit-IDs are specified, only those entries are shown.
--update-catalog
Update the message catalog index. This command needs to be executed each time new catalog files are installed, removed, or updated to rebuild the binary catalog index.
--setup-keys
Instead of showing journal contents, generate a new key pair for Forward Secure Sealing (FSS). This will generate a sealing key and a verification key. The sealing key is stored in the journal data directory and shall remain on the host. The verification key should be stored externally. Refer to the Seal= option in journald.conf(5) for information on Forward Secure Sealing and for a link to a refereed scholarly paper detailing the cryptographic theory it is based on.
--force
When --setup-keys is passed and Forward Secure Sealing (FSS) has already been configured, recreate FSS keys.
--interval=
Specifies the change interval for the sealing key when generating an FSS key pair with --setup-keys. Shorter intervals increase CPU consumption but shorten the time range of undetectable journal alterations. Defaults to 15min.
--verify
Check the journal file for internal consistency. If the file has been generated with FSS enabled and the FSS verification key has been specified with --verify-key=, authenticity of the journal file is verified.
--verify-key=
Specifies the FSS verification key to use for the --verify operation.
-h, --help
Print a short help text and exit.
--version
Print a short version string and exit.
--no-pager
Do not pipe output into a pager.
On success, 0 is returned; otherwise, a non-zero failure code is returned.
$SYSTEMD_PAGER
Pager to use when --no-pager is not given; overrides $PAGER. Setting this to an empty string or the value "cat" is equivalent to passing --no-pager.
$SYSTEMD_LESS
Override the default options passed to less ("FRSXMK").
Without arguments, all collected logs are shown unfiltered:
journalctl
With one match specified, all entries with a field matching the expression are shown:
journalctl _SYSTEMD_UNIT=avahi-daemon.service
If two different fields are matched, only entries matching both expressions at the same time are shown:
journalctl _SYSTEMD_UNIT=avahi-daemon.service _PID=28097
If two matches refer to the same field, all entries matching either expression are shown:
journalctl _SYSTEMD_UNIT=avahi-daemon.service _SYSTEMD_UNIT=dbus.service
If the separator "+" is used, two expressions may be combined in a logical OR. The following will show all messages from the Avahi service process with the PID 28097 plus all messages from the D-Bus service (from any of its processes):
journalctl _SYSTEMD_UNIT=avahi-daemon.service _PID=28097 + _SYSTEMD_UNIT=dbus.service
Show all logs generated by the D-Bus executable:
journalctl /usr/bin/dbus-daemon
Show all logs of the kernel device node /dev/sda:
journalctl /dev/sda
Show all kernel logs from previous boot:
journalctl -k -b -1
systemd(1), systemd-journald.service(8), systemctl(1), coredumpctl(1), systemd.journal-fields(7), journald.conf(5)
Journal Export Format
%http://www.freedesktop.org/wiki/Software/systemd/export
Journal JSON Format
%http://www.freedesktop.org/wiki/Software/systemd/json
Server-Sent Events
%https://developer.mozilla.org/en-US/docs/Server-sent_events/Using_server-sent_events
Message Catalog Developer Documentation
%http://www.freedesktop.org/wiki/Software/systemd/catalog


Bioinformatics Core Facility
Max Planck Institute for Biology of Ageing
AGEpy
Public Code
Services
Register
Projects
Issues
Education
Data


Missed
Opportunity?
U.S. Government Purchases and Forced Labor Abroad
Chapter One: Forced Labor
Forced labor occurs when people are coerced to work through violence, intimidation, and in more subtle ways.
Many workers are forced to stay in their jobs so they can pay off hefty recruitment fees. Some migrant workers have their identity papers confiscated by their employer, or are threatened with deportation if they attempt to assert their rights.


TWizardNavigationEventParameter class.
TWizardNavigationEventParameter represents the parameter for TWizard's navigation events.
The index of the currently active step can be obtained from CurrentStepIndex, while the index of the candidate new step is in NextStepIndex. By modifying NextStepIndex, the new step can be changed to another one. If there is anything wrong with the navigation and it is not wanted, set CancelNavigation to true.
Located in /Web/UI/WebControls/TWizard.php (line 1833)
TComponent | --TEventParameter | --TWizardNavigationEventParameter
Constructor.
Inherited From TComponent
TComponent::addParsedObject()
TComponent::attachEventHandler()
TComponent::canGetProperty()
TComponent::canSetProperty()
TComponent::createdOnTemplate()
TComponent::detachEventHandler()
TComponent::evaluateExpression()
TComponent::evaluateStatements()
TComponent::getEventHandlers()
TComponent::getSubProperty()
TComponent::hasEvent()
TComponent::hasEventHandler()
TComponent::hasProperty()
TComponent::raiseEvent()
TComponent::setSubProperty()
TComponent::__get()
TComponent::__set()
Documentation generated on Mon, 22 Feb 2010 12:19:04 +0000 by phpDocumentor 1.3.0RC4


goSell iOS SDK
iOS SDK to use goSell API.
A library that fully covers payment/authorization/card saving process inside your iOS application.
Table of Contents
- Requirements
- Installation
- Setup
- Usage
- SDK modes
- Pay Button
- Session
- API Session
- Session Data Source
- Session Delegate
- Payment Success Callback
- Payment Failure Callback
- Authorization Success Callback
- Authorization Failure Callback
- Card Saving Success Callback
- Card Saving Failure Callback
- Card Tokenization Success Callback
- Card Tokenization Failure Callback
- Session Is Starting Callback
- Session Has Started Callback
- Session Has Failed to Start Callback
- Session Cancel Callback
- Session Appearance
- Sample
Requirements
To use the SDK the following requirements must be met:
- Xcode 10.0 or newer
- Swift 4.2 or newer (preinstalled with Xcode)
- Base SDK for the target app: iOS 8.0 or later
Installation
Installation with CocoaPods
CocoaPods is a dependency manager, which automates and simplifies the process of using 3rd-party libraries in your projects.
You can install it with the following command:
$ gem install cocoapods
Podfile
To integrate goSellSDK into your Xcode project using CocoaPods, specify it in your Podfile
:
platform :ios, '8.0'
use_frameworks!
source 'https://github.com/CocoaPods/Specs.git'
target 'MyApp' do
pod 'goSellSDK'
end
Then, run the following command:
$ pod update
We also recommend you to include ErrorReporting submodule in order to allow your customers to report unexpected behaviour of the SDK directly to Tap.
To include error reporting, please add the following line to your Podfile
:
target 'MyApp' do
# Other pods
...
# Error reporting submodule.
pod 'goSellSDK/ErrorReporting'
end
Setup
First of all, goSellSDK
should be set up. In this section only secret key is required.
goSellSDK Class Properties
Below is the list of properties in goSellSDK class you can manipulate. Make sure you do the setup before any usage of the SDK.
Secret Key
To set it up, add the following line of code somewhere in your project and make sure it will be called before any usage of goSellSDK
, otherwise an exception will be thrown. Required.
Swift:
let secretKey = SecretKey(sanbox: "YOUR_SANDBOX_SECRET_KEY", production: "YOUR_PRODUCTION_SECRET_KEY") // (format of the key: "sk_XXXXXXXXXXXXXXXXXXXXXXXX")
goSellSDK.secretKey = secretKey // Secret key (format: "sk_XXXXXXXXXXXXXXXXXXXXXXXX")
Objective-C:
SecretKey *secretKey = [[SecretKey alloc] initWithSandbox:@"YOUR_SANDBOX_SECRET_KEY" production:@"YOUR_PRODUCTION_SECRET_KEY"]; // (format of the key: "sk_XXXXXXXXXXXXXXXXXXXXXXXX")
[goSellSDK setSecretKey:secretKey];
Don’t forget to import the framework at the beginning of the file:
Swift:
import goSellSDK
Objective-C:
@import goSellSDK;
or
#import <goSellSDK/goSellSDK-Swift.h>
Mode
SDK mode is a mode SDK is operating in, either sandbox or production.
Use this property to test your integration with the sandbox transactions.
WARNING: Default value of this property is production which means your transaction are real transactions. Switch to sandbox while in development.
Language
Localization language of the UI part of the SDK. This is locale identifier.
Make sure it consists only from 2 lowercased letters and is presented in the list of availableLanguages property of goSellSDK class.
Notice: Starting from iOS 9 SDK user interface layout direction is based on the language you select, which means that if you would like to have it in Arabic language, the UI will be switched to RTL (right-to-left).
Available Languages
This property returns the list of locale identifiers the SDK is currently localized into.
Currently we support the following languages:
| Language | Locale Identifier |
|---|---|
| Arabic | ar |
| English | en |
| Russian | ru |
SDK Version
This property returns current SDK version.
goSellSDK Class Methods
Reset
Resets all settings and makes the SDK to reinitialize on next usage.
Might be useful when you are switching accounts.
Also when you are logging the user out, although that’s not required.
Setup Steps
With PayButton
For those, who would like to use PayButton.
- Place PayButton.
- Assign its datasource and delegate.
- Implement datasource and delegate.
Without PayButton
For those who would like to keep their design and start the SDK process manually.
- Create Session object.
- Assign its datasource and delegate.
- Implement datasource and delegate.
Usage
After goSellSDK
is set up, you can actually use the SDK.
We have tried to make the SDK integration as simple as possible, requiring the minimum from you.
SDK Modes
goSellSDK works in 4 modes:
- Purchase: Default mode. Normal customer charge.
- Authorize: Only authorization is happening. You should specify an action after successful authorization: either capture the amount or void the charge after specific period of time.
- Card Saving: Use this mode to save the card of the customer with Tap and use it later.
- Card Tokenization: Use this mode if you are willing to perform the charging/authorization manually. The purpose of this mode is only to collect and tokenize card information details of your customer if you don’t have PCI compliance certificate but willing to process the payment manually using our services.
The mode is set through SessionDataSource interface.
Pay Button
Here at Tap, we have designed our custom Pay button and all you need to do is just to put it somewhere on the screen and provide at least required payment details through its dataSource
property.
Pay Button Placement
Pay Button is restricted to the height of exactly 44 points. For better experience, make sure that it has enough width to display the content.
XIB/Storyboard
You can add Pay button on your view in XIB/Storyboard file. To do that, do the following:
- Drag & drop an instance of
UIView
at the desired location. - Select added view and open Identity Inspector
- Enter the following values:
- Class: PayButton
- Module: goSellSDK
- For your convenience, you may also connect
dataSource
anddelegate
outlets.
Code
You can also add Pay button with the code:
Swift:
import goSellSDK
...
func addPayButton() {
let buttonFrame = CGRect(x: 8.0, y: UIScreen.main.bounds.height - 52.0, width: UIScreen.main.bounds.width - 16.0, height: 44.0)
let button = PayButton(frame: buttonFrame)
self.view.addSubview(button) // or where you want it
button.dataSource = self // or whatever
button.delegate = self // or whatever
}
Objective-C:
@import goSellSDK;
...
- (void)addPayButton {
CGRect buttonFrame = CGRectMake(8.0, UIScreen.mainScreen.bounds.size.height - 52.0, UIScreen.mainScreen.bounds.size.width - 16.0, 44.0);
PayButton *button = [[PayButton alloc] initWithFrame:buttonFrame];
[self.view addSubview:button]; // or where you want it
button.dataSource = self; // or whatever
button.delegate = self; // or whatever
}
Properties
Below is the list of Pay button properties
| Property | Type | Description | ||
|---|---|---|---|---|
| Swift | Swift | |||
| enabled | isEnabled | BOOL | Bool | Defines whether the button is enabled. Perhaps you will need it for your internal logic. |
| dataSource | id<SessionDataSource> | SessionDataSource | Session data source. All input payment information is passed through this protocol. Required. | |
| delegate | id<SessionDelegate> | SessionDelegate | Session delegate. Payment status along with all output payment information is passed through this protocol. | |
| appearance | id<SessionAppearance> | SessionAppearance | Session appearance. Implement only if you need UI customization. For more details please refer to SessionAppearance section. |
Methods
| Method | Description | |
|---|---|---|
| Swift | ||
| Call this method to update displayed amount on the button. Note: If amount is non positive then pay button is force disabled. |
Session
You want to use Session
object if you are not using PayButton
.
Properties
| Property | Type | Description | ||
|---|---|---|---|---|
| Swift | Swift | |||
| dataSource | id<SessionDataSource> | SessionDataSource | Session data source. All input payment information is passed through this protocol. Required. | |
| delegate | id<SessionDelegate> | SessionDelegate | Session delegate. Payment status along with all output payment information is passed through this protocol. | |
| appearance | id<SessionAppearance> | SessionAppearance | Session appearance. Implement only if you need UI customization. For more details please refer to SessionAppearance section. | |
| canStart | BOOL | Bool | Readonly. Defines if session can start with the data you have provided through the dataSource. |
Methods
| Method | Description | |
|---|---|---|
| Swift | ||
| Calculates and returns an amount based on the details provided through the dataSource. You might want to call this method every time you update your dataSource to reflect changes in UI if you are not using PayButton provided by the SDK. Returns: Amount suggested to display to the customer or nil in the following cases:
|
||
| Initiates the session. Returns: boolean value which determines whether all conditions are met to start the sesssion. |
API Session
APISession is a class you want to use when you need to call plain APIs without the UI. Currently not all APIs are available.
Properties
| Property | Type | Description | ||
|---|---|---|---|---|
| Swift | Swift | |||
| sharedInstance | shared | APISession | Shared singleton APISession instance. |
Methods
Please refer to APISession
class documentation for more details.
Session Data Source
SessionDataSource is an interface which you should implement somewhere in your code to pass payment information in order to be able to access payment flow within the SDK.
Strucure
The following table describes its structure and specifies which fields are required for each of the modes.
| Member | Type | Required | Description | |||
|---|---|---|---|---|---|---|
| Objective-C | Swift | Purchase | Authorize | Card Saving | ||
| mode | TransactionMode | false | Mode of the transactions (purchase, authorize, card saving or card tokenization). If this property is not implemented, purchase mode is used. | |||
| customer | Customer | true | Customer information. For more details on how to create the customer, please refer to Customer class reference. | |||
| currency | Currency | true | false | Currency of the transaction. | ||
| amount | false | Payment/Authorization amount. Note: In order to have payment amount either amount or items should be implemented. If both are implemented, items is preferred. |
||||
| items | NSArray | false | List of items to pay for. Note: In order to have payment amount either amount or items should be implemented. If both are implemented, items is preferred. |
|||
| destinations | NSArray | false | The list of merchant desired destinations accounts to receive funds from payment/authorization transactions. | |||
| taxes | NSArray | false | You can specify taxation details here. By default, there are no taxes. Note: Specifying taxes will affect total payment/authorization amount. |
|||
| shipping | NSArray | false | You can specify shipping details here. By default, there are no shipping details. Note: Specifying shipping will affect total payment/authorization amount. |
|||
| postURL | NSURL | URL | false | The URL which will be called by Tap system notifying that payment has either succeed or failed. | ||
| paymentDescription | NSString | String | false | Description of the payment. | ||
| paymentMetadata | NSDictionary | false | Additional information you would like to pass along with the transaction. | |||
| paymentReference | Reference | false | You can keep a reference to the transaction using this property. | |||
| paymentStatementDescriptor | NSString | String | false | Statement descriptor. | ||
| require3DSecure | BOOL | Bool | false | Defines if 3D secure check is required. If not implemented, treated as true. Note: If you disable 3D secure check, it still may occure. Final decision is taken by Tap. |
||
| receiptSettings | Receipt | false | Receipt recipient details. | |||
| authorizeAction | AuthorizeAction | false | true | false | Action to perform after authorization succeeds. | |
| allowsToSaveSameCardMoreThanOnce | BOOL | Bool | false | Defines if same card can be saved more than once. Note: Same cards means absolutely equal data set. For example, if customer specifies same card details, but different cardholder names, we will treat this like different cards. |
||
| isSaveCardSwitchOnByDefault | BOOL | Bool | false | Defines if save card switch is on by default. Note: If value of this property is true, then switch will be remaining off until card information is filled and valid. And after will be toggled on automatically. |
Samples
Mode
Objective-C
- (enum TransactionMode)mode {
return Purchase;
}
Swift
var mode: TransactionMode {
return .purchase
}
Customer
Objective-C
- (Customer *)customer {
if ( customerIDIsKnown ) {
return [self identifiedCustomer];
}
else {
return [self newCustomer];
}
}
/// Creating a customer with known identifier received from Tap before.
- (Customer *)identifiedCustomer {
return [[Customer alloc] initWithIdentifier:@"cus_tomer_id"];
}
/// Creating a customer with raw information.
- (Customer *)newCustomer {
EmailAddress *email = [EmailAddress withEmailAddressString<EMAIL_ADDRESS>PhoneNumber *phoneNumber = [[PhoneNumber alloc] initWithISDNumber:@"965" phoneNumber:@"96512345"];
Customer *newCustomer = [[Customer alloc] initWithEmailAddress:email
phoneNumber:phoneNumber
firstName:@"Steve"
middleName:nil
lastName:@"Jobs"];
return newCustomer;
}
Swift
var customer: Customer? {
if customerIDIsKnown {
return self.identifiedCustomer
}
else {
return self.newCustomer
}
}
/// Creating a customer with known identifier received from Tap before.
var identifiedCustomer: Customer? {
return try? Customer(identifier: "cus_to_mer")
}
/// Creating a customer with raw information.
var newCustomer: Customer? {
let emailAddress = try! EmailAddress(emailAddressString<EMAIL_ADDRESS>let phoneNumber = try! PhoneNumber(isdNumber: "965", phoneNumber: "96512345")
return try? Customer(emailAddress: emailAddress,
phoneNumber: phoneNumber,
firstName: "Steve",
middleName: nil,
lastName: "Jobs")
}
Currency
Tap supports processing payments in 10+ currencies, allowing you to charge customers in their native currency while receiving funds in yours. This is especially helpful if you have a global presence, as charging in a customer’s native currency can increase sales.
SupportedCurrencies
| Currency | Code |
|---|---|
| UAE Dirham | AED |
| Bahraini Dinar | BHD |
| Egyptian Pound | EGP |
| Euro | EUR |
| UK Pound Sterling | GBP |
| Kuwaiti Dinar | KWD |
| Omani Riyal | OMR |
| Qatari Riyal | QAR |
| Saudi Riyal | SAR |
| US Dollar | USD |
Objective-C
- (Currency *)currency {
return [Currency withISOCode:@"KWD"];
}
Swift
var currency: Currency? {
return .with(isoCode: "KWD")
}
Amount
Objective-C
- (NSDecimal)amount {
return [NSDecimalNumber one].decimalValue;
}
Swift
var amount: Decimal {
return 1.0
}
Items
Objective-C
- (NSArray<PaymentItem *> *)items {
Quantity *oneUnit = [[Quantity alloc] initWithValue:[NSDecimalNumber one].decimalValue
unitOfMeasurement:[Measurement units]];
NSDecimal ten = [[NSDecimalNumber one] decimalNumberByMultiplyingByPowerOf10:1].decimalValue;
PaymentItem *firstItem = [[PaymentItem alloc] initWithTitle:@"Test item #1"
quantity:oneUnit
amountPerUnit:ten];
NSDecimal oneHundred = [[NSDecimalNumber one] decimalNumberByMultiplyingByPowerOf10:2].decimalValue;
Quantity *oneHundredSquareMeters = [[Quantity alloc] initWithValue:oneHundred unitOfMeasurement:[Measurement area:SquareMeters]];
NSDecimal seventeen = [NSDecimalNumber numberWithDouble:17.0].decimalValue;
AmountModificator *tenPercents = [[AmountModificator alloc] initWithPercents:ten];
NSDecimal oneThousand = [[NSDecimalNumber one] decimalNumberByMultiplyingByPowerOf10:3].decimalValue;
AmountModificator *thousandMoney = [[AmountModificator alloc] initWithFixedAmount:oneThousand];
Tax *thousandKD = [[Tax alloc] initWithTitle:@"KD 1,000.000" descriptionText:@"This is an example of a tax." amount:thousandMoney];
PaymentItem *secondItem = [[PaymentItem alloc] initWithTitle:@"Test item #2"
descriptionText:@"Test item #2 awesome description"
quantity:oneHundredSquareMeters
amountPerUnit:seventeen
discount:tenPercents
taxes:@[thousandKD]];
return @[firstItem, secondItem];
}
Swift
var items: [PaymentItem]? {
let oneUnit = Quantity(value: 1, unitOfMeasurement: .units)
let firstItem = PaymentItem(title: "Test item #1",
quantity: oneUnit,
amountPerUnit: 10)
let oneHundredSquareMeters = Quantity(value: 100,
unitOfMeasurement: .area(.squareMeters))
let tenPercents = AmountModificator(percents: 10)
let thousandMoney = AmountModificator(fixedAmount: 1000)
let thousandKD = Tax(title: "KD 1,000.000",
descriptionText: "This is an example of a tax.",
amount: thousandMoney)
let secondItem = PaymentItem(title: "Test item #2",
descriptionText: "Test item #2 awesome description.",
quantity: oneHundredSquareMeters,
amountPerUnit: 17,
discount: tenPercents,
taxes: [thousandKD])
return [firstItem, secondItem]
}
Taxes
Objective-C
- (NSArray<Tax *> *)taxes {
NSDecimal fifteen = [NSDecimalNumber numberWithDouble:15.0].decimalValue;
AmountModificator *fifteenPercents = [[AmountModificator alloc] initWithPercents:fifteen];
Tax *fifteenPercentsTax = [[Tax alloc] initWithTitle:@"15 percents"
descriptionText:@"Just another fifteen percents."
amount:fifteenPercents];
return @[fifteenPercentsTax];
}
Swift
var taxes: [Tax]? {
let fifteenPercents = AmountModificator(percents: 15)
let fifteenPercentsTax = Tax(title: "15 percents",
descriptionText: "Just another fifteen percents",
amount: fifteenPercents)
return [fifteenPercentsTax]
}
Shipping
Objective-C
- (NSArray<Shipping *> *)shipping {
NSDecimal fiveHundred = [NSDecimalNumber numberWithDouble:500.0].decimalValue;
Shipping *deliveryToHome = [[Shipping alloc] initWithName:@"Delivery"
descriptionText:@"Delivery to Home"
amount:fiveHundred];
return @[deliveryToHome];
}
Swift
var shipping: [Shipping]? {
let deliveryToHome = Shipping(name: "Delivery",
descriptionText: "Delivery to Home",
amount: 500)
return [deliveryToHome]
}
Post URL
Objective-C
- (NSURL *)postURL {
return [NSURL URLWithString:@"https://tap.company/post"];
}
Swift
var postURL: URL? {
return URL(string: "https://tap.company/post")
}
Payment Description
Objective-C
- (NSString *)paymentDescription {
return @"Awesome payment description will be here.";
}
Swift
var paymentDescription: String? {
return "Awesome payment description will be here.";
}
Payment Metadata
Objective-C
- (NSDictionary<NSString *,NSString *> *)paymentMetadata {
return @{@"note": @"some note",
@"internal_linking_id": @"id3424141414"};
}
Swift
var paymentMetadata: [String : String]? {
return [
"note": "some note",
"internal_linking_id": "id3424141414"
]
}
Payment Reference
Objective-C
- (Reference *)paymentReference {
return [[Reference alloc] initWithTransactionNumber:@"tr_2352358020f"
orderNumber:@"ord_2352094823"];
}
Swift
var paymentReference: Reference? {
return Reference(transactionNumber: "tr_2352358020f",
orderNumber: "ord_2352094823")
}
Payment Statement Descriptor
Objective-C
- (NSString *)paymentStatementDescriptor {
return @"Payment statement descriptor will be here";
}
Swift
var paymentStatementDescriptor: String? {
return "Payment statement descriptor will be here"
}
Require 3D Secure
Objective-C
- (BOOL)require3DSecure {
return YES;
}
Swift
var require3DSecure: Bool {
return true
}
Receipt Settings
Objective-C
- (Receipt *)receiptSettings {
return [[Receipt alloc] initWithEmail:YES sms:YES];
}
Swift
var receiptSettings: Receipt? {
return Receipt(email: true, sms: true)
}
Authorize Action
Objective-C
- (AuthorizeAction *)authorizeAction {
AuthorizeAction *captureAfterTwoHours = [AuthorizeAction captureAfterTimeInHours:2];
return captureAfterTwoHours;
}
Swift
var authorizeAction: AuthorizeAction {
return .capture(after: 2)
}
Allows to Save Same Card More Than Once
Objective-C
- (BOOL)allowsToSaveSameCardMoreThanOnce {
return NO;
}
Swift
var allowsToSaveSameCardMoreThanOnce: Bool {
return false
}
Session Delegate
SessionDelegate is an interface which you may want to implement to receive payment/authorization/card saving status updates and update your user interface accordingly when payment window closes.
Below are listed down all available callbacks:
Payment Success Callback
Notifies the receiver that payment has succeed. Can be called only in purchase mode.
Declaration
Objective-C:
- (void)paymentSucceed:(Charge * _Nonnull)charge onSession:(id <SessionProtocol> _Nonnull)session;
Swift:
func paymentSucceed(_ charge: Charge, on session: SessionProtocol)
Arguments
charge: Successful charge object.
session: Session object. It can be either a PayButton or an instance of Session if you are not using PayButton.
Payment Failure Callback
Notifies the receiver that payment has failed. Can be called only in purchase mode.
Declaration
Objective-C:
- (void)paymentFailedWithCharge:(Charge * _Nullable)charge error:(TapSDKError * _Nullable)error onSession:(id <SessionProtocol> _Nonnull)session;
Swift:
func paymentFailed(with charge: Charge?, error: TapSDKError?, on session: SessionProtocol)
Arguments
charge: Charge object that has failed (if reached the stage of charging).
error: An error that has occured (if any).
session: Session object. It can be either a PayButton or an instance of Session if you are not using PayButton.
You may assume that at least one, charge
or error
is not nil
.
Authorization Success Callback
Notifies the receiver that authorization has succeed. Can be called only in authorization mode.
Declaration
Objective-C:
- (void)authorizationSucceed:(Authorize * _Nonnull)authorize onSession:(id <SessionProtocol> _Nonnull)session;
Swift:
func authorizationSucceed(_ authorize: Authorize, on session: SessionProtocol)
Arguments
authorize: Successful authorize object.
session: Session object. It can be either a PayButton or an instance of Session if you are not using PayButton.
Authorization Failure Callback
Notifies the receiver that authorization has failed. Can be called only in authorization mode.
Declaration
Objective-C:
- (void)authorizationFailedWithAuthorize:(Authorize * _Nullable)authorize error:(TapSDKError * _Nullable)error onSession:(id <SessionProtocol> _Nonnull)session;
Swift:
func authorizationFailed(with authorize: Authorize?, error: TapSDKError?, on session: SessionProtocol)
Arguments
authorize: Authorize object that has failed (if reached the stage of authorization).
error: An error that has occured (if any).
session: Session object. It can be either a PayButton or an instance of Session if you are not using PayButton.
You may assume that at least one, authorize
or error
is not nil
.
Card Saving Success Callback
Notifies the receiver that the customer has successfully saved the card. Can be called only in card saving mode.
Declaration
Objective-C:
- (void)cardSaved:(CardVerification * _Nonnull)cardVerification onSession:(id <SessionProtocol> _Nonnull)session;
Swift:
func cardSaved(_ cardVerification: CardVerification, on session: SessionProtocol)
Arguments
cardVerification: Card verification object with the details.
session: Session object. It can be either a PayButton or an instance of Session if you are not using PayButton.
Card Saving Failure Callback
Notifies the receiver that the customer failed to save the card. Can be called only in card saving mode.
Declaration
Objective-C:
- (void)cardSavingFailedWithCardVerification:(CardVerification * _Nullable)cardVerification error:(TapSDKError * _Nullable)error onSession:(id <SessionProtocol> _Nonnull)session;
Swift:
func cardSavingFailed(with cardVerification: CardVerification?, error: TapSDKError?, on session: SessionProtocol)
Arguments
cardVerification: Card verification object with the details (if reached the stage of card saving).
error: Error that has occured. If nil
, please refer to the cardVerification
object for error details.
session: Session object. It can be either a PayButton or an instance of Session if you are not using PayButton.
Card Tokenization Success Callback
Notifies the receiver that card token has successfully created. Can be called only in card tokenization mode.
Declaration
Objective-C:
- (void)cardTokenized:(Token * _Nonnull)token onSession:(id <SessionProtocol> _Nonnull)session customerRequestedToSaveTheCard:(BOOL)saveCard;
Swift:
func cardTokenized(_ token: Token, on session: SessionProtocol, customerRequestedToSaveTheCard saveCard: Bool)
Arguments
token: Token of the card provided by your customer. session: Session object. It can be either a PayButton or an instance of Session if you are not using PayButton. saveCard: Boolean flag which determines whether the customer wants to save the card. Actual card saving process is not happening.
Card Tokenization Failure Callback
Notifies the receiver that card token has failed to be created. Can be called only in card tokenization mode.
Declaration
Objective-C:
- (void)cardTokenizationFailedWithError:(TapSDKError * _Nonnull)error onSession:(id <SessionProtocol> _Nonnull)session;
Swift:
func cardTokenizationFailed(with error: TapSDKError, on session: SessionProtocol)
Arguments
error: Error that has occured. session: Session object. It can be either a PayButton or an instance of Session if you are not using PayButton.
Session Is Starting Callback
Notifies the receiver that session is about to start, but hasn’t yet shown the SDK UI. You might want to use this method if you are not using PayButton
in your application and want to show a loader before SDK UI appears on the screen. Will be called in all modes.
Declaration
Objective-C:
- (void)sessionIsStarting:(id <SessionProtocol> _Nonnull)session;
Swift:
func sessionIsStarting(_ session: SessionProtocol)
Arguments
session: Session object. It can be either a PayButton or an instance of Session if you are not using PayButton.
Session Has Started Callback
Notifies the receiver that session has successfully started and shown the SDK UI on the screen. You might want to use this method if you are not using PayButton
in your application and want to hide a loader after SDK UI has appeared on the screen. Will be called in all modes.
Declaration
Objective-C:
- (void)sessionHasStarted:(id <SessionProtocol> _Nonnull)session;
Swift:
func sessionHasStarted(_ session: SessionProtocol)
Arguments
session: Session object. It can be either a PayButton or an instance of Session if you are not using PayButton.
Session Has Failed to Start Callback
Notifies the receiver that session has failed to start and will not show the SDK UI on the screen. You might want to use this method if you are not using PayButton
in your application and want to hide a loader because the session has failed. For the actual failure cause please implement other methods from this protocol and listen to the callbacks. Will be called in all modes.
Declaration
Objective-C:
- (void)sessionHasFailedToStart:(id <SessionProtocol> _Nonnull)session;
Swift:
func sessionHasFailedToStart(_ session: SessionProtocol)
Arguments
session: Session object. It can be either a PayButton or an instance of Session if you are not using PayButton.
Session Cancel Callback
Notifies the receiver that payment/authorization was cancelled by user. Will be called in all modes.
Declaration
Objective-C:
- (void)sessionCancelled:(id <SessionProtocol> _Nonnull)session;
Swift:
func sessionCancelled(_ session: SessionProtocol)
Arguments
session: Session object. It can be either a PayButton or an instance of Session if you are not using PayButton.
Session Appearance
You might want to implement SessionAppearance
protocol if you need some UI customization to match your user interface and provide great user experience.
Please refer to SessionAppearance
class documentation to see what kind of customization is currently available.
Sample
Sample application integration is available in Example folder.
Documentation
Documentation is available at github-pages.
Also documented sources are attached to the library.


One of the things I knew well enough to pass an exam on, but not well enough to actually understand what it meant was the concept of changing basis in linear algebra. This is an attempt to remedy that.
A basis for a vector space \(V\) of dimension \(n\) is a sequence of \(n\) vectors \((v_1, v_2, \dots, v_n)\) such that all vectors in \(V\) can be uniquely expressed as linear combinations of the basis vectors. Often calculations in one basis can be simplified if we change our basis to something else.
For example, if we wish to work with a vector \(\vec v\) with respect to the standard basis vectors \(\vec x = \begin{pmatrix} 1 \\ 0 \\ 0 \end{pmatrix}\), \(\vec y = \begin{pmatrix} 0 \\ 1 \\ 0 \end{pmatrix}\) and \(\vec z = \begin{pmatrix} 0 \\ 0 \\ 1 \end{pmatrix}\), we know how to do that. Here's a graph of some random vector \(\vec v\).
What if we want to rotate our coordinate system by some Euler angles \(\alpha\), \(\beta\), and \(\gamma\)? This is what changing the basis really is. To rotate a vector \(\vec v\) given some Euler angles, multiply \(\vec v\) by the following transition matrix \(P\) taken from the \(Z_1 Y_2 X_3\) entry of this table. Source .
\[P = \begin{pmatrix} \cos \alpha \cos \beta & \cos \alpha \sin \beta \sin \gamma - \sin \alpha \cos \gamma & \cos \alpha \sin \beta \cos \gamma + \sin \alpha \sin \gamma \\ \sin \alpha \cos \beta & \sin \alpha \sin \beta \sin \gamma + \cos \alpha \cos \gamma & \sin \alpha \sin \beta \cos \gamma - \cos \alpha \sin \gamma \\ - \sin \beta & \cos \beta \sin \gamma & \cos \beta \cos \gamma \end{pmatrix}\]
With the Euler angles from the following diagram:
We get a new vector \(v' = P v\) that, with respect to the new coordinate system, is the same as \(\vec v\).
In the first image, \(\vec x\), \(\vec y\), and \(\vec z\) form the basis for the vector space. In the second image, \(\vec{x'}\), \(\vec{y'}\), and \(\vec{z'}\) form the basis for the new, rotated, vector space.
To convert a vector \(\vec v\) w.r.t. the standard basis to a vector \(\vec{v'}\) w.r.t. a new basis \(\{\vec{u_1}, \vec{u_2}, \dots, \vec{u_n}\}\) we multiply \(\vec v\) by the matrix \(U\) formed by \(U = (\vec{u_1}, \vec{u_2}, \dots, \vec{u_n})\). That is,
\[\vec{v'} = U \cdot \vec v\]
To convert a vector \(\vec v\) w.r.t. a basis \(\{\vec{u_1}, \vec{u_2}, \dots, \vec{u_n}\}\) to the standard basis, we multiply \(\vec v\) by the matrix \(U^{-1}\). That is,
\[\vec{v'} = U^{-1} \cdot \vec v\]
In general, to convert a vector \(\vec v\) w.r.t. a basis \(V\) to a vector \(\vec{v'}\) in a basis \(U\) formed by \(U = (\vec{u_1}, \vec{u_2}, \dots, \vec{u_n})\) and \(V = (\vec{v_1}, \vec{v_2}, \dots, \vec{v_n})\), we multiply \(\vec v\) by the transition matrix \(U^{-1} V\). That is,
\[\vec{v'} = U^{-1} V \cdot \vec v\]
In particular, we can use rotation matrices as transition matrices to rotate our basis by some angle(s). The real trick is to find an appropriate transition matrix, the actual change of basis isn't too bad.


Your Start to a Healthy Future Begins with a Physical Exam
By Donald Berwick, M.D., Administrator, Centers for Medicare & Medicaid Services
If you’re new to Medicare, take charge of your health and wellness with a thorough physical exam.
Getting an in-depth physical exam is a smart and easy way for you and your doctor to set a starting point for your personalized health care. It’s your roadmap for effective, efficient and timely health care, and it will help lower our healthcare system’s per-person costs.
Medicare covers two types of physical exams—one when you’re new to Medicare and one each year after that.
"Welcome to Medicare" physical exam
Medicare covers a one-time "Welcome to Medicare" physical exam if you get it within the first 12 months you have Part B. Beginning in 2011, you can get this exam for free if your doctor accepts assignment.
Your comprehensive “Welcome to Medicare” physical exam includes:
- A review of your medical and social history including risk factors you can change
- A physical exam that includes measuring your height, weight, blood pressure, visual acuity screen, and body mass index
- Education, counseling, and referrals based on the results of your physical exam
- A brief written plan, such as a checklist, for getting appropriate screening and/or other Medicare Part B preventive services
- A review of your potential risk factors for depression
Thanks to the new healthcare law, Medicare also covers a yearly “wellness” exam (once you’ve had Part B for longer than 12 months and if it has been at least 12 months from your “Welcome to Medicare” physical examination) which will help you develop or update a prevention plan, based on your current health and risk factors. You’ll pay nothing for the exam as long as your doctor accepts assignment (agrees to be paid directly by Medicare and accepts the amount Medicare approves for the service).
So get the most from your new Medicare benefits and stay in control of your health: Don’t delay. Schedule your physical exam today!
NOTE: This blog was updated on January 5, 2011.


The staff maintain several instructional computing laboratories in B-Block which are open to students in the department. These labs may be reserved by members of the IAAU for instructional purposes. When not in use for instruction, these classrooms are open as walk-in computing facilities.
The Electronic Lab is operated by the Department of Industrial Electronics under the Faculty of New technology, and is used for laboratory classes and research, personal study.
Applied Mathematics Lab is operated by the Department of Applied Mathematics under the Faculty of New technology, and is used for laboratory classes and research, personal study.
The Network Lab is operated by the Department of Computer Engineering under the Faculty of New technology, and is used for laboratory classes and research, personal study.
The Software Development Lab is operated by the Department of Computer Engineering under the Faculty of New technology, and is used for laboratory classes and research, personal study.
The Electronics Lab is operated by the Department of Industrial Electronics under the Faculty of New technology, and is used for laboratory classes and research, personal study.
The Smart Class is operated by the Department of Computer Science under the Faculty of New Technologies, used for Distance Learning, Online Seminars, Collaboration courses and Teleconferences.


felp
is a short of functional help, and provides
fuzzyhelp
function or “Fuzzy Search on R Help” RStudio Addin?.
pseudo-post fix operator to simultaneously display a help document and a structure of an object?p
pseudo-post fix operator to display document of a packageand more in Syntax and Get started
install.packages("felp")
source("https://install-github.me/atusy/felp")


--- title: Contact permalink: /contact/ eleventyNavigation: key: contact title: Contact order: 9 includeInHeaderNav: true ---
Please use the contact form on GreenAsh to contact me. Thanks.


Edit Profile
×
This is an
.alert
. Use this to show important messages to the user.
Personal info
First name:
Last name:
Company:
Email:
Username:
Describe Your role
Patient
Doctor


Kalos is an IOT solution to a growing problem of spinal injuries in the weight room. Training while maintaining form is the only way to get the most out of an exercise and any compromise in that form will detract from the goal of working out. Many users were surveyed and consulted about this issue and using this feedback requirements were set. From these requirements the initial design was wrought and tested. Upon further improvement, Kalos tracks not only the uses form but also the reps and performance statistics of the exercise. Kalos consists of a pressure plate that measures the force distribution of the user and an IMU to track their form. Both these data sets combined feedback to the user on the quality of their workout.


Motey - Services
A list of all deployed services.
Motey
Services
Registered nodes
Send blueprint
Welcome to Motey
ID
Name
Action
Node Type
State
State Message
{{ service.id }}
{{ service.name }}
{{ service.action }}
{{ service.node_type }}
{{ service.state }}
{{ service.state_message }}
ID
URL
{{ index + 1 }}
{{ node.ip }}
Blueprint YAML:
send


19kka
About
Blog
Blog
19kka's blog
SS Panel
02 December 2016
SimpleTunnel Debug
17 November 2016
Shellsort
17 October 2016
SOCKS5 RFC1928
22 July 2016
ssh-copy-id
26 May 2016
life -
26 May 2016
iOS Review CheckList
26 May 2016
iOS Bulid Tips
15 May 2016
Phabricator on Mac
15 April 2016
Nas on linux(bananapi)
15 February 2016
Writing Images on MacOS
15 February 2016
在真实的世界的WebRTC (一)（译）
16 November 2015
Network Extension API
04 November 2015
Network Extension 01 iOS9
22 October 2015
Using protocol buffers in socket(Python)
13 October 2015
python tips
09 October 2015
build protobuf on Mac
08 October 2015
tsocks on Mac
28 September 2015
*****
Explore the different categories
Design
Tools
Productivity
All


One beautiful spring day, a red rose blossomed in a forest. As the rose looked around, a pine tree nearby said, “What a beautiful flower! I wish I was that lovely.” Another tree said, “Dear pine, do not be sad, we cannot have everything.”
The rose turned and remarked, “It seems that I am the most beautiful flower in this forest.”
A sunflower raised its yellow head and asked, “Why do you say that? In this forest there are many beautiful flowers. You are just one of them.”
The red rose replied, “I see everyone looking at me and admiring me.”
The pine tree said, “Red rose, what kind of talk is this? You have thorns too.”
The proud red rose looked angrily at the pine and said, “I thought you had good taste! You do not know what beauty is at all. You cannot compare my thorns to that of the cactus.”
“What a proud flower!” The trees thought.
The rose tried to move its roots away from the cactus, but it could not move. As the days passed, the red rose would look at the cactus and say insulting things, like 'this plant is useless’, ‘I am sorry to be his neighbour'.
The cactus never got upset and he even tried to advise the rose, saying, “God did not create any form of life without a purpose.”
Spring passed, and the weather became very warm. Life became difficult in the forest, as there was no rain. The red rose began to wilt.
One day, the rose saw sparrows stick their beaks into the cactus and then fly away, refreshed. This was puzzling, and the red rose asked the pine tree what the birds were doing. The pine tree explained that the birds were getting water from the cactus.
“Doesn’t it hurt when they make holes?” asked the rose.
“Yes, but the cactus does not like to see any birds suffer,” replied the pine.
The rose opened its eyes in wonder and exclaimed, “The cactus has water!”
“Yes, you can also drink from it. The sparrows can bring water to you if you ask the cactus for help.”
The red rose felt too ashamed to ask for water from the cactus, but finally it did ask for help. The cactus kindly agreed. The birds filled their beaks with water and watered the rose’s roots.
Thus the rose learned a lesson and never judged anyone by their appearance again.


Faculty management
| Name | Cell phone | Character | Class | WeChat Follow Status | Alipay attention status | operating | |
|---|---|---|---|---|---|---|---|
| Li Yufei | Cheng Yanan/186****3595 | Fengcheng Dianshi Kindergarten | Toban (2) class | Not followed | Not followed | ||
| Li Yufei | Cheng Yanan/186****3595 | Fengcheng Dianshi Kindergarten | Toban (2) class | Not followed | Not followed | ||
| Li Yufei | Cheng Yanan/186****3595 | Fengcheng Dianshi Kindergarten | Toban (2) class | Not followed | Not followed | ||
| Li Yufei | Cheng Yanan/186****3595 | Fengcheng Dianshi Kindergarten | Toban (2) class | Not followed | Not followed |


Document Template
Filter By Name:
Search
Only Top 50 Records will be shown.
Name
DocumentType
AssociatedEntityTypeCode
Download
Uploading...