/*
Copyright 2017 Google Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import {assert} from 'workbox-core/_private/assert.mjs';
import {logger} from 'workbox-core/_private/logger.mjs';
import {Route} from './Route.mjs';
import './_version.mjs';
/**
* RegExpRoute makes it easy to create a regular expression based
* [Route]{@link workbox.routing.Route}.
*
* For same-origin requests the RegExp only needs to match part of the URL. For
* requests against third-party servers, you must define a RegExp that matches
* the start of the URL.
*
* [See the module docs for info.]{@link /web/tools/workbox/modules/workbox-routing}
*
* @memberof workbox.routing
* @extends workbox.routing.Route
*/
class RegExpRoute extends Route {
/**
* If the regulard expression contains
* [capture groups]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp#grouping-back-references},
* th ecaptured values will be passed to the
* [handler's]{@link workbox.routing.Route~handlerCallback} `params`
* argument.
*
* @param {RegExp} regExp The regular expression to match against URLs.
* @param {workbox.routing.Route~handlerCallback} handler A callback
* function that returns a Promise resulting in a Response.
* @param {string} [method='GET'] The HTTP method to match the Route
* against.
*/
constructor(regExp, handler, method) {
if (process.env.NODE_ENV !== 'production') {
assert.isInstance(regExp, RegExp, {
moduleName: 'workbox-routing',
className: 'RegExpRoute',
funcName: 'constructor',
paramName: 'pattern',
});
}
const match = ({url}) => {
const result = regExp.exec(url.href);
// Return null immediately if there's no match.
if (!result) {
return null;
}
// Require that the match start at the first character in the URL string
// if it's a cross-origin request.
// See https://github.com/GoogleChrome/workbox/issues/281 for the context
// behind this behavior.
if ((url.origin !== location.origin) && (result.index !== 0)) {
if (process.env.NODE_ENV !== 'production') {
logger.debug(
`The regular expression '${regExp}' only partially matched ` +
`against the cross-origin URL '${url}'. RegExpRoute's will only ` +
`handle cross-origin requests if they match the entire URL.`
);
}
return null;
}
// If the route matches, but there aren't any capture groups defined, then
// this will return [], which is truthy and therefore sufficient to
// indicate a match.
// If there are capture groups, then it will return their values.
return result.slice(1);
};
super(match, handler, method);
}
}
export {RegExpRoute};


Frozen star Josh Gad: I was inspired by Robin Williams
The Aladdin actor died in 2014.
The man behind Frozen character Olaf was inspired by Robin Williams to play the beloved snowman.
Josh Gad is “keenly aware” of the pressure of a sequel, and feels “100% responsibility” to please franchise fans.
The star spoke at the London premiere of Frozen 2, released six years after the original hit.
He revealed his dream was always to play a beloved Disney character, having witnessed Williams as the Genie in Aladdin.
Gad feels the burden of expectation to get his own character right a second time.
He said: “Not a day goes by where I don’t pinch myself, where I don’t think this is the craziest thing in the world.
“I remember seeing the brilliance of seeing Robbie Williams playing the Genie, and I remember saying to my mom, ‘I want to do that one day’.
“You cut to 25 plus later and I’m not only getting to do it I’m getting to repair this character that I love so much and has clearly connected with so many people of different ages.”
Gad spoke at the BFI Southbank in London, where Frozen 2 enjoyed its UK premiere.
He was joined on the red carpet by fellow cast members including Elsa actress Idina Menzel.
Gad was stunned by the success of the first film, and said he felt a duty to deliver with the sequel.
He said he felt: “100% responsibility. It was nerve-racking to come into a sequel because the level of expectation and the burden of anticipation that frankly we didn’t have for the first one is something that you’re keenly aware of.”
Frozen 2 is released in UK cinemas on November 22.


The UNSW Complex Fluids group attended ACIS2017, the eigth biennial Australasian Colloid and Interface Symposium. The meeting was held in beautiful Coffs Harbour, New South Wales from 29 January to 2 February 2017.
This international four-day conference had an excellent range of sessions and talks, with plenty of time for informal networking and discussions between the international and local colloid, surface and interface scientists.
We look forward to new collaborations and ideas resulting from this great meeting!
There are a number of individual posts dealing with different guides to working in the group.
This is a meta-page that links directly to the guides, but not their associated posts.
To see an updated list of all such posts, simply click on the tag “faq” on any post or use this url
A lot of our microstructural work is performed in concert with microrheological measurements using microscopic observations of colloidal tracer particles moving within a complex fluid.
The analysis of these movies is easy these days, thanks to people who developed a number of open and freely available routines to ease the initial steps:
Particle tracking microrheology is performed by many folks using IDL: Particle tracking using IDL
or Matlab routines: The Matlab Particle Tracking Code Repository
As your work progresses, either in an Honours thesis, Master’s, or PhD, you will likely need to present a scientific poster at some point. The hosting organization will often supply a template or guideline for the poster format, and this is especially helpful to avoid changing the settings of PowerPoint (or LaTeX) yourself to print on larger-than-usual paper.
Branded templates are available on MyUNSW.
More important than paper size, the content, organization, and style of your poster is your responsibility and should be your main concern.
Whether you pursue an Honours thesis, Master’s, or PhD, you will definitely need to make an oral presentation to your group, or a broader audience, at some point.
When you become aware of this, the first thing you need to determine is the time allotment you’ll have, including questions. Make sure you are clear on that: is it 15 minutes total or 15 minutes plus 5 minutes for questions?
There are a number of good tips in this document: Stuart Prescott’s Presentation guidelines
Doing a PhD is a singularly personal pursuit, and fields differ greatly in their standards, but a common factor is often the ease with which a student can become overwhelmed by the magnitude of the task at hand. This often makes it hard for them to take a pragmatic approach and keep some distance between their project and their identity/self-esteem.
Back at the dawn of the Internet, when I did my PhD, my supervisor gave everyone a much-circulated copy of his rules for PhD students.
Writing is a part of any honours or PhD project, and it usually models itself on published scientific works like journal articles. Everyone has a different style and approach, but one thing you will always hear from me is to START WRITING EARLY. Beginning researchers almost always assume they should wait until they are done all experiments before beginning writing, but you should start as soon as possible.
This is because writing requires organization to form a narrative.
Image processing saves a LOT of time in your research, but we can’t always rely on the default menu choices to do everything, even in fantastic software like ImageJ. One need of microfluidics researchers is the separate size analysis of spherical (circular in 2D) droplets that are very similar in size but are mostly touching.
Most image analysis approaches require you to have separate particles in your sample before they can be automatically identified during processing, so to analyze an image like the one below we need to perform some extra pre-processing steps.
At the core of much of your work in this group is the handling of data in the form of digital images. Image processing is therefore data processing. This is great for a number of reasons:
Images immediately communicate a concept and aesthetic to people Images are numerical matrices that hold a LOT of useful information Combining several images makes a movie, a natural way to convey change with time and other variables Even if you have no experience processing digital images, you likely have experience making them using your phone.


WTe ferroelectric polarization Phys. Fig. Rev. domains phase surface PFM measurements ferroelectricity {border-style bulk polar px;} #ffffff;} structure single Wang electrical materials metal switching performed Lett. crystal distortion room states crystals electric piezoresponse using -WTe electron metallic oxide temperature transition transport (see Materials behavior bias crystalline material samples shows Debye However, Mater. amplitude atomic conduction corresponding different electronic energy experimental px; switchable used {font-family DFT Nat. Science Section calculated domain font-size image images layered metal-gated temperature. Ferroelectric Research S). band double; external field film group http://orcid.org/--- layer length magnetoresistance measured metallicity metals microscopy native observation observed pocket sample sample. spontaneous state thickness (i.e., Australian BaTiO Commun. Electrical Inset Lee applied border-color border-width calculations calculations. capacitor charge data density ellipsometry equivalent fig. first-principles force hole instability inversion lattice materials. measurements, nanoscale noncentrosymmetric opposite oscillations piezoelectric section semimetallic small solid; structural study value vectors {font-style {font-weight (fig. Chem. Kim Nature Therefore, Vanderbilt Weyl XRD [], and/or application arrows axis barrier bistable bold cleaved conductive courier; dashed denote details). dipole direction direction. down, dynamics effect em; evolution fields flake functional imaging ion mechanisms method new optical point pristine probe properties pt;} question semimetal shown single-crystal space studies systems total two-dimensional van


Play chess over Twitter, SMS, iMessage, Facebook, Snap, Whatsapp, Google Chat, email, WeChat, Telegram, KaTalk, Viber, and other services that support the sharing of web links.
Created by Greg Wilson
Source code: https://github.com/gregsramblings/chessmsgs
Running on Google Cloud Run
More technical details in this blog post


Senators' Ryan to enter player assistance program
Ottawa Senators forward Bobby Ryan will take leave from the team while participating in the NHL/NHL Players’ Association assistance program, the league and union announced Wednesday.
The NHL and NHLPA also announced that they will have no further comment on the situation.
Senators coach D.J. Smith told reporters that Ryan wasn’t feeling well ahead of the team’s 4-3 victory over Detroit on Tuesday. Smith did not offer any other details about Ryan, who didn’t play in the game.
Ryan, 32, has scored one goal and set up three others in 16 games this season for the Senators (9-11-1), who visit the Montreal Canadiens (11-6-4) on Wednesday.
He has collected 250 goals and 301 assists in 825 career games with the Ducks and Senators since being selected by Anaheim with the second overall pick of the 2005 NHL Draft.
—Field Level Media


$2,787 of $55,000 | We have raised 5% of our fundraising goal!
Secure using donations
We are building a mobile money-management suite of tools to empower people to be in charge of their financial lives.
See our website for more information:
www.konviv.com
Konviv is much more than a company for our team, it’s a calling. It’s our lives’ obsession.
We each have an intimate and personal understanding of the immigrant experience and of poverty, which inform the product we are building, who we are building it for, and the why we care so much.
Scroll down to learn more about our backgrounds and why we are committed to Konviv.
Luz was born in Monterrey, Mexico, and immigrated to the U.S. with her family at the age of nine. Leaving everything behind, her parents moved to a new country in search of better opportunities for their children. Luz's immigrant experience, as well as her intimate understanding of the trying circumstances of living in poverty, led her to having an obsession with global social impact, specifically as it relates to increased access to economic mobility and opportunities for marginalized communities. Luz is an expert in international political economy, has a J.D. from UC Berkeley with a focus on international law, worked for Teach America, and was most recently Head of Strategic Partnerships at SchoolMint, an education startup in San Francisco, CA. Konviv is the culmination of all her lived experiences as well as professional work, and Luz regards Konviv to be her life's work.
Like many Americans, Deep's parents are immigrants. Arun (Dad) and Purabi (Mom) Datta were born into third world poverty in India. Both of Deep's parents educated themselves out of poverty by obtaining PhD's and moving to the United States to give their children the American dream. Deep has spent his entire life trying to understand how to use new media tools and internet technology to educate, raise awareness of, and connect people living in different parts of the world. He has worked for an Egyptian Ambassador, enjoyed a corporate career at Thomson Reuters, worked with an artificial intelligence ad startup where he was implementing multimillion-dollar advertising campaigns for the world's biggest companies, and is currently working at a humanitarian technology lab helping to build software for vulnerable communities.
**We decided not to use GoFundMe, Kickstarter, or Indiegogo because of the excessive fees associated with crowdfunded donations on each platform.
 We most definitely promise to pay it forward in powerful and impactful ways. You have our word.
