openvidu-insecure-js
A client-side only application built with JavaScript, HTML and CSS.
If it is the first time you use OpenVidu, it is highly recommended to start with openvidu-hello-world tutorial, as this app is no more than an extension of it with some new features and styles.
Understanding this tutorial
OpenVidu is composed by the three modules displayed on the image above in its insecure version.
- openvidu-browser: JavaScript library for the browser. It allows you to manage your video-calls straight away from your clients
- openvidu-server: Java application that controls Kurento Media Server
- Kurento Media Server: server that handles low level operations of media flows transmission
Running this tutorial
1) Clone the repo:
git clone https://github.com/OpenVidu/openvidu-tutorials.git
2) You will need an http web server installed in your development computer to execute the sample application. If you have node.js installed, you can use http-server to serve application files. It can be installed with:
npm install -g http-server
3) Run the tutorial:
http-server openvidu-tutorials/openvidu-insecure-js/web
4) openvidu-server and Kurento Media Server must be up and running in your development machine. The easiest way is running this Docker container which wraps both of them (you will need Docker CE):
docker run -p 4443:4443 --rm -e openvidu.secret=MY_SECRET openvidu/openvidu-server-kms:2.12.0
5) Go to localhost:8080
to test the app once the server is running. The first time you use the docker container, an alert message will suggest you accept the self-signed certificate of openvidu-server when you first try to join a video-call.
If you are using Windows, read this FAQ to properly run the tutorial
To learn some tips to develop with OpenVidu, check this FAQ
Understanding the code
This application is very simple. It has only 4 files:
openvidu-browser-VERSION.js
: openvidu-browser library. You don't have to manipulate this file.app.js
: sample application main JavaScript file, which makes use of openvidu-browser-VERSION.js. You can manipulate this file to suit your needs.style.css
: some CSS classes to style index.html. You can manipulate this file to suit your needs.index.html
: HTML code for the form to connect to a video-call and for the video-call itself. You can manipulate this file to suit your needs. It has two links to both JavaScript files:
<script src="openvidu-browser-VERSION.js"></script>
<script src="app.js"></script>
Let's see how app.js
uses openvidu-browser-VERSION.js
:
First lines declare the variables that will be needed in different points along the code
var OV;
var session;
OV
will be our OpenVidu object (entrypoint to the library). session
will be the video-call we will connect to. As first sentences in the join method, we initialize the two parameters whose value is retrieved from the HTML inputs.
var mySessionId = document.getElementById("sessionId").value; // Session the user will join
var myUserName = document.getElementById("userName").value; // Nickname of the user in the session
Let's initialize a new session and configure our events:
// --- 1) Get an OpenVidu object ---
OV = new OpenVidu();
// --- 2) Init a session ---
session = OV.initSession();
As you can see in the code, the process is very simple: get an OpenVidu object and initialize a Session object with it.
// --- 3) Specify the actions when events take place in the session ---
// On every new Stream received...
session.on('streamCreated', event => {
// Subscribe to the Stream to receive it. HTML video will be appended to element with 'video-container' id
var subscriber = session.subscribe(event.stream, 'video-container');
// When the HTML video has been appended to DOM...
subscriber.on('videoElementCreated', event => {
// Add a new <p> element for the user's nickname just below its video
appendUserData(event.element, subscriber.stream.connection);
});
});
// On every Stream destroyed...
session.on('streamDestroyed', event => {
// Delete the HTML element with the user's nickname. HTML videos are automatically removed from DOM
removeUserData(event.stream.connection);
});
Here we subscribe to the events that interest us. In this case, we want to receive all videos published to the session, as well as displaying every user's nickname next to its video. To achieve this:
-
streamCreated
: for each new Stream received by OpenVidu, we immediately subscribe to it so we can see its video. A new HTML video element will be appended to element with id 'video-container'. -
videoElementCreated
: event triggered by Subscriber object (returned by the previousSession.subscribe
method). This allows us to add the participant nickname to the new video previously added instreamCreated
event. Auxiliary methodappendUserData
is responsible for appending a new paragraph element just below theevent.element
video, containingsubscriber.stream.connection.data
field. In this case, this field contains the user's nickName. You can see how to feed this property from the client in a later step. -
streamDestroyed
: for each Stream that has been destroyed (which means a user has left the video-call), we remove the element with the user's nickname that we added in the previous event with the auxiliary methodremoveUserData
(appendUserData
method created the element with an id containingevent.stream.connection.connectionId
unique value, so we can now identify the right element to be removed). OpenVidu automatically deletes the proper video element by default, so we don't need to do anything else.
Check Application specific methods section to see all the auxiliary methods used in this app
Get a token from OpenVidu Server
// --- 4) Connect to the session with a valid user token ---
// 'getToken' method is simulating what your server-side should do.
// 'token' parameter should be retrieved and returned by your own backend
getToken(mySessionId).then(token => {
// See next point to see how to connect to the session using 'token'
});
Now we need a token from OpenVidu Server. In a production environment we would perform this operations in our application backend, by making use of the REST API, OpenVidu Java Client or OpenVidu Node Client. Here we have implemented the POST requests to OpenVidu Server in a method getToken()
that returns a Promise with the token. Without going into too much detail, this method performs two ajax requests to OpenVidu Server, passing OpenVidu Server secret to authenticate them:
- First ajax request performs a POST to
/api/sessions
(we send acustomSessionId
field to name the session with ourmySessionId
value retrieved from HTML input) - Second ajax request performs a POST to
/api/tokens
(we send asession
field to assign the token to this same session)
You can inspect this method in detail in the GitHub repo.
Finally connect to the session using the token and publish your webcam:
// --- 4) Connect to the session with a valid user token ---
// 'getToken' method is simulating what your server-side should do.
// 'token' parameter should be retrieved and returned by your own backend
getToken(mySessionId).then(token => {
// First param is the token got from OpenVidu Server. Second param can be retrieved by every user on event
// 'streamCreated' (property Stream.connection.data), and will be appended to DOM as the user's nickname
session.connect(token, { clientData: myUserName })
.then(() => {
// --- 5) Set page layout for active call ---
document.getElementById('session-title').innerText = mySessionId;
document.getElementById('join').style.display = 'none';
document.getElementById('session').style.display = 'block';
// --- 6) Get your own camera stream with the desired properties ---
var publisher = OV.initPublisher('video-container', {
audioSource: undefined, // The source of audio. If undefined default microphone
videoSource: undefined, // The source of video. If undefined default webcam
publishAudio: true, // Whether you want to start publishing with your audio unmuted or not
publishVideo: true, // Whether you want to start publishing with your video enabled or not
resolution: '640x480', // The resolution of your video
frameRate: 30, // The frame rate of your video
insertMode: 'APPEND', // How the video is inserted in the target element 'video-container'
mirror: false // Whether to mirror your local video or not
});
// --- 7) Specify the actions when events take place in our publisher ---
// When our HTML video has been added to DOM...
publisher.on('videoElementCreated', function (event) {
initMainVideo(event.element, myUserName);
appendUserData(event.element, myUserName);
event.element['muted'] = true;
});
// --- 8) Publish your stream ---
session.publish(publisher);
})
.catch(error => {
console.log('There was an error connecting to the session:', error.code, error.message);
});
});
In session.connect
method first param is the recently retrieved user token. Remember videoElementCreated
event for the Subscriber object, when we added the user's nickname to the HTML? Well, second parameter is the actual value every user will receive in Stream.connection.data
property in that event. So in this case it is an object with a property "clientData" with value "myUserName", which has been set in the first step to the value retrieved from HTML input <input class="form-control" type="text" id="userName" required>
(this is filled by the user).
If the method succeeds, we first change our view to the active call (5) and then proceed to publish our webcam to the session. To do so we get a Publisher
object with the desired properties (6). This process will end with the addition of a new HTML video element showing your camera, as a child of element with id 'video-container'. Event videoElementCreated
will be fired by the Publisher object just after this video is added to DOM, so we can subscribe to it and do whatever we want with it. In this case, we init another bigger video element with our video and append our nickname to it, by using auxiliary methods initMainVideo
and appendUserData
(7).
Finally we just have to publish publisher
object through Session.publish
method (8), and the rest of users will begin receiving our webcam ('streamCreated' event will be fired for them).
Leaving the session
Whenever we want a user to leave the session, we just need to call session.disconnect
method:
function leaveSession() {
// --- 9) Leave the session by calling 'disconnect' method over the Session object ---
session.disconnect();
// Removing all HTML elements with user's nicknames.
// HTML videos are automatically removed when leaving a Session
removeAllUserData();
// Back to 'Join session' page
document.getElementById('join').style.display = 'block';
document.getElementById('session').style.display = 'none';
}
Application specific methods
Here you have all the auxiliary methods used in this app, which are not directly related to OpenVidu:
/* APPLICATION SPECIFIC METHODS */
window.addEventListener('load', function () {
generateParticipantInfo();
});
window.onbeforeunload = function () {
if (session) session.disconnect();
};
function generateParticipantInfo() {
document.getElementById("sessionId").value = "SessionA";
document.getElementById("userName").value = "Participant" + Math.floor(Math.random() * 100);
}
function appendUserData(videoElement, connection) {
var userData;
var nodeId;
if (typeof connection === "string") {
userData = connection;
nodeId = connection;
} else {
userData = JSON.parse(connection.data).clientData;
nodeId = connection.connectionId;
}
var dataNode = document.createElement('div');
dataNode.className = "data-node";
dataNode.id = "data-" + nodeId;
dataNode.innerHTML = "<p>" + userData + "</p>";
videoElement.parentNode.insertBefore(dataNode, videoElement.nextSibling);
addClickListener(videoElement, userData);
}
function removeUserData(connection) {
var dataNode = document.getElementById("data-" + connection.connectionId);
dataNode.parentNode.removeChild(dataNode);
}
function removeAllUserData() {
var nicknameElements = document.getElementsByClassName('data-node');
while (nicknameElements[0]) {
nicknameElements[0].parentNode.removeChild(nicknameElements[0]);
}
}
function addClickListener(videoElement, userData) {
videoElement.addEventListener('click', function () {
var mainVideo = document.querySelector('#main-video video');
var mainUserData = document.querySelector('#main-video p');
if (mainVideo.srcObject !== videoElement.srcObject) {
mainUserData.innerHTML = userData;
mainVideo.srcObject = videoElement.srcObject;
}
});
}
function initMainVideo(videoElement, userData) {
document.querySelector('#main-video video').srcObject = videoElement.srcObject;
document.querySelector('#main-video p').innerHTML = userData;
document.querySelector('#main-video video')['muted'] = true;
}


