The module marching_front.py
defines a function select_by_flooding
that takes as input an array Ztopo
containing topography elevations on a rectangular grid and returns an array pt_chosen
of the same shape with values 1 (if chosen) or 0 (if not chosen). Other inputs specify the criteria used to choose points, as described below.
The basic idea is that chosen points satisfy certain elevation requirements along with connectivity to the coast. This was originally developed to identify points in a topography DEM where the topography value $Z$ is below MHW, but that should be initialized as dry land because they are in regions protected by dikes or levies. In this situation, the marching algorithm is used by initializing points well offshore (e.g. with $Z < -5$ meters) as wet and other points to unset. Then the front between wet/unset points is advanced by marking neighboring points as dry if $Z\geq0$ or as wet if $Z<0$. This is repeated iteratively for each new front until there are no more wet points with unset neighbors. At this point any points still unset are entirely buffered by dry points and must lie behind dikes, so these are also set to dry.
Other applications are also described below along with some examples.
The main function in the marching_front.py
module is select_by_flooding
.
The function is defined by:
def select_by_flooding(Ztopo, mask=None, prev_pts_chosen=None,
Z1=-5., Z2=0., max_iters=None, verbose=False):
If Z1 <= Z2
then points where Ztopo <= Z1
are first selected and
then a marching algorithm is used to select neighboring points that
satisfy Ztopo <= Z2
.
Think of chosen points as "wet" and unchosen points as "dry"
and new points are flooded if at least one neighbor is "wet" and
the topography is low enough. Starting from deep water (e.g. Z1 = -5
)
this allows flooding up to MHW (Z2 = 0
) without going past dikes that
protect dry land with lower elevation.
However, this can also be called with Z1 > Z2
, in which case points
where Ztopo >= Z1
are first selected and then the marching algorithm is
used to select neighboring points that satisfy Ztopo >= Z2
.
This is useful to select offshore points where the water is shallow,
(and that are connected to the shore by a path of shallow points)
e.g. to identify points on the continental shelf to set up a
flag region for refinement.
If max_iters=None
then iterate to convergence.
Otherwise, at most max_iters
iterations are taken, so setting
this to a small value only selects points within this many grid
points of where Ztopo <= Z1
, useful for buffering or selecting a few
onshore points along the coast regardless of elevation.
If prev_pts_chosen
is None we are starting from scratch, otherwise
we possibly add additional chosen points to an existing array.
Points where prev_pts_chosen[i,j]==1
won't change but those ==0
may be
changed to 1 based on the new criteria.
If mask==None
or mask==False
then the entire array is subject to
selection. If mask
is an array with mask[i,j]==True
at some points,
then either:
pts_chosen[i,j]=0
)
if prev_pts_chosen==None
, orprev_pts_chosen
is an
array (so previous 0/1 values are preserved).These arguments are described in more detail below with examples of how they might be used.
The function returns an array pt_chosen
with the same shape as Ztopo
and has the value 1 at points chosen and 0 at points not chosen.
This array can be used to define a masked array from Ztopo
that masks out the points not chosen via:
from numpy import ma # masked array module
Zmasked = ma.masked_array(Ztopo, mask=logical_not(pt_chosen))
This could be used to plot only the points chosen using the matplotlib function pcolormesh
, for example, or the function we have defined in plottools.pcolorcells
that better plots finite volume grid cell data with proper alignment and boundary cells. See pcolorcells.html.
The array pt_chosen
can be used to create a file that is read in by GeoClaw to identify points where Ztopo
is below MHW but where there is dry land because of protection by dikes or levies. This is done by defining a geoclaw.topotools.Topography
object and setting its Z
attribute based on pt_chosen
, and then writing this as a topofile with topo_type==3
. Then in setrun.py
this file can be specified as a mask that is read in and used when initializing grid cells. There are some subtleties in how this is done, described in more detail in ForceDry.html.
The chosen points might be used as fgmax points, as described below.
The output array could also be used to define an AMR flag region as a ruled rectangle, using the function region_tools.ruledrectangle_covering_selected_points
described in RuledRectangles.html. This would give a minimal ruled rectangle covering all the chosen points. An example is given below.
mask
argument¶mask
can be False
or None
, or else must be an array of the same shape as Ztopo
.
The Ztopo
array input must be a rectangular array, but sometimes we want to select points covering only a subset of these points, e.g. when defining fgmax points along some stretch of coastline. In this case mask
can be used to mask out values we do not want to select. Set mask[i,j] = True
at points that should not be chosen.
To mask out points that lie outside some ruled rectangle that has been defined as rr
, you can use the rr.mask_outside
function to define the mask. See RuledRectangles.html.
previous_pts_chosen
argument¶This argument is useful if you want to apply a sequence of different criteria to choose points. For example, suppose you first want to choose all grid points within 5 points of the coast (as can be done using max_iters
) and then supplement this will all grid points below a specified elevation that are farther inland from the coast.
Examples are given below, also of how the mask
array works in conjunction with previous_pts_chosen
.
First import some needed modules and set up color maps.
%matplotlib inline
from pylab import *
import os,sys
from numpy import ma # masked arrays
from clawpack.visclaw import colormaps
from clawpack.geoclaw import topotools
sys.path.insert(0,'../new_python')
import region_tools, marching_front
from plottools import pcolorcells
zmin = -60.
zmax = 40.
land_cmap = colormaps.make_colormap({ 0.0:[0.1,0.4,0.0],
0.25:[0.0,1.0,0.0],
0.5:[0.8,1.0,0.5],
1.0:[0.8,0.5,0.2]})
sea_cmap = colormaps.make_colormap({ 0.0:[0,0,1], 1.:[.8,.8,1]})
cmap, norm = colormaps.add_colormaps((land_cmap, sea_cmap),
data_limits=(zmin,zmax),
data_break=0.)
sea_cmap_dry = colormaps.make_colormap({ 0.0:[1.0,0.7,0.7], 1.:[1.0,0.7,0.7]})
cmap_dry, norm_dry = colormaps.add_colormaps((land_cmap, sea_cmap_dry),
data_limits=(zmin,zmax),
data_break=0.)
We consider a small region on the SW coast of Whidbey Island north of Maxwelton Beach as an example:
region1_png = imread('region1.png')
extent = [-122.46, -122.38, 47.93, 47.96]
figure(figsize=(12,6))
imshow(region1_png, extent=extent)
gca().set_aspect(1./cos(48*pi/180.))
We read this small portion of the 1/3 arcsecond Puget Sound DEM, available from the NCEI thredds server:
path = 'https://www.ngdc.noaa.gov/thredds/dodsC/regional/puget_sound_13_mhw_2014.nc'
topo = topotools.read_netcdf(path, extent=extent)
figure(figsize=(12,6))
pcolorcells(topo.X, topo.Y, topo.Z, cmap=cmap, norm=norm)
colorbar(extend='both')
gca().set_aspect(1./cos(48*pi/180.))
This plot shows that there is a region with elevation below MHW (0 in the DEM) where the Google Earth image shows wetland that should not be initialized as a lake. We will tackle this problem below, but first we show how to choose only the DEM points that are close to the shore and/or below a given elevation.
First we choose all points with elevation below 15 m and that are connected to the coast over this topography extent. Note the latter requirement will eliminate the low lying area at the bottom of the figure above near longitude -122.4 (which is connected to the coast through Cultus Bay, but not by points in this extent).
pts_chosen = marching_front.select_by_flooding(topo.Z, Z1=0, Z2=15., max_iters=None)
Zmasked = ma.masked_array(topo.Z, logical_not(pts_chosen))
figure(figsize=(12,6))
pcolorcells(topo.X, topo.Y, Zmasked, cmap=cmap, norm=norm)
colorbar(extend='both')
gca().set_aspect(1./cos(48*pi/180.))
To select more points along the shore where the topography is steep, we could have first used max_iters
.
To illustrate this, we start again and fist use max_iters = 20
so that at least 20 grid points are selected near the coast, also setting Z2 = 1e6
(a huge value) so that the arbitrarily high regions will be included if they are within 20 points of the coast:
pts_chosen = marching_front.select_by_flooding(topo.Z, Z1=0, Z2=1e6, max_iters=20)
Plot what we have so far:
Zmasked = ma.masked_array(topo.Z, logical_not(pts_chosen))
figure(figsize=(12,6))
pcolorcells(topo.X, topo.Y, Zmasked, cmap=cmap, norm=norm)
colorbar(extend='both')
gca().set_aspect(1./cos(48*pi/180.))
Then we augment the points already chosen with any points below 15 m and connected to the coast:
pts_chosen = marching_front.select_by_flooding(topo.Z, Z1=0, Z2=15.,
prev_pts_chosen=pts_chosen,
max_iters=None)
Zmasked = ma.masked_array(topo.Z, logical_not(pts_chosen))
figure(figsize=(12,6))
pcolorcells(topo.X, topo.Y, Zmasked, cmap=cmap, norm=norm)
colorbar(extend='both')
gca().set_aspect(1./cos(48*pi/180.))
We can set Z1 = 0
and Z2 = -15
to select points that have elevation greater than -15 m and are connected to the coast:
pts_chosen_shallow = marching_front.select_by_flooding(topo.Z, Z1=0, Z2=-15., max_iters=None)
Zshallow = ma.masked_array(topo.Z, logical_not(pts_chosen_shallow))
figure(figsize=(12,6))
pcolorcells(topo.X, topo.Y, Zshallow, cmap=cmap, norm=norm)
colorbar(extend='both')
gca().set_aspect(1./cos(48*pi/180.))
Note that this chooses all onshore points in addition to offshore points with elevation greater than -15 m.
We can take the intersection of this set of points with the onshore points previously chosen to get only the points that lie near the coast:
pts_chosen_nearshore = logical_and(pts_chosen, pts_chosen_shallow)
Znearshore = ma.masked_array(topo.Z, logical_not(pts_chosen_nearshore))
figure(figsize=(12,6))
pcolorcells(topo.X, topo.Y, Znearshore, cmap=cmap, norm=norm)
colorbar(extend='both')
gca().set_aspect(1./cos(48*pi/180.))
One we have selected the desired fgmax points, these can be output in the style of a topo_type=3
topography file, with a header followed point values at all points on a uniform grid. The values are simply the integer 1 for points that should be used as fgmax points and 0 for other points. Note that format %1i
is used for compactness.
fname_fgmax_mask = 'fgmax_pts_topostyle.data'
topo_fgmax_mask = topotools.Topography()
topo_fgmax_mask._x = topo.x
topo_fgmax_mask._y = topo.y
topo_fgmax_mask._Z = where(pts_chosen_nearshore, 1, 0) # change boolean to 1/0
topo_fgmax_mask.generate_2d_coordinates()
topo_fgmax_mask.write(fname_fgmax_mask, topo_type=3, Z_format='%1i')
print('Created %s' % fname_fgmax_mask)
This file fgmax_pts_topostyle.data
can then be read into GeoClaw, using the new capability of specifying fgmax grids in this manner, using point_style == 4
as described in FGmaxGrids.html.
Once a set of points has been selected, it can be used to define a ruled rectangle that might be used as an adaptive mesh refinement flag region, for example. See RuledRectangles.html and FlagRegions.html.
You might want to try both ixy = 'x'
and ixy = 'y'
in creating the ruled rectangle to see which one covers fewer non-selected points. In this case ixy = 'x'
is better:
figure(figsize=(12,5))
subplot(121)
rr = region_tools.ruledrectangle_covering_selected_points(topo.X, topo.Y, pts_chosen_nearshore,
ixy='x', method=0,
padding=0, verbose=True)
xv,yv = rr.vertices()
pcolorcells(topo.X, topo.Y, Znearshore, cmap=cmap, norm=norm)
axis([-122.47, -122.40, 47.925, 47.965])
gca().set_aspect(1./cos(48*pi/180.))
plot(xv, yv, 'r')
title("With ixy = 'x'")
subplot(122)
rr = region_tools.ruledrectangle_covering_selected_points(topo.X, topo.Y, pts_chosen_nearshore,
ixy='y', method=0,
padding=0, verbose=True)
xv,yv = rr.vertices()
pcolorcells(topo.X, topo.Y, Znearshore, cmap=cmap, norm=norm)
axis([-122.47, -122.40, 47.925, 47.965])
gca().set_aspect(1./cos(48*pi/180.))
plot(xv, yv, 'r')
title("With ixy = 'y'")
Note the blue region in the above plot that is inland from the coast and behind a green barrier. Examining Google Earth shows that this is wetland area that probably should not be initialized as a lake. We can identify this by using the marching front algorithm to start at Z1 = -5
m and fill in up to Z2 = 0
(MHW).
wet_points = marching_front.select_by_flooding(topo.Z, Z1=-5., Z2=0., max_iters=None)
Zdry = ma.masked_array(topo.Z, wet_points)
figure(figsize=(12,6))
pcolorcells(topo.X, topo.Y, Zdry, cmap=cmap, norm=norm)
colorbar(extend='both')
gca().set_aspect(1./cos(48*pi/180.))
title('Dry land')
Now the blue region above is properly identified as being dry land.
The notebook ForceDry.html contains more discussion of this example and shows how to create an array to provide to GeoClaw to indicate that this region should be initialized as dry in spite of being below MHW.
Back to Index.html or continue to next notebook, FGmaxGrids.html.


