thunder
Mission
Teachers and Schools
Contributors
The app
About us
Português
Use the menu to navigate.


rTensor: Tools for Tensor Analysis and Decomposition
A set of tools for creation, manipulation, and modeling
of tensors with arbitrary number of modes. A tensor in the context of data
analysis is a multidimensional array. rTensor does this by providing a S4
class 'Tensor' that wraps around the base 'array' class. rTensor
provides common tensor operations as methods, including matrix unfolding,
summing/averaging across modes, calculating the Frobenius norm, and taking
the inner product between two tensors. Familiar array operations are
overloaded, such as index subsetting via '[' and element-wise operations.
rTensor also implements various tensor decomposition, including CP, GLRAM,
MPCA, PVD, and Tucker. For tensors with 3 modes, rTensor also implements
transpose, t-product, and t-SVD, as defined in Kilmer et al. (2013). Some
auxiliary functions include the Khatri-Rao product, Kronecker product, and
the Hamadard product for a list of matrices.
Downloads:
Reverse dependencies:
Linking:
Please use the canonical form
https://CRAN.R-project.org/package=rTensor
to link to this page.


@ThreadSafe
public abstract class TimingSource
extends java.lang.Object
A timing source needs to "tick" at some regular period of time. This period, if it is variable for a particular implementation, should be specified to the subclass's constructor.
A timer notifies a registered set of TimingSource.TickListener
s that a tick of
time has elapsed. In addition, a timer notifies a set of
TimingSource.PostTickListener
s after the registered set of TimingSource.TickListener
s
has been notified. For example, a TimingSource.PostTickListener
could be used to
call repaint() after a large number of animations (which register
themselves as TimingSource.TickListener
s) have updated the program's state. One
time tasks can be queued to be run at the next tick of time (before any other
listeners are called) using submit(Runnable)
.
A timer should begin ticking after init()
is called and should be
stopped and disposed after dispose()
is called. The timer cannot be
restarted after dispose()
is called.
A timing source implementation should document the thread context in which it
makes calls to registered listeners. Further, it should invoke
runPerTick()
at each tick of time to perform the calls to registered
listeners.
| Modifier and Type | Class and Description |
|---|---|
static interface |
TimingSource.PostTickListener
This interface is implemented by any object wishing to receive "tick"
events from a
TimingSource object after all registered
TimingSource.TickListener objects have been notified. |
static interface |
TimingSource.TickListener
This interface is implemented by any object wishing to receive "tick"
events from a
TimingSource object. |
| Constructor and Description |
|---|
TimingSource() |
| Modifier and Type | Method and Description |
|---|---|
void |
addPostTickListener(TimingSource.PostTickListener listener)
Adds a
TimingSource.PostTickListener to the set of listeners that receive timing
events from this TimingSource . |
void |
addTickListener(TimingSource.TickListener listener)
Adds a
TimingSource.TickListener to the set of listeners that receive timing
events from this TimingSource . |
abstract void |
dispose()
Stops the timing source and disposes of its resources.
|
abstract void |
init()
Starts up the timing source.
|
abstract boolean |
isDisposed()
Gets if this timing target has had
dispose() invoked on it. |
void |
removePostTickListener(TimingSource.PostTickListener listener)
Removes a
TimingSource.PostTickListener from the set of listeners that receive
timing events from this TimingSource . |
void |
removeTickListener(TimingSource.TickListener listener)
Removes a
TimingSource.TickListener from the set of listeners that receive
timing events from this TimingSource . |
void |
runPerTick()
Used by timing source implementations to perform the following actions in
the listed order:
Execute all queued "one shot" tasks in the order they were received.
Notify all registered
TimingSource.TickListener s
Notify all registered TimingSource.PostTickListener s
A typical implementation will invoke this method when its particular timer
calls back each tick of time. |
void |
submit(java.lang.Runnable task)
Runs the passed task in the thread context of this timing source.
|
public abstract void init()
public abstract void dispose()
public abstract boolean isDisposed()
dispose()
invoked on it.true
if this timing target has had dispose()
invoked on it, false
otherwise.public final void addTickListener(TimingSource.TickListener listener)
TimingSource.TickListener
to the set of listeners that receive timing
events from this TimingSource
. Has no effect if the listener has
already been added.listener
- the listener to be added.public final void removeTickListener(TimingSource.TickListener listener)
TimingSource.TickListener
from the set of listeners that receive
timing events from this TimingSource
. Has no effect if the listener
is not in the set of listeners.listener
- the listener to be removed.public final void addPostTickListener(TimingSource.PostTickListener listener)
TimingSource.PostTickListener
to the set of listeners that receive timing
events from this TimingSource
. Has no effect if the listener has
already been added.listener
- the listener to be added.public final void removePostTickListener(TimingSource.PostTickListener listener)
TimingSource.PostTickListener
from the set of listeners that receive
timing events from this TimingSource
. Has no effect if the listener
is not in the set of listeners.listener
- the listener to be removed.public final void submit(java.lang.Runnable task)
TimingSource.TickListener
s). In particular, this method will
not block for execution of the task and the task will not execute until
after init()
has not been called. Tasks are executed in the order
they are received.
The task is wrapped, via WrappedRunnable
, to log an error if it
fails due to an unhandled exception.
This method is used to execute a snippet of code in the thread context used
for TimingSource.TickListener
s and TimingSource.PostTickListener
s.
task
- a task.WrappedRunnable
public void runPerTick()
TimingSource.TickListener
sTimingSource.PostTickListener
sThis method should never be called by client code—it is only intended to be used by timing source implementations. It is declared public only to avoid the generation of a synthetic accessor method for it, because many implementations invoke this method within nested classes.


{% extends "layout_unbranded.html" %} {% block page_title %} Upload spreadsheet - Family Mediator API {% endblock %} {% block content %} Home Actions {% if serviceName %} {{ serviceName }} {% endif %} Family Mediators data upload Excel file Navigate to the .xslx file on your file system {% endblock %}
Navigate to the .xslx file on your file system


Opportunities in the GHRG
NSERC-funded Masters and PhD opportunities researching multi-scale geomorphometry
Geomorphometry is the discipline focused on extracting information from topographic data to model and understand landscape processes. Topography controls many phenomena of interest in environmental modelling applications. For example, it affects the distribution of water, nutrients, and sediments, and climate properties, such as air and surface temperature, solar radiation, and wind exposure. Over the past decades, improved topographic mapping technologies and analysis methods have underpinned many advances in soils and habitat mapping, flood forecasting and hydrologic modelling, sediment modelling, hazards mapping, and geological resource inventorying.
The outputs of geomorphometric analysis, which often take the form of maps of topographic properties, are frequently used as inputs for environment models. One of the challenges for research in this field has been how best to handle the scale dependency of these data. Most topographic properties are dependent on the scale at which they are measured. Consider local topographic position, which measures how elevated or low lying a site is relative to its surroundings. This property affects soils development because low-lying sites accumulate materials, and therefore tend to exhibit deeper soils than elevated sites. However, at what spatial scale, or scales, should topographic position be measured to best represent this soil-forming process and to serve as a predictor for soil distribution models? Research has shown that using a set of topographic predictors measured at a range of scales can improve model performance. However, this multi-scale approach can add to model complexity. Recent research has offered an alternative approach for multi-scale analysis, in which the most important scales for representing a topographic property are identified for each individual location based on the unique properties of a site and its surroundings. This method involves creating a scale mosaic from a stack of scaled maps that retains much of the information contained within the full stack. This research aims to explore the opportunties for scale mosaics of topographic data sets for improving landscape modelling and to advance current methods for identifying characteristic scales.
I aim to advise one Masters and one PhD student in the Fall of 2024 (a Winter 2024 start is also possible) to carry out a geomorphometry
related research projects focussed on mult-scale geomorphometry. The successful students must be Canadian citizens or
permanent residents (I only have sufficient research funding to support domestic students currently). If you are interested in research in this area please contact
me. The incoming students will join the vibrant Geomorphometry and Hydrogeomatics Research Group (GHRG) at the
University of Guelph, have opportunities to work on open-source GIS development
(WhiteboxTools), and will have excellent employment opportunties upon graduation in Canada's growing geomatics sector.
Dr. John Lindsay
Department of Geography, Environment & Geomatics
University of Guelph
Guelph, Ontario, Canada, N1G 2W1
email<EMAIL_ADDRESS>Undergraduate Opportunities
Prof. Lindsay is open to advising one or two geography students (majors in EG, GEOG, ERM) during the fall and winter semesters of 2019/20 for GEOG*4690 Independent Study projects. If you are interested in GIS, LiDAR remote sensing, and geomorphometry, please come to discuss project ideas.
The GHRG also hosts a number of undergraduate student volunteers each semester. These students gain valuable experiences analyzing LiDAR and DEM data sets.


Template markup (HTML/Jinja) on the left will be compiled to JavaScript and shown on the right. View project on GitHub.
Include Runtime


Download the android app
Or open the app on your ios device in either chrome or safari. (Apple app store has a short list of approved crypto currencies. We are not yet on that list) App
As soon as you open the app. You will automatically begin receiving yada coins. New coins take an average of ten minutes to appear.
Option 1: Just register
Option 2: Register and Login
{{data}}