UKCloud Limited (“UKC”) and Virtual Infrastructure Group Limited (“VIG”) (together “the Companies”) – in Compulsory Liquidation
On 25 October 2022, the Companies were placed into Liquidation with the Official Receiver appointed as Liquidator and J Robinson and A M Hudson simultaneously appointed as Special Managers to manage the liquidation process on behalf of the Official Receiver.
Further information regarding the Liquidations can be found here: https://www.gov.uk/government/news/virtual-infrastructure-group-limited-and-ukcloud-limited-information-for-creditors-and-interested-parties
Contact details:
For any general queries relating to the Liquidations please email<EMAIL_ADDRESS>For customer related queries please email<EMAIL_ADDRESS>For supplier related queries please email<EMAIL_ADDRESS>Pricing information for UKCloud for OpenStack
Overview
UKCloud for OpenStack instance pricing can be as low as 1p per hour. Full pricing with all options, including licensing and connectivity, is available in the UKCloud Pricing Guide.
If you'd like a quote for UKCloud for OpenStack, contact your Service Delivery Manger or email<EMAIL_ADDRESS>Or you can contact us via our website or call 01252 303 300.
Instances
Instance pricing is based on a minimum billing period of one hour and depends on the choice of:
Instance flavour
Security domain
Each service has a per-unit price. Billing is per unit.
Persistent block storage
Persistent block storage cost is based on the average storage provisioned by the customer at the end of the month, which is based on daily average measurements.
In addition, our Cloud Storage service is available to provide an API-accessible and S3-compatible object storage solution that complements your OpenStack environment. For full details, see the Cloud Storage Service Definition.
Self-service backup and restoration
TrilioVault provides data protection through efficient point-in-time capture, storage and application recovery. TrilioVault is a scalable OpenStack backup and recovery platform that can recover from any point-in-time with a single click usign the Horizon dashboard or leveraging Trilio's rich set of APIs.
TrilioVault is agentless and non-disruptive by design, both during deployment and operation. You can also integrate it with your existing cloud lifecycle management to automate deployment via tools such as Ansible, Puppet, Salt and Chef.
Licensing
The standard terms and conditions from Microsoft state that if you want to run a Windows Server operating system in the cloud, you must license it via the Service Provider Licence Agreement (SPLA), which must be provided by UKCloud. Microsoft Developer Network (MSDN) and Windows desktop operating system licences are generally not permitted by Microsoft's terms and conditions. UKCloud offers the option for you to bring your own Red Hat licensing, or certain Microsoft application licensing under Microsoft Mobility using software assurance.
If you're licensing Microsoft Windows Server OS, Microsoft SQL Server, Microsoft RDS or Red Hat Enterprise Linux, licensing charges apply. You also have the option of utilising your own subscription-based Office365 and Windows 10 Enterprise licensing under the QMTH program.
Pricing example
The following example illustrates how to use the information in the Pricing Guide to calculate the cost of a UKCloud for OpenStack instance.
An application with lower priority workloads, such as temporary applications, data processing or system modelling tasks.
Security domain: Assured OFFICIAL
Instance flavour: 1 t1.small instance
Persistent block storage used: 60GiB Tier 2 block storage
TrilioVault: Yes
Operating system: Red Hat Enterprise Linux
Instance cost per month
A t1.small instance in the Assured OFFICIAL security domain costs £0.030 per hour.
Red Hat Enterprise Linux OS licensing for a t1.small instance costs £0.040 per hour.
In an average 730 hour month, the monthly instance cost works out at:
| Hours in operation | x | (Instance | + | Licensing) | = | Instance cost per month |
|---|---|---|---|---|---|---|
| 730 | x | (£0.030 | + | £0.040) | = | £51.10 |
Storage cost per month
Tier 2 persistent block storage costs £0.10 per GiB month, so the storage cost for 60GiB is £6.00.
Backup cost per month
To protect a single instance, TrilioVault costs £12.00 per instance and £0.10 per GiB per month.
| Monthly subscription | + | Storage cost | = | Backup cost per month |
|---|---|---|---|---|
| (1 x £12.00) | + | (60 x £0.10) | = | £18.00 |
Total basic cost
Calculate the total basic cost by adding together the monthly instance, storage and backup costs.
| Instance cost per month | + | Storage cost per month | + | Backup cost per month | = | Total basic cost |
|---|---|---|---|---|---|---|
| £51.10 | + | £6.00 | + | £18.00 | = | £75.10 |
Discount options
The following discount and purchase schemes are available with UKCloud for VMware:
Commitment discount
Annual subscription discount
Cloud Credits
For more information about the discount and purchase schemes offered by UKCloud, see UKCloud discount and purchase schemes.
Additional pricing notes
Shelving instances
- You can shelve an instance, at which stage all compute charges for the instance will cease and you are only charged at the prevailing rate for the storage the instance was consuming. For all other states, UKCloud will continue to charge for any resources that exist within your OpenStack project.
Licensing
SQL Standard is charged per hour based on the powered-on state of the host VM. SQL Enterprise is charged monthly.
You must report, via support ticket, which VMs have either SQL Standard or Enterprise installed so that we can license and bill you accordingly. You do have the option to bring your own licences for SQL under Microsoft Mobility, though you must inform us as soon as you receive confirmation from Microsoft that mobility has been agreed. For more information, see How to license Microsoft applications/software on the UKCloud platform.
Microsoft Windows Server licences must be provided by UKCloud and you'll be billed per hour based on the powered-on state of the host VM.
If you want to host Oracle solutions on our platform, consult our Cloud Architects, or consider our Dedicated Compute v2 or Private Cloud for Oracle Software services to avoid licensing issues.
Snapshots
You will only ever be charged for the amount of Tier 1 or Tier 2 storage your snapshots consume, that you have scheduled via the OpenStack dashboard or the API. We do not place any additional premium on top for the snapshot functionality. To calculate an estimated cost of performing snapshots on UKCloud for OpenStack, use the following formula:
Cost £ = Instance size (GiB) x Number of snapshots to be retained (customer controlled) x Choice of storage (Tier 1 or Tier 2)
For example, if a customer has an 80GiB Tier 2 instance and performs a snapshot every hour, but only wants to keep the current snapshot, plus the last nine snapshots then:
80 GiB x 10 snapshots x £0.10 = £80 per month
Billing and payment information
Billing for the service is one month in arrears. The minimum unit of time for use is one hour. Part hours will be rounded up.
Payment can be made by direct bank transfer. You can find bank details for payment on your invoice.
Billing information is provided in an evidence file on the first working day of the month for your previous month's spend. For more information about the invoice evidence file, see Understanding your invoice evidence file. You can also query the OpenStack Ceilometer API to query live event data.
Termination fees
There are no termination fees for the service. You are responsible for extracting your own data from the platform if required. UKCloud may make an additional charge for transferring data out of the service.
Free trials
We offer a 30-day free trial so that you can test and evaluate our service without commitment. Your trial provides you with a live environment on the UKCloud platform to test our services and verify whether they are suited to your needs. If you're new to UKCloud, you can request a trial via the UKCloud Free Trial page. If you're an existing customer, contact your Service Delivery Manager. For more information about free trials, see the Free Trials Service Scope.
Service scope
For information about what is and isn't included in the UKCloud for OpenStack service, as well as UKCloud and customer responsibilities, see the UKCloud for OpenStack Service Scope.
Feedback
If you find a problem with this article, click Improve this Doc to make the change yourself or raise an issue in GitHub. If you have an idea for how we could improve any of our services, send an email to feedback@ukcloud.com.


Home Loan Management System
Home
Contact
Sign Up
Contact us
Please leave an email with priority level
Form
- Select Your Category -
Builders
Members:
Banks:
Others:
Low Priority
Normal Priority
High Priority
Email me a copy of this message
I am a human and not a robot
Terms & Conditions
Coming Soon.......


Shropshire Star comment: Zac’s story is one of the triumph of hope
It is wonderful news that Zac Oliver is on the home straight in his battle to defeat cancer.
The brave five-year-old captured the heart of a nation as his plight became headline news. His family had to raise more than £500,000 to pay for treatment in the USA for his rare condition. Against all the odds, they did so. They are remarkable people.
Zac’s story is one of the triumph of hope. His parents refused to accept defeat. They refused to acknowledge the grim outcome that they and their beloved son would face had they not embarked upon their remarkable quest to fly him to the USA for treatment.
They were successful in their fund-raising campaign and Zac can now look forward to a long, happy and healthy life thanks to the determination, selfless love and unconditional support of his parents.
See also:
It is not just Zac’s parents whose conduct has been noteworthy. There are many others who have also played a part, including hundreds and hundreds of fundraisers and volunteers who have given their time and energy, as well as their money, to the cause. They have rattled tins, attracted online sponsorship and made sure Zac’s goal was met.
The doctors and nurses who have cared for Zac also deserve praise and thanks. They have done no more than is expected of them, of course. But their tender and devoted work made a huge difference to the life of a youngster from Telford who now has everything to look forward to.
Why, though, was it necessary for Zac’s parents to take matters into their own hands? We have a publicly-funded National Health Service and on this occasion it was not able to provide the life-saving treatment that others could. Nor was it able to broker a deal to cover the costs of Zac’s treatment, the burden of which fell to his parents.
We recognise that the NHS cannot afford to pay for everything. Modern medicine is moving on apace and newer treatments are available with higher price tags than ever before.
But when a youngster’s life is under threat and in need of life-saving treatment, his family, rather than the state, had to step in.
And that, as well as the remarkable courage of Zac and the unstinting love shown by his parents, is the legacy of this story.
We wish Zac and his family well.


| Home | Trees | Indices | Help |
|
|---|
|
|
object --+ | VaultEditor
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from |
|
|||
|
Inherited from |
|
x.__init__(...) initializes x; see help(type(x)) for signature
|
"Destroy a file, when shred (core-utils) is not available Unix `shred' destroys files "so that they can be recovered only with great difficulty with specialised hardware, if at all". It is based on the method from the paper "Secure Deletion of Data from Magnetic and Solid-State Memory", Proceedings of the Sixth USENIX Security Symposium (San Jose, California, July 22-25, 1996). We do not go to that length to re-implement shred in Python; instead, overwriting with a block of random data should suffice. See https://github.com/ansible/ansible/pull/13700 . |
Securely destroy a decrypted file Note standard limitations of GNU shred apply (For flash, overwriting would have no effect due to wear leveling; for other storage systems, the async kernel->filesystem->disk calls never guarantee data hits the disk; etc). Furthermore, if your tmp dirs is on tmpfs (ramdisks), it is a non-issue. Nevertheless, some form of overwriting the data (instead of just removing the fs index entry) is a good idea. If shred is not available (e.g. on windows, or no core-utils installed), fall back on a custom shredding method. |
write data to given path if shred==True, make sure that the original data is first shredded so that is cannot be recovered |
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Fri Jul 29 13:11:38 2016 | http://epydoc.sourceforge.net |