快速入门
Deploy Bookinfo and Manage Traffic
Istio, as an open-source service mesh solution, provides powerful features of traffic management for microservices. Here is the introduction of traffic management from the official website of Istio:
Istio’s traffic routing rules let you easily control the flow of traffic and API calls between services. Istio simplifies configuration of service-level properties like circuit breakers, timeouts, and retries, and makes it easy to set up important tasks like A/B testing, canary rollouts, and staged rollouts with percentage-based traffic splits. It also provides out-of-box failure recovery features that help make your application more robust against failures of dependent services or the network.
KubeSphere provides three kinds of grayscale strategies based on Istio, including blue-green deployment, canary release and traffic mirroring.
Among others, a canary release represents an effective software development strategy in which a new version is deployed for testing with the base version preserved in the production environment. This strategy will bring part of the traffic to the new version being tested and the production release takes up the rest.
Objective
In this tutorial, you will learn how to deploy a sample application Bookinfo composed of four separate microservices and use the traffic management feature of KubeSphere to publish a new version.
Prerequisites
-
You need to enable KubeSphere Service Mesh.
-
You need to finish all tasks in Create Workspace, Project, Account and Role.
-
You need to enable Application Governance. To do so, follow the steps below:
Log in the console as
project-admin
and go to your project. Navigate to Advanced Settings under Project Settings, click Edit, and select Edit Gateway. In the dialog that appears, flip on the toggle switch next to Application Governance.
备注
nginx.ingress.kubernetes.io/service-upstream: true
) is added for your route (Ingress) if the route is inaccessible.Estimated Time
About 20 minutes.
What is Bookinfo Application
The Bookinfo application is composed of four separate microservices as shown below. There are three versions of the reviews microservice.
- The productpage microservice calls the details and reviews microservices to populate the page.
- The details microservice contains book information.
- The reviews microservice contains book reviews. It also calls the ratings microservice.
- The ratings microservice contains book ranking information that accompanies a book review.
The end-to-end architecture of the application is shown below. See Bookinfo Application for more details.
Hands-on Lab
Task 1: Deploy Bookinfo
- Log in the console as
project-regular
and enter demo-project. Navigate to Applications under Application Workloads, and click Deploy Sample Application on the right.
- Click Next in the dialog that appears where required fields are pre-populated and relevant components are already set. You do not need to change the setting and just click Create in the final page (Internet Access).
- In Workloads, make sure the status of all four deployments displays
running
, which means the app has been created successfully.
备注
Task 2: Access Bookinfo
- In Applications, go to Composing App and click the app
bookinfo
to see its detailed information.
备注
- In the detail page, record the hostname and port number of the app which will be used to access Bookinfo.
- As the app will be accessed outside the cluster via NodePort, you need to open the port in the image above (in this case, the port number is 32277) in your security group for outbound traffic and set any port forwarding rules if necessary.
- Edit your local host file (
/etc/hosts
) by adding an entry in it to map the hostname to the public IP address. For example:
# {Public IP} {hostname}
<IP_ADDRESS> productpage.demo-project.<IP_ADDRESS>.nip.io
警告
- When you finish, click the button Click to visit to access the app.
- In the app detail page, click Normal user in the bottom-left corner.
- In the image below, you can notice that only Reviewer1 and Reviewer2 are displayed without any stars in the Book Reviews section. This is the status of this app version. In the task below, you can see a different UI appearance through a canary release.
Task 3: Create Canary Release
- Go back to KubeSphere console and select Grayscale Release. Click Create Canary Release Job and you will be directed to Grayscale Release section of the project. Select Canary Release and click Create Job.
- Add a name (e.g.
canary-release
) and click Next. Select reviews as the component to roll out a change and click Next.
- In the next dialog, enter
v2
as Grayscale Release Version Number and change the image tokubesphere/examples-bookinfo-reviews-v2:1.13.0
(v1
changed tov2
). Click Next to continue.
- The canary release supports two release strategies: Forward by traffic ratio and Forward by request content. In this tutorial, please select Forward by traffic ratio and set the same traffic ratio for v1 and v2 (50% each). You can click the icon in the middle and move leftwards or rightwards to change the traffic ratio. Click Create to finish the setting.
- The job created will display in Job Status.
Task 4: Verify Canary Release
Visit the Bookinfo website again and refresh your browser repeatedly. You will be able to see the Book Reviews section switched between v1 and v2 at a rate of 50%.
Task 5: View Network Topology
- Execute the following command in the machine where KubeSphere runs to bring in real traffic to simulate the access to Bookinfo every 0.5 seconds.
watch -n 0.5 "curl http://productpage.demo-project.<IP_ADDRESS>.nip.io:32277/productpage?u=normal"
备注
- In Traffic Management, you can see communications, dependency, health and performance among different microservices.
- Click a component (e.g. reviews) and you can see the information of traffic monitoring on the right, displaying real-time data of Traffic, Success rate and Duration.
Task 6: View Tracing Details
KubeSphere provides the distributed tracing feature based on Jaeger, which is used to monitor and troubleshoot microservices-based distributed applications.
- In Tracing tab, you can clearly see all phases and internal calls of requests, as well as the period in each phase.
- Click any item, and you can even drill down to see request details and where this request is being processed (which machine or container).
Task 7: Take Over All Traffic
With the canary release, you can test the new version online by bringing in part of the actual traffic and collect user feedback. If everything runs smoothly without any issues, you can bring all the traffic to the new version.
- In Grayscale Release, click the canary release job.
- In the dialog that appears, click the three dots of reviews v2 and select Take Over. It means 100% of the traffic will be sent to the new version (v2).
备注
- Open the Bookinfo page again and refresh the browser several times. You can find that it only shows the result of reviews v2 (i.e. ratings with black stars).
Task 8: Remove the Old Version
Now that the new version v2 takes over all the traffic successfully, you can remove the old version and release the resources of v1 based on your needs.
警告
- In Grayscale Release, click the canary release job.
- In the dialog that appears, click Job offline to remove the old version.
The above tasks serve as a example of how to adopt a canary release to control traffic and publish a new version of your app. You can also try different strategies in Grayscale Release or see related sections in Project Administration and Usage.


