For a long time I have been fan of mocking frameworks like Moq and NSubstitute. These libraries seems indispensable while unit-testing. They allow us to easily generate subs and mocks and assert that certain interaction between components took place.
NOTE: If you do not remember difference between stub and mock please read this Martin Fowler article. In short mocks are used to test interactions between components (a method was called, a property was set) while stubs are used as dumb implementations of component dependencies (they usually either do nothing or provide some preset data).
But recently, after reading volume 1 of Elegant Objects which by the way I strongly recommend, I changed my mind. In one of the chapters author presents the idea that every interface should have an associated fake object. A fake object is a simple but working implementation of an interface and resides in the same source code file as the interface itself. Fake objects serve two purposes. First, they are example implementations of interfaces that show users how the interfaces should be implemented. And second they can be used as stubs and mocks in unit-tests.
Of course this idea seemed a bit extreme to me, so I decided to go with a bit more evolutionary approach. I slowly replaced all mock object that I had in my unit-tests with fakes (I put all fakes in my unit test projects - but I am still thinking that maybe they deserve a project of their own). During this process all interaction testing assertions that are usually performed using mocking frameworks were replaced by behaviour testing assertions on fake objects.
It will be the best to illustrate this process using an example.
Say we have a simple component EventPublishingComponent
that
publishes two events (order is not important):
A “classic” unit test for this component using NSubstitute could look like this:
I am sure you have seen a lot of tests like this.
The key points are: Your create mocks and stubs using your
favourite mocking library in the test constructor or setup method.
In the arrange (given) part of the test you define mocks and stubs
behaviour using library specific syntax. Here e.g. we are capturing
argument passed to Publish
method for later use:
In the assert (then) part of the test we use again library specific syntax to check that a method on a mock was called with given set of arguments.
This approach is fine but it has some disadvantages:
-
It makes your tests very brittle. For example if I add a new method on
EventPublisher
calledPublishAll(events)
that allows me to publish all events at once and refactorEventPublishingComponent
to use it thenEventPublishingComponent
tests would stop working. The main problem here is that my tests check internal interaction between components (was methodPublish
called?) instead of checking external behaviour of the system (was event published?). -
Mocking library is another tool that you must learn. And please remember that most of the developers are not too eager to read documentation. Time presumably saved by using mocking library will be lost on reading StackOverflow answers and on fighting with the library itself (ever have a problem that your stub does not return intended value?).
-
It makes your tests less readable. I must admit that NSubstitute is a huge improvement over Moq in terms of readability but it still introduces a lot of visual noise in the test code. For example do see all those
<
,>
,(
and)
in the code below:
Now let us see how our test can look like if we use fakes instead:
To make this test compile we also need to write a fake for
EventPublisher
interface. Please keep in mind that fake is a simple
but working implementation of the interface:
I am sure that after seeing both versions of the test you agree with me that both are quite short and readable, yet the second version does not have the earlier mentioned disadvantages. Now you may rightly say that with the second approach you are forced to create fakes for almost all interfaces in your application. You are right, but you actually want to create fakes. Here is why:
-
Fakes are like TDD for your interface design. By creating a fake you actually check how difficult it is for a client of your API to provide an implementation. A fake too big or too difficult to implement is a sign that maybe your interface is doing too much. Also fakes can be treated as “reference implementations” of interfaces and as such they are part of your API documentation.
-
Writing a fake is a one-time effort. After fake is written it can be reused across many tests. Compare this with subs and mocks that you need to setup every time you want to use them.
Now it is time for a more real world example. As you probably heard Performance is a feature but logging can also be a feature. Imagine an application where we must log every failed login attempt. Since this is a business requirement we want to code it as an acceptance test. How difficult it can be to check that one method call was performed:
In practice it can be more difficult than it seems especially if you use
notoriously hard to test ILogger
from Microsoft.Extensions.Logging.Abstractions
package.
Why is ILogger
hard to test?
-
ILogger
interface contains only three methods (source code here) rest of its functionality is provided via extension methods. -
Extension methods that operate on
ILogger
often create wrappers around original arguments using classes likeFormattedLogValues
. Most of these wrapper classes does not overloadEquals
andGetHashCode
rendering argument matchers from mocking frameworks useless. -
No easy access to the logged message. Only method responsible for actual logging on
ILogger
interface isLog
:
To gain access to the logged message we must either dig
into state
argument
or call formatter(state, exception)
.
All this causes that naive testing aproachs like this fail:
And how they fail? With confusing error messages like this one:
Not very helpful, isn’t it?
If you really want to test ILogger
using NSubstitute you must
use the following code:
Did I say something earlier about unreadable tests and a lot of visual noise caused by mocking frameworks? Now you can see it with your own eyes!
Now it is time for our second approach using fakes. First we create a fake logger:
Notice that we did not implement all methods of ILogger
interface.
For external interfaces that are not under our control we should
implement just enough functionality in our fakes to make them usable.
Now it is time for writing actual test:
Wow! Test is short, readable and simple. Exactly what I was looking for.
I hope that this blog post persuaded you to start using fakes in your unit tests. At least you now know that you have a good alternative to mocking frameworks.
Sample source code (with a bit more complicated example): GitHub.


Welcome to Jenkins Robotics.
For project files click "Github Repositories". To watch our videos click "Youtube". Want to help our channel/projects? Consider becoming a Patreon, Click on the link below to become a supporter!
For project files click "Github Repositories". To watch our videos click "Youtube". Want to help our channel/projects? Consider becoming a Patreon, Click on the link below to become a supporter!


Hey I'm Zack. I'm an enthusiastic web developer and digital marketing professional based in the Los Angeles area who is passionate about technology, design, and business. I started my career doing digital marketing and content copywriting for LACED Agency, but I quickly discovered that I wanted to learn how to write websites themselves instead of just the copy that goes on them. I finally got my chance when I teamed up with some friends to launch Black Coffee LA, where I designed two websites and helped develop the company's marketing and sales strategy. In addition, I gained valuable direct sales experience selling coffee to consumers at various farmers' markets and live events.
I also work as a freelance developer and marketer, and am currently developing the website and marketing plan for Access 2 Senior Living, a new company that helps senior citizens locate assisted living and housing options free of charge. My increasing interest in technology eventually led me to General Assembly's 3-month Web Development Immersive course, where I learned to create apps that I previously would have thought were impossible or at least way ahead of my initial skills. I am now looking to leverage my experience in marketing on the client, agency, and freelance sides with my newfound knowledge as a developer. I am seeking full-time or contract-to-hire work with a company where I can learn and grow my skillset as quickly as possible and utilize my abilities to add value.


The intention is to put the viewer in the position of the survivor by sharing the survivors experiences. The victim-blaming words on the screen are glitched to signify how distorted and twisted these words are. The music is eerie in the beginning with the glitches shown but continues to become calming as the video continues and transitions into real experiences and feelings that survivors have experienced. There is a sense of sadness along with justice being brought to the situation about how much it takes for survivors to be heard and believed. The two dynamics in the video display how a survivor can feel when they are supported instead of judged and shamed.


The table D3-Immunization houses data on the following columns:
| Columns | Description |
|---|---|
| Immunization_Population | Immunized children aged 19-35 months. |
| Fully_Immunized_43133142 | Number fully immunized. |
| Partially_Immunized_4313314 | Number partially immunized (minus HepA). |
| Partially_Immunized_431331 | Number partially immunized (minus HepA and PCV). |


LSCGROUP
Section: libcgroup Manual (1)Updated: 2009-11-05
Index Return to Main Contents
NAME
lscgroup - list all cgroups
SYNOPSIS
lscgroup [<controllers>:<path>] [...]lscgroup [-h|--help]
DESCRIPTION
The command list all/chosen cgroups.
- <controllers>:<path>
-
defines control groups which subgroups will be shown.
If this parameter is not used then the command
list all cgroups which are present.
SEE ALSO
lssubsys (1), cgcreate (1), cgdelete (1), cgconfig.conf (5)Index
This document was created by man2html, using the manual pages.
Time: 05:29:05 GMT, December 24, 2015


Component: AMQueueEntryP
generic module AMQueueEntryP(am_id_t amId)
Internal AM component that fills in needed packet fields for the AMSend -> Send transformation.
Author:
Philip Levis
Date:
Jan 16 2006
Provides
interface
AMSend
Uses
interface
AMPacket
interface
Send


Upload an OPML file of your subcriptions.
Import your data from Google Reader.
Update your personal details.
You can use the API to export all your data.


Biomedical Image Analysis Library
The Biomedical Image Analysis Library is a poweful tool for developers, physicians, researchers, engineers, and so on.
Main Page
Modules
Namespaces
Classes
Files
Class List
Class Index
Class Hierarchy
Class Members
Class Hierarchy
Go to the textual class hierarchy
Generated by
1.8.11


Tidy Trials
Home
Custom Page
About Us
Current Chore Standings:
Player 1
player1
Player 2
player2
Player 3
player3
Player 4
player4
Chore
day
Chores To Do:
Completed Chores:


◆ EnableHandJointVisualization
| bool Microsoft.MixedReality.Toolkit.Input.MixedRealityHandTrackingProfile.EnableHandJointVisualization |
|
getset |
The hand joint visualization enable/disable state of the current application mode.
If this property is called while in-editor, this will only affect the in-editor settings (i.e. the SupportedApplicationModes.Editor flag of HandJointVisualizationModes). If this property is called while in-player, this will only affect the in-player settings (i.e. the SupportedApplicationModes.Player flag of HandJointVisualizationModes).
◆ EnableHandMeshVisualization
| bool Microsoft.MixedReality.Toolkit.Input.MixedRealityHandTrackingProfile.EnableHandMeshVisualization |
|
getset |
The hand mesh visualization enable/disable state of the current application mode.
If this property is called while in-editor, this will only affect the in-editor settings (i.e. the SupportedApplicationModes.Editor flag of HandMeshVisualizationModes). If this property is called while in-player, this will only affect the in-player settings (i.e. the SupportedApplicationModes.Player flag of HandMeshVisualizationModes).
◆ FingerTipPrefab
| GameObject Microsoft.MixedReality.Toolkit.Input.MixedRealityHandTrackingProfile.FingerTipPrefab |
|
get |
The joint prefab to use for finger tip
◆ HandJointVisualizationModes
◆ HandMeshPrefab
| GameObject Microsoft.MixedReality.Toolkit.Input.MixedRealityHandTrackingProfile.HandMeshPrefab |
|
get |
The hand mesh prefab to use to render the hand
◆ HandMeshVisualizationModes
◆ JointPrefab
| GameObject Microsoft.MixedReality.Toolkit.Input.MixedRealityHandTrackingProfile.JointPrefab |
|
get |
◆ PalmJointPrefab
| GameObject Microsoft.MixedReality.Toolkit.Input.MixedRealityHandTrackingProfile.PalmJointPrefab |
|
get |
The joint prefab to use for palm
The documentation for this class was generated from the following file:


FORTRAN Interface
The Fortran interface for Zoltan is a Fortran 90 interface designed similar
to the Fortran 90 Bindings for OpenGL
[Mitchell]. There is no FORTRAN
77 interface; however, FORTRAN 77 applications can use Zoltan by adding
only a few Fortran 90 statements, which are fully explained in the section
on FORTRAN 77, provided that vendor-specific
extensions are not heavily used in the application. This section describes
how to build the Fortran interface into the Zoltan library, how to call
Zoltan from Fortran applications, and how to compile Fortran applications
that use Zoltan. Note that the capitalization used in this section is for
clarity and need not be adhered to in the application code, since Fortran
is case insensitive.
FORTRAN: Compiling Zoltan
Including the Fortran interface in the Zoltan library requires an additional
option on the autotools configure or
CMake command:
Autotools option: --enable-f90interface
CMake option: -D Zoltan_ENABLE_F90INTERFACE:BOOL=ON
Before compiling the library, make sure that the application's
zoltan_user_data.f90
has been placed in the zoltan/src/fort/ directory, if needed.
FORTRAN: Compiling Applications
To compile a Fortran application using the Zoltan library, the module
information
files must be made available to most compilers during the compilation phase.
Module information files are files generated by the compiler to provide
module information to program units that USE the module. They usually
have suffixes like .mod or .M. The module information files
for the modules in the Zoltan library are located in the include
directory generated during
Zoltan installation.
Most Fortran 90 compilers have a compile line flag to specify directories
to be searched for module information files, typically "-I"; check the
documentation for your compiler. If your compiler does not have such a
flag, you will have to copy the module information files to the directory
of the application (or use symbolic links).
The Fortran interface is built into the same library file as the rest
of Zoltan, which is found during the compiler link phase with -lzoltan.
Thus an example compilation line would be
f90 -I<path to the installation include directory>
application.f90 -lzoltan
FORTRAN API
The Fortran interface for each Zoltan Interface
Function and Application-Registered Query Function
is given along with the C interface. This section contains some general
information about the design and use of the Fortran interface.
Names
All procedure, variable, defined constant and structure names are identical
to those in the C interface, except that in Fortran they are case insensitive
(either upper or lower case letters can be used).
Zoltan module
MODULE zoltan provides access to all entities in Zoltan that are of use
to the application, including kind type parameters, named constants, procedures,
and derived types. Any program unit (e.g., main program, module, external
subroutine) that needs access to an entity from Zoltan must contain the
statement
near the beginning.
Numeric types
The correspondence between Fortran and C numeric types is achieved through
the use of kind type parameters. In most cases, the default kind for a
Fortran type will match the corresponding C type, but this is not guaranteed.
To insure portability of the application code, it is highly recommended
that the following kind type parameters be used in the declaration of all
variables and constants that will be passed to a Zoltan procedure:
| C |
Fortran |
| int |
INTEGER(KIND=Zoltan_INT) |
| float |
REAL(KIND=Zoltan_FLOAT) |
| double |
REAL(KIND=Zoltan_DOUBLE) |
Note that "KIND=" is optional in declaration statements. The kind number
for constants can be attached to the constant, e.g., 1.0_Zoltan_DOUBLE.
Structures
For any struct in the C interface to Zoltan, e.g. Zoltan_Struct,
there is a corresponding derived type in the Fortran interface. Variables
of this type are declared as demonstrated below:
TYPE(Zoltan_Struct) :: zz
In the Fortran interface, the internal components of the derived type are
PRIVATE and not accessible to the application. However, the application
simply passes these variables around, and never needs to access the internal
components.
Global and local IDs
While the C implementation uses arrays of unsigned integers to represent
global and local IDs,
the Fortran interface uses arrays of integers, as unsigned integers are
not available in Fortran. Thus, each ID is represented as an array
(possibly of size 1) of integers. Applications that use other data
types for their IDs can convert between their data types and Zoltan's in
the application-registered query functions.
Query function data
Zoltan_Set_Fn allows
the application to pass a pointer to data that will subsequently be passed
to the query function being registered. From Fortran this is an optional
argument, or can be one of several types. In the simplest cases, an intrinsic
array containing the data will be sufficient. For these cases, data can
be an assumed size array of type INTEGER(Zoltan_INT), REAL(Zoltan_FLOAT) or REAL(Zoltan_DOUBLE).
When the argument is omitted in the call to the registration function, a
data argument will still be passed to the query function. This should be
declared as an assumed size array of type INTEGER(Zoltan_INT) and never used.
For more complicated situations, the application may need to pass data
in a user-defined type. The strong type checking of Fortran does not allow
passing an arbitrary type without modifying the Fortran interface for each
desired type. So the Fortran interface provides a type to be used for this
purpose, Zoltan_User_Data_1. Since different types of data may need
to be passed to different query functions, four such types are provided,
using the numerals 1, 2, 3 and 4 as the last character in the name of the
type. These types are defined by the application in zoltan_user_data.f90.
If not needed, they must be defined, but can be almost empty as in
fort/zoltan_user_data.f90.
The application may use these types in any appropriate way. If desired,
it can define these types to contain the application's data and use the
type throughout the application. But it is anticipated that in most cases,
the desired type already exists in the application, and the Zoltan_User_Data_x
types will be used as "wrapper types," containing one or more pointers
to the existing types. For example,
TYPE mesh
! an existing data type with whatever defines a mesh
END TYPE mesh
TYPE Zoltan_User_Data_2
TYPE(mesh), POINTER :: ptr
END TYPE Zoltan_User_Data_2
The application would then set the pointer to the data before calling Zoltan_Set_Fn:
TYPE(mesh) :: meshdata
TYPE(Zoltan_User_Data_2) :: query_data
TYPE(Zoltan_Struct) :: zz
INTEGER(Zoltan_INT), EXTERNAL :: num_obj_func ! not required for module
procedures
query_data%ptr => meshdata
ierr = Zoltan_Set_Fn(zz,ZOLTAN_NUM_OBJ_FN_TYPE,num_obj_func,query_data)
Note that the existing data type must be available when Zoltan_User_Data_x
is defined. Therefore it must be defined either in zoltan_user_data.f90
or in a module that is compiled before zoltan_user_data.f90 and USEd
by MODULE zoltan_user_data. For an example that uses a wrapper type,
see fdriver/zoltan_user_data.f90.
FORTRAN 77
There is no FORTRAN 77 interface for Zoltan; however, an existing FORTRAN
77 application can be compiled by a Fortran 90 compiler provided it does
not use vendor specific extensions (unless the same extensions are supported
by the Fortran 90 compiler), and the application can use Zoltan's Fortran
90 interface with a minimal amount of Fortran 90 additions. This section
provides details of the Fortran 90 code that must be added.
When building the Zoltan library, use the file
fort/zoltan_user_data.f90 for zoltan_user_data.f90.
This assumes that DATA in a
call to ZOLTAN_SET_FN
is either omitted (you can omit arguments that are labeled OPTIONAL in
the Fortran API) or an array of type INTEGER, REAL or DOUBLE PRECISION
(REAL*4 and REAL*8 might be acceptable). If a more complicated set of data
is required (for example, two arrays), then it should be made available
to the query functions through COMMON blocks.
To get access to the interface, each program unit (main program, subroutine
or function) that calls a Zoltan routine must begin with the statement
and this should be the first statement after the program, subroutine or
function statement (before the declarations).
The pointer to the Zoltan structure returned by ZOLTAN_CREATE
should be declared as
TYPE(ZOLTAN_STRUCT), POINTER :: ZZ
(you can use a name other than ZZ if you wish).
To create the structure, use a pointer assignment statement with the call
to ZOLTAN_CREATE:
Note that the assignment operator is "=>".
If ZZ is used in more than one procedure, then put it in a COMMON block.
It cannot be passed as an argument unless the procedure interfaces are
made "explicit." (Let's not go there.)
The eight import and export arrays passed to ZOLTAN_LB_PARTITION
(and other procedures) must be pointers. They should be declared as, for
example,
INTEGER, POINTER :: IMPORT_GLOBAL_IDS(:)
Note that the double colon after POINTER is required, and the dimension
must be declared as "(:)" with a colon.
Like ZZ, if they are used in more than one procedure, pass them through
a COMMON block, not as an argument.
Except in the unlikely event that the default kinds of intrinsic types
do not match the C intrinsic types, you do not have to use the kind type
parameters Zoltan_INT, etc. It is also not necessary to include the
INTENT attribute in the declarations of the query functions, so they can
be simplified to, for example,
SUBROUTINE GET_OBJ_LIST(DATA, GLOBAL_IDS, LOCAL_IDS, WGT_DIM, OBJ_WGTS,
IERR)
INTEGER DATA(*),GLOBAL_IDS(*),LOCAL_IDS(*),WGT_DIM,IERR
REAL OBJ_WGTS(*)
to be more consistent with a FORTRAN 77 style.
FORTRAN: System-Specific Remarks
System-specific details of the FORTRAN interface are included below.
The mention of specific products, trademarks, or brand names is for
purposes of identification only. Such mention is not to be interpreted
in any way as an endoresement or certification of such products or brands
by the National Institute of Standards and Technology or Sandia National
Laboratories. All trademarks
mentioned herein belong to their respective owners.
MPICH
As of version 1.1.2, the MPICH implementation of MPI is not completely
"Fortran 90 friendly." Only one problem was encountered during our tests:
the reliance on command line arguments. MPICH uses command line arguments
during the start-up process, even if the application does not. Command
line arguments are not standard in Fortran, so although most compilers
offer it as an extension, each compiler has its own method of handling
them. The problem arises when one Fortran compiler is specified during
the build of MPICH and another Fortran compiler is used for the application.
This should not be a problem on systems where there is only one Fortran
compiler, or where multiple Fortran compilers are compatible (for example,
FORTRAN 77 and Fortran 90 compilers from the same vendor). If your program
can get past the call to MPI_Init, then you do not have this problem.
To solve this problem, build MPICH in such a way that it does not include
the routines for iargc and getarg (I have been able to do
this by using the -f95nag flag when configuring MPICH), and then provide
your own versions of them when you link the application. Some versions
of these routines are provided in fdriver/farg_*.
Pacific Sierra
Pacific Sierra Research (PSR) Vastf90 is not currently supported due to
bugs in the compiler with no known workarounds. It is not known when or
if this compiler will be supported.
NASoftware
N.A.Software FortranPlus is not currently supported due to problems with
the query functions. We anticipate that this problem can be overcome, and
support will be added soon.
[Table of Contents |
Next: Zoltan Interface Functions
| Previous: C++ Interface | Privacy and Security]


{% load i18n %} {% block head_title %}{% trans "Sign Out" %}{% endblock %} {% block content %}
UVA was here
{% trans 'Are you sure you want to sign out?' %}


Enhancements to
|
Java Web Start Contents |
jardiff.jar
, jnlp.jar
,
and jnlp-servlet.jar
.
href
parameters).
initial-heap-size
and max-heap-size
arguments to the j2se element; now a java-vm-args
argument has been added. Java Web Start will honor the requests for any normal
java and -X arguments that it considers "safe". A list of all such
arguments will be included with each release so that the JNLP Spec does not
need to change.
|
Copyright © 2004 Sun Microsystems, Inc. All Rights Reserved. |
Java Software |