The Morning After: Russia's 'sovereign internet' law takes effect
And Facebook's new ad policy meets the UK elections.
by Mat SmithHey, good morning!
Welcome back! Today's news neatly touches on some of the major stories of 2019, with three companies that have consistently made the headlines. It includes Facebook's continuing efforts to keep political ads flowing with minimal policing, Tesla's improving its Autopilot software so it doesn't plow into cones and Huawei's potential trade ban loosening up, with several companies expecting to pick up licenses to deal with the company. Russia's 'sovereign' internet is also here. Two more months to go.
Its policy is about to get an early test.
Facebook will let politicians run false ads during UK elections
Facebook's loose policy of allowing politicians to run false ads is going to get tested in short order. The social network won't fact-check candidates' ads in the weeks ahead of the forthcoming UK elections on December 12th. It will bar candidates from linking to debunked or pro-violence material and will still scrutinize groups like Leave.EU, but voters will have to rely on skepticism beyond that regarding fresh false claims and misinformation.
Sounds rather important.
Tesla Autopilot now recognizes traffic cones
Tesla is quietly rolling out an Autopilot update that lets its electric cars detect and display cones on the road. If you're using Navigate on Autopilot, your EV will even plan lane changes to avoid cones so you don't have to take control around construction work.
That said, and a caveat that gets repeated a lot in these early days of autonomous cars, you may not want to put all your trust in the feature just yet. Some early users have warned that Autopilot doesn't always recognize the cones, potentially leading to dangerous lane changes -- say, steering you into oncoming traffic or construction.
There have already been 260 requests for special licenses.
US will grant Huawei trade ban exemptions 'very shortly'
The Commerce Department has been tackling hundreds of requests to work with Huawei: "More than we would've thought," according to Commerce Secretary Wilbur Ross. While some will pick up approval, companies should assume they won't get one, apparently. How about Google? Huawei can't offer new phones with a version of Android using Google apps so long as the blacklisting remains in effect, and its ability to update existing phones will go away when temporary licenses expire. That's largely why its latest phone landed without Android services.
Critics warn that it could lead to Russia's own Great Firewall.
Russia's 'sovereign internet' law takes effect
Russia's "sovereign internet" law, which President Vladimir Putin signed back in May, took effect on November 1st. As the BBC explains, it gives the country's government power to block access to content from within or outside Russia "in an emergency." Of course, it's up to the government to decide what constitutes an emergency. The official aim is to prevent cyber attacks and keep its internet running if the West suddenly decides to cut Russia off from the web.
The inspection equipment that internet providers will now be required to install can both track and reroute traffic. It's a grand undertaking and will be difficult to implement. David Belson, senior director of Internet Research & Analysis at Internet Society, said there are "hundreds of networks coming together [in Russia] to exchange traffic" and that "it's challenging -- if not impossible -- to completely isolate the Russian Internet."
But wait, there's more...
- The Wirecutter: The best external hard drives
- After Math: It's sequel season
- Study casts doubt on the chances of life on watery alien planets
The Morning After is a new daily newsletter from Engadget designed to help you fight off FOMO. Who knows what you'll miss if you don't Subscribe.
Craving even more? Like us on Facebook or Follow us on Twitter.
Have a suggestion on how we can improve The Morning After? Send us a note.


This is a demo of a Line chart that was inspired by an example that was showcased on the NVD website.
It's a filled Line chart that has the
filledAccumulative
and the spline
options enabled.
And importantly, the first color for the chart is transparent - making it seem like the rest of the datasets are "floating".
The rest of the configuration
is quite straightforward - the vertical grid lines are turned off and the
colors are a custom set. There are also labels specified (the labels are numbers
- though this does NOT make it a scale. The Line chart X-axis
is NOT scaled).
The responsive
configuration reduces the size of the SVG
tag and removes the CSS
float
.
Note:
There's a canvas
version of this chart in the download (called demos/line-nvd.html
) where
the datasets are traced sequentially (so the datasets are traced one at a time and when one
dataset finishes tracing the next starts).
 Put this where you want the chart to show up:

This is the code that generates the chart - it should be placed AFTER the
div
tag:


Consider replacing this Hashtable with the newer java.util.Map
This rule is deprecated, use {rule:squid:S1149} instead.


How does JavaScript compare to HTML and CSS?
HTML is the language used to provide the basic structure of a website, for example, the text, headings, and images. CSS is the language used to provide the website with style, for example, the colour and styles of fonts and layouts. JavaScript is the programming language that provide the website with a sense of motion, for example, a drop down navigation bar.
Explain control flow and loops using an example process from everyday life, for example 'waking up' or 'brushing your teeth'.
Control flow is the order are task runs. Real life example:
Going to the gym - If you are sore, you will stretch. If you are not sore, you will workout.
When it comes to loops, they iterate over the same code until the condition turns false. Real life example:
Running on the treadmill - Have you hit 500 calories? If no, the action will be to run faster. If yes, the action will be to stop running.
Explain the difference between accessing data from arrays and objects.
Both arrays and objects contain items. The difference is how these are stored.
Arrays - items are stored as a list, for example (Kyoko, 27, Wellington)
Objects - each item is assigned an ID, for example (Name: Kyoko, Age: 27, Lives in: Wellington)
The way in which we access these items is also different. To access object values, we use dot notation. To access array values, we use the numerical index.
Explain what functions are and why they are useful.
A function is used in Javascript to perform a task. We can execute these when a function is called. This can be useful, for example if wanted to know the name of the second person in our contacts list. We could create a function to return this value.


If you commit changes:
- Make sure all tests pass.
- Run
./benchmark/benchmark.js
, make sure that performance not degraded.
- DON'T include auto-generated browser files to commit.
Other things:
- Prefer gitter for short "questions".
Keep issues for bug reports, suggestions and so on.
- Make sure to read dev info
prior to ask about plugins development.
- Issues of "question" type are closed after several days of inactivity,
if not qualified as bug report, enhancement etc (see 1).


Power Electronic Converters¶
The converters are divided into two classes: The discretely controlled and continuously controlled converters. The PowerElectronicConverter class is the base class for all converters. From that, the DiscreteConverter and the ContinuousDynamicallyAveragedConverter derive to be the base class for all continuous and discrete converters.
Converter Base Class¶
-
class
gym_electric_motor.physical_systems.converters.
PowerElectronicConverter
(tau, dead_time=False, interlocking_time=0.0, **__)[source]¶ Base class for all converters in a SCMLSystem.
- Properties:
- voltages(tuple(float, float)): Determines which output voltage polarities the converter can generate.E.g. (0, 1) - Only positive voltages / (-1, 1) Positive and negative voltagescurrents(tuple(float, float)): Determines which output current polarities the converter can generate.E.g. (0, 1) - Only positive currents / (-1, 1) Positive and negative currents
Parameters: - tau – Discrete time step of the system in seconds
- dead_time – Flag, if a system dead_time of one cycle should be considered.
- interlocking_time – Interlocking time of the transistors in seconds
-
action_space
= None¶ gym.Space that defines the set of all possible actions for the converter
-
convert
(i_out, t)[source]¶ The conversion function that converts the previously set action to an input voltage for the motor. This function has to be called at least at every previously defined switching time, because the input voltage for the motor might change at these times.
Parameters: - i_out (list(float)) – All currents that flow out of the converter into the motor.
- t (float) – Current time of the system.
Returns: List of all input voltages at the motor.
Return type: list(float)
-
currents
= (None, None)¶ Minimum and Maximum possible output current of the converter
-
i_sup
(i_out)[source]¶ Calculate the current, the converter takes from the supply for the given output currents and the current switching state.
Parameters: i_out (list(float)) – All currents flowing out of the converter and into the motor. Returns: The current drawn from the supply. Return type: float
-
reset
()[source]¶ Reset all converter states to a default.
Returns: A default output voltage after reset(=0V). Return type: list(float)
-
set_action
(action, t)[source]¶ Set the next action of the converter at the beginning of a simulation step in the system.
Parameters: - action (element of action_space) – The control action on the converter.
- t (float) – Time at the beginning of the simulation step in seconds.
Returns: Times when a switching action occurs and the conversion function must be called by the system.
Return type: list(float)
-
voltages
= (None, None)¶ Minimum and Maximum possible output voltage of the converter
Discrete Converter¶
-
class
gym_electric_motor.physical_systems.converters.
DiscConverter
(tau=1e-05, **kwargs)[source]¶ Base class for all discrete converters.
-
convert
(i_out, t)[source]¶ The conversion function that converts the previously set action to an input voltage for the motor. This function has to be called at least at every previously defined switching time, because the input voltage for the motor might change at these times.
Parameters: - i_out (list(float)) – All currents that flow out of the converter into the motor.
- t (float) – Current time of the system.
Returns: List of all input voltages at the motor.
Return type: list(float)
-
i_sup
(i_out)[source]¶ Calculate the current, the converter takes from the supply for the given output currents and the current switching state.
Parameters: i_out (list(float)) – All currents flowing out of the converter and into the motor. Returns: The current drawn from the supply. Return type: float
-
reset
()¶ Reset all converter states to a default.
Returns: A default output voltage after reset(=0V). Return type: list(float)
-
set_action
(action, t)¶ Set the next action of the converter at the beginning of a simulation step in the system.
Parameters: - action (element of action_space) – The control action on the converter.
- t (float) – Time at the beginning of the simulation step in seconds.
Returns: Times when a switching action occurs and the conversion function must be called by the system.
Return type: list(float)
-
Continuous Dynamically Averaged Converter¶
-
class
gym_electric_motor.physical_systems.converters.
ContDynamicallyAveragedConverter
(tau=0.0001, **kwargs)[source]¶ Base class for all continuously controlled converters that calculate the input voltages to the motor with a dynamically averaged model over one time step.
This class also implements the interlocking time of the transistors as a discount on the output voltage.
-
convert
(i_out, t)[source]¶ The conversion function that converts the previously set action to an input voltage for the motor. This function has to be called at least at every previously defined switching time, because the input voltage for the motor might change at these times.
Parameters: - i_out (list(float)) – All currents that flow out of the converter into the motor.
- t (float) – Current time of the system.
Returns: List of all input voltages at the motor.
Return type: list(float)
-
i_sup
(i_out)[source]¶ Calculate the current, the converter takes from the supply for the given output currents and the current switching state.
Parameters: i_out (list(float)) – All currents flowing out of the converter and into the motor. Returns: The current drawn from the supply. Return type: float
-
reset
()¶ Reset all converter states to a default.
Returns: A default output voltage after reset(=0V). Return type: list(float)
-
set_action
(action, t)[source]¶ Set the next action of the converter at the beginning of a simulation step in the system.
Parameters: - action (element of action_space) – The control action on the converter.
- t (float) – Time at the beginning of the simulation step in seconds.
Returns: Times when a switching action occurs and the conversion function must be called by the system.
Return type: list(float)
-


You may receive a Restricted File Type warning message when attempting to upload a file via the Link Control to a module. This message is displayed when you attempt to upload a file with an extension that you are not enabled to upload such as a movie or a sound file. E.g. .avi, .wma.
The Restricted File Type Warning Message


--- layout: post title: Quote of the day summary: Kindly supplied by Richard. tags: [] ---
Kindly supplied by Richard.
"Can you put pâté on Weetabix"
Classic! :OD


Sign Up
Log In
Sign Up for Free
Truck ID
*
Truck not registered?
Name
*
Gender
*
Date Of Birth
*
Mobile
*
Email
*
Address
*
Set A Password
*
Get Started
Welcome Back!
Email Address
*
Password
*
Forgot Password?
Log In


Welcome to Martfury Online Shopping Store!
₹598.64 ₹1,496.60
₹47,939.09 ₹54,476.24
₹19,000.83 ₹41,306.16
₹27,385.54 ₹82,986.47
₹36,678.67 ₹41,680.31
₹44,673.51
₹33,462.48 ₹38,462.62
₹64,578.29
₹36,292.55
₹50,510.25
Subscribe to the mailing list to receive updates on new arrivals, special offers and our promotions.


✖
book direct. get rewarded.
get 3 rewards like:
company
offer
company
offer
company
offer
book now + get free rewards →