I am a long-distance runner, and I have the same work values of preparation, practice and endurance. Full-stack Developer and competitive programmer. My role is to write and style the front-end and back-end components that meet the requirements of our mocks and fulfil our user stories. I have impacted more than 9000 students by 15+ initiatives. From the intial stage to 7000 students I was leading GirlScript Chandigarh that time.
These awards recognize individual efforts towards particularly innovative or extraordinary contributors who have achieved heights under the age of twenty-one and created a great impact.
After 3 months of continuous contribution, I got the first position in Chapter leader out of 112+ chapters leader of GirlScript Foundation. I have also impacted more than 6000 students.
This will dream for everyone who want to recognise by their own university. I am very happy to say that this was my first gift when I was on Chandigarh University every social media platform.
Online
Chandigarh University
Hostel Nc-5 212
<EMAIL_ADDRESS><EMAIL_ADDRESS>+91<PHONE_NUMBER>


// Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // Copyright 2006 Google Inc. All Rights Reserved. // The original file lives here: http://go/cross_domain_channel.js /** * @fileoverview Implements a cross-domain communication channel. A * typical web page is prevented by browser security from sending * request, such as a XMLHttpRequest, to other servers than the ones * from which it came. The Jsonp class provides a workound, by * using dynamically generated script tags. Typical usage:. * * var jsonp = new goog.net.Jsonp(new goog.Uri('http://my.host.com/servlet')); * var payload = { 'foo': 1, 'bar': true }; * jsonp.send(payload, function(reply) { alert(reply) }); * * This script works in all browsers that are currently supported by * the Google Maps API, which is IE 6.0+, Firefox 0.8+, Safari 1.2.4+, * Netscape 7.1+, Mozilla 1.4+, Opera 8.02+. * */ goog.provide('goog.net.Jsonp'); goog.require('goog.Uri'); goog.require('goog.dom'); // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING // // This class allows us (Google) to send data from non-Google and thus // UNTRUSTED pages to our servers. Under NO CIRCUMSTANCES return // anything sensitive, such as session or cookie specific data. Return // only data that you want parties external to Google to have. Also // NEVER use this method to send data from web pages to untrusted // servers, or redirects to unknown servers (www.google.com/cache, // /q=xx&btnl, /url, www.googlepages.com, etc.) // // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING /** * Creates a new cross domain channel that sends data to the specified * host URL. By default, if no reply arrives within 5s, the channel * assumes the call failed to complete successfully. * * @param {goog.Uri|string} uri The Uri of the server side code that receives * data posted through this channel (e.g., * "http://maps.google.com/maps/geo"). * * @param {string=} opt_callbackParamName The parameter name that is used to * specify the callback. Defaults to "callback". * * @constructor */ goog.net.Jsonp = function(uri, opt_callbackParamName) { /** * The uri_ object will be used to encode the paylod that is sent to the * server. * @type {goog.Uri} * @private */ this.uri_ = new goog.Uri(uri); /** * This is the callback parameter name that is added to the uri. * @type {string} * @private */ this.callbackParamName_ = opt_callbackParamName ? opt_callbackParamName : 'callback'; /** * The length of time, in milliseconds, this channel is prepared * to wait for for a request to complete. The default value is 5 seconds. * @type {number} * @private */ this.timeout_ = 5000; }; /** * The name of the property of goog.global under which the callback is * stored. */ goog.net.Jsonp.CALLBACKS = '_callbacks_'; /** * Used to generate unique callback IDs. The counter must be global because * all channels share a common callback object. * @private */ goog.net.Jsonp.scriptCounter_ = 0; /** * Sets the length of time, in milliseconds, this channel is prepared * to wait for for a request to complete. If the call is not competed * within the set time span, it is assumed to have failed. To wait * indefinitely for a request to complete set the timout to a negative * number. * * @param {number} timeout The length of time before calls are * interrupted. */ goog.net.Jsonp.prototype.setRequestTimeout = function(timeout) { this.timeout_ = timeout; }; /** * Returns the current timeout value, in milliseconds. * * @return {number} The timeout value. */ goog.net.Jsonp.prototype.getRequestTimeout = function() { return this.timeout_; }; /** * Sends the given payload to the URL specified at the construction * time. The reply is delivered to the given replyCallback. If the * errorCallback is specified and the reply does not arrive within the * timeout period set on this channel, the errorCallback is invoked * with the original payload. * * If no reply callback is specified, then the response is expected to * consist of calls to globally registered functions. No &callback= * URL parameter will be sent in the request, and the script element * will be cleaned up after the timeout. * * @param {Object} payload Name-value pairs. * * @param {Function=} opt_replyCallback A function expecting one * argument, called when the reply arrives, with the response data. * * @param {Function=} opt_errorCallback A function expecting one * argument, called on timeout, with the payload. * * @param {string=} opt_callbackParamValue Value to be used as the * parameter value for the callback parameter (callbackParamName). * To be used when the value needs to be fixed by the client for a * particular request, to make use of the cached responses for the request. * NOTE: If multiple requests are made with the same * opt_callbackParamValue, only the last call will work whenever the * response comes back. * * @return {Object} A request descriptor that may be used to cancel this * transmission, or null, if the message may not be cancelled. */ goog.net.Jsonp.prototype.send = function(payload, opt_replyCallback, opt_errorCallback, opt_callbackParamValue) { // This is a safeguard that we don't accidentally call appendChild // on a null. if (!document.documentElement.firstChild) { if (opt_errorCallback) { opt_errorCallback(payload); } return null; } var id = opt_callbackParamValue || '_' + (goog.net.Jsonp.scriptCounter_++).toString(36) + goog.now().toString(36); if (!goog.global[goog.net.Jsonp.CALLBACKS]) { goog.global[goog.net.Jsonp.CALLBACKS] = {}; } var script = goog.dom.createElement('script'); var timeout = null; if (this.timeout_ > 0) { var error = goog.net.Jsonp.newErrorHandler_(id, script, payload, opt_errorCallback); timeout = goog.global.setTimeout(error, this.timeout_); } // Create a new Uri object onto which this payload will be added var uri = this.uri_.clone(); goog.net.Jsonp.addPayloadToUri_(payload, uri); if (opt_replyCallback) { var reply = goog.net.Jsonp.newReplyHandler_(id, script, opt_replyCallback, timeout); goog.global[goog.net.Jsonp.CALLBACKS][id] = reply; uri.setParameterValues(this.callbackParamName_, goog.net.Jsonp.CALLBACKS + '.' + id); } goog.dom.setProperties(script, { 'type': 'text/javascript', 'id': id, 'charset': 'UTF-8', // NOTE: Safari never loads the script if we don't set // the src attribute before appending. 'src': uri.toString() }); goog.dom.appendChild(document.getElementsByTagName('head')[0], script); return { id_: id, timeout_: timeout }; }; /** * Cancels a given request. The request must be exactly the object returned by * the send method. * * @param {Object} request The request object returned by the send method. */ goog.net.Jsonp.prototype.cancel = function(request) { if (request && request.id_) { var scriptNode = goog.dom.getElement(request.id_); if (scriptNode && scriptNode.tagName == 'SCRIPT' && typeof goog.global[goog.net.Jsonp.CALLBACKS][request.id_] == 'function') { request.timeout_ && goog.global.clearTimeout(request.timeout_); goog.net.Jsonp.cleanup_(request.id_, scriptNode, false); } } }; /** * Creates a timeout callback that removes the script node and calls * the given timeoutCallback with the original payload. * * @param {string} id The id of the script node. * @param {Element} scriptNode Script element. * @param {Object} payload The payload that was sent to the server. * @param {Function=} opt_errorCallback The function called on timeout. * @return {Function} A zero argument function that handles callback duties. * @private */ goog.net.Jsonp.newErrorHandler_ = function(id, scriptNode, payload, opt_errorCallback) { /** * When we call across domains with a request, this function is the * timeout handler. Once it's done executing the user-specified * error-handler, it removes the script node and original function. */ return function() { goog.net.Jsonp.cleanup_(id, scriptNode, false); if (opt_errorCallback) { opt_errorCallback(payload); } } }; /** * Creates a reply callback that removes the script node and calls the * given replyCallback with data returned by the server. * * @param {string} id The id of the script node. * @param {Element} scriptNode Script element. * @param {Function} replyCallback The function called on reply. * @param {?number} timeout A timeout call that needs to be cleared. * @return {Function} A reply callback function. * @private */ goog.net.Jsonp.newReplyHandler_ = function(id, scriptNode, replyCallback, timeout) { /** * This function is the handler for the all-is-well response. It * clears the error timeout handler, calls the user's handler, then * removes the script node and itself. * * @param {...Object} var_args The response data sent from the server. */ return function(var_args) { goog.global.clearTimeout(timeout); goog.net.Jsonp.cleanup_(id, scriptNode, true); replyCallback.apply(undefined, arguments); }; }; /** * Removes the script node and reply handler with the given id. * * @param {string} id The id of the script node to be removed. * @param {Node} scriptNode The node to be removed. * @param {boolean} deleteReplyHandler If true, delete the reply handler * instead of setting it to nullFunction (if we know the callback could * never be called again). * @private */ goog.net.Jsonp.cleanup_ = function(id, scriptNode, deleteReplyHandler) { // Do this after a delay (removing the script node of a running script can // confuse older IEs). goog.global.setTimeout(function() { goog.dom.removeNode(scriptNode); }, 0); if (goog.global[goog.net.Jsonp.CALLBACKS][id]) { if (deleteReplyHandler) { delete goog.global[goog.net.Jsonp.CALLBACKS][id]; } else { // Removing the script tag doesn't necessarily prevent the script // from firing, so we make the callback a noop. goog.global[goog.net.Jsonp.CALLBACKS][id] = goog.nullFunction; } } }; /** * Returns URL encoded payload. The payload is assumed to be a list of * value name pairs, in the form {"foo": 1, "bar": true, ...}. * * <p>The method uses hasOwnProperty() to assure the properties are on the * object, not on its prototype. * * @param {Object} payload A list of value name pairs to be encoded. * A value may be specified as an array, in which case a query parameter * will be created for each value, e.g.: * {"foo": [1,2]} will encode to "foo=1&foo=2". * * @param {goog.Uri} uri A Uri object onto which the payload key value pairs * will be encoded. * * @return {goog.Uri} A reference to the Uri sent as a parameter. * @private */ goog.net.Jsonp.addPayloadToUri_ = function(payload, uri) { for (var name in payload) { // NOTE: Safari/1.3 doesn't have hasOwnProperty(). In that // case, we iterate over all properties as a very lame workaround. if (!payload.hasOwnProperty || payload.hasOwnProperty(name)) { uri.setParameterValues(name, payload[name]); } } return uri; }; // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING // // This class allows us (Google) to send data from non-Google and thus // UNTRUSTED pages to our servers. Under NO CIRCUMSTANCES return // anything sensitive, such as session or cookie specific data. Return // only data that you want parties external to Google to have. Also // NEVER use this method to send data from web pages to untrusted // servers, or redirects to unknown servers (www.google.com/cache, // /q=xx&btnl, /url, www.googlepages.com, etc.) // // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING


Why to use this?
Sometimes it is needed to quickly check location of IP addresses in the case of a security breach, or when getting to know the origin of client IP for your App/Websites.
To do so, one has to sign up with sites who provide this service for a fee and require several more steps, wasting time that could be used for developement.
Also after getting the location, this site also provides a map to check for physical locations on the globe.
How to use it?
There are 2 ways to use this:
1. Enter the IP below to look up location quickly
2. Access the API
Allowed HTTPs methods:
GET
Description of usual server responses:
- 200
OK
: The request was successful . - 400
Bad Request
: The request could not be understood or was missing required parameters. - 403
Forbidden
: Access denied. - 404
Not Found
: Resource was not found. - 405
Method Not Allowed
: Requested method is not supported for resource. - 500
Internal Server Error
: Some problem on the server side, please contact me if you see this.
API Requests
They should be in the following format:
GET iplocationapi.herokuapp.com/locate/{ip}
URL Parameters
- Required
ip
: This is the ip address you want to get the details for
Acknowledgement
Thanks to :
- Authors of the Cayman Jekyll Theme .


{% extends "email_base.html" %}
{% load i18n %}
{% block content %}
{% trans "You're receiving this email because your account at ephios has been updated." %}
{% trans "You can see the changes in your profile:" %} {{ site_url }}{{ url }}
{% trans "Your username is your email address:" %} {{ email }}
{% endblock %}


--- layout: post title: Find nearest store page using PHP, mySQL and Google Maps date: 2008-09-28 23:38:17.000000000 +01:00 type: post published: true status: publish categories: - Uncategorised tags: - find nearest - google maps - mapping - mysql - php - spherical geometry meta: aktt_notify_twitter: 'no' _topsy_cache_timestamp: '1299700350' _syntaxhighlighter_encoded: '1' _edit_last: '1' tmac_last_id: '618797419543728128' author: David Simpson excerpt_separator: ---
This is a step by step guide for building a find nearest/store locator for free in PHP just like Postcode Anywhere.
It requires PHP and a mySQL database. That's all.
You don't need Google Maps, but it helped me populating the database, so I've included it for completeness. The example I'm using is UK based, but provided Google have a postcode/zipcode to lat/long convertor for your country, it should work nicely.
Before we start, it's time to go back to school with some background maths.
Don't be tempted into Pythagorean territory here, because the world isn't flat and the distance between lines of longitude gets smaller as we get closer to the poles. Also with the curvature of the earth for distances over say 15 miles, the sides of the triangle go from straight into an arc - not good.
Trying a little harder, we get to the Great Circle Distance method.
The Great Circle Distance Formula using radians:
r * acos[sin(lat1) * sin(lat2) + cos(lat1) * cos(lat2) * cos(lon2 - lon1)]
Where r is the radius of the earth e.g. r = 3963.0 miles
or
As I'm lazy, I want to add this directly into a SQL query that checks against lat/long values for my stores in my database.
Converted to (my)SQL syntax using lat/long in degrees becomes:
[source language="sql"]SELECT 3963.0 * ACOS( SIN( lat1*PI()/180 ) * SIN( lat2*PI()/180 ) + COS( lat1*PI()/180 ) * COS( lat2*PI()/180 ) * COS( (lon2*PI()/180) - (lon1*PI()/180) ) ) AS distance;[/source]
Assuming mySQL uses double precision, we can be assured that the calculation is reasonably accurate. Although the arcos formula can suffer from rounding errors at small distances. But in my experience, it works well when compared to other distance calculators (e.g.GMap Pedometer and Daft Logic Google Maps Distance Calculator).
This example is unashamedly simplifed. The PHP is procedural and basic. It is for demonstration only - apply you own favourite MVC framework when working this up.
In reality, you'd probably want to add columns for phone no, web address, email etc.
I'm using real locations of Apple computer stores in the UK...
{% highlight sql %} INSERT INTO `stores` (`id`, `store_name`, `postcode`, `latitude`, `longitude`, `postal_address`,) VALUES ( (1, 'KRCS Mac computer store', 'NG1 7QQ', 52.952493, -1.140725, 'Victoria Centre, Nottingham'), (2, 'Apple Store', 'M4 3AJ', 51.51277, -2.14308, 'U23, New Cannon Street Mall, Manchester'), (3, 'Apple Store', 'S9 1EA', 53.41442, -1.41089, '80 High Street, Meadowhell, Sheffield') ); {% endhighlight %}The lat/long values can be populated manually (e.g. go get them from Google Maps) or automatically using a function similar to this:
...but you'll need a Google Maps API key
Example for the Apple Store in Regent Street:
{% highlight php %} $geocode = getLatLongFromPostcode ('W1B 2EL', 'uk', 'ABQIAAAA2xzlSb6lvuy1qNdW6D87dBSX4wCNHpcq6aPi4BCCV9JuIkX6UhQgj9ZmrEF5FYpCKxFE5wNmrj'); {% endhighlight %}By the way, properly cleanse $_REQUEST['postcode']
to prevent XSS attacks. The code above is for demo only.
If you find this useful, but are still having trouble, here's an excellent article — Creating a Store Locator with PHP, MySQL & Google Maps from Google.


Class QPoint
Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). All
rights reserved. Contact: Nokia Corporation<EMAIL_ADDRESS>This file is part of the QtCore module of the Qt Toolkit.
$QT_BEGIN_LICENSE:LGPL$ Commercial Usage Licensees holding valid Qt
Commercial licenses may use this file in accordance with the Qt
Commercial License Agreement provided with the Software or,
alternatively, in accordance with the terms contained in a written
agreement between you and Nokia.
GNU Lesser General Public License Usage Alternatively, this file may
be used under the terms of the GNU Lesser General Public License version
2.1 as published by the Free Software Foundation and appearing in the
file LICENSE.LGPL included in the packaging of this file. Please review
the following information to ensure the GNU Lesser General Public License
version 2.1 requirements will be met:
http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
In addition, as a special exception, Nokia gives you certain
additional rights. These rights are described in the Nokia Qt LGPL
Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
package.
GNU General Public License Usage Alternatively, this file may be used
under the terms of the GNU General Public License version 3.0 as
published by the Free Software Foundation and appearing in the file
LICENSE.GPL included in the packaging of this file. Please review the
following information to ensure the GNU General Public License version
3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html.
If you have questions regarding the use of this file, please contact
Nokia at<EMAIL_ADDRESS>$QT_END_LICENSE$
|
|
__iadd__(...)
__iadd__( (object)arg1, (QPoint)arg2) -> object : |
|
|
|
|
__idiv__(...)
__idiv__( (object)arg1, (float)arg2) -> object : |
|
|
|
|
__imul__(...)
__imul__( (object)arg1, (float)arg2) -> object : |
|
|
|
|
__init__(...)
__init__( (object)arg1) -> None : |
|
|
|
|
__isub__(...)
__isub__( (object)arg1, (QPoint)arg2) -> object : |
|
|
|
|
|
|
|
isNull(...)
isNull( (QPoint)arg1) -> bool : |
|
|
|
|
|
|
|
rx(...)
rx( (QPoint)arg1) -> int : |
|
|
|
|
ry(...)
ry( (QPoint)arg1) -> int : |
|
|
|
|
setX(...)
setX( (QPoint)arg1, (int)xpos) -> None : |
|
|
|
|
setY(...)
setY( (QPoint)arg1, (int)ypos) -> None : |
|
|
|
|
x(...)
x( (QPoint)arg1) -> int : |
|
|
|
|
y(...)
y( (QPoint)arg1) -> int : |
|
|
|
Inherited from unreachable.instance :
__new__
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
|
|
Inherited from object :
__class__
|
__iadd__( (object)arg1, (QPoint)arg2) -> object :
C++ signature :
_object* __iadd__(boost::python::back_reference<QPoint&>,QPoint)
|
__idiv__( (object)arg1, (float)arg2) -> object :
C++ signature :
_object* __idiv__(boost::python::back_reference<QPoint&>,double)
|
__imul__( (object)arg1, (float)arg2) -> object :
C++ signature :
_object* __imul__(boost::python::back_reference<QPoint&>,double)
|
__init__(...)
(Constructor)
|
|
__init__( (object)arg1) -> None :
QPoint inline functions
C++ signature :
void __init__(_object*)
__init__( (object)arg1, (int)xpos, (int)ypos) -> None :
C++ signature :
void __init__(_object*,int,int)
- Overrides:
object.__init__
|
__isub__( (object)arg1, (QPoint)arg2) -> object :
C++ signature :
_object* __isub__(boost::python::back_reference<QPoint&>,QPoint)
|
|
helper for pickle
- Overrides:
object.__reduce__
- (inherited documentation)
|
isNull( (QPoint)arg1) -> bool :
C++ signature :
bool isNull(QPoint {lvalue})
|
manhattanLength( (QPoint)arg1) -> int :
C++ signature :
int manhattanLength(QPoint {lvalue})
|
rx( (QPoint)arg1) -> int :
C++ signature :
int {lvalue} rx(QPoint {lvalue})
|
ry( (QPoint)arg1) -> int :
C++ signature :
int {lvalue} ry(QPoint {lvalue})
|
setX( (QPoint)arg1, (int)xpos) -> None :
C++ signature :
void setX(QPoint {lvalue},int)
|
setY( (QPoint)arg1, (int)ypos) -> None :
C++ signature :
void setY(QPoint {lvalue},int)
|
x( (QPoint)arg1) -> int :
C++ signature :
int x(QPoint {lvalue})
|
y( (QPoint)arg1) -> int :
C++ signature :
int y(QPoint {lvalue})
|


