Impending End and Beginning
Time passes far too fast. I honestly can’t believe that my time as an Iron Yard student is coming to an end. It feels like just yesterday that I started learning Ruby. Today, building and deploying full stack Rails apps is an everyday fact. Thanks to Jesse and everyone at the Iron Yard, I can now call myself a software engineer. That’s right, this past week I received and accepted an offer to be a full-time software engineer. It has been a long journey from my first line of html over a year and a half ago. I look forward to what I will learn in the next year and a half.
Project Update
So much sadness and happiness but we’re not quite there yet. With my start date on Monday, we have one less week to finish our final project. Fortunately we made some breakthroughs this week. Look at this beauty:
Okay, so it still needs tons of styling but most of the features essential for minimum viable product are up and running. An interesting challenge I faced this week is the restructuring of the data models. It was a ton of headache and fun because the most complicated data relationships I’ve had to deal with so far is probably my Staple project from week 7. Category tags and user follows are easy with gems.
This is the first time I had to create so many relationships by hand. The hard part isn’t actually writing them, however. The hard part is figuring out the best way to structure your models. Users have contact information and locations that they need to share to other users. Users also need contact lists to store other users and they need to be able to choose what information to share on each share. At one point I tried putting everything in a separate model and it got messy fast. I have since found a happy medium but I still can’t shake the feeling that my tables have too many columns that should be their own tables. Hopefully some time later I can look back at the models and laugh at how silly it is.
Random Learning
A fairly common thing I see on job listings is the ability to setup a linux server. Wat. Can I just use Heroku? No clue how to linux so I asked Justin. I’m not sure if I have talked about it but Matt is moving up the Iron Yard ladder and Justin from week 2 fame will be taking over Matt’s teaching duties. So anyways, Justin showed me how he hosts his websites and I was like oh. Using linux is basically using terminal. It makes sense why TIY makes us use macs now. Just ssh into your linux box and ftp your Rails app and all is well. Definitely going to try to port some of my Rails apps to digitalocean or something.
During the interview for my new position, they mentioned that they need Angular.js so I started learning Angular this week. It’s honestly pretty straight forward. You have controllers that you link to your html using directives. I haven’t dug too deep yet but on the surface, it seems easier to understand than React. I still haven’t formed an opinion on which one I like more.
The Talks
Our speaker this week is a revisit from Daniel @ Stackwave. Daniel’s talk is a deeper look into SQL databases. Daniel went over the basic mathematical premise that powers SQL dbs. He also very succulently explained how certain SQL functions like table joins work. For me, the biggest ohhhhh moment is when he explained entity integrity and referential integrity. I had previously thought that uids and foreign keys were the same thing. This made it difficult to understand the point of something like add_index in Rails. I love listening to smart people.
My team and I also had the chance to meet with Hesam again for coffee. We arranged a meet time when we met him last week to get some tips on next steps and focus points for our project if we are to make it commercial. We have been so focused on getting a working product that we completely forgot about some important logistics. Things like time commitments from each member after Iron Yard, equity, and surveying users.
I believe that Brian also gave a cover letter talk but I wasn’t able to make that one :sadface:.
Other Stuff
This upcoming week will be my first week in my new career and demo day. Expect exciting things :).


Odometer readings can be used to calculate mileage. To set this up, follow the steps outlined in red below:
With this option enabled, your mileage will be calculated at the end of your shift.
You can also configure the relevant stats on the Statistics screen to use odometer readings. To do this, follow the steps outlined in red below:


JavaScript is disabled on your browser.
Skip navigation links
Overview
Package
Class
Tree
Deprecated
Index
Help
Prev
Next
Frames
No Frames
All Classes
Hierarchy For All Packages
Package Hierarchies:
com.example.cmput301w19t15
,
com.example.cmput301w19t15.Activity
,
com.example.cmput301w19t15.Functions
,
com.example.cmput301w19t15.InProgress
,
com.example.cmput301w19t15.Objects
Class Hierarchy
java.lang.Object
<any>
com.example.cmput301w19t15.Functions.
FetchBookInfo
com.example.cmput301w19t15.Functions.
FetchBookWithID
com.example.cmput301w19t15.Functions.
FetchBookWithList
com.example.cmput301w19t15.InProgress.
AcceptRequest
android.app.Activity
android.support.v4.app.SupportActivity (implements android.support.v4.view.KeyEventDispatcher.Component, android.arch.lifecycle.LifecycleOwner)
android.support.v4.app.FragmentActivity (implements android.support.v4.app.ActivityCompat.OnRequestPermissionsResultCallback, android.support.v4.app.ActivityCompat.RequestPermissionsRequestCodeValidator, android.arch.lifecycle.ViewModelStoreOwner)
android.support.v7.app.AppCompatActivity (implements android.support.v7.app.ActionBarDrawerToggle.DelegateProvider, android.support.v7.app.AppCompatCallback, android.support.v4.app.TaskStackBuilder.SupportParentable)
com.example.cmput301w19t15.InProgress.
AcceptPage
com.example.cmput301w19t15.Activity.
AddBookInfo
(implements me.dm7.barcodescanner.zxing.ZXingScannerView.ResultHandler)
com.example.cmput301w19t15.Activity.
BookInfo
com.example.cmput301w19t15.InProgress.
BorrowerBookView
com.example.cmput301w19t15.Activity.
CreateRequest
com.example.cmput301w19t15.InProgress.
DetailedBookInfo
com.example.cmput301w19t15.Activity.
FindUsers
(implements com.example.cmput301w19t15.Objects.
UserAdapter.OnItemClickListener
)
com.example.cmput301w19t15.Activity.
LoginActivity
com.example.cmput301w19t15.Activity.
MainActivity
(implements com.example.cmput301w19t15.Objects.
NotifAdapter.OnItemClickListener
)
com.example.cmput301w19t15.Activity.
MyBooks
(implements com.example.cmput301w19t15.Objects.
BookAdapter.OnItemClickListener
)
com.example.cmput301w19t15.Activity.
NotifyActivity
(implements com.example.cmput301w19t15.Objects.
NotifAdapter.OnItemClickListener
)
com.example.cmput301w19t15.Activity.
Profile
com.example.cmput301w19t15.Activity.
RatingTest
com.example.cmput301w19t15.Activity.
RegisterActivity
com.example.cmput301w19t15.Activity.
RequestedBookList
(implements com.example.cmput301w19t15.Objects.
BookAdapter.OnItemClickListener
)
com.example.cmput301w19t15.Functions.
ScanBarcode
com.example.cmput301w19t15.Activity.
ViewAcceptedOwnerRequest
com.example.cmput301w19t15.Activity.
ViewAcceptedRequest
(implements com.google.android.gms.maps.OnMapReadyCallback, me.dm7.barcodescanner.zxing.ZXingScannerView.ResultHandler)
com.example.cmput301w19t15.Activity.
ViewReturnRequestBorrower
(implements com.google.android.gms.maps.OnMapReadyCallback, me.dm7.barcodescanner.zxing.ZXingScannerView.ResultHandler)
com.example.cmput301w19t15.Activity.
ViewReturnRequestOwner
com.example.cmput301w19t15.
GeoLocation
(implements com.google.android.gms.maps.GoogleMap.OnMapClickListener, com.google.android.gms.maps.OnMapReadyCallback)
android.support.test.rule.ActivityTestRule<T> (implements org.junit.rules.TestRule)
com.example.cmput301w19t15.
AccountActivityTest
com.example.cmput301w19t15.
LoginActivityTest
com.example.cmput301w19t15.
MainActivityTest
com.example.cmput301w19t15.
TransactionTest
com.example.cmput301w19t15.Objects.
Book
com.example.cmput301w19t15.
BookTest
com.example.cmput301w19t15.Functions.
ConvertPhoto
com.example.cmput301w19t15.
ExampleInstrumentedTest
com.example.cmput301w19t15.
ExampleUnitTest
com.example.cmput301w19t15.InProgress.
Exchange
com.example.cmput301w19t15.
ExchangeTest
com.example.cmput301w19t15.Activity.
FindBooks
com.example.cmput301w19t15.InProgress.
Location
com.example.cmput301w19t15.
LocationTest
com.example.cmput301w19t15.
MyBooksTest
com.example.cmput301w19t15.
MyFirebaseMessagingService
com.example.cmput301w19t15.Objects.
Notification
(implements java.io.Serializable)
android.support.v7.widget.RecyclerView.Adapter<VH>
com.example.cmput301w19t15.Objects.
BookAdapter
com.example.cmput301w19t15.Objects.
NotifAdapter
com.example.cmput301w19t15.Objects.
UserAdapter
android.support.v7.widget.RecyclerView.ViewHolder
com.example.cmput301w19t15.Objects.
BookAdapter.BookViewHolder
com.example.cmput301w19t15.Objects.
NotifAdapter.NotifViewHolder
com.example.cmput301w19t15.Objects.
UserAdapter.UserViewHolder
com.example.cmput301w19t15.InProgress.
Request
com.example.cmput301w19t15.
RequestTest
android.app.Service
com.google.firebase.iid.zzb
com.google.firebase.messaging.FirebaseMessagingService
com.example.cmput301w19t15.
FirebaseIDService
com.example.cmput301w19t15.Objects.
User
com.example.cmput301w19t15.
UserTest
Interface Hierarchy
com.example.cmput301w19t15.Objects.
BookAdapter.OnItemClickListener
com.example.cmput301w19t15.Activity.
FindUsers.loadUserCallBack
com.example.cmput301w19t15.Activity.
MainActivity.loadNotifCallBack
com.example.cmput301w19t15.Objects.
NotifAdapter.OnItemClickListener
com.example.cmput301w19t15.Activity.
NotifyActivity.loadNotifCallBack
com.example.cmput301w19t15.Activity.
RatingTest.loadBookCallBack
com.example.cmput301w19t15.Objects.
User.loadBookIDCallBack
com.example.cmput301w19t15.Objects.
User.loadUserCallBack
com.example.cmput301w19t15.Objects.
UserAdapter.OnItemClickListener
Enum Hierarchy
java.lang.Object
java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable)
com.example.cmput301w19t15.Objects.
Book.Status
Skip navigation links
Overview
Package
Class
Tree
Deprecated
Index
Help
Prev
Next
Frames
No Frames
All Classes


Used in the stress test to get baseline performance before server side scripting, frameworks, and database get brought in.


X 0
Made By Sedra Merkhan , Houmam albazzal , Mostafa Kashoul Milly , Abdulalem al said , abd alrahman armashi


X1 ultimately cancel their appearance at the '2019 V Live Awards V Heartbeat'
by beansssOn November 15, Mnet released an official statement to the press confirming that project group X1 has ultimately decided to cancel their appearance at the 'V Live Awards V Heartbeat'.
Mnet wrote, "Hello, this is Mnet. We would like to sincerely apologize for all of the concerns that our programs have caused. After carefully considering the response of the public and the media in light of current events, X1 have ultimately decided not to attend the '2019 V Live Awards V Heartbeat', set to take place on November 16. Furthermore, the group does not have any more schedules planned as of now. We want to once again sincerely apologize for failing to keep our end of the promise for this event, toward the fans who were waiting for X1, as well as the staff members of 'V Live'."
The '2019 V Live Awards V Heartbeat' is set to take place this November 16 at 6 PM KST at the Gocheok Sky Dome in Seoul, airing live.


|
|
unsigned long | beam1VelValid: 1 |
| |
|
unsigned long | beam2VelValid: 1 |
| |
|
unsigned long | beam3VelValid: 1 |
| |
|
unsigned long | beam4VelValid: 1 |
| |
|
unsigned long | beam1DistValid: 1 |
| |
|
unsigned long | beam2DistValid: 1 |
| |
|
unsigned long | beam3DistValid: 1 |
| |
|
unsigned long | beam4DistValid: 1 |
| |
|
unsigned long | beam1FOMValid: 1 |
| |
|
unsigned long | beam2FOMValid: 1 |
| |
|
unsigned long | beam3FOMValid: 1 |
| |
|
unsigned long | beam4FOMValid: 1 |
| |
|
unsigned long | xVelValid: 1 |
| |
|
unsigned long | yVelValid: 1 |
| |
|
unsigned long | z1VelValid: 1 |
| |
|
unsigned long | z2VelValid: 1 |
| |
|
unsigned long | xFOMValid: 1 |
| |
|
unsigned long | yFOMValid: 1 |
| |
|
unsigned long | z1FOMValid: 1 |
| |
|
unsigned long | z2FOMValid: 1 |
| |
|
unsigned long | procIdle3: 1 |
| |
|
unsigned long | procIdle6: 1 |
| |
|
unsigned long | procIdle12: 1 |
| |
|
unsigned long | _empty1: 5 |
| |
|
unsigned long | wakeupstate: 4 |
| |
The documentation for this struct was generated from the following file:
- hardware_layer/hardware_dvl_ethernet/include/dvl_data.h