“About one in five Latinos lack access to the most basic financial services, and rely instead on high-cost, fringe providers to meet their financial needs.”
Meet Rosa. Like many Latinos struggling with finances, when Rosa falls short on cash she goes to a payday loan. Payday loans, a common way of getting money when one is in a crunch, typically have an annual interest rate between 391% to 521%. With Konviv, Rosa would always know where she stands and what things she can afford and not afford. She would never have to guess if her financial decisions might again send her to get a payday loan - with Konviv, she could make better decisions.
**We decided not to use GoFundMe, Kickstarter, or Indiegogo because of the excessive fees associated with crowdfunded donations on each platform.
“46% - Nearly half of adults say they either could not cover an emergency expense costing $400.”
Sofia is a millennial living in Oakland. She works for a non-profit and loves what she does. However, because of high living costs every month she wonders if she is going to make it. Last month, Sofia’s car broke down, and repairing it cost her $700. Had Sofia had Konviv, she would have known exactly which buckets she could pull from and which ones she couldn’t to cover this expense. Because she didn’t have Konviv, when her car payment was charged, Sofia overdrafted, and was in the negative.
“57% of Americans are struggling with their finances and 43% - nearly half of Americans struggle to pay their bills on a monthly basis.”
Ana is a single-mom who struggles to pay her bills. Last month, she had extra expenses that she hadn't accounted for. And was surprised when she saw she wasn’t going to be able to cover all her expenses. Had Ana had Konviv, this would not have come as a surprise. Sure, we can’t put money in our users’ pockets, but our users will always know when they will come up short and by how much. With Konviv, Ana would have known she needed to Lyft a few extra hours, or ask her sister for a loan. With Konviv, you always know where you stand.
“40 million Americans are struggling with student debt, which is growing above $1.2 trillion.”
This is Ronnie. Ronnie is the first person in his family to go to college. Like most young Americans, Ronnnie had little family support to pay for his education, and after getting his B.A. in business, he was left with $60,000 of debt at a state university. With Konviv, Ronnie can know exactly how long it will take to pay back his loans, and what percentage of his income should go to other things.
Our Vision
Our Mission


OK I have pulled all my hair out and looked all over the place trying to figure out what I am not doing or doing wrong here.
1) I can post to the emoncms on my Raspberry Pi from a browser using any of the inputAPI help links. i.e.:
http://<IP_ADDRESS>/emoncms/input/post?node=1&csv=100,150,200
or
http://<IP_ADDRESS>/emoncms/input/post?node=1&csv=100,150,200&apikey=[my api key]
If I am not signed in with that browser.
Both of these work.
2) When I try to post to the site with my arduino I get this error message:
connecting...
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">

<title>501 Method Not Implemented</title>

Method Not Implemented

http://<IP_ADDRESS>/emoncms/input/post?node=1&csv=100,150,200&apikey=[my api key] to /index.html not supported.

<address>Apache/2.2.22 (Debian) Server at <IP_ADDRESS> Port 80</address>

disconnecting.
I have tried changing the permissions of the entire www folder to 777 with no joy.
Here is the Arduino code:
//#define NODEID 2 // replace your node ID
0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED};
// for manual configuration:
IPAddress ip(192,168,1,180);
EthernetClient client;
// use the numeric IP instead of the name for the server:
IPAddress server(192,168,1,151); // numeric IP for my Emon server
//char server[] = "api.cosm.com"; // name address for cosm API
boolean lastConnected = false; // state of the connection last time through the main loop
const unsigned long postingInterval = 10*1000; //delay between updates to cosm.com
//the resolution is 10 mV / degree farenheit
// start serial port:
Serial.begin(115200);
// start the Ethernet connection:
if (Ethernet.begin(mac) == 0) {
Serial.println("Failed to configure Ethernet using DHCP");
// DHCP failed, so use a fixed IP address:
Ethernet.begin(mac, ip);
}
}
// read the analog sensor:
//int sensorReading = analogRead(A0);
temp0 = temp0 * 100;
// send it out the serial port. This is for debugging
// purposes only:
if (client.available()) {
char c = client.read();
Serial.print(c);
}
// through the loop, then stop the client:
if (!client.connected() && lastConnected) {
Serial.println();
Serial.println("disconnecting.");
client.stop();
}
// your last connection, then connect again and send data:
if(!client.connected() && (millis() - lastConnectionTime > postingInterval)) {
sendData(temp0);
}
// store the state of the connection for next time through
// the loop:
lastConnected = client.connected();
void sendData(int thisData) {
// if there's a successful connection:
if (client.connect(server, 80)) {
Serial.println("connecting...");
// send the HTTP PUT request:
//client.print("http://<IP_ADDRESS>/emoncms/input/post?node=1&csv=75,125,175&apikey=[my api key]");
//client.print(thisData);
//client.println(" HTTP/1.0");
//client.println("http://<IP_ADDRESS>/emoncms");
//client.println("http://<IP_ADDRESS>/emoncms/input/post?json={power:200}&apikey=c830039bdc2c48534961534f401947fe");
client.println("http://<IP_ADDRESS>/emoncms/input/post?node=1&csv=100,150,200&apikey=[my api key]");
//client.println(thisData);
//client.println("&apikey=");
//client.println(APIKEY);
//client.println(" HTTP/1.1");
client.println();
}
}
// there's at least one byte:
int digits = 1;
// continually divide the value by ten,
// adding one to the digit count for each
// time you divide, until you're at 0:
int dividend = someValue /10;
while (dividend > 0) {
dividend = dividend /10;
digits++;
}
// return the number of digits:
return digits;
}
* getVoltage() - returns the voltage on the analog input defined by
* pin
*/
float getVoltage(int pin){
return (analogRead(pin) * .004882814); //converting from a 0 to 1023 digital range
// to 0 to 5 volts (each 1 reading equals ~ 5 millivolts
}
As you can see I have many lines that I have tried and commented out because they did not work.
Any insight would be appreciated. I am out of patience.
Re: Cannot post to RPi from Arduino
My son is studying programming and solved this one for me.
For anyone else with the same problem here is some help.
The url GET request must be used, and sent to the RPi phrased like so:
client.print("GET http://[YOURIPADDRESSHERE]/emoncms/input/post?csv=[yourvaluehere]");
to create a request with a variable as a value you need to phrase it like so:
client.print("GET http://[YOURIPADDRESSHERE]/emoncms/input/post?csv=");
client.print([YOURVARIABLEHERE]);
client.println("&apikey=[YOURAPIKEYHERE]");
Notice, you must use client.print for the first lines to construct the url. Only the LAST line get a client.println statement.
Thanks to anyone who read my post.
Hope this helps someone.