Hi, and welcome to the homepage on my very own website, where you can view all of my Enspiral Dev Academy Blog Posts.
Below you will find a list of links to my blogs.


The world is just dark and despariging right now, so I decided for something somber yet hopeful.
I wish the world was
a kinder place to be in,where rights were fulfilled.
I really like to game. I enjoy board games, videogames, sports, etc. I currently enjoy frisbee, uno, and apex legends. However, you can always catch me trying new games or playing a large diverse group of video games.
I enjoy watching shows. I don't really discriminate as to what shows I watch as long as I consider them good. I watch anime, cartoons, dramas, reality tv, scifi, you name it.
I also love reading. I have currently 20 ebooks on my phone to ready for the future as of right now on a variety of topics. I enjoy theory, history, fiction, and fantasy the most.
| Monday | Tuesday | Wednsday | Thursday | Friday | |
|---|---|---|---|---|---|
| 11:30 | CS 3240 | CS 3240 | |||
| 12:00 | |||||
| 12:30 | |||||
| 1:00 | ECE 3710 | CS 3250 | ECE 3710 | CS 3250 | |
| 1:30 | |||||
| 2:00 | |||||
| 2:30 | CS 2370 | CS 3270 | CS 2370 | CS 3270 | |
| 3:00 |


Real news costs money
Journalists: Bossman killed the FOIA budget?
Editor demanding investigative work on spec?
Post your needs here.
Readers: Donate time or money to help raise the standard of news reporting. Get credited.
Thanks for your contribution!


Taking navigation to a whole new level!
Find the fastest way around NUS with the real-time bus timings and traffic information!
NUSMaps' comprehensive in-building navigation ensures that you will never be lost in the mountains of NUS again!
Locate nearby amenities with ease! Never search aimlessly for a toilet or water cooler ever again!
Import your NUSMods timetable and enjoy the full experience!


#section("content")
We took a look at your API, and found the use of HTTP response codes to be pretty lazy
We tried to ask for a blog which does not exist and you returned HTTP 500.
Returning a 500 (Server Error) when a resource is not found is not a correct response. You may refer to this list if you are unsure of the correct HTTP response.
This time, find BlogsResource.java
, it contains all the methods you may need to change in this task.
There is a class ErrorMessage
which can be used to return custom error response content.


Gang of Four book¶
It can be hard to remember, but object oriented programming was all the rage back in the roaring 1990s. Instead of talking about the power of first-class functions and general-purpose data structures, many programmers were festooning their code with virtual methods, superclasses, subclasses, and clever mixins. Programmers often found that language limitations and static types were locking them out of improvements they later wanted to make to their code.
The “Gang of Four” rode to the rescue. Their book’s first and most fundamental pattern, blazoned across the page in italics, would — if practiced consistently — break programmers free of code that was hard-wired to concrete classes:
“Program to an interface, not an implementation.”
At the expense of more code, this practice moved programmers one step towards the freedom we enjoy in a dynamic language like Python. Each of the book’s further chapters tackled a different design conundrum posed by the era’s limited programming languages and solved it. Most of the solutions introduced new classes to cleverly decouple code that would otherwise be too tightly linked.
This site examines the old patterns from the Gang of Four in the context of a modern dynamic programming language in which classes and functions are first-class objects, to see which patterns are still useful and which ones disappear. You can start working through the patterns back on this site’s front page.


--- layout: single author_profile: true date: 2016-07-06 header: overlay_image: programming-header.jpg --- {% include base_path %} I have been a part of the games industry for over 20 years, including stints as a QA person for Flight Simulator through Descent and Saints Row. Most of my time has been spent with Volition, both as a programmer and also some time as the studio technical director.
Recently I've wanted to start working on some personal projects in the hope that I can help inspire or teach others. Recently I have been working on an Apple ][ emulator. I started working on the emulator because the Apple ][ was the machne I first started programming on in the early 1980's. Having learned BASIC and some 6502 assembly and having played a ton of games on this machine, I wanted to create the emulator to:


Google Teaches You to Pronounce Difficult Words
by Stephanie MlotThere is no shame in mispronouncing words: Even Benedict Cumberbatch needs help sometimes.
But whether you’ve been mangling “mischievous” or garbing “GIF,” Google’s new experimental pronunciation tool can help.
The function, built directly into Search, lets users practice how to say words.
Previously, queries like “How to pronounce quokka” offered only a brief audio clip.
Now, users can practice saying “quokka” into their handset’s microphone and receive feedback on what, if anything, can be adjusted.
The mobile feature is rolling out in American English first, with Spanish soon to follow.
You can also try it on desktop, where a friendly voice told me how to pronounce “quinoa” in American and British English. (It is disappointingly exactly the same.)
“Studies have shown that practicing how to say a word can be helpful for remembering it, especially when you’re learning a new language,” Tal Snir, senior product manager for Search, wrote in a blog announcement.
Using machine learning, Google can automatically recognize spoken words as individual soundbites, then cross-reference pronunciations.
If you’re practicing the word “asterisk,” for instance, the algorithm analyzes how you said the word and recognizes that the last soundbite was pronounced “rict,” instead of “uhsk.”

Auditory cues are great. But I’m a visual learner, and retain information best when looking at related images. Which is why Google also includes photos for additional context.
Not all words are easily described with a picture, so Google is starting with nouns and plans to expand into more parts of speech.
“Advances in speech recognition and machine learning can improve the way we learn about languages,” Snir said. “We hope these new features give you a creative, more effective way to practice, visualize, and remember new words.”
Keep an ear out for more languages, accents, and regions in the future.
More on Geek.com:


Right-Click on an Custom element Grid Row to open a Context Menu.
Edit
First Name:
Last Name:
Product:
Quantity:
Price:
Save
Cancel
Edit Selected Row
Delete Selected Row


[gecode-users] Branching on temporary variables
Max Ostrowski
ChaosAngel at gmx.de
Tue Jun 14 15:49:48 CEST 2011
Thank you for your quick response.
Just to clarify for me 2.2, if i only use expr(), and the resulting variables in global constraints, then i do not need to branch on any temporary variables to be "complete". Right?
If so, does it give me any improvements?
for example:
IntVarArray temp(2);
temp[0] = expr(a+b);
temp[1] = expr(c+d);
distinct(temp2).
If i now branch on {a,b,c,d} i will find all solutions.
But i could also branch on {a,b,c,d,temp[0],temp[1]} to find all solutions.
Can this be considered "better" in terms of possible complexity, or is there any "experience" from your side that you would recommend to branch on as much or few variables as possible? (while still enumerating all models)
3:
I tried my little experiment now (sorry, i just was too lazy before)
a*b==0 where a\in{0..2} and b\in{0..2} and i do
branch on {a} only.
So i will only get 3 (partial) Solutions:
Answer: 1
a=0 b=[0..2]
Answer: 2
a=1 b=0
Answer: 3
a=2 b=0
So i projected on {a}. But as i now see, i can not be sure if these (partial) solutions can be extended to a complete solution, right ?
(maybe there is no complete solution a=0, i will not know yet)
Best,
Max
-------- Original-Nachricht --------
> Datum: Tue, 14 Jun 2011 15:12:48 +0200
> Von: "Christian Schulte" <cschulte at kth.se>
> An: "\'Max Ostrowski\'" <ChaosAngel at gmx.de>, users at gecode.org
> Betreff: RE: [gecode-users] Branching on temporary variables
> Hi,
>
> 1) Not quite. Instead of var1.post(...) use expr(home, var1) (that is, the
> documented interface not its implementation)
>
> 2)
> 2.1) In principle, of course! However, for all expressions available
> through
> expr() you can be sure that the resulting variables are assigned if all
> variables in the expressions are assigned.
> 2.2) As said, you have to in general.
>
> 3) Do not understand the question but you get 6 solutions as there are six
> solutions!
>
> Christian
>
> --
> Christian Schulte, www.ict.kth.se/~cschulte/
>
>
> -----Original Message-----
> From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf
> Of Max Ostrowski
> Sent: Tuesday, June 14, 2011 10:37 AM
> To: users at gecode.org
> Subject: [gecode-users] Branching on temporary variables
>
> Hello everybody,
>
> i have some expressions (linear and non-linear) stored in a
> "Gecode::LinExpr" object.
>
> Know i want to post a global constraint on them.
>
> So, expressions for example:
> //pseudocode
> LinExpr var1 = a+b*c;
> LinExpr var2 = 4-7
>
> and i want the results of them to be allDifferent (distinct)
>
> IntVarArray z(home,2);
> z[0] = var1.post(home);
> z[1] = var2.post(home);
>
> distinct(home,z);
>
>
> 1: Is this the right way to do this?
> 2: I do branching on the variables a,b,c.
> 2.1: Can it happen that some of the temporary variables z[i] stay
> unassigned (regarding any linear or non-linear expression)?
> 2.2: Does it make an advantage to branch on {a,b,c,z[1..n]} instead of
> {a,b,c} ? Can this decrease complexity, as it is the case with
> conjunctions
> in SAT.
>
> 3: If i post the constraint a*b==0 a\in{0..2} and b\in{0..2} and i do
> branch
> on {a}, do i get 3 or 6 solutions. (So, are my solutions really projected
> on the branching variables?)
>
>
> Thanks a lot in advance,
>
> Max
>
> --
> NEU: FreePhone - kostenlos mobil telefonieren!
> Jetzt informieren: http://www.gmx.net/de/go/freephone
>
> _______________________________________________
> Gecode users mailing list
> users at gecode.org
> https://www.gecode.org/mailman/listinfo/gecode-users
>
--
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de
More information about the users
mailing list


playerunknown's battlegrounds.
OS: 64-bit Windows 7, Windows 8.1, Windows 10. Processor: Intel Core i3-4340 / AMD FX-6300. Memory: 6 GB RAM. Graphics: nVidia GeForce GTX 660 2GB / AMD Radeon HD 7850 2GB. DirectX: Version 11. Network: Broadband Internet connection. Storage: 30 GB available space.
candy crush saga.
Candy Crush Saga is a massively successful, casual puzzle-like game that has spawned two spin-off games and countless copycats.The game itself is incredibly simple, making it a staple time-waster on many people's iPhones and iPads.
plant vs zombie game.
Plants vs Zombies will require Radeon HD 3470 graphics card with a Pentium 4 1.5GHz or Athlon XP 1500+ processor to reach the recommended specs, achieving high graphics setting on 1080p. 512 MB will also be needed to achieve the Plants vs Zombies rec specs and get 60FPS.


Now Loading....
CodeBox
Hide
CodeBox
Connecting...
CodeBox Online
Type & see HTML code result in realtime with your friend.
And This is your Preview Screen.
If you type something on CodeBox, This Text will changed.
Press the Hide button located next to CodeBox to hide the CodeBox window.
 But, You can save it by change something on Server, Like save to File blablabla....


