text stringlengths 0 7.84M | meta dict |
|---|---|
/*******************************************************************************
* Copyright (c) 2019 Infostretch Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
******************************************************************************/
package com.qmetry.qaf.automation.ui;
import java.io.IOException;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.net.MalformedURLException;
import java.net.Socket;
import java.net.URL;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.LinkedHashSet;
import java.util.Map;
import org.apache.commons.configuration.Configuration;
import org.apache.commons.configuration.ConfigurationMap;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.impl.LogFactoryImpl;
import org.openqa.selenium.Capabilities;
import org.openqa.selenium.Platform;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebDriverException;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.edge.EdgeDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.ie.InternetExplorerDriver;
import org.openqa.selenium.remote.CapabilityType;
import org.openqa.selenium.remote.DesiredCapabilities;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.qmetry.qaf.automation.core.AutomationError;
import com.qmetry.qaf.automation.core.ConfigurationManager;
import com.qmetry.qaf.automation.core.DriverFactory;
import com.qmetry.qaf.automation.core.LoggingBean;
import com.qmetry.qaf.automation.core.QAFListener;
import com.qmetry.qaf.automation.core.QAFTestBase.STBArgs;
import com.qmetry.qaf.automation.keys.ApplicationProperties;
import com.qmetry.qaf.automation.ui.selenium.webdriver.SeleniumDriverFactory;
import com.qmetry.qaf.automation.ui.webdriver.ChromeDriverHelper;
import com.qmetry.qaf.automation.ui.webdriver.QAFExtendedWebDriver;
import com.qmetry.qaf.automation.ui.webdriver.QAFWebDriverCommandListener;
import com.qmetry.qaf.automation.util.StringUtil;
/**
* com.qmetry.qaf.automation.ui.UiDriverFactory.java
*
* @author chirag
*/
public class UiDriverFactory implements DriverFactory<UiDriver> {
private static final Log logger = LogFactoryImpl.getLog(UiDriverFactory.class);
/*
* (non-Javadoc)
*
* @see com.qmetry.qaf.automation.core.DriverFactory#get(java.lang.String[])
*/
@Override
public UiDriver get(ArrayList<LoggingBean> commandLog, String[] stb) {
WebDriverCommandLogger cmdLogger = new WebDriverCommandLogger(commandLog);
String browser = STBArgs.browser_str.getFrom(stb);
logger.info("Driver: " + browser);
if (browser.toLowerCase().contains("driver") && !browser.startsWith("*")) {
return getDriver(cmdLogger, stb);
}
return new SeleniumDriverFactory().getDriver(cmdLogger, stb);
}
@Override
public void tearDown(UiDriver driver) {
try {
driver.stop();
logger.info("UI-driver tear down complete...");
} catch (Throwable t) {
logger.error(t.getMessage());
}
}
/**
* Utility method to get capability that will be used by factory to create
* driver object. It will not include any modification done by
* {@link QAFWebDriverCommandListener#beforeInitialize(Capabilities)}
*
* @param driverName
* @return
*/
public static DesiredCapabilities getDesiredCapabilities(String driverName) {
return Browsers.getBrowser(driverName).getDesiredCapabilities();
}
public static String[] checkAndStartServer(String... args) {
if (!isServerRequired(args)) {
return args;
}
if (isSeverRunning(STBArgs.sel_server.getFrom(args), Integer.parseInt(STBArgs.port.getFrom(args)))) {
return args;
}
// override args values to default
args = STBArgs.sel_server.set(STBArgs.sel_server.getDefaultVal(), args);
if (isSeverRunning(STBArgs.sel_server.getFrom(args), Integer.parseInt(STBArgs.port.getFrom(args)))) {
logger.info("Assigning server running on localhost");
return args;
}
return args;
}
private static boolean isServerRequired(String... args) {
String browser = STBArgs.browser_str.getFrom(args).toLowerCase();
return browser.contains("*") || browser.contains("remote");
}
private static boolean isSeverRunning(String host, int port) {
boolean isRunning = false;
Socket socket = null;
try {
socket = new Socket(host, (port));
isRunning = socket.isConnected();
} catch (Exception exp) {
logger.error("Error occured while checking Selenium : " + exp.getMessage());
} finally {
try {
if (socket != null) {
socket.close();
}
} catch (IOException e) {
}
}
return isRunning;
}
private static void beforeInitialize(Capabilities desiredCapabilities,
Collection<QAFWebDriverCommandListener> listners) {
if ((listners != null) && !listners.isEmpty()) {
for (QAFWebDriverCommandListener listener : listners) {
listener.beforeInitialize(desiredCapabilities);
}
}
}
private static void onInitializationFailure(Capabilities desiredCapabilities, Throwable e,
Collection<QAFWebDriverCommandListener> listners) {
if ((listners != null) && !listners.isEmpty()) {
for (QAFWebDriverCommandListener listener : listners) {
listener.onInitializationFailure(desiredCapabilities, e);
}
}
}
private static Collection<QAFWebDriverCommandListener> getDriverListeners() {
LinkedHashSet<QAFWebDriverCommandListener> listners = new LinkedHashSet<QAFWebDriverCommandListener>();
String[] clistners = ConfigurationManager.getBundle()
.getStringArray(ApplicationProperties.WEBDRIVER_COMMAND_LISTENERS.key);
for (String listenr : clistners) {
try {
QAFWebDriverCommandListener cls = (QAFWebDriverCommandListener) Class.forName(listenr).newInstance();
listners.add(cls);
} catch (Exception e) {
logger.error("Unable to register listener class " + listenr, e);
}
}
clistners = ConfigurationManager.getBundle().getStringArray(ApplicationProperties.QAF_LISTENERS.key);
for (String listener : clistners) {
try {
QAFListener cls = (QAFListener) Class.forName(listener).newInstance();
if (QAFWebDriverCommandListener.class.isAssignableFrom(cls.getClass()))
listners.add((QAFWebDriverCommandListener) cls);
} catch (Exception e) {
logger.error("Unable to register class as driver listener: " + listener, e);
}
}
return listners;
}
private static QAFExtendedWebDriver getDriver(WebDriverCommandLogger reporter, String... args) {
String b = STBArgs.browser_str.getFrom(args).toLowerCase();
String urlStr = STBArgs.sel_server.getFrom(args).startsWith("http") ? STBArgs.sel_server.getFrom(args)
: String.format("http://%s:%s/wd/hub", STBArgs.sel_server.getFrom(args), STBArgs.port.getFrom(args));
Browsers browser = Browsers.getBrowser(b);
loadDriverResouces(browser);
ConfigurationManager.getBundle().setProperty("driver.desiredCapabilities",
browser.getDesiredCapabilities().asMap());
QAFExtendedWebDriver driver = b.contains("remote") ? browser.getDriver(urlStr, reporter)
: browser.getDriver(reporter, urlStr);
ConfigurationManager.getBundle().setProperty("driver.actualCapabilities", driver.getCapabilities().asMap());
return driver;
}
private static void loadDriverResouces(Browsers browser) {
String driverResourcesKey = String.format(ApplicationProperties.DRIVER_RESOURCES_FORMAT.key,
browser.browserName);
String driverResources = ConfigurationManager.getBundle().getString(driverResourcesKey, "");
if (StringUtil.isNotBlank(driverResources)) {
ConfigurationManager.addBundle(driverResources);
}
}
public static void loadDriverResouces(String driverName) {
Browsers browser = Browsers.getBrowser(driverName);
loadDriverResouces(browser);
}
private static WebDriver getDriverObj(Class<? extends WebDriver> of, Capabilities capabilities, String urlStr) {
try {
//give it first try
Constructor<? extends WebDriver> constructor = of.getConstructor(URL.class, Capabilities.class);
return constructor.newInstance(new URL(urlStr), capabilities);
} catch (Exception ex) {
try {
Constructor<? extends WebDriver> constructor = of.getConstructor(Capabilities.class);
return constructor.newInstance(capabilities);
} catch (Exception e) {
if (e.getCause() != null && e.getCause() instanceof WebDriverException) {
throw (WebDriverException) e.getCause();
}
try {
return of.newInstance();
} catch (Exception e1) {
try {
//give it another try
Constructor<? extends WebDriver> constructor = of.getConstructor(URL.class, Capabilities.class);
return constructor.newInstance(new URL(urlStr), capabilities);
} catch (InvocationTargetException e2) {
throw new WebDriverException(e2.getTargetException());
} catch (InstantiationException e2) {
throw new WebDriverException(e2);
} catch (IllegalAccessException e2) {
throw new WebDriverException(e2);
} catch (IllegalArgumentException e2) {
throw new WebDriverException(e2);
} catch (MalformedURLException e2) {
throw new WebDriverException(e2);
} catch (NoSuchMethodException e2) {
throw new WebDriverException(e2);
} catch (SecurityException e2) {
throw new WebDriverException(e2);
}
}
}
}
}
private enum Browsers {
edge(DesiredCapabilities.edge(), EdgeDriver.class),
firefox(DesiredCapabilities.firefox(), FirefoxDriver.class), iexplorer(DesiredCapabilities.internetExplorer(),
InternetExplorerDriver.class), chrome(DesiredCapabilities.chrome(), ChromeDriver.class), opera(
DesiredCapabilities.operaBlink(),
"com.opera.core.systems.OperaDriver"), android(new DesiredCapabilities("android", "", Platform.ANDROID),
"org.openqa.selenium.android.AndroidDriver"), iphone(
new DesiredCapabilities("iPhone", "", Platform.MAC),
"org.openqa.selenium.iphone.IPhoneDriver"), ipad(
new DesiredCapabilities("iPad", "", Platform.MAC),
"org.openqa.selenium.iphone.IPhoneDriver"), safari(
DesiredCapabilities.safari(),
"org.openqa.selenium.safari.SafariDriver"), appium(
new DesiredCapabilities(),
"io.appium.java_client.AppiumDriver"), perfecto(
new DesiredCapabilities()),
/**
* can with assumption that you have set desired capabilities using
* property. This is to provide support for future drivers or custom
* drivers if any. You can provide driver class as capability :
* driver.class, for example :<br>
* driver.class=org.openqa.selenium.safari.SafariDriver
*/
other(new DesiredCapabilities());
private DesiredCapabilities desiredCapabilities;
private Class<? extends WebDriver> driverCls = null;
private String browserName = name();
private Browsers(Capabilities desiredCapabilities) {
this.desiredCapabilities = new DesiredCapabilities(desiredCapabilities.asMap());
this.desiredCapabilities.setCapability(CapabilityType.SUPPORTS_JAVASCRIPT,true);
this.desiredCapabilities.setCapability(CapabilityType.TAKES_SCREENSHOT, true);
this.desiredCapabilities.setCapability(CapabilityType.SUPPORTS_FINDING_BY_CSS, true);
}
@SuppressWarnings("unchecked")
private Browsers(Capabilities desiredCapabilities, String drivercls) {
this(desiredCapabilities);
if (null == driverCls) {
// not overridden by extra capability
try {
driverCls = (Class<? extends WebDriver>) Class.forName(drivercls);
} catch (Exception e) {
// throw new AutomationError(e);
}
}
}
private Browsers(Capabilities desiredCapabilities, Class<? extends WebDriver> driver) {
this(desiredCapabilities);
if (null == driverCls) {
// not overridden by extra capability
driverCls = driver;
}
}
@SuppressWarnings("unchecked")
private DesiredCapabilities getDesiredCapabilities() {
Map<String, Object> capabilities = new HashMap<String, Object>(desiredCapabilities.asMap());
Gson gson = new GsonBuilder().create();
// capabilities provided for all driver
Map<String, Object> extraCapabilities = gson
.fromJson(ApplicationProperties.DRIVER_ADDITIONAL_CAPABILITIES.getStringVal("{}"), Map.class);
capabilities.putAll(extraCapabilities);
// individual capability property for all driver
Configuration config = ConfigurationManager.getBundle()
.subset(ApplicationProperties.DRIVER_CAPABILITY_PREFIX.key);
capabilities.putAll(new ConfigurationMap(config));
//#332 add default capabilities for standard driver
if(!name().equalsIgnoreCase(other.name())){
String driverCapsKey = String.format(ApplicationProperties.DRIVER_ADDITIONAL_CAPABILITIES_FORMAT.key,
name());
extraCapabilities = gson.fromJson(ConfigurationManager.getBundle().getString(driverCapsKey, "{}"),
Map.class);
capabilities.putAll(extraCapabilities);
}
// capabilities specific to this driver
String driverCapsKey = String.format(ApplicationProperties.DRIVER_ADDITIONAL_CAPABILITIES_FORMAT.key,
browserName);
extraCapabilities = gson.fromJson(ConfigurationManager.getBundle().getString(driverCapsKey, "{}"),
Map.class);
capabilities.putAll(extraCapabilities);
// individual capability property with driver name prefix
String driverCapKey = String.format(ApplicationProperties.DRIVER_CAPABILITY_PREFIX_FORMAT.key, browserName);
config = ConfigurationManager.getBundle().subset(driverCapKey);
capabilities.putAll(new ConfigurationMap(config));
Object driverclass = capabilities.get(ApplicationProperties.CAPABILITY_NAME_DRIVER_CLASS.key);
if (null == driverclass) {// backward compatibility only
driverclass = capabilities.get("driver.class");
}
if (null != driverclass) {
try {
driverCls = (Class<? extends WebDriver>) Class.forName(String.valueOf(driverclass));
} catch (Exception e) {
// throw new AutomationError(e);
}
}
for(String key : capabilities.keySet()){
Object value = capabilities.get(key);
if(value instanceof String){
capabilities.put(key, ConfigurationManager.getBundle().getSubstitutor().replace(value));
}
}
return new DesiredCapabilities(capabilities);
}
private static Browsers getBrowser(String name) {
for (Browsers browser : Browsers.values()) {
if (name.contains(browser.name())) {
browser.setBrowserName(name);
return browser;
}
}
Browsers b = Browsers.other;
b.setBrowserName(name);
return b;
}
private void setBrowserName(String name) {
// remove driver and remote from name
browserName = name.replaceAll("(?i)remote|driver", "");
}
private QAFExtendedWebDriver getDriver(WebDriverCommandLogger reporter, String urlstr) {
Capabilities desiredCapabilities = getDesiredCapabilities();
Collection<QAFWebDriverCommandListener> listners = getDriverListeners();
beforeInitialize(desiredCapabilities, listners);
try {
if (this.name().equalsIgnoreCase("chrome")) {
return new QAFExtendedWebDriver(ChromeDriverHelper.getService().getUrl(), desiredCapabilities,
reporter);
}
WebDriver driver = getDriverObj(driverCls, desiredCapabilities, urlstr);// driverCls.newInstance();
return new QAFExtendedWebDriver(driver, reporter);
} catch (Throwable e) {
onInitializationFailure(desiredCapabilities, e, listners);
throw new AutomationError("Unable to Create Driver Instance for " + browserName + ": " + e.getMessage(),
e);
}
}
private QAFExtendedWebDriver getDriver(String url, WebDriverCommandLogger reporter) {
Capabilities desiredCapabilities = getDesiredCapabilities();
Collection<QAFWebDriverCommandListener> listners = getDriverListeners();
beforeInitialize(desiredCapabilities, listners);
try {
if (StringUtil.isNotBlank(ApplicationProperties.WEBDRIVER_REMOTE_SESSION.getStringVal())
|| desiredCapabilities.asMap()
.containsKey(ApplicationProperties.WEBDRIVER_REMOTE_SESSION.key)) {
Constructor<?> constructor = Class
.forName("com.qmetry.qaf.automation.ui.webdriver.LiveIsExtendedWebDriver")
.getDeclaredConstructor(URL.class, Capabilities.class, WebDriverCommandLogger.class);
return (QAFExtendedWebDriver) constructor.newInstance(new URL(url), desiredCapabilities, reporter);
}
return new QAFExtendedWebDriver(new URL(url), desiredCapabilities, reporter);
} catch (Throwable e) {
onInitializationFailure(desiredCapabilities, e, listners);
throw new AutomationError("Unable to Create Driver Instance " + e.getMessage(), e);
}
}
}
}
| {
"pile_set_name": "Github"
} |
Bannu: Protests against prolonged load shedding
Bannu- Protestors against the prolonged load-shedding in Bannu blocked the Bannu-Kohat Road by burning tyres today. The demonstrators said that the duration of unannounced power outages has reached up to 22 hours and forced many to close down their businesses. They also staged a sit-in on Bannu-Kohat Road and blocked the traffic for several hours. Long queues of vehicles formed. Load shedding in the far-off areas like northern Balochistan is about 15 hours, while 18 hours is common in rural areas. 12 to 14 hour load shedding is being carried out in Sindh while the situation in Punjab is also not very different. | {
"pile_set_name": "Pile-CC"
} |
Subsea pipelines need to be elevated with respect to the sea floor proximate the pipeline on occasion for numerous reasons. It is often advantageous for such a tool to be capable of securely cradling the pipeline. | {
"pile_set_name": "USPTO Backgrounds"
} |
HIV-1 variants in South and South-East Asia.
HIV spread in South and South-East Asia is most alarming, and genetic variability of HIV-1 is an important consideration in vaccine development. In this study, we examined the third variable (V3) region of env gene of HIV-1 variants prevalent in Thailand, Malaysia, India, and the Philippines. By phylogenetic tree analyses, an HIV-1 variant from an injecting drug user (IDU) in Thailand belonged to subtype B, and HIV-1 variants from 2 IDUs in Malaysia were classified into 2 subtypes, B and E. One HIV-1 variant from a male homosexual in the Philippines belonged to subtype B. Out of 8 HIV-1 variants from sexually transmitted disease patients in India, 7 belonged to subtype C, and one to subtype A. Although the total number of individuals examined in this study was limited, 4 HIV-1 subtypes were found in South and South-East Asia and large international movements of HIV-1-infected individuals in this region could induce global dissemination of these HIV-1 variants. | {
"pile_set_name": "PubMed Abstracts"
} |
Sport news
Daniel Poleshchuk climbed to the top of the Under 15 world rankings after finishing third at the British Junior Open.
Playing his last competition in his age group, Poleshchuk was one of two Israelis in the Under 15 competition. Seeded five out of eight, he featured in a high quality field with the first four seedings going to Egyptian players.
Having dispatched the third seed in the quarter-finals, Poleshchuk went on to take the bronze, achieving the best performance ever by an Israeli squash player and the highest placed European in his age category.
Richard Goodman's first race back after injury could hardly have been tougher, but in it he proved he can hold his own against the very best runners from Europe and America.
The event was the 8.2km Bupa Great Edinburgh Cross Country, televised live on BBC. The starting line-up included Mo Farah, European 5,000m and 10,000m champion, and nine-time European Cross Country champion Sergiy Lebid of Ukraine.
Coming 27th overall behind winner Mo Farah, Goodman, 17, came third amongst the Under 23s, beaten by a 21-year-old and a 20-year-old respectively.
Michael Klinger is set to become the first Jewish cricketer to compete in the Indian Premier League after being snapped up by new boy's Kochi.
The South Australia skipper will earn around $75,000 after signing
a two-year deal with Geoff Lawson's franchise and will team up with the likes of legendary spinner Muttiah Muralitharan and Sri Lanka star Mahela Jaywardene.
The Twenty20 tournament, which will run from April 8 to May 28, is in its fourth year and has already
transformed the game on the sub-continent.
Daryl Phillips described Alex Kaye as the perfect midfielder after his fantastic five-goal salvo destroyed Southgate Harmen A and rekindled his team's title hopes.
Standing in for manager Zuriel Solomon, who was away on honeymoon, Phillips, the assistant manager, could only stand back in admiration following an exhilarating display from last season's MJSL Player of the Season.
Kaye, a summer signing from Oakhill Lions, marked his return to top-flight action with a powerhouse display that simply blew Harmen away.
Tamir Cohen made his first start of the season for Bolton in the 2-0 FA Cup victory over Conference side York at the Reebok, less than 48 hours after returning from Israel where he was mourning the death of his father, Avi.
The Israeli midfielder played an hour of the third round tie. He said: "I hadn't trained for two and a half weeks so did well to last an hour." | {
"pile_set_name": "Pile-CC"
} |
Primary diffuse leptomeningeal gliomatosis mimicking tuberculous meningitis.
Primary diffuse leptomeningeal gliomatosis is a disease with an aggressive course that can result in death. To date, 82 cases have been reported. Here, the case of a 3-year-old male patient presenting with strabismus, headache, and restlessness is reported. Physical examination revealed paralysis of the left abducens nerve, neck stiffness, and bilateral papilledema. Tuberculous meningitis was tentatively diagnosed, and antituberculosis treatment was initiated when cranial imaging revealed contrast enhancement around the basal cistern. Craniocervical magnetic resonance imaging (MRI) was performed when there was no response to treatment, and it revealed diffuse leptomeningeal contrast enhancement around the basilar cistern, in the supratentorial and infratentorial compartments, and in the spinal region. Primary diffuse leptomeningeal gliomatosis was diagnosed by a meningeal biopsy. | {
"pile_set_name": "PubMed Abstracts"
} |
Mitsubishi is going plug-crazy at Geneva, with the new Engelberg Tourer next-generation sport utility concept. The vehicle incorporates the Dendo Drive House System, which creates an energy ecosystem between a home and an electric vehicle.
The plug-in hybrid SUV concept is named after the famous Engelberg ski resort in central Switzerland. It has twin motors, all-wheel drive, and it hints towards a new-generation Outlander PHEV.
The plug-in hybrid system is an evolution of the current PHEV (plug-in hybrid electric vehicle) system in the Outlander, using a slightly larger 2.4-liter four-cylinder engine as a generator (versus the 2.0L in the Outlander PHEV), but the same one-motor-per-axle layout. The Engelberg Tourer concept has an estimated all-electric range of 43 miles (70 km) and a total range of over 435 miles (700 km). Mitsubishi didn't state the size of the battery pack, but we suspect it's about the same 12 kWh pack that's found in the Outlander PHEV.
Like most Mitsubishi AWD-equipped crossovers, the Engelberg Tourer concept has an advanced torque-vectoring system. This is made even more controllable through the variable speeds possible with electric motors, though Mitsubishi is still calling it Super All-Wheel Control as with the mechanical models. Torque split is still determined by steering wheel turn, vehicle yaw rate, brake pressure, and wheel speeds. Because why mess with a good thing?
The concept SUV is sitting alongside a demonstration model of a project called Dendo Drive House (DDH). This is a packaged system of technologies that combine a home's solar panels, energy storage in a home battery, and an EV or PHEV like the Engelberg Tourer into one cohesive ecosystem. It can reduce costs across the board for its owners, gathering and delivering power in a smart way to include charging or utilizing battery storage in an electrified vehicle, for the purpose of reducing overall energy costs for the household.
Mitsubishi is keen to show off DDH and its benefits, as the launch date for the system is coming up fast. The system will be introduced in Asia and Europe later in 2019. | {
"pile_set_name": "Pile-CC"
} |
{
"images" : [
{
"idiom" : "universal",
"filename" : "video-play.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "video-play@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "video-play@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
} | {
"pile_set_name": "Github"
} |
import {EventEmitter} from 'events';
/**
* Require options for a VM
*/
export interface VMRequire {
/** Array of allowed builtin modules, accepts ["*"] for all (default: none) */
builtin?: string[];
/*
* `host` (default) to require modules in host and proxy them to sandbox. `sandbox` to load, compile and
* require modules in sandbox. Builtin modules except `events` always required in host and proxied to sandbox
*/
context?: "host" | "sandbox";
/** `true` or an array of allowed external modules (default: `false`) */
external?: boolean | string[];
/** Array of modules to be loaded into NodeVM on start. */
import?: string[];
/** Restricted path where local modules can be required (default: every path). */
root?: string;
/** Collection of mock modules (both external or builtin). */
mock?: any;
}
/**
* A custom compiler function for all of the JS that comes
* into the VM
*/
type CompilerFunction = (code: string, filename: string) => string;
/**
* Options for creating a VM
*/
export interface VMOptions {
/**
* `javascript` (default) or `coffeescript` or custom compiler function (which receives the code, and it's filepath).
* The library expects you to have coffee-script pre-installed if the compiler is set to `coffeescript`.
*/
compiler?: "javascript" | "coffeescript" | CompilerFunction;
/** VM's global object. */
sandbox?: any;
/**
* Script timeout in milliseconds. Timeout is only effective on code you run through `run`.
* Timeout is NOT effective on any method returned by VM.
*/
timeout?: number;
}
/**
* Options for creating a NodeVM
*/
export interface NodeVMOptions extends VMOptions {
/** `inherit` to enable console, `redirect` to redirect to events, `off` to disable console (default: `inherit`). */
console?: "inherit" | "redirect" | "off";
/** `true` or an object to enable `require` optionss (default: `false`). */
require?: true | VMRequire;
/** `true` to enable VMs nesting (default: `false`). */
nesting?: boolean;
/** `commonjs` (default) to wrap script into CommonJS wrapper, `none` to retrieve value returned by the script. */
wrapper?: "commonjs" | "none";
/** File extensions that the internal module resolver should accept. */
sourceExtensions?: string[]
}
/**
* A VM with behavior more similar to running inside Node.
*/
export class NodeVM extends EventEmitter {
constructor(options?: NodeVMOptions);
/** Runs the code */
run(js: string, path: string): any;
/** Runs the VMScript object */
run(script: VMScript, path?: string): any;
/** Freezes the object inside VM making it read-only. Not available for primitive values. */
freeze(object: any, name: string): any;
/** Protects the object inside VM making impossible to set functions as it's properties. Not available for primitive values. */
protect(object: any, name: string): any;
/** Require a module in VM and return it's exports. */
require(module: string): any;
}
/**
* VM is a simple sandbox, without `require` feature, to synchronously run an untrusted code.
* Only JavaScript built-in objects + Buffer are available. Scheduling functions
* (`setInterval`, `setTimeout` and `setImmediate`) are not available by default.
*/
export class VM {
constructor(options?: VMOptions);
/** Runs the code */
run(js: string): any;
/** Runs the VMScript object */
run(script: VMScript): any;
/** Freezes the object inside VM making it read-only. Not available for primitive values. */
freeze(object: any, name: string): any;
/** Protects the object inside VM making impossible to set functions as it's properties. Not available for primitive values */
protect(object: any, name: string): any;
/**
* Create NodeVM and run code inside it.
*
* @param {String} script Javascript code.
* @param {String} [filename] File name (used in stack traces only).
* @param {Object} [options] VM options.
*/
static code(script: string, filename: string, options: NodeVMOptions): NodeVM;
/**
* Create NodeVM and run script from file inside it.
*
* @param {String} [filename] File name (used in stack traces only).
* @param {Object} [options] VM options.
*/
static file(filename: string, options: NodeVMOptions): NodeVM
}
/**
* You can increase performance by using pre-compiled scripts.
* The pre-compiled VMScript can be run later multiple times. It is important to note that the code is not bound
* to any VM (context); rather, it is bound before each run, just for that run.
*/
export class VMScript {
constructor(code: string, path?: string);
/** Wraps the code */
wrap(prefix: string, postfix: string): VMScript;
/** Compiles the code. If called multiple times, the code is only compiled once. */
compile(): any;
}
/** Custom Error class */
export class VMError extends Error {}
| {
"pile_set_name": "Github"
} |
Combustion engines are machines that convert chemical energy stored in fuel into mechanical energy useful for generating electricity, producing thrust, or otherwise doing work. These engines typically include several cooperative sections that contribute in some way to this energy conversion process. In gas turbine engines, air discharged from a compressor section and fuel introduced from a fuel supply are mixed together and burned in a combustion section. The products of combustion are harnessed and directed through a turbine section, where they expand and turn a central rotor.
A variety of combustor designs exist, with different designs being selected for suitability with a given engine and to achieve desired performance characteristics. One popular combustor design includes a centralized pilot burner (hereinafter referred to as a pilot burner or simply pilot) and several main fuel/air mixing apparatuses, generally referred to in the art as injector nozzles, arranged circumferentially around the pilot burner. With this design, a central pilot flame zone and a mixing region are formed. During operation, the pilot burner selectively produces a stable flame that is anchored in the pilot flame zone, while the fuel/air mixing apparatuses produce a mixed stream of fuel and air in the above-referenced mixing region. The stream of mixed fuel and air flows out of the mixing region, past the pilot flame zone, and into a main combustion zone, where additional combustion occurs. Energy released during combustion is captured by the downstream components to produce electricity or otherwise do work.
In order to ensure optimum performance of a common combustor, it is generally preferable that the internal fuel-and-air streams are well-mixed to avoid localized, fuel-rich regions. As a result, efforts have been made to produce combustors with essentially uniform distributions of fuel and air. Swirler elements, for example, are often used to produce a stream of fuel and air in which air and injected fuel are evenly mixed.
Gas turbine technology has evolved toward greater efficiency and also to accommodate environmental standards in various nations. One aspect in the evolution of designs and operating criteria is the use of leaner gas air mixtures to provide for increased efficiency and decreased emissions of NOx and carbon monoxide. Combustion of over-rich pockets of fuel and air leads to high-temperature combustion that produces high levels of unwanted NOx emissions.
Also, a key objective in design and operation of gas turbine combustors is the stability of the flame and, related to that, the prevention of flashbacks. A flashback occurs when flame travels upstream from the combustion zone in the combustion chamber and approaches, contacts, and/or attaches to, an upstream component. Although a stable but lean mixture is desired for fuel efficiency and for environmentally acceptable emissions, a flashback may occur at times more frequently with a lean mixture, and particularly during unstable operation. For instance, the flame in the combustion chamber may progress backwards and rest upon for a period a baseplate which defines the upstream part of the combustion chamber. Less frequently, the flame may flash back into a fuel/air mixing apparatus, damaging components that mix the fuel with the air.
A multitude of factors and operating conditions provide for efficient and clean operation of the gas turbine combustor area during ongoing operation. Not only is the fuel/air mixture important, also relevant to gas turbine operation are the shape of the combustion area, the arrangement of assemblies that provide fuel, and the length of the combustor that provides varying degrees of mixing. Given the efficiency and emissions criteria, the operation of gas turbines requires a balancing of design and operational approaches to maintain efficiency, meet emission standards, and avoid damage due to undesired flashback occurrences.
The type of fuel/air mixing apparatus, and how it operates in relationship to other components, is one of the key factors in proper operation of current gas turbines. A common type of fuel/air mixing apparatus is known as a main swirler assembly (which also is referred to in the art as a nozzle, which is a more inclusive term). A main swirler assembly is comprised in part of a substantially hollow inner body that comprises stationary flow conditioning members (such as vanes) that create a turbulent flow. Fuel is added before or into this turbulent air stream and mixes to a desired degree within a period of time and space so that it is properly mixed upon combustion in the downstream combustion chamber. Also, in typical arrangements, a main swirler assembly also is comprised of an outer downstream element known as an annulus casting. An annulus casting surrounds a downstream section of the inner body, forming a channel for air flow known as the flashback annulus. In a typical arrangement, a quantity, such as eight, swirler assemblies are arranged circumferentially around the central pilot burner. The pilot burner burns a relatively richer mixture than is provided by the radially arranged swirler assemblies.
Various approaches to reduce or eliminate flashback in modern gas turbine combustion systems have been attempted. Since the prevention or elimination of flashbacks is a multi-factorial issue and also relates to various aspects of the design and operation of the gas turbine combustion area, a range of approaches has been attempted. These approaches often inter-relate with one another.
The present invention provides a solution toward obtaining an operationally stable, flashback-resistant main a fuel/air mixing apparatus, such as a swirler assembly, that provides an extended columnar air barrier that impedes the back progression of flame and, therefore, reduces or eliminates undesired flashback. More specifically, the present invention provides around the fuel/air mixture output of each main swirler assembly a more robust circumferential columnar body of air that 1) provides a fresh air barrier for a distance around the fuel/air mixture output of each respective main swirler assembly (or other source of fuel/air mixture); and 2) leans out the regions where there is a potential for flashback. | {
"pile_set_name": "USPTO Backgrounds"
} |
Etymologies
from Wiktionary, Creative Commons Attribution/Share-Alike License
im- + prudence. From Latin imprudens.
Examples
When the dinner was over, De Segur took me to a window, expressing his uneasiness at what he called the imprudence of Jacquemont, who, he apprehended, from Joseph's silence and manner, would not escape punishment for having indirectly blamed both the restorer of religion and his plenipotentiary.
The maid, with a generosity and Christian principle rarely surpassed, conscious that his imprudence might be his ruin, brought him the thirty pounds, which was part of a sum of money recently left her by legacy.
A man is burnt: if by his own imprudence, that is a 'physical' sanction; if by the magistrate, it is a 'political' sanction; if by some neglect of his neighbours, due to their dislike of his 'moral character,' a | {
"pile_set_name": "Pile-CC"
} |
Conceded the Jesuits in simple router in 1626 by Henri de Levy, Duke of Ventadour and Viceroy of New France, the fief of Notre-Dame-des-Anges extends from the Saint-Charles River to the river Beauport, on four leagues of depth. During the creation of the Companies des Cent-Associés, sanctioned by Louis XIII in May 1628, the land of the Jesuits, as all other concessions, becomes the property of this new company. In the capitulation of Québec in 1629, the Jesuits are forced to abandon their property. They are back in New-France in 1632. The Companies des Cent-Associés confirmed as owners of the stronghold on 16 January 1637. It will be erected in Lordship on January 17, 1652.
Figure 4: Map (detail) performed by Jean-Baptiste Decouagne in 1709 illustrating the part of the seigneury occupied by the former City of Giffard. The location of the "Jesuit" means the farm Notre-Dame-de-Bon-Secours. (GSJ)
The land bordering the Beauport River was granted to Jacques Badeau in 1651 and 1671. In 1660 Pierre Parent, son-in-law, is concede 16 acres joining this earth; then, in 1668, it acquires 16 square perches near a career. Finally, in 1672, it will acquire 200 acres at the edge of the seigneury of Notre-Dame-des-Anges, North-West of the field of the Lord of Beauport. Adjacent to the farm in Notre-Dame-de-Bonsecours, closes the Jesuits, this land roughly corresponds to the sector as part of the historic Borough of Beauport, which extends west to the avenue des Martyrs. Characterization study of the historic Borough of Beauport Commission of the cultural heritage of Quebec − January 2005
The capsules # 00 are information bearing the word Matte, the capsules # 0 are of general information used to complete the capsules identified # 0 (Charles) or # 1 (Nicolas and Madeleine) or # .2 (children) , etc., which correspond to lineages of Matte ancestors.
Conceded the Jesuits in simple router in 1626 by Henri de Levy, Duke of Ventadour and Viceroy of New France, the fief of Notre-Dame-des-Anges extends from the Saint-Charles River to the river Beauport, on four leagues of depth. During the creation of the Companies des Cent-Associés, sanctioned by Louis XIII in May 1628, the land of the Jesuits, as all other concessions, becomes the property of this new company. In the capitulation of Québec in 1629, the Jesuits are forced to abandon their property. They are back in New-France in 1632. The Companies des Cent-Associés confirmed as owners of the stronghold on 16 January 1637. It will be erected in Lordship on January 17, 1652.
Figure 4: Map (detail) performed by Jean-Baptiste Decouagne in 1709 illustrating the part of the seigneury occupied by the former City of Giffard. The location of the "Jesuit" means the farm Notre-Dame-de-Bon-Secours. (GSJ)
The land bordering the Beauport River was granted to Jacques Badeau in 1651 and 1671. In 1660 Pierre Parent, son-in-law, is concede 16 acres joining this earth; then, in 1668, it acquires 16 square perches near a career. Finally, in 1672, it will acquire 200 acres at the edge of the seigneury of Notre-Dame-des-Anges, North-West of the field of the Lord of Beauport. Adjacent to the farm in Notre-Dame-de-Bonsecours, closes the Jesuits, this land roughly corresponds to the sector as part of the historic Borough of Beauport, which extends west to the avenue des Martyrs. Characterization study of the historic Borough of Beauport Commission of the cultural heritage of Quebec − January 2005
The capsules # 00 are information bearing the word Matte, the capsules # 0 are of general information used to complete the capsules identified # 0 (Charles) or # 1 (Nicolas and Madeleine) or # .2 (children) , etc., which correspond to lineages of Matte ancestors. | {
"pile_set_name": "Pile-CC"
} |
Share 0 Tweet 0 Share Email Print 0 Shares
The video about police preparing for riots has me extremely worried. But protestors need to understand that they’re part of the dynamic too. This is a very complex conflict dynamic. Demonizing the police isn’t going to help. It will more likely make things worse. And if things escalate beyond a certain point, an incident could easily turn into a situation like the L.A. Riots, because as police lose control troublemakers come out of the woodwork.
America needs some official or officially recognized group to act as legal third party observers in these kinds of protest situations, like the observers that we sometimes send to other countries to observe elections, or like U.N. Peacekeepers, except unarmed—-not to interfere, but to observe. They should be easily recognizable. With observers on hand, both police and protestors would likely be more well behaved.
This is an extremely dangerous dynamic! And if protestors aren’t careful, they’ll play right into the hands of authoritarians, giving them the perfect excuse for violent crackdown. Then the movement will have lost the moral high ground for good. And a dangerous dynamic of conflict escalation will have begun.
Protestors need to learn to be as polite as angels when protesting. They shouldn’t show anger in any way. They should show only gentleness and compassion. They should not resist arrest. And they should become model prisoners once arrested. That was Gandhi’s way. It removes any justification for police violence. The slightest deviation from that strategy can only lead to dangerous escalation. | {
"pile_set_name": "OpenWebText2"
} |
Online Bartending Course from PBS Bartending School ($99.50 Value)
In a Nutshell
Students learn drink recipes and bartending skills during this online course that prepares them to work as professional bartenders
The Fine Print
Promotional value expires 90 days after purchase. Amount paid never expires.Limit 2 per person, may buy 3 additional as gifts. Online only.Merchant is solely responsible to purchasers for the care and quality of the advertised goods and services.
PBS Bartending School
The Deal
Students learn how to be a professional bartender with an online course that they can complete at home at their own pace. The course includes video lessons, drink recipes, and quizzes to test their newfound knowledge. Upon completion of the course, students receive a bartending certificate.
PBS Bartending School
Students at Professional Bartending School dive into hands-on learning courses that offer practical training for their future careers. The comprehensive courses include lessons in the art of mixology and garnishes, as well as fruit-cutting techniques and the nuanced recipes behind more than 200 cocktails. Students also learn how liquors are made and which liquors are compatible with each other based on their astrological signs. The school also goes beyond the bar in online casino-dealer courses, which teach students the rules and dealer techniques of poker, blackjack, and other games specific to their favorite casinos.
Customer Reviews
This was a great deal, the videos were very instructional and taught me a great deal of bartending skills. I did this more for entertaining than any desire to be a professional bartender. Friends are quite impressed with what I learned from this course.
Nick C. ·
4 days ago
It's very informative, I'm really learning and on my way to becoming a bartender! | {
"pile_set_name": "Pile-CC"
} |
Pano Qirko
Pano Qirko (born 26 June 1999) is an Albanian professional footballer who plays as a goalkeeper for Albanian club Tirana and the Albania national under-19 football team.
Club career
Early career
Qirko started his youth career at KF Vlora in 2012. A year later he moved to fellow Vlora club Flamurtari Vlorë. He won the 2014–15 Superliga under-17 with Flamurtari U-17. In the 2015–16 season he played 3 youth cup games with under-17 side. Then he moved to the under-19 and so far for the 2016–17 season he has played 10 youth league games.
Flamurtari
For the 2016–17 he gained entry with the first team of Flamurtari Vlorë and was placed as a third choice behind Argjent Halili and Stivi Frashëri leaving behind Edmir Sali. He made it his professional debut on 16 November 2016 in the 2016–17 Albanian Cup match against Tërbuni Pukë coming on as a substitute in the 73rd minute in place of Frashëri in a 2–0 win.
International career
Albania U16
He participated with Albania national under-16 football team in the UEFA Development Tournament 2015 and played 2 matches under coach Alban Bushi, against Montenegro U16 on 2 May 2015 in a 3–1 win and kept a clean sheet a day later against Armenia U16. Following a 1–0 victory against Cyprus U16 2 days later, Albania U16 won the tournament.
Albania U17
Qirko was called up to Albania national under-17 football team by coach Džemal Mustedanagić for a friendly tournament in Italy against Fasano, Frosinone & Italy B on match-dates 19–21 May 2015.
Albania U19
He was then called up at Albania national under-19 football team in the pre-eliminary squad by coach Arjan Bellaj to participate in the 2017 UEFA European Under-19 Championship qualification from 6-11 October 2016.
Qirko was re-called to under-19 team by new coach Erjon Bogdani for a gathering in Durrës, Albania in April 2017 where they also played two friendly matches. He was called up also for the next gathering for a double Friendly match against Georgia U19 on 30 August & 1 September 2017.
Career statistics
Club
Honours
International
Albania U16
UEFA Development Tournament: 2015
References
External links
Pano Qirko profile FSHF.org
Category:1999 births
Category:Living people
Category:Footballers from Vlorë
Category:Association football goalkeepers
Category:Albanian footballers
Category:Albania youth international footballers
Category:Flamurtari Vlorë players
Category:KF Tirana players
Category:Albanian Superliga players | {
"pile_set_name": "Wikipedia (en)"
} |
Waves inundate Beach Boulevard in Bay St. Louis, Miss. on Sept. 1, 2008 during Hurricane Ike, a Category 2 storm. (AP photo)
(CNSNews.com)—It has been 117 months since a major hurricane, defined as a Category 3 or above, has made landfall in the continental United States, according to 2015 data from the Hurricane Research Division of the National Oceanic and Atmospheric Administration (NOAA).
This is the longest span of time in which no major hurricane has struck the mainland U.S. in NOAA hurricane records going back to 1851.
The second longest time between major hurricane strikes was the eight years between 1860 and 1869—146 years ago.
A recent study published May 5 and co-authored by Tim Hall of the National Aeronautics and Space Administration’s (NASA) Goddard Institute for Space Studies entitled The Frequency and Duration of U.S. Hurricane Droughts also confirmed that the current "admittedly unusual" drought is “unprecedented in the historical record."
That study found that major hurricane droughts only occur every 177 years, and calculated that there is less than a 5 percent chance (0.39%) that the current drought will end this hurricane season, which lasts from June 1 to November 30.
Hurricane Wilma, the most recent major hurricane to strike the U.S., was a Category 3 when it made landfall in North Carolina on October 24, 2005—almost 118 months ago.
Since the end of the 2005 hurricane season, the U.S. has experienced a nine-year major hurricane “drought,” which is approaching 10 years at the end of the 2015 season this November.
Last month, Eric Blake, a hurricane specialist at NOAA’s National Hurricane Center, told CNSNews.com that this is “easily the record—with all the necessary caveats.”
Blake co-authored NOAA’s The Deadliest, Costliest, And Most Intense United States Tropical Cyclones from 1851 to 2010 report, which explains that “category assignment is based on wind speed from 1851-1930 and 1990-2010 and on a combination of wind, pressure and storm surge from 1931-1989.”
The Saffir-Simpson Hurricane Wind Scale assigns categories from 1 to 5 based on sustained wind speeds and potential for damage. The scale was developed in 1969, so storms before then were assigned categories retroactively, using the historical measurements on record.
Blake told CNSNews.com that measurements for storm categorizations have improved over time.
While a Category 3 or greater storm has not struck the U.S. since Wilma in 2005, several hurricanes of lesser wind speeds have still caused considerable damage, including Ike in 2008 (Category 2), Irene in 2011 (Category 1), and Sandy in 2012 (Category 1).
According to NOAA, Category 1 storms cause “some damage” with sustained winds between 74-95 mph, and Category 2 storms cause “extensive damage” with winds between 96 and 110 mph.
Category 3, 4, and 5 hurricanes are considered “major” because of their ability to produce “devastating” and “catastrophic damage” with wind speeds of 111-129 mph, 130-156 mph, and 157 mph or higher, respectively.
"Small differences today that we could detect, you couldn’t detect a long time ago,” Blake told CNSNews.com. “Given that we just see things a little better, we‘ve got more data and better satellite data, we can give a little better estimate than we could a generation ago.”
“But nonetheless, it is a record. It’s easily the record,” he continued.
That a 117-month pause in major hurricane activity follows the most active Atlantic hurricane season in history is “an unlikely event, so ascribing the significance of it is a challenge,” Blake told CNSNews.com.
“I like to think of it as Mother Nature giving us a little bit of a break after giving us a beating in 2004 and 2005.
That’s my best guess, but I don’t know.” | {
"pile_set_name": "OpenWebText2"
} |
The posts at WeAreThe99Percent are sobering, shocking.
They are some of people caught in the downward spiral of the US economy, but in reality it’s been happening for years as the split between the wealthy and the ‘middle class’ gets increasingly large.
The stories are of cripplingly high health care costs that destroy families, of foreclosures on mortgages and of the obvious result of years of banks pushing debt to customers.
There are also strong themes of ever-increasingly expensive education that is of diminishing value in the job market, and people are loaded up with tens of thousands in debt and low paid or no jobs.
These are signs of a society that is failing its people, and a strong articulation of exactly what the Occupy Wall Street movement is all about.
Is this the real Tea Party?
David Koch, second richest man in New York is apparently a cornerstone funder of the Tea Party, and he and his brother hold strong Libertarian views. Some of those views I regard as part of a fair society (legalisation of prostitution and drugs, gay marriage, removal of farm subsidies) but some are downright dangerous (removal of Social Security, the Federal Reserve Board and welfare).
The Tea Party movement was arguably taken over and certainly accelerated by Fox News into what seems to be a nutty right wing group, but the mass membership are driven by much of the same concerns as Occupy Wall St.
We are faced with interesting times over the next weeks – will the Tea Party followers increasingly realise that they have been duped?
This newer Occupy Wall Street movement appears to be a genuine one, rising from a sea of frustration from people who are under-served and with little prospect. It started from a suggestion in a email from Adbusters to their readers, and seems to have no leaders.
Many of the participants made mistakes, perhaps taking on too much debt or studying the wrong degrees. But many more of them have done what society demanded of them, attending university, paying insurance, buying a car – and then got clobbered. The safety net in the USA has many holes, and doesn’t last for long.
The problems are not so simple
A lot of what the financial industry (Wall Street) does is good, even the slicing and dicing of mortgages up into CDOs was a good idea. What was not good was the pricing of those CDOs, the way they were sold and the way that mortgages were granted to people who realistically had no hope of ever paying them off. What is worse is the propensity to clip the ticket for increasing amounts. The short term dealmaking, get the money now nature of the street has its place as lubricant for helping businesses make tough decisions, but it encourages unacceptable banking practices in the long run. The US really does need to reinstitute the separation of retail banks and investment/trading banks, and bring in adult supervision.
The financial institutions do not stand alone in being recipients of fury. US corporations there are paying an increasingly small share of the overall tax burden, with some such as GE earning billions and paying little or no tax, or even receiving rebates. This is the result from years of corporate lobbying for tweaks in tax law, and the results are repugnant. The USA could learn from New Zealand should dramatically simplify their tax code, much like Roger Douglas did in 1984, and introduce a GST.
That’s not to say that that everyone on Wall Street is repugnant, or that even they see themselves doing wrong – far from it. It’s a game where the choices are laid out in front of you, and if you excel then the money will come. It’s a game where the amount of money flying around is so high that it’s relatively easy to ensure that a little sticks to those making the transaction.
Financiers however play within rules set for them by legislators in Washington DC. Those legislators are there thanks to a host of donations from thousands of people, but some of the larger amounts come from companies and individuals on Wall Street. That mixture of politics and money has lifted the concerns of corporations and diminished the relative concerns of individuals. It’s got to stop, but a recent Supreme Court decision actually went the other way – defending the right of corporations to get involved in elections.
A decent society is decent to everyone, regardless of whether they are old, young, sick, or healthy, or even whether they chose at times not to abide by our rules. I reject completely the idea of living in a society that accepts homelessness, that does not care for mentally and that locks up people for offenses that are relatively harmless. We humans are better than that.
Being part of the 1 percent
I was lucky enough to study and work at two elite USA institutions – Yale University and McKinsey & Co. The experiences at those two places were outstanding – the level of education at top schools and the scale of the work available in the USA at the top end far exceeds anything here. I helped, for example, 2 organisations with over $500 billion in assets at the highest level. I was taught by people that wrote the books we study from and met a group of ultra smart, globally savvy, fun and driven people. In short I was becoming part of the 1 percent, even though for four of my five years in the USA I was in debt, and even though my income paled in comparison with those on Wall street.
I deliberately chose not to apply for Wall Street jobs during my MBA, as despite the fun of playing with large sums of money there seemed to be little reward beyond chasing the money god. I was lucky (or unlucky) enough to temp for a few months in a bank that sold structured financial products in London, counting the amount of money that the bankers had made over and above the internally calculated value of those products. It was a calculation of a knowledge advantage, and the units were millions of dollar per day. Those bankers or traders were seen as the elite within the bank people, but in reality they were arseholes, and like everyone else there, including me, they were dedicated to making money and to little else. I was lucky because I managed to get kicked out relatively quickly.
Being part of the 1 percent as a professional isn’t easy either. You are expected to work incredibly hard, maintain a certain sense of decorum and not rock the boat. It helps to have gone to the right school, for undergraduate and graduate studies, if not before. You don’t get much in the way of holidays, and are expected to be on call at all times.
I managed, courtesy of the last recession, to again break away from the USA corporate scene.
New Zealand
Meanwhile in New Zealand many are experiencing at some of the negative impact of the GFC, though I am unsure as to how bad it really is. Compound that with the hammering that Christchurch took, and while we are just getting on with it, we potentially have some real problems.
However we are blessed with a society and politics that, ACT party notwithstanding, generally and genuinely finds it unacceptable to treat people so harshly.
We are seeing increasing disparity between the wealthy and the rest in NZ, and we therefore need to doubly continue to ensure that the social welfare safety net is working. That means free or cheap education and health, as fundamental rights, it means a living income for everyone regardless of their circumstance and it means making sure we don’t have a situation where housing is unaffordable and can create catastrophic losses for families.
At the same time we need a society and economy where businesses can start, nurture, grow and prosper. We already have some good elements in our tax system, but there is a way to go before we get a fair tax system that rewards entrepreneurialism and has minimal loopholes. We don’t, for example, tax capital gains at all here. A simple across the board 20% tax on capital gains worked well in the USA for many years, and a tax I would welcome here, excluding only primary residences.
While there are problems, we have a good society here, and many live the life that many of the 1 percenters do not manage to live in the USA. We have the lifestyle many in the world dream of, while we have the ideal economy to start and grow businesses.
So what can we do about it here in NZ?
There is not a lot we can do about US policy, and it is senseless to get buried in US politics as it is something which we can and should not try to influence. Also it is, as far as I know, illegal for non-citizens to donate to campaigns.
But we can make sure that we don’t follow in the footsteps of the US by making sure we stay vigilant on the things that make our society great. We missed for example, decent regulation of finance companies, resulting in the loss of billions. We succeeded though in standing up to banks, and their current strength is partially a function of that.
Why can’t we make our 1% into 100%? Why not aim to make New Zealanders the envy of the world, combining a (minimum) decent living with a vibrant economy and the world’s best lifestyle.
It’s something worth pushing for, and here are some of the basic elements I believe we need to (continue to) push for*:
A simple social welfare system that ensures everyone gets a living wage, regardless of the reason they need help Low or no income taxes for those earning under a minimum amount Free or near free high and consistent quality education for those who cannot afford otherwise Free or near free health care for those who cannot afford otherwise A flat capital gains tax (say 20%) on all capital gains except for sale of the primary residence Decriminalization of all and legalization of certain drugs, to drive safer drug taking though better messaging, less drug taking (Portugal example), higher income from tax on drug sales and removal of the largest cause of crime from the mandate of police. Constant effort to maintain our short election campaigns and campaign financing that cannot be influenced by wealth of individuals or corporations. Constant effort to increasingly simplify tax law, making it as easy for corporates to understand their income liability as it it is with GST. Firm and fair regulation from well educated and informed regulators of companies that take money from investors. Continued celebration of individuals who make it big by building great companies with strong values, and condemnation of those who create wealth through financial trickery and do not give back.
There is more. However for now my main question is just how bad is it in New Zealand? Are we seeing the desperation of the US, or are our limited resources being largely applied where it matters? We will always have perceived and actual individual injustices, and we should seek to clear them, but for now it is the systemic ones that we need to worry about.
*Note that I don’t believe, for now anyway, in a financial transaction tax as has been mooted by some. The call is for a, say, 50 cent tax on each financial transaction. The difficulty is in understanding exactly what a transaction is. Traders could simply gather up all trades for a day between themselves and other institutions and call them one transaction. Alternatively if the tax was based on the number of securities exchanging hands, then bankers would simply construct products with higher face value and lower numbers of securities. And so on. For every tax a financial product can be created off-market that avoids the tax, but only the largest banks will be able to do this. The smaller investors would pay the tax regardless. | {
"pile_set_name": "OpenWebText2"
} |
Environmental factors in the development of autism spectrum disorders: A reply to Sealey et al. (2016).
Sealey et al. have reviewed the available evidence on environmental factors that may predispose the development of autism spectrum disorders (ASD) in vulnerable populations. The authors identify exposure to vaccines, pesticides, and air pollutants as potential contributors. The author of this correspondence has previously proposed elsewhere that exposure to increasing levels of the agricultural and environmental pollutant, nitrous oxide (N2O), may be the dominant etiology of ASD and other neurodevelopmental disorders. N2O is thought to target the opioidergic system, including the Ƙ-opioid receptor (KOR). Exposure to thimerosal-containing vaccines may disrupt the activity of several endogenous targets as has been shown, principally including μ-opioid receptor (MOR). Given the antagonistic actions of the MOR and KOR, dysregulation of MOR may leave the heightened dynorphin/KOR system unchecked, possibly inducing a negative emotional state that is characteristic of ASD. Future attention may need to be focused on understanding on how early-life mercury exposures, such as in vaccines, may or may not reveal a gestational opiate dependence induced from other ASD-implicated environmental factors. | {
"pile_set_name": "PubMed Abstracts"
} |
All the child sweatshops in poverty-stricken nations mumbo jumbo aside, you have to admit that Nike makes some pretty bad ass commercials. For over twenty years Nike has looked upon Portland agency Weiden+Kennedy as their primary. During that time they have continually created some of the most memorable and inspiring commercials on television.
11. I FEEL PRETTY
This commercial has everything you need for a classic. A catchy tune that is sure to get stuck in the viewers minds. 2 – A hot little Russian blond tennis phenom. And Johnny Mac.
This was without a doubt the biggest pain in the ass post I’ve ever done. F*cking NBC and their damn lawyers have taken almost everything off youtube and Hulu has the absolutely uber gayest region restrictions.
So I did my best in providing video, you’ll have to jump for a couple of them.
11. Cate Blanchett – Bio-hazard worker (Hot Fuzz)
I have seen this movie twice, and honest to God had no idea that was the incredible thespian Cate Blanchett behind that mask. I only realized it when doing research for this post and I apologize but I couldn’t find a clip from the movie.
11. Perceptor
Transforms into: Microscope
Perceptor is a scientist, one of the most brilliant minds the whole of Cybertron can offer. He is always looking to learn more, and his discoveries have proven invaluable time and time again. Though his specialties lie in metallurgy, electrical engineering, and other sciences closely related to Transformer physiology, his thirst for knowledge has made him kind of a scientific jack-of-all-trades.
He’s no warrior but his insight and intellect would be a nice addition to the autobot roster. Plus he’s the one who was responsible for designing and creating the Dinobots.
With The Dark Knight behind us and 2008 quickly coming to an end, we’ve already had two major titles pushed back (Half Blood Prince and Watchman), one has to wonder what do we have to look forward to in 2009? The following is a list of 11 blockbusters that you may want to keep an eye out for and most definitely get off your ass to go see.
11. Inglorious Bastards
Director: Quinten TarantinoCast: Brad Pitt, Diane Kruger, Eli Roth, B.J. Novak, and Samuel Jackson as the narratorWhy you’ll like it: Based in France during World War II, the movie follows a group of Jewish-American soldiers who were known as “The Bastards”. A group of soldiers chosen specifically t spread fear throughout the Third Reich by scalping and brutally killing Nazis. With Tarantino behind the camera I’m hoping this will be Saving Private Ryan with an insane amount of slaughtering and brutality.
Gentlemen… let’s be honest. I know for a fact you’re all outstanding, hairy chested, motor oil loving manly men. But every now and then you’re forced to suck it up and take one for the team. Girls have all the vaginas and therefore have all the power and when that night comes that they decided you’ll be watching a chick flick, here are some movies that you might want to suggest. They’re guy friendly and won’t make you seem like a complete panzy sitting on the couch cuddling your girl, while she sobs over the Notebook or some other Richard Gere crap fest.
11. The Sweetest thing
Written by Nancy Pimental (the girl who replaced Jimmy Kimmel as host on Win Ben Steins money) it stars Cameron Diaz and Christina Appelgate and the always annoying and untalented Selma Blair. Pimental wrote the movie based on her relationshi with Kate Walsh.
WHY GUYS WILL LIKE IT: As far as romantic comedies go, this one is pretty guy friendly and relies primarily on crude gags as its source of humor. Including the memorable “Penis Song”, the glory hole scene and Jason Bateman and Tom Janes witty dialogue about relationship with women. | {
"pile_set_name": "Pile-CC"
} |
This invention relates to electro-optical displays and other modular compact components. In particular, the invention relates to a method of manufacturing such components capable of being fully automated for producing low cost modular components also highly suitable for automated assembly in installations.
Display devices are used extensively particularly in digital circuitry to provide information for the interface for the user. However, with the advances in integrated circuitry technology progressively providing increased processing power in smaller space at reduced costs, the cost of interface devices, such as displays, becomes a larger portion of the total cost and thus more significant. Also when the cost of displaying information is low, the additional cost of displaying more information when desirable is not a deterent leading to greater design freedom. In view of these economic or cost saving benefits, it is extremely desirable to have a fully automated manufacturing process for producing display devices.
Another consideration in display devices as electronic components is modular construction. From a packaging stand-point, the display device should be sealed to prevent physical damage during automated assembly and contamination after assembly. Versatility is also advantageous to limit constraints on product design and packaging. Furthermore, it would be desirable for the display package to have terminals suitable for surface mount soldering. Of course, compactness of size is highly desirable in addition to the previously enumerated considerations and sought after advantages. | {
"pile_set_name": "USPTO Backgrounds"
} |
Category: tech companies
Silicon Valley’s stratospheric tech salaries are higher than ever — in case you can believe it. Nevertheless, different stories declare that though Apple ( NASDAQ:AAPL ) doubtless signed a partnership with Energous, it doesn’t plan to use the lengthy-vary charging tech in the upcoming iPhone eight. Failures occur in Silicon Valley in spite of the millions of dollars in moderately affected person venture funding that helps most nascent companies.
All employers topic to the Truthful Labor Standards Act, which incorporates firms with at the very least one worker and $500,000 in annual income, must notify workers of the existence of the new medical insurance marketplace not later than October 1, 2013.
As a mid-sized company in a quick-growing business, Aeryon’s IT and tech superstars are chargeable for the close design and integration of the software and hardware functions that get this next-gen technology off the bottom and dealing reliably.
When ladies do get employed by tech companies, it is usually in roles like advertising or human sources. Finally, there’s a higher likelihood of group and tradition cohesion when hiring and mentoring tech talent from an alternative training platform like a coding bootcamp.
As part of that intention we’re launching our first ever journey business mapping project, what we’re calling Skift Travel Tech 250. They have the bulk pricing from these firms that we can go along to you at very affordable rates. With so little formal capital, many Web companies have excessive ROIC figures as quickly as they become worthwhile. Digital-media hubs have sprouted up throughout Los Angeles in recent years in areas comparable to Venice, Playa Vista, and Culver City.
And new corporations pop up continually, making it troublesome to keep up with the most recent and greatest. A simple and straightforward approach to deal with uncertainty related to high-development companies is to use chance-weighted scenarios. The median age at three of the businesses on our listing (Fb, LinkedIn, and SpaceX) is simply 29, and only three (IBM, Oracle and HP) have a median employee age over 33.
An organization’s potential to boost” contemporary tech expertise primed to adapt and desperate to show itself within the workplace is much higher that its capacity to integrate a extra seasoned engineer with a set means of working — that likely consists of ingrained habits, both technical and cultural.
The Ben Kinney Corporations Tech Division consists of a suite of award-winning SAAS corporations whose mission is to maintain the true property agent related in each transaction. At the moment, we’ll take a more in-depth take a look at two different tech shares which are expected to more than double their sales this 12 months – Momo ( NASDAQ:MOMO ) and Energous ( NASDAQ:WATT ). By our panel occasions, we’ll join you with leaders within the venture community, including founders, enterprise buyers, tech bankers and incubators, in addition to mentors and advisors.
An executive order by President Donald Trump designed to restructure a visa program for extremely skilled staff that is used largely by the tech business can have little rapid effect, Seattle tech leaders said Tuesday. In fact, tech corporations won’t be capable to cure” addictions, nor ought to they try to take action. Nor ought to they act paternalistically, turning off entry after arbitrarily figuring out that a consumer has had sufficient.
In line with Deloitte Tech 500, in 14 OC based know-how firms had been among the fastest growing tech corporations in North America, all with greater than 100{1ce4cf3c5aac1cf22911e0909020152297cf27f6cb3bab84df7d2a26eea925da} income growth prior to now 12 months. A …
This can be a checklist of the world’s largest expertise firms by revenue 1 The listing includes companies whose major enterprise actions are related to expertise industry which incorporates laptop hardware , software program , electronics , semiconductor , internet , telecom gear , e-commerce and pc services Notice: The listing is limited to firms with annual revenues exceeding US$50 billion. London’s tech community connects at month-to-month Geek Dinners, UnLondon’s 121 Studios and UnLab makerspace, plus many more occasions and applications. In the end, there was nothing left to do. Some 300 individuals lost their jobs, and Chicago misplaced an awesome newspaper.
Of particular concern for tech companies in the US is the tough discuss from President Donald Trump relating to H-1B visas — if those are changed in an enormous approach, Michael Tippett with True North says he expects around five Hootsuite-sized firms to arrange offices in Vancouver, primarily based on the quantity of calls he’s been getting.
CBInsights reported that international ad tech funding fell 33{1ce4cf3c5aac1cf22911e0909020152297cf27f6cb3bab84df7d2a26eea925da} in 2016 to $2.2 billion, from $3.2 billion in 2015, placing it back to where it was in 2013. Many younger companies build a services or products that meets the shopper’s want …
Techfest attracts as much as 1,000 attendees, greater than 300 career opportunities, and as much as 15 hiring firms. Certainly, the advantage of all the information being collected about us today is that corporations could use this information to assist individuals who may be harmed by their products’ overuse. When we compare the salaries of staff with 10 or more years of experience, we see a few different corporations float to the top.
Analysts count on first-quarter earnings for technology companies and banks to rise 19{1ce4cf3c5aac1cf22911e0909020152297cf27f6cb3bab84df7d2a26eea925da} from the identical period last 12 months, in response to S&P International Market Intelligence. From investing in rising development firms to giant, highly structured, leveraged transactions in established, profitable enterprises, our growth equity lawyers have a practical and commercial approach to driving successful transactions.
In my novel, Startup,” I needed to discover these problems with sexual harassment and hypocrisy within the tech world by the eyes of a perpetrator and show how his actions have an effect on not just the subject of his mistreatment, but in addition the remainder of his company.
As 2017 progresses, more firms will catch on to the advantages of constructing their very own engineering farm teams filled with …
The ATC, the first organization of its sort in Georgia, was established in 2012 by the City of Alpharetta, GA. Comprised of Alpharetta’s leading technology firms, both giant and small, the members are charged with identifying and pursuing key funding opportunities and coverage decisions for Alpharetta’s expertise companies and its burgeoning expertise industry. To find out the pace of transition from current performance to focus on performance, we examined the historical development for similar companies. Read in regards to the prime dangers identified by private companies and the way adopting much less-traditional types of danger management can maintain shocks to the system from derailing corporate technique and undermining growth.
We do notice that this map just isn’t good: we could have missed some corporations, and lots of corporations within the advanced journey tech sector operate throughout multiple distinct classes. The relocation of these three corporations to the Mountain Technology Center is a step ahead not just for Clifton, but for Passaic County and the complete state as properly.
It’s a lot easier for a company to cultivate employee satisfaction by committing to a junior tech employee’s profession and salary progression — each key components for worker retention — than it …
On March 4, 1978, the presses fell silent for the final time on the Chicago Every day News, an iconic and crusading newspaper that was unable to adapt to changing occasions. But companies like LinkedIn , Intuit , Adobe and GE that are experimenting with tech apprenticeship applications with a purpose to construct their own farm groups are beginning to acknowledge the worth in addressing their expertise hole and pipeline issues before the problems worsen.
In some industries, evaluating worker tenure could also be a touch upon how loyal employees are to a company, but that’s arduous to say in tech. The opposite Dutch corporations on the FT list are: Dag1 (forty eight), Gizmo Retail (55), Marqeting (81) and Massarius at number 95.
They have the bulk pricing from these companies that we are able to move alongside to you at very cheap charges. With so little formal capital, many Web corporations have high ROIC figures as soon as they turn out to be worthwhile. Digital-media hubs have sprouted up all over Los Angeles in recent years in areas such as Venice, Playa Vista, and Culver Metropolis.
We’ve visualized them in a cluster map below for you, with the traveler …
Different machines help run the operation and production processes in manufacturing facilities. Industrial air compressors often power major operations, as they act as the workhorses without which other equipment can’t run optimally. Therefore, any facility manager must ensure that commercial air compressors operate smoothly and efficiently. The reason behind this concern is that if air compressors run without any proper inspection or maintenance, problems ensue, costing the company thousands of dollars on industrial air compressor repair and low production levels. The issue further compounds if the equipment becomes extremely unreliable.
Industrial Air Compression Inspection Checklist
To maintain high safety standards, the government imposes laws and regulations for proper maintenance of industrial equipment. Even the sturdiest machines require regular inspections and repairs due to frictional wear. Here are ways of knowing whether your commercial air compressor requires maintenance.
Check the Manual
It’s important to understand how your equipment functions. Check how long the manufacturer recommends servicing. In the case of many petroleum-based compressors, servicing is recommended after 500 running hours and 2000 hours for synthetic.
Too Much Moisture
Many industrial air compressors accumulate a lot of moisture when in operation. If you notice too much condensation, then the automatic drain system …
Winning a one-time repatriation of foreign cash at a decreased tax charge may be the one most necessary coverage objective for tech corporations during Trump’s term—and the matter might be decided fairly soon. It appears honest to conclude that the media corporations who took the leap felt they had been damned in the event that they did and damned if they didn’t. The Metropolis of Alpharetta is residence to just about 600 technology firms making up 35{1ce4cf3c5aac1cf22911e0909020152297cf27f6cb3bab84df7d2a26eea925da} of Where Georgia Leads know-how companies.
The ebook became a bestseller and I’m ceaselessly asked to consult with companies — notably tech corporations — trying to make their items and providers stickier and more durable to stop utilizing. If legacy corporations need a share of the new value chains being created by these new platforms, they need to start paying consideration.
We do realize that this map is just not excellent: we may have missed some firms, and plenty of firms within the complex journey tech sector operate throughout a number of distinct categories. The relocation of these three companies to the Mountain Expertise Center is a step ahead not only for Clifton, but for Passaic County and your entire state as well.…
Connecting resolution makers to a dynamic community of information, people and ideas, Bloomberg quickly and precisely delivers enterprise and monetary info, information and insight world wide. Critics disagree, asserting that some companies use the excessive-tech visa program to herald lower-paid employees who’ve the same expertise as U.S. staff. To give CFOs a way of the exciting tech developments going on, in addition to alert them to innovative solutions, the editors of CFO decided to filter the advertising noise generated by tech corporations.
It seems honest to conclude that the media companies who took the leap felt they have been damned in the event that they did and damned if they did not. The City of Alpharetta is home to just about 600 expertise firms making up 35{1ce4cf3c5aac1cf22911e0909020152297cf27f6cb3bab84df7d2a26eea925da} of Where Georgia Leads technology companies.
Analysts count on first-quarter earnings for know-how firms and banks to rise 19{1ce4cf3c5aac1cf22911e0909020152297cf27f6cb3bab84df7d2a26eea925da} from the identical interval last yr, in response to S&P World Market Intelligence. From investing in rising growth companies to giant, highly structured, leveraged transactions in established, worthwhile enterprises, our progress equity legal professionals have a practical and industrial method to driving successful transactions. | {
"pile_set_name": "Pile-CC"
} |
Watch A Penguin's Life Online
A Penguin's Life
Nat Geo WILD's new special A Penguin's Life chronicles the everyday struggles of a colony of Emperor penguins. See firsthand how these penguin parents raise their chicks in just one season... More
Nat Geo WILD's new special A Penguin's Life chronicles the everyday struggles of a colony of Emperor penguins. See firsthand how these penguin parents raise their chicks in just one season to survive on their own in the sea before the ice starts to melt. March along with these penguins as they protect their eggs in the harshest climate on Earth, trek over the ice in search of food, battle the feared leopard seal and make human parenting look easy. | {
"pile_set_name": "Pile-CC"
} |
Just minutes after the rollout began, social media sites filled up with complaints from iPhone users who, after trying to download iOS 10 over WiFi, found that their iDevice had been rendered useless.
Apple has also recommended using AppleCare directly, or you can head over to an Apple Store if you don't have access to a Mac or PC.
iOS 10 is available now and works on the iPhone 5 and newer handsets. iPad Mini and newer models and the iPod touch 6th generation. They say that their devices are losing cellular signals and that the only way they're able to get cellular connectivity again is by restarting the device.
The major changes brought by the iOS 10 are most visible in the Apple Music redesign, Photos App, Messages, and Home App to name a few.
The early birds who updated their phones during the release day last Tuesday complained that the update bricked their phones. Before you download, it's also a good practice to make sure your device is backed up.
More recently, in February this year, Apple faced criticism after an update started bricking devices if they had been repaired by a company other than Apple. | {
"pile_set_name": "Pile-CC"
} |
Resources & Services
This guide is a service of the Office of Undergraduate Studies. Contact us about the guide at:tutoring@umd.edu
Academic Success Resources Procrastination
The University is committed to academic resources to support student success. This site guides students to services available on campus, from our peer institutions, and other non-university websites. Students are always encouraged to seek out assistance early in the semester. In addition to utilizing these tutoring services and academic success resources, students should consult their academic department for more resources in their major courses. The Undergraduate Catalog provides contact information for your major department and a directory of all student resources and services.
Note: If you notice any broken links, please alert us via email: tutoring@umd.edu
University of Maryland, College Park Academic Success Resources
The Counseling Center offers online academic and study strategy resources such as time management, overcoming procrastination, apps to help you track and achieve your goals, and more.
01-F: Self-Handicapping: "What if I try my hardest and do the best I can - and I still do not succeed?" Procrastination, poor choices, etc. become strategic barriers to reaching full potential
01-G: Mindfulness: academic benefits of practicing mindfulness
01-H: Distraction: pitfalls of digital distractions in class meetings
Peer Institution Websites*
*Peer Institution Websites: Resources from UMD peer institutions offer valuable information. While most of the information can be used by any student regardless of where they are enrolled, note that some links may provide contact information/resources that are available only to that particular institution. Special thanks to our peer institutions.
The Ohio State University (OSU)*: Procrastination:
5 part video series on procrastination with helpful tips, however be aware that some resource links listed in the videos are specific to OSU campus:
University of North Carolina at Chapel Hill (UNC)*: Tips & Tools: List of helpful links and videos on how to be productive: addressing procrastination, managing distractions, improve motivation, among other tips. However, be aware that some resource links listed are specific to UNC Chapel Hill campus.
Time Management & Organization Resources*: Provides a self-guided workshop on time management as well as tips for schedule building, meeting goals, and breaking down big projects into manageable tasks. Be aware that some resource links listed in the videos are specific to Rutgers University campuses.
The Tutoring and Academic Success Resources website provides links to non-UMD sites. Although every effort is made to provide relevant, accurate, and helpful information, the University of Maryland is not responsible for the content or privacy practices of these sites. | {
"pile_set_name": "Pile-CC"
} |
KAKTOVIK, Alaska (Thomson Reuters Foundation) - When Inupiaq hunters wrestle a 100-ton bowhead whale back to land from the high seas, the next challenge is where to store all that meat.
For centuries, the Inupiaq, a Native Alaskan group that lives north of the Arctic Circle, have dug cellars into the permafrost as a form of natural refrigeration.
Now those “ice cellars” are under threat. Warming temperatures are melting permafrost, while coastal erosion is exposing the underground chambers.
Rising water, humidity and warmth create food-safety risks for these once-reliable alternatives to electric freezers.
Scientists and the Inupiaq are split on whether climate change or human factors, like shoddy construction, are to blame for the collapsing cellars, found in all eight villages scattered across Alaska’s North Slope, an area roughly the size of Britain and home to about 9,800 people.
When it comes to the crumbling cellars, “some communities have it much worse than others”, said Qaiyaan Harcharek, an Inupiaq anthropologist who hunts for his family’s food.
Besides whale meat, Inupiaq hunters use the cellars to store caribou, fish, geese, ducks and walrus, he said.
Harcharek, who is at the planning stage of building a family ice cellar, said Utqiagvik, the region’s largest settlement, had less of a problem than outlying villages like Point Lay and Kaktovik, where melting permafrost is more of an issue.
In Kaktovik, a coastal Inupiaq village of about 260 residents at the northern edge of the Arctic National Wildlife Refuge, nearly all the ice cellars are defunct.
“Most of them have been not in use perhaps since I was a boy,” said Matthew Rexford, tribal administrator for Kaktovik. Only his family’s cellar still functions, he added.
EXXON MONEY
Under threat of losing this Inupiaq tradition entirely, the Kaktovik Community Foundation spearheaded a process to design and build a new community ice cellar on the edge of town, which opened in 2017.
Unlike traditional cellars that are little more than holes in the ground, this facility is encased in a white metallic shed with reflectors and surrounded by vents.
Inside, the cellar is about 3 meters (10 ft) deep, and has enough room for one whale.
The community plans to expand it to accommodate up to three whales, the village’s seasonal harvest quota.
In addition to a winch for meat and safety harnesses for people climbing in and out, this cellar has high-tech heat siphons that eject warm air before it can cause melting and humidity, along with real-time temperature monitoring.
The $120,000 investment needed to install the cellar was donated as an act of corporate philanthropy by petroleum company ExxonMobil, which operates the Point Thomson oil field 100 kilometers (62 miles) west of Kaktovik.
Oil companies fund much of the infrastructure on the North Slope through royalties they pay to local government.
But for those who believe global warming caused mainly by burning fossil fuels is a major contributor to the traditional ice cellars’ demise, the financial backer of the new start-of-the-art cellar is a slap in the face.
“It’s a superficial, ingenuine check off the box,” Harcharek told the Thomson Reuters Foundation.
He holds companies like ExxonMobil “hugely responsible” for the rapid warming of the Arctic, which is rising in temperature twice as fast as the rest of the planet, according to the U.S. National Oceanic and Atmospheric Administration (NOAA).
“It’s a cowardly way of supposedly helping out a people where you’re destroying their way of life,” he said.
Rexford, who is also president of the community foundation’s board, disagrees. “Folks try to tie climate change to the oil and gas industry,” he said.
On Jan. 7, the U.S. Supreme Court cleared the way for the Massachusetts attorney general to obtain records from ExxonMobil to probe whether the oil firm for decades concealed its knowledge of the role fossil fuels play in climate change.
ExxonMobil did not respond to repeated requests for comment on the Alaskan ice cellar project.
FIT FOR A WHALE
There is no scientific consensus on the root cause of the malfunctioning of the traditional ice cellars.
Scientists monitored 71 cellars in Utqiagvik, formerly called Barrow, from 2005 to 2015, and found no evidence of thermal change.
But, according to an annual assessment by NOAA, permafrost temperatures in 2016 at many sites around the Arctic were among the highest recorded, dating back as far as 1978, with some of the biggest increases since 2000 seen in the Alaskan Arctic.
As Harcharek prepares to build his family’s ice cellar in Utqiagvik, he is not taking any chances.
He plans to find higher ground, dig deeper, and use more naturally insulating sod, as well as waterproof PVC pipe.
Whether at risk from a changing climate or old construction techniques with a limited shelf-life, Harcharek wants his cellar built to last, given the importance the Inupiaq place on their customary method of preserving food.
“The cultural and spiritual significance is extremely high, and carries just as much weight as the actual functionality of the ice cellar itself,” he said.
In preparation for each whaling season, the Inupiaq clean their cellars meticulously.
“The belief is if you don’t have a clean ice cellar, the bowhead whale isn’t going to give itself to that crew because that’s an extension of its home and they want to be placed in a nice clean home,” he said. | {
"pile_set_name": "OpenWebText2"
} |
Nuclear war may break out for reasons that no one speaks about
Scientists from the United Nations University named a place in the world, where a nuclear conflict may break out already in the near future.
"The Indus river basin may be seen as a water time bomb, which may go off any time with increasing water scarcity, variability and progressively changing climate. There are similar water-related accumulating tensions and issues in other major river basins and UNU-INWEH has embarked on the scrupulous analysis of those to ensure peaceful and sustainable trajectory of river basin developments," UNU-INWEH Director Vladimir Smakhtin said.
It goes about two warring countries, both being nuclear powers - India and Pakistan.
A month ago, India announced the termination of the work of the bilateral Indus River Commission. The commission had been in charge of water relations between India and Pakistan since 1960, when the countries signed the Indus Waters Treaty. Islamabad, in turn, declared it a hostile action on the part of New Delhi and said that such a move of the Indian government would be regarded as "an act of declaration of war."
The problem remains serious not only because of the irreconcilable hostility between India and Pakistan, but also because of the growing consumption of water in China and Afghanistan - the adjacent countries to India and Pakistan.
The Indian subcontinent already has water supplies problems, and the further increase of the shortage of water resources may give rise to internal political instability in the country. The instability will in turn push the country's leadership to a move to "solve all problems at once."
In March of 2016, former Minister for Foreign Affairs of Russia (in 1998-2004), Igor Ivanov, said that the danger of a nuclear war in Europe was higher than it was in the 1980s.
Ivanov, who now heads the Russian Council for International Affairs, noted a high risk of confrontation with the use of nuclear weapons in Europe. According to the Stockholm Peace Research Institute, Russia and the United States currently own fewer nuclear weapons than they did during the Cold War. However, even though both Russia and the USA have 7,000 warheads each, the countries still own approximately 90% of all nuclear weapons in the world.
The former minister, speaking in Brussels to foreign ministers of Ukraine and Poland and a US congressman, said: "We now have fewer nuclear warheads, but the risk that they will be used, is increasing."
He also accused the United States and Europe of raising such risks by deploying the European missile defense system. A part of the nuclear shield is being built on one of the bases in Poland. The missile defense system will be deployed in 2018, which is particularly sensitive for the Kremlin, as the US missile defense system will be taken very close to Russia's borders.
Pravda.Ru
Read article on the Russian version of Pravda.Ru | {
"pile_set_name": "OpenWebText2"
} |
MauvilleCity_BikeShop_Text_180F9F:: @ 8180F9F
.string "Well, well, what have we here?\n"
.string "A most energetic customer!\p"
.string "Me? You may call me RYDEL.\n"
.string "I'm the owner of this cycle shop.$"
MauvilleCity_BikeShop_Text_181016:: @ 8181016
.string "RYDEL: Your RUNNING SHOES...\n"
.string "They're awfully filthy.\p"
.string "Did you come from far away?$"
MauvilleCity_BikeShop_Text_181067:: @ 8181067
.string "RYDEL: Is that right?\p"
.string "Then, I guess you have no need for\n"
.string "any of my BIKES.$"
MauvilleCity_BikeShop_Text_1810B1:: @ 81810B1
.string "RYDEL: Hm, hm... ... ... ... ...\n"
.string "... ... ... ... ... ... ... ...\p"
.string "You're saying that you came all this\n"
.string "way from LITTLEROOT?\p"
.string "My goodness!\n"
.string "That's ridiculously far!\p"
.string "If you had one of my BIKES, you could\n"
.string "go anywhere easily while feeling the\l"
.string "gentle caress of the wind!\p"
.string "I'll tell you what!\n"
.string "I'll give you a BIKE!\p"
.string "Oh, wait a second!\p"
.string "I forgot to tell you that there are\n"
.string "two kinds of BIKES!\p"
.string "They are the MACH BIKE and the\n"
.string "ACRO BIKE!\p"
.string "MACH BIKE is for cyclists who want\n"
.string "to feel the wind with their bodies!\p"
.string "And an ACRO BIKE is for those who\n"
.string "prefer technical rides!\p"
.string "I'm a real sweetheart, so you can\n"
.string "have whichever one you like!\p"
.string "Which one will you choose?$"
MauvilleCity_BikeShop_Text_181332:: @ 8181332
.string "{PLAYER} chose the MACH BIKE.$"
MauvilleCity_BikeShop_Text_18134A:: @ 818134A
.string "{PLAYER} chose the ACRO BIKE.$"
MauvilleCity_BikeShop_Text_181362:: @ 8181362
.string "RYDEL: If you get the urge to switch\n"
.string "BIKES, just come see me!$"
MauvilleCity_BikeShop_Text_1813A0:: @ 81813A0
.string "RYDEL: Oh? Were you thinking about\n"
.string "switching BIKES?$"
MauvilleCity_BikeShop_Text_1813D4:: @ 81813D4
.string "RYDEL: Okay, no problem!\n"
.string "I'll switch BIKES for you!$"
MauvilleCity_BikeShop_Text_181408:: @ 8181408
.string "{PLAYER} got the MACH BIKE exchanged\n"
.string "for an ACRO BIKE.$"
MauvilleCity_BikeShop_Text_181439:: @ 8181439
.string "{PLAYER} got the ACRO BIKE exchanged\n"
.string "for a MACH BIKE.$"
MauvilleCity_BikeShop_Text_181469:: @ 8181469
.string "RYDEL: Good, good!\n"
.string "I'm happy that you like it!$"
MauvilleCity_BikeShop_Text_181498:: @ 8181498
.string "Oh? What happened to that BIKE I\n"
.string "gave you?\p"
.string "Oh, I get it, you stored it using your PC.\p"
.string "Well, take it out of PC storage,\n"
.string "and I'll be happy to exchange it!\p"
.string "May the wind always be at your back\n"
.string "on your adventure!$"
MauvilleCity_BikeShop_Text_181568:: @ 8181568
.string "I'm learning about BIKES while\n"
.string "I work here.\p"
.string "If you need advice on how to ride your\n"
.string "BIKE, there're a couple handbooks in\l"
.string "the back.$"
MauvilleCity_BikeShop_Text_1815EA:: @ 81815EA
.string "It's a handbook on the MACH BIKE.\p"
.string "Which page do you want to read?$"
MauvilleCity_BikeShop_Text_18162C:: @ 818162C
.string "A BIKE moves in the direction that\n"
.string "the + Control Pad is pressed.\p"
.string "It will speed up once it gets rolling.\p"
.string "To stop, release the + Control Pad.\n"
.string "The BIKE will slow to a stop.\p"
.string "Want to read a different page?$"
MauvilleCity_BikeShop_Text_1816F5:: @ 81816F5
.string "A MACH BIKE is speedy, but it can't\n"
.string "stop very quickly.\p"
.string "It gets a little tricky to get around\n"
.string "a corner.\p"
.string "Release the + Control Pad a little\n"
.string "before the corner and slow down.\p"
.string "Want to read a different page?$"
MauvilleCity_BikeShop_Text_1817BF:: @ 81817BF
.string "There are small sandy slopes throughout\n"
.string "the HOENN region.\p"
.string "The loose, crumbly sand makes it\n"
.string "impossible to climb normally.\p"
.string "But if you have a MACH BIKE, you can\n"
.string "zip up a sandy slope.\p"
.string "Want to read a different page?$"
MauvilleCity_BikeShop_Text_181892:: @ 8181892
.string "It's a handbook on the ACRO BIKE.\p"
.string "Which page do you want to read?$"
MauvilleCity_BikeShop_Text_1818D4:: @ 81818D4
.string "Press the B Button while riding, and the\n"
.string "front wheel lifts up.\p"
.string "You can zip around with the front\n"
.string "wheel up using the + Control Pad.\p"
.string "This technique is called a wheelie.\p"
.string "Want to read a different page?$"
MauvilleCity_BikeShop_Text_18199A:: @ 818199A
.string "Keeping the B Button pressed, your\n"
.string "BIKE can hop on the spot.\p"
.string "This technique is called a bunny hop.\p"
.string "You can ride while hopping, too.\p"
.string "Want to read a different page?$"
MauvilleCity_BikeShop_Text_181A3D:: @ 8181A3D
.string "Press the B Button and the + Control\n"
.string "Pad at the same time to jump.\p"
.string "Press the + Control Pad to the side\n"
.string "to jump sideways.\p"
.string "Press it backwards to make the BIKE\n"
.string "change directions while jumping.\p"
.string "Want to read a different page?$"
| {
"pile_set_name": "Github"
} |
RevoluSun shows us what a smart home looks like
0:00 Trini: There’s a lot of talk these days about smart things, like smartphones for example. But what exactly does smart mean? Especially when it comes to smart homes, that can be pretty confusing. Here to shed some light on what a smart home is, is Eric Carlson with RevoluSun. Hello!
0:19 Eric: Hi Trini, how are you?
0:20 Trini: I’m doing great. So, tell us, what is a Smart Home, what does a Smart Home look like?
0:27 Eric: Well for us it’s pretty simple. Really it’s a home that takes advantage of the natural elements to make it more economical and more enjoyable to be in. So for us that’s the definition of a Smart Home.
0:38 Trini: Okay, and so what areas of the home can be smarter?
0:42 Eric: Well there’s a lot of things that you can do but what RevoluSun Smart Home focuses on are energy from the Sun, natural lighting solutions, fresh air, water, and home energy security.
0:58 Trini: Okay, so what does that mean exactly? I had a lot of people that think of smart home they think of okay photovoltaic system, but it doesn’t stop there.
1:03 Eric: No, there’s a lot of areas. So, by breaking a home into those five different areas, what we’re trying to do is essentially use technology to bring the outside in, via natural lighting. There’s a lot of studies that talk about the benefits of having natural light, so that’s one area that you can do. Bringing fresh air in, through a whole house fans as one of the products that we offer, is another economical way to—instead of air conditioning—to cool your home using the natural elements and amplifying that with this product that we offer. So there are a number of different areas around the home that we can do, that are economical to make your home a lot more efficient and a more enjoyable place to live.
1:48 Trini: Okay, my ears went off—ding ding ding—when you said economical. Let’s talk numbers. How much can someone expect to save when they have a Smart Home?
1:55 Eric: Well it depends on the home user and how they’re using their energy prior to incorporating some of the products, but we see savings—dramatic savings. With photovoltaic, for example, you can get your bill down to, you know, twenty dollars a month. For people that may have a pool and incorporate one of our smart home products they can see savings of 80 dollars a month on their pool. So there’s, when you add all of those up, we’re talking a lot of savings.
2:27 Trini: Yeah, that’s a nice savings. So what are some future smart home products that you 2:32 have planned, you know, for installation?
2:32 Eric: Right, well there’s all kinds of neat things, and at our showroom—that’s where we showcase all of those products—but there’s things like keyless locks, keyless entry. We all have that for our car, why not have that for our home? So now when you come back from the grocery store you don’t have to juggle with your shopping bags, you can just tap your front door and it’ll open. So that’s a product that we’re bringing to market. There’s a lot of exciting things, and that’s the beauty about this industry is that things evolve so quickly that homeowners have a wide variety of products that they can come take a look at our showroom.
3:10 Trini: well that is very exciting. Eric, thank you so much.
3:12 Eric: Yeah, thank you.
3:14 Trini: Okay, I’m a big fan. And it’s so addicting too, once you start learning about all of these technology—smart technology systems, you’re gonna want it all. | {
"pile_set_name": "Pile-CC"
} |
Q:
Simple neural network "calibration" (python)
I'm getting started with neural networks and this kind of stuff, I understood how a perceptron works and the logic behind feed-forward and backpropagation mechanisms and I am now trying to write a simple multi-layer network with 3 neurons (2 in a hidden layer and 1 as output) which should be enough to execute a xor operation.
I implemented it in Python (using v3.6.1 now) this way:
import numpy as np
class Neuron():
def __init__(self, n, w = None, b = None):
#np.random.seed(46144492)
#np.random.seed(23)
self.weights = 2 * np.random.random((n)) - 1 if w == None else np.array(w)
self.bias = 2 * np.random.random() - 1 if b == None else b
self.learning_rate = 0.1
self.weights_error = []
for i in range(n):
self.weights_error.append(0)
self.bias_error = 0
def learning_factor(self, output):
return output * (1 - output)
def fire(self, x):
return 1 / (1 + np.exp(-x))
def __call__(self, inputs):
weighted = []
for i in range(len(inputs)):
weighted.append(inputs[i] * self.weights[i])
weighted = np.array(weighted)
return self.fire(weighted.sum() + self.bias)
def adjust(self, n_weights):
for i in range(n_weights):
self.weights[i] -= self.weights_error[i]
self.bias -= self.bias_error
class HiddenNeuron(Neuron):
def calc_error(self, inputs, output, next_layer, number_in_layer):
error = 0
for n in range(len(next_layer)):
error += next_layer[n].delta * next_layer[n].weights[number_in_layer - 1]
derivative = self.learning_factor(output)
self.delta = error * derivative
self.weights_error = []
for i in range(len(inputs)):
self.weights_error.append(self.delta * inputs[i] * self.learning_rate)
self.bias_error = self.delta * self.learning_rate
class OutputNeuron(Neuron):
def calc_error(self, inputs, output, expected):
error = output - expected
derivative = self.learning_factor(output)
self.delta = error * derivative
self.weights_error = []
for i in range(len(inputs)):
self.weights_error.append(self.delta * inputs[i] * self.learning_rate)
self.bias_error = self.delta * self.learning_rate
# Network
n1, n2 = HiddenNeuron(2), HiddenNeuron(2)
n3 = OutputNeuron(2)
# Training data
training_set_in = [[0, 0], [0, 1], [1, 0], [1, 1]]
training_set_out = [0, 1, 1, 0]
# Training cycles
for i in range(10000):
for i in range(len(training_set_in)):
# Feed-forward
n1_out = n1(training_set_in[i])
n2_out = n2(training_set_in[i])
n3_in = [n1_out, n2_out]
n3_out = n3(n3_in)
# Backpropagation
n3.calc_error(n3_in, n3_out, training_set_out[i])
n2.calc_error(training_set_in[i], n2_out, [n3], 2)
n1.calc_error(training_set_in[i], n1_out, [n3], 1)
n1.adjust(2)
n2.adjust(2)
n3.adjust(2)
# "New" cases (test)
for new in [[0, 0], [0, 1], [1, 0], [1, 1]]:
print(n3([n1(new), n2(new)]))
As you can see I use the sigmoid function as activation function and I haven't implemented the momentum yet (I have still to get how it works).
The network works, in most cases. But I found some cases in which it outputs some strange values (see for example the two random seeds I commented in the Neuron class constructor). This two cases are solved if I increase the Neuron.learning_rate (for example set it to 10), but still some other exceptions come up (couldn't find seeds for these, I'm sorry... But they're quire frequent, just run the code for 10 or 20 times and you'll see some).
The question is: Why is this happening? Is my network too "small"/simple? I thought 3 neurons would be enough. Or is it just a problem of "calibration" (don't know how this is called, I mean the process of adjusting the learning rate factor and the momentum, which here is absent)? Or did I even commit any mistakes? I can't really figure out.
EDIT: I'm training the net with all possible cases and then trying it with the same cases just to verify if it works correctly.
A:
I think it's OK as neural network's performance depends on its initial state, that is, the weights and biases. In your case, the weights and biases start out randomised, and thus depend on the seed. There are even special techniques1 to reduce this effect, such as weight normalisation (also google this, there are some interesting papers on this topic).
link taken from http://neuralnetworksanddeeplearning.com/chap5.html
| {
"pile_set_name": "StackExchange"
} |
Cei doi au remarcat silicoanele unei femei din loja lui Marius Copil, dar au făcut și unele remarci referitoare la Simona Halep.
– Silicoane.
– Pfffff.
– Auzi, e la fel de slab ca Simona.
– Minuni românești?
– Mda, minunate. Nu cred că sunt silicoane. Dar îmi plac oricum.
– Sâni să fie!
– Ce meci plicticos! Și celălalt a fost la fel.
Salt de 33 de locuri
Marius Copil a reușit cel mai bun turneu din carieră la Basel, unde, deși a început din calificări, a ajuns până în finală. Acolo, el a făcut o figură onorabilă în fața lui Roger Federer, care a câștigat greu, cu 7-6 (5), 6-4.
Urmărește cel mai nou VIDEO Știri VIDEO | Sărbătoare mare la Timișoara după ce a câștigat Dominic Fritz
În urma acestui turneu fabulos, Marius Copil a făcut un salt de 33 de locuri în clasamentul ATP, de pe locul 93 până pe locul 60.
VIDEO/ Daniel Robu și Silvia, foști colegi în trupa De La Vegas, nu au mai urcat pe scenă împreună de zece ani! Sunt ceruți la pachet la evenimente!
A pierdut jobul plătit cu 10.000 de dolari pe lună, după ce a comis un atac revoltător pe stradă. Ce a putut face femeia
PARTENERI - GSP.RO Simona Halep despre cele mai grele două momente din viață: „E ceva personal. Nu am vorbit despre asta, nici părinții nu au știut”
PARTENERI - PLAYTECH Noua hartă politică a României. Câți primari și consilieri au PSD, PNL, USR-Plus, în țară
HOROSCOP Horoscop 28 septembrie 2020. Peștii au nevoie de mult dorita liniște și aceasta este greu de obținut
Scoala9.ro EDUCAȚIA ÎN LUME. Protestul „nu contează cât de lung am părul” al elevilor thailandezi | {
"pile_set_name": "OpenWebText2"
} |
Association of Pension Lawyers
The Association of Pension Lawyers (APL) is a group of more than 1,100 lawyers who practise pension law in the UK. It is a non-profit making organisation and has no connection with the Law Society. Founded in 1984, it represents a forum by which lawyers in different firms and barristers' chambers can exchange knowledge and opinions on pension law and developments. The APL represents an unusually successful example of co-operation between rival lawyers, and the Employment Lawyers Association (ELA) was modelled on it. Its current chairman is Hywel Robinson and its current secretary is Isobel Carruthers.
It has a strong educational element, with an annual conference, frequent seminars and training conferences for more junior pension lawyers. The APL makes technical (but not political) representations on proposed legislative and regulatory changes. It also offers substantial social networking opportunities between pension lawyers, who as a result are more familiar with each other than is customary in other legal disciplines in the UK. Almost all practising pension lawyers subscribe to APL membership, given the practical benefits of membership.
References
External links
APL web site
Category:Bar associations
Category:1984 establishments in the United Kingdom
Category:Organizations established in 1984
Category:Legal organisations based in the United Kingdom
Category:Pensions in the United Kingdom | {
"pile_set_name": "Wikipedia (en)"
} |
package com.coderising.ood.srp;
import com.coderising.ood.srp.utils.DBUtil;
import com.coderising.ood.srp.utils.MailUtil;
import com.coderising.ood.srp.utils.ArgsUtil;
import java.io.IOException;
import java.util.*;
/**
* PromotionMail
*
* @author Chenpz
* @package com.coderising.ood.srp
* @date 2017/6/12/23:33
*/
public class PromotionMail {
private ProductInfo productInfo;
private List<MailInfo> mailInfoList = new ArrayList<>();
private static final String NAME_KEY = "NAME";
private static final String EMAIL_KEY = "EMAIL";
public PromotionMail(){}
public PromotionMail(ProductInfo productInfo) throws Exception {
this.productInfo = productInfo;
initMailInfoList(loadMailingList());
}
/**
* 获取每个型号的手机关注的人员信息列表
* @return
* @throws Exception
*/
private List<Map<String, String>> loadMailingList() throws Exception {
String sql = "select name from subscriptions "
+ "where product_id= '" + productInfo.getProductID() +"' "
+ "and send_mail=1 ";
return DBUtil.query(sql);
}
/**
* 组装促销邮件的内容信息
* @param mailingList
*/
private void initMailInfoList(List<Map<String, String>> mailingList) {
if (ArgsUtil.isNotEmpty(mailingList)){
for (Map<String, String> map : mailingList){
// 初始化 mailInfoList
mailInfoList.add(buildMailInfo(map));
}
}
}
/**
* 组装邮件内容信息
* @param userInfo
* @return
*/
private MailInfo buildMailInfo(Map<String, String> userInfo){
String name = userInfo.get(NAME_KEY);
String subject = "您关注的产品降价了";
String message = "尊敬的 "+name+", 您关注的产品 " + productInfo.getProductDesc() + " 降价了,欢迎购买!" ;
String toAddress = userInfo.get(EMAIL_KEY);
return new MailInfo(toAddress, subject, message);
}
/**
* 发送促销邮件
* @param debug
* @throws IOException
*/
public void sendEMails(boolean debug) throws IOException {
System.out.println("开始发送邮件... ...");
if (ArgsUtil.isNotEmpty(mailInfoList)) {
for (MailInfo mailInfo : mailInfoList){
MailUtil.sendEmail(mailInfo.toAddress, mailInfo.subject, mailInfo.message, debug);
}
}else {
System.out.println("没有邮件发送... ...");
}
}
class MailInfo{
private String toAddress = null;
private String subject = null;
private String message = null;
MailInfo(String toAddress, String subject, String message){
this.toAddress = toAddress;
this.subject = subject;
this.message = message;
}
}
}
| {
"pile_set_name": "Github"
} |
Q:
Sprite-Kit: Two different gravity vectors in one scene?
I'd like to have two objects in one scene, one which is pulled downwards, and one which is pulled upwards, but I can only specify one gravity vector which is applied to all objects in the physics world.
If there is no way to do this with gravity, how do I best go about it without it?
A:
All right, so I ended up doing what rickster proposed: regularly applying a constant vector to my objects.
var pullDown = SKAction.runBlock({self.pullBirdDown()})
var pullUp = SKAction.runBlock({self.pullBirdUp()})
var wait = SKAction.waitForDuration(0.01)
bird1.runAction(SKAction.repeatActionForever(SKAction.sequence([pullDown, wait])))
bird2.runAction(SKAction.repeatActionForever(SKAction.sequence([pullUp, wait])))
| {
"pile_set_name": "StackExchange"
} |
Bessel-Gauss pulse as an appropriate mathematical model for optically realizable localized waves.
We show that the field of the optically feasible luminal localized wave solutions of the scalar homogeneous wave equation can be modeled by means of Bessel-Gauss pulses. As the Bessel-Gauss pulses have a closed-form expression, this fact may be of great value in numerical simulations of various experimental situations. | {
"pile_set_name": "PubMed Abstracts"
} |
Q:
How do I add css to a line like document.write(text[0]);
I've already tried this:
document.write(<div class="line01"> + text[0] + </div>);
A:
That looks ok as far as the CSS goes, but the elements to output should be in a string:
Change this:
document.write(<div class="line01"> + text[0] + </div>);
To this:
document.write('<div class="line01">' + text[0] + '</div>');
More on document.write can be found here
| {
"pile_set_name": "StackExchange"
} |
Top-Rated Skin Doctors – The Solution for Your Skin
It’s the desire of every man and woman to have fresh skin and a trouble-free face. Numerous conditions can result in your skin having wrinkles. This might occur because of skin diseases, such as:
Acne
Eczema
Skin cancer
Moles
Skin tumors
Psoriasis
Melanomas
Any person diagnosed with any of these conditions is usually referred to a dermatologist through their doctor. Dermatologists mainly specialize in the management of any skin-related problems.
How to Qualify as a Top-Rated Skin Doctor in the US
For you to qualify to fit in the group of top-rated skin doctors in the U.S, you must have graduated from a recognized medical school. Additionally, you must pass through severe training by an experienced skin doctor.
Skin doctors who graduate from other countries are required by the law to secure a foreign graduate certificate before they qualify to be active dermatologists when they go back to the US.
Dermatologists are just like any other doctor because they are well acquainted with training and skills as medical doctors, but specifically in dealing with all skin conditions.
Skin Remedies
For some skin doctors, when offering a skin treatment, they have a long list of medication from which to select the most suitable remedy for your skin condition.
The most common treatments applied by these doctors include:
Sclerotherapy
Liposuction
Tissue augmentation
Laser resurfacing
Use of chemical pills
Dermabrasion
Other skin disorders conditions are as a result of aging, which is mostly characterized by loss of hair and skin discoloration.
Other skin doctors have specializations in providing cure to cosmetic-related issues, such as eyelid surgery, Botox injections, and collagen injections.
Extra Services Offered for by Skin Doctors
As much as dermatologists are perceived as specialists in all skin conditions, they can still offer other remedies. These include treating infectious skin diseases or even those conditions that lower your immune system. Such dermatologists are assigned duties in the hospital that are prone to certain contagious diseases.
Skin doctors have accredited experience in acting as pediatrics. These doctors help in solving severe skin conditions in children, like eczema and all skin allergies. These dermatologists offset all complex medical conditions accompanied by numerous symptoms.
Many people think that dermatologists are only meant to attend to skin complications; more so those caused by acne. However, this is not always the case. This particular field of medicine brings more than you can imagine.
The skin is the largest organ on a human body. A dermatologist holds a very crucial responsibility in the medical profession as it is the specialist who is always summoned to attend to numerous rare and severe skin conditions and diseases.
Skilled in performing all diagnosis and fragile surgical processes, dermatologists fall in the same group of top rated doctors from other medical fields, such as surgeons.
When seeking the services of a dermatologist, you must always choose the best who will offer your skin the long-lasting solution. This can only be achieved if you go for the best professionals in the field. | {
"pile_set_name": "Pile-CC"
} |
This invention relates to neckties, particularly to a device and method for tying a necktie to a desired length. | {
"pile_set_name": "USPTO Backgrounds"
} |
Search teams scour 21-mile area along the Big Thompson River in Loveland
9/18 4 pm -- Search crews with dogs from outside Colorado are looking for people in the flooding aftermath. Lindsey Sablan reports from Loveland.
KMGH
The search and rescue team team includes people and dogs from federal search teams based in Boone County, Missouri and Clark County, Nevada
Copyright 2013 Scripps Media, Inc. All rights reserved. This material may not be published, broadcast, rewritten, or redistributed.
Bailey, a search dog with a federal team based in Clark County, Nevada.
Copyright 2013 Scripps Media, Inc. All rights reserved. This material may not be published, broadcast, rewritten, or redistributed.
LOVELAND, Colo. - A crew of 33 people and eight dogs searched a 21-mile area along Big Thompson River in Loveland on Wednesday.
In addition to the searchers from the Poudre and Loveland Fire Authorities, the team includes people and dogs from federal search teams based in Boone County, Missouri and Clark County, Nevada. They're looking for people who could be trapped or killed in the massive debris flow.
"We're doing good, the crews are holding their own. They're working longs hours," said Jason Starck, a battalion chief with the Loveland Fire Rescue Authority. "They're spirits are up and we're just trying to get one task off the list at a time."
"The dogs are trained to alert for live human scent," said Dr. Erin Venable, a K-9 handler with the team from Boone County, Missouri. "What we're doing basically is clearing any spot where a human could possibly be and we’re also making sure we haven’t missed someone who might have been stuck in the debris field."
The dogs are Labrador retrievers and German Shepherd breeds who were trained and certified in a process that takes up to two years. The training includes behavior, agility and search practice.
"By the time these dogs make it to this level, they are literally the best of the best," Venable said.
The large scale of the search provides unique challenges for the dogs, she explained.
"We need to keep dogs happy, need to keep dogs motivated," she said, "So we’ll stop every now and then and just offer dogs motivation."
The muddy, potentially hazardous debris makes it difficult for the searchers and the dogs.
"Obviously mud and silt is the biggest thing," Starck said. "Some of that acts like quicksand. When we step in it, we go down to our waist."
"I was just down in the bottoms with our team and we had to get three of us to get one guy out of the mud," he continued.
Starck explained that a hazardous materials team will be in the area Thursday to handle all the propane tanks and sewage that was swept downhill by the flood.
"We have human waste that's come down from the canyon. We know we have 55-gallon drums and various other primarily oil facilities that have spilled out a little bit. Propane is probably our biggest hazardous material we're trying to deal with," he said.
Copyright 2013 Scripps Media, Inc. All rights reserved. This material may not be published, broadcast, rewritten, or redistributed. | {
"pile_set_name": "Pile-CC"
} |
Colchester County High School
Colchester County High School for Girls is a selective girls' grammar school with academy status in Colchester, Essex. The school consistently scores highly in the league tables for the UK. It was joint first in the country in the 2018 secondary GCSE league tables, and ninth in the country in the 2015 A-Level league tables. Entrance to Year 7 is by an academic selection test, the Eleven Plus. Entrance into Year 12 is by GCSE grades, although priority is given to pre-existing pupils.
History
The school was originally located in the Albert Hall in the High Street (now the Co-operative Bank), until its intended premises at the top of North Hill (now the Sixth Form College) were completed. Later, the lower school moved to Greyfriars on East Hill and, in 1957, moved to new buildings in Norman Way, off Lexden Road. Most of the buildings are unchanged, but an extension, including new Science laboratories and Sixth Form facilities was added in 2002. The 'mSchool' was added between 2006 and 2009, with new facilities for Music, Mathematics and the Mind; its 'iLab' (innovation laboratory) is one of the few in the UK outside a University.
Currently, the school is undergoing a 'Big Build'. The project includes a dining hall extension, which was completed in 2016; new classrooms, including a new healthy living studio; a new sixth form centre with a lecture theatre and an IT suite, both completed in 2018; and a new sports hall and 25-metre indoor swimming pool with changing rooms, which are both currently being built. In 2017, the top floor of the science block, or 'S-block’, was refurbished to facilitate the Colchester Teacher Training Consortium (CTTC).
It was founded in 1909 as a girls' school for Colchester, and subsequently became a grammar school admitting girls from North East Essex and beyond on the basis of an 11+ selection test. The school is situated a mile to the west of central Colchester, and celebrated its centenary in 2009–2010.
Specialisms
The school was one of the first Science Specialist Schools in the country. It later became a specialist Modern Language school too, teaching French and German as well as Latin.
School motto
Wisdom Giveth Life has been the school's motto since the school opened in 1909. This reading is still included in the traditional school assembly at the start of each academic year:
Notable alumni
Charlotte Atkins – MP for Staffordshire Moorlands
Helen Boaden, director, BBC News
Pamela Brown – writer
Georgina Cates – actor (born Clare Woodgate)
Beth Chatto – gardener
Saskia Clark – GB Olympic Gold Medal Winning Sailor
Stella Creasy – MP for Walthamstow
Christine Davies Professor of Physics at the University of Glasgow
Helen Mary Jones – member for Llanelli of National Assembly for Wales
References
Category:Girls' schools in Essex
Category:Grammar schools in Essex
Category:Educational institutions established in 1909
Category:1909 establishments in England
Category:Academies in Essex
Category:Schools in Colchester (town) | {
"pile_set_name": "Wikipedia (en)"
} |
Just to See You Smile
"Just to See You Smile" is a song written by Mark Nesler and Tony Martin, and performed by American country music artist Tim McGraw. It was released in August 1997 as the third single from McGraw's fourth studio album Everywhere. Having spent 42 weeks on the Billboard chart, it set what was then a record for being the longest-running single on the Billboard country chart since the inception of Nielsen SoundScan in 1990. It was also the longest chart run for any country single in the 1990s. The song was also released by Mitchell Tenpenny in 2018.
Critical reception
Kevin John Coyne of Country Universe gave the song an A grade, saying McGraw "plays his cards so close to his chest that upon first listen, you may only pick up on his unconditional love and selflessness toward the girl who’s been stringing him along for all these years."
Track listing
Single
Just To See You Smile 3:34
Everywhere 4:50
Chart performance
"Just to See You Smile" debuted in August 1997 and surged in November. It became McGraw's third consecutive No. 1 single from Everywhere, spending six weeks atop the Billboard magazine Hot Country Singles & Tracks chart in January and February 1998. It was also McGraw's second single to be declared by Billboard as the Number One country single of the year. No music video was made for this song.
Chart positions
Year-end charts
Certifications
References
External links
Category:1997 singles
Category:Tim McGraw songs
Category:Billboard Hot Country Songs number-one singles
Category:Songs written by Mark Nesler
Category:Songs written by Tony Martin (songwriter)
Category:RPM Country Tracks number-one singles
Category:Billboard Hot Country Songs number-one singles of the year
Category:Song recordings produced by Byron Gallimore
Category:Song recordings produced by James Stroud
Category:Curb Records singles
Category:1997 songs | {
"pile_set_name": "Wikipedia (en)"
} |
Spreadsheet applications provide many well known benefits including data organization, computation, analysis and presentation. Spreadsheet applications allow users to work in offline data editing sessions, as well as online data editing sessions where spreadsheet applications may be linked to databases from which data may be imported for editing and manipulation. During online editing sessions, spreadsheet applications may also export data out to databases for storage of the exported data. However, prior systems do not allow for bi-directional communication between a spreadsheet application worksheet and a database. That is, according to prior systems, data may be brought into a spreadsheet application worksheet and read, and the data may be refreshed, but at no time may changes in the data be written back to the data source for modifying or updating the source data in the database. At most, the modified data may be written to a new table or other memory location in the database.
Accordingly, there is a need for a method and system for allowing bi-directional communication between a spreadsheet application and a database that allows modified data to be written from a spreadsheet application worksheet to source data in a database from which the original pre-modified data was obtained. There is further a need for a method and system for supporting offline data changes in a spreadsheet application that may be published to a remote data source when a connection is re-established between the data source and the spreadsheet application. There is further a need for a method and system for resolving conflicts associated with writing data from a spreadsheet application worksheet to a database data source. It is with respect to these and other considerations that the present invention has been made. | {
"pile_set_name": "USPTO Backgrounds"
} |
Ernst Ferdinand Nolte
Ernst Ferdinand Nolte (24 December 1791, Hamburg – 18 February 1875, Kiel) was a German botanist. He was son-in-law to chemist Christoph Heinrich Pfaff (1773–1852).
After duties as a pharmacy apprentice in Goslar, he studied medicine at the University of Göttingen. While a student, he engaged in frequent botanical excursions throughout northern Germany. In 1817 he finished his studies at Göttingen, and later came under the influence of Danish botanist Jens Wilken Hornemann (1770–1841). From 1821 to 1823 he conducted botanical investigations in Lauenburg and the "Elbe Duchies", later taking scientific excursions to Zealand, Funen, Jutland and islands off both coasts of the Schleswig-Holstein mainland.
From 1826 to 1873 he was a professor of botany at the University of Kiel, as well as director of its botanical garden. He was an instructor to Ferdinand von Mueller (1825–1896), who would later be known for his botanical work in Australia.
The plant genus Noltea from the family Rhamnaceae is named in his honor, as is Zostera noltei, a species of seagrass (named by Jens Wilken Hornemann, 1832).
Written works
He made significant contributions to the botanical atlas Flora Danica, and was the author of the following publications:
Botanische Bemerkungen über Stratiotes und Sagittaria, 1825
Novitiæ floræ Holsaticæ : sive supplementum alterum Primitiarum floræ Holsaticæ G. H. Weberi, 1826
Index seminum horti botanici Kiliensis, c. 1836–41.
References
Biographical information @ Allgemeine Deutsche Biographie
Category:1791 births
Category:1875 deaths
Category:People from Hamburg
Category:University of Kiel faculty
Category:University of Göttingen alumni
Category:German botanists | {
"pile_set_name": "Wikipedia (en)"
} |
<?xml version="1.0" encoding="UTF-8"?>
<message>
<name>MFNM14</name>
<description>Master File Notification - Site Defined</description>
<segments>
<segment>MSH</segment>
<segment minOccurs="0" maxOccurs="unbounded">SFT</segment>
<segment>MFI</segment>
<group maxOccurs="unbounded">
<segment>MFE</segment>
<segment>ANY</segment>
</group>
</segments>
</message>
| {
"pile_set_name": "Github"
} |
Palestinian National Council to Reassemble, 1st Time in 7 Years
Ramallah, West Bank (IMEMC) – The Palestinian National Council, the PLO’s legislative body, will hold an emergency meeting — the first in seven years — at some point in the next month, a member of the PLO Executive Committee said Saturday.
Bassam al-Salhi told Ma’an News Agency that the exact date for the meeting would be decided at a PLO Executive Committee meeting in Ramallah later on Saturday, but added it would likely take place before the Muslim holiday of Eid al-Adha on September 23.
Al-Sahli added that President Mahmoud Abbas would urge the committee to agree on holding the PNC meeting as soon as possible.
The 740-member PNC is responsible for deciding on PLO policies and electing the Executive Committee, the PLO’s primary executive body.
Arabic media has speculated that the upcoming meeting may result in changes to the Executive Committee and could pave the way for Abbas’ resignation from office.
Last month, PLO officials dismissed rumors of the president’s resignation, although sources close to Abbas did not deny the possibility, saying that “important, and maybe dangerous, decisions” are likely to be made in September, coinciding with the UN General Assembly’s 70th session.
Al-Sahli added that the PNC meeting may take place before Abbas’ scheduled trip to the UN summit on Sep. 15.
He added that the meeting will either be held in Ramallah or Bethlehem.
The last PNC meeting was an emergency meeting held in 2009 to replace six vacant positions, while the last Executive Committee elections were held in 1996 during a PNC session in Gaza.
Mahmoud AbbasImage Source: Olivier Pacteau, Flickr, Creative Commons
This report was prepared by IMEMC.
IMEMC is a media center developed in collaboration between Palestinian and International journalists to provide independent media coverage of Israel-Palestine.
Note from The Fifth Column: Reports circulating that Abbas has already resigned and left office have been categorically denied by PLO leadership. | {
"pile_set_name": "Pile-CC"
} |
Cloud Training Classes in Nashville, Tennessee
Learn Cloud
in Nashville, Tennessee and surrounding areas via
our hands-on, expert led courses.
All of our classes are offered on an onsite,
online and public instructor led basis. Here is a list of our current
Cloud related training offerings
in Nashville, Tennessee: Cloud Training
Get pricing information (3 or more students may receive a discount)
Contact us to discuss our pricing structure for groups of 3 or more attendees.
The world of technology moves faster than the speed of light it seems. Devices are updated and software upgraded annually and sometimes more frequent than that. Society wants to be able to function and be as productive as they can be as well as be entertained “now”.
Software companies must be ready to meet the demands of their loyal customers while increasing their market share among new customers. These companies are always looking to the ingenuity and creativity of their colleagues to keep them in the consumer’s focus. But, who are these “colleagues”? Are they required to be young, twenty-somethings that are fresh out of college with a host of ideas and energy about software and hardware that the consumer may enjoy? Or can they be more mature with a little more experience in the working world and may know a bit more about the consumer’s needs and some knowledge of today’s devices?
Older candidates for IT positions face many challenges when competing with their younger counterparts. The primary challenge that most will face is the ability to prove their knowledge of current hardware and the development and application of software used by consumers. Candidates will have to prove that although they may be older, their knowledge and experience is very current. They will have to make more of an effort to show that they are on pace with the younger candidates.
Another challenge will be marketing what should be considered prized assets; maturity and work experience. More mature candidates bring along a history of work experience and a level of maturity that can be utilized as a resource for most companies. They are more experienced with time management, organization and communication skills as well as balancing home and work. They can quickly become role models for younger colleagues within the company.
Unfortunately, some mature candidates can be seen as a threat to existing leadership, especially if that leadership is younger. Younger members of a leadership team may be concerned that the older candidate may be able to move them out of their position. If the candidate has a considerably robust technological background this will be a special concern and could cause the candidate to lose the opportunity.
Demonstrating that their knowledge or training is current, marketing their experience and maturity, and not being seen as a threat to existing leadership make job hunting an even more daunting task for the mature candidate. There are often times that they are overlooked for positions for these very reasons. But, software companies who know what they need and how to utilize talent will not pass up the opportunity to hire these jewels.
Straight up and full disclosure. I'm prejudiced. As a research assignment, the heading is a joke. I'll give you the answer in two words, and then tell you why.
How does HTML 5 compare with flash? Answer: it doesn't.
Lest you think I dislike Adobe's Flash, let's put the cards on the table. I loved Flash. Long before Adobe was Adobe, they had a competitor called Macromedia. Adobe bought that firm. That made my life simpler. I only had to work with one vendor.
Flash was a pretty compelling solution. I used it to mimic operations in Windows to prepare people for the CompTIA exams. The only bugaboo was that dang right-click stuff. A little bit of code from the Microsoft Visual Studio .Net let me flip the left and right mouse buttons so that the right mouse button instead of controlling the Flash player, emulated doing a right-click in the Windows operating system.
People are optimistic about problem solving, but in most cases this is easier said than done. How do you do it?
In Adobe’s 2016 global study on creativity in business, 96% of people identified creativity as essential to their success, both in terms of their income and the value they bring to the world. Moreover, 78% wished they were capable of thinking differently, believing that they would progress through their careers more quickly if they did.
According to Malcom Gladwell, the world's most successful people have one thing in common: they think differently from most everyone else. In his book, How Successful People Think, Malcom opens with the following: “Good thinkers are always in demand. A person who knows how may always have a job, but the person who knows why will always be his boss. Good thinkers solve problems, they never lack ideas that can build an organization, and they always have hope for a better future”
Too often we attribute creative and “different” thinking to natural, innate characteristics that belong only to the lucky. The truth is that you can study how ridiculously successful people think and incorporate their approach into your world.
With stiff penalties for being caught and the whiff of secretive underground or even nefarious acts, computer hacking can be seen as a somewhat dubious pursuit. Not all hackers operate with the motive of emptying your Paypal account, however; there are many hackers who utilize their skills to aid companies in locating security flaws ("penetration testing") or engage in hacking with the goal of becoming cyber-freedom-fighters that champion simple human freedoms, such as the right to free speech.
Computer hacking is as much an art as it is a skill. At its simplest distillation, hacking is the systematic search for chinks in programming armor. While advanced problem-solving, intuition and sophisticated understanding of programming languages are a distinct advantage, there does exist a number of push-button programs that computing wizards have written allowing those less sophisticated in the art of hacking to break into remote computers in a variety of ways. Because of this new ubiquity, today's hackers no longer need to be a programming Wunderkind; they simply need to know where to download software and be able to turn on a computer. It really is that simple and the implications can be disturbing.
Phishing, Push-Button Programs and Brute Force Tactics
There's no need to crack a company's firewall if you have direct physical access to their computers. One aspect of hacking is the impersonation of an employee or service worker with the goal of gaining access to a company's database, where the hacker can then unleash whatever havoc he or she has planned into the system. Another is to engage in simple phishing techniques, such as impersonating an employee who forgot their password and needs help logging into the system.
Because such impersonations often fail thanks to companies becoming more security-conscious, taking over operations of a computer remotely is often the preferred method of gaining access. Such attempts can be facilitated in a variety of ways. One is the brute-force method, in which a program such as SQLmap, Nmap or Burpsuite is used; running one of these programs is analogous to trying every doorknob in a neighborhood to see which house is unlocked. Using a variety of different parameters, these programs can find access to a vulnerable computer or network in less than a minute.
Hackers can also attempt to gain access with a program like Metasploit. With literally a few clicks of a mouse, access to a remote and vulnerable computer can be achieved by a relative newbie. With a related hacking aid, called Meterpreter, a backdoor is created that allows access into an operating system. It does not install itself onto the remote computer, running instead using the computer's memory; in fact, Meterpreter can hide itself inside the operations of a perfectly valid program, so it cannot be detected even by sophisticated programmers. Once engaged, it allows a remote user carte blanche access to the system in question.
Where to Learn the Art of Hacking
Of course, for those who wish to learn the actual skills rather than download someone else's hack, there are a number of practice sites that pose an increasingly difficult set of challenges intended to train neophytes in the art of hacking. For example, Hack This Site starts beginners with the goal of cracking simple flaws in coding scripts or software such as HTML, Unix, Javascript and Apache. Their structured series of tests increase in complexity, incorporating real-word scenarios and even old-fashioned "phone phreaking" challenges that recall the bygone golden age of hacking skills displayed by Matthew Broderick in "WarGames."
Using just these simple tools and free practice sites, beginners have a powerful array of hacking resources just a simple mouse click away.
Tech Life in Tennessee
Tennessee has played an important role in the development of many forms of American popular music. Bristol is known as the birthplace of country music while Memphis is considered by many to be the birthplace of the blues.
Tennessee is a right to work state, as are most of its Southern neighbors. Major corporations with headquarters in Tennessee include FedEx Corporation, AutoZone Incorporated and International Paper
Failure is the opportunity to begin again, more intelligently. Henry Ford
other Learning Options
Software developers near Nashville have ample opportunities to meet like minded techie individuals,
collaborate and expend their career choices by participating in Meet-Up Groups. The following is a list of
Technology Groups in the area.
the hsg library depth in learning
training details locations, tags and why hsg
A successful career as a software developer or other IT professional requires a solid
understanding of software development processes, design patterns, enterprise application architectures,
web services, security, networking and much more. The progression from novice to expert can be a
daunting endeavor; this is especially true when traversing the learning curve without expert guidance. A
common experience is that too much time and money is wasted on a career plan or application due to misinformation.
The Hartmann Software Group understands these issues and addresses them and others during any
training engagement. Although no IT educational institution can guarantee career or application development success,
HSG can get you closer to your goals at a far faster rate than self paced learning and, arguably, than the competition.
Here are the reasons why we are so successful at teaching:
Learn from the experts.
We have provided software development and other IT related training
to many major corporations in Tennessee since 2002.
Our educators have years of consulting and training
experience; moreover, we require each trainer to have cross-discipline expertise i.e. be Java and .NET experts so
that you get a broad understanding of how industry wide experts work and think. | {
"pile_set_name": "Pile-CC"
} |
065663?
5065656
In base 11, what is 31a1 - 2?
319a
In base 10, what is -1652 + -13?
-1665
In base 9, what is 27 + 38731?
38758
In base 11, what is 9 - aa991?
-aa983
In base 2, what is 11010011001011000 - -100?
11010011001011100
In base 9, what is -20 - -14274?
14254
In base 13, what is -3aca71 + 3?
-3aca6b
In base 10, what is 4 + -486375?
-486371
In base 11, what is -1 + -21737?
-21738
In base 8, what is 602057 + 0?
602057
In base 15, what is b + -ada?
-ace
In base 3, what is 0 - 1010002010212?
-1010002010212
In base 10, what is 1 + -6296?
-6295
In base 15, what is dc6 - -24?
dea
In base 16, what is 295c - -1?
295d
In base 16, what is 2 - 7ef4?
-7ef2
In base 10, what is 0 + 5517?
5517
In base 13, what is 2 + 10220?
10222
In base 13, what is -2 - -5954a?
59548
In base 8, what is 4 - -7276?
7302
In base 10, what is -288 - -1287?
999
In base 11, what is -181a5 + 40?
-18165
In base 8, what is 0 - -4123077?
4123077
In base 12, what is -a86 - -34?
-a52
In base 14, what is 3 + 3c194?
3c197
In base 12, what is -5 + -625b4?
-625b9
In base 7, what is 10465 + 2513?
13311
In base 2, what is 101 - 101011000011?
-101010111110
In base 3, what is 10202220 + -220?
10202000
In base 11, what is 0 + -1091313?
-1091313
In base 11, what is 9a5 - -7a?
a74
In base 3, what is 22011010000212 + 10?
22011010000222
In base 4, what is 212020 + 2032?
220112
In base 8, what is -162 - 163?
-345
In base 6, what is -235334 - 2?
-235340
In base 10, what is -59651 + 9?
-59642
In base 2, what is 11101001010 - 1?
11101001001
In base 3, what is 1220202122 - 12?
1220202110
In base 10, what is 4 + 88016?
88020
In base 6, what is -1245123 - -10?
-1245113
In base 15, what is -e23 + -1a?
-e3d
In base 12, what is b2 + -53?
5b
In base 9, what is -260 + -487?
-757
In base 10, what is -34677 + -24?
-34701
In base 7, what is -154 + -1240?
-1424
In base 11, what is 61431 - -40?
61471
In base 7, what is 4205 + 101?
4306
In base 11, what is 1 - 12068?
-12067
In base 9, what is -5 + 30062?
30056
In base 6, what is -405151 + -42?
-405233
In base 2, what is 11100111100111101011 - 101?
11100111100111100110
In base 8, what is -2372 + -23?
-2415
In base 6, what is 3243 - -525?
4212
In base 7, what is -6 + -13346?
-13355
In base 13, what is -66 - 2b1?
-347
In base 13, what is -9c99 - 3?
-9c9c
In base 16, what is 2bb7ae - 3?
2bb7ab
In base 7, what is -26 - 25266?
-25325
In base 4, what is -230 - 11013223?
-11020113
In base 15, what is -42c + -106?
-533
In base 4, what is -11 + -3211011233?
-3211011310
In base 12, what is -2 - 19468b?
-194691
In base 6, what is 25 - 113033?
-113004
In base 10, what is 251471 + 4?
251475
In base 6, what is 51214 + -2?
51212
In base 16, what is -918b + -1?
-918c
In base 8, what is -3 - 143577?
-143602
In base 3, what is 11021 + -211001?
-122210
In base 16, what is bb + -8bf?
-804
In base 13, what is 1b4c + -b?
1b41
In base 10, what is 0 + -464?
-464
In base 8, what is 10375 - -13?
10410
In base 13, what is 6 - 7bb3?
-7baa
In base 2, what is 1000111011 - 11?
1000111000
In base 8, what is 61431 - 5?
61424
In base 12, what is 47135 - 5?
47130
In base 9, what is 3374 - -5?
3380
In base 8, what is -305413 + 13?
-305400
In base 12, what is 390125 - -8?
390131
In base 2, what is 11000111110111 - -111111?
11001000110110
In base 8, what is 33 - -140617?
140652
In base 10, what is -5 - -12559?
12554
In base 16, what is 0 - -1ce6f?
1ce6f
In base 12, what is -29 + -2a8?
-315
In base 10, what is -202 - 484?
-686
In base 4, what is -121302 - -20?
-121222
In base 2, what is -101 + -1011110011000111?
-1011110011001100
In base 13, what is 3 - 1199cc?
-1199c9
In base 6, what is 150110 + 42?
150152
In base 7, what is 0 - -133362?
133362
In base 4, what is 10 + -13312313?
-13312303
In base 7, what is 3 - 2143622?
-2143616
In base 8, what is 72 - 2171?
-2077
In base 4, what is -313010002 + -2?
-313010010
In base 12, what is -323a - 184?
-3402
In base 10, what is -10 - 25874?
-25884
In base 10, what is 20 - 4513?
-4493
In base 16, what is -b43a6c - -1?
-b43a6b
In base 4, what is 1203332 + 3?
1210001
In base 5, what is 120432 + -40?
120342
In base 10, what is 2520 + -21?
2499
In base 14, what is 79 + -103?
-68
In base 11, what is 5 - -34296?
342a0
In base 16, what is -7176e + 2?
-7176c
In base 10, what is -42630 + 5?
-42625
In base 7, what is 10630 - -205?
11135
In base 13, what is 9 - -16409?
16415
In base 13, what is -1980 + 1a?
-1963
In base 10, what is -4 + -22100?
-22104
In base 14, what is 9b + 282?
33d
In base 3, what is -120200101 + 20010?
-120110021
In base 4, what is -20 - 221211?
-221231
In base 2, what is -10000 + 111010111100?
111010101100
In base 5, what is 3 + -102144231?
-102144223
In base 13, what is 1 + 107c54?
107c55
In base 9, what is -2360466 - 3?
-2360470
In base 10, what is 3 - -50287?
50290
In base 7, what is -2 - 1000033?
-1000035
In base 12, what is -4 + 1a587?
1a583
In base 10, what is 85810 + -2?
85808
In base 4, what is -1 - -3003212?
3003211
In base 10, what is 6894 - 46?
6848
In base 12, what is -62 + -22a8?
-234a
In base 13, what is -52a6 - -34?
-5272
In base 3, what is -22212221 + 20?
-22212201
In base 7, what is 5251 - 541?
4410
In base 2, what is 100 + -1001111011000111?
-1001111011000011
In base 13, what is 27b08 - 2?
27b06
In base 7, what is -166104 - 2?
-166106
In base 11, what is -221 - -3749?
3528
In base 7, what is 5 + -111056?
-111051
In base 15, what is 4c + -77?
-2a
In base 11, what is 2829aa + 5?
282a04
In base 12, what is 15a912 - 4?
15a90a
In base 14, what is -3a5a + -2?
-3a5c
In base 15, what is -330 + 174?
-1ab
In base 6, what is -42 - -1114424?
1114342
In base 13, what is -b7 + 552?
468
In base 15, what is -1 - -d89a?
d899
In base 5, what is -32211234 + -3?
-32211242
In base 11, what is -4a299 + 0?
-4a299
In base 14, what is -1139 - -29?
-1110
In base 4, what is -311002 - 111?
-311113
In base 4, what is -11 + 1332110?
1332033
In base 7, what is -1554 - -162?
-1362
In base 13, what is 7 + 1143?
114a
In base 12, what is -7b6 - 25?
-81b
In base 16, what is 453 - 6?
44d
In base 13, what is -1957 - b1?
-1a38
In base 16, what is -355 + dc?
-279
In base 15, what is -5 - 2671e?
-26724
In base 11, what is -109 + 753?
645
In base 15, what is -9 - bd24?
-bd2d
In base 14, what is 5a + -578?
-51c
In base 11, what is 14165 + -5?
14160
In base 4, what is 310202302 - -101?
310203003
In base 3, what is -11022011 + -1101?
-11100112
In base 3, what is 122 + -2111012?
-2110120
In base 4, what is -2 + 201220330?
201220322
In base 16, what is -2c + fd69?
fd3d
In base 16, what is -6ae3 + e?
-6ad5
In base 5, what is -112 + -11212?
-11324
In base 3, what is 0 - 10201222201?
-10201222201
In base 5, what is -100304 + 2022?
-43232
In base 9, what is 16324 - 5?
16318
In base 16, what is -765 + -2b?
-790
In base 8, what is -22 - 263277?
-263321
In base 2, what is 10111001 - -100000111101?
100011110110
In base 15, what is 15bb + 2?
15bd
In base 7, what is 1206554 + 3?
1206560
In base 6, what is 30 - 2225325?
-2225255
In base 8, what is 5 - 77615?
-77610
In base 8, what is -5570261 - -5?
-5570254
In base 6, what is 53304 - -1005?
54313
In base 3, what is -2000100110 + 10?
-2000100100
In base 11, what is -3 - 35870?
-35873
In base 12, what is -41 + a55?
a14
In base 11, what is 1664 - a?
1655
In base 15, what is e9 - a?
de
In base 6, what is -25 + -42424?
-42453
In base 16, what is -8d1 + 3?
-8ce
In base 15, what is 10c + 28?
135
In base 12, what is 1a87 + 2a?
1ab5
In base 10, what is -1438 + -24?
-1462
In base 6, what is -1025 - 14240?
-15305
In base 10, what is -1184 - -67?
-1117
In base 12, what is -2 + 24372?
24370
In base 5, what is 2314 - -21?
2340
In base 2, what is -110110110101111001 - -10?
-110110110101110111
In base 13, what is -1a + -709bc?
-70a09
In base 7, what is 404001 - 3?
403665
In base 16, what is -2 + -3a333?
-3a335
In base 13, what is -1187 - -85?
-1102
In base 7, what is -305042 + 5?
-305034
In base 12, what is aa - -2708?
27b6
In base 15, what is -4 - -a8a3?
a89e
In base 9, what is -308 + -137?
-446
In base 11, what is -88 + 517?
43a
In base 10, what is -76449 - 2?
-76451
In base 9, what is 28457 + -3?
28454
In base 11, what is 2a1a + 2?
2a21
In base 3, what is -12000210212 + 2001?
-12000201211
In base 4, what is -10212220 - 221?
-10213101
In base 4, w | {
"pile_set_name": "DM Mathematics"
} |
Saturday, January 4, 2014
Remarkable Reindeer
I was so excited to see reindeer at the San Diego Zoo! We learned so many interesting facts about them from our book Remarkable Reindeer. I can't be sure if this was a girl or boy reindeer since the female can have antlers too! | {
"pile_set_name": "Pile-CC"
} |
[In utero macrocephaly as clinical manifestation of glutaric aciduria type I. Report of a novel mutation].
Macrocephaly is a pivotal clinical sign, associated with multiple neurological diseases, particularly neurometabolical ones, such as the glutaric aciduria type I (GA I). This aciduria resulting from the genetical deficiency of the enzyme glutaryl-CoA dehydrogenase (GCDH). Is a relatively common cause of acute metabolic brain damage in early childhood. We report on one case of GA I, with early manifestations since fetal period and a novel mutation. Our patient was referred due macrocephaly in utero and occipitofrontal head circumference above the 98 percentile for chronologic age during first few months of life, hypotonia and development delay. The metabolic investigations of organic acids in urine and acylcarnitine profile in blood, the brain magnetic resonance and the molecular analyses of the glutaryl-CoA deshidrogenase gene, confirm the diagnosis. The molecular analysis allowed to identify one previously described mutation A293T and a novel mutation IVS5-2 A>G. It is important the recognition of in utero macrocephaly as a sign to early diagnosis of glutaric aciduria type I to initiate specific therapy to prevent the encephalopathic crises and minimize brain damage in patients who are already neurologically impaired. | {
"pile_set_name": "PubMed Abstracts"
} |
As part of its campaign to end malnutrition and hunger and to secure the future of Filipino children, Save the Children officially launched its Christmas campaign for 2018, ‘Lahat Dapat’ on Thursday, October 25, at Ascott Makati.
Supporters of the cause are encouraged to wear the ‘Lahat Dapat’ limited edition red scarf that is available on Save the Children’s website for Php500.00.
For those who will purchase a total of Php1,000.00, aside from the scarf, will get a chance to have their 10-second digital billboard spot along EDSA.
Present during the event is Save the Children ambassadress for this year’s campaign, Miss World Philippines 2018, Katarina Rodriguez.
“I can’t believe it’s been a year’ she said, ‘Last year I was able to donate 40 thousand pesos by selling my old clothes online” the Beauty Queen added.
Rodriguez, who share the same passion with Save the Children, revealed one of the reasons why she decided to join the cause.
“If I were not Miss World/beauty queen, I’d be a mother” Katarina said. “I’ve wanted to do something that would impact even one person’s life. Before I have my own family, I wanted to help the world somehow, and what better way than to help children. I believe in two things; sustainability and education.”
PAGEONE Media is a powerful portfolio of websites that serve over 10 million highly-engaged audience monthly. From young to adult men and women, our audience show an unparalleled commitment to our online platforms and content. | {
"pile_set_name": "Pile-CC"
} |
Trusts are now in the Opposition’s sights – investors urged to consider alternatives
“The recent tax hikes on contributions to super have significantly eroded the potential retirement savings of many Australians. Super isn’t necessarily the most tax-effective savings plan out there anymore.”
These are the words of Neil Rogan, a specialist in investment management and General Manager – Investment Bonds Division at Centuria Life following the latest in a range of ever-erodging super changes and the news that Bill Shorten has discretionary (family) trusts in his sights. If these are taxed at 30% as per his policy, there are very few tax-effective investment structures left.
Family trusts, even without a new tax, have some potential drawbacks
Family trusts, even if left untouched, which is far from certain, do not provide the same long term flexibility and simplicity as an investment bond. Family trusts work well to distribute income to family members on lower tax rates, but as soon as children over the age of 18 who are at University and eaning less money begin to work, and earn money, all the income distribution from a family trust does is create a tax problem for them. This is never the case with an investment bond.
And creating a trust and maintaining it is complicated, expensive and there are ongoing regulatory obligations.
Company structures just delay, not get rid of tax
Company structures have similar drawbacks, and really all they do is kick the tax liability down the road. They don’t do away with it.
Investment bonds are as tax-effective as super, more tax-effective than trusts or company structures and carry low regulatory risk. Why wouldn’t you consider one.
Investment bonds are not-only just as tax-effective as super, but are more flexible, simpler to administer and can be transferred tax-free to whoever you choose. And they have a low regulatory risk. Unlike super, and potentially family trusts.
“Australians are right to be concerned about Bill Shorten’s recent comments about changing the tax law as it relates to family trusts. With tax hikes and limits on contributions to super already in place, if discretionary trust fall under the Opposition’s hammer, investors will have very few tax-effective savings options left.
“That’s why investment bonds are worth a look now more than ever. They have low regulatory risk and the tax benefits can be at least as good as super, sometimes better. And they are simple, flexible, cheap to set up and you can access your money at any time,” says Mr Rogan.
How investment bonds work:
Investment bonds operate like a tax-paid managed fund. Tax is paid at the corporate rate of 30% within the bond structure. Depending on the underlying assets in the bond, effective tax could even be less.
Returns are re-invested in the bond and not distributed, and if this is maintained for 10 years, all proceeds are distributed tax free.
Additional contributions can be made throughout the life of the bond, up to 120% of the previous year’s contribution.
Because an investment bond is in structure an insurance policy with a life insured and a nominated beneficiary, funds can be transferred to a beneficiary tax free, and do not form part of the investor’s estate.
When super is passed on to non-dependent adult children, it is taxed at the rate of 17%, an investment bond’s proceeds are tax free. | {
"pile_set_name": "Pile-CC"
} |
Leaching of endocrine disrupting chemicals from marine microplastics and mesoplastics under common life stress conditions.
Microplastics (MPs) and mesoplastics are able to sorb harmful substances and often contain additives, e.g., endocrine disrupting chemicals (EDCs), that can cause adverse effects to organisms. The present study aims to determine EDC concentrations and their endocrine activities in leachates of field-collected marine MPs and mesoplastics under stress conditions that are known to occur during the plastic life cycle. Estrogens were the dominant EDCs on plastic particles and were either concentrated from the surrounding water or originated from plastic manufacturing. Bisphenol A had the highest detection frequency (75%) with an average concentration of 475 ± 882 μg/kg, followed by bisphenol S, octylphenol and nonylphenol. Moreover, smaller marine MPs leached greater quantities of EDCs because the sorption from surrounding seawater is more efficient for smaller particles. It was found that normal life stresses such as microwaving (MW) and autoclaving (AC) can decrease EDC concentrations, but solar irradiation (solar) can increase EDC concentrations in leachates. Even though organisms with higher metabolic ability exhibited greater estrogenic effects, the comprehensive toxicity of plastic leachates after common life treatments was still limited (below the EC10 value) if 0.1% is taken as the EDC uptake from plastic. In future studies, the accurate contribution of plastic bound EDCs needs to be further explored, and the monitoring of MPs and mesoplastics in the human diet remains important because the concentrations of these plastics may change in the future. | {
"pile_set_name": "PubMed Abstracts"
} |
(************************************************************************)
(* * The Coq Proof Assistant / The Coq Development Team *)
(* v * Copyright INRIA, CNRS and contributors *)
(* <O___,, * (see version control and CREDITS file for authors & dates) *)
(* \VV/ **************************************************************)
(* // * This file is distributed under the terms of the *)
(* * GNU Lesser General Public License Version 2.1 *)
(* * (see LICENSE file for the text of the license) *)
(************************************************************************)
(** * Hexadecimal numbers *)
(** These numbers coded in base 16 will be used for parsing and printing
other Coq numeral datatypes in an human-readable way.
See the [Numeral Notation] command.
We represent numbers in base 16 as lists of hexadecimal digits,
in big-endian order (most significant digit comes first). *)
Require Import Datatypes Decimal.
(** Unsigned integers are just lists of digits.
For instance, sixteen is (D1 (D0 Nil)) *)
Inductive uint :=
| Nil
| D0 (_:uint)
| D1 (_:uint)
| D2 (_:uint)
| D3 (_:uint)
| D4 (_:uint)
| D5 (_:uint)
| D6 (_:uint)
| D7 (_:uint)
| D8 (_:uint)
| D9 (_:uint)
| Da (_:uint)
| Db (_:uint)
| Dc (_:uint)
| Dd (_:uint)
| De (_:uint)
| Df (_:uint).
(** [Nil] is the number terminator. Taken alone, it behaves as zero,
but rather use [D0 Nil] instead, since this form will be denoted
as [0], while [Nil] will be printed as [Nil]. *)
Notation zero := (D0 Nil).
(** For signed integers, we use two constructors [Pos] and [Neg]. *)
Variant int := Pos (d:uint) | Neg (d:uint).
(** For decimal numbers, we use two constructors [Hexadecimal] and
[HexadecimalExp], depending on whether or not they are given with an
exponent (e.g., 0x1.a2p+01). [i] is the integral part while [f] is
the fractional part (beware that leading zeroes do matter). *)
Variant hexadecimal :=
| Hexadecimal (i:int) (f:uint)
| HexadecimalExp (i:int) (f:uint) (e:Decimal.int).
Declare Scope hex_uint_scope.
Delimit Scope hex_uint_scope with huint.
Bind Scope hex_uint_scope with uint.
Declare Scope hex_int_scope.
Delimit Scope hex_int_scope with hint.
Bind Scope hex_int_scope with int.
Register uint as num.hexadecimal_uint.type.
Register int as num.hexadecimal_int.type.
Register hexadecimal as num.hexadecimal.type.
Fixpoint nb_digits d :=
match d with
| Nil => O
| D0 d | D1 d | D2 d | D3 d | D4 d | D5 d | D6 d | D7 d | D8 d | D9 d
| Da d | Db d | Dc d | Dd d | De d | Df d =>
S (nb_digits d)
end.
(** This representation favors simplicity over canonicity.
For normalizing numbers, we need to remove head zero digits,
and choose our canonical representation of 0 (here [D0 Nil]
for unsigned numbers and [Pos (D0 Nil)] for signed numbers). *)
(** [nzhead] removes all head zero digits *)
Fixpoint nzhead d :=
match d with
| D0 d => nzhead d
| _ => d
end.
(** [unorm] : normalization of unsigned integers *)
Definition unorm d :=
match nzhead d with
| Nil => zero
| d => d
end.
(** [norm] : normalization of signed integers *)
Definition norm d :=
match d with
| Pos d => Pos (unorm d)
| Neg d =>
match nzhead d with
| Nil => Pos zero
| d => Neg d
end
end.
(** A few easy operations. For more advanced computations, use the conversions
with other Coq numeral datatypes (e.g. Z) and the operations on them. *)
Definition opp (d:int) :=
match d with
| Pos d => Neg d
| Neg d => Pos d
end.
(** For conversions with binary numbers, it is easier to operate
on little-endian numbers. *)
Fixpoint revapp (d d' : uint) :=
match d with
| Nil => d'
| D0 d => revapp d (D0 d')
| D1 d => revapp d (D1 d')
| D2 d => revapp d (D2 d')
| D3 d => revapp d (D3 d')
| D4 d => revapp d (D4 d')
| D5 d => revapp d (D5 d')
| D6 d => revapp d (D6 d')
| D7 d => revapp d (D7 d')
| D8 d => revapp d (D8 d')
| D9 d => revapp d (D9 d')
| Da d => revapp d (Da d')
| Db d => revapp d (Db d')
| Dc d => revapp d (Dc d')
| Dd d => revapp d (Dd d')
| De d => revapp d (De d')
| Df d => revapp d (Df d')
end.
Definition rev d := revapp d Nil.
Definition app d d' := revapp (rev d) d'.
Definition app_int d1 d2 :=
match d1 with Pos d1 => Pos (app d1 d2) | Neg d1 => Neg (app d1 d2) end.
(** [nztail] removes all trailing zero digits and return both the
result and the number of removed digits. *)
Definition nztail d :=
let fix aux d_rev :=
match d_rev with
| D0 d_rev => let (r, n) := aux d_rev in pair r (S n)
| _ => pair d_rev O
end in
let (r, n) := aux (rev d) in pair (rev r) n.
Definition nztail_int d :=
match d with
| Pos d => let (r, n) := nztail d in pair (Pos r) n
| Neg d => let (r, n) := nztail d in pair (Neg r) n
end.
Module Little.
(** Successor of little-endian numbers *)
Fixpoint succ d :=
match d with
| Nil => D1 Nil
| D0 d => D1 d
| D1 d => D2 d
| D2 d => D3 d
| D3 d => D4 d
| D4 d => D5 d
| D5 d => D6 d
| D6 d => D7 d
| D7 d => D8 d
| D8 d => D9 d
| D9 d => Da d
| Da d => Db d
| Db d => Dc d
| Dc d => Dd d
| Dd d => De d
| De d => Df d
| Df d => D0 (succ d)
end.
(** Doubling little-endian numbers *)
Fixpoint double d :=
match d with
| Nil => Nil
| D0 d => D0 (double d)
| D1 d => D2 (double d)
| D2 d => D4 (double d)
| D3 d => D6 (double d)
| D4 d => D8 (double d)
| D5 d => Da (double d)
| D6 d => Dc (double d)
| D7 d => De (double d)
| D8 d => D0 (succ_double d)
| D9 d => D2 (succ_double d)
| Da d => D4 (succ_double d)
| Db d => D6 (succ_double d)
| Dc d => D8 (succ_double d)
| Dd d => Da (succ_double d)
| De d => Dc (succ_double d)
| Df d => De (succ_double d)
end
with succ_double d :=
match d with
| Nil => D1 Nil
| D0 d => D1 (double d)
| D1 d => D3 (double d)
| D2 d => D5 (double d)
| D3 d => D7 (double d)
| D4 d => D9 (double d)
| D5 d => Db (double d)
| D6 d => Dd (double d)
| D7 d => Df (double d)
| D8 d => D1 (succ_double d)
| D9 d => D3 (succ_double d)
| Da d => D5 (succ_double d)
| Db d => D7 (succ_double d)
| Dc d => D9 (succ_double d)
| Dd d => Db (succ_double d)
| De d => Dd (succ_double d)
| Df d => Df (succ_double d)
end.
End Little.
| {
"pile_set_name": "Github"
} |
Q:
Suitability of Mathematica as platform for engineering calculations and programs
I am considering using Mathematica with Wolfram Workbench as a standard platform for calculations and programs in a large engineering department. I am looking for a solution that would provide better validation, documentation and revision control than Excel spreadsheets with VisualBasic macros. Additional benefits would be to use built-in functionality to reduce development effort and to allow engineers to use code interactively instead of in a black-box mode.
I have used Mathematica and WebMathematica for individual projects in the past, and am familiar with the various customer examples that Wolfram advertises. However, I don't have experience or examples of using Mathematica across a large engineering department.
I expect that we would develop packages for various back end functionality (likely on the order of 20,000+ lines of code), and users would access it either directly in the notebook, through CDF applications or through WebMathematica depending on the application.
Is Mathematica suitable for this type of use? Can average users learn Mathematica without too much trouble and become productive quickly? Is there a better solution you would suggest evaluating?
A:
I'm late and most of what I'll write has in one or another form already been said in some of the comments. Nontheless I can't resist to provide an answer. I might add that I'm working for a german based engineering service provider (SmartCAE) and we are using Mathematica as one of our main tools for almost 15 years, so we do have some experience in the field.
Here are the answers to your specific questions from my point of view:
From a pure technical point of view, Mathematica would definitely be suitable, and much more so than Excel.
Learning Mathematica can very well be seen as a lifetime's task. On the other hand I think it's possible to get ready to solve typical engineering tasks within a day, depending a lot on prior knowledge about mathematics and other tools or programming languages. But Mathematica is quite different than many other systems/languages, so at some point many people start to struggle. It needs a "positive attitude" to get past that point, and only after that one will reach the full productivity that it can provide. I would expect only a fraction of the engineers in a large departement to reach that point, everyone else will learn enough to get their jobs done but probably not enough to recognize/appreciate the added power that Mathematica could provide.
Considering engineering applications, I think there are alternatives, but I think they either do suffer from roughly the same weaknesses as Mathematica or are very (too) limited to what they were made for, which might or might not be a problem for your departement. Some of them might be more well known among engineers and thus have a lower acceptance threshold. From the pure technical point of view I'd consider Mathematica to be a good choice when compared to the alternatives.
For engineering applications both Mathematica and Excel do only provide a relatively low level platform, so you will probably need some additional tools to make your engineers productive. This could be a (or some) DSL as Leonid suggests, but maybe also just some other tools which will help the engineers to do their job without necessarily become software engineers and Mathematica experts. We have developed such tools for our internal usage, and without them would have a hard time to provide our services within the given cost limits. Actually I'd consider it necessary to provide such additional tools for Excel as well, but there some knowledge is implicitly expected from everyone working with a computer and people will happily (?) use and accept it as it is. That might be unfair but is a fact that simply can't be overseen.
That said, I think whether Mathematica can successfully be introduced in a larger departement which uses Excel at the moment is not so much a question of technical suitability. I'd rather see it as a "social task": Such a transition will force everyone to learn new things and will make experienced personell feel like beginners. Only if you can convince the key users ("tool providers") and a majority of the engineers that such a transition makes sense you can expect them to take that hurdle. If only some users with influence will not be convinced, I would expect such a transition to fail. As every software tool Mathematica has weak spots and oddities: these are usually easy to overcome and none of them does actually make Mathematica useless or very hard to use, but it's easy enough to make it look like that would be the case. Unfortunately it doesn't help that you can find such cases for the exisiting tools like Excel just as well, you can't expect people to make fair comparisons in such situations. So I think you'd really need to make sure that you have the support of users and the management. To gain that, you'll probably need to:
Ensure that everyone agrees that there is a problem with using Excel, maybe listing
everything that can't be done with it or has gone wrong in the past.
Persuade that Mathematica will solve those problems without introducing new ones.
Comparison with alternatives
Have ready a plan how the transition could be done
Have ready an estimation on what this will cost and what it might save/add in the future.
Especially the latter will need to be realistic, you'll most probably be cited on that. Costs will of course include training, licenses, expenses for rewriting existing tools, additional IT administration, etc.
A set of real world examples will help a lot, unfortunately many of the examples you'll find on WRI's pages are rather showing the principles, but don't really qualify as "real world" (IMHO). In many cases that's just because they avoid the "simple" things like importing and exporting data, providing numbers with units etc., in other cases they just don't provide all the parameters as inputs that you'd need to run real world examples. So you'd probably need to provide some examples yourself.
All in all that might be a big project. On the other hand, and that has also been mentioned in the comments, you could just as well try to introduce Mathematica as a tool in a less official way by just starting to provide useful stuff written with it. If you manage these tools to run in the CDF-Player, you could even give them away to your colleagues without causing additional costs. I think many "modern" tools have been introduced in such an "informal" way in large companies (I know some examples from german automotive companies, but unfortunately that hasn't happened to Mathematica in a larger scale (yet?)).
Of course that's only possible if your employer allows it.
A:
First comes a disclaimer that I don't have experience in introducing Mathematica to a large department, so you can take all I say with a grain of salt. That out of the way,
I think, the answer depends on the level of preparation and willingness to learn new things of the average user in your department, but, given that you anyway plan to deploy a rather large code base, I would recommend to create a framework or DSL on top of Mathematica, which would isolate the average user from the full complexity of Mathematica.
If you make a DSL, you can as well code it in Mathematica, and make it strongly typed. This assumes a separation between users and developers of such custom language. Once the users request some new feature, it is implemented in the language and made available to them. After a while, they may get used to the DSL and overall Mathematica workflow enough to be able to use parts of Mathematica directly.
As to learning and using Mathematica directly, this is also possible IMO, but your company will probably have to allocate a lot of resources, either sending the employees to WRI courses, or creating some in-house training courses. This will also probably require a really high motivation from the average user. I've heard many statements of how easy it is to learn Mathematica. Sadly, I only find this partly true - there are many subtleties, from which a beginner is not isolated and which can take a while to digest. I think it also depends on how "far" are the majority of tasks from what is already available in Mathematica.
So, to summarize: my opinion is that Mathematica definitely has a potential to cut your costs and save your department lots of time, but you will either have to make an effective learning system at your department, or implement some framework or language which would, at least during the initial stage of adoption, shield the new users from the complexity of the full Mathematica language. My two cents.
A:
I can’t speak directly about introducing Mathematica into engineering firms, but on the basis that many economists are wannabe engineers who couldn’t handle the maths, perhaps my observations will have some relevance. In my field, Mathematica is definitely a minority taste; Excel, eViews and Matlab dominate for different tasks.
Mathematica is not a data storage solution, whereas Excel is often used as one. Ideally, you should consider you data management strategy in conjunction with your choice of tools. People will be more comfortable adopting Mathematica if they are comfortable with where the end results are stored. You might need to write some convenience functions to get data in and out of databases or spreadsheets. If you use spreadsheets to store data (and I’m guessing that you do given the workflows you describe), you will need to specify some protocols on how those spreadsheets are set up. That way you will be able to automate some of those data access tasks more easily and robustly.
Different groups within the organisation will have different levels of sophistication and therefore need different tools. The Mathematica family of products is ideal for accommodating this: the maintainer of the custom functions and packages would do so using Wolfram Workbench; mainstream and sophisticated end-users would use vanilla Mathematica with the custom functions installed; management and less-sophisticated users can interact with CDF reports and applications in Player or Player Pro.
I endorse Leonid’s recommendation to create a Domain-Specific Language on top of Mathematica. I have even seen this done for APL (in another organisation, not where I currently work), so it can definitely be done for Mathematica. If you have someone who can maintain the underlying packages, and they are allowed to take the time to do so, then this can work fine. If the packages are in the Autoload directory, users don’t even need to be aware that they are using an add-on.
At the risk of offending Infix and Postfix fans, in my experience, new users often find the “normal” syntax of function[arguments] to be more accessible; Map (/@) and Apply (@@) are usually the next bit of syntax they learn to handle. It will therefore help to design the user-facing functionality to use a more limited syntax, and hide things requiring replacement rules, Thread, Fold etc away behind custom functions. We used a simplified Mathematica syntax in the web front end for a database application, to define calculations. People actually warm to the idea that [] is for functions, {} is for lists, and () is for grouping.
You will need to provide training, especially for any users who have experience with Matlab, Fortran or any other language that encourages loop-itis.
You will also need to provide good documentation of any of the custom functions you create, but fortunately Mathematica allows that documentation to be integrated in the normal help in a relatively seamless way.
To encourage users to adopt the functionality, I would suggest leveraging Mathematica’s visualisation capabilities, including Manipulate. If you can create a “cool” Manipulate in a CDF that the management can use and need to look at (e.g. a key model or management report), you will get buy-in from the top - and that can be half the battle.
| {
"pile_set_name": "StackExchange"
} |
Carbon nanotubes are hexagonal networks of carbon atoms forming seamless tubes with each end capped with half of a fullerene molecule. They were first reported in 1991 by Sumio Iijima who produced multi-layer concentric tubes or multi-walled carbon nanotubes by evaporating carbon in an arc discharge. They reported carbon nanotubes having up to seven walls. In 1993, Iijima's group and an IBM team headed by Donald Bethune independently discovered that a single-wall nanotube could be made by vaporizing carbon together with a transition metal such as iron or cobalt in an arc generator (see Iijima et al. Nature 363:603 (1993); Bethune et al., Nature 363: 605 (1993) and U.S. Pat. No. 5,424,054). The original syntheses produced low yields of non-uniform nanotubes mixed with large amounts of soot and metal particles.
Presently, there are three main approaches for the synthesis of single- and multi-walled carbon nanotubes. These include the electric arc discharge of graphite rod (Journet et al. Nature 388: 756 (1997)), the laser ablation of carbon (Thess et al. Science 273: 483 (1996)), and the chemical vapor deposition of hydrocarbons (Ivanov et al. Chem. Phys. Lett 223: 329 (1994); Li et al. Science 274: 1701 (1996)). Multi-walled carbon nanotubes can be produced on a commercial scale by catalytic hydrocarbon cracking while single-walled carbon nanotubes are still produced on a gram scale.
Generally, single-walled carbon nanotubes are preferred over multi-walled carbon nanotubes because they have unique mechanical and electronic properties. Defects are less likely to occur in single-walled carbon nanotubes because multi-walled carbon nanotubes can survive occasional defects by forming bridges between unsaturated carbon valances, while single-walled carbon nanotubes have no neighboring walls to compensate for defects. Defect-free single-walled nanotubes are expected to have remarkable mechanical, electronic and magnetic properties that could be tunable by varying the diameter, number of concentric shells, and chirality of the tube.
It is generally recognized that smaller catalyst particles of less than 3 nm are preferred for the growth of smaller diameter carbon nanotubes. However, the smaller catalyst particles easily aggregate at the higher temperatures required for the synthesis of carbon nanotubes. U.S. Patent Application No. 2004/0005269 to Huang et al. discloses a mixture of catalysts containing at least one element from Fe, Co, and Ni, and at least one supporting element from the lanthanides. The lanthanides are said to decrease the melting point of the catalyst by forming alloys so that the carbon nanostructures can be grown at lower temperatures.
Aside from the size of the catalyst, the temperature of the reaction chamber can also be important for the growth of carbon nanotubes. U.S. Pat. No. 6,764,874 to Zhang et al. discloses a method of preparing nanotubes by melting aluminum to form an alumina support and melting a thin nickel film to form nickel nanoparticles on the alumina support. The catalyst is then used in a reaction chamber at less than 850° C. U.S. Pat. No. 6,401,526, and U.S. Patent Application Publication No. 2002/00178846, both to Dai et al., disclose a method of forming nanotubes for atomic force microscopy. A portion of the support structure is coated with a liquid phase precursor material that contains a metal-containing salt and a long-chain molecular compound dissolved in a solvent. The carbon nanotubes are made at a temperature of 850° C.
It is well known that the diameter of the single-walled nanotubes (SWNTs) produced is proportional to the size of the catalyst particle. In order to synthesize nanotubes of small diameter, it is necessary to have catalyst particles of small particle size (less than about 1 nm). Catalysts of small average particle sizes with narrow distribution are difficult to synthesize. Further, recognized methods for determining the catalyst particle size distribution are not currently available, especially when the catalyst particles are supported on support powders, and thus buried inside the pores of the support powders.
Thus, there is a need for methods and processes for controllable synthesis of carbon single-walled nanotubes with small and narrow distributed diameters. Accordingly, the present invention provides novel methods and processes for determining the average particle size and particle size distribution of catalyst particles that can be used for preparation and optimization of catalyst and for the synthesis of SWNTs with small and narrow distributed diameters. | {
"pile_set_name": "USPTO Backgrounds"
} |
Q:
Can I use QUdpSockets wo polling or custom classes in Qt?
Here is a short UDP server example in Qt below which does work but what I don't like is that I'm polling to see if new data is available. I've come across some examples of a readyRead() but they all seem to introduce a qt class. Do I need to use a qt class in order to take advantage of the readyRead() signal?
Here is the working but simple UDP server implemented entirely in main:
#include <QDebug>
#include <QUdpSocket>
#include <QThread>
int main(int argc, char *argv[])
{
QUdpSocket *socket = new QUdpSocket();
u_int16_t port = 7777;
bool bindSuccess = socket->bind(QHostAddress::AnyIPv4, port);
if (!bindSuccess) {
qDebug() << "Error binding to port " << port << " on local IPs";
return a.exec();
}
qDebug() << "Started UDP Server on " << port << endl;
QHostAddress sender;
while (true) {
while (socket->hasPendingDatagrams()) {
QByteArray datagram;
datagram.resize(socket->pendingDatagramSize());
socket->readDatagram(datagram.data(),datagram.size(),&sender,&port);
qDebug() << "Message From :: " << sender.toString();
qDebug() << "Port From :: "<< port;
qDebug() << "Message :: " << datagram.data();
}
QThread::msleep(20);
}
return 0;
}
Here is an example of the readyRead() signal:
https://www.bogotobogo.com/Qt/Qt5_QUdpSocket.php
I haven't really figured out how to get this to work yet. I must be doing something wrong. Here is the UDP connection code i'm trying:
#include "myudp.h"
MyUDP::MyUDP(QObject *parent) : QObject(parent) {
}
void MyUDP::initSocket(u_int16_t p) {
port = p;
udpSocket = new QUdpSocket(this);
bool bindSuccess = udpSocket->bind(QHostAddress::LocalHost, port);
if (!bindSuccess) {
qDebug() << "Error binding to port " << port << " on local IPs";
return;
}
connect(udpSocket, SIGNAL(readyRead()), this, SLOT(readPendingDatagrams()));
}
void MyUDP::readPendingDatagrams() {
QHostAddress sender;
while (udpSocket->hasPendingDatagrams()) {
QByteArray datagram;
datagram.resize(udpSocket->pendingDatagramSize());
udpSocket->readDatagram(datagram.data(), datagram.size(), &sender, &port);
qDebug() << "Message From :: " << sender.toString();
qDebug() << "Port From :: " << port;
qDebug() << "Message :: " << datagram.data();
}
}
myudp.h
#include <QObject>
#include <QUdpSocket>
class MyUDP : public QObject
{
Q_OBJECT
public:
explicit MyUDP(QObject *parent);
void initSocket(u_int16_t p);
u_int16_t port;
QUdpSocket *udpSocket;
signals:
public slots:
void readPendingDatagrams();
};
new main.cpp
int main(int argc, char *argv[])
{
MyUDP *myUDP = new MyUDP(0);
myUDP->initSocket(port);
while (true) {
usleep(1000);
}
return 0;
}
I am testing with:
netcat 127.0.0.1 -u 7777
{"cid"="0x1234123412341", "fill_level"=3245 }<cr>
A:
What you're doing wrong is that you're not letting Qt's event loop run. i.e. this is incorrect:
int main(int argc, char *argv[])
{
MyUDP *myUDP = new MyUDP(0);
myUDP->initSocket(port);
while (true) {
usleep(1000);
}
return 0;
}
... instead, you should have something like this:
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
// connect needs to occur after QCoreApplication declaration
MyUDP *myUDP = new MyUDP(0);
myUDP->initSocket(port);
return app.exec();
}
... it is inside the app.exec() call where a Qt application spends most of its time (app.exec() won't return until Qt wants to quit), and there is where Qt will handle your UDP socket's I/O and signaling needs.
| {
"pile_set_name": "StackExchange"
} |
Actions
Obama set to visit haunted ground of Hiroshima
Posted: 8:19 PM, May 26, 2016
Updated:2016-05-27 00:19:38Z
By:
Associated Press
HIROSHIMA, Japan (AP) — Convinced that the time for this moment is right at last, President Barack Obama on Friday will become the first American president to confront the historic and haunted ground of Hiroshima.
Here, at this place of so much suffering, where U.S. forces dropped the atomic bomb that gave birth to the nuclear age, Obama will pay tribute to the 140,000 people who died from the attack seven decades ago.
He will not apologize. He will not second-guess President Harry Truman's decision to unleash the awful power of nuclear weapons. He will not dissect Japanese aggression in World War II.
Rather, Obama aimed to offer a simple reflection, acknowledging the devastating toll of war and coupling it with a message that the world can — and must — do better.
He will look back, placing a wreath at the centopath, an arched monument in Hiroshima's Peace Memorial Park honoring those killed by the bomb that U.S. forces dropped on Aug. 6, 1945. A second atomic bomb, dropped on Nagasaki three days later, killed 70,000 more.
Obama will also look forward.
Hiroshima is much more than "a reminder of the terrible toll in World War II and the death of innocents across the continents," Obama said Thursday.
It is a place, he said, "to remind ourselves that the job's not done in reducing conflict, building institutions of peace and reducing the prospect of nuclear war in the future."
Those who come to ground zero at Hiroshima speak of its emotional impact, of the searing imagery of the exposed steel beams on the iconic A-bomb dome. The skeletal remains of the exhibition hall have become an international symbol of peace and a place for prayer.
The president will be accompanied on his visit by Japanese Prime Minister Shinzo Abe — a demonstration of the friendship that exists between the only nation ever to use an atomic bomb and the only nation ever to have suffered from one.
It is a moment 70 years in the making. Other American presidents considered coming, but the politics were still too sensitive, the emotions too raw.
Even now, when polls find 70 percent of the Japanese support Obama's decision to come to Hiroshima, the visit is fraught.
Obama's choreographed visit will be parsed by people with many agendas.
There are political foes at home who ready to seize on any hint of an unwelcome expression of regret.
There are Koreans who want to hear the president acknowledge the estimated 20,000-40,000 of their citizens who were among the dead in Hiroshima and Nagasaki.
There are blast survivors who want Obama to listen to their stories, to see their scars — physical and otherwise.
There are activists looking for a pledge of new, concrete steps to rid the world of nuclear weapons.
There are American former POWs who want the president to fault Japan for starting the war in the Pacific.
Obama will try to navigate those shoals by saying less, not more.
The dropping of the bomb, he said Thursday, "was an inflection point in modern history. It is something that all of us have had to deal with in one way or another."
Copyright 2016 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed. | {
"pile_set_name": "Pile-CC"
} |
ARMED SERVICES BOARD OF CONTRACT APPEALS
Appeals of -- )
)
Lakeshore Toltest JV, LLC ) ASBCA Nos. 58954, 59069
) 59070,59071
)
Under Contract No. W5J9JE-l l-C-0130 )
APPEARANCE FOR THE APPELLANT: Anthony J. Calamunci, Esq.
Special Counsel for Chapter 7 Trustee,
Alfred T. Giuliano
FisherBroyles, LLP
Toledo, OH
APPEARANCES FOR THE GOVERNMENT: Thomas H. Gourlay, Jr., Esq.
Engineer Chief Trial Attorney
Dawn-Carole Harris, Esq.
Engineer Trial Attorney
U.S. Army Engineer District, Fort Worth
ORDER OF DISMISSAL
The parties have filed a joint motion to dismiss with prejudice, representing that
the Chapter 7 Trustee and the government have reached a settlement in the related
bankruptcy litigation, which settlement has been approved by the bankruptcy court and
resolves the claims at issue in these appeals.
Accordingly, these appeals are dismissed with prejudice.
Dated: 25 August 2016
Administrative Judge
Armed Services Board
of Contract Appeals
I certify that the foregoing is a true copy of the Order of Dismissal of the Armed
Services Board of Contract Appeals in ASBCA Nos. 58954, 59069, 59070, 59071, Appeals
ofLakeshore Toltest JV, LLC, rendered in conformance with the Board's Charter.
Dated:
JEFFREY D. GARDIN
Recorder, Armed Services
Board of Contract Appeals
2
| {
"pile_set_name": "FreeLaw"
} |
The shape-maintaining component of halobacterium salinarium: a cell surface glycoprotein.
Halobacterium salinarium lacks the rigid peptidogylcan layer necessary for shape-maintenance in most bacteria. Instead, the major cell surface component is a high-molecular-weight glycoprotein resembling those found on the surface of eukaryotic cells. The glycoprotein is extremely acidic and has carbohydrate units attached via both N- and O-glycosidis linkages. Evidence has been obtained that demonstrates that the glycoprotein forms a rigid structural matrix at the cell surface and is responsible for maintenance of the characteristic rod-shaped morphology of these organisms. | {
"pile_set_name": "PubMed Abstracts"
} |
1. Field of Invention
Embodiments of the present invention relate generally to a method and apparatus for retaining a substrate in a polishing system.
2. Background of Invention
As part of the manufacturing process of semiconductor devices, semiconductor wafers are increasingly being polished by CMP. The uniform removal of material from and the planarity of patterned and un-patterned wafers is critical to wafer process yield. Generally, the wafer to be polished is mounted on a substrate carrier which holds the wafer using a combination of vacuum suction or other means and, most often, a wafer backing pad to contact the rear side of the wafer. A retaining lip or ring is generally provided around the edge of the wafer to keep the wafer contained under the substrate carrier. The front side of the wafer, the side to be polished, is then contacted with an abrasive material such as an abrasive pad or abrasive strip. The abrasive pad or strip may have free abrasive fluid sprayed on it, may have abrasive particles affixed to it, or may have abrasive particles sprinkled on it.
The ideal wafer polishing process can be described by Preston""s equation:
R=Kp*P*V,
where R is the removal rate; Kp is a function of consumables (abrasive pad roughness and elasticity, surface chemistry and abrasion effects, and contact area); P is the applied pressure between the wafer and the abrasive pad; and V is the relative velocity between the wafer and the abrasive pad. As a result, the ideal CMP process should have constant cutting velocity over the entire wafer surface, constant pressure between the abrasive pad and wafer, and constant abrasive pad roughness, elasticity, area and abrasion effects. In addition, control over the temperature and pH is critical and the direction of the relative pad/wafer velocity should be randomly distributed over the entire wafer surface.
One common type of wafer polishing apparatus having a wafer carrier is the CMP model 372M made by Westech Systems Inc. A wafer is held in the substrate carrier during polishing. The substrate carrier rotates about the axis of the wafer. A large circular abrasive pad is rotated while contacting the rotating wafer and substrate carrier. The rotating wafer contacts the larger rotating abrasive pad in an area away from the center of the abrasive pad.
Another related apparatus is a polishing machine for polishing semiconductor wafers containing magnetic read-write heads, disclosed in U.S. Pat. No. 5,335,453 to Baldy et al. With this machine, a semiconductor wafer is held by a substrate carrier which is moved in a circular translatory motion by an eccentric arm. The wafer is polished by contacting an abrasive strip that is advanced in one direction. The relative motion between the wafer and the abrasive strip is a combination of the circular motion of the wafer and the linear motion of the advancing abrasive strip. Connected to the eccentric arm is a support head that includes a rigid part and a xe2x80x9cflexible diskxe2x80x9d made from a xe2x80x9cflexible materialxe2x80x9d having a xe2x80x9ccertain thicknessxe2x80x9d. The wafer 44 to be polished is described as being xe2x80x9cpartly embedded in the disk 142 during polishing by the effect of the force exerted on the support headxe2x80x9d.
The gimbal point of a CMP substrate carrier is a critical element of the polishing process. The substrate carrier must align itself to the polish surface precisely to insure uniform, planar polishing results. Many CMP substrate carriers currently available yield wafers having anomalies in planarity. The vertical height of the pivot point above the polishing surface is also important, since the greater the height, the larger the moment that is induced about the pivot point during polishing. Two pervasive problems that exist in most CMP wafer polishing apparatuses are underpolishing of the center of the wafer, and the inability to adjust the control of wafer edge exclusion as process variables change.
For example, substrate carriers used on many available CMP machines experience a phenomenon known in the art as xe2x80x9cnose divingxe2x80x9d. During polishing, the head reacts to the polishing forces in a manner that creates a sizable moment, which is directly influenced by the height of the gimbal point, mentioned above. This moment causes a pressure differential along the direction of motion of the head. The result of the pressure differential is the formation of a standing wave of the chemical slurry that interfaces the wafer and the abrasive surface. This causes the edge of the wafer that is at the leading edge of the substrate carrier, to become polished faster and to a greater degree than the center of the wafer.
The removal of material on the wafer is related to the chemical action of the slurry. As slurry is inducted between the wafer and the abrasive pad and reacts, the chemicals responsible for removal of the wafer material gradually become exhausted. Thus, the removal of wafer material further from the leading edge of the substrate carrier (i.e., the center of the wafer) experiences a diminished rate of chemical removal when compared with the chemical action at the leading edge of the substrate carrier (i.e., the edge of the wafer), due to the diminished activity of the chemicals in the slurry when it reaches the center of the wafer. This phenomenon is sometimes referred to as xe2x80x9cslurry starvationxe2x80x9d.
Apart from attempts to reshape the crown of the substrate carrier, other attempts have been made to improve the aforementioned problem concerning xe2x80x9cnose divingxe2x80x9d. In a prior art substrate carrier that gimbals through a single bearing at the top of the substrate carrier, sizable moments are generated because the effective gimbal point of the substrate carrier exists at a significant, non-zero distance from the surface of the polishing pad. Thus, the frictional forces, acting at the surface of the polishing pad, act through this distance to create the undesirable moments.
U.S. Pat. No. 5,377,451 to Leoni et al. describes a wafer carrier that xe2x80x9cprojectsxe2x80x9d the effective gimbal point down to the surface of the polishing pad, thereby eliminating the moment arm through which the frictional forces create the undesirable xe2x80x9cnose divingxe2x80x9d. Leoni et al. produce this effect by instituting a conical bearing assembly which allows the projection of a xe2x80x9cuniversal pivot pointxe2x80x9d to a point that is located at or near the surface of the polishing surface. The solution proposed by Leoni et al., however, requires the use of a number of bearings in the assembly in order to effect this projection, thereby increasing the cost of the wafer carrier. Additionally, there is still a moment produced because of the actual contact points at the bearings. There is also a substantial risk that, due to inexact manufacturing, the projected pivot point will not lie exactly on the contact surface of the carrier, which will also introduce moments.
FIG. 17 shows a prior art carrier design 900 that transfers the polishing load from a bellows 910 to a guided shaft 920 into a gimbal 930 (shown in phantom to illustrate the gimbal point 933 and outward into a carrier plate 940. If the gimbal mechanism is not free, stiction will prevent the gimbal 930 from its intended free and smooth movement and the guided shaft 920 will begin to over-constrain the system during polishing.
Additionally, it is not uncommon for loads in this type of a system to become excessive enough to cause plastic deformation of the gimbal. Because of the offset rotation points of the gimbal 930 and the ring flexure 950, the dynamics of such a carrier assembly can become unstable during a high friction polishing operation.
A semiconductor wafer polishing apparatus by Banks in U.S. Pat. No. 4,373,991, uses a plurality of channels 27 to inject pressurized water, preferably slightly greater than 15 psi, between a plate and a wafer to allow free floating of the wafer. However, the carrier of Banks uses a conventional gimbal arrangement and therefore experiences the moment induced anomalies such as nose-diving and crowning, as discussed above.
Another phenomenon that generates anomalies in the edge areas of a substrate that is polished by conventional techniques is due to limitations inherent in a carrier that employs a deformable/conformable crown or plate. For example Applied Materials European Patent Application No. EP 0 774 323 A2 discloses a carrier head having a lower planar surface 9104 and a bow chamber 9102 which is capable of being pressurized so as to bow out the surface 9104, or reduced in pressure to bow in the surface 9104. A bellows cavity 1192 is pressurizable to bias the entire carrier plate 1164, including the surface 9104 toward the polishing surface for loading the substrate to be polished.
FIG. 18 illustrates a problem inherent in a prior art carrier 1100 having a deformable plate 1110. Upon deformation of the plate 1110 by application of pressure thereto, either through increasing the pressure within chamber 1130 or by other means, the deflection of the plate 110 is greater toward the center of the plate than at the edge areas 1120 (as shown in phantom in FIG. 16). This is true even if greater flexibility is afforded at the edge areas through living hinges or other mechanisms to extend the flexibility outward, since the very edge defines a boundary of fixed points that do not deflect.
The plate 1110 deflects according to the typical bending formula (as shown in phantom in FIG. 16) which results in a relative underpolishing of the edges of the wafer.
U.S. Pat. No. 5,635,083 to Breivogel et al., discloses a method and apparatus for chemical mechanical polishing of a substrate having a wafer carrier attached to a steel rotatable drive shaft. The drive shaft is hollow to allow pneumatic pressure to be conveyed into a chamber created above the backside of a wafer to be polished and below the base of the carrier. A wear resistant retaining ring extends from the base of the carrier and surrounds and is in contact with the wafer to be polished. A resilient lip seal is attached just inside the retaining ring and seals with the backside of the wafer to form the chamber together with the base of the carrier. Not only does this arrangement restrict wafer precession because of the seal contact, but there is also always a risk of not forming an adequate seal due to contamination between the seal and the backside of the wafer, by slurry or other contaminants.
An apparatus described in JP 9-225821 to Ebara Corp. includes first, second and third pressure chambers within a top ring that is used to polish a semiconductor wafer. An elastic mat is provided between the top ring and the semiconductor wafer to be polished. The elastic mat and the top ring each have multiple jets that align to connect with the pressure chambers. Three concentrically defined pressure zones are defined on the mat, through which controlled pressures can be applied to the wafer to control the conformation of the pressure profile between the elastic mat and the semiconductor wafer.
Therefore, there is a need for a method and apparatus for retaining a substrate during a polishing process.
One aspect of the invention generally provides a carrier for retaining of a substrate. In one embodiment, a carrier comprises a carrier plate having a lower surface, at least one first fluid outlet and a second fluid outlet. The first fluid outlet is fluidly coupled to the lower surface of the carrier plate. The second fluid outlet is fluidly coupled to the lower surface of the carrier plate. A first fluid circuit is coupled to the first fluid outlet and is adapted to flow a fluid forms a fluidic layer between the carrier plate and the substrate. A second fluid circuit is coupled to the second fluid outlet and is separate from the first fluid circuit.
In another aspect of the invention, a method for retaining a substrate in a polishing system is provided. In one embodiment, a method for retaining a substrate comprises the steps of disposing the substrate adjacent a carrier plate, flowing a first fluid through a first port disposed on the carrier plate between the substrate and the carrier plate, and applying a second fluid or vacuum through a second port disposed on the carrier plate between the substrate and the carrier plate. | {
"pile_set_name": "USPTO Backgrounds"
} |
Multinodular cutaneous spread in neuroendocrine tumor of the breast : an unusual presentation.
Carcinoid tumors are the most common type of neuroendocrine tumors with an incidence of 1.5 per 100 000 of the population. Skin manifestations of carcinoid tumors include those associated with the carcinoid syndrome and sequelae from metastatic disease. Carcinoid tumors in the breast, which were first described in 1977, are rare and may present either as primary or metastatic lesions. The existence of primary breast carcinoid tumors is controversial, however, and, if they do exist, would account for <1% of primary breast cancers. We report the case of a 76-year-old woman who presented to the M.D. Anderson Cancer Center with a long-standing history of a breast lump. Core biopsy of the mass and left axillary lymph node aspiration revealed neuroendocrine tumor of the breast, which stained positive for synaptophysin and chromogranin. Subsequently, the patient developed a left-sided pleural effusion, and a further work-up revealed metastases to the lung parenchyma and pleural space. Three years after her diagnosis, she complained of a persistent, erythematous thickening of skin over the surface of her left inferior breast, which had been present for 1 year. On examination, multiple erythematous grouped nodules arranged in an oval pattern were present. A punch biopsy from one of the nodules revealed invasive low-grade carcinoma with neuroendocrine features similar to those in her prior breast core biopsy. The tumor was seen to be infiltrating the dermis. This is a unique case of a neuroendocrine tumor of the breast with cutaneous spread. The number of reported cases of neuroendocrine tumors with cutaneous involvement remains small. | {
"pile_set_name": "PubMed Abstracts"
} |
Teamsters Canada
Teamsters Canada is a Canadian trade union affiliated with the International Brotherhood of Teamsters and the Canadian Labour Congress. Although the Teamsters have been present in Canada since 1903, Teamsters Canada was only established in 1976. The organization represents 120,000 workers in all industries. It is the largest transportation union in the country, and the largest private sector union under federal jurisdiction.
Teamsters Canada Rail Conference
Over 16,000 members of Teamsters Canada work in the rail industry. They are represented by the Teamsters Canada Rail Conference.
TCRC Website
See also
International Brotherhood of Teamsters
Canadian Labour Congress
References
External links
Teamsters Canada Official Website
Teamsters Canada Rail Conference
International Brotherhood of Teamsters
TCRC Division 76 Winnipeg
TCRC CTY CP East
TCRC Division 660 Toronto
Category:Canadian Labour Congress
Category:Organizations based in Quebec
Category:Laval, Quebec
Category:International Brotherhood of Teamsters | {
"pile_set_name": "Wikipedia (en)"
} |
GÖTTINGEN, Germany — German Defence Minister Ursula von der Leyen has unveiled plans to establish a new cyber force to enhance the defense effectiveness of the country's armed forces.
To this purpose, existing IT capabilities of the Bundeswehr will be bundled within the new branch of cyber and information space (CIR). A total of 13,500 posts from other branches will be assigned to CIR, which will be headed by an inspector with the rank of a lieutenant general. The inspector would take over the leadership of CIR on April 1, 2017.
A cyber/IT (CIT) department also will be set up within the MoD by Oct. 1. There, a chief information officer will assume responsibility for the subjects of cyber and IT with budgetary sovereignty, according to the MoD.
The minister also announced Tuesday that the buildup of the entire structure will take till 2021.
According to an MoD spokesman, CIR will have access to investment funds of more than €1 billion (US $1.1 billion). CIR will be commanded from Bonn, Germany, and oversee operational tasks like cyber, IT, military and operational communications, and geological information. | {
"pile_set_name": "OpenWebText2"
} |
Rags Morales
Ralph "Rags" Morales () is an American comic book artist known for his work on various books for DC Comics, including Identity Crisis, Countdown to Infinite Crisis, Batman Confidential, and The New 52 reboot of then Superman-centric Action Comics.
Morales is the co-creator, along with Brian Augustyn, of the 1990s version of Black Condor.
Early life
Morales attended a number of vocational art classes, including The Kubert School.
Career
Morales' first professional work was penciling 19 issues of Forgotten Realms with writer Jeff Grubb as part of the TSR line of books. Following Forgotten Realms, Morales co-created and pencilled Black Condor.
Morales left DC Comics to do work for Valiant Comics, including Turok, Archer & Armstrong and Geomancer. He also did some licensed work on a Sliders comic book, and work for Wizards of the Coast. After Valiant closed, Morales returned to his TSR roots, doing work for Dungeons and Dragons magazines and novella work for Harper Collins, such as Isaac Asimov's Robotics and pen and ink work for Margaret Weis' Testament of the Dragon. He also taught anatomical illustration at a vo-tech school.
In 1999, Morales was made the penciler on DC's on Hourman, penciling 20 of that series 25 issues before it was canceled in 2001. Over the course of the following year, he drew nine intermittent issues of JSA between issue #9 and issue #34, before moving onto Hawkman with writer Geoff Johns. As the end of that year loomed while on Hawkman. It was also on Hawkman that he first worked with inker Michael Bair, with whom he has worked on most of his projects since. At the time Morales said "when I saw the magic that Michael Bair added to my work, I knew I had to stick with this dude".
After Hawkman, Morales illustrated Brad Meltzer's limited series Identity Crisis. Because of the importance of Identity Crisis to DC's ongoing company-wide storyline, and because of the number of characters in it, including minor ones that had barely been seen in years, Morales used copious amounts of reference materials for character studies, including the use of famous actors' faces to give the characters unique facial features, and sometimes updating their costumes in the process. The series was eventually selected by The Young Adult Library Services Association (YALSA)'s 2007 recommended list of Great Graphic Novels For Teens.
Morales and Bair worked on Nightwing during Peter Tomasi's run as writer on that title. He later worked on Superman/Batman #53 - 56, which were among the seven issues collected in to the Finest Worlds hardcover in 2009, and in trade paperback form in 2010.
In 2009 he contributed to the "Blackest Night" storyline with the three issues miniseries, Blackest Night: Tales of the Corps.
In June 2011, as part of DC Comics' massive relaunch of their entire superhero line, Morales was announced as the artist on the new Action Comics #1, teaming with writer Grant Morrison.
In September 2018, Morales was named Inkwell Awards Special Ambassador.
Art style
Regarding his figure work, Morales finds stock, poster-like standing poses difficult, preferring the more communicative movement seen among characters in narrative sequences, a forte he feels helped him attain the Identity Crisis assignment.
Bibliography
Valiant/Acclaim
Archer & Armstrong #13 (1993)
Bloodshot #9 (1998)
Eternal Warriors: Mog #1 (1998)
Geomancer #1-3, 5-6 (1994–95)
Sliders Special #2 (along with Dean Zachary) (1997)
Turok, Dinosaur Hunter #4-6, 10-13, 15-16, 24-27, 30, 34 37-38, 41-44, 47 (1993–96)
DC
Action Comics, vol. 2, #1-18 (with Grant Morrison, 2011)
Batman Confidential #13-16 (2008)
Black Condor #1-6, 9-12 (1992–93)
Blackest Night: Tales of the Corps, miniseries, #1 (with writer Geoff Johns, 2009)
First Wave, miniseries, #1-6 (with writer Brian Azzarello, 2010)
Forgotten Realms
Hawkman, vol. 4, #1-12, 15-17, 20-25 (with writers Geoff Johns/James Robinson, 2003–04)
Hourman #1-11, 14-16, 18-19, 21, 23-25 (1999–2001)
Identity Crisis, miniseries, #1-7 (with writer Brad Meltzer, 2004–05)
JSA, vol. 2, #26-27 (2001); #83-85 (along with Luke Ross, 2006)
JSA: Classified #19-20 (with writer Scott Beatty, 2007)
Nightwing #140-142, 145, 148 (with writer Peter Tomasi)
Wonder Woman, vol. 2, #215-217, 219, 221, 223 (with writer Greg Rucka, 2005–06)
See also
List of Puerto Ricans
References
External links
Official Site of Rags Morales
Category:The Kubert School alumni
Category:Place of birth missing (living people)
Category:Year of birth missing (living people)
Category:American comics artists
Category:Living people | {
"pile_set_name": "Wikipedia (en)"
} |
364 F.3d 622
UNITED STATES of America, Plaintiff-Appellee,v.Osvaldo LOPEZ-CORONADO, Defendant-Appellant.
No. 03-40666.
United States Court of Appeals, Fifth Circuit.
March 30, 2004.
Mitchel Neurock (argued), Laredo, TX, James Lee Turner, Asst. U.S. Atty., Houston, TX, for Plaintiff-Appellee.
Roland E. Dahlin, II, Fed. Pub. Def., Molly E. Odom (argued), Houston, TX, for Defendant-Appellant.
Appeal from the United States District Court for the Southern District of Texas.
Before REAVLEY, DAVIS and DeMOSS, Circuit Judges.
REAVLEY, Circuit Judge:
1
Defendant Osvaldo Lopez-Coronado pleaded guilty to illegal re-entry in violation of 8 U.S.C. § 1326(a) but appeals the four level increase in his offense level at sentencing that counted his juvenile adjudications as felony convictions under the 2002 guidelines. We affirm. The defendant was fifteen years old in 1997 when the court found beyond a reasonable doubt that he committed the offenses of theft, unauthorized use of a vehicle, and possession of marijuana. He was adjudged a delinquent and sentenced to one year probation. The following year, he was again adjudged a delinquent because he was guilty of unauthorized use of a vehicle and evading arrest. The court made its findings beyond a reasonable doubt and again sentenced the defendant to one year probation. Under the sentencing guidelines, these offenses are considered felony offenses as they were punishable for a term of imprisonment exceeding one year. U.S.S.G. § 4A1.2(o). In 2002, the defendant was deported and attempted to reenter the United States.
2
The guideline reads: "if the defendant previously was deported, or unlawfully remained in the United States, ** after ** a conviction for any other felony, increase [his base offense] by 4 levels." U.S.S.G. § 2L1.2(b)(1)(D). The sentencing commission did not limit this conviction to an adult conviction as it has elsewhere. See, e.g., U.S.S.G. § 2K1.3, cmt. n. 2 (determining the base offense level for unlawful receipt, possession or transportation of explosive materials using only adult convictions); U.S.S.G. § 2K2.1, cmt. n. 5 (determining the base offense level for unlawful receipt, possession or transportation of firearms or ammunition using only adult convictions).
3
Juvenile adjudications count as convictions for criminal history purposes. See U.S.S.G. § 4A1.2(d)(2). This court has held a deferred adjudication under state law to be a conviction under § 2L1.2 where there was a finding beyond a reasonable doubt in a proceeding with adequate due process protections. United States v. Valdez-Valdez, 143 F.3d 196, 201 (5th Cir.1998). This defendant received those procedures and protections.
4
After the defendant was sentenced, the guideline was amended in this respect. After November 1, 2003, the commentary to Application Note 1(A)(iv) of § 2L1.2 provides: "Subsection (b)(1) does not apply to a conviction for an offense committed before the defendant was eighteen years of age unless such conviction is classified as an adult conviction under the laws of the jurisdiction in which the defendant was convicted." The amendment was not included in the list of amendments to be applied retroactively. U.S.S.G. § 1B1.10(a), (c) (2003). Only clarifying amendments to the guidelines are applied retroactively. See United States v. Davidson, 283 F.3d 681, 684-85 (5th Cir.2002). Because we read the 2002 guidelines as we do, the 2003 amendment was a substantive change and not a clarification.
5
AFFIRMED.
| {
"pile_set_name": "FreeLaw"
} |
/*=============================================================================
Copyright (c) 2001-2011 Hartmut Kaiser
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(BOOST_SPIRIT_STREAM_MAY_05_2007_1228PM)
#define BOOST_SPIRIT_STREAM_MAY_05_2007_1228PM
#if defined(_MSC_VER)
#pragma once
#endif
#include <boost/spirit/home/qi/detail/string_parse.hpp>
#include <boost/spirit/home/qi/stream/detail/match_manip.hpp>
#include <boost/spirit/home/qi/stream/detail/iterator_source.hpp>
#include <boost/spirit/home/support/detail/hold_any.hpp>
#include <iosfwd>
#include <sstream>
///////////////////////////////////////////////////////////////////////////////
namespace boost { namespace spirit
{
///////////////////////////////////////////////////////////////////////////
// Enablers
///////////////////////////////////////////////////////////////////////////
template <>
struct use_terminal<qi::domain, tag::stream> // enables stream
: mpl::true_ {};
template <>
struct use_terminal<qi::domain, tag::wstream> // enables wstream
: mpl::true_ {};
}}
///////////////////////////////////////////////////////////////////////////////
namespace boost { namespace spirit { namespace qi
{
#ifndef BOOST_SPIRIT_NO_PREDEFINED_TERMINALS
using spirit::stream;
using spirit::wstream;
#endif
using spirit::stream_type;
using spirit::wstream_type;
template <typename Char = char, typename T = spirit::basic_hold_any<char> >
struct stream_parser
: primitive_parser<stream_parser<Char, T> >
{
template <typename Context, typename Iterator>
struct attribute
{
typedef T type;
};
template <typename Iterator, typename Context
, typename Skipper, typename Attribute>
bool parse(Iterator& first, Iterator const& last
, Context& /*context*/, Skipper const& skipper
, Attribute& attr_) const
{
typedef qi::detail::iterator_source<Iterator> source_device;
typedef boost::iostreams::stream<source_device> instream;
qi::skip_over(first, last, skipper);
instream in(first, last); // copies 'first'
in >> attr_; // use existing operator>>()
// advance the iterator if everything is ok
if (in) {
if (!in.eof()) {
std::streamsize pos = in.tellg();
std::advance(first, pos);
} else {
first = last;
}
return true;
}
return false;
}
template <typename Context>
info what(Context& /*context*/) const
{
return info("stream");
}
};
template <typename T, typename Char = char>
struct typed_stream
: proto::terminal<stream_parser<Char, T> >::type
{
};
///////////////////////////////////////////////////////////////////////////
// Parser generators: make_xxx function (objects)
///////////////////////////////////////////////////////////////////////////
template <typename Char>
struct make_stream
{
typedef stream_parser<Char> result_type;
result_type operator()(unused_type, unused_type) const
{
return result_type();
}
};
template <typename Modifiers>
struct make_primitive<tag::stream, Modifiers> : make_stream<char> {};
template <typename Modifiers>
struct make_primitive<tag::wstream, Modifiers> : make_stream<wchar_t> {};
}}}
#endif
| {
"pile_set_name": "Github"
} |
Transmissible spongiform encephalopathies (TSEs) are a heterogeneous group of fatal neurodegenerative disorders that occur in humans, ruminant herbivores, mink, and cats. Sheep scrapie is the prototype of this group. TSEs are characterized by deposition of prion proteins (also denoted as PrP-Scrapie or PrPSc, the infectious form of the proteins), in the central nervous system of affected individuals. Prions have been defined as small proteinaceous infectious particles which resist inactivation by procedures that modify nucleic acids. The term “prion” is a contraction of the words “protein” and “infection,” and prions are comprised largely if not exclusively of PrP-Sc molecules encoded by a PrP gene. Prion diseases are often called spongiform encephalopathies because of the post mortem microscopic or histopathologic appearance of the brain of an infected animal with large vacuoles in the cortex and cerebellum. Prion proteins are insoluble, protease-resistant glycoproteins resulting from post translational modification of normal mammalian glycoproteins (PrP-Cellular or PrP-C). Deposition of the prion protein, an abnormal isoform of a native cellular sialoglycoprotein, in the central nervous system is a reliable marker of TSE infection.
The most widely studied TSEs in food-producing animals include scrapie in sheep and goats, bovine spongiform encephalopathy (BSE) in cattle (also known as “Mad Cow” disease), and chronic wasting disease (CWD) in mule deer and elk. Other TSEs in animals include transmissible mink encephalopathy (TME) in mink and feline spongiform encephalopathy (FSE) in cats. Prion diseases of humans have also been identified, which include: Creutzfeldt-Jakob Disease (CJD); Gerstmann-Straussler-Scheinker Syndrome (GSS); Fatal Familial Insomnia (FFI); Alper's Syndrome, and Kuru.
The transmissible agent in these diseases remains controversial. It appears that the scrapie isoform of the prion protein (PrP-Sc or PrPSc) is necessary for both the transmission and pathogenesis of the transmissible neurodegenerative diseases of animals and humans (see Prusiner, Science, 252, 1515-1522, 1991).
A new clinical version of CJD in humans is believed to be the result of transfer of BSE from cattle to humans. This finding led to the conclusion that variant CJD was caused by infection of humans with prions from BSE infected cattle. Furthermore, the incidence and timing of the appearance of variant CJD cases opened the possibility that a considerable number of humans, presently free of clinical symptoms, could be latent for the disease. Given that CJD might pass from human to human in infected blood, it can be assumed that humans infected with variant CJD contain the infectious agent in their blood. A potentially infectious species specific agent has been discovered in blood of humans with CJD, cattle with BSE, and sheep with scrapie. ELISA tests have been developed that detect these TSE specific proteins that are associated with PrPSc (“Prion associated proteins”) in the blood of animals and humans. Prion associated proteins are expressed in a disease specific manner in all subjects with clinical symptoms of BSE (“BSAS”), scrapie (“SCRAPAS”) and CJD (“CJD”). Prion associated proteins appear to have the chemical characteristics for binding to PrP-C and converting it to PrPSc, and thus are most likely the infectious agents in TSE diseases. Furthermore, expression of prion associated proteins in a subject is accompanied by expression of specific anti-prion associated protein endogenous antibody. Detecting this endogenous antibody in human blood and blood products is the basis of some TSE ELISA tests (U.S. Pat. No. 6,350,854).
The occurrence of novel transmissible spongiform encephalopathies in cattle in the United Kingdom and Europe, and in mule deer and elk in parts of the United States has emphasized the need for reliable diagnostic tests. Further, the epizootic of a TSE in cattle and its postulated relationship to a new variant of human Creutzfeldt Jakob Disease have increased public and scientific awareness of these relatively rare disorders, and have highlighted the need for preclinical detection of TSEs. Accordingly, sensitive immunohistochemical techniques and preclinical detection methods are necessary for the detection, surveillance, and control of TSEs.
Confirmation of TSEs is accomplished by postmortem microscopic or histological examination of brain tissue of suspected cases. Postmortem histopathologic diagnosis of the ruminant TSEs is based on the appearance of neuronal vacuolation, spongiform changes, gliosis, and astrocytosis. However, these can vary in intensity and anatomic location depending on the host species, the individuals, host genetics, stage of disease, and infectious source. Thus, diagnosis by histopathology alone may be equivocal in early cases and usually not possible in autolyzed tissue.
Monoclonal antibody 263K 3F4 (U.S. Pat. No. 4,806,627) detects PrPSc in hamsters and humans, and has received use in diagnostic assays and pathogenesis studies of human TSEs. Ante-mortem testing in humans with suspected CJD is performed by immunohistochemical and histologic examination of brain biopsies. Because brain biopsy in ruminant animals is not feasible, an alternative approach has been to biopsy selected lymph nodes.
Therefore, there exists a need for a practical, inexpensive, and more rapid method for detection of prion proteins, prion-associated proteins and peptides and/or their respective host antibodies in live animals or humans. In addition, there exists a need for sensitive diagnostic assays to detect prion and prion associated proteins and peptides and/or their respective host antibodies in animal tissues and animal by-products in a most rapid fashion to minimize quarantine time.
Aptamers are functional synthetic nucleic acids useful for high-affinity binding to targets (e.g., nucleic acids, proteins, and chemical compounds). Unlike naturally occurring nucleic acids, which transfer genetic information, aptamers are selected on the basis of their ability to specifically bind their ligand. The specificity of binding is defined in terms of the dissociation constant Kd of the aptamer for its ligand. Aptamers can have high affinity with Kd range similar to antibody (pM to nM) and specificity similar/superior to antibody (Tuerk and Gold, Science, 249:505, 1990; Ellington and Szostak, Nature, 346:818, 1990).
Many aptamers have a stem-loop structure in which the bases in the loop and the stem are intimately involved in interaction with the ligand. RNA aptamers have been isolated against the protease-sensitive, N-terminus of PrP (Weiss et al., J. Virol. 71:8790-8797, 1997) but these do not discriminate between PrPC and PrPSc and are sensitive to nucleases. Therefore, there is a need in the art to design and utilize aptamers for binding to specifically folded prions, specifically those prions that are infectious and disease-causing in animals/mammals, in order to prevent the transmission and spread of such diseases in the food supply. The present disclosure provides improved aptamers for detecting the presence of PrPSc where the aptamers are not sensitive to nucleases. | {
"pile_set_name": "USPTO Backgrounds"
} |
Radiation oncology outpatients' patterns of life expectancy discussions.
To describe the (a) number and type of cancer care providers that radiation oncology outpatients report discussing life expectancy with, and (b) perceptions of the acceptability and utility of life expectancy information. A cross-sectional survey of patients receiving radiotherapy was undertaken in four treatment centres. Patients indicated whether they had discussed life expectancy with a cancer doctor (i.e., medical oncologists, radiation oncologists, surgeon, haematologists) and/or other cancer care provider (i.e., general practitioner, radiation therapist, nurse); and acceptability and utility of information. Of 207 respondents, 133 (64%) had discussed life expectancy with at least one provider. General practitioners (GPs) were the most frequent source of information. Of those who had discussed life expectancy, half (n = 110/207) perceived cancer would not impact life expectancy. Information was easy to understand (91%), discussed sensitively (90%), helped plan for future (83%) and gave them certainty (86%). The information made 11% feel overloaded and 34% feel anxious. Two-thirds of respondents had discussed life expectancy with at least one cancer care provider. Providers from the range of disciplines involved in cancer care need to be skilled at communicating life expectancy information and recognising the adverse impact this may have on some patients. | {
"pile_set_name": "PubMed Abstracts"
} |
Fender Vibratone
The Fender Vibratone was a Leslie speaker designed for use with electric guitars, manufactured by Fender from 1967-1972. Named after the first Leslie speaker made for the Hammond Organ in 1941, the Vibratone was associated with the electric guitar, although it was used in vocals on many famous songs. The Vibratone was essentially an equivalent of the Leslie 16. A prime example of the Vibratone's sound is on the song "Cold Shot" by Stevie Ray Vaughan.
History
In the mid-1960s, guitarists, from bands like The Beach Boys, started experimenting by playing through Leslies. At the time, Fender was bought by CBS, who owned the patents to the Leslie company. The Fender Vibratone was introduced in 1967. Since its introduction, many groups like The Beatles, The Byrds, The Zombies, Blind Faith, as well as guitarists like Mike Campbell, David Gilmour, and Stevie Ray Vaughan, all have used the Vibratone in their recordings.
Design
Unlike a high fidelity speaker, the Vibratone was specifically designed to alter or modify the sound. It consisted of a single driver unit, particularly a 10-inch guitar speaker, with a 15-inch Styrofoam cylindrical rotor in front of it. The cylinder was mechanically rotated by a motor through a rubber belt to create various effects, like chorus and vibrato, based on the Doppler effect. Like a traditional Leslie, the effect could be changed, via a two-button footswitch, between slow and fast speeds, or switched off altogether.
Much of the Vibratone's unique tone comes from the fact that the cabinet uses a guitar speaker, instead of a horn and woofer. The effect was dispersed vertically, unlike the Leslie that is dispersed horizontally, with grilles on the sides and top of the cabinet. With no built-in preamp, the Vibratone had to be powered by a separate guitar amplifier; in recording situations, microphones were placed next to the grilles in order for the effect to be heard. A crossover was also built-in, with the Vibratone handling the mid-range frequencies, and sending the high/low frequencies to the driving amplifier.
Simulators
Today, many modeling devices, such as the Line 6 POD and Fender Cyber Twin, depict the sound of the Fender Vibratone. Early Rotary Speaker Simulators, like the Shin-ei Uni-Vibe or Dunlop Rotovibe pedals, became viable alternatives for guitarists, but never quite fully reproduced the Doppler effect they attempted to emulate. Instead, they themselves became a new type of effect with their own sound signatures. Many cabinets similar to the Vibratone have come and gone, and there are a few models in current production as well. Guitar pedal manufacturers have also developed analog and digital pedals that quite realistically approximate the rotary effect. Here are a few examples (some may be out of production):
Dunlop Univibe,
Dunlop Rotovibe,
Univox Univibe,
Korg G4,
Pigtronix Rototron,
Line 6 Roto Machine,
Voodoo Lab Micro Vibe,
Hammond “Cream” Digital Leslie Pedal,
Boss RT-20 Rotary Ensemble,
Neo Ventilator,
H&K Rotosphere,
Danelectro Rocky Road.
See also
Leslie speaker
External links
Inside The Fender Vibratone - This web page has everything you need to know and more about the Vibratone.
1971 Fender Vibratone Owner's Manual
Category:Loudspeakers | {
"pile_set_name": "Wikipedia (en)"
} |
const nest = require('depnest')
const Value = require('mutant/value')
const onceTrue = require('mutant/once-true')
const computed = require('mutant/computed')
const resolve = require('mutant/resolve')
const pull = require('pull-stream')
const sorted = require('sorted-array-functions')
const MutantPullCollection = require('../../mutant-pull-collection')
exports.needs = nest({
'sbot.pull.backlinks': 'first',
'sbot.obs.connection': 'first',
'message.sync.root': 'first',
'sbot.pull.stream': 'first',
'message.sync.timestamp': 'first'
})
exports.gives = nest({
'backlinks.obs.for': true,
'backlinks.obs.references': true,
'backlinks.obs.forks': true
})
exports.create = function (api) {
const cache = {}
const collections = {}
let loaded = false
// cycle remove sets for fast cleanup
let newRemove = new Set()
let oldRemove = new Set()
// run cache cleanup every 5 seconds
// an item will be removed from cache between 5 - 10 seconds after release
// this ensures that the data is still available for a page reload
const timer = setInterval(() => {
oldRemove.forEach(id => {
if (cache[id]) {
unsubscribe(id)
delete collections[id]
delete cache[id]
}
})
oldRemove.clear()
// cycle
const hold = oldRemove
oldRemove = newRemove
newRemove = hold
}, 5e3)
if (timer.unref) timer.unref()
return nest({
'backlinks.obs.for': (id) => backlinks(id),
'backlinks.obs.references': references,
'backlinks.obs.forks': forks
})
function references (msg) {
const id = msg.key
return MutantPullCollection((lastMessage) => {
return api.sbot.pull.stream((sbot) => sbot.patchwork.backlinks.referencesStream({ id, since: lastMessage && lastMessage.timestamp }))
})
}
function forks (msg) {
const id = msg.key
const rooted = !!api.message.sync.root(msg)
if (rooted) {
return MutantPullCollection((lastMessage) => {
return api.sbot.pull.stream((sbot) => sbot.patchwork.backlinks.forksStream({ id, since: lastMessage && lastMessage.timestamp }))
})
} else {
return []
}
}
function backlinks (id) {
load()
if (!cache[id]) {
const sync = Value(false)
const collection = Value([])
subscribe(id)
process.nextTick(() => {
pull(
api.sbot.pull.backlinks({
query: [{ $filter: { dest: id } }],
index: 'DTA' // use asserted timestamps
}),
pull.drain((msg) => {
const value = resolve(collection)
sorted.add(value, msg, compareAsserted)
collection.set(value)
}, () => {
sync.set(true)
})
)
})
collections[id] = collection
cache[id] = computed([collection], x => x, {
onListen: () => use(id),
onUnlisten: () => release(id)
})
cache[id].sync = sync
}
return cache[id]
}
function load () {
if (!loaded) {
pull(
api.sbot.pull.stream(sbot => sbot.patchwork.liveBacklinks.stream()),
pull.drain(msg => {
const collection = collections[msg.dest]
if (collection) {
const value = resolve(collection)
sorted.add(value, msg, compareAsserted)
collection.set(value)
}
})
)
loaded = true
}
}
function use (id) {
newRemove.delete(id)
oldRemove.delete(id)
}
function release (id) {
newRemove.add(id)
}
function subscribe (id) {
onceTrue(api.sbot.obs.connection(), (sbot) => sbot.patchwork.liveBacklinks.subscribe(id))
}
function unsubscribe (id) {
onceTrue(api.sbot.obs.connection(), (sbot) => sbot.patchwork.liveBacklinks.unsubscribe(id))
}
function compareAsserted (a, b) {
if (isReplyTo(a, b)) {
return -1
} else if (isReplyTo(b, a)) {
return 1
} else {
return api.message.sync.timestamp(a) - api.message.sync.timestamp(b)
}
}
}
function isReplyTo (maybeReply, msg) {
return (includesOrEquals(maybeReply.branch, msg.key))
}
function includesOrEquals (array, value) {
if (Array.isArray(array)) {
return array.includes(value)
} else {
return array === value
}
}
| {
"pile_set_name": "Github"
} |
Meeting Schedule
2017
All general membership Meetings are held on the first Wednesday of the month unless otherwise posted.
All meetings begin atT 7:30 PM
Directions to Holtsville Ecology CenterLong Island Expressway --- Go south at exit 63, 3 traffic lights (2 miles) turn right on Route 99, Woodside Avenue. Go to second road, Buckley Road and turn right, entrance to the park is on the right side.
Sunrise Highway --- Get off at Exit 52 (CR 19 Patchogue Holbrook Road). Go north and at the second light after Sunrise Hwy, turn right onto Buckley Road. The entrance is approximately 1.2 miles on your right.
Nichols Road --- Get off at Patchogue Holbrook Road. Head south and go to second light. Turn left on to Route 99 Woodside Ave. Turn left onto Buckley Road, the entrance is 1/10 mile. | {
"pile_set_name": "Pile-CC"
} |
Haemostasis in normal pregnancy: a balancing act?
Pregnancy is a risk factor for venous thrombosis and the incidence of venous thromboembolism during normal pregnancy is 6-fold higher during pregnancy than in the general female population of child-bearing age. This incidence is, however, remarkably low given the increases in markers of haemostatic activation observed during normal pregnancy. During normal healthy pregnancy there are substantial changes in the haemostatic system, many of which are procoagulant and supposed to be in preparation for the haemostatic challenge of delivery. Normal haemostasis requires a balance between coagulation and fibrinolysis to maintain the integrity of the vasculature, and complex physiological changes are evident during pregnancy which appear to ensure a constant coagulation/fibrinolysis balance. This balance is maintained, at least partly, by an increase in fibrinolytic activity, but decreases in other factors such as factor XI and monocyte tissue factor expression may also serve to counterbalance procoagulant changes. | {
"pile_set_name": "PubMed Abstracts"
} |
Seneca Falls Man Charged With Pot Possession
1/2/2013 5:33:21 AM
On December 23rd, 2012 at 12:11am Seneca Falls Police arrested Jeffrey K. Warrick Jr. age 29 of 224 Ovid Street Seneca Falls New York, 13148 for unlawful possession of marijuana and failure to keep right. This arrest resulted from a traffic stop conducted of Warrick on East Bayard Street in the Town of Seneca Falls. Warrick was released on an appearance ticket and a UTT and is to appear in Seneca Falls Town Court on January 10th, 2013 at 10:00am to answer his charge. | {
"pile_set_name": "Pile-CC"
} |
I react so badly to insect bites
Some people believe that taking vitamin B eg in an oral vitamin B complex preparation may reduce the likelihood of being bitten...
Question
I react badly to mosquito bites. In the past the bites have blistered and sometimes swollen into very hot, itchy spots.
I do take malaria tablets when required. On my most recent trip abroad to Spain, I was bitten again and the bites reacted as usual.
Is there anything I can take before a trip that will stop such an adverse reaction to the bites?
Answer
Insect bites can be very troublesome and if you are someone who frequently gets bitten and reacts badly to the bites it is worth doing all that you can to avoid being bitten.
ADVERTISEMENT - CONTINUE READING BELOW
Insect repellent spray, and plug-in types of repellent can be very effective and covering up at times when bites are most common (early morning and evenings) is a good idea too.
In tropical places, avoiding bites is even more important because of the risk of catching insect-borne diseases such as malaria.
Some people believe that taking vitamin B, eg in an oral vitamin B complex preparation may reduce the likelihood of being bitten. Apparently the vitamin is excreted in the sweat and puts off biting insects.
MOST POPULAR
There are no studies that support this claim, but you may like to try this. B vitamins should not be taken long term but taking them for a few weeks at a time would be safe.
Try to avoid scratching any bites that you get as this does make the reaction worse.
Antihistamine medications such as loratadine should ease the itching to some extent.
An antihistamine cream specially designed for use on insect bites is also helpful. When you take a bath keep the water cool as heat will tend to make the itching worse.
One thing that you need to be aware of is that bites do sometimes become infected. For this reason if you notice that the area around a bite is becoming very red, hot or swollen, it is always a good idea to arrange to see your GP or practice nurse so that they can check that this is not happening.
The materials in this web site are in no way intended to replace the professional medical care, advice, diagnosis or treatment of a doctor. The web site does not have answers to all problems. Answers to specific problems may not apply to everyone. If you notice medical symptoms or feel ill, you should consult your doctor - for further information see our Terms and conditions.
Getting healthy just got a whole lot easier
Don't miss out on the latest healthy living news and inspiration direct to your inbox.
Enter your email address:
this is a test error
We will also let you know about discounts and great offers from us, tick this box if you'd rather not know about these.
Hearst Partners would like to let you know about some of their fantastic discounts, special offers, and promotions. We promise you wont be bombarded. Tick here if you would like to receive these. | {
"pile_set_name": "Pile-CC"
} |
Many members of Congress, like Mr. Cuellar, had expected Mr. Kelly to be a force for stability in a White House that has at times seemed consumed with dysfunction, but have found a different reality.
“He brought some order to the chaos that was there, but it’s a long way from a functioning White House,” said Senator Richard J. Durbin of Illinois, the second-ranking Democrat, said in an interview for “The Daily,” a New York Times podcast. “His role from time to time I’ve considered to be destructive, sometimes constructive. I wonder, you know, if he really is the man I thought he was when I voted for him as secretary of D.H.S.”
Mr. Durbin, who has clashed with Mr. Trump over his assertion that the president used a vulgar term in an immigration meeting last week, was referring to the Department of Homeland Security, which Mr. Kelly led before taking his current position.
Mr. Kelly has made little secret of the fact that he never wanted to be White House chief of staff, and took the job out of the same sense of duty that led him to a four-decade career in the Marines.
In the West Wing, Mr. Kelly seldom allows the staff to forget the dynamic, according to people who have observed him, often positioning himself as a one-man check against dangerous or reckless moves by the commander in chief. His loyalty is not to the president, “but to the Constitution and the country,” he has said, according to two people with direct knowledge of his remarks.
Mr. Kelly, officials say, has made a conscious decision not to focus as much on curbing the president’s penchant for tweeting or saying inflammatory things, and to instead pour his efforts into controlling who sees and talks to Mr. Trump and trying to shape his thinking on key issues.
“I have said many times I was not put in this job to change the way the president of the United States does business,” he said in an interview with Fox News on Wednesday. “I was put in the job to make sure the staff process better informs him on a range of issues.” | {
"pile_set_name": "OpenWebText2"
} |
I used to play a ton of Roller Coaster Tycoon when I was a kid. I loved the game but I was never very good at making the roller coasters. They always felt too spread out, or too unnatural looking. As a ten year old I idly wondered about writing a computer program that was really good at playing the game. What sort of parks would it make? How would a computer approach the freedoms inherent in an empty park? What would we learn about the game engine from doing so?
Sadly, this one wasn't generated by a computer
In case you're not familiar, Roller Coaster Tycoon is a amusement park simulation game most notable because the entire game was written in x86 assembler by Chris Sawyer.
Finally a few months ago, I had the tools and the free time available to work on this, and I made some progress toward writing a program that would generate cool looking roller coasters. Let's examine the parts of this program in turn.
Interacting with the Game
So let's say you have a program that can generate roller coasters. How do you actually put them in the game, or integrate them into your parks?
Fortunately, Roller Coaster Tycoon has a format for saving track layouts to disk. Even more amazingly, this format has been documented.
4B: departure control flags 4C number of trains 4D number of cars per train 4E: minimum wait time in seconds 4F: maximum wait time in seconds
Once you decode the ride data, it follows a format. Byte 0 stores the ride type - 00000010 is a suspended steel roller coaster, for example. Some bytes indicate the presence of flags - the 17th bit tells you whether the coaster can have a vertical loop. And so on, and so on.
To compress space, RCT used a cheap run-length encoding algorithm that would compress duplicates of the same byte. But once you encoded/decoded the file, it was super easy to get it running in the game.
So, great! I could write my coaster generator in any language I wanted, write out the file to disk, then load it from any of the parks.
Getting Track Data
There are a lot of track pieces in the game, and I needed to get a lot of data about each of them to be able to make assertions about generated roller coasters. As an example, if the track is currently banked left, which pieces are even possible to construct next?
A steep upward slope track piece increases the car height 4 units. A sharp left turn would advance the car 3 squares forward and 3 squares left, and also rotate the car's direction by 90 degrees. I had less than zero interest in doing this all by hand, and would probably make a mistake doing it. So I went looking for the source of truth in the game..
OpenRCT2
Literally the same week that I started looking at this, Ted John started decompiling the Roller Coaster Tycoon 2 source from x86 into C, and posting the results on Github. More importantly (for me), Ted and the source code actually showed how to read and decompile the source of the game.
The repository shipped with an EXE that would load the C sources before the x86 game code. From there, the C code could (and did, often) use assembler calls to jump back into the game source, for parts that hadn't been decompiled yet.
This also introduced me to the tools you use to decompile x86 into C. We used the reverse engineering tool IDA Pro to read the raw assembly, with a shared database that had information on subroutines that had been decompiled. Using IDA is probably as close as I will come to a profession in code-breaking and/or reverse engineering.
Most of the time with IDA involved reading, annotating the code, and then double checking your results against other parts of the code, the same way you might annotate a crossword puzzle. Other times I used guess and check - change a value in the code, then re-run the game and see what specifically had changed, or use debugging statements to see what went on.
So I started looking for the track data in the game. This turned out to be really, really difficult. You would have a hunch, or use the limited search capability in the game to search for something you thought should be there. Ultimately, I figured out where the strings "Too high!" and "Too low!" were being called in the engine, figuring that track height data would have been computed or used near those points.
This was only part of the solution - it turns out that track data is not stored in one big map but in several maps all around the code base. Some places store information about track bank, some store information about heights and it's tricky to compile it all together. Ultimately, I was able to figure it out by spending enough time with the code and testing different addresses to see if the values there lined up with the pre-determined track order.
Visualizing rides
With a genetic algorithm you are going to be generating a lot of roller coasters. I wanted a quick way to see whether those roller coasters were getting better or not by plotting them. So I used Go's image package to draw roller coasters. To start I didn't try for an isometric view, although that would be fun to draw. Instead I just plotted height change in one image and x/y changes in another image. Running this against existing roller coasters also revealed some flaws in my track data.
A fitness function
A good fitness function will have penalties/rewards for various pieces of behavior.
Is the ride complete?
Does the ride intersect itself at any points?
Does the ride respect gravity, e.g. will a car make it all the way around the track?
How exciting is the ride, per the in-game excitement meter?
How nauseating is the ride, per the in-game excitement meter?
The first two points on that list are easy; the last three are much more difficult. Finding the excitement data was very tricky. I eventually found it by getting the excitement for a "static" ride with no moving parts (the Crooked House) and searching for the actual numbers used in the game. Here's the function that computes excitement, nausea and intensity for a Crooked House ride.
sub_65C4D4 proc near or dword ptr [edi+1D0h], 2 or dword ptr [edi+1D0h], 8 mov byte ptr [edi+198h], 5 call sub_655FD6 mov ebx, 0D7h ; '' mov ecx, 3Eh ; '>' mov ebp, 22h ; '"' call sub_65E7A3 call sub_65E7FB mov [edi+140h], bx mov [edi+142h], cx mov [edi+144h], bp xor ecx, ecx call sub_65E621 mov dl, 7 shl dl, 5 and byte ptr [edi+114h], 1Fh or [edi+114h], dl retn sub_65C4D4 endp
Got that? In this case 0xD7 in hex is 215 in decimal, which is the ride's excitement rating. I got lucky that this value is static and not changed by anything, which meant I could search for it from outside the binary. This is then stored in the ride's location in memory (register edi ), at the offset 0x140 . In between there are a few subroutine calls, which shows that nothing is ever really easy when you are reading x86, as well as calls to functions that I have nothing besides hunches about.
Anyway, when you turn this into C, you get something like this:
void crooked_house_excitement(rct_ride *ride) { // Set lifecycle bits ride->lifecycle_flags |= RIDE_LIFECYCLE_TESTED; ride->lifecycle_flags |= RIDE_LIFECYCLE_NO_RAW_STATS; ride->var_198 = 5; sub_655FD6(ride); ride_rating excitement = RIDE_RATING(2,15); ride_rating intensity = RIDE_RATING(0,62); ride_rating nausea = RIDE_RATING(0,34); excitement = apply_intensity_penalty(excitement, intensity); rating_tuple tup = per_ride_rating_adjustments(ride, excitement, intensity, nausea); ride->excitement = tup.excitement; ride->intensity = tup.intensity; ride->nausea = tup.nausea; ride->upkeep_cost = compute_upkeep(ride); // Upkeep flag? or a dirtiness flag ride->var_14D |= 2; // clear all bits except lowest 5 ride->var_114 &= 0x1f; // set 6th,7th,8th bits ride->var_114 |= 0xE0; }
And we're lucky in this case that the function is relatively contained; many places in the code feature jumps and constructs that make following the code pretty tricky.
So this one wasn't too bad, but I got bogged down trying to compute excitement for a ride that had a track. The function gets orders of magnitude more complex than this. One positive is, as far as I can tell, excitement and nausea ratings are wholly functions of overall ride statistics like the vertical and lateral G-forces, and there's no accumulator per track segment.
Most of the computation involves multiplying a ride statistic by a constant, then bit shifting the value so it can't be too high/influence the final number by too much.
And sadly, this is where the project stalled. It was impossible to test the C code, because the track computation functions were buried four subroutines deep, and each of those subroutines had at least 500 lines of code. Decompiling each of these correctly, just to get to the code I wanted, was going to be a massive pain. There are ways around this, but ultimately I got back from vacation and had to focus on more pressing issues.
Conclusion
You can hack Roller Coaster Tycoon! There are a bunch of people doing interesting stuff with the game, including improving the peep UI, working on cross compilation (you can play it on Macs!), adding intrigues like the possibility of a worker strike, removing limitations based on the number of bytes (you can only have 255 rides, for example), and more.
It's been really fun having an utterly useless side project. I learned a lot about registers, calling conventions, bit shifting tricks, and other things that probably won't be useful at all, for anything.
I will definitely revisit this project at some point, hopefully when more of the game has been decompiled, or I might try to dig back into the x86/C more on my own.
Liked what you read? I am available for hire. | {
"pile_set_name": "OpenWebText2"
} |
Pages
Saturday, May 16, 2015
As an exercise in media manipulation, this week's budget scores top marks. The government's spin doctors managed to convince the media it was a "stimulatory budget" when it was actually mildly contractionary.
With financial markets trading virtually continuously, the old need to lock the media up on budget day until the markets had closed disappeared decades ago. The only reason for continuing the practice is to maximise the government's ability to influence the media's initial reaction to its budget.
It does this by keeping journalists locked up for six hours, during which time the only experts they can approach for opinion and clarification are Treasury and Finance officers. Then you let the journos out just before deadline, when it's too late to contact independent experts.
The theory is that influencing the media's initial reaction is half the battle in influencing the electorate's ultimate reaction. Didn't work last year, of course.
If you wonder why governments habitually leak or announce so many of the budget's measures ahead of time, it's all part of the media manipulation. You announce measures you know will be popular so they get more attention than they would if you announced them all together on budget night.
You announce unpopular measures ahead of time to soften voters up and also so the media will regard them as old news on budget night and thus won't say much about them.
This year, the good news announced early was the changes to childcare subsidies, plus the decisions to make savings in the cost of pensions and Medicare in much less painful ways than had been proposed in last year's budget.
But you always save a bit of good news to act as the "cherry", taking care not to breathe a word of it in advance. Making this the only measure the media regards as "new" ensures they make it the centrepiece of their coverage. And, of course, you've made sure it's good news.
This week the cherry was the "Growing Jobs and Small Business package". And, boy, didn't the media go to town. The cut in the rate of tax imposed on small business was terrific, but the plan to allow multiple asset purchases of up to $20,000 each to be "written off against tax" was mind-blowing.
The next day's headlines showed how easily the media were manipulated: Joe's Jumpstart, Kickstarter, and Road to Recovery?
Don't be misled. The 1.5 percentage-point cut in the company tax rate for small businesses is itself small. The equivalent cut for unincorporated businesses will yield a maximum saving of less than $20 a week.
And the two-year offer of an immediate 100 per cent write-off for newly purchased business assets costing less than $20,000 each is nothing like the rort-inducing "bonanza" imagined by innumerate journos and economists who don't know as much accounting as they should.
You don't get up to $20,000 a pop taken off your tax bill - making the asset essentially free - you get it taken off your taxable income, meaning the taxman picks up 30 or 40 per cent of the cost, leaving you to pay the rest.
In any case, the cost of assets purchased for business purposes has always been 100 per cent deductible. The difference is that usually this "depreciation allowance" is spread over five years or so, whereas this special deal accelerates the full deduction to the end of the first year.
So it will probably induce a noticeable increase in small business investment spending, but that's unlikely to be big enough to make much difference to the economy's rate of growth.
It's a classic example of the things governments do when they're trying to apply fiscal stimulus, being similar to a measure in Kevin Rudd's stimulus package of 2009 after the global financial crisis.
But note the measure's downside: because it's temporary, its main effect will be to draw forward into the next two financial years spending that would otherwise have occurred in subsequent years, leaving a vacuum in those years. And because most motor vehicles and business equipment are imported, much of the increased investment spending will "leak" into imports.
Another part of the hype is the government's claim that small businesses are "the engine room of the economy". Nonsense. Big business is. As the budget's fine print admits, small business accounts for only about 38 per cent of the workforce and about a third of production.
The most important point, however, is that just because a budget contains a few small but sexy measures doesn't make it a "stimulatory budget" to anyone but a journo after a good headline.
To an economist, you have to put the few stimulatory measures into the context of the net effect of all the new measures taken in the budget.
When you do that you find they are expected to add $2.2 billion (or 0.13 per cent of gross domestic product) to the budget deficit in the coming financial year, but subtract $1.6 billion from the deficit over the five years to 2018-19.
Either way, the expected net effect of the budget's measures is too tiny to matter. That's the old, strict Keynesian way to determine the "stance" of fiscal policy adopted in the budget.
The Reserve Bank's way of determining the budget's overall effect on the economy (which adds to the above change in the discretionary or "structural" component of the deficit the expected change in the "cyclical" component caused by the operation of the budget's "automatic stabilisers") shows that, measured as a proportion of GPD, the coming year's deficit is expected to be 0.5 percentage points lower than for the financial year just ending, with expected falls of 0.6 points, 0.7 points and 0.4 points in the following years.
In my book, a change of 0.5 percentage points is right on the border between insignificant and significant. That makes the budget only mildly contractionary. | {
"pile_set_name": "Pile-CC"
} |
Increased plasma catecholamines in high renin hypertension.
Plasma catecholamines, indexes of sympathetic nervous tonicity, were measured simultaneously with renin both supine and after standing plus furosemide in patients with primary hypertension and normotensive volunteers. Seventy percent of hypertensive patients with high renin levels had increased catecholamines compared with a 14% incidence in the combined group with low and normal renin (P less than 0.001). Basal catecholamines were related directly to renin in the hypertensive patients and to blood pressure in the normal (P less than 0.05), but not in the high and low renin subgroups, and inversely to percent increase of catecholamines after standing plus furosemide in hypertensive and normotensive patients (P less than 0.01). Sympathetic nervous hypertonicity may be responsible for the elevation of blood pressure and for the activation of the renin-angiotensin system in patients with high renin hypertension. | {
"pile_set_name": "PubMed Abstracts"
} |
/*
* Copyright (c) 2004, PostgreSQL Global Development Group
* See the LICENSE file in the project root for more information.
*/
package org.postgresql.ds;
import org.postgresql.ds.common.BaseDataSource;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.sql.SQLException;
import javax.sql.DataSource;
/**
* Simple DataSource which does not perform connection pooling. In order to use the DataSource, you
* must set the property databaseName. The settings for serverName, portNumber, user, and password
* are optional. Note: these properties are declared in the superclass.
*
* @author Aaron Mulder (ammulder@chariotsolutions.com)
*/
public class PGSimpleDataSource extends BaseDataSource implements DataSource, Serializable {
/**
* Gets a description of this DataSource.
*/
public String getDescription() {
return "Non-Pooling DataSource from " + org.postgresql.util.DriverInfo.DRIVER_FULL_NAME;
}
private void writeObject(ObjectOutputStream out) throws IOException {
writeBaseObject(out);
}
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
readBaseObject(in);
}
public boolean isWrapperFor(Class<?> iface) throws SQLException {
return iface.isAssignableFrom(getClass());
}
public <T> T unwrap(Class<T> iface) throws SQLException {
if (iface.isAssignableFrom(getClass())) {
return iface.cast(this);
}
throw new SQLException("Cannot unwrap to " + iface.getName());
}
}
| {
"pile_set_name": "Github"
} |
Q:
Storing a web project (in my case joomla) on SVN - how to do this properly
I have made a joomla component that I want to put on SVN. The problem is that Joomla components have bits and pieces scattered all over the place. What is the best way to handle this with SVN considering I still want to be able to version the application, without including all the core joomla code website code?
UPDATE
I ended up using symlinks in Window 7 like Linux has
http://www.howtogeek.com/howto/windows-vista/using-symlinks-in-windows-vista/
And a nice utility for making linking really easy
http://schinagl.priv.at/nt/hardlinkshellext/hardlinkshellext.html
You can have the project exactly as you would have it in the installer and link the directories and language files to their respective place in the Joomla hierarchy. This also allows you to have multiple Joomla version installed and using a single repository your can test them all! Works great :)
A:
This is how I organise my component files within my svn. Assume that my component name is comname.
repository/components/comname/trunk/
comname
comname_admin
com_comname.xml
com_comname-1.0.zip
license.txt
comname_userguide.doc
comname_userguide.pdf
All your front end code should be in comname folder while all your admin code should be in comname_admin. This is the standard way in which to layout a Joomla component structure.
You can then tag your versions and keep them in repository/components/comname/tags/1.0 for example.
Hope that helps. Cheers
| {
"pile_set_name": "StackExchange"
} |
m¥ ®ªņŧ ЯФΘΣ -
Random Rantings of Avinash -
Anyone who uses the phrase 'easy as taking candy from a baby' has never tried taking candy from a baby
Tuesday, July 7, 2009
What seems to be the problem?
A few days ago, I ate something that would sound odd but was quite nice - mango sambar. Most of the few eyeballs that scan this blog probably know what both are, but just in case. This is a mango - http://en.wikipedia.org/wiki/Mango and this is sambar http://en.wikipedia.org/wiki/Sambar_%28dish%29 . And while I admit that it was pretty good, I am left wondering as to how many people would accept my culinary tastes.
This train of thought led me to Section 377, and the recent ruling by the Delhi High Court ruling the section to be unconstitutional. Frankly, I was surprised, because I didn't think it would happen. And the reactions were expected. Religious reactions apart, I found some reactions... Well I couldn't understand them. I don't know where to start.
First off; the claim that it is against culture and nature. Without debating the truth of these claims, I would like to proceed. We do a lot of things that are "against nature". We drive cars, we bathe - with soap, and the list goes on. "Animals" don't do these things. And what of the "against culture" argument? I must say I have my reservations about whether this is even a valid argument. There are many things that were "against culture" at one point.
Racism was part of culture, so was Sati ( http://en.wikipedia.org/wiki/Sati_(practice) ), even bathing was not encouraged by Victorian culture. But back in the day, people rode horses - which is awesome, and the environment was also more respected (apparently). Now all I'm saying is that any practise must be examined on it's own merit and not on whether it's part of "culture". Culture is a dynamic entity, and there is no obligation to keep it static.
Then there's the standard "aping the west" argument. This is something of a moral panic, and again, ties back to the culture argument. Must we not adopt something just because it is prevalent in the west?
Then there's the "what are we going to legalise next" argument. Hmm. This is something of a slippery slope we're traversing. There are a lot of things to say about those activities that would be legalised, but then again - that's not what I'm talking about here.
Then there's the "children to be protected" argument. This makes no sense any way you look at it. Sex with a minor is illegal. Period. Non-consensual sex is rape. Now if a new law to prevent homosexual sex with minors was implemented, how will two laws deter offenders when one didn't? Section 377 still regulates sex with minors.
Then there's the genetic/non-genetic argument should not even be raised. A lot of things are genetic - the predisposition to out-group violence, incest avoidance and many more. Whether homosexuality is genetic or not should not be relevant and it should be debated without this in mind just as other behaviours are.
In the end why regulate an activity performed by consenting adults in the privacy of their quarters? It's not worth debate, because it's a question of a section of society wanting to do their thing. If tomorrow a section of society wants to jump up and down holding hands in their private quarters with whomever they like to jump with, then should we even debate regulating it?
In any case, whether people like it or not, whether people think it is "disgusting" or not, it is a question of tastes. And I wont let you take away my right to eat what I want - like my mango sambar (although I am told that it's quite a traditional dish, and a quick google search confirms this).
2 comments:
very well put.. the biggest comedy is baba ramdev.. he has said that he ll "treat these ppl and they can either marry or stay a brahmachari like him"i dont know if hes implying he was gay once upon a time..anyway totally agree with what you wrote | {
"pile_set_name": "Pile-CC"
} |
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* 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.
*/
package com.intellij.psi.impl.source.resolve.reference.impl.manipulators;
import com.intellij.openapi.editor.Document;
import com.intellij.openapi.fileEditor.FileDocumentManager;
import com.intellij.openapi.util.TextRange;
import com.intellij.psi.PsiDocumentManager;
import com.intellij.psi.PsiPlainTextFile;
import com.intellij.psi.AbstractElementManipulator;
import com.intellij.util.IncorrectOperationException;
import javax.annotation.Nonnull;
/**
* Created by IntelliJ IDEA.
* User: ik
* Date: 09.12.2003
* Time: 14:10:35
* To change this template use Options | File Templates.
*/
public class PlainFileManipulator extends AbstractElementManipulator<PsiPlainTextFile> {
@Override
public PsiPlainTextFile handleContentChange(@Nonnull PsiPlainTextFile file, @Nonnull TextRange range, String newContent)
throws IncorrectOperationException {
final Document document = FileDocumentManager.getInstance().getDocument(file.getVirtualFile());
document.replaceString(range.getStartOffset(), range.getEndOffset(), newContent);
PsiDocumentManager.getInstance(file.getProject()).commitDocument(document);
return file;
}
}
| {
"pile_set_name": "Github"
} |
Distribution of full motion video data has evolved from early television broadcasting to meet viewer demand. Earliest video distribution was by point-to-point wiring between a camera and a video monitor. This was followed by scheduled television broadcasting of programming over the public air waves. In the 1960s, Community Antenna Television (CATV) was chartered to provide off-air television signals to viewers in broadcast reception fringe areas. Later, under FCC regulation, the CATV industry was required to provide local access and original programming in addition to off-air broadcast signal distribution.
In response, several sources of cable network programming were established. Because of the wide bandwidth available on cable television systems, additional channels were made available for the new programming. However, programming was generally prescheduled, with the viewer left to tune to the designated channel at the appointed time to view a particular program.
To increase revenues, cable television systems have initiated distribution of premium channels viewable only by subscribers having appropriate descramblers. The descramblers are tuned to receive only premium channels, descramble the video and audio information and supply a signal capable of reception on a standard television set.
Pay-per-view programs, which evolved later, include recently released movies, live concerts and popular sporting events. Subscribers wishing to view a pay-per-view program place an order with the cable operator. At the designated time, the subscriber's descrambler is activated to permit viewing of the pay-per-view programming. However, the subscriber is restricted to viewing the programming at the scheduled time. There is no capability of delivering programming to a subscriber on demand, that is, immediately or at a subscriber-specified time and date.
In the early 1980s, technological advances resulted in the proliferation of Video Cassette Recorders (VCR), establishing a second course for video programming distribution. Pre-recorded video programs are now available for sale and rental to VCR owners. Using a VCR, the viewer selects from among many titles available for sale and rental, and views the program when convenient. The VCR owner further has the capability to selectively view the programming using special functions of the VCR, such as pause, fast forward, reverse, slow motion, etc. The viewer can thus manipulate and replay portions of the program at will.
The penalty for this convenience, however, is in the necessity to travel to the local video rental/sales store, if necessary wait for a popular video program tape to become available, once the program is obtained return home to view it and then revisit the video store to return the tape.
Telephone lines have been suggested as an alternative means of video distribution in Goodman et al., U.S. Pat. No. 5,010,319 and Kleinerman, U.S. Pat. No. 4,849,811. However, systems using the public switched telephone network (PSTN) are often bandwidth limited, providing only still frame or video conferencing capabilities. Because telephone system carriers for the most part use the PSTN only for connectivity between subscribers, there is no capability for dynamic routing of digitized video without dedicated leased, wide bandwidth circuits. Telephone line based systems also fail to provide acceptable VCR type functional control of the programming.
Copending application Ser. No. 07/766,535, filed by the assignee of the present invention on Sep. 27, 1991, entitled PSTN ARCHITECTURE FOR VIDEO-ON-DEMAND SERVICES and upon which the present invention is an improvement, describes a so-called Video-on-Demand service that provides video programming to subscribers over the PSTN. A menu of video programming information is accessible at the subscriber's premises. The subscriber may transmit ordering information via the PSTN to the independent video information providers. Video programming may be accessed and transmitted to the subscriber directly from a video information provider (VIP) or through a video buffer located at a central office (CO) serving the subscriber.
The VIP transmits coded digital video data over wideband PSTN supplied connectivity to a central office. The video data may be buffered at the central office for transmission over a POTS line to the subscriber. A subscriber may use either a standard telephone instrument over the PSTN or a dedicated control device over an ISDN packet network to order the video programming. Such a device is located at a television set of the subscriber and permits a display of the program menu on the television screen.
Connectivity between the central office and the subscriber for transmission of video data is provided by an asymmetrical digital subscriber line (ADSL) system. ADSL interface units perform multiplexing of digital video information with voice information to be transmitted to the subscriber and support transmission on the ISDN packet data network of a reverse control channel from the subscriber to the central office.
However, video-on-demand service does not include an integral library of video program material, hence enabling only limited storage capabilities for video and audio data supplied by a VIP. Enhanced functionality is required to efficiently support multiple program storage. Furthermore, to support network management, a need remains for a system which dynamically interacts with network facilities to reconfigure network resources in real-time and in response to information requests.
Furthermore, certain operational enhancements have been found to be desirable in the video-on-demand service described in the aforementioned parent application. For example, it is occasionally desired to order a video program from the subscriber's office to be played later at the premises of the subscriber. On the other hand, the subscriber must be home and remember to turn a decoder on at the reserved time, to watch the requested program. If not, the subscriber will not have the opportunity to view the selection but will be charged for it anyway. Hence, it would be desirable to transmit the program and enable a charge to be incurred only if it can be determined that the subscriber is going to view the program.
In accordance with video-on-demand service as described in the copending application, the subscriber can order any programming from the video information provider through the telephone keypad or remote control unit. However, the unrestricted ability of anyone at the subscriber's residence to place an order for any programming is undesirable, for example, where children are involved. It would be desirable to restrict the ability of viewers to order only those types of programming they are permitted to view.
Accordingly, a broad object of the invention is to implement video programming on demand using components of the PSTN.
Another object of the invention is to enable access by a telephone subscriber to multiple sources of video programming over the PSTN.
Still another object of the invention is to enable subscribers of the PSTN to have real time control of video programming delivery to their television sets.
Another object is to enable a subscriber to select video programming from a remote location and receive the selection at the subscriber's premises.
A further object of the invention is to ensure that the video program decoder at the subscriber's premises is turned on before a previously ordered selection is transmitted.
Still another object is to establish service constraints that prevent an unauthorized requester, e.g., a child at the subscriber's premises, from ordering restricted programming. | {
"pile_set_name": "USPTO Backgrounds"
} |
Design & Creative
Quick Contact
(*Required)
You will hear from us soon.
Great start-up strategy for a robust business
Are you looking for start-up strategy and services to keep your business up and running for a longer period of time. AddLead will help you to nurture your dream of setting up a start-up venture. For many of us starting and setting up a new business can be equally daunting and exciting. With this comes many responsibilities like raising finance, research the market, establish contacts, hiring staff, find a location and more. AddLead will help you get an established track record when it comes to the business set up. The team that works with us provide solutions that are backed up with more of practical skills. They are an expert when it comes to managing the unique challenges which come your way during the initial days of your business.
Unique features of AddLead for start-up strategy:
We help to determine the best start-up structure for you
Planning and budgeting from our side can serve as a roadmap for success
Perfect web-based business ideas
With us, you get a flying start for your business
Manage the best of analytic report
Outstanding website designs
Best SEO services that would help you to get found easily
Why ADDlead
We offer you with unique and best of start-up strategies
Each of our team members is highly knowledgeable when it comes to rendering start-up strategies
We have years of experience in providing start-up strategies
Our results speak for ourselves
We focus on the satisfaction of the customer
Execution has always been our best part
We render trustworthy start-up strategies
We put special efforts to make your website outstanding
With us, you could achieve an improved strategy for your business
Instant response and quick services
Get in Touch
Addlead Digital Marketing Services
ADDLEAD is a multifaceted Digital Marketing Agency with its office located in New Delhi, India. Our skilled professionals possess a rich flair of SEO, SMO, Web Designing, Web Development and Link Building. | {
"pile_set_name": "Pile-CC"
} |
Exclusive: Atsu set for another year at Vitesse
Christian Atsu will remain a player of Vitesse Arnhem for another season after Chelsea and the dutch club reached an agreement, Allsports.com.gh understands.
The Ghanaian winger was instrumental for Vitesse in his first season, culminating in him being named player of the year by the club and Allsports.com.gh understands he was willing to stay another year due to the competition for places in Jose Mourinho’s team.
He is among a number of Chelsea players like Lucas Piazon and Bertrand Traore on loan at Vitesse who enjoyed fine form with the Eagles but are still unsure of their place within Mourinho’s plans
Atsu is currently on international assignment with Ghana at the World Cup in Brazil. | {
"pile_set_name": "Pile-CC"
} |
#c401d3 hex color
#c401d3 Color Information
In a RGB color space, hex #c401d3 is composed of 76.9% red, 0.4% green and 82.7% blue.
Whereas in a CMYK color space, it is composed of 7.1% cyan, 99.5% magenta, 0% yellow and 17.3% black.
It has a hue angle of 295.7 degrees, a saturation of 99.1% and a lightness of 41.6%.
#c401d3 color hex could be obtained by blending #ff02ff with #8900a7.
Closest websafe color is: #cc00cc. | {
"pile_set_name": "Pile-CC"
} |
Ways to Support Us
Attorneys seek 25 years for man in Michigan airport stabbing
Published Fri Apr 12 2019 03:39:26 GMT+0000 (UTC)
by By COREY WILLIAMS
DETROIT (AP) — A Montreal man convicted of stabbing a police officer at a Flint, Michigan, airport was in debt and saw the attack as a way to become a martyr while benefiting his wife and children financially through a life insurance policy, his attorneys wrote in a Thursday court filing.
Amor Ftouhi's attorneys say he should get 25 years in prison and that he should serve that time in solitary confinement.
However, federal prosecutors say Ftouhi should be sentenced to life in prison for committing an act of terrorism transcending national boundaries and for interfering with airport security. They say he was on a mission to kill as many people as possible and then be killed himself.
Ftouhi was convicted in November on several charges in the June 2017 attack. Witnesses said Ftouhi, who is Muslim, yelled "Allahu akbar" — or "God is great" — while attacking Lt. Jeff Neville, who survived being stabbed in the neck.
Defense attorneys wrote that Ftouhi was depressed about being in debt and being unable to properly support his wife and children after he had moved them from Tunisia to Montreal. He also expected that other officers would have killed him and that his widow could have collected on his life insurance policy, they wrote.
"Mr. Ftouhi believed he had found a 'solution' to his financial and emotional predicament: become a martyr for Allah and earn a place in Paradise for him and his family as his reward," they wrote in the memorandum. "Mr. Ftouhi truly believed this was the creative answer to all of his problems both in the present and in the afterlife."
The filing did not list any of Ftouhi's debts and the attorneys declined to comment when reached by phone.
In his filing, U.S. Attorney Matthew Schneider dismissed the defense attorneys' characterization of Ftouhi's attack as a one-time event and a product of his depression and hopelessness.
"Ftouhi may have been unsatisfied with his life but he tried to kill Jeff Neville and intended to kill countless more because he dreamed of being a mujahedeen — a warrior," Schneider asserted. "He yearned to be revered and killing was the way to achieve that. Life imprisonment is the only just sentence for this crime and the only way to ensure the public's safety in the future. The court should impose that sentence."
Investigators have said Ftouhi intended to stab Neville, take his gun and start shooting people at Flint Bishop Airport. He legally drove into the U.S. at Champlain, New York, and arrived in Flint five days later. He tried but failed to buy a gun at a gun show and instead bought a large knife.
"His plan was never to become an indiscriminate killer, attempting to create a mass casualty situation, nor was he trying to be a member of any radical Islamic group," his lawyers wrote. "Mr. Ftouhi most certainly believed he would have been killed on June 21, 2017, and when he wasn't killed, he was very upset."
Ftouhi's lawyers didn't offer an opening statement at trial and didn't call any witnesses. In her closing argument, attorney Joan Morgan said Ftouhi was unstable and believed it would be easier to be killed by police in the U.S. than in Canada.
"Mr. Ftouhi believed he needed to be killed as a 'soldier of Allah' by a uniformed enemy of Muslims in order to solve his problems of debt, to enter Paradise, and to end his life," his attorneys wrote in the memorandum. "He did not believe Allah would accept that an armed Canadian officer was an enemy of Muslims, but he believed an armed United States government official would be acceptable to Allah, given his perceived view of U.S. involvement in the Middle East."
FILE - In this undated file photo released by the FBI, shows Amor Ftouhi. Lawyers for the Montreal man facing life in prison for terrorism and other crimes in the stabbing of a Flint, Mich. airport officer are seeking a 25-year sentence. Ftouhi's attorneys also wrote in a memorandum Thursday, April 11, 2019, in federal court in Flint that the time should be spent in solitary confinement. Ftouhi was convicted in November. (FBI via AP, File) | {
"pile_set_name": "Pile-CC"
} |
// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.
module internal FSharp.Compiler.InnerLambdasToTopLevelFuncs
open FSharp.Compiler
open FSharp.Compiler.AbstractIL.Internal
open FSharp.Compiler.AbstractIL.Internal.Library
open FSharp.Compiler.AbstractIL.Diagnostics
open FSharp.Compiler.CompilerGlobalState
open FSharp.Compiler.ErrorLogger
open FSharp.Compiler.Detuple.GlobalUsageAnalysis
open FSharp.Compiler.Layout
open FSharp.Compiler.Lib
open FSharp.Compiler.SyntaxTree
open FSharp.Compiler.TypedTree
open FSharp.Compiler.TypedTreeBasics
open FSharp.Compiler.TypedTreeOps
open FSharp.Compiler.TypedTreeOps.DebugPrint
open FSharp.Compiler.TcGlobals
open FSharp.Compiler.XmlDoc
let verboseTLR = false
//-------------------------------------------------------------------------
// library helpers
//-------------------------------------------------------------------------
let internalError str = dprintf "Error: %s\n" str;raise (Failure str)
module Zmap =
let force k mp (str, soK) =
try Zmap.find k mp
with e ->
dprintf "Zmap.force: %s %s\n" str (soK k)
PreserveStackTrace e
raise e
//-------------------------------------------------------------------------
// misc
//-------------------------------------------------------------------------
/// tree, used to store dec sequence
type Tree<'T> =
| TreeNode of Tree<'T> list
| LeafNode of 'T
let fringeTR tr =
let rec collect tr acc =
match tr with
| TreeNode subts -> List.foldBack collect subts acc
| LeafNode x -> x :: acc
collect tr []
let emptyTR = TreeNode[]
//-------------------------------------------------------------------------
// misc
//-------------------------------------------------------------------------
/// Collapse reclinks on app and combine apps if possible
/// recursive ids are inside reclinks and maybe be type instanced with a Expr.App
// CLEANUP NOTE: mkApps ensures applications are kept in a collapsed
// and combined form, so this function should not be needed
let destApp (f, fty, tys, args, m) =
match stripExpr f with
| Expr.App (f2, fty2, tys2, [], _) -> (f2, fty2, tys2 @ tys, args, m)
| Expr.App _ -> (f, fty, tys, args, m) (* has args, so not combine ty args *)
| f -> (f, fty, tys, args, m)
#if DEBUG
let showTyparSet tps = showL (commaListL (List.map typarL (Zset.elements tps)))
#endif
// CLEANUP NOTE: don't like the look of this function - this distinction
// should never be needed
let isDelayedRepr (f: Val) e =
let _tps, vss, _b, _rty = stripTopLambda (e, f.Type)
List.length vss>0
// REVIEW: these should just be replaced by direct calls to mkLocal, mkCompGenLocal etc.
// REVIEW: However these set an arity whereas the others don't
let mkLocalNameTypeArity compgen m name ty topValInfo =
Construct.NewVal(name, m, None, ty, Immutable, compgen, topValInfo, taccessPublic, ValNotInRecScope, None, NormalVal, [], ValInline.Optional, XmlDoc.Empty, false, false, false, false, false, false, None, ParentNone)
//-------------------------------------------------------------------------
// definitions: TLR, arity, arity-met, arity-short
//
// DEFN: An f is TLR with arity wf if
// (a) it's repr is "LAM tps. lam x1...xN. body" and have N<=wf (i.e. have enough args)
// (b) it has no free tps
// (c) for g: freevars(repr), both
// (1) g is TLR with arity wg, and
// (2) g occurs in arity-met occurrence.
// (d) if N=0, then further require that body be a TLR-constant.
//
// Conditions (a-c) are required if f is to have a static method/field representation.
// Condition (d) chooses which constants can be lifted. (no effects, non-trivial).
//
// DEFN: An arity-met occurrence of g is a g application with enough args supplied,
// ie. (g tps args) where wg <= |args|.
//
// DEFN: An arity-short occurrence does not have enough args.
//
// DEFN: A TLR-constant:
// - can have constructors (tuples, datatype, records, exn).
// - should be non-trivial (says, causes allocation).
// - if calls are allowed, they must be effect free (since eval point is moving).
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------
// OVERVIEW
// Overview of passes (over term) and steps (not over term):
//
// pass1 - decide which f will be TLR and determine their arity.
// pass2 - what closures are needed? Finds reqdTypars(f) and reqdItems(f) for TLR f.
// Depends on the arity choice, so must follow pass1.
// step3 - choose env packing, create fHats.
// pass4 - rewrite term fixing up definitions and callsites.
// Depends on closure and env packing, so must follow pass2 (and step 3).
// pass5 - copyExpr call to topexpr to ensure all bound ids are unique.
// For complexity reasons, better to re-recurse over expr once.
// pass6 - sanity check, confirm that all TLR marked bindings meet DEFN.
//
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------
// pass1: GetValsBoundUnderMustInline (see comment further below)
//-------------------------------------------------------------------------
let GetValsBoundUnderMustInline xinfo =
let accRejectFrom (v: Val) repr rejectS =
if v.InlineInfo = ValInline.PseudoVal then
Zset.union (GetValsBoundInExpr repr) rejectS
else rejectS
let rejectS = Zset.empty valOrder
let rejectS = Zmap.fold accRejectFrom xinfo.Defns rejectS
rejectS
//-------------------------------------------------------------------------
// pass1: IsRefusedTLR
//-------------------------------------------------------------------------
let IsRefusedTLR g (f: Val) =
let mutableVal = f.IsMutable
// things marked ValInline.Never are special
let dllImportStubOrOtherNeverInline = (f.InlineInfo = ValInline.Never)
// Cannot have static fields of byref type
let byrefVal = isByrefLikeTy g f.Range f.Type
// Special values are instance methods etc. on .NET types. For now leave these alone
let specialVal = f.MemberInfo.IsSome
let alreadyChosen = f.ValReprInfo.IsSome
let refuseTest = alreadyChosen || mutableVal || byrefVal || specialVal || dllImportStubOrOtherNeverInline
refuseTest
let IsMandatoryTopLevel (f: Val) =
let specialVal = f.MemberInfo.IsSome
let isModulBinding = f.IsMemberOrModuleBinding
specialVal || isModulBinding
let IsMandatoryNonTopLevel g (f: Val) =
let byrefVal = isByrefLikeTy g f.Range f.Type
byrefVal
//-------------------------------------------------------------------------
// pass1: decide which f are to be TLR? and if so, arity(f)
//-------------------------------------------------------------------------
module Pass1_DetermineTLRAndArities =
let GetMaxNumArgsAtUses xinfo f =
match Zmap.tryFind f xinfo.Uses with
| None -> 0 (* no call sites *)
| Some sites ->
sites |> List.map (fun (_accessors, _tinst, args) -> List.length args) |> List.max
let SelectTLRVals g xinfo f e =
if IsRefusedTLR g f then None
// Exclude values bound in a decision tree
else if Zset.contains f xinfo.DecisionTreeBindings then None
else
// Could the binding be TLR? with what arity?
let atTopLevel = Zset.contains f xinfo.TopLevelBindings
let tps, vss, _b, _rty = stripTopLambda (e, f.Type)
let nFormals = vss.Length
let nMaxApplied = GetMaxNumArgsAtUses xinfo f
let arity = Operators.min nFormals nMaxApplied
if atTopLevel || arity<>0 || not (isNil tps) then Some (f, arity)
else None
/// Check if f involves any value recursion (so can skip those).
/// ValRec considered: recursive && some f in mutual binding is not bound to a lambda
let IsValueRecursionFree xinfo f =
let hasDelayedRepr f = isDelayedRepr f (Zmap.force f xinfo.Defns ("IsValueRecursionFree - hasDelayedRepr", nameOfVal))
let isRecursive, mudefs = Zmap.force f xinfo.RecursiveBindings ("IsValueRecursionFree", nameOfVal)
not isRecursive || List.forall hasDelayedRepr mudefs
let DumpArity arityM =
let dump f n = dprintf "tlr: arity %50s = %d\n" (showL (valL f)) n
Zmap.iter dump arityM
let DetermineTLRAndArities g expr =
let xinfo = GetUsageInfoOfImplFile g expr
let fArities = Zmap.chooseL (SelectTLRVals g xinfo) xinfo.Defns
let fArities = List.filter (fst >> IsValueRecursionFree xinfo) fArities
// Do not TLR v if it is bound under a mustinline defn
// There is simply no point - the original value will be duplicated and TLR'd anyway
let rejectS = GetValsBoundUnderMustInline xinfo
let fArities = List.filter (fun (v, _) -> not (Zset.contains v rejectS)) fArities
(*-*)
let tlrS = Zset.ofList valOrder (List.map fst fArities)
let topValS = xinfo.TopLevelBindings (* genuinely top level *)
let topValS = Zset.filter (IsMandatoryNonTopLevel g >> not) topValS (* restrict *)
(* REPORT MISSED CASES *)
#if DEBUG
if verboseTLR then
let missed = Zset.diff xinfo.TopLevelBindings tlrS
missed |> Zset.iter (fun v -> dprintf "TopLevel but not TLR = %s\n" v.LogicalName)
#endif
(* REPORT OVER *)
let arityM = Zmap.ofList valOrder fArities
#if DEBUG
if verboseTLR then DumpArity arityM
#endif
tlrS, topValS, arityM
(* NOTES:
For constants,
Want to fold in a declaration order,
so can make decisions about TLR given TLR-knowledge about prior constants.
Assuming ilxgen will fix up initialisations.
So,
Results to be extended to include some scoping representation.
Maybe a telescope tree which can be walked over.
*)
//-------------------------------------------------------------------------
// pass2: determine reqdTypars(f) and envreq(f) - notes
//-------------------------------------------------------------------------
/// What are the closing types/values for {f1, f2...} mutually defined?
///
// Note: arity-met g-applications (g TLR) will translated as:
// [[g @ tps ` args]] -> gHAT @ reqdTypars(g) tps ` env(g) args
// so they require availability of closing types/values for g.
//
// If g is free wrt f1, f2... then g's closure must be included.
//
// Note: mutual definitions have a common closure.
//
// For f1, f2, ... = fBody1, fbody2... mutual bindings:
//
// DEFN: The reqdVals0 are the free-values of fBody1, fBody2...
//
// What are the closure equations?
//
// reqdTypars(f1, f2..) includes free-tps(f)
// reqdTypars(f1, f2..) includes reqdTypars(g) if fBody has arity-met g-occurrence (g TLR).
//
// reqdItems(f1, f2...) includes ReqdSubEnv(g) if fBody has arity-met g-occurrence (g TLR)
// reqdItems(f1, f2...) includes ReqdVal(g) if fBody has arity-short g-occurrence (g TLR)
// reqdItems(f1, f2...) includes ReqdVal(g) if fBody has g-occurrence (g not TLR)
//
// and only collect requirements if g is a generator (see next notes).
//
// Note: "env-availability"
// In the translated code, env(h) will be defined at the h definition point.
// So, where-ever h could be called (recursive or not),
// the env(h) will be available (in scope).
//
// Note (subtle): "sub-env-requirement-only-for-reqdVals0"
// If have an arity-met call to h inside fBody, but h is not a freevar for f,
// then h does not contribute env(h) to env(f), the closure for f.
// It is true that env(h) will be required at the h call-site,
// but the env(h) will be available there (by "env-availability"),
// since h must be bound inside the fBody since h was not a freevar for f.
// .
// [note, f and h may mutually recurse and formals of f may be in env(h),
// so env(f) may be properly inside env(h),
// so better not have env(h) in env(f)!!!].
/// The subset of ids from a mutal binding that are chosen to be TLR.
/// They share a common env.
/// [Each fclass has an env, the fclass are the handles to envs.]
type BindingGroupSharingSameReqdItems(bindings: Bindings) =
let vals = valsOfBinds bindings
let vset = Zset.addList vals (Zset.empty valOrder)
member fclass.Vals = vals
member fclass.Contains (v: Val) = vset.Contains v
member fclass.IsEmpty = isNil vals
member fclass.Pairs = vals |> List.map (fun f -> (f, fclass))
override fclass.ToString() = "+" + String.concat "+" (List.map nameOfVal vals)
let fclassOrder = Order.orderOn (fun (b: BindingGroupSharingSameReqdItems) -> b.Vals) (List.order valOrder)
/// It is required to make the TLR closed wrt it's freevars (the env reqdVals0).
/// For gv a generator,
/// An arity-met gv occurrence contributes the env required for that gv call.
/// Other occurrences contribute the value gv.
type ReqdItem =
| ReqdSubEnv of Val
| ReqdVal of Val
override i.ToString() =
match i with
| ReqdSubEnv f -> "&" + f.LogicalName
| ReqdVal f -> f.LogicalName
let reqdItemOrder =
let rep = function
| ReqdSubEnv v -> true, v
| ReqdVal v -> false, v
Order.orderOn rep (Pair.order (Bool.order, valOrder))
/// An env says what is needed to close the corresponding defn(s).
/// The reqdTypars are the free reqdTypars of the defns, and those required by any direct TLR arity-met calls.
/// The reqdItems are the ids/subEnvs required from calls to freeVars.
type ReqdItemsForDefn =
{
reqdTypars: Zset<Typar>
reqdItems: Zset<ReqdItem>
m: Range.range
}
member env.ReqdSubEnvs = [ for x in env.reqdItems do match x with | ReqdSubEnv f -> yield f | ReqdVal _ -> () ]
member env.ReqdVals = [ for x in env.reqdItems do match x with | ReqdSubEnv _ -> () | ReqdVal v -> yield v ]
member env.Extend (typars, items) =
{env with
reqdTypars = Zset.addList typars env.reqdTypars
reqdItems = Zset.addList items env.reqdItems}
static member Initial typars m =
{reqdTypars = Zset.addList typars (Zset.empty typarOrder)
reqdItems = Zset.empty reqdItemOrder
m = m }
override env.ToString() =
(showL (commaListL (List.map typarL (Zset.elements env.reqdTypars)))) + "--" +
(String.concat ", " (List.map string (Zset.elements env.reqdItems)))
(*--debug-stuff--*)
//-------------------------------------------------------------------------
// pass2: collector - state
//-------------------------------------------------------------------------
type Generators = Zset<Val>
/// check a named function value applied to sufficient arguments
let IsArityMet (vref: ValRef) wf (tys: TypeInst) args =
(tys.Length = vref.Typars.Length) && (wf <= List.length args)
module Pass2_DetermineReqdItems =
// IMPLEMENTATION PLAN:
//
// fold over expr.
//
// - at an instance g,
// - (a) g arity-met, LogRequiredFrom g - ReqdSubEnv(g) -- direct call will require env(g) and reqdTypars(g)
// - (b) g arity-short, LogRequiredFrom g - ReqdVal(g) -- remains g call
// - (c) g non-TLR, LogRequiredFrom g - ReqdVal(g) -- remains g
// where
// LogRequiredFrom g ... = logs info into (reqdVals0, env) if g in reqdVals0.
//
// - at some mu-bindings, f1, f2... = fBody1, fBody2, ...
// "note reqdVals0, push (reqdVals0, env), fold-over bodies, pop, fold rest"
//
// - let fclass = ff1, ... be the fi which are being made TLR.
// - required to find an env for these.
// - start a new envCollector:
// freetps = freetypars of (fBody1, fBody2, ...)
// freevs = freevars of ..
// initialise:
// reqdTypars = freetps
// reqdItems = [] -- info collected from generator occurrences in bindings
// reqdVals0 = freevs
// - fold bodies, collecting info for reqdVals0.
// - pop and save env.
// - note: - reqdTypars(fclass) are only the freetps
// - they need to include reqdTypars(g) for each direct call to g (g a generator for fclass)
// - the reqdTypars(g) may not yet be known,
// e.g. if we are inside the definition of g and had recursively called it.
// - so need to FIX up the reqdTypars(-) function when collected info for all fclass.
// - fold rest (after binding)
//
// fix up reqdTypars(-) according to direct call dependencies.
//
/// This state collects:
/// reqdItemsMap - fclass -> env
/// fclassM - f -> fclass
/// declist - fclass list
/// recShortCallS - the f which are "recursively-called" in arity short instance.
///
/// When walking expr, at each mutual binding site,
/// push a (generator, env) collector frame on stack.
/// If occurrences in body are relevant (for a generator) then it's contribution is logged.
///
/// recShortCalls to f will require a binding for f in terms of fHat within the fHatBody.
type state =
{
stack: (BindingGroupSharingSameReqdItems * Generators * ReqdItemsForDefn) list
reqdItemsMap: Zmap<BindingGroupSharingSameReqdItems, ReqdItemsForDefn>
fclassM: Zmap<Val, BindingGroupSharingSameReqdItems>
revDeclist: BindingGroupSharingSameReqdItems list
recShortCallS: Zset<Val>
}
let state0 =
{ stack = []
reqdItemsMap = Zmap.empty fclassOrder
fclassM = Zmap.empty valOrder
revDeclist = []
recShortCallS = Zset.empty valOrder }
/// PUSH = start collecting for fclass
let PushFrame (fclass: BindingGroupSharingSameReqdItems) (reqdTypars0, reqdVals0, m) state =
if fclass.IsEmpty then
state
else
{state with
revDeclist = fclass :: state.revDeclist
stack = (let env = ReqdItemsForDefn.Initial reqdTypars0 m in (fclass, reqdVals0, env) :: state.stack) }
/// POP & SAVE = end collecting for fclass and store
let SaveFrame (fclass: BindingGroupSharingSameReqdItems) state =
if verboseTLR then dprintf "SaveFrame: %A\n" fclass
if fclass.IsEmpty then
state
else
match state.stack with
| [] -> internalError "trl: popFrame has empty stack"
| (fclass, _reqdVals0, env) :: stack -> (* ASSERT: same fclass *)
{state with
stack = stack
reqdItemsMap = Zmap.add fclass env state.reqdItemsMap
fclassM = List.fold (fun mp (k, v) -> Zmap.add k v mp) state.fclassM fclass.Pairs }
/// Log requirements for gv in the relevant stack frames
let LogRequiredFrom gv items state =
let logIntoFrame (fclass, reqdVals0: Zset<Val>, env: ReqdItemsForDefn) =
let env =
if reqdVals0.Contains gv then
env.Extend ([], items)
else env
fclass, reqdVals0, env
{state with stack = List.map logIntoFrame state.stack}
let LogShortCall gv state =
if state.stack |> List.exists (fun (fclass, _reqdVals0, _env) -> fclass.Contains gv) then
if verboseTLR then dprintf "shortCall: rec: %s\n" gv.LogicalName
// Have short call to gv within it's (mutual) definition(s)
{state with
recShortCallS = Zset.add gv state.recShortCallS}
else
if verboseTLR then dprintf "shortCall: not-rec: %s\n" gv.LogicalName
state
let FreeInBindings bs = List.fold (foldOn (freeInBindingRhs CollectTyparsAndLocals) unionFreeVars) emptyFreeVars bs
/// Intercepts selected exprs.
/// "letrec f1, f2, ... = fBody1, fBody2, ... in rest" -
/// "val v" - free occurrence
/// "app (f, tps, args)" - occurrence
///
/// On intercepted nodes, must recurseF fold to collect from subexpressions.
let ExprEnvIntercept (tlrS, arityM) recurseF noInterceptF z expr =
let accInstance z (fvref: ValRef, tps, args) =
let f = fvref.Deref
match Zmap.tryFind f arityM with
| Some wf ->
// f is TLR with arity wf
if IsArityMet fvref wf tps args then
// arity-met call to a TLR g
LogRequiredFrom f [ReqdSubEnv f] z
else
// arity-short instance
let z = LogRequiredFrom f [ReqdVal f] z
// LogShortCall - logs recursive short calls
let z = LogShortCall f z
z
| None ->
// f is non-TLR
LogRequiredFrom f [ReqdVal f] z
let accBinds m z (binds: Bindings) =
let tlrBs, nonTlrBs = binds |> List.partition (fun b -> Zset.contains b.Var tlrS)
// For bindings marked TLR, collect implied env
let fclass = BindingGroupSharingSameReqdItems tlrBs
// what determines env?
let frees = FreeInBindings tlrBs
// put in env
let reqdTypars0 = frees.FreeTyvars.FreeTypars |> Zset.elements
// occurrences contribute to env
let reqdVals0 = frees.FreeLocals |> Zset.elements
// tlrBs are not reqdVals0 for themselves
let reqdVals0 = reqdVals0 |> List.filter (fun gv -> not (fclass.Contains gv))
let reqdVals0 = reqdVals0 |> Zset.ofList valOrder
// collect into env over bodies
let z = PushFrame fclass (reqdTypars0, reqdVals0,m) z
let z = (z, tlrBs) ||> List.fold (foldOn (fun b -> b.Expr) recurseF)
let z = SaveFrame fclass z
// for bindings not marked TRL, collect
let z = (z, nonTlrBs) ||> List.fold (foldOn (fun b -> b.Expr) recurseF)
z
match expr with
| Expr.Val (v, _, _) ->
accInstance z (v, [], [])
| Expr.Op (TOp.LValueOp (_, v), _tys, args, _) ->
let z = accInstance z (v, [], [])
List.fold recurseF z args
| Expr.App (f, fty, tys, args, m) ->
let f, _fty, tys, args, _m = destApp (f, fty, tys, args, m)
match f with
| Expr.Val (f, _, _) ->
// YES: APP vspec tps args - log
let z = accInstance z (f, tys, args)
List.fold recurseF z args
| _ ->
// NO: app, but function is not val - no log
noInterceptF z expr
| Expr.LetRec (binds, body, m, _) ->
let z = accBinds m z binds
recurseF z body
| Expr.Let (bind,body,m,_) ->
let z = accBinds m z [bind]
// tailcall for linear sequences
recurseF z body
| _ ->
noInterceptF z expr
/// Initially, reqdTypars(fclass) = freetps(bodies).
/// For each direct call to a gv, a generator for fclass,
/// Required to include the reqdTypars(gv) in reqdTypars(fclass).
let CloseReqdTypars fclassM reqdItemsMap =
if verboseTLR then dprintf "CloseReqdTypars------\n"
let closeStep reqdItemsMap changed fc (env: ReqdItemsForDefn) =
let directCallReqdEnvs = env.ReqdSubEnvs
let directCallReqdTypars = directCallReqdEnvs |> List.map (fun f ->
let fc = Zmap.force f fclassM ("reqdTyparsFor", nameOfVal)
let env = Zmap.force fc reqdItemsMap ("reqdTyparsFor", string)
env.reqdTypars)
let reqdTypars0 = env.reqdTypars
let reqdTypars = List.fold Zset.union reqdTypars0 directCallReqdTypars
let changed = changed || (not (Zset.equal reqdTypars0 reqdTypars))
let env = {env with reqdTypars = reqdTypars}
#if DEBUG
if verboseTLR then
dprintf "closeStep: fc=%30A nSubs=%d reqdTypars0=%s reqdTypars=%s\n" fc directCallReqdEnvs.Length (showTyparSet reqdTypars0) (showTyparSet reqdTypars)
directCallReqdEnvs |> List.iter (fun f -> dprintf "closeStep: dcall f=%s\n" f.LogicalName)
directCallReqdEnvs |> List.iter (fun f -> dprintf "closeStep: dcall fc=%A\n" (Zmap.find f fclassM))
directCallReqdTypars |> List.iter (fun _reqdTypars -> dprintf "closeStep: dcall reqdTypars=%s\n" (showTyparSet reqdTypars0))
#else
ignore fc
#endif
changed, env
let rec fixpoint reqdItemsMap =
let changed = false
let changed, reqdItemsMap = Zmap.foldMap (closeStep reqdItemsMap) changed reqdItemsMap
if changed then
fixpoint reqdItemsMap
else
reqdItemsMap
fixpoint reqdItemsMap
#if DEBUG
let DumpReqdValMap reqdItemsMap =
for KeyValue(fc, env) in reqdItemsMap do
dprintf "CLASS=%A\n env=%A\n" fc env
#endif
let DetermineReqdItems (tlrS, arityM) expr =
if verboseTLR then dprintf "DetermineReqdItems------\n"
let folder = {ExprFolder0 with exprIntercept = ExprEnvIntercept (tlrS, arityM)}
let z = state0
// Walk the entire assembly
let z = FoldImplFile folder z expr
// project results from the state
let reqdItemsMap = z.reqdItemsMap
let fclassM = z.fclassM
let declist = List.rev z.revDeclist
let recShortCallS = z.recShortCallS
// diagnostic dump
#if DEBUG
if verboseTLR then DumpReqdValMap reqdItemsMap
#endif
// close the reqdTypars under the subEnv reln
let reqdItemsMap = CloseReqdTypars fclassM reqdItemsMap
// filter out trivial fclass - with no TLR defns
let reqdItemsMap = Zmap.remove (BindingGroupSharingSameReqdItems List.empty) reqdItemsMap
// restrict declist to those with reqdItemsMap bindings (the non-trivial ones)
let declist = List.filter (Zmap.memberOf reqdItemsMap) declist
#if DEBUG
// diagnostic dump
if verboseTLR then
DumpReqdValMap reqdItemsMap
declist |> List.iter (fun fc -> dprintf "Declist: %A\n" fc)
recShortCallS |> Zset.iter (fun f -> dprintf "RecShortCall: %s\n" f.LogicalName)
#endif
reqdItemsMap, fclassM, declist, recShortCallS
//-------------------------------------------------------------------------
// step3: PackedReqdItems
//-------------------------------------------------------------------------
/// Each env is represented by some carrier values, the aenvs.
/// An env packing defines these, and the pack/unpack bindings.
/// The bindings are in terms of the fvs directly.
///
/// When defining a new TLR f definition,
/// the fvs will become bound by the unpack bindings,
/// the aenvs will become bound by the new lam, and
/// the reqdTypars will become bound by the new LAM.
/// For uniqueness of bound ids,
/// all these ids (Typar/Val) will need to be freshened up.
/// It is OK to break the uniqueness-of-bound-ids rule during the rw,
/// provided it is fixed up via a copyExpr call on the final expr.
type PackedReqdItems =
{
/// The actual typars
ep_etps: Typars
/// The actual env carrier values
ep_aenvs: Val list
/// Sequentially define the aenvs in terms of the fvs
ep_pack: Bindings
/// Sequentially define the fvs in terms of the aenvs
ep_unpack: Bindings
}
//-------------------------------------------------------------------------
// step3: FlatEnvPacks
//-------------------------------------------------------------------------
exception AbortTLR of Range.range
/// A naive packing of environments.
/// Chooses to pass all env values as explicit args (no tupling).
/// Note, tupling would cause an allocation,
/// so, unless arg lists get very long, this flat packing will be preferable.
/// Given (fclass, env).
/// Have env = ReqdVal vj, ReqdSubEnv subEnvk -- ranging over j, k
/// Define vals(env) = {vj}|j union vals(subEnvk)|k -- trans closure of vals of env.
/// Define <vi, aenvi> for each vi in vals(env).
/// This is the cmap for the env.
/// reqdTypars = env.reqdTypars
/// carriers = aenvi|i
/// pack = TBIND(aenvi = vi) for each (aenvi, vi) in cmap
/// unpack = TBIND(vj = aenvFor(vj)) for each vj in reqvals(env).
/// and TBIND(asubEnvi = aenvFor(v)) for each (asubEnvi, v) in cmap(subEnvk) ranging over required subEnvk.
/// where
/// aenvFor(v) = aenvi where (v, aenvi) in cmap.
let FlatEnvPacks g fclassM topValS declist (reqdItemsMap: Zmap<BindingGroupSharingSameReqdItems, ReqdItemsForDefn>) =
let fclassOf f = Zmap.force f fclassM ("fclassM", nameOfVal)
let packEnv carrierMaps (fc: BindingGroupSharingSameReqdItems) =
if verboseTLR then dprintf "\ntlr: packEnv fc=%A\n" fc
let env = Zmap.force fc reqdItemsMap ("packEnv", string)
// carrierMaps = (fclass, (v, aenv)map)map
let carrierMapFor f = Zmap.force (fclassOf f) carrierMaps ("carrierMapFor", string)
let valsSubEnvFor f = Zmap.keys (carrierMapFor f)
// determine vals(env) - transclosure
let vals = env.ReqdVals @ List.collect valsSubEnvFor env.ReqdSubEnvs // list, with repeats
let vals = vals |> List.distinctBy (fun v -> v.Stamp)
// Remove genuinely toplevel, no need to close over these
let vals = vals |> List.filter (IsMandatoryTopLevel >> not)
// Remove byrefs, no need to close over these, and would be invalid to do so since their values can change.
//
// Note that it is normally not OK to skip closing over values, since values given (method) TLR must have implementations
// which are truly closed. However, byref values never escape into any lambdas, so are never used in anything
// for which we will choose a method TLR.
//
// For example, consider this (FSharp 1.0 bug 5578):
//
// let mutable a = 1
//
// let resutl1 =
// let x = &a // This is NOT given TLR, because it is byref
// x <- 111
// let temp = x // This is given a static field TLR, not a method TLR
// // let f () = x // This is not allowed, can't capture x
// x <- 999
// temp
//
// Compare with this:
// let mutable a = 1
//
// let result2 =
// let x = a // this is given static field TLR
// a <- 111
// let temp = a
// let f () = x // This is not allowed, and is given a method TLR
// a <- 999
// temp
let vals = vals |> List.filter (fun v -> not (isByrefLikeTy g v.Range v.Type))
// Remove values which have been labelled TLR, no need to close over these
let vals = vals |> List.filter (Zset.memberOf topValS >> not)
// Carrier sets cannot include constrained polymorphic values. We can't just take such a value out, so for the moment
// we'll just abandon TLR altogether and give a warning about this condition.
match vals |> List.tryFind (IsGenericValWithGenericConstraints g) with
| None -> ()
| Some v -> raise (AbortTLR v.Range)
// build cmap for env
let cmapPairs = vals |> List.map (fun v -> (v, (mkCompGenLocal env.m v.LogicalName v.Type |> fst)))
let cmap = Zmap.ofList valOrder cmapPairs
let aenvFor v = Zmap.force v cmap ("aenvFor", nameOfVal)
let aenvExprFor v = exprForVal env.m (aenvFor v)
// build PackedReqdItems
let reqdTypars = env.reqdTypars
let aenvs = Zmap.values cmap
let pack = cmapPairs |> List.map (fun (v, aenv) -> mkInvisibleBind aenv (exprForVal env.m v))
let unpack =
let unpackCarrier (v, aenv) = mkInvisibleBind (setValHasNoArity v) (exprForVal env.m aenv)
let unpackSubenv f =
let subCMap = carrierMapFor f
let vaenvs = Zmap.toList subCMap
vaenvs |> List.map (fun (subv, subaenv) -> mkBind NoDebugPointAtInvisibleBinding subaenv (aenvExprFor subv))
List.map unpackCarrier (Zmap.toList cmap) @
List.collect unpackSubenv env.ReqdSubEnvs
// extend carrierMaps
let carrierMaps = Zmap.add fc cmap carrierMaps
// dump
if verboseTLR then
let bindingL bind = bindingL g bind
dprintf "tlr: packEnv envVals =%s\n" (showL (listL valL env.ReqdVals))
dprintf "tlr: packEnv envSubs =%s\n" (showL (listL valL env.ReqdSubEnvs))
dprintf "tlr: packEnv vals =%s\n" (showL (listL valL vals))
dprintf "tlr: packEnv aenvs =%s\n" (showL (listL valL aenvs))
dprintf "tlr: packEnv pack =%s\n" (showL (listL bindingL pack))
dprintf "tlr: packEnv unpack =%s\n" (showL (listL bindingL unpack))
// result
(fc, { ep_etps = Zset.elements reqdTypars
ep_aenvs = aenvs
ep_pack = pack
ep_unpack = unpack}), carrierMaps
let carriedMaps = Zmap.empty fclassOrder
let envPacks, _carriedMaps = List.mapFold packEnv carriedMaps declist (* List.mapFold in dec order *)
let envPacks = Zmap.ofList fclassOrder envPacks
envPacks
//-------------------------------------------------------------------------
// step3: chooseEnvPacks
//-------------------------------------------------------------------------
#if DEBUG
let DumpEnvPackM g envPackM =
let bindingL bind = bindingL g bind
for KeyValue(fc, packedReqdItems) in envPackM do
dprintf "packedReqdItems: fc = %A\n" fc
dprintf " reqdTypars = %s\n" (showL (commaListL (List.map typarL packedReqdItems.ep_etps)))
dprintf " aenvs = %s\n" (showL (commaListL (List.map valL packedReqdItems.ep_aenvs)))
dprintf " pack = %s\n" (showL (semiListL (List.map bindingL packedReqdItems.ep_pack)))
dprintf " unpack = %s\n" (showL (semiListL (List.map bindingL packedReqdItems.ep_unpack)))
dprintf "\n"
#endif
/// For each fclass, have an env.
/// Required to choose an PackedReqdItems,
/// e.g. deciding whether to tuple up the environment or not.
/// e.g. deciding whether to use known values for required sub environments.
///
/// Scope for optimization env packing here.
/// For now, pass all environments via arguments since aiming to eliminate allocations.
/// Later, package as tuples if arg lists get too long.
let ChooseReqdItemPackings g fclassM topValS declist reqdItemsMap =
if verboseTLR then dprintf "ChooseReqdItemPackings------\n"
let envPackM = FlatEnvPacks g fclassM topValS declist reqdItemsMap
#if DEBUG
if verboseTLR then DumpEnvPackM g envPackM
#endif
envPackM
//-------------------------------------------------------------------------
// step3: CreateNewValuesForTLR
//-------------------------------------------------------------------------
/// arity info where nothing is untupled
// REVIEW: could do better here by preserving names
let MakeSimpleArityInfo tps n = ValReprInfo (ValReprInfo.InferTyparInfo tps, List.replicate n ValReprInfo.unnamedTopArg, ValReprInfo.unnamedRetVal)
let CreateNewValuesForTLR g tlrS arityM fclassM envPackM =
if verboseTLR then dprintf "CreateNewValuesForTLR------\n"
let createFHat (f: Val) =
let wf = Zmap.force f arityM ("createFHat - wf", (fun v -> showL (valL v)))
let fc = Zmap.force f fclassM ("createFHat - fc", nameOfVal)
let envp = Zmap.force fc envPackM ("CreateNewValuesForTLR - envp", string)
let name = f.LogicalName (* + "_TLR_" + string wf *)
let m = f.Range
let tps, tau = f.TypeScheme
let argtys, res = stripFunTy g tau
let newTps = envp.ep_etps @ tps
let fHatTy =
let newArgtys = List.map typeOfVal envp.ep_aenvs @ argtys
mkLambdaTy newTps newArgtys res
let fHatArity = MakeSimpleArityInfo newTps (envp.ep_aenvs.Length + wf)
let fHatName =
// Ensure that we have an g.CompilerGlobalState
assert(g.CompilerGlobalState |> Option.isSome)
g.CompilerGlobalState.Value.NiceNameGenerator.FreshCompilerGeneratedName(name, m)
let fHat = mkLocalNameTypeArity f.IsCompilerGenerated m fHatName fHatTy (Some fHatArity)
fHat
let fs = Zset.elements tlrS
let ffHats = List.map (fun f -> f, createFHat f) fs
let fHatM = Zmap.ofList valOrder ffHats
fHatM
//-------------------------------------------------------------------------
// pass4: rewrite - penv
//-------------------------------------------------------------------------
module Pass4_RewriteAssembly =
[<NoEquality; NoComparison>]
type RewriteContext =
{ ccu: CcuThunk
g: TcGlobals
tlrS: Zset<Val>
topValS: Zset<Val>
arityM: Zmap<Val, int>
fclassM: Zmap<Val, BindingGroupSharingSameReqdItems>
recShortCallS: Zset<Val>
envPackM: Zmap<BindingGroupSharingSameReqdItems, PackedReqdItems>
/// The mapping from 'f' values to 'fHat' values
fHatM: Zmap<Val, Val>
}
//-------------------------------------------------------------------------
// pass4: rwstate (z state)
//-------------------------------------------------------------------------
type IsRecursive = IsRec | NotRec
type LiftedDeclaration = IsRecursive * Bindings (* where bool=true if letrec *)
/// This state is related to lifting to top-level (which is actually disabled right now)
/// This is to ensure the TLR constants get initialised once.
///
/// Top-level status ends when stepping inside a lambda, where a lambda is:
/// Expr.TyLambda, Expr.Lambda, Expr.Obj (and tmethods).
/// [... also, try_catch handlers, and switch targets...]
///
/// Top* repr bindings already at top-level do not need moving...
/// [and should not be, since they may lift over unmoved defns on which they depend].
/// Any TLR repr bindings under lambdas can be filtered out (and collected),
/// giving pre-declarations to insert before the outermost lambda expr.
type RewriteState =
{ rws_mustinline: bool
/// counts level of enclosing "lambdas"
rws_innerLevel: int
/// collected preDecs (fringe is in-order)
rws_preDecs: Tree<LiftedDeclaration>
}
let rewriteState0 = {rws_mustinline=false;rws_innerLevel=0;rws_preDecs=emptyTR}
// move in/out of lambdas (or lambda containing construct)
let EnterInner z = {z with rws_innerLevel = z.rws_innerLevel + 1}
let ExitInner z = {z with rws_innerLevel = z.rws_innerLevel - 1}
let EnterMustInline b z f =
let orig = z.rws_mustinline
let x, z' = f (if b then {z with rws_mustinline = true } else z)
{z' with rws_mustinline = orig }, x
/// extract PreDecs (iff at top-level)
let ExtractPreDecs z =
// If level=0, so at top-level, then pop decs,
// else keep until get back to a top-level point.
if z.rws_innerLevel=0 then
// at top-level, extract preDecs
let preDecs = fringeTR z.rws_preDecs
preDecs, {z with rws_preDecs=emptyTR}
else
// not yet top-level, keep decs
[], z
/// pop and set preDecs as "LiftedDeclaration tree"
let PopPreDecs z = {z with rws_preDecs=emptyTR}, z.rws_preDecs
let SetPreDecs z pdt = {z with rws_preDecs=pdt}
/// collect Top* repr bindings - if needed...
let LiftTopBinds _isRec _penv z binds =
z, binds
/// Wrap preDecs (in order) over an expr - use letrec/let as approp
let MakePreDec m (isRec, binds: Bindings) expr =
if isRec=IsRec then
// By definition top level bindings don't refer to non-top level bindings, so we can build them in two parts
let topLevelBinds, nonTopLevelBinds = binds |> List.partition (fun bind -> bind.Var.IsCompiledAsTopLevel)
mkLetRecBinds m topLevelBinds (mkLetRecBinds m nonTopLevelBinds expr)
else
mkLetsFromBindings m binds expr
/// Must MakePreDecs around every construct that could do EnterInner (which filters TLR decs).
/// i.e. let, letrec (bind may...), ilobj, lambda, tlambda.
let MakePreDecs m preDecs expr = List.foldBack (MakePreDec m) preDecs expr
let RecursivePreDecs pdsA pdsB =
let pds = fringeTR (TreeNode[pdsA;pdsB])
let decs = pds |> List.collect snd
LeafNode (IsRec, decs)
//-------------------------------------------------------------------------
// pass4: lowertop - convert_vterm_bind on TopLevel binds
//-------------------------------------------------------------------------
let ConvertBind g (TBind(v, repr, _) as bind) =
match v.ValReprInfo with
| None -> v.SetValReprInfo (Some (InferArityOfExprBinding g AllowTypeDirectedDetupling.Yes v repr ))
| Some _ -> ()
bind
//-------------------------------------------------------------------------
// pass4: transBind (translate)
//-------------------------------------------------------------------------
// Transform
// let f<tps> vss = f_body[<f_freeTypars>, f_freeVars]
// To
// let f<tps> vss = fHat<f_freeTypars> f_freeVars vss
// let fHat<tps> f_freeVars vss = f_body[<f_freeTypars>, f_freeVars]
let TransTLRBindings penv (binds: Bindings) =
if isNil binds then List.empty, List.empty else
let fc = BindingGroupSharingSameReqdItems binds
let envp = Zmap.force fc penv.envPackM ("TransTLRBindings", string)
let fRebinding (TBind(fOrig, b, letSeqPtOpt)) =
let m = fOrig.Range
let tps, vss, _b, rty = stripTopLambda (b, fOrig.Type)
let aenvExprs = envp.ep_aenvs |> List.map (exprForVal m)
let vsExprs = vss |> List.map (mkRefTupledVars penv.g m)
let fHat = Zmap.force fOrig penv.fHatM ("fRebinding", nameOfVal)
(* REVIEW: is this mutation really, really necessary? *)
(* Why are we applying TLR if the thing already has an arity? *)
let fOrig = setValHasNoArity fOrig
let fBind =
mkMultiLambdaBind fOrig letSeqPtOpt m tps vss
(mkApps penv.g
((exprForVal m fHat, fHat.Type),
[List.map mkTyparTy (envp.ep_etps @ tps)],
aenvExprs @ vsExprs, m), rty)
fBind
let fHatNewBinding (shortRecBinds: Bindings) (TBind(f, b, letSeqPtOpt)) =
let wf = Zmap.force f penv.arityM ("fHatNewBinding - arityM", nameOfVal)
let fHat = Zmap.force f penv.fHatM ("fHatNewBinding - fHatM", nameOfVal)
// Take off the variables
let tps, vss, b, rty = stripTopLambda (b, f.Type)
// Don't take all the variables - only up to length wf
let vssTake, vssDrop = List.splitAt wf vss
// put the variables back on
let b, rty = mkMultiLambdasCore b.Range vssDrop (b, rty)
// fHat, args
let m = fHat.Range
// Add the type variables to the front
let fHat_tps = envp.ep_etps @ tps
// Add the 'aenv' and original taken variables to the front
let fHat_args = List.map List.singleton envp.ep_aenvs @ vssTake
let fHat_body = mkLetsFromBindings m envp.ep_unpack b
let fHat_body = mkLetsFromBindings m shortRecBinds fHat_body // bind "f" if have short recursive calls (somewhere)
// fHat binding, f rebinding
let fHatBind = mkMultiLambdaBind fHat letSeqPtOpt m fHat_tps fHat_args (fHat_body, rty)
fHatBind
let rebinds = binds |> List.map fRebinding
let shortRecBinds = rebinds |> List.filter (fun b -> penv.recShortCallS.Contains(b.Var))
let newBinds = binds |> List.map (fHatNewBinding shortRecBinds)
newBinds, rebinds
let GetAEnvBindings penv fc =
match Zmap.tryFind fc penv.envPackM with
| None -> List.empty // no env for this mutual binding
| Some envp -> envp.ep_pack // environment pack bindings
let TransBindings xisRec penv (binds: Bindings) =
let tlrBs, nonTlrBs = binds |> List.partition (fun b -> Zset.contains b.Var penv.tlrS)
let fclass = BindingGroupSharingSameReqdItems tlrBs
// Trans each TLR f binding into fHat and f rebind
let newTlrBinds, tlrRebinds = TransTLRBindings penv tlrBs
let aenvBinds = GetAEnvBindings penv fclass
// lower nonTlrBs if they are GTL
// QUERY: we repeat this logic in LowerCallsAndSeqs. Do we really need to do this here?
// QUERY: yes and no - if we don't, we have an unrealizable term, and many decisions must
// QUERY: correlate with LowerCallsAndSeqs.
let forceTopBindToHaveArity (bind: Binding) =
if penv.topValS.Contains(bind.Var) then ConvertBind penv.g bind
else bind
let nonTlrBs = nonTlrBs |> List.map forceTopBindToHaveArity
let tlrRebinds = tlrRebinds |> List.map forceTopBindToHaveArity
// assemble into replacement bindings
let bindAs, rebinds =
match xisRec with
| IsRec -> newTlrBinds @ tlrRebinds @ nonTlrBs @ aenvBinds, [] (* note: aenv last, order matters in letrec! *)
| NotRec -> aenvBinds @ newTlrBinds, tlrRebinds @ nonTlrBs (* note: aenv go first, they may be used *)
bindAs, rebinds
//-------------------------------------------------------------------------
// pass4: TransApp (translate)
//-------------------------------------------------------------------------
let TransApp penv (fx, fty, tys, args, m) =
// Is it a val app, where the val f is TLR with arity wf?
// CLEANUP NOTE: should be using a mkApps to make all applications
match fx with
| Expr.Val (fvref: ValRef, _, m) when
(Zset.contains fvref.Deref penv.tlrS) &&
(let wf = Zmap.force fvref.Deref penv.arityM ("TransApp - wf", nameOfVal)
IsArityMet fvref wf tys args) ->
let f = fvref.Deref
(* replace by direct call to corresponding fHat (and additional closure args) *)
let fc = Zmap.force f penv.fclassM ("TransApp - fc", nameOfVal)
let envp = Zmap.force fc penv.envPackM ("TransApp - envp", string)
let fHat = Zmap.force f penv.fHatM ("TransApp - fHat", nameOfVal)
let tys = (List.map mkTyparTy envp.ep_etps) @ tys
let aenvExprs = List.map (exprForVal m) envp.ep_aenvs
let args = aenvExprs @ args
mkApps penv.g ((exprForVal m fHat, fHat.Type), [tys], args, m) (* change, direct fHat call with closure (reqdTypars, aenvs) *)
| _ ->
if isNil tys && isNil args then
fx
else Expr.App (fx, fty, tys, args, m)
(* no change, f is expr *)
//-------------------------------------------------------------------------
// pass4: pass (over expr)
//-------------------------------------------------------------------------
/// At bindings, fixup any TLR bindings.
/// At applications, fixup calls if they are arity-met instances of TLR.
/// At free vals, fixup 0-call if it is an arity-met constant.
/// Other cases rewrite structurally.
let rec TransExpr (penv: RewriteContext) (z: RewriteState) expr: Expr * RewriteState =
match expr with
// Use TransLinearExpr with a rebuild-continuation for some forms to avoid stack overflows on large terms
| LinearOpExpr _
| LinearMatchExpr _
| Expr.LetRec _ // note, Expr.LetRec not normally considered linear, but keeping it here as it's always been here
| Expr.Let _
| Expr.Sequential _ ->
TransLinearExpr penv z expr (fun res -> res)
// app - call sites may require z.
// - match the app (collapsing reclinks and type instances).
// - patch it.
| Expr.App (f, fty, tys, args, m) ->
// pass over f, args subexprs
let f, z = TransExpr penv z f
let args, z = List.mapFold (TransExpr penv) z args
// match app, and fixup if needed
let f, fty, tys, args, m = destApp (f, fty, tys, args, m)
let expr = TransApp penv (f, fty, tys, args, m)
expr, z
| Expr.Val (v, _, m) ->
// consider this a trivial app
let fx, fty = expr, v.Type
let expr = TransApp penv (fx, fty, [], [], m)
expr, z
// reclink - suppress
| Expr.Link r ->
TransExpr penv z (!r)
// ilobj - has implicit lambda exprs and recursive/base references
| Expr.Obj (_, ty, basev, basecall, overrides, iimpls, m) ->
let basecall, z = TransExpr penv z basecall
let overrides, z = List.mapFold (TransMethod penv) z overrides
let iimpls, z =
(z, iimpls) ||> List.mapFold (fun z (tType, objExprs) ->
let objExprs', z' = List.mapFold (TransMethod penv) z objExprs
(tType, objExprs'), z')
let expr = Expr.Obj (newUnique(), ty, basev, basecall, overrides, iimpls, m)
let pds, z = ExtractPreDecs z
MakePreDecs m pds expr, z (* if TopLevel, lift preDecs over the ilobj expr *)
// lambda, tlambda - explicit lambda terms
| Expr.Lambda (_, ctorThisValOpt, baseValOpt, argvs, body, m, rty) ->
let z = EnterInner z
let body, z = TransExpr penv z body
let z = ExitInner z
let pds, z = ExtractPreDecs z
MakePreDecs m pds (rebuildLambda m ctorThisValOpt baseValOpt argvs (body, rty)), z
| Expr.TyLambda (_, argtyvs, body, m, rty) ->
let z = EnterInner z
let body, z = TransExpr penv z body
let z = ExitInner z
let pds, z = ExtractPreDecs z
MakePreDecs m pds (mkTypeLambda m argtyvs (body, rty)), z
/// Lifting TLR out over constructs (disabled)
/// Lift minimally to ensure the defn is not lifted up and over defns on which it depends (disabled)
| Expr.Match (spBind, exprm, dtree, targets, m, ty) ->
let targets = Array.toList targets
let dtree, z = TransDecisionTree penv z dtree
let targets, z = List.mapFold (TransDecisionTreeTarget penv) z targets
// TransDecisionTreeTarget wraps EnterInner/exitInnter, so need to collect any top decs
let pds,z = ExtractPreDecs z
MakePreDecs m pds (mkAndSimplifyMatch spBind exprm m ty dtree targets), z
// all others - below - rewrite structurally - so boiler plate code after this point...
| Expr.Const _ ->
expr,z
| Expr.Quote (a,dataCell,isFromQueryExpression,m,ty) ->
let doData (typeDefs,argTypes,argExprs,data) z =
let argExprs,z = List.mapFold (TransExpr penv) z argExprs
(typeDefs,argTypes,argExprs,data), z
let data, z =
match !dataCell with
| Some (data1, data2) ->
let data1, z = doData data1 z
let data2, z = doData data2 z
Some (data1, data2), z
| None -> None, z
Expr.Quote (a,ref data,isFromQueryExpression,m,ty),z
| Expr.Op (c,tyargs,args,m) ->
let args,z = List.mapFold (TransExpr penv) z args
Expr.Op (c,tyargs,args,m),z
| Expr.StaticOptimization (constraints,e2,e3,m) ->
let e2,z = TransExpr penv z e2
let e3,z = TransExpr penv z e3
Expr.StaticOptimization (constraints,e2,e3,m),z
| Expr.TyChoose (_,_,m) ->
error(Error(FSComp.SR.tlrUnexpectedTExpr(),m))
| Expr.WitnessArg (_witnessInfo, _m) ->
expr, z
/// Walk over linear structured terms in tail-recursive loop, using a continuation
/// to represent the rebuild-the-term stack
and TransLinearExpr penv z expr (contf: Expr * RewriteState -> Expr * RewriteState) =
match expr with
| Expr.Sequential (e1, e2, dir, spSeq, m) ->
let e1, z = TransExpr penv z e1
TransLinearExpr penv z e2 (contf << (fun (e2, z) ->
Expr.Sequential (e1, e2, dir, spSeq, m), z))
// letrec - pass_recbinds does the work
| Expr.LetRec (binds, e, m, _) ->
let z = EnterInner z
// For letrec, preDecs from RHS must mutually recurse with those from the bindings
let z, pdsPrior = PopPreDecs z
let binds, z = List.mapFold (TransBindingRhs penv) z binds
let z, pdsRhs = PopPreDecs z
let binds, rebinds = TransBindings IsRec penv binds
let z, binds = LiftTopBinds IsRec penv z binds (* factor Top* repr binds *)
let z, rebinds = LiftTopBinds IsRec penv z rebinds
let z, pdsBind = PopPreDecs z
let z = SetPreDecs z (TreeNode [pdsPrior;RecursivePreDecs pdsBind pdsRhs])
let z = ExitInner z
let pds, z = ExtractPreDecs z
// tailcall
TransLinearExpr penv z e (contf << (fun (e, z) ->
let e = mkLetsFromBindings m rebinds e
MakePreDecs m pds (Expr.LetRec (binds, e, m, Construct.NewFreeVarsCache())), z))
// let - can consider the mu-let bindings as mu-letrec bindings - so like as above
| Expr.Let (bind, e, m, _) ->
// For let, preDecs from RHS go before those of bindings, which is collection order
let bind, z = TransBindingRhs penv z bind
let binds, rebinds = TransBindings NotRec penv [bind]
// factor Top* repr binds
let z, binds = LiftTopBinds NotRec penv z binds
let z, rebinds = LiftTopBinds NotRec penv z rebinds
// any lifted PreDecs from binding, if so wrap them...
let pds, z = ExtractPreDecs z
// tailcall
TransLinearExpr penv z e (contf << (fun (e, z) ->
let e = mkLetsFromBindings m rebinds e
MakePreDecs m pds (mkLetsFromBindings m binds e), z))
| LinearMatchExpr (spBind, exprm, dtree, tg1, e2, sp2, m2, ty) ->
let dtree, z = TransDecisionTree penv z dtree
let tg1, z = TransDecisionTreeTarget penv z tg1
// tailcall
TransLinearExpr penv z e2 (contf << (fun (e2, z) ->
rebuildLinearMatchExpr (spBind, exprm, dtree, tg1, e2, sp2, m2, ty), z))
| LinearOpExpr (op, tyargs, argsHead, argLast, m) ->
let argsHead,z = List.mapFold (TransExpr penv) z argsHead
// tailcall
TransLinearExpr penv z argLast (contf << (fun (argLast, z) ->
rebuildLinearOpExpr (op, tyargs, argsHead, argLast, m), z))
| _ ->
// not a linear expression
contf (TransExpr penv z expr)
and TransMethod penv (z: RewriteState) (TObjExprMethod(slotsig, attribs, tps, vs, e, m)) =
let z = EnterInner z
let e, z = TransExpr penv z e
let z = ExitInner z
TObjExprMethod(slotsig, attribs, tps, vs, e, m), z
and TransBindingRhs penv z (TBind(v, e, letSeqPtOpt)) : Binding * RewriteState =
let mustInline = v.MustInline
let z, e = EnterMustInline mustInline z (fun z -> TransExpr penv z e)
TBind (v, e, letSeqPtOpt), z
and TransDecisionTree penv z x: DecisionTree * RewriteState =
match x with
| TDSuccess (es, n) ->
let es, z = List.mapFold (TransExpr penv) z es
TDSuccess(es, n), z
| TDBind (bind, rest) ->
let bind, z = TransBindingRhs penv z bind
let rest, z = TransDecisionTree penv z rest
TDBind(bind, rest), z
| TDSwitch (e, cases, dflt, m) ->
let e, z = TransExpr penv z e
let TransDecisionTreeCase penv z (TCase (discrim, dtree)) =
let dtree, z = TransDecisionTree penv z dtree
TCase(discrim, dtree), z
let cases, z = List.mapFold (TransDecisionTreeCase penv) z cases
let dflt, z = Option.mapFold (TransDecisionTree penv) z dflt
TDSwitch (e, cases, dflt, m), z
and TransDecisionTreeTarget penv z (TTarget(vs, e, spTarget)) =
let z = EnterInner z
let e, z = TransExpr penv z e
let z = ExitInner z
TTarget(vs, e, spTarget), z
and TransValBinding penv z bind = TransBindingRhs penv z bind
and TransValBindings penv z binds = List.mapFold (TransValBinding penv) z binds
and TransModuleExpr penv z x =
match x with
| ModuleOrNamespaceExprWithSig(mty, def, m) ->
let def, z = TransModuleDef penv z def
ModuleOrNamespaceExprWithSig(mty, def, m), z
and TransModuleDefs penv z x = List.mapFold (TransModuleDef penv) z x
and TransModuleDef penv (z: RewriteState) x: ModuleOrNamespaceExpr * RewriteState =
match x with
| TMDefRec(isRec, tycons, mbinds, m) ->
let mbinds, z = TransModuleBindings penv z mbinds
TMDefRec(isRec, tycons, mbinds, m), z
| TMDefLet(bind, m) ->
let bind, z = TransValBinding penv z bind
TMDefLet(bind, m), z
| TMDefDo(e, m) ->
let _bind, z = TransExpr penv z e
TMDefDo(e, m), z
| TMDefs defs ->
let defs, z = TransModuleDefs penv z defs
TMDefs defs, z
| TMAbstract mexpr ->
let mexpr, z = TransModuleExpr penv z mexpr
TMAbstract mexpr, z
and TransModuleBindings penv z binds = List.mapFold (TransModuleBinding penv) z binds
and TransModuleBinding penv z x =
match x with
| ModuleOrNamespaceBinding.Binding bind ->
let bind, z = TransValBinding penv z bind
ModuleOrNamespaceBinding.Binding bind, z
| ModuleOrNamespaceBinding.Module(nm, rhs) ->
let rhs, z = TransModuleDef penv z rhs
ModuleOrNamespaceBinding.Module(nm, rhs), z
let TransImplFile penv z (TImplFile (fragName, pragmas, moduleExpr, hasExplicitEntryPoint, isScript, anonRecdTypes)) =
let moduleExpr, z = TransModuleExpr penv z moduleExpr
(TImplFile (fragName, pragmas, moduleExpr, hasExplicitEntryPoint, isScript, anonRecdTypes)), z
//-------------------------------------------------------------------------
// pass5: copyExpr
//-------------------------------------------------------------------------
let RecreateUniqueBounds g expr =
copyImplFile g OnlyCloneExprVals expr
//-------------------------------------------------------------------------
// entry point
//-------------------------------------------------------------------------
let MakeTLRDecisions ccu g expr =
try
// pass1: choose the f to be TLR with arity(f)
let tlrS, topValS, arityM = Pass1_DetermineTLRAndArities.DetermineTLRAndArities g expr
// pass2: determine the typar/freevar closures, f->fclass and fclass declist
let reqdItemsMap, fclassM, declist, recShortCallS = Pass2_DetermineReqdItems.DetermineReqdItems (tlrS, arityM) expr
// pass3
let envPackM = ChooseReqdItemPackings g fclassM topValS declist reqdItemsMap
let fHatM = CreateNewValuesForTLR g tlrS arityM fclassM envPackM
// pass4: rewrite
if verboseTLR then dprintf "TransExpr(rw)------\n"
let expr, _ =
let penv: Pass4_RewriteAssembly.RewriteContext =
{ccu=ccu; g=g; tlrS=tlrS; topValS=topValS; arityM=arityM; fclassM=fclassM; recShortCallS=recShortCallS; envPackM=envPackM; fHatM=fHatM}
let z = Pass4_RewriteAssembly.rewriteState0
Pass4_RewriteAssembly.TransImplFile penv z expr
// pass5: copyExpr to restore "each bound is unique" property
// aka, copyExpr
if verboseTLR then dprintf "copyExpr------\n"
let expr = RecreateUniqueBounds g expr
if verboseTLR then dprintf "TLR-done------\n"
// Summary:
// GTL = genuine top-level
// TLR = TopLevelRep = identified by this pass
// Note, some GTL are skipped until sort out the initial env...
// if verboseTLR then dprintf "note: tlr = %d inner-TLR + %d GenuineTopLevel-TLR + %d GenuineTopLevel skipped TLR (public)\n"
// (lengthS (Zset.diff tlrS topValS))
// (lengthS (Zset.inter topValS tlrS))
// (lengthS (Zset.diff topValS tlrS))
// DONE
expr
with AbortTLR m ->
warning(Error(FSComp.SR.tlrLambdaLiftingOptimizationsNotApplied(), m))
expr
| {
"pile_set_name": "Github"
} |
Easy-open composite containers for packaging various products, particularly products under pressure such as refrigerated dough products and the like, constitute a significant commercial consumer product. Typically, these containers are formed of a spirally-wound paperboard or board stock bodywall layer and an interior liner layer for preventing leaking of the contents from the container. The spirally-wound bodywall layer usually includes a butt joint formed by adjacent edges of the bodywall layer and which forms a spiral seam extending from one end of the container to the other end. The exterior label layer surrounds the bodywall layer and covers or bridges the spiral seam to reinforce such seam and prevent premature opening along the spiral seam.
Commercially significant containers of this type are disclosed in commonly assigned U.S. Pat. No. 3,981,433 which is directed to a one-step easy-open container including an inner liner layer, a bodywall layer and an outer label layer, all of which are spirally-wound to form a spiral easy-open seam in the bodywall layer. In this type of container, when the outer label layer is either totally removed or that portion bridging the spiral butt joint of the bodywall layer is torn away from the spiral seam, the pressurized dough products expands outwardly and causes the spiral seam of the bodywall layer to open. This allows access to the dough and the interior of the container through the spiral easy-open seam in the container.
The outer label layer surrounding the spiral seam in containers of this type is an important structural component of the container because the outer label layer bridges the spiral seam and maintains it in closed position. Accordingly, in order to easy-open the container, that portion of the label layer which bridges the easy-open spiral seam of the bodywall layer must be stripped away to expose the spiral seam for easy-opening. Alternatively, the label layer may be totally peeled away from and removed from the bodywall layer of the container. This is desirable if a coupon or other advertising material is positioned under the label layer for removal by the purchaser of the container when opening of the container.
Various mechanisms have been provided to aid in such easy-opening including provision of a tear tab for starting the peeling or removal of the label layer so that the label layer may be torn toward a "collar cut" extending around the periphery of the label layer near one end of the container for completely removing the label layer from the bodywall layer during easy-opening. Also, tear strips have been provided between the label layer and the bodywall layer in bridging relation to the easy-open spiral seam of the bodywall layer to act as a tearing medium for tearing away that portion of the label layer which bridges the easy-open spiral seam of the bodywall layer. However, with both procedures for removing the label layer from the spiral easy-open seam of the bodywall layer, tearing of the label layer in a desired direction has created problems and often such tearing does not accomplish the desired purpose of either removing the entire label layer or just a bridging portion of the label layer from the spiral seam of the bodywall layer for easy-opening of the container. Tearing is also affected by the direction of pulling or tear pressure applied by the user which is sometimes dictated by being right-handed or left-handed or by having the container in an upright position or in an upside-down position. | {
"pile_set_name": "USPTO Backgrounds"
} |
Do you support a path to citizenship for Dreamers?
Story TOpics
On Tuesday, President Obama sent a request to Congress for emergency supplemental appropriations to address the increased flow of families and unaccompanied children crossing our border illegally. The administration also indicated that it will separately work with Congress to relax the legal protections for unaccompanied children in the Trafficking Victims Protection Reauthorization Act, and it previously announced plans to hold families with children in immigration detention.
Many of these children and families are fleeing horrific conditions in Central America’s Northern Triangle: El Salvador, Honduras and Guatemala. In these countries, violence, persecution and human trafficking are pervasive. Honduras actually has the world’s highest murder rate. Not surprisingly, the U.N. Refugee Agency found that 58 percent of the unaccompanied children are asylum seekers.
How we treat those who request the protection of the United States should be consistent with our country’s ideals and laws. Unfortunately, the administration’s response is falling short.
There has long been a bipartisan commitment to refugees that should inspire the president and Congress. The Refugee Act of 1980 passed Congress with strong bipartisan support. The Council on Foreign Relations’ Independent Task Force on Immigration Policy — co-chaired by former Florida Gov. Jeb Bush and Bill Clinton’s chief of staff, Thomas “Mack” McLarty — emphasized that the U.S. commitment to refugees is “enshrined in international treaties and domestic U.S. laws that set the standard for the rest of the world; when American standards erode, refugees face greater risks everywhere.”
The world is watching. The United States encourages other nations to provide refuge to those fleeing violence and persecution. While the number of people apprehended at our border has risen significantly, it’s still a drop in the bucket compared with the several million who have fled Syria and sought refuge in countries far less able than the United States to handle such flows.
Effective safeguards are crucial to identify those at risk of persecution, trafficking or torture. These risks are especially great for children, who may not know why their families sent them on the perilous journey to the United States and who are most vulnerable to trafficking. The bipartisan U.S. Commission on International Religious Freedom (USCIRF) has repeatedly raised concerns about the process for identifying asylum seekers in expedited removal proceedings. In many cases observed by USCIRF experts, border officers didn’t follow established procedures to identify asylum seekers. The government would only exacerbate the situation if it jettisons key safeguards for at-risk refugees and children.
Holding children, families and asylum-seeking adults in immigration detention facilities, particularly for extended periods of time beyond initial processing, is also inconsistent with this country’s ideals. Last year, USCIRF issued a report detailing its concerns about U.S. detention of asylum seekers. In many cases, the use of detention is not necessary to meet the government’s important objective of assuring appearance for court hearings and possible deportation.
Alternatives to detention have proven effective. Criminal justice systems across the country are increasingly relying on them, prompted by groups such as the Texas Public Policy Foundation. Recent statistics from an alternatives-to-detention program used by Immigration and Customs Enforcement (ICE) reveal that immigrants appeared for their final hearings 97.4 percent of the time and complied with final orders 85 percent of the time. There also are strong community-based models run by Lutheran Immigration and Refugee Services and the U.S. Conference of Catholic Bishops.
Many of the children crossing the border alone have parents or other relatives already in the country. About 85 percent of the unaccompanied children are reunified with family, often their parents. That is real “family reunification,” a central tenet of U.S. immigration policy.
The U.S. government should adequately staff border enforcement and U.S. protection and adjudication systems so that they can conduct timely — but not rushed — hearings that reflect America’s commitment to fairness. Additional resources are urgently needed to improve the conditions in Central America prompting so many to flee. This problem is in our backyard and we ignore it at our peril. The United States also should intensify its targeting of smugglers and human traffickers who prey on children and families.
What the U.S. government should not do is turn a blind eye to the conditions that these people are fleeing and force them to return to danger. Would we counsel the Jordanians to deport the Syrians who are refugees in their country? I doubt it. America should stand firm as a beacon of hope for those fleeing violence and persecution.
James W. Ziglar was commissioner of the U.S. Immigration and Naturalization Service (INS) under former President George W. Bush. He is a member of Human Rights First’s board of directors and is a senior fellow at the Migration Policy Institute.
The Washington Times Comment Policy
The Washington Times is switching its third-party commenting system from Disqus to Spot.IM. You will need to either create an account with Spot.im or if you wish to use your Disqus account look under the Conversation for the link "Have a Disqus Account?". Please read our Comment Policy before commenting. | {
"pile_set_name": "Pile-CC"
} |
According to recent study published in the Orthopaedic Journal of Sports Medicine, yoga injuries are on the rise, especially among older adults.
The study, titled “Yoga-Related Injuries in the United States From 2001 to 2014,” found that there were 29,950 yoga-related injuries reported in hospital emergency rooms during that time. Across the board, the number of injuries has increased in recent years, but among seniors the rate has skyrocketed.
The researchers reported that adults 65 years and older suffered eight times the number of injuries in 2014 as were reported in 2001.
While many doctors, physical therapists, and mental health practitioners encourage patients to practice yoga to improve their health, these well-meaning professionals may not realize the inherent danger in some styles of yoga, warns Heather Berg, a South Florida-based registered yoga teacher (RYT).
There are as many styles of yoga as there are flavors of ice cream, ranging from sweat and calorie burning intensity classes to gentle and restorative approaches.
“It’s important to do your own research and find a style of yoga and a qualified teacher to address your individual needs,” Berg tells Newsmax. “If you are just beginning to exercise, or have injuries, it is crucial to find an experienced teacher who has the right certification and has been practicing long enough to address your concerns.”
According to Yoga Journal, attending smaller classes can help a student get individualized attention from the teacher. This is especially true in vinyasa (flow) classes, where the repetitive flexion and extension of the spine can easily lead to injury if done incorrectly.
“Even better, start by taking a few private classes,” notes Berg. “That way, you can receive individualized attention and explore ways that your body responds to specific poses. A private session can help you create safer variations and teach you how to use yoga props to prevent injury.”
The most common areas of injury in yoga are:
Shoulders. Poses such a Chaturanga and Plank, yoga versions of a pushup, can irritate your shoulders. Berg says that students often exceed their natural range of motion or have improper alignment so that the tendons around the shoulders and biceps begin to tear. “No pain, no gain is not welcome on the yoga mat,” she says.
Knees. Very often, the pretzel-like poses can aggravate your knees. While many of the poses actually strengthen the legs and can be quite beneficial, if you feel a sharp pain in your knees while executing a yoga posture, particularly a twist, back off.
Hamstrings. A very common pose in yoga is the Forward Fold — both seated and standing versions. “Even the most flexible people can injure their hamstrings if they become overly enthusiastic,” says Berg. “I encourage my students to keep a slight bend in their knees.” This also helps reduce the strain on the lower back, she says.
Wrists. Props are perfect for protecting our wrists, which bear a lot of weight in many popular poses such as Downward Facing Dog, Plank and Table-top. “Use props such as blocks, blankets or even a folded towel to ease cranky wrists,” Berg says. “Make sure that your body weight is stacked evenly including using the shoulders and elbows so that the wrists don’t bear the brunt of the burden.”
Neck. Berg warns that headstands are certainly not for everyone ,and can result in serious injury. For years, the Headstand has been called the “king” of yoga postures, but recently has been criticized for exposing the head and neck to weight that can cause injury, according to Yoga Journal. In fact, in some yoga communities, the Headstand has completely lost its place at the throne, and has been banned in certain studios. “I personally do not teach headstand in my classes,” says Berg. “There are safer inversions that are just as beneficial without the risk.”
PLEASE NOTE: Here at Newsmax, we are committed to bringing you the best possible user experience.
In order to better do this, we are updating our commenting system. Commenting on this article has been disabled temporarily. Thank you for your patience.
The information presented on this website is not intended as specific medical advice and is not a substitute for professional medical treatment or diagnosis. Read Newsmax Terms and Conditions of Service. | {
"pile_set_name": "Pile-CC"
} |
Friday, May 8, 2015
We have mourned for a week in solace. Nothing could give us comfort. Our beloved puppy, Zarrah had left us too soon.
Many of you know that our animals are equal to a human connection because they have a way of loving you unconditionally. Zarrah's life began in Mother Earth's playground, Tennessee. There was a sign on a pick up truck $60. Bulldog/Boxer mix. We were on vacation and I said oh how cute they must be, should we stop…NOT to buy but to look? Of course, the rest is history. We fell in love with her, immediately. She said farewell to her host parents and even hugged her brother by wrapping her head around his. The owner sobbed as we drove off, I knew how valuable she was the moment I saw his face. She was a prize and will always remain this way.
Our 5/6 years together were the BEST. Long before I could shed a tear, she would always lick them dry and muzzle her face into mine. The way she comforted me in my darkest hours, I will always be in debt to.
Zarrah had trauma a few years back. There was a male large dog that had intimidation, it spread fear and domination to both of our dogs. This vortex of new space/new territory created the perfect storm. Camden had passed the intimidation to Zarrah, biting her and immediately we went to the Pet ER and had Camden euthanized. 2 years later, Zarrah would chase a fox across the road and got hit by a car. Again, the Pet ER would rescue her life. Our critic's would say that is why you leash a dog. Danny and Zarrah had a bond that was so special, especially on those long walks. As you know wheelchairs aren't friendly to dog leashes (perhaps an invention we need to invest in). These two life traumatic events, forever changed her. She started to get very paranoid and would be on high alert, every single noise was intimidating to her. Especially visitors, the uncertainty. I suppose she felt she wanted to protect us at all costs.
We would get a new puppy to give Zarrah a new found purpose, being a surrogate mother. Daisy, our pug is mischievous and it was adorable to watch them both play, tease each other and most importantly give chance to bond. They were two peas in a pod. For over a year, the connection grew stronger and stronger between the two. The protection alerts grew even more intense because she saw herself as a mother. We began to become more concerned with her reaction to our visitors-family/friends that would come and she would try to nip, then immediately would fall into sadness begging for forgiveness. Zarrah didn't have control of her emotions and our concern's were growing. The perfect storm appeared again. The mailman came by. Zarrah had came close to biting him and I spanked her 2 times, which was so rare. On top of it, I ignored her for an hour and created space to show her my sadness…she had never experienced this type of reaction from me. I was disappointed in her eyes on a level that I had never been. It broke her spirit. I could see this, so I finally made up with her and we snuggled together and began the line of forgiveness. A line of disappointment had crossed and it was very evident that she was changed puppy.
By the stroke of midnight, a bone. Yes, a bone. That's all it took. We have plenty around but this one had been the "prize". Hundreds of times, Daisy and Zarrah pass around the bones but tonight it was different. Zarrah attacked Daisy and we all went into instant survival mode. I had separated them both with great force and was able to get to a safe area with Daisy. We went Pet ER and would later returned both puppies were in agony in separate levels of the house. The first thing Daisy did was run up the stairs to connect with Zarrah, a door separating them. Zarrah moaned with sadness and you could hear that she was asking for forgiveness.
Danny comforted Daisy, the agony of pain vs. processing a traumatic situation was so difficult. Without doubt, he was her shield of amour. I took Zarrah out. Grabbed a pillow, water, blanket, leash and a determined outlook to make this…."THE BEST DAY EVER".
Zarrah was always so scared of noises, especially loud ones-ever since her injuries. We went to a metro station where there was a bunch of grassy area. We watched the trains, buses, planes, cars go by. She wasn't any longer scared. She ran through the grass and into the creek. Ate two cheeseburgers, drank water out of a big gulp cup. We snuggled. I spent every minute I had with her, praising her and telling her she was a "good girl". I when through memory lane, telling her all the stories we had. 4 hours passed, her tail was underneath her. Finally, her tail lifted and she gave me peace. I kissed her so much my lips hurt.
By morning…we were in Zarrah's vet. I asked him, "what should I do?" He said, "My job is to be the voice of your dog". After listening to her full story….he said, "Please, give her peace". It would be irresponsible to give her to a shelter after knowing her traumatic situations and reoccurring disposition. If you should keep her, I can tell you how difficult it is because I too, have had two dog attacks with our own pets. They didn't have trauma, it is usually because of two things. Toy or Food.
Advice from our vet: If you have a dog(s). CRATE or USE SEPERATE ROOMS if they're eating or chewing on bones. If they have done it a millions times before…consider yourselves LUCKY. It only takes a heavy scent or behavioral issue to make any "normal situation into an isolated, harmful event". His dogs are crated when no one is home and always during the feeding/bone times. He even said, "knowing what he knows about his situation, he would have euthanized his dog too". It is too difficult to live in fear of safety for you and your animals.
Safety is our gateway to the choice we made. Although it was the most difficult choice ever, it was the right one. Please let Zarrah's story resinate with yours and make you think differently when it comes to toy vs. food.
Our hearts will take a great amount of time to heal. Zarrah passed away in my arms, her head started to raise when she was heading to heaven. I was singing Silent Night to her and told her to go chase all the angels and rabbits. Her heart stopped and it felt like mine did too. The moment I got into the car, her scent was so strong. She jumped right into the car and came home. Her presence is ever present. Daisy let's us know she is here.
Zarrah entered the kingdom. I shall never fear when I get there because I know she will be the first that I see, waiting for us.
May 1st, 2015. She shared the date of a famous singer that passed away the same day "Stand by Me". It also was the day that Justice system played it's first hand to getting justice for Freddie Gray. State of Maryland vs. MD Police Department. Both of these two events are a beautiful beginning and ending.
I will say this when I am 99 years old and laying in my bed, knitting with ginormous holes everywhere, "You WERE the BEST dog, I ever had". | {
"pile_set_name": "Pile-CC"
} |
1. Field of the Invention
The present invention relates to a telephone apparatus that allows the user to use a caller ID service informing him or her of the telephone number and the name of the calling party and a signal detection circuit for use therewith.
2. Description of the Related Art
In the North American countries, a caller ID service that informs the user of the telephone number and the name of the calling party has been used. In such a caller ID service, when a telephone terminal receives a call, the service informs the user of the telephone number and the name of the calling party. As a modification to the above conventional service, a new type of service has been proposed. In this new service, while a first user is communicating with a second user, if a third user calls the first user, the service informs the first user of the telephone number and the name of the third user who is call-waiting. In other words, when the first user does not know who is the third user, the first user does not know whether or not the third user is superior to the second user. When the first user receives a call waiting signal, however, and if the first user is informed who is the third user, the first user can conveniently determine to whom the first user should talk.
Such a new type caller ID service can be accomplished in the following manner.
While the first user is communicating with the second user, if the third user calls the first user, the telephone exchange sends a dual tone signal referred to as CAS (Call Alert Signal) to the telephone of the first user so as to mute the receiving speech signal. Responding to the CAS signal, the telephone of the first user sends a DTMF signal that represents "D" so as to receive information from the third user. When the telephone exchange has received the "D" signal of the DTMF signal from the telephone terminal of the first user, the telephone exchange sends data of the telephone number and the name of the third user as FSK (Frequency Shift Keying) modulated data. The telephone terminal of the first user demodulates the FSK-modulated data, decodes the data of the telephone number and the name of the third user, and displays the decoded data on the display of the telephone terminal.
In the new type caller ID service corresponding to the call-waiting signal, before the telephone exchange sends the telephone number and the name of the third user, it sends the CAS signal that causes the telephone terminal of the first user to mute the receiving speech signal. The CAS signal is a dual tone signal with frequencies of 2130 Hz and 2750 Hz. The CAS signal lasts for 80 msec. The telephone terminal that accomplishes the new type caller ID service corresponding to the call-waiting signal has a signal detection circuit that detects the dual tone signal with frequencies 2130 Hz and 2750 Hz.
Generally, as shown in FIG. 1, the signal detection circuit that detects such a dual tone signal comprises a frequency band limiting filter 102, a band pass filter 103 that extracts a frequency component of 2130 Hz, a band pass filter 104 that extracts a frequency component of 2750 Hz, a tone detection circuit 105 that detects whether or not the component of the tone signal is present, and a guard time setting circuit 106 that determines whether or not a component of the tone signal is continuously detected for a predetermined guard time that is shorter than the time period of the CAS signal.
In the new type caller ID service corresponding to the call-waiting signal, the CAS signal that is a dual tone signal with frequencies of 2130 Hz and 2750 Hz is supplied from the telephone exchange to an input terminal 101. When the CAS signal is received, the band pass filter 103 extracts a frequency component of 2130 Hz. The band pass filter 104 extracts a frequency component of 2750 Hz. The extracted frequency components are supplied to the tone detection circuit 105. When the tone detection circuit 105 detects these frequency components of the tone signal, it outputs a detection signal. Since the CAS signal lasts for 80 msec, the guard time setting circuit 106 detects the tone signal for a time period more than a predetermined guard time which is shorter than the time period of the CAS signal. A detection signal that represents the dual tone signal is outputted from an output terminal 107.
A transmitting speech signal and a receiving speech signal flow on a telephone line. Not only a signal sent from the telephone exchange, but a transmitting speech signal of the telephone terminal are supplied to the input terminal 101. The transmitting speech signal may contain a component of the tone signal by chance. When the detection signal contains frequency components of 2130 Hz and 2750 Hz and the transmitting speech signal lasts for the predetermined guard time, although the transmitting speech signal is not the dual tone signal of the CAS signal, the detection signal that represents that the tone signal is present is fed to the output terminal 107. In particular, speech signals of some users may have spectrum peaks at frequencies 2130 Hz and 2750 Hz by chance. When such users send calls, mis-detections may frequently take place.
To prevent such mis-detections, the guard time may be set to 30 msec or more. However, in the case that the guard time is set to 30 msec or more, since a transmitting speech signal is present while the dual tone signal is being detected, the sound level of the transmitting speech signal may exceed the sound level of the dual tone signal during the guard time. Thus, frequently, the signal detection is adversely affected. In the case that the guard time is set to around 5 msec, since the dual tone signal can be detected in a no-sound period between words, the probability that the signal detection is adversely affected becomes high. Moreover, as described, the probability that a component of the speech signal is detected as the dual tone signal becomes high. | {
"pile_set_name": "USPTO Backgrounds"
} |
MAVEN, NASA's newest Mars orbiter, is shown near the Red Planet in this artist's illustration. The spaceraft, which launched in November 2013, will arrive at Mars on Sept. 21, 2014.
Update for Monday, Sept. 22: NASA's MAVEN orbiter has successfully arrived at Mars. To see our arrival story, visit: NASA Spacecraft Arrives at Mars to Probe Mysteries of Red Planet's Air.
A NASA spacecraft built to study the atmosphere of Mars like never before will arrive at the Red Planet tonight (Sept. 21) and you can watch it live online.
After 10 months in deep-space, NASA's Mars Atmosphere and Volatile EvolutioN (MAVEN) spacecraft is expected to enter orbit around Mars and begin a one-year mission studying the planet's upper atmosphere. The Mars arrival will cap a 442 million-mile (711 million kilometers) trek across the solar system.
This NASA graphic depicts how the agency's newest Mars orbiter MAVEN will arrive in orbit around the Red Planet on Sept. 21, 2014. (Image credit: NASA's Goddard Space Flight Center)
You can watch the MAVEN spacecraft arrive at Mars on Space.com, courtesy of NASA TV, in a live webcast that runs from 9:30 p.m. to 10:45 p.m. EDT (0130 to 0245 GMT). If all goes well, MAVEN will enter orbit around Mars at 9:50 p.m. EDT (0250 GMT), according to NASA officials.
"So far, so good with the performance of the spacecraft and payloads on the cruise to Mars," David Mitchell, NASA's MAVEN project manager at the Goddard Space Flight Center in Greenbelt, Maryland, said in a statement. "The team, the flight system, and all ground assets are ready for Mars orbit insertion."
The $671 million MAVEN spacecraft eight instruments to study the Martian atmosphere in detail. It is one of two missions that launched toward Mars last November and are making their arrival this month. The other probe is India's Mars Orbiter Mission, which launched just before MAVEN and will arrive at the Red Planet on Wednesday (Sept. 24).
The atmosphere of Mars
Maven will orbit Mars, looking for clues about what happened to the planet's once-thick atmosphere. (Image credit: by Karl Tate, Infographics Artist)
Mars' upper atmosphere is an escape zone for molecules floating dozens of miles from the planet's surface. Scientists think that, as the solar wind hits the atmosphere, the radiation strips away the lighter molecules and flings them into space forever. [NASA's MAVEN Spacecraft: 10 Surprising Facts]
"The MAVEN science mission focuses on answering questions about where did the water that was present on early Mars go, about where did the carbon dioxide go," said Bruce Jakosky, the mission's principal investigator at the University of Colorado, Boulder's Laboratory for Atmospheric and Space Physics. "These are important questions for understanding the history of Mars, its climate, and its potential to support at least microbial life."
The upper atmosphere of Mars likely changes as the sun's activity increases and decreases, which is why MAVEN investigators hope to run the mission for longer than a year, they said. The sun is at the peak of its 11-year cycle of solar flares and particle emissions but will begin to quiet down as MAVEN enters a possible extended mission.
To make projections about how the Martian atmosphere changed over time, scientists need to understand what's happening now. One puzzle that researchers are struggling to solve is where all the water on Mars went, given there is evidence of water-soaked minerals and liquid-carved canyons on the planet's surface.
Although Mars is now too cold for flowing water, it might have had a thicker atmosphere in the past that warmed its surface and allowed the liquid to remain stable on the surface, scientists say. However, one complication is that the sun was about 30 percent less luminous four billion years ago than it is now, which means less solar radiation would have been striking and warming the Red Planet's atmosphere and surface.
"Obviously, we can't go back and sample the early sun, but we have other stars that are similar to our star — G-type stars, the classification scheme where our star fits — and we can measure what kind of solar radiation they put out," MAVEN mission scientist Steve Bougher told Space.com.
Bougher is a researcher at the University of Michigan who is studying how the atmospheres of Venus, Earth and Marscompare. All three planets are rocky and relatively close to the sun, but their environments are vastly different. Venus has a runaway greenhouse effect that boiled any surface liquids away, Mars is cold and has a thin atmosphere, and Earth is the only atmosphere known to host life.
Much of what scientists know about Mars' upper atmosphere comes from just a few minutes' worth of data from the two Viking landers that took measurements on their way to the Martian surface in the 1970s, Bougher said. While other NASA spacecraft have since supplemented that data somewhat, MAVEN scientists aim to gather much more.
Dust storms and solar activity
Mars 12 inch Globe Buy Here (Image credit: Space.com Store)
Bougher is interested in studying the speed at which ions (charged atoms) and neutral gases leave the atmosphere of Mars. This process could change with solar activity, and also as dust storms sweep the planet's surface. MAVEN will arrive just as the Martian storm season begins, Bougher said.
"If we are so fortunate as to get a global dust storm or a reasonable dust storm, the lower atmosphere will inflate like a balloon, and the upper atmosphere will inflate on top of that," he said. "The processes have not been studied well before."
Jakosky, MAVEN's lead researcher, is examining how stable isotopes (element types) of hydrogen and its heavier version, deuterium, changed over time. In theory, as the solar wind hit the Red Planet's atmosphere, the lighter hydrogen in the atmosphere should have been stripped away and decreased proportionally near Mars.
"One of the really overarching questions about Mars is whether there was ever life," Jakosky said in a NASA news conference Wednesday (Sept. 17).
"We're trying to understand the context in which life might have existed," Jakosky said. Any life on Mars would have interacted with its environment, so MAVEN could help with NASA's ongoing research into the "boundary conditions" for life, he added.
MAVEN will began making science measurements around Nov. 8, but the spacecraft will take a time-out from its commissioning phase to watch Comet Siding Spring pass close by on Oct. 19. So far, it looks like there won't be enough dust to hurt the spacecraft, but MAVEN will be maneuvered to minimize its exposure to the comet's dust as a safety precaution.
Visit Space.com tonight for complete coverage of NASA's MAVEN Mars orbiter arrival.
Follow Elizabeth Howell @howellspace, or Space.com @Spacedotcom. We're also on Facebook and Google+. Originally published on Space.com. | {
"pile_set_name": "OpenWebText2"
} |
Please turn on JavaScript. Media requires JavaScript to play. Advertisement Five British soldiers have been shot dead in Helmand Province, in an attack the UK military blamed on a "rogue" Afghan policeman. The soldiers, three from the Grenadier Guards and two from the Royal Military Police, had been mentoring and living with the Afghan police in a compound. The officer opened fire, injuring eight others, before fleeing the compound. Gordon Brown told MPs the Taliban said they had carried out the attack and may have infiltrated Afghan police. Speaking in the Commons, the prime minister said evidence was being gathered and security would be stepped up after the shooting. But he added that training of Afghan police remained an "essential element" of the strategy in Afghanistan and would not be stopped as it was "what the Taliban fears most". Manhunt A total of 92 UK service personnel have now been killed this year, the highest annual figure since the Falklands War in 1982. Six British servicemen and two Afghan National Police officers were injured in the attack, in the Nad Ali district. An investigation is under way and the soldiers' next of kin have been informed of the deaths. A UK military spokesman said: "One individual Afghan National Policeman, possibly in conjunction with another, went rogue. "His motives and whereabouts are unknown at this time. Every effort is now being put into hunting down those responsible for this attack." BBC Kabul correspondent Ian Pannell said sources had indicated the attacker was a police officer called Gulbuddin who had fled the scene after the shooting. Map: Where the attack happened It appears he could have been involved in a dispute with his commander, but tribal sources have pointed to a link with the Taliban, our correspondent said. ANALYSIS Caroline Wyatt,
BBC defence correspondent
Training the Afghan police as well as the Afghan army is key to Nato's plans in Afghanistan, so they can ultimately take over security across the country, allowing British and American forces and their allies to gradually leave. However, recruiting and training the police and ensuring their loyalty to the Afghan government has long been extremely difficult. In Helmand especially, the police are proving less reliable - as well as more corrupt - than the Afghan Army. The Afghan police are relatively badly paid - earning rather less than a Taliban fighter - and are said to earn extra cash from taking bribes from ordinary Afghans at official or often unofficial checkpoints.
Latest Afghan deaths: Reaction Read your comments Lt Col Wakefield, spokesman for Task Force Helmand, said the men who were killed had been mentoring a number of Afghan police officers. He said they had worked and lived in the compound at a national police checkpoint for the past two weeks. The attack did not come as a result of any breakdown or fight between British and Afghan forces, he stressed. Col Wakefield said: "It is with the deepest sadness I must inform you that five British soldiers were shot and killed yesterday in Nad Ali district. "Five British soldiers, five of our own, shot down in the course of their duty. They will not be forgotten." Prime Minister Gordon Brown said the latest deaths were a "terrible loss". He said: "My thoughts, condolences and sympathies go to their families, loved ones and colleagues. I know that the whole country too will mourn their loss. "It is my highest priority to ensure our heroic troops have the best possible support and equipment - and the right strategy, backed by our international partners, and by a new Afghan government ready to play its part in confronting the challenges Afghanistan faces. "Our troops deserve nothing less. My commitment to them remains unshakeable." Worst incident Tory leader David Cameron said: "I pay tribute, as will the whole country, to their professionalism and their courage, and send my condolences to their families and their friends." Gen Stanley McChrystal, commander of the International Security Assistance Force, said he had spoken to the Afghan Minister of Interior, Haneef Atmar, who shared his regret for the incident. "He gave me his assurance that this incident will be fully and transparently investigated," he said. Please turn on JavaScript. Media requires JavaScript to play. "We will not let this event deter our resolve to build a partnership with the Afghan National Security Forces to provide for Afghanistan's future." A former commander of British forces in Afghanistan, Col Richard Kemp, said the shootings were a very worrying development. He said: "It will undermine trust, certainly in the short term, until we establish exactly what happened. And it wouldn't at all surprise me now if there aren't a lot of soldiers, British soldiers in Afghanistan, with their fingers very firmly on the trigger when they're around Afghan police and military." The British Military Police have launched an investigation. The local chief of the Afghan National Police (ANP) and the Afghan national director of security have also begun investigating at the scene. There was a similar incident involving the deaths of two US personnel in 2008. The British casualties were evacuated to the field hospital at Camp Bastion in Helmand by medical emergency response teams using Chinook and a US Black Hawk helicopters. The Grenadier Guards have been advising the ANP and the Afghan National Army in training, tactics and patrol methods. The deaths take the number of UK troops killed in Afghanistan since 2001 to 229. This is the worst single incident in Helmand since 10 July, when five soldiers from 2 Rifles were killed by bombs near the town of Sangin.
Return to the top
Bookmark with: Delicious
Digg
reddit
Facebook
StumbleUpon What are these? E-mail this to a friend Printable version | {
"pile_set_name": "OpenWebText2"
} |
A major outbreak of whooping cough has struck a Michigan area where many people opted out of vaccinations against the disease.
At a single school in Grand Traverse County, which has the state’s highest rates of parents choosing not have their children vaccinated, there have been 151 confirmed and probable cases of whooping cough, reports local news outlet MLive.com.
“Nobody likes to be the person who says, ‘I told you so,’ but what’s unfolding now is exactly the scenario feared by those worried about the region’s low immunization numbers,” Bradley Goodwin, the president of the Grand Traverse County Medical Society, said.
Cases of whooping cough have been reported at more than 14 school buildings in the area, which has also reported several cases of the highly contagious measles.
Read more at MLive.com
Write to Noah Rayman at noah.rayman@time.com. | {
"pile_set_name": "OpenWebText2"
} |
OFFICE OFTHEATTORNEY GENERALOFTEXAS
AUSTIN
Honorable 0. C. F'lrher
Dietrlat Attorney
San Angelo, Texas
D6er Sir:
Yoor reoent co nlon of this
has bean rc-
er to me puts the
to maximum r8*6 in
with a poptnla-
otticdo salary or ofitem be
oonsibersd in arriving at the
$ZGOO ouW.mtm, or the $3006 sari-
tatus,
or sithur? The t+m’ity of-~
flofols ia thin ooam are aom-
“iI, with (19
penootrd on dlire bar
a44itfoaal nutapal4 ohem a8 ex-
rrftlcloealario#.*
Donorable 0. C. Maher, page 2
ArtIclea 3883 en4 3891 of Vernon's Civil
Annotate4 Statutes read in part 88 r0iiow0:
rhrt. 3883. 3881 to 3883. Xaxlnum Pees
--itXOSpt 88 OthSXWi88 DrOTi4.4 iXl this
hat,the annual fees that map be retained by
prealnat, county en4 dietriot otr1oer8 men-
tioned in thlr Article ahall be as rollowez
*1. In countiie containing tw4nty fire
(25,000) thoullandor less inhabitsnt8: County
Judge, Dlstriot or Criminal M8triat Attorney,
gherlfr, Oounty Clerk, County Attorney, Die-
triet Clerk, Tax Collector, Tex Aseeeeor, or
the AS8088Or @Uld~OllSOtOr Of t'ttX88,
hellty-
four Hundred ($2&W.00) Dollare eaah; Justice
of the Peaoe 6n4 Conlrtable,l%elve Dun4re4
(fl.ZOO.00)Dollars eaoh.
". . . . .
"Art. 3e91. Disposition of fess
%aah offleer named in tbie Chapter
shall first out of tha current fees or
hf8 offioe pay or be paid the amount al-
lowad him under the prorluiona of Artlole
3883; together with tha aalarle8 or h18
assistant8 an4 daput188, and authorlaed
expansen un48f Art1018 3899. and the amount
neceaoary to oover uoetn 0r premium on
~wtever earsty bond may be.require4 by
Xi the current fear of such oP?loe
colieoted In any year be more then the amount
n&edab to pay the emounte above epeoitle4,
8sme shall be deemed excee)LIree8, an4 shall
be disposed of in the manor hareinarter
provided.
-In oountiee oontainlng twenty-five thaus-
6na (25,000) or 18J38 fnhab1tant8, District an4
County OifiOer8 nemd hereln shall retain one-
third of crushexcaas fe6s until eiuahOne-third,
together with the amounts rpeclfied in Artlals
3883, amowes to Three Thousand Dollar8
(8.3ooo).Preainat of~oera shall retain
one-third until suoh one-third, to ether tith
the audnt epsoitie6 In Artiala 3654 3, smount8
to Foartsan Hundred Dollars ($1.&W).*
Eionorable0. C. Ploher, psee 3
Sterling County baa 8 populetion of 1,431
lnhabltaats, accordi~ to the lsrt tedersl aenaua.
Artiole 3895, veMOll'8 Civil Annota‘ted
Stfltut8etprovides that:
*fat. 3895. R-otflclo 8errloe8
"The Comnie8ionsr8* Court 18 hereby
debarred rrocqallowlw companaatlon for
8x-orriolo saniaes to county o??lclale
when the compensation an4 SXa88Cifee8
whloh they are allowed to rrtaln shall
reeoh the smxlmun provl4ed ?or in t&la
chapter. In aa~as where the com,pensetlon
and exaees feao whloh the otrlaers are
ellowe4 to retain shall not reeoh the
mOXiaUEk JWQYid8d ?Or in thim OheptOr, the
Comls810nsrs1 Court shall allow oamperma-
tloa ?or ax of?lcio 8ervlces when, In their
judyant, euah ooapenoatloa Ir neoeeoary,
provided, suoh oompeneation for ax ofrid
eervieea allowed 8hall not lnoreaea the
ooapaneation of the of?tialalbeyond the
maxlmuiu of o~pene8tloa ati axe888 fee8
allowed to be retaloe b,yhim under this
ohapter. Frovl4ed, however, the ax o?~l~lo
herein authorized 8hall be allowed only a?- -.~
tar an opportunity ?or a public hearing and
only upon the af?lmatlve vote of at least
three msabers of the Coumi8eionera* CourLn
Article 3897, VCIMOQ~O Civil Annotated Statuter,
ma48 In pert aa fO11OW8:
"Art. 3897. Sworn stateuent
*Each district, oounty and precinst
officer. at ths 010~6 of eaoh tlsoal ear
(DeasaPber3let) shall mke to the di8r, rlct
court ot the oounty ln which he resides a
mwra atatuaent in triplicate (on torts6de-
stgned en4 appmved by the Stste Auditor)
a copy'of whioh ststemmt elm11 be torwarded
to the State Aualtor by the olsrk o? then
dfetrtit aourt of 8ald oouaty wIthIn thirty
(30) d.ays aftrr the e-8 ha8 been ills4 la
hi8 offloe, an4 on4 sapy.k, be ffled with
the county auditor, if any; otherwise,
Honorebls 0. C. Fisher, page 4
said oopy shall be filed with tha Com-
mIssIonare* Court. Said report ahall show
tbs asotmt or all taes. oommlsslona and
c.zapensatIonswhatever earn& by said o‘i-
ricer durlnc the flsoal Year; and asooad-
1-1,shall abor the amount of fees, oom-
mlsaions and oompenaatlona 00m0t6a by
him during the fiscal year; thirdly, (laid
report shall contain aa ltmlrcrd atatemant
of all fees, co~3alseIwa and compm6atIons
sarnsd during the ilacal par whloh were
not oollscted, together wltb the name or
the party owing eald fees, commiralona and
ooapea6atlon5 . . .*
Ths last two paragraphs of Artlcla 3891,
R~Iaed Civil Eltatutsa,read aa followrr
*The comneasatlone, limitationa aad
maxImuM herein fix0a In thla hot root
orfloers sheillInclude and apply to ell
officers mentions& herein In aaoh and
eray county of t&Is State, and It 18
harrby drclarul to ba the latcatioa of
the Leglalatura that the pro~lal.oaaoi
th15 Act shall apply to raoh or eaia
offlaers, aad any 8peoIal or general .$:
law laoonalstent with the prorIriona
hereof Is hereby expressly repaalrd In
ao far as tbo sams may be Iaoonalatcnt with
t+Is Aat.
WLS ooapansatlon, llmitatioas and
marlmuw herein fixed shall aUo apply to
all raes and compeaestlrm whetltoeta aol-
laoted by said offlt?em in their offlola
capaolty, whsthar aoocuatabls aa fess of
offlcr uadar the present law, an8 any lea,
pmarsl or spacla~, to the 6ontwry It3
hereby erpmealy rspselad, The otiy kin4
and aharaeter of onmpexwiatlon axef&pt fresa
tts pro~irilonsof #la Aot ahall be rcrwarde
reoalrra by SherIf'fii for eppr6h6aaIoa of
crIminala or fugltltas fram jae,tleeand
for the recovery or sDol~a'~property,and
~~nonepareosl.rrdby County Judgeo and
Justioes of the pttaceror ge~f=mriry
asrrlago o~remmles, whlhtoh am shall riot
not be aaeoolntablafor and not r6qalrM~ta
be reported 8~ faearof otiit~.~
Honorable0. C. PIshsr,page 5
,ArtIcle3895, 8upra, apeaItlaa~l~prohibit@
the eo~~~l~eloncra~ court froa 11lowlng'eoapeascrtlon
for ax offloio senlo68 to uuuatyarfIo$418when the
aompeaaatlon and 4x88~8faer whloh thef tie allawrb
to mteia 8hnll resah the maximum prOtid6d lbr by
Artlolrs3883 and 3891,8upra. 2%4 oaly car8 where
the aomttioner8* abnrt 18 8llorrd to proride oom-
pen5atIoaror mx oiiYtI0 84rvi448 i8 when the ooa-
pUl88tiOn and 4XC448 i6e5 rrhiah the OfiiO8~ 8M
allord to rataia ahall:not r4iolt tha amximun ro-
ridad Zur by Art10183883 an4 Art1018 3891. TL
phre84 -'all foes and oompeU8atIon’rhat8oeter 0017
14ateabr aald ufrlorrsIn their QrfiOialoapWty,*
obrao4s everykind of oomp4nsatIoa4llowedby $8~
to SIX& OffiCi418, LUIdU&86 aXO8ptd by 8OXI4 PTO-
~18iih or the statute,the ua4ptloa8 are so derla-
ite that by implloatioaall tees and oompea8etioas
aut meatlonrdIn the exo4ptIoaear8 uoladed there-
from, aaa therebylaolobedwltkla the requlrcmmts
of the maxlmnn 144 rtatotae.
& tibw of the forrgeiag rt8tUte8, pi
8ra respeotfnlly a&lee& thet It 18 tha opinion OS
thir aapartmentthat comp4a8atIon allowed Sor .u
OffiCiQ 84lTiC44 t0 tha OOUllt~ OfriOhi8 Of at8rliW
Couatymust br IaaladedIn lrrlrisgat the M
OUIlQ8ll8atiOn
SIbWed SUCh OrfiOi~8 OadUr mia.98 ;
3~83 =a 3891. For explaastloaoi the ior4aofng w4
eno~ose 8 oopy a? Oplnloh 043B.5.
Trustiag that thr r0r8gag rally aaowera
yodr laqulry,w4 ramala,
Yours vary trul#
AT%lRi4SYQESERAXI OF %%XAS
| {
"pile_set_name": "FreeLaw"
} |
/*
* textstyle.c -- text style processing module.
*
* Copyright (c) 2018, Liu chao <lc-soft@live.cn> All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of LCUI nor the names of its contributors may be used
* to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <string.h>
#include <stdlib.h>
#include <errno.h>
#include <LCUI_Build.h>
#include <LCUI/types.h>
#include <LCUI/util/math.h>
#include <LCUI/util/parse.h>
#include <LCUI/util/linkedlist.h>
#include <LCUI/font.h>
typedef enum LCUI_TextStyleTagType_ {
TEXT_STYLE_STYLE,
TEXT_STYLE_BOLD,
TEXT_STYLE_ITALIC,
TEXT_STYLE_SIZE,
TEXT_STYLE_COLOR,
TEXT_STYLE_BG_COLOR,
TEXT_STYLE_TOTAL_NUM
} LCUI_TextStyleTagType;
typedef struct LCUI_StyleTag {
LCUI_TextStyleTagType id;
LCUI_StyleRec style;
} LCUI_TextStyleTag;
void TextStyle_Init(LCUI_TextStyle data)
{
data->has_style = FALSE;
data->has_weight = FALSE;
data->has_family = FALSE;
data->has_pixel_size = FALSE;
data->has_back_color = FALSE;
data->has_fore_color = FALSE;
data->font_ids = NULL;
data->style = FONT_STYLE_NORMAL;
data->weight = FONT_WEIGHT_NORMAL;
data->fore_color.value = 0xff333333;
data->back_color.value = 0xffffffff;
data->pixel_size = 13;
}
int TextStyle_CopyFamily(LCUI_TextStyle dst, LCUI_TextStyle src)
{
size_t len;
if (!src->has_family) {
return 0;
}
for (len = 0; src->font_ids[len]; ++len);
len += 1;
if (dst->font_ids) {
free(dst->font_ids);
}
dst->font_ids = malloc(len * sizeof(int));
if (!dst->font_ids) {
return -ENOMEM;
}
dst->has_family = TRUE;
memcpy(dst->font_ids, src->font_ids, len * sizeof(int));
return 0;
}
int TextStyle_Copy(LCUI_TextStyle dst, LCUI_TextStyle src)
{
*dst = *src;
dst->font_ids = NULL;
return TextStyle_CopyFamily(dst, src);
}
void TextStyle_Destroy(LCUI_TextStyle data)
{
if (data->font_ids) {
free(data->font_ids);
}
data->font_ids = NULL;
}
void TextStyle_Merge(LCUI_TextStyle base, LCUI_TextStyle target)
{
int *font_ids = NULL;
base->has_family = TRUE;
TextStyle_CopyFamily(base, target);
if (target->has_style && !base->has_style &&
target->style != FONT_STYLE_NORMAL) {
base->has_style = TRUE;
base->style = target->style;
}
if (LCUIFont_UpdateStyle(base->font_ids,
base->style,
&font_ids) > 0) {
free(base->font_ids);
base->font_ids = font_ids;
}
if (target->has_weight && !base->has_weight &&
target->weight != FONT_WEIGHT_NORMAL) {
base->has_weight = TRUE;
base->weight = target->weight;
}
if (LCUIFont_UpdateWeight(base->font_ids,
base->weight,
&font_ids) > 0) {
free(base->font_ids);
base->font_ids = font_ids;
}
}
int TextStyle_SetWeight(LCUI_TextStyle ts, LCUI_FontWeight weight)
{
int *font_ids;
ts->weight = weight;
ts->has_weight = TRUE;
if (LCUIFont_UpdateWeight(ts->font_ids, weight, &font_ids) > 0) {
free(ts->font_ids);
ts->font_ids = font_ids;
return 0;
}
return -1;
}
int TextStyle_SetStyle(LCUI_TextStyle ts, LCUI_FontStyle style)
{
int *font_ids;
ts->style = style;
ts->has_style = TRUE;
if (LCUIFont_UpdateStyle(ts->font_ids, style, &font_ids) > 0) {
free(ts->font_ids);
ts->font_ids = font_ids;
return 0;
}
return -1;
}
int TextStyle_SetFont(LCUI_TextStyle ts, const char *str)
{
size_t count;
if (ts->has_family && ts->font_ids) {
free(ts->font_ids);
}
ts->font_ids = NULL;
ts->has_family = FALSE;
count = LCUIFont_GetIdByNames(&ts->font_ids, ts->style,
ts->weight, str);
if (count > 0) {
ts->has_family = TRUE;
return 0;
}
return -1;
}
int TextStyle_SetDefaultFont(LCUI_TextStyle ts)
{
if (ts->has_family && ts->font_ids) {
free(ts->font_ids);
ts->has_family = FALSE;
}
ts->font_ids = malloc(sizeof(int) * 2);
if (!ts->font_ids) {
ts->font_ids = NULL;
return -ENOMEM;
}
ts->has_family = TRUE;
ts->font_ids[0] = LCUIFont_GetDefault();
ts->font_ids[1] = 0;
return 0;
}
/*-------------------------- StyleTag --------------------------------*/
void StyleTags_Clear(LinkedList *tags)
{
LinkedList_Clear(tags, free);
}
/** 获取当前的文本样式 */
LCUI_TextStyle StyleTags_GetTextStyle(LinkedList *tags)
{
int count = 0;
LinkedListNode *node;
LCUI_TextStyleTag *tag;
LCUI_TextStyle style;
LCUI_BOOL found_tags[TEXT_STYLE_TOTAL_NUM] = { 0 };
if (tags->length <= 0) {
return NULL;
}
style = malloc(sizeof(LCUI_TextStyleRec));
TextStyle_Init(style);
/* 根据已经记录的各种样式,生成当前应有的文本样式 */
for (LinkedList_EachReverse(node, tags)) {
tag = node->data;
switch (tag->id) {
case TEXT_STYLE_COLOR:
if (found_tags[tag->id]) {
break;
}
style->has_fore_color = TRUE;
style->fore_color = tag->style.color;
found_tags[tag->id] = TRUE;
++count;
break;
case TEXT_STYLE_BG_COLOR:
if (found_tags[tag->id]) {
break;
}
style->has_back_color = TRUE;
style->back_color = tag->style.color;
found_tags[tag->id] = TRUE;
++count;
break;
case TEXT_STYLE_BOLD:
if (found_tags[tag->id]) {
break;
}
found_tags[tag->id] = TRUE;
TextStyle_SetWeight(style, FONT_WEIGHT_BOLD);
++count;
break;
case TEXT_STYLE_ITALIC:
if (found_tags[tag->id]) {
break;
}
found_tags[tag->id] = TRUE;
TextStyle_SetStyle(style, FONT_STYLE_ITALIC);
++count;
break;
case TEXT_STYLE_SIZE:
if (found_tags[tag->id]) {
break;
}
style->has_pixel_size = TRUE;
style->pixel_size = iround(tag->style.px);
found_tags[tag->id] = TRUE;
++count;
break;
default: break;
}
if (count == 4) {
break;
}
}
if (count == 0) {
free(style);
return NULL;
}
return style;
}
/** 将指定标签的样式数据从队列中删除,只删除队列尾部第一个匹配的标签 */
static void StyleTags_Delete(LinkedList *tags, int id)
{
LCUI_TextStyleTag *tag;
LinkedListNode *node;
DEBUG_MSG("delete start, total tag: %d\n", total);
if (tags->length <= 0) {
return;
}
for (LinkedList_Each(node, tags)) {
tag = node->data;
if (tag->id == id) {
free(tag);
LinkedList_DeleteNode(tags, node);
break;
}
}
DEBUG_MSG("delete end, total tag: %d\n", tags->length);
}
/** 清除字符串中的空格 */
void clear_space(char *in, char *out)
{
size_t j, i, len = strlen(in);
for (j = i = 0; i < len; ++i) {
if (in[i] == ' ') {
continue;
}
out[j] = in[i];
++j;
}
out[j] = 0;
}
/** 在字符串中获取样式的结束标签,输出的是标签名 */
const wchar_t *ScanStyleEndingTag(const wchar_t *wstr, wchar_t *name)
{
size_t i, j, len;
len = wcslen(wstr);
if (wstr[0] != '[' || wstr[1] != '/') {
return NULL;
}
/* 匹配标签,获取标签名 */
for (j = 0, i = 2; i < len; ++i) {
switch (wstr[i]) {
case ' ': break;
case ']': ++i; goto end_tag_search;
default:
if (name) {
name[j] = wstr[i];
}
++j;
break;
}
}
end_tag_search:;
if (name) {
name[j] = 0;
}
if (j < 1) {
return NULL;
}
return wstr + i;
}
/** 从字符串中获取样式标签的名字及样式属性 */
const wchar_t *ScanStyleTag(const wchar_t *wstr, wchar_t *name,
int max_name_len, wchar_t *data)
{
size_t i, j, len;
LCUI_BOOL end_name = FALSE;
len = wcslen(wstr);
if (wstr[0] != '<') {
return NULL;
}
/* 匹配标签前半部分 */
for (j = 0, i = 1; i < len; ++i) {
if (wstr[i] == ' ') {
/* 如果上个字符不是空格,说明标签名已经结束 */
if (i > 0 && wstr[i - 1] != ' ') {
end_name = TRUE;
}
/* 标签名首部和尾部可包含空格 */
if (j == 0 || max_name_len == 0
|| (max_name_len > 0 && end_name)) {
continue;
}
/* 标签名中间不能包含空格 */
return NULL;
}
/* 如果标签名部分已经匹配完 */
if (wstr[i] == '=') {
++i;
break;
}
/* 如果标签名已经结束了 */
if (end_name) {
return NULL;
}
if (max_name_len > 0 && data) {
name[j] = wstr[i];
}
++j;
}
if (data) {
name[j] = 0;
}
/* 获取标签后半部分 */
for (j = 0; i < len; ++i) {
if (wstr[i] == ' ') {
continue;
}
/* 标签结束,退出 */
if (wstr[i] == '>') {
++i;
break;
}
if (data) {
/* 保存标签内的数据 */
data[j] = wstr[i];
}
++j;
}
if (data) {
data[j] = 0;
}
if (i >= len) {
return NULL;
}
return wstr + i;
}
/** 在字符串中获取指定样式标签中的数据 */
static const wchar_t *ScanStyleTagByName(const wchar_t *wstr,
const wchar_t *name,
char *data)
{
size_t i, j, len, tag_len;
len = wcslen(wstr);
tag_len = wcslen(name);
if (wstr[0] != '[') {
return NULL;
}
/* 匹配标签前半部分 */
for (j = 0, i = 1; i < len; ++i) {
if (wstr[i] == ' ') {
if (j == 0 || j >= tag_len) {
continue;
}
return NULL;
}
if (j < tag_len) {
if (wstr[i] == name[j]) {
++j;
continue;
}
} else if (wstr[i] == '=') {
++i;
break;
} else if (wstr[i] == ']') {
break;
}
return NULL;
}
/* 获取标签后半部分 */
for (j = 0; i < len; ++i) {
if (wstr[i] == ' ') {
continue;
}
/* 标签结束,退出 */
if (wstr[i] == ']') {
++i;
break;
}
/* 保存标签内的数据 */
data[j] = (char)wstr[i];
++j;
}
data[j] = 0;
if (i >= len) {
return NULL;
}
return &wstr[i];
}
/** 根据字符串中的标签得到相应的样式数据,并返回指向标签后面字符的指针 */
static const wchar_t *ScanStyleTagData(const wchar_t *wstr,
LCUI_TextStyleTag *tag)
{
const wchar_t *p, *q;
char tag_data[256];
p = wstr;
if ((q = ScanStyleTagByName(p, L"color", tag_data))) {
if (!ParseColor(&tag->style, tag_data)) {
return NULL;
}
tag->id = TEXT_STYLE_COLOR;
return q;
}
if ((q = ScanStyleTagByName(p, L"bgcolor", tag_data))) {
if (!ParseColor(&tag->style, tag_data)) {
return NULL;
}
tag->id = TEXT_STYLE_BG_COLOR;
return q;
}
if ((q = ScanStyleTagByName(p, L"size", tag_data))) {
if (!ParseNumber(&tag->style, tag_data)) {
return NULL;
}
tag->id = TEXT_STYLE_SIZE;
return q;
}
if ((q = ScanStyleTagByName(p, L"b", tag_data))) {
tag->id = TEXT_STYLE_BOLD;
return q;
}
if ((q = ScanStyleTagByName(p, L"i", tag_data))) {
tag->id = TEXT_STYLE_ITALIC;
return q;
}
return NULL;
}
/** 处理样式标签 */
const wchar_t *StyleTags_GetStart(LinkedList *tags, const wchar_t *str)
{
const wchar_t *q;
LCUI_TextStyleTag *tag = NEW(LCUI_TextStyleTag, 1);
q = ScanStyleTagData(str, tag);
if (q) {
/* 将标签样式数据加入队列 */
LinkedList_Insert(tags, 0, tag);
} else {
free(tag);
}
return q;
}
/** 处理样式结束标签 */
const wchar_t* StyleTags_GetEnd(LinkedList *tags, const wchar_t *str)
{
const wchar_t *p;
wchar_t tagname[256];
/* 获取标签名 */
p = ScanStyleEndingTag(str, tagname);
if (!p) {
return NULL;
}
/* 删除相应的样式标签 */
if (wcscmp(tagname, L"color") == 0) {
StyleTags_Delete(tags, TEXT_STYLE_COLOR);
} else if (wcscmp(tagname, L"bgcolor") == 0) {
StyleTags_Delete(tags, TEXT_STYLE_BG_COLOR);
} else if (wcscmp(tagname, L"size") == 0) {
StyleTags_Delete(tags, TEXT_STYLE_SIZE);
} else if (wcscmp(tagname, L"b") == 0) {
StyleTags_Delete(tags, TEXT_STYLE_BOLD);
} else if (wcscmp(tagname, L"i") == 0) {
StyleTags_Delete(tags, TEXT_STYLE_ITALIC);
} else {
return NULL;
}
return p;
}
/*------------------------- End StyleTag -----------------------------*/
| {
"pile_set_name": "Github"
} |
Verizon Has Never Challenged NSA, Exec Mocks Internet Companies For Doing So - opendais
http://www.techdirt.com/articles/20130917/17490324560/same-day-its-revealed-verizon-has-never-challenged-nsa-it-mocks-internet-companies-doing-so.shtml
======
skunkednoH2O2
How could they admit this publicly?
~~~
mschuster91
A clear case of "the company's PR rep was asleep/out of office and could not
prevent the fool from talking about stuff he wasn't supposed to"
| {
"pile_set_name": "HackerNews"
} |
Community- versus nosocomial-acquired severe sepsis and septic shock in patients admitted to a tertiary intensive care in Saudi Arabia, etiology and outcome.
Sepsis syndrome is a major worldwide cause of morbidity and mortality. While community-acquired severe sepsis and septic shock constitutes a major cause of admission to the intensive care unit, hospital-acquired severe sepsis and septic shock remain major preventable causes of ICU admission. This study evaluates the rate, etiology, complication and outcome of community- and hospital-acquired sepsis in a tertiary care hospital in Saudi Arabia. This is a retrospective evaluation of all admissions with severe sepsis and septic shock to a general intensive care unit over a period of six months. A total number of 96 patients were included, which represented 15% of the total number of admissions during the study period. The mean age was 57.4 (SD 21). Sixty percent of cases were due to hospital-acquired infections, and 40% were community-acquired. The majority of the infections acquired in the hospital occurred in medical wards and intensive care units (27% and 21%, respectively). At least one co-morbid condition was present in 94% of the sample patients, with cardiovascular disease and diabetes being the most frequently encountered disorders (58%). Both community and hospital-acquired severe sepsis and septic shock carry very high mortality (58%). The ICU length of stay was significantly longer for hospital and ICU acquired infections. Both community and hospital-acquired infections carry high mortality. Hospital-acquired severe sepsis is frequent in medical wards and ICUs, and measures to further evaluate risk factors are prudent. | {
"pile_set_name": "PubMed Abstracts"
} |
Natsumi Yanase
is a Japanese voice actress from Tokyo, Japan. She also goes by the name when voicing adult games. Her former stage name was .
Roles
Anime
D.C. II: Da Capo II (Akane Hanasaki)
Debutante Detective Corps (Yōko Ryūzaki)
Ef: A Tale of Memories. (Chihiro Shindō)
Hanaukyo Maid Team (Yuki Morino)
Lamune (Tae Isawa)
Little Busters! (Komari Kamikita)
Maji de Watashi ni Koi Shinasai! (Tatsuko Itagaki)
Soul Link (Nanami Inatsuki)
_summer OVA (Konami Hatano)
Games
_Summer (Konami Hatano)
Atelier Iris: Eternal Mana (Norn)
Atelier Iris 2: The Azoth of Destiny (Fee)
Atelier Iris 3: Grand Phantasm (Nell Ellis)
D.C. II: Da Capo II (Akane Hanasaki)
Ef: The First Tale. (Chihiro Shindō)
Ef: The Latter Tale. (Chihiro Shindō)
Grisaia no Kajitsu (Chizuru Tachibana)
Haru no Ashioto (Yuzuki Kaede)
Hoshiuta (Yurika Amamiya)
I/O (Ea)
Lamune (Tae Isawa)
Little Busters! (Komari Kamikita)
Logos Panic
Love & Destroy (LuLu)
Maji de Watashi ni Koi Shinasai! (Tatsuko Itagaki)
Narcissu: Side 2nd (Himeko)
Rapelay (Manaka Kiryū)
Riviera: The Promised Land (Fia)
Sakura Sakura (Nanako Sakura)
Valkyrie Profile (Nanami, Lemia)
Heart de Roommate (Tomoe Katsuragi)
Tintin: Destination Adventure (Tin Tin)
Drama
Kyuukyoku Parodius (Tako A)
References
External links
Natsumi Yanase at Behind The Voice Actors
Category:1971 births
Category:Japanese voice actresses
Category:Living people
Category:People from Tokyo | {
"pile_set_name": "Wikipedia (en)"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.