--- layout: post title: How to Create a Local Ubuntu Repository date: 2012-08-09 02:49:00 summary: We have about 40 computers installed with Edubuntu, and more than a dozen of servers (most of them running on virtual machines). They all need to be updated time after time with the latest version of packages. Also, time after time, new packages need to be installed. These packages come from some central Ubuntu Repository servers. All this activity for keeping computers up-to-date (up to the latest version) consumes lots of bandwidth and takes a lot of time. And there are new package updates almost every day! For one computer this can be acceptable, however for lots of computers it may become unbearable. One solution for this problem is to create a local mirror of the ubuntu repository. tags: [Ubuntu, local apt repository, system administration] ---
We have about 40 computers installed with Edubuntu, and more than a dozen of servers (most of them running on virtual machines). They all need to be updated time after time with the latest version of packages. Also, time after time, new packages need to be installed. These packages come from some central Ubuntu Repository servers.
All this activity for keeping computers up-to-date (up to the latest version) consumes lots of bandwidth and takes a lot of time. And there are new package updates almost every day! For one computer this can be acceptable, however for lots of computers it may become unbearable.
One solution for this problem is to create a local mirror of the ubuntu repository.
Fortunately, creating a local mirror of the APT packages is very
easy. There is even a tool that helps to create it, called
apt-mirror
. So, the first step is to install it:
aptitude install apt-mirror
The next step is to customize its configuration file,
/etc/apt/mirror.list
. It should look like this:
set base_path /data/apt-mirror set defaultarch amd64 set nthreads 5 deb http://archive.ubuntu.com/ubuntu precise main restricted universe multiverse deb http://archive.ubuntu.com/ubuntu precise-updates main restricted universe multiverse deb http://archive.ubuntu.com/ubuntu precise-backports main restricted universe multiverse deb http://archive.ubuntu.com/ubuntu precise-proposed main restricted universe multiverse deb-i386 http://archive.ubuntu.com/ubuntu precise main restricted universe multiverse deb-i386 http://archive.ubuntu.com/ubuntu precise-updates main restricted universe multiverse deb-i386 http://archive.ubuntu.com/ubuntu precise-backports main restricted universe multiverse deb-i386 http://archive.ubuntu.com/ubuntu precise-proposed main restricted universe multiverse deb http://security.ubuntu.com/ubuntu precise-security main restricted universe multiverse deb http://archive.canonical.com/ubuntu precise partner deb http://extras.ubuntu.com/ubuntu precise main deb-i386 http://security.ubuntu.com/ubuntu precise-security main restricted universe multiverse deb-i386 http://archive.canonical.com/ubuntu precise partner deb-i386 http://extras.ubuntu.com/ubuntu precise main deb http://dl.google.com/linux/chrome/deb/ stable main deb http://packages.medibuntu.org/ precise free non-free deb http://ppa.launchpad.net/epoptes/ppa/ubuntu precise main deb http://ppa.launchpad.net/loneowais/gmailwatcher.dev/ubuntu precise main deb http://ppa.launchpad.net/webupd8team/gnome3/ubuntu precise main deb-i386 http://packages.medibuntu.org/ precise free non-free deb-i386 http://ppa.launchpad.net/epoptes/ppa/ubuntu precise main deb-i386 http://ppa.launchpad.net/loneowais/gmailwatcher.dev/ubuntu precise main deb-i386 http://ppa.launchpad.net/webupd8team/gnome3/ubuntu precise main #deb-src http://archive.ubuntu.com/ubuntu precise main restricted universe multiverse #deb-src http://archive.ubuntu.com/ubuntu precise-updates main restricted universe multiverse #deb-src http://archive.ubuntu.com/ubuntu precise-backports main restricted universe multiverse #deb-src http://archive.ubuntu.com/ubuntu precise-proposed main restricted universe multiverse #deb-src http://archive.ubuntu.com/ubuntu precise-security main restricted universe multiverse #deb-src http://archive.canonical.com/ubuntu precise partner #deb-src http://extras.ubuntu.com/ubuntu precise main #deb-src http://archive.canoniccom/ubuntu precise partner clean http://archive.ubuntu.com/ubuntu
The URL-s here are the same to what I have on
/etc/apt/sources.list
on my computers. I am storing the packages
on the directory /data/apt-mirror
, which has plenty of free disk
space (at least 200 GB). I am mirroring the packages for both
amd64 and i386 architectures, and i am skipping the source
packages (deb-src) to save some space.
Now we can start making the mirror (or updating it) by running
apt-mirror
.
apt-mirror
. If it refuses to start (claiming
that it is already running), look out for
/data/apt-mirror/var/apt-mirror.lock
and remove it.
After mirroring is done, we can export the mirror by HTTP:
ln -s /data/apt-mirror/mirror /var/www/apt-mirror
Of course, apache has to be already installed (aptitude install
apache2
).
In order to use this mirror from a client, modify
/etc/apt/sources.list
to use something like this
http://<IP_ADDRESS>/apt-mirror/archive.ubuntu.com/ubuntu/
instead of http://archive.ubuntu.com/ubuntu/
. It should look
like this:
deb http://<IP_ADDRESS>/apt-mirror/archive.ubuntu.com/ubuntu/ precise main restricted # deb-src http://<IP_ADDRESS>/apt-mirror/archive.ubuntu.com/ubuntu/ precise main restricted deb http://<IP_ADDRESS>/apt-mirror/archive.ubuntu.com/ubuntu/ precise-updates main restricted # deb-src http://<IP_ADDRESS>/apt-mirror/archive.ubuntu.com/ubuntu/ precise-updates main restricted deb http://<IP_ADDRESS>/apt-mirror/archive.ubuntu.com/ubuntu/ precise universe # deb-src http://<IP_ADDRESS>/apt-mirror/archive.ubuntu.com/ubuntu/ precise universe deb http://<IP_ADDRESS>/apt-mirror/archive.ubuntu.com/ubuntu/ precise-updates universe # deb-src http://<IP_ADDRESS>/apt-mirror/archive.ubuntu.com/ubuntu/ precise-updates universe deb http://<IP_ADDRESS>/apt-mirror/archive.ubuntu.com/ubuntu/ precise multiverse # deb-src http://<IP_ADDRESS>/apt-mirror/archive.ubuntu.com/ubuntu/ precise multiverse deb http://<IP_ADDRESS>/apt-mirror/archive.ubuntu.com/ubuntu/ precise-updates multiverse # deb-src http://<IP_ADDRESS>/apt-mirror/archive.ubuntu.com/ubuntu/ precise-updates multiverse deb http://<IP_ADDRESS>/apt-mirror/archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse # deb-src http://<IP_ADDRESS>/apt-mirror/archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse deb http://<IP_ADDRESS>/apt-mirror/security.ubuntu.com/ubuntu precise-security main restricted # deb-src http://<IP_ADDRESS>/apt-mirror/security.ubuntu.com/ubuntu precise-security main restricted deb http://<IP_ADDRESS>/apt-mirror/security.ubuntu.com/ubuntu precise-security universe # deb-src http://<IP_ADDRESS>/apt-mirror/security.ubuntu.com/ubuntu precise-security universe deb http://<IP_ADDRESS>/apt-mirror/security.ubuntu.com/ubuntu precise-security multiverse # deb-src http://<IP_ADDRESS>/apt-mirror/security.ubuntu.com/ubuntu precise-security multiverse deb http://<IP_ADDRESS>/apt-mirror/extras.ubuntu.com/ubuntu precise main # deb-src http://<IP_ADDRESS>/apt-mirror/extras.ubuntu.com/ubuntu precise main deb http://<IP_ADDRESS>/apt-mirror/dl.google.com/linux/chrome/deb/ stable main ## Please report any bug on https://bugs.launchpad.net/medibuntu/ deb http://<IP_ADDRESS>/apt-mirror/packages.medibuntu.org/ precise free non-free #Medibuntu - Ubuntu 11.10 "precise ocelot" # deb-src http://packages.medibuntu.org/ precise free non-free #Medibuntu (source) - Ubuntu 11.10 "precise ocelot" deb http://<IP_ADDRESS>/apt-mirror/archive.canonical.com/ubuntu precise partner #Added by software-center
Here, <IP_ADDRESS>
is the IP of the server where we have created
the mirror.
To synchronize our local repository with the central one, we can
just run apt-mirror
at any time. However I usually prefer to
automate things, so I have created the script /etc/cron.daily/aptmirror
:
#!/bin/sh rm /data/apt-mirror/var/apt-mirror.lock /usr/bin/apt-mirror /data/apt-mirror/var/clean.sh
This will run automatically each day (during the night). Make sure
that it is executable: chmod +x /etc/cron.daily/aptmirror
.
Once in a while (once in 6 months or so), Ubuntu makes new releases. It would be usefull if we can upgrade from our local APT mirror. However this needs some further steps to be taken.
cd /data/apt-mirror/mirror mkdir dist_upgrade cd dist_upgrade export dist_upgrader_url='http://archive.ubuntu.com/ubuntu/dists/precise/main/dist-upgrader-all/current' wget $dist_upgrader_url/precise.tar.gz wget $dist_upgrader_url/precise.tar.gz.gpg wget $dist_upgrader_url/ReleaseAnnouncement wget $dist_upgrader_url/ReleaseAnnouncement.html
cd /data/apt-mirror/mirror/dist_upgrade/ wget http://changelogs.ubuntu.com/meta-release wget http://changelogs.ubuntu.com/meta-release-lts
Dist: oneiric Name: Oneiric Ocelot Version: 11.10 Date: Thu, 13 Oct 2011 12:00:00 UTC Supported: 1 Description: This is the 11.10 release Release-File: http://archive.ubuntu.com/ubuntu/dists/oneiric/Release ReleaseNotes: http://archive.ubuntu.com/ubuntu/dists/oneiric-updates/main/dist-upgrader-all/current/ReleaseAnnouncement ReleaseNotesHtml: http://archive.ubuntu.com/ubuntu/dists/oneiric-updates/main/dist-upgrader-all/current/ReleaseAnnouncement.html UpgradeTool: http://archive.ubuntu.com/ubuntu/dists/oneiric-updates/main/dist-upgrader-all/current/oneiric.tar.gz UpgradeToolSignature: http://archive.ubuntu.com/ubuntu/dists/oneiric-updates/main/dist-upgrader-all/current/oneiric.tar.gz.gpg Dist: precise Name: Precise Pangolin Version: 12.04 LTS Date: Thu, 26 Apr 2012 12:04:00 UTC Supported: 1 Description: This is the 12.04 LTS release Release-File: http://<IP_ADDRESS>/apt-mirror/archive.ubuntu.com/ubuntu/dists/precise/Release ReleaseNotes: http://<IP_ADDRESS>/apt-mirror/dist_upgrade/ReleaseAnnouncement ReleaseNotesHtml: http://<IP_ADDRESS>/apt-mirror/dist_upgrade/ReleaseAnnouncement.html UpgradeTool: http://<IP_ADDRESS>/apt-mirror/dist_upgrade/precise.tar.gz UpgradeToolSignature: http://<IP_ADDRESS>/apt-mirror/dist_upgrade/precise.tar.gz.gpg
Do the same for the file meta-release-lts.
aptitude install update-manager-core
/etc/update-manager/meta-release
to look like this:
# default location for the meta-release file [METARELEASE] URI = http://<IP_ADDRESS>/apt-mirror/dist_upgrade/meta-release URI_LTS = http://<IP_ADDRESS>/apt-mirror/dist_upgrade/meta-release-lts URI_UNSTABLE_POSTFIX = -development URI_PROPOSED_POSTFIX = -proposed
do-release-upgrade
on the systems that should be
upgraded. Now everything should be retrieved from the local
mirror, without going out to the Internet.
/etc/apt/sources.list
before starting the upgrade, since we
have not retrieved the source packages in our local mirror.