Event system and events
- ALLEGRO_EVENT
- ALLEGRO_EVENT_JOYSTICK_AXIS
- ALLEGRO_EVENT_JOYSTICK_BUTTON_DOWN
- ALLEGRO_EVENT_JOYSTICK_BUTTON_UP
- ALLEGRO_EVENT_JOYSTICK_CONFIGURATION
- ALLEGRO_EVENT_KEY_DOWN
- ALLEGRO_EVENT_KEY_UP
- ALLEGRO_EVENT_KEY_CHAR
- ALLEGRO_EVENT_MOUSE_AXES
- ALLEGRO_EVENT_MOUSE_BUTTON_DOWN
- ALLEGRO_EVENT_MOUSE_BUTTON_UP
- ALLEGRO_EVENT_MOUSE_WARPED
- ALLEGRO_EVENT_MOUSE_ENTER_DISPLAY
- ALLEGRO_EVENT_MOUSE_LEAVE_DISPLAY
- ALLEGRO_EVENT_TIMER
- ALLEGRO_EVENT_DISPLAY_EXPOSE
- ALLEGRO_EVENT_DISPLAY_RESIZE
- ALLEGRO_EVENT_DISPLAY_CLOSE
- ALLEGRO_EVENT_DISPLAY_LOST
- ALLEGRO_EVENT_DISPLAY_FOUND
- ALLEGRO_EVENT_DISPLAY_SWITCH_OUT
- ALLEGRO_EVENT_DISPLAY_SWITCH_IN
- ALLEGRO_EVENT_DISPLAY_ORIENTATION
- ALLEGRO_USER_EVENT
- ALLEGRO_EVENT_QUEUE
- ALLEGRO_EVENT_SOURCE
- ALLEGRO_EVENT_TYPE
- ALLEGRO_GET_EVENT_TYPE
- ALLEGRO_EVENT_TYPE_IS_USER
- al_create_event_queue
- al_destroy_event_queue
- al_register_event_source
- al_unregister_event_source
- al_is_event_queue_empty
- al_get_next_event
- al_peek_next_event
- al_drop_next_event
- al_flush_event_queue
- al_wait_for_event
- al_wait_for_event_timed
- al_wait_for_event_until
- al_init_user_event_source
- al_destroy_user_event_source
- al_emit_user_event
- al_unref_user_event
- al_get_event_source_data
- al_set_event_source_data
These functions are declared in the main Allegro header file:
#include <allegro5/allegro.h>
ALLEGRO_EVENT
typedef union ALLEGRO_EVENT ALLEGRO_EVENT;
An ALLEGRO_EVENT is a union of all builtin event structures, i.e. it is an object large enough to hold the data of any event type. All events have the following fields in common:
- type (ALLEGRO_EVENT_TYPE)
Indicates the type of event.
- any.source (ALLEGRO_EVENT_SOURCE *)
The event source which generated the event.
- any.timestamp (double)
When the event was generated.
By examining the type
field you can then access type-specific fields. The any.source
field tells you which event source generated that particular event. The any.timestamp
field tells you when the event was generated. The time is referenced to the same starting point as al_get_time.
Each event is of one of the following types, with the usable fields given.
ALLEGRO_EVENT_JOYSTICK_AXIS
A joystick axis value changed.
- joystick.id (ALLEGRO_JOYSTICK *)
The joystick which generated the event. This is not the same as the event source
joystick.source
.- joystick.stick (int)
The stick number, counting from zero. Axes on a joystick are grouped into "sticks".
- joystick.axis (int)
The axis number on the stick, counting from zero.
- joystick.pos (float)
The axis position, from -1.0 to +1.0.
ALLEGRO_EVENT_JOYSTICK_BUTTON_DOWN
A joystick button was pressed.
- joystick.id (ALLEGRO_JOYSTICK *)
The joystick which generated the event.
- joystick.button (int)
The button which was pressed, counting from zero.
ALLEGRO_EVENT_JOYSTICK_BUTTON_UP
A joystick button was released.
- joystick.id (ALLEGRO_JOYSTICK *)
The joystick which generated the event.
- joystick.button (int)
The button which was released, counting from zero.
ALLEGRO_EVENT_JOYSTICK_CONFIGURATION
A joystick was plugged in or unplugged. See al_reconfigure_joysticks for details.
ALLEGRO_EVENT_KEY_DOWN
A keyboard key was pressed.
- keyboard.keycode (int)
The code corresponding to the physical key which was pressed. See the "Key codes" section for the list of ALLEGRO_KEY_* constants.
- keyboard.display (ALLEGRO_DISPLAY *)
The display which had keyboard focus when the event occurred.
Note: this event is about the physical keys being pressed on the keyboard. Look for ALLEGRO_EVENT_KEY_CHAR events for character input.
ALLEGRO_EVENT_KEY_UP
A keyboard key was released.
- keyboard.keycode (int)
The code corresponding to the physical key which was released. See the "Key codes" section for the list of ALLEGRO_KEY_* constants.
- keyboard.display (ALLEGRO_DISPLAY *)
The display which had keyboard focus when the event occurred.
ALLEGRO_EVENT_KEY_CHAR
A character was typed on the keyboard, or a character was auto-repeated.
- keyboard.keycode (int)
The code corresponding to the physical key which was last pressed. See the "Key codes" section for the list of ALLEGRO_KEY_* constants.
- keyboard.unichar (int)
A Unicode code point (character). This may be zero or negative if the event was generated for a non-visible "character", such as an arrow or Function key. In that case you can act upon the
keycode
field.Some special keys will set the
unichar
field to their standard ASCII values: Tab=9, Return=13, Escape=27. In addition if you press the Control key together with A to Z theunichar
field will have the values 1 to 26. For example Ctrl-A will setunichar
to 1 and Ctrl-H will set it to 8.As of Allegro 5.0.2 there are some inconsistencies in the treatment of Backspace (8 or 127) and Delete (127 or 0) keys on different platforms. These can be worked around by checking the
keycode
field.- keyboard.modifiers (unsigned)
This is a bitfield of the modifier keys which were pressed when the event occurred. See "Keyboard modifier flags" for the constants.
- keyboard.repeat (bool)
Indicates if this is a repeated character.
- keyboard.display (ALLEGRO_DISPLAY *)
The display which had keyboard focus when the event occurred.
Note: in many input methods, characters are not entered one-for-one with physical key presses. Multiple key presses can combine to generate a single character, e.g. apostrophe + e may produce 'é'. Fewer key presses can also generate more characters, e.g. macro sequences expanding to common phrases.
ALLEGRO_EVENT_MOUSE_AXES
One or more mouse axis values changed.
- mouse.x (int)
x-coordinate
- mouse.y (int)
y-coordinate
- mouse.z (int)
z-coordinate. This usually means the vertical axis of a mouse wheel, where up is positive and down is negative.
- mouse.w (int)
w-coordinate. This usually means the horizontal axis of a mouse wheel.
- mouse.dx (int)
Change in the x-coordinate value since the previous ALLEGRO_EVENT_MOUSE_AXES event.
- mouse.dy (int)
Change in the y-coordinate value since the previous ALLEGRO_EVENT_MOUSE_AXES event.
- mouse.dz (int)
Change in the z-coordinate value since the previous ALLEGRO_EVENT_MOUSE_AXES event.
- mouse.dw (int)
Change in the w-coordinate value since the previous ALLEGRO_EVENT_MOUSE_AXES event.
- mouse.display (ALLEGRO_DISPLAY *)
The display which had mouse focus.
Note: Calling al_set_mouse_xy also will result in a change of axis values, but such a change is reported with ALLEGRO_EVENT_MOUSE_WARPED events instead.
Note: currently mouse.display may be NULL if an event is generated in response to al_set_mouse_axis.
ALLEGRO_EVENT_MOUSE_BUTTON_DOWN
A mouse button was pressed.
- mouse.x (int)
x-coordinate
- mouse.y (int)
y-coordinate
- mouse.z (int)
z-coordinate
- mouse.w (int)
w-coordinate
- mouse.button (unsigned)
The mouse button which was pressed, numbering from 1.
- mouse.display (ALLEGRO_DISPLAY *)
The display which had mouse focus.
ALLEGRO_EVENT_MOUSE_BUTTON_UP
A mouse button was released.
- mouse.x (int)
x-coordinate
- mouse.y (int)
y-coordinate
- mouse.z (int)
z-coordinate
- mouse.w (int)
w-coordinate
- mouse.button (unsigned)
The mouse button which was released, numbering from 1.
- mouse.display (ALLEGRO_DISPLAY *)
The display which had mouse focus.
ALLEGRO_EVENT_MOUSE_WARPED
al_set_mouse_xy was called to move the mouse. This event is identical to ALLEGRO_EVENT_MOUSE_AXES otherwise.
ALLEGRO_EVENT_MOUSE_ENTER_DISPLAY
The mouse cursor entered a window opened by the program.
- mouse.x (int)
x-coordinate
- mouse.y (int)
y-coordinate
- mouse.z (int)
z-coordinate
- mouse.w (int)
w-coordinate
- mouse.display (ALLEGRO_DISPLAY *)
The display which had mouse focus.
ALLEGRO_EVENT_MOUSE_LEAVE_DISPLAY
The mouse cursor leave the boundaries of a window opened by the program.
- mouse.x (int)
x-coordinate
- mouse.y (int)
y-coordinate
- mouse.z (int)
z-coordinate
- mouse.w (int)
w-coordinate
- mouse.display (ALLEGRO_DISPLAY *)
The display which had mouse focus.
ALLEGRO_EVENT_TIMER
A timer counter incremented.
- timer.source (ALLEGRO_TIMER *)
The timer which generated the event.
- timer.count (int64_t)
The timer count value.
ALLEGRO_EVENT_DISPLAY_EXPOSE
The display (or a portion thereof) has become visible.
- display.source (ALLEGRO_DISPLAY *)
The display which was exposed.
- display.x (int)
- display.y (int)
The top-left corner of the display which was exposed.
- display.width (int)
- display.height (int)
The width and height of the rectangle which was exposed.
Note: The display needs to be created with ALLEGRO_GENERATE_EXPOSE_EVENTS flag for these events to be generated.
ALLEGRO_EVENT_DISPLAY_RESIZE
The window has been resized.
- display.source (ALLEGRO_DISPLAY *)
The display which was resized.
- display.x (int)
- display.y (int)
The position of the top-level corner of the display.
- display.width (int)
The new width of the display.
- display.height (int)
The new height of the display.
You should normally respond to these events by calling al_acknowledge_resize. Note that further resize events may be generated by the time you process the event, so these fields may hold outdated information.
ALLEGRO_EVENT_DISPLAY_CLOSE
The close button of the window has been pressed.
- display.source (ALLEGRO_DISPLAY *)
- The display which was closed.
ALLEGRO_EVENT_DISPLAY_LOST
When using Direct3D, displays can enter a "lost" state. In that state, drawing calls are ignored, and upon entering the state, bitmap's pixel data can become undefined. Allegro does its best to preserve the correct contents of bitmaps (see ALLEGRO_NO_PRESERVE_TEXTURE) and restore them when the device is "found" (see ALLEGRO_EVENT_DISPLAY_FOUND). However, this is not 100% fool proof.
To ensure that all bitmap contents are restored accurately, one must take additional steps. The best procedure to follow if bitmap constancy is important to you is as follows: first, always have the ALLEGRO_NO_PRESERVE_TEXTURE flag set to true when creating bitmaps, as it incurs pointless overhead when using this method. Second, create a mechanism in your game for easily reloading all of your bitmaps -- for example, wrap them in a class or data structure and have a "bitmap manager" that can reload them back to the desired state. Then, when you receive an ALLEGRO_EVENT_DISPLAY_FOUND event, tell the bitmap manager (or whatever your mechanism is) to restore your bitmaps.
- display.source (ALLEGRO_DISPLAY *)
- The display which was lost.
ALLEGRO_EVENT_DISPLAY_FOUND
Generated when a lost device is restored to operating state. See ALLEGRO_EVENT_DISPLAY_LOST.
- display.source (ALLEGRO_DISPLAY *)
- The display which was found.
ALLEGRO_EVENT_DISPLAY_SWITCH_OUT
The window is no longer active, that is the user might have clicked into another window or "tabbed" away.
- display.source (ALLEGRO_DISPLAY *)
- The display which was switched out of.
ALLEGRO_EVENT_DISPLAY_SWITCH_IN
The window is the active one again.
- display.source (ALLEGRO_DISPLAY *)
- The display which was switched into.
ALLEGRO_EVENT_DISPLAY_ORIENTATION
Generated when the rotation or orientation of a display changes.
- display.source (ALLEGRO_DISPLAY *)
The display which generated the event.
- event.display.orientation
Contains one of the following values:
- ALLEGRO_DISPLAY_ORIENTATION_0_DEGREES
- ALLEGRO_DISPLAY_ORIENTATION_90_DEGREES
- ALLEGRO_DISPLAY_ORIENTATION_180_DEGREES
- ALLEGRO_DISPLAY_ORIENTATION_270_DEGREES
- ALLEGRO_DISPLAY_ORIENTATION_FACE_UP
- ALLEGRO_DISPLAY_ORIENTATION_FACE_DOWN
See also: ALLEGRO_EVENT_SOURCE, ALLEGRO_EVENT_TYPE, ALLEGRO_USER_EVENT, ALLEGRO_GET_EVENT_TYPE
ALLEGRO_USER_EVENT
typedef struct ALLEGRO_USER_EVENT ALLEGRO_USER_EVENT;
An event structure that can be emitted by user event sources. These are the public fields:
- ALLEGRO_EVENT_SOURCE *source;
- intptr_t data1;
- intptr_t data2;
- intptr_t data3;
- intptr_t data4;
Like all other event types this structure is a part of the ALLEGRO_EVENT union. To access the fields in an ALLEGRO_EVENT variable ev
, you would use:
- ev.user.source
- ev.user.data1
- ev.user.data2
- ev.user.data3
- ev.user.data4
To create a new user event you would do this:
ALLEGRO_EVENT_SOURCE my_event_source;
ALLEGRO_EVENT my_event;
float some_var;
al_init_user_event_source(&my_event_source);
my_event.user.type = ALLEGRO_GET_EVENT_TYPE('M','I','N','E');
my_event.user.data1 = 1;
my_event.user.data2 = &some_var;
al_emit_user_event(&my_event_source, &my_event, NULL);
Event type identifiers for user events are assigned by the user. Please see the documentation for ALLEGRO_GET_EVENT_TYPE for the rules you should follow when assigning identifiers.
See also: al_emit_user_event, ALLEGRO_GET_EVENT_TYPE
ALLEGRO_EVENT_QUEUE
typedef struct ALLEGRO_EVENT_QUEUE ALLEGRO_EVENT_QUEUE;
An event queue holds events that have been generated by event sources that are registered with the queue. Events are stored in the order they are generated. Access is in a strictly FIFO (first-in-first-out) order.
See also: al_create_event_queue, al_destroy_event_queue
ALLEGRO_EVENT_SOURCE
typedef struct ALLEGRO_EVENT_SOURCE ALLEGRO_EVENT_SOURCE;
An event source is any object which can generate events. For example, an ALLEGRO_DISPLAY can generate events, and you can get the ALLEGRO_EVENT_SOURCE pointer from an ALLEGRO_DISPLAY with al_get_display_event_source.
You may create your own "user" event sources that emit custom events.
See also: ALLEGRO_EVENT, al_init_user_event_source, al_emit_user_event
ALLEGRO_EVENT_TYPE
typedef unsigned int ALLEGRO_EVENT_TYPE;
An integer used to distinguish between different types of events.
See also: ALLEGRO_EVENT, ALLEGRO_GET_EVENT_TYPE, ALLEGRO_EVENT_TYPE_IS_USER
ALLEGRO_GET_EVENT_TYPE
#define ALLEGRO_GET_EVENT_TYPE(a, b, c, d) AL_ID(a, b, c, d)
Make an event type identifier, which is a 32-bit integer. Usually, but not necessarily, this will be made from four 8-bit character codes, for example:
#define MY_EVENT_TYPE ALLEGRO_GET_EVENT_TYPE('M','I','N','E')
IDs less than 1024 are reserved for Allegro or its addons. Don't use anything lower than ALLEGRO_GET_EVENT_TYPE(0, 0, 4, 0)
.
You should try to make your IDs unique so they don't clash with any 3rd party code you may be using. Be creative. Numbering from 1024 is not creative.
If you need multiple identifiers, you could define them like this:
#define BASE_EVENT ALLEGRO_GET_EVENT_TYPE('M','I','N','E')
#define BARK_EVENT (BASE_EVENT + 0)
#define MEOW_EVENT (BASE_EVENT + 1)
#define SQUAWK_EVENT (BASE_EVENT + 2)
/* Alternatively */
enum {
BARK_EVENT = ALLEGRO_GET_EVENT_TYPE('M','I','N','E'),
MEOW_EVENT,
SQUAWK_EVENT
};
See also: ALLEGRO_EVENT, ALLEGRO_USER_EVENT, ALLEGRO_EVENT_TYPE_IS_USER
ALLEGRO_EVENT_TYPE_IS_USER
#define ALLEGRO_EVENT_TYPE_IS_USER(t) ((t) >= 512)
A macro which evaluates to true if the event type is not a builtin event type, i.e. one of those described in ALLEGRO_EVENT_TYPE.
al_create_event_queue
ALLEGRO_EVENT_QUEUE *al_create_event_queue(void)
Create a new, empty event queue, returning a pointer to object if successful. Returns NULL on error.
See also: al_register_event_source, al_destroy_event_queue, ALLEGRO_EVENT_QUEUE
al_destroy_event_queue
void al_destroy_event_queue(ALLEGRO_EVENT_QUEUE *queue)
Destroy the event queue specified. All event sources currently registered with the queue will be automatically unregistered before the queue is destroyed.
See also: al_create_event_queue, ALLEGRO_EVENT_QUEUE
al_register_event_source
void al_register_event_source(ALLEGRO_EVENT_QUEUE *queue,
ALLEGRO_EVENT_SOURCE *source)
Register the event source with the event queue specified. An event source may be registered with any number of event queues simultaneously, or none. Trying to register an event source with the same event queue more than once does nothing.
See also: al_unregister_event_source, ALLEGRO_EVENT_SOURCE
al_unregister_event_source
void al_unregister_event_source(ALLEGRO_EVENT_QUEUE *queue,
ALLEGRO_EVENT_SOURCE *source)
Unregister an event source with an event queue. If the event source is not actually registered with the event queue, nothing happens.
If the queue had any events in it which originated from the event source, they will no longer be in the queue after this call.
See also: al_register_event_source
al_is_event_queue_empty
bool al_is_event_queue_empty(ALLEGRO_EVENT_QUEUE *queue)
Return true if the event queue specified is currently empty.
See also: al_get_next_event, al_peek_next_event
al_get_next_event
bool al_get_next_event(ALLEGRO_EVENT_QUEUE *queue, ALLEGRO_EVENT *ret_event)
Take the next event out of the event queue specified, and copy the contents into ret_event
, returning true. The original event will be removed from the queue. If the event queue is empty, return false and the contents of ret_event
are unspecified.
See also: ALLEGRO_EVENT, al_peek_next_event, al_wait_for_event
al_peek_next_event
bool al_peek_next_event(ALLEGRO_EVENT_QUEUE *queue, ALLEGRO_EVENT *ret_event)
Copy the contents of the next event in the event queue specified into ret_event
and return true. The original event packet will remain at the head of the queue. If the event queue is actually empty, this function returns false and the contents of ret_event
are unspecified.
See also: ALLEGRO_EVENT, al_get_next_event, al_drop_next_event
al_drop_next_event
bool al_drop_next_event(ALLEGRO_EVENT_QUEUE *queue)
Drop (remove) the next event from the queue. If the queue is empty, nothing happens. Returns true if an event was dropped.
See also: al_flush_event_queue, al_is_event_queue_empty
al_flush_event_queue
void al_flush_event_queue(ALLEGRO_EVENT_QUEUE *queue)
Drops all events, if any, from the queue.
See also: al_drop_next_event, al_is_event_queue_empty
al_wait_for_event
void al_wait_for_event(ALLEGRO_EVENT_QUEUE *queue, ALLEGRO_EVENT *ret_event)
Wait until the event queue specified is non-empty. If ret_event
is not NULL, the first event in the queue will be copied into ret_event
and removed from the queue. If ret_event
is NULL the first event is left at the head of the queue.
See also: ALLEGRO_EVENT, al_wait_for_event_timed, al_wait_for_event_until, al_get_next_event
al_wait_for_event_timed
bool al_wait_for_event_timed(ALLEGRO_EVENT_QUEUE *queue,
ALLEGRO_EVENT *ret_event, float secs)
Wait until the event queue specified is non-empty. If ret_event
is not NULL, the first event in the queue will be copied into ret_event
and removed from the queue. If ret_event
is NULL the first event is left at the head of the queue.
timeout_msecs
determines approximately how many seconds to wait. If the call times out, false is returned. Otherwise true is returned.
See also: ALLEGRO_EVENT, al_wait_for_event, al_wait_for_event_until
al_wait_for_event_until
bool al_wait_for_event_until(ALLEGRO_EVENT_QUEUE *queue,
ALLEGRO_EVENT *ret_event, ALLEGRO_TIMEOUT *timeout)
Wait until the event queue specified is non-empty. If ret_event
is not NULL, the first event in the queue will be copied into ret_event
and removed from the queue. If ret_event
is NULL the first event is left at the head of the queue.
timeout
determines how long to wait. If the call times out, false is returned. Otherwise true is returned.
See also: ALLEGRO_EVENT, ALLEGRO_TIMEOUT, al_init_timeout, al_wait_for_event, al_wait_for_event_timed
al_init_user_event_source
void al_init_user_event_source(ALLEGRO_EVENT_SOURCE *src)
Initialise an event source for emitting user events. The space for the event source must already have been allocated.
One possible way of creating custom event sources is to derive other structures with ALLEGRO_EVENT_SOURCE at the head, e.g.
typedef struct THING THING;
struct THING {
ALLEGRO_EVENT_SOURCE event_source;
int field1;
int field2;
/* etc. */
};
THING *create_thing(void)
{
THING *thing = malloc(sizeof(THING));
if (thing) {
al_init_user_event_source(&thing->event_source);
thing->field1 = 0;
thing->field2 = 0;
}
return thing;
}
The advantage here is that the THING pointer will be the same as the ALLEGRO_EVENT_SOURCE pointer. Events emitted by the event source will have the event source pointer as the source
field, from which you can get a pointer to a THING by a simple cast (after ensuring checking the event is of the correct type).
However, it is only one technique and you are not obliged to use it.
The user event source will never be destroyed automatically. You must destroy it manually with al_destroy_user_event_source.
See also: ALLEGRO_EVENT_SOURCE, al_destroy_user_event_source, al_emit_user_event, ALLEGRO_USER_EVENT
al_destroy_user_event_source
void al_destroy_user_event_source(ALLEGRO_EVENT_SOURCE *src)
Destroy an event source initialised with al_init_user_event_source.
This does not free the memory, as that was user allocated to begin with.
See also: ALLEGRO_EVENT_SOURCE
al_emit_user_event
bool al_emit_user_event(ALLEGRO_EVENT_SOURCE *src,
ALLEGRO_EVENT *event, void (*dtor)(ALLEGRO_USER_EVENT *))
Emit a user event. The event source must have been initialised with al_init_user_event_source. Returns false
if the event source isn't registered with any queues, hence the event wouldn't have been delivered into any queues.
Events are copied in and out of event queues, so after this function returns the memory pointed to by event
may be freed or reused. Some fields of the event being passed in may be modified by the function.
Reference counting will be performed if dtor
is not NULL. Whenever a copy of the event is made, the reference count increases. You need to call al_unref_user_event to decrease the reference count once you are done with a user event that you have received from al_get_next_event, al_peek_next_event, al_wait_for_event, etc.
Once the reference count drops to zero dtor
will be called with a copy of the event as an argument. It should free the resources associated with the event, but not the event itself (since it is just a copy).
If dtor
is NULL then reference counting will not be performed. It is safe, but unnecessary, to call al_unref_user_event on non-reference counted user events.
See also: ALLEGRO_USER_EVENT, al_unref_user_event
al_unref_user_event
void al_unref_user_event(ALLEGRO_USER_EVENT *event)
Decrease the reference count of a user-defined event. This must be called on any user event that you get from al_get_next_event, al_peek_next_event, al_wait_for_event, etc. which is reference counted. This function does nothing if the event is not reference counted.
See also: al_emit_user_event, ALLEGRO_USER_EVENT
al_get_event_source_data
intptr_t al_get_event_source_data(const ALLEGRO_EVENT_SOURCE *source)
Returns the abstract user data associated with the event source. If no data was previously set, returns NULL.
See also: al_set_event_source_data
al_set_event_source_data
void al_set_event_source_data(ALLEGRO_EVENT_SOURCE *source, intptr_t data)
Assign the abstract user data to the event source. Allegro does not use the data internally for anything; it is simply meant as a convenient way to associate your own data or objects with events.
See also: al_get_event_source_data