|
TrackracerAR
0.9.2
|
A compund view to display information about a screen. Can be shown or hidden by the user. Using the playerprefs, each snackbar will remember its previous state throughout runs. More...
Public Member Functions | |
| void | Hide (float _duration) |
| void | Show (float _duration) |
Public Attributes | |
| Button | m_hideButton |
| Button | m_showButton |
| Image | m_showButtonImage |
| string | m_playerPrefsKey = PLAYER_PRES_DEFAULT_STRING |
Private Member Functions | |
| void | Awake () |
Private Attributes | |
| RectTransform | m_rectTransform |
| float | m_originalY |
| Tweener | m_tweener |
Static Private Attributes | |
| const string | PLAYER_PRES_DEFAULT_STRING = "SNACKBAR_" |
| const int | SHOW_STATUS = 0 |
| const int | HIDE_STATUS = 1 |
A compund view to display information about a screen. Can be shown or hidden by the user. Using the playerprefs, each snackbar will remember its previous state throughout runs.
|
inlineprivate |
|
inline |
|
inline |
|
staticprivate |
| Button SnackbarView.m_hideButton |
|
private |
| string SnackbarView.m_playerPrefsKey = PLAYER_PRES_DEFAULT_STRING |
|
private |
| Button SnackbarView.m_showButton |
| Image SnackbarView.m_showButtonImage |
|
private |
|
staticprivate |
|
staticprivate |


Stocks allocation with given constraints on the minimum returns and risk aversion.
Diagnostically predict whether or not a patient has heart disease
When Humans augment machines. Exploring the use of AutoML Vision to classify flowers.
Build models to predict whether a customer is about to churn.
Predicting the chances of long-term survival of lung cancer-diagnosed patients
Traveling Salesman Problem: What is the shortest possible route to visit each city and return to the origin city?
© {{ 'now' | date: "%Y" }} {{ site.title }}


Most of the default query classes are designed to support some specific
interaction with the user within the Prolog development environment. The
full list of query classes can be inspected in the file
library('SU_messages'). Here, we only describe the two classes
defined by 'SU_messages':query_class/5
that may be of general
use:
| QueryClass | yes_or_no | yes_no_proceed
|
| Prompt | ' (y or n) ' | ' (y, n, p, s, a, or ?) '
|
| InputMethod | line | line
|
| MapMethod | char([yes-"yY", no-"nN"])
| char([yes-"yY", no-"nN", proceed-"pP", suppress-"sS", abort-"aA"])
|
| FailureMode | help_query | help_query
|


Students are living on their own, some having no assistance from parents, and that can prove to be difficult in the money department. But saving and spending doesn’t have to be such a catch-22.
Rilee Lockhart | ART DIRECTOR
Rita Mansour, senior managing director of Mansour Wealth Management, knows all about helping people with their finances. She helps her clients invest their money, take a look at how to use debt responsibly and, overall, helps people attain their life goals. She sees firsthand how people can be irresponsible with their money.
“Most people start with this disposition of never being able to attain enough,” Mansour said. “So they figure the little they have isn’t going to make a difference and end up spending it all.”
Mansour knows it can be tricky for her adult clients, let alone college students who are living on their own for the first time.
“College kids are very transactional, so they don’t typically have an understanding of the duration of time that it takes to save money,” Mansour said.
Going to college can prove to be a difficult life transition. Students are gaining freedom but sometimes don’t understand how to use those freedoms and become overzealous. According to Mansour, the most important aspect of a paycheck is the money saved from it, not the money used for spending.
Mansour’s rule of thumb is having six months of emergency money set aside. If someone makes $1,000 a month from working, the savings money should add up to $6,000. Anything above someone’s monthly spending should be put into an account that’s different than a day-to-day checking account.
The idea of spending more than saving can be seen as a generational issue. Some college students aren’t always looking at the big picture but instead seek immediate gratification. With a lot of the online banking apps out there today, it’s extremely easy to have immediate access to money,l and can prove to be harmful when it comes to spending.
“The baby boomers had to work hard and save a lot, and they wanted their kids to have more than they did,” Mansour said. “So they’ve allowed them a sense of ease, not on purpose to make their kids lazy or anything, but they wanted to make sure that this generation didn’t have to struggle the way they did.”
Though there are good aspects to baby boomers providing their children with ease, there are also bad aspects because the parents continued to maintain control over the money and simply dole it out instead of teaching their kids how to manage their finances themselves.
Tori Critchley, a senior studying art education, struggled with acclimating herself to the trials of spending and saving in college and found that it hit the hardest with her sorority, Delta Zeta, and food.
“I have been really fortunate to have my parents pay for my sorority while I have been in college, but it is a big investment,” Critchley said. “I blew my money on sorority t-shirts freshman year because I was so excited to be in DZ. Now I’ve realized that it’s kind of pointless because I sold about half of the stuff I had.”
“The earlier that you start to focus on finances, the more you can benefit. Time is on your side.”-Rita Mansour, senior managing director of Mansour Wealth Management
Critchley quickly discovered she’d have to be money cautious and created a system to help herself in terms of saving money.
“I ask myself, ‘Do I really need that, or do I just want that?’” Critchley said. “It’s something simple, but it has worked a lot because my job at school barely pays anything, so I have to budget my spending money and decide what’s worth using my money for.”
Mansour also has three strategies that she preaches to help clients be smart with their money. She thinks reading about personal finance, investing and establishing a positive credit score are three of the most helpful tips anyone can have when it comes to saving money.
“I think it’s important that kids invest early,” Mansour said. “The earlier that you start to focus on finances, the more you can benefit. Time is on your side.”
After going through three years of college and learning the ups and downs of saving and spending, if Critchley could give anyone advice, it would be to just look at the big picture, and always be mindful.
“I think taking a step back and letting college stink in a little bit is really important,” Critchley said. “It’s super exciting and you will want to buy and experience everything, but once you get comfortable with where you are, you are going to realize that you didn’t really need to buy those things.”


Zombie Grid
A
Sass
DRY GRID SYSTEM
Getting Started
@import grid to your style file.
@include zombie-grid mixin with properties.
@extend %zombie- columns properties.


Message in a bottle sent 9 years ago from United States gets response from man in France
by ABC7.com staffIt may be a kid's dream come true - a man received a response to a message in a bottle he sent nine years ago.
Max Vredenburgh wrote a note saying, "I'm 10 years old. I like apples, I like the beach. My favorite color is blue. I like outer space. Please write back."
He threw it into the ocean in Massachusetts in 2010 and a man who found it on a beach in France responded to him.
"When I first read his letter, my stomach just dropped. I feel I have a higher chance of winning the lottery than this happening," Vredenburgh said.
The letter, signed by "G. Dubois," said it took nine years to cover the 6,000 kilometers that separates them.
Vredenburgh wanted to learn more about the mystery Frenchman so he shared his story on social media. It quickly went viral.
He and Mr. DuBois have since connected on Instagram.


🎅🏿 Santa Claus: Dark Skin Tone
This version of the 🎅 Santa Claus emoji has the 🏿 Dark Skin Tone applied, which is displayed as a Black Skin Tone on supported platforms.
Modifiers
The Santa Claus emoji supports skin tone modifiers. A yellow (or other non-human) skin tone should be shown by default, unless an emoji modifier is applied.
- 🎅 Santa Claus
- 🎅🏻 Santa Claus: Light Skin Tone
- 🎅🏼 Santa Claus: Medium-Light Skin Tone
- 🎅🏽 Santa Claus: Medium Skin Tone
- 🎅🏾 Santa Claus: Medium-Dark Skin Tone
Platforms without support for emoji modifiers display a missing symbol character (box with a cross, alien, or question mark in it) next to any modified emoji.


Id: 282
Name: Revolio Clockberg Jr.
Status: unknown
Species: Alien
Type: Gear-Person
Gender: Male
OriginName: Gear World
OriginUrl: https://rickandmortyapi.com/api/location/57
LocationName: Gear World
LocationUrl: https://rickandmortyapi.com/api/location/57
Image: https://rickandmortyapi.com/api/character/avatar/282.jpeg
Episode: ['https://rickandmortyapi.com/api/episode/11', 'https://rickandmortyapi.com/api/episode/13', 'https://rickandmortyapi.com/api/episode/25']
Url: https://rickandmortyapi.com/api/character/282
Created: 2017-12-31T19:21:17.351Z


[gecode-users] Copiling with gcc on OpenSuSE 10.0
tack at ps.uni-sb.de
tack at ps.uni-sb.de
Fri Nov 25 20:40:04 CET 2005
Hi!
> Hello,
>
> I have a problem with compiling gecode sources.
> I am using:
> System: OpenSuSE 10.0
> gcc --version: 4.0.2 20050901
>
> I installed the gecode:
> 1) "./compile" (no error)
> 3) "make" (no error).
>
> I copied the file "money.cc" from the directory "examples" to the same
> directory as the file "minimodel.hh" is. Then I tried to compile this file
> using:
> gcc -L./ -I./ money.cc
In fact, the make you did after ./compile should have compiled all
examples. You can then run them from the directory where you invoked make,
like this
./examples/money
If this doesn't work, please let us know!
Cheers,
Guido
More information about the gecode-users
mailing list


Consider the following Ruby code:
string1 = "Hello world"
string2 = File.read("data.txt", "r")
string3 = File.read("image.jpg", "rb")
All three string variable are of class String, yet the data stored in string3
is binary image data rather than text data.
Check it for yourself using the String#encoding
method. string1
uses the
__ENCODING__
of the source file, which is most likely Encoding::UTF_8
.
string2
uses the Encoding::default_external
encoding, which is most likely
Encoding::UTF_8
as well. But string3
uses Encoding::ASCII_8BIT
(a.k.a.
Encoding::BINARY).
At the Ruby level we not not care about this because Ruby abstracts that all away. However, when using FFI, how to pass this data to and from C libraries suddenly becomes very important.
Passing binary data
If a Ruby string contains binary data, then you cannot use the following:
attach_function :example_function, [:string], :int
The reason being that FFI converts a Ruby string into a C style (null-terminated) string. This will cause trouble if your binary data contains a null byte (and chances are that it will).
When dealing with binary data, most C code will use memory buffers. The
following example shows how a file would be read into memory for use in a
convert()
function in a C program:
char *inputName = "cat.jpg";
FILE *inputFile = 0;
unsigned char *picBuf = 0;
unsigned int picBufSize = 0;
int result = 0;
// Open the file handle for reading binary
inputFile = fopen(inputName, "rb")
// Get the filesize
fseek(inputFile, 0, SEEK_END);
picBufSize = ftell(inputFile);
// Return to the beginning of the file and set the buffer size
fseek(inputFile, 0, SEEK_SET);
picBuf = malloc(picBufSize * sizeof(unsigned char));
// Read the data and close the file
fread(picBuf, 1, picBufSize, inputFile)
fclose(inputFile);
// Now do something with the picBuf
// The signature for this function is int convert(void *picBuf, unsigned int picBufSize);
result = convert(picBuf, picBufSize)
// ...
free(picBuf);
If we want to use the convert()
function from FFI, then we will need to pass
in the binary data directly. To do this, we need to do the following:
module ExampleLib
extend FFI::Library
ffi_lib "example_lib.so"
attach_function :convert, [:pointer, :uint], :int
end
As you can see, we've attached the function convert()
with a :pointer
argument.
Now we need to pass in a pointer to the beginning of the memory and the size of the allocation. We can do this as follows:
module ExampleLib
extend FFI::Library
ffi_lib "example_lib.so"
attach_function :convert, [:pointer, :uint], :int
# Convert an image
#
# data contains the binary data to be converted.
def self.convert_image(data)
memBuf = FFI::MemoryPointer.new(:char, data.bytesize) # Allocate memory sized to the data
memBuf.put_bytes(0, data) # Insert the data
convert(memBuf, data.size) # Call the C function
end
end
data = File.read("cat.jpg", "rb")
ExampleLib.convert_image(data)
Note that, because this is binary data (possibly containing null bytes),
MemoryPointer#put_bytes
must be used instead of MemoryPointer#put_string
.