Written with the guidance of Epicodus
This is my first web page!
Isn't it nice
Here are some things I am going to learn
HMTL
CSS
Javascript
And a lot more!


{% extends "layout.html" %} {% block title %}Use a QR code{% endblock %} {% block head %} {{ super() }} {% endblock %} {% block body %}
You're using {{ use.qr_code.registrant }}'s QR code. We just logged a use of it; if you don't actually use the card, cancel it below.
The phone number is {{ use.qr_code.phone }} if they ask for that instead.
Come back here to confirm if you used it or not, and if you redeemed a free meal:
{% endblock %}


--- title: "minikube" --- --- # [minikube site](https://minikube.sigs.k8s.io/docs/) {{< blocks/lead >}}


Located at 130 King St is the Covent Garden Market At a seriosly close walking distance from my school I was surprised that I had not been there before. I'm happy to say this review is extremely authentic. I was surprised at how huge the entire market was. It's large and all the stores are packed closely together but it has a very cozy feeling. At my first time there I got lost while looking for a store with collectibles. There are so many food options with unique recipes like macarons, food you can take to.
What makes the Market extra special is that many of the vendors have hand-made items. Moat of these are also very good for the environment so you will be sipporting your local vendors and taking care of planet earth! that's a win win for me! I saw various keychains, scarfs, randon knickknacks, figurines and very well made cute stuffed toys. There's definately atleast one thing you will want to buy here!
Finally I arrived at Forget Me Not Flowers and More. You see, I worked at Home Depot in the summer of 2019 in their garden department so I absolutely adore flowers and succelents the fake ones of course! The vendor was especially friendly and you could tell the flowers had a been given a lot of care and love. The most you can spend here is atleast $15! and you will be going home with a nice little therapeutic succelent and bamboo family!
go back |
moving on!


27-January-2019 - 6.11.0
The PMD team is pleased to announce PMD 6.11.0.
This is a minor release.
New and noteworthy
Updated Apex Support
- The Apex language support has been bumped to version 45 (Spring ‘19). All new language features are now properly parsed and processed.
- Many nodes now expose more informations, such as the operator for BooleanExpressions. This makes these operators
consumable by XPath rules, e.g.
//BooleanExpression[@Operator='&&']
.
PL/SQL Grammar improvements
- In this release, many parser bugs in our PL/SQL support have been fixed. This adds e.g. support for
table collection expressions (
SELECT * FROM TABLE(expr)
). - Support for parsing insert statements has been added.
- More improvements are planned for the next release of PMD.
New Rules
-
The new Java rule
UnsynchronizedStaticFormatter
(java-multithreading
) detects unsynchronized usages of staticjava.text.Format
instances. This rule is a more generic replacement of the ruleUnsynchronizedStaticDateFormatter
which focused just onDateFormat
. -
The new Java rule
ForLoopVariableCount
(java-bestpractices
) checks for the number of control variables in a for-loop. Having a lot of control variables makes it harder to understand what the loop does. The maximum allowed number of variables is by default 1 and can be configured by a property. -
The new Java rule
AvoidReassigningLoopVariables
(java-bestpractices
) searches for loop variables that are reassigned. Changing the loop variables additionally to the loop itself can lead to hard-to-find bugs. -
The new Java rule
UseDiamondOperator
(java-codestyle
) looks for constructor calls with explicit type parameters. Since Java 1.7, these type parameters are not necessary anymore, as they can be inferred now.
Modified Rules
- The Java rule
LocalVariableCouldBeFinal
(java-codestyle
) has a new propertyignoreForEachDecl
, which is by default disabled. The new property allows for ignoring non-final loop variables in a for-each statement.
Deprecated Rules
- The Java rule
UnsynchronizedStaticDateFormatter
has been deprecated and will be removed with PMD 7.0.0. The rule is replaced by the more generalUnsynchronizedStaticFormatter
.
Fixed Issues
- core
- apex
- java
- java-bestpractices
- java-codestyle
- java-errorprone
- java-multithreading
- #1533: [java] New rule: UnsynchronizedStaticFormatter
- plsql
-
#1507: [plsql] Parse Exception when using ‘ ’ operator in where clause - #1508: [plsql] Parse Exception when using SELECT COUNT(*)
- #1509: [plsql] Parse Exception with OUTER/INNER Joins
- #1511: [plsql] Parse Exception with IS NOT NULL
- #1526: [plsql] ParseException when using TableCollectionExpression
- #1583: [plsql] Update Set Clause should allow multiple columns
- #1586: [plsql] Parse Exception when functions are used with LIKE
- #1588: [plsql] Parse Exception with function calls in WHERE clause
-
API Changes
StatisticalRule
and the related helper classes and base rule classes are deprecated for removal in 7.0.0. This includes all ofnet.sourceforge.pmd.stat
andnet.sourceforge.pmd.lang.rule.stat
, and alsoAbstractStatisticalJavaRule
,AbstractStatisticalApexRule
and the like. The methodsReport#addMetric
andmetricAdded
will also be removed.setProperty
is deprecated, becauseMultiValuePropertyDescriptor
is deprecated as well
External Contributions
- #1503: [java] Fix for ReturnFromFinallyBlock false-positives - RishabhDeep Singh
- #1514: [java] LocalVariableCouldBeFinal: allow excluding the variable in a for-each loop - Kris Scheibe
- #1516: [java] OneDeclarationPerLine: Don’t report multiple variables in a for statement. - Kris Scheibe
- #1520: [java] New rule: ForLoopVariableCount: check the number of control variables in a for loop - Kris Scheibe
- #1521: [java] Upgrade to ASM7 for JDK 11 support - Mark Pritchard
- #1530: [java] New rule: AvoidReassigningLoopVariables - Kris Scheibe
- #1534: [java] This is the change regarding the usediamondoperator #1517 - hemanshu070
- #1545: [doc] fixing dead links + tool to check for dead links automatically - Kris Scheibe
- #1551: [java] InvalidSlf4jMessageFormatRule should not throw NPE for enums - Robbie Martinus
- #1552: [core] Upgrading Google Gson from 2.5 to 2.8.5 - Thunderforge
- #1553: [core] Upgrading System Rules dependency from 1.8.0 to 1.19.0 - Thunderforge
- #1554: [plsql] updates should allow for multiple statements - tashiscool
- #1584: [core] Fixes 1196: inconsistencies of clones returned by different CPD executions for the same files - Bruno Ferreira


Next: 3 Behaviour
Up: 2 Compiler
Previous: 1 Basic
Contents
The compiler has a wealth of options to enable various debugging output.
Format: pjal options
- -hex arg
- overrides the default name of the
".hex"
file.
- -asm arg
- overrides the default name of the
".asm"
file.
- -rickpic
- using with RICK FARMER's PIC loader. The preamble
is:
org 3
goto xxx
- -debug
- show debug information.
- -quiet
- no status updates.
- -s arg
- set the include path, elements separated with
";"
- -task arg
- turn on basic tasking, where arg is the
maximum number of tasks that can run at a time. Arg must be
>= 2 (since the main program is a task).
- -pcode
- show pcode in the asm file.
- -clear
- clears all user data areas on program entry (note: volatile,
user-placed variables, and unused data areas are not cleared).
- -no-expr-reduction
- do not perform expression reduction.
- -no-cexpr-reduction
- do not perform constant expression reduction.
- -nofuse
- do not put FUSES into the assembly or hex file.
- -long-start
- force the first instruction to be a long jump. It is
apparently the common bootloader requirement. The preamble is:
bcf _pclath, 4
bcf _pclath, 3
goto xxx
goto nop
- -Wno-conversion
- turn off signed/unsigned conversion warning.
- -Wno-truncate
- turn off possible truncation in assignment warning.
- -Wno-warn
- turn off all warnings.
- -nocodegen
- do not generate any assembly code.
- -Wdirectives
- issue a warning when a compiler directive is found.
- -warn-stack-overflow
- changes hardware stack overflow errors
to warnings.
Footnotes
- ... output
- See Revision history section for latest JAL 2.0 version related
with this document.
Next: 3 Behaviour
Up: 2 Compiler
Previous: 1 Basic
Contents
pJAL Manual.
(c) 2006 Javier Martinez, Vasile Surducan and Dave Lagzdin.


Base Metabolic Rate (based on bodyweight)
Calories to maintain weight
Calories to lose weight
Grams of protein
Grams of carbohydrates
Grams of fat
| Exercise | Sets x Reps |
|---|---|
| Back Squat | 3 x 12-15 |
| Bench Press | 3 x 12-15 |
| Dumbell Row | 3 x 12-15 |
| Lat Pulldown | 3 x 12-15 |
| Shoulder Press | 3 x 12-15 |
| Dumbell Curls | 3 x 12-15 |
| Exercise | Sets x Reps |
|---|---|
| Bench Press | 3 x 12-15 |
| Dumbell Row | 3 x 12-15 |
| Lat Pulldown | 3 x 12-15 |
| Shoulder Press | 3 x 12-15 |
| Dumbell Curls | 3 x 12-15 |
| Exercise | Sets x Reps |
|---|---|
| Back Squat | 3 x 12-15 |
| Stiff Legged Deadlifts | 3 x 12-15 |
| Leg Extensions | 3 x 12-15 |
| Lunges | 3 x 12-15 |
| Leg Curls | 3 x 12-15 |
| Standing Calf Raises (Machine) | 3 x 12-15 |
| Exercise | Sets x Reps |
|---|---|
| Bench Press | 3 x 8-15 |
| Incline Bench Press | 3 x 8-15 |
| Dumbell Shoulder Press | 3 x 8-15 |
| Dumbell Lateral Raises | 3 x 8-15 |
| Tricep Cable Pushdowns | 3 x 8-15 |
| Exercise | Sets x Reps |
|---|---|
| Dumbell Row | 3 x 8-15 |
| Stiff Legged Deadlifts | 3 x 12-15 |
| Leg Extensions | 3 x 12-15 |
| Lunges | 3 x 12-15 |
| Leg Curls | 3 x 12-15 |
| Standing Calf Raises (Machine) | 3 x 12-15 |
| Exercise | Sets x Reps |
|---|---|
| Barbell Back Squats | 3 x 12-15 |
| Stiff Legged Deadlifts | 3 x 12-15 |
| Leg Extensions | 3 x 12-15 |
| Lunges | 3 x 12-15 |
| Leg Curls | 3 x 12-15 |
| Standing Calf Raises (Machine) | 3 x 12-15 |
Select the amount of days you can workout.


Loading...
x
Server Selector:
Featured YouTuber:
Latest Update - 1.1.16: > Apparently Didn't Fix Party Disconnects > More Keybinds > RPG Always Destroys Walls
im done lol


| SymmetricMatrix |
Matrix
SquareMatrix
SymmetricMatrix
Symmetric Matrix. Symmetric Matrix is matrix which one half is simmetric to another half. So we can store just half past (upper) of the matrix data.
Subclasses
Groups
See Also