SCREAMERS A film review by Mark R. Leeper Copyright 1996 Mark R. Leeper
Capsule: After a bit of updating, SCREAMERS is a fairly accurate version of Philip K. Dick's 1953 story. Unfortunately, it takes more than that to make a science fiction film that stands out from the crowd. Dick's 50s paranoia comes across today as pretty tame stuff that other films have done better. This is just another cold SF film set in a high-tech but grungy world. Rating: low +1 (-4 to +4)
Most of Philip K. Dick's science fiction deals with paranoia about reality not being what it seems, or people who are not what they seem, or just something sinister going on behind the curtain. Films that have been based on his writing include BLADE RUNNER, about androids that look human, and TOTAL RECALL, about a reality that may be coming off a tape. Paranoia has its place in SCREAMERS also, though more in later portions of the film. The film is based on Dick's 1953 story "Second Variety."
That original story was set on Earth in a disastrous war with Russia, but to keep the story current the setting has been moved to the planet Sirius 6B where the 2078 war is with the "New Economic Block." The best American weapon is a "screamer," a small robot that attacks from just under the surface of the ground. It tunnels with lightning speed, pops out of the ground, and with the same speed rabidly attacks with whirling blades and deafening screams. The Alliance soldiers, most of whom are Americans, have special devices that prevent them from being detected by the screamers. The problem is that screamers have themselves become intelligent and are creating new varieties of screamer radically different from what came before them. And they are unaware that compatibility with the detection jammers were an important part of their original design. The new models attack anybody.
The original story has been adapted by Dan O'Bannon (a creative force behind ALIEN) and Miguel Tejada-Flores (writer of FRIGHT NIGHT, PART II). The problem with SCREAMERS is that the original story, while obvious film fodder, just does not have a lot of ideas that have not already been plundered for other films. The Dick story itself borrows much of its paranoia from stories like John Campbell's "Who Goes There?" which has already been adapted twice to film. Had SCREAMERS been made in 1980 it would have achieved classic status. But the thrills offered by "Second Variety" are too little and too late--years late. Ironically, SCREAMERS will appeal mostly to people in widely separate groups. It will seem best to those open to science fiction action films without much experience with them. And it will appeal to super die-hard Dick fans. The range that stretches between including most science fiction fans will find too little that is new or interesting about the film.
The director is Canadian Christian Duguay, who did most of his filming on the snowy landscapes of Quebec and in the grungy sets that are now so cliched for post-holocaust and futuristic stories. Coming out at the same time as the releases of CITY OF LOST CHILDREN and 12 MONKEYS only makes the sets look more impoverished than they normally would. The only really familiar actor is Peter Weller, who seems to be majoring in playing stories about paranoia and general weirdness.
SCREAMERS is a low-budget film that has a few expensive explosions, but the matte artist simply does not seem to be able to do convincing work. This adaptation of Philip K. Dick's "Second Variety" offers far too little variety from what has come before and comes in second to far too many films. Rate it a low +1 on the -4 to +4 scale.
Sources for Philip K. Dick's "Second Variety" include:
THE BEST OF PHILIP K. DICK edited by John Brunner SPECTRUM 2 edited by Kingsley Amis and Robert Conquest THE VARIABLE MAN by Philip K. Dick THE YEARS BEST SCIENCE FICTION NOVELS: 1954 edited by Bleiler and Dikty
Mark R. Leeper<EMAIL_ADDRESS>The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Effective Government Spokesman
问题描述 :
Nowaday, supermarket makes our life more convenient. We can buy a lot of things in supermarket.
Now in a city, the government has built two supermarkets. And the citizens want to know whether the sum of distance between their house and the supermarket is the smallest. Let’s describe the problem more precisely. We define L1 is the distance from this house to supermarket A, L2 is the distance from this house to supermarket B, and D = L1 + L2. If there is no other house which has smaller D than this house, then this house is on the shortest road between supermarket A and supermarket B. Now the government needs your help to answer the citizen’s question: Whether their house is built on the shortest path between supermarket A and supermarket B.
Now in a city, the government has built two supermarkets. And the citizens want to know whether the sum of distance between their house and the supermarket is the smallest. Let’s describe the problem more precisely. We define L1 is the distance from this house to supermarket A, L2 is the distance from this house to supermarket B, and D = L1 + L2. If there is no other house which has smaller D than this house, then this house is on the shortest road between supermarket A and supermarket B. Now the government needs your help to answer the citizen’s question: Whether their house is built on the shortest path between supermarket A and supermarket B.
输入:
The first line of input is a single integer T, indicating the number of test cases. Following that are exactly t cases. In each case, the first line contains two integers: N, the number of houses, and M, the number of roads. Then M lines will follow, each of which contains three integers A B C, indicating there is a road between place A and B, whose length is C. Please note that all roads are undirected. The last line contains two integers A, B (A != B) separated by a space, indicating the location of the two supermarket. The next line contains an integer Q, the number of questions that citizens had asked. Then Q lines follow, each line contain a integer p, indicate the number of the house. There is only one road between any pair of places. There must exists a path between two places.
1<= T <= 50;
5 <= N <= 100;
N � 1 <= M <= (N * (N – 1)) / 2;
1<= A, B, Q, Q<= N;
1 <= C < 1000;
输出:
The first line of input is a single integer T, indicating the number of test cases. Following that are exactly t cases. In each case, the first line contains two integers: N, the number of houses, and M, the number of roads. Then M lines will follow, each of which contains three integers A B C, indicating there is a road between place A and B, whose length is C. Please note that all roads are undirected. The last line contains two integers A, B (A != B) separated by a space, indicating the location of the two supermarket. The next line contains an integer Q, the number of questions that citizens had asked. Then Q lines follow, each line contain a integer p, indicate the number of the house. There is only one road between any pair of places. There must exists a path between two places.
1<= T <= 50;
5 <= N <= 100;
N � 1 <= M <= (N * (N – 1)) / 2;
1<= A, B, Q, Q<= N;
1 <= C < 1000;
样例输入:
2 5 5 1 2 1 2 3 1 3 5 1 1 4 1 4 5 2 1 5 5 1 2 3 4 5 5 5 1 2 1 2 3 1 3 5 1 1 4 1 4 5 3 1 5 5 1 2 3 4 5
样例输出:
Yes Yes Yes Yes Yes Yes Yes Yes No Yes
(adsbygoogle = window.adsbygoogle || []).push({});
bingo！！满分！
bingo！！满分！
bingo！！满分！
bingo！！满分！
bingo！！满分！
bingo！！满分！
bingo！！满分！
bingo！！满分！
…. 配图居然是没方向的。。
第二个方法很不错啊
约瑟夫也用说这么长……很成熟的一个问题了，分治的方法解起来o(n)就可以了，有兴趣可以看看具体数学的第一章，关于约瑟夫问题推导出了一系列的结论，很漂亮
输入样例作为一个整体输入，带回车
第二个解法好像不对
顺利测试通过了，多谢
很好。代码比书上的简练！
嗯，尽量吧。题目太多了，很多解题报告是用程序自动发布的，所以就只有代码了
能不能说一下tmp数组和solve都是干嘛的？
是穷举，但是代码有优化（v数组），并不是2^n。测试数据应该没问题，之前有超时的代码。
在第 18行的，while(scanf("%d %dn", &n, &c), n)，这句有错吧
排版
理解错了。。。。。谢谢楼主~~
很给力啊，学习了


