How do I configure the network of the host machine?
VirtualBox networking recommendations
A typical use case for the FIT4Green live CD is to run it on a dedicated
host having the same network access to and from the outer world on the VM as
on the host machine. When using the default VirtualBox networking
Network Address Translation (NAT), the VM with the live CD will be
invisible and unreachable from the outside world. So, you do not have access
to the FIT4Green Tomcat server. Also ssh from the host to the VM is not
available.
To solve these issues, you can follow one of the methods below:
- Use the VirtualBox network method Bridged Adapter. This allows
to run a VM which will be assigned an IP address automatically from the
DCHP server in your network; it will behave as a separate machine
and you can access it from ssh, http, etc.. (provided that the
configuration rules of your network allow it) in the same way you would
do with any other physical machine connected to your network.
For details see here.
- Use the VirtualBox network method Host-only Adapter. In this case
you have to also enable some port forwarding rules, so that the VM can be
connected from outside (e.g. the proxy software on the target systems can
communicate with communication plug-ins in the Tomcat server).
For details see here.


The appname.js
file is the file that contains the Javascript code that supports the matching appname-html file. By convention it
is uses the same name as the appname.html
file with a replacement of the extension with .js.
Samples include the Deps.js
and Chqs.js
in the Apps and tutorial examples.
The samples are documented and can be used to create new
appname.js
files.
The following major sections are found in the appname.js
file:
The ctrlMain
function is called by the AngularJS infrastructure because it is the ng-controller specified on the <body>
statement
of the appname.html
file.
Here is a sample of the beginning of the ctrlMain
function taken from Deps.js
.
function ctrlMain($scope,servSess,servGAE,tblDEP,tblENV,tblDON,servCRUD,servREG) { log("Created ctrlMain for deps application"); servGAE.setCust("deps"); servSess.setTitle("Deposit Recording System"); var oOpts = [{menu:"Admin Functions",func:xfrAdminFunctions,role:'admin'},{menu:"Deposit Summaries",func:printDepSum,role:'elder',sandbox:true}]; servSess.setOptMenuItems(oOpts); function xfrAdminFunctions() { servSess.xfrAdminApp("deps",["TableDonors"]); } ...
It contains the following components.
Line 1, the function statement references, beside the Triangular services such as servSess
, the Tables
that should be accessible to the application.
Line 3, initialization code that defines the customer (see servGAE.setCust)
Line 4, initialization code that defines the application title (see servSess.setTitle)
lines 4 & 5, initialization code that defines the optional menu items (see servSess.setOptMenuItems)
line 8, the local function referenced in line 5 that defines how to transfer to the Admin app.
An optional logonExit
that modifies the optional menu items depending on the role or profile of the User that logged on. See Chq.js
as an example.
Any functions required to support the optional menu items
Any functions that extend the standard Edit Controller or List Controller. Note that the sample Deps.js
code
does extend the Edit Controller but has no additional functions as they were found useful and moved to the
standard Edit Controller.
The table defintition(s) can be defined in an external .js file or here. By convention at least the primary 'Table` definition is coded here. External definitions have the advantage that they can be used in more than 1 application (such as the Admin Application where updates to certain tables can be limited to the system administrator).
The Table
defintion syntax is extensive and defined in Table (static version).


"PNG transparency demonstration" by "POV-Ray source" code is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License
Based on a work at https://commons.wikimedia.org/wiki/File:PNG_transparency_demonstration_1.png


#include <AR6/ARG/arg.h>
#include <string.h>
#include "arg_gl.h"
#include "arg_gl3.h"
#include "arg_gles2.h"
Functions | |
| int | arglIsOpenGLES2OrLater () |
| uint16_t | arglOpenGLVersion () |
| ARGL_CONTEXT_SETTINGS_REF | arglSetupForCurrentContext (const ARParam *cparam, AR_PIXEL_FORMAT pixelFormat) |
| Initialise the arg library for the current OpenGL context. More... | |
| int | arglSetupDebugMode (ARGL_CONTEXT_SETTINGS_REF contextSettings, ARHandle *arHandle) |
| Provide an ARHandle structure from which to extract information about debug mode. More... | |
| void | arglCleanup (ARGL_CONTEXT_SETTINGS_REF contextSettings) |
| Free memory used by arg associated with the specified context. More... | |
| void | arglDispImage (ARGL_CONTEXT_SETTINGS_REF contextSettings, int32_t viewport[4]) |
| Display an ARVideo image, by drawing it using OpenGL. More... | |
| int | arglDistortionCompensationSet (ARGL_CONTEXT_SETTINGS_REF contextSettings, int enable) |
| Set compensation for camera lens distortion in arglDispImage to off or on. More... | |
| int | arglDistortionCompensationGet (ARGL_CONTEXT_SETTINGS_REF contextSettings, int *enable) |
| Enquire as to the enable state of camera lens distortion compensation in arglDispImage. More... | |
| int | arglSetPixelZoom (ARGL_CONTEXT_SETTINGS_REF contextSettings, float zoom) |
| Set the current video image drawing scalefactor. More... | |
| int | arglGetPixelZoom (ARGL_CONTEXT_SETTINGS_REF contextSettings, float *zoom) |
| Retrieve the current video image drawing scalefactor. More... | |
| int | arglPixelFormatSet (ARGL_CONTEXT_SETTINGS_REF contextSettings, AR_PIXEL_FORMAT format) |
| Set the format of pixel data which will be passed to arglDispImage*() More... | |
| int | arglPixelFormatGet (ARGL_CONTEXT_SETTINGS_REF contextSettings, AR_PIXEL_FORMAT *format, int *size) |
| Get the format of pixel data in which arglDispImage*() is expecting data to be passed. More... | |
| void | arglSetRotate90 (ARGL_CONTEXT_SETTINGS_REF contextSettings, int rotate90) |
| Set or unset a 90 degree rotation in all OpenGL drawing performed by ARGL. More... | |
| int | arglGetRotate90 (ARGL_CONTEXT_SETTINGS_REF contextSettings) |
| Find out whether ARGL is rotating all OpenGL drawing by 90 degrees. More... | |
| void | arglSetFlipH (ARGL_CONTEXT_SETTINGS_REF contextSettings, int flipH) |
| int | arglGetFlipH (ARGL_CONTEXT_SETTINGS_REF contextSettings) |
| void | arglSetFlipV (ARGL_CONTEXT_SETTINGS_REF contextSettings, int flipV) |
| int | arglGetFlipV (ARGL_CONTEXT_SETTINGS_REF contextSettings) |
| int | arglPixelBufferSizeSet (ARGL_CONTEXT_SETTINGS_REF contextSettings, int bufWidth, int bufHeight) |
| Specify a desired pixel buffer size larger than the camera image size. More... | |
| int | arglPixelBufferSizeGet (ARGL_CONTEXT_SETTINGS_REF contextSettings, int *bufWidth, int *bufHeight) |
| Query the size of pixel data buffers expected by arglPixelBufferDataUpload(). More... | |
| int | arglPixelBufferDataUploadBiPlanar (ARGL_CONTEXT_SETTINGS_REF contextSettings, ARUint8 *bufDataPtr0, ARUint8 *bufDataPtr1) |
| Upload a buffer of pixel data to an OpenGL texture for later use by arglDispImage(). More... | |
| int | arglGLCapabilityCheck (ARGL_CONTEXT_SETTINGS_REF contextSettings, const uint16_t minVersion, const unsigned char *extension) |
| Checks for the presence of an OpenGL capability by version or extension. More... | |
Function Documentation
| void arglCleanup | ( | ARGL_CONTEXT_SETTINGS_REF | contextSettings | ) |
Free memory used by arg associated with the specified context.
Should be called after no more argl* functions are needed, in order to prevent memory leaks etc.
The library can be setup again for the context at a later time by calling arglSetupForCurrentContext() again.
- Parameters
-
contextSettings A reference to ARGL's settings for an OpenGL context, as returned by arglSetupForCurrentContext(). If NULL, arglCleanup performs no operation.
- Since
- First appeared in ARToolKit 2.68.
| void arglDispImage | ( | ARGL_CONTEXT_SETTINGS_REF | contextSettings, |
| int32_t | viewport[4] | ||
| ) |
Display an ARVideo image, by drawing it using OpenGL.
This function draws an image from an ARVideo source to the current OpenGL context. This operation is most useful in video see-through augmented reality applications for drawing the camera view as a background image, but can also be used in other ways.
An undistorted image is drawn with the lower-left corner of the bottom-left-most pixel at OpenGL screen coordinates (0,0), and the upper-right corner of the top-right-most pixel at OpenGL screen coodinates (x * zoom, y * zoom), where x and y are the values of the fields cparam->xsize and cparam->ysize (see below) and zoom is the value of the parameter zoom (also see below). If cparam->dist_factor indicates that an un-warping correction should be applied, the actual coordinates will differ from the values specified here.
OpenGL state: Drawing is performed with depth testing and lighting disabled, and thus leaves the the depth buffer (if any) unmodified. If pixel transfer is by texturing and the drawing is done in replacement texture environment mode. The depth test enable and lighting enable state and the texture environment mode are NOT restored before the function returns.
- Parameters
-
contextSettings A reference to ARGL's settings for the current OpenGL context, as returned by arglSetupForCurrentContext() for this context. It is the callers responsibility to make sure that the current context at the time arglDisplayImage() is called matches that under which contextSettings was created. viewport OpenGL-style viewport to be applied prior to drawing, or NULL in which case the viewport will not be set prior to drawing.
- Since
- First appeared in ARToolKit 2.68.
| int arglDistortionCompensationGet | ( | ARGL_CONTEXT_SETTINGS_REF | contextSettings, |
| int * | enable | ||
| ) |
Enquire as to the enable state of camera lens distortion compensation in arglDispImage.
By default, arglDispImage compensates for the distortion of the camera's acquired image caused by the lens when it draws. This function enquires as to whether arglDispImage is currently doing compensation or not.
- Parameters
-
contextSettings A reference to ARGL's settings for the current OpenGL context, as returned by arglSetupForCurrentContext() for this context. enable Pointer to an integer value which will be set to TRUE if distortion compensation is enabled in the specified context, or FALSE if it is disabled.
- Returns
- TRUE if the distortion value was retreived, FALSE if an error occurred.
- Since
- First appeared in ARToolKit 2.71.
| int arglDistortionCompensationSet | ( | ARGL_CONTEXT_SETTINGS_REF | contextSettings, |
| int | enable | ||
| ) |
Set compensation for camera lens distortion in arglDispImage to off or on.
By default, arglDispImage compensates for the distortion of the camera's acquired image caused by the lens when it draws. By calling this function with enabled = FALSE, this compensation will be disabled in the specified drawing context. It may be re-enabled at any time. This function is useful if you need to draw an image, but do not know the extent of the camera's lens distortion (such as during distortion calibration). While distortion compensation is disabled, the dist_factor[] array in a the camera cparam structure passed to arglDispImage is ignored.
- Parameters
-
contextSettings A reference to ARGL's settings for the current OpenGL context, as returned by arglSetupForCurrentContext() for this context. enable TRUE to enabled distortion compensation, FALSE to disable it. The default state for new contexts is enable = TRUE.
- Returns
- TRUE if the distortion value was set, FALSE if an error occurred.
- Since
- First appeared in ARToolKit 2.71.
| int arglGetFlipH | ( | ARGL_CONTEXT_SETTINGS_REF | contextSettings | ) |
| int arglGetFlipV | ( | ARGL_CONTEXT_SETTINGS_REF | contextSettings | ) |
| int arglGetPixelZoom | ( | ARGL_CONTEXT_SETTINGS_REF | contextSettings, |
| float * | zoom | ||
| ) |
Retrieve the current video image drawing scalefactor.
- Parameters
-
zoom The amount to scale the video image up or down. To draw the video image double size, use a zoom value of 2.0. To draw the video image half size use a zoom value of 0.5.
| int arglGetRotate90 | ( | ARGL_CONTEXT_SETTINGS_REF | contextSettings | ) |
Find out whether ARGL is rotating all OpenGL drawing by 90 degrees.
On some OpenGL ES devices, it may be desirable to rotate all OpenGL drawing by 90 degrees in the window coordinate system, in order to swap the horizontal and vertical axes of the device. This may be a higher performance solution than manually swapping rows and columns of submitted data.
This function queries the current state of whether such a rotation is being performed by ARGL or not.
- Parameters
-
contextSettings A reference to ARGL's settings for the current OpenGL context, as returned by arglSetupForCurrentContext() for this context.
- Returns
- TRUE if a 90 degree rotation is enabled, FALSE if it is disabled.
| int arglGLCapabilityCheck | ( | ARGL_CONTEXT_SETTINGS_REF | contextSettings, |
| const uint16_t | minVersion, | ||
| const unsigned char * | extension | ||
| ) |
Checks for the presence of an OpenGL capability by version or extension.
Checks for the presence of an OpenGL capability by version or extension. The test returns true if EITHER the OpenGL driver's OpenGL implementation version meets or exceeds a minimum value (passed in in minVersion) OR if an OpenGL extension identifier passed in as a character string is non-NULL, and is found in the current driver's list of supported extensions.
- Parameters
-
contextSettings A reference to ARGL's settings for the current OpenGL context, as returned by arglSetupForCurrentContext() for this context. minVersion A binary-coded decimal (i.e. version 1.0 is represented as 0x0100) version number. If minVersion is zero, (i.e. there is no version of OpenGL with this extension in core) the version test will always fail, and the result will only be true if the extension string test passes. extension A string with an extension name to search the drivers extensions string for. E.g. "GL_EXT_texture". If NULL, the extension name test will always fail, and the result will only be true if the version number test passes.
- Returns
- TRUE If either of the tests passes, or FALSE if both fail.
- Since
- First available in ARToolKit 4.5.0.
| int arglIsOpenGLES2OrLater | ( | ) |
| uint16_t arglOpenGLVersion | ( | ) |
| int arglPixelBufferDataUploadBiPlanar | ( | ARGL_CONTEXT_SETTINGS_REF | contextSettings, |
| ARUint8 * | bufDataPtr0, | ||
| ARUint8 * | bufDataPtr1 | ||
| ) |
Upload a buffer of pixel data to an OpenGL texture for later use by arglDispImage().
ARGL provides the ability to perform distortion-compensated texturing of a camera video image into the OpenGL context, for the purpose of video-see through augmented reality. This function uploads the camera image data to an OpenGL texture, ready for later drawing using the function arglDispImage().
If a pointer to an ARParam structure has been passed in to function arglSetupDebugMode, then a check will be made whether debug mode is enabled, and if it is, then the buffer pointed to by this function will be ignored, and instead the debug image will be loaded for texturing.
- Parameters
-
contextSettings A reference to ARGL's settings for the current OpenGL context, as returned by arglSetupForCurrentContext() for this context. bufDataPtr0 A pointer to the pixel buffer, which is a block of memory from which texture data will be read.
The layout of pixel data in the memory pointed to by bufDataPtr is assumed to be specified by the value of pixelFormat in the ARHandle submitted to arglSetupForCurrentContext(), but can be changed by calling arglPixelFormatSet() and/or arglPixelBufferSizeSet().
By default, the pixel buffer is assumed to be tightly packed, row-major array of dimensions equal to the calibrated camera image size (as passed in the fields arParam.xsize and arParam.ysize of the ARHandle submitted to arglSetupForCurrentContext().
The pixel data buffer submitted may, under some circumstances be allowed to be larger than the values of the calibrated camera image size (i.e. padded). See the discussion section of the documentation for function arglPixelBufferSizeSet() for more information.
This may only occur when the underlying OpenGL ES impementation does not support non-power-of-two textures. For the Apple iPhone family, this applies to the iPhone, the iPhone 3G, the iPod Touch 1st and 2nd Generation. The iPhone 3GS and the iPod Touch 3rd Generation support non-power-of-two textures, and thus padding of the pixel data buffer is not supported on these devices. If padding is desired, the desired buffer size must be submitted using arglPixelBufferSizeSet(). Check that the result from this function is TRUE before attempting to upload such a padded buffer.
- Parameters
-
bufDataPtr1 NULL for single-plane (interleaved) textures, otherwise for bi-planar textures, a pointer to the pixel buffer, which is a block of memory from which texture data will be read for the second plane containing the CbCr components. This plane must have dimensions of half the size of plane 0, and 2-bytes per pixel (1 byte Cb, 1 byte Cr).
- Returns
- TRUE if the pixel buffer was successfully uploaded to OpenGL, FALSE otherwise.
- See also
- arglSetupDebugMode
| int arglPixelBufferSizeGet | ( | ARGL_CONTEXT_SETTINGS_REF | contextSettings, |
| int * | bufWidth, | ||
| int * | bufHeight | ||
| ) |
Query the size of pixel data buffers expected by arglPixelBufferDataUpload().
See function arglPixelBufferSizeSet() for a full discussion.
- Parameters
-
contextSettings A reference to ARGL's settings for the current OpenGL context, as returned by arglSetupForCurrentContext() for this context. bufWidth A pointer to int, which will be filled out with the buffer width, in pixels, or NULL if this value is not required. bufHeight A pointer to int, which will be filled out with the buffer height, in pixels, or NULL if this value is not required..
- Returns
- TRUE if the buffer size was successfully queried, FALSE otherwise.
| int arglPixelBufferSizeSet | ( | ARGL_CONTEXT_SETTINGS_REF | contextSettings, |
| int | bufWidth, | ||
| int | bufHeight | ||
| ) |
Specify a desired pixel buffer size larger than the camera image size.
By default, the pixel buffer accepted by function arglPixelBufferDataUpload() is assumed to be tightly packed, row-major array of dimensions equal to the calibrated camera image size (as passed in the fields arParam.xsize and arParam.ysize of the ARHandle submitted to arglSetupForCurrentContext().
The pixel data buffer submitted may, under some circumstances be allowed to be larger than the values of the calibrated camera image size (i.e. padded). This may only occur when the underlying OpenGL ES impementation does not support non-power-of-two textures. For the Apple iPhone family, this applies to the iPhone, the iPhone 3G, the iPod Touch 1st and 2nd Generation. The iPhone 3GS and the iPod Touch 3rd Generation support non-power-of-two textures, and thus padding of the pixel data buffer is not supported on these devices. If padding is desired, the desired buffer size must be submitted using this function. Check that the result from this function is TRUE before attempting to upload such a padded buffer.
- Parameters
-
contextSettings A reference to ARGL's settings for the current OpenGL context, as returned by arglSetupForCurrentContext() for this context. bufWidth The desired buffer width, in pixels. bufHeight The desired buffer height, in pixels.
- Returns
- TRUE if the desired buffer size is supported, FALSE otherwise.
| int arglPixelFormatGet | ( | ARGL_CONTEXT_SETTINGS_REF | contextSettings, |
| AR_PIXEL_FORMAT * | format, | ||
| int * | size | ||
| ) |
Get the format of pixel data in which arglDispImage*() is expecting data to be passed.
This function enquires as to the current format of pixel data being expected by the arglDispImage*() functions. The default format is determined by the value of AR_DEFAULT_PIXEL_FORMAT at the time the library was built.
- Parameters
-
contextSettings A reference to ARGL's settings for the current OpenGL context, as returned by arglSetupForCurrentContext() for this context. format A symbolic constant for the pixel format in use. See AR_PIXEL_FORMAT in ar.h for a list of all possible formats. size The number of bytes of memory occupied per pixel, for the given format.
- Returns
- TRUE if the pixel format and size values were retreived, FALSE if an error occurred.
- Since
- First appeared in ARToolKit 2.71.
| int arglPixelFormatSet | ( | ARGL_CONTEXT_SETTINGS_REF | contextSettings, |
| AR_PIXEL_FORMAT | format | ||
| ) |
Set the format of pixel data which will be passed to arglDispImage*()
(description) In arg, the format of the pixels (i.e. the arrangement of components within each pixel) can be changed at runtime. Use this function to inform arg the format the pixels being passed to arglDispImage*() functions are in. This setting applies only to the context passed in parameter contextSettings. The default format is determined by the value of AR_DEFAULT_PIXEL_FORMAT at the time the library was built. Usually, image data is passed in directly from images generated by ARVideo, and so you should ensure that ARVideo is generating pixels of the same format.
- Parameters
-
contextSettings A reference to ARGL's settings for the current OpenGL context, as returned by arglSetupForCurrentContext() for this context. format A symbolic constant for the pixel format being set. See AR_PIXEL_FORMAT in ar.h for a list of all possible formats.
- Returns
- TRUE if the pixel format value was set, FALSE if an error occurred.
- Since
- First appeared in ARToolKit 2.71.
| void arglSetFlipH | ( | ARGL_CONTEXT_SETTINGS_REF | contextSettings, |
| int | flipH | ||
| ) |
| void arglSetFlipV | ( | ARGL_CONTEXT_SETTINGS_REF | contextSettings, |
| int | flipV | ||
| ) |
| int arglSetPixelZoom | ( | ARGL_CONTEXT_SETTINGS_REF | contextSettings, |
| float | zoom | ||
| ) |
Set the current video image drawing scalefactor.
- Parameters
-
zoom The amount to scale the video image up or down. To draw the video image double size, use a zoom value of 2.0. To draw the video image half size use a zoom value of 0.5.
| void arglSetRotate90 | ( | ARGL_CONTEXT_SETTINGS_REF | contextSettings, |
| int | rotate90 | ||
| ) |
Set or unset a 90 degree rotation in all OpenGL drawing performed by ARGL.
On some OpenGL ES devices, it may be desirable to rotate all OpenGL drawing by 90 degrees in the window coordinate system, in order to swap the horizontal and vertical axes of the device. This may be a higher performance solution than manually swapping rows and columns of submitted data.
This function enables or disables such an axis swap in ARGL with very little performance cost, by introducing a 90-degree rotation into the OpenGL projection matrix.
By default, 90 degree rotation is DISABLED.
- Parameters
-
contextSettings A reference to ARGL's settings for the current OpenGL. context, as returned by arglSetupForCurrentContext() for this context. rotate90 Set to TRUE or 1 to enable 90 degree rotation, FALSE to disable.
| int arglSetupDebugMode | ( | ARGL_CONTEXT_SETTINGS_REF | contextSettings, |
| ARHandle * | arHandle | ||
| ) |
Provide an ARHandle structure from which to extract information about debug mode.
This provides support for the debug mode in libAR. If arg has been compiled with debug mode support, the passed in ARHandle is used as the source of whether debug mode is enabled or disabled. If enabled, the binarized debug image will be drawn instead of the input image.
- Parameters
-
arHandle A pointer to an ARHandle structure from which to extract debug info, or NULL if debug functionality is not required. Default is NULL.
- Returns
- TRUE if the mode was set, FALSE if an error occurred.
- Since
- First appeared in ARToolKit 4.5.12.
- See also
- arglPixelBufferDataUpload
| ARGL_CONTEXT_SETTINGS_REF arglSetupForCurrentContext | ( | const ARParam * | cparam, |
| AR_PIXEL_FORMAT | pixelFormat | ||
| ) |
Initialise the arg library for the current OpenGL context.
This function performs required setup of the arg library for the current OpenGL context and must be called before any other argl*() functions are called for this context.
An OpenGL context holds all of the state of the OpenGL machine, including textures and display lists etc. There will usually be one OpenGL context for each window displaying OpenGL content.
Other argl*() functions whose operation depends on OpenGL state will require an ARGL_CONTEXT_SETTINGS_REF. This is just so that they can keep track of per-context variables.
You should call arglCleanup() passing in the ARGL_CONTEXT_SETTINGS_REF when you have finished with the library for this context.
- Parameters
-
cparam Pointer to a set of ARToolKit camera parameters for the current video source. The size of the source image is taken from the fields xsize and ysize of the ARParam structure pointed to. Also, the field dist_factor of the ARParam structure pointed to will be taken as the amount to un-warp the supplied image.
Prior to ARToolKit v5.1.5, the ARParam structure pointed to had to remain valid in memory for the duration of the ARGL_CONTEXT_SETTINGS_REF's usage. As of ARToolKit v5.1.5, the ARParam structure pointed to is copied, and no longer need be maintained.
- Parameters
-
pixelFormat The type and format of pixels of the images to be drawn by the arg library. This value can be changed later by using arglPixelFormatSet()
- Returns
- An ARGL_CONTEXT_SETTINGS_REF. See the documentation for this type for more info.
- Since
- First appeared in ARToolKit 2.68.


ofstream
: Stream class to write on filesifstream
: Stream class to read from filesfstream
: Stream class to both read and write from/to files.istream
and ostream
. We have already used objects whose types were these classes: cin
is an object of class istream
and cout
is an object of class ostream
. Therefore, we have already been using classes that are related to our file streams. And in fact, we can use our file streams the same way we are already used to use cin
and cout
, with the only difference that we have to associate these streams with physical files. Let's see an example:
|
|
[file example.txt] Writing this to a file. |
example.txt
and inserts a sentence into it in the same way we are used to do with cout
, but using the file stream myfile
instead.myfile
) and any input or output operation performed on this stream object will be applied to the physical file associated to it.open
:
open (filename, mode);
filename
is a string representing the name of the file to be opened, and mode
is an optional parameter with a combination of the following flags:ios::in | Open for input operations. |
ios::out | Open for output operations. |
ios::binary | Open in binary mode. |
ios::ate | Set the initial position at the end of the file. If this flag is not set, the initial position is the beginning of the file. |
ios::app | All output operations are performed at the end of the file, appending the content to the current content of the file. |
ios::trunc | If the file is opened for output operations and it already existed, its previous content is deleted and replaced by the new one. |
|
). For example, if we want to open the file example.bin
in binary mode to add data we could do it by the following call to member function open
:
|
|
open
member functions of classes ofstream
, ifstream
and fstream
has a default mode that is used if the file is opened without a second argument:| class | default mode parameter |
|---|---|
ofstream | ios::out |
ifstream | ios::in |
fstream | ios::in | ios::out |
ifstream
and ofstream
classes, ios::in
and ios::out
are automatically and respectively assumed, even if a mode that does not include them is passed as second argument to the open
member function (the flags are combined).fstream
, the default value is only applied if the function is called without specifying any value for the mode parameter. If the function is called with any value in that parameter the default mode is overridden, not combined.open
member function and has the exact same parameters as this member. Therefore, we could also have declared the previous myfile
object and conduct the same opening operation in our previous example by writing:
|
|
is_open
. This member function returns a bool
value of true
in the case that indeed the stream object is associated with an open file, or false
otherwise:
|
|
close
. This member function takes flushes the associated buffers and closes the file:
|
|
close
.ios::binary
flag is not included in their opening mode. These files are designed to store text and thus all values that are input or output from/to them can suffer some formatting transformations, which do not necessarily correspond to their literal binary value.cout
:
|
|
[file example.txt] This is a line. This is another line. |
cin
:
|
|
This is a line. This is another line. |
true
if the stream is ready for more operations, and false
if either the end of the file has been reached or if some other error occurred.bool
value): bad()
true
if a reading or writing operation fails. For example, in the case that we try to write to a file that is not open for writing or if the device where we try to write has no space left.fail()
true
in the same cases as bad()
, but also in the case that a format error happens, like when an alphabetical character is extracted when we are trying to read an integer number.eof()
true
if a file open for reading has reached the end.good()
false
in the same cases in which calling any of the previous functions would return true
. Note that good
and bad
are not exact opposites (good
checks more state flags at once).clear()
can be used to reset the state flags.ifstream
, like istream
, keeps an internal get position with the location of the element to be read in the next input operation.ofstream
, like ostream
, keeps an internal put position with the location where the next element has to be written.fstream
, keeps both, the get and the put position, like iostream
.streampos
, which is a type representing the current get position (in the case of tellg
) or the put position (in the case of tellp
).
seekg ( position );
seekp ( position );
position
(counting from the beginning of the file). The type for this parameter is streampos
, which is the same type as returned by functions tellg
and tellp
.
seekg ( offset, direction );
seekp ( offset, direction );
direction
. offset
is of type streamoff
. And direction
is of type seekdir
, which is an enumerated type that determines the point from where offset is counted from, and that can take any of the following values:ios::beg | offset counted from the beginning of the stream |
ios::cur | offset counted from the current position |
ios::end | offset counted from the end of the stream |
|
|
size is: 40 bytes. |
begin
and end
:
|
|
streampos
is a specific type used for buffer and file positioning and is the type returned by file.tellg()
. Values of this type can safely be subtracted from other values of the same type, and can also be converted to an integer type large enough to contain the size of the file.streampos
and streamoff
. These types are also defined as member types of the stream class:| Type | Member type | Description |
|---|---|---|
streampos | ios::pos_type | Defined as fpos<mbstate_t> .It can be converted to/from streamoff and can be added or subtracted values of these types. |
streamoff | ios::off_type | It is an alias of one of the fundamental integral types (such as int or long long ). |
<<
and >>
) and functions like getline
is not efficient, since we do not need to format any data and data is likely not formatted in lines.write
and read
. The first one (write
) is a member function of ostream
(inherited by ofstream
). And read
is a member function of istream
(inherited by ifstream
). Objects of class fstream
have both. Their prototypes are:memory_block
is of type char*
(pointer to char
), and represents the address of an array of bytes where the read data elements are stored or from where the data elements to be written are taken. The size
parameter is an integer value that specifies the number of characters to be read or written from/to the memory block.
|
|
the entire file content is in memory |
ios::ate
flag, which means that the get pointer will be positioned at the end of the file. This way, when we call to member tellg()
, we will directly obtain the size of the file.
|
|
|
|
streambuf
. This buffer object may represent a memory block that acts as an intermediary between the stream and the physical file. For example, with an ofstream
, each time the member function put
(which writes a single character) is called, the character may be inserted in this intermediate buffer instead of being written directly to the physical file with which the stream is associated.flush
and endl
.sync()
causes an immediate synchronization. This function returns an int
value equal to -1 if the stream has no associated buffer or in case of failure. Otherwise (if the stream buffer was successfully synchronized) it returns 0
.| Previous: Preprocessor directives | Index |


If you plan to drive your Jeep on the street, check your local laws to make sure that bobbing the bumper and removing the side marker lights will not make your Jeep illegal. The side marker lights can be moved up to the side of the hood if they are necessary to stay street legal.
If you are going to remove your side marker lights and keep your fender flares, you'll need to leave enough material on the fender to attach the fender flare. The top of the fender flare should be lined up with the top of the fender, which for most fender flares, will mean you'll be removing about 3/4" of material all around the edge.
Before you start cutting anything, remove the side marker lights and secure the the wires out of the way. Next, put down a layer or three of masking tape over the area you plan to cut to protect the paint and to make it easier to draw a line.
The front of the fender will require some imagination and what you cut will depend on personal taste. To get a true flat fender look, you'll need to remove most of the round front part of the fender. You may want to scribe a guide line along the front grill since it will be difficult to see what you are cutting when you are cutting along the grill. Mark out both sides so you get an even look.
Once you have the lines drawn, use a saber saw with a 24 tooth per inch blade or similar tool to remove the material. This should leave a very clean cut that only needs some filing to remove burrs and some touch up paint.
After everything is cut and painted, you'll want to remount your fender flares. Before you mount them, you'll need to trim them down using a utility knife with a sharp, new blade. Trim them to the new lines of your fenders and try not to cut your finger.
There's a trail in Colorado called Mine Sweeper that is a test of bumper length. The first obstacle is called "Winch and Go" because almost no one makes it. Those that make it have a short bumper because it is a large stone step and once you crest it, you have to make a sharp right. If your bumper is too long, you won't be able to make a sharp enough right and you'll be stuck on the crest or bounce back down. If you've been to Moab, it is like Bump Dump on Hell's Revenge with a turn at the top.
Again, you might want to check local laws before chopping your bumper. You can cut your bumper really short like Mark did, or you can leave some. The easy way to tell the maximum amount of bumper to leave is by turning the wheel to the stop and taking a straight edge along the outside edge of the tire. Chop the bumper along this plane. A circular hand saw with a metal cutting blade works great for this.
Thanks to Mark Sailer for the flat fender pictures and information. For more information, check out Mark Sailers 's step by step write up on the flat fender look.


step1 登入
請先按下方登入按鈕
step2 選擇要管理的粉絲團
先按這取得列表，接著從下方選取粉絲團
step3 選取要比對like與留言的文章
目前選擇的粉絲團是:
No page selected
No page selected
No page selected
點選文章立即比對
like:
comments:
share:
like and comments:
like and comments and shared:
Now go look at
your pageand if the API request was successful, you'll see the Hello, World post in the feed.


leading
top bar
main panel with a link.
(to check we're copying children around properly).
Here's some text that comes AFTER the combo box.
(to check we're copying children around properly).
Here's some text that comes AFTER the combo box.
bottom bar
trailing


Sensors¶
Sensors enable you to predict disasters before they happen. Correctly guessing which disaster will happen next can allow you to choose the correct decree. There is a sensor for every disaster, and each one must be upgraded individually. The six sensors are named fire, tornado, blizzard, earthquake, monster, and ufo.
Weather can be difficult to predict. The likelihood that certain disasters will occur will not be completely accurate. You can upgrade your sensors by allocating effort to the sensor. Upgrading your sensor will make the sensor more accurate by decreasing the range up and down that it can be wrong.
| Level | Effort Cost | Sensor Inaccuracy Range |
|---|---|---|
| Base | 0 | 100 |
| 1 | 4000 | 50 |
| 2 | 8500 | 20 |
| 3 | 13500 | 1 |
If you want to access your sensors, city.sensors[SensorType.fire]
, and from there you can call the variables of the sensor like city.sensors[SensorType.fire].effort_remaining


Creative Computing
Joel Gethin Lewis
Week 2: Lecture 3: Drawing
What I'm going to talk about now:
- Group meditation.
- Questions?
- Git and GitHub.
- Drawing on paper.
- Moving from zero spatial dimensions to one and on to two.
- Art from rules.
- Colour and colour on computers.
- Feedback.
- Homework Assignment - exercises from Code as Creative Medium - Arrays and Colour as well as introduction to p5.js
Are you recording Joel? Have you taken the register first?
2. Git and GitHub.
- Has everyone made GitHub ID's?
- Has everyone sent them to me on Slack?
2. Git and GitHub (continued).
- "Git is a distributed version-control system for tracking changes in source code during software development".
- Git is an open source piece of software that lets people all over the world share their code with each other in a way via the internet that allows them to move forward with coding separately, and then merge their different versions into a single piece of software in an organised and trackable way. Git was created by Linus Torvalds to help with the creation of the Linux kernel - another piece of software he originally created. Git is used by most (87.2% in 2018) developers to manage the development of their software.
- GitHub is a startup that makes it easier to use Git on the world wide web. Incidentally, it's owned by Microsoft who bought it in 2018 for $7.5 billion.
- Let's take a look at GitHub and talk about why it might be useful to make something like Git.
2. Git and GitHub (continued).
- Let's take a look at the frankly brilliant Daniel Shiffman's YouTube playlist:"Git for poets".
- Shall we do it now and make a rainbow poem or two?
- Before we start the tutorials, do you all have Visual Studio Code installed? If not, let's make sure everyone has done that first.
- Second, we don't have time to go through the whole playlist, but we can get a good idea of the basics. You can watch the whole playlist as your leisure. I started with GitHub just downloading the .zip files (demo) and running the applications, then I started actually compiling the code to make my own applications, before moving on to contributing my own code with something called pull requests
- Third, here are some other resources for learning about GitHub and Git: https://try.github.io/, https://guides.github.com/, https://help.github.com/en.
2. Git and GitHub (continued).
- Incidentally, I'd like to show you how I organise my files on my computer, you might find it useful, it's the result of 20 years of
- First of all, my folder structure - I have a folder for my projects, my records, my research and my personal things. I've got Time Machine working on my Mac, so I'm always backed up and also have an iCloud drive.
2. Git and GitHub (continued).
- In each any of my project/records/research/personal folders, I have a series of named folders describing each individual project.
- In each project folder I have a projectNameWorkRecord.txt and then a series of dated and named folders. The WorkRecord.txt is the diary of every project, with every email and bit of progress dated as it is being done. I also keep a Todo and Done list at the bottom of each file, as well as other important information.
- Each folder is named year_month_date_subject - for example 2019_09_25_WorkingOnLecture3. In this way, when I sort by name, I actually sort by date.
- I do this so I have a written record of the work I've done on anything, in order. This has come in useful in case of disputes about who did what, when.
3. Drawing on paper.
- Next we are going to talk about drawing, first on a piece of paper. Later, We are also going to think about the idea of dimensions - how many variables we use to describe something - the most common you've encountered so far probably being space - or the spatial dimensions.
- Before we get onto that, lets get into three's and get a piece of paper for each group and a pen each too.
- One person is going to be the model, one person is going to be the blind drawing robot and one person is going to be the sighted drawing instruction robot.
3. Drawing on paper (continued).
- Model - you have to make sure the blind drawing robot doesn't cheat, and pose your hand using a secret number of fingers.
- Blind drawing robot - listen for commands.
- Sighted drawing instruction robot - which command are you going to give first?
- Go!
4. Moving from zero spatial dimensions to one and on to two.
- Starting with zero spatial (or physical space) dimensions - a point.
- Moving from zero spatial dimensions to one and on to two or going from a point to line to a square.
- Artwork: Flatland by Edwin Abbott Abbott.
4. Moving from zero spatial dimensions to one and on to two (continued).
- How do we describe points on a square or a flat piece of paper so that other people know where we are describing?
- Formally: (x,y) pairs are used to describe Cartesian co-ordinates in Euclidean space.
- X is for measuring how much left or right on the piece of paper, and Y is for measuring how much up or down on the piece of paper.
- Y on computers is the opposite way to the way you learnt in school - because old computers scanned from the top down using Cathode Ray Tubes.
- Area - if you double the width and the height, area scales x4 NOT x2.
- Pythagoras' theorem is used to work out how big the longest side of a triangle with a right angle in it is - see proofs on Wikipedia page and Better Explained. P.S. Better Explained is AWESOME!
4. Moving from zero spatial dimensions to one and on to two (continued).
- What is a circle? "It is the set of all points in a plane that are at a given distance from a given point".
- A Gentle Introduction To Learning Calculus from Better Explained. Calculus is the formal name for thinking about graphs - the area under a curve (or the integral) or how steep a curve is (the differential).
- Sine waves are curves that go up and down in a regular way forever.Intuitive Understanding of Sine Waves.
- How to work out the size of angles in a triangle using the lengths of a triangle or other angles aka Sine and cosine and tangent functions aka Trigonometry again, from Better Explained.
4. Moving from zero spatial dimensions to one and on to two (continued).
4. Moving from zero spatial dimensions to one and on to two (continued).
6. Colour and colour on computers.
- You can map any three variables into three dimensions to help you think about them spatially (i.e. in physical space).
- An example of this is mixing together Red, Green and Blue (RGB) colours to make any other colour.
- Digital colour mixing is additive while analogue paint mixing is subtractive.
- How does projected light mix?
- There are other ways of mixing variables to make colours - for example Hue, Saturation and Brightness (HSB).
- I often use HSB in digital work to make it easy to blend between colours - much easier than RGB. You can visualise colour using a colour wheel or a colour solid. Complementary colours are on opposite sides of the colour wheel.
- Colour theory is a huge area of study, for graphic design and even psychology.
6. Colour and colour on computers (continued).
7. Feedback
- What's working?
- What's not working?
- What am I missing?
- Lets talk now or you can Slack me in private.


| Task | Training Data | Training Ground Truth | Test Data | Test Ground Truth | License |
|---|---|---|---|---|---|
| 1 |
Download (602MB)
900 dermoscopic lesion images in JPEG format, with EXIF data stripped. |
Download (6MB)
900 binary mask images in PNG format. |
Download (232MB)
379 images of the exact same format as the Training Data. |
Download (2MB)
|
CC-0 |
| 2 |
Download (671MB)
807 lesion images in JPEG format and 807 corresponding superpixel masks in PNG format, with EXIF data stripped. |
Download (5MB)
807 dermoscopic feature files in JSON format. |
Download (257MB)
335 lesion images and 335 corresponding superpixel masks of the exact same formats as the Training Data. |
Download (2MB)
|
|
| 2B |
Download (565MB)
807 lesion images in JPEG format, with EXIF data stripped. |
Download (5MB)
1614 binary mask images in PNG format. |
Download (216MB)
335 lesion images of the exact same formats as the Training Data. |
Download (2MB)
|
|
| 3 |
Download (602MB)
900 dermoscopic lesion images in JPEG format. |
Download (19KB)
900 entries of gold standard malignant status. |
Download (232MB)
379 images of the exact same format as the Training Data. |
Download (7KB)
|
|
| 3B |
Download (608MB)
900 dermoscopic lesion images in JPEG format and 900 associated segmentation binary masks in PNG format. |
Download (19KB)
900 entries of gold standard malignant status. |
Download (234MB)
379 images and 379 associated segmentation masks, of the exact same format as the Training Data. |
Download (7KB)
|
Gutman, David; Codella, Noel C. F.; Celebi, Emre; Helba, Brian; Marchetti, Michael; Mishra, Nabin; Halpern, Allan. "Skin Lesion Analysis toward Melanoma Detection: A Challenge at the International Symposium on Biomedical Imaging (ISBI) 2016, hosted by the International Skin Imaging Collaboration (ISIC)". eprint arXiv:1605.01397. 2016.


Pig Dice
Players take turns rolling a die and the first to 100 points wins!
Player One:
Current Roll Score:
Player Two:
Roll!
!
Hold!


Posted by oscar on April 2, 2021
Posted by oscar on March 14, 2021
Posted by oscar on February 10, 2021
Posted by oscar on October 27, 2020
Posted by oscar on September 4, 2020
Posted by oscar on August 28, 2020
Posted by oscar on July 9, 2020
Posted by oscar on July 7, 2020
Posted by oscar on June 25, 2020
How many roads must a man walk down before you call him a man?一万年太久 只争朝夕。
✉ jiabc1997@163.com


Magister Page:
Ah, a rookie! I'm surprised you made it this far... Oh well, coin collecting is a great pastime. It's not too complicated... You can make some great trades in a place like this... Once you know what you're doing, you can really clean up!
Here is a list of the coins I have. Take a look. If you wish to trade with me, you must bring me many low-grade coins.
Gold Knight
Silver Fairy
Blood Werewolf
Nia's Blood Medusa


three.js
- texture filtering example
painting by
Caravaggio
Floor
(128x128)
mag:
Linear
min:
LinearMipmapLinear
Painting
(748x600)
mag:
Linear
min:
Linear
Floor
mag:
Nearest
min:
Nearest
Painting
mag:
Nearest
min:
Nearest


Creating a Query¶
Queries are specified in files separate from the code that runs them. This modularity avoids hard coding the queries into the code itself and risking them being accidentally overwritten or modified between searches. Placing queries in their own files also makes them easier to share them, promoting transparency and replicability.
Event Names¶
All data is organized around an event name. This name should be a unique signifier for the focal event around which you want to collect data.
The event name is specified through the name of the query file. For example, say we want to search for tweets about Facebook’s Oversight Board. Then we can name our event “facebook_oversight” and create a corresponding search query file facebook_oversight.yaml
. The query file should be placed in the appropriate input
directory. For example, if we are running a Twitter search, then we will place our query file in the directory input/twitter/search
.
Query Structure¶
The structure and syntax of the query file depends on the platform being queried and the endpoint’s query operators.
Twitter Search¶
Twitter search query files are YAML files with three fields: queries
, start_time
, and end_time
. The queries
field allows you to list multiple queries sequentially, each of which will be sent to the Twitter API. The start and end times follow the RFC 3339 format, e.g. YYYY-MM-DDT00:00:00Z
See here for an example of a Twitter search query file. See Twitter’s documentation for details on how to build a Twitter search query.
Twitter Filter Stream¶
Twitter filter stream query files are YAML files with one field: rules
. The rules
field allows you to list multiple filter rules sequentially, each of which will be sent to the Twitter API. Each rule should have two fields itself: value
and tag
. The value
is the filter rule itself. The tag
is a colloquial description of the filter rule.
See here for an example of a Twitter filter stream query file. See Twitter’s documentation for details on how to build a filter rule for Twitter’s stream.


High Priest Biotin:
I am High Priest Biotin, guardian of this temple of Einhasad. The power and authority of Einhasad, the goddess of light, surpasses everything in this world. Which aspect of Einhasad's authority would you like to experience? If I can help you in any way, my young friend, it would be a blessing for me to do so.
Listen to information about first class transfer.
Clan.
Alliance.
Quest.


--- layout: post title: "morning lyrics" comments: true ---
I sat on a rug, biding my time, drinking her wine. We talked until two and then she said, "It's time for bed".


In this project, you'll use generative adversarial networks to generate new images of faces.
You'll be using two datasets in this project:
Since the celebA dataset is complex and you're doing GANs in a project for the first time, we want you to test your neural network on MNIST before CelebA. Running the GANs on MNIST will allow you to see how well your model trains sooner.
If you're using FloydHub, set data_dir
to "/input" and use the FloydHub data ID "R5KrjnANiKVhLWAkpXhNBe".
data_dir = './data'
# FloydHub - Use with data ID "R5KrjnANiKVhLWAkpXhNBe"
#data_dir = '/input'
"""
DON'T MODIFY ANYTHING IN THIS CELL
"""
import helper
helper.download_extract('mnist', data_dir)
helper.download_extract('celeba', data_dir)
show_n_images = 25
"""
DON'T MODIFY ANYTHING IN THIS CELL
"""
%matplotlib inline
import os
from glob import glob
from matplotlib import pyplot
mnist_images = helper.get_batch(glob(os.path.join(data_dir, 'mnist/*.jpg'))[:show_n_images], 28, 28, 'L')
pyplot.imshow(helper.images_square_grid(mnist_images, 'L'), cmap='gray')
The CelebFaces Attributes Dataset (CelebA) dataset contains over 200,000 celebrity images with annotations. Since you're going to be generating faces, you won't need the annotations. You can view the first number of examples by changing show_n_images
.
show_n_images = 25
"""
DON'T MODIFY ANYTHING IN THIS CELL
"""
mnist_images = helper.get_batch(glob(os.path.join(data_dir, 'img_align_celeba/*.jpg'))[:show_n_images], 28, 28, 'RGB')
pyplot.imshow(helper.images_square_grid(mnist_images, 'RGB'))
Since the project's main focus is on building the GANs, we'll preprocess the data for you. The values of the MNIST and CelebA dataset will be in the range of -0.5 to 0.5 of 28x28 dimensional images. The CelebA images will be cropped to remove parts of the image that don't include a face, then resized down to 28x28.

You'll build the components necessary to build a GANs by implementing the following functions below:
model_inputs
discriminator
generator
model_loss
model_opt
train
This will check to make sure you have the correct version of TensorFlow and access to a GPU
"""
DON'T MODIFY ANYTHING IN THIS CELL
"""
from distutils.version import LooseVersion
import warnings
import tensorflow as tf
# Check TensorFlow Version
assert LooseVersion(tf.__version__) >= LooseVersion('1.0'), 'Please use TensorFlow version 1.0 or newer. You are using {}'.format(tf.__version__)
print('TensorFlow Version: {}'.format(tf.__version__))
# Check for a GPU
if not tf.test.gpu_device_name():
warnings.warn('No GPU found. Please use a GPU to train your neural network.')
else:
print('Default GPU Device: {}'.format(tf.test.gpu_device_name()))
Implement the model_inputs
function to create TF Placeholders for the Neural Network. It should create the following placeholders:
image_width
, image_height
, and image_channels
.z_dim
.Return the placeholders in the following the tuple (tensor of real input images, tensor of z data)
import problem_unittests as tests
def model_inputs(image_width, image_height, image_channels, z_dim):
"""
Create the model inputs
:param image_width: The input image width
:param image_height: The input image height
:param image_channels: The number of image channels
:param z_dim: The dimension of Z
:return: Tuple of (tensor of real input images, tensor of z data, learning rate)
"""
inputs_real = tf.placeholder(tf.float32, (None, image_width, image_height, image_channels), name='input_real')
inputs_z = tf.placeholder(tf.float32, (None, z_dim), name='input_z')
learning_rate = tf.placeholder(tf.float32, name='learning_rate')
return inputs_real, inputs_z, learning_rate
"""
DON'T MODIFY ANYTHING IN THIS CELL THAT IS BELOW THIS LINE
"""
tests.test_model_inputs(model_inputs)
Implement discriminator
to create a discriminator neural network that discriminates on images
. This function should be able to reuse the variabes in the neural network. Use tf.variable_scope
with a scope name of "discriminator" to allow the variables to be reused. The function should return a tuple of (tensor output of the generator, tensor logits of the generator).
def discriminator(images, reuse=False):
"""
Create the discriminator network
:param image: Tensor of input image(s)
:param reuse: Boolean if the weights should be reused
:return: Tuple of (tensor output of the discriminator, tensor logits of the discriminator)
"""
with tf.variable_scope('discriminator', reuse=reuse):
layers = tf.layers.conv2d(images, 64, 3, strides=2, padding='same')
layers = tf.nn.relu(layers)
layers = tf.layers.conv2d(layers, 128, 3, strides=2, padding='same')
layers = tf.layers.batch_normalization(layers, training=True)
layers = tf.nn.relu(layers)
layers = tf.layers.conv2d(layers, 256, 3, strides=2, padding='same')
layers = tf.layers.batch_normalization(layers, training=True)
layers = tf.nn.relu(layers)
flatten = tf.reshape(layers, (-1, 4 * 4 * 256))
logits = tf.layers.dense(flatten, 1)
output = tf.nn.sigmoid(logits)
return output, logits
"""
DON'T MODIFY ANYTHING IN THIS CELL THAT IS BELOW THIS LINE
"""
tests.test_discriminator(discriminator, tf)
Implement generator
to generate an image using z
. This function should be able to reuse the variabes in the neural network. Use tf.variable_scope
with a scope name of "generator" to allow the variables to be reused. The function should return the generated 28 x 28 x out_channel_dim
images.
def generator(z, out_channel_dim, is_train=True):
"""
Create the generator network
:param z: Input z
:param out_channel_dim: The number of channels in the output image
:param is_train: Boolean if generator is being used for training
:return: The tensor output of the generator
"""
with tf.variable_scope('generator', reuse=not is_train):
layers = tf.layers.dense(z, 7*7*1024)
layers = tf.reshape(layers, (-1, 7, 7, 1024))
layers = tf.layers.batch_normalization(layers, training=is_train)
layers = tf.nn.relu(layers)
layers = tf.layers.conv2d_transpose(layers, 512, 3, strides=2, padding='same')
layers = tf.layers.batch_normalization(layers, training=is_train)
r1 = tf.nn.relu(layers)
layers = tf.layers.conv2d_transpose(layers, 256, 3, strides=2, padding='same')
layers = tf.layers.batch_normalization(layers, training=is_train)
layers = tf.nn.relu(layers)
layers = tf.layers.conv2d_transpose(layers, out_channel_dim, 3, strides=2, padding='same')
layers = tf.image.resize_images(layers, size=(28, 28))
output = tf.nn.tanh(layers)
return output
"""
DON'T MODIFY ANYTHING IN THIS CELL THAT IS BELOW THIS LINE
"""
tests.test_generator(generator, tf)
Implement model_loss
to build the GANs for training and calculate the loss. The function should return a tuple of (discriminator loss, generator loss). Use the following functions you implemented:
discriminator(images, reuse=False)
generator(z, out_channel_dim, is_train=True)
def model_loss(input_real, input_z, out_channel_dim):
"""
Get the loss for the discriminator and generator
:param input_real: Images from the real dataset
:param input_z: Z input
:param out_channel_dim: The number of channels in the output image
:return: A tuple of (discriminator loss, generator loss)
"""
smooth = 0.1
g_model = generator(input_z, out_channel_dim, is_train=True)
d_model_real, d_logits_real = discriminator(input_real, reuse=False)
d_model_fake, d_logits_fake = discriminator(g_model, reuse=True)
d_loss_real = tf.reduce_mean(tf.nn.sigmoid_cross_entropy_with_logits(logits=d_logits_real, \
labels=tf.ones_like(d_model_real) * (1 - smooth)))
d_loss_fake = tf.reduce_mean(tf.nn.sigmoid_cross_entropy_with_logits(logits=d_logits_fake, \
labels=tf.zeros_like(d_model_fake)))
d_loss = d_loss_real + d_loss_fake
g_loss = tf.reduce_mean(tf.nn.sigmoid_cross_entropy_with_logits(logits=d_logits_fake, labels=tf.ones_like(d_model_fake)))
return d_loss, g_loss
"""
DON'T MODIFY ANYTHING IN THIS CELL THAT IS BELOW THIS LINE
"""
tests.test_model_loss(model_loss)
Implement model_opt
to create the optimization operations for the GANs. Use tf.trainable_variables
to get all the trainable variables. Filter the variables with names that are in the discriminator and generator scope names. The function should return a tuple of (discriminator training operation, generator training operation).
def model_opt(d_loss, g_loss, learning_rate, beta1):
"""
Get optimization operations
:param d_loss: Discriminator loss Tensor
:param g_loss: Generator loss Tensor
:param learning_rate: Learning Rate Placeholder
:param beta1: The exponential decay rate for the 1st moment in the optimizer
:return: A tuple of (discriminator training operation, generator training operation)
"""
t_vars = tf.trainable_variables()
g_vars = [var for var in t_vars if var.name.startswith('generator')]
d_vars = [var for var in t_vars if var.name.startswith('discriminator')]
d_train_opt = tf.train.AdamOptimizer(learning_rate=learning_rate, beta1=beta1).minimize(d_loss, var_list=d_vars)
g_train_opt = tf.train.AdamOptimizer(learning_rate=learning_rate, beta1=beta1).minimize(g_loss, var_list=g_vars)
return d_train_opt, g_train_opt
"""
DON'T MODIFY ANYTHING IN THIS CELL THAT IS BELOW THIS LINE
"""
tests.test_model_opt(model_opt, tf)
"""
DON'T MODIFY ANYTHING IN THIS CELL
"""
import numpy as np
def show_generator_output(sess, n_images, input_z, out_channel_dim, image_mode):
"""
Show example output for the generator
:param sess: TensorFlow session
:param n_images: Number of Images to display
:param input_z: Input Z Tensor
:param out_channel_dim: The number of channels in the output image
:param image_mode: The mode to use for images ("RGB" or "L")
"""
cmap = None if image_mode == 'RGB' else 'gray'
z_dim = input_z.get_shape().as_list()[-1]
example_z = np.random.uniform(-1, 1, size=[n_images, z_dim])
samples = sess.run(
generator(input_z, out_channel_dim, False),
feed_dict={input_z: example_z})
images_grid = helper.images_square_grid(samples, image_mode)
pyplot.imshow(images_grid, cmap=cmap)
pyplot.show()
Implement train
to build and train the GANs. Use the following functions you implemented:
model_inputs(image_width, image_height, image_channels, z_dim)
model_loss(input_real, input_z, out_channel_dim)
model_opt(d_loss, g_loss, learning_rate, beta1)
Use the show_generator_output
to show generator
output while you train. Running show_generator_output
for every batch will drastically increase training time and increase the size of the notebook. It's recommended to print the generator
output every 100 batches.
import time
def train(epoch_count, batch_size, z_dim, learning_rate, beta1, get_batches, data_shape, data_image_mode):
"""
Train the GAN
:param epoch_count: Number of epochs
:param batch_size: Batch Size
:param z_dim: Z dimension
:param learning_rate: Learning Rate
:param beta1: The exponential decay rate for the 1st moment in the optimizer
:param get_batches: Function to get batches
:param data_shape: Shape of the data
:param data_image_mode: The image mode to use for images ("RGB" or "L")
"""
print("Parameters:")
print("epoch_count: {}".format(epoch_count))
print("batch_size: {}".format(batch_size))
print("z_dim: {}".format(z_dim))
print("learning_rate: {}".format(learning_rate))
print("beta1: {}".format(beta1))
print("data_shape: {}".format(data_shape))
if data_image_mode == "RGB":
out_channel_dim = 3
else:
out_channel_dim = 1
real_input, z_input, lr = model_inputs(data_shape[1], data_shape[2], data_shape[3], z_dim)
print("Getting model inputs... Ok")
d_loss, g_loss = model_loss(real_input, z_input, out_channel_dim)
print("Calculating model loss... Ok")
d_opt, g_opt = model_opt(d_loss, g_loss, lr, beta1)
print("Getting model optimizers ... Ok")
count = 1;
t = time.process_time()
losses = []
print("Starting training")
with tf.Session() as sess:
sess.run(tf.global_variables_initializer())
for epoch_i in range(epoch_count):
for batch_images in get_batches(batch_size):
batch_images = 2 * batch_images
batch_z = np.random.uniform(-1, 1, (batch_size, z_dim))
sess.run(d_opt, feed_dict = {lr: learning_rate, real_input: batch_images, z_input : batch_z})
sess.run(g_opt, feed_dict = {lr: learning_rate, z_input: batch_z})
if count % 10 == 0:
train_loss_d = sess.run(d_loss, feed_dict = { real_input : batch_images, z_input : batch_z})
train_loss_g = sess.run(g_loss, feed_dict = { z_input : batch_z})
losses.append((train_loss_d, train_loss_g))
elapsed_time = time.process_time() - t
print("Epoch {}/{}... Step {}...".format(epoch_i+1, epochs, count),
"d_loss: {:.4f}...".format(train_loss_d),
"g_loss: {:.4f}".format(train_loss_g),
"Elapsed: {0:g}m{0:g}s".format(elapsed_time//60,elapsed_time % 60))
if count % 100 == 0:
print("Sample output")
show_generator_output(sess, 10, z_input, out_channel_dim, data_image_mode)
count +=1
fig, ax = pyplot.subplots()
losses = np.array(losses)
pyplot.plot(losses.T[0], label='Discriminator')
pyplot.plot(losses.T[1], label='Generator')
pyplot.title("Training Losses")
pyplot.legend()
print("Training done")
Test your GANs architecture on MNIST. After 2 epochs, the GANs should be able to generate images that look like handwritten digits. Make sure the loss of the generator is lower than the loss of the discriminator or close to 0.
batch_size = 128
z_dim = 100
learning_rate = 0.005
beta1 = 0.2
tf.reset_default_graph()
"""
DON'T MODIFY ANYTHING IN THIS CELL THAT IS BELOW THIS LINE
"""
epochs = 2
mnist_dataset = helper.Dataset('mnist', glob(os.path.join(data_dir, 'mnist/*.jpg')))
with tf.Graph().as_default():
train(epochs, batch_size, z_dim, learning_rate, beta1, mnist_dataset.get_batches,
mnist_dataset.shape, mnist_dataset.image_mode)
Run your GANs on CelebA. It will take around 20 minutes on the average GPU to run one epoch. You can run the whole epoch or stop when it starts to generate realistic faces.
batch_size = 128
z_dim = 100
learning_rate = 0.005
beta1 = 0.2
"""
DON'T MODIFY ANYTHING IN THIS CELL THAT IS BELOW THIS LINE
"""
epochs = 1
celeba_dataset = helper.Dataset('celeba', glob(os.path.join(data_dir, 'img_align_celeba/*.jpg')))
with tf.Graph().as_default():
train(epochs, batch_size, z_dim, learning_rate, beta1, celeba_dataset.get_batches,
celeba_dataset.shape, celeba_dataset.image_mode)
When submitting this project, make sure to run all the cells before saving the notebook. Save the notebook file as "dlnd_face_generation.ipynb" and save it as a HTML file under "File" -> "Download as". Include the "helper.py" and "problem_unittests.py" files in your submission.


pdc: Permutation Distribution Clustering
Permutation Distribution Clustering is a clustering method for time series. Dissimilarity of time series is formalized as the divergence between their permutation distributions. The permutation distribution was proposed as measure of the complexity of a time series.
| Version: |
1.0.3 |
| Imports: |
stats, utils, grDevices, graphics |
| Suggests: |
plotrix, lattice |
| Published: |
2015-09-28 |
| Author: |
Andreas M. Brandmaier |
| Maintainer: |
Andreas M. Brandmaier <brandmaier at mpib-berlin.mpg.de> |
| License: |
GPL (≥ 3) |
| NeedsCompilation: |
yes |
| Citation: |
pdc citation info |
| Materials: |
NEWS |
| In views: |
TimeSeries |
| CRAN checks: |
pdc results |
Downloads:
Reverse dependencies:
Linking:
Please use the canonical form
https://CRAN.R-project.org/package=pdc
to link to this page.


Peer-to-Peer Electronic Cash
Fast
Transact in seconds. Get confirmed in minutes.
Reliable
A network that runs without congestion.
Low Fees
Send money globally for pennies.
Simple
Easy to use. No hassles.
Stable
A payment system that's a proven store of value.
Secure
World's most robust blockchain technology.
The Best Money in the World
Bitcoin Cash brings sound money to the world, fulfilling the original promise of Bitcoin as "Peer-to-Peer Electronic Cash". Merchants and users are empowered with low fees and reliable confirmations. The future shines brightly with unrestricted growth, global adoption, permissionless innovation, and decentralized development.
All Bitcoin holders as of block 478558 are also owners of Bitcoin Cash. All are welcome to join the Bitcoin Cash community as we move forward in creating sound money accessible to the whole world.
New Features
On Chain Scalability - Bitcoin Cash follows the Nakamoto roadmap of global adoption with on-chain scaling. As a first step, the blocksize limit has been made adjustable, with an increased default of 8MB. Research is underway to allow massive future increases.
New Transaction Signatures - A new SigHash type provides replay protection, improved hardware wallet security, and elimination of the quadratic hashing problem.
New Difficulty Adjustment Algorithm (DAA) - Responsive Proof-of-Work difficulty adjustment allows miners to migrate from the legacy Bitcoin chain as desired, while providing protection against hashrate fluctuations.
Decentralized Development - With multiple independent teams of developers providing software implementations, the future is secure. Bitcoin Cash is resistant to political and social attacks on protocol development. No single group or project can control it. The bitcoin-ml mailing list is a good venue for making proposals for changes that require coordination across development teams.
Frequently Asked Questions
What is Bitcoin Cash?
Bitcoin Cash is peer-to-peer electronic cash for the Internet. It is fully decentralized, with no central bank and requires no trusted third parties to operate.
Is Bitcoin Cash different from 'Bitcoin'?
Yes. Bitcoin Cash is the continuation of the Bitcoin project as peer-to-peer digital cash. It is a fork of the Bitcoin blockchain ledger, with upgraded consensus rules that allow it to grow and scale.
If I own Bitcoin, do I automatically own Bitcoin Cash too?
Anyone who held Bitcoin at the time Bitcoin Cash was created became owners of Bitcoin Cash. This means that Bitcoin holders as of block 478558 (August 1st, 2017 about 13:16 UTC) have the same amount of Bitcoin Cash as they had Bitcoin at that time. If your Bitcoins are stored by a third party such as an exchange, then you must inquire with them about your Bitcoin Cash.
Any transactions after the August 1st ledger split are completely separate between Bitcoin and Bitcoin Cash. This means any Bitcoin acquired after the split does not include any Bitcoin Cash, and any Bitcoin Cash does not include any Bitcoin.
How is transaction replay being handled between the new and the old blockchain?
Bitcoin Cash transactions use a new signature hashing algorithm indicated by the flag SIGHASH_FORKID. These signatures are not valid on the Bitcoin Legacy network. This prevents Bitcoin Cash transactions from being replayed on the Bitcoin blockchain and vice versa.
Why was a fork necessary to create Bitcoin Cash?
The legacy Bitcoin code had a maximum limit of 1MB of data per block, or about 3 transactions per second. Although technically simple to raise this limit, the community could not reach a consensus, even after years of debate.
Was the 1 MB block size limit causing problems for Bitcoin?
Yes, In 2017, capacity hit the 'invisible wall'. Fees skyrocketed, and Bitcoin became unreliable, with some users unable to get their transactions confirmed, even after days of waiting.
Bitcoin's market price has increased, but its growth and usefulness as a currency has stagnated. Many users, merchants, businesses and even investors left Bitcoin for alternatives, causing its dominance to fall from 95% to as low as 40%.
Does Bitcoin Cash fix these problems?
Yes. Bitcoin Cash immediately raised the block size limit to 8MB as part of a massive on-chain scaling approach. There is ample capacity for everyone's transactions.
Low fees and fast confirmations have returned with Bitcoin Cash. The network is growing again. Users, merchants, businesses, and investors are building the future with real peer to peer cash.
Why didn't Bitcoin raise the block size if it was easy?
Some of the developers did not understand and agree with the original vision of peer-to-peer electronic cash that Satoshi Nakamoto had created. Instead, they preferred Bitcoin become a settlement layer.
Many miners and users trusted these developers, while others recognized that they were leading the community down a different road than expected.
These two very different visions for Bitcoin are largely incompatible, which led to the community divide.
Didn't SegWit increase the block capacity? Will Bitcoin Cash ever have SegWit?
Segregated Witness or "SegWit" is an unacceptable substitute for increasing the blocksize for several reasons.
First, even if used in 100% of transactions, the increase would equate to 1.7MB blocks. Thus, it is a small capacity increase at best. It will not handle exponential growth or worldwide usage. Second, the soft fork implementation results in discardable signatures, which weakens Bitcoin's security model. Third, it makes future capacity increases more difficult due to bandwidth inefficiency and quadratic hashing attacks which SegWit doesn't solve since an attacker isn't forced to use it.
For those (and other) reasons, Bitcoin Cash was necessary as a pre-SegWit fork. Segwit will not be adopted.
Which Development Team is In Charge of Bitcoin Cash?
Unlike the previous situation in Bitcoin, there is no one single development team for Bitcoin Cash. There are now multiple independent teams of developers.
This decentralization of development (and decentralization of software implementations) is a much needed and important step forward.
What is the ticker symbol for Bitcoin Cash?
Bitcoin Cash is represented by a number of different ticker symbols depending on the service or wallet. BCH/BCC are the most popular tickers, with XBC being used to meet the International Standard for currency codes (ISO 4217).


Gecode::Advisor Class Reference
[Programming actors]
Inherits Gecode::ActorLink.
Inherited by Gecode::Int::Extensional::LayeredGraph< View >::Index, Gecode::Set::Int::ChannelBool< View >::IndexAdvisor, and Gecode::ViewAdvisor< View >.
Detailed Description
Base-class for advisors.Advisors are typically subclassed for each propagator that wants to use advisors. The actual member function that is executed when a variable is changed, must be implemented by the advisor's propagator.
Definition at line 843 of file core.icc.
Memory management | |
| template<class A> | |
| void | dispose (Space *home, Council< A > &c) |
| Dispose the advisor. | |
| static void * | operator new (size_t s, Space *home) |
| Allocate memory from space. | |
| static void | operator delete (void *p, Space *home) |
| No-op for exceptions. | |
Public Member Functions | |
| template<class A> | |
| Advisor (Space *home, Propagator *p, Council< A > &c) | |
| Constructor for creation. | |
| Advisor (Space *home, bool share, Advisor &a) | |
| Copying constructor. | |
Protected Member Functions | |
| Propagator * | propagator (void) const |
| Return the advisor's propagator. |
Constructor & Destructor Documentation
template<class A>
| Gecode::Advisor::Advisor | ( | Space * | home, | |
| Propagator * | p, | |||
| Council< A > & | c | |||
| ) | [inline] |
Member Function Documentation
| Propagator * Gecode::Advisor::propagator | ( | void | ) | const [inline, protected] |
Dispose the advisor.
Reimplemented in Gecode::ViewAdvisor< View >, and Gecode::Set::Int::ChannelBool< View >::IndexAdvisor.
| void * Gecode::Advisor::operator new | ( | size_t | s, | |
| Space * | home | |||
| ) | [inline, static] |
| void Gecode::Advisor::operator delete | ( | void * | p, | |
| Space * | home | |||
| ) | [inline, static] |
The documentation for this class was generated from the following file:
- gecode/kernel/core.icc (Revision: 7332)


Ocala events
-
boone and crocket score sheet
Artist illustrates bible verses to fund translation - Black Hills Pioneer ...
Dec 24, 2012 . SPEARFISH Using her artistic talents, social media, and the word of God, Spearfish resident Jill Davis has been spreading the Bible .
http://www.bhpioneer.com/local_news/article_61365970-4de0-11e2-815b-0019bb2963f4.htmlScriptures of Encouragement
Aug 23, 2011 . Bible Verses of Encouragement . For though the mountains should depart and the hills be shaken or removed, yet My love and kindness shall .
http://www.buzzle.com/articles/scriptures-of-encouragement.html
20 pack vitamin water Upcoming events in Ocala
- Sponsored event
bombay company private collection sydenham
Apr 6 - Downtown Disney
marion county georgia tax assessment omaha hotel jacuzzi suite
german tales of cutting Hottest Tickets
-
Apr 11tricare eligability for children
Amway Center -
Apr 28larkspur landing san jose ca
Amway Center -
Jun 25one voice toronto district school board
Bob Carr Performing Arts Center -
Mar 30atlantic painting in new hampshire
Amway Center -
Aug 27features of developed countries
Amway Center -
Jun 21who won survivor tocantins
Amway Center -
Sep 13oaks chocolate stores in oshkosh wisconsin
Francis Field -
Mar 17no spit no quit
St Augustine Amphitheatre -
Oct 8dj tiesto in the dark lyrics
Amway Center -
May 4festival of the trees ocala
Bob Carr Performing Arts Center
Ocala's best venues
-
Bible Verses on Caring for Creation
The followi ng is a listing of bible verses on creation, our relationship with the earth . The pastures of the wilderness overflow, the hills gird themselves with joy, .
http://www.webofcreation.org/bible-verses -
What Bible verses are inscribed on Parliament Hill in Ottawa
Bible verses on the Peace Tower: East window: He shall have dominion also from sea to sea (Psalm 72:8) South window: Give the king thy judgments, O God, .
http://wiki.answers.com/Q/What_Bible_verses_are_inscribed_on_Parliament_Hill_in_Ottawa -
Verse of the Day - Day 165 - A City on a Hill
Verse of the Day - Day 165: Today's Bible verse of the day is Matthew 5:14. The inspiring . Your life is a lighthouse set on a hill, and it cannot be hidden. People .
http://christianity.about.com/od/verseoftheday/qt/verseday165.htmmolotov marciano punk remix letra
98 people's favorite
-
Favorite Quotes or Bible Verses
Mar 29, 2012 . Samhills quote. 3/29/2012 9:29:50 AM, Favorite Quotes or Bible Verses. careingk . Over 1,000 Posts (1,672) Saint Louis, MO 48, joined Jan.
http://www.datehookup.com/Thread-896657.htm -
Psalm 65:12 - Online Parallel Bible
The valleys and the hills alike seem to be made glad. The following remarks of Professor Hackett ("Illustrations of Scripture," p. 30), will explain this passage.
http://bible.cc/psalms/65-12.htm


{% extends 'login/base.html' %} {% block content %}
Your new password has been set.
You may go ahead and sign in now.


Treebank Statistics: UD_German-GSD: Features: Foreign
This feature is universal.
It occurs with 1 different values: Yes
.
1394 tokens (0%) have a non-empty value of Foreign
.
940 types (2%) occur at least once with a non-empty value of Foreign
.
929 lemmas (2%) occur at least once with a non-empty value of Foreign
.
The feature is used with 12 part-of-speech tags: PROPN (1183; 0% instances), NOUN (74; 0% instances), CCONJ (35; 0% instances), X (31; 0% instances), ADJ (23; 0% instances), ADP (17; 0% instances), VERB (10; 0% instances), ADV (8; 0% instances), AUX (5; 0% instances), DET (3; 0% instances), PART (3; 0% instances), SCONJ (2; 0% instances).
PROPN
1183 PROPN tokens (4% of all PROPN
tokens) have a non-empty value of Foreign
.
The most frequent other feature values with which PROPN
and Foreign
co-occurred: Case=EMPTY (1183; 100%), Gender=EMPTY (1183; 100%), Number=EMPTY (1183; 100%).
PROPN
tokens may have the following values of Foreign
:
Yes
(1183; 100% of non-emptyForeign
): the, of, la, de, You, for, a, do, is, itEMPTY
(30333): von, Deutschland, de, der, US, Berlin, of, SPD, St., für
Foreign
seems to be lexical feature of PROPN
. 100% lemmas (811) occur only with one value of Foreign
.
NOUN
74 NOUN tokens (0% of all NOUN
tokens) have a non-empty value of Foreign
.
The most frequent other feature values with which NOUN
and Foreign
co-occurred: Case=EMPTY (74; 100%), Gender=EMPTY (74; 100%), Number=EMPTY (74; 100%).
NOUN
tokens may have the following values of Foreign
:
Yes
(74; 100% of non-emptyForeign
): Bass, Top, facto, &, Arrondissement, Armée, Atun, Chief, City, DirigentEMPTY
(52219): jahr, Jahre, Jahren, zeit, Stadt, Ende, Teil, Prozent, Familie, Ort
Foreign
seems to be lexical feature of NOUN
. 100% lemmas (62) occur only with one value of Foreign
.
CCONJ
35 CCONJ tokens (0% of all CCONJ
tokens) have a non-empty value of Foreign
.
CCONJ
tokens may have the following values of Foreign
:
Yes
(35; 100% of non-emptyForeign
): and, et, an, bzw, i, or, ou, uEMPTY
(8830): und, oder, sowie, aber, als, sondern, wie, sowohl, doch, noch
X
31 X tokens (8% of all X
tokens) have a non-empty value of Foreign
.
The most frequent other feature values with which X
and Foreign
co-occurred: Case=EMPTY (31; 100%), Gender=EMPTY (31; 100%), Number=EMPTY (31; 100%).
X
tokens may have the following values of Foreign
:
Yes
(31; 100% of non-emptyForeign
): i, &, ???, ????, ?????, ???????, All, Bottom, PS, SlowEMPTY
(338): z.B., u.a., =, %, B., etc., †, *, z., &
Foreign
seems to be lexical feature of X
. 100% lemmas (30) occur only with one value of Foreign
.
ADJ
23 ADJ tokens (0% of all ADJ
tokens) have a non-empty value of Foreign
.
The most frequent other feature values with which ADJ
and Foreign
co-occurred: Case=EMPTY (23; 100%), Gender=EMPTY (23; 100%), Number=EMPTY (23; 100%).
ADJ
tokens may have the following values of Foreign
:
Yes
(23; 100% of non-emptyForeign
): Top, Local, Safe, ca, correct, crazy, englisch, good, green, happyEMPTY
(20922): ersten, später, erste, anderen, weitere, neue, bekannt, neuen, großen, große
Foreign
seems to be lexical feature of ADJ
. 100% lemmas (19) occur only with one value of Foreign
.
ADP
17 ADP tokens (0% of all ADP
tokens) have a non-empty value of Foreign
.
ADP
tokens may have the following values of Foreign
:
Yes
(17; 100% of non-emptyForeign
): in, de, a, För, of, om, perEMPTY
(31672): in, von, mit, zu, an, auf, für, als, nach, bei
VERB
10 VERB tokens (0% of all VERB
tokens) have a non-empty value of Foreign
.
The most frequent other feature values with which VERB
and Foreign
co-occurred: Mood=EMPTY (10; 100%), Number=EMPTY (10; 100%), Person=EMPTY (10; 100%), Tense=EMPTY (10; 100%), VerbForm=EMPTY (10; 100%).
VERB
tokens may have the following values of Foreign
:
Yes
(10; 100% of non-emptyForeign
): Logon, anschloss, live, loved, meln, realize, sang, shines, smoke, wantedEMPTY
(19912): gibt, hat, kam, liegt, hatte, gab, war, erhielt, befindet, ist
Foreign
seems to be lexical feature of VERB
. 100% lemmas (10) occur only with one value of Foreign
.
ADV
8 ADV tokens (0% of all ADV
tokens) have a non-empty value of Foreign
.
ADV
tokens may have the following values of Foreign
:
Yes
(8; 100% of non-emptyForeign
): Please, always, ca, inte, socially, up, wahnsinning, yonderEMPTY
(14751): auch, nur, noch, sehr, so, dort, wieder, hier, mehr, heute
AUX
5 AUX tokens (0% of all AUX
tokens) have a non-empty value of Foreign
.
The most frequent other feature values with which AUX
and Foreign
co-occurred: Mood=EMPTY (5; 100%), Number=EMPTY (5; 100%), Person=EMPTY (5; 100%), Tense=EMPTY (5; 100%), VerbForm=EMPTY (5; 100%), Voice=EMPTY (5; 100%).
AUX
tokens may have the following values of Foreign
:
Yes
(5; 100% of non-emptyForeign
): be, could, have, wasEMPTY
(11391): ist, wurde, war, sind, werden, wird, wurden, kann, hat, waren
DET
3 DET tokens (0% of all DET
tokens) have a non-empty value of Foreign
.
The most frequent other feature values with which DET
and Foreign
co-occurred: Case=EMPTY (3; 100%), Definite=EMPTY (3; 100%), Gender=EMPTY (3; 100%), Number=EMPTY (3; 100%), PronType=EMPTY (3; 100%).
DET
tokens may have the following values of Foreign
:
Yes
(3; 100% of non-emptyForeign
): The, alla, dessaEMPTY
(36409): der, die, dem, den, das, des, eine, ein, einer, einem
PART
3 PART tokens (0% of all PART
tokens) have a non-empty value of Foreign
.
The most frequent other feature values with which PART
and Foreign
co-occurred: Polarity=EMPTY (3; 100%).
PART
tokens may have the following values of Foreign
:
Yes
(3; 100% of non-emptyForeign
): toEMPTY
(2163): nicht, zu, aus, an, ja, nein, ‘s, Hallo, hin, her
SCONJ
2 SCONJ tokens (0% of all SCONJ
tokens) have a non-empty value of Foreign
.
SCONJ
tokens may have the following values of Foreign
:
Yes
(2; 100% of non-emptyForeign
): att, soEMPTY
(1800): dass, da, wenn, als, daß, nachdem, weil, wie, während, ob
Relations with Agreement in Foreign
The 10 most frequent relations where parent and child node agree in Foreign
:
PROPN –[nmod]–> PROPN (173; 59%),
PROPN –[case]–> PROPN (97; 68%),
PROPN –[amod]–> PROPN (77; 62%),
PROPN –[cc]–> CCONJ (29; 62%),
PROPN –[nsubj]–> PROPN (25; 83%),
PROPN –[advmod]–> PROPN (16; 94%),
PROPN –[obj]–> PROPN (14; 78%),
PROPN –[cop]–> PROPN (11; 92%),
NOUN –[amod]–> ADJ (8; 57%),
PROPN –[aux]–> PROPN (8; 100%).


| 1 | package fr.sii.ogham.email.sendgrid.v2.sender.impl.sendgrid.handler; | |
| 2 | ||
| 3 | import com.sendgrid.SendGrid; | |
| 4 | ||
| 5 | import fr.sii.ogham.core.message.content.Content; | |
| 6 | import fr.sii.ogham.core.message.content.MultiContent; | |
| 7 | import fr.sii.ogham.email.exception.handler.ContentHandlerException; | |
| 8 | import fr.sii.ogham.email.message.Email; | |
| 9 | ||
| 10 | /** | |
| 11 | * Content handler for {@link MultiContent} instances. All it does is, for each | |
| 12 | * content contained within the instance, it delegates processing to an injected | |
| 13 | * content handler. | |
| 14 | * | |
| 15 | */ | |
| 16 | public final class MultiContentHandler implements SendGridContentHandler { | |
| 17 | ||
| 18 | private final SendGridContentHandler delegate; | |
| 19 | ||
| 20 | /** | |
| 21 | * Constructor. | |
| 22 | * | |
| 23 | * @param delegate | |
| 24 | * the underlying content handler to delegate processing of each | |
| 25 | * of the contents contained within a {@link MultiContent} | |
| 26 | * instance | |
| 27 | */ | |
| 28 | public MultiContentHandler(final SendGridContentHandler delegate) { | |
| 29 |
3
1. <init> : negated conditional → NO_COVERAGE 2. <init> : negated conditional → KILLED 3. <init> : negated conditional → KILLED |
if (delegate == null) { |
| 30 | throw new IllegalArgumentException("[delegate] cannot be null"); | |
| 31 | } | |
| 32 | ||
| 33 | this.delegate = delegate; | |
| 34 | } | |
| 35 | ||
| 36 | /** | |
| 37 | * Reads the content and adds it into the email. This method is expected to | |
| 38 | * update the content of the {@code email} parameter. | |
| 39 | * | |
| 40 | * While the method signature accepts any {@link Content} instance as | |
| 41 | * parameter, the method will fail if anything other than a | |
| 42 | * {@link MultiContent} is provided. | |
| 43 | * | |
| 44 | * @param email | |
| 45 | * the email to put the content in | |
| 46 | * @param content | |
| 47 | * the unprocessed content | |
| 48 | * @throws ContentHandlerException | |
| 49 | * the handler is unable to add the content to the email | |
| 50 | * @throws IllegalArgumentException | |
| 51 | * the content provided is not of the right type | |
| 52 | */ | |
| 53 | @Override | |
| 54 | public void setContent(final Email original, final SendGrid.Email email, final Content content) throws ContentHandlerException { | |
| 55 |
2
1. setContent : negated conditional → NO_COVERAGE 2. setContent : negated conditional → KILLED |
if (email == null) { |
| 56 | throw new IllegalArgumentException("[email] cannot be null"); | |
| 57 | } | |
| 58 |
2
1. setContent : negated conditional → NO_COVERAGE 2. setContent : negated conditional → KILLED |
if (content == null) { |
| 59 | throw new IllegalArgumentException("[content] cannot be null"); | |
| 60 | } | |
| 61 | ||
| 62 |
2
1. setContent : negated conditional → NO_COVERAGE 2. setContent : negated conditional → KILLED |
if (content instanceof MultiContent) { |
| 63 | for (Content subContent : ((MultiContent) content).getContents()) { | |
| 64 |
2
1. setContent : removed call to fr/sii/ogham/email/sendgrid/v2/sender/impl/sendgrid/handler/SendGridContentHandler::setContent → NO_COVERAGE 2. setContent : removed call to fr/sii/ogham/email/sendgrid/v2/sender/impl/sendgrid/handler/SendGridContentHandler::setContent → KILLED |
delegate.setContent(original, email, subContent); |
| 65 | } | |
| 66 | } else { | |
| 67 | throw new IllegalArgumentException("This instance can only work with MultiContent instances, but was passed " + content.getClass().getSimpleName()); | |
| 68 | } | |
| 69 | } | |
| 70 | ||
| 71 | } | |
Mutations | ||
| 29 |
1.1 2.2 3.3 |
|
| 55 |
1.1 2.2 |
|
| 58 |
1.1 2.2 |
|
| 62 |
1.1 2.2 |
|
| 64 |
1.1 2.2 |


Unable to parse runtime log due to altered log structure.
This module can parse the runtime log if the default structure in the config/log4j.properties file is used only; if you need to modify the log structure, please add a new appender to the log4j configuration instead of changing the default one.
The log4j parameter defining the log structure is:
The expected default value is:


Hostel 3, IIT Bombay
Domino's Pizza Order Form
Pizza
Veg/Non-Veg
Cost
Number of Pizzas
Onion and Capsicum
Rs 65
0
1
2
3
4
5
Onion and Paneer
Rs 65
0
1
2
3
4
5
Capsicum and Chunky Chicken
Rs 87
0
1
2
3
4
5
Onion and Spicy Chicken
Rs 87
0
1
2
3
4
5
Farmhouse (Cheeseburst)
Rs 210
0
1
2
3
4
5
LDAP ID
Password
Submit


| pgpool-II 4.0.3 Documentation | |||
|---|---|---|---|
| Prev | Up | Chapter 1. Getting Started | Next |
Pgpool-II allows to recover a downed node by technique called "Online Recovery". This copies data from the primary node to a standby node so that it sync with the primary. This may take long time and database may be updated during the process. That's no problem because in the streaming configuration, the standby will receive WAL log and applies it to catch up the primary. To test online recovery, let's start with previous cluster, where node 0 is in down state.
$ pcp_recovery_node -p 11001 0 Password: pcp_recovery_node -- Command Successful $ psql -p 11000 -c "show pool_nodes" test node_id | hostname | port | status | lb_weight | role | select_cnt | load_balance_node | replication_delay ---------+----------+-------+--------+-----------+---------+------------+-------------------+------------------- 0 | /tmp | 11002 | up | 0.500000 | standby | 2173 | true | 0 1 | /tmp | 11003 | up | 0.500000 | primary | 0 | false | 0 (2 rows)
pcp_recovery_node is one of control commands coming with Pgpool-II installation. The argument -p is to specify the port number assigned to the command, which is 11001 set by pgpool_setup. The second argument is the target node id. After executing the command, node 0 returned to "up" status.
The script executed by pcp_recovery_node is specified as "recovery_1st_stage_command" in pgpool.conf. Here is the file installed by pgpool_setup.
#! /bin/sh psql=/usr/local/pgsql/bin/psql DATADIR_BASE=/home/t-ishii/tmp/Tutorial PGSUPERUSER=t-ishii master_db_cluster=$1 recovery_node_host_name=$2 DEST_CLUSTER=$3 PORT=$4 log=$DATADIR_BASE/log/recovery.log $psql -p $PORT -c "SELECT pg_start_backup('Streaming Replication', true)" postgres echo "source: $master_db_cluster dest: $DEST_CLUSTER" > $log rsync -C -a -c --delete --exclude postgresql.conf --exclude postmaster.pid \ --exclude postmaster.opts --exclude pg_log \ --exclude recovery.conf --exclude recovery.done \ --exclude pg_xlog \ $master_db_cluster/ $DEST_CLUSTER/ rm -fr $DEST_CLUSTER/pg_xlog mkdir $DEST_CLUSTER/pg_xlog chmod 700 $DEST_CLUSTER/pg_xlog rm $DEST_CLUSTER/recovery.done cat > $DEST_CLUSTER/recovery.conf $lt;$lt;REOF standby_mode = 'on' primary_conninfo = 'port=$PORT user=$PGSUPERUSER' recovery_target_timeline='latest' REOF $psql -p $PORT -c "SELECT pg_stop_backup()" postgres


The path you create is automatically stored in an SVG file. You can then import the file with the SVG library in other PlotDevice projects to do all sorts of fun and programmatic things with your path. You can also import the SVG file in Illustrator or Inkscape to fine-tune it.
|
beziereditor.zip
(18KB) |
Using the Bezier editor is simple enough. Just open one of the included examples and you’re basically ready to go. You can fine-tune and copy the examples according to your own needs.
To get an idea of how the library works, take a look at the movies below.
Play movie | the
first example script lets you build paths from scratch.
Play movie | the
second example script shows you how to import an existing path.
The third example script shows you how to import the resulting SVG file in another PlotDevice project.
Adding points: pressing the mouse anywhere on the canvas adds a new point to the path. You can instantly drag its control handle to create a curve. Clicking on the path inserts a point.
Editing points: select a point by clicking on it. You can drag its control handles, move the point and delete it by clicking the button with a cross.
Point handles: when dragging a point’s control handle, hold down ‘x’ to break contuity: this half of the handle will move independently from the other half.
Deselect a point: hit ESC to deselect the current selected point.
Delete a point: hit BACKSPACE to delete the current selected point.
Breaking a path: the last point in the path has an extra pause button. By clicking this you break the path, the next point will start at a new location.
Moving the path: use the LEFT, RIGHT, UP and DOWN keys to move the path around on the canvas.
Magnetic grid: hit TAB to activate or deactivate the magnetic grid. Points will snap to it when moved.
Freehand drawing: press ‘f’ to enter freehand mode. You can now draw freehand lines. Press ‘f’ again to exit freehand mode. When you delete the last point in a freehand path, the whole freehand path will be removed.
Keep in mind that the bezier editor is a lightweight and experimental tool - it will react a bit sluggish when you work with a lot of points. Use it to quickly sketch things in PlotDevice without having to switch to a third-party vector application. For really complex paths, use code or a professional vector editor like Illustrator or Inkscape.


Overview
Package
Class
Use
Tree
Deprecated
Index
Help
HELMNotationToolkit
1.0.1
PREV LETTER
NEXT LETTER
FRAMES
NO FRAMES
All Classes
A
B
C
D
E
F
G
H
I
L
M
N
O
P
R
S
T
U
V
W
X
C
calculateFromAminoAcidSequence(String)
- Method in class org.helm.notation.tools.
ExtinctionCoefficientCalculator
This method returns the extinction coefficient of single letter amino acid sequence
calculateFromComplexNotation(String)
- Method in class org.helm.notation.tools.
ExtinctionCoefficientCalculator
This method calculates extinction coefficient for complex polymer notation
calculateFromComplexNotation(String, int)
- Method in class org.helm.notation.tools.
ExtinctionCoefficientCalculator
This method calculates extinction coefficient for complex polymer notation
calculateFromModifiedNucleotideSequence(String)
- Method in class org.helm.notation.tools.
ExtinctionCoefficientCalculator
This method calculates extinction coefficient for modified nucleotide sequence
calculateFromNucleotideSequence(String)
- Method in class org.helm.notation.tools.
ExtinctionCoefficientCalculator
This method calculates extinction coefficient for natural nucleotide sequence
calculateFromPeptidePolymerNotation(String)
- Method in class org.helm.notation.tools.
ExtinctionCoefficientCalculator
calculateFromRnaPolymerNotation(String)
- Method in class org.helm.notation.tools.
ExtinctionCoefficientCalculator
This method calculates extinction coefficient for RNA polymer notation
CalculationException
- Exception in
org.helm.notation
This is the exception thrown for Invalid Structures
CalculationException()
- Constructor for exception org.helm.notation.
CalculationException
Creates a new instance of
StructureException
without detail message.
CalculationException(String)
- Constructor for exception org.helm.notation.
CalculationException
Constructs an instance of
StructureException
with the specified detail message.
canonicalize(PolymerEdge, List<String>)
- Static method in class org.helm.notation.tools.
EdgeParser
canonicalize input polymerEdge based on sortedNodeIDs
CAP_GROUP_H
- Static variable in class org.helm.notation.model.
Attachment
CAP_GROUP_NAME_ELEMENT
- Static variable in class org.helm.notation.tools.
MonomerParser
CAP_GROUP_OH
- Static variable in class org.helm.notation.model.
Attachment
CAP_GROUP_SMILES_ELEMENT
- Static variable in class org.helm.notation.tools.
MonomerParser
CHEMAXON_EXTENDEND_SMILES_FORMAT
- Static variable in class org.helm.notation.tools.
StructureParser
CHEMICAL_POLYMER_TYPE
- Static variable in class org.helm.notation.model.
Monomer
cleanup(String)
- Static method in class org.helm.notation.tools.
NucleotideSequenceParser
remove non nucleotide related characters
cleanup(String)
- Static method in class org.helm.notation.tools.
PeptideSequenceParser
remove white space, and convert all lower case to upper case
CommandLine
- Class in
org.helm.notation.tools
Commonand line tools for different conversion, this is the manin class in manifest file
CommandLine()
- Constructor for class org.helm.notation.tools.
CommandLine
complementMap
- Static variable in class org.helm.notation.tools.
NucleotideSequenceParser
ComplexNotationParser
- Class in
org.helm.notation.tools
This class provides methods that handle complex polymer extendendNotation.
ComplexNotationParser()
- Constructor for class org.helm.notation.tools.
ComplexNotationParser
ComplexPolymer
- Class in
org.helm.notation.model
This is the data model for ComplexPolymer.
ComplexPolymer()
- Constructor for class org.helm.notation.model.
ComplexPolymer
CONNECTION_SEPARATOR
- Static variable in class org.helm.notation.model.
PolymerEdge
containAnyAtom()
- Method in class org.helm.notation.model.
Monomer
containsGenericStructure(String)
- Static method in class org.helm.notation.tools.
ComplexNotationParser
This method determines if the extendendNotation contains generic structure (cannot generate SMILES)
copy(List)
- Static method in class org.helm.notation.tools.
DeepCopy
copy(ArrayList)
- Static method in class org.helm.notation.tools.
DeepCopy
copy(Monomer)
- Static method in class org.helm.notation.tools.
DeepCopy
copy(Attachment)
- Static method in class org.helm.notation.tools.
DeepCopy
copy(Nucleotide)
- Static method in class org.helm.notation.tools.
DeepCopy
copy(Serializable)
- Static method in class org.helm.notation.tools.
DeepCopy
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
HELMNotationToolkit
1.0.1
PREV LETTER
NEXT LETTER
FRAMES
NO FRAMES
All Classes
A
B
C
D
E
F
G
H
I
L
M
N
O
P
R
S
T
U
V
W
X
Copyright © 2013, The Pistoia Alliance


About
Work
Contact
Hey I am Gideon
a Software Engineer
Tribute Page
Random Quote Machine
JavaScript Calculator
GitHub
freeCodeCamp
Twitter
LinkedIn
Email


POWER raises a number to a power.
POWER
Return Value
NUMBER
Syntax
POWER(n2, n1)
Arguments
n2 is any numeric expression that is raised to a power.
n2
n1 is the exponent.
n1
Example
POWER(3,2) returns the value 9.
POWER(3,2)
9