By the module you are be able to search products on Website by its tags.
Then open Website → Shop and input the tag in the search field. You can see the corresponding product(s) in the searching results.
Contact us by email or fill out request form


Before Change
if save_seeds:
streamlines, seeds = zip(*tracking_result)
tractogram = Tractogram(streamlines, affine_to_rasmm=np.eye(4))
tractogram.data_per_streamline["seeds"] = seeds
else:
tractogram = Tractogram(tracking_result, affine_to_rasmm=np.eye(4))
After Change
if save_seeds:
streamlines, seeds = zip(*tracking_result)
seeds = {"seeds": seeds}
else:
streamlines = list(tracking_result)
seeds = {}
sft = StatefulTractogram(streamlines, seeding_path, Space.RASMM,
data_per_streamline=seeds)
save_tractogram(sft, out_tract, bbox_valid_check=False)
logging.info("Saved {0}".format(out_tract))
def run(self, pam_files, stopping_files, seeding_files,
use_binary_mask=False,


It consists of Player1 and Player2, both of which are Human. There is no Difficulty level for this game type.
The Score box of both the players is shown at the bottom of the page.
Human Vs HumanSUGGESTIONS
The grid boxes are labelled from 0-8(3-boxes in each row from left to right).
At every step, the AI suggests the next step to be taken.
The "box-Numbers(0-8)" popping up on the screen are the suggested next steps.
Human vs Computer
For Human Vs Computer, Go to navigation bar and select your difficulty level.
Difficulty level consists of
Easy(basic) Level
Medium Level
Battle with


We were very happy to participate again in Google Summer of Code (GSoC)! This is the seventh time we had the opportunity to collaborate with students from all around the world on interesting projects. These are the highlights from the 2020 edition, in the student's own words.
For this project we created Caribay, a PEG (Parsing Expression Grammar) parser generator built with LpegLabel, with support of automatic generation of error labels and error recovery rules. The generated parser produces a generic abstract syntax tree or a list of thrown errors. Caribay makes easier to parse lexical symbols, comments, identifiers and keywords using its own syntax.
We developed a parser for the input grammar, a preprocessor for computing FIRST and FOLLOW sets, an algorithm for automatically generating error labels, optional optimizations which can be enabled by the user, and a translator that generates LPegLabel patterns.
A story about the name: Caribay is the daughter of Zuhé (the Sun) and Chía (the Moon) from a legend of the Mirripuyes (an indigenous group from Mérida, Venezuela). Since Lua means Moon in Portuguese, the tool being the daughter of Lua sounded nice to me. Also, the legend involves the origin of five famous peaks from Mérida, so the name is related to "generating" things.
LuaFormatter is a code formatter for Lua scripts inspired by clang-format. It formats Lua scripts according to a user defined configuration file. Before this project, LuaFormatter didn't check if the configuration values made sense before using it. For example, following configuration was valid:
- column_limit : -5 - indent_width : -2 - single_quote_to_double_quote : true - double_quote_to_single_quote : trueIn this project, we implemented validators for each configuration field. We also had the opportunity to fix bugs and implement other features. You can find more information about what we did in this link.
The most exciting part for me was working with open-source around brilliant techies from all over the world. I learned a lot of things and improved my code workflow.
For this project, we added Lua hook support to the kTLS Linux kernel module. The goal is to combine kTLS with the flexibility of Lua to processs network requests inside the Linux kernel. By adding Lua hooks to kTLS, it is now possible to use Lua scripts to process network data inside the kernel, after it has been received and decrypted.
We also wrote a simple https server to measure the performance of the Lua hook. The server uses Lua scripts to parse the request and then uses the sendfile system call to send the static file back to the user. The performance was similar to that of the lighttpd web server, which is promising because the implementation of Lua hooks hasn't been fully optimized yet.
You can find more information about what we did this GSOC in this link.
In this project we added support for the Lunatik framework to manage Lua execution states inside the kernel. For this, we developed a kernel API that allows Lunatik bindings to create and access Lua execution states handling the synchronization with user space or other bindings. This includes a protocol over generic Netlink that allows creating and managing Lua states and loading Lua scripts from user space. We also also adapted both NFLua and XDPLua to use these facilities. More information can be found in this link.
Pallene is a statically typed, ahead-of-time-compiled sister language to Lua, with a focus on performance. Programmers can use Pallene instead of C modules to improve the performance of their programs. Pallene achieves this by translating a statically typed compilation unit into a C source file, which is implicitly compiled in the background. In this project, we implemented several new Pallene features, including the dot notation for the built-in modules, the export keyword, and a Pallene to Lua translator (the new Lua backend). The documentation and unit tests for the same were also written.
We encountered many interesting challenges during the development. One of them is that when we were testing the validity of the translator we had to test both how the generated output looked and how it behaved at runtime. For the latter case, we managed to come up with an elegant design that allowed us to reuse existing unit tests. Thus, we were able to ensure that both the Lua and the C backends produce similar runtime behavior.
Google Summer of Code has been an amazing experience! I am really grateful to everyone at LabLua for providing me with this opportunity. I learned about collaborating with others, keeping up with schedules, code reviews, rebasing Git branches, writing unit tests with good coverage, and much more.
Samuel Rowe is from Bengaluru, India. He enjoys working on compilers and web applications. Someday he wants to start a company that thrives on innovation.
ಕಲಿಯೋಕೆ ನೂರು ಭಾಷೆ ಆಡೋಕೆ ಒಂದೇ ಭಾಷೆ ಕನ್ನಡ ಕನ್ನಡ ಕಸ್ತೂರಿ ಕನ್ನಡ.


This is a poses generator - not perfect yet...
Allow multiple file download before using and make sure you download to an empty folder and not the Computer's desktop.


patients respiratory SARS {border-style px;} #ffffff;} control precautions acute ICU ventilation viral disease staff syndrome Hong available include patient px; risk {font-family droplet font-size infection severe use used using April Engl Infection Staff avoid double; exhalation procedures spread therapy ventilator (on-line Med, Toronto, ahead border-color border-width cases contact contamination currently equipment evidence fever filter important including increased management pressure print) publication respirator rooms solid; symptoms tests treatment virus {font-style {font-weight (see Avoid Health Table article associated bag bold change considered coronavirus courier; days days, diagnosis distress drug em; expiratory followed illness infected infiltrates initial isolated isolation knowledge maintain members precautions. progressive protection pt;} room testing transmission ventilation,


Home
Library
Prepare a Mix
Preparing the Mix
Materials
4 base materials available
Agar Agar
Use: binder Type: polysaccharide Origin: alga
Glycerin
Use: Type: poly-ol Origin: propylene (not bio ingredient :( )
Common Water
Use: solvent Type: water plus ions and unknown traces Origin: uncertain
Additive
Choose...
Coffee
Cornstarch
Detergent
Orange peel
other
Mix Number
Mix
BioMixer Interface 1.1 FabLab Uchile
Mix status: not ready


I’m a big fan of 7-zip for a long time.
7-zip is a free and open-source file archiver which also supporting AES-256 encryption in 7z and ZIP formats.
The AES-256 algorithm uses cipher key with length of 256 bits. To create that key 7-Zip uses derivation function based on SHA-256 hash algorithm. A key derivation function produces a derived key from text password defined by user. For increasing the cost of exhaustive search for passwords 7-Zip uses big number of iterations to produce cipher key from text password.
We will try to make use of this strong and free encryption feature to protect our vital cryptocurrency information.
OS: Windows 10 Pro 64-bit
7-zip version: 7-Zip 17.01 beta (2017-08-28) for Windows
The walk-through
I store all my wallets under a directory with simple architecture like this. We will use the STEEM wallet as example for this tutorial.
Inside of the STEEM folder there are two files, the portable Vessel wallet for Steem and a plain text file that stores all the private keys for Steem including Owner key, Active key, and Post key.
One must never store sensitive data like such digitally in plain text. And we are going to encrypt this text file using 7-zip.
Download latest version of 7-zip from the official site.
After installation, right click on the text file. 7-zip -> Add to archive.
You can either choose 7z or zip format in the Archive format. Make sure the encryption algorithm is set to AES-256, this should be the only option if you are using the latest version of 7-zip. Lastly, create a strong password which is very important to increase the difficulty when someone trying to crack the encryption. The stronger the password the stronger your encryption is.
Press OK to start the archiving.
Now you will have an encrypted archive in 7z format.
Open it up and to make sure you see the +
sign under the Encrypted column. Unlock the file to check if everything is OK before next step.
Permanently delete the plain text file by Shift + Del
keys. Make sure no copy of the text file should be existing in any place including the recycle bin.
Remember all the sensitive credentials in digital form should always be encrypted.
Posted on Utopian.io - Rewarding Open Source Contributors
This page is synchronized from the post: ‘Encrypt cryptocurrency credentials using 7-zip’


Is this code available anywhere?
No; it's written in Arc, which is itself not released yet.
No; it's written in Arc, which is itself not released yet.
I know of nine so far: Spammunition, SpamBayes, Spam Bully, InboxShield, Junk-Out, Outclass, Disruptor OL, SpamTiger, and JunkChief.
The best commercial server-level Bayesian filter is probably Death2Spam. SpamProbe, one of the best open-source Bayesian filters, can also be run on the server.
Most commercial server-level spam filters are still rule-based. But there are starting to be some that use Bayesian filtering. The way to find them is probably to search in Google.
The question to ask the salesman is, does the filter learn to recognize spam based on the spam and nonspam mail we receive? If it doesn't learn, it isn't Bayesian.
Lisp's symbol type is useful in manipulating databases of words, because it lets you test for equality by just comparing pointers. (If you find yourself using checksums to identify words, it's symbols you mean to be using.) Prolog, Erlang, and Ruby also support symbols. So does Python, to a degree, though I don't think it has any syntax for them yet.
More generally, Lisp was designed for rapid prototyping, and this application involved a lot of that. I probably spent 95% of the development time typing expressions into the toplevel, trying variously tweaked algorithms on individual emails.
Of course not. I don't claim to have invented anything new here. Bayesian text classification is an old and established field. If there is anything new in this article (at least, it was news to me) it is that such a simple variant of it is so effective at filtering spam.
So by all means go write spam filters. It is a very rewarding hack. If you end up creating something other people can use, let me know and I'll make a link to it.
It's expressed in math notation in Hackers & Painters.
I've never tried it, but yes, I think it would work well.
It does filter out 99.5% of my spam. I got similar results for the one other spam collection I've tested it on so far. (I couldn't measure false positives, because I only had the spams.)
I do worry a bit that my email might just be especially easy to filter. A lot of my spam comes from "opt-in" spammers like Qves and Virtumundo, and that stuff is really easy to detect. Plus my own mail is full of references to programming that make it easy to distinguish from spam (though not "programming" itself, ironically, which often occurs in spams selling satellite dishes).
So if you do try implementing this filter for yourself, I'd appreciate it if you could let me know how well it works for you. My gut feel is that it will work pretty effectively for almost everyone, but it would be reassuring to hear numbers.
They would have to get rid of the bad words as well as adding neutral ones. Only the most interesting fifteen words contribute to the probability, and neutral words like "onion", no matter how many there are of them, can't compete with the incriminating "viagra" for statistical significance.
To outweigh incriminating words, the spammers would need to dilute their emails with especially innocent words, i.e. those that are not merely neutral but occur disproportionately often in the user's legitimate email. But these words (e.g. the nicknames of one's friends, terms one uses in one's work) are different for each recipient, and the spammers have no way of figuring out what they are.
They couldn't necessarily tune their emails and still say what they wanted to say. If they wanted to send you to a url that is known to the filters, for example, they would find it hard to tune their way around that.
Second, tune using what? Each user's filters will be different, and the innocent words will vary especially. At most, spammers will be able to dilute their mails with merely neutral words, and those will not tend to be much use because they won't be among the fifteen most interesting.
If the spammers did try to get most of the incriminating words out of their messages, they would all have to use different euphemisms, because if they all started saying "adolescents" instead of "teens", then "adolescents" would start to have a high spam probability.
Finally, even if spammers worked to get all the incriminating words out of the message body, that wouldn't be enough, because in a typical spam a lot of the incriminating words are in the headers.
They already do sometimes, and we are able to catch them. Such emails include a lot of damning content, actually. The headers, to start with, will be as bad as ever. And remember that we scan html as well as text. Within the message body there will probably be a link as well as the image, both containing urls, which would probably score high. "Href" and "img" themselves both have spam probabilities approaching pornographic words. Within the url, the image has to have some kind of name, and these are usually far from random.
Yes, I ignore html comments down at the level of scanning tokens, not even considering them as separators.
Spammers sometimes use randomly generated tags to break up tokens, since html rendering software will usually ignore meaningless tags. I do allow these to separate tokens, and it works fine. Broken bits of words simply get high spam probabilities.
No. Someone sent it to me as a test, and it wasn't. Although the article contains a lot of spam words, it also contains a lot of even more provably innocent words (like "spammers" ironically, which occurs in a lot of my real email, and never in my spam). Since only the most interesting words count, the innocent words crowded out the spam words in the rankings, and this mail ended up with the minimum possible probability.
That makes sense, because an article someone writes is more likely to resemble the content of their own email than it would a spam, even if the article happens to be about spam.
This is a problem for anyone who works on spam filtering. In the extreme case, if someone you've never heard from merely forwards you a spam with no additional comment, it's going to be hard to filter out. There it will all come down to the headers.
 So for these situations we may have to have a special password that people could include in mail to get it by the filters, and also (I have one already) a special trash folder for metaspam so that it doesn't contribute to the probabilities.