DfE enquiries
Central newsdesk 020 7783 8300
General enquiries 0370 000 2288
Press release
European Union students applying for university places in the 2017 to 2018 academic year will still have access to student funding support.
The government has today (11 October 2016) announced that EU students applying for a place at an English university or further education institution in the 2017 to 2018 academic year will continue to be eligible for student loans and grants - and will be for the duration of their course.
The decision will mean that students applying to study from 2017 to 2018 will not only be eligible for the same funding and support as they are now, but that their eligibility will continue throughout their course, even if the UK exits the European Union during that period.
The move will help give universities and colleges certainty over future funding, while assuring prospective students applying to study at one of the UK ’s world leading universities that they will not have the terms of their funding changed if the UK leaves the EU during their studies. The same assurance will be available for EU students studying in further education.
Today’s announcement follows assurances given by the government in June shortly after the EU referendum result. This included immediate guarantees that students currently in higher or further education, and those applying for a place this year (2016 to 2017) would continue to be able to access student funding support - including loans and grants - under the current eligibility criteria.
Universities Minister Jo Johnson said:
We know that the result of the referendum brought with it some uncertainties for our higher education sector. That is why in June we acted quickly to provide immediate funding guarantees for existing students and those applying to study this year.
International students make an important contribution to our world-class universities, and we want that to continue. This latest assurance that students applying to study next year will not only be eligible to apply for student funding under current terms, but will have their eligibility maintained throughout the duration of their course, will provide important stability for both universities and students.
We are also taking steps, through our Higher Education Bill , to maintain the world status of our universities while delivering students value for money and choice and employers the skills they need to help our economy grow.
Under current student finance rules, EU students are eligible to receive undergraduate tuition fee loans and Master’s loans if they have resided in the European Economic Area for at least 3 years prior to study. EU nationals who have resided in the UK for over 5 years are also able to apply for undergraduate maintenance support. Similarly, under EU law, EU students are also eligible for home fee status, which means they are charged the same tuition fees as UK students. Other non- EU , international students do not have their tuition fees capped in this way.
Today’s confirmation will mean that for EU nationals, or their family members, who are applying for a place at university from August 2017 to study a course that attracts student support, the current funding rules will remain unchanged. All applicants will be eligible for student loans and/or grants under the current terms and, if deemed eligible, will be able to receive those for the duration of their course.
The migration status of EU nationals in the UK is being discussed as part of wider discussions with the EU as the government works on reaching an agreement protecting the status of EU nationals here and our citizens in Europe.
EU students currently in higher or further education, who are eligible under current rules to receive loans and grants from the Student Loans Company will continue to do so for the courses they are currently enrolled on or about to start this coming year. This includes loans to cover tuition fees (for those resident in the EEA for at least 3 years), loans and maintenance support (for those resident in the UK for at least 3 years or who are EEA migrant workers), and some other grants and allowances.
The rules applying to EU nationals, or their family members, who are applying to study a course which starts in the 2017 to 2018 academic year and which attracts student support, are also unchanged. Student Finance England ( SFE ) will assess these applications against existing eligibility criteria, and will provide loans and/or grants in the normal way.
EU nationals, or their family members, who are assessed as eligible to receive grants and/or loans by the SFE will then be eligible for this support and for home fee status for the duration of their study. These eligibility criteria set out that for students beginning study from August 2017, EU nationals must have been resident in the UK for at least 5 years or be EEA migrant workers in order to apply for a maintenance loan.
As outlined by the chancellor in August the government has guaranteed that where UK organisations bid directly to the European Commission on a competitive basis for EU funding projects, while we are still a member of the EU - for example universities participating in Horizon 2020 - the Treasury will underwrite the payments of such awards, even when specific projects continue beyond the UK ’s departure from the EU .
Central newsdesk 020 7783 8300
General enquiries 0370 000 2288
Published: 11 October 2016
From: Department for Education Jo Johnson MP
Part of: Access to higher education


In my last post, I found that the sector has a significant impact on the salary of engineers. Is the significance of the sector unique to engineers or are there similar correlations in other occupational groups?
Statistics Sweden use NUTS (Nomenclature des Unités Territoriales Statistiques), which is the EU’s hierarchical regional division, to specify the regions.
The F-value from the Anova table is used as the single value to discriminate how much the region and salary correlates. For exploratory analysis, the Anova value seems good enough.
First, define libraries and functions.
library (tidyverse)
## -- Attaching packages ------------------------------------- tidyverse 1.3.0 --
## v ggplot2 3.2.1 v purrr 0.3.3
## v tibble 2.1.3 v dplyr 0.8.3
## v tidyr 1.0.2 v stringr 1.4.0
## v readr 1.3.1 v forcats 0.4.0
## -- Conflicts ---------------------------------------- tidyverse_conflicts() --
## x dplyr::filter() masks stats::filter()
## x dplyr::lag() masks stats::lag()
library (broom)
library (car)
## Loading required package: carData
##
## Attaching package: 'car'
## The following object is masked from 'package:dplyr':
##
## recode
## The following object is masked from 'package:purrr':
##
## some
library (swemaps) # devtools::install_github('reinholdsson/swemaps')
library(sjPlot)
## Registered S3 methods overwritten by 'lme4':
## method from
## cooks.distance.influence.merMod car
## influence.merMod car
## dfbeta.influence.merMod car
## dfbetas.influence.merMod car
## #refugeeswelcome
readfile <- function (file1){
read_csv (file1, col_types = cols(), locale = readr::locale (encoding = "latin1"), na = c("..", "NA")) %>%
gather (starts_with("19"), starts_with("20"), key = "year", value = salary) %>%
drop_na() %>%
mutate (year_n = parse_number (year))
}
nuts <-read_csv ("nuts.csv", col_types = cols(), locale = readr::locale (encoding = "latin1"), na = c("..", "NA")) %>%
mutate(NUTS2_sh = substr(NUTS2, 1, 4))
## Warning: Missing column names filled in: 'X1' [1]
nuts %>%
distinct (NUTS2_en) %>%
knitr::kable(
booktabs = TRUE,
caption = 'Nomenclature des Unités Territoriales Statistiques (NUTS)')
| NUTS2_en |
|---|
| SE11 Stockholm |
| SE12 East-Central Sweden |
| SE21 Småland and islands |
| SE22 South Sweden |
| SE23 West Sweden |
| SE31 North-Central Sweden |
| SE32 Central Norrland |
| SE33 Upper Norrland |
map_ln_n <- map_ln %>%
mutate(lnkod_n = as.numeric(lnkod))
The data table is downloaded from Statistics Sweden. It is saved as a comma-delimited file without heading, 000000CG.csv, http://www.statistikdatabasen.scb.se/pxweb/en/ssd/.
I have renamed the file to 000000CG_sector.csv because the filename 000000CG.csv was used in a previous post.
The table: Average basic salary, monthly salary and women´s salary as a percentage of men´s salary by region, sector, occupational group (SSYK 2012) and sex. Year 2014 - 2018 Monthly salary 1-3 public sector 4-5 private sector
Only 17 occupational groups have employees in both the public and the private sector in all regions and both genders.
In the plot and tables, you can also find information on how the increase in salaries per year for each occupational group is affected when the interactions are taken into account.
tb <- readfile ("000000CG_sector.csv") %>%
left_join(nuts %>% distinct (NUTS2_en, NUTS2_sh), by = c("region" = "NUTS2_en"))
tb_map <- readfile ("000000CG_sector.csv") %>%
left_join(nuts, by = c("region" = "NUTS2_en")) %>%
right_join(map_ln_n, by = c("Länskod" = "lnkod_n"))
summary_table = vector()
anova_table = vector()
for (i in unique(tb$`occuptional (SSYK 2012)`)){
temp <- filter(tb, `occuptional (SSYK 2012)` == i)
if (dim(temp)[1] > 150){
model <- lm(log(salary) ~ region + sex + year_n + sector, data = temp)
summary_table <- rbind (summary_table, mutate (tidy (summary (model)), ssyk = i, interaction = "none"))
anova_table <- rbind (anova_table, mutate (tidy (Anova (model, type = 2)), ssyk = i, interaction = "none"))
model <- lm(log(salary) ~ region + sex + year_n * sector, data = temp)
summary_table <- rbind (summary_table, mutate (tidy (summary (model)), ssyk = i, interaction = "sector and year"))
anova_table <- rbind (anova_table, mutate (tidy (Anova (model, type = 2)), ssyk = i, interaction = "sector and year"))
model <- lm(log(salary) ~ region + year_n + sex * sector, data = temp)
summary_table <- rbind (summary_table, mutate (tidy (summary (model)), ssyk = i, interaction = "sex and sector"))
anova_table <- rbind (anova_table, mutate (tidy (Anova (model, type = 2)), ssyk = i, interaction = "sex and sector"))
model <- lm(log(salary) ~ region * sector + year_n + sex, data = temp)
summary_table <- rbind (summary_table, mutate (tidy (summary (model)), ssyk = i, interaction = "region and sector"))
anova_table <- rbind (anova_table, mutate (tidy (Anova (model, type = 2)), ssyk = i, interaction = "region and sector"))
model <- lm(log(salary) ~ region * sector * year_n * sex, data = temp)
summary_table <- rbind (summary_table, mutate (tidy (summary (model)), ssyk = i, interaction = "region, sector, year and sex"))
anova_table <- rbind (anova_table, mutate (tidy (Anova (model, type = 2)), ssyk = i, interaction = "region, sector, year and sex"))
}
}
## Note: model has aliased coefficients
## sums of squares computed by model comparison
anova_table <- anova_table %>% rowwise() %>% mutate(contcol = str_count(term, ":"))
summary_table <- summary_table %>% rowwise() %>% mutate(contcol = str_count(term, ":"))
merge(summary_table, anova_table, by = c("ssyk", "interaction"), all = TRUE) %>%
filter (term.x == "year_n") %>%
filter (term.y == "sector") %>%
filter (interaction == "none") %>%
mutate (estimate = (exp(estimate) - 1) * 100) %>%
ggplot () +
geom_point (mapping = aes(x = estimate, y = statistic.y, colour = interaction)) +
labs(
x = "Increase in salaries (% / year)",
y = "F-value for sector"
)
merge(summary_table, anova_table, by = c("ssyk", "interaction"), all = TRUE) %>%
filter (term.x == "year_n") %>%
filter (contcol.y > 0) %>%
# only look at the interactions between all four variables in the case with interaction region, sector, year and sex
filter (!(contcol.y < 3 & interaction == "region, sector, year and sex")) %>%
mutate (estimate = (exp(estimate) - 1) * 100) %>%
ggplot () +
geom_point (mapping = aes(x = estimate, y = statistic.y, colour = interaction)) +
labs(
x = "Increase in salaries (% / year)",
y = "F-value for interaction"
)
The tables with all occupational groups sorted by F-value in descending order.
merge(summary_table, anova_table, c("ssyk", "interaction"), all = TRUE) %>%
filter (term.x == "year_n") %>%
filter (term.y == "sector") %>%
filter (interaction == "none") %>%
mutate (estimate = (exp(estimate) - 1) * 100) %>%
select (ssyk, estimate, statistic.y, interaction) %>%
rename (`F-value` = statistic.y) %>%
rename (`Increase in salary` = estimate) %>%
arrange (desc (`F-value`)) %>%
knitr::kable(
booktabs = TRUE,
caption = 'Correlation for F-value (sector) and the yearly increase in salaries')
| ssyk | Increase in salary | F-value | interaction |
|---|---|---|---|
| 962 Newspaper distributors, janitors and other service workers | 2.109153 |<PHONE_NUMBER> | none |
| 331 Financial and accounting associate professionals | 1.994107 |<PHONE_NUMBER> | none |
| 411 Office assistants and other secretaries | 2.237594 |<PHONE_NUMBER> | none |
| 251 ICT architects, systems analysts and test managers | 2.316554 |<PHONE_NUMBER> | none |
| 241 Accountants, financial analysts and fund managers | 2.142349 |<PHONE_NUMBER> | none |
| 321 Medical and pharmaceutical technicians | 2.609024 |<PHONE_NUMBER> | none |
| 242 Organisation analysts, policy administrators and human resource specialists | 2.064925 |<PHONE_NUMBER> | none |
| 351 ICT operations and user support technicians | 2.310435 |<PHONE_NUMBER> | none |
| 214 Engineering professionals | 2.575584 | 87.3548855 | none |
| 541 Other surveillance and security workers | 2.391839 | 67.5617978 | none |
| 432 Stores and transport clerks | 1.541572 | 62.6562426 | none |
| 534 Attendants, personal assistants and related workers | 1.850523 | 40.6132964 | none |
| 911 Cleaners and helpers | 2.087753 | 28.9529104 | none |
| 311 Physical and engineering science technicians | 2.743468 | 23.7179785 | none |
| 422 Client information clerks | 2.549989 | 9.7604793 | none |
| 941 Fast-food workers, food preparation assistants | 2.144353 | 4.3115207 | none |
| 332 Insurance advisers, sales and purchasing agents | 2.228746 | 0.9809486 | none |
merge(summary_table, anova_table, c("ssyk", "interaction"), all = TRUE) %>%
filter (term.x == "year_n") %>%
filter (contcol.y > 0) %>%
filter (interaction == "sector and year") %>%
mutate (estimate = (exp(estimate) - 1) * 100) %>%
select (ssyk, estimate, statistic.y, interaction) %>%
rename (`F-value` = statistic.y) %>%
rename (`Increase in salary` = estimate) %>%
arrange (desc (`F-value`)) %>%
knitr::kable(
booktabs = TRUE,
caption = 'Correlation for F-value (sector and year) and the yearly increase in salaries')
| ssyk | Increase in salary | F-value | interaction |
|---|---|---|---|
| 422 Client information clerks | 3.433516 | 33.8973413 | sector and year |
| 534 Attendants, personal assistants and related workers | 2.307155 | 29.5467642 | sector and year |
| 351 ICT operations and user support technicians | 3.105104 | 15.0659029 | sector and year |
| 214 Engineering professionals | 3.207414 | 13.0526621 | sector and year |
| 962 Newspaper distributors, janitors and other service workers | 2.516074 | 9.1796329 | sector and year |
| 311 Physical and engineering science technicians | 3.006941 | 2.5233548 | sector and year |
| 332 Insurance advisers, sales and purchasing agents | 2.574538 | 2.3362535 | sector and year |
| 321 Medical and pharmaceutical technicians | 2.274618 | 2.1961501 | sector and year |
| 411 Office assistants and other secretaries | 2.451836 | 1.8814544 | sector and year |
| 241 Accountants, financial analysts and fund managers | 2.373536 | 0.7836435 | sector and year |
| 432 Stores and transport clerks | 1.346673 | 0.7147906 | sector and year |
| 251 ICT architects, systems analysts and test managers | 2.419651 | 0.4459847 | sector and year |
| 541 Other surveillance and security workers | 2.331794 | 0.1848832 | sector and year |
| 242 Organisation analysts, policy administrators and human resource specialists | 2.194200 | 0.1846190 | sector and year |
| 911 Cleaners and helpers | 2.022334 | 0.1743591 | sector and year |
| 941 Fast-food workers, food preparation assistants | 2.161504 | 0.0068543 | sector and year |
| 331 Financial and accounting associate professionals | 1.969149 | 0.0050259 | sector and year |
merge(summary_table, anova_table, c("ssyk", "interaction"), all = TRUE) %>%
filter (term.x == "year_n") %>%
filter (contcol.y > 0) %>%
filter (interaction == "sex and sector") %>%
mutate (estimate = (exp(estimate) - 1) * 100) %>%
select (ssyk, estimate, statistic.y, interaction) %>%
rename (`F-value` = statistic.y) %>%
rename (`Increase in salary` = estimate) %>%
arrange (desc (`F-value`)) %>%
knitr::kable(
booktabs = TRUE,
caption = 'Correlation for F-value (sex and sector) and the yearly increase in salaries')
| ssyk | Increase in salary | F-value | interaction |
|---|---|---|---|
| 241 Accountants, financial analysts and fund managers | 2.133410 | 79.736907 | sex and sector |
| 332 Insurance advisers, sales and purchasing agents | 2.228746 | 75.904108 | sex and sector |
| 911 Cleaners and helpers | 2.087753 | 68.455216 | sex and sector |
| 331 Financial and accounting associate professionals | 1.994107 | 67.051008 | sex and sector |
| 351 ICT operations and user support technicians | 2.279052 | 38.608554 | sex and sector |
| 321 Medical and pharmaceutical technicians | 2.592312 | 30.583657 | sex and sector |
| 941 Fast-food workers, food preparation assistants | 2.144353 | 22.396698 | sex and sector |
| 541 Other surveillance and security workers | 2.383471 | 16.198924 | sex and sector |
| 242 Organisation analysts, policy administrators and human resource specialists | 2.083508 | 15.156166 | sex and sector |
| 432 Stores and transport clerks | 1.541572 | 13.144544 | sex and sector |
| 534 Attendants, personal assistants and related workers | 1.850523 | 11.478531 | sex and sector |
| 251 ICT architects, systems analysts and test managers | 2.316554 | 9.349359 | sex and sector |
| 411 Office assistants and other secretaries | 2.234948 | 3.109736 | sex and sector |
| 962 Newspaper distributors, janitors and other service workers | 2.109153 | 2.668667 | sex and sector |
| 311 Physical and engineering science technicians | 2.743468 | 2.370694 | sex and sector |
| 214 Engineering professionals | 2.575584 | 1.834672 | sex and sector |
| 422 Client information clerks | 2.549989 | 1.337874 | sex and sector |
merge(summary_table, anova_table, c("ssyk", "interaction"), all = TRUE) %>%
filter (term.x == "year_n") %>%
filter (contcol.y > 0) %>%
filter (interaction == "region and sector") %>%
mutate (estimate = (exp(estimate) - 1) * 100) %>%
select (ssyk, estimate, statistic.y, interaction) %>%
rename (`F-value` = statistic.y) %>%
rename (`Increase in salary` = estimate) %>%
arrange (desc (`F-value`)) %>%
knitr::kable(
booktabs = TRUE,
caption = 'Correlation for F-value (region and sector) and the yearly increase in salaries')
| ssyk | Increase in salary | F-value | interaction |
|---|---|---|---|
| 432 Stores and transport clerks | 1.541572 | 16.7817739 | region and sector |
| 251 ICT architects, systems analysts and test managers | 2.316554 | 15.6603633 | region and sector |
| 242 Organisation analysts, policy administrators and human resource specialists | 1.987167 | 14.5447961 | region and sector |
| 214 Engineering professionals | 2.575584 | 10.9929801 | region and sector |
| 321 Medical and pharmaceutical technicians | 2.635986 | 9.9897434 | region and sector |
| 331 Financial and accounting associate professionals | 1.994107 | 9.9608534 | region and sector |
| 332 Insurance advisers, sales and purchasing agents | 2.228746 | 8.3539434 | region and sector |
| 411 Office assistants and other secretaries | 2.238072 | 5.7558819 | region and sector |
| 241 Accountants, financial analysts and fund managers | 2.143390 | 5.6578803 | region and sector |
| 541 Other surveillance and security workers | 2.376311 | 4.6423707 | region and sector |
| 351 ICT operations and user support technicians | 2.307531 | 3.8460603 | region and sector |
| 311 Physical and engineering science technicians | 2.737061 | 3.5329715 | region and sector |
| 534 Attendants, personal assistants and related workers | 1.850523 | 3.0881293 | region and sector |
| 422 Client information clerks | 2.549989 | 2.2991877 | region and sector |
| 911 Cleaners and helpers | 2.087753 | 1.4424330 | region and sector |
| 962 Newspaper distributors, janitors and other service workers | 2.109153 | 1.3179558 | region and sector |
| 941 Fast-food workers, food preparation assistants | 2.155241 | 0.8264589 | region and sector |
merge(summary_table, anova_table, c("ssyk", "interaction"), all = TRUE) %>%
filter (term.x == "year_n") %>%
filter (contcol.y > 1) %>%
filter (interaction == "region and sector") %>%
mutate (estimate = (exp(estimate) - 1) * 100) %>%
select (ssyk, estimate, statistic.y, interaction) %>%
rename (`F-value` = statistic.y) %>%
rename (`Increase in salary` = estimate) %>%
arrange (desc (`F-value`)) %>%
knitr::kable(
booktabs = TRUE,
caption = 'Correlation for F-value (region, year and sex) and the yearly increase in salaries')
| ssyk | Increase in salary | F-value | interaction |
|---|
merge(summary_table, anova_table, c("ssyk", "interaction"), all = TRUE) %>%
filter (term.x == "year_n") %>%
filter (contcol.y > 1) %>%
filter (interaction == "region, sector, year and sex") %>%
filter (!(contcol.y < 3 & interaction == "region, sector, year and sex")) %>%
mutate (estimate = (exp(estimate) - 1) * 100) %>%
select (ssyk, estimate, statistic.y, interaction) %>%
rename (`F-value` = statistic.y) %>%
rename (`Increase in salary` = estimate) %>%
arrange (desc (`F-value`)) %>%
knitr::kable(
booktabs = TRUE,
caption = 'Correlation for F-value (region, year and sex) and the yearly increase in salaries')
| ssyk | Increase in salary | F-value | interaction |
|---|---|---|---|
| 351 ICT operations and user support technicians | 5.218326 | 2.7426159 | region, sector, year and sex |
| 411 Office assistants and other secretaries | 2.276319 | 2.6593769 | region, sector, year and sex |
| 331 Financial and accounting associate professionals | 1.629354 | 2.4639758 | region, sector, year and sex |
| 941 Fast-food workers, food preparation assistants | 2.364653 | 2.2289954 | region, sector, year and sex |
| 251 ICT architects, systems analysts and test managers | 2.629773 | 2.2261226 | region, sector, year and sex |
| 332 Insurance advisers, sales and purchasing agents | 2.036891 | 2.0868544 | region, sector, year and sex |
| 242 Organisation analysts, policy administrators and human resource specialists | 1.867532 | 1.8789097 | region, sector, year and sex |
| 541 Other surveillance and security workers | 2.147019 | 1.7672297 | region, sector, year and sex |
| 911 Cleaners and helpers | 2.270852 | 1.6781257 | region, sector, year and sex |
| 321 Medical and pharmaceutical technicians | 2.594389 | 0.9665480 | region, sector, year and sex |
| 241 Accountants, financial analysts and fund managers | 2.028698 | 0.7221792 | region, sector, year and sex |
| 432 Stores and transport clerks | 1.067457 | 0.6784005 | region, sector, year and sex |
| 962 Newspaper distributors, janitors and other service workers | 2.885436 | 0.5793881 | region, sector, year and sex |
| 214 Engineering professionals | 3.169526 | 0.4994580 | region, sector, year and sex |
| 311 Physical and engineering science technicians | 2.071111 | 0.4768272 | region, sector, year and sex |
| 534 Attendants, personal assistants and related workers | 2.349001 | 0.3542025 | region, sector, year and sex |
| 422 Client information clerks | 2.489542 | 0.2528065 | region, sector, year and sex |
Let’s check what we have found.
temp <- tb %>%
filter(`occuptional (SSYK 2012)` == "962 Newspaper distributors, janitors and other service workers")
model <-lm (log(salary) ~ year_n + sex + NUTS2_sh + sector, data = temp)
plot_model(model, type = "pred", terms = c("sector"))
## Model has log-transformed response. Back-transforming predictions to original response scale. Standard errors are still on the log-scale.
tb_map %>%
filter(`occuptional (SSYK 2012)` == "962 Newspaper distributors, janitors and other service workers") %>%
ggplot() +
geom_polygon(mapping = aes(x = ggplot_long, y = ggplot_lat, group = lnkod, fill = salary)) +
facet_grid(. ~ sector) +
coord_equal()
temp <- tb %>%
filter(`occuptional (SSYK 2012)` == "332 Insurance advisers, sales and purchasing agents")
model <-lm (log(salary) ~ year_n + sex + NUTS2_sh + sector, data = temp)
plot_model(model, type = "pred", terms = c("sector"))
## Model has log-transformed response. Back-transforming predictions to original response scale. Standard errors are still on the log-scale.
temp <- tb %>%
filter(`occuptional (SSYK 2012)` == "241 Accountants, financial analysts and fund managers")
model <-lm (log(salary) ~ year_n + sex * sector + NUTS2_sh, data = temp)
plot_model(model, type = "pred", terms = c("sector", "sex"))
## Model has log-transformed response. Back-transforming predictions to original response scale. Standard errors are still on the log-scale.
tb_map %>%
filter(`occuptional (SSYK 2012)` == "241 Accountants, financial analysts and fund managers") %>%
filter (sector == "1-3 public sector") %>%
ggplot() +
geom_polygon(mapping = aes(x = ggplot_long, y = ggplot_lat, group = lnkod, fill = salary)) +
facet_grid(. ~ sex) +
coord_equal()
tb_map %>%
filter(`occuptional (SSYK 2012)` == "241 Accountants, financial analysts and fund managers") %>%
filter (sector == "4-5 private sector") %>%
ggplot() +
geom_polygon(mapping = aes(x = ggplot_long, y = ggplot_lat, group = lnkod, fill = salary)) +
facet_grid(. ~ sex) +
coord_equal()
temp <- tb %>%
filter(`occuptional (SSYK 2012)` == "422 Client information clerks")
model <-lm (log(salary) ~ year_n + sex * sector + NUTS2_sh, data = temp)
plot_model(model, type = "pred", terms = c("sector", "sex"))
## Model has log-transformed response. Back-transforming predictions to original response scale. Standard errors are still on the log-scale.
temp <- tb %>%
filter(`occuptional (SSYK 2012)` == "422 Client information clerks")
model <-lm (log(salary) ~ year_n * sector + NUTS2_sh + sex , data = temp)
plot_model(model, type = "pred", terms = c("year_n", "sector"))
## Model has log-transformed response. Back-transforming predictions to original response scale. Standard errors are still on the log-scale.
tb_map %>%
filter(`occuptional (SSYK 2012)` == "422 Client information clerks") %>%
filter (sector == "1-3 public sector") %>%
ggplot() +
geom_polygon(mapping = aes(x = ggplot_long, y = ggplot_lat, group = lnkod, fill = salary)) +
facet_grid(. ~ year) +
coord_equal()
tb_map %>%
filter(`occuptional (SSYK 2012)` == "422 Client information clerks") %>%
filter (sector == "4-5 private sector") %>%
ggplot() +
geom_polygon(mapping = aes(x = ggplot_long, y = ggplot_lat, group = lnkod, fill = salary)) +
facet_grid(. ~ year) +
coord_equal()
temp <- tb %>%
filter(`occuptional (SSYK 2012)` == "331 Financial and accounting associate professionals")
model <-lm (log(salary) ~ year_n * sector + NUTS2_sh + sex , data = temp)
plot_model(model, type = "pred", terms = c("year_n", "sector"))
## Model has log-transformed response. Back-transforming predictions to original response scale. Standard errors are still on the log-scale.
temp <- tb %>%
filter(`occuptional (SSYK 2012)` == "432 Stores and transport clerks")
model <-lm (log(salary) ~ year_n + sector * NUTS2_sh + sex , data = temp)
plot_model(model, type = "pred", terms = c("NUTS2_sh", "sector"))
## Model has log-transformed response. Back-transforming predictions to original response scale. Standard errors are still on the log-scale.
tb_map %>%
filter(`occuptional (SSYK 2012)` == "432 Stores and transport clerks") %>%
ggplot() +
geom_polygon(mapping = aes(x = ggplot_long, y = ggplot_lat, group = lnkod, fill = salary)) +
facet_grid(. ~ sector) +
coord_equal()
temp <- tb %>%
filter(`occuptional (SSYK 2012)` == "941 Fast-food workers, food preparation assistants")
model <-lm (log(salary) ~ year_n + sector * NUTS2_sh + sex , data = temp)
plot_model(model, type = "pred", terms = c("NUTS2_sh", "sector"))
## Model has log-transformed response. Back-transforming predictions to original response scale. Standard errors are still on the log-scale.
temp <- tb %>%
filter(`occuptional (SSYK 2012)` == "351 ICT operations and user support technicians")
model <-lm (log(salary) ~ year_n * NUTS2_sh * sex * sector, data = temp)
plot_model(model, type = "pred", terms = c("NUTS2_sh", "year_n", "sector", "sex"))
## Model has log-transformed response. Back-transforming predictions to original response scale. Standard errors are still on the log-scale.
## Warning: Package `see` needed to plot multiple panels in one integrated figure.
## Please install it by typing `install.packages("see", dependencies = TRUE)` into
## the console.
## [[1]]
##
## [[2]]
tb_map %>%
filter(`occuptional (SSYK 2012)` == "351 ICT operations and user support technicians") %>%
filter (sector == "1-3 public sector") %>%
ggplot() +
geom_polygon(mapping = aes(x = ggplot_long, y = ggplot_lat, group = lnkod, fill = salary)) +
facet_grid(. ~ year) +
coord_equal()
tb_map %>%
filter(`occuptional (SSYK 2012)` == "351 ICT operations and user support technicians") %>%
filter (sector == "4-5 private sector") %>%
ggplot() +
geom_polygon(mapping = aes(x = ggplot_long, y = ggplot_lat, group = lnkod, fill = salary)) +
facet_grid(. ~ year) +
coord_equal()
temp <- tb %>%
filter(`occuptional (SSYK 2012)` == "422 Client information clerks")
model <-lm (log(salary) ~ year_n * NUTS2_sh * sex * sector, data = temp)
plot_model(model, type = "pred", terms = c("NUTS2_sh", "year_n", "sector", "sex"))
## Model has log-transformed response. Back-transforming predictions to original response scale. Standard errors are still on the log-scale.
## Warning: Package `see` needed to plot multiple panels in one integrated figure.
## Please install it by typing `install.packages("see", dependencies = TRUE)` into
## the console.
## [[1]]
##
## [[2]]