WITNESS LIST Energy Resources Committee May 6, 1997-10:30A SB 665 For: Merlin Maxey (TX Petro. Assoc & Conve) Rep. Horn (Himself) On: Larry Soward (TX Dept. of Agriculture) SB 925 For: Johnnie B. Rogers Jr. (TX. L.P. Gas Associatio) Rep. Hawley (Herself) Against: David Damron (Hoechst Celanese Chemic) Eric Craven (TX Electric CO-OPs) Ron Dipprey (DOW Chemical)


User Information
Username
Password
Or Create New Account
New User
Username
Password
Confirm Password
Passwords do not match
First Name
Last Name
Middle Name
Hair Color
Brunette
Blond
Black
Red
Unnatural Color
Hair Length
Bald
1 Inch
2 Inches
3 Inches
4 Inches
5 Inches
6 Inches
7 Inches
8 Inches
9 Inches
10 Inches
11 Inches
1 Foot
>1 Foot
Gender
Male
Female
Race
Caucasian
African American
Asian
Pacific Islander
Latino / Hispanic
Native American
Native Alaskan
Other / Not Listed
Height (Feet)
3 Feet
4 Feet
5 Feet
6 Feet
7 Feet
Height (Inches)
0 Inches
1 Inch
2 Inches
3 Inches
4 Inches
5 Inches
6 Inches
7 Inches
8 Inches
9 Inches
10 Inches
11 Inches
Continue


Archive content
Edit (pull request)On the editor view, the allows you to browse and edit the content of the current edited topology archive.
Upload new file
The architect has the possible to upload or remove a file to your topology archive. This file can for example be a new script for your components or a new artifact.
Click on to select and upload into the archive a file from your local filesystem.
You can also create an empty file, to be edited later on. First, enter the name of the file to create in the edition box, then hit . Note that if entering file name like the foo/bar.txt
, a new folder ‘foo’ with a new file ‘bar.txt’ will be created.
Update the YAML of your topology
Alien4cloud provides a view to see the YAML of your topology exists, useful to export the YAML. You can directly edit your YAML to, for example, override an existing relationships or create a new capability type. Don’t forget to save your change by clicking on the save button.
Error handling
The validation of the YAML is done on saving. If errors occurs, you will be displayed a popup where you can se what exactly when wrong.
In addition, you can see errors annotations on the left of the line where the error occur. A mouser over the annotation will display the error in question.
Limitations
-
The content of the yaml file is currently not automatically updated. If you work with a milestone version of 3.0.0 you must save all pending operations in order to have a generated yaml file up to date with the changes you may have done in the editor.
-
In order to edit the YAML of the topology all previous operations must have been saved.
Shortcuts
While you are working in the context of the file editor shortcuts like save, undo and redo are not applied to the alien 4 cloud editor but to the file editor (meaning you won’t save pending operations but only changes to the file currently under edition). When the focus leaves the editor panel then shortcuts are applied to alien 4 cloud topology editor and to pending operations.


Branch metrics estimate the completion of a certain branch in the story tree. There are two ways to calculate progress:
| Leaf progress: Leaf stories | |
|---|---|
| Done count | The sum of all done leaf stories' story points under the story. "Leaf stories" do not have children. |
| Total count | The sum of all leaf stories' story points |
| Branch progress: Estimated progress | |
| In branch progress, the story's own story point estimate is compared to the sum of its children story points. The greater number is included in the estimate. |


note: for the next week or so FLICKGAME_LAYERS is in beta - I *strongly* advise you to export standalone html version of your games to ensure working copies are preserved.
FLICKGAME_LAYERS is a one of many flickgame variants. It's much more complicated than the original flickgame, and I'm not fully sure it's worth the effort to learn yet. But let's see. here's a sample project
left click on the canvas to draw. Right click, or ctrl/cmd/shift+click to erase.
show 3 4 5Shows layers 3, 4 and 5.
show +3Shows the layer 3 layers ahead of the current layer. (Also enables them, if they were previously disabled).
hide -3Hides the layer 3 layers behind the current layer.
hide 3 4 5Hides layers 3, 4 and 5.
hide thisHides the current layer
disable 3 4Disables layer 3 and 4 (that is, if they were visible before, they will still be, but you won't be able to interact with them anymore).
enable 3 4Enables layer 3 and 4. Doesn't set things to visible if they weren't visible already).
if 1, 2, not 3 then hide 1 2 show 4 else show 1 2 hide 3 endIf layers 1 and 2 are visible, but 3 isn't, then hide the first two layers and show the third, otherwise show layer 1 and 2, and hide layer 3.
Drop me a line at<EMAIL_ADDRESS>tweet to me at @increpare, or post a bug report to github.


My aim is to become as much skilled programmer as possible. I am obsessed by programming in various languages e.g.CSS,HTML,JS,Ruby so on and so forth. Assigning your product developement to me would be the best idea you can choose
I enjoy writing fron-end and back-office code implementing up-to-date techniques such as HTML5, CSS3, JavaScript and many more.
You can contact me via email<EMAIL_ADDRESS>or by phone: +37061008483
You can get more info about me by checking my Facebook profile