Contents
function drawSoccerBall
%DRAWSOCCERBALL Draw a soccerball using geom3d library % % This demo shows how to use some functions of the geom3d library to % compute and display arcs of a soccer ball. % % In particular, it shows how to: % * create spheres, circles, circle arcs % * create a pre-defined polyhedron % * display 3D shapes % * compute face centroids % * compute intersections of planes, spheres, lines % * draw spherical patches % % Usage: % drawSoccerBall % % % ------ % Author: David Legland % e-mail<EMAIL_ADDRESS>% Created: 2009-06-22, using Matlab <IP_ADDRESS>1 (R2008b) % Copyright 2009 INRA - Cepia Software Platform.
Initialisation
% origin of 3D basis, which is also the soccerball center origin = [0 0 0]; % the bounding sphere of the soccer ball, used for computing circles sphere = [origin 1]; % extract vertices, edges, and faces of soccerball polyhedron [vertices edges faces] = createSoccerBall; % prepare figure figure(1); clf; hold on; axis equal; % draw the polyhedron as basis drawPolyhedron(vertices, faces);
Draw Faces
% For each face, draw a spherical surface, composed of several triangular % patches, with a specific color for f = 1:length(faces) % extract vertices of current face faceVertices = faces{f}; Nvf = length(faceVertices); % compute centroid of face vertices % (See also function faceCentroids) faceCenter = centroid(vertices(faceVertices, :)); % color of the current face (black for pentagons, white for heaxagons) if Nvf == 5 color = 'k'; else color = 'w'; end % compute and display the spherical face associated with each face for i = 1:Nvf % current vertices of face edge vertex1 = vertices(faceVertices(i), :); vertex2 = vertices(faceVertices(mod(i, Nvf)+1), :); % draw a portion of the current face fillSphericalTriangle(sphere, faceCenter, vertex1, vertex2, ... 'faceColor', color); end end
Draw edges
% For each edge, draw a circle arc on the sphere for i = 1:size(edges, 1) % extremities of current edge point1 = vertices(edges(i, 1), :); point2 = vertices(edges(i, 2), :); % compute plane containing current edge plane = createPlane(origin, point1, point2); % intersection of the plane with unit sphere circle = intersectPlaneSphere(plane, sphere); % find the position (in degrees) of the 2 vertices on the circle angle1 = circle3dPosition(point1, circle); angle2 = circle3dPosition(point2, circle); % ensure angles are in right direction if mod(angle2 - angle1 + 360, 360) > 180 tmp = angle1; angle1 = angle2; angle2 = tmp; end % compute angle extent of the circle arc angleExtent = mod(angle2 - angle1 + 360, 360); % create circle arc arc = [circle angle1 angleExtent]; % draw the arc drawCircleArc3d(arc, 'linewidth', 2, 'color', 'k'); end axis off; axis vis3d;


Many of ChemSpider's SOAP methods require security tokens while many of their REST methods don't. Just to be safe, grab a token from their Registration Pageby first getting an RSC ID (Royal Society of Chemistry), merging a ChemSpider account, and extracting the security token from the Profile Link they mention on page zero. It may be difficult to get to the Profile page from your actual account, counterintuitively; the link Profile Page link may keep you sane.
Of course, before you start casting spells at the ChemSpider, Cross-Origin Resource Sharing prevents wizards from mixing potions using connections from different internet domains. If you are considering a Subscriber Service for your mighty guild of applications, consider giving the good old guys at the Royal Chemical Society a call to get cross sharing access. For testing purposes, making connections from your local server works fine, granted you have something like XMLHttpRequest installed server-side when using javascript. While XMLHttpRequest usually comes with browsers so that it's connections can be rejected by its own CORS anti-browsing function, XMLHttpRequest usually doesn't come with server's where it can run freely. It's quite ironic really, or i've had one too many potions today.
For those inclined for Node.JS, it behooves you to install XMLHttpRequest through NPM (Node Package Module):
npm install xmlhttprequest
Then later, after you forgot what you just installed, you can imbed XMLHttpRequest in your infamous script:
var XMLHttpRequest = require('xmlhttprequest').XMLHttpRequest;
var request = new XMLHttpRequest();


For the next half an hour I will be talking to you about a topic I am quite passionate about, Speech Recognition.
WHY it's a such a big deal these days, HOW it works, and HOW to use it on the web
Mihai Cîrlănaru
Software Development Lead
First off, a bit about myself, my name is Mihai, almost did a PhD in NLP a few years back, but went to the
dark side (joined a startup) and now I'm a team lead based in Germany, working on full-stack web for Hudl,
a sports technology company that builds performance analysis tools for coaches and athletes.
Speech Recognigion has been around for decades (early 1950s) but because it is such a HARD problem (just think of
all the factors that play into it: accent, pronunciation, pitch, volume, and speed) it was mainly targetting
highly specialized domains:
- speaker dependent: involves a training step where a user is asked to read some sentences -> fine tune
- command based/limited vocab: e.g. call routing, digit recognition
But then, technology caught up and starting with Apple's Siri in 2011 a wave a voice-enabled devices/personal
assistants started to pick up.
But then, technology caught up and starting with Apple's Siri in 2011 a wave a voice-enabled devices/personal
assistants started to pick up.
While not perfect back then, Siri opened the door to a wide range of voice-enabled interactions, making
technology more intuitive and even fun.
How many of you used Siri so far?
A few years later (2014), Amazon took the voice-enabled assistant to a whole new level, these black cylindrical
speakers with the glowing blue LED ring quickly became the staple of home automation and pretty much
kick off a whole new market of IoT devices that can be controlled with one's voice.
How many of you used Alexa so far?
While Google did have voice input for search, it was only in 2016 that they created their own clever home decoration
appliance in the shape of a flower-vase.
How many of you used Google voice input?
And as it turns out, more and more of these voice-enabled devices are coming up soon.
And as it turns out, more and more of these voice-enabled devices are coming up soon
Drawing a parallel to the smartphone revolution, this might just be the Voice Speaker Revolution.
And as we saw here on a smaller scale, there are actually a lot of people using these -- in the US alone
In the US alone approx 55 million people use a voice enabled digital assistant,
with the trend is going upward.
But how come this exploded now?
Well, speech recognition got very GOOD these days -- in terms of numbers (and I'll explain these in a bit)
Google managed to improve their own speech recognizer's error rate from a 23% to 4.9% in a handful of years and
Baidu has currently knocked that out of the park with a 3.7% error rate achieved by its Deep Speech 2 system.
If you are wondering what this error rate actually means: it is the sum of all errors the system produces over
the size of the reference speech. These errors can be Insertions, Substitutions and Deletions.
Then sure, you might say nice numbers and math, but what does that mean?
It turns out speech recognition systems are so good that they can even beat humans to it.
And there's research to prove it -- a group from Stanford proved that
A group from Stanford used the speech rec tech from Baidu (the 3.7% one from earlier) and tested it
vs people at transcribing speech -- and guess what it is better, 3x faster -- and if you check out the
research at that link you will also learn that it performs better in terms of correctness for mandarin.
And if you used one of these devices you will not be surprised at all by these results --
I personally have no idea how the app to set reminders or timers looks like, I just use Alexa or Siri.
Now that we've seen how big of deal it is let's see how it works
Now that we've seen how big of deal it is let's see how it works
What our voice produces is a continuous sound wave whose amplitude varies based on the sounds involved.
The recognition process works as follows
Split the waveform in utterances (words or other non-linguistic sounds) by silences
Each utterance is split in frames and for each frame a feature vector is computed -- a set of numbers representing
distinguishable properties of a sound
Using a series of models, the search space for a match is significantly reduced and thus recognition is made
possible in a finite amount of time:
- acoustic model contains acoustic properties for each distinct unit of sound (senone)
- phonetic dictionary provides information on how to pronounce each word
- language model is used to restrict word search
And for the speech represented here the decoding would be "Hello World" -- just in case you wondered
how speech recognizers are assessed
Now that we got this out of the way, let's get to the fun part
Now that we got this out of the way, let's get to the fun part.
And as every good talk should have a good story I'm going to tell you one about my experience with
Speech Recognition on the Web.
I started playing around with speech recognition a few years back when I was studying about it for
my Masters degree and got this great opportunity to put in practice what I learned about speech recognition
within the Research Team at this small little tech company in the Valley
Within the Research Team at Mozilla, to build a speech recognition engine for the now defunct Firefox OS
Mozilla’s mobile phone operating system built entirely using web technologies. RIP it was a great
Being a research project, the focus was more on exploring what is even possible in terms of speech recognition
for the web, rather than have something production ready.
DEMO
github.com/mihai/talk.js
During my time there, I have built a pure JavaScript speech recognizer that performs the decoding process
on the client, without the need of any cloud-based backend to send the speech to for decoding.
And I'm going to show it to you -- to make it even more exciting I'm going to kill the network on this --
don't try this in live demos
If you are interested more on how this was built, and how it works behind the scenes,
feel free to grab me after the talk.
Web Speech API Spec
bit.ly/WebSpeechSpec
Little did I know, around the same time, a team from Google were writing a spec for Web Speech APIs
-- defining JavaScript APIs that would allow developers to incorporate speech recognition into their web pages.
About a year later, with Chrome v25, Web Speech APIs were out. Whereas Chrome had speech input capabilities
with x-webkit-speech attribute (now deprecated) to input fields since v11.
Ok, so let’s see how these APIs look like in practice
Web Speech API
bit.ly/WebSpeechAPI
const SpeechRecognition = SpeechRecognition || webkitSpeechRecognition;
let recognizer = null;
if (!SpeechRecognition) {
console.error("Web Speech APIs not supported in your browser");
} else {
recognizer = new SpeechRecognition();
}
You first need to instantiate a Speech Recognition object, and since the APIs are still experimental they
do need the browser prefix for Chrome (not for Firefox though).
Speech Recognition Attributes
bit.ly/WebSpeechAPI
// Sets the language to be recognized (32 languages
// supported, incl. Romanian)
recognizer.lang = 'en-US';
// Get recognition results as early as possible,
// even if they will change
recognizer.interimResults = true;
// Continuously listen to speech, regardless if
// the user takes pauses or not
recognizer.continuous = true;
// The number of alternative recognition
// matches to be returned
recognizer.maxAlternatives = 3;
…
Some of the most relevant configuration attributes of the speech recognition instance.
Speech Recognition Event Handlers
bit.ly/WebSpeechAPI
recognizer.onresult // Whenever a speech recognition match is found
recognizer.onnomatch // When no match was found for the current speech
recognizer.onerror // When an error occurred
…
There are a few event handlers provided for the Speech Recognition interface, and I would recommend you check
the full API at http://bit.ly/WebSpeechAPI, however the minimum needed to get you started are:
onresult, onnomatch, onerror
Speech Recognition Control
bit.ly/WebSpeechAPI
recognizer.start();
recognizer.abort();
recognizer.stop();
In terms of controlling the recognizer we have a pretty self-explanatory API: start and stop.
And one last piece to the puzzle, this is how a Speech Recognition onResult event format looks like.
Speech Recognition Result format
bit.ly/WebSpeechAPI
// results[i][0].transcript -- top confidence transcription for result i
{
results: [ // SpeechRecognitionResultList
[ // SpeechRecognitionResult
{ // SpeechRecognitionAlternative
transcript: "hello",
confidence: 0.8999,
isFinal: false
},
{ // SpeechRecognitionAlternative
transcript: "world",
confidence: 0.4792,
isFinal: false
}
],
]
…
}
SpeechRecognitionResultList -- each result has multiple alternatives results[0][0].transcript to get the
first result with highest probability
isFinal -- this result is not an interim result and thus it will not change
Privacy
bit.ly/WebSpeechAPI
In terms of privacy, Chrome needs to ask the user for permission to use the microphone, in which case onstart only
fires when and if the user allows permission.
Pages hosted on HTTPS do not need to ask repeatedly for permission, whereas HTTP hosted pages do.
And this brings us to the last point about the WebSpeech API
Browser Support
caniuse.com/#feat=speech-recognition
As you can see support is not that great, it’s only Chrome and Opera that support it out of the box,
whereas Firefox needs the webspeech recognition flag set. Microsoft is currently working on it for Edge.
This image might look grim, but hey the global browser usage percentage is 60% and FF supports it behind a config flag
and this shouldn't discourage you from experimenting with new ways of improving UX using voice in your web apps.
And on that note,
Mihai Cîrlănaru
@MCirlanaru
Just imagine, how cool would it be to have live transcription of your talk using speech recognition, on the web
how crazy is that? Thank you


Who can ever say to him, 'You have committed unrighteousness?'
24 Remember to praise his deeds,
of which people have sung.
25 All people have looked on those deeds,
but they see those deeds only from far away.
26 See, God is great, but we do not understand him well;
the number of his years is incalculable.
27 For he draws up the drops of water
that distill as rain from his vapor,
28 which the clouds pour down
and drop in abundance on mankind.
29 Indeed, can anyone understand the extensive spread of the clouds
and the thunder from his tent?
30 See, he spreads his lightning around himself;
he covers up the sea with darkness.
31 In this way he feeds the peoples
and gives food in abundance.
32 He covers his hands over the lightning bolts
until he commands them to hit their targets.
33 Their noise tells people of the coming storm;
the cattle also know of its approach.


This website is an assignment for a graduate level course, IS 601 - Web Systems Development. This course is offered at New Jersey Institute of Technology in Newark, New Jersey.
This assignment titled, "Website on Docker, Linux, and Containerization", is an information based assignment, which is going to help students gain a better understanding of Docker, Linux, and Containerization. The main goal behind this project is to help students understand what Docker is, how it works, and why we use it. The information learned here will be used in other projects throughout the semester.
Finally, any external sources will be linked at the bottom of each page for your information/research.


Namespace prefixes are used extensively in the UI and proprietary search interfaces. Representing a long URI in short nsPrefix:localName not only shortens ID's but makes it more readable and easily usable in e.g. XML/HTML ID's with only minor tweek (replace ':' with e.g. '-'). Used NS prefixes are the same all around semantic.hri.fi and can be queried using SPARQL:
SELECT ?ns ?prefix WHERE { ?ns <http://data.mysema.com/schemas/meta#nsPrefix> ?prefix }
Faceted search is built using multiple (small) SPARQL queries in back-end. Depending on parameters, queries are optimized differently, e.g. binding values directly in graph patterns or in filter clause. Examples of used SPARQL queries can be acquired from Faceted Search "Show SPARQL" -link. Note that in terms of faceted search the dataset of an item is just another dimension, but in Scovo it is modelled using diffent predicate (scv:dataset instead of scv:dimension).
Another optimization is that when there's only one or two facet restrictions only available facet values are queried from dataset metadata using proprietary stat:datasetDimension predicate.
When there's three or more restrictions, queries are targetted to actual statistical items. First we query for available distinct datasets, then available distinct dimension values, then actual items (single valued properties) with limit and offset and lastly for each item it's dimensions. In this case making multiple small and relatively simple queries is more efficient than one large one.
For paging we always query for one extra item over the given limit. If this extra row exists, there is items for at least one another page and there is no need for count-query.
For query building we use RDFBean's RDF Queries. It makes building dynamic queries programmatically more reliable and easier than via string concatenation.
The Map Demo uses Google Maps to visualize area polygons of the Finnish capital region. The polygon data is provided in JSON form to the Google Maps script and additional area specific metadata such as example statistics and DBpedia descriptions are loaded lazily via Ajax/HTTP.
The polygon visualization uses the Google Maps JavaScript library and Polygonzo for fast polygon rendering. Polygonzo processes the polygon data via JSON objects in GeoJSON form.
SPARQL queryies can be executed both via the query form and the SPARQL HTTP endpoint. The SPARQL HTTP endpoint is SPARQL 1.0 compliant with the exception that limit and offset have to be provided via limit and offset HTTP parameters. When LIMIT and/or OFFSET are declared in the query, the query processing might fail.


Questions? Contact us here!
Address: A big island in the ocean
Phone Number: A phone in the ocean
Email Address: acomputer@theocean.sea


Play audio tracks in browser
Watch videos in browser
Play audio tracks in VLC
Watch videos in VLC
Download
00:00:00
?
Enhancing directory listing...


Class DurableTaskExtension
Configuration for the Durable Functions extension.
Inheritance
Inherited Members
Namespace: Microsoft.Azure.WebJobs.Extensions.DurableTask
Assembly: Microsoft.Azure.WebJobs.Extensions.DurableTask.dll
Syntax
public class DurableTaskExtension : IExtensionConfigProvider, IAsyncConverter<HttpRequestMessage, HttpResponseMessage>, INameVersionObjectManager<TaskOrchestration>, INameVersionObjectManager<TaskActivity>
Properties
| Improve this Doc View SourceAzureStorageConnectionStringName
Gets or sets the name of the Azure Storage connection string used to manage the underlying Azure Storage resources.
Declaration
public string AzureStorageConnectionStringName { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String | The name of a connection string that exists in the app's application settings. |
Remarks
If not specified, the default behavior is to use the standard AzureWebJobsStorage
connection string for all storage usage.
ControlQueueBatchSize
Gets or sets the number of messages to pull from the control queue at a time.
Declaration
public int ControlQueueBatchSize { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 | A positive integer configured by the host. The default value is |
ControlQueueVisibilityTimeout
Gets or sets the visibility timeout of dequeued control queue messages.
Declaration
public TimeSpan ControlQueueVisibilityTimeout { get; set; }
Property Value
| Type | Description |
|---|---|
| System.TimeSpan | A |
DisableHttpManagementApis
Gets or sets a value indicating whether to expose HTTP APIs for managing orchestration instances.
Declaration
public bool DisableHttpManagementApis { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
Remarks
Orchestration instances can be managed using HTTP APIs implemented by the Durable Functions extension.
This includes checking status, raising events, and terminating instances. These APIs do not require
any authentication and therefore the instance IDs for these URLs should not be shared externally.
These APIs are enabled by default but can be disabled by setting this property to true
.
HubName
Gets or sets default task hub name to be used by all DurableOrchestrationClient, DurableOrchestrationContext, and DurableActivityContext instances.
Declaration
public string HubName { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String | The name of the default task hub. |
Remarks
A task hub is a logical grouping of storage resources. Alternate task hub names can be used to isolate multiple Durable Functions applications from each other, even if they are using the same storage backend.
MaxConcurrentTaskActivityWorkItems
Gets or sets the maximum number of work items that can be processed concurrently on a single node.
Declaration
public int MaxConcurrentTaskActivityWorkItems { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 | A positive integer configured by the host. The default value is 10. |
MaxConcurrentTaskOrchestrationWorkItems
Gets or sets the maximum number of orchestrations that can be processed concurrently on a single node.
Declaration
public int MaxConcurrentTaskOrchestrationWorkItems { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 | A positive integer configured by the host. The default value is 100. |
NotificationUrl
The notification URL for polling status of instances.
Declaration
public Uri NotificationUrl { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Uri | A URL pointing to the hosted function app that responds to status polling requests. |
TraceInputsAndOutputs
Gets or sets a value indicating whether to trace the inputs and outputs of function calls.
Declaration
public bool TraceInputsAndOutputs { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
Remarks
The default behavior when tracing function execution events is to include the number of bytes in the serialized
inputs and outputs for function calls. This provides minimal information about what the inputs and outputs look
like without bloating the logs or inadvertently exposing sensitive information to the logs. Setting
TraceInputsAndOutputs to true
will instead cause the default function logging to log
the entire contents of function inputs and outputs.
WorkItemQueueVisibilityTimeout
Gets or sets the visibility timeout of dequeued work item queue messages.
Declaration
public TimeSpan WorkItemQueueVisibilityTimeout { get; set; }
Property Value
| Type | Description |
|---|---|
| System.TimeSpan | A |
Explicit Interface Implementations
| Improve this Doc View SourceINameVersionObjectManager<TaskActivity>.Add(ObjectCreator<TaskActivity>)
Declaration
void INameVersionObjectManager<TaskActivity>.Add(ObjectCreator<TaskActivity> creator)
Parameters
| Type | Name | Description |
|---|---|---|
| DurableTask.Core.ObjectCreator<DurableTask.Core.TaskActivity> | creator |
Implements
INameVersionObjectManager<TaskActivity>.GetObject(String, String)
Declaration
TaskActivity INameVersionObjectManager<TaskActivity>.GetObject(string name, string version)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | |
| System.String | version |
Returns
| Type | Description |
|---|---|
| DurableTask.Core.TaskActivity |
Implements
INameVersionObjectManager<TaskOrchestration>.Add(ObjectCreator<TaskOrchestration>)
Declaration
void INameVersionObjectManager<TaskOrchestration>.Add(ObjectCreator<TaskOrchestration> creator)
Parameters
| Type | Name | Description |
|---|---|---|
| DurableTask.Core.ObjectCreator<DurableTask.Core.TaskOrchestration> | creator |
Implements
INameVersionObjectManager<TaskOrchestration>.GetObject(String, String)
Declaration
TaskOrchestration INameVersionObjectManager<TaskOrchestration>.GetObject(string name, string version)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | |
| System.String | version |
Returns
| Type | Description |
|---|---|
| DurableTask.Core.TaskOrchestration |
Implements
IExtensionConfigProvider.Initialize(ExtensionConfigContext)
Declaration
void IExtensionConfigProvider.Initialize(ExtensionConfigContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| Microsoft.Azure.WebJobs.Host.Config.ExtensionConfigContext | context |
Implements
IAsyncConverter<HttpRequestMessage, HttpResponseMessage>.ConvertAsync(HttpRequestMessage, CancellationToken)
Declaration
Task<HttpResponseMessage> IAsyncConverter<HttpRequestMessage, HttpResponseMessage>.ConvertAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Net.Http.HttpRequestMessage | request | |
| System.Threading.CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> |


--- layout: default title: "Event Schedule" id: index ---
After a long day of travel, it is time to head to the Falcon's Nest just a quick stroll from the main hotel for an evening welcome reception and social gathering. Meet old friends, make new friends, and enjoy some fine refreshments and appetizers!
Whether you just need a break from the dinner or are looking for deep conversation, stop by the evening campfire located on the beach. Pull up some sand, roast a couple marshmallows, and enjoy the stars. Make plans with your fellow attendees for the next or plan your space mission to the moon and back!
Traditionally a two track conference format, JSConf US provides a track of curated set of speakers as outlined here that have submitted the proposal and successfully made it through the selection process.
The alternative track for JSConf US is driven by people like you! We have a very unique format for our second track in that we let anyone register to speak in a first-come, first-speaking format. These talks are generally from the full range of node.js development and are some of the most exciting talks at JSConf. Registration opens about one month before the event.
For the last JSConf US, Microsoft is hosting an event unlike any JSConf has ever seen. Come on down to the pool deck and enjoy a wonderful BBQ and the legendary Turkey Legs while poolside! The weather looks to be nice, the pools are heated, and most of us will be coming from colder weather SO LETS POOL PARTY IN DECEMBER!!!
Whether you just need a break from the dinner or are looking for deep conversation, stop by the evening campfire located on the beach. Pull up some sand, roast a couple marshmallows, and enjoy the stars. Make plans with your fellow attendees for the next or plan your space mission to the moon and back!
After a great day of talks, let us end this event with a proper final event. Head back to where you started JSConf US Last Call at the Falcons Nest for one final true last call. This will be the final send off for the JSConf US event series so let's do it right!
Whether you just need a break from the dinner or are looking for deep conversation, stop by the evening campfire located on the beach. Pull up some sand, roast a couple marshmallows, and enjoy the stars. Make plans with your fellow attendees for the next or plan your space mission to the moon and back!


2017-05-22 STEEMIT TIPS- Write as though you're gifting the words! (Closing in on 700 followers! ~250 new ones this week!) steemit
2017-05-21 STEEMIT TIPS- You can make a lot of money by reading other people's posts. Closing in on 700 followers! steemit
2017-05-21 Meme the News 5/20/17 Oh the Memeanity! Steady march to 700 followers! (Who wore it better meme is savage today) vietmeme
2017-05-20 STEEMIT TIPS- 3 suggestions for gathering your first followers!


Rollyboi v2
Rollyboi v2 is a robot built for competition in the 2019 Mobots Slalom extraordinaire. He was the only one that wasn't a car attached to a camera, and did just as well (if not better) than most other robots competing.
Rollyboi v1 had no sensors, but v2 had the addition of pressure sensors spaced along the rim of its wheels in order to detect which way was down. Since the entire robot rotates, we need to know which arms are in the correct position to push out and propel the robot.
After determining which direction is down, Rollyboi calculates its current velocity (from the interval between the last pressure point and the current one. Using this, and knowing the time it takes to extend an arm, Rollyboi can predict which arm to begin actuating to extend at the proper time to increase its speed down the track.
Rollyboiy was built during a time of hardship. I only had servos, and was not comfortable destroying their internal potentiometer to re-configure them as motors. So we had to make a spinning robot using servos which only extended ~240 degrees Celsius. It acts on the world by extending leg/arm-like pegs to push off the ground and propel itself forward, like a terrible land-jellyfish.


FAQ
Contact
Home
About
Mission
The Five Freedoms
The Founders: Our Story
Scholary Inspiration
Deaf Space
Adoptable Animals
Programs
Community
Current Plans
How to Help
Contact
Click to Donate through PayPal
Animal rescue, care and adoption in partnership with the Deaf community!


Kyle I S Harrington /<EMAIL_ADDRESS>Some slides adapted from Tom Mitchell and Ryan Adams
A powerful ML package with long-history
Implements many of the algorithms we will study
Using Weka early on helps get an idea of what ML can do
We'll be sticking to the Mitchell textbook for the most part
My office hours: by appointment, generally Thursday is best
Given a dataset $D$ with $N$ observations and $p$ dimensions
Every point $i$ is expressed as:
$x^i = ( x^i_1, x^i_2, ..., x^i_p )$
(Euclidean) distance between 2 points $i$ and $j$:
$d(x^i,x^j) = ( \displaystyle \sum^p_{m=1} ( x^i_m - x^j_m )^2 )^{1/2}$
For some unseen observation $\hat{x}$
$k=5$
Decision boundaries are defined over the Voronoi diagram
Image by Cynthia RudinFor some unseen observation $\hat{x}$
$k=9$
Do we want the majority in this case?
| idx | X | Y | $d(\hat{x},x_i)$ | Blue? |
| 1 | 0.549097186162 | 0.362677386832 | 0.0884316415625 | False |
| 2 | 0.655390965303 | 0.548725980881 | 0.158017656472 | False |
| 3 | 0.485782640555 | 0.249828988661 | 0.205057654261 | False |
| 4 | 0.451911896627 | 0.658980037822 | 0.224393254589 | True |
| 5 | 0.305219682514 | 0.507370621777 | 0.234428626804 | True |
| 6 | 0.429995633684 | 0.667751973208 | 0.241064874734 | True |
| 7 | 0.619841102463 | 0.204366698701 | 0.260279623299 | False |
| 8 | 0.254019391038 | 0.480744029655 | 0.28012416478 | True |
| 9 | 0.262776335089 | 0.55080811249 | 0.288019748099 | True |
Blue distances: 1.26803066901
Red distances: 0.711786575594
Housing prices
Attributes of houses:
What if we used the hexidecimal color of the house?
For some house that hasn't gone on the market $\hat{x}$
| Index | X | Y | $d(\hat{x},x_i)$ | House value |
| 1 | 0.549097186162 | 0.362677386832 | 0.0884316415625 | $67,807.65 |
| 2 | 0.655390965303 | 0.548725980881 | 0.158017656472 | $165,240.34 |
| 3 | 0.485782640555 | 0.249828988661 | 0.205057654261 | $83,034.13 |
| 4 | 0.451911896627 | 0.658980037822 | 0.224393254589 | $275,335.16 |
| 5 | 0.305219682514 | 0.507370621777 | 0.234428626804 | $334,449.68 |
Estimated value of house $\hat{x}$:$185,173.39
An ID3
Decision tree
Is built greedily
So either stop soon*
Or eventually prune
Otherwise you're probably overfitting
*where soon is statistically significant
Make it discrete!
$(Temperature > \frac{( 48 + 60 )}{2} )$
Consider each boundary (i.e. $\frac{a+b}{2}$)
Use information gain to choose node as usual
Some observations may not have values for all attributes
That's OK, we'll use it anyway
Multiple options:
$(Outlook=Sunny \wedge Humidity=High) \implies No$
Grow tree, allowing it to overfit
Convert a tree to a collection of rules
Remove each precondition that improves accuracy (on validation set)
Sort rules by estimated accuracy, and maintain sorted order for classification
$(Outlook=Sunny \wedge Humidity=High) \implies No$
$(Outlook=Sunny \wedge Humidity=Low) \implies Play$
$(Outlook=Overcast) \implies Play$
$(Outlook=Rain \wedge Wind=Weak) \implies Play$
$(Outlook=Rain \wedge Wind=Strong) \implies No$
$(Outlook=Rain \wedge Wind=Weak) \implies Play$
$(Outlook=Rain \wedge Wind=Strong) \implies No$
| Outlook | Temp | Humidity | Windy | Play |
| Rainy | Low | High | Weak | No |
| Rainy | High | High | Strong | No |
$(Outlook=Rain \wedge Wind=Weak) \implies Play$
$(Outlook=Rain \wedge Wind \neq Strong) \implies No$
| Outlook | Temp | Humidity | Windy | Play |
| Rainy | Low | High | Weak | No |
| Rainy | High | High | Strong | No |
$(Outlook=Rain \wedge Wind=Weak) \implies Play$
$(Outlook=Rain) \implies No$
| Outlook | Temp | Humidity | Windy | Play |
| Rainy | Low | High | Weak | No |
| Rainy | High | High | Strong | No |
$(Outlook=Rain) \implies No$
$(Outlook=Rain \wedge Wind=Weak) \implies Play$
| Outlook | Temp | Humidity | Windy | Play |
| Rainy | Low | High | Weak | No |
| Rainy | High | High | Strong | No |
$(Outlook=Sunny \wedge Humidity=High) \implies No$
$(Outlook=Sunny \wedge Humidity=Low) \implies Play$
$(Outlook=Overcast) \implies Play$
$(Outlook=Rain) \implies No$
$(Outlook=Rain \wedge Wind=Weak) \implies Play$
| Outlook | Temp | Humidity | Windy | Play |
| Rainy | Low | High | Weak | No |
| Rainy | High | High | Strong | No |
$(Outlook=Sunny \wedge Humidity=High) \implies No$
$(Outlook=Sunny \wedge Humidity=Low) \implies Play$
$(Outlook=Overcast) \implies Play$
$(Outlook=Rain) \implies No$
$(Outlook=Rain \wedge Wind=Weak) \implies Play$
| Outlook | Temp | Humidity | Windy | Play |
| Sunny | Low | Low | Weak | ? |
| Rainy | High | High | Weak | ? |
Why might one like rule pruning over reduced-error pruning?
Used in C4.5 (J48)
Before making a split, test if the split is statistically significant
Given training dataset $D$
Propose a split on attribute $A$
Notation:
Null hypothesis: $A$ is irrelevant
The total proportion of class $c$ in $D$ is $N_c/N$
If the null hypothesis is true, then on average:
$\hat{N}_{xc} = \frac{N_c}{N} |D_x|$
Even if null hypothesis is true,
it will rarely be exactly $=$ to average
Measure deviation as:
$Dev=\displaystyle \sum_x \displaystyle \sum_c \frac{ ( N_{xc} - \hat{N}_{xc} )^2 } {\hat{N}_{xc}}$
Measure deviation as:
$Dev=\displaystyle \sum_x \displaystyle \sum_c \frac{ ( N_{xc} - \hat{N}_{xc} )^2 } {\hat{N}_{xc}}$
How far is our observed proportion from the expected proportion (based on the distribution within the dataset)
Deviation is the chi-squared statistic
The larger the deviation, the further we are from the null hypothesis that an attribute is irrelevant
If $Dev$ is small, then we don't want the branch
Put $Dev$ into a chi-square table
How many degrees-of-freedom?
$DF = ( ( \mbox{# of attribute-values} ) - 1 ) ( \mbox{# of classes} - 1 )$
*
*Wikipedia, By Geek3 - Own work, CC BY 3.0, $3
Chi-square table will give a probability
A large Dev leads to a small probability $\implies$ the pattern is rare relative to the null hypothesis
Split if $probability < \alpha$
What should $\alpha$ be? 0.05 is a default
Doesn't require separate validation data
Statistical tests become less valid with less data
$\alpha$ is a parameter
Posted in the assignments section
Due: Feb 03
What do you get? +10% on the first quiz
Proposal due: March 7
Study a novel dataset with an advanced algorithm
Extend a ML algorithm
Do a comparative study of multiple algorithms
Due: April 25
Turn in a write-up (8-12 pages)
Should have at least 10 references
If multiple people, then more work is expected
Naive Bayes (you may want to skim some of the probability tutorials)


mhash
(PHP 4, PHP 5, PHP 7)
mhash — Computes hash
说明
string mhash ( int $hash , string $data [, string $key ] )
mhash() applies a hash function specified by hash to the data.
参数
hash
The hash ID. One of the MHASH_hashname constants.
data
The user input, as a string.
key
If specified, the function will return the resulting HMAC instead. HMAC is
keyed hashing for message authentication, or simply a message digest that
depends on the specified key. Not all algorithms supported in mhash can be
used in HMAC mode.
返回值
Returns the resulting hash (also called digest) or HMAC as a string, or FALSE
on error.
User Contributed Notes 13 notes
===============================================================================
Here is how to compute a NTLM hash:
");
print("MHASH (CRC32 Algorithm) Without HMAC Processing:
$mhash_result_without_hmac_parameter .
");
print("HASH (CRC32 Algorithm) With Blank HMAC Key:
$hash_result_with_hmac_parameter .
");
print("HASH (CRC32 Algorithm) Without HMAC Processing:
$hash_result_without_hmac_parameter .");
?>
Results :
...................................
MHASH (CRC32 Algorithm) With Blank HMAC Key: f665c094 .
MHASH (CRC32 Algorithm) Without HMAC Processing: f665c094 .
HASH (CRC32 Algorithm) With Blank HMAC Key: 3041f4f8 .
HASH (CRC32 Algorithm) Without HMAC Processing: f665c094 .
===============================================================================
Both cryptography packages, the MHash and the HASH Message Digest Framework,
have the same algorithms, and yet, they both sometimes to produce wildly
different results from each other when applying the same algorithm to the same
piece of data. The SHA-x algorithms, as designed by the NSA, all seem to have
concrete standards for producing their hash values, so they have similar
results. Even the two MD5 implementations produce identical results, and the
same goes for Gost, RipeMD, CRC32, Whirlpool, Snefru256 (known as 'Snefru256'
in MHash and simply 'Snefru' in HASH-MDF), and Tiger (the three-round versions
in HASH-MDF to simply 'Tigerx' in MHash).
However, the algorithms CRC32B and Adler32 each produce different results when
called from either MHash or HASH-MDF, possibly because they are hashing
algorithms designed to be checksums rather than something that can produce a
string as a unique identifier for a particular piece of information. For that
reason, if you ever publish the hash results with the data you're putting out
publicly, it's probably wise to indicate whether it's the MHash or HASH-MDF
implementation of the algorithm. Otherwise, the hash value won't provide much
use as a unique identifier for the particular piece of data or for the file.
Some example code to better explain what I mean :
");
print("HASH-MDF SHA-1: $hash_mdf_sha1_results .
");
// Whirlpool Hashing
// ---------------------------------------------------
$mhash_whirlpool_results = bin2hex(mhash(MHASH_WHIRLPOOL, "secret"));
$hash_mdf_whirlpool_results = hash("whirlpool", "secret", FALSE);
print("MHash Whirlpool: $mhash_whirlpool_results .
");
print("HASH-MDF Whirlpool: $hash_mdf_whirlpool_results .
");
// CRC32B Hashing
// ---------------------------------------------------
$mhash_crc32b_results = bin2hex(mhash(MHASH_CRC32B, "secret"));
$hash_mdf_crc32b_results = hash("crc32b", "secret", FALSE);
print("MHash CRC32B: $mhash_crc32b_results .
");
print("HASH-MDF CRC32B: $hash_mdf_crc32b_results .
");
// Adler32 Hashing
// ---------------------------------------------------
$mhash_adler32_results = bin2hex(mhash(MHASH_ADLER32, "secret"));
$hash_mdf_adler32_results = hash("adler32", "secret", FALSE);
print("MHash Adler32: $mhash_adler32_results .
");
print("HASH-MDF Adler32: $hash_mdf_adler32_results .
");
?>
Expected Results :
........................
MHash SHA-1: e5e9fa1ba31ecd1ae84f75caaa474f3a663f05f4 .
HASH-MDF SHA-1: e5e9fa1ba31ecd1ae84f75caaa474f3a663f05f4 .
MHash Whirlpool: e061b87a674ae3880e159ab55ed35d
6c5e8a6aefac6ab08304a50588018d
377b28639bb15fdeedf006d57e45f7
b4298e6dfefceaf7c92c826a708fe6d
1156eb3 .
HASH-MDF Whirlpool: e061b87a674ae3880e159ab55ed35d
6c5e8a6aefac6ab08304a50588018d
377b28639bb15fdeedf006d57e45f7
b4298e6dfefceaf7c92c826a708fe6d
1156eb3 .
MHash CRC32B: e5e8a25c .
HASH-MDF CRC32B: 5ca2e8e5 .
MHash Adler32: 8702d108 .
HASH-MDF Adler32: 08d10287 .
===============================================================================
mhash support now appears in the Pear PHP_Compat package, for support without
building PHP with mhash.
===============================================================================
---Quote---
pack("H*", md5($str)) == mhash(MHASH_MD5, $str)
pack("H*", sha1($str)) == mhash(MHASH_SHA1, $str)
---/Quote---
That's an awfully inefficient way of doing things. You can just put ", true"
after md5 or sha1 to get binary output instead of having it convert it to hex
then back.
Easier way:
md5($str, true) == mhash(MHASH_MD5, $str)
sha1($str, true) == mhash(MHASH_SHA1, $str)
===============================================================================
Just in case you did not observe, the function of Lance is independent of hash
fuction used to get HMAC , so if one use sha1() function from php instead md5()
will get sha1 HMAC.
Just try .
Thanks again Lance
===============================================================================
This confused me a bit when I first read the documetation for mhash. The
functions that accept a hash accept them as an INTEGER not a STRING. In this
case, MHASH_MD5 = 1. It is a constant, not a string.
Just thought I'd point that out, so if anyone is confused they can read that.
That's the use of mhash_get_hash_name(). You input the constant (which is an
integer) and it returns the hash name.
===============================================================================
Thanks a lot to Lance for showing how to create mhash without installing the
perl extension for mhash.
I have been asking my webhosting administrator to recompile Perl with mhash
extension, but do not want to do it. As a result, our company can't get credit
card authorization because they require fingerprint which uses the function
mhash. Now, it's working fine.
Thanks a lot, Lance.....
Fernan
===============================================================================
in responce to lance's post:
the function comes back with a hex representation of the hmac, if you wish to
convert to what mhash returns natively (binary) use: pack("H*", hmac
(variables...));
===============================================================================
Don't forget php has two built in hashing algorithms:
md5(), and sha1()
So if you are using: mhash(MHASH_MD5, $str) or mhash(MHASH_SHA1, $str) you
could use md5($str) or sha1($str).
** But remember that md5() and sha1() produce HEX output while mhash() produces
a BIN output. So:
md5($str) == bin2hex(mhash(MHASH_MD5, $str))
sha1($str) == bin2hex(mhash(MHASH_SHA1, $str))
AND
pack("H*", md5($str)) == mhash(MHASH_MD5, $str)
pack("H*", sha1($str)) == mhash(MHASH_SHA1, $str)
(Just remember to pack() or bin2hex() your output to get the output you need)
-Lance
===============================================================================
Want to Create a md5 HMAC, but don't have hmash installed?
Use this:
function hmac ($key, $data)
{
// RFC 2104 HMAC implementation for php.
// Creates an md5 HMAC.
// Eliminates the need to install mhash to compute a HMAC
// Hacked by Lance Rushing
$b = 64; // byte length for md5
if (strlen($key) > $b) {
$key = pack("H*",md5($key));
}
$key = str_pad($key, $b, chr(0x00));
$ipad = str_pad('', $b, chr(0x36));
$opad = str_pad('', $b, chr(0x5c));
$k_ipad = $key ^ $ipad ;
$k_opad = $key ^ $opad;
return md5($k_opad . pack("H*",md5($k_ipad . $data)));
}
-----
To test:
Run this on a server _with_ mhash installed:
$key = 'Jefe';
$data = "what do ya want for nothing?";
echo hmac($key, $data);
echo "<br>\n";
echo bin2hex (mhash(MHASH_MD5, $data, $key));
should produce:
750c783e6ab0b503eaa86e310a5db738
750c783e6ab0b503eaa86e310a5db738
Happy hashing.
===============================================================================
Netscape messaging / directory server 4+ uses SHA-1
to store password in the ldap database (slapd).
The password is first SHA-1 hashed then base64 encoded:
$pwd = "secret";
$hash = "{SHA}".base64_encode( mHash(MHASH_SHA1, $pwd));
echo "Hash: ". $hash ;
===============================================================================
Many digest algorithms (especially MD5) are less secure if you are hashing data
that is smaller than the algorithm's output. I recommend either hashing a
secret key/salt with the original data to increase it's security.


boost/qvm/all.hpp
boost/qvm/assert.hpp
boost/qvm/deduce_mat.hpp
boost/qvm/deduce_quat.hpp
boost/qvm/deduce_scalar.hpp
boost/qvm/deduce_vec.hpp
boost/qvm/enable_if.hpp
boost/qvm/error.hpp
boost/qvm/inline.hpp
boost/qvm/map.hpp
boost/qvm/map_mat_mat.hpp
boost/qvm/map_mat_vec.hpp
boost/qvm/map_vec_mat.hpp
boost/qvm/mat.hpp
boost/qvm/mat_access.hpp
boost/qvm/mat_index.hpp
boost/qvm/mat_operations.hpp
boost/qvm/mat_operations2.hpp
boost/qvm/mat_operations3.hpp
boost/qvm/mat_operations4.hpp
boost/qvm/mat_traits.hpp
boost/qvm/mat_traits_array.hpp
boost/qvm/math.hpp
boost/qvm/operations.hpp
boost/qvm/quat.hpp
boost/qvm/quat_access.hpp
boost/qvm/quat_operations.hpp
boost/qvm/quat_traits.hpp
boost/qvm/quat_traits_array.hpp
boost/qvm/quat_vec_operations.hpp
boost/qvm/scalar_traits.hpp
boost/qvm/static_assert.hpp
boost/qvm/swizzle.hpp
boost/qvm/swizzle2.hpp
boost/qvm/swizzle3.hpp
boost/qvm/swizzle4.hpp
boost/qvm/throw_exception.hpp
boost/qvm/vec.hpp
boost/qvm/vec_access.hpp
boost/qvm/vec_index.hpp
boost/qvm/vec_mat_operations.hpp
boost/qvm/vec_mat_operations2.hpp
boost/qvm/vec_mat_operations3.hpp
boost/qvm/vec_mat_operations4.hpp
boost/qvm/vec_operations.hpp
boost/qvm/vec_operations2.hpp
boost/qvm/vec_operations3.hpp
boost/qvm/vec_operations4.hpp
boost/qvm/vec_traits.hpp
boost/qvm/vec_traits_array.hpp


Dara, Jane, and Matt on the unexpected issue of the moment, plus Swedish administrative data on what makes a CEO.Suggested reading:White PaperOriginal Ta-Nehisi Coates essay on reparationsWe are conducting an audience survey to better serve you. It takes no more than five minutes, and it really helps out the show. Please take our survey here: https://www.surveymonkey.com/r/3X6WMNF


The projects below were done as part of the MIT xPro Full Stack Development with MERN course.
This project uses HTML, CSS and JavaScript to display a web page with two eyes that follow the user's mouse movement. It uses the onmousemove property of the GlobalEventHandlers mixin that processes mousemove events.
This project allows the user to add many PacMan to a page and to start their movement. It detects when a PacMan hits the edge of the page and rotates the direction of the PacMan. The focus of this project was on working with arrays, passing arguments to functions and using JavaScript for DOM manipulation.
This project is a real-time bus tracker that uses data from the Massachussets Bay Transportation Authority (MBTA). This project displays a map that updates the location of position of the bus every 15 seconds on route between MIT and Harvard. It focuses on using Mapbox API to display map and markers and async functions to fetch data from MBTA API. [Mapbox GL JS](https://docs.mapbox.com/mapbox-gl-js/api/) is an interactive JavaScript library that uses WebGL to render interactive maps from vector tiles and Mapbox styles.


34+ Torchys Logo Gif. The ultimate tool to create your free logo. Get them delivered straight to your door via doordash.
Create your logo design online for your business or project. Use logodesign.net's logo maker to edit and download. Try free logo creator to get tons of absolutely free logo design ideas and for professional use along with free business card.
Saniyeler içinde güzel bir logo tasarımı oluştur.
I have been so pleased with logo maker! Choose from hundreds of fonts then just save your new logo on to your computer! Seeklogo.com is the world's best brand logo and vector logo template source. Just choose a template and customize away to download a professional logo for your streaming channel!


This is a pleasent island with some of the only white sand beaches in the Marquesas.
Not a port of entry.
Anchorage off Vaitahu: gusty valley, some coral heads (deep), must search for good sandy bottom (a good place is just in front of beach ramp next to church, 50 yd. out, in line w/ pirogues moorings). Accelerated winds can rush down the valley with gusts up to 50 kts.


Software
Gimmer
Nucleus Coop
Videofy (WIP)
Jam Games
255
Donkey Work
Random
Past Projects
Ongoing Projects
References
Resources
Quotes
Writing
Quantum Servant


We would love to help our world become more sustainable by preventing food waste through connecting food from restaurants that would otherwise be thrown away to local homeless shelters!


Hosted by PythonAnywhere. They do not require ads or popups.
Until 2017-09-30 the site was hosted by OpenShift Online, operated and supported by Red Hat. The URL was payg-petef.rhcloud.com.
Until 2015-10-22 it was hosted by Byet Internet Services. There is still a copy http://petef.22web.org on there but it may be out of date and lacking features of the current site. On 2012-05-07 my domain was changed from petef.22web.net
The site was previously on http://petef.port5.com but the host changed owners on 2007-12-07.
I have been running a public web site since 2000-06-30. The PAYG tariff information started on 2008-02-07.
Last modified: 2017-09-30T15:27:45+01:00


Toggle navigation
MyImmigrationLA
Map
Events
Add Event
Upcoming Events
Date
Organization
Type
Time
Address
Contact
Add Your Event
Name
Email Address
Phone Number
Message
Send


Five things to watch out for in qualifying for the United States Grand Prix!
by Adam NewtonSo, the practice sessions are over and it's nearly time for qualifying, but what should you be watching out for during the session? Here's five things we think you should be looking to see during quali! Any we missed? Comment below...
Can Verstappen convert practice form?
Max Verstappen topped two of the three practice sessions, including FP3, so he'll be looking to put right what went wrong last week as a penalty took away his pole position. The Dutchman was on fire in qualifying in Mexico last week and if he brings that form to Austin then he could be a good bet for pole!
Will Leclerc get a penalty?
Charles Leclerc suffered engine issues in FP3 and he had to pull over, and with rumours of a gearbox penalty floating around, there could be a few positions to add to his qualifying position...
A big weekend for Alex Albon...
Albon has got to show Red Bull why he deserves that seat at Red Bull Racing, and a solid qualifying performance could cement his seat. He's had a few accidents in qualifying sessions this season, so he'll be desperate to avoid any of that and will be looking to get amongst the front runners.
Who will make Q3?
McLaren look pretty quick, with Lando Norris shocking everybody by setting the third fastest time in FP3. Kimi Raikkonen and Pierre Gasly also look quick, with the Renaults in an around the top ten as well. Who could be making their way into the top ten today?
Stay inside the lines!
Track limits could be a feature of the session, with Sebastian Vettel having a lap chalked off in third practice. If anyone runs wide at turn 19 in qualifying, expect the stewards to come down hard and scrap their laptimes. Watch those track limits guys...


--- layout: post title: How to reduce use of your mobile application date: 2006-07-14 00:00:00 categories: amusing interfaces-&-interaction mobile ---
How to reduce use of your mobile application: "Mobile applications, and especially mobile games, are frequently used in short bursts. These bursts could be due to short attention span, short task, incoming call or message, the train arriving, or any number of other things. Thus the user will frequently exit the application, either intentionally or unintentionally.
Once the user exits the application, if you don’t want her to use the application again, do some of the following"


Our Mission
Our mission is to make the students to get knowledge as well as make them strong in specific topics. The courses are updated so that student also can update with the content of the courses. This is how the student can bring changes in the world.
Creating different oppurtunities for the students acroos different challenges. Will make them feel how real world is taken upto. Our dedicated work and students enrollment will bring different successive moments and be a leader one day. Also, accessing information from her could get more knowledge to devlop own carrier.


{% extends "layout.html" %} {% block content %}
{{ uri }}
| Property | Value |
|---|---|
| All aged 65 and over | {{ all_aged_65_and_over }} |
| Includes persons aged 14 years and under | {{ includes_persons_aged_14_years_and_under }} |
| Includes an indigenous person | {{ includes_an_indigenous_person }} |
| Are a single parent household | {{ are_a_single_parent_household }} |
| Are in need of assistance for self care activities | {{ are_in_need_of_assistance_for_self_care_activites }} |
| Include persons not proficient in English | {{ include_persons_not_proficient_in_english }} |
| Do not have access to a motor vehicle | {{ do_not_have_access_to_a_motor_vehicle }} |
| No one has completed year 12 or higher | {{ no_one_has_completed_year_12_or_higher }} |
| Moved to the region in the last 1 year | {{ moved_to_the_region_in_the_last_1_year }} |
| Moved to the region in the last 5 years | {{ moved_to_the_region_in_the_last_5_years }} |
| Top 5 employing industries | {{ top_5_employing_industries }} |


{% load i18n %}
{% load account_tags %}
{% user_display creator as creator_display %}
{% url profile_detail username=creator.username as creator_url %}
{% blocktrans %}
{{ creator_display }} has added an attachment '{{ attachment }}' to story {{story_name}}.
{% endblocktrans %}


1. Demonstrating Hello World Example
Tested Infrastructure
| Platform | Number of Instance | Reading Time |
|---|---|---|
| Play with Docker | 1 | 5 min |
Create an account with [DockerHub]
Open [PWD] Platform on your browser
Click on **Add New Instance** on the left side of the screen to bring up Alpine OS instance on the right side
Running Hello World Example
$ docker run hello-world
The argument hello-world is the name of the image someone created on dockerhub for us. It will first search for "hello-world" image locally and then search in Dockerhub. Once the image has been downloaded, Docker turns the image into a running container and executes it.
1.The Hello World Docker Image is only 1.84 KB size.
[node1] (local<EMAIL_ADDRESS>~
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
hello-world latest 4ab4c602aa5e 6 weeks ago 1.84kB
2.While running docker ps command, it doesn't display any running container. Reason - It gets executed once and exit immediately.
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS. PORTS NAMES
3. You can use ` docker inspect
$ docker inspect 4ab
[
{
"Id": "sha256:4ab4c602aa5eed5528a6620ff18a1dc4faef0e1ab3a5eddeddb410714478c67f",
"RepoTags": [
"hello-world:latest"
],
"RepoDigests": [
"hello-world@sha256:0add3ace90ecb4adbf7777e9aacf18357296e799f81cabc9fde470971e499788"
],
"Parent": "",
"Comment": "",
"Created": "2018-09-07T19:25:39.809797627Z",
"Container": "15c5544a385127276a51553acb81ed24a9429f9f61d6844db1fa34f46348e420",
"ContainerConfig": {
"Hostname": "15c5544a3851",
"Domainname": "",
"User": "",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
],
"Cmd": [
"/bin/sh",
"-c",
"#(nop) ",
"CMD [\"/hello\"]"
],
"ArgsEscaped": true,
"Image": "sha256:9a5813f1116c2426ead0a44bbec252bfc5c3d445402cc1442ce9194fc1397027",
"Volumes": null,
"WorkingDir": "",
"Entrypoint": null,
"OnBuild": null,
"Labels": {}
},
"DockerVersion": "17.06.2-ce",
"Author": "",
"Config": {
"Hostname": "",
"Domainname": "",
"User": "",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
],
"Cmd": [
"/hello"
],
"ArgsEscaped": true,
"Image": "sha256:9a5813f1116c2426ead0a44bbec252bfc5c3d445402cc1442ce9194fc1397027",
"Volumes": null,
"WorkingDir": "",
"Entrypoint": null,
"OnBuild": null,
"Labels": null
},
"Architecture": "amd64",
"Os": "linux",
"Size": 1840,
"VirtualSize": 1840,
"GraphDriver": {
"Data": {
"MergedDir": "/var/lib/docker/overlay2/e494ae30abc49ad403ef5c2a32bcb894629ea4da6d4d226fbca70d27ed9a74d8/merged",
"UpperDir": "/var/lib/docker/overlay2/e494ae30abc49ad403ef5c2a32bcb894629ea4da6d4d226fbca70d27ed9a74d8/diff",
"WorkDir": "/var/lib/docker/overlay2/e494ae30abc49ad403ef5c2a32bcb894629ea4da6d4d226fbca70d27ed9a74d8/work"
},
"Name": "overlay2"
},
"RootFS": {
"Type": "layers",
"Layers": [
"sha256:428c97da766c4c13b19088a471de6b622b038f3ae8efa10ec5a37d6d31a2df0b"
]
},
"Metadata": {
"LastTagTime": "0001-01-01T00:00:00Z"
}
}
]
2. Working with Docker Images
Tested Infrastructure
| Platform | Number of Instance | Reading Time |
|---|---|---|
| Play with Docker | 1 | 5 min |
Create an account with [DockerHub]
Open [PWD] Platform on your browser
Click on **Add New Instance** on the left side of the screen to bring up Alpine OS instance on the right side
Listing the Docker Images
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
hello-world latest 4ab4c602aa5e 6 weeks ago 1.84kB
Show all images (default hides intermediate images)
$ docker images -a
REPOSITORY TAG IMAGE ID CREATED SIZE
hello-world latest 4ab4c602aa5e 6 weeks ago 1.84kB
The docker images command takes an optional [REPOSITORY[:TAG]] argument that restricts the list to images that match the argument. If you specify REPOSITORY but no TAG, the docker images command lists all images in the given repository. To demo this, let us pull all various versions of alpine OS
docker pull alpine:3.6
docker pull alpine:3.7
docker pull alpine:3.8
docker pull alpine:3.9
[node4] (local<EMAIL_ADDRESS>~
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
alpine 3.6 43773d1dba76 7 days ago 4.03MB
alpine 3.7 6d1ef012b567 7 days ago 4.21MB
alpine 3.8 dac705114996 7 days ago 4.41MB
alpine 3.9 5cb3aa00f899 7 days ago 5.53MB
[node4] (local<EMAIL_ADDRESS>~
$ docker images alpine:3.7
REPOSITORY TAG IMAGE ID CREATED SIZE
alpine 3.7 6d1ef012b567 7 days ago 4.21MB
List the full length image IDs
$ docker images --no-trunc
REPOSITORY TAG IMAGE ID CREATED
SIZE
alpine 3.6 sha256:43773d1dba76c4d537b494a8454558a41729b92aa2ad0feb23521c3e58cd0440 7 days ago
4.03MB
alpine 3.7 sha256:6d1ef012b5674ad8a127ecfa9b5e6f5178d171b90ee462846974177fd9bdd39f 7 days ago
4.21MB
alpine 3.8 sha256:dac7051149965716b0acdcab16380b5f4ab6f2a1565c86ed5f651e954d1e615c 7 days ago
4.41MB
alpine 3.9 sha256:5cb3aa00f89934411ffba5c063a9bc98ace875d8f92e77d0029543d9f2ef4ad0 7 days ago
5.53MB
Listing out images with filter
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
ubuntu latest 94e814e2efa8 3 days ago 88.9MB
alpine 3.6 43773d1dba76 7 days ago 4.03MB
alpine 3.7 6d1ef012b567 7 days ago 4.21MB
alpine 3.8 dac705114996 7 days ago 4.41MB
alpine 3.9 5cb3aa00f899 7 days ago 5.53MB
If you want to filter out just alpine
$ docker images --filter=reference='alpine'
REPOSITORY TAG IMAGE ID CREATED SIZE
alpine 3.6 43773d1dba76 7 days ago 4.03MB
alpine 3.7 6d1ef012b567 7 days ago 4.21MB
alpine 3.8 dac705114996 7 days ago 4.41MB
alpine 3.9 5cb3aa00f899 7 days ago 5.53MB
Explanation
The [REPOSITORY[:TAG]] value must be an “exact match”.
Tested Infrastructure
| Platform | Number of Instance | Reading Time |
|---|---|---|
| Play with Docker | 1 | 5 min |
Create an account with [DockerHub]
Open [PWD] Platform on your browser
Click on **Add New Instance** on the left side of the screen to bring up Alpine OS instance on the right side
Imagine a scenario where you have built Docker images and containers that you would be interested to keep and share it with your other collaborators or colleagues. The below methods shall help you achieve it.
Four basic Docker CLI comes into action:
The docker export - Export a container’s filesystem as a tar archive
The docker import - Import the contents from a tarball to create a filesystem image
The docker save - Save one or more images to a tar archive (streamed to STDOUT by default)
The docker load - Load an image from a tar archive or STDIN
$ docker run -d -p 80:80 nginx
Unable to find image 'nginx:latest' locally
latest: Pulling from library/nginx
a5a6f2f73cd8: Pull complete
1ba02017c4b2: Pull complete
33b176c904de: Pull complete
Digest: sha256:5d32f60db294b5deb55d078cd4feb410ad88e6fe77500c87d3970eca97f54dba
Status: Downloaded newer image for nginx:latest
df2caf9283e84a15bb2321a17aabe84e3e0762ec82fc180e2a4c15fcf0f96588
[node1] (local<EMAIL_ADDRESS>~
$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
df2caf9283e8 nginx "nginx -g 'daemon of…" 35 seconds ago Up 34 seconds <IP_ADDRESS>:80->80/tcp vigorous_jang
$ docker export df2 > nginx.tar
You could commit this container as a new image locally, but you could also use the Docker import command:
$ docker import - mynginx < nginx.tar
sha256:aaaed50d250a671042e8dc383c6e05012e245f5eaf555d10c40be63f6028ee7b
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
mynginx latest aaaed50d250a 25 seconds ago 107MB
nginx latest 568c4670fa80 2 weeks ago 109MB
If you wanted to share this image with one of your collaborators, you could upload the tar file on a web server and let your collaborator download it and use the import command on his Docker host. If you would rather deal with images that you have already committed, you can use the load and save commands:
$ docker save -o mynginx1.tar nginx
$ ls -l
total 218756
-rw------- 1 root root 112844800 Dec 18 02:53 mynginx1.tar
-rw-r--r-- 1 root root 111158784 Dec 18 02:50 nginx.tar
$ docker rmi mynginx
Untagged: mynginx:latest
Deleted: sha256:aaaed50d250a671042e8dc383c6e05012e245f5eaf555d10c40be63f6028ee7b
Deleted: sha256:41135ad184eaac0f5c4f46e4768555738303d30ab161a7431d28a5ccf1778a0f
Now delete all images and containers running and try to run the below command to load Docker image into your system:
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
$ docker load < mynginx1.tar
Loaded image: nginx:latest
[node1] (local<EMAIL_ADDRESS>~$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
nginx latest 568c4670fa80 2 weeks ago 109MB
[node1] (local<EMAIL_ADDRESS>~
$
Tested Infrastructure
| Platform | Number of Instance | Reading Time |
|---|---|---|
| Play with Docker | 1 | 5 min |
Create an account with [DockerHub]
Open [PWD] Platform on your browser
Click on **Add New Instance** on the left side of the screen to bring up Alpine OS instance on the right side
Under this tutorial we will see how to build our own first alpine based Docker Image
$ docker run -dit alpine sh
620e1bcb5ab6e84b75a7a5c35790a77691112e59830ea1d5d85244bc108578c9
[node4] (local<EMAIL_ADDRESS>~
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
620e1bcb5ab6 alpine "sh" 3 seconds ago Up 2 seconds keen_alba
ttani
[node4] (local<EMAIL_ADDRESS>~
$ docker attach 62
/ #
/ #
/ # cat /etc/os-release
NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.9.2
PRETTY_NAME="Alpine Linux v3.9"
HOME_URL="https://alpinelinux.org/"
BUG_REPORT_URL="https://bugs.alpinelinux.org/"
/ #
Updating APK Packages
/ # apk update
fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/community/x86_64/APKINDEX.tar.gz
v3.9.2-21-g3dda2a36ce [http://dl-cdn.alpinelinux.org/alpine/v3.9/main]
v3.9.2-19-gfdf726d41a [http://dl-cdn.alpinelinux.org/alpine/v3.9/community]
OK: 9756 distinct packages available
/ # ^
/ # apk add git
(1/7) Installing ca-certificates (20190108-r0)
(2/7) Installing nghttp2-libs (1.35.1-r0)
(3/7) Installing libssh2 (1.8.0-r4)
(4/7) Installing libcurl (7.64.0-r1)
(5/7) Installing expat (2.2.6-r0)
(6/7) Installing pcre2 (10.32-r1)
(7/7) Installing git (2.20.1-r0)
Executing busybox-1.29.3-r10.trigger
Executing ca-certificates-20190108-r0.trigger
OK: 20 MiB in 21 packages
/ #
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
620e1bcb5ab6 alpine "sh" 4 minutes ago Up 4 minutes keen_alba
ttani
[node4] (local<EMAIL_ADDRESS>~
$ docker commit -m "Added GIT" 620 ajeetraina/alpine-git
sha256:9a8cd6c3bd8761013b2b932c58af2870f5637bfdf4227d7414073b0458ed0c54
[node4] (local<EMAIL_ADDRESS>~
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
ajeetraina/alpine-git latest 9a8cd6c3bd87 11 seconds ago 31.2MB
ubuntu latest 94e814e2efa8 3 days ago 88.9MB
alpine 3.6 43773d1dba76 7 days ago 4.03MB
alpine 3.7 6d1ef012b567 7 days ago 4.21MB
alpine 3.8 dac705114996 7 days ago 4.41MB
alpine 3.9 5cb3aa00f899 7 days ago 5.53MB
alpine latest 5cb3aa00f899 7 days ago 5.53MB
There you see a new image just created
Time to tag the image
$ docker tag --help
Usage: docker tag SOURCE_IMAGE[:TAG] TARGET_IMAGE[:TAG]
Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE
[node4] (local<EMAIL_ADDRESS>~
$ docker tag ajeetraina/alpine-git:latest ajeetraina/alpine-git:1.0
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
ajeetraina/alpine-git 1.0 9a8cd6c3bd87 2 minutes ago 31.2MB
ajeetraina/alpine-git latest 9a8cd6c3bd87 2 minutes ago 31.2MB
ubuntu latest 94e814e2efa8 3 days ago 88.9MB
alpine 3.6 43773d1dba76 7 days ago 4.03MB
alpine 3.7 6d1ef012b567 7 days ago 4.21MB
alpine 3.8 dac705114996 7 days ago 4.41MB
alpine 3.9 5cb3aa00f899 7 days ago 5.53MB
alpine latest 5cb3aa00f899 7 days ago 5.53MB
Pushing it to DockerHub
$ docker login
Login with your Docker ID to push and pull images from Docker Hub. If you don't have a Docker ID, head over to https://hub.docker
.com to create one.
Username: ajeetraina
Password:
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store
Login Succeeded
[node4] (local<EMAIL_ADDRESS>~
$ docker push ajeetraina/alpine-git:1.0
The push refers to repository [docker.io/ajeetraina/alpine-git]
3846235f8c17: Pushed
bcf2f368fe23: Mounted from library/alpine
1.0: digest: sha256:85d50f702e930db9e5b958387e667b7e26923f4de340534085cea184adb8411e size: 740
[node4] (local<EMAIL_ADDRESS>~
Tested Infrastructure
| Platform | Number of Instance | Reading Time |
|---|---|---|
| Play with Docker | 1 | 5 min |
You can use Docker’s reserved, minimal image, scratch, as a starting point for building containers. Using the scratch “image” signals to the build process that you want the next command in the Dockerfile to be the first filesystem layer in your image. While scratch appears in Docker’s repository on the hub, you can’t pull it, run it, or tag any image with the name scratch. Instead, you can refer to it in your Dockerfile. For example, to create a minimal container using scratch:
FROM scratch
ADD hello /
CMD ["/hello"]
Assuming you built the “hello” executable example by following the instructions at https://github.com/docker-library/hello-world/, and you compiled it with the -static flag, you can build this Docker image using this docker build command:
docker build --tag hello .
Don’t forget the . character at the end, which sets the build context to the current directory.
$ docker run --rm -it -v $PWD:/build ubuntu:16.04
container# apt-get update && apt-get install build-essential
container# cd /build
container# gcc -o hello -static -nostartfiles hello.c
To run your new image, use the docker run command:
docker run --rm hello
This example creates the hello-world image used in the tutorials. If you want to test it out, you can clone the image repo.
Tested Infrastructure
| Platform | Number of Instance | Reading Time |
|---|---|---|
| Play with Docker | 1 | 5 min |
Create Ubuntu Container
docker run -dit ubuntu
Accessing the container shell
docker exec -t bash
Accesssing the container shell
docker attach
Tested Infrastructure
| Platform | Number of Instance | Reading Time |
|---|---|---|
| Play with Docker | 1 | 5 min |
Create Ubuntu Container
docker run -dit ubuntu
Opening up the bash shell
docker exec -t bash
Tested Infrastructure
| Platform | Number of Instance | Reading Time |
|---|---|---|
| Play with Docker | 1 | 5 min |
Preparations
Clean your docker host using the commands (in bash):
$ docker rm -f $(docker ps -a -q)
Instructions
Run the following containers from the dockerhub:
$ docker run -d -p 5000:5000 --name app1 selaworkshops/python-app:1.0
$ docker run -d -p 5001:5001 -e "port=5001" --name app2 selaworkshops/python-app:2.0
Ensure the containers are running:
$ docker ps
Stop the first container:
$ docker stop app1
Kill the second container:
$ docker kill app2
Display running containers:
docker ps
Show all the containers (includind non running containers):
docker ps -a
Let’s start both containers again:
$ docker start app1 app2
Restart the second container:
$ docker restart app2
Display the docker host information with:
$ docker info
Show the running processes in the first container using:
$ docker top app1
Retrieve the history of the second container:
$ docker history selaworkshops/python-app:2.0
Inspect the second container image:
$ docker inspect selaworkshops/python-app:2.0
Inspect the first container and look for the internal ip:
$ docker inspect app1
"Networks": {
"bridge": {
"IPAMConfig": null,
"Links": null,
"Aliases": null,
"NetworkID": "822cb66790c6358d9decab874916120f3bdeff7193a4375c94ca54d50832303d",
"EndpointID": "9aa96dc29be08eddc6d8f429ebecd2285c064fda288681a3611812413cbdfc1f",
"Gateway": "<IP_ADDRESS>",
"IPAddress": "<IP_ADDRESS>",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"MacAddress": "02:42:ac:11:00:03",
"DriverOpts": null
}
}
Show the logs of the second container using the flag –follow:
$ docker logs --follow app2
Browse to the application and see the containers logs from the terminal:
http://localhost:5001
Stop to tracking logs:
$ CTRL + C
- A Dockerfile is a text file which contains a series of commands or instructions.
- These instructions are executed in the order in which they are written.
- Execution of these instructions takes place on a base image.
- On building the Dockerfile, the successive actions form a new image from the base parent image.
- We will go through each of instructions under Dockerfile and see how it is used.
Understanding Image Layering Concept with Dockerfile
Tested Infrastructure
| Platform | Number of Instance | Reading Time |
|---|---|---|
| Play with Docker | 1 | 5 min |
Docker container is a runnable instance of an image, which is actually made by writing a readable/writable layer on top of some read-only layers.
The parent image used to create another image from a Dockerfile is read-only. When we execute instructions on this parent image, new layers keep adding up. These layers are created when we run docker build command.
The instructions RUN, COPY, ADD mostly contribute to the addition of layers in a Docker build.
Each layer is read-only except the last one - this is added to the image for generating a runnable container. This last layer is called “container layer”. All changes made to the container, like making new files, installing applications, etc. are done in this thin layer.
Let’s understand this layering using an example:
Consider the Dockerfile given below:
FROM ubuntu:latest
RUN mkdir -p /hello/hello
COPY hello.txt /hello/hello
RUN chmod 600 /hello/hello/hello.txt
Layer ID
Each instruction the Dockerfile generates a layer. Each of this layer has a randomly generated unique ID. This ID can be seen at the time of build. See the image next slide
To view all these layers once an image is built from a Dockerfile, we can use docker history command.
To view all these layers once an image is built from a Dockerfile, we can use docker history command
To see more information about the Docker image and the layers use ‘docker inspect’ command as such:
# docker inspect testimage:latest
[
{
"Id": "sha256:c5701e02ed095ae7cabaef9fcef009d1f272206ff707deca13a680e024db7f02",
"RepoTags": [
"testimage:latest"
],
"RepoDigests": [],
"Parent": "sha256:694569c6db07ecef432cee1a9a4a6d45f2fd1f6be16814bf59e101bed966e612",
"Comment": "",
"Created": "2019-06-03T23:47:01.026463541Z",
"Container": "ac8873a003cb9ed972b4675f8d27181b99112e7530a5803ff89780e3ecc18b1c",
"ContainerConfig": {
"Hostname": "",
"Domainname": "",
"User": "",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
],
"Cmd": [
"/bin/sh",
"-c",
"chmod 600 /home/hello/hello.txt"
],
"ArgsEscaped": true,
"Image": "sha256:694569c6db07ecef432cee1a9a4a6d45f2fd1f6be16814bf59e101bed966e612",
"Volumes": null,
"WorkingDir": "",
"Entrypoint": null,
"OnBuild": null,
"Labels": null
},
"DockerVersion": "18.03.1-ce",
"Author": "",
"Config": {
"Hostname": "",
"Domainname": "",
"User": "",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
],
"Cmd": [
"/bin/bash"
],
"ArgsEscaped": true,
"Image": "sha256:694569c6db07ecef432cee1a9a4a6d45f2fd1f6be16814bf59e101bed966e612",
"Volumes": null,
"WorkingDir": "",
"Entrypoint": null,
"OnBuild": null,
"Labels": null
},
"Architecture": "amd64",
"Os": "linux",
"Size": 222876395,
"VirtualSize": 222876395,
"GraphDriver": {
"Data": {
"LowerDir": "/var/lib/docker/overlay2/86a76eac21ae67f6d78e59076107a121e6dfb9cc922e68e1be975fc97e711eb1/diff:/var/lib/docker/overlay2/0604b502d31eff670769257ba3411fca09fbe2eab03343660ba557024915a1e6/diff:/var/lib/docker/overlay2/16af32e079fbc252ea5de044628285d5c3a34fc8441602a762729482666b2431/diff:/var/lib/docker/overlay2/732c4ab0164f92664ce831b4a830251132bf17cbcb7d093334a7a367b1a665e5/diff:/var/lib/docker/overlay2/c8a69709e5093c6eefa317f015cbf1422a446b2fe5d3f3d52a7e0d8af8dc6a28/diff:/var/lib/docker/overlay2/c93b36ec3a753592518727a2ea4547ab4e53d58489b9fae0838b2806e9c18346/diff:/var/lib/docker/overlay2/e67589599c2a5ed3bd74a269f3effaa52f94975fd811a866f1fe2bbcb2edabe4/diff",
"MergedDir": "/var/lib/docker/overlay2/31c68adcd824f155d23de4197b3d0b8776b079c307c1e4c0f2f8bbc73807adc0/merged",
"UpperDir": "/var/lib/docker/overlay2/31c68adcd824f155d23de4197b3d0b8776b079c307c1e4c0f2f8bbc73807adc0/diff",
"WorkDir": "/var/lib/docker/overlay2/31c68adcd824f155d23de4197b3d0b8776b079c307c1e4c0f2f8bbc73807adc0/work"
},
"Name": "overlay2"
},
"RootFS": {
"Type": "layers",
"Layers": [
"sha256:05b0f7f2a81723fd647744a7340477ef9619f5ddeba3f2ca039dac3dd143cd59",
"sha256:0c3819952093832ffd8865bf72bc17f2f5475795cffe97e2b4c4ff36e638c244",
"sha256:14fa4a9494bf9e61f83a1bb96cd9e963ab0cbbdaf8ed91ff5eec5196c5bf7b12",
"sha256:b33859b66bfd3ad176ccf3be8dbd52d6b9823de8cc26688f2efeb76a0ea24a78",
"sha256:4622c8e1bdc0716e185fa3b338fa415dfdad3724336315de0bebd173a6ceaf05",
"sha256:6427efc3a0d7bae1fe315b844703580b2095073dcdf54a6ed9c7b1c0d982d9b0",
"sha256:59cd898074ac7765bacd76a11724b8d666ed8e9c14e7806dfb20a486102f6f1e",
"sha256:ad24f18512fddb8794612f7ec5955d06dcee93641d02932d809f0640263b8e79"
]
},
"Metadata": {
"LastTagTime": "2019-06-04T05:17:01.430558997+05:30"
}
}
]
Lab #1: Create an image with GIT installed
Tested Infrastructure
| Platform | Number of Instance | Reading Time |
|---|---|---|
| Play with Docker | 1 | 5 min |
Assignment:
- Create an image with GIT installed
- Tag your image as labs-git:v1.0.
- Create a container based on that image, and run git –version to check that it is installed correctly
Creating Dockerfile
FROM alpine:3.5
RUN apk update
RUN apk add git
Build Docker Image
docker build -t ajeetraina/alpine-git .
Tagging image as labs-git
docker tag ajeetraina/alpine-git ajeetraina/labs-git:v1.0
Verify the Images
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
ajeetraina/alpine-git latest cb913e37a593 16 seconds ago 26.6MB
ajeetraina/labs-git v1.0 cb913e37a593 16 seconds ago 26.6MB
Create a container
docker run -itd ajeetraina/labs-git:v1.0 /bin/sh
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
3e26a5268f55 ajeetraina/labs-git:v1.0 "/bin/sh" 4 seconds ago Up 2 seconds elated_neumann
Enter into Container Shell
docker attach 3e26
Please press “Enter” key twice so as to enter into container shell
Verify if GIT is installed
/ # git --version
git version 2.13.7
Lab #2: Create an image with ADD instruction
Tested Infrastructure
| Platform | Number of Instance | Reading Time |
|---|---|---|
| Play with Docker | 1 | 5 min |
Creating Dockerfile
FROM alpine:3.5
RUN apk update
ADD http://www.vlsitechnology.org/pharosc_8.4.tar.gz .
Build Docker Image
docker build -t saiyam911/alpine-add . -f
Tagging image as labs-git
docker tag saiyam911/alpine-add saiyam911/labs-add:v1.0
Verify the Images
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
saiyam911/alpine-add latest cdf97cb49d48 38 minutes ago 300MB
saiyam911/labs-add v1.0 cdf97cb49d48 38 minutes ago 300MB
Create a container
docker run -itd saiyam911/labs-add:v1.0 /bin/sh
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
f0940750f61a saiyam911/labs-add:v1.0 "/bin/sh" 20 seconds ago Up 18 seconds distracted_darwin
Enter into Container Shell
docker attach f094
Please press “Enter” key twice so as to enter into container shell
Verify if the link has been extracted onto the container
/ # ls -ltr
-rw------- 1 root root 295168000 Sep 19 2007 pharosc_8.4.tar.gz
ADD Command lets you to add a tar directly from a link and explode to the container.
Lab #3: Create an image with COPY instruction
Tested Infrastructure
| Platform | Number of Instance | Reading Time |
|---|---|---|
| Play with Docker | 1 | 5 min |
The COPY instruction copies files or directories from source and adds them to the filesystem of the container at destinatio.
Two form of COPY instruction
COPY [--chown=:] ...
COPY [--chown=:] ["",... ""] (this form is required for paths containing whitespace)
Assignment:
- Create an image with COPY instruction
- COPY instruction in Multi-stage Builds
Create an image with COPY instruction
Dockerfile
FROM nginx:alpine
LABEL maintainer="Collabnix"
COPY index.html /usr/share/nginx/html/
ENTRYPOINT ["nginx", "-g", "daemon off;"]
Lets create the index.html file
$ echo "Welcome to Dockerlabs !" > index.html
Building Docker Image
$ docker image build -t cpy:v1 .
Staring the container
$ docker container run -d --rm --name myapp1 -p 80:80 cpy:v1
Checking index file
$ curl localhost
Welcome to Dockerlabs !
COPY instruction in Multi-stage Builds
FROM alpine AS stage1
LABEL maintainer="Collabnix"
RUN echo "Welcome to Docker Labs!" > /opt/index.html
FROM nginx:alpine
LABEL maintainer="Collabnix"
COPY --from=stage1 /opt/index.html /usr/share/nginx/html/
ENTRYPOINT ["nginx", "-g", "daemon off;"]
Building Docker Image
$ docker image build -t cpy:v2 .
Staring the container
$ docker container run -d --rm --name myapp2 -p 8080:80 cpy:v2
Checking index file
$ curl localhost:8080
Welcome to Docker Labs !
NOTE: You can name your stages, by adding an AS to the FROM instruction.By default, the stages are not named, and you can refer to them by their integer number, starting with 0 for the first FROM instruction.You are not limited to copying from stages you created earlier in your Dockerfile, you can use the COPY --from instruction to copy from a separate image, either using the local image name, a tag available locally or on a Docker registry.
COPY --from=nginx:latest /etc/nginx/nginx.conf /nginx.conf
Lab #4: Create an image with CMD instruction
Tested Infrastructure
| Platform | Number of Instance | Reading Time |
|---|---|---|
| Play with Docker | 1 | 5 min |
Creating Dockerfile
FROM alpine:3.6
RUN apk update
CMD ["top"]
Building Docker Container
docker build -t ajeetraina/lab3_cmd . -f Dockerfile_cmd
Running the Docker container
docker run ajeetraina/lab3_cmd:latest
Lab #5 : Create an image with ENTRYPOINT instruction
Tested Infrastructure
| Platform | Number of Instance | Reading Time |
|---|---|---|
| Play with Docker | 1 | 5 min |
The ENTRYPOINT instruction make your container run as an executable.
ENTRYPOINT can be configured in two forms:
Exec Form
ENTRYPOINT [“executable”, “param1”, “param2”]
Shell Form
ENTRYPOINT command param1 param2
If an image has an ENTRYPOINT if you pass an argument it, while running container it wont override the existing entrypoint, it will append what you passed with the entrypoint.To override the existing ENTRYPOINT you should user –entrypoint flag when running container.
Assignment:
Create an image with ENTRYPOINT instruction(Exec Form)
ENTRYPOINT instruction in Shell Form
Override the existing ENTRYPOINT
Create an image with ENTRYPOINT instruction(Exec Form
Dockerfile
FROM alpine:3.5
LABEL maintainer="Collabnix"
ENTRYPOINT ["/bin/echo", "Hi, your ENTRYPOINT instruction in Exec Form !"]
Build Docker Image
$ docker build -t entrypoint:v1 .
Verify the Image
$ docker image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
entrypoint v1 1d06f06c2062 2 minutes ago 4MB
alpine 3.5 f80194ae2e0c 7 months ago 4MB
Create a container
$ docker container run entrypoint:v1
Hi, your ENTRYPOINT instruction in Exec Form !
ENTRYPOINT instruction in Shell Form
$ cat Dockerfile
FROM alpine:3.5
LABEL maintainer="Collabnix"
ENTRYPOINT echo "Hi, your ENTRYPOINT instruction in Shell Form !"
Build Docker Image
$ docker build -t entrypoint:v2 .
Verify the Image
$ docker image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
entrypoint v2 cde521f13080 2 minutes ago 4MB
entrypoint v1 1d06f06c2062 5 minutes ago 4MB
alpine 3.5 f80194ae2e0c 7 months ago 4MB
Create a container
$ docker container run entrypoint:v2
Hi, your ENTRYPOINT instruction in Shell Form !
Override the existing ENTRYPOINT
$ docker container run --entrypoint "/bin/echo" entrypoint:v2 "Hello, Welocme to Docker Meetup! "
Hello, Welocme to Docker Meetup!
Lab #6: WORKDIR instruction
Tested Infrastructure
| Platform | Number of Instance | Reading Time |
|---|---|---|
| Play with Docker | 1 | 5 min |
The WORKDIR directive in Dockerfile defines the working directory for the rest of the instructions in the Dockerfile. The WORKDIR instruction wont create a new layer in the image but will add metadata to the image config. If the WORKDIR doesn’t exist, it will be created even if it’s not used in any subsequent Dockerfile instruction. you can have multiple WORKDIR in same Dockerfile. If a relative path is provided, it will be relative to the previous WORKDIR instruction. `WORKDIR /path/to/workdir` If no WORKDIR is specified in the Dockerfile then the default path is `/.` The WORKDIR instruction can resolve environment variables previously set in Dockerfile using ENV.
Assignment:
Dockerfile with WORKDIR instruction
WORKDIR with Relative path
WORKDIR with Absolute path
WORKDIR with environment variables as path
Dockerfile with WORKDIR instruction
FROM alpine:3.9.3
LABEL maintainer="Collabnix"
WORKDIR /opt
Building Docker image
$ docker build -t workdir:v1 .
Testing current WORKDIR by running container
$ docker run -it workdir:v1 pwd
WORKDIR with relative path
Dockerfile
FROM alpine:3.9.3
LABEL maintainer="Collabnix"
WORKDIR /opt
RUN echo "Welcome to Docker Labs" > opt.txt
WORKDIR folder1
RUN echo "Welcome to Docker Labs" > folder1.txt
WORKDIR folder2
RUN echo "Welcome to Docker Labs" > folder2.txt
Building Docker image.
$ docker build -t workdir:v2 .
Testing current WORKDIR by running container
$ docker run -it workdir:v2 pwd
WORKDIR with environment variables as path
Dockerfile
FROM alpine:3.9.3
LABEL maintainer="Collabnix"
ENV DIRPATH /myfolder
WORKDIR $DIRPATH
Building Docker image
$ docker build -t workdir:v4 .
Testing current WORKDIR by running container
$ docker run -it workdir:v4 pwd
Lab #7: RUN instruction
The ` RUN `instruction execute command on top of the below layer and create a new layer.
RUN instruction can be wrote in two forms:
RUN (shell form)
RUN [“executable”, “param1”, “param2”] (exec form)
Tested Infrastructure
| Platform | Number of Instance | Reading Time |
|---|---|---|
| Play with Docker | 1 | 5 min |
Assignment:
Create an image with RUN instruction
Combining multiple RUN instruction to one
Create an image with RUN instruction
FROM alpine:3.9.3
LABEL maintainer="Collabnix"
RUN apk add --update
RUN apk add curl
RUN rm -rf /var/cache/apk/
$ docker image build -t run:v1 .
Checking layer of the image
$ docker image history run:v1
IMAGE CREATED CREATED BY SIZE
NT
5b09d7ba1736 19 seconds ago /bin/sh -c rm -rf /var/cache/apk/ 0B
192115cc597a 21 seconds ago /bin/sh -c apk add curl 1.55MB
0518580850f1 43 seconds ago /bin/sh -c apk add --update 1.33MB
8590497d994e 45 seconds ago /bin/sh -c #(nop) LABEL maintainer=Collabnix 0B
cdf98d1859c1 4 months ago /bin/sh -c #(nop) CMD ["/bin/sh"] 0B
4 months ago /bin/sh -c #(nop) ADD file:2e3a37883f56a4a27… 5.53MB
Number of layers 6
Checking image size
$ docker image ls run:v1
REPOSITORY TAG IMAGE ID CREATED SIZE
run v1 5b09d7ba1736 4 minutes ago 8.42MB
Its 8.42MB
Combining multiple RUN instruction to one
FROM alpine:3.9.3
LABEL maintainer="Collabnix"
RUN apk add --update \ &&
apk add curl \ &&
rm -rf /var/cache/apk/
Building Docker image
$ docker image build -t run:v2 .
Checking layer of the image
$ docker image history run:v2
IMAGE CREATED CREATED BY SIZE
NT
784298155541 50 seconds ago /bin/sh -c apk add --update && apk add curl… 1.55MB
8590497d994e 8 minutes ago /bin/sh -c #(nop) LABEL maintainer=Collabnix 0B
cdf98d1859c1 4 months ago /bin/sh -c #(nop) CMD ["/bin/sh"] 0B
4 months ago /bin/sh -c #(nop) ADD file:2e3a37883f56a4a27… 5.53MB
Number of layers 4
Checking image size
$ docker image ls run:v2
REPOSITORY TAG IMAGE ID CREATED SIZE
run v2<PHONE_NUMBER>41 3 minutes ago 7.08MB
its now 7.08MB


Contracting parties: 4 total: Australia, Chile, EU, New Zealand.
Area: High seas of South Pacific Ocean (from the most eastern part of the Southern Indian Ocean through the Pacific towards the EEZs of South America.
Date entered into force: Late 2009.
FAO association: No.
FAO statistical area: 81, 71, 57.
Objectives: “…to ensure the long-term conservation and sustainable use of fish stocks and to protect biodiversity in the marine environment.”
Primary species: Discreet high seas stocks and straddling stocks.
At the time of assessment (Cullis-Suzuki & Pauly, 2009), SPRFMO did not have species biomass information available.