Todo List Maker
(1) Dentists at 2pm on Monday. Root treatment
(2) Check broadband pricing - contract up for renewal
(3) Bradford City V Coventry. 3pm @ coventry
© Simon Cobb 2019


K-Nearest Neighbors (KNN) locates the K most similar instances in the training dataset for a new data instance. From the K neighbors, most similar class is taken as output class among closest neigbhors.
Logistic regression assign observations to a discrete set of classes. Unlike linear regression which outputs continuous number values, logistic regression transforms its output using the logistic sigmoid function to return a probability value which can then be mapped to two or more discrete classes.
An SVM model is a representation of the examples as points in space, mapped so that the examples of the separate categories are divided by a clear gap that is as wide as possible.
Random forest classifier creates a set of decision trees from randomly selected subset of training set. It then aggregates the votes from different decision trees to decide the final class of the test object.


FAQ
Is looting/hovering items bugged, if I alt click it works
That's /nopickup mode. You can turn it off with /nopickup in chat.
This is too easy. How do you make monsters more powerful?
/players X, where 1 (default) <= X <= 127
Higher the number, stronger the monsters
Why do robes and cloaks in gambling screen have the [Druid Only] property?
Because robes and cloaks are class specific items and was hardcoded into the game as such. After buying the robe/cloak the [Druid Only] property is automatically deleted.
How do I get to Catacombs Level 4?
Entrance to Catacombs Level 4 is now in Cold Plains (replaces the cave)
How do I get to Claw Viper Level 2?
Entrance to Claw Viper Level 2 is now the northern sewer exit in town (replaces north Sewers level 1)
How do I get to Maggot Lair Level 3?
Entrance to Maggot Lair Level 3 is now the southern sewer exit in town (replaces south Sewers level 1)
How do I get to Durance of Hate Level 3?
Entrance to Durance of Hate Level 3 is now in the Spider Forest, next to the waypoint.
How do I get to Throne of Destruction?
Entrance to Throne of Destruction is now in the Glacial Trail.
How do I get to the Secret Cow Level?
Kill Baal on that difficulty, go to Tristram, find Wirt's Leg, go to the Rogue Camp, transmute only Wirt's Leg in
cube<
Why do Dark Diablo's have full immunities?
Read Changelog.
Because you have come to them on NORMAL or NIGHTMARE.
Read Changelog
Disenchant (DESTROYS) of magical or better item - Any Perfect Gem x2 + item + White Potion x3 = Jewels
Why does the multiplayer version not have multipage stash?
 I'm sure you don't want to lose your lvl 111 hero.