If there is a good side to this, it's that if we can create filters that work acceptably well for us, they'll work even better for everyone else.
Mostly not. That kind of mail may be automated, but the text usually has a very different character from spam.
The only automated responses that tend to get filtered out are the ones that contain a lot of additional advertising. In effect, these emails consist of an automated response with a spam appended to the end, so it is not surprising filters catch them.
I think so.  Once word spreads that it is possible to filter out most spam, they'll be forced to offer effective filters.
Spammers already operate at capacity.
As ISPs use them now, they're equivalent to very bad filters. But the information they supply could be incorporated into Bayesian filtering.
Yes, strictly speaking it is only valid assuming the probabilitiy of e.g. "sex" occurring in an email is unrelated to the probability of "sexy" occurring in it. Obviously that is not the case.
On the other hand, there is a long tradition of violating this requirement. When you do that it's called a "naive Bayesian" algorithm and in practice it works pretty well, just as in practice (if you stay away from the edges of precision) it works pretty well to treat floating point numbers as if they were reals.
No. It assumes it's equally likely for a mail to be a spam or not. So accuracy could be slightly improved by taking into account the actual proportion of spam received by each user. You would have to do this by hour though, because the proportion varies so much depending on the time of the day that the overall prior probability is useless as a predictor.
Actually, in the latest version of the filter I use 20, because marking tokens by context means the software now sees more distinct tokens per mail.
Nearly all spams tend to have that many fairly incriminating words in them. If you look at more than that, you'll start to include neutral words, which are noise at best. But you want to look at as many words as you can, because legitimate emails may well contain two or three words with high spam probabilities-- if you used only the top 5 words, for example, you'd start to get false positives.
As long as they use whitespace to separate tokens, it should.


About Me
I am Senior Technical Lead for Business Intelligence. I am passionate about data and related technologies and how you can use it to gain invaluable insights. You can find me on Linked In.
My Belief:
Various technologies which I focus on
- SQL Server Integration Services
- SQL Server Reporting Services
- T-SQL Scripting
- Dot Net Application Development
- Cognos ICM
What I have been doing
I have been working with great companies like Infosys (2.7 yrs), Thomson Reuters (4 yrs), Tata Consultancy Services (<1 yrs) & Polaris Consulting Services (present).
I have been busy building enterprise solutions around:
- Azure Billing & Chargeback
- Enterprise Datacenter Management solutions
- System Center customization solutions
- Windows Azure Pack customizations and resource providers
Have questions or suggestions? Feel free to contact me on social media or on my email id at<EMAIL_ADDRESS>Thanks for reading!


#yolo
Hometown: Los Angeles
Studying: Modern History, 4th year
Favorite 7D Activity: Chatting while I'm cooking
Dream Date: Skiing, not backcountry.
Dietary Requirements: Gluten, meat, and dairy. Preferably combined.
Life moves pretty fast. If you don't stop to look around once in a while you could miss it.
Hometown: Washington DC // New Canaan, CT
Studying: International Relations, 4th Year
Favorite 7D Activity: Sleeping/Eating/Bantering
Spirit Cocktail: Virgin Espresso Martini//The Physician (ketel one vodka, st germain, mint & raspberries)
Dream Date: Hahahahaha that's funny, dating doesn't happen in St Andrews
Dietary Requirements: GLUTEN FREE AND PROUD, OK.
"There's a million things I haven't done"
Hometown: California
Studying: International Relations and Management, 4th year
Favorite 7D Activity: eating
Spirit Cocktail: Betty's Tea Party
Dream Date: Something with food and good chat. Oh and maybe some sort of physical contact, so I actually know it's a date...
Dietary Requirements: glutenfreie
"The people that mind don't matter, and the people that matter don't mind."
Hometown: Vancouver, BC
Studying: 4th year, Modern History and Middle Eastern Studies
Favorite 7D Activity: Snuggles
Spirit Cocktail: Gin & tonic.
Dream Date: Cooking dinner and drinking wine. Basically, a night at 7D.
Dietary Requirements: None. Don't like olives though.
"If you judge a fish by it's ability to climb a tree, it will spend the rest of it's life thinking it is stupid"
Hometown: Suffolk (The Armpit of England)
Studying: French and IR, 4th Year
Favorite 7D Activity: Mainly snuggles. Also food and projector movies
Spirit Cocktail: Something fruity (cheeky...)
Dream Date: One where the guy shows up. GODDAMN IT.
 I am a student.
Hometown: Suffolk
Studying: History, 4th Year
Favorite 7D Activity:
Spirit Cocktail: Espresso Martinit
Dream Date: Country Music Concert
Dietary Requirements:
"Be kind whenever possible. It is always possible."
Hometown: Berkshire
Studying: Geography, 4th Year
Favorite 7D Activity: Drinking tea
Spirit Cocktail: White Russian
Dream Date: Surprise me
Dietary Requirements: Vegetarian
"History is the lie agreed upon"
Hometown: USA
Studying: 3rd ir, French, Russian
Favorite 7D Activity: Jamming with the gals
Spirit Cocktail: Long Island ice tea
Dream Date: Chill picnic and walk
Dietary Requirements: Veggie


Facebook is not so
great
.
Cheese
Chicken
Cheese
Bologna
Microsoft.
This is a link
You can drop things here


March 16
For every one that useth milk is unskilful in the word of righteousness: for he is a babe. But strong meat belongeth to them that are of full age, even those who
by reason of use have their senses exercised to discern both good and evil.
Hebrews 5:13-14
You're spiritually "grown up" or mature when, through practice, you have trained your senses to discern between good and evil. You've practiced walking in the Spirit and renewing your mind by the Word of God until even your flesh habitually goes God's way instead of the world's way.
Stop and think for a moment.
There are for me. For example, I used to smoke tobacco, and I felt sorry for all those Christians who couldn't. But you know what? Now that I'm a believer, I have no desire for tobacco anymore. It is not even part of my thoughts much less my lifestyle.
That's the kind of thing that happens as you feed and renew your mind on the Word of God. It doesn't necessarily happen quickly or easily. Your flesh may fight and buck for a while because it's been trained to go the way of the world so long. But if you stick with the Word and keep growing, your flesh can develop the habit of righteousness just like it developed the habit of unrighteousness.
Don't starve your spirit by trying to get by on just a little spiritual milk now and then. Develop the habit of feeding on the solid food of the Word every day and find out what real maturity is all about.
Scripture Reading: Hebrews 5:11-14, 6:1-3


 ‐ Russell and Norvig: Artificial Intelligence: A Modern Approach