Hundred Meter Wood
Control Variants
Mouse-cursor (best for flat desktop)
Gaze-cursor (terrible...but universally supported)
Voice control
Testing
Stats
Fork me on GitHub


Home
Sales
Shop online
Contact Us
Pat's Salmon Cookies
StoreLocation
Question/Comments:
Daily Sales Reports


::. Link
::. Link
::. Link
::. Link
::. Link
::. Link
::. Link
::. Link
Welcome to Templates911 Free Template #5. This template is another
Free Template we have done. We really don't know what you could use
this for but I guess you will think of something.


Bronx
Hotels
Opera House Hotel
Holiday Inn
Best Western Plus Stadium Inn
Residence Inn
Restaurtants
Moss Cafe
Travesias
Ripe Kitchen & Bar
Hungry Bird
Landmarks
Bronx Zoo
Yankee Stadium
New York Botanical Garden
Wave Hill
Manhattan
Hotels
The Plaza
The St.Regis
Four Seasons Hotel
Algonquin Hotel
Restaurtants
Katz's Delicatessen
Peter Luger
Lombardi's
Keens Steakhouse
Landmarks
Time Square
Statue of Liberty
Empire State Building
One World Observatory
Queens
Hotels
Queens Hotel
Best Western Plus Plaza
Z nyc hotel
Asiatic Hotel
Restaurtants
Casa Enrique
Chingunae Pocha
Yummy Tummy Asian Bistro
Mu Ramen
Landmarks
The Unisphere and the Panorama of NYC
Bohemian Hall and beer Garden
Museum of the moving Image
Queens Botanical Garden
Brooklyn
Hotels
The Williamsburg Hotel
1 Hotel Brooklyn Bridge
The Tillary Hotel
Pod Brooklyn
Restaurtants
Olmsted
Sunday in Brooklyn
Miss Ada
Lilia
Landmarks
Prospect Park
Brooklyn Museum
Brooklyn Bridge
Brooklyn Botanic Garden
Staten Island
Hotels
Hilton Garden Inn New York/Staten Island
Hampton Inn & Suites Staten Island
Holiday Inn Staten Island
Ramada Staten Island
Restaurtants
Beso
Alor Cafe
Denino's Pizzeria Tavern
Jade Island
TLandmarks
Snug Harbor Cutural Center
The National Lighthouse Museum
St. George Theatre
Staten Island Ferry


Particle Simulator
Particle Count:
Reset Environment
Instructions
Create Particles
+1 particle: ←
+3 particles: ↓
+10 particles: ↑
+30 particles: →
Parameters
Gravity:
m/s
Drag:


The PWG meetings will be held on August 11-12, hosted by Sharp at their facilities in Camas, WA.
Please be aware that SLA has moved into the main Sharp building at 5700 Pacific Rim Blvd (see map)
5700 NW Pacific Rim Blvd.
Camas, WA 98607
360-834-8700
Google Map
The PWG meetings will be held in the Columbia River Conference room off the reception area in the Sharp building. As you drive up the driveway to Sharp, the Sharp building is the second building and third parking lot you come to. Enter the lobby and the conference room is off to the right.
There is no registration fee for this meeting.
Please respond to the PWG August 2015 face-to-face meeting survey whether you are planning to attend the meeting in person, by phone, or not at all. This will help us plan for services and make any necessary reservations.
Call-in toll-free number (US/Canada): +1<PHONE_NUMBER>
Call-in toll number (US/Canada): +1<PHONE_NUMBER>
Call-in toll number (US/Canada): +1<PHONE_NUMBER>
Attendee access code: (by request only)
To join the online meeting:
Note:All times are local to the venue.
Discussions at PWG face-to-face meetings are covered by the PWG Policy on Intellectual Property and Confidentiality - basically everything we discuss is non-confidential and can be included in an open standard.
| Date | Times | Description |
|---|---|---|
| August 11 | 9:00 AM to 10:15 AM | Plenary (Slides) |
| 10:15 AM to 10:30 AM | Break | |
| 10:30 AM to 12:00 PM | 3D Printing BOF (Slides · White Paper) | |
| 12:00 PM to 1:30 PM | Lunch | |
| 1:30 PM to 5:00 PM | IPP (Slides · IPP/2.0 · IPP System Service) | |
| August 12 | 9:00 AM to 12:00 PM | Semantic Model (Slides) |
| 12:00 PM to 1:30 PM | Lunch | |
| 1:30 PM to 5:00 PM | IDS (Slides) |
Marriot SpringHill Suites (ask for the Sharp rate)
Heathman Lodge
Lunch will be available for purchase in the Sharp Labs cafeteria and at nearby restaurants, including (aside from the usual fast food places):


{% extends 'layout.html' %} {% block body %}
Browse to select a file to upload
Note: You can only upload one file at a time. If you would like to upload a number of files with the same title, description, etc, (e.g. a collection of related image files for a given practical), you can zip up the files first and upload the zip file. If zipping up the files on a Linux/Unix machine, it is best to use 'zip' rather than e.g. 'tar' to ensure that the trainees can unzip the file on Windows machines. To do this, type at the command line: $ zip my_chosen_name.zip file1 file2 file3 etc, or to zip a directory, type: $ zip -r my_chosen_name.zip dir1. To extract a zip file on Linux, type: $ unzip zip_file_name.zip. If zipping up the files on a Windows machine, right-click in a blank area on your desktop or in explorer, go to 'New', and select "Compressed (zipped) Folder", rename the zip folder as desired, and select and drag your files into the zip folder. To extract a zip file on Windows, right-click on the zip file and select "Extract All..." followed by "Extract".
{% if S3_OR_DBX == 'S3' %}Please select a file
{% endif %} {% from "includes/_formhelpers.html" import render_field %}


--- layout: post title: Extension Methods and null Objects date: 2008-11-06 20:37:29.000000000 +01:00 categories: [] tags: - .NET - C# 3.0 - Extension Methods status: publish type: post published: true meta: {} author: login: admin email<EMAIL_ADDRESS>display_name: Philippe first_name: Philippe last_name: Vlérick excerpt: !ruby/object:Hpricot::Doc options: {} ---
C# 3.0 allows adding new methods to existing types. These are called Extension Methods. This allow programmers to add methods to existing types, even if they are not partial or event sealed.
These special methods have to be declared in a special way:
So, for example, let's copy the very useful IsNullOrEmpty method as an extension method.
public static class Extensions { public static bool IsNullOrEmpty(this String s) { return String.IsNullOrEmpty(s); } }
String s = ""; s.IsNullOrEmpty();
returns true. You can even do
"".IsNullOrEmpty();
which returns true as well.
Now, all of this is actually an illusion. When the compilers finds
"".IsNullOrEmpty();
Extensions.IsNullOrEmpty("");
So, when an extension method is used, there is one more parameter, that is of the type the extension method is defined on. In this case, String.
But, if it as parameter, it can be null, right? Yes!
String s = null; s.IsNullOrEmpty();
or even
((String) null).IsNullOrEmpty()
will both work, without trowing a NullReferenceException.
Nothing revolutionary here, but I found funny to "call" method on a null object and not have an exception raised.


To make a bet:
Caveat
Remember that this is a minority bet system where the party with the lowest staked amount wins.
 So winning in this game requires complex strategies which often leads to big losses.


Vitro Version 1.6. Installation Guide
October 9, 2013This document is a summary of the Vitro installation process.
These instructions assume that you are performing a clean install, starting with an empty database, an empty Vitro home directory, and a Tomcat installation with no Vitro webapp. If you are upgrading a previous installation of Vitro, you may need to adjust your procedure accordingly.
Other servlet containers: If you want to use a servlet container other than Tomcat, please consult instructions for other servlet containers in this directory.
Introduction to the Vitro installation
Before beginning the installation, let’s discuss some of the major concepts relating to the Vitro installation.
Where does Vitro live on your computer?
Vitro exists in four locations on your computer, from the distribution to the runtime to the data storage.
The Vitro distribution directory
This is created when you checkout the Vitro source code (see installation step III, below). This is where you will create your build.properties file (see installation step IV, below), and where you will make any modifications to the Vitro theme or code. You can create this wherever you choose.
Vitro inside Tomcat
When you run the build script to compile and deploy Vitro
(see installation step V, below),
the files will be deployed to a
directory inside Tomcat. This is the actual executing code for Vitro,
but you won’t need to look at it or change it. If you need to change
Vitro, make the changes in the distribution directory, and run the build
script again. Tell the build script where to find Tomcat by setting tomcat.home
in the build.properties file (see installation step IV,
below).
The Vitro home directory
This directory contains the runtime configuration properties for Vitro.
Vitro will also use this area to store some of the data it uses. Uploaded
image files are stored here, and the Solr home directory is stored here also.
You can create this wherever you choose. Tell Vitro where to find the
home directory by setting vitro.home
in the
build.properties file (see installation step IV,
below). You must create this directory before starting Vitro,
you must create the runtime.properties
file in this directory
(see Step VI, below), and you
must ensure that Tomcat has permission to read and write to this
directory when it runs.
The MySQL database
Essentially all of the data that you store in Vitro will be given to MySQL for storage. The actual location of this data depends on what system you have, and on how you install MySQL (see installation step I, below). but you won’t need to know the location. You will access the data through Vitro, or occasionally through the MySQL client application.
The relationship between Vitro and VIVO
“Vitro Inside”
Vitro was developed as a “general-purpose web-based ontology and instance editor with customizable public browsing.” It is useful on its own, but also serves as the basis for several products, including VIVO. [http://sourceforge.net/projects/vivo/]
In 2009, the National Institutes of Health (NIH) awarded a major grant to advance the development of VIVO. Much of the recent development on Vitro has been in support of that grant. However, Vitro retains its own identity, and still serves as the core of many projects and products. Some of these are currently in use, and some are still in the planning stages.
Because VIVO was so well funded, and because it is widely used, someone seeking help with Vitro might find information that applies to VIVO instead. In many cases, that information will apply to Vitro as well. However, there are some notable exceptions:
-
Ontology
Vitro is essentially a blank slate, and is suitable for use with almost any ontology. It is packaged with a minimal ontology, sufficient to run the application itself.
VIVO is packaged with a rich ontology, tailored to scientists and educators.
-
Theme
Vitro and VIVO are each packaged with their own default theme. The VIVO theme is more extensive, since it includes custom pages and custom list views that apply to the VIVO ontology.
-
Visualizations
VIVO includes some rich visualization tools that are specific to the VIVO ontology.
-
Harvester
VIVO includes an RDF Harvester tool for importing data from sources of record. The Harvester may be useful for Vitro as well, but it was developed for VIVO, and may have some dependencies on VIVO.
Release schedule and names
Currently, the Vitro release schedule is coordinated with the VIVO releases, so version 1.6 of Vitro forms the basis of version 1.6 of VIVO. In the Vitro code repository, the release tags illustrate this relationship. For example, the Vitro revision that was tagged for version 1.6 of VIVO is named “rel-vivo-1.6”
Installation process for Version 1.6
This document is a summary of the Vitro installation process.
Steps to Installation
- Install required software
- Create an empty MySQL database
- Check out the Vitro Source Code
- Specify build properties
- Compile and deploy
- Specify runtime properties
- Configure Tomcat
- Start Tomcat
- Log in and add RDF data
- Set the Contact Email Address (if using "Contact Us" form)
- Set up Apache HTTPD
- Using an External Authentication System with Vitro
- Was the installation successful?
- Review the Vitro Terms of Use
I. Install required software
Before installing Vitro, make sure that the following software is installed on the desired machine:
-
Java (SE) 1.7.x http://java.sun.com
- VIVO has not been tested with OpenJDK
- Apache Tomcat 6.x or 7.x http://tomcat.apache.org
- Apache Ant 1.8 or higher, http://ant.apache.org
- MySQL 5.1 or higher, http://www.mysql.com
Be sure to set up the environment variables for JAVA_HOME
and ANT_HOME
and add the executables to your path per
your operating system and installation directions from the software
support websites.
The following browsers are supported for this release
-
Mac:
- Chrome 30.0.1599.69 and above
- FireFox 3.6.28, 10.0.12, 24
- Opera 12.02
- Safari 5.0.3
-
PC:
- Chrome 25.1364.2 and above
- FireFox 10.0.12, 24
- Internet Explorer 8, 9, 10
- Opera 12.02
II. Create an empty MySQL database
Decide on a database name, username, and password. Log into your
MySQL server and create a new database in MySQL that uses UTF-8
encoding
. You will need these values for Step IV when you
configure the deployment properties. At the MySQL command line you can
create the database and user with these commands substituting your
values for dbname
, username
, and password
.
Most
of
the
time, the hostname will equal localhost
.
CREATE DATABASE dbname CHARACTER SET utf8;
Grant access to a database user. For example:
GRANT ALL ON dbname.* TO 'username'@'hostname' IDENTIFIED BY 'password';
Keep track of the database name, username, and password for Step IV.
III. Check out the Vitro Source Code
Download the latest stable release of Vitro from SourceForge: go to
http://sourceforge.net/projects/vivo/files/Vitro%20Application%20Source/and download either
vitro-rel-1.6.zip
or vitro-rel-1.6.tar.gz
If you want the very latest Vitro source, you can use subversion to check it out from SourceForge:
svn checkout svn://svn.code.sf.net/p/vivo/vitro/code/trunk [Vitro_distribution_dir]
IV. Specify build properties
In the webapp/config
directory of the Vitro distribution,
copy the file example.build.properties
to a file named simply build.properties
.
Edit the file to suit your installation, as described in the following table.
These properties are used in compilation and deployment. They will be incorporated into Vitro when it is compiled in Step V. If you want to change these properties at a later date, you will need to stop Tomcat, repeat Step V, and restart Tomcat.
Windows:
For those installing on Windows operating
system, include the windows drive and use the forward slash "/" and not
the back slash "\" in the directory locations, e.g. c:/tomcat
.
| Directory where tomcat is installed. | |
| tomcat.home | /usr/local/tomcat |
| Name of your Vitro application. | |
| webapp.name | vitro |
| Directory where the Vitro application will store the data that it creates. This includes uploaded files (usually images) and the Solr search index. Be sure this directory exists and is writable by the user who the Tomcat service is running as. | |
| vitro.home | /usr/local/vitro/home |
Languages (in addition to American English) that will be built into your
Vitro site. The languages must be found in the
languages directory of the Vitro distribution.
See
the VIVO Wiki for more information.
|
|
| languages.addToBuild | es_MX |
V. Compile and deploy
In Step IV, you defined the location of the VIVO home directory,
by specifying vitro.home
in the build.properties
file.
Create that directory now.
At the command line, change to the webapp
directory inside the Vitro distribution
directory. Then type:
ant all
to build Vitro and deploy to Tomcat's webapps directory.
The build script may run for as much as five minutes, and creates more than 100 lines of output. The process comprises several steps:
- collecting the source files from the distribution directory,
- compiling the Java source code,
- compiling and running unit tests,
- preparing the Solr search engine,
- deploying Vitro and Solr to Tomcat.
The output of the build may include a variety of warning messages. The Java compiler may warn of code that is outdated. Unit tests may produce warning messages, and some tests may be ignored if they do not produce consistent results.
|
BUILD SUCCESSFUL Total time: 1 minute 49 seconds |
If the output ends with a success message, the build was successful. Proceed to the next step.
|
BUILD FAILED Total time: 35 seconds |
If the output ends with a failure message, the build has failed. Find the cause of the failure, fix the problem, and run the script again.
VI. Specify runtime properties
The build process in Step V created a file called example.runtime.properties
in your Vitro home directory (vitro.home
in the build.properties
file).
Rename this file to runtime.properties
, and
edit the file to suit your installation, as described in the following table.
These properties are loaded when Vitro starts up. If you want to change these properties at a later date, you will need to restart Tomcat for them to take effect. You will not need to repeat Step V.
Windows:
For those installing on Windows operating
system, include the windows drive and use the forward slash "/" and not
the back slash "\" in the directory locations, e.g. c:/tomcat
.
External authentication: If you want to use an external authentication system like Shibboleth or CUWebAuth, you will need to set an additional property in this file. See the section below entitled Using an External Authentication System with Vitro.
| Property Name | Example Value |
|---|---|
Default namespace: Vitro installations make their
RDF resources available for harvest using linked data. Requests for RDF
resource URIs redirect to HTML or RDF representations as specified by
the client. To make this possible, Vitro's default namespace must have a
certain structure and begin with the public web address of the Vitro
installation. For example, if the web address of a Vitro installation is
"http://vitro.example.edu/" the default namespace must be set to
"http://vitro.example.edu/individual/" in order to support linked data.
Similarly, if Vitro is installed at "http://www.example.edu/vitro" the
default namespace must be set to
"http://www.example.edu/vitro/individual/"
* The namespace must end with "individual/" (including the trailing slash). |
|
| Vitro.defaultNamespace | http://vitro.mydomain.edu/individual/ |
URL of Solr context used in local Vitro search.
Should consist of:scheme + servername + port + vitro_webapp_name + "solr"In the standard installation, the Solr context will be on the same server as Vitro, and in the same Tomcat instance. The path will be the Vitro webapp.name (specified above) + "solr" |
|
| vitro.local.solr.url | http://localhost:8080/vitrosolr |
| Specify an SMTP host that the application will use for sending e-mail (Optional). If this is left blank, the contact form will be hidden and disabled, and users will not be notified of changes to their accounts. | |
| email.smtpHost | smtp.servername.edu |
| Specify an email address which will appear as the sender in e-mail notifications to users (Optional). If a user replies to the notification, this address will receive the reply. If a user's e-mail address is invalid, this address will receive the error notice. If this is left blank, users will not be notified of changes to their accounts. | |
| email.replyTo |<EMAIL_ADDRESS>|
| Specify the JDBC URL of your database. Change the end of the URL to reflect your database name (if it is not "vitro"). | |
| VitroConnection.DataSource.url | jdbc:mysql://localhost/vitro |
| Change the username to match the authorized user you created in MySQL. | |
| VitroConnection.DataSource.username | username |
| Change the password to match the password you created in MySQL. | |
| VitroConnection.DataSource.password | password |
| Specify the maximum number of active connections in the database connection pool to support the anticipated number of concurrent page requests. | |
| VitroConnection.DataSource.pool.maxActive | 40 |
| Specify the maximum number of database connections that will be allowed to remain idle in the connection pool. Default is 25% of the maximum number of active connections. | |
| VitroConnection.DataSource.pool.maxIdle | 10 |
| Change the dbtype setting to use a database other than MySQL. Otherwise, leave this value unchanged. Possible values are DB2, derby, HSQLDB, H2, MySQL, Oracle, PostgreSQL, and SQLServer. Refer to http://openjena.org/wiki/SDB/Databases_Supported for additional information. | |
| VitroConnection.DataSource.dbtype | MySQL |
| Specify a driver class name to use a database other than MySQL. Otherwise, leave this value unchanged. This JAR file for this driver must be added to the the webapp/lib directory within the vitro.core.dir specified above. | |
| VitroConnection.DataSource.driver | com.mysql.jdbc.Driver |
| Change the validation query used to test database connections only if necessary to use a database other than MySQL. Otherwise, leave this value unchanged. | |
| VitroConnection.DataSource.validationQuery | SELECT 1 |
|
Specify the email address of the root user
account for the Vitro application. This user will have an initial
temporary password of 'rootPassword'. You will be prompted to create a
new password on first login.
NOTE: The root user account has access to all data and all operations in Vitro. Data views may be surprising when logged in as the root user. It is best to create a Site Admin account to use for every day administrative tasks. |
|
| rootUser.emailAddress |<EMAIL_ADDRESS>|
| The URI of a property that can be used to associate an Individual with a user account. When a user logs in with a name that matches the value of this property, the user will be authorized to edit that Individual (the value of the property must be either a String literal or an untyped literal). | |
| selfEditing.idMatchingProperty | http://vitro.mydomain.edu/ns#networkId |
| If an external authentication system like Shibboleth or CUWebAuth is to be used, this property says which HTTP header will contain the user ID from the authentication system. If such a system is not to be used, leave this commented out. | |
| externalAuth.netIdHeaderName | remote_userID |
| Tell Vitro to generate HTTP headers on its responses to facilitate caching the profile pages that it creates. This can improve performance, but it can also result in serving stale data. Default is false if not set. For more information, see the VIVO wiki page: Use HTTP caching to improve performance | |
| http.createCacheHeaders | true |
| Show only the most appropriate data values based on the Accept-Language header supplied by the browser. Default is false if not set. | |
| RDFService.languageFilter | false |
| Force VIVO to use a specific language or Locale instead of those specified by the browser. This affects RDF data retrieved from the model, if RDFService.languageFilter is true. This also affects the text of pages that have been modified to support multiple languages. | |
| languages.forceLocale | en_US |
| A list of supported languages or Locales that the user may choose to use instead of the one specified by the browser. Selection images must be available in the i18n/images directory of the theme. This affects RDF data retrieved from the model, if RDFService.languageFilter is true. This also affects the text of pages that have been modified to support multiple languages. | |
| languages.selectableLocales | en, es, fr_FR |
VII. Configure Tomcat
Set JVM parameters
Vitro may require more memory than that allocated to Tomcat by
default. With most installations of Tomcat, the "setenv.sh" or
"setenv.bat" file in Tomcat's bin directory is a convenient place to
set the memory parameters. If this file does not exist in Tomcat's
bin directory, you can create it.
For example:
export CATALINA_OPTS="-Xms512m -Xmx512m -XX:MaxPermSize=128m"
This sets Tomcat to allocate an initial heap of 512 megabytes, a maximum heap of 512 megabytes, and a PermGen space of 128 megs. Lower values may suffice, especially for small test installations.
If an OutOfMemoryError is encountered during Vitro execution, it can be remedied by increasing the heap parameters and restarting Tomcat.
Set security limits
Vitro is a multithreaded web application that may
require more threads than are permitted under your Linux installation's
default configuration. Ensure that your installation can support the
required number of threads by making the following edits to /etc/security/limits.conf
:
apache hard nproc 400
tomcat6 hard nproc 1500
Set URI encoding
In order for VIVO to correctly handle international characters, you must configure Tomcat to conform to the URI standard by accepting percent-encoded UTF-8.
Edit Tomcat's conf/server.xml
and add the following attribute to each of the
Connector elements: URIEncoding="UTF-8".
<Server ...> <Service ...> <Connector ... URIEncoding="UTF-8"/> ... </Connector> </Service> </Server>
Note: some versions of Tomcat already include this attribute as the default.
Take care when creating Context elements
Each of the webapps in the Vitro distribution (Vitro and Solr) includes a "context fragment" file, containing some of the deployment information for that webapp.
Tomcat allows you to override these context fragments by adding Context elements to "server.xml". If you decide to do this, be sure that your new Context element includes the necessary deployment parameters from the overridden context fragment.
See Section XI below, for an example of overriding the Vitro context fragment.
VIII. Start Tomcat
Most Tomcat installations can be started by running startup.sh
or startup.bat
in Tomcat's bin directory. Point your
browser to "http://localhost:8080/vitro/" to test the application.
On start up Vitro will run some diagnostic tests. If a
problem is detected, the normal Vitro pages will redirect
to a startup status page describing the problem. You
can stop tomcat, attempt to fix the problem and
proceed from Step V. If the problem is not serious, the
startup status page may offer a continue
link which
will allow you to use VIVO in spite of the problems.
If Tomcat does not start up, or the Vitro application is not visible, check
the files in Tomcat's logs
directory. Error messages are commonly found
in catalina.out
or localhost.log
IX. Log in and add RDF data
If the startup was successful, you will see a welcome message
informing you that you have successfully installed Vitro. Click the "Log
in" link near the upper right corner. Log in with the rootUser.emailAddress
you set up in Step IV. The initial password for the root account is
"rootPassword" (without the quotes). On first login, you will be
prompted to select a new password and verify it a second time. When login is
complete, the search index is checked and, if it is empty,
a full index build will be triggered in the background, in order to ensure
complete functionality throughout the site.
After logging in, you will be presented with a menu of editing options. Here you can create OWL classes, object properties, data properties, and configure the display of data. Currently, any classes you wish to make visible on your website must be part of a class group, and there are a number of visibility and display options available for each ontology entity. Vitro comes with a minimal ontology. You will likely want to upload additional ontologies from an RDF file.
Under the "Advanced Data Tools" click "Add/Remove RDF Data." Note that Vitro currently works best with OWL-DL ontologies and has only limited support for pure RDF data. You can enter a URL pointing to the RDF data you wish to load or upload from a file on your local machine. Ensure that the "add RDF" radio button is selected. You will also likely want to check "create classgroups automatically."
Clicking the "Index" tab in the navigation bar at the top right of the page will show a simple index of the knowledge base.
X. Set the Contact Email Address (if using "Contact Us" form)
If you have configured your application to use the "Contact Us"
feature in Step IV (email.smtpHost
), you will also need to
add an email address to the Vitro application. This is the email
to which the contact form will submit. It can be a list server or an
individual's email address.
Log in as a system administrator. Navigate to the "Site Admin" table of contents (link in the right side of the header). Go to "Site Information" (under "Site Configuration"). In the "Site Information Editing Form," enter a functional email address in the field "Contact Email Address" and submit the change.
If you set the email.smtpHost
in Step IV and do NOT
provide an email address in this step, your users will receive a java
error in the interface.
XI. Set up Apache HTTPD
It is recommended to run an Apache HTTPD web server to accept requests and then proxy them to the VIVO Tomcat context. This will make Vitro available at "http://example.com" instead of "http://example.com:8080/vitro". It will also allow the use of external authentication.
Setup HTTPD to send all of the requests that it receives to Tomcat's AJP connector. This can be done in HTTPD 2.x with a simple directive in httpd.conf:
ProxyPass / ajp://localhost:8009/
Modify the <Host> in Tomcat server.xml (located in [tomcat root]/conf/
)
so that the context path is empty to allow VIVO to be servred from the root path.
Locate the <Host name="localhost"...>
directive and update as follows:
<Host name="localhost" appBase="webapps" DeployOnStartup="false" unpackWARs="true" autoDeploy="false" xmlValidation="false" xmlNamespaceAware="false"> <Alias>example.com</Alias> <Context path="" docBase="/usr/local/tomcat/webapps/vitro" reloadable="true" cookies="true" > <Manager pathname="" /> </Context> ...
After setting up the above, it is recommended that you modify the Tomcat AJP connector parameters in server.xml. Look for the <connector> directive and add the following properties:
connectionTimeout="20000" maxThreads="320" keepAliveTimeout="20000"
Note: the value for maxThreads (320) is equal or greater than the value for
MaxClients in the apache's httpd.conf
file.
XII. Using an External Authentication System with Vitro
Vitro can be configured to work with an external authentication system like Shibboleth or CUWebAuth.
Vitro must be accessible only through an Apache HTTP server. The Apache server will be configured to invoke the external authentication system. When the user completes the authentication, the Apache server will pass a network ID to Vitro, to identify the user.
If Vitro has an account for that user, the user will be logged in with the privileges of that account. In the absence of an account, Vitro will try to find a page associated with the user. If such a page is found, the user can log in to edit his own profile information.
Configuring the Apache server
Your institution will provide you with instructions for setting up the external authentication system. The Apache server must be configured to secure a page in Vitro. When a user reaches this secured page, the Apache server will invoke the external authentication system.
For Vitro, this secured page is named: /loginExternalAuthReturn
When your instructions call for the location of the secured page, this is the value you should use.
Configuring Vitro
To enable external authentication, Vitro requires three values in
the runtime.properties
file.
-
The name of the HTTP header that will hold the external user's network ID.
When a user completes the authentication process, the Apache server will put the user's network ID into one of the headers of the HTTP request. The instructions from your institution should tell you which header is used for this purpose.
You need to tell Vitro the name of that HTTP header. Insert a line like this in the runtime.properties file:
externalAuth.netIdHeaderName = [the header name]
For example:
externalAuth.netIdHeaderName = remote_userID
-
The text for the Login button.
To start the authentication process, the user will click on a button in the Vitro login form. You need to tell Vitro what text should appear in that button.In your theme, add a line to the
all.properties
file, like this one:external_login_text = [the text for your login button]
For example:external_login_text = Log in using BearCat Shibboleth
The Vitro login form will display a button labelled "Log in using BearCat Shibboleth".If your site supports additional languages, add lines to the corresponding files. For example,
all_es.properties
might contain this line:external_login_text = Entrar usando Shibboleth GatoOso
-
Associating a User with a profile page.
Vitro will try to associate the user with a profile page, so the user may edit his own profile data. Vitro will search the data model for a person with a property that matches the User’s network ID (the value of the property must be either a String literal or an untyped literal). You need to tell Vitro what property should be used for matching. Insert a line like this in the runtime.properties file:
selfEditing.idMatchingProperty = [the URI of the property]
For example:
selfEditing.idMatchingProperty = http://vitro.mydomain.edu/ns#networkId
XIII. Was the installation successful?
If you have completed the previous steps, you have good indications that the installation was successful.
- Step VIII showed that Tomcat recognized the webapp, and that the webapp was able to present the initial page.
- Step IX verified that you can log in to the administrator account.
Step VIII also shows that the Vitro self-tests ran successfully. When Tomcat starts the Vitro webapp, it runs several tests. If any of these tests produce warnings or error message, you would see them instead of the Vitro home page.
Among other things, the self-tests check
- The Vitro home directory exists and Vitro can write to it.
- Vitro can connect to the database.
- Vitro can connect to the Solr search application.
XIV. Review the Vitro Terms of Use
Vitro comes with a "Terms of Use" statement linked from the footer. The "Site Name" you assign in the "Site Information" form under the Site Admin area will be inserted into the "Terms of Use" statement. If you want to edit the text content more than just the "Site Name", the file can be found here:
[vitro_source_dir]/webapp/web/templates/freemarker/body/termsOfUse.ftl
Your "Terms of Use" statement is also referenced in the Linked Open Data (RDF) that your site produces, so you should be sure that it accurately reflects the way that your data may be used.
Be sure to make the changes in your source files and deploy them to your tomcat so you don't lose your changes next time you deploy for another reason.
Next Steps
For more information about Vitro see the Vitro public website. In addition, you may find helpful information in the VIVO Site Administrator's Guide.
Send questions or comments to Vitro developers and designers at vivo-dev-all@lists.sourceforge.net.


--- products: new: limit: {{theme_settings.homepage_new_products_count}} featured: limit: {{theme_settings.homepage_featured_products_count}} top_sellers: limit: {{theme_settings.homepage_top_products_count}} carousel: {{theme_settings.homepage_show_carousel}} blog: recent_posts: limit: {{theme_settings.homepage_blog_posts_count}} --- {{#partial "hero"}} {{{snippet 'home_content'}}} {{/partial}} {{#partial "page"}} {{#each shipping_messages}} {{> components/common/alert-info message}} {{/each}}


Bonduelle salads recalled due to possible E. coli contamination
OTTAWA - The Canadian Food Inspection Agency says some Bonduelle brand salads are being recalled due to possible E. coli contamination.
The products involved include Bonduelle's Caesar Salad with Chicken and Bacon, Chef Inspired Salad with Turkey & Ham, Cobb Salad with Turkey & Bacon and Santa Fe Style Salad with Chicken.
They were sold in Ontario, Quebec, New Brunswick and possibly other provinces and territories, and have best before dates of either Oct. 29 or Oct. 31, 2019.
The salads in question should either be thrown out or returned to the store where they were purchased.
So far there have been no reports of any illnesses linked to the products.
This report by The Canadian Press was first published on Nov. 23, 2019.


J. Cole teases new album ‘The Fall Off’ with 2020 release date
It will be the rapper's sixth studio
J. Cole has teased that he will be releasing a new album titled ‘The Fall Off’ some time next year.
- Read more: J. Cole – ‘KOD’ review
Sharing the news during his headline performance at the Day N Vegas festival in Las Vegas last night (November 1), it will be Cole’ sixth studio album and follows 2018’s ‘KOD’.
Topping a bill that also featured Miguel, Lil Uzi Vert, Juice WRLD and 6LACK, Cole brought out Dreamville signees Bas, J.I.D., EarthGang and Cozz, which enabled him to debut songs from his ‘Revenge of the Dreamers III’ compilation live for the first time.
During the show, a parody campaign video popped up on the screen. Featuring the message: “Fuck them taxes,” the video ended by saying, “Make your voice heard. Vote for The Fall Off 2020.”
The crowd were also given posters to wave bearing ‘The Fall Off 2020’ graphics.
See the clip below:
Meanwhile, J. Cole has seemingly announced that he will not be making any more guest appearances on music by other artists following his recent feature on the new Gang Starr track ‘Family and Loyalty’.
The North Carolina rapper contributed vocals to the resurrected New York group’s first new song in 16 years. The track, which came out last month, primarily features posthumous vocals from MC Guru, who died in April 2010.


"Looking for a quality tattoo
artist?”
Contact us
0774602165
Nirmal is an individual descending from an artistic family; ha has oriented to the field of arts and crafts while he was schooling and he has already being having an interest of tattoo arts. The intimacy and the liveliness of the tattoos had lead Nirmal’s desire to have an enhancement on the interest. The engraved likeness has grown as a skill and the best practice has created the professionalism.
Gallery


This internship was broken into two halves.
For the first half, I worked with the domestic ETFs team, improving the performance of some
heavily used tools. This involved re-architecting one tool from a pull-based approach to a service which
kept it's data fresh and pushed updates to clients. This approach, in combination with some
caching, improved performance by over 50% for typical use cases.
During the second half, I worked on one of the systems powering options trading. My
project dramtically improved the latency of specific order types by enabling us to
prioritize/differentiate between them.
My initial project improved Nuro's machine learning pipelines by moving image building (i.e.
building docker images for each stages of the pipeline, such as data cleaning or TensorRT) from dev
machines onto remote workers. This project improved performance by both leveraging a shared cache for
everyone's builds and distributing the work across multiple remote machines. This was built on top of
Apache Airflow.
My next project involved improving the latency of one of Nuro's range-image-based models to enable them
to
run this model onboard the bots as part of a latecy-sensitive step. To accomplish this, I used
quantization aware training, taking advantage of TF2's QAT tools.
I
designed and ran several experiments to select the best latency/training time/accuracy tradeoff for our
use case.
I primarily spent my time working on the USB stack of a new operating system. I built it's first
standalone USB class driver. This required building the foundations in our xHCI driver and adding IPC
APIs
for the class drivers to use. My driver enabled Serial over USB, which allowed application developers to
attach debuggers to their boards without taking up the physical serial port (which was required for
other
purposes, e.g. kernel logs and control). My driver also served as a reference for a functioning
standalone
USB driver, which my teammates have been using as an example to build other drivers based on.
I also took a computer vision course, where I learned about computer vision/deep learning basics and
completed a couple of assignments using PyTorch.
My main project focussed on building a cache for real-time ads updates in Google Search. The first part involved building a couple of Cloud Dataflow pipelines for all the data that wasn't change-tracked (think of Cloud Dataflow as a managed, higher-level abstraction of MapReduce concepts). I improved the runtime of these pipelines by over 25% by optimizing the SQL queries (this involved matching join keys to indeces, combining queries, using native materialization into protos and a variety of other techniques). Then, I built a couple of microservices to update our cache by subscribing to change-tracked data via several Pub/Sub queues. This improved the average data freshness in our cache from over 30 minutes to under 1 second.
Member of core backend team for Enterprise Commerce (SAP Commerce Cloud). Worked on API modernization and monolith decomposition. Proposed, owned, and developed a new express checkout flow reducing checkout time by 70%.
Worked on partner team building third-party integrations into the app. Developed an advertisement pushing service reaching 10 million daily users. Built an automated contest generation platform for partners. Since launch, their contests have had over 200 thousand participants.
Founding member of a startup enabling small grocery businesses to take part in the digital grocery revolution. Built an Android app for customer and investor demos in 4 weeks, resulting in $30 000 of investment and 2 stores signing on. Check out our website here!
Worked on the team developing the york.ca website. Created an employee forum using WebSphere APIs for authentication and data storage. Built several web widgets using third-party APIs for a portal used by over 2000 employees.
Relevant courses:
A Google Assistant Action that saves your thoughts/conversation topics in a stack so you could remember them for later!
javascript google-assistant cloud-functionsGenerates videos following people using People Pathing from AWS Rekognition and the OpenShot Cloud API for video editing. It's currently being used to track people in choreographies.  Contains benchmarks created using Go channels to compare HTTP/2 request multiplexing to HTTP/1.1 pipelining. Used a Job/Worker pattern with a controlled thread pool size to find the optimal amount of concurrent requests.
grpc rest networking concurrency goBuilt prior to the USDA having their own searchable database, this Java API parses through the 100 000+ foods and associated nutrient information available in their database data dumps. Uses a purpose-built balanced binary tree and weighted searching algorithm to return the most relevant results super fast. Fun fact: everything used here was built from scratch (searching, balanced binary trees, priority queues, linked lists)!
java custom-datastructures searchCollabaorative IDE for developers (similar idea to Google Docs, but it's an IDE). Supports compiling, syntax highlighting, debugging, file history, and more! Text modification inspired by Operational Transformation.
java sqlite tcp/ip operational-transformationCombines a DDR board built using conductive plates, pull-up resistors and an Arduino with a DDR-inspired game built using Unity. Linked up the arduino and game using a serial port.
c# c++ unity arduinoContains both the dealer and server for hosting hundreds of concurrent Blackjack games.  During the warmer months, I enjoy mountain biking, camping, canoeing, playing soccer and just appreciating the outdoors. When it gets colder, I love to go snowboarding, hiking, and enjoy the snow in all ways possible. I also really love driving (especially on (very) long road trips) and I'm always looking for new friends to go on adventures with!
I spend a significant amount of time thinking about my career and the impact I want to have on the world. Some topics of interest to me are AR/VR and education. I believe AR glasses (or some form of a semi-permanent display in our vision) are the future of consumer technology and plan to be a part of that revolution at some point. I also believe that a good education (e.g. passionate teachers, access to extra curricular activities) is (one of) the most important things in life. I'm forever grateful for the wonderful education I recieved growing up (thanks parents (and Canada)). I hope to make this experience more accesible for everyone in the future.
I also spend many of my nights reading about whatever seems interesting. Some particular topics that I've read a lot about are karting, investing, productivity, and software development. I (occasionally) maintain a list of books I've read on goodreads.


class: top, left, inverse, title-slide # Education & Globalization ## Session 14 ### Dr. Zhou Yisu 周憶粟 ### 2018/10/08 --- ## About presentation .pull-left[ .green[What am I looking for?] - A __story__ told through the lens of globalization - _Key points_: use the concepts, finding, or theory taught in this course to construct your story. .green[Why can't we just send you a ppt?] - Because I want to hear your voices. .green[Format:] .violet[video]. - 10 min in length, no more than 15 min - You can either + Record using your cellphone + Capture a screen with narration (For example session 9) - mark contribution of each member (i.e. role, the percentage of work) - upload _twice_ to Moodle (one for me and one for your peers), 10/11 - 10/20 ] -- .pull-right[ .green[Should we all speak in the presentation? In what order?] - It is entirely up to you for the division of labor - You don't necessarily all need to "talk": + collect source materials + write the script + recording + editing + narration .green[Grading will be based on:] - Relevance of the topic to globalization & related processes (.red[+]) - Analysis: theories, data, explanation (.red[+]) - Coherence of the story & narration (.red[+]) - ENGAGE your audience (.red[+]) - .red[20 pts] from presentation + .red[10 pts] from giving feedbacks - Bonus points: production value (i.e. lighting, effects, editing, etc) ] --- # Global inequality ## Aims 1. How does globalization affect the top 1%? 2. What might be the causes and consequences for the rest of us? --- ## A peak into the life of the super rich  --- ## Is Crazy Rich Asians a coincidence? ![](https://hbr.org/resources/images/article_assets/2016/05/W160429_MILANOVIC_WHOHAS-700x535.png) --- ## Global inequality is .brown[both] rising and falling, depending on where you look Branko Milanovic writes.red[1]: >And although our data for the past are quite tentative and in some cases not much better than guesses, .violet[it is still the first time since 1820 that global inequality is deemed to have gone down, from approximately 69 Gini points to around 64]. (On the Gini scale, 100 would be complete inequality while 0 would be complete equality). -- However, another somewhat paradoxical pattern also exists: >In most countries, and especially in the big ones like China, India, the United States, and Russia, .violet[national inequalities have risen]. .footnote[[1] https://hbr.org/2016/05/why-the-global-1-and-the-asian-middle-class-have-gained-the-most-from-globalization]  --- ### The rise of the super rich: the U.S. as a case ![:wscale 75%](https://cdn.theatlantic.com/static/mt/assets/business/p3.png) --- background-image: url(https://www.valuewalk.com/wp-content/uploads/2014/10/Wealth-Inequality-1.jpg) background-size: contain --- ### How much money are we talking about? ![](https://cdn.theatlantic.com/assets/media/img/posts/Screen%20Shot%202014-03-29%20at%209.23.25%20PM.png) --- background-image: url(https://www.valuewalk.com/wp-content/uploads/2014/10/Wealth-Inequality-2.jpg) background-size: contain --- class: inverse, middle center ## The global super rich (top 1% and 0.1%) reaped unproportional benefits from globalization and economic growth, and -- ### 1) there is no sign of them slowing down ### 2) there (maybe) less and less a chance the rest could catch up --- ## How did the global top 1% achieve that? The super rich are called ".red[plutocrats]" and the situation we are facing today is called .red[plutocracy] (金權政治): a society that is ruled or controlled by people of great wealth -- What drives their success? Social scientists came up with two explanations: __Political factors:__ - Lower taxes for the rich - Deregulation of certain industries (i.e. make it easy for business to enter; less rules) - Financialization of everything (i.e. no matter what the physical product is, people can build financial products on top of it) - Privatization - Weaker protection for labor unions -- People called such political influence .red[crony capitalism] 裙帶資本主義, in which .green["businesses thrive not as a result of risk, but rather as a return on money amassed through a nexus between a business class and the political class."] (via wikipedia) --- ## A similar saying in Chinese: .violet[識做人緊要過識讀書] ### (aka "what matters is who you know, not what you know") -- Political changes benefit a group of .green[insiders] who are well connected that don't do much good for the rest of the little guys. It is very hard to get rid of crony capitalism. Not single country, nor companies (some even have a motto called: "don't do evil") can say they did that: --- background-image: url(https://cdn.static-economist.com/sites/default/files/images/print-edition/20160507_IRC277.png) background-size: contain --- class: inverse, middle center ## But at least, intellectually, we can pretty much agree that such thing is bad for us all. Crony capitalism is often associated with corruption and corruption is bad for the society --- ### Therefore throughout the political spectrum, both the left and the right seem both hate it .pull-left[ ![](https://cdn-images-1.medium.com/max/1600/1*8iDeG1FyW1-9sQtIqn3Jkw.jpeg) Political left: socialist/marxist, anarchist 無政府主義者, social democrats 社會民主主義者, liberals 政治自由主義者 ] .pull-right[ ![](https://www.brookings.edu/wp-content/uploads/2016/11/gs_20161109_tea-party.jpg) Political right: libertarian 自由意志主義者, conservatist 政治保守主義者 ] --- ### In China as well .pull-left[ ![](https://cdn2.i-scmp.com/sites/default/files/styles/980x551/public/images/methode/2018/08/10/2dfd650e-9af5-11e8-9a20-262028f49e8a_1280x720_212455.JPG) ] .pull-right[ ![](https://www.civicparty.hk/sites/default/files/110409_cpnews.jpg?1313998363) ] --- class: middle, center ## But people's attitude is much varying when we look at the second explanation: .violet[Globalization] + .violet[Technology revolution] --- ### Why? Because they are two sides of a single coin. According to Canada's Foreign Minister, Chrystia Freeland: .red[2] > Globalization and the technology revolution, the twin economic transformations which are changing our lives and transforming the global economy, are also powering the rise of the super rich. -- ### Globalization & technology revolution brought economic growth for many .violet[at the same time] award much much more to the small handful. They polarize 兩極分化 our world: For the first time in human history, any entrepreneurs could quickly: - Access to a unified market with at least 1 billion consumers - Access to capital market across countries (i.e. Hong Kong, New York, Shanghai, etc) .footnote[ [2] https://www.ted.com/talks/chrystia_freeland_the_rise_of_the_new_global_super_rich] --- .pull-left[ Example: So if you are very very smart + very very lucky, you can become a billionaire at age 26 ![:wscale 90%](http://blog.crismanphoto.com/wp-content/uploads/crisman_david_karp_tumblr_wired_0131-590x790.jpg) ] -- .pull-right[In short: _The superstars just got supersized_. In fact, the return of success becomes so big in every field of work: - superstar athlete - superstar chefs - superstar psychologists - even [superstar dentist](https://tmagazine.blogs.nytimes.com/2011/08/10/drill-bebe-drill/) - ... ] --- ## What's wrong about being super good at doing something? -- Chrystia Freeland lays out 3 implications: 1. Meritocratic plutocracy can become .red[crony capitalism] + meritoratic: one's achievement is based on talent or effort. Chinese translation would be 唯才是用 or 選賢舉能 + It will be very tempting to "change the game" (i.e. manipulate the social/political process) in your favor. -- 2. Meritocratic plutocracy can become .red[aristocracy] 世襲制 + How today's middle & upper class spent crazy amount of money on their children for the important skills that make them successful + It is what at top that matters: Harvard, Stanford and MIT -- 3. Globalization also .red[hollowing out] 空心化 the middle class in Western industrialized economics. + Outsourcing + Technology replacing human labor (i.e. deskilling) --- ## Changing the rules of the game in your own favor (at other's expase) ![](https://cdn3.i-scmp.com/sites/default/files/styles/980x551/public/2013/01/02/scmp_03aug09_ns_protest3_dw8_2628_10887993.jpg?itok=zSKnglus) .footnote[Source: https://www.scmp.com/business/money/investment-products/article/1117762/mis-selling-financial-products] --- ## Legacy admission in elite universities: How New Money becomes Old Money Remember what does Rachel (from Crazy Rich Asians) do for a living? ![](https://hilite.org/wp-content/uploads/2012/04/w.chu_.legacies.4.27-900x464.jpg) --- background-image: url(http://cdn.static-economist.com/sites/default/files/cf_images/images-magazine/2016/10/22/BR/20161022_BRD001_facebook.jpg) background-size: contain background-position: bottom ### Will the elites block the social mobility ladder once they are up there? --- ### The consequence of inequality: The higher the equality, the lower the social mobility _The Great Gatsby curve_ by Alan Krueger: it describes the relationship between inequality and generational earnings mobility. ![:wscale 65%](https://milescorak.files.wordpress.com/2017/06/great-gatsby-curve-22-countries-for-world-bank.png) --- ## What about the rest of us? Individual labor is losing out (on average) .pull-left[ ![](https://blogs.imf.org/wp-content/uploads/2017/04/imf-weochap3-apr2017_chart1.jpg) ] .pull-right[ [According to IMF](https://blogs.imf.org/2017/04/12/drivers-of-declining-labor-share-of-income/): >"Labor’s share of income declines when wages grow more slowly than productivity, or the amount of output per hour of work. .violet[The result is that a growing fraction of productivity gains has been going to capital.] And since capital tends to be concentrated in the upper ends of the income distribution, falling labor income shares are likely to raise income inequality." In short: __it is easier to make more money when you have money__. ] ---  Link: https://www.facebook.com/VoxBorders/videos/1830691150360632/ -- According to Oxfam: .kt[過去十年間，香港極端的貧富懸殊問題愈來愈嚴重，原住戶收入的堅尼系數由 2006年的0.533上升至2016年的0.539，是45年來最高。在計算除稅後及福 利轉移後住戶收入的堅尼系數為0.473，情況較主要已發展經濟體(如新加坡 0.356、美國0.391、英國0.351、澳洲0.337及加拿大0.318)惡劣。比較本港 最富裕一成及最貧窮一成住戶月入差距，也由2006年的34倍擴大到2016年 的44倍。香港貧窮家庭數目高達53萬戶，當中約30多萬戶屬於在職貧窮，貧 窮人口超過130萬人。.cyan[2018年5月，全港首21位超級富豪的資產，相當於香 港政府可動用的財政儲備總額1.83萬億港元。].violet[可是，超級富豪旗下企業的須繳付的利得稅率，現時16.5%的水平已遠低於經合組織成員及G20國家平均稅率 (24.2%及28%)，更甚的，這群富豪同時收取至少230億元的股息，卻不用繳納任何稅款。]] --- ## Maybe in the not far future, the only means we can use to move ahead is fantasy ![:wscale 90%](https://www.gannett-cdn.com/presto/2018/08/11/USAT/a1f16b8e-492e-4767-8764-c216303e94a8-CRA-01160r.jpg?crop=6719,3779,x0,y0&width=3200&height=1680&fit=bounds) --- class: middle ### "A fantastic montage of the globalized good life, and a tale of star-crossed lovers recast in the imperium of modern Asia, where everything is so beguilingly glamorous that not even its own inhabitants can believe their own good luck. It is, intentionally, too good to be true, because the subculture of Asia's ultra-rich is alien to most Asians and non-Asians alike." Intentionally apolitical, fairy tale. .footnote[Source: https://www.nbcnews.com/think/opinion/crazy-rich-asians-charming-indulgence-frustratingly-apolitical-ncna901631] --- ## What does inequality do<EMAIL_ADDRESS>--- ## Richard Wilkinson's research demonstrated that inequality impact: .pull-left[ .violet[Social Relations] - Child conflict - Homicide - Imprisonment - Social capital - Trust .violet[Health] - Drug abuse - Infant mortality - Life expectancy - Mental illness - Obesity ] .pull-right[ .violet[Human Capital] - Child wellbeing - High school dropout rate - Math & Literacy test scores - Social Mobility - Teenage births ] --- class: middle, center ## If inequality is so bad, what should we do to tame it? --- background-image: url(https://static01.nyt.com/images/2018/04/02/opinion/paul-krugman/paul-krugman-videoSixteenByNineJumbo1600.png) background-position: left ## According to Economist Paul Krugman ### .red[T]echnology ### .red[O]penness ### .red[P]olicy -- .pull-left[ - Smaller income gap as policy target - Redistribution of income - Minimum wage for the poor - Encourage unionization 公會 to increase the bargaining power of the labor - Cash transfer to the poor ] --- ## .red[Summary] Globalization has brought reduced global inequality but increased national inequality. Within country inequality could be attribute to: 1) political factors; 2) globalization + technology innovation While both are hard to curb, morally and intellectually, people often find it hard to resist globalization and tech innovation because it both brings economic development. Will we be able to find a way to share the fruits of economic development (in a nonviolent way)? People like Paul Krugman believes yes. He believes that pro-equality social policies are necessary. --- ## Resources - What is the great Gatsby Curve?: https://milescorak.com/2012/01/12/here-is-the-source-for-the-great-gatsby-curve-in-the-alan-krueger-speech-at-the-center-for-american-progress/ - How economic inequality harms societies? by Richard Wilkinson https://www.youtube.com/watch?v=cZ7LzE3u7Bw - Conversation with Paul Krugman, Branko Milanovic, and Janet Gornick https://www.youtube.com/watch?v=76FsIlO06Xs - Oxfam's Hong Kong Inequality Report 2018 (Chinese): https://www.oxfam.org.hk/content/98/content_38422tc.pdf


deeplinks.js
e2e testThis text has bold and italic text in it! How exciting.
我是少量的統一碼 💚💙💜🧡💛💚💙💜🧡💛💚💙💜🧡
🐢🐢🐢
Normally screws are so cheap and small and simple you think of them as unimportant.
Right now this screw is worth exactly the selling price of the whole motorcycle, because the motorcycle is actually valueless until you get the screw out.
With this reevaluation of the screw comes a willingness to expand your knowledge of it.
test test test
uh oh
identical text nodes
identical text nodes?
identical text nodes
identical text nodes?
identical text nodes
identical text nodes?
identical text nodes
identical text nodes?
identical text nodes
identical text nodes
identical text nodes
identical text nodes
identical text nodes
identical text nodes
identical text nodes
identical text nodes
identical text nodes
identical text nodes
identical text nodes
identical text nodes
identical text nodes?
hmmm


Section 7 Capstone Project
The stone placed at the very top of an archway which holds the rest of the arch in place is known as the capstone.
You, and a partner if you choose, will complete a complex robotics project using everything you have learned this year.
Overview:
Each group/person must design, build, test, and demonstrate a device controlled by one or more microcontrollers (e.g. Arduino, Raspberry Pi, ESP 8266, etc.). The device should have functioning elements in all five categories listed below. The device will be rated (graded) based on the level of functionality achieved in each category. There will also be grading adjustments for qualitative attributes.
You are allowed to use circuits and code you find on the Internet or in other books, but make sure you have a full understanding of what the code or circuit does. You should also “add value” to what you use by incorporating it into your system creatively and effectively. Also, make sure you cite in your report, your poster and in your final code sketches any sources of any code or circuits you use.
The materials used for this project must meet the following requirements:- Any materials from the Arduino Super Starter kit for class may be used including sensors, motors, wires, lights, displays and resistive devices
- Any approved components available in the lab (i.e. sensors on loan, stepper motors, structural parts, etc.)
- Up to 200g of ABS filament (for entire project, including prototypes).
- Up to $75 in pre-approved student purchased parts (per project, not per student). It is up to the student to order these components although I will help you find them, if needed. Be careful here, qualitative deductions will be made for expensive and/or unnecessary component selection (i.e. using a Raspberry Pi where an Arduino UNO will work, etc.)
NOTE - the choice of your project concept could have a large impact on the grade you receive; so please evaluate your alternative concepts carefully, based on the grading criteria below.
Each of you will receive a detailed set of instructions for this project.


Anthony Robbers is a programmer with a grounding in Python, C++, and a few other minor languages as well as a solid introduction to JAVA, HTML, and several more. He is interested in machine learning, database management, robotics, and engineering applications.
Anthony's Personal interest include space exploitation, SpaceX, exoskeletons, fictional worlds, crossover fanfiction, futurism, and strategy games.