More questions may be added here


Your Deleted Notes
{% for note in bin_note_list %}
Title:
{{note.title}}
Note:
{{note.note}}
Date and Time :
{{note.datetime}}
Date Deleted :
{{note.deletedate}}
Undo
Delete
{% endfor %}


| 1 | Load a track using a local or remote data file (.bam file extension) and index file(.bai file extension). |
| 2 | Select which chromosome to view using the drop-down selector. |
| 3 | This text box shows which area of the chromosome that is being viewed. Changing the values here and clicking on the magnifying glass icon will update the view. |
| 4 | This displays how many base pairs are shown in the current view. |
| 5 | These buttons will toggle the mouse guide, center line, and the track labels, in the track viewer. |
| 6 | Use the slider or the +/- buttons on either end to zoom in or out of the current view. |
| 7 | The diagram shows the current chromosome being viewed and the area outlined in red corresponds to the region shown. Clicking on the diagram will move the view to the selected location. |
| 8 | Click and drag to adjust the viewing window of your selected track. |
| 9 | Reorder tracks by dragging and dropping the grey bar. |
| 10 | Set track configurations. |


Logisim's propagation algorithm is more than sophisticated enough for almost all educational purposes; but it is not sophisticated enough for industrial circuit design. In order from most damning to least damning, the shortcomings of Logisim's propagation technique include:
Except for the issue of gate delays, Logisim does not particularly concern itself with timing issues. It is very idealized, so that a pair of NOR gates in an S-R latch configuration will toggle in lockstep infinitely, rather than the circuit eventually settle into a stable state.
Logisim cannot simulate subcircuits whose pins sometimes behave as inputs and sometimes behave as outputs. Components built using Java can have such pins, though: Within the built-in libraries, the Memory library's RAM circuit contains a D pin that can act both as an input and as an output.
Logisim cuts off its simulation after a fixed number of iterations assuming that there is an oscillation error. Conceivably, a large circuit that does not oscillate could lead to trouble.
Logisim does nothing with respect to discriminating between voltage levels: A bit can be only on, off, unspecified, or error.
There are additional shortcomings, too, that I have omitted because they are so obscure that if you were aware of them, it would be obvious that Logisim comes nowhere close to that level. As an extreme example, I have a friend who works for a major chip manufacturer, and his job is to worry about "bubbles" in chips' nanometer-wide wires growing and leading to random disconnection.
Even beyond this, I am not a circuit design specialist; thus, there may well be errors in the propagation technique of which I am not aware. I welcome corrections from experts.
Next: User's Guide.


Connect with near-by colleagues and co-workers within your network to share your everyday trip.
Set your destination, time of trip and repeat trip to book your daily carpool.
Overcome traffic with your carpool pals.


{% extends "base.html" %} {% block title %}Explore{% endblock %} {% block content %} You are exploring the map, and nothing has happened. Continue exploring using the direction buttons or the Travel To menus. {% endblock %}


About İstanbul
İstanbul is a very important place in the world. The city is spread over an area of 7500 km2 150 long and 50 km wide. İstanbul is the biggest and the most crowded city of Europe. Because, it's location is between Asia and Europe. The city population is approximately 14 million. Around 2 million tourists visit İstanbul every year. Firstly, Çamlıca hill is the biggest hill in İstanbul. It is 263 metres. There is a picnic area. Especially, Taksim is the most popular place for tourists and Turkish people. Which is one of the most active centers of İstanbul. There are a lot of people of different countries. Secondly, one of the most beautiful scenery in İstanbul is İstanbul Bosphorus. When you drive over the Bosphorus Bridge, you can see the Maiden's Tower. Eminönü is one of the hictorical place to visit in İstanbul. When you go there, you will see unique mosques. Blue Mosque and Hagia Sophia Mosques are indispensable for tourists.
More information
1-Do you speaking Arabian ?
I heard that things especially while I am using interpals some people asked and they think that Turkish people Arabian too once upon a time Ottoman empire controlled Arabian countries and we used arabian alphabeth but after Ataturk we use Latin alphabeth but without ''W,Q,'' and we speak Turkish.2-Do Turkish people play belly dance ?
It come from Arabian culture too yeah its very popular in Turkey too these days woman's doing for to lose weight as a sport but I think that idea come from eurovision our singers use belly dance in there.3-I think that you like to eat Turkey ?
hahaha its a good joke once upon a time english people find a bird in Turkey and they took it and they said that its name turkey bird than when they went to America they saw similiar bird and they said that turkey .4-Is your capital city Istanbul, isn't it ?
Yeah I accept Istanbul is very popular city and many people know there but Istanbul was capital city of Ottoman Empire our capital city is Ankara.5-Why Turkish man have moustache mostly ?
Yeah it can be right but ıt come from out history Ottoman Empire army did not accept a boy without moustache becaue they thought that if he did not moustache he is not a man yet and its about religion too but not all Turkish man have moustache because our civil servants have to shave ..6-Do you live in desert and ride camels ?
I think that that idea come from hollywood movies and I think that they never see Turkey and in their fantasy live Turkey a big desert and we just have camels, sometimes hollywood is a really important weapon for to perception operation.7-You are blonde do not look like a Turkish ?
Yeah ı m blonde and have colourfull eyes but I am Turkish yeah we are less but it can change regions while we are living middle asia our eyes similiar asian too so appereance can change for regions.8-Turkish man can have 4 wifes ?
Turkish civil code do not allow this situation so a man can have a only a wife at law but some man can have a few wife but its unlawful. They made islamic marriage.9-How Old Turkish Girls can marry ?
I heard a few times some friends asked that Turkish girls marry very early maybe below 18 and child brides. Maybe it can be right 15 20 years ago about child brides they married 14 ,15 years old but these days I dont hear about it because family ministry really good at that subject and they do not allow this situation. A girl can marry 16 years old if judge and family allow it.10-Rape rate is high in Turkey ?

Anyway ıt s not wrong but incomplete because Turkey is between Asia and Europa and we do not use passport while going Europa part :)12-Turkish Girls Use Headscarf ?
Yeah its about religion some girls use some girls do not use. Turkey is free country about that situation and everybody can wear what they want but some place have special rules about dress for example it not good to come in mosque with sexy dress.


Frog King:
Greedy ribbiting frog lady! Rib-rib-ribbit!
Well then I'll send her dead worms! Dead ribbiting worms and rotting ribbiting flowers! Romantic, right? Croak!
"Maybe a ribbiting jewel? She'd like that... ribbit!"


Home
Wisconsin :: Locate The Law
Constitution
Wisconsin Constitution
(Wisconsin Reviser of Statutes Bureau)
available in PDF (389, KB) and Folio
Executive
Wisconsin Administrative Code
Wisconsin Administrative Register
No. 481 (January 15, 1996-
Wisconsin Attorney General Opinions
(Wisconsin Reviser of Statutes Bureau)
Wisconsin Governor
Wisconsin Attorney General
Wisconsin State Elections Board
Wisconsin Secretary of State
Wisconsin State Agency List
Judicial
Wisconsin Supreme Court Opinions
(Wisconsin Court System)
September 1995-
Wisconsin Court of Appeals Opinions
(Wisconsin Court System)
June 1995-
Wisconsin Supreme Court and Court of Appeals Opinions
(FindLaw)
1995-
U.S. Court of Appeals, 7th Circuit
(U.S. Courts)
current two weeks
U.S. Court of Appeals, 7th Circuit
(FindLaw)
June 1995-
U.S. District Court, Eastern District of Wisconsin
U.S. District Court, Western District of Wisconsin
Wisconsin Circuit Court Rules
(State Bar of Wisconsin)
Wisconsin Supreme Court Rules
Wisconsin Court System
Legislative
Wisconsin Statutes
(Wisconsin Reviser of Statutes Bureau)
Wisconsin Acts
(Wisconsin Reviser of Statutes Bureau)
Wisconsin Bills
Wisconsin State Legislature
- composed of the
Senate
and
Assembly


Have some waffles; there's plenty to go around. Go easy on the syrup though.
He's a big fan of this website, and so should you! Become a subscriber now and get a free toaster! Then head on over to Business Cat's other favorite website, and savor the tasty reading material available there. Don't make Business Cat angry!
However they did do all of the font design you see, with the help of Google Web Font library, as well as icons from Font Awesome, obvs.


Player name
Set
Players online:


You can remove your account along with you API keys. This action cannot be reverted.
 This action cannot be reverted. This will also delete your
API keys, and those same keys cannot be recreated.All application using this key will be treated
as not authenticated. Remove you account along with your keys now?


Phillip Smith School of Computer Science
Hi, my name is Phillip Smith, and I am a Research Student at the University of Birmingham, under the supervision of Dr. Mark Lee.
I am interested in Natural Language Processing, in particular, Sentiment Analysis. My motivation is to contribute research into creating a general model of sentiment within text, which is independant of domain. I would hope that this model will handle some of the subtler forms of day-to-day language that we take for granted (yet contribute so much), such as metaphor. My interest in this field stems from a curiosity surrounding the length to which mining of textual data can go in producing unexpected conclusions, and revealing the great wealth that such data holds.
In addition to my research, I am a Senior Teaching Associate, lecturing for MSc Fundamentals: Introduction to Computer Science, and for the second year BSc Software System Components and first year Language & Logic modules. I am also a member of the Research Committee.
Publications
This blog contains sample posts which help stage pages and blog data. When you don’t need the samples anymore just delete the _posts/core-samples
folder.
$ rm -rf _posts/core-samples
Here’s a sample “posts list”.
- 29 Dec 2011 » Jekyll Introduction
To-Do
This theme is still unfinished. If you’d like to be added as a contributor, please fork! We need to clean up the themes, make theme usage guides with theme-specific markup examples.


2016-current
Admiral of the Punts, Darwin College
2016-current
Member, Teaching and Research Committee, Darwin College
2012-current
Member, Computing at School
2015-2016
Punt Captain, Darwin College
2012-2015
Member, Association for Computing Machinery (ACM)
2012-2013
School Education Representative for Computer Science, University of Nottingham Students' Union
2012-2013
Co-Founder & Organiser, School of Computer Science Guru Programme (University of Nottingham)
2012-2013
Chair, Computer Science Learning Community Forum (University of Nottingham)
2012-2013
Member, Academic Offences and Appeals Committee (University of Nottingham)
2012-2013
Member, Student Experience Committee of the Faculty of Science (University of Nottingham)
2010-2011
Microsoft Student Partner


Back to home
The Singing Arc, 1899
Telharmonium, 1912 ->
Click here for Electricity effect (FLASHING LIGHT WARNING)
Rescale the page