In behavioral psychology, reinforcement is a consequence that will strengthen an organism's future behavior whenever that behavior is preceded by a specific antecedent stimulus.
Learning is the act of acquiring new, or modifying and reinforcing, existing knowledge, behaviors, skills, values, or preferences and may involve synthesizing different types of information.
When I want someone to learn something, I give them something to read or I tell them how to perform some list of actions to reach a goal.
In reinforcement learning (RL), we try to adjust your behaviour by either rewarding or punishing you after you’ve performed some list of actions and leave it up to you to reevaluate what to change.
If we consider some random puzzle X, which is in a state Si. What we want to do, is manipulate the problem until we reach a state Sn that ends that puzzle.
Let's take an often used example from Russel & Norvig's "Artificial Intelligence: A Modern Approach", a book that is worth having.
The following 'maze' has a width of 4 squares and a height of 3. (0,0) is S0. Our agent always starts in that position. (1,1) cannot be passed through. (3,2) is our "positive" endstate and (3,1) our "negative" endstate.
Reaching an endstate, ends our problem and gives the agent either a positive reinforcement of 1 or a negative reinforcement that equals -1.
| +1 | |||
| -1 | |||
| ☺ |
Our valiant agent does not see what we see. It does not know this world, it does not have to. It only knows where it is and it knows what actions it can perform to transition out of this state.
So from S0 or S(0,0) it can either move up, or down. In our example we want to encourage our agent to learn that a shorter path is better than the long way around. So let's make the cost of an action 0.04.
The idea is that our agent evaluates a state according to it's Reward-to-go; Reward from that state onwards. So μ(3,2) = 1 and μ(3,1) = -1. If we consider S(2,2) and move right, the transition cost with the positive reinforcement will result in μ(2,2) = 0.96. So there is an expected reward when we for right from S(2,2).
If there is nothing we know, all we can do is move around. From S0 we perform the following 'random' set of actions: ⇑ ⇑ ⇒ ⇒ ⇒
Our policy (which is conincidentally our optimal policy) will be rewarded with a utility of 1-5*0.04. Now, we want to propagate back over our actions where we observe the following actual utilities which directly correspond to the Reward-to-go of that state in this trial:
μ(3,2) = 1
μ(2,2) = 0.96
μ(2,2) = 0.92
μ(2,2) = 0.88
μ(2,2) = 0.84
μ(0,0) = 0.80
Because we do not want to overfit to the data, we introduce a learning parameter. σ = 0.1 and use that to adjust the utilities of the states.
| 0.088 | 0.092 | 0.096 | 1 |
| 0.084 | 0 | -1 | |
| 0.080 | 0 | 0 | 0 |
So now we have evaluated our actions. And if we would be greedy and restart from S(0,0), we would see μ(S(1,0)) > μ(S(0,1)) and choose to go ⇑. We call this exploitation. Exploit what we know.
But we don't want our agent to be satisfied too soon. There might be more in the world, heck, we don't know anything about the world! We introduce an exploration rate γ = 0.9. Which means that in 90% of the cases, we do not exploit, but we explore and randomly try one of the possible actions. It is advisable to start with a very exploritory agent, to just try, fail and learn. Our exploration rate can be brought down to near zero when we feel that our estimated utilities have converged.
In the nextr trial from S0 we perform the following 'random' set of actions: ⇑ ⇑ ⇒ ⇒ ⇓ ⇓ ⇒ ⇑
π(3,1) = -1
π(3,0) = -1.04
π(2,0) = -1.08
π(2,1) = -1.12
π(2,2) = -1.16
π(2,1) = -1.20
π(2,0) = -1.24
π(1,0) = -1.28
π(0,0) = -1.32
This is a lot different from our first trial. This set would bring our previously estimated back down to zero or even below zero. Anyway, after a few more trials we might end up with something like this:
| 0.01 | 0.07 | 0.26 | 1 |
| -0.16 | -0.56 | -1 | |
| -0.28 | -0.36 | -0.61 | -0.81 |
Thus the agent has found a policy π for X:
| ⇒ | ⇒ | ⇒ | 1 |
| ⇑ | ⇑ | -1 | |
| ⇑ | ⇐ | ⇐ | ⇐ |
There is a different way to estimate the utility of a state. We use a function approximator (FA) to estimate utilities. The FA has a set of value functions that, combined, deliver an estimation of value of a certain state.
This is particularly useful when the state-space becomes too large. The 'maze' problem converges only when all states have been visited, preferably a lot of times, the amount of trials that need to be run increases as the state-space grows.
Let's look at X again. If we define 3 value functions with randomly initiated weights;
ƒ0(S) = φ = 1, θ0 = 0.1
ƒ1(S) = x, θ1 = 0.5
ƒ2(S) = y, θ2 = 0.2
μ(S) = sum of all fi(S)
These functions give the following utilities if we multiply the outcome of the function in the corresponding state with it's weight and take the sum of the outcomes:
| 0.5 | 1.0 | 1.5 | 2 |
| 0.3 | 1.3 | 1.8 | |
| 0.1 | 0.6 | 1.1 | 1.6 |
Consider the following path:
π(3,1) = -1
π(3,0) = -1.04
π(2,0) = -1.08
π(1,0) = -1.12
π(0,0) = -1.16
We want to correct the weights of the various functions in the direction of observed utilities.
We once again propagate back over the actions and use a learning parameter σ = 0.1.
θi = θi + σ * ||π(S)-μ(S)|| * ƒi
So we adjust all weights in the same direction, because whatever happened, the collective result of the valuefunctions μ(S) was off by ||π(S)-μ(S)||. π(S) is the actual observed result. We multiply by ƒi, so that we adjust weights according to the utility they contributed to the total estimate of the state.
Simply put, if we look at S(1,3), the weight of the valuefunction that looks at the '3' (ƒ1) is adjusted more because it is multiplied by that 3.
Now, you need to remember that a valuefunction can be any function. If we believe that the difference between the X and the Y or the amount of actions that can be taken in a certain state is of importance, we add such a function, ie. ƒ3= ||x-y||.
But we won't.
ƒ0 is a special case. As you have undoubtedly seen, it's value is always equal to 1, in whatever state. This is so, if there is one, a baseline to the utilities in all states can be determined.
So, back to our path;
π(3,1) = -1
π(3,0) = -1.04
π(2,0) = -1.08
π(1,0) = -1.12
π(0,0) = -1.16
Given the current weights, we will start our corrections from the last state.
For θ0 = 0.1 + 0.1 * ((-1) - 1.8) * 1 = 0.1 - 0.28 * 1 = -0.18
For θ1 = 0.5 + 0.1 * ((-1) - 1.8) * 3 = 0.5 - 0.28 * 3 = -0.34
For θ2 = 0.2 + 0.1 * ((-1) - 1.8) * 1 = 0.2 - 0.28 * 1 = -0.08
The new weights immediately result in the following scenario:
| -0.34 | -0.68 | -1.02 | -1.36 |
| -0.26 | -0.94 | -1.28 | |
| -0.18 | -0.52 | -0.86 | -1.20 |
So now we can evaluate π(3,0) = -1.04 against the NEW weights! Which means the difference should be smaller. In this case, after every trial, the first correction will be largest, afterwards there won't be much we want to do. That is because our learning rate is relatively high.
This example is nice because it shows how we reached a tedious situation. If you follow the exploitation path, you'll be running around S0 for a long time. It will take some time for the agent to get out of this situation.