Inheritance diagram for Bp::BpInterconnect::BpPredefinedCommand:
Public Member Functions | |
| BpPredefinedCommand () | |
| virtual | ~BpPredefinedCommand () |
| virtual bool | MatchCommand (const string &command_with_arguments) |
| enum BpCommandOptionsBase::match_result | GetMatchResult () |
| virtual void | ResetAndInit (const string &command_with_arguments, int frameworkId) |
| void | PrintCmdHelp () |
| print the help for the specific predefined command | |
| virtual string | Name () |
| the name of the command for info/error messages and help (including length's variants if any) | |
| virtual BpCommandOptionsBase * | GetParser ()=0 |
| gets the parser object for predefined command (implemented in sub-classes) | |
| virtual exec_status | Execute (bp_output_cb_t *outputCb, uvm_ml_time_unit timeUnit, double timeValue)=0 |
| virtual void | TraceExecute (int frameworkId)=0 |
| virtual void | TraceResult (exec_status result)=0 |
| virtual void | SetDefaultsAll ()=0 |
| resets flag values to defaults before starting to parse new command line | |
| virtual bool | SetTheOption (int optIndex)=0 |
| virtual bool | SetOptionArgument (int optIndex, const char *argumentPtr)=0 |
| API called by parser to pass per-option result with argument. | |
| virtual bool | MissedArgumentError (int optIndex, const char *argumentPtr)=0 |
| virtual bool | QueryOptionsConsistency ()=0 |
| bool | MatchesCommandName (const string &command_with_arguments) |
Protected Attributes | |
| string | m_command |
| vector< string > | m_cmd_help |
| BpCommandOptionsBase::match_result | m_match_result |
Friends | |
| class | BpDebugClass |
Definition at line 1447 of file bp_interconnect.h.
| virtual exec_status Bp::BpInterconnect::BpPredefinedCommand::Execute | ( | bp_output_cb_t * | outputCb, | |
| uvm_ml_time_unit | timeUnit, | |||
| double | timeValue | |||
| ) | [pure virtual] |
interface of the method to either broadcast the command to all the frameworks (for internal commands) or to execute it directly (for internal commands)
| frameworkId | - the framework the command was originated from (-1 - interactively) | |
| command_with_arguments | - full command-line (without uvm_ml(_) prefix) | |
| outputCb | - additional stream to print output to | |
| timeUnit | - current simulation time units enum (TIME_UNIT_UNDEFINED if the framework does not have an ability to advance time) | |
| timeValue | - numeric value of current simulation time scaled according to timeUnit |
Implements Bp::BpInterconnect::BpCommandBase.
Implemented in Bp::BpInterconnect::BpInternalCommand, Bp::BpInterconnect::BpExternalCommand, Bp::BpInterconnect::BpCommandPrintTree, Bp::BpInterconnect::BpCommandPrintConnections, Bp::BpInterconnect::BpCommandPhase, and Bp::BpInterconnect::BpCommandTraceRegister.
| bool Bp::BpInterconnect::BpPredefinedCommand::MatchCommand | ( | const string & | command_with_arguments | ) | [virtual] |
fetching predefined command object and resolving sub-command
Reimplemented in Bp::BpInterconnect::BpCommandPhase, and Bp::BpInterconnect::BpCommandTraceRegister.
Definition at line 475 of file bp_debug.cpp.
References m_match_result, and MatchesCommandName().
| virtual bool Bp::BpInterconnect::BpPredefinedCommand::QueryOptionsConsistency | ( | ) | [pure virtual] |
parse post-processing: check for errors (i.e. mandatory flags and/or arguments that were not supplied); also checking for contradicting flags and appends missed (implied) default parameter/value
Implemented in Bp::BpInterconnect::BpInternalCommand, Bp::BpInterconnect::BpExternalCommand, Bp::BpInterconnect::BpCommandPrintTree, Bp::BpInterconnect::BpCommandPrintConnections, Bp::BpInterconnect::BpCommandPhase, and Bp::BpInterconnect::BpCommandTraceRegister.
Referenced by Bp::BpInterconnect::BpCommandOptionsBase::ParseCheckSyntax().
| virtual bool Bp::BpInterconnect::BpPredefinedCommand::SetTheOption | ( | int | optIndex | ) | [pure virtual] |
API called by parser to pass per-option result with no argument
Implemented in Bp::BpInterconnect::BpInternalCommand, Bp::BpInterconnect::BpExternalCommand, Bp::BpInterconnect::BpCommandPrintTree, Bp::BpInterconnect::BpCommandPrintConnections, Bp::BpInterconnect::BpCommandPhase, and Bp::BpInterconnect::BpCommandTraceRegister.


Impeachment Hearings: Vindman Shuts Down GOP Rep. Jim Jordan’s Attack on Him
by Justin BaragonaNational Security Council official Lt. Col. Alexander Vindman brought his receipts to Tuesday’s impeachment hearings when Rep. Jim Jordan (R-OH) attempted to question Vindman’s judgment, reading aloud a recent employment evaluation describing him as “brilliant.”
Referencing the previous testimony of NSC official Tim Morrison, Jordan noted that Morrison claimed he and others raised concerns about Vindman’s judgment and believed he may have leaked info to the press.
“Your former boss, Dr. [Fiona] Hill, had concerns about your judgment,” Jordan added. “Your colleagues had concerns about your judgment and your colleagues felt that there were times when you leaked information. Any idea why they have those impressions, Colonel Vindman?”
Vindman, meanwhile, pulled out the last performance evaluation that Hill had given him, dated this past July.
“Alex is a top 1% military officer and the best Army officer I have worked with in my 15 years of government service,” Vindman read from the document. “‘He is brilliant, unflappable, and exercises excellent judgment’—I’m sorry—‘Was exemplary during numerous visits,’ so forth and so on. I think you get the idea.”
As for Morrison’s remarks, Vindman stated that they had only recently started working together and that Morrison hadn’t been there very long and it could have been a clash of cultures.
Jordan, seemingly a bit shaken, quickly moved on to asking Vindman if he ever leaked information, something the veteran denied.
Got a tip? Send it to The Daily Beast here
Get our top stories in your inbox every day. Sign up now!
Daily Beast Membership: Beast Inside goes deeper on the stories that matter to you. Learn more.


| pyHealthVault Configuration Variables (in Django settings.py) | ||
|---|---|---|
| pyHealthVault Parameter | Value | Description |
| HV_APPID | {{HV_APPID}} | From the Health and Fitness sample application. Create your own |
| HV_SHELL_URL | {{HV_SHELL_URL}} | Development shell url. More... |
| HV_SERVICE_SERVER | {{HV_SERVICE_SERVER}} | Development service url More... |
| APP_ACTION_URL | {{APP_ACTION_URL}} | The action url that will read the 'target' variable and take appropriate action.More... |
| APP_PUBLIC_KEY | {{APP_PUBLIC_KEY}} | The Health and Fitness App public key in hex More... To get the pem/hex from pfx use openssl utility |
| APP_PRIVATE_KEY | {{APP_PRIVATE_KEY}} | The Health and Fitness App private key in hex More... To get the pem/hex from pfx use openssl utility |
| APP_THUMBPRINT | {{APP_THUMBPRINT}} | On a Windows box double click to install PFX. Thumbprint is in the Control Panel => Internet Options => Content=> Certificates => View |


Welcome to Unitimes
Greetings from Unitimes! On this special day, we are happy to announce that we are officially opening the site to the general public.
What is Unitimes?
Unitimes is a social media platform that will focus on Ethereum, blockchain and fintech-related news. The site will include four sections:
- Unitalk - interviews / AMAs
- News
- Knowledge - articles describing various technical topics
- Information about conferences, meetups and other global events
Content will be available on Unitimes in English and Chinese, and we will add more languages in the future.
What makes Unitimes different?
We want to create a fresh and informative platform that meets the needs of our readers. We will adopt a unique approach that combines together different types of content including technical articles, news and AMAs, articles written by our staff, translations of articles published elsewhere and content published by regular users like yourself.
We aim to be much more community-oriented and interactive than a traditional media site, but at the same time more focused and higher quality than a forum. Popular articles will be translated into all supported languages by our staff.
Why Unitimes?
Our team is passionate about the blockchain and fintech industry and we believe that these new technologies can bring a great benefit to the world. We hope that Unitimes will help the world better understand the latest trends in technology and what is happening in the blockchain and fintech industry. We also hope that the site will help the global blockchain and fintech community better understand what it going on in China and help those in China better understand what is happening elsewhere in the world.
We hope that you can join us on our journey!


Plotting Distributions
An Example with R and OpenCPU
Sample(s) from
Distribution
Uniform
min
max
Chi-Square
df
T
df
ncp
Normal
mean
sd
Exponential
rate
F
df1
df2


acl acl2013 acl2013-378 acl2013-378-reference knowledge-graph by maker-knowledge-mining
Source: pdf
Author: Marion Weller ; Alexander Fraser ; Sabine Schulte im Walde
Abstract: This paper demonstrates the need and impact of subcategorization information for SMT. We combine (i) features on sourceside syntactic subcategorization and (ii) an external knowledge base with quantitative, dependency-based information about target-side subcategorization frames. A manual evaluation of an English-toGerman translation task shows that the subcategorization information has a positive impact on translation quality through better prediction of case.


{% extends "layout-v2.html" %} {% block pageScripts %} {% endblock %} {% block pageTitle %} NHS Cervical screening management system {% endblock %} {% block header %} {% include '../components/header.html' %} {% endblock %} {% block content %} {{ backLink({ "href": "results", "text": "Go back to results" }) }}
The following results show the manual matches between the lab and system patient details.
Compare the patient details provided by the labs against those held on the system.
| Patient name | NHS number | Error status | Date received | Time received | |
|---|---|---|---|---|---|
| Jane Simmons |<PHONE_NUMBER> | Duplicate slide | 04-02-2020 | 8.44am | |
|
{% include '../components/rejected-test1.html' %}
|
|||||
| Kate Roisin |<PHONE_NUMBER> | Invalid test date No HPV data |
04-02-2020 | 9.21am | |
|
{% include '../components/rejected-test2.html' %}
|
|||||
| Margery Bowling |<PHONE_NUMBER> | Invalid action code | 04-02-2020 | 11.06am | |
|
{% include '../components/rejected-test3.html' %}
|


California officer adopts dog he found abandoned in stolen car
by CNNSAN DIEGO (CNN) — When Officer Andre Thomas was called to investigate a stolen car last month, he didn’t find the thief, but he did find a new friend in need of some help.
At the time, the loss of Thomas’ beloved yellow Labrador, Melakai, was still fresh. Melakai died in March after more than a decade by Thomas’ side.
The two moved together from Fresno to San Diego when Thomas was just 18 years old, and they were so close that the officer swore he’d never get another dog when the Lab passed away.
But that changed in a hurry on Oct. 7, when Thomas peered through the window of a stolen car and found a frightened yellow Lab staring back at him.
Thomas scooped up the pup and took it to San Diego Humane Society, hoping its owners would reclaim the dog. Three weeks went by and nobody came.
That’s when Thomas decided his policy on new pets had a little wiggle room — he headed back to the shelter to collect a new companion, unable to deny a dog of the same breed as his beloved Melakai.
“The two have been best friends ever since,” the City of San Diego wrote in an Instagram post sharing the story.
Thomas named the dog Victor, “a name worthy of the adversities the dog has overcome,” the city wrote.
Thomas, who has served San Diego Police Department for four years, works in the Central Division, patrolling neighborhoods including East Village, Golden Hill and the Gaslamp Quarter.
Now when he comes home, he has a furry friend to greet him again.
The-CNN-Wire™ & © 2019 Cable News Network, Inc., a Time Warner Company. All rights reserved.


One of the most important posts I’ve encountered in the last half decade was Scott Wlaschin’s Designing with types: Making illegal states unrepresentable. The big idea is to use types—in the original blog post, in F^♯^—to make it so you never have to worry about a whole class of bugs in your business logic.
In the rest of this post, I’m just going to take Wlaschin’s original idea and translate it fairly directly to TypeScript. Accordingly, it’s worth understanding that there is basically nothing original in the rest of the post. I’ve borrowed the headings directly from Wlaschin’s post, and quoted him directly in a number of cases; this is all entirely his Wlaschin!
Wlaschin starts by introducing the idea of a Contact
type, which represents something like an entry in an address book app. Initially we might model it like this:
class Contact {
name: Name;
emailContactInfo: EmailContactInfo;
postalContactInfo: PostContactInfo;
constructor(
name: Name,
emailContactInfo: EmailContactInfo,
postalContactInfo: PostalContactInfo
) {
this.name = name;
this.emailContactInfo = emailContactInfo;
this.postalContactInfo = postalContactInfo;
}
};
:::note
For scenarios like this where the constructor
does nothing but set up some properties with values passed in, TypeScript provides a constructor-only shorthand which looks like this:
class Contact {
constructor(
public name: Name,
public emailContactInfo: EmailContactInfo,
public postalContactInfo: PostalContactInfo
) {}
}
I will be using this style throughout the rest of the post, because these classes are just a lightweight way of setting up a kind of “record” to pass around some data. For the same reason, I will also mark all of these types as readonly
: the intent is “don’t change these in any given instance.”
class Contact {
constructor(
public readonly name: Name,
public readonly emailContactInfo: EmailContactInfo,
public readonly postalContactInfo: PostalContactInfo
) {}
}
:::
First, a little setup. The types Name
, EmailContactInfo
, and PostContactInfo
are simple types that wrap around a string, so you can’t accidentally mix them up and use them where the other one belongs. The simplest way to write these is something like this:
class Name {
constructor(private readonly value: string) {}
}
class EmailContactInfo {
constructor(private readonly value: string) {}
}
class PostalContactInfo {
constructor(private readonly value: string) {}
}
Once you have these, things that take a string
will not accept Name
or EmailContactInfo
or PostalContactInfo
, and things that take a Name
will not accept an EmailContactInfo
, and so on. This works specifically because we used a private
type; if it were public the types would be compatible because they have the same structure. If we didn’t do this, and just used strings, we could easily intermix these on accident. (For an alternative approach, see Appendix: “Tagged Unions” in TypeScript below. You can read Wlaschin’s writeup of how to do this in F^♯^ here.)
Wlaschin’s example goes one step further with EmailContactInfo
and makes it so that you can’t actually create an invalid email—to handle things like hello@potato
, which is not a valid email address. We can do that in TypeScript with a private constructor and some static helper methods:
class EmailContactInfo {
private constructor(private readonly value: string) {}
static create(value: string): EmailContactInfo | undefined {
return isValid(value)
? new EmailContactInfo(value)
: undefined;
}
static isValid(value: string): boolean {
return /^\S+@\S+\.\S+$/.test(value);
}
}
:::note
That’s not an especially robust validation of emails, but it’s sufficient for the rest of this example.
:::
Now we’re ready to actually dig into the meat of the example. Wlaschin suggests a fairly realistic example (I’ve seen constraints just like this pretty often):
Now let’s say that we have the following simple business rule: “A contact must have an email or a postal address”. Does our type conform to this rule?
The answer is no. The business rule implies that a contact might have an email address but no postal address, or vice versa. But as it stands, our type requires that a contact must always have both pieces of information.
The answer seems obvious – make the addresses optional…
In TypeScript, making the two fields optional would look like this (note the ?
after the two optional fields):
type Contact = {
name: Name;
emailContactInfo?: EmailContactInfo;
postalContactInfo?: PostalContactInfo;
};
But, as Wlaschin notes, this would let us have a Contact
which doesn’t have either kind of contact info. This violates the business rule, where a contact must have one or both. It’s very tempting to reach for optional types in TypeScript, both because the syntax is super convenient, especially now that optional chaining and nullish coalescing are available, and because so many things in JavaScript APIs are optional. However, we can do better!
Wlaschin points out:
If we think about the business rule carefully, we realize that there are three possibilities:
- A contact only has an email address
- A contact only has a postal address
- A contact has both a email address and a postal address>
Like F^♯^—though with very different syntax and details—TypeScript supports modeling this clearly and accurately, using union types. Wlaschin’s original writeup uses a tuple to represent the variant where the contact has both email address and postal address. TypeScript also has tuples, though they’re a bit less common in TypeScript than in F^♯^, because TypeScript has to overload the meaning of array types, whereas they are first-class types in F^♯^.
type ContactInfo =
| EmailContactInfo
| PostalContactInfo
| [EmailContactInfo, PostalContactInfo]
;
We could also use a lightweight object type here, but as we’ll see in a moment, the tuple is actually easier to work with for this specific case.
Then the original Contact
type becomes:
class Contact {
constructor(
public readonly name: Name,
public readonly contactInfo: ContactInfo
) {}
};
At this point, we have actually written a type that achieves the goal of making illegal states unrepresentable. What does it look like to use it in practice, though?
ContactInfo
We’ll start by showing how we construct a Contact
when we have a name and an email. Remembering that we have the possibility of EmailContactInfo.create
returning undefined
, here’s how we’d handle that:
class Contact {
// the existing definition
static fromEmail(
name: string,
email: string
): Contact | undefined {
let maybeEmail = EmailContactInfo.create(email);
if (maybeEmail) {
let contactName = new Name(name);
return new Contact(contactName, maybeEmail);
} else {
return undefined;
}
}
static fromPostalAddress(
name: string,
address: string
): Contact {
let contactName = new Name(name);
let postalInfo = new PostalContactInfo(address);
return new Contact(contactName, postalInfo);
}
static fromEmailAndPostal(
name: string,
email: string,
address: string
): Contact | undefined {
let maybeEmail = EmailContactInfo.create(email);
if (maybeEmail) {
let contactName = new Name(name);
let postalInfo = new PostalContactInfo(address);
return new Contact(contactName, [email, postalInfo]);
} else {
return undefined;
}
}
}
Now we have a variety of tools we can use to build Contact
s. If we already have a valid EmailContactInfo
, and/or a PostalContactInfo
, we can use the constructor directly:
let fromEmailDirectly = new Contact(name, email);
let fromPostalDirectly = new Contact(name, postal);
let fromBothDirectly = new Contact(name, [email, postal]);
We can also do it using the static helpers, which can be convenient when we haven’t already validated the data elsewhere:
let fromInvalidEmail =
Contact.fromEmail("Chris", "hello@banana");
let fromValidEmail =
Contact.fromEmail("Chris", "hello@chriskrycho.com");
let fromPostal =
Contact.fromPostal("Chris", "Colorado");
let fromBoth =
Contact.fromEmailAndPostal("Chris"<EMAIL_ADDRESS>"Colorado");
If we had similar validation for the postal address—for example, because we were making it behave like an actual address!—we would have another layer of validation in the variants that use PostalContactInfo
. (That’s exactly what Wlaschin’s design does; I’ve left it aside here to keep things moving!)
ContactInfo
Having made this change, we’re now in a position to see what it looks like to work with this data when it already exists. Again, the type system helps us out here, to make sure we continue to have valid data. As Wlaschin notes:
Now… we have no choice but to handle all three possible cases:
- If a contact previously only had an email address, it now has both an email address and a postal address, so return a contact using the EmailAndPost case.
- If a contact previously only had a postal address, return a contact using the PostOnly case, replacing the existing address.
- If a contact previously had both an email address and a postal address, return a contact with using the EmailAndPost case, replacing the existing address.
We can add a method to the Contact
type which does this correctly.
:::note
There are two ways we could make this method work: it could change the item it’s working with, or it could return a new copy of the item instead. In this example, I’m treating classes not as bundles of self-contained mutable state, but as lightweight records, so I’m going to return a fresh copy. Maybe someday JavaScript will actually get native records (and tuples)!
:::
class Contact {
// everything we’ve seen already
updatePostalAddress(newAddress: string): Contact {
let postalInfo = new PostalContactInfo(newAddress);
let newContactInfo: ContactInfo;
if (this.contactInfo instanceof EmailContactInfo) {
// email only -> email and postal
return new Contact(this.name, [this.contactInfo, postalInfo]);
} else if (this.contactInfo instanceof PostalContactInfo) {
// ignore existing address
return new Contact(this.name, postalInfo);
} else {
// ignore existing address
let [email, _] = this.contactInfo;
newContactInfo = [email, postalInfo];
}
}
}
Notice here that we don’t have to worry about validating the email again: the fact that it’s present as an EmailContactInfo
on our type means it is already valid. This is one of the benefits of using richer types to represent these kinds of things!
We can use this code like this, given an existing Contact
:
let oldAddress = "North Carolina";
let contact = Contact.fromPostal("Chris", oldAddress);
let newAddress = "Colorado";
let updatedContact = contact.updatePostalAddress("Colorado");
Here, I’ll just quote Wlaschin in full, but substituting the TypeScript example for the F^♯^ he gives:
At this point, you might be saying that we have made things unnecessarily complicated. I would answer with these points:
First, the business logic is complicated. There is no easy way to avoid it. If your code is not this complicated, you are not handling all the cases properly.
Second, if the logic is represented by types, it is automatically self documenting. You can look at the union cases below and immediate see what the business rule is. You do not have to spend any time trying to analyze any other code.
type ContactInfo = | EmailContactInfo | PostalContactInfo | [EmailContactInfo, PostalContactInfo] ;
Finally, if the logic is represented by a type, any changes to the business rules will immediately create breaking changes, which is a generally a good thing.
I’ve been using this approach for the last few years, and it’s really, really helpful! For a really helpful introduction to this way of thinking and working with types, I heartily recommend the following materials:
You may notice that all of these are in languages like F^♯^, Elm, and OCaml. That’s for good reason: for a long time, that family of languages was the only place that had the type systems to make this doable. Over the last decade, quite a few more have emerged, including Rust, Swift—and TypeScript!
In this post, I just reached for bare types and used the instanceof
operator. This works well with TypeScript’s type system, and fits fairly naturally with JavaScript, but there’s an alternative we could use that is also worth calling out: building our own “tagged unions” in TypeScript.
In F^♯^, Elm, Rust, etc., the tagged union types (which are called “unions” in F^♯^, “custom types” in Elm, and “enums” in Rust) have a built-in tag, created by the compiler. In TypeScript, there is nothing of the sort—because there is nothing of the sort in JavaScript. However, TypeScript does understand the idea of unions (as we saw above). It also has the ability to treat literals as different types, like this:
type MyName = 'Chris';
let me: MyName = 'John'; // TYPE ERROR
We could even use the literal as a type inline:
let me: 'Chris' = 'John'; // TYPE ERROR
We can turn this plus unions into a tagged union, by using a literal as the tag on a type, and then TypeScript will understand it. Earlier, we used the fact that private
fields make TypeScript treat different classes as distinct, despite the structural type system. Here, we could make them public but readonly instead (though hiding the details might be good for other reasons), and use a tag to distinguish them.
Two notes on this example:
value
to be the name of the thing wrapped, name
, email
, and address
. This will make the example below clearer.as const
syntax here says to treat the type as a literal.class Name {
readonly type = 'Name';
constructor(public readonly name: string) {}
}
class EmailContactInfo {
readonly type = 'EmailContactInfo';
private constructor(public readonly email: Email) {}
static create(value: string): EmailContactInfo | undefined {
// same implementation as before
}
static isValid(value: string): boolean {
// same implementation as before
}
}
class PostalContactInfo {
readonly type = 'PostalContactInfo';
constructor(public readonly address: string) {}
}
Here, it might also make sense to create a custom tagged type for the EmailAndPostalInfo
variant:
class EmailAndPostal {
readonly type = 'EmailAndPostal';
constructor(
public readonly data: [EmailContactInfo, PostalContactInfo]
) {}
}
Then we can define the ContactInfo
type like this:
type ContactInfo =
| EmailContactInfo
| PostalContactInfo
| EmailAndPostal
;
When using ContactInfo
, we can now use the type
tag to figure out which one we’re working with:
class Contact {
// the same as in the main example
describe(): string {
switch (this.info.type) {
case 'EmailContactInfo':
return `contact ${this.name} at ${this.info.email}`;
case 'PostalContactInfo':
return `${this.name} lives in ${this.info.address}`;
case 'EmailAndPostal':
let [email, postal] = this.info.data;
return `${this.name} lives in ${postal}; contact at ${email}`;
default:
assertNever(this.info);
}
}
}
Two things to notice:
The assertNever
type in the default
branch comes from the TypeScript handbook; because it takes never
as its argument, it makes sure that we have exhaustively covered every case represented by this.info.type
here. If we added another case to the ContactInfo
union, this would cause a type error!
We only have access to this.info.email
in the 'EmailContactInfo'
branch. Trying to access it in the case 'PostalContactInfo':
branch will produce a type error:
Property ‘email’ does not exist on type ‘PostalContactInfo’
The tradeoffs with this approach are different than they are with the instanceof
approach. We have to carry around a bit more information, and while that’s not incredibly expensive, it could add up over time in a large app. It also requires that people working on the app actually understand these and what they’re for, and people are more likely to already know instanceof
and how to use it. However, we get to use the switch
approach, which can clarify things a lot over a chain of if
/else if
/else
statements. In particular, I think it is much easier to see that we are just covering each case of the type that info
might be in this code than in the instanceof
code above!


{% extends "layout.html" %} {% block page_title %} GOV.UK prototype kit {% endblock %} {% block content %} Sign in User ID Password Sign in I forgot my password I don't have an account {% endblock %}
I don't have an account


The WinRT provides applications three buckets to store unstructured state (files), a local container which is unique to a single user on a single machine inside of a single application; a roaming container which is unique to a single user from a single application but roams across multiple machines; and a temporary container which has the same limitations as the local container, but may be automatically be purged by the system,. These APIs provide rich access to the full WinRT IO functionality, creating sub directories, multiple file formats, and full async programming at multiple layers. For applications that are storing significant data in their local or roaming container, we would definitely recommend to use the base WinRT APIs.
Select the folder you want to save to:
File Name:


{% extends "base.html" %} {% block content %} Edit Store Store Name URL Prefix What prefix does the URL start with? HTML Tag Name What HTML tag element contains the price info? HTML Query What attributes are on the element that contains the price info? Update Store {% endblock %}


by jdabs
How to do it.
Desktop OS:
Fedora Workstaion
Pros: Easy install
works
compatible with a lot of architechure
Image Editing
Gimp
Pros: Not $20/month
Smart Phone
GrapheneOS
Note: De-googling is somewhat hard. I have to use a separate beater Android phone with wifi-only as needed, which is rarer as I find workarounds. Not everything needs an app. Use the website instead.
Docs
OpenOffice


This lab will shed light on how UNIX shells use basic system calls.
Your job is to write a simple shell for xv6. It should be able to run commands with arguments, handle input and output redirection, and set up two-element pipelines. Your shell should act like the xv6 shell sh for these examples as well as similar commands:
echo hello there echo something > file.txt ls | grep READ grep lion < data.txt | wc > count echo echo hello | nsh find . b | xargs grep hello
You should put your shell source in user/nsh.c, and modify the Makefile to compile it. We'll test your user/nsh.c with our copies of other xv6 files; so while you can modify other files, your shell should not depend on those modifications. Your shell should use @ (at sign) as a prompt rather than $, to avoid confusion with the real shell. An xv6 session with your shell might look like this:
xv6 kernel is booting $ nsh @ grep Ken < README xv6 is a re-implementation of Dennis Ritchie's and Ken Thompson's Unix @
Please do not use a memory allocator such as malloc(). Instead you should use only local (stack-allocated) variables and global variables. It's OK to impose reasonable fixed limits on things like the maximum length of a command name, the maximum number of arguments, or the maximum length of any single argument.
We supply you with an xv6 test program testsh, source in user/testsh.c. You're done with the lab if your shell passes all the tests, like this:
$ testsh nsh simple echo: PASS simple grep: PASS two commands: PASS output redirection: PASS input redirection: PASS both redirections: PASS simple pipe: PASS pipe and redirects: PASS lots of commands: PASS passed all tests


Bryn Hughes
Blog
CV
Courses
Contact
Say Hello
Feel free to email me using the form below, or follow me on
twitter
.


How many hours do you spend on the browser daily on an average
Almost none or lesser than five minutes
Lesser than fifteen minutes
Lesser than half an hour
An hour or two
More than two hours
Submit


RepoXplorer
Projects
Groups
Contributors
About
Search commit's authors
Search by full name (wildcards * and ? authorized)


{% extends "beta.html" %} {% block beta %} Unfortunately, you have not received an invitation. Maybe you need to ask the right person...


{{entry.selectedEnvFrom.kind | humanizeKind | upperFirst}} {{entry.selectedEnvFrom.metadata.name}} contains keys that are not valid environment variable names. Only {{entry.selectedEnvFrom.kind | humanizeKind}} keys with valid names will be added as environment variables.


--- layout: default ---
This is a simple JavaScript plugin for a hashchange-driven tabbed content switcher. Personally I'm not a tabsphiliac, but I needed those a few times recently and decided to make a semi-universal solution.
Quick run-down of features:
#foo=bar
links-nav
& -data
structureYou will need those two files:
hashTabber.js
– with a single object inside and four helper functions; so you could as well just paste it to your script.js to avoid an unnecessary HTML request_hashTabber.scss
– 20-something lines of code that would be best to just @include in your global.scssBuild a html HashTabber section with this basic setup:
{% include examples/hashTabber-example-code-html.liquid %}
Important things for the whole thing to work are:
ol.hashTabber-nav
and ol.hashTabber-data
elements that share the data-hashtabber-id
attribute value, and will use it to generate links for tabsol.hashTabber-nav
and ol.hashTabber-data
both have immediate child nodes li
, and pairs up two of them with the same index or a special pair-name attributeol.hashTabber-nav > li
needs to have an immediate child node a
for #foo=tab
hrefs creationThen just run the damn thing:
{% include examples/hashTabber-example-code-js-run.liquid %}
If the content changes after HashTabber was triggered, you can just use the .run()
method again.
For some special situations you can define any of the options for classes and data attributes names through the hashTabber()
options
object parameter:
{% include examples/hashTabber-example-code-js-options.liquid %}
You can define some special options through the HTML data attributes:
data-hashtabber-default
– defined for ol.hashTabber-nav
changes the default tab from 0 to given value (a number or a pair-name)data-hashtabber-pair
– defined for two li
s from both ol
s gives them a special #foo=name
link instead of a standard numerical oneIt's also worth to mention, that:
ol
s could contain countless different nodes (h2
for example), as the script takes into account only li
s inside of themol
s could be placed within completely diffrent HTML nodes, as the script uses the data-hashtabber-id
attribute to pair them#foo=2&bar=1&fum=baz&qux=2&zot=3
, to switch tabs for all instances of HashTabber simultaneouslyThis is something rather varied, but with theming, I would personally go with an additional hashTabber-themename
class for both ol
s. This blank example could be a good start:
{% include examples/hashTabber-example-theme-blank.liquid %}
Below is an example with basic theming applied. Notice that you could use an outside #dinosaurs=velociraptor link to change the tab.
This is a naked (unthemed) script in work:
CC0 1.0 Universal (it's public domain)


{% if exited_with_errors %}
Hei! The invoicing exceeded the limit of 100 errors so it stopped.
{% else %}Hei! The invoicing ended successfully.
{% endif %}| Successful invoices sent: | {{ successful_orders }} |
| Failed invoices (not sent): | {{ failed_orders }} |
Here you can check the failed ones:
https://venepaikka-admin.hel.fi/recurring-invoices
Love, the developers <3