Loading grid {{vm.currGrid.id}} ...
GQM {{vm.currGrig.name}} details:
GQM {{vm.name}} graph CAMBIARE IL JSON
Graph's Node Details
Ooops! Something went wrong :-( {{vm.errmsg}}
Loading grid {{vm.currGrid.id}} ...
Ooops! Something went wrong :-( {{vm.errmsg}}


Provides an interface to process TaxelArrays published on multiple topics, including trimming the data and transforming the reference frame. More...
Public Member Functions | |
| def | __init__ |
| Constructor. | |
| def | setTrimThreshold |
| Set the trim threshold used by the client. | |
| def | addSkinTopicCallback |
| Callback function which sets the topic. | |
| def | removeSkinTopicCallback |
| Callback function to removed skin topic. | |
| def | addSkinTopic |
| Add skin topic to internal data structures. | |
| def | removeSkinTopic |
| Remove skin topic from internal data structures. | |
| def | skinCallback |
| Skin Callback. | |
| def | transformTaxelArray |
| Transform a single taxel array message from one frame to another. | |
| def | trimSkinContacts |
| Return a trimmed copy of the the skin_data dictionary. | |
| def | trimTaxelArray |
| Trim a passed TaxelArray to only incorporate forces of significance. | |
| def | getSkinData |
| getSkinData accessor function Returns a copy of the skin_data dictionary | |
| def | getTrimmedSkinData |
| getTrimmedSkinData accessor function Returns a copy of the trimmed_skin_data dictionary | |
| def | getContactLocationsFromTaxelArray |
| def | getTaxelLocationAndJointList |
| Returns a list of taxel locations and list of joint numbers after which the joint torque will have no effect on the contact force, and optionally a time stamp Must be implemented by every robot specific skin client. | |
Public Attributes | |
| data_lock | |
| Lock for skin data structure. | |
| topic_lock | |
| Lock for skin data topics. | |
| torso_frame | |
| torso_frame Torso frame ID used as the base frame for the associated arm, eg, "/torso_lift_link" | |
| trim_threshold | |
| Threshold used to control how the data is trimmed - should be set by whatever instatiates a TaxelArrayClient. | |
| skin_subs | |
| Dictionary containing the skin subscribers, indexed by topic name. | |
| skin_data | |
| Dictionary containing the raw TaxelArray messages heard by the client, indexed by topic name. | |
| trimmed_skin_data | |
| Dictionary containing the processed TaxelArray messages heard by the client, indexed by topic name. | |
| tf_lstnr | |
| TF Listener. | |
| skin_topic_list | |
| List of skin topics used by the client. | |
| current_topics_pub | |
| Add skin topic subscriber. |
Provides an interface to process TaxelArrays published on multiple topics, including trimming the data and transforming the reference frame.
| def hrl_haptic_mpc.skin_client.TaxelArrayClient.__init__ | ( | self, | |
| skin_topic_list, | |||
torso_frame = "/torso_lift_link" , |
|||
tf_listener = None |
|||
| ) |
Constructor.
| skin_topic_list | List of strings specifying the topics to subscribe to for TaxelArray messages |
| torso_frame | String indicating which frame ID is the base frame for the arm |
| tf_listener | TF Listener object, if one exists. If this is None, the class will create one. |
| def hrl_haptic_mpc.skin_client.TaxelArrayClient.addSkinTopic | ( | self, | |
| skin_topic | |||
| ) |
Add skin topic to internal data structures.
| skin_topic | String specifying the topic to be added. |
| def hrl_haptic_mpc.skin_client.TaxelArrayClient.addSkinTopicCallback | ( | self, | |
| msg | |||
| ) |
Callback function which sets the topic.
| msg | std_msgs/String message. |
Returns a list of taxel locations and list of joint numbers after which the joint torque will have no effect on the contact force, and optionally a time stamp Must be implemented by every robot specific skin client.
| def hrl_haptic_mpc.skin_client.TaxelArrayClient.removeSkinTopic | ( | self, | |
| skin_topic | |||
| ) |
Remove skin topic from internal data structures.
| skin_topic | String specifying the topic to be removed. |
| def hrl_haptic_mpc.skin_client.TaxelArrayClient.removeSkinTopicCallback | ( | self, | |
| msg | |||
| ) |
Callback function to removed skin topic.
| msg | StringArray message. |
| def hrl_haptic_mpc.skin_client.TaxelArrayClient.setTrimThreshold | ( | self, | |
| threshold | |||
| ) |
Set the trim threshold used by the client.
Should be greater or equal to 0.0.
| threshold | Desired threshold. Should be greater than or equal to 0.0. |
| def hrl_haptic_mpc.skin_client.TaxelArrayClient.skinCallback | ( | self, | |
| msg, | |||
| skin_topic | |||
| ) |
Skin Callback.
Store the message in the data dictionary, indexed by topic. Keeps the raw data in dictionary 'skin_data' and the transformed, trimmed data in 'trimmed_skin_data'
| msg | TaxelArray message object |
| skin_topic | The topic name triggering the callback. Used to identify what sensor the TaxelArray came from (as there may be multiple publishers running) |
| def hrl_haptic_mpc.skin_client.TaxelArrayClient.transformTaxelArray | ( | self, | |
| ta_msg, | |||
| new_frame | |||
| ) |
Transform a single taxel array message from one frame to another.
| ta_msg | TaxelArray message object to be transformed |
| new_frame | The desired frame name |
| def hrl_haptic_mpc.skin_client.TaxelArrayClient.trimSkinContacts | ( | self, | |
| threshold | |||
| ) |
Return a trimmed copy of the the skin_data dictionary.
Each TaxelArray within the structure will be trimmed.
| threshold | Threshold parameter (float greater than 0.0) |
| def hrl_haptic_mpc.skin_client.TaxelArrayClient.trimTaxelArray | ( | self, | |
| ta_msg, | |||
| threshold | |||
| ) |
Trim a passed TaxelArray to only incorporate forces of significance.
Returns a trimmed TaxelArray message object with forces of magnitude > threshold. The data is otherwise unchanged.
Add skin topic subscriber.
Remove skin topic subscriber Current topics ROS publisher. Publishes the list of topics on change.
Lock for skin data structure.
Lock for skin data topics.
Threshold used to control how the data is trimmed - should be set by whatever instatiates a TaxelArrayClient.
Default: 0.0 (ie, trim nothing)


NNCSS
Table of Contents
What is NNCSS?
NNCSS is No Nonsense CSS, a simple CSS file that can be used to "publish" documents written in HTML.
Simply put, it is a KISS CSS file that fixes the default styling of HTML so that an HTML document is presentable without modification.
We are interested in proper documents that are marked up using HTML: Hyper Text Markup Language (not Make A Pretty Website With Slideshows Language).
We are not interested in web design vomit: Javascript, drop-down menus, sidebars, slideshows, and other forms of web design vomit have no place here.
This document describes what exactly NNCSS contains.
1 Content width
The width of A4 paper is 210 mm. Based on this measure, I decided to make the content width for NNCSS 190 mm.
margin: 0 auto; max-width: 190mm;
2 Headers
We apply a standard formatting to all header elements. We use our general width and centering code from above, as well as setting shared top and bottom margin sizes.
h1, h2, h3, h4, h5, h6 { margin: 0 auto; max-width: 190mm; margin-top: 7mm; margin-bottom: 4mm; }
We also provide some special formatting for

, which is reserved for the
title.
h1 { text-align: center; margin-top: 15mm; margin-bottom: 7mm; }
3 Paragraphs
Our styling for paragraphs uses the shared width and centering (I'll stop mentioning this later, everything will be using this shared styling). In addition, use justification to make paragraphs look neat and add a bottom margin for spacing purposes.
p { margin: 0 auto; max-width: 190mm; text-align: justify; margin-bottom: 4mm; }
4 Tables
We apply some general formatting for the

element. Of note is
collapsing the borders. If we did not do that, the borders for the table rows
below would not appear.
table { margin: 0 auto; max-width: 190mm; margin-top: 7mm; margin-bottom: 7mm; border-collapse: collapse; }
I believe that lines separating the rows of a table are essential. Vertical lines are less important, although I may add a mechanism for these in the future, as used sparingly vertical lines may be helpful in some circumstances.
tr { border-top: 1px black solid; border-bottom: 1px black solid; }
We add some padding for table cells to make it look nice.
th, td { padding: 2mm; }
5 Images
Images in HTML are considered inline block elements. This is stupid, because there is no good reason for an image to be formatted inline in a document (that is, any page that presents content and not web design vomit).
We fix this.
We also add spacing around images so they have room to breathe.
img { margin: 0 auto; max-width: 190mm; display: block; margin-top: 7mm; margin-bottom: 7mm; }
6 Lists
Again, we apply our shared width and centering style, along with some vertical spacing.
ul, ol, dl { margin: 0 auto; max-width: 190mm; margin-top: 4mm; margin-bottom: 4mm; }
The unordered and ordered lists do not require much further tweaking. We add some space between each item for the eyes.
li { margin-top: 1mm; margin-bottom: 1mm; }
Unfortunately, definition lists need more work because the default styling is wanting, but a few tweaks is all that is needed fix them.
First, we fix the definition terms. We float the definition terms to the left, bold them to add weight, and append a colon. We want the text to align right, to bring the terms close to their definitions. In order for the alignment to work, we have to define the width. To finish, we add some padding space on the right to keep the terms from getting too close to their definitions.
Next, we fix the definition bodies. We give them a left margin to make space for the terms and add a little vertical space for visual padding.
The most complex part is getting the spacing right, but a handy visualization helps:
For
: width + margin-right /---------\ width /-------\ For
: margin-left /---------\ ---------------------------------- | | | | term: | definition | | | |
dt { float: left; clear: left; font-weight: bold; text-align: right; width: 27mm; margin-right: 3mm; } dt:after { content: ":"; } dd { margin-left: 30mm; margin-top: 1mm; margin-bottom: 1mm; }
7 Final CSS code
Our final CSS code:
h1, h2, h3, h4, h5, h6 { margin: 0 auto; max-width: 190mm; margin-top: 7mm; margin-bottom: 4mm; } h1 { text-align: center; margin-top: 15mm; margin-bottom: 7mm; } p { margin: 0 auto; max-width: 190mm; text-align: justify; margin-bottom: 4mm; } table { margin: 0 auto; max-width: 190mm; margin-top: 7mm; margin-bottom: 7mm; border-collapse: collapse; } tr { border-top: 1px black solid; border-bottom: 1px black solid; } th, td { padding: 2mm; } img { margin: 0 auto; max-width: 190mm; display: block; margin-top: 7mm; margin-bottom: 7mm; } ul, ol, dl { margin: 0 auto; max-width: 190mm; margin-top: 4mm; margin-bottom: 4mm; } li { margin-top: 1mm; margin-bottom: 1mm; } dt { float: left; clear: left; font-weight: bold; text-align: right; width: 27mm; margin-right: 3mm; } dt:after { content: ":"; } dd { margin-left: 30mm; margin-top: 1mm; margin-bottom: 1mm; }


| Name |
|---|
| Deployed | |
| Benchmarking Mode: | |
| Benchmarking Parameters | |
| Post Body Argument (JSON) |
| Region | |
| Runtime | |
| AWS ARN Lambda Role | |
| Handler Class Name | |
| Timeout in Seconds | |
| Memory Sizes (comma separated List) | |
| Path to ZIP Source (locally on your computer) | |
| Target URL (filled by the tool) | |
| API Key (filled by the tool) |
| REST API ID (filled by the tool) | |
| API Key ID (filled by the tool) | |
| Usage Plan ID (filled by the tool) |
| Local Steps in which CPU share is increased (e.g. 0.1) | |
| Number of local calibrations | |
| Docker Source Folder(Dockerfile location) |
| Bucket name to store calibration to | |
| Number of aws executions | |
| Region | |
| Runtime | |
| AWS ARN Lambda Role | |
| Handler Class Name | |
| Timeout in Seconds | |
| Memory Sizes (comma separated List) | |
| Path to ZIP Source (locally on your computer) | |
| Target URL (filled by the tool) | |
| API Key (filled by the tool) |
| REST API ID (filled by the tool) | |
| API Key ID (filled by the tool) | |
| Usage Plan ID (filled by the tool) |
| Memory Sizes on Provider Platform (comma separated) | |
| Memory Sizes, CPU share |
| Folder, where the function and Dockerfile is located | |
| Environment variable file | |
| Number of Profiles |


Pratibimb
A chance to re-experience, re-unite and re-live the unforgettable time spent at TISS. A glimpse of how some of our alumni enjoyed their stay for 2 days at TISS this year on 19th and 20th September.
Download BrochureA chance to re-experience, re-unite and re-live the unforgettable time spent at TISS. A glimpse of how some of our alumni enjoyed their stay for 2 days at TISS this year on 19th and 20th September.
Download Brochure


- New: Swedish localization (thanks to MrCraigen)
- New: Dutch localization (thanks to wilco375)
- New: Cxbx-Reloaded and yuzu emulator profiles
- New: Added digital signature
- Fix: Windows Store (UWP) game detection not working properly
- Fix: Path variables not being used properly
- Fix: Nested context menu doesn't scroll when overflowing
- Fix: Don't remove imported games no longer in user's library
- Fix: Don't modify names for games from official sources
- Fix: Crash when invalid theme is being loaded
- Fix: Crash when monitoring Steam game installation process
- Fix: Crash when editing game metadata
- Fix: Battle.Net reports wrong login status
- Fix: Additional game actions are not being set for Steam games


We value context and history. We question standards and givens. We embrace flaws and anomalies.
WE DESIGN WITH
The Future in Mind
An integrated architecture, design, planning and consulting firm — 6000+ professionals networked across 48 offices—providing global reach with local touch. AGENCY is a collaborative interdisciplinary practice engaging contemporary culture through architecture, urbanism, and advocacy. Our people collaborate across a network of 24 offices on three continents.
We are architects, planners, and designers
At the core of our practice is the idea that cities are the incubators of our greatest achievements, and the best hope for a sustainable future. We believe that architecture and design matter, and that through the application of our skills...
Marketing Your Home
The sale of a significant home is truly noteworthy. To represent a home of distinction requires highly-qualified real estate professionals with global reach and local expertise.
LEADERSHIP
Sample text. Click to select the text box. Click again or double click to start editing the text.
CAREERS
Sample text. Click to select the text box. Click again or double click to start editing the text.
PARTNERSHIP
Sample text. Click to select the text box. Click again or double click to start editing the text.
ABOUT US
Sample text. Click to select the text box. Click again or double click to start editing the text.
QUICKNESS
Sample text. Click to select the text box. Click again or double click to start editing the text.
FIX PRICE
Sample text. Click to select the text box. Click again or double click to start editing the text.
WE ARE AN INDEPENDENT FIRM OF DESIGNERS, ENGINEERS, ARCHITECTS, PLANNERS, CONSULTANTS AND TECHNICAL SPECIALISTS WORKING ACROSS EVERY ASPECT OF TODAY'S BUILT ENVIRONMENT.
A
Easy to Use Tools
Strategic planning is an organization’s process for defining their strategy so that they can accomplish specific goals and objectives. We offer affordable custom website design done by professionals.
B
Special Discounts
We can help you to boost engagement with your visitors by ensuring that people have access to the information that they. A business concept is a statement that describes the reach and reason of existence of a given business idea.


Welcome, and thank you for stopping by this page. My name is Jen Doyle and I welcm you to my world. I am a highly skilled relationshipbuilder and innovative problem solver, who found a new passion in life, programming. I am enhancing my soft skills by adding a whole new component of hard skills in full stack web development. I want to use my knowlege to help create a unique expereince or creatively solve a problem. I am an effective communictor who actively listens to people tell their story. I am able to drill down and issue to find a creative solution. I am a consumate networker skilled in bringing people together and bridge gaps to build stronger relationships. I am passionate about learning people's stories and expereinces to help them bring their vision to life.
I am a fun loving dynamic individual, who wants to put the FUN in FUNctions. I try to find the fun and smiles in everything I do. I laugh a lot. I like to meet new people and learn about them from their stories and expereinces. I have a lot of passions outside of coding that include football, travel, reading, cooking, and live music. I love to explore new places and taking pictures of things that interest me. The pictures shown are from some of the trips I have taken in the last few years. During quarantine, I enhanced my baking skills and spent a lot of time by the lakefront. Want to know more? Contact me via LinkedIn or via email.


You're are currently previewing how the sponsorship application using the configuration from {{ custom_year }}.
This should be used only for preview before updating the Sponsorship Current Active year to {{ custom_year }}.


Here you can try out your driver knowledge and skills.
Choose a test from the left column and solve it before the time is out.
You can see your results for the current test in the right column.
Good luck.


---
layout: casestudy
class: stokke
permalink: /work/stokke/
title: Stokke Case Study - 14islands
name: Stokke
headline: Customizing your product.
description: Customizing your product.
color: '#e75300'
hoverColor: '#c64505'
logo: logo_stokke.min.svg
image: /images/work/stokke/stokke-iphone5s_wireframe.jpg
imageClass: box__content__img--max-450
hasDarkTypography: false
priority: 3
private: true
og_image: /images/work/stokke/stokke-stroller-choices.jpg
---
{% include casestudy-header.html about="Stokke is a Norwegian manufacturer of children's furniture and accessories. They focus on producing high quality products for babies and children." %}
{% include casestudy-video.html vimeoId="216976335" ratio="16_9" class="pjax-animate" %}
{% markdown %}
## Easy interface
We have partnered with North Kingdom to build them a configurator to allow customers to customize some of their well known products. The configurator features a minimalistic interface to let you focus on the product.
{% endmarkdown %}
{% include wide-content-image.html src="/images/work/stokke/stokke-ui.png" alt="Stokke configurator" ratio="16_10" margin="top" %}
{% markdown %}
## Mobile friendly
There is a a strong focus on the mobile experience - one of the main requirements for the project. Everything should feel fluid and with a snappy interaction response.
{% endmarkdown %}
{% include casestudy-video-inline.html vimeoId="217012318" ratio="16_10" %}
{% markdown %}
## Site integration
Everything is built with the back-end integration in mind. The app sits on top of the website framework and is connected with the check-out process. The same application can be re-used to display different products.
{% endmarkdown %}
{% include wide-content-image.html src="/images/work/stokke/stokke-stroller-choices.jpg" alt="Stokke configurators" ratio="16_10" margin="top" %}
{% markdown %}
## Technologies
The application was built to be re-usable and features a minimalistic footprint.
{% endmarkdown %}
{% include casestudy-quote.html quote="14islands did an awesome job as development partners. They delivered high quality, attention to details and creative solutions to problems. I highly recommend to partner up with them." author-image-src="/images/work/plumewifi/plume-isak-nk.jpg" author-name="Daniel Isaksson" author-job-title="Technical Director at North Kingdom" %}
{% markdown %}
## Wish to build a webapp?
We make nice interfaces for a living.
[Get in touch](/contact/)
{% endmarkdown %}


Mindset & Setting: Very excited about trying Salvia for the first time seeing as how I have waited over 4 years to try and mentally prepare myself (which I was not).
Preparations: Trip Sitter (my aunt), low lights, Cypress Hill, My girlfriend, my aunts dog (very relaxing), pillows (and lots of them, falling on my face hurts a lot less if there are pillows)
Dosage: 1 Bowl of Salvia extract 20x
Other Medication: Protonix (But I don't think that matters)
1:30 p.m.: Visit my favorite head shop and go to purchase my supply.
2:00 p.m.: Arrive at my point of earthly departure (my auntís house). I took out my bag and showed her what I had purchased, she reacted with pure intrigue and excitement (she had never heard of salvia yet back in the 70's she was an acid binger) I load a bowl and pull out my torch lighter (seeing as how salvia needs high temperatures to thrive) I take one small hit and hold to try and get an initial feeling of what it may be like.
All of a sudden I feel a tingly numbness, a feeling almost identical to pot (which surprised me). All of a sudden colors became vivid and dimensions vaguely shifted from one form to another. This was honestly nothing intense yet, but it was exciting. My aunt who was at first nervous about trying it, suddenly lit up with excitement describing to me that my feelings sounded just like LSD (which at low doses seem to be similar to low doses of acid). We both eagerly sat down to take some more.
She took a small hit to test the feelings, I sat back in the couch ready to take my journey. I cleared my head of all worries and problems. I take one deep draw and hold for as long as I can, The feelings begin to creep up on me again, however, this time the feelings begin to compound themselves, I tell my aunt that I am feeling VERY messed up, and then I tell her again, and again, and again, I am caught in a repetitive loop and I can't stop, all of a sudden, I am in a hole and I can't move, I want to move but I can't.
Now, I know that my title may seem like an error in grammar but let me explain in the best way that I can, I didn't know what or who I was, I could not grasp the concept of reality. I can not stress this point enough, I didn't know what I was or that I even existed, all that remained was my mind and my thoughts.
I began to more intensely think that I was in a deep dark hole, at this point I still could not move. Now this feeling (seeing as how I have never felt this before) was to an extent scary and it began to worry me and I began to feel afraid.
 And she said something that brought me back to reality: 'This is an incredible drug.' That is when I realized that this was just a drug, and that humans use drugs, which led me to the realization that I was a human, until this point I had forgotten that I was human, I felt more like a spirit. I slowly started to remember all of the things that I had forgotten. I saw my aunts dog sitting next to me and it felt as though she was communicating to me through her eyes telling me that it would be okay and that the experience was something to be enjoyed (ever since this I have felt spiritually connected to her.)
I started to come down from the experience going in and out of my dream state and feeling surprisingly numb, I decided that the journey that I had just taken was more than just a high or even a trip, it was an enlightenment.
Even though I was not prepared for the experiance, I enjoyed it supremely. Even after 4 years of waiting and research I was not prepared.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


TABLE OF CONTENTS
A. GS1 Related B. GS2 Related International Affairs/Bilateral Relations 1. N. Korea: Japan draws in India 2. ‘Fly’ on train from Mumbai by 2022 3. Five challenges in the Ahmedabad-Mumbai bullet train project 4. Japan calls for ‘Free and Open Indo-Pacific Strategy’ 5. Asia Africa Growth Corridor aims for people-centric growth strategy C. GS3 Related Economy 1. India at 103 rank on Global Human Capital Index, lowest among BRICS nations D. GS4 Related E. Prelims Fact F. UPSC Prelims Practice Questions G. UPSC Mains Practice Questions
Nothing here for Today!!!
Category: INTERNATIONAL AFFAIRS/BILATERAL RELATIONS
1. N. Korea: Japan draws in India
Context:
Japan’s Prime Minister visit to India
In News:
Strategic Convergence:
- India and Japan asked North Korea to shut down its nuclear and missile programmes.
- India and Japan, both hinted at Pakistan’s past involvement with North Korean nuclear and missile programmes and sought accountability of “all parties” who helped Pyongyang acquire nuclear technology.
Cross-border terrorism:
- Japan promised to help India deal with cross-border terrorism: support can be provided both indirectly in international platforms or directly to deal with organisations like Lashkar-e-Taiba, Jaish-e-Mohammed and the Islamic State
- A joint statement issued after the summit sought the implementation of Resolution 1267 of the UN Security Council to counter cross-border terrorism.
Japan’s focus on Northeast States:
- Japan, at present, has two infrastructure projects in Meghalaya and Mizoram and more projects are likely to be added to the list after feasibility studies.
Expanded Maritime cooperation:
- Maritime cooperation between the Japan Maritime Self Defence Force (JMSDF) and the Indian Navy had expanded to include ‘anti-submarine aspects’.
- India and Japan, both agreed to support small islands in the region as part of their common strategy.
Joint Exercise:
- Expansion of joint exercises in areas of humanitarian assistance and disaster relief (HA/DR), peacekeeping operations and counter-terrorism, which will also include joint field exercises between the Japanese and Indian land forces next year.
2. ‘Fly’ on train from Mumbai by 2022
In news:
- Prime Minister Narendra Modi and his Japanese counterpart Shinzo Abe laid the foundation stone in Ahmedabad for the country’s first Rs. 1,10,000 crore, 508 km high-speed rail project between Mumbai and Ahmedabad.
- The ambitious project is being implemented with nearly 90% financial support and technology from Japan.
- Key Fact: To be built on elevated corridor with a seven-km undersea tunnel in Mumbai, the project will be based on the famed Japanese Shinkansen high-speed railway system with a record of zero casualties in its 50 years of operation.
- Dead line for completion: August 15, 2022, the day when India marks 75 years of Independence.
- The project will be executed through a special purpose vehicle, the National High Speed Rail Corporation Ltd.
- India’s Bharat Heavy Electricals Ltd and Japan’s Kawasaki Heavy Industries Ltd will tie up for manufacturing the rolling stock for bullet train project.
- A training centre in Vadodara is being set up to train over 4,000 employees who will be responsible for execution, operation and maintenance of the bullet train.
- The project will cover 12 stations — Mumbai, Thane, Virar, Boisar, Vapi, Bilimora, Surat, Bharuch, Vadodara, Anand, Ahmedabad and Sabarmati — and once operational, the train is expected to service 1.5 crore travellers a year.
3. Five challenges in the Ahmedabad-Mumbai bullet train project
Context:
- Construction of the first bullet train between Ahmedabad and Mumbai is happening on 14 September at a function attended by Narendra Modi and Shinzo Abe
- It is a major leap in infrastructure development in India, this project signifies the friendship and collaboration between India and Japan
Specialties:
- The 534-km Rs1 trillion high-speed rail project will operate trains with average speeds of 200-250kmph
- It will be a game-changer in terms of inter-urban connectivity and establish India as a market for such technologies
- Japan is providing a loan that would cover 80% of the estimated project cost at 5% interest, with a 15-year moratorium followed by a 35-year payback period.
Challenges
Route design which would include questions like:
- Detailed alignment choice, especially when it is over ground, keeping in view land acquisition challenges versus providing access to the population along the corridor.
- Generate urban growth around the station, and even shift the centre of gravity of the urban area.
- Number of stations: Demand for more stations would increase the catchment and reduce the average speed due to higher number of stops. One option is to have different service categories like fast (stopping at all stations) and super-fast (only at major cities).
Evacuation facilitation:
- Efficient bus services as well as accessible parking lots for private vehicles should be provided.
- At major stations, where passengers could move to other trains, th transfer must be seamless.
Land acquisition:
- This will be a critical issue, especially where the alignment would veer off from existing railway lands.
- It would be best addressed by the line ging over ground, where the actual acquisition would be limited
Human resource development:
- It would be important to train a large number of Indian engineers and managers for design, construction and operations at standards that would be essential for high speed rail, including for stringent safety standards
Future expansion:
- It would be useful to have a perspective on how the expansion of this line would happen.
4. Japan calls for ‘Free and Open Indo-Pacific Strategy’
Context:
- Prime Minister Shinzo Abe’s visit to India.
- Announcement of Free and Open Indo-Pacific Strategy.
In news:
- During the visit Shinzo Abe highlighted the country’s intensifying focus on the Indo-Pacific region and Tokyo’s evolving foreign policy.
- Japan’s new concept- “Free and Open Indo-Pacific Strategy”:
- Aims to prepare Japan to deal with the fast changing global and regional order and threats from China and North Korea.
- Strategy aims to create a “free and open” Asia-Pacific region which connects parts of eastern Africa, south Asia and southeast Asia with the western Pacific Ocean region and Japan.
- The ‘Free and Open Indo-Pacific Strategy’ rests on “two oceans” — Indian and Pacific — and “two continents” — Africa and Asia.
- Connectivity between Asia and Africa through a free and open Indo-Pacific, is expected to support stability and prosperity of the region.
- Inference: by connecting “two oceans” and “two continents”, Japan is quietly challenging China’s aggressive plans in the South China Sea that pose a threat to the energy lane that sustains Japanese economy.
5. Asia Africa Growth Corridor aims for people-centric growth strategy
Context:
- Asia Africa Growth Corridor (AAGC)
- Emergence of Idea: during the joint declaration issued by Prime Minister Narendra Modi and Prime Minister Shinzo Abe in November 2016
Asia Africa Growth Corridor:
- The AAGC envisages a people-centric sustainable growth strategy
- The AAGC is an economic cooperation agreement between the governments of India and Japan
- It engages various stakeholders- governments, firms, think tanks and civil society
- It would be raised on the four pillars of
- Development and cooperation projects,
- Quality infrastructure and institutional connectivity,
- Enhancing capacities and skills, and
- People-to-people partnership
- The strengths of AAGC will be aligned with the development priorities of different countries and sub-regions of Asia and Africa
- AAGC-led growth in Africa and Asia will be responsive to the collective commitment to Sustainable Development Goals (SDGs)
Trade Facilitation:
- In a study conducted by the European Commission, it is found that the time taken for export and import activities is among the highest in Africa (excluding the northern region)
- Moreover, the documents required to export and import are also on the higher side in Africa
- According to OECD trade facilitation indicators, Asia and Sub-Saharan Africa are below the best practices
- However, achieving the desired level of trade facilitation is a challenging task for Africa and Asia because of lack of technical know-how and skills
India’s role:
- India has already made efforts through various initiatives to develop capabilities in other countries in Asia and Africa in the past
- Although many of them are not fully developed due to paucity of resources
- But we can re-energize such projects/initiatives through AAGC funding that could lead to promotion of imports and exports
- India must evolve appropriate strategy to meet import and export requirements of partner countries in the medium term
Reasons for low level growth in Africa:
- The low level of private investment in Africa is withholding high growth
- Owing to risky projects on long gestation projects, there has been lukewarm response from investors
- Possible Solution: Private investors may be attracted by using limited state funding using the European Investment Fund (EIF) Model
- The EIF consists of subsidizing investment, loss protection, capital relief, reduced interest rate, low collateral requirements, lease and guarantee
Way forward:
- Working closely with the international community, the Asia Africa Growth Corridor will be instrumental in realizing a free and open Indo-Pacific region
- As a unique process, AAGC takes a multi-stakeholder as well as participatory approach towards development
1. India at 103 rank on Global Human Capital Index, lowest among BRICS nations
Global Human Capital Index
- India has been placed at a low 103 rank, the lowest among BRICS economies, on the World Economic Forum’s (WEF’s) Global Human Capital Index
- India is ranked lower than its BRICS peers
- Among the South Asian countries also, India was ranked lower than Sri Lanka and Nepal
- The index has been topped by Norway
Criterion adopted for Ranking
- The list takes into account “the knowledge and skills people possess that enable them to create value in the global economic system” to measure the ‘human capital’ rank of a country
Other Rankings by the WEF’s survey
- India also ranks “among the lowest in the world” when it comes to the employment gender gap
- But has fared well when it comes to development of skills needed for the future with a rank of 65 out of total 130 countries
- India ranks 118 for labour force participation among the key 35-54 year old demographic, it shows too many Indians are engaged in informal or subsistence employment
Nothing here for Today!!!
Nothing here for Today!!!
F. Practice Questions for UPSC Prelims Exam
Question 1. NNP at factor cost is
- GNP at market price – depreciation
- NNP at market price – Indirect taxes
- NNP at market prices+ subsidies
- NNP at market price- indirect taxes+ subsidies.
See
Question 2. Which of the following is the top level organizational structure of WTO?
- General Council
- Ministerial Conference
- Dispute settlement body
- Goods council
See
Question 3. Which if these is NOT one of the major styles or schools of ancient Indian art?
- Amravati
- Mathura
- Gandhara
- Sarnath
See
Question 4. Identify the correct statement with reference to K9 Vajra
- It is a Submarine
- It is an artillery gun
- It is a naval ship
- None of the above
See
Question 5. Section 139AA inserted in the Income Tax Act, which was in news recently
deals with?
- Provision of Aadhaar being mandatory for getting a PAN.
- Provision of Aadhaar being mandatory for getting a GST number.
- Provision of Aadhaar being mandatory for getting IT rebates.
- None of the above
See
G. UPSC Mains Practice Questions
GS Paper I
- In many ways, Lord Dalhousie was the founder of modern India”. Elaborate
GS Paper II
- “Asia Africa Growth Corridor will help in developing institutional mechanisms and models for connecting people, think tanks and businesses” Discuss.
- “While it is of great value that India has Japan’s support for building the Ahmedabad-Mumbai bullet train, there are multiple challenges that need to be overcome.” Dicsuss.
Also, check previous Daily News Analysis
“Proper Current Affairs preparation is the key to success in the UPSC- Civil Services Examination. We have now launched a comprehensive ‘Current Affairs Webinar’. Limited seats available. Click here to Know More.”
Enroll for India’s Largest All-India Test Series


Home Page
User Desk
Manage Fences
Control Room
Central Server
Customer Cell
user id:
Create user
Edit Fences
111@JA
222@CGL
333@TNM
MAP
Server console
Main DB
Portal


Drink Lots of Water Your body never stops working – not even when you’re asleep. Your heart is still beating, your hormones are finding homeostasis, and metabolic activities are continuing–though at a slower rate.....
Eating breakfast will help you start your day with plenty of energy. Don't ruin your breakfast with high-fat and high-calorie foods. Choose some protein and fiber for your breakfast; breakfast is also a good time to eat some fresh fruit.
Breathe naturally. Meditation does involve focusing on the breath and using it as an anchor for the mind, but try not to think about the breath.....
So you want to start a skincare routine, but you have some questions: How many products do you have to use? Which ones are right for your skin? In what order should you be applying these products?....


{% extends "layout.html" %} {% block content %}
Last update: {{ value.date }} ({{ value.time }})
Current state has been active for {{ value.dur }} days now (since {{ value.durdate }}).


{% extends "tutorial.html" %} {% load mixin from templatefilters %} {% block head %} {{ block.super }} {% endblock %} {% block content %}
Ladies and gentlemen, prepare yourself for a pivotal moment in the history of web development…
[Drumroll begins]
Promises have arrived natively in JavaScript!
[Fireworks explode, glittery paper rains from above, the crowd goes wild]
At this point you fall into one of these categories:
JavaScript is single threaded, meaning that two bits of script cannot run at the same time, they have to run one after another. In browsers, JavaScript shares a thread with a load of other stuff. What that stuff is differs from browser to browser, but typically JavaScript is in the same queue as painting, updating styles, and handling user actions (such as highlighting text and interacting with form controls). Activity in one of these things delays the others.
As a human being, you're multithreaded. You can type with multiple fingers, you can drive and hold a conversation at the same time. The only blocking function we have to deal with is sneezing, where all current activity must be suspended for the duration of the sneeze. That's pretty annoying, especially when you're driving and trying to hold a conversation. You don't want to write code that's sneezy.
You've probably used events and callbacks to get around this. Here are events:
var img1 = document.querySelector('.img-1'); img1.addEventListener('load', function() { // woo yey image loaded }); img1.addEventListener('error', function() { // argh everything's broken });
This isn't sneezy at all. We get the image, add a couple of listeners, then JavaScript can stop executing until one of those listeners is called.
Unfortunately, in the example above, it's possible that the events happened before we started listening for them, so we need to work around that using the "complete" property of images:
var img1 = document.querySelector('.img-1'); function loaded() { // woo yey image loaded } if (img1.complete) { loaded(); } else { img1.addEventListener('load', loaded); } img1.addEventListener('error', function() { // argh everything's broken });
This doesn't catch images that error'd before we got a chance to listen for them, unfortunately the DOM doesn't give us a way to do that. Also, this is loading one image, things get even more complex if we want to know when a set of images have loaded.
Events are great for things that can happen multiple times on the same object — keyup, touchstart etc. With those events you don't really care about what happened before you attached the listener. But when it comes to async success/failure, ideally you want something like:
img1.callThisIfLoadedOrWhenLoaded(function() { // loaded }).orIfFailedCallThis(function() { // failed }); // and… whenAllTheseHaveLoaded([img1, img2]).callThis(function() { // all loaded }).orIfSomeFailedCallThis(function() { // one or more failed });
This is what promises do, but with better naming. If HTML image elements had a "ready" method that returned a promise, we could do:
img1.ready().then(function() { // loaded }, function() { // failed }); // and… Promise.all([img1.ready(), img2.ready()]).then(function() { // all loaded }, function() { // one or more failed });
At their most basic, promises are a bit like event listeners except:
This is extremely useful for async success/failure, because you're less interested in the exact time something became available, and more interested in reacting to the outcome.
Domenic Denicola proof read the first draft of this article and graded me "F" for terminology. He put me in detention, forced me to copy out States and Fates 100 times, and wrote a worried letter to my parents. Despite that, I still get a lot of the terminology mixed up, but here are the basics:
A promise can be:
The spec also uses the term thenable to describe an object that is promise-like, in that it has a then
method. This term reminds me of ex-England Football Manager Terry Venables so I'll be using it as little as possible.
Promises have been around for a while in the form of libraries, such as:
The above and JavaScript promises share a common, standardised behaviour called Promises/A+. If you're a jQuery user, they have something similar called Deferreds. However, Deferreds aren't Promise/A+ compliant, which makes them subtly different and less useful, so beware. jQuery also has a Promise type, but this is just a subset of Deferred and has the same issues.
Although promise implementations follow a standardised behaviour, their overall APIs differ. JavaScript promises are similar in API to RSVP.js. Here's how you create a promise:
var promise = new Promise(function(resolve, reject) { // do a thing, possibly async, then… if (/* everything turned out fine */) { resolve("Stuff worked!"); } else { reject(Error("It broke")); } });
The promise constructor takes one argument, a callback with two parameters, resolve and reject. Do something within the callback, perhaps async, then call resolve if everything worked, otherwise call reject.
Like "throw" in plain old JavaScript, it's customary, but not required, to reject with an Error object. The benefit of Error objects is they capture a stack trace, making debugging tools more helpful.
Here's how you use that promise:
promise.then(function(result) { console.log(result); // "Stuff worked!" }, function(err) { console.log(err); // Error: "It broke" });
"then" takes two arguments, a callback for a success case, and another for the failure case. Both are optional, so you can add a callback for the success or failure case only.
JavaScript promises started out in the DOM as "Futures", renamed to "Promises", and finally moved into JavaScript. Having them in JavaScript rather than the DOM is great because they'll be available in non-browser JS contexts such as Node.js (whether they make use of them in their core APIs is another question).
Although they're a JavaScript feature, the DOM isn't afraid to use them. In fact, all new DOM APIs with async success/failure methods will use promises. This is happening already with Quota Management, Font Load Events, ServiceWorker, Web MIDI, Streams, and more.
There are already implementations of promises in browsers today.
As of Chrome 32, Opera 19 & Firefox 29, promises are enabled by default. They're in WebKit nightlies so expect them in the next release of Safari, and they're in development in IE.
To bring browsers that lack a complete promises implementation up to spec compliance, or add promises to other browsers and Node.js, check out the polyfill (2k gzipped).
The JavaScript promises API will treat anything with a then
method as promise-like (or thenable in promise-speak *sigh*), so if you use a library that returns a Q promise, that's fine, it'll play nice with the new JavaScript promises.
Although, as I mentioned, jQuery's Deferreds are a bit… unhelpful. Thankfully you can cast them to standard promises, which is worth doing as soon as possible:
var jsPromise = Promise.resolve($.ajax('/whatever.json'));
Here, jQuery's $.ajax
returns a Deferred. Since it has a "then" method, Promise.resolve
can turn it into a JavaScript promise. However, sometimes deferreds pass multiple arguments to their callbacks, eg:
var jqDeferred = $.ajax('/whatever.json'); jqDeferred.then(function(response, statusText, xhrObj) { // ... }, function(xhrObj, textStatus, err) { // ... });
Whereas JS promises ignore all but the first:
jsPromise.then(function(response) { // ... }, function(xhrObj) { // ... });
…thankfully this is usually what you want, or at least gives you access to what you want. Also, be aware that jQuery doesn't follow the convention of passing Error objects into rejections.
Right, let's code some things. Say we want to:
…but also tell the user if something went wrong along the way. We'll want to stop the spinner at that point too, else it'll keep on spinning, get dizzy, and crash into some other UI.
Of course, you wouldn't use JavaScript to deliver a story, serving as HTML is faster, but this pattern is pretty common when dealing with APIs: Multiple data fetches, then do something when it's all done.
To start with, let's deal with fetching data from the network:
Old APIs will be updated to use promises, if it's possible in a backwards compatible way. XMLHttpRequest
is a prime candidate, but in the mean time let's write a simple function to make a GET request:
function get(url) { // Return a new promise. return new Promise(function(resolve, reject) { // Do the usual XHR stuff var req = new XMLHttpRequest(); req.open('GET', url); req.onload = function() { // This is called even on 404 etc // so check the status if (req.status == 200) { // Resolve the promise with the response text resolve(req.response); } else { // Otherwise reject with the status text // which will hopefully be a meaningful error reject(Error(req.statusText)); } }; // Handle network errors req.onerror = function() { reject(Error("Network Error")); }; // Make the request req.send(); }); }
Now let's use it:
get('story.json').then(function(response) { console.log("Success!", response); }, function(error) { console.error("Failed!", error); });
Click here to see that in action, check the console in DevTools to see the result. Now we can make HTTP requests without manually typing XMLHttpRequest
, which is great, because the less I have to see the infuriating camel-casing of XMLHttpRequest
, the happier my life will be.
"then" isn't the end of the story, you can chain "then"s together to transform values or run additional async actions one after another.
You can transform values simply by returning the new value:
var promise = new Promise(function(resolve, reject) { resolve(1); }); promise.then(function(val) { console.log(val); // 1 return val + 2; }).then(function(val) { console.log(val); // 3 });
As a practical example, let's go back to:
get('story.json').then(function(response) { console.log("Success!", response); });
The response is JSON, but we're currently receiving it as plain text. We could alter our get function to use the JSON responseType
, but we could also solve it in promises land:
get('story.json').then(function(response) { return JSON.parse(response); }).then(function(response) { console.log("Yey JSON!", response); });
Since JSON.parse
takes a single argument and returns a transformed value, we can make a shortcut:
get('story.json').then(JSON.parse).then(function(response) { console.log("Yey JSON!", response); });
Click here to see that in action, check the console in DevTools to see the result. In fact, we could make a getJSON
function really easily:
function getJSON(url) { return get(url).then(JSON.parse); }
getJSON
still returns a promise, one that fetches a url then parses the response as JSON.
You can also chain "then"s to run async actions in sequence.
When you return something from a "then" callback, it's a bit magic. If you return a value, the next "then" is called with that value. However, if you return something promise-like, the next "then" waits on it, and is only called when that promise settles (succeeds/fails). For example:
getJSON('story.json').then(function(story) { return getJSON(story.chapterUrls[0]); }).then(function(chapter1) { console.log("Got chapter 1!", chapter1); });
Here we make an async request to "story.json", which gives us a set of URLs to request, then we request the first of those. This is when promises really start to stand out from simple callback patterns. You could even make a shortcut method to get chapters:
var storyPromise; function getChapter(i) { storyPromise = storyPromise || getJSON('story.json'); return storyPromise.then(function(story) { return getJSON(story.chapterUrls[i]); }) } // and using it is simple: getChapter(0).then(function(chapter) { console.log(chapter); return getChapter(1); }).then(function(chapter) { console.log(chapter); });
We don't download "story.json" until getChapter
is called, but the next time(s) getChapter
is called we reuse the story promise, so story.json is only fetched once. Yay Promises!
As we saw earlier, "then" takes two arguments, one for success, one for failure (or fulfill and reject, in promises-speak):
get('story.json').then(function(response) { console.log("Success!", response); }, function(error) { console.log("Failed!", error); });
You can also use "catch":
get('story.json').then(function(response) { console.log("Success!", response); }).catch(function(error) { console.log("Failed!", error); });
There's nothing special about "catch", it's just sugar for then(undefined, func)
, but it's more readable. Note that the two code examples above do not behave the same, the latter is equivalent to:
get('story.json').then(function(response) { console.log("Success!", response); }).then(undefined, function(error) { console.log("Failed!", error); });
The difference is subtle, but extremely useful. Promise rejections skip forward to the next "then" with a rejection callback (or "catch", since it's equivalent). With then(func1, func2)
, func1
or func2
will be called, never both. But with then(func1).catch(func2)
, both will be called if func1
rejects, as they're separate steps in the chain. Take the following:
asyncThing1().then(function() { return asyncThing2(); }).then(function() { return asyncThing3(); }).catch(function(err) { return asyncRecovery1(); }).then(function() { return asyncThing4(); }, function(err) { return asyncRecovery2(); }).catch(function(err) { console.log("Don't worry about it"); }).then(function() { console.log("All done!"); });
The flow above is very similar to normal JavaScript try/catch, errors that happen within a "try" go immediately to the "catch" block. Here's the above as a flowchart (because I love flowcharts):
Follow the green lines for promises that fulfill, or the red for ones that reject.
Rejections happen when a promise is explicitly rejected, but also implicitly if an error is thrown in the constructor callback:
var jsonPromise = new Promise(function(resolve, reject) { // JSON.parse throws an error if you feed it some // invalid JSON, so this implicitly rejects: resolve(JSON.parse("This ain't JSON")); }); jsonPromise.then(function(data) { // This never happens: console.log("It worked!", data); }).catch(function(err) { // Instead, this happens: console.log("It failed!", err); });
This means it's useful to do all your promise-related work inside the promise constructor callback, so errors are automatically caught and become rejections.
The same goes for errors thrown in "then" callbacks.
get('/').then(JSON.parse).then(function() { // This never happens, '/' is an HTML page, not JSON // so JSON.parse throws console.log("It worked!", data); }).catch(function(err) { // Instead, this happens: console.log("It failed!", err); });
With our story and chapters, we can use catch to display an error to the user:
getJSON('story.json').then(function(story) { return getJSON(story.chapterUrls[0]); }).then(function(chapter1) { addHtmlToPage(chapter1.html); }).catch(function() { addTextToPage("Failed to show chapter"); }).then(function() { document.querySelector('.spinner').style.display = 'none'; });
If fetching story.chapterUrls[0]
fails (eg http 500 or user is offline), it'll skip all following success callbacks, which includes the one in getJSON
which tries to parse the response as JSON, and also skips the callback that adds chapter1.html to the page. Instead it moves onto the catch callback. As a result, "Failed to show chapter" will be added to the page if any of the previous actions failed.
Like JavaScript's try/catch, the error is caught and subsequent code continues, so the spinner is always hidden, which is what we want. The above becomes a non-blocking async version of:
try { var story = getJSONSync('story.json'); var chapter1 = getJSONSync(story.chapterUrls[0]); addHtmlToPage(chapter1.html); } catch (e) { addTextToPage("Failed to show chapter"); } document.querySelector('.spinner').style.display = 'none';
You may want to "catch" simply for logging purposes, without recovering from the error. To do this, just rethrow the error. We could do this in our getJSON
method:
function getJSON(url) { return get(url).then(JSON.parse).catch(function(err) { console.log("getJSON failed for", url, err); throw err; }); }
So we've managed to fetch one chapter, but we want them all. Let's make that happen.
Thinking async isn't easy. If you're struggling to get off the mark, try writing the code as if it were synchronous. In this case:
try { var story = getJSONSync('story.json'); addHtmlToPage(story.heading); story.chapterUrls.forEach(function(chapterUrl) { var chapter = getJSONSync(chapterUrl); addHtmlToPage(chapter.html); }); addTextToPage("All done"); } catch (err) { addTextToPage("Argh, broken: " + err.message); } document.querySelector('.spinner').style.display = 'none';
That works (see example)! But it's sync and locks up the browser while things download. To make this work async we use "then" to make things happen one after another.
getJSON('story.json').then(function(story) { addHtmlToPage(story.heading); // TODO: for each url in story.chapterUrls, fetch & display }).then(function() { // And we're all done! addTextToPage("All done"); }).catch(function(err) { // Catch any error that happened along the way addTextToPage("Argh, broken: " + err.message); }).then(function() { // Always hide the spinner document.querySelector('.spinner').style.display = 'none'; });
But how can we loop through the chapter urls and fetch them in order? This doesn't work:
story.chapterUrls.forEach(function(chapterUrl) { // Fetch chapter getJSON(chapterUrl).then(function(chapter) { // and add it to the page addHtmlToPage(chapter.html); }); });
"forEach" isn't async-aware, so our chapters would appear in whatever order they download, which is basically how Pulp Fiction was written. This isn't Pulp Fiction, so let's fix it…
We want to turn our chapterUrls
array into a sequence of promises. We can do that using "then":
// Start off with a promise that always resolves var sequence = Promise.resolve(); // Loop through our chapter urls story.chapterUrls.forEach(function(chapterUrl) { // Add these actions to the end of the sequence sequence = sequence.then(function() { return getJSON(chapterUrl); }).then(function(chapter) { addHtmlToPage(chapter.html); }); });
This is the first time we've seen Promise.resolve
, which creates a promise that resolves to whatever value you give it. If you pass it an instance of Promise
it'll simply return it (note: this is a change to the spec that some implementations don't yet follow). If you pass it something promise-like (has a 'then' method), it creates a genuine Promise
that fulfills/rejects in the same way. If you pass in any other value, eg Promise.resolve('Hello')
, it creates a promise that fulfills with that value. If you call it with no value, as above, it fulfills with "undefined".
There's also Promise.reject(val)
, which creates a promise that rejects with the value you give it (or undefined).
We can tidy up the above code using array.reduce
:
// Loop through our chapter urls story.chapterUrls.reduce(function(sequence, chapterUrl) { // Add these actions to the end of the sequence return sequence.then(function() { return getJSON(chapterUrl); }).then(function(chapter) { addHtmlToPage(chapter.html); }); }, Promise.resolve());
This is doing the same as the previous example, but doesn't need the separate "sequence" variable. Our reduce callback is called for each item in the array. "sequence" is Promise.resolve()
the first time around, but for the rest of the calls "sequence" is whatever we returned from the previous call. array.reduce
is really useful for boiling an array down to a single value, which in this case is a promise.
Let's put it all together…
getJSON('story.json').then(function(story) { addHtmlToPage(story.heading); return story.chapterUrls.reduce(function(sequence, chapterUrl) { // Once the last chapter's promise is done… return sequence.then(function() { // …fetch the next chapter return getJSON(chapterUrl); }).then(function(chapter) { // and add it to the page addHtmlToPage(chapter.html); }); }, Promise.resolve()); }).then(function() { // And we're all done! addTextToPage("All done"); }).catch(function(err) { // Catch any error that happened along the way addTextToPage("Argh, broken: " + err.message); }).then(function() { // Always hide the spinner document.querySelector('.spinner').style.display = 'none'; });
And there we have it (see example), a fully async version of the sync version. But we can do better. At the moment our page is downloading like this:
Browsers are pretty good at downloading multiple things at once, so we're losing performance by downloading chapters one after the other. What we want to do is download them all at the same time, then process them when they've all arrived. Thankfully there's an API for this:
Promise.all(arrayOfPromises).then(function(arrayOfResults) { //... });
Promise.all
takes an array of promises and creates a promise that fulfills when all of them successfully complete. You get an array of results (whatever the promises fulfilled to) in the same order as the promises you passed in.
getJSON('story.json').then(function(story) { addHtmlToPage(story.heading); // Take an array of promises and wait on them all return Promise.all( // Map our array of chapter urls to // an array of chapter json promises story.chapterUrls.map(getJSON) ); }).then(function(chapters) { // Now we have the chapters jsons in order! Loop through… chapters.forEach(function(chapter) { // …and add to the page addHtmlToPage(chapter.html); }); addTextToPage("All done"); }).catch(function(err) { // catch any error that happened so far addTextToPage("Argh, broken: " + err.message); }).then(function() { document.querySelector('.spinner').style.display = 'none'; });
Depending on connection, this can be seconds faster than loading one-by-one (see example), and it's less code than our first try. The chapters can download in whatever order, but they appear on screen in the right order.
However, we can still improve perceived performance. When chapter one arrives we should add it to the page. This lets the user start reading before the rest of the chapters have arrived. When chapter three arrives, we wouldn't add it to the page because the user may not realise chapter two is missing. When chapter two arrives, we can add chapters two and three, etc etc.
To do this, we fetch JSON for all our chapters at the same time, then create a sequence to add them to the document:
getJSON('story.json').then(function(story) { addHtmlToPage(story.heading); // Map our array of chapter urls to // an array of chapter json promises. // This makes sure they all download parallel. return story.chapterUrls.map(getJSON) .reduce(function(sequence, chapterPromise) { // Use reduce to chain the promises together, // adding content to the page for each chapter return sequence.then(function() { // Wait for everything in the sequence so far, // then wait for this chapter to arrive. return chapterPromise; }).then(function(chapter) { addHtmlToPage(chapter.html); }); }, Promise.resolve()); }).then(function() { addTextToPage("All done"); }).catch(function(err) { // catch any error that happened along the way addTextToPage("Argh, broken: " + err.message); }).then(function() { document.querySelector('.spinner').style.display = 'none'; });
And there we go (see example), the best of both! It takes the same amount of time to deliver all the content, but the user gets the first bit of content sooner.
In this trivial example, all of the chapters arrive around the same time, but the benefit of displaying one at a time will be exaggerated with more, larger chapters.
Doing the above with Node.js-style callbacks or events is around double the code, but more importantly isn't as easy to follow. However, this isn't the end of the story for promises, when combined with other ES6 features they get even easier…
This next bit involves a whole bunch of new ES6 features, but it's not something you need to understand to use promises in your code today. Treat it like a movie trailer for some upcoming blockbuster features.
ES6 also gives us generators, which allow functions to exit at a particular point, like "return", but later resume from the same point and state. Eg:
function *addGenerator() { var i = 0; while (true) { i += yield i; } }
Notice the star before the function name, this makes it a generator. The yield keyword is our return/resume point. We can use it like this:
var adder = addGenerator(); adder.next().value; // 0 adder.next(5).value; // 5 adder.next(5).value; // 10 adder.next(5).value; // 15 adder.next(50).value; // 65
But what does this mean for promises? Well, you can use this return/resume behaviour to write async code that looks like (and is as easy to follow as) synchronous code. Don't worry too much about understanding it line-for-line, but here's a helper function that lets us use 'yield' to wait for promises to settle:
function spawn(generatorFunc) { function continuer(verb, arg) { var result; try { result = generator[verb](arg); } catch (err) { return Promise.reject(err); } if (result.done) { return result.value; } else { return Promise.resolve(result.value).then(onFulfilled, onRejected); } } var generator = generatorFunc(); var onFulfilled = continuer.bind(continuer, "next"); var onRejected = continuer.bind(continuer, "throw"); return onFulfilled(); }
…which I pretty much lifted verbatim from Q, but adapted for JavaScript promises. With this, we can take our final best-case chapter example, mix it with a load of new ES6 goodness, and turn it into:
spawn(function *() { try { // 'yield' effectively does an async wait, // returning the result of the promise let story = yield getJSON('story.json'); addHtmlToPage(story.heading); // Map our array of chapter urls to // an array of chapter json promises. // This makes sure they all download parallel. let chapterPromises = story.chapterUrls.map(getJSON); for (let chapterPromise of chapterPromises) { // Wait for each chapter to be ready, then add it to the page let chapter = yield chapterPromise; addHtmlToPage(chapter.html); } addTextToPage("All done"); } catch (err) { // try/catch just works, rejected promises are thrown here addTextToPage("Argh, broken: " + err.message); } document.querySelector('.spinner').style.display = 'none'; });
This works exactly as before, but so much easier to read. This works in Chrome and Opera today (see example), but first you need to go to about:flags and turn on Enable experimental JavaScript.
This throws together a lot of new ES6 stuff: promises, generators, let, for-of. When we yield a promise, the spawn helper waits for the promise to resolve and returns the final value. If the promise rejects, spawn causes our yield statement to throw an exception, which we can catch with normal JavaScript try/catch. Amazingly simple async coding!
This pattern is so useful, it's coming to ES7 in the form of async functions. It's pretty much the same as above, but no need for a spawn
method.
All methods work in Chrome, Opera and in Firefox Nightly unless otherwise noted. The polyfill provides the below for all browers.
Promise.resolve(promise);
promise.constructor == Promise
)
Promise.resolve(thenable);
Promise.resolve(obj);
obj
. in this situation.Promise.reject(obj);
obj
. For consistency and debugging (e.g. stack traces), obj
should be an instanceof Error
.Promise.all(array);
Promise.resolve
, so the array can be a mixture of promise-like objects and other objects. The fulfillment value is an array (in order) of fulfillment values. The rejection value is the first rejection value.
Promise.race(array);
Note: I'm unconvinced of Promise.race
's usefulness; I'd rather have an opposite of Promise.all
that only rejects if all items reject.
new Promise(function(resolve, reject) {});
resolve(thenable)
thenable
resolve(obj)
obj
reject(obj)
obj
. For consistency and debugging (eg stack traces), obj should be an instanceof Error
. Any errors thrown in the constructor callback will be implicitly passed to reject()
.promise.then(onFulfilled, onRejected)
onFulfilled
is called when/if "promise" resolves.
onRejected
is called when/if "promise" rejects.
Both are optional, if either/both are omitted the next onFulfilled
/onRejected
in the chain is called.
Both callbacks have a single parameter, the fulfillment value or rejection reason.
"then" returns a new promise equivalent to the value you return from onFulfilled
/onRejected
after being passed through Promise.resolve
. If an error is thrown in the callback, the returned promise rejects with that error.promise.catch(onRejected)
promise.then(undefined, onRejected)
Many thanks to Anne van Kesteren, Domenic Denicola, Tom Ashworth, Remy Sharp, Addy Osmani, Arthur Evans, and Yutaka Hirano who proofread this and made corrections/recommendations.
Also, thanks to Mathias Bynens for updating various parts of the article.
{% endblock %}


A greek philospher once said "The most difficult thing in life is to know about yourself." So does true for writing about yourself.But anyways let me try...
My name is Salman khan. I'm 21 yrs old currently pursuing my undergraduation from India. My major intrest lies in Computer Science particularly in Data Science and Machine learning .I love to sing, play basketball and yes to kep things simple.
Stock prediction program was made by me when i was learning data analysis .This project analysis the stocks of the company and predicts about the upcoming trend. I used SARIMA model for forecasting the stocks.
AI assistant for desktop is an python based application that allows you to make your computer do basic things just on your voice commands like Greeting, reading news, announcing the time, searching on Google ,playing ofﬂine music, sending mail, playing video on YouTube etc. and it is written in such a simple structure that any one familiar with python can extend its features.
This project was made as a part of my college project. This project was role based where teachers have the facilities to upload,delete, update Course-Wise notes and students can only browse and download the notes
This is a game very much similar to Flappy bird written in Python.Check it out on my Github account.
This project was made by me as my college project. It is a website that allows user create or login in their account and can post ad for the product the want to buy or sell or the services they want to get or offer
B.Tech in Computer Science
Have a look at my respositries and feel free to give me feedback.


Uncle Tom's Cabin (Told to the Children)
by Harriet Beecher Stowe
Chapter 21: George Shelby Frees His Slaves
Additional Information
- Year Published: 1852
- Language: English
- Country of Origin: United States of America
- Source: Stowe, H. B. (1852). Uncle Tom's Cabin (Told to the Children). H. E. Marshall, (Ed.).
-
Readability:
- Flesch–Kincaid Level: 3.7
- Word Count: 839
- Genre: Historical Fiction
- Keywords: 19th century literature, american literature
- ✎ Cite This
Downloads
George Shelby wrote a little note to his mother, telling her that he was coming home. He tried to write about Uncle Tom, but he could not; tears blinded him, and sobs choked him.
On the day he was expected every one was in a state of bustle and excitement. Aunt Chloe in a new print dress, and clean white apron walked round the supper–table, making sure that everything was right. Her black face shone with joy at the thought of seeing Uncle Tom again.
'I'm thinking my old man won't know the boys and the baby,' she said.
Mrs. Shelby sighed. Ever since the letter had come from George she had had a very sad heart. She felt sure something must be wrong.
'He won't know the baby, my old man won't,' said Chloe again. 'Why, it's five years since they took him.'
Just then the sound of wheels was heard.
'It's Mas'r George,' cried Aunt Chloe, running to the window in great excitement.
Mrs. Shelby ran to the door. As George met her he put his arms around her, and kissed her tenderly.
Aunt Chloe stood behind anxiously looking out into the darkness.
'Oh, poor Aunt Chloe,' said George, gently taking her hard, black hand between both his own. 'I'd have given all my fortune to have brought Uncle Tom home with me; but he has gone to a better country.'
Mrs. Shelby cried out as if she had been hurt, but Aunt Chloe did not make a sound.
In silence they went into the supper–room.
'There,' said Aunt Chloe, holding out her trembling hands to her mistress, 'it's just as I knew it would be. He's been sold and murdered on dem old plantations.'
Then she turned and walked proudly out of the room. Mrs. Shelby followed her softly, took one of her hands, drew her down into a chair, and sat down beside her.
'My poor, good Chloe,' she said gently.

There was silence for a little as they wept together. Then George sat down beside Aunt Chloe, and took her hand. He talked gently to her, telling her of Uncle Tom's last loving messages. So she was comforted a little.
One morning, about a month after this, George Shelby called all his servants together, telling them he had something to say to them.
They wondered what it could be, and were very much surprised when he appeared, carrying a bundle of papers in his hand.
They were still more astonished when he gave a paper to each one, and told them all that they were free.
With sobs and tears and shouts they pressed round him, thanking and blessing him. But some of them came with anxious faces, begging him to take their free papers back again, and not to send them away.
'We don't want to be any freer than we are,' they said.
'We have always had all we wanted.'
'We don't want to leave the old place, and young mas'r and missis, and the rest.'
'My good friends,' said George, when he could get silence, 'there will be no need for you to leave me. We want quite as many servants as we did before. But now you are free men and free women. I shall pay you wages for your work, and if I die, or get into debt, you can't be taken away to be sold. That is all the difference. I want you all to stay with me, for I want to teach you how to live as free men and women ought.'
'One thing more,' added George, when the cheering and rejoicing had died away a little. 'You all remember our good old Uncle Tom. You have heard how he died, and how he sent his love to you all. It was on his grave, my friends, that I made up my mind, with God's help, never to own another slave, if it were possible to free him. I resolved that nobody, through my fault, should ever run the risk of being parted from his dear ones, and of dying far from them, as he died.
 Think of your freedom every time you see Uncle Tom's Cabin; and let it help you to try to live as he did, and be as honest and faithful and Christian as he was.'