ScaleMaterial()
Syntax
ScaleMaterial(#Material, x, y [, Layer])Description
Scales the material. The parameters 'x' and 'y' are scale factors.
Parameters
#Material The material to use. x, y The scale factors (the current material size is multiplied by these values):
- a value of 1.0 means that the size isn't changed
- a value between 0.0 and 1.0 means that the material is scaled down (ie: a scale of 0.5 will be half the size)
- a value above 1.0 means that the material is scaled up (ie: a scale of 2.0 will double the size)
Layer (optional) The layer to scale. The first layer is zero. If this parameter is omitted, the layer zero is scaled.
Return value
None.
Remarks
To get the current scale values, use GetMaterialAttribute().
See Also
GetMaterialAttribute()
Supported OS
All


NCP's Nawab Malik mocks Amit Shah: Sharad Pawar defeated so-called Chanakya
As a prospective governing coalition between the Shiv Sena, the NCP and the Congress takes shape in Maharashtra, a senior NCP says his leader has got the better of the BJP president.
HIGHLIGHTS
- NCP's Nawab Malik mocks BJP chief Amit Shah in tweet
- NCP, 2 more parties working on alliance excluding BJP
- Maharashtra currently under President's Rule
The chief of the Nationalist Congress Party's (NCP) Mumbai unit mocked Amit Shah in a Friday morning tweet as an governing alliance excluding the BJP took shape in Maharashtra.
"At last, the so-called Chanakya of Indian politics has been defeated by Sharad Pawar sahab," Nawab Malik, a spokesperson for the NCP, tweeted.
Sharad Pawar is the chief of the NCP.
The prospective coalition taking shape includes the Shiv Sena, the NCP and the Congress.
Sena was originally allied with the BJP; they won last month's state election together but fell out, unable to agree about sharing the chief minister's job using a rotation policy.
Maharashtra is currently under President's Rule.
Now, Shiv Sena leader Sanjay Raut says his party wants Uddhav Thackeray in the job.
At a meeting with Thackeray late on Thursday night, Sharad Pawar is said to have urged him to helm the prospective government.
All three alliance partners are expected to meet today.


User Data
Email:
Forename:
Surname:
Email
Forename
Surname
Delete
Edit
{{user.email}}
{{user.forename}}
{{user.surname}}
Delete
Edit
Edit User Data
Email
:
Forename
:
Surname
:
Okay


|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.inovex.android.test.zomby.core.CoreNetwork
public class CoreNetwork
| Nested Class Summary | |
|---|---|
static class |
CoreNetwork.Latency
latency of the network connection |
static class |
CoreNetwork.NetworkSpeed
network speed on the device, where it is one of the following |
| Constructor Summary | |
|---|---|
CoreNetwork()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CoreNetwork()
| Method Detail |
|---|
public void speed(CoreNetwork.NetworkSpeed speed) throws ZombyException
CoreNetwork.NetworkSpeed.GSM
,
CoreNetwork.NetworkSpeed.HSCSD
,
CoreNetwork.NetworkSpeed.HSCSD
,
CoreNetwork.NetworkSpeed.GPRS
,
CoreNetwork.NetworkSpeed.UMTS
,
CoreNetwork.NetworkSpeed.HSDPA
,
CoreNetwork.NetworkSpeed.FULL
speed
- selects both upload and download speed
ZombyException
public void speed(CoreNetwork.NetworkSpeed upSpeed, CoreNetwork.NetworkSpeed downSpeed) throws ZombyException
network on the device, where speed is one of the following
CoreNetwork.NetworkSpeed.GSM
,
CoreNetwork.NetworkSpeed.HSCSD
,
CoreNetwork.NetworkSpeed.HSCSD
,
CoreNetwork.NetworkSpeed.GPRS
,
CoreNetwork.NetworkSpeed.UMTS
,
CoreNetwork.NetworkSpeed.HSDPA
,
CoreNetwork.NetworkSpeed.FULL
upSpeed
- upload speeddownSpeed
- download speed
ZombyException
public void delay(CoreNetwork.Latency latency) throws ZombyException
latency
-
ZombyException
public void startCapture(java.lang.String file) throws ZombyException
file
.
file
- name of capture file
ZombyException
public void stopCapture() throws ZombyException
ZombyException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


Light Hunter
Audio
Mask
Audio
Volume
Red
Change...
Play
Yellow
Change...
Play
Green
Change...
Play
Mask
Opacity
Red
Chess
Vertical
Oblique
Yellow
Chess
Vertical
Oblique
Green
Chess
Vertical
Oblique


s6
Software
skarnet.org
The s6-instance-delete program
s6-instance-delete deletes an existing instance of a currently supervised
instanced service.
Interface
s6-instance-delete [ -X ] [ -t timeout ] servicedir name
- s6-instance-delete expects a running, supervised
instanced service in servicedir,
as well as an existing instance of this service named name
(it doesn't matter if the instance is up or down).
- It deletes the name instance.
- It exits 0.
Exit codes
- 0: success
- 100: wrong usage
- 111: system call failed
Options
- -X : don't wait. s6-instance-delete will exit right away,
without waiting for the instance (and its supervisor) to properly disappear.
- -t timeout : if the instance supervisor has not exited
after timeout milliseconds, s6-instance-delete will still exit.
By default, timeout is 0, which means no time limit.
Notes
- s6-instance-delete is similar to
s6-svunlink, because it uses the same underlying
library functions. Under the hood, an instance is a regular service running
on a supervision tree that is specific to the instanced service, and
s6-instance-delete removes a service directory from that tree.
- If the template for the service is logged, then s6-instance-delete will
delete both the instance and its logger.
- s6-instance-delete and s6-instance-create
are relatively expensive operations, because they have to recursively copy or
delete directories and use the synchronization mechanism
with the instance supervisor, compared to
s6-instance-control which only has to send
commands to already existing supervisors. If you are going to turn instances on and
off on a regular basis, it is more efficient to keep the instance existing and control
it with s6-instance-control than it is to
repeatedly create and delete it.


--- layout: default title: Credits ---
These are the things that I used to make and run this website


--- layout: post authors: ["Greg Wilson"] title: A List of Bioinformatics Courses date: 2012-10-30 time: "09:00:00" tags: ["Community", "Noticed"] ---
Titus Brown is compiling a list of bioinformatics courses. If you know one that should be added, he'd enjoy hearing from you.


EDUCATION
As a township developer, Matrix intends to continue to leverage on our proven track record and the
establishment of award-winning brand name of our Sendayan Developments to tap the growing lifestyle
trend among urbanites to reside in the suburbs with good infrastructure and convenient accessibility and
connectivity.


Flow Cytometry Data Reader and Plotting Example
Flow cytometry is a method for quantitating components or structural features of cells primarily by optical means. Although it makes measurements on one cell at a time, it can process thousands of cells in a few seconds. Since different cell types can be distinquished by quantitating structural features, flow cytometry can be used to count cells of different types in a mixture[1].
Contents
Importing Data
The standard output of a flow cytometry machine is an FCS file. This is somehow related to FACS (Fluorescence-Activated Cell Sorter) machines, which are made by Becton-Dickinson. These are binary files with a fairly complex format. The function fcsread can read what seems to be the most common flavour of FCS files. The output is an array with each column representing a different parameter. Some of these are measured on a linear scale, others are measured on a log scale. The second output is a structure giving information about the parameters.
[data,params] = fcsread('SampleFACS.fcs');
Visualizing the Data
A histogram of one parameter is one way to look at the data.
hist(data(:,1),max(data(:,1))-min(data(:,1))); title(params(1).LongName);
A more interesting way to look at the data is to create a scatter plot of two of the parameters. In this case the second paramter is measured on a log scale.
numDecades = params(2).Amplification(1);
theRange = params(2).Range;
semilogy(data(:,1),10.^(data(:,2)/(theRange/numDecades)),'+');
xlabel(params(1).Name); ylabel(params(2).Name);
An even better visualization is to look at the scatter plot coloured by density of the scatter. The function dscatter does this. dscatter colors the plot by density of the scatter. This implementation is based on a paper by Eilers & Goeman [2].
dscatter(data(:,1),10.^(data(:,2)/256),'log',true)
xlabel(params(1).LongName); ylabel(params(2).LongName);
A second call to dscatter adds contours.
hold on dscatter(data(:,1),10.^(data(:,2)/256),'log',true,'plottype','contour') hold off
References
[1] http://www.bio.umass.edu/mcbfacs/intro.htm
[2] Paul H. C. Eilers and Jelle J. Goeman, Enhancing scatterplots with smoothed densities, Bioinformatics, Mar 2004; 20: 623 - 628.
Thanks to John Albeck at MIT for suggestions and sample data.


Hierarchical Bayesian models for use in disease freedom and disease prevalence studies, designed with epidemiological applications in mind. The models themselves are in the spirit of those presented in Branscum et al. (2006) (see package documentation for full reference). The helper functions and methods were designed to make implementation and processing of the complex model output relatively simple in application.
| Version: | 0.1.2 |
| Depends: | R (≥ 3.0.0) |
| Imports: | epiR, compiler, shape, scales, coda |
| Suggests: | knitr |
| Published: | 2015-06-24 |
| Author: | Matthew Branan, Marta Remmenga, Lori Gustafson, Jennifer Hoeting |
| Maintainer: | Matthew Branan <matthew.branan at gmail.com> |
| License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
| NeedsCompilation: | no |
| Materials: | NEWS |
| CRAN checks: | EpiBayes results |
| Reference manual: | EpiBayes.pdf |
| Vignettes: |
Disease Freedom with EpiBayes Disease Freedom with EpiBayes Disease Freedom with EpiBayes |
| Package source: | EpiBayes_0.1.2.tar.gz |
| Windows binaries: | r-devel: EpiBayes_0.1.2.zip, r-release: EpiBayes_0.1.2.zip, r-oldrel: EpiBayes_0.1.2.zip |
| OS X binaries: | r-release: EpiBayes_0.1.2.tgz, r-oldrel: EpiBayes_0.1.2.tgz |
Please use the canonical form https://CRAN.R-project.org/package=EpiBayes to link to this page.


Shopping in Washington
You can't shop in Washington. That's why we headed for a shopping center in Virginia as we wanted to buy some clothes. When we arrived, Dominik and I where clearly impressed by the size of the shopping center, even though the Walmart across the street probably was at least as large as all those single shops combined. It was not the size of single shops that fascinated us - it was the sheer amount of different shops that thrilled us.
Even though I'm a person who usually doesn't "shop" for clothes (I like funny T-Shirts, that's about it), I really enjoyed the day. I especially like the Levi's store, where I bought Jeans and a jacket. I also visited the Gap just for the sake of saying "I was at the Gap".
Shopping in New York
Shopping in New York was much different from the Washington shopping experience. The impression I had was that it is really easy to get something to eat (as long as you are not in Chinatown), but finding an ATM is almost impossible. When we looked for one, we ended up somewhere in Wall Street, and the ATM could not determine my account balance. After several minutes of demonstrating my superior hacking-skills (I was shouting at the ATM), I finally managed to obtain some cash.
Another shop that was very hard to find was some sort of electric supply shop. We found a Best Buy, but every Austrian Media Markt is at least as big as the American Best Buy was.
Overall, shopping in the US was really interesting, as there are so many different shops. You can find shops for everything, no matter how extraordinary, but it can be really hard to find basic supplies in a big city such as New York. We actually had problems finding a normal grocery store as we only found pharmacies, and when we finally found one, it closed at 10 PM. In America, that's almost unacceptable to many people.


Since the beginning of Julia, it has been tempting to use macros to write domain-specific languages (DSLs), i.e. to extend Julia syntax to provide a simpler interface to create Julia objects with complicated behaviour. The first, and still most extensive, example is JuMP.
Since the fix for the infamous early Julia issue #265, which was incorporated in Julia 0.6, some previous methods for creating DSLs in Julia, mainly involving eval
, ceased to work.
In this post, we will describe a recommended pattern (i.e., a reusable structure) for creating DSLs without the use of eval
, using syntax suitable for Julia 0.6 and later versions; it is strongly recommended to upgrade to Julia 0.6.
Model
object containing a functionThis blog post arose from a question in the JuliaCon 2017 hackathon about the Modia modelling language, where there is a @model
macro. Here we will describe the simplest possible version of such a macro, which will create a Model
object that contains a function, and is itself callable.
First we define the Model
object. It is tempting to write it like this:
julia
struct NaiveModel
f::Function
end
We can then create an instance of the NaiveModel
type (i.e., an object of that type) using the default constructor, e.g. by passing it an anonymous function:
julia
julia> m1 = NaiveModel(x -> 2x)
NaiveModel(#1)
and we can call the function using
julia
julia> m1.f(10)
20
If we wish instances like m
to themselves behave like functions, we can overload the call syntax on the NaiveModel
object:
julia
julia> (m::NaiveModel)(x) = m.f(x)
so that we can now just write
julia
julia> m1(10)
20
Since Function
is an abstract type, for performance we should not have a field of this type inside our object.
Rather, we parametrise the type using the type of the function:
```julia struct Model{F} f::F end
(m::Model)(x) = m.f(x) ```
julia
julia> m2 = Model(x->2x)
Model{##3#4}(#3)
julia
julia> m2(10)
20
Let’s compare the performance:
```julia julia> using BenchmarkTools
julia> @btime m1(10); 41.482 ns (0 allocations: 0 bytes)
julia> @btime m2(10); 20.212 ns (0 allocations: 0 bytes) ```
Indeed we have removed some overhead in the second case.
We wish to define a macro that will allow us to use a simple syntax, of our choosing, to create objects. Suppose we would like to use the syntax
julia
julia> @model 2x
to define a Model
object containing the function x -> 2x
. Note that 2x
on its own is not valid Julia syntax for creating a function; the macro will allow us to use this simplified syntax for our own purposes.
Before getting to macros, let’s first build some tools to manipulate the expression 2x
in the correct way to build a Model
object from it, using standard Julia functions.
First, let’s create a function to manipulate our expression:
julia
function make_function(ex::Expr)
return :(x -> $ex)
end
```julia julia> ex = :(2x);
julia> make_function(ex) :(x->begin # In[12], line 2: 2x end) ```
Here, we have created a Julia expression called ex
, which just contains the expression 2x
that we would like for the body of our new function, and we have passed this expression into make_function
, which wraps it into a complete anonymous function.
This assumes that ex
is an expression containing the variable x
and makes a new expression representing an
anonymous function with the single argument x
. (See e.g. my JuliaCon 2017 tutorial for an example of how to walk through the expression tree in order to extract automatically the variables that it contains.)
Now let’s define a function make_model
that takes a function, wraps it, and passes it into a Model
object:
julia
function make_model(ex::Expr)
return :(Model($ex))
end
julia
julia> make_model(make_function(:(2x)))
:(Model((x->begin # In[12], line 2:
2x
end)))
If we evaluate this “by hand”, we see that it correctly creates a Model
object:
```julia julia> m3 = eval(make_model(make_function(:(2x)))) Model{##7#8}(#7)
julia> m3(10) 20 ```
However, this is ugly and clumsy. Instead, we now wrap everything inside a macro. A macro is a code manipulator: it eats code, massages it in some way (possibly including completely rewriting it), and spits out the new code that was produced. This makes macros an incredibly powerful (and, therefore, dangerous) tool when correctly used.
In the simplest case, a macro takes as argument a single Julia Expr
object, i.e. an unevaluated Julia expression (i.e., a piece of Julia code).
It manipulates this expression object to create a new expression object, which it then returns.
The key point is that this returned expression is “spliced into” the newly-generated code in place of the old code. The compiler will never actually see the old code, only the new code.
Let’s start with the simplest possible macro:
julia
macro model(ex)
@show ex
@show typeof(ex)
return nothing
end
This just shows the argument that it was passed and exits, returning an empty expression.
julia
julia> m4 = @model 2x
ex = :(2x)
typeof(ex) = Expr
We see that the Julia Expr
object has been automatically created from the explicit code that we typed.
Now we can plug in our previous functions to complete the macro’s functionality:
```julia julia> macro model(ex) return make_model(make_function(ex)) end
@model (macro with 1 method)
julia> m5 = @model 2x Model{##7#8}(#7)
julia> m5(10) 20 ```
To check that the macro is doing what we think it is, we can use the @macroexpand
command, which itself is a macro (as denoted by the initial @
):
julia
julia> @macroexpand @model 2x
:((Main.Model)((#71#x->begin # In[12], line 2:
2#71#x
end)))
However, our macro has an issue, called macro “hygiene”. This has to do with where variables are defined. Let’s put everything we have so far inside a module:
```julia module Models
export Model, @model
struct Model{F} f::F end
(m::Model)(x) = m.f(x)
function make_function(ex::Expr) return :(x -> $ex) end
function make_model(ex::Expr) return :(Model($ex)) end
macro model(ex) return make_model(make_function(ex)) end
end ```
Now we import the module and use the macro:
```julia julia> using Models
julia> m6 = @model 2x;
julia> m6(10) 20 ```
So far so good. But now let’s try to include a global variable in the expression:
```julia julia> a = 2;
julia> m7 = @model 2ax Models.Model{##7#8}(#7)
julia> m7(10) UndefVarError: a not defined Stacktrace: [1] #7 at ./In[1]:12 [inlined] [2] (::Models.Model{##7#8})(::Int64) at ./In[1]:9 ```
We see that it cannot find a
. Let’s see what the macro is doing:
julia
julia> @macroexpand @model 2*a*x
:((Models.Model)((#4#x->begin # In[1], line 12:
2 * Models.a * #4#x
end)))
We see that Julia is looking for Models.a
, i.e. a variable a
defined inside the Models
module.
To fix this problem, we must write an “unhygienic” macro, by
“escaping” the code, using the esc
function. This is a mechanism telling the compiler to look for variable definitions in the scope from which the macro is called (here, the current module Main
), rather than the scope where the macro is defined (here, the Models
module):
```julia module Models2
export Model, @model
struct Model{F} f::F end
(m::Model)(x) = m.f(x)
function make_function(ex::Expr) return :(x -> $ex) end
function make_model(ex::Expr) return :(Model($ex)) end
macro model(ex) return make_model(make_function(esc(ex))) end
end ```
```julia julia> using Models2
julia> a = 2;
julia> m8 = @model 2ax Models2.Model{##3#4}(#3)
julia> m8(10) 40 ```
This is the final, working version of the macro.
We have successfully completed our task: we have seen how to create a macro that enables a simple syntax for creating a Julia object that we can use later.
For some more in-depth discussion of metaprogramming techniques and macros, see my video tutorial Invitation to intermediate Julia, given at JuliaCon 2016:
Author: David P. Sanders, Associate Professor, Department of Physics, Faculty of Sciences, National University of Mexico (UNAM).


Welcome to my games and tools list, below you will find links to various things that I have built.
Have fun!


Editor
Editor
Constructor Summary
| Public Constructor | ||
| public |
constructor(element: Element, configuration: Configuration, theme: Theme, penStyle: PenStyle, behaviors: Behaviors) |
Member Summary
| Public Members | ||
| public get |
Get current behavior |
|
| public get |
Get behaviors |
|
| public get |
Get current callbacks |
|
| public get |
True if can clear, false otherwise. |
|
| public get |
canConvert: Boolean: * True if can convert, false otherwise. |
|
| public get |
True if can export, false otherwise. |
|
| public get |
True if can redo, false otherwise. |
|
| public get |
True if can undo, false otherwise. |
|
| public set |
configuration(configuration: Configuration) Set the recognition parameters WARNING : Need to fire a clear if user have already input some strokes. |
|
| public get |
configuration: Configuration: * Get the current recognition parameters |
|
| public |
domElement: Element Inner reference to the DOM Element |
|
| public get |
eastereggs: * Get access to some easter egg features link ink injection. |
|
| public |
error: * |
|
| public |
Launch export timer |
|
| public get |
Get current state exports |
|
| public get |
Get current grabber |
|
| public |
Current grabber context |
|
| public get |
True if idle state |
|
| public get |
initialized: Boolean: * True if initialized, false otherwise |
|
| public get |
True if empty, false otherwise |
|
| public |
loader: * |
|
| public |
|
|
| public |
Pen color used only for pending stroke |
|
| public |
Current model |
|
| public |
Notify delay timer |
|
| public set |
Set the pen style |
|
| public get |
Get the pen style |
|
| public set |
penStyleClasses(penStyleClasses: String) Set the pen style |
|
| public get |
Get the pen style |
|
| public get |
Get a PNG image data url from the data model |
|
| public get |
Return the position of the cursor identifying the current state in the internal iink undo/redo stack. |
|
| public get |
recognizer: Recognizer: * Get current recognizer |
|
| public |
Current recognition context |
|
| public get |
Get current renderer |
|
| public |
Current rendering context |
|
| public |
Launch resize timer |
|
| public |
smartGuide: * |
|
| public get |
Get current stroker |
|
| public get |
|
|
| public set |
Set the theme |
|
| public get |
Get the theme |
|
| public |
|
|
| public |
|
|
| public get |
undoStackIndex: Number: * The number of operations that it is currently possible to undo. |
| Private Members | ||
| private set |
|
|
| private |
|
|
| private |
|
|
| private |
innerConfiguration: Configuration |
|
| private |
|
|
| private |
|
|
| private |
|
|
| private |
|
|
| private |
|
|
| private set |
recognizer(recognizer: Recognizer) Set the current recognizer |
|
| private set |
Set the current renderer |
Method Summary
| Public Methods | ||
| public |
clear() Clear the output and the recognition result. |
|
| public |
Convert the current content |
|
| public |
Explicitly ask to perform an export. |
|
| public |
Trigger the change callbacks (and by default send a change event). |
|
| public |
Get statistics to monitor what ink size is send to the server. |
|
| public |
Get supported import mime types |
|
| public |
Import content. |
|
| public |
Handle a pointer down |
|
| public |
pointerEvents(events: PointerEvents) pointer events |
|
| public |
pointerMove(point: {x: Number, y: Number, t: Number}) Handle a pointer move |
|
| public |
Handle a pointer up |
|
| public |
reDraw(rawStrokes: *, strokeGroups: *) |
|
| public |
redo() Redo the last action. |
|
| public |
removeStroke(stroke: *) |
|
| public |
resize() Function to call when the dom element link to the current ink paper has been resize. |
|
| public |
Set the guides for text |
|
| public |
setThemeForFont(lang: *) Set the theme (font family, font size and line height) depending on the language |
|
| public |
undo() Undo the last action. |
|
| public |
unload() Detach event listeners from the DOM element created at editor creation. |
|
| public |
Wait for idle state. |
Public Constructors
Public Members
public set configuration(configuration: Configuration) source
Set the recognition parameters WARNING : Need to fire a clear if user have already input some strokes.
public get configuration: Configuration: * source
Get the current recognition parameters
Return:
| Configuration |
public get eastereggs: * source
Get access to some easter egg features link ink injection. Use at your own risk (less tested and may be removed without notice).
public error: * source
public loader: * source
public localPenStyle: * source
public get possibleUndoCount: Number: * source
Return the position of the cursor identifying the current state in the internal iink undo/redo stack.
public smartGuide: * source
public get supportedImportMimeTypes: * source
public undoRedoContext: * source
public undoRedoManager: * source
public get undoStackIndex: Number: * source
The number of operations that it is currently possible to undo.
Private Members
private innerConfiguration: Configuration source
private innerRecognizer: Recognizer source
Public Methods
public convert(conversionState: string) source
Convert the current content
Params:
| Name | Type | Attribute | Description |
| conversionState | string |
|
public export_(requestedMimeTypes: Array<String>) source
Explicitly ask to perform an export. You have to listen to events to get the content as this function is non blocking and does not have a return type.
public import_(data: Blob | *, mimetype: String) source
Import content.
Params:
| Name | Type | Attribute | Description |
| data | Blob | * | Data to import |
|
| mimetype | String |
|
Mimetype of the data, needed if data is not a Blob |
public pointerDown(point: {x: Number, y: Number, t: Number}, pointerType: String, pointerId: String) source
Handle a pointer down
public pointerEvents(events: PointerEvents) source
pointer events
Params:
| Name | Type | Attribute | Description |
| events | PointerEvents |
public reDraw(rawStrokes: *, strokeGroups: *) source
Params:
| Name | Type | Attribute | Description |
| rawStrokes | * | ||
| strokeGroups | * |
public removeStroke(stroke: *) source
Params:
| Name | Type | Attribute | Description |
| stroke | * |
public resize() source
Function to call when the dom element link to the current ink paper has been resize.
public setGuides(enable: Boolean) source
Set the guides for text
Params:
| Name | Type | Attribute | Description |
| enable | Boolean |
|
public setThemeForFont(lang: *) source
Set the theme (font family, font size and line height) depending on the language
Params:
| Name | Type | Attribute | Description |
| lang | * |


---
layout: post
title: 502 Proxy Error solved
date: '2011-09-17T19:40:00.002-04:00'
author: Bill Schneider
tags:
modified_time: '2011-09-17T19:45:57.850-04:00'
blogger_id: tag:blogger.com,1999:blog-9159309.post-9120185968415803544
blogger_orig_url: http://wrschneider.blogspot.com/2011/09/502-proxy-error-solved.html
---
I was getting mysterious, intermittent proxy errors using Apache mod_proxy to talk to an older version of Glassfish (2.x). It turned out the root cause was size of HTTP headers as cookies were accumulating, which caused the underlying app server to close the socket without a response.
A similar phenomenon was documented here:
http://kenai.com/jira/browse/KENAI-2727
The fix was trivial: increase the "receive-buffer-in-bytes" setting in domain.xml to 8192 bytes.
Finding it was a pain, because the older version of Glassfish had a bug such that the underlying IOException that aborted the request never got logged anywhere!
http://java.net/jira/browse/GLASSFISH-5181


Ramaphosa celebrates 67th birthday
by Jenna EtheridgeBirthday wishes have been pouring in for President Cyril Ramaphosa, who turned 67 on Sunday.
He returned to the country earlier this week after a working visit to Brasilia in the Federative Republic of Brazil, where he participated in the 11th Brics Summit.
Last year, Ramaphosa celebrated his birthday in Addis Ababa, Ethiopia, while attending the African Union Summit.
The ruling party, politicians and citizens alike wished him well, including Northern Cape Premier Zamani Saul and Transport Minister Fikile Mbalula.
ANC spokesperson Pule Mabe said Ramaphosa remained an inspiration to citizens and members of the party for his commitment to the liberation struggle and the rebuilding of the country.
"As President of the Republic, he has contributed enormously toward restoring the integrity, credibility and legitimacy of our state institutions," he said.
"A unifying leader, President Ramaphosa and his collective continue to serve as a glue that holds the organisation together... We wish our President a happy birthday."


Mandrake v0.0.2 Mandrake.Relation
Mandrake relational functions.
Summary
Functions
Returns true if first value is greater than the second
Returns true if first value is greater than or equal to the second
Returns true if first value is less than the second
Returns true if first value is less than or equal to the second
Functions
Returns true if first value is greater than the second.
Examples
iex> Mandrake.Relation.gt(7, 5)
true
Returns true if first value is greater than or equal to the second.
Examples
iex> Mandrake.Relation.gte(7, 7)
true
Returns true if first value is less than the second.
Examples
iex> Mandrake.Relation.lt(7, 5)
false


--- layout: post authors: ["Greg Wilson"] title: "Congratulations to the Moore Investigators" date: 2014-10-04 time: "16:00:00" tags: ["Community"] ---
The Gordon and Betty Moore Foundation has just announced $21 million in grants to fourteen investigators in the emerging field of data-driven discovery. Among the recipients are Titus Brown and Ethan White, who have both been key contributors to Software Carpentry. Congratulations to them and to the other award winners—we look forward to working with them in the years to come.


{% comment %}
If this page has been opened via the email editing page - which
includes the javascript for the modals - the `rel="modal:open"`
will make this link open in the modal. If we've gone directly to
the liaison list page, which does not include the modal js, it
will have no effect. This is exactly the desired behavior.
{% endcomment %}
Add new
name
email
DLCs
{% for liaison in object_list %}
{{ liaison.first_name }} {{ liaison.last_name }}
{{ liaison.email_address }}
{% for dlc in liaison.dlc_set.all %}
{{ dlc }}
{% endfor %}
{% empty %}
No liaisons yet.
{% endfor %}
{% if unassigned_dlcs %}
{% for dlc in unassigned_dlcs %}
{{ dlc }}
{% endfor %}


| 1 |
Bendavid_2020 |
COVID-19 Antibody Seroprevalence in Santa Clara County, California |
Eran Bendavid; Bianca Mulaney; Neeraj Sood; Soleil Shah; Emilia Ling; Rebecca Bromley-Dulfano; Cara Lai; Zoe Weissberg; Rodrigo Saavedra; James Tedrow; Dona Tversky; Andrew Bogan; Thomas Kupiec; Daniel Eichner; Ribhav Gupta; John Ioannidis; Jay Bhattacharya |
2020 |
2020-04-17 |
BioRxiv |
Y |
|
|
10.1101/2<IP_ADDRESS>62463 |
zpv5f8pr |
0.776499 |
|
|
| 2 |
Reece_2020 |
America Addresses Two Epidemics: Cannabis and Coronavirus and their Interactions: An Ecological Geospatial Study |
Albert S Reece; Gary K Hulse |
2020 |
2020-04-22 |
BioRxiv |
Y |
|
|
10.1101/2<IP_ADDRESS>69021 |
d5zozcmd |
0.698739 |
Ye_S_2012 |
|
| 3 |
Li_A_2020 |
Multivariate Analysis of Factors Affecting COVID-19 Case and Death Rate in U.S. Counties: The Significant Effects of Black Race and Temperature |
Adam Y Li; Theodore C Hannah; John Durbin; Nickolas Dreher; Fiona M McAuley; Naoum Fares Marayati; Zachary Spiera; Muhammad Ali; Alex Gometz; JT Kostman; Tanvir F Choudhri |
2020 |
2020-04-22 |
BioRxiv |
Y |
|
|
10.1101/2<IP_ADDRESS>69708 |
vp4kq39i |
0.609819 |
|
|
| 4 |
Chhetri_2015 |
Comparison of risk factors for seropositivity to feline immunodeficiency virus and feline leukemia virus among cats: a case-case study |
Chhetri, Bimal K; Berke, Olaf; Pearl, David L; Bienzle, Dorothee |
2015 |
2015-02-10 |
COMM-USE |
N |
PMC4332748 |
25889006.0 |
10.1186/s12917-015-0339-3 |
ysjw5pct |
0.593098 |
Lim_D_2017, Dinh_2006, Goka_2014, Muniz-Rodriguez_2020 |
|
| 5 |
Sun_C_2017 |
Home dampness-related exposures increase the risk of common colds among preschool children in Shanghai, China: Modified by household ventilation |
Sun, Chanjuan; Huang, Chen; Liu, Wei; Zou, Zhijun; Hu, Yu; Shen, Li |
2017 |
2017-11-01 |
None |
N |
PMC7115772 |
|
10.1016/j.buildenv.2017.07.033 |
xd7wdqb3 |
0.554455 |
|
Noda_2012 |
| 6 |
Cummings_2007 |
Respirator Donning in Post-Hurricane New Orleans |
Cummings, Kristin J.; Cox-Ganser, Jean; Riggs, Margaret A.; Edwards, Nicole; Kreiss, Kathleen |
2007 |
2007-05-23 |
PMC |
N |
PMC2738466 |
17553247.0 |
10.3201/eid1305.061490 |
96migwaq |
0.535128 |
Muniz-Rodriguez_2020, Rossi_2020, Gao_Y_2020, Russell_2020 |
Offeddu_2017 |
| 7 |
Shah_2007 |
Evaluation of echinacea for the prevention and treatment of the common cold: a meta-analysis |
Shah, Sachin A; Sander, Stephen; White, C Michael; Rinaldi, Mike; Coleman, Craig I |
2007 |
2007-07-31 |
PMC |
N |
PMC7106401 |
17597571.0 |
10.1016/s1473-3099(07)70160-3 |
xx8s0jea |
0.472874 |
Goka_2014 |
|
| 8 |
Murray_2008 |
A study of risk factors for cat mortality in adoption centres of a UK cat charity |
Murray, Jane K.; Skillings, Elizabeth; Gruffydd-Jones, Timothy J. |
2008 |
2008-08-31 |
PMC |
N |
PMC7129399 |
18375164.0 |
10.1016/j.jfms.2008.01.005 |
4i2t75re |
0.471941 |
|
Jones_2013, Stavisky_2011 |
| 9 |
Russell_2020 |
Estimating the infection and case fatality ratio for COVID-19 using age-adjusted data from the outbreak on the Diamond Princess cruise ship |
Timothy W Russell; Joel Hellewell; Christopher I Jarvis; Kevin van-Zandvoort; Sam Abbott; Ruwan Ratnayake; Stefan Flasche; Rosalind M Eggo; Adam J Kucharski |
2020 |
2020-03-08 |
BioRxiv |
Y |
|
|
10.1101/2<IP_ADDRESS>31773 |
hwqgotl2 |
0.422986 |
Rossi_2020, Russell_2020, Muniz-Rodriguez_2020 |
Russell_2020 |
| 10 |
Muniz-Rodriguez_2020 |
Transmission potential of COVID-19 in Iran |
Kamalich Muniz-Rodriguez; Isaac Chun-Hai Fung; Shayesterh R. Ferdosi; Sylvia K. Ofori; Yiseul Lee; Amna Tariq; Gerardo Chowell |
2020 |
2020-03-10 |
BioRxiv |
Y |
|
|
10.1101/2<IP_ADDRESS>30643 |
uq4eobf0 |
0.389335 |
Rossi_2020, Gao_Y_2020, Russell_2020 |
|
| 11 |
Russell_2020 |
Estimating the infection and case fatality ratio for coronavirus disease (COVID-19) using age-adjusted data from the outbreak on the Diamond Princess cruise ship, February 2020 |
Russell, Timothy W; Hellewell, Joel; Jarvis, Christopher I; van Zandvoort, Kevin; Abbott, Sam; Ratnayake, Ruwan; Flasche, Stefan; Eggo, Rosalind M; Edmunds, W John; Kucharski, Adam J |
2020 |
2020-03-26 |
None |
Y |
PMC7118348 |
32234121.0 |
10.2807/1560-7917.es.2<IP_ADDRESS>0256 |
n8vvqb20 |
0.343797 |
Gao_Y_2020, Rossi_2020, Muniz-Rodriguez_2020, Russell_2020 |
|


--- layout: post status: publish published: true title: "
We have another bonus episode for you this week. John Arguello from Cubs Den pops in to discuss a variety of Cubs baseball topics.
I don't think you can have a Cubs discussion without talking about prospects and the majority of this discussion involves prospects. John discusses the timelines the Cubs have with Kris Bryant and Jorge Soler. While on the topic of Soler, you might be surprised with what John has to say when comparing Soler and Javier Baez.
Pitching comes up and we spend some time on Jen-Ho Tseng, the pitcher that John ranks highest in his list of Cubs prospects. He also talks about prospects that he thinks are flying under the radar with all of the attention on the big names.
We do spend some time talking about the big league team. It appears that Arismendy Alcantara may be sticking with the Cubs. We also discuss the struggles that Mike Olt and Junior Lake are experiencing. With the trade deadline just about a week away, John guesses as to what he thinks the Cubs may (or may not) do.
Visit Cubs Den at http://www.chicagonow.com/cubs-den
Cubs Den on Facebook
Cubs Den on Twitter


The BOOTSTRA/386 3.5" floppy contains
- All version of BOOSTRA/386 SDK along with
- Demos and BONUS content
- A personal thank you letter signed by the team here at BOOTSTRA/386 Labs!
There's 2 ways to buy Bootstra/386 on Floppy Disc!
(It is also FREE software and can be Downloaded at any time!)
|


about
portfolio
resume
Resume
a
b
objective:
Education:
Related courses
Applicable Project Work:
Skills:
Selected Experience:
Activities and honors


Copyright ©1995 by NeXT Computer, Inc. All Rights Reserved.
| 14 |
Mach Object Files
| This chapter describes the format of Mach object files. This format is used by default, rather than the UNIX 4.3BSD a.out format, for object files on NEXTSTEP computers.
The current Mach object format is still evolving at Carnegie Mellon, and enhancements in NEXTSTEP are part of this evolving process. These enhancements refine the design and clean up some implementation details. The concepts of the original design are still present, but names have been changed for consistency. The Mach object file format has two components: |
| A static header containing information common to all files | ||
| A variable number of load commands that provide information about the structure of the file |
| The load commands provide the following types of information: |
| The layout of the run-time memory image | ||
| The symbol table information | ||
| The initial thread execution state | ||
| The names of any referenced shared libraries |
| The layout of the file is determined by the file type: |
| For types MH_EXECUTE and MH_FVMLIB the segments are padded out and aligned on a segment alignment boundary for efficient demand paging. Both these file types also have the headers included as part of their first segment. | ||
| The type MH_OBJECT is a compact format (the ".o" format). It's intended only as output of the assembler and input (or possibly output) of the link editor. All sections are in one unnamed segment with no padding. | ||
| The type MH_PRELOAD is an executable format intended for files that aren't executed under the kernel (such as PROMs, standalone programs, and kernels). | ||
| The type MH_CORE is for core files. |
| The structures of a Mach object file are defined in the header file mach-o/loader.h, and are described below. The structures and what they're used for are described first, followed by a list of what structures make up Mach object files. |
| The Mach Header |
| The Mach header appears at the beginning of the object file. Only information that's truly general to the file is contained in the Mach header. Other information is put in the load commands that follow.
The format of the Mach header is: |
struct mach_header {
unsigned long magic; /* Mach magic number identifier */
cpu_type_t cputype; /* cpu specifier */
cpu_subtype_t cpusubtype; /* machine specifier */
unsigned long filetype; /* type of file */
unsigned long ncmds; /* number of load commands */
unsigned long sizeofcmds; /* size of all load commands */
unsigned long flags; /* flags */
};
| The value for the magic field of the mach_header structure is: |
#define MH_MAGIC 0xfeedface /* the Mach magic number */
| The values for the cputype and cpusubtype fields are defined as follows in the header file sys/machine.h: |
#define CPU_TYPE_MC680x0 ((cpu_type_t) 6)
#define CPU_SUBTYPE_MC68030 ((cpu_subtype_t) 1)
#define CPU_SUBTYPE_MC68040 ((cpu_subtype_t) 2)
| The values for the filetype field are defined as follows in the header file sys/loader.h: |
#define MH_OBJECT 0x1 /* relocatable object file */
#define MH_EXECUTE 0x2 /* executable object file */
#define MH_FVMLIB 0x3 /* fixed vm shared library file */
#define MH_CORE 0x4 /* core file */
#define MH_PRELOAD 0x5 /* preloaded executable file */
| The ncmds field contains the number of load_command structures that follow the Mach header. The load_command structures directly follow the Mach header in the object file.
The sizeofcmds field contains the total size in bytes of all of the load commands that follow it. The following constants are used for the flags field: |
#define MH_NOUNDEFS 0x1 /* object file has no undefined references;
can be executed */
#define MH_INCRLINK 0x2 /* object file is the output of an
incremental link against a base file;
can't be link-edited again */
| The Load Commands |
| The load commands appear directly after the Mach header. They are variable in size. The number of load commands and the total size of the commands are given in the ncmds and sizeofcmds fields of the mach_header structure.
All load commands must have as their first two fields cmd and cmdsize: |
| The cmd field contains a constant for that command type. Each command type has a specific structure corresponding to it. | ||
| The cmdsize field is the size in bytes of the particular load_command structure plus anything that follows it that's a part of the load command (for example, section structures or strings). To advance to the next load command, the value of the cmdsize field can be added to the offset or pointer of the current load command. |
| The value of the cmdsize field must be a multiple of sizeof(long). This is the maximum alignment of any load command. The padded bytes must be zero-filled. Because the file will be memory mapped, all tables in the object file must also follow these rules; otherwise the pointers to these tables are not guaranteed to work. With all padding zero-filled, like objects will compare byte for byte.
The following structure is the minimum form of a load command: |
struct load_command {
unsigned long cmd; /* type of load command */
unsigned long cmdsize; /* total size of command in bytes */
};
| Constants for the cmd field of the load_command structure are: |
#define LC_SEGMENT 0x1 /* file segment to be mapped */
#define LC_SYMTAB 0x2 /* link-edit stab symbol table info
(obsolete) */
#define LC_SYMSEG 0x3 /* link-edit gdb symbol table info */
#define LC_THREAD 0x4 /* thread */
#define LC_UNIXTHREAD 0x5 /* UNIX thread (includes a stack) */
#define LC_LOADFVMLIB 0x6 /* load a fixed VM shared library */
#define LC_IDFVMLIB 0x7 /* fixed VM shared library id */
#define LC_IDENT 0x8 /* object identification information
(obsolete) */
#define LC_FVMFILE 0x9 /* fixed VM file inclusion */
| A variable-length string in a load command is represented by an lc_str union. The string is stored just after the load_command structure, and the offset is from the start of the load_command structure. The size of the string is reflected in the cmdsize field of the load command. Any padded bytes to bring the cmdsize field to a multiple of sizeof(long) must be zero-filled. |
union lc_str {
unsigned long offset; /* offset to the string */
char *ptr; /* pointer to the string */
};
| The LC_SEGMENT Load Command
The LC_SEGMENT load command indicates that a part of this file is to be mapped into the task's address space. The size of this segment in memory, vmsize, can be equal to or larger than the amount to map from this file, filesize. The file, starting at fileoff, is mapped to the beginning of the segment in memory at vmaddr. The rest of the memory of the segment, if any, is allocated zero-fill on demand. |
struct segment_command {
unsigned long cmd; /* LC_SEGMENT */
unsigned long cmdsize; /* includes size of section
structures */
char segname[16]; /* segment's name */
unsigned long vmaddr; /* segment's memory address */
unsigned long vmsize; /* segment's memory size */
unsigned long fileoff; /* segment's file offset */
unsigned long filesize; /* amount to map from file */
vm_prot_t maxprot; /* maximum VM protection */
vm_prot_t initprot; /* initial VM protection */
unsigned long nsects; /* number of sections */
unsigned long flags; /* flags */
};
| The segment's maximum virtual memory protection and initial virtual memory protection are specified by the maxprot and initprot fields. The values for these fields are set to some combination of the constants defined in the header file vm/vm_prot.h: |
#define VM_PROT_NONE ((vm_prot_t) 0x00)
#define VM_PROT_READ ((vm_prot_t) 0x01) /* read permission */
#define VM_PROT_WRITE ((vm_prot_t) 0x02) /* write permission */
#define VM_PROT_EXECUTE ((vm_prot_t) 0x04) /* execute permission */
/* The default protection for newly created virtual memory */
#define VM_PROT_DEFAULT \
(VM_PROT_READ | VM_PROT_WRITE | VM_PROT_EXECUTE)
/* Maximum privileges possible, for parameter checking. */
#define VM_PROT_ALL \
(VM_PROT_READ | VM_PROT_WRITE | VM_PROT_EXECUTE)
| A segment's address and virtual memory protection are set at link edit time.
The following constants can be used for the flags field of the segment_command structure: |
#define SG_HIGHVM 0x1
#define SG_FVMLIB 0x2
#define SG_NORELOC 0x3
| SG_HIGHVM indicates that the file contents for this segment occupy the high part of the virtual memory space; the low part is zero-filled (for stacks in core files). SG_FVMLIB indicates that the segment is the virtual memory that's allocated by a fixed virtual memory library for overlap checking in the link editor. SG_NORELOC indicates that the segment has nothing that was relocated in it and nothing relocated to it (that is, it may be safely replaced without relocation).
A segment is made up of zero or more sections. If the segment contains sections, the section structures directly follow the segment command and their size is reflected in the cmdsize field. If sections have the same section name and are going into the same segment, they're combined by the link editor. The resulting section is aligned to the maximum alignment of the combined sections and is the new section's alignment. The combined sections are aligned to their original alignment in the combined section. Any padded bytes used to get the specified alignment are zero-filled. Only non-MH_OBJECT files have all their segments with the proper sections in each padded to the specified segment alignment. The default segment alignment for the link editor is the page size. The first segment of an executable or shared library always contains the Mach header and load commands of the object file before its first section. The zero-filled sections are always last in their segment, allowing the zeroed segment padding to be mapped into memory where zero-filled sections might be. |
struct section {
char sectname[16]; /* section's name */
char segname[16]; /* segment the section is in */
unsigned long addr; /* section's memory address */
unsigned long size; /* section's size in bytes */
unsigned long offset; /* section's file offset */
unsigned long align; /* section's alignment */
unsigned long reloff; /* file offset of relocation entries */
unsigned long nreloc; /* number of relocation entries */
unsigned long flags; /* flags */
unsigned long reserved1; /* reserved */
unsigned long reserved2; /* reserved */
};
| Flags currently defined for the flags field of a section structure are the following: |
#define S_ZEROFILL 0x1 /* zero-filled on demand */
#define S_CSTRING_LITERALS 0x2 /* section has only literal C
strings */
#define S_4BYTE_LITERALS 0x2 /* section has only 4-byte literals */
#define S_8BYTE_LITERALS 0x2 /* section has only 8-byte literals */
#define S_LITERAL_POINTERS 0x2 /* section has only pointers to
literals */
| S_ZEROFILL is used for the uninitialized data sections; sections with literal flags cause the link editor to coalesce redundant literals into sections and perform the proper relocation, resulting in a smaller file.
The format of the relocation entries referenced by the reloff and nreloc fields is described in the header file reloc.h. Although the names of segments and sections in them are mostly meaningless to the link editor, there are a few things to support traditional UNIX executables that will require the link editor and assembler to use some agreed-upon names. The link editor will allocate common symbols at the end of the __common section in the __DATA segment, creating the section and segment if needed. The __common section must be a zero-fill section (marked with S_ZEROFILL). The default maxprot and initprot (maximum and initial virtual memory protection) will always be read, write, and execute. If there's a __TEXT or __LINKEDIT segment its initprot won't be writable by default. The following are constants for the conventional segment and section names: |
#define SEG_PAGEZERO "__PAGEZERO" /* pagezero segment; has no
protections; catches NULL
references for MH_EXECUTE
files */
#define SEG_TEXT "__TEXT" /* traditional UNIX text segment */
#define SECT_TEXT "__text" /* real text part of the text
section; no headers and
padding */
#define SECT_FVMLIB_INIT0 "__fvmlib_init0" /* fvmlib initialization
section */
#define SECT_FVMLIB_INIT1 "__fvmlib_init1" /* the section following
the fvmlib
initialization
section */
#define SEG_DATA "__DATA" /* traditional UNIX data segment */
#define SECT_DATA "__data" /* real initialized data section;
no padding, no bss overlap */
#define SECT_BSS "__bss" /* real uninitialized data
section; no padding */
#define SECT_COMMON "__common" /* the section common symbols
are allocated in by the link
editor */
#define SEG_OBJC "__OBJC" /* run-time segment */
#define SECT_OBJC_SYMBOLS "__symbol_table" /* symbol table */
#define SECT_OBJC_MODULES "__module_info" /* (obsolete!) */
#define SECT_OBJC_STRINGS "__selector_strs" /* string table */
#define SECT_OBJC_REFS "__selector_refs" /* string table */
#define SEG_ICON "__ICON" /* NeXT icon segment */
#define SECT_ICON_HEADER "__header" /* icon headers */
#define SECT_ICON_TIFF "__tiff" /* icons in TIFF format */
| The LC_SYMTAB Load Command
The LC_SYMTAB command specifies the location and size of the symbol table information created by the compiler used for link editing and debugging. This UNIX 4.3BSD stab-style symbol table information is defined in the header files nlist.h and stabs.h: |
struct symtab_command {
unsigned long cmd; /* LC_SYMTAB */
unsigned long cmdsize; /* sizeof(struct symtab_command) */
unsigned long symoff; /* symbol table offset */
unsigned long nsyms; /* number of symbol table entries */
unsigned long stroff; /* string table offset */
unsigned long strsize; /* string table size in bytes */
};
| The LC_SYMTAB command contains the offsets for both the symbol table entries and the string table used by those entries. This format is different from the UNIX 4.3BSD a.out format: The string table offset and size are explicitly defined, and the symbol table and string tables are located at the end of the file (not after the LC_SYMTAB command).
The format of a symbol table entry is defined in the header file nlist.h: |
struct nlist {
union {
char *n_name; /* for use when in-core */
long n_strx; /* index into file string table */
} n_un;
unsigned char n_type; /* type flag; see below */
unsigned char n_sect; /* section number or NO_SECT */
short n_desc; /* see the header file stab.h */
unsigned n_value; /* value of this symbol table entry
(or stab offset) */
};
| Symbols with an index into the string table of zero (n_un.n_strx == 0) are defined to have a null ("") name. Therefore, all string indexes to non-null names must not have a zero string length.
In the file, a symbol's n_un.n_strx field gives an index into the string table. An n_strx value of 0 indicates that no name is associated with a particular symbol table entry. The field n_un.n_name can be used to refer to the symbol name only if the program sets this up using n_strx and appropriate data from the string table. The flag values that distinguish symbol types are defined in the header file nlist.h. The n_type field actually contains three fields, and if declared as such would be: |
unsigned char N_STAB:3,
N_TYPE:4,
N_EXT:1;
| These fields are used by specifying the following masks: |
#define N_STAB 0xe0 /* if any bits are set, this is a symbolic
debugging entry */
#define N_TYPE 0x1e /* mask for the type bits */
#define N_EXT 0x01 /* external symbol bit; set for external
symbols */
| Some of the N_STAB bits will be set if and only if the entry is a symbolic debugging entry (an stab)--in this case, the values for the N_TYPE bits of the n_type field (the entire field) are as shown in the header file stab.h. Normal values for the N_TYPE bits of the n_type field are: |
#define N_UNDF 0x0 /* undefined; n_sect == NO_SECT */
#define N_ABS 0x2 /* absolute; n_sect == NO_SECT */
#define N_SECT 0xe /* defined in section number n_sect */
#define N_INDR 0xa /* indirect */
| If the type is N_SECT, the n_sect field contains an ordinal of the section the symbol is defined in. The sections are numbered from 1 and refer to sections in the order in which they appear in the load commands for the file they're in. Therefore the same ordinal may refer to different sections in different files. This is the most common type of symbol.
If the type is N_INDR, the symbol is defined to be the same as another symbol. In this case the n_value field is an index into the string table of the other symbol's name. When the other symbol is defined, they both take on the defined type and value. The n_value field for all symbol table entries (including N_STABs) gets updated by the link editor based on the value of the n_sect field and where the section's n_sect references get relocated. If the value of the n_sect field is NO_SECT, its n_value field isn't relocated by the link editor. |
#define NO_SECT 0 /* the symbol isn't in any section */
#define MAX_SECT 255 /* 1 through 255 inclusive */
| Common symbols are represented by undefined (N_UNDF) external (N_EXT) types whose values (n_value) are nonzero. In this case the value of the n_value field is the size in bytes of the common symbol, and the value of the n_sect field is NO_SECT.
The LC_THREAD and LC_UNIXTHREAD Load Commands Thread commands contain machine-specific data structures suitable for use in the thread state primitives. The machine-specific data structures follow the struct thread_command or struct unixthread_command as follows: Each flavor of machine-specific data structure is preceded by an unsigned long constant for the flavor of that data structure and an unsigned long that's the count of longs of the size of the state data structure, and then the state data structure follows that. This triple may be repeated for many flavors. The constants for the flavor, count, and state data structure definitions are expected to be in the header file machine/thread_status.h; these machine-specific data structure sizes must be multiples of sizeof(long). The cmdsize reflects the total size of the thread_command structure and all of the sizes of the constants for the flavor, count, and state data structures. |
struct thread_command {
unsigned long cmd; /* LC_THREAD or LC_UNIXTHREAD */
unsigned long cmdsize; /* sizeof(struct thread_command) */
/* unsigned long flavor flavor of thread state */
/* unsigned long count count of longs in thread state */
/* struct XXX_thread_state state flavor's thread state */
/* . . . */
};
| The LC_UNIXTHREAD command specifies an initial thread execution state for a UNIX process. For an executable object that's a UNIX process, there's one unixthread_command created by the link editor. A stack is created based on the UNIX rlimit for the stack. This stack will contain the command arguments and environment variables when the program is executed. The entry point is placed in the program counter in the thread state. The stack address is placed in the stack pointer by the kernel when this program is executed. The stack is created as a zero-fill on demand region when the object is launched. Then the command line and environment arguments are placed on the stack and the stack pointer in the thread state is modified.
The LC_LOADFVMLIB and LC_IDFVMLIB Commands A fixed virtual shared library has the file type MH_FVMLIB in the Mach header, and contains the fvmlib_command LC_IDFVMLIB to identify the library. An object that uses a fixed virtual shared library contains the fvmlib_command LC_LOADFVMLIB for each library it uses: |
struct fvmlib_command {
unsigned long cmd; /* LC_IDFVMLIB or LC_LOADFVMLIB */
unsigned long cmdsize; /* includes pathname string */
struct fvmlib fvmlib; /* the library identification */
};
| Fixed virtual memory shared libraries are identified by the target pathname (the name of the library as found for execution) and the minor version number: |
struct fvmlib {
union lc_str name; /* library's target pathname */
unsigned long minor_version; /* library's minor version
number */
};
| The LC_LOADFVMFILE Command
The LC_LOADFVMFILE command contains a reference to a file to be loaded at the specified virtual address: |
struct fvmfile_command {
unsigned long cmd; /* LC_FVMFILE */
unsigned long cmdsize /* includes pathname string */
union lc_str name; /* files pathname */
unsigned long header_addr; /* files virtual address */
};
| Relocation Information |
| The value of a byte in a section that isn't a portion of a reference to an undefined external symbol is exactly the value that will appear in memory when the file is executed. If a byte in a section involves a reference to an undefined external symbol, as indicated by the relocation information, the value stored in the file is an offset from the associated external symbol. When the file is processed by the link editor and the external symbol becomes defined, the value of the symbol will be added to the bytes in the file.
If relocation information is present, it amounts to eight bytes for each relocatable entry. The structure of a relocation entry as given in the header file reloc.h is as follows: |
struct relocation_info {
int r_address; /* offset in the section to what is
being relocated */
unsigned r_symbolnum:24, /* symbol index if r_extern == 1 or
section ordinal if r_extern == 0 */
r_pcrel:1, /* was relocated pc-relative already */
r_length:2, /* 0=byte, 1=word, 2=long */
r_extern:1, /* doesn't include value of symbol
referenced */
r_reserved:4; /* reserved */
};
#define R_ABS 0 /* absolute relocation type for Mach-O files */
| The r_address is an offset rather than an address. For Mach-O object files this offset is from the start of the section the relocation entry is for.
If r_extern is 0, r_symbolnum is an ordinal representing the section that contains the symbol being relocated. These ordinals refer to the sections in the object file in the order in which their section structures appear in the headers of the object file they're in. The first section has the ordinal 1, the second has the ordinal 2, and so on. Therefore the same ordinal in two different object files could refer to two different sections. Furthermore, the ordinals could change when combined by the link editor. The value R_ABS is used for relocation entries of absolute symbols that need no further relocation. To make scattered loading by the link editor work correctly, "local" relocation entries can't be used when the item to be relocated is the value of a symbol plus an offset (where the resulting expression is outside the block the link editor is moving, blocks are divided at symbol addresses). If the item is a symbol value plus offset, the link editor needs to know more than just the section in which the symbol was defined. What is needed is the actual value of the symbol without the offset, so the link editor can do the relocation correctly based on where the value of the symbol got relocated to, not the value of the expression (with the offset added to the symbol value). For Release 2.0, no "local" relocation entries are ever used when there is a nonzero offset added to a symbol. The "external" and "local" relocation entries remain unchanged. It's assumed that a section will never be bigger than 2**24 1 (0x00ffffff or 16,777,215) bytes. This assumption allows the r_address (which is really an offset) to fit into 24 bits, and for the high bit of the r_address field in the relocation_info structure to indicate that it's really a scattered_relocation_info structure. Since these are only used in places where "local" relocation entries are used and not where "external" relocation entries are used, the r_extern field has been removed. |
#define R_SCATTERED 0x80000000 /* mask to be applied to r_address
field of a relocation_info struct
to tell that it is really a
scattered_relocation_info struct */
struct scattered_relocation_info {
unsigned int r_scattered:1, /* 1=scattered, 0=non-scattered */
r_pcrel:1, /* was relocated pc relative already */
r_length:2, /* 0=byte, 1=word, 2=long */
r_reserved:4, /* reserved */
r_address:24; /* offset in the section to what is
being relocated */
long r_value; /* the value the item to be relocated
refers to (with no offset added) */
};
| The Makeup of Executable Object Files |
| A typical executable (that is, with the filetype MH_EXECUTE) Mach-O object file produced by the link editor would contain the following components, in the order shown here: |
| A Mach header | ||
| An LC_SEGMENT load command for the __PAGEZERO segment | ||
| An LC_SEGMENT load command for the __TEXT segment, followed by section headers for the sections in that segment. These section headers could include __text, __fvmlib_init0, __fvmlib_init1, __const, __string, __literal8, and __literal4. | ||
| An LC_SEGMENT load command for the __DATA segment, followed by the section headers for the sections in that segment. These section headers could include __data, __bss, and __common. | ||
| An LC_SEGMENT load command for the __OBJC segment, followed by the section headers for the sections in that segment. These section headers could include __class, __meta_class, __cat_inst_meth, __els_meth, __inst_meth, __message_refs, __symbols, __category, __class_vars, __module_info, and __selector_strs. | ||
| An LC_SEGMENT load command for the __LINKEDIT segment | ||
| An LC_SYMTAB load command | ||
| An LC_UNIXTHREAD load command | ||
| An LC_LOADFMVLIB load command for each shared library it uses | ||
| The __TEXT segment rounded out to the segment alignment | ||
| The __DATA segment rounded out to the segment alignment | ||
| The __OBJC segment rounded out to the segment alignment | ||
| All the relocation entries, if saved (normally not saved) | ||
| All the stab symbol and string tables, if not stripped |
| You can use the otool command to print the contents of object files and libraries that are in Mach-O format or in UNIX 4.3BSD a.out format. Various options allow you to specify certain portions of the Mach-O file. For example: |
| -h | Print the Mach header | |
| -l | Print the load commands | |
| -t | Print the contents of the __text section (used with the -v flag, this disassembles the text; with the -V flag it also symbolically disassembles the operands) | |
| -d | Print the contents of the __data section | |
| -r | Print the relocation entries |
| Complete documentation for the otool command is contained in a UNIX manual page, which you can access through the Digital Librarian.
Additional information related to the Mach-O file format is contained in section 1 (commands), section 3 (subroutines), and section 5 (file formats and conventions) of the UNIX manual pages. You can use the following list and the Digital Librarian to find the documentation you need: |
| atom(1) | Converts an object file from a.out to Mach-O format | |
| gdb(1) | Debugs using the GNU debugger | |
| ld(1) | Links using the link editor | |
| nm(1) | Prints a symbol table | |
| otool(1) | Prints parts of an object file or library | |
| size(1) | Prints the size of an object file | |
| strip(1) | Removes symbols and relocation bits | |
| getmachheaders(3) | Gets the Mach headers for an executable | |
| getsectbyname(3) | Gets the section information for a section | |
| getsegbyname(3) | Gets the segment command for a segment | |
| nlist(3) | Gets entries from a name list | |
| Mach-O(5) | Describes Mach-O assembler and link editor output | |
| stab(5) | Describes symbol table types |


{% extends "base.html" %} {% block title_block %} Shipping Policy | Jemmy's Collection {% endblock title_block %} {% block body_block %}
We offer a flat rate shipping of Ksh.200.00 to residents of Nairobi, Kenya. If you want your items to be delivered other locations, we will contact you with options available to have the goods shipped to yourloacation.
Orders that are to be shipped to clients within Nairobi will usually be delivered in 2 days.


"Hustle Till You No Longer Have To Introduce Yourself."
Who we are?
We are a passionate team of expert developpers, eager to help you prepare for your job interview.
About the Platform
Our platform provides more than 100 different quiz tests related to different topics, like: Spring, Angular and Kafka. Coach are fully available to evaluate your test and give you there feed-back.
Try the Quick Test or Create an Account to join the community.


The care and attention to detail for end users is exactly what is taken into consideration when it comes to site layout and framework choice.
Taking advantage of the latest web development frameworks from around the world to ensure the latest features and strict industry standard.
Following the design and color standards of Google to ensure end user experience is friendly and aesthetically pleasing.
Responsive designs created for the modern world, following the latest industry standard to ensure sites are ready for use in on launch for any device in any circumstance.


{{competition.description}}
{{competition.rules}}
+{{participant.competitions.length}}
+{{participant.medias.length}}


Instructions for building android mobile app
Following section explains how to connect Andrioid App to server and built it properly
-
Download And Setup Ionic
download node
Install Node.js version 13.14.0 on your system https://nodejs.org/en/blog/release/v13.14.0/.- Install node with installer and on screen instructions.
- Verify node installation by running
node -v
you should see version 13.14.0 output. Install ionic globally 5.4.16
->npm install -g<EMAIL_ADDRESS>.- Verify ionic installation by running
ionic -v
you should see version 5.4.16 output. Install cordova globally
for platform builds ->npm install -g<EMAIL_ADDRESS>.- Verify installation by running
cordova -v
you should see version 10.0.0 output.
-
First Run
- Requires Step 1: Download And Setup Ionic
- Open your desired cmd/terminal and navigate to the source folder (project).
- run
npm install
to install project dependencies. - then run
ionic serve
to run your project in browser. - Entering into
INSPECT
mode of browser to see mobile view of the app
-
Setup And Customization
- resources
- To change app icon and splash in your template for refer https://stackoverflow.com/questions/55813237/how-to-change-default-app-icon-and-splash-screen-in-ionic-4-application.
- config.xml
config.xml
has two values. Your template’s package name/template id in id parameter in line no. 2. and template name in line number 3.
- package.json
- package.json contains all the modules and depedencies required in the project.
- src/app
- Contains all the components of the application
- All the components are decoupled for ease of extraction and use.
- All the components are designed and coded in such a way that its easy for a developer to link html with dynamic data
- src/assets
- Assets contains all the necessary fonts, languages, translations, images and other assets.
- To change logo and other image assets (only
.png
files) replace your image assets with the ones insrc/assets/images
. - Under
images
there is a seperate directory for all the template images used in the template project, i.e.demo_images
. - To chnage other image assets (other
name
image). Here you put assets pathsrc/assets/image_name.png
in your screenapp
your_page_name.page.html
. to display same screen.
- Changing Colours And Theme Settings.
- For this you’ll have to focus on two files. i.e.
src/global.scss
- containing application’s primary colours and overall styling of various components.src/theme/variables.scss
- containing primary colours for various widgets used throughout the application. For example radio buttons. Also used for dark mode colouring.- Find
--primary
and--secondary
inglobal.scss
to change mainrespective colour
of the app. Other colour codes below are also customizable. - Find
--ion-color-primary
intheme/variable.scss
to change mainrespective colour
of widgets in application. - Find
@media (prefers-color-scheme: dark)
intheme/variable.scss
and uncomment everything below from here to enable System wide dark mode colour settings.
- resources
-
Module Dynamics
- To help with this template’s speedy and easy development, certain modules, services and code snipets are included in the source code and explained below
- Services
ECommerceService
is a root service which helps in local Cart Management. ECommerceService is capable of managing all local temp data required for creating an Order. This service can be found insrc/app/services/common
.UiElementsService
is a root service which enables easy management of Toasts, Alerts and Loader elements. This service can be found insrc/app/services/common
.MyEventsService
is a root service which enables sending and receiving of custom events between components. You can add your Subject in MyEventsService like the one already added. This service can be found insrc/app/services/events
.ApiService
is a root services for all the Api calls to the backend. A simple call and error handler is demonstrated is the service. This service can be found insrc/app/services/network
.ConnectivityService
is a root service which can be used from any component to get the connectivity status in the application. This service can be found insrc/app/services/network
.GoogleMapsService
is a service used to load Google maps inside html. This service enables the use of Google Maps Javascript api, Places api and Directions api. To use this service include GoogleMapsService in providers of the component’s module. This service can be found insrc/app/services/network
.
- Social Auths
Google
to use Google login install Google Plus dependency by runningionic cordova plugin add cordova-plugin-googleplus --save --variable REVERSED_CLIENT_ID=myreversedclientid --variable WEB_APPLICATION_CLIENT_ID=mywebapplicationclientid
andnpm install @ionic-native/google-plus
https://ionicframework.com/docs/native/google-plus. Now uncomment GooglePlus module’s code from SignInPage component.Facebook
to use Facebook login install Facebook dependency by runningionic cordova plugin add cordova-plugin-facebook4 --variable APP_ID="123456789" --variable APP_NAME="myApplication"
andnpm install @ionic-native/facebook
https://ionicframework.com/docs/native/facebook. Now uncomment Facebook module’s code from SignInPage component.Apple
to use Apple login install Apple dependency by runningcordova plugin add cordova-plugin-sign-in-with-apple
https://www.npmjs.com/package/cordova-plugin-sign-in-with-apple Now uncomment Apple module’s code from SignInPage component.
- Notifications
- For notifications we have included OneSignal’s code. you can use that by creating your application on Firebase and Onesignal’s website and configuring keys in the application’s config file. All the necessary code is present in
AppComponent
https://ionicframework.com/docs/native/onesignal.
- For notifications we have included OneSignal’s code. you can use that by creating your application on Firebase and Onesignal’s website and configuring keys in the application’s config file. All the necessary code is present in
- AppConfig
- AppConfig is designed to provide all the necessary configurations for the application at one place
src/app/app.config.ts
. - AppConfig provides basic configurations like Application’s name, base url, goole api key, onesignal’s config.
- AppConfig also indexes available languages which are implemented and present in
src/assets/i18n
package. - AppConfig holds the basic firebase configuration object so that firebase.initializeApp can be called using this config inside any component.
- AppConfig also enables easy configuration of major payment gateways. Just replace appropriate values and utilize the config in any component.
- AppConfig is designed to provide all the necessary configurations for the application at one place
-
Platform Builds
- Requires Step 1: Download And Setup Ionic
- Download and install Java here: https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
- Android SDK setup. We recommend installing
Android Studio
for easy setup. https://developer.android.com/studio/ - Android Build
- To add platform run
ionic cordova platform add<EMAIL_ADDRESS>- To prepare platform run
ionic cordova prepare android
- To build debuggable .apk file run
ionic cordova build android --prod
- To build release unsigned .apk file run
ionic cordova build android --prod --release
- To generate a
Keystore
refer this. https://stackoverflow.com/questions/11446121/how-do-i-generate-a-keystore-for-google-play - To sign builds and publishing refer this. https://ionicframework.com/docs/deployment/play-store.
- To add platform run
- iOS Build
- To add platform run
ionic cordova platform add<EMAIL_ADDRESS>- To prepare platform run
ionic cordova prepare ios
- To build debuggable .apk file run
ionic cordova build ios --prod
- Opening respective project, open the .xcworkspace file in ./platforms/ios/ to start Xcode.
- For XCode setup refer this. https://ionicframework.com/docs/developing/ios
- To add platform run
-
Deployment Of Applications
- Signing Builds
- Android
- To sign builds and publishing refer this. https://ionicframework.com/docs/deployment/play-store.
- IOS
- To sign builds and publishing refer this. https://ionicframework.com/docs/deployment/app-store.
- Android
- Deploying apps on Google Play Store and Apple App Store is out of the scope of this document.
- Kindly refer to this guide for further instructions.
- Signing Builds


1 injured in T-bone crash in Ottumwa
by Romelo StylesOTTUMWA, Iowa — A T-bone crash happened on Church Street in Ottumwa Friday afternoon.
The accident is still under investigation. There was one injury. Police said it was minor.
The injured person was tended to by emergency medical personnel on the scene.