Docker encapsulates heterogeneous payloads in Standard Containers, and runs them on any server with strong guarantees of isolation and repeatability.
It is a great building block for automating distributed systems: large-scale web deployments, database clusters, continuous deployment systems, private PaaS, service-oriented architectures, etc.
Under the hood, Docker is built on the following components:
Docker defines a unit of software delivery called a Standard Container. The goal of a Standard Container is to encapsulate a software component and all its dependencies in a format that is self-describing and portable, so that any compliant runtime can run it without extra dependency, regardless of the underlying machine and the contents of the container.
The spec for Standard Containers is currently work in progress, but it is very straightforward. It mostly defines 1) an image format, 2) a set of standard operations, and 3) an execution environment.
A great analogy for this is the shipping container. Just like Standard Containers are a fundamental unit of software delivery, shipping containers (http://bricks.argz.com/ins/7823-1/12) are a fundamental unit of physical delivery.
Just like shipping containers, Standard Containers define a set of STANDARD OPERATIONS. Shipping containers can be lifted, stacked, locked, loaded, unloaded and labelled. Similarly, standard containers can be started, stopped, copied, snapshotted, downloaded, uploaded and tagged.
Just like shipping containers, Standard Containers are CONTENT-AGNOSTIC: all standard operations have the same effect regardless of the contents. A shipping container will be stacked in exactly the same way whether it contains Vietnamese powder coffe or spare Maserati parts. Similarly, Standard Containers are started or uploaded in the same way whether they contain a postgres database, a php application with its dependencies and application server, or Java build artifacts.
Both types of containers are INFRASTRUCTURE-AGNOSTIC: they can be transported to thousands of facilities around the world, and manipulated by a wide variety of equipment. A shipping container can be packed in a factory in Ukraine, transported by truck to the nearest routing center, stacked onto a train, loaded into a German boat by an Australian-built crane, stored in a warehouse at a US facility, etc. Similarly, a standard container can be bundled on my laptop, uploaded to S3, downloaded, run and snapshotted by a build server at Equinix in Virginia, uploaded to 10 staging servers in a home-made Openstack cluster, then sent to 30 production instances across 3 EC2 regions.
Because they offer the same standard operations regardless of content and infrastructure, Standard Containers, just like their physical counterpart, are extremely well-suited for automation. In fact, you could say automation is their secret weapon.
Many things that once required time-consuming and error-prone human effort can now be programmed. Before shipping containers, a bag of powder coffee was hauled, dragged, dropped, rolled and stacked by 10 different people in 10 different locations by the time it reached its destination. 1 out of 50 disappeared. 1 out of 20 was damaged. The process was slow, inefficient and cost a fortune - and was entirely different depending on the facility and the type of goods.
Similarly, before Standard Containers, by the time a software component ran in production, it had been individually built, configured, bundled, documented, patched, vendored, templated, tweaked and instrumented by 10 different people on 10 different computers. Builds failed, libraries conflicted, mirrors crashed, post-it notes were lost, logs were misplaced, cluster updates were half-broken. The process was slow, inefficient and cost a fortune - and was entirely different depending on the language and infrastructure provider.
There are 17 million shipping containers in existence, packed with every physical good imaginable. Every single one of them can be loaded on the same boats, by the same cranes, in the same facilities, and sent anywhere in the World with incredible efficiency. It is embarrassing to think that a 30 ton shipment of coffee can safely travel half-way across the World in less time than it takes a software team to deliver its code from one datacenter to another sitting 10 miles away.
With Standard Containers we can put an end to that embarrassment, by making INDUSTRIAL-GRADE DELIVERY of software a reality.


#include <stDFNode.h>
Inheritance diagram for stDFNode:
Public Types | |
| enum | stDFNodeType { INDEX = 0x4449, LEAF = 0x464C } |
Public Member Functions | |
| virtual | ~stDFNode () |
| stNodeType | GetNodeType () |
| stPage * | GetPage () |
| stPageID | GetPageID () |
| stCount | GetNumberOfEntries () |
| virtual int | AddEntry (stSize size, const stByte *object)=0 |
| virtual const stByte * | GetObject (stCount idx)=0 |
| virtual stSize | GetObjectSize (stCount idx)=0 |
| virtual stDistance | GetMinimumRadius ()=0 |
| void | RemoveAll () |
| virtual stCount | GetTotalObjectCount ()=0 |
Static Public Member Functions | |
| stDFNode * | CreateNode (stPage *page) |
| stSize | GetGlobalOverhead () |
Protected Types | |
| typedef stDFNode::stDFNodeHeader | stDFNodeHeader |
Protected Member Functions | |
| stDFNode (stPage *page) | |
Protected Attributes | |
| stDFNodeHeader * | Header |
| stPage * | Page |
The main function of this class is to provide a way to identify a disk node and create the required node instance to manipulate the node.
The structure of Index Node follows:
DF node structure
The Header holds the information about the node itself.
The Node Data is the segment of the node which holds the particular information of each type of the node. This class does not know how this information is organized.
Definition at line 112 of file stDFNode.h.
|
|
This is the structure of the Header of a DFTree node. |
|
|
Node type. Definition at line 119 of file stDFNode.h. |
|
|
This method will dispose this instance and all associated resources. Definition at line 134 of file stDFNode.h. |
|
|
Creates a new instance of this class.
Definition at line 287 of file stDFNode.h. References stPage::GetData(), Header, and Page. |
|
|
This is a virtual method that defines a interface in the insertion of a new Object in a Node.
Implemented in stDFIndexNode, and stDFLeafNode. |
|
|
This is a virtual method that defines a interface for the instantiate the correct specialization of this class.
|
|
|
Returns the global overhead of a DF node (header size) in bytes. Definition at line 250 of file stDFNode.h. References stSize. |
|
|
Returns the minimum radius of this node. Implemented in stDFIndexNode, and stDFLeafNode. |
|
|
Returns the type of this DFTree node (Leaf or Index).
Definition at line 143 of file stDFNode.h. References Header, stNodeType, and stDFNode::stDFNodeHeader::Type. |
|
|
Returns the number of entries in this node.
Definition at line 181 of file stDFNode.h. References Header, stDFNode::stDFNodeHeader::Occupation, and stCount. Referenced by stDFIndexNode::GetIndexEntry(), stDFLeafNode::GetLeafEntry(), and stDFLeafNode::GetTotalObjectCount(). |
|
|
Gets the serialized object. Use GetObjectSize to determine the size of the object.
Implemented in stDFIndexNode, and stDFLeafNode. |
|
|
Returns the size of the object in bytes. Use GetObject() to get the object data.
Implemented in stDFIndexNode, and stDFLeafNode. |
|
|
Returns the associated page.
Definition at line 152 of file stDFNode.h. References Page. |
|
|
Returns the ID of the associated page.
Definition at line 161 of file stDFNode.h. References stPage::GetPageID(), Page, and stPageID. |
|
|
Returns the total number of objects in the subtree. Implemented in stDFIndexNode, and stDFLeafNode. |
|
|
Remove All entries. Definition at line 230 of file stDFNode.h. References stPage::Clear(), Header, stDFNode::stDFNodeHeader::Occupation, Page, stNodeType, and stDFNode::stDFNodeHeader::Type. |
|
|
Header of this page. Definition at line 275 of file stDFNode.h. Referenced by GetNodeType(), GetNumberOfEntries(), RemoveAll(), and stDFNode(). |
|
|
The page related with this class. Definition at line 280 of file stDFNode.h. Referenced by GetPage(), GetPageID(), RemoveAll(), and stDFNode(). |


--- layout: page-fullwidth meta_teaser: teaser: "" header: image: SpeedMountFront.jpg background-color: "#262930" caption: Speed Case caption_url: image: thumb: SpeedMountFront.jpg homepage: caption: caption_url: "" categories: - robotics title: Need for ZTE Speed - The Movie - The Game tags: [Design] section: engineering personhours: 15 rollcall: [Max] ---
While we are still in the early stages of design and it's not wise to make a permanent decision about where the robot's controlling phone will be, we can't let it float freely around the robot like a brain in a jar for much longer or it'll start getting caught in the developing systems. Normally, we could solve this easily by drilling a few holes in an off-the-shelf phone case and bolting it to the robot, but both the robot's design and the phone's code are constantly changing, so this would be far too permanent. We decided that the best way to house the phone would be a custom-made case with plenty of bolt holes to make it easily mountable and removable as well as a front which can be taken off at any time so we can take out the phone to reprogram it without driving ourselves insane.
I decided to make the case a pair of 3D-printed parts: a sturdy base made of t-glase which can be bolted to the robot and can easily socket the phone, and a flexible nylon cover plate which is kept in place by tabs which wrap around the base component but can be pulled out of the way when the phone needs to be put in or taken out.
It took a few iterations before we printed the pieces, but the system as a whole is working smoothly. The phone is easy to replace and so far we haven't seen the cover come off once while the robot was driving. The only forseeable issue is with the tabs. Although they are flexible enough for our purposes, they are thin enough that they can be broken if bent too far. Since the face plates don't take too long to print and the 3 tabs left over after one breaks are still entirely capable of holding the phone in anyways, this shouldn't be too much of an issue, but it's still something to keep in mind for the future.


EVERY YEAR
WHENI I WATCH THE
OSCARS I'M ANNOYED...
that films like King Kong,Moulin Rouge and Munich get the statue whilst the real cinematic heroes lose out.Not very Hollywood is it? We're here to put things right.
UNSUNG HEROES...
OVERHYPEO NONSENSE...


| Concept Framework 2.2 documentation | Contents | Index |
| Name | Version | Deprecated |
| send_message | version 1.0 | no |
| null-returned send_message(string Owner, number MessageID, string Target, string|number Value) |
| Owner | a string describing the Owner parameter for a Concept Client. Usualy, this is the RID of the calling control, but may have other values. |
| MessageID | the Concept Client API message ID |
| Target | the message target. For example, when setting a property, this is the property id. |
| Value | the value of the message. For example, when setting a property, this is the property value. |
|
Sends a message to the Concept Remote Client. This function is used internally. Also, it has an alias named SendMessage defined in MessageDispatcher.con (you may want to include it).
This function is used by the framework, and there are easier ways to deal with messages, via the CApplication and the RemoteObject derived objects. |
| Documented by Eduard Suica, generation time: Sun Jan 27 18:15:18 2013 GMT | (c)2013 Devronium Applications |


Known issue: Filter memoization will, sometimes, kill Safari-based browsers for as-yet-unknown reasons - it appears to cause the the getImageData() invocation on line 595 in mixin/entity.js to go from taking a a handful of milliseconds to over 5 seconds, but only after an element's memoizeFilterOutput flag has been set to true.
For now, if Scrawl-canvas detects that the user is viewing the canvas in a Safari-based browser, it will ignore requests to memoize filters. Use cache output functionality instead to improve render speeds.
Touch test: not required


| Sr. No. | Subject | Date | Size (MB) | Download |
|
1
|
Rules of Road Regulations
|
20/02/2017
|
0.04
|
|
|
2
|
The Motor Vehicles Act, 1988
|
01/01/2016
|
0.98
|
|
|
3
|
The Central Motor Vehicles Rules, 1989
|
01/01/2016
|
1.38
|
|
|
4
|
The Maharashtra Motor Vehicles Rules, 1989
|
01/01/2016
|
1.04
|
|
|
5
|
The Maharashtra Motor Vehicles Tax Act
|
01/01/2016
|
22.21
|
|
|
6
|
The Maharashtra Motor Vehicles Tax Rules, 1959
|
01/01/2016
|
0.62
|
|
|
7
|
Bombay Motor Vehicle Passenger Tax Act, 1958
|
01/01/2016
|
2.87
|
|
|
8
|
Bombay Motor Vehicle Passenger Rules
|
01/01/2016
|
1.88
|
|
|
9
|
School Management System
|
01/01/2016
|
1.28
|
|


Issue: SHARPSIGN-PLUS-MINUS-PACKAGEReferences: #+ (p. 358), #- (p. 359), *FEATURES* (p. 448)
Category: CLARIFICATION/CHANGE
Edit history: Version 1 by Pitman 01-Mar-87
Version 2 by Masinter 10-Nov-87
Version 3 by Masinter 14-Nov-87
Problem Description:
No information is provided in the description of #+ and #- (pp. 358-359) about
what package the features are read on.
In some systems, the current package is used. Since there is no wording in CLtL
to the contrary, it's reasonable to assume that this would be done, but a
consequence of this is that you must be much more sensitive to the package
you're in at any given time when using #+ or #- even for system-provided
features. (This is a problem if the LISP package can contain only the symbols in
CLtL because system-provided features will likely not have the names of symbols
on LISP and hence will require package prefixes. Having a symbol named
LISP:SYMBOLICS or LISP:LUCID would not be possible, so something like
#+Symbolics would not be possible; you'd have to write #+SYSTEM:SYMBOLICS or
some such, which might get a read error in a non-Symbolics implementation that
didn't export SYMBOLICS from SYSTEM...)
In some systems, a canonical package (such as KEYWORD) is used. This means that
package prefixes are rarely necessary in sharpsign conditionals for
system-provided features regardless of the current package or restrictions about
what may be in LISP. (For example, the KEYWORD package can have any symbol so
it's not a problem to push :SYMBOLICS or :LUCID on *FEATURES*).
This has implications about what goes on the *FEATURES* list (p. 448).
Proposal (SHARPSIGN-PLUS-MINUS-PACKAGE:KEYWORD):
Specify that the default package while reading feature specs is the keyword
package. Other packages may be designated by use of explicit package prefixes.
Symbols on *FEATURES* may be in any package but that in practice they will
mostly be on the keyword package because that's the package #+/#- uses by
default. If symbols in a package other than keyword appear on *FEATURES*, they
will be seen by #+/#- only if marked by explicit package prefixes in the
written feature-spec.
Clarify that the package of the IEEE-FLOATING-POINT symbol mentioned on p. 448
is KEYWORD.
Rationale:
Making the behavior of #+ and #- well defined is important for people writing
portable code that manipulate *FEATURES* directly.
Current Practice:
Some implementations bind *PACKAGE* while reading feature specs and others do
not.
Adoption Cost:
Changes to implementations to make them conform should be fairly minor if not
trivial.
Benefits:
As currently specified, using #+ and #- in truly portable code can have
bootstrapping problems, since it is sometimes required to conditionally set up
*FEATURES* in different ways for different systems.
Conversion Cost:
Few changes to user code will be required; code that uses #+ and #- will
continue to work, although code that manipulates *FEATURES* directly may require
editing.
Aesthetics:
Most users would perceive this as a bug fix either to CLtL or to certain
implementations.
Discussion:
The cleanup committee supports this proposal.
It might be reasonable to suggest that only vendors should add keyword symbols
to the *FEATURES* list, and that users should add features on their personal
packages so that collisions due to user applications were less likely. This idea
might be a subject of controversy though, so is not part of this proposal.
It would be useful to create a non-binding registry of feature names (and
package names) already in use, so that Lisp implementors could pick otherwise
unused feature names, and users who wanted to write portable code could know
what feature names were preferred.


|
MockspressoPowerMockitoPluginsJavaSupport |
object MockspressoPowerMockitoPluginsJavaSupport
Expose the extension methods defined here as MockspressoPlugins for consumption by java tests |
open class PowerMockitoConfig : MockerConfig
A MockerConfig for Powermock + Mockito |
|
open class PowerMockitoFieldPreparer : FieldPreparer
A FieldPreparer for Powermock + Mockito. Powermock doesn't seem to offer a nice way to init mocks on an arbitrary object that isn't the testClass (and the runner/rule deals with those). So to handle testResources, we use this custom FieldPreparer that expects some mocks/spies to already be initialized (and doesn't touch those). We use |
|
open class PowerMockitoMockMaker : MockMaker
Creates generic Powermock mocks |
|
open class PowerMockitoPlugin : MockspressoPlugin
Plugin that applies |
|
open class PowerMockitoRulePlugin : MockspressoPlugin
Plugin that applies |


My application currently runs 6-8 threads concurrently depending on how it is configured. Each thread uses a custom waitable timer class that I wrote to get a 20 mS loop timing. Furthermore, Each thread lives for the life of the application.
The issue I am having is that some of the threads lock up on the WaitForSingleObject() call on the windows waitable timer interface after X amount of time. X varies.
// precision timer class
class PrecisionTimer
{
public:
PrecisionTimer() : mMilli(-1), mHandle(NULL){}
virtual ~PrecisionTimer(){ close(); }
// free the handle
void close()
{
// free up any existing handles / timers
if (mHandle != NULL){
CancelWaitableTimer(mHandle);
CloseHandle(mHandle);
mHandle = NULL;
}
}
// start the timer
bool start(constunsignedint& milli)
{
// create the timer
if (!create())
returnfalse;
// set the internal variables
mMilli = milli; // mS time
// get the system time
SYSTEMTIME cTime; // System time structure
GetSystemTime(&cTime); // Curren time
cTime.wMilliseconds += mMilli; // Wait 3 sec
// get the file time expected by waitable timer
FILETIME fileTime;
SystemTimeToFileTime(&cTime, &fileTime);
// set the waitable timer
return SetWaitableTimer(mHandle, reinterpret_cast<LARGE_INTEGER>(&fileTime), mMilli, NULL, NULL, 0);
}
// stop the timer
void stop()
{
// check if the handle exists...
if (mHandle)
CancelWaitableTimer(mHandle); // Stop timer
}
// wait for timer to expire
bool wait()
{
// wait for the timer to fire...
if (mHandle){
switch (WaitForSingleObject(mHandle, mMilli)){
case WAIT_ABANDONED:
case WAIT_OBJECT_0:
case WAIT_TIMEOUT: returntrue;
case WAIT_FAILED: returnfalse;
}
}
elsereturnfalse;
}
private:
bool create()
{
// close any existing timers
close();
// create the timer handle
mHandle = CreateWaitableTimer(NULL, FALSE, NULL);
return mHandle != NULL ? true : false;
}
unsignedint mMilli;
protected:
HANDLE mHandle;
};
Here is an example of the how I am using the timer:
1 2 3 4 5 6 7 8 9 10
void MyThread::run()
{
// set the timer settings
PrecisionTimer taskTimer;
taskTimer.start(20); // 20mS
while (true){
// do process
taskTimer.wait();
}
}
Are their any limitations I am missing with the waitable timer or to many handles from separate threads? Or maybe an operating system limitation?
NOTE: The thread that it happens the most on (lock up) is doing processing from an RS232 port. I am using Window 8 64-bit with MSVC2010
You can call it a personal preference if you want but I have always hated timers. Are you sure that there isn't another synchronization method you could use? My first thought is that depending on a number of things it isn't entirely unreasonable to suspect that more then 20 mS have passed between the creation of your timer and it's call to "WaitForSingleObject()" so the object may already be signaled by that point in which case the behavior of that wait function is undefined. What are the threads these timers get attached to doing?


{% comment "License" %} % Copyright (c) 2019 ISP RAS (http://www.ispras.ru) % Ivannikov Institute for System Programming of the Russian Academy of Sciences % % Licensed under the Apache License, Version 2.0 (the "License"); % you may not use this file except in compliance with the License. % You may obtain a copy of the License at % % http://www.apache.org/licenses/LICENSE-2.0 % % Unless required by applicable law or agreed to in writing, software % distributed under the License is distributed on an "AS IS" BASIS, % WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. % See the License for the specific language governing permissions and % limitations under the License. {% endcomment %} {% load i18n %} {% if changes %} {% for change in changes %}
{% if change.1 == 0 and change.2 > 0 %} {{ change.0 }}: {% elif change.1 > 0 and change.2 == 0 %} {{ change.0 }}: {% elif change.1 == change.2 %} {{ change.0 }}: {{ change.1 }} {% else %} {{ change.0 }}: {{ change.1 }} {{ change.2 }} {% endif %}
{% endfor %} {% else %} - {% endif %}


Date: Thu, 18 Dec 1997 19:23:20 GMT Server: Stronghold/1.3.4 Ben-SSL/1.3 Apache/1.1.3 Content-type: text/html Content-length: 12030 Last-modified: Wed, 05 Nov 1997 21:19:53 GMT
|
Company Overview
A National Healthcare ProviderAmerica Service Group Inc. (NASDAQ: ASGR) through our subsidiary, Prison Health Services, Inc. ("PHS"), was the first private corporation formed for the exclusive purpose of providing managed healthcare services to correctional and detention facilities nationwide. We are also one of the largest providers, offering a solid commitment and resources to meet client needs. Since 1978, PHS has dedicated 100% of its efforts and resources to ensure that we excel at correctional medicine. We recognize that the demands and ever-changing environment of managed care, especially as it pertains to correctional healthcare, requires a new, innovative and more efficient approach. PHS responds to this constantly changing environment with a team of exceptional people who are experts in their field. We have correctional healthcare management professionals in-house with outstanding experience and track records. We have recruited new managers from managed care/HMOs, hospital management, behavioral health, and integrated medical delivery systems. With this cutting-edge knowledge, we can apply the best principles of a dynamic healthcare environment to correctional healthcare. No one else can claim such expertise. Back to OverviewServing a Growing MarketApproximately 1.6 million adults are incarcerated in the United States. The number of inmates is projected to grow 8% per annum for the next several years. Approximately 62% of inmates in the U.S. are housed in state prisons, 30% in local jails, and the balance in the federal prisons or jail supervision. (Source: Bureau of Labor Statistics). Healthcare must be provided to inmates by the government. Total inmate healthcare spending in the United States is estimated between $3-$5 billion. Approximately 30% of spending is currently privatized; that is, provided by private contractors overseen by the appropriate government agency. Privatization of inmate healthcare services continues to increase due to growing acceptance and success of privatization, pressure on government to contain taxes, tougher sentencing guidelines and the managed care trend in healthcare delivery. Approximately $100-$200 million of inmate healthcare services contracts will be available to bid in 1997. Back to OverviewPrison Health Services, Inc. A Wholly-Owned Subsidiary of ASGPrison Health Services, Inc. (PHS), a wholly owned subsidiary of ASG, contracts to provide managed healthcare services to correctional facilities throughout the United States. PHS contracts with state, county and local governmental agencies to provide comprehensive healthcare services to inmates of prison and jails, with a focus on those facilities that maintain an average daily population of over 300 inmates. PHS believes it is the second largest private provider of correctional healthcare services, based upon revenue. Back to OverviewOur MissionPrison Health Services, Inc specializes in providing quality managed healthcare to correctional facilities throughout the United States.  We are committed to promoting and maintaining a positive work environment. We value and respect the contributions and ideas of employees and clients. With this mission of excellence and commitment to client services, we will remain the industry leader. Back to OverviewTop of PageHome | Investor Relations | Services | Locations | Job Postings | Contact Us Send mail to<EMAIL_ADDRESS>with questions or comments about this web site.
|


- Headless, Long-Running Jobs
- Continues after app is switched/destroyed
- Can be 'bound' for interactive use
- Examples: Music Player, Feed Updater
CAUTION: Runs in main thread of host process
Android Developers Reference
#10.10 Overview contd..
- Service types = Started, Bound
- Intent activated = startService(), bindService()
- Started = single focus, runs till done/stopped
- Bound = interactive, runs till unbound by all
- Private = declared, limits access to local app
Android Developers Reference
#<IP_ADDRESS> Creating a Service
Subclass Service .
Implement these Callbacks:
- onCreate() - initial setup
- onStartCommand() - start service **
- onBind() - return IBinder (or null)
- onUnbind() - last client unbound
- onDestroy() - termination (resource cleanup)
** For unbound services, it's your responsiblity to stop the service
(stopSelf() or stopService()) when the requested work is done.
Android Developers Reference
Declare service in Manifest
...
...
Use explicit intents for secure use: No intent-filter declared
Limit access with permissions: Set 'android:exported' to false.
Android Developers Reference
#10.1.2 Creating a Started Service
- Caller invokes startService, passing Intent
- Service receives Intent in onStartCommand()
- Service runs in main thread of host application
- Use "IntentService" subclass for async worker
- Pro: Simple. Just implement onHandleIntent()
- Con: Queue. Handles only 1 request at a time
Android Developers Reference
#<IP_ADDRESS> 'Managed' Service
public class HelloService extends Service {
private Looper mServiceLooper;
private ServiceHandler mServiceHandler;
// Handler that receives messages from the thread
private final class ServiceHandler extends Handler {
public ServiceHandler(Looper looper) {
super(looper);
}
@Override
public void handleMessage(Message msg) {
// Normally we would do some work here, like download a file.
// For our sample, we just sleep for 5 seconds.
long endTime = System.currentTimeMillis() + 5*1000;
while (System.currentTimeMillis() < endTime) {
synchronized (this) {
try {
wait(endTime - System.currentTimeMillis());
} catch (Exception e) {
}
}
}
// Stop the service using the startId, so that we don't stop
// the service in the middle of handling another job
stopSelf(msg.arg1);
}
}
@Override
public void onCreate() {
// Start up the thread running the service. Note that we create a
// separate thread because the service normally runs in the process's
// main thread, which we don't want to block. We also make it
// background priority so CPU-intensive work will not disrupt our UI.
//
// android.os.HandlerThread is a utility class for starting a new thread
// with a built-in 'looper' to process incoming messges in a loop
HandlerThread thread = new HandlerThread("ServiceStartArguments",
Process.THREAD_PRIORITY_BACKGROUND);
thread.start();
// Get the HandlerThread's Looper and use it for our Handler
//
// Effectively have the utility looper run on the single thread above
// but have it now notify (callback) our custom handler for each message
mServiceLooper = thread.getLooper();
mServiceHandler = new ServiceHandler(mServiceLooper);
}
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
Toast.makeText(this, "service starting", Toast.LENGTH_SHORT).show();
// For each start request, send a message to start a job and deliver the
// start ID so we know which request we're stopping when we finish the job
Message msg = mServiceHandler.obtainMessage();
msg.arg1 = startId;
mServiceHandler.sendMessage(msg);
// If we get killed, after returning from here, restart
return START_STICKY;
}
@Override
public IBinder onBind(Intent intent) {
// We don't provide binding, so return null
return null;
}
@Override
public void onDestroy() {
Toast.makeText(this, "service done", Toast.LENGTH_SHORT).show();
}
}
Android Developers Reference
#<IP_ADDRESS> IntentService (simple)
public class HelloIntentService extends IntentService {
/**
* A constructor is required, and must call the super IntentService(String)
* constructor with a name for the worker thread.
*/
public HelloIntentService() {
super("HelloIntentService");
}
/**
* The IntentService calls this method from the default worker thread with
* the intent that started the service. When this method returns, IntentService
* stops the service, as appropriate.
*/
@Override
protected void onHandleIntent(Intent intent) {
// Normally we would do some work here, like download a file.
// For our sample, we just sleep for 5 seconds.
long endTime = System.currentTimeMillis() + 5*1000;
while (System.currentTimeMillis() < endTime) {
synchronized (this) {
try {
wait(endTime - System.currentTimeMillis());
} catch (Exception e) {
}
}
}
}
}
Android Developers Reference
#<IP_ADDRESS> Activating Services
Intent intent = new Intent(this, HelloService.class);
startService(intent);
The onStartCommand() returns an integer informing System how to handle service restarts after premature termination.
Android Developers Reference
#<IP_ADDRESS> "Local" Service
public class LocalService extends Service {
private NotificationManager mNM;
// Unique Identification Number for the Notification.
// We use it on Notification start, and to cancel it.
private int NOTIFICATION = R.string.local_service_started;
/**
* Class for clients to access. Because we know this service always
* runs in the same process as its clients, we don't need to deal with
* IPC.
*/
public class LocalBinder extends Binder {
LocalService getService() {
return LocalService.this;
}
}
@Override
public void onCreate() {
mNM = (NotificationManager)getSystemService(NOTIFICATION_SERVICE);
// Display a notification about us starting. We put an icon in the status bar.
showNotification();
}
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
Log.i("LocalService", "Received start id " + startId + ": " + intent);
// We want this service to continue running until it is explicitly
// stopped, so return sticky.
return START_STICKY;
}
@Override
public void onDestroy() {
// Cancel the persistent notification.
mNM.cancel(NOTIFICATION);
// Tell the user we stopped.
Toast.makeText(this, R.string.local_service_stopped, Toast.LENGTH_SHORT).show();
}
@Override
public IBinder onBind(Intent intent) {
return mBinder;
}
// This is the object that receives interactions from clients. See
// RemoteService for a more complete example.
private final IBinder mBinder = new LocalBinder();
/**
* Show a notification while this service is running.
*/
private void showNotification() {
// In this sample, we'll use the same text for the ticker and the expanded notification
CharSequence text = getText(R.string.local_service_started);
// Set the icon, scrolling text and timestamp
Notification notification = new Notification(R.drawable.stat_sample, text,
System.currentTimeMillis());
// The PendingIntent to launch our activity if the user selects this notification
PendingIntent contentIntent = PendingIntent.getActivity(this, 0,
new Intent(this, LocalServiceActivities.Controller.class), 0);
// Set the info for the views that show in the notification panel.
notification.setLatestEventInfo(this, getText(R.string.local_service_label),
text, contentIntent);
// Send the notification.
mNM.notify(NOTIFICATION, notification);
}
}
Android Developers Reference
#<IP_ADDRESS> Local Client (no IPC)
private LocalService mBoundService;
private ServiceConnection mConnection = new ServiceConnection() {
public void onServiceConnected(ComponentName className, IBinder service) {
// This is called when the connection with the service has been
// established, giving us the service object we can use to
// interact with the service. Because we have bound to a explicit
// service that we know is running in our own process, we can
// cast its IBinder to a concrete class and directly access it.
mBoundService = ((LocalService.LocalBinder)service).getService();
// Tell the user about this for our demo.
Toast.makeText(Binding.this, R.string.local_service_connected,
Toast.LENGTH_SHORT).show();
}
public void onServiceDisconnected(ComponentName className) {
// This is called when the connection with the service has been
// unexpectedly disconnected -- that is, its process crashed.
// Because it is running in our same process, we should never
// see this happen.
mBoundService = null;
Toast.makeText(Binding.this, R.string.local_service_disconnected,
Toast.LENGTH_SHORT).show();
}
};
void doBindService() {
// Establish a connection with the service. We use an explicit
// class name because we want a specific service implementation that
// we know will be running in our own process (and thus won't be
// supporting component replacement by other applications).
bindService(new Intent(Binding.this,
LocalService.class), mConnection, Context.BIND_AUTO_CREATE);
mIsBound = true;
}
void doUnbindService() {
if (mIsBound) {
// Detach our existing connection.
unbindService(mConnection);
mIsBound = false;
}
}
@Override
protected void onDestroy() {
super.onDestroy();
doUnbindService();
}
Android Developers Reference
#<IP_ADDRESS> Remote Service (Messenger)
public class MessengerService extends Service {
/** For showing and hiding our notification. */
NotificationManager mNM;
/** Keeps track of all current registered clients. */
ArrayList mClients = new ArrayList();
/** Holds last value set by a client. */
int mValue = 0;
/**
* Command to the service to register a client, receiving callbacks
* from the service. The Message's replyTo field must be a Messenger of
* the client where callbacks should be sent.
*/
static final int MSG_REGISTER_CLIENT = 1;
/**
* Command to the service to unregister a client, ot stop receiving callbacks
* from the service. The Message's replyTo field must be a Messenger of
* the client as previously given with MSG_REGISTER_CLIENT.
*/
static final int MSG_UNREGISTER_CLIENT = 2;
/**
* Command to service to set a new value. This can be sent to the
* service to supply a new value, and will be sent by the service to
* any registered clients with the new value.
*/
static final int MSG_SET_VALUE = 3;
/**
* Handler of incoming messages from clients.
*/
class IncomingHandler extends Handler {
@Override
public void handleMessage(Message msg) {
switch (msg.what) {
case MSG_REGISTER_CLIENT:
mClients.add(msg.replyTo);
break;
case MSG_UNREGISTER_CLIENT:
mClients.remove(msg.replyTo);
break;
case MSG_SET_VALUE:
mValue = msg.arg1;
for (int i=mClients.size()-1; i>=0; i--) {
try {
mClients.get(i).send(Message.obtain(null,
MSG_SET_VALUE, mValue, 0));
} catch (RemoteException e) {
// The client is dead. Remove it from the list;
// we are going through the list from back to front
// so this is safe to do inside the loop.
mClients.remove(i);
}
}
break;
default:
super.handleMessage(msg);
}
}
}
/**
* Target we publish for clients to send messages to IncomingHandler.
*/
final Messenger mMessenger = new Messenger(new IncomingHandler());
@Override
public void onCreate() {
mNM = (NotificationManager)getSystemService(NOTIFICATION_SERVICE);
// Display a notification about us starting.
showNotification();
}
@Override
public void onDestroy() {
// Cancel the persistent notification.
mNM.cancel(R.string.remote_service_started);
// Tell the user we stopped.
Toast.makeText(this, R.string.remote_service_stopped, Toast.LENGTH_SHORT).show();
}
/**
* When binding to the service, we return an interface to our messenger
* for sending messages to the service.
*/
@Override
public IBinder onBind(Intent intent) {
return mMessenger.getBinder();
}
/**
* Show a notification while this service is running.
*/
private void showNotification() {
// In this sample, we'll use the same text for the ticker and the expanded notification
CharSequence text = getText(R.string.remote_service_started);
// Set the icon, scrolling text and timestamp
Notification notification = new Notification(R.drawable.stat_sample, text,
System.currentTimeMillis());
// The PendingIntent to launch our activity if the user selects this notification
PendingIntent contentIntent = PendingIntent.getActivity(this, 0,
new Intent(this, Controller.class), 0);
// Set the info for the views that show in the notification panel.
notification.setLatestEventInfo(this, getText(R.string.remote_service_label),
text, contentIntent);
// Send the notification.
// We use a string id because it is a unique number. We use it later to cancel.
mNM.notify(R.string.remote_service_started, notification);
}
}
Android Developers Reference
#<IP_ADDRESS> Remote Client (Messenger)
/** Messenger for communicating with service. */
Messenger mService = null;
/** Flag indicating whether we have called bind on the service. */
boolean mIsBound;
/** Some text view we are using to show state information. */
TextView mCallbackText;
/**
* Handler of incoming messages from service.
*/
class IncomingHandler extends Handler {
@Override
public void handleMessage(Message msg) {
switch (msg.what) {
case MessengerService.MSG_SET_VALUE:
mCallbackText.setText("Received from service: " + msg.arg1);
break;
default:
super.handleMessage(msg);
}
}
}
/**
* Target we publish for clients to send messages to IncomingHandler.
*/
final Messenger mMessenger = new Messenger(new IncomingHandler());
/**
* Class for interacting with the main interface of the service.
*/
private ServiceConnection mConnection = new ServiceConnection() {
public void onServiceConnected(ComponentName className,
IBinder service) {
// This is called when the connection with the service has been
// established, giving us the service object we can use to
// interact with the service. We are communicating with our
// service through an IDL interface, so get a client-side
// representation of that from the raw service object.
mService = new Messenger(service);
mCallbackText.setText("Attached.");
// We want to monitor the service for as long as we are
// connected to it.
try {
Message msg = Message.obtain(null,
MessengerService.MSG_REGISTER_CLIENT);
msg.replyTo = mMessenger;
mService.send(msg);
// Give it some value as an example.
msg = Message.obtain(null,
MessengerService.MSG_SET_VALUE, this.hashCode(), 0);
mService.send(msg);
} catch (RemoteException e) {
// In this case the service has crashed before we could even
// do anything with it; we can count on soon being
// disconnected (and then reconnected if it can be restarted)
// so there is no need to do anything here.
}
// As part of the sample, tell the user what happened.
Toast.makeText(Binding.this, R.string.remote_service_connected,
Toast.LENGTH_SHORT).show();
}
public void onServiceDisconnected(ComponentName className) {
// This is called when the connection with the service has been
// unexpectedly disconnected -- that is, its process crashed.
mService = null;
mCallbackText.setText("Disconnected.");
// As part of the sample, tell the user what happened.
Toast.makeText(Binding.this, R.string.remote_service_disconnected,
Toast.LENGTH_SHORT).show();
}
};
void doBindService() {
// Establish a connection with the service. We use an explicit
// class name because there is no reason to be able to let other
// applications replace our component.
bindService(new Intent(Binding.this,
MessengerService.class), mConnection, Context.BIND_AUTO_CREATE);
mIsBound = true;
mCallbackText.setText("Binding.");
}
void doUnbindService() {
if (mIsBound) {
// If we have received the service, and hence registered with
// it, then now is the time to unregister.
if (mService != null) {
try {
Message msg = Message.obtain(null,
MessengerService.MSG_UNREGISTER_CLIENT);
msg.replyTo = mMessenger;
mService.send(msg);
} catch (RemoteException e) {
// There is nothing special we need to do if the service
// has crashed.
}
}
// Detach our existing connection.
unbindService(mConnection);
mIsBound = false;
mCallbackText.setText("Unbinding.");
}
}
Android Developers Reference
#10.1.3 Creating a Bound Service
- Implement onBind() callback
- Return IBinder subclass = service interface
- Client binds to service = gets IBinder
- Client unbinds = system destroys service
Android Developers Reference
#10.1.5 Running in Foreground
- If user is actively aware of service (media player)
- Must provide notification in status bar (see code)
- Service calls startForeground(), stopForeground()
Notification notification =
new Notification(R.drawable.icon, getText(R.string.ticker_text),
System.currentTimeMillis());
Intent notificationIntent = new Intent(this, ExampleActivity.class);
PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, notificationIntent, 0);
notification.setLatestEventInfo(this, getText(R.string.notification_title),
getText(R.string.notification_message), pendingIntent);
startForeground(ONGOING_NOTIFICATION_ID, notification);
Android Developers Reference
#10.1.7 Managing Service Lifecycle
public class ExampleService extends Service {
int mStartMode; // indicates how to behave if the service is killed
IBinder mBinder; // interface for clients that bind
boolean mAllowRebind; // indicates whether onRebind should be used
@Override
public void onCreate() {
// The service is being created
}
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
// The service is starting, due to a call to startService()
return mStartMode;
}
@Override
public IBinder onBind(Intent intent) {
// A client is binding to the service with bindService()
return mBinder;
}
@Override
public boolean onUnbind(Intent intent) {
// All clients have unbound with unbindService()
return mAllowRebind;
}
@Override
public void onRebind(Intent intent) {
// A client is binding to the service with bindService(),
// after onUnbind() has already been called
}
@Override
public void onDestroy() {
// The service is no longer used and is being destroyed
}
}
Android Developers Reference


| 1 | package fr.sii.ogham.testing.sms.simulator.config; | |
| 2 | ||
| 3 | import ogham.testing.io.github.resilience4j.retry.RetryConfig; | |
| 4 | ||
| 5 | import java.util.List; | |
| 6 | ||
| 7 | /** | |
| 8 | * Configuration for local server used to simulate a SMPP server. | |
| 9 | * | |
| 10 | * @author Aurélien Baudet | |
| 11 | */ | |
| 12 | public class SimulatorConfiguration { | |
| 13 | private ServerPortProvider portProvider; | |
| 14 | private List<Credentials> credentials; | |
| 15 | private ServerDelays serverDelays; | |
| 16 | private boolean keepMessages; | |
| 17 | private RetryConfig startRetryConfig; | |
| 18 | ||
| 19 | /** | |
| 20 | * Get the configuration that provides a port for the server | |
| 21 | * | |
| 22 | * @return the port configuration | |
| 23 | */ | |
| 24 | public ServerPortProvider getPortProvider() { | |
| 25 |
1
1. getPortProvider : replaced return value with null for fr/sii/ogham/testing/sms/simulator/config/SimulatorConfiguration::getPortProvider → RUN_ERROR |
return portProvider; |
| 26 | } | |
| 27 | ||
| 28 | /** | |
| 29 | * Set the configuration that provides a port for the server | |
| 30 | * | |
| 31 | * @param port the port configuration | |
| 32 | */ | |
| 33 | public void setPort(ServerPortProvider port) { | |
| 34 | this.portProvider = port; | |
| 35 | } | |
| 36 | ||
| 37 | /** | |
| 38 | * Get the allowed credentials | |
| 39 | * | |
| 40 | * @return the allowed credentials | |
| 41 | */ | |
| 42 | public List<Credentials> getCredentials() { | |
| 43 |
1
1. getCredentials : replaced return value with Collections.emptyList for fr/sii/ogham/testing/sms/simulator/config/SimulatorConfiguration::getCredentials → NO_COVERAGE |
return credentials; |
| 44 | } | |
| 45 | ||
| 46 | /** | |
| 47 | * Set the allowed credentials | |
| 48 | * | |
| 49 | * @param credentials the allowed credentials | |
| 50 | */ | |
| 51 | public void setCredentials(List<Credentials> credentials) { | |
| 52 | this.credentials = credentials; | |
| 53 | } | |
| 54 | ||
| 55 | /** | |
| 56 | * Control delays to simulate a slow server. | |
| 57 | * | |
| 58 | * @return the delay configuration | |
| 59 | */ | |
| 60 | public ServerDelays getServerDelays() { | |
| 61 |
1
1. getServerDelays : replaced return value with null for fr/sii/ogham/testing/sms/simulator/config/SimulatorConfiguration::getServerDelays → RUN_ERROR |
return serverDelays; |
| 62 | } | |
| 63 | ||
| 64 | /** | |
| 65 | * Control delays to simulate a slow server. | |
| 66 | * | |
| 67 | * @param serverDelays the delay configuration | |
| 68 | */ | |
| 69 | public void setServerDelays(ServerDelays serverDelays) { | |
| 70 | this.serverDelays = serverDelays; | |
| 71 | } | |
| 72 | ||
| 73 | /** | |
| 74 | * If the server is restarted, it indicates if received messages in the | |
| 75 | * previous session should be kept (true) or dropped (false). | |
| 76 | * | |
| 77 | * @return indicate if messages should be kept or not between sessions | |
| 78 | */ | |
| 79 | public boolean isKeepMessages() { | |
| 80 |
2
1. isKeepMessages : replaced boolean return with true for fr/sii/ogham/testing/sms/simulator/config/SimulatorConfiguration::isKeepMessages → RUN_ERROR 2. isKeepMessages : replaced boolean return with false for fr/sii/ogham/testing/sms/simulator/config/SimulatorConfiguration::isKeepMessages → RUN_ERROR |
return keepMessages; |
| 81 | } | |
| 82 | ||
| 83 | /** | |
| 84 | * If the server is restarted, it indicates if received messages in the | |
| 85 | * previous session should be kept (true) or dropped (false). | |
| 86 | * | |
| 87 | * @param keepMessages indicate if messages should be kept or not between sessions | |
| 88 | */ | |
| 89 | public void setKeepMessages(boolean keepMessages) { | |
| 90 | this.keepMessages = keepMessages; | |
| 91 | } | |
| 92 | ||
| 93 | /** | |
| 94 | * Server may not start correctly (because port was available but is not | |
| 95 | * available anymore for example). | |
| 96 | * <p> | |
| 97 | * In such case, the server will be restarted until it starts successfully, or | |
| 98 | * it fails due to maximum attempts reached. | |
| 99 | * | |
| 100 | * @return the retry config | |
| 101 | */ | |
| 102 | public RetryConfig getStartRetryConfig() { | |
| 103 |
1
1. getStartRetryConfig : replaced return value with null for fr/sii/ogham/testing/sms/simulator/config/SimulatorConfiguration::getStartRetryConfig → RUN_ERROR |
return startRetryConfig; |
| 104 | } | |
| 105 | ||
| 106 | /** | |
| 107 | * Server may not start correctly (because port was available but is not | |
| 108 | * available anymore for example). | |
| 109 | * <p> | |
| 110 | * In such case, the server will be restarted until it starts successfully, or | |
| 111 | * it fails due to maximum attempts reached. | |
| 112 | * | |
| 113 | * @param retryConfig the retry config | |
| 114 | */ | |
| 115 | public void setStartRetryConfig(RetryConfig retryConfig) { | |
| 116 | this.startRetryConfig = retryConfig; | |
| 117 | } | |
| 118 | ||
| 119 | /** | |
| 120 | * Reset the configuration to be reused by the same server | |
| 121 | */ | |
| 122 | public void reset() { | |
| 123 |
1
1. reset : removed call to fr/sii/ogham/testing/sms/simulator/config/ServerPortProvider::reset → NO_COVERAGE |
portProvider.reset(); |
| 124 | } | |
| 125 | ||
| 126 | } | |
Mutations | ||
| 25 |
1.1 |
|
| 43 |
1.1 |
|
| 61 |
1.1 |
|
| 80 |
1.1 2.2 |
|
| 103 |
1.1 |
|
| 123 |
1.1 |


shiloh
Radix lecti
Registered: Oct 2001
Location: City of Angels
Posts: 1953 |
Sure feels like 10 years!
Showtime always started each season at the end of June, played 12 episodes, re-ran them for the next 12 weeks, and would start the final 12 around January.
 Showtime bought this new series, Jeremiah (based on an European comic and created by J. Michael Straczynski of Babylon 5). BUT the chickens**t powers that be at Showtime got all squirlley, thinking people wouldn't want to watch a post-apocalyptic series like Jeremiah because of 9/11, so they delayed it's premeire by 3 months and, because they wanted to run Stargate and Jeremiah as a package, that ended up delaying Stargate.
Bloody effing terrorists. It's all their fault.
But now it's 36 hours -- oops, 35 hours & 35 minutes until "Proving Ground".
__________________
Just another freak in the freak kingdom.
Report this post to a moderator | ? + *
|


Main Page
Explain to a (non-)tech friend:
Parentheses ( )
- e.g. Execute a function var result = doSomething()
- NB - "whoops"() will function in error because "whoops" is not a function
- Grouping (...), including PEMDAS, to modify or clarify operator precedence
- New (with argument list) new...(...)
- Symbols
Brackets [ ]
- Arrays
Braces { }
- Expression
- Objects (containers)
- BLock statements
Single quotes ' '
- Strings
- Escaping


Film Review by Kevin Patterson
Good Will Hunting Rating: ***1/2 (out of four) R, 1997 Directed by Gus Van Sant. Written by Matt Damon and Ben Affleck. Starring Matt Damon, Robin Williams, Ben Affleck.
I must admit that I was a tad skeptical of "Good Will Hunting", based both on the previews and the first fifteen minutes of the film, in which the main character Will Hunting (Matt Damon), an MIT janitor in his early twenties, is discovered to be an Einstein-level closet genius when he solves two extraordinarily difficult math problems overnight. The only problem is that Will is a tough street kid who's had his share of run-ins with the law, and before long he's being hauled in for assault after a parking lot fight. Professor Lambeau (Stellan Skarsgard), who had brought up the math problems in his lectures, tracks him down and strikes a deal with the police: Will is to be released, provided he works with Lambeau on his math research regularly and attends therapy sessions.
This sounds like the formula for mildly charming fluff, but "Good Will Hunting" rises above its fairly mundane premise to deliver a poignant and clever drama. A conflict gradually emerges between Lambeau and Will's therapist Sean McGuire (Robin Williams) - Lambeau wants to get Will to use his brain, while Sean wants him to listen to his heart, both of which he has been largely neglecting. Will finds that the former is much easier than the latter, so much so, in fact, that he gets bored with it and grows increasingly resistant to Lambeau's attempts to recruit him into the academic lifestyle. He also has his share of problems with his girlfriend Skylar (Minnie Driver), an MIT student who is moving to California at the end of the school year and would like a reluctant Will to come with her.
What makes "Good Will Hunting" work so well, aside from the strong performances (especially from Damon and Williams), is the depth of characterization and the representation of the conflicts in Will's life. The script's sympathies seem to lie more with Sean McGuire than with Lambeau, but neither of them is presented as completely right or wrong. Lambeau, while he may seem a little cold at times, is still written well enough that we like him as a character even when we're not sure if we like what he has to say. And Sean, for all his warm-heartedness, has, as Lambeau and later Will point out, not lived up to his full intellectual potential either; the therapy sessions turn out to be just as revelatory for Sean as they do for Will.
Will's reaction to this situation, and the way in which he slowly becomes more receptive to Skylar and to Sean, is presented in a believable fashion and in a way that forces the audience to consider all the characters' opinions, rather than setting up an obvious "right" and "wrong" side and beating them over the head with it. For a film with such an extraordinary character, "Good Will Hunting" presents itself as remarkably ordinary; it achieves the difficult task of making the next Albert Einstein into an Everyman, a character to whom the audience can easily relate and who must make choices similar to those that almost everyone faces at one time or another. This film gives us real drama when it so easily could have given us merely melodrama, by having the government kidnap Will to use him in covert spy missions or introducing some other equally far-fetched situation.
"Good Will Hunting" also has its share of fun humor, such as when Will, in an early therapy session, pretends to be hypnotized and smoothly parodies the alien abduction scenarios that have become so well known in popular culture. And in the one scene in which government agents do in fact appear, Will blows them off with a hilariously scathing accusation of human rights violations in Africa. Will's relationship with his friends, most notably Chucky (Ben Affleck), is usually rather amusing, if somewhat crude (the film has 100+ uses of the 'f' word, which was most likely the reason for its R-rating), and lends itself well to the development of Will's character.
Add all this to the fact that "Good Will Hunting" even manages to pull off an uplifting happy ending without getting excessively sentimental, and you might be wondering why I haven't given this film four stars. Well, for one thing, no matter how well Damon and Affleck, who wrote the screenplay, and director Gus Van Sant pull it off, the story is still rather contrived and not particularly original. There are also a few scenes that did feel a bit formulaic, including one that was supposed to be emotional but really just seemed like the Obligatory Crying Scene for any movie involving therapy sessions. Still, "Good Will Hunting" takes its premise a lot farther than I thought it would, and is definitely one of the better personal dramas I have seen in the last few years, and as of right now it stands as one of the top five on my list of '97 films.
- - - - - - Visit my Film Reviews Page at: http://members.aol.com/KTPattersn/reviews.html
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


This is where you can find the lyrics of all mantras or devotional hymns in English and Devanagari script. You will also find the meaning of those mantras and devotional hymns in English. Choose any deity whose mantras or devotional hymns you want to read.
Do you want to answer a question to help us serve you better? If so, please fill this form.


Sign Up
Create An Account
First Name
Last Name
Email
Password
*Re-type Password
Remember me
I agree to the
Terms of use & Privacy Policy
.
Cancel
Sign Up


--- layout: page title: Academics subtitle: UNDER-GRADUATION | SCHOOL ---
| B.E (Electronics & Communication) | Netaji Subhas Institute of Technology | 2012 | 72% | |
| Class XII | Delhi Public School, R K Puram | 2007 | 83% | 90.33% in PCM |
| Class X | Ryan International School, Delhi | 2005 | 91.4% | 1st Rank in Class |
Learn more about my Position Of Responsibilities at NSIT
Learn more about my Projects at NSIT
Netaji Subhas Institute of Technology is a leading institution of higher technical education in India, previously affiliated to University of Delhi. It is one of India's most reputed institutions in the domain of technical education; NSIT has carved a niche for itself - both nationally and internationally - for excellence in education and research.
In 2018, the college was given state university status, thus changing its name to Netaji Subhas University of Technology (NSUT).
Delhi Public School R.K. Puram is one of the most prestigious schools in India and regularly features at the top of various rankings for academic excellence.
Founded as a Public School in 1972 in New Delhi, it is a private institution run by the Delhi Public School Society. Delhi Public School, R.K. Puram is affiliated to the Central Board of Secondary Education (CBSE).
Ryan International Schools are a group of private educational institutions in India founded in 1976 by Dr. Augustine Francis Pinto.


La terra è bassa / thesis project / 2014
First issue of a magazine concerning environmentally conscious realities in my territory. This issue is about organic farmers following farm-to-table rules. The project will be soon released both online and in printed form, updates coming soon.
“'Eating is an agricultural act', as Wendell Berry famously said. It is also an ecological act, and a political act, too”
– Michael Pollan


Posted by 護樹協會 on September 24, 2015
Posted by 護樹協會 on September 10, 2015
Posted by 護樹協會 on Auguest 21, 2015


Miss South Africa Zozibini Tunzi crowned Miss Universe 2019 winner
by WABCATLANTA, Georgia -- For the second time since 2017, Miss South Africa has been crowned Miss Universe.
Zozibini Tunzi, 26, took the victory Sunday night during the pageant hosted by comedian and game show host Steve Harvey at Tyler Perry Studios in Atlanta, Georgia.
According to her biography on the pageant website, Tunzi hails from Tsolo, South Africa and is "a passionate activist and engaged in the fight against gender based violence."
She also devoted her social media campaign to "changing the narrative around gender stereotypes" and worked to promote natural beauty as well as women loving themselves.
"I grew up in a world where a woman who looks like me with my kind of skin and my kind of hair was never considered to be beautiful. And I think it's time that stops today. I want children to look at me and see my face and see theirs reflected in mine," she said during the contest.
After the show, Tunzi echoed that statement on Twitter saying, "Tonight a door was opened and I could not be more grateful to have been the one to have walked through it."
Tunzi beat out nearly 90 other contestants for the crown. The two runners-up were Miss Mexico and Miss Puerto Rico.
South Africa was also represented in 2017 when Demi-Leigh Nel-Peters won.
 and captioned one of her tweets, "Sisterhood!"
Even Steve Harvey appeared to be enamored with Tunzi, asking her to sign his jacket, something he said he's never asked a contestant to do before.


Hello students and parents. My name is J Cole and I am a lryical and rap teacher at the Royal College School. My course encompasses teaching students to song write, and my other involved teaching students to rap and make beats. Students will also, along with going to the RCSFA Studio,will also take visits to my onw studio. It's going to be a great 2016-2017 school year I cannot wait to widen students' skills on composing and rapping!


Formula Compiler using C++ BNF-like EDSL
Is there an area where a new programming language developed from scratch can be applied? For the first glance, there are no requirements which cannot be covered by the existing languages. However, such areas exist, e.g. systems where parallel calculation is required. It is remarkable the computer society has been looking a language to support grammar parsers itself! BNF (Backus Naur Form) notation and it’s derivatives (ABND, EBNF, etc.) are widely used for formal specifications of programming languages.
Although such specifications are really good for both requirements and design they do not help for parser programming. Another approach is to generate code for parsers. The most famous tool is yacc (Yet Another Compiler Compiler) the precompile routine which can generate C parser code from syntactic definition in BNF-like form. This solution is considered as heavy and the software community has been looking for something easier.
For the C++ the approach is obvious: a lite solution should be presented as embedded domain specific language (EDSL). It means BNF-like statements have to be mapped to both C++ keywords and overloaded operators. One known example is boost::spirit template library. This paper introduces the BNFLite C++ template library and demonstrates how to create the simplest byte-code formula compiler using this tool.
The BNFLite implements embedded domain specific language approach for gramma specifications when all "production rules" are constructed as instances of C++ classes concatenated by means of overloaded arithmetic operators. For example, the integer number in BNF specs can be described as:
<digit> ::= <0> | <1> | <2> | <3> | <4> | <5> | <6> | <7> | <8> | <9>
<number> ::= <digit> | <digit> <number>
This representation can be written on C++ using BNFlite approach:
#include "bnflite.h" // include source code lib
using namespace bnf;
Lexem Digit = Token("0") | "1" | "2" | "4" | "5" | "6" | "7" | "8" | "9";
Lexem Number;
Number = Digit | Digit + Number;
Execution of this C++ code produces an internal date structures for further parsing procedures.
Let specify base requirements to the language of the formula compiler to be developed
This is enough for design of simple programming language, which can be described in Backus-Naur Form.
Formal BNF term is called "production rule". Each rule except "terminal" is a conjunction of a series of more concrete rules or terminals: production_rule ::= <rule_1>...<rule_n> | <rule_n_1>...<rule_m>
. So, the designed expression-like language can be presented by the following terms:
<operand> ::= <INTEGER> | <FLOAT> | <STRING>
<operator> ::= "+" | "-" | "*" | "/"
<arguments> ::= <EMPTY> | <expression> | < arguments> "," <expression>
<function> ::= <IDENTIFIER> "(" < arguments > ")"
<expression> ::= <operand> | <function> | "-" <expression> | <expression> <operator> <expression> | "(" <expression> ")"
Such decryption is formally correct but it has two known issues. Firstly, binary operator precedence is not presented. Secondly, it contains redundant number of recursions which can be substituted by repetitions.
Augmented BNF specifications introduce constructions like *<element>
to support repetition where
and
imply at least
and at most
occurrences of the element. For example, 3*3<element>
allows exactly three and 1*2<element>
allows one or two. *<element>
simplified construction allows any number (from 0 to infinity). Alternatively 1*<element>
enclose an optional element (at least one) and it can be optionally presented as [element]
.
Full specifications of the formula compiler language in ABNF form are not so complex:
ALPHA = 'A'-'Z' | 'a'-'z'
DIGIT = '0'-'9'
digit1_9 = '1'-'9'
string = '\"' *( ALPHA | DIGIT | '_' ) '\"'
e = 'e' | 'E'
exp = e ['-' | '+'] 1*DIGIT
frac = '.' 1*DIGIT
int = '0' | ( digit1_9 *DIGIT )
number = [ '-' ] int [ frac ] [ exp ]
operand = int | number | string
operator = '+' | '-' | '*' | '/'
identifier = (ALPHA | '_') *( ALPHA | DIGIT | '_' )
arguments ::= expression *( ',' expression )
function ::= identifier '(' [arguments] ')'
elementary ::= operand | function | ('-' elementary) | ('(' expression ')')
primary = elementary *(('/' elementary) | ('*' elementary))
expression = primary *(('-' primary) | ('+' primary))
These specs are more computer friendly then previous ones.
The simple byte-code compiler is a minor extension of the expression calculator. For example, the expression 2 + 3 * 4 can be converted to tree.
└──+
├── 2
└──*
├── 3
└── 4
It can be written on C manned “add(2, mul(3, 4))” form. Let write it reversely: ” (2,(3,4)mul)add”. This form is called as revers polish notation(RPN) and byte-codes can be easily generated:
Int(2) Int(3), Int(4), Mul, Addl
Int(number) operation pushes the number to the stack. Mul/Add operation pops two parameters from the stack and pushes the result.
Practical benefit of the formula compiler comes only when functions are used. Let consider “liner map” 2 + 3 *GetX()
. The byte-code will be:
Int(2) Int(3), Call<0>, Mul, Addl
For example, this functionally can be cyclically applied to X database column to obtain Y column (Moreover, the provided demo does four calculations simultaneously but it is rather the scope of another paper).
All byte-codes consist of two fields: type and union for integer, float and pointer to string.
struct byte_code
{
OpCode type;
union {
int val_i;
float val_f;
const char* val_s;
};
byte_code(): type(opNop), val_i(0) {};
/* … */
The union represents the operand for the simple “immediate addressing mode”. The type is the operation code based upon the following enumerator:
enum OpCode
{
opFatal = -1, opNop = 0,
opInt = 1, opFloat = 2, opStr = 3, opMaskType = 0x03,
opError = 1, opNeg = 2, opPos = 3, opCall = 4,
opToInt = 5, opToFloat = 6, opToStr = 7,
opAdd = 2, opSub = 3, opMul = 4, opDiv = 5,
};
The real operation code is a little more complex. It contains types for stack operands.
The BNFLite description is similar to EBNF specifications above.
Token digit1_9('1', '9');
Token DIGIT("0123456789");
Lexem i_digit = 1*DIGIT;
Lexem frac_ = "." + i_digit;
Lexem int_ = "0" | digit1_9 + *DIGIT;
Lexem exp_ = "Ee" + !Token("+-") + i_digit;
Lexem number_ = !Token("-") + int_ + !frac_ + !exp_;
Rule number = number_;
The Token
class represents terminals, which are symbols. The Lexem
constructs strings of symbols. Parsing is a process of analyzing tokens and lexemes of the input stream. The unary C operator `*
` means the construction can be repeated from 0 to infinity. The binary C operator `*
` means the construction like 1*DIGIT
can be repeated from 1 to infinity. The unary C operator `!
` means the construction is optional.
Practically, Rule
is similar to Lexem
except for callbacks and spaces sensitivity. The construction Rule number_ = !Token("-") + int_ + !frac_ + !exp_;
allows incorrect spaces e.g. between integer and fractional parts.
Token az_("_"); az_.Add('A', 'Z'); az_.Add('a', 'z');
Token az01_(az_); az01_.Add('0', '9');
Token all(1,255); all.Remove("\"");
Lexem identifier = az_ + *(az01_);
Lexem quotedstring = "\"" + *all + "\"";
The Token all
represents all symbols except quote;
Rule expression;
Rule unary;
Rule function = identifier + "(" + !(expression + *("," + expression)) + ")";
Rule elementary = AcceptFirst()
| "(" + expression + ")"
| function
| number
| quotedstring + printErr
| unary;
unary = Token("-") + elementary;
Rule primary = elementary + *("*%/" + elementary);
/* Rule */ expression = primary + *("+-" + primary);
Expression
and unary
rules are recursive. They need to be declare earlier. The AcceptFirst()
statement changes parser behavior from the default mode to “accept best” for this particular Rule
. After that the parser chooses a first appropriate construction instead of the most appropriate one.
Recursive descent parser implies tree composition. The user needs a means to track the tree traversal recursion. First of all, the interface object structure to interact with the parser should be specified.
typedef Interface< std::list<byte_code> > Gen;
/* ... */
const char* tail = 0;
Gen result;
int tst = Analyze(expression, expr.c_str(), &tail, result);
Parsing starts by the Analyze
call with the following arguments:
expression
– root Rule object of BNFlite grammaexpr.c_str()
– string of the expression to be compiled to byte-codetail
– pointer to end of text in case of successful parsing or to place where parsing is stopped due to errorresult
– final object from users callbackstst
– contains result of parsing implemented as bitwise flags, error if negativeThe Callback function accepts vector of byte-code lists formed early. It returns the list of new formed byte-codes. For example, Gen DoNumber(std::vector<Gen>& res)
accepts the one element vector representing a number. It has to return the result Gen
object with filled user's data
(either Int<> or Float<>).
In common case the callback Gen DoBinary(std::vector<Gen>& res)
accepts the left byte-code vector, the sign of operation(+**/
), and the right byte-code vector. The callback just joints left and right byte-code vectors and generate the tail byte-code according to the sign.
This is a grammar part implemented by means of boost::spirit template library:
namespace q = boost::spirit::qi;
typedef boost::variant<
int, float, std::string,
boost::recursive_wrapper<struct binary_node>,
boost::recursive_wrapper<struct unary_node>,
boost::recursive_wrapper<struct call_node>
> branch_t;
template <typename Iterator>
struct SParser: q::grammar<Iterator, branch_t, q::space_type>
{
q::rule<Iterator, branch_t, q::space_type> expression, primary, elementary, unary;
q::rule<Iterator, std::string()> quotedstring;
q::rule<Iterator, std::string()> identifier;
q::rule<Iterator, std::vector<branch_t>, q::space_type> arglist;
q::rule<Iterator, call_node, q::space_type> function;
SParser() : SParser::base_type(expression)
{
using boost::phoenix::construct;
expression = primary[q::_val = q::_1]
>> *('+' > primary[q::_val = construct<binary_node>(q::_val, q::_1, '+')]
| '-' > primary[q::_val = construct<binary_node>(q::_val, q::_1, '-')] );
primary = elementary[q::_val = q::_1]
>> *('*' > elementary[q::_val = construct<binary_node>(q::_val, q::_1, '*')]
| '/' > elementary[q::_val = construct<binary_node>(q::_val, q::_1, '/')] );
unary = '-' > elementary[q::_val = construct<unary_node>(q::_1, '-')];
elementary = q::real_parser<float, q::strict_real_policies<float>>()[q::_val = q::_1]
| q::int_[q::_val = q::_1]
| quotedstring[q::_val = q::_1]
| ('(' > expression > ')')[q::_val = q::_1]
| function[q::_val = q::_1]
| unary[q::_val = q::_1];
quotedstring = '"' > *(q::char_ - '"') > '"';
identifier = (q::alpha | q::char_('_')) >> *(q::alnum | q::char_('_'));
arglist = '(' > (expression % ',')[q::_val = q::_1] > ')';
function = (identifier > arglist)[q::_val = construct<call_node>(q::_1, q::_2)];
on_error(expression, std::cout << boost::phoenix::val("Error "));
}
};
Boost::spirit is more mature tool and does not use callbacks. For each “rule” it calls constructors of classes which should be member of boost::variant. Therefore, boost::spirit cannot be used for one-pass compilers. However, boost::variant can be effective if something more complex is required (e.g. byte-code optimizers).
Problems of boost::spirit lie in another area. Any inclusion of boost::spirit considerably increases project compiler time. Another significant drawback of boost::spirit is related to run-time debugging of the gramma - it is not possible at all!
Writing gramma by EDSL is unusual and the user does not have full understanding about the parser. If the Analyze
call returns an error for the correct text then the user always should take into consideration the possibility of grammar bugs.
Return code from Analyze call can contain flags related to the gramma. For example, eBadRule
, eBadLexem
flags mean the tree of rules is not properly built.
The user can assign a name to the Rule
. It can help to track recursive descent parser using Rule::_parse
function. Debugger stack (history of function calls) can inform which Rule was applied and when. The user just needs to watch the this.name
variable. It is not as difficult as it seems at first glance.
Analyze
function can be applied as unit test to any Rule representing subset of gramma.
Function with prototype “bool foo(const char* lexem, size_t len)
” can be used in BNFLite expressions for both reasons: to obtain temporary results and to inform about predicted errors.
This function will print the parsed number
static bool DebugNumber(const char* lexem, size_t len)
{ printf("The number is: %.*s;\n", len, lexem); return true; }
/* … */
Rule number = number_ + DebugNumber;
The function should return true if result is correct.
Let assume the numbers with leading ‘+
’ are not allowed
static bool ErrorPlusNumber(const char* lexem, size_t len)
{printf("The number %.*s with plus is not allowed\n", len, lexem); return false;}
/* … */
Lexem number_p = !Token("+") + int_ + !frac_ + !exp_ + ErrorPlusNumber;
Rule number = number_ | number_p;
The function should return false to pass the incorrect result to the parser. C++11 constructions like below are also possible:
Rule number = number_ | [](const char* lexem, size_t len)
{ return !printf("The number %.*s with plus is not allowed\n", len, lexem); }
The attached simplest formula compiler package has the following C++ files:
The package has several prebuilt projects but generally it can build as:
>$ g++ -O2 -march=pentium4 -std=c++14 -I.. code_gen.cpp parser.cpp code_lib.cpp main.cpp code_run.cpp
Function GetX() returns four values: 0, 1, 2, 3. It can be used in expression to be compiled and calculated:
> $ a.exe "2 + 3 *GetX()"
5 byte-codes in: 2+3*GetX()
Byte-code: Int(2),Int(3),opCall,opMul,opAdd;
result = 2, 5, 8, 11;
The presented formula compiler is the realization of several ideas in order to demonstrate its feasibility. First of all, it is parallel computation according to compiled formula. Secondly, it introduces BNFLite header library to spread existing concept of applicability of BNF forms. Now a fast parser implementation can be easily created for specific customer requirements where BNF-like language is used.
[1] BNFLite with some examples, https://github.com/r35382/bnflite


--- title: "The Blind Man of Marrakech" postHeading: "The Blind Man of Marrakech" subHeading: "A poem" tags: poetry travel date: "29 Oct 2018" image: "/img/The-Blind-Man-of-Marrakech/blindness-is-not-a-matter-yogilightbox-wordpress.jpg" credit: "Photo by yogilightbox on Wordpress" ---
There are other forms of sight
. . .
Sitting down
In the shade of an orange tree
With the mosque to his right
and the park to his left,
He takes in the sounds and smells of the square
And revels in the flutter of
An orange blossom
On his balding head,
As he sips the last of his mint tea.
Rising from the bench,
He protects his head
With the hood of his Djellaba
As he makes his way towards the junction.
Reaching a set of traffic lights,
He leans on his walking stick –
Waiting for one of the passers-by to notice him.
They pass,
One by one,
To his left,
Then to his right.
The lady with the chirpy voice,
Speaking to her friend on the phone,
Waiting to cross when the lights go red.
Has she noticed him?
If only she did!
Then he would tell her
About the lies
Sprouting from her friend's mouth.
The lights change.
The lady crosses.
The blind man waits.
The young couple giggling
In that haze of newfound love.
Have they noticed him?
If only they did!
Then he would tell them
About the girl's husband,
Lying in wait by the market square.
The lights change.
The couple crosses.
The blind man waits.
A young man approaches him.
"Sir, may I help you cross?"
He nods and lets the boy take hold of his free arm.
Together they make slow progress
Across the crowded junction.
As they approach the other side,
He tells the young man not to worry.
His daughter will not die.
She will live a long and healthy life.


{% set title = "Edit the app content" %} {% set current_link = "home" %} {% set current_composer = "adapt" %} {% extends 'composers/adapt/layout.html' %} {% block body_content %}
{{ gettext("You are going to duplicate the App {app} of the user {user}. What name do you want to use?").format(app=app.name,user = login) }}


 Enter your e-mail address below, and we'll send you an e-mail allowing you to reset it.
Please contact us if you have any trouble resetting your password.


HowTo: Common Patterns
This section lists common actor patterns which have been found to be useful, elegant or instructive. Anything is welcome, example topics being message routing strategies, supervision patterns, restart handling, etc. As a special bonus, additions to this section are marked with the contributor’s name, and it would be nice if every Akka user who finds a recurring pattern in his or her code could share it for the profit of all. Where applicable it might also make sense to add to the akka.pattern package for creating an OTP-like library.
Throttling Messages
Contributed by: Kaspar Fischer
"A message throttler that ensures that messages are not sent out at too high a rate."
The pattern is described in Throttling Messages in Akka 2.
Balancing Workload Across Nodes
Contributed by: Derek Wyatt
"Often times, people want the functionality of the BalancingDispatcher with the stipulation that the Actors doing the work have distinct Mailboxes on remote nodes. In this post we’ll explore the implementation of such a concept."
The pattern is described Balancing Workload across Nodes with Akka 2.
Work Pulling Pattern to throttle and distribute work, and prevent mailbox overflow
Contributed by: Michael Pollmeier
"This pattern ensures that your mailboxes don’t overflow if creating work is fast than actually doing it – which can lead to out of memory errors when the mailboxes eventually become too full. It also let’s you distribute work around your cluster, scale dynamically scale and is completely non-blocking. This pattern is a specialisation of the above 'Balancing Workload Pattern'."
The pattern is described Work Pulling Pattern to prevent mailbox overflow, throttle and distribute work.
Ordered Termination
Contributed by: Derek Wyatt
"When an Actor stops, its children stop in an undefined order. Child termination is asynchronous and thus non-deterministic.
If an Actor has children that have order dependencies, then you might need to ensure a particular shutdown order of those children so that their postStop() methods get called in the right order."
The pattern is described An Akka 2 Terminator.
Akka AMQP Proxies
Contributed by: Fabrice Drouin
"“AMQP proxies” is a simple way of integrating AMQP with Akka to distribute jobs across a network of computing nodes. You still write “local” code, have very little to configure, and end up with a distributed, elastic, fault-tolerant grid where computing nodes can be written in nearly every programming language."
The pattern is described Akka AMQP Proxies.
Shutdown Patterns in Akka 2
Contributed by: Derek Wyatt
“How do you tell Akka to shut down the ActorSystem when everything’s finished? It turns out that there’s no magical flag for this, no configuration setting, no special callback you can register for, and neither will the illustrious shutdown fairy grace your application with her glorious presence at that perfect moment. She’s just plain mean.
In this post, we’ll discuss why this is the case and provide you with a simple option for shutting down “at the right time”, as well as a not-so-simple-option for doing the exact same thing."
The pattern is described Shutdown Patterns in Akka 2.
Distributed (in-memory) graph processing with Akka
Contributed by: Adelbert Chang
"Graphs have always been an interesting structure to study in both mathematics and computer science (among other fields), and have become even more interesting in the context of online social networks such as Facebook and Twitter, whose underlying network structures are nicely represented by graphs."
The pattern is described Distributed In-Memory Graph Processing with Akka.
Case Study: An Auto-Updating Cache Using Actors
Contributed by: Eric Pederson
"We recently needed to build a caching system in front of a slow backend system with the following requirements:
The data in the backend system is constantly being updated so the caches need to be updated every N minutes. Requests to the backend system need to be throttled. The caching system we built used Akka actors and Scala’s support for functions as first class objects."
The pattern is described Case Study: An Auto-Updating Cache using Actors.
Discovering message flows in actor systems with the Spider Pattern
Contributed by: Raymond Roestenburg
"Building actor systems is fun but debugging them can be difficult, you mostly end up browsing through many log files on several machines to find out what’s going on. I’m sure you have browsed through logs and thought, “Hey, where did that message go?”, “Why did this message cause that effect” or “Why did this actor never get a message?”
This is where the Spider pattern comes in."
The pattern is described Discovering Message Flows in Actor System with the Spider Pattern.
Scheduling Periodic Messages
This pattern describes how to schedule periodic messages to yourself in two different ways.
The first way is to set up periodic message scheduling in the constructor of the actor, and cancel that scheduled sending in postStop or else we might have multiple registered message sends to the same actor.
Note
With this approach the scheduled periodic message send will be restarted with the actor on restarts. This also means that the time period that elapses between two tick messages during a restart may drift off based on when you restart the scheduled message sends relative to the time that the last message was sent, and how long the initial delay is. Worst case scenario is interval plus initialDelay.
class ScheduleInConstructor extends Actor {
import context.dispatcher
val tick =
context.system.scheduler.schedule(500 millis, 1000 millis, self, "tick")
override def postStop() = tick.cancel()
def receive = {
case "tick" =>
// do something useful here
}
}
The second variant sets up an initial one shot message send in the preStart method of the actor, and the then the actor when it receives this message sets up a new one shot message send. You also have to override postRestart so we don't call preStart and schedule the initial message send again.
Note
With this approach we won't fill up the mailbox with tick messages if the actor is under pressure, but only schedule a new tick message when we have seen the previous one.
class ScheduleInReceive extends Actor {
import context._
override def preStart() =
system.scheduler.scheduleOnce(500 millis, self, "tick")
// override postRestart so we don't call preStart and schedule a new message
override def postRestart(reason: Throwable) = {}
def receive = {
case "tick" =>
// send another periodic tick after the specified delay
system.scheduler.scheduleOnce(1000 millis, self, "tick")
// do something useful here
}
}
Template Pattern
Contributed by: N. N.
This is an especially nice pattern, since it does even come with some empty example code:
class ScalaTemplate {
println("Hello, Template!")
// uninteresting stuff ...
}
Note
Spread the word: this is the easiest way to get famous!
Please keep this pattern at the end of this file.
Contents


|
|
Addison Shannon
|
|
Digital manufacturing |
No
|
|
|
Alexis Colon
|
|
Materials, process and manufacturing design technologies |
No
|
|
|
Alexis Kinney
|
|
Digital manufacturing |
No
|
|
|
Angel Spencer
|
|
Digital manufacturing |
No
|
|
|
Angel Witt
|
|
Materials, process and manufacturing design technologies |
No
|
|
|
Angelo Arnold
|
|
Digital manufacturing |
No
|
|
|
Anita Ruiz
|
|
Digital manufacturing |
No
|
|
|
Benjamin Nixon
|
|
Materials, process and manufacturing design technologies |
No
|
|
|
Blake Wood
|
|
Digital manufacturing |
No
|
|
|
Bob Malone
|
|
Creative industries |
No
|
|
|
Brandi Mccarthy
|
|
Materials, process and manufacturing design technologies |
No
|
|
|
Brandon Harper
|
|
Urban living |
No
|
|
|
Brentley Mcmillan
|
|
Digital manufacturing |
No
|
|
|
Bret Alvarez
|
|
Creative industries |
No
|
|
|
Bret John
|
|
Assembly / disassembly / joining |
No
|
|
|
Callum Austin
|
|
Urban living |
No
|
|
|
Cameron Guzman
|
|
Creative industries |
No
|
|
|
Camille Shelton
|
|
Materials, process and manufacturing design technologies |
No
|
|
|
Carmen Marks
|
|
Materials, process and manufacturing design technologies |
No
|
|
|
Charlie Russell
|
|
Materials, process and manufacturing design technologies |
No
|


I am Senior Software Research Engineer at the Samsung Display America Lab.
Previously, I was an Electrical and Computer Engineering Ph.D. student in the Magnetic Resonance Engineering Laboratory (
MREL) at the University of Southern California (
USC), where I was advised by Prof.
Krishna S. Nayak.


The technology allows students to focus on the assignment or activity with less distraction.
The technology motivates students to start the learning process.
The technology causes a shift in the behavior of the students, where they move from passive to active social learners (co-use)
Enhancement of the learning goals
0=No
1=Somewhat
2=Yes
Comments
The technology tool allows students are able to develop or demonstrate a more sophisticated understanding of the learning goals or content
The technology creates supports (scaffolds) to make it easier to understand concepts or ideas
The technology creates paths for students to demonstrate their understanding of the learning goals in a way that they could not do with traditional tools
Extending the learning goals
0=No
1=Somewhat
2=Yes
Comments
The technology creates opportunities for students to learn outside of their typical school day
The technology creates a bridge between students school learning and their everyday life experiences
The technology allows students to build authentic life skills, which they can use in their everyday lives


ClearMap()
Syntax
ClearMap(Map())Description
Clears all the elements in the specified map and releases their memory. After this call the map is still usable, but is empty (i.e. there are no more elements in it).
Parameters
Map() The map to clear.
Return value
None.
Remarks
PureBasic will only free the memory for the elements. If you have been using the map for something such as storing handles of objects that you create directly with the OS, there is no way PureBasic (or any other language) can know what they are. Therefore, in cases such as that, you should go through the elements in the map and free the objects yourself.
Example
NewMap Country.s() Country("FR") = "France" Country("US") = "United States" ; Proof that items have been added to the map MessageRequester("Information", "There are "+Str(MapSize(Country()))+" elements in the map") ; Clear the map and show that the map really is empty ClearMap(Country()) MessageRequester("Information", "There are "+Str(MapSize(Country()))+" element in the map")
See Also
AddMapElement(), DeleteMapElement()
Supported OS
All


MIT
Geo
Web
{% if not g.user %}
Log In
{% endif %} {% if g.user %}
Logged In
{% endif %}
Search
Filters
Limit results to visible map
Hide restricted layers from other institutions
Institution
Data Type
Base Layers
Zoom To
{% include 'footer.html' %}
×
Log In
In order to view some of the data in GeoWeb you will need to authenticate through Touchstone. Log in, or continue anonymously.


 We are basically going to create a cluster where we create an EC2 instance that can run our containers with the help of tasks that allows us to define our docker image and what resources it needs. We are also going to use services to tell ECS which cluster to run our applications on.
ECS Roles & Policies
The first step for us is to create the roles and policies needed for our ECS service.
- Create a new file called
ecs-roles.tf
and put the following inside:
resource "aws_iam_role" "ecs-instance-role" {
name = "ecs-instance-role"
path = "/"
assume_role_policy = "${data.aws_iam_policy_document.ecs-instance-policy.json}"
}
data "aws_iam_policy_document" "ecs-instance-policy" {
statement {
actions = ["sts:AssumeRole"]
principals {
type = "Service"
identifiers = ["ec2.amazonaws.com"]
}
}
}
resource "aws_iam_role_policy_attachment" "ecs-instance-role-attachment" {
role = "${aws_iam_role.ecs-instance-role.name}"
policy_arn = "arn:aws:iam::aws:policy/service-role/AmazonEC2ContainerServiceforEC2Role"
}
resource "aws_iam_instance_profile" "ecs-instance-profile" {
name = "ecs-instance-profile"
path = "/"
role = "${aws_iam_role.ecs-instance-role.id}"
provisioner "local-exec" {
command = "sleep 60"
}
}
resource "aws_iam_role" "ecs-service-role" {
name = "ecs-service-role"
path = "/"
assume_role_policy = "${data.aws_iam_policy_document.ecs-service-policy.json}"
}
resource "aws_iam_role_policy_attachment" "ecs-service-role-attachment" {
role = "${aws_iam_role.ecs-service-role.name}"
policy_arn = "arn:aws:iam::aws:policy/service-role/AmazonEC2ContainerServiceRole"
}
data "aws_iam_policy_document" "ecs-service-policy" {
statement {
actions = ["sts:AssumeRole"]
principals {
type = "Service"
identifiers = ["ecs.amazonaws.com"]
}
}
}
- Save your file next to your other Terraform files and
cd
into that directory and run:
terraform init
terraform plan
- If everything looks good, run:
terraform apply
- The roles and policies are now created!
Elastic Container Services (ECS) cluster with Terraform
- Create a new file called
ecs.tf
and place it in the same folder asecs-roles.tf
. - Place the following content inside your newly created file.
# Create Cluster
resource "aws_ecs_cluster" "beats-cluster" {
name = "beats-cluster"
}
- The code above creates a new ECS cluster called
beats-cluster
. You can now login to your AWS console and clickElastic Container Services
to see your new cluster at the bottom.
Elastic Container Registry (ECR) with Terraform
The ECR is a repository where we can store our images created in Docker. To do so we first need to create our ECR.
- Create a new file in the same folder as before and call it
ecr.tf
. - Copy and paste the code below:
# Create ECR
resource "aws_ecr_repository" "beats_repo" {
name = "beats_repo"
}
# Output URL
output "beats-repository-URL" {
value = "${aws_ecr_repository.beats_repo.repository_url}"
}
- The first code block creates our ecr reposiotry and calls it
beats_repo
. The second block is used to output the URL to our repository so we do not have to logon to the AWS console to find it. - Open your terminal and run terraform again to start your ECR and ECS.
terraform plan
terraforn apply
- If you login to your AWS console and then click on
Elastic Container Services
and thenClusters
you will find your cluster at the bottom of the page. You can click on the title to find more information. - You can click
Repositories
on the left side under Amazon ECR to find information about your Container Registry. You should have one repository there already calledbeats_repo
.


createBootstrapForm($this->startGame);
?>
= $this->getTitle() ?>
= $form->start([ 'class' => 'form-inline' ]) ?>
= $form->select('game', [ 'group_class' => 'mr-2' ]) ?>
= $form->text('player_name', [ 'group_class' => 'mr-2' ]) ?>
= $form->button('submit') ?>
= $form->end() ?>


CookiePolicy provides a method to handle the acceptance of cookie policies within your web application.


- A - Class in model.history
-
Created by Billie Devolder on 3/05/2017.
- A(String, String) - Constructor for class model.history.A
-
- AbstractController<T extends EditableObject> - Class in controller
-
This class and it's subclasses are framework independent controller classes.
- AbstractController(DAOManager, DAO<T>, Resource, Function) - Constructor for class controller.AbstractController
-
- Action - Enum in model.account
-
All possible actions in the application
Created by jorg on 3/2/17.
- addAction(Action) - Method in class model.account.Permission
-
Adds a permitted action of the resource
- addInterestedObject(EditableObject) - Method in class model.history.LogEntry
-
- Address - Class in model.identity
-
Class representing an Address
- Address() - Constructor for class model.identity.Address
-
Default Constructor
- Address(String, String, String, String, String) - Constructor for class model.identity.Address
-
Constructor
- AddressDAO - Interface in dao.interfaces
-
DAO for the bean Address
Created by sam on 3/13/17.
- addSpecialCondition(SpecialCondition) - Method in class model.insurance.Surety
-
Adds a single special conditions to the collection
- afterProductionDate(LocalDate) - Method in class dao.database.ProductionVehicleDAO
-
- afterProductionDate(LocalDate) - Method in interface dao.interfaces.VehicleDAO
-
Returns a Filter to use in ListFiltered in this class, which returns all Vehicles which are produced after the given date.
- afterTestMethod() - Method in class spring.controller.RESTUserMeControllerTest
-
- afterTransaction() - Static method in class spring.controller.insurance.RESTContractControllerTest
-
- afterTransaction() - Static method in class spring.controller.insurance.RESTSpecialConditionControllerTest
-
- afterTransaction() - Static method in class spring.controller.insurance.RESTVehicleInsuranceControllerTest
-
- afterTransaction() - Static method in class spring.controller.RESTCompanyControllerTest
-
- afterTransaction() - Static method in class spring.controller.RESTFleetControllerTest
-
- afterTransaction() - Static method in class spring.controller.RESTFunctionControllerTest
-
- afterTransaction() - Static method in class spring.controller.RESTPermissionControllerTest
-
- afterTransaction() - Static method in class spring.controller.RESTRoleControllerTest
-
- afterTransaction() - Static method in class spring.controller.RESTUserControllerTest
-
- afterTransaction() - Static method in class spring.controller.RESTUserMeControllerTest
-
- afterTransaction() - Static method in class spring.controller.RESTVehicleControllerTest
-
- afterTransaction() - Static method in class spring.controller.RESTVehicleTypeControllerTest
-
- archive(UUID) - Method in class controller.AbstractController
-
Attempt to archive the object of type T that has the UUID uuid
- archive(UUID, LocalDate) - Method in class controller.insurance.VehicleInsuranceController
-
- atLeastMileage(int) - Method in class dao.database.ProductionVehicleDAO
-
- atLeastMileage(int) - Method in interface dao.interfaces.VehicleDAO
-
Returns a Filter to use in ListFiltered in this class, which returns all Vehicles which have at least the given mileage.
- atProductionDate(LocalDate) - Method in class dao.database.ProductionVehicleDAO
-
- atProductionDate(LocalDate) - Method in interface dao.interfaces.VehicleDAO
-
Returns a Filter to use in ListFiltered in this class, which returns all Vehicles which are produced at the given date.
- AuthController - Class in controller
-
Created by jorg on 3/30/17.
- AuthController() - Constructor for class controller.AuthController
-
- AuthenticationToken - Class in spring.model
-
Created by jorg on 3/30/17.
- AuthenticationToken(UUID) - Constructor for class spring.model.AuthenticationToken
-
- AuthenticationToken(String) - Constructor for class spring.model.AuthenticationToken
-
- AuthUtil - Class in spring.controller
-
Created by tjupo on 30/04/2017.
- AuthUtil() - Constructor for class spring.controller.AuthUtil
-


Reference equality is when the == operation returns true only when the operands reference the same data.
See also value equality.


Video gaming and codding is my passion. But when I codding for
any project/ideas/problem solving it's very difficult to focus
on any other task. In short, if I share my little experience
of my life that I was doing code 18hrs without any kind of
brack.
Now let's focus on my skills. Actually, I would like to
convert any ideas to a web application. For this reason at the
begging of time, I only work for the back end side of an
application. Side by side also works for the design part of an
application.
Expert to manage Web Applications
University of Asia Pacific
Govt. Bangla College
Mohammadpur Govt High School
I have the privilege to work with these cool companies.
Co-Founder & CEO
Full stack developer
Web designer & Sysytem management
Acadamic
Volunteer
Project


| t01 |
virus, activity, replication, viral, protease, amino, mutations, nsp2, RNA, in_vitro |
71 |
1 |
| t02 |
sars-cov, respiratory, syndrome, severe, acute, coronavirus, SARS, 3clpro, inhibitors, protease |
93 |
5 |
| t03 |
binding, site, active_site, active, structure(s), crystal, catalytic, enzyme, complex |
71 |
3 |
| t04 |
dubs, ubiquitin, enzymes, cellular, modification, probes, review, adp-ribosylation, proteins, processes |
60 |
0 |
| t05 |
ISG15, DUB, ub, plpro, deubiquitinating, interferon, innate, ubiquitin, immune, isgylation |
42 |
0 |
| t06 |
dimer, m(pro, dimerization, pl(pro, monomer, dynamics, MD, extra, dimeric, catalytic_machinery |
31 |
0 |
| t07 |
PRRSV, proteinase, nsp4, nsp11, cleavage, predicted, IBV, reproductive, MHV, 3c-like_proteinase |
36 |
0 |
| t08 |
macro, macro_domain, toxin, bacterial, clan, FAN1, nuclease, endou, superfamily, domains |
28 |
1 |
| t09 |
nsp10, mtase, nsp16, methylation, cap, RNA, nsp14, methyltransferase, mrna, polymerase |
32 |
1 |
| t10 |
cleavage, furin, trypsin, substrate, position(s), cleavage_site, gln, P3, peptide |
30 |
1 |
| t11 |
M1, peptidases, cathepsins, aminopeptidase(s), USP2, USP14, serine, enhance, tissue |
31 |
0 |
| t12 |
=, crystals, nsp15, Å, space, asymmetric, unit, space_group, parameters, resolution |
27 |
1 |
| t13 |
3cpro, 3C, EV71, HAV, HEV, ‘, DHAV, x-domain, 2A, dhav_3c_protease |
15 |
0 |
| t14 |
chapter(s), subject, edition, chemistry, sections, biological_aspects, preparation, cleave_proteins, third_edition |
23 |
0 |
| t15 |
cathepsin, cathepsin_l, nipah, mnsp15, cscatl, s-crystallin, cathepsin_h, cscatd, catalytic_site, WT |
19 |
0 |