Reproduced with permission of the authors. Copyright 2012 Marty Stepp, Jessica Miller, and Victoria Kirst. All rights reserved. Further reproduction or distribution is prohibited without written permission.
http://server/path/file
http://selab.hanyang.ac.kr/courses/cse326/2019/.../quote.php
selab.hanyang.ac.kr
to run the program quote.php
and send back its output.html
file (static content): server just sends that file.php
file (dynamic content): server reads it, runs any script code inside it, then sends result across the network
There are many other options for server-side languages: Ruby on Rails, JSP, ASP.NET, etc. Why choose PHP?
php.net/functionName
in browser Address bar to get docs for any function
The following contents could go into a file hello.php
:
<?php print "Hello, world!"; ?>
<?php
and ends with ?>
.php
page on your local hard drive; you'll either see nothing or see the PHP source code.php
file will run the program and send you back its outputHTML content <?php PHP code ?> HTML content <?php PHP code ?> HTML content ...
.php
file between <?php
and ?>
are executed as PHP code# single-line comment // single-line comment /* multi-line comment */
#
is also allowed
#
comments instead of //
#
and will use it in our examplesprint
print "text";
print "Hello, World!\n"; print "Escape \"chars\" are the SAME as in Java!\n"; print "You can have line breaks in a string."; print 'A string can use "single-quotes". It\'s cool!';
echo
instead of print
+ - * / %
. ++ --
= += -= *= /= %= .=
5 + "7"
is 12
$a = 3; $b = 4; $c = sqrt(pow($a, 2) + pow($b, 2));
abs
|
ceil
|
cos
|
floor
|
log
|
log10
|
max
|
min
|
pow
|
rand
|
round
|
sin
|
sqrt
|
tan
|
M_PI
|
M_E
|
M_LN2
|
$name = expression;
$user_name = "PinkHeartLuvr78"; $age = 16; $drinking_age = $age + 5; $this_class_rocks = TRUE;
$
, on both declaration and usageint
and float
types$a = 7 / 2; # float: 3.5 $b = (int) $a; # int: 3 $c = round($a); # float: 4.0 $d = "123"; # string: "123" $e = (int) $d; # int: 123
int
for integers and float
for realsint
values can produce a float
String
type
$favorite_food = "Ethiopian";
print $favorite_food[2]; # h
.
(period), not +
5 + "2 turtle doves"
produces 7
5 . "2 turtle doves"
produces "52 turtle doves"
""
or ''
$age = 16; print "You are " . $age . " years old.\n"; print "You are $age years old.\n"; # You are 16 years old.
" "
are interpreted
' '
are not interpreted:
print 'You are $age years old.\n'; # You are $age years old.\n
{}
:
print "Today is your $ageth birthday.\n"; # $ageth not found print "Today is your {$age}th birthday.\n";
String
functions# index<PHONE_NUMBER>012345 $name = "Stefanie Hatcher"; $length = strlen($name); # 16 $cmp = strcmp($name, "Brian Le"); # > 0 $index = strpos($name, "e"); # 2 $first = substr($name, 9, 5); # "Hatch" $name = strtoupper($name); # "STEFANIE HATCHER"
| Name | Java Equivalent |
|---|---|
strlen |
length |
strpos |
indexOf |
substr |
substring |
strtolower , strtoupper |
toLowerCase , toUpperCase |
trim |
trim |
explode , implode |
split , join |
strcmp |
compareTo |
$feels_like_summer = FALSE;
$php_is_rad = TRUE;
$student_count = 217;
$nonzero = (bool) $student_count; # TRUE
FALSE
(all others are TRUE
):
0
and 0.0
""
, "0"
, and NULL
(includes unset variables)(bool)
FALSE
prints as an empty string (no output); TRUE
prints as a 1
TRUE
and FALSE
keywords are case insensitivefor
loop
for (initialization; condition; update) { statements; }
for ($i = 0; $i < 10; $i++) { print "$i squared is " . $i * $i . ".\n"; }
if/else
statementif (condition) { statements; } elseif (condition) { statements; } else { statements; }
elseif
keyword is much more common, else if
is also supported<?php print "<!DOCTYPE html>\n"; print "\n"; print " \n"; print " <title>Geneva's web page</title>\n"; ... for ($i = 1; $i <= 10; $i++) { print "
 I can count to $i!
\n"; } ?>
print
statements is bad style and error-prone:
\"
print
, how do we insert dynamic content into the page?<?= expression ?>

 The answer is <?= 6 * 7 ?>

<?= expr ?>
is equivalent to <?php print expr; ?>
<!DOCTYPE html >  <title>CSE 3026s: Embedded PHP</title>  <?php for ($i = 99; $i >= 1; $i--) { ?>
 <?= $i ?> bottles of beer on the wall,
 <?= $i ?> bottles of beer.
 Take one down, pass it around,
 <?= $i - 1 ?> bottles of beer on the wall.
 <?php } ?>

Watch how high I can count: <?php for ($i = 1; $i <= 10; $i++) { ?> <? $i ?>

and
above are inside the for
loop, which is never closed$end
'=
in <?=
, the expression does not produce any output <?php for ($i = 1; $i <= 3; $i++) { ?> <h<?= $i ?>>This is a level <?= $i ?> heading.</h<?= $i ?>> <?php } ?>
URL?name=value&name=value...
http://www.google.com/search?q=Obama http://example.com/student_login.php?username=lee&id=1234567
username
has value lee
, and sid
has value 1234567
$_GET
$user_name = $_GET["username"]; $id_number = (int) $_GET["id"]; $eats_meat = FALSE; if (isset($_GET["meat"])) { $eats_meat = TRUE; }
$_GET["parameter name"]
returns an HTTP GET parameter's value as a string
http://....?name=value&name=value
are GET parametersisset
$base = $_GET["base"]; $exp = $_GET["exponent"]; $result = pow($base, $exp); print "$base ^ $exp = $result";
exponent.php?base=3&exponent=4
<?php foreach ($_GET as $param => $value) { ?>
Parameter <?= $param ?> has value <?= $value ?>
 <?php } ?>
print_params.php?name=Scott+Lee&sid=1234567
Parameter name has value Scott Lee
Parameter sid has value 1234567
print_r
or var_dump
on $_GET
for debugging
$name = array(); # create $name = array(value0, value1, ..., valueN); $name[index] # get element value $name[index] = value; # set element value $name[] = value; # append
$a = array(); # empty array (length 0) $a[0] = 23; # stores 23 at index 0 (length 1) $a2 = array("some", "strings", "in", "an", "array"); $a2[] = "Ooh!"; # add string to end (at index 5)
| function name(s) | description |
|---|---|
count
|
number of elements in the array |
print_r
|
print array's contents |
array_pop ,
array_push , array_shift ,
array_unshift
|
using array as a stack/queue |
in_array ,
array_search ,
array_reverse , sort ,
rsort ,
shuffle
|
searching and reordering |
array_fill ,
array_merge ,
array_intersect , array_diff ,
array_slice ,
range
|
creating, filling, filtering |
array_sum ,
array_product ,
array_unique , array_filter ,
array_reduce
|
processing elements |
$tas = array("MD", "BH", "KK", "HM", "JP"); for ($i = 0; $i < count($tas); $i++) { $tas[$i] = strtolower($tas[$i]); } # ("md", "bh", "kk", "hm", "jp") $morgan = array_shift($tas); # ("bh", "kk", "hm", "jp") array_pop($tas); # ("bh", "kk", "hm") array_push($tas, "ms"); # ("bh", "kk", "hm", "ms") array_reverse($tas); # ("ms", "hm", "kk", "bh") sort($tas); # ("bh", "hm", "kk", "ms") $best = array_slice($tas, 1, 2); # ("hm", "kk")
foreach
loop
foreach ($array as $variableName) { ... }
$stooges = array("Larry", "Moe", "Curly", "Shemp"); for ($i = 0; $i < count($stooges); $i++) { print "Moe slaps {$stooges[$i]}\n"; } foreach ($stooges as $stooge) { print "Moe slaps $stooge\n"; # even himself! }
$array = explode(delimiter, string); $string = implode(delimiter, array);
$s = "CSE 3026"; $a = explode(" ", $s); # ("CSE", "3026") $s2 = implode("...", $a); # "CSE...3026"
explode
and implode
convert between strings and arraysexplode
names.txt
Martin D Stepp Jessica K Miller Victoria R Kirst
foreach (file("names.txt") as $name) { $tokens = explode(" ", $name); ?>
 author: <?= $tokens[2] ?>, <?= $tokens[0] ?>
 <?php }
author: Stepp, Marty
author: Miller, Jessica
author: Kirst, Victoria
function name(parameterName, ..., parameterName) { statements; }
function bmi($weight, $height) { $result = 703 * $weight / $height / $height; return $result; }
return
statements is implicitly "void"name(expression, ..., expression);
$w = 163; # pounds $h = 70; # inches $my_bmi = bmi($w, $h);
$school = "HYU"; # global ... function downgrade() { global $school; $suffix = "(Wisconsin)"; # local $school = "$school $suffix"; print "$school\n"; }
global
statement
function name(parameterName = value, ..., parameterName = value) { statements; }
function print_separated($str, $separator = ", ") { if (strlen($str) > 0) { print $str[0]; for ($i = 1; $i < strlen($str); $i++) { print $separator . $str[$i]; } } }
print_separated("hello"); # h, e, l, l, o print_separated("hello", "-"); # h-e-l-l-o
NULL
$name = "Victoria"; $name = NULL; if (isset($name)) { print "This line isn't going to be reached.\n"; }
| function name(s) | category |
|---|---|
file ,
file_get_contents , file_put_contents
|
reading/writing entire files |
basename ,
file_exists ,
filesize , fileperms ,
filemtime ,
is_dir , is_readable ,
is_writable ,
disk_free_space
|
asking for information |
copy ,
rename ,
unlink ,
chmod , chgrp ,
chown ,
mkdir ,
rmdir
|
manipulating files and directories |
glob ,
scandir
|
reading directories |
contents of foo.txt |
file("foo.txt") |
file_get_contents("foo.txt") |
|---|---|---|
Hello how r u? I'm fine |
array( "Hello\n", # 0 "how r u?\n", # 1 "\n", # 2 "I'm fine\n" # 3 ) |
"Hello\n how r u?\n # a single \n # string I'm fine\n" |
file
function returns lines of a file as an array (\n
at end of each)file_get_contents
returns entire contents of a file as a single string
file_put_contents
writes a string into a file
# reverse a file
$text = file_get_contents("poem.txt");
$text = strrev($text);
file_put_contents("poem.txt", $text);
file_get_contents
returns entire contents of a file as a string
file_put_contents
writes a string into a file, replacing its old contents
# add a line to a file
$new_text = "P.S. ILY, GTG TTYL!~";
file_put_contents("poem.txt", $new_text, FILE_APPEND);
| old contents | new contents |
|---|---|
Roses are red, Violets are blue. All my base, Are belong to you. |
Roses are red, Violets are blue. All my base, Are belong to you. P.S. ILY, GTG TTYL!~ |
file_put_contents
can be called with an optional third parameter to append (add to the end) rather than overwritefile
function# display lines of file as a bulleted list $lines = file("todolist.txt"); foreach ($lines as $line) { # for ($i = 0; $i < count($lines); $i++) print "
$line
\n"; }
file
returns the lines of a file as an array of strings
\n
; to strip it, use an optional second parameter:
$lines = file("todolist.txt", FILE_IGNORE_NEW_LINES);
foreach
or for
loop over lines of filelist
list($var1, ..., $varN) = array;
personal.txt
Marty Stepp<PHONE_NUMBER> 570-86-7326
list($name, $phone, $ssn) = file("personal.txt"); ... list($area_code, $prefix, $suffix) = explode(" ", $phone);
list
function "unpacks" an array into a set of variables you declare
file
and list
to unpack it
| function | description |
|---|---|
glob |
returns an array of all file names that match a given pattern (returns a file path and name, such as "foo/bar/myfile.txt" )
|
scandir |
returns an array of all file names in a given directory (returns just the file names, such as "myfile.txt" )
|
glob
can accept a general path with the *
wildcard character (more powerful)
glob
example
# reverse all poems in the poetry directory
$poems = glob("poetry/poem*.dat");
foreach ($poems as $poemfile) {
$text = file_get_contents($poemfile);
file_put_contents($poemfile, strrev($text));
print "
I just reversed " . basename($poemfile) . "
\n";
}
glob
can match a "wildcard" path with the *
character
glob("foo/bar/*.doc")
returns all .doc
files in the foo/bar
subdirectory
glob("food*")
returns all files whose names begin with "food"
basename
function strips any leading directory from a file path
basename("foo/bar/baz.txt")
returns "baz.txt"
scandir
example
 <?php foreach (scandir("taxes/old") as $filename) { ?>
<?= $filename ?>
 <?php } ?>

scandir
includes current directory ("."
) and parent (".."
) in the arraybasename
with scandir
; returns file names only without directory
# construct an object $name = new ClassName(parameters); # access an object's field (if the field is public) $name->fieldName # call an object's method $name->methodName(parameters);
$zip = new ZipArchive(); $zip->open("moviefiles.zip"); $zip->extractTo("images/"); $zip->close();
class_exists
# create an HTTP request to fetch student.php $req = new HttpRequest("student.php", HttpRequest::METH_GET); $params = array("first_name" => $fname, "last_name" => $lname); $req->addPostFields($params); # send request and examine result $req->send(); $http_result_code = $req->getResponseCode(); # 200 means OK print "$http_result_code\n"; print $req->getResponseBody();
HttpRequest
object can fetch a document from the webclass ClassName { # fields - data inside each object public $name; # public field private $name; # private field # constructor - initializes each object's state public function __construct(parameters) { statement(s); } # method - behavior of each object public function name(parameters) { statements; } }
$this
<?php class Point { public $x; public $y; # equivalent of a Java constructor public function __construct($x, $y) { $this->x = $x; $this->y = $y; } public function distance($p) { $dx = $this->x - $p->x; $dy = $this->y - $p->y; return sqrt($dx * $dx + $dy * $dy); } # equivalent of Java's toString method public function __toString() { return "(" . $this->x . ", " . $this->y . ")"; } } ?>
<?php # this code could go into a file named use_point.php include("Point.php"); $p1 = new Point(0, 0); $p2 = new Point(4, 3); print "Distance between $p1 and $p2 is " . $p1->distance($p2) . "\n\n"; var_dump($p2); # var_dump prints detailed state of an object ?>
Distance between (0, 0) and (4, 3) is 5 object(Point)[2] public 'x' => int 4 public 'y' => int 3
$p1
and $p2
are references to Point
objects
class ClassName extends ClassName { ... }
class Point3D extends Point { public $z; public function __construct($x, $y, $z) { parent::__construct($x, $y); $this->z = $z; } ... }
static $name = value; # declaring a static field const $name = value; # declaring a static constant
# declaring a static method
public static function name(parameters) {
statements;
}
ClassName::methodName(parameters); # calling a static method (outside class) self::methodName(parameters); # calling a static method (within class)
interface InterfaceName { public function name(parameters); public function name(parameters); ... } class ClassName implements InterfaceName { ...
abstract class ClassName { abstract public function name(parameters); ... }


Welcome
IRONHACK
BlACK JACK
Player Nickname:
Submit
PLAYER WIN !!!!

TIE !!!!
 DEALER BLACK JACK !!!!
 PLAYER BLACK JACK !!!!
GAME OVER
LOOSER!!!


Instructor
- CSC 498
- Introduction to Reinforcement Learning,
(Initially listed as a Topics in Computer Science Course)
Instructor (W-21, F-21).
University of Toronto.
- CSC 375
- Algorithmic Intelligence in Robotics,
(Initially listed as a Programming Mechatronics Course)
Instructor (F-20).
University of Toronto.
- CSC 2547
- Topics in Computer Vision: Advances in 3D Vision
Instructor (W-21).
University of Toronto.
- CSC 2621
- Topics in Robotics: Deep Reinforcement Learning,
Instructor (W-20).
University of Toronto.
- CS 332
- Advanced Survey of Reinforcement Learning,
Co-Instructor (F-17), with Emma Brunskill,
Stanford University.
Teaching Assistant
- IEOR 131
- Discrete Event Simulation, TA (Sp-16)
Lee Schruben, University of California, Berkeley.
- IEOR 170
- Industrial Design & Human Factors, TA (Sp-15)
Ken Goldberg, University of California, Berkeley.
- IEOR 115
- Industrial & Commercial Data Systems, TA (F-11, Sp-13, F-13, F-14)
Ken Goldberg, University of California, Berkeley.
- IEOR 191
- Technology Entrepreneurship, TA (F-12)
Ron Lesniak, University of California, Berkeley.
- CS 3451
- Computer Graphics, Reader (Sp-11)
Greg Turk, Georgia Institute of Technology.


We combine expert engineering with a touch of magic. The result? Beautiful, high-quality apps our clients (and their customers) love. ❤


Psalms 15:3
He that backbiteth not with his tongue, nor doeth evil to his neighbour, nor taketh up a reproach against his neighbour.


Pat's Salmon Cookies: Sales Data
Home
Enter Informations Bellow to Add New Location
Location City:
Max Customers:
Min Customers:
Avg Cookies Sold:
Add Location


(CNN) -- When Lukas Hartmann, 29, signed up for 23andMe's at-home genetic testing service, there were no surprises in his results.
The Berliner learned he would probably die from "a mix of heart attack and prostate cancer," he wrote on a friend's blog, but "nothing special there."
Then a few months ago, he received an update from the company.
Hartmann's genetic code showed two mutations that are linked to limb-girdle muscular dystrophy, he says the site told him. "Some people with limb-girdle muscular dystrophy lose the ability to walk and suffer from serious disability," his results page read.
This can't be true, he thought. It must be an error.
Genetic testing can be a powerful tool. It can offer information about your family history, tell you how your body might respond to different drugs and identify your risk factors for disease.
It can also be misleading.
The Food and Drug Administration on Monday ordered 23andMe to stop sales of its $99 home genetic testing kits, saying the Google-backed company has not proven the validity of its product.
The FDA warned that customers who received inaccurate results could suffer from undue mental anguish or undergo unnecessary medical procedures. The government agency has asked 23andMe to revise its marketing strategy to comply with federal regulations.
The action triggered outrage among some of 23andMe's supporters.
"So GMOs, aspartame, artificial flavors & colors, pink slime ... no problem!" a poster named Laura Ann wrote on the company's Facebook page. "But in no way should we be allowed the right to know our own genetic material as a means for making better decisions about our health."
In a statement, 23andMe said it has received the FDA's letter and will be working to address the agency's concerns.
There are more than 3 billion letters in our genetic code. Though it's been 10 years since the Human Genome Project was completed, scientists still don't understand what every gene does, and what a mutation might mean for someone's health.
It's one of the issues opponents to home genetic testing kits raise most often. If DNA experts don't understand 100% what a gene mutation means, how can we expect consumers to?
5 cool things DNA testing can do
Scientists have identified more than 2,000 single gene disorders, says Rebecca Nagy, president of the National Society of Genetic Counselors. These are disorders that can be diagnosed based on the mutation of a single gene in the body; some examples include Huntington's disease or cystic fibrosis.
But conditions such as Type 2 diabetes or Alzheimer's are more complex. Hundreds of genes may contribute to the development of these diseases, Nagy says, and a person's risk is also influenced by his or her environment. Testing for markers of risk scattered across someone's genome is "really only testing for the tip of the iceberg."
"That's where it gets a little scary, because if a person has a normal test result on 23andMe, they leave thinking they don't have a risk," she says. "It's not that the science behind (this kind of genetic testing) isn't good. It's that the science behind them isn't complete."
The upside of these at-home genetic testing kits -- and 23andMe isn't the only company that sells them -- is that they've generated a lot of buzz about genetics, Nagy says. She says she believes most early adopters of the tests are information-savvy and understand the results aren't set in stone.
"I don't think that anyone thinks that this kit replaces formal testing by a doctor," Heather Armstrong posted on 23andMe's Facebook page. "I seriously doubt that a doctor would agree to perform, say, a double mastectomy, based on these results."
Joseph Stolarski posted, "If you find something interesting, you then take it to a medical professional for further evaluation. No one is or should rely on it for medical 'diagnosis.' It's just a tool, like personally checking your heart rate with a watch or checking your weight on a scale."
But Nagy says she worries about what will happen when the tests become more mainstream.
Giving this kind of information to someone unfamiliar with genetic testing's limitations could prove dangerous.
Nagy recommends anyone who wants to do genetic testing first talk to a genetic counselor. Counselors have specialized graduate degrees and extensive knowledge of the human genome. They're also trained in explaining test results to laymen.
"Our message is to be a smart consumer," Nagy says. "Know what you're doing so that when you get the results back you can really use them to your best benefit."
Hartmann did some intense investigating, saying he looked at the raw data 23andMe provided him. He eventually found he did indeed have two mutations, he says, but they weren't on the same gene. He says he submitted his "bug report" to the company and it apologized.
In general, Hartmann thinks it's a good thing for every person to have affordable access to his or her genetic data. But he's browsed the community forums on 23andMe.com and has seen how seriously some people take their results -- without fully understanding them.
Hartmann says he now believes he will not get limb-girdle muscular dystrophy, although he says there is a risk he could pass the genetic mutations onto his kids.
"I can live with that," he wrote. "For quite some time, I hope."
Parents push for standardized screening of Jewish genetic diseases
CNN's Dorrine Mendoza and CNNMoney's James O'Toole and Aaron Smith contributed to this report.


Symbols
| A
| B
| C
| D
| E
| F
| G
| H
| I
| K
| L
| M
| N
| O
| P
| Q
| R
| S
| T
| U
| V
| W
| X
| Y
Index: A
- a command (sed)
: 5.5. Append, Insert, and Change
- abort statement (tawk)
: <IP_ADDRESS>. Tawk language extensions
- acronym processor (example)
: 8.5. An Acronym Processor
- addition (+) operator
: 7.6. Expressions
- addresses, line
- 2.1. Awk, by Sed and Grep, out of Ed
- 4.2. A Global Perspective on Addressing
- 5.1. About the Syntax of sed Commands
- addressing by pattern
- 2.1. Awk, by Sed and Grep, out of Ed
- A.2.1. Pattern Addressing
- printing with =
: 5.9. Print Line Number
- adj script (example)
: 13.5. adj - Adjust Lines for Text Files
- alignment of output fields
: 7.9. Formatted Printing
- ampersand (&)
- && (logical AND) operator
: 7.8. Relational and Boolean Operators
- in replacement text
- 5.3. Substitution
- 5.3.1. Replacement Metacharacters
- anchors
- 3.2. A Line-Up of Characters
- 3.2.7. Positional Metacharacters
- AND (&&) operator
: 7.8. Relational and Boolean Operators
- append command
: (see a command (sed))
- ARGC variable
: 8.6. System Variables That Are Arrays
- ARGI variable (tawk)
: <IP_ADDRESS>. Tawk language extensions
- ARGIND variable (gawk)
: <IP_ADDRESS>. Additional variables
- ARGV variable
: 8.6. System Variables That Are Arrays
- ARGI variable with (tawk)
: <IP_ADDRESS>. Tawk language extensions
- ARGIND variable with (gawk)
: <IP_ADDRESS>. Additional variables
- arithmetic functions
- 9.1. Arithmetic Functions
- 11.1.10. Functions
- arithmetic operators, awk
: 7.6. Expressions
- arrays
- 8.4. Arrays
- 11.1.8. Arrays
- B.2.5.4. Arrays
- deleting elements of
- 8.4.6. Deleting Elements of an Array
- 11.1.8. Arrays
- <IP_ADDRESS>. Deleting all elements of an array
- multidimensional
- 8.5.1. Multidimensional Arrays
- <IP_ADDRESS>. Tawk language extensions
- parsing strings into elements
- 8.4.4. Using split() to Create Arrays
- <IP_ADDRESS>. Obtaining individual characters
- sorting elements in (tawk)
: <IP_ADDRESS>. Tawk language extensions
- splitting
: <IP_ADDRESS>. Obtaining individual characters
- system variables that are
: 8.6. System Variables That Are Arrays
- testing for membership in
: 8.4.2. Testing for Membership in an Array
- assigning input to variables
: 10.1.2. Assigning the Input to a Variable
- assignment operators, awk
: 7.6. Expressions
- associative arrays
: 8.4.1. Associative Arrays
- asterisk (*)
- ** (exponentiation) operator
: 7.6. Expressions
- **= (assignment) operator
: 7.6. Expressions
- *= (assignment) operator
: 7.6. Expressions
- as metacharacter
- 3.1. That's an Expression
- 3.2.5. Repeated Occurrences of a Character
- multiplication operator
: 7.6. Expressions
- automatic edits
: 4.4.4. Edits To Go
- awk
- 1.3. A Pattern-Matching Programming Language
- 2.1. Awk, by Sed and Grep, out of Ed
- 2.4. Using awk
- 11.1. Original awk
- arrays
: (see arrays)
- built-in functions
: 11.1.10. Functions
- built-in variables
- 7.7. System Variables
- 11.1.11. Built-In Variables
- command-line syntax
- 2.2. Command-Line Syntax
- B.1. Command-Line Syntax
- commands
- 5.1. About the Syntax of sed Commands
- B.3. Command Summary for awk
- (see also under specific command)
- documentation for
: Other Sources of Information About sed and awk
- error messages
: 2.4.2. Error Messages
- escape sequences
: B.2.5.2. Escape sequences
- extensions to
: 11.2.1. Common Extensions
- functions
: (see functions)
- invoking with #!
- 10.9. Invoking awk Using the #! Syntax
- B.1.1. Shell Wrapper for Invoking awk
- limitations to
: 10.8. Limitations
- obtaining
: Availability of sed and awk
- operators
- B.2.5.6. Operators
- (see operators, awk)
- options
: 2.4.3. Summary of Options
- POSIX standards for
: 7. Writing Scripts for awk
- programming model
: 7.3. Awk's Programming Model
- quick reference
: B. Quick Reference for awk
- regular expression metacharacters
: B.2.4. Regular Expressions
- with sed
: 2.5. Using sed and awk Together
- system variables
: B.2.5.5. System variables
- versions of
- Availability of sed and awk
- 11.2.2. Bell Labs awk
- writing scripts in
: 7. Writing Scripts for awk
- AWKPATH variable (gawk)
: <IP_ADDRESS>. An awk program search path
Symbols
| A
| B
| C
| D
| E
| F
| G
| H
| I
| K
| L
| M
| N
| O
| P
| Q
| R
| S
| T
| U
| V
| W
| X
| Y
Copyright © 1998
O'Reilly & Associates, Inc.
All Rights Reserved.


Formally a Civil Engineer, I am now a Software Engineer with WeddingWire thanks to the Web Development Immersive course from General Assembly in Washington, D.C. This course has rekindled a passion for programming and inspired me to learn anything and everything there is to learn about the industry. When I'm not working through a coding problem or attending local tech meetups, you can usually find me cooking, keeping fit, making wine/beer, or of course, video games. Please feel free to at any time!


Multiple renderers
Interactive car driving
Terrain/Mesh manipulation (Perlin noise)
Torus Knot and Box geometries
Animated box geometries
Stress-Test with 40x40 cube grid (1600 total meshes)
Textured boxes
Rendering to texture


The simple converter circuit converts an analog sine signal into a N-bit (by default a 4 bit) logic signal, which is converted backward into an analog signal.
Compare the input voltage (aD_Converter.p.v) with the output voltage (dA_Converter.p.v). By changing N the influence of the digital signal width can be studied. Otherwise the trigger frequency pulse.period can be changed to see its influence.


This intention converts
if
statement containing conjuction operation in its condition into two nested
if
statements with simplified conditions.


Settings
Image
Stream
Host (e.g. fm6501.myfoscam.org):
Port (e.g. 8888):
User (e.g. admin):
Password:
Connect & Save
Disconnect & Clear
keyboard_arrow_up
keyboard_arrow_left
home
keyboard_arrow_right
keyboard_arrow_down
Refresh
Clear
Stream URL:


War Mage Artius:
The Barrier Orb protects this fortress. Without it, we would have been overwhelmed by the enemy and the harsh environment long ago.
Quest


ExAPIriment
Author:
Comments
Are you sure you want to delete this post?
Loading...
The post has been deleted!
Edit
Title:
Content: