text
stringlengths 1
1.04M
| language
stringclasses 25
values |
|---|---|
#menubar,
#header,
#content .section-header,
.offcanvas-holder {
display: none;
}
#content,
#content .section-body {
padding: 0;
}
.card-printable {
display: block;
}
.card-printable .card-head {
display: none;
}
body,
#content > section {
background-color: #ffffff;
border: 0;
}
|
css
|
14 And no wonder, for even (A)Satan disguises himself as an (B)angel of light.
Legacy Standard Bible Copyright ©2021 by The Lockman Foundation. All rights reserved. Managed in partnership with Three Sixteen Publishing Inc. LSBible.org For Permission to Quote Information visit https://www.LSBible.org.
|
english
|
**Bhubaneswar:** “Na toh tired na retired, bus Advani ji ke netritva mein vijay ki ore prasthan!.” Was the famous ironical retort of Atal Bihari Vajpayee when LK Advani took over the reigns of BJP.
In December 2005, Vajpayee had announced his retirement from active politics, declaring that he would not contest in the next general election.
Vajpayee had been hospitalized at AIIMS for chest infection and fever in February 2009. He had been put on ventilator support as his condition had worsened then, but eventually recuperated and was later discharged.
Vajpayee is survived by an adopted daughter, Namita. He had undergone knee replacement surgery at Breach Candy Hospital in Mumbai in 2001. He had suffered a stroke in 2009 which had impaired his speech.
His health had been a major source of concern and those in the know used to say that he was often confined to a wheelchair and failed to recognize people.
He was said to be suffering from dementia and long-term diabetes. He was not known to have attended any public event in recent years. He rarely ventured out of the house, except for checkups.
Vajpayee received country’s highest civilian honour Bharat Ratna in March 2015. The then President Pranab Mukherjee conferred the honour upon Vajpayee at his residence at Krishna Menon Marg in Lutyens’ Delhi.
Not many people visited him these days. The only regular visitors were N M Ghatate, Vajpayee’s friend of nearly six decades, Advani and B C Khanduri, who came to sit by his side or ask his daughter about his health.
Former Prime Minister Dr Manmohan Singh used to make regular inquiries about his health and never missed out on wishing Vajpayee personally on his birthday.
Atal’s Manali Connection:
Atal Bihari Vajpayee had a liberal gift of the gab and captured hearts across the globe with his poems. Few people know that some of his poems were penned on the pristine hills of Manali when Vajpayee took some time off from work.
The former Prime Minister had built a cottage in Prini, a picturesque village in Manali. Vajpayee hoped to spend his retirement years amid apple and walnut trees before illness gripped him.
He was emotionally attached with this place and penned some of his poems during his stay here. Vajpayee had last visited the house, currently out of bounds for people due to security reasons, for a quiet sojourn in June 2006.
|
english
|
/*! EON */
|
css
|
Researchers in the US have released the latest figures comparing the maths and science abilities of 4th- and 8th-grade students in countries across the globe.
Far Eastern countries dominate the top tens, with Singapore top for science in both 4th and 8th grade. In maths, Hong Kong tops the 4th grade scores, with ‘Chinese Taipei’ leading the 8th. (Image right shows the percentage of fourth-grade students who reached the TIMSS advanced international benchmark in science in the top ten countries. See full graph.)
As the New York Times points out, this should worry the US as these subjects “are crucial to economic competitiveness and research”.
“It was good to see that the United States has made some progress in math, but I was surprised by the magnitude of the gap between us and the highest performing Asian countries, and that should cause us some concern,” Ina Mullis, of the International Study Center at Boston College that directs the study, told the paper.
Say that again.
|
english
|
The restart of CERN's flagship particle accelerator, which was taken out of commission last September, is now slated for October.
The flagship particle accelerator at the European Organisation for Nuclear Research is to be restarted in October, as opposed to September.
The Large Hadron Collider has been offline since an incident on September 19, when an equipment failure caused extensive damage. James Gillies, CERN's head of communications, said on Monday that an internal schedule set in February to restart the experiment has been pushed back by two or three weeks, but that the restart would still commence in the fall.
"The situation is a retreat from February," Gillies told ZDNet UK. "We had aimed for the end of September, but we're now looking at somewhere in October."
CERN has revised its LHC restart date a number of times. An original October 2008 estimate of an April 2009 restart was pushed back to the end of the summer, and was then revised to September.
The experiment, which is designed to improve scientific understanding of the nature of matter, had to be halted nine days after it was fully powered up, after an electrical malfunction caused a leak of liquid helium.
In May, details emerged that the malfunction had been caused by a faulty splice between two of the busbars that carry the superconducting cable in the LHC. Gillies said that the problem had not been in the design, but rather in the implementation of the electrical circuits for the quench system.
"It was a quality control flaw," Gillies said. "Most of the splices were done well, but a few of the solder joints were not perfectly carried out. We know there were a number of faulty splices in the machine. We've repaired a few, and we'll be repairing more."
CERN has developed noninvasive ways of testing the electrical circuits in some of the systems, which have remained cooled to 80 Kelvin (negative 315.67 degrees Fahrenheit), Gillies said. In circuits where faults have been found, Gillies said the surrounding sectors will be warmed to room temperature, and then the circuits will be repaired and tested again.
Gillies said CERN won't be able to give an exact restart date until August, when testing is completed. CERN has not decided whether to run the experiment at 4 teraelecton volts or at 5TeV. The world's most powerful particle accelerator, the Tevatron at Fermilab near Chicago, runs at 1TeV.
Tom Espiner of ZDNet UK reported from London.
|
english
|
New report says Apple is cooking up a 4.5-inch plastic iPhone that will cost far less than current models but won't ship till next year.
Holdouts expecting a larger version of the iPhone this year will have to keep on waiting, a new report says.
Citing sources, Japanese Apple-news site Macotakara says such a device is instead slated for next year, and will use plastic instead of aluminum for its body.
Macotakara says the device will sport a polycarbonate plastic enclosure much like the one found on the MacBook and iBook before it. Other rumored details include a 4.5-inch screen, which would be half an inch larger than the one found on the iPhone 5 and iPod Touch; Apple's usual home button; and a $330 price tag that would be a little less than half of the average selling price of the iPhone 5 (without carrier subsidy).
As MacRumors notes, Macotakara has had a mixed rumor scorecard, but it had accurate information about Apple's latest batch of iPods, some two months before they were officially unveiled.
Wall Street analysts have, for months, opined about the possibilities of a larger-screened device, and the potential financial windfall it could provide Apple. In a note earlier this month, Barclays Capital analyst Ben Reitzes said the firm believes Apple is cooking up a 5-inch model for later this year or the first quarter of next year, and that during the 2014 calendar year such a device could boost by about 5 percent the average amount Apple sells the iPhone for.
The rumor is separate from those pointing to another "S" iteration from Apple later this year. The company has released both the iPhone 3GS and 4S between major device generations, something that is expected to happen once again. Purported shots of the device's internal components surfaced in January alongside reports Apple was planning to double down with a second, cheaper model to gain ground in emerging markets.
(Via Apple Insider)
|
english
|
const Discord = require('discord.js')
const ytdl = require('ytdl-core')
function nowplaying(message, client, serverQueue) {
if (!serverQueue) return message.channel.send('There is no queue!');
let embed = new Discord.RichEmbed
embed.setColor('RANDOM')
embed.setTitle('Now Playing:')
embed.setDescription(serverQueue.songs[0].title)
if (serverQueue.songs[1]) embed.addField('Next song:', serverQueue.songs[1].title)
embed.setFooter(`${client.user.tag}, now serving music in ${message.guild.name}`, client.user.displayAvatarURL)
message.channel.send(embed)
}
module.exports = nowplaying
|
javascript
|
Nokia brand licensee HMD Global has today, via an online event, unveiled the latest Nokia smartphones to add to its existing lineup. Called the Nokia 2.4 and Nokia 3.4, the smartphones come at different price points and target different audiences. On the one hand, the Nokia 3.4 comes with the Helio P22 chipset, the Nokia 2.4, on the other, runs on a relatively-newer processor, the Snapdragon 460. Let’s dive in to check out the devices in detail.
In terms of design, the Nokia 2.4 comes with a 3D nano-textured back, which promises to offer a comfortable grip in hand. Towards the front, it features a 6.5-inch display that comes in at a 20:9 aspect ratio and offers HD+ screen resolution. Nokia 2.4 comes in three colorways: Dusk, Charcoal, and Fjord.
Under the hood, the phone runs on MediaTek Helio P22, which is a two-year-old processor that comes with eight cores and up to 2.0GHz of clock speed. For graphics processing, there is the PowerVR GE8320 GPU. To assist the processor, there is 2GB / 3GB of RAM and 32GB / 64GB of onboard storage (expandable up to 512GB with a microSD card). The device draws power from a 4500mAh battery, which charges over micro-USB.
As for other specifications, the Nokia 2.4 comes with dual 4G VoLTE, Wi-Fi 802.11 b/g/n, Bluetooth 5.0, and NFC. It has a micro-USB port, a rear-mounted fingerprint scanner, a 3.5mm audio jack, and a dedicated Google Assistant button. On the software front, the device runs on Android 10, and as per the company claims, it is Android 11 ready.
In the camera department, the Nokia 2.4 sports a dual-camera setup on the rear, which includes a 13MP (f/2.2) primary sensor and a 2MP depth sensor, along with an LED flash. On the front, there is a 5MP (f/2.4) sensor for selfies.
Moving to the Nokia 3.4, the device comes with a recyclable metal chassis with the same 3D nano-textured rear as the Nokia 2.4. However, the cameras on this one are arranged in a circular arrangement. Upfront, the device features a 6.39-inch display that comes in at a 19.5:9 aspect ratio and has the punch-hole cutout to house the front-facing camera. The display offers an HD+ screen resolution with 400 nits of brightness. Nokia 3.4 comes in three colors: Fjord, Dusk, and Charcoal.
At its core, the smartphone has a newer Snapdragon 460 chipset, which was announced earlier this year, and offers eight cores with up to 1.8GHz of clock speeds. To handle the graphics, it employs the Adreno 610 GPU. The device comes with 3GB / 4GB of RAM and 32GB / 64GB of onboard storage (expandable up to 512GB with a microSD card). To power the internals, there is a 4000mAh battery, which the company suggests lasts 2 days on a single charge.
The Nokia 3.4 comes with Wi-Fi 802.11 b/g/n, Bluetooth 4.2, and NFC. It offers a 3.5mm audio jack, a USB Type-C port, a rear-mounted fingerprint scanner for authentication, biometric face unlock, and a Google Assistant button.
For optics, the Nokia 3.4 sports a triple-camera setup on the rear with an LED flash. The setup includes a 13MP primary sensor, along with a 2MP depth sensor, and a 5MP ultra-wide-angle lens. Towards the front, the device has an 8MP camera for selfies and face unlock.
The Nokia 2.4 comes in two variants: 2GB + 32GB and 3GB + 64GB, and starts at €119. On the other hand, the Nokia 3.4 offers three configurations: 3GB + 32GB, 3GB + 64GB, and 4GB + 64GB, with the base configuration starting at €159. As for availability, the Nokia 2.4 will be available globally towards the end of September, with the Nokia 3.4 set to be available from early October.
Alongside the two smartphones, the company has also launched three more products, namely Nokia Power Earbuds Lite, Nokia Power Earbuds, and the Nokia Portable Wireless Speaker. The Earbuds will be available for €79 while the Earbuds Lite will retail for € 59.9. As for the wireless speaker, the device carries a price of €34.9.
|
english
|
Written Answers
seed producing agencies to ensure that seeds are available on demand by States or farmers;
(b) if so, the details thereof;
(c) by when the said grid is likely to be set up and start functioning;
(d) whether there are also plans to produce seeds at State and district level and to create seed villages for seeds replacement; and
(e) if so, the details in this regard?
THE MINISTER OF STATE IN THE MINISTRY OF AGRICULTURE (SHRI HUKUMDEO NARAYAN YADAV): (a) Yes, Sir.
AGRAHAYANA 17, 1925 (Saka)
(b) The National Seeds Grid would provide information of the requirement, production and distribution of seeds on a district-wise basis through a computerized network.
(c) By the end of 10th Plan.
(d) and (e) Yes, Sir. The Seed Village Programme is being implemented under the Centrally Sponsored Oilseeds Production Programme (OPP) and National Pulses Development Programme (NPDP) for the production of certified seeds of oilseeds and pulse crops. For which assistance of Rs. 500 per qtl. is provided to the seed producing farmers.
Prices of Steel
DR. M.V.V.S. MURTHI:
SHRI RAM MOHAN GADDE:
Will the Minister of STEEL be pleased to state: (a) whether the prices of steel have gone up during the last three months;
(b) if so, the reasons therefor; and
(c) the corrective steps taken by the Government for lowering the prices of steel in the country?
THE MINISTER OF STATE OF THE MINISTRY OF STEEL (SHRI BRAJA KISHORE TRIPATHY): (a) and (b) There has been no general increase in the domestic prices of steel during the last three months as compared to the prices prevailing in August, 2003.
(c) In a deregulated environment, prices are determined by the free interplay of forces of demand and
to Questions
supply. Government does not intervene in the market to influence prices.
Damage to Konark Temple
929. SHRI BHARTRUHARI MAHTAB: Will the Minister of TOURISM AND CULTURE be pleased to state the steps being taken by the Government to check the damage caused to Konark Temple by the sea breeze and sand?
THE MINISTER OF TOURISM AND CULTURE (SHRI JAG MOHAN): The green belt along the sea coast and the garden around the temple have considerably checked the damage caused to Konark Temple by the sea breeze and sand. Besides, the Archaeological Survey of India periodically undertakes conservation measures to remove injurious salts from the stone fabric of the temple and coats it with preservative to minimize the damage.
Setting up of National Kisan Commission
930. SHRI RAMSHETH THAKUR: SHRI PRABODH PANDA:
SHRI ASHOK N. MOHOL:
Will the Minister of AGRICULTURE be pleased to state:
(a) whether there is any proposal to set up National Kisan Commission to encourage experiments in farming, promoting agricultural investments and study peasant problems at macro level;
(b) if so, whether the Union Government have taken final decision in this regard;
(c) if so, by when the National Kissan Commission is likely to come into existence; and
(d) if not, by when a final decision is likely to be taken in this regard?
THE MINISTER OF STATE IN THE MINISTRY OF AGRICULTURE (SHRI HUKUMDEO NARAYAN YADAV): (a) to (d) Yes, Sir. In pursuance of Hon'ble Prime Minister's announcement during his Independence day's speech this year Government is contemplating to constitute a National Kisan Commission at the earliest to encourage experiments in farming, promoting agricultural investment and study and mitigate various problems of Indian farmers. Government is currently engaged in working out the modalities.
|
english
|
<gh_stars>0
import { useReducer, useMemo, useCallback } from "react";
import { useSharedCommunication } from "@mm/app-game/services/communication/useSharedCommunication";
import { reduce } from "./reducer";
import { getInitialState } from "./initialState";
import type { Page, Action } from "./reducer";
import type { Line, Feedback } from "@mm/solver/type";
import type { ColorScheme } from "@mm/app-game/services/colorScheme";
export const useAppState = () => {
const [state, internalDispatch] = useReducer(reduce, null, getInitialState);
const { sessionId } = state;
const onMessage = useCallback(
(m: any) => {
if (!m.sessionId || m.sessionId === sessionId) internalDispatch(m);
},
[sessionId]
);
const { publish } = useSharedCommunication(onMessage);
const actions = useMemo(() => {
const globalDispatch = (action: Action) => {
internalDispatch(action);
publish({ ...action, sessionId });
};
return {
setPage: (page: Page) => {
internalDispatch({ type: "page:set", page });
},
bindSession: (sessionId: string) => {
internalDispatch({ type: "session:bind", sessionId });
},
play: (line: Line) => {
globalDispatch({ type: "game:play", line });
},
report: (line: Line, feedback: Feedback) => {
globalDispatch({ type: "game:report", line, feedback });
},
setColorScheme: (colorScheme: ColorScheme) => {
globalDispatch({ type: "colorScheme:set", colorScheme });
},
setGameConfig: (p: number, n: number) => {
globalDispatch({ type: "game:config:set", p, n });
},
};
}, [internalDispatch, publish, sessionId]);
return { ...state, ...actions };
};
|
typescript
|
<reponame>mremolt/piral<gh_stars>0
import { DebugTracker } from './DebugTracker';
import { VisualizationWrapper } from './VisualizationWrapper';
import { ExtensionCatalogue } from './ExtensionCatalogue';
import { decycle } from './decycle';
import { setState, initialSettings } from './state';
import { DebugCustomSetting, DebuggerOptions } from './types';
export function installPiralDebug(options: DebuggerOptions) {
const {
injectPilet,
getGlobalState,
getExtensions,
getDependencies,
getRoutes,
getPilets,
setPilets,
fireEvent,
integrate,
createApi,
loadPilet,
customSettings = {},
} = options;
const events = [];
const legacyBrowser = !new Error().stack;
const excludedRoutes = [initialSettings.cataloguePath];
const selfSource = 'piral-debug-api';
const debugApiVersion = 'v1';
const settings: Record<string, DebugCustomSetting> = {
...customSettings,
viewState: {
value: initialSettings.viewState,
type: 'boolean',
label: 'State container logging',
onChange(value) {
sessionStorage.setItem('dbg:view-state', value ? 'on' : 'off');
},
},
loadPilets: {
value: initialSettings.loadPilets,
type: 'boolean',
label: 'Load available pilets',
onChange(value) {
sessionStorage.setItem('dbg:load-pilets', value ? 'on' : 'off');
},
},
hardRefresh: {
value: initialSettings.hardRefresh,
type: 'boolean',
label: 'Full refresh on change',
onChange(value) {
sessionStorage.setItem('dbg:hard-refresh', value ? 'on' : 'off');
},
},
viewOrigins: {
value: initialSettings.viewOrigins,
type: 'boolean',
label: 'Visualize component origins',
onChange(value, prev) {
sessionStorage.setItem('dbg:view-origins', value ? 'on' : 'off');
if (prev !== value) {
updateVisualize(value);
}
},
},
extensionCatalogue: {
value: initialSettings.extensionCatalogue,
type: 'boolean',
label: 'Enable extension catalogue',
onChange(value) {
sessionStorage.setItem('dbg:extension-catalogue', value ? 'on' : 'off');
},
},
};
const sendMessage = (content: any) => {
window.postMessage(
{
content,
source: selfSource,
version: debugApiVersion,
},
'*',
);
};
const getSettings = () => {
return Object.keys(settings).reduce((obj, key) => {
const setting = settings[key];
if (
setting &&
typeof setting === 'object' &&
typeof setting.label === 'string' &&
typeof setting.type === 'string' &&
['boolean', 'string', 'number'].includes(typeof setting.value)
) {
obj[key] = {
label: setting.label,
value: setting.value,
type: setting.type,
};
}
return obj;
}, {});
};
const updateSettings = (values: Record<string, any>) => {
Object.keys(values).forEach((key) => {
const setting = settings[key];
switch (setting.type) {
case 'boolean': {
const prev = setting.value;
const value = values[key];
setting.value = value;
setting.onChange(value, prev);
break;
}
case 'number': {
const prev = setting.value;
const value = values[key];
setting.value = value;
setting.onChange(value, prev);
break;
}
case 'string': {
const prev = setting.value;
const value = values[key];
setting.value = value;
setting.onChange(value, prev);
break;
}
}
});
sendMessage({
settings: getSettings(),
type: 'settings',
});
};
const togglePilet = (name: string) => {
const pilet: any = getPilets().find((m) => m.name === name);
if (pilet.disabled) {
try {
const { createApi } = options;
const newApi = createApi(pilet);
injectPilet(pilet.original);
pilet.original.setup(newApi);
} catch (error) {
console.error(error);
}
} else {
injectPilet({ name, disabled: true, original: pilet } as any);
}
};
const removePilet = (name: string) => {
const pilets = getPilets().filter((m) => m.name !== name);
injectPilet({ name } as any);
setPilets(pilets);
};
const appendPilet = (meta: any) => {
const { createApi, loadPilet } = options;
loadPilet(meta).then((pilet) => {
try {
const newApi = createApi(pilet);
injectPilet(pilet);
pilet.setup(newApi as any);
} catch (error) {
console.error(error);
}
});
};
const toggleVisualize = () => {
setState((s) => ({
...s,
visualize: {
...s.visualize,
force: !s.visualize.force,
},
}));
};
const updateVisualize = (active: boolean) => {
setState((s) => ({
...s,
visualize: {
...s.visualize,
active,
},
}));
};
const goToRoute = (path: string, state?: any) => {
setState((s) => ({
...s,
route: {
path,
state,
},
}));
};
const eventDispatcher = document.body.dispatchEvent;
const debugApi = {
debug: debugApiVersion,
instance: {
name: process.env.BUILD_PCKG_NAME,
version: process.env.BUILD_PCKG_VERSION,
dependencies: process.env.SHARED_DEPENDENCIES,
},
build: {
date: process.env.BUILD_TIME_FULL,
cli: process.env.PIRAL_CLI_VERSION,
compat: process.env.DEBUG_PIRAL,
},
pilets: {
loadPilet,
createApi,
},
};
const start = () => {
const container = decycle(getGlobalState());
const routes = getRoutes().filter((r) => !excludedRoutes.includes(r));
const extensions = getExtensions();
const settings = getSettings();
const dependencies = getDependencies();
const pilets = getPilets().map((pilet: any) => ({
name: pilet.name,
version: pilet.version,
disabled: pilet.disabled,
}));
sendMessage({
type: 'available',
name: debugApi.instance.name,
version: debugApi.instance.version,
kind: debugApiVersion,
mode: process.env.NODE_ENV === 'production' ? 'production' : 'development',
capabilities: ['events', 'container', 'routes', 'pilets', 'settings', 'extensions', 'dependencies'],
state: {
routes,
pilets,
container,
settings,
events,
extensions,
dependencies,
},
});
};
document.body.dispatchEvent = function (ev: CustomEvent) {
if (ev.type.startsWith('piral-')) {
events.unshift({
id: events.length.toString(),
name: ev.type.replace('piral-', ''),
args: ev.detail.arg,
time: Date.now(),
});
sendMessage({
events,
type: 'events',
});
}
return eventDispatcher.call(this, ev);
};
window.addEventListener('storage', (event) => {
if (!legacyBrowser && event.storageArea === sessionStorage) {
// potentially unknowingly updated settings
updateSettings({
viewState: sessionStorage.getItem('dbg:view-state') !== 'off',
loadPilets: sessionStorage.getItem('dbg:load-pilets') === 'on',
hardRefresh: sessionStorage.getItem('dbg:hard-refresh') === 'on',
viewOrigins: sessionStorage.getItem('dbg:view-origins') === 'on',
extensionCatalogue: sessionStorage.getItem('dbg:extension-catalogue') !== 'off',
});
}
});
window.addEventListener('message', (event) => {
const { source, version, content } = event.data;
if (source !== selfSource && version === debugApiVersion) {
switch (content.type) {
case 'init':
return start();
case 'update-settings':
return updateSettings(content.settings);
case 'append-pilet':
return appendPilet(content.meta);
case 'remove-pilet':
return removePilet(content.name);
case 'toggle-pilet':
return togglePilet(content.name);
case 'emit-event':
return fireEvent(content.name, content.args);
case 'goto-route':
return goToRoute(content.route, content.state);
case 'visualize-all':
return toggleVisualize();
}
}
});
integrate({
components: {
Debug: DebugTracker,
},
routes: {
[initialSettings.cataloguePath]: ExtensionCatalogue,
},
wrappers: {
'*': VisualizationWrapper,
},
onChange(previous, current, changed) {
if (changed.state) {
if (settings.viewState.value) {
if (!legacyBrowser) {
// Chrome, Firefox, ... (full capability)
const err = new Error();
const lastLine = err.stack.split('\n')[7];
if (lastLine) {
const action = lastLine.replace(/^\s+at\s+(Atom\.|Object\.)?/, '');
console.group(
`%c Piral State Change %c ${new Date().toLocaleTimeString()}`,
'color: gray; font-weight: lighter;',
'color: black; font-weight: bold;',
);
console.log('%c Previous', `color: #9E9E9E; font-weight: bold`, previous);
console.log('%c Action', `color: #03A9F4; font-weight: bold`, action);
console.log('%c Next', `color: #4CAF50; font-weight: bold`, current);
console.groupEnd();
}
} else {
// IE 11, ... (does not know colors etc.)
console.log('Changed state', previous, current);
}
}
sendMessage({
type: 'container',
container: decycle(getGlobalState()),
});
}
if (changed.pilets) {
sendMessage({
type: 'pilets',
pilets: getPilets().map((pilet: any) => ({
name: pilet.name,
version: pilet.version,
disabled: !!pilet.disabled,
})),
});
}
if (changed.pages) {
sendMessage({
type: 'routes',
routes: getRoutes().filter((r) => !excludedRoutes.includes(r)),
});
}
if (changed.extensions) {
sendMessage({
type: 'extensions',
extensions: getExtensions(),
});
}
if (changed.dependencies) {
sendMessage({
type: 'dependencies',
dependencies: getDependencies(),
});
}
},
});
window['dbg:piral'] = debugApi;
start();
}
|
typescript
|
//
// ========================================================================
// Copyright (c) 1995-2020 Mort Bay Consulting Pty Ltd and others.
//
// This program and the accompanying materials are made available under
// the terms of the Eclipse Public License 2.0 which is available at
// https://www.eclipse.org/legal/epl-2.0
//
// This Source Code may also be made available under the following
// Secondary Licenses when the conditions for such availability set
// forth in the Eclipse Public License, v. 2.0 are satisfied:
// the Apache License v2.0 which is available at
// https://www.apache.org/licenses/LICENSE-2.0
//
// SPDX-License-Identifier: EPL-2.0 OR Apache-2.0
// ========================================================================
//
package org.acme.webapp;
import java.util.List;
import org.eclipse.jetty.util.resource.Resource;
import org.eclipse.jetty.webapp.DiscoveredAnnotation;
import org.eclipse.jetty.webapp.WebAppContext;
public class TestAnnotation extends DiscoveredAnnotation
{
private List<TestAnnotation> applications;
public TestAnnotation(WebAppContext context, String className, Resource resource, List<TestAnnotation> applications)
{
super(context, className, resource);
this.applications = applications;
}
@Override
public void apply()
{
if (applications != null)
applications.add(this);
}
@Override
public String toString()
{
return getClassName();
}
}
|
java
|
<reponame>bundestag/dip21-daten
{
"vorgangId": "176519",
"VORGANG": {
"WAHLPERIODE": "11",
"VORGANGSTYP": "Unterrichtung durch das Europäische Parlament",
"TITEL": "Entschließung zur Vorbereitung der Tagung mit den nationalen Parlamenten über die Zukunft der Gemeinschaft (\"Assisen\") (G-SIG: 11005587)",
"INITIATIVE": "Europäisches Parlament",
"AKTUELLER_STAND": "Nicht abgeschlossen - Einzelheiten siehe Vorgangsablauf",
"SIGNATUR": "",
"GESTA_ORDNUNGSNUMMER": "",
"WICHTIGE_DRUCKSACHE": {
"DRS_HERAUSGEBER": "BR",
"DRS_NUMMER": "540/90",
"DRS_TYP": "Unterrichtung"
},
"EU_DOK_NR": "",
"SACHGEBIET": "Europapolitik und Europäische Union",
"SCHLAGWORT": [
"Europäische Gemeinschaft",
{
"_fundstelle": "true",
"__cdata": "Europäisches Parlament"
}
],
"ABSTRAKT": "Durchführung einer interparlamentarischen Tagung vor der Regierungskonferenz vom 13./14.12.1990 zur Verbesserung der Zusammenarbeit zwischen dem EP und den Parlamenten der EG-Mitgliedstaaten, insbesondere zur Übertragung von Gesetzgebungs- und Kontrollbefugnissen auf das EP "
},
"VORGANGSABLAUF": {
"VORGANGSPOSITION": {
"ZUORDNUNG": "BR",
"URHEBER": "Unterrichtung, Urheber : Europäisches Parlament ",
"FUNDSTELLE": "25.07.1990 - BR-Drucksache 540/90"
}
}
}
|
json
|
import torch
import torch.nn as nn
import numpy as np
import math
class ForwardKinematics:
def __init__(self, args, edges):
self.topology = [-1] * (len(edges) + 1)
self.rotation_map = []
for i, edge in enumerate(edges):
self.topology[edge[1]] = edge[0]
self.rotation_map.append(edge[1])
self.world = args.fk_world
self.pos_repr = args.pos_repr
self.quater = args.rotation == 'quaternion'
def forward_from_raw(self, raw, offset, world=None, quater=None):
if world is None: world = self.world
if quater is None: quater = self.quater
if self.pos_repr == '3d':
position = raw[:, -3:, :]
rotation = raw[:, :-3, :]
elif self.pos_repr == '4d':
raise Exception('Not support')
if quater:
rotation = rotation.reshape((rotation.shape[0], -1, 4, rotation.shape[-1]))
identity = torch.tensor((1, 0, 0, 0), dtype=torch.float, device=raw.device)
else:
rotation = rotation.reshape((rotation.shape[0], -1, 3, rotation.shape[-1]))
identity = torch.zeros((3, ), dtype=torch.float, device=raw.device)
identity = identity.reshape((1, 1, -1, 1))
new_shape = list(rotation.shape)
new_shape[1] += 1
new_shape[2] = 1
rotation_final = identity.repeat(new_shape)
for i, j in enumerate(self.rotation_map):
rotation_final[:, j, :, :] = rotation[:, i, :, :]
return self.forward(rotation_final, position, offset, world=world, quater=quater)
'''
rotation should have shape batch_size * Joint_num * (3/4) * Time
position should have shape batch_size * 3 * Time
offset should have shape batch_size * Joint_num * 3
output have shape batch_size * Time * Joint_num * 3
'''
def forward(self, rotation: torch.Tensor, position: torch.Tensor, offset: torch.Tensor, order='xyz', quater=False, world=True):
if not quater and rotation.shape[-2] != 3: raise Exception('Unexpected shape of rotation')
if quater and rotation.shape[-2] != 4: raise Exception('Unexpected shape of rotation')
rotation = rotation.permute(0, 3, 1, 2)
position = position.permute(0, 2, 1)
result = torch.empty(rotation.shape[:-1] + (3, ), device=position.device)
norm = torch.norm(rotation, dim=-1, keepdim=True)
#norm[norm < 1e-10] = 1
rotation = rotation / norm
if quater:
transform = self.transform_from_quaternion(rotation)
else:
transform = self.transform_from_euler(rotation, order)
offset = offset.reshape((-1, 1, offset.shape[-2], offset.shape[-1], 1))
result[..., 0, :] = position
for i, pi in enumerate(self.topology):
if pi == -1:
assert i == 0
continue
transform[..., i, :, :] = torch.matmul(transform[..., pi, :, :], transform[..., i, :, :])
result[..., i, :] = torch.matmul(transform[..., i, :, :], offset[..., i, :, :]).squeeze()
if world: result[..., i, :] += result[..., pi, :]
return result
def from_local_to_world(self, res: torch.Tensor):
res = res.clone()
for i, pi in enumerate(self.topology):
if pi == 0 or pi == -1:
continue
res[..., i, :] += res[..., pi, :]
return res
@staticmethod
def transform_from_euler(rotation, order):
rotation = rotation / 180 * math.pi
transform = torch.matmul(ForwardKinematics.transform_from_axis(rotation[..., 1], order[1]),
ForwardKinematics.transform_from_axis(rotation[..., 2], order[2]))
transform = torch.matmul(ForwardKinematics.transform_from_axis(rotation[..., 0], order[0]), transform)
return transform
@staticmethod
def transform_from_axis(euler, axis):
transform = torch.empty(euler.shape[0:3] + (3, 3), device=euler.device)
cos = torch.cos(euler)
sin = torch.sin(euler)
cord = ord(axis) - ord('x')
transform[..., cord, :] = transform[..., :, cord] = 0
transform[..., cord, cord] = 1
if axis == 'x':
transform[..., 1, 1] = transform[..., 2, 2] = cos
transform[..., 1, 2] = -sin
transform[..., 2, 1] = sin
if axis == 'y':
transform[..., 0, 0] = transform[..., 2, 2] = cos
transform[..., 0, 2] = sin
transform[..., 2, 0] = -sin
if axis == 'z':
transform[..., 0, 0] = transform[..., 1, 1] = cos
transform[..., 0, 1] = -sin
transform[..., 1, 0] = sin
return transform
@staticmethod
def transform_from_quaternion(quater: torch.Tensor):
qw = quater[..., 0]
qx = quater[..., 1]
qy = quater[..., 2]
qz = quater[..., 3]
x2 = qx + qx
y2 = qy + qy
z2 = qz + qz
xx = qx * x2
yy = qy * y2
wx = qw * x2
xy = qx * y2
yz = qy * z2
wy = qw * y2
xz = qx * z2
zz = qz * z2
wz = qw * z2
m = torch.empty(quater.shape[:-1] + (3, 3), device=quater.device)
m[..., 0, 0] = 1.0 - (yy + zz)
m[..., 0, 1] = xy - wz
m[..., 0, 2] = xz + wy
m[..., 1, 0] = xy + wz
m[..., 1, 1] = 1.0 - (xx + zz)
m[..., 1, 2] = yz - wx
m[..., 2, 0] = xz - wy
m[..., 2, 1] = yz + wx
m[..., 2, 2] = 1.0 - (xx + yy)
return m
class InverseKinematics:
def __init__(self, rotations: torch.Tensor, positions: torch.Tensor, offset, parents, constrains):
self.rotations = rotations
self.rotations.requires_grad_(True)
self.position = positions
self.position.requires_grad_(True)
self.parents = parents
self.offset = offset
self.constrains = constrains
self.optimizer = torch.optim.Adam([self.position, self.rotations], lr=1e-3, betas=(0.9, 0.999))
self.crit = nn.MSELoss()
def step(self):
self.optimizer.zero_grad()
glb = self.forward(self.rotations, self.position, self.offset, order='', quater=True, world=True)
loss = self.crit(glb, self.constrains)
loss.backward()
self.optimizer.step()
self.glb = glb
return loss.item()
def tloss(self, time):
return self.crit(self.glb[time, :], self.constrains[time, :])
def all_loss(self):
res = [self.tloss(t).detach().numpy() for t in range(self.constrains.shape[0])]
return np.array(res)
'''
rotation should have shape batch_size * Joint_num * (3/4) * Time
position should have shape batch_size * 3 * Time
offset should have shape batch_size * Joint_num * 3
output have shape batch_size * Time * Joint_num * 3
'''
def forward(self, rotation: torch.Tensor, position: torch.Tensor, offset: torch.Tensor, order='xyz', quater=False,
world=True):
'''
if not quater and rotation.shape[-2] != 3: raise Exception('Unexpected shape of rotation')
if quater and rotation.shape[-2] != 4: raise Exception('Unexpected shape of rotation')
rotation = rotation.permute(0, 3, 1, 2)
position = position.permute(0, 2, 1)
'''
result = torch.empty(rotation.shape[:-1] + (3,), device=position.device)
norm = torch.norm(rotation, dim=-1, keepdim=True)
rotation = rotation / norm
if quater:
transform = self.transform_from_quaternion(rotation)
else:
transform = self.transform_from_euler(rotation, order)
offset = offset.reshape((-1, 1, offset.shape[-2], offset.shape[-1], 1))
result[..., 0, :] = position
for i, pi in enumerate(self.parents):
if pi == -1:
assert i == 0
continue
result[..., i, :] = torch.matmul(transform[..., pi, :, :], offset[..., i, :, :]).squeeze()
transform[..., i, :, :] = torch.matmul(transform[..., pi, :, :], transform[..., i, :, :])
if world: result[..., i, :] += result[..., pi, :]
return result
@staticmethod
def transform_from_euler(rotation, order):
rotation = rotation / 180 * math.pi
transform = torch.matmul(ForwardKinematics.transform_from_axis(rotation[..., 1], order[1]),
ForwardKinematics.transform_from_axis(rotation[..., 2], order[2]))
transform = torch.matmul(ForwardKinematics.transform_from_axis(rotation[..., 0], order[0]), transform)
return transform
@staticmethod
def transform_from_axis(euler, axis):
transform = torch.empty(euler.shape[0:3] + (3, 3), device=euler.device)
cos = torch.cos(euler)
sin = torch.sin(euler)
cord = ord(axis) - ord('x')
transform[..., cord, :] = transform[..., :, cord] = 0
transform[..., cord, cord] = 1
if axis == 'x':
transform[..., 1, 1] = transform[..., 2, 2] = cos
transform[..., 1, 2] = -sin
transform[..., 2, 1] = sin
if axis == 'y':
transform[..., 0, 0] = transform[..., 2, 2] = cos
transform[..., 0, 2] = sin
transform[..., 2, 0] = -sin
if axis == 'z':
transform[..., 0, 0] = transform[..., 1, 1] = cos
transform[..., 0, 1] = -sin
transform[..., 1, 0] = sin
return transform
@staticmethod
def transform_from_quaternion(quater: torch.Tensor):
qw = quater[..., 0]
qx = quater[..., 1]
qy = quater[..., 2]
qz = quater[..., 3]
x2 = qx + qx
y2 = qy + qy
z2 = qz + qz
xx = qx * x2
yy = qy * y2
wx = qw * x2
xy = qx * y2
yz = qy * z2
wy = qw * y2
xz = qx * z2
zz = qz * z2
wz = qw * z2
m = torch.empty(quater.shape[:-1] + (3, 3), device=quater.device)
m[..., 0, 0] = 1.0 - (yy + zz)
m[..., 0, 1] = xy - wz
m[..., 0, 2] = xz + wy
m[..., 1, 0] = xy + wz
m[..., 1, 1] = 1.0 - (xx + zz)
m[..., 1, 2] = yz - wx
m[..., 2, 0] = xz - wy
m[..., 2, 1] = yz + wx
m[..., 2, 2] = 1.0 - (xx + yy)
return m
|
python
|
{
"id": "d286-20",
"text": "12\nconferences* It is our hope that this type of self-supporting professional\ntraining may be increased within the next few years.\nHowever, this will still not reach many of those persons most needing\nsuch training, such as staff members of new and small stations; neither will\nit meet the need satisfactorily in what has turned out to be one of the areas\nof greatest needs for training, i.e., the proper training, on a national scale,\nof teachers using, and scheduled to use, television for direct instruction,\nparticularly closed-circuit TV, where those most needing the training are least\nable financially to provide that training for themselves.\nThe seminars and workshops made possible by FAE and Ford funds have\ncovered such topics as television production, television staging and lighting,\ntelevision program planning, television engineering, video recording,\nchildren’s television programs, instructional uses of television and radio, and\ntelevision station management. A total of 369 men and women engaged in\neducational broadcasting attended these meetings and were thus enabled to\nincrease their professional skills and knowledge* Many of them have now\nmoved into positions of new and greater educational responsibility, thanks to\nthe support provided by these grants.\nScholarships\nRealizing that NAEB-sponsored workshops and seminars could never\nfully satisfy the need for advanced study nor provide for the specialized needs\nof the staffs represented, the ETV scholarship program was originally designed\nto provide an opportunity for continuing study to ETV staff members w more\nvaried and specialized types of needs than those satisfied by the NAEB"
}
|
json
|
Odisha High Court has issued a stay on publication of the OPSC ASO Final marks list. OPSC will be allowed to publish the OPSC ASO Final result only after the court permits it to do so.
Odisha High Court has issued a stay after hearing the case regarding the Odisha Public Service Commission, Assistant Section Officer, OPSC ASO Result 2022. As per orders issued by the High Court, a stay has been put on the publication of the OPSC ASO final mark list.
Odisha High Court, upon hearing the fresh pleas issued by candidates, has told the Odisha Public Service Commission that they cannot publish the OPSC ASO Result without permission from the court.
This stay from the Odisha High Court comes after candidates had filed a fresh petition which challenges the sectional cut off issued for OPSC ASO Result.
OPSC however, has been directed to continue with the computer proficiency test for OPSC ASO. The Compter proficiency test is scheduled to take place tomorrow, December 4, 2022.
The computer test was scheduled to be held on November 27, 2022 but was later on postponed to December 4, 2022. The admit card for the same has been issued by OPSC. The OPSC ASO Computer test will be held from 10:30 AM to 11:30 AM for candidates.
Odisha High Court first heard the petitions regarding the OPSC ASO Result after candidates had alleged irregularities in the merit list and demanded for a revaluation. The High Court proceeded to quash these petitions and ordered the commission to publish the final list.
However, new petitions were filed with Odisha HC, following which, a stay has been ordered. OPSC ASO Exam was conducted by the commission in the month of August and the result was declared on November 7, 2022.
|
english
|
{
"_from": "vega-scenegraph@^1.0.16",
"_id": "vega-scenegraph@1.1.0",
"_inBundle": false,
"_integrity": "sha1-qLkef+v25lf6NvqymE9jiEgQxmM=",
"_location": "/vega-scenegraph",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "vega-scenegraph@^1.0.16",
"name": "vega-scenegraph",
"escapedName": "vega-scenegraph",
"rawSpec": "^1.0.16",
"saveSpec": null,
"fetchSpec": "^1.0.16"
},
"_requiredBy": [
"/vega"
],
"_resolved": "https://registry.npmjs.org/vega-scenegraph/-/vega-scenegraph-1.1.0.tgz",
"_shasum": "a8b91e7febf6e657fa36fab2984f63884810c663",
"_spec": "vega-scenegraph@^1.0.16",
"_where": "/Users/andreasantilli/training_ironita2018/script python/node_modules/vega",
"author": {
"name": "<NAME>",
"url": "http://idl.cs.washington.edu"
},
"browser": {
"canvas": false
},
"browserify": {
"transform": [
"browserify-shim"
]
},
"browserify-shim": {
"d3": "global:d3",
"canvas": "global:canvas"
},
"bugs": {
"url": "https://github.com/vega/vega-scenegraph/issues"
},
"bundleDependencies": false,
"contributors": [
{
"name": "<NAME>",
"url": "http://arvindsatya.com"
},
{
"name": "<NAME>",
"url": "https://github.com/emilygu"
}
],
"dependencies": {
"canvas": "^1.2.9",
"d3": "^3.5.6",
"datalib": "^1.4.6"
},
"deprecated": false,
"description": "Vega scenegraph and renderers.",
"devDependencies": {
"browserify": "^10.2.6",
"browserify-shim": "^3.8.9",
"browserify-versionify": "^1.0.4",
"chai": "^3.0.0",
"istanbul": "latest",
"jsdom": "^3.0.0",
"jshint": "^2.8.0",
"mocha": "^2.2.5",
"tv4": "^1.1.12",
"uglify-js": "^2.4.24",
"watchify": "^3.2.3"
},
"homepage": "https://github.com/vega/vega-scenegraph#readme",
"license": "BSD-3-Clause",
"main": "src/index.js",
"name": "vega-scenegraph",
"optionalDependencies": {
"canvas": "^1.2.9"
},
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/vega/vega-scenegraph.git"
},
"scripts": {
"build": "browserify src/index.js -d -s vg.scene -o vega-scenegraph.js",
"cover": "npm run schema && istanbul cover _mocha -- --timeout 5000 --recursive test/",
"lint": "jshint src/",
"postbuild": "uglifyjs vega-scenegraph.js -cm > vega-scenegraph.min.js",
"schema": "node scripts/schema.js > vega-scenegraph-schema.json",
"test": "npm run schema && mocha --timeout 5000 --recursive test/",
"watch": "watchify src/index.js -v -d -s vg.scene -o vega-scenegraph.js"
},
"version": "1.1.0"
}
|
json
|
When Matthew Hayden was dropped from Australia's one-day side after the 2005 Ashes tour, it seemed the end of the road had been reached for a batsman who, for a short but blistering period in the early 2000s, was the most powerful player in the game. Many have presented better techniques or shown greater deftness of touches, but none had carried themselves quite like Hayden, a prizefighter who wielded his bat much as Muhammad Ali used to wield a right fist.
, in the dying hours of that Ashes contest, Hayden scored an agonisingly slow and determined Test century, it seemed to be the last twitch of a fallen Goliath.
In fact, it was merely the beginning of a remarkable renaissance. In Tests, Hayden seized upon his lifeline and embarked on a scoring spree to rival his millennium mountain. He raised centuries in each of his next three Tests, and added two more before the end of 2006. But in the one-dayers his recall proved elusive, as Australia tinkered at the top of the order, with Simon Katich, Phil Jaques and even Shane Watson coming in for a test drive. Eventually the selectors twigged, there was no alternative.
Hayden had to endure an even longer spell on the sidelines at the start of his Test career - between his debut in March 1994 and his recall six years later, he played in just six matches (he hasn't missed a game since). And once again the hunger of exile has spurred him to greater heights and few have been greater than his feats of the past month.
66-ball hundred at Basseterre.
But none, surely, has been greater than his effort on Tuesday. An innings compiled under cloud cover, on a virgin wicket, at a new stadium, against the host nation, in a World Cup. He took 18 balls to score his first run, but eventually left the crease with 158 from just 143 deliveries. Such a blend of power and willpower are the ingredients that can deliver a third consecutive world title for this ultimate heavyweight.
"I've had to show a lot of commitment and passion, first to get back into the one-day side - and in particular, to represent Australia at the World Cup. It took a lot to get into this position and I'm just very pleased for the supporters, selectors and Ricky Ponting that it is paying off."
|
english
|
{
"contract": "0x4ade33d3ac9564805d09e237011b32c3bf86ef65",
"tool": "smartcheck",
"start": 1563527505.5993667,
"end": 1563527512.6034577,
"duration": 7.004091024398804,
"analysis": [
{
"name": "SOLIDITY_ADDRESS_HARDCODED",
"patternId": "adc165",
"severity": 1,
"line": 17,
"column": 20,
"content": "0xac2BD14654BBf22F9d8f20c7b3a70e376d3436B4"
},
{
"name": "SOLIDITY_DEPRECATED_CONSTRUCTIONS",
"patternId": "28fa69",
"severity": 1,
"line": 6,
"column": 4,
"content": "functionallowance(addressowner,addressspender)publicconstantreturns(uint256){}"
},
{
"name": "SOLIDITY_FUNCTIONS_RETURNS_TYPE_AND_NO_RETURN",
"patternId": "47acc2",
"severity": 1,
"line": 5,
"column": 4,
"content": "functiontransferFrom(address_from,address_to,uint256_value)publicreturns(bool){}"
},
{
"name": "SOLIDITY_FUNCTIONS_RETURNS_TYPE_AND_NO_RETURN",
"patternId": "47acc2",
"severity": 1,
"line": 6,
"column": 4,
"content": "functionallowance(addressowner,addressspender)publicconstantreturns(uint256){}"
},
{
"name": "SOLIDITY_LOCKED_MONEY",
"patternId": "30281d",
"severity": 3,
"line": 9,
"column": 0,
"content": "contractKittenSale{KittenCoinpublic_kittenContract;addresspublic_kittenOwner;uint256publictotalContributions;uint256publickittensSold;uint256publickittensRemainingForSale;functionKittenSale(){addressc=0xac2BD14654BBf22F9d8f20c7b3a70e376d3436B4;_kittenContract=KittenCoin(c);_kittenOwner=msg.sender;totalContributions=0;kittensSold=0;kittensRemainingForSale=0;}function()payable{require(msg.value>0);uint256contribution=msg.value;if(msg.value>=100finney){if(msg.value>=1ether){contribution/=6666;}else{contribution/=8333;}}else{contribution/=10000;}require(kittensRemainingForSale>=contribution);totalContributions+=msg.value;kittensSold+=contribution;_kittenContract.transferFrom(_kittenOwner,msg.sender,contribution);_kittenOwner.transfer(msg.value);updateKittensRemainingForSale();}functionupdateKittensRemainingForSale(){kittensRemainingForSale=_kittenContract.allowance(_kittenOwner,this);}}"
},
{
"name": "SOLIDITY_PRAGMAS_VERSION",
"patternId": "23fc32",
"severity": 1,
"line": 1,
"column": 16,
"content": "^"
},
{
"name": "SOLIDITY_VISIBILITY",
"patternId": 910067,
"severity": 1,
"line": 16,
"column": 4,
"content": "functionKittenSale(){addressc=0xac2BD14654BBf22F9d8f20c7b3a70e376d3436B4;_kittenContract=KittenCoin(c);_kittenOwner=msg.sender;totalContributions=0;kittensSold=0;kittensRemainingForSale=0;}"
},
{
"name": "SOLIDITY_VISIBILITY",
"patternId": 910067,
"severity": 1,
"line": 32,
"column": 4,
"content": "function()payable{require(msg.value>0);uint256contribution=msg.value;if(msg.value>=100finney){if(msg.value>=1ether){contribution/=6666;}else{contribution/=8333;}}else{contribution/=10000;}require(kittensRemainingForSale>=contribution);totalContributions+=msg.value;kittensSold+=contribution;_kittenContract.transferFrom(_kittenOwner,msg.sender,contribution);_kittenOwner.transfer(msg.value);updateKittensRemainingForSale();}"
},
{
"name": "SOLIDITY_VISIBILITY",
"patternId": 910067,
"severity": 1,
"line": 52,
"column": 4,
"content": "functionupdateKittensRemainingForSale(){kittensRemainingForSale=_kittenContract.allowance(_kittenOwner,this);}"
}
]
}
|
json
|
<reponame>beseffort/Angular2-shotq
{
"globalDependencies": {
"es6-shim": "github:DefinitelyTyped/DefinitelyTyped/es6-shim/es6-shim.d.ts#7de6c3dd94feaeb21f20054b9f30d5dabc5efabd",
"jasmine": "github:DefinitelyTyped/DefinitelyTyped/jasmine/jasmine.d.ts#7de6c3dd94feaeb21f20054b9f30d5dabc5efabd"
},
"globalDevDependencies": {
"jasmine": "registry:dt/jasmine#2.5.0+20170207112528"
},
"ambientDependencies": {
"bootstrap": "github:DefinitelyTyped/DefinitelyTyped/bootstrap/bootstrap.d.ts#4de74cb527395c13ba20b438c3a7a419ad931f1c",
"es6-promise": "github:DefinitelyTyped/DefinitelyTyped/es6-promise/es6-promise.d.ts#830e8ebd9ef137d039d5c7ede24a421f08595f83",
"es6-shim": "github:DefinitelyTyped/DefinitelyTyped/es6-shim/es6-shim.d.ts#4de74cb527395c13ba20b438c3a7a419ad931f1c",
"jasmine": "github:DefinitelyTyped/DefinitelyTyped/jasmine/jasmine.d.ts#dd638012d63e069f2c99d06ef4dcc9616a943ee4",
"karma": "github:DefinitelyTyped/DefinitelyTyped/karma/karma.d.ts#02dd2f323e1bcb8a823269f89e0909ec9e5e38b5",
"karma-jasmine": "github:DefinitelyTyped/DefinitelyTyped/karma-jasmine/karma-jasmine.d.ts#661e01689612eeb784e931e4f5274d4ea5d588b7",
"systemjs": "github:DefinitelyTyped/DefinitelyTyped/systemjs/systemjs.d.ts#83af898254689400de8fb6495c34119ae57ec3fe",
"zone.js": "github:DefinitelyTyped/DefinitelyTyped/zone.js/zone.js.d.ts#9027703c0bd831319dcdf7f3169f7a468537f448"
}
}
|
json
|
# map_tab
🌎 Chrome extension that shows you a cool place when you open a new tab!
https://chrome.google.com/webstore/detail/maptab/jokkbgbdomfhondepefdoapgabmiomjl
|
markdown
|
- 2 hrs ago 5 Best Microwave Ovens For Your Kitchen: Deals To Consider As Amazon Sale 2023 Is Nearing!
- Movies Sivakarthikeyan's Son Gugan Doss Turns 2: Beautiful Family PICS Go Viral; Fans Call Him 'Kutti Maaveeran'
- Travel Have you been to Vishveshwaraya Falls in Mandya yet? If not, this is the best time!
No one has ever claimed that Television viewing can make a person hale and hearty. A spate of recent studies has claimed that more a person watches TV, the more he or she is likely to have a host of health problems. We don't want to accept the reality nevertheless television viewing for long hours can put a person's health at risk and can even cause death at an early age.
Trying to spend more hours at a time viewing television can definitely hurt your health over a period of time. Watching two to six episodes of a show in one go, also known as binge watching poses many health risks as remaining chair bound for long hours of time can unquestionably lead to weight gain and heart disease.
Here are some of the health effects of watching TV and how it is associated with few physical and mental problems.
If a person is glued to the tube for over two hours per day, there are chances of him/her developing type 2 diabetes. It has been suggested that the risk of getting type 2 diabetes increases by around 20%. Cutting back on TV watching can reduce the risk of not only type 2 diabetes but also the risk of premature mortality.
Various studies have revealed that watching television is linked to weight gain and obesity. It is no secret that TV watching is tied to obesity. Sedentary lifestyle can have a significant impact on health because you expend less energy when you are slumped down in a chair than when you're on your feet or just walking around.
Sleep is important because it allows your brain to recover from the rigors of the day. At night, while watching TV in a dimly lit room, the exposure to the glowing TV screen may prompt changes in the brain which eventually brings about mood disorders such as depression.
Experts believe that watching late night Television can leave viewers in a state of physiological arousal. It can keep the viewers in a state of sharp alertness which prevents them to fall asleep with ease.
Watching too much of television would alter the structure of a kid's brain in a destructive way. Researchers have found that children's prolonged television viewing can cause weighty alterations in the brain. According to a Japanese study conducted with 276 children (age groups 13 and 18) the MRI brain scans of kids had increased amounts of grey matter around the front polor cortex. This proves the negative health effects of watching TV as it shows lower verbal intelligence.
Binge watching regularly have substantial impact on men's fertility. Men who have the habit of sprawling over the couch for 20 hours watching television will have less sperm count than those who watched less of it. Men who took time to exercise for 15 hours in 5 weeks had 73 percent higher sperm count than those who watched TV.
- wellnessDangers Of Indoor Tanning: Know Why Is It So Addictive?
|
english
|
---
layout: post
title: "Android Studio 升级、配置"
categories: Android
tags: Android
author: Wq
description: Android Studio 的升级之后对应Gradle 版本变化,升级及其相应问题和处理。
---
1、Android Studio 升级到 3.1 又开始卡了。
2、Gradle 版本指定
通过修改 项目目录下 gradle/wrapper/gradle-wrapper.properites文件中的 distributionUrl 值对应的gradle版本,可以为当前项目指定Gradle 版本。
通过该方法设置的是项目默认gradle 版本,即 Settings -> Build, Execution, Deployment -> Gradle 设置页面 Use default gradle wrapper(recommend)选项时版本。
3、Gradle 4.1 之后会默认将 support,design 等依赖库放入maven库,因此会在项目的 build.gradle中多添加一个google maven的依赖。
```
maven { url 'https://maven.google.com/' }
// 404 将链接替换为 https://dl.google.com/dl/android/maven2/
// 或者直接使用 google()
```
4、指定flavorDimensions
Gradle 4.0 之后的版本在使用productFlavors 时,需要使用flavorDimensions 为其指定维度,之前的版本只需要指定一个渠道。
默认情况下可以在 android->defaultConfig 下设置一个默认值
```
android{
defaultcConfig{
flavorDimensions "versionCode"
}
}
```
5、AS 管理Gradle 目录
AS将gradle 的不同版本放在 ${home}/.gradle/ 目录下
|
markdown
|
<gh_stars>0
package go.gink.mediafinder.sample.Act;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.text.TextUtils;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import com.bumptech.glide.Glide;
import java.util.ArrayList;
import go.gink.mediafinder.activity.ActPicker;
import go.gink.mediafinder.config.GalleryConfig;
import go.gink.mediafinder.sample.R;
import go.gink.mediafinder.utils.FileUtils;
public class FormActivity extends AppCompatActivity {
private static final String TAG = "FormActivity";
private RecyclerView photoSender;
private PhotoSenderAdapter adp;
@Override
public void onCreate(Bundle savedInstanceState) {
Log.e(TAG, "onCreate()");
super.onCreate(savedInstanceState);
setContentView(R.layout.l_photo_sender);
Context ctx = this;
adp = new PhotoSenderAdapter(ctx);
photoSender = findViewById(R.id.photoSender);
photoSender.setLayoutManager(new GridLayoutManager(ctx, 3));
photoSender.setAdapter(adp);
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
switch (requestCode) {
case PhotoSenderAdapter.GALLERY_INTENT:
adp.setSelected(data.getStringArrayListExtra("paths"));
break;
default:
super.onActivityResult(requestCode, resultCode, data);
}
}
@Override
public void onWindowFocusChanged(boolean hasFocus) {
super.onWindowFocusChanged(hasFocus);
if(hasFocus) adp.notifyDataSetChanged();
}
public class PhotoSenderAdapter extends RecyclerView.Adapter<PhotoSenderAdapter.ViewHolder> {
public static final int GALLERY_INTENT = 0x0001;
private String TAG = PhotoSenderAdapter.class.getSimpleName();
private GalleryConfig config;
private int maxSize;
private Context ctx;
private LayoutInflater inf;
public class ViewHolder extends RecyclerView.ViewHolder {
ImageView img;
public ViewHolder(View itemView) {
super(itemView);
img = itemView.findViewById(R.id.img);
// 点击任意元素,进入图片选择界面
img.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
openPhotoPicker();
}
});
// 长按元素(非添加按钮),进入删除状态
img.setOnLongClickListener(new View.OnLongClickListener() {
@Override
public boolean onLongClick(View v) {
int position = getAdapterPosition();
if (isPhotoItem(position)) deleteItem(position);
return true;
}
});
}
}
public PhotoSenderAdapter(Context ctx) {
this.ctx = ctx;
this.inf = LayoutInflater.from(ctx);
this.config = new GalleryConfig()
.setMultiSelect(true, 9)
// .setCrop(1, 1, 500, 500)
.setShowCamera(false)
.setFilePath("/Gallery/Pictures");
if (TextUtils.isEmpty(config.getProvider())) Log.w(TAG, "Provider is null");
this.maxSize = config.getMaxSize();
}
public void setSelected(ArrayList<String> paths) {
this.config.setPaths(paths);
notifyDataSetChanged();
}
private boolean isPhotoItem(int position) {
int size = config.getPaths().size();
return config.getPaths().size() > 0 && position < (size < maxSize ? size : maxSize);
}
@Override
public int getItemCount() {
int size = config.getPaths().size();
return 0==size ? 1 : (size < maxSize ? 1 + size : maxSize);
}
@Override
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
return new ViewHolder(inf.inflate(R.layout.i_photo_sender, parent, false));
}
@Override
public void onBindViewHolder(ViewHolder holder, int position) {
String path = null;
if (isPhotoItem(position))
path = config.getPaths().get(position);
if (null != path)
Glide.with(ctx).load(path).into(holder.img);
else
holder.img.setImageResource(R.drawable.__camera);
}
/** 移除指定元素 */
private void deleteItem(int position) {
Log.e(TAG, "deleteItem()");
config.getPaths().remove(position);
notifyItemRemoved(position);
}
private void openPhotoPicker() {
Log.e(TAG, "openPhotoPicker()");
FileUtils.createFile(config.getFilePath());
Intent intent = new Intent(ctx, ActPicker.class);
intent.putExtra("config", config);
((Activity)ctx).startActivityForResult(intent, GALLERY_INTENT);
}
}
}
|
java
|
import tkinter as tk
class ToolTip(object):
def __init__(self, widget, text):
self.widget = widget
self.text = text
def enter(event):
self.showTooltip()
def leave(event):
self.hideTooltip()
widget.bind('<Enter>', enter)
widget.bind('<Leave>', leave)
def showTooltip(self):
self.tooltipwindow = tw = tk.Toplevel(self.widget)
tw.wm_overrideredirect(1) # window without border and no normal means of closing
tw.wm_geometry("+{}+{}".format(self.widget.winfo_pointerx()+10, self.widget.winfo_pointery()-25))
label = tk.Label(tw, text = self.text, background = "#ffffe0", relief = 'solid', borderwidth = 1).pack()
def hideTooltip(self):
tw = self.tooltipwindow
tw.destroy()
self.tooltipwindow = None
|
python
|
use std::io::{BufRead, BufReader, Error, ErrorKind, Result};
/***********************************************/
const INPUT_FILE:&str = "20211215.txt";
/***********************************************/
fn read_input(filename: &str) -> Result<Vec<String>> {
BufReader::new(std::fs::File::open(filename)?)
.lines()
.map(|line| line?.trim().parse().map_err(|e| Error::new(ErrorKind::InvalidData, e)))
.collect()
}
/***********************************************/
fn parse_input(input: Vec<String>) -> Vec<Vec<u32>> {
input.iter().map(|line| line.chars().map(|c| c.to_digit(10).unwrap_or(u32::MAX)).collect()).collect()
}
/***********************************************/
fn part_1(input: &[Vec<u32>]) {
let mut q = Vec::new();
let mut dist = input.to_owned();
let dist_map = dist.as_mut_slice();
let height = dist_map.len();
let width = if height > 0 { dist_map[0].len() } else { 0 };
for y in 0 .. height {
for x in 0 .. width {
dist_map[y][x] = u32::MAX;
q.push((x, y));
}
}
dist_map[0][0] = 0;
while !q.is_empty() {
let v = q.iter().enumerate().map(|p| (p.1.0, p.1.1, dist_map[p.1.1][p.1.0], p.0)).min_by(|a, b| a.2.cmp(&b.2)).unwrap_or((0, 0, 0, 0));
q.swap_remove(v.3);
for u in q.iter().filter(|a| a.0 == v.0 && ((v.1 > 0 && a.1 == v.1 - 1) || (v.1 < height && a.1 == v.1 + 1)) || a.1 == v.1 && ((v.0 > 0 && a.0 == v.0 - 1) || (v.0 < width && a.0 == v.0 + 1))) {
dist_map[u.1][u.0] = dist_map[u.1][u.0].min(dist_map[v.1][v.0] + input[u.1][u.0]);
}
print!("\r{:5} / {:5}", width * height - q.len(), width * height);
}
print!("\r ");
println!("\rPart 1: {}", dist_map[height - 1][width - 1]);
}
fn part_2(input: &[Vec<u32>]) {
let mut height = input.len();
let mut width = if height > 0 { input[0].len() } else { 0 };
let mut new_map = Vec::new();
for y in 0 .. height * 5 {
let mut row = Vec::new();
for x in 0 .. width * 5 {
row.push(((input[y % height][x % width] - 1 + (x / width) as u32 + (y / height) as u32) % 9) + 1);
}
new_map.push(row);
}
width *= 5;
height *= 5;
let mut q = Vec::new();
let mut dist = new_map.clone();
let dist_map = dist.as_mut_slice();
for y in 0 .. height {
for x in 0 .. width {
dist_map[y][x] = u32::MAX;
q.push((x, y));
}
}
dist_map[0][0] = 0;
while !q.is_empty() {
let v = q.iter().enumerate().map(|p| (p.1.0, p.1.1, dist_map[p.1.1][p.1.0], p.0)).min_by(|a, b| a.2.cmp(&b.2)).unwrap_or((0, 0, 0, 0));
q.swap_remove(v.3);
for u in q.iter().filter(|a| a.0 == v.0 && ((v.1 > 0 && a.1 == v.1 - 1) || (v.1 < height && a.1 == v.1 + 1)) || a.1 == v.1 && ((v.0 > 0 && a.0 == v.0 - 1) || (v.0 < width && a.0 == v.0 + 1))) {
dist_map[u.1][u.0] = dist_map[u.1][u.0].min(dist_map[v.1][v.0] + new_map[u.1][u.0]);
}
print!("\r{:6} / {:6}", width * height - q.len(), width * height);
}
print!("\r ");
println!("\rPart 2: {}", dist_map[height - 1][width - 1]);
}
/***********************************************/
fn main() {
let input = parse_input(read_input(INPUT_FILE).expect(&format!("Could not read {}", INPUT_FILE)));
part_1(&input);
part_2(&input);
}
|
rust
|
To get access to over 10000+ Franchise Business Opportunities.
Network with the growing Business Community to get expert interventions to let you learn to Grow & Expand your Business with Franchising.
Multi-Cuisine restaurant is designed with the highest standards.
You will relish the cuisines from local delicate to western an Asian specialties crafted by our culinary team.
Thanks for showing your interest in Park Elanza.
Your contact detail has been shared with the company. requested you to create your investor profile and upgrade to directly contact the brand.
Thanks for showing your interest in Park Elanza.
But you have already applied for Park Elanza.
|
english
|
<filename>maps/gsiv/rooms/6798.json
{
"id": 6798,
"title": [
"[Wehntoph, Cave]"
],
"description": [
"A natural cave has formed in the hillside, providing shelter from the elements and a convenient resting place. Drawings mar the walls, clear evidence that others have been here before you."
],
"paths": [
"Obvious paths: northeast"
],
"location": "the northern slopes of Wehntoph",
"wayto": {
"6791": "northeast"
},
"timeto": {
"6791": 0.2
},
"image": "wl-gates-1264234799.png",
"image_coords": [
550,
1133,
560,
1143
],
"tags": [
"some sovyn clove",
"some acantha leaf",
"some calamia fruit",
"small daisy",
"ginger root",
"wild carrot",
"withered black mushroom",
"blue whortleberry",
"small flower",
"some bur-clover root",
"small rose",
"some wingstem root",
"murdroot",
"white baneberry",
"heath aster",
"some murkweed"
]
}
|
json
|
Kuldeep dismissed Matthew Wade, Ashton Agar and Cummins off successive deliveries.
Kolkata: Chinaman Kuldeep Yadav, who became only the third Indian in white-ball cricket to grab a hattrick here against Australia in the second ODI, has a long way to go and is an asset for Team India, former skipper Sourav Ganguly said on Thursday. “It was a special spell. He bowled brilliantly. He still has a long way to go and is an asset for the team,” Ganguly told reporters.
Kuldeep returned figures of 3/54, taking three consecutive wickets of Mathew Wade, Ashton Agar and Pat Cummins in the 33rd over to become the second bowler in limited overs cricket to script a hat-trick at this venue and only the third Indian to record the rare feat in 50 overs cricket. The other Indians to get hat-tricks are Kapil Dev and Chetan Sharma, with Dev grabbing his treble at the Eden against Sri Lanka in 1991 while Sharma bagged it in 1987.
|
english
|
Swiggy has hiked the platform fee on food delivery orders to ₹3 per order, which marks a 50 percent jump as compared to the existing platform fee of ₹2, a report in The Economic Times stated on October 16.
The revised platform fee has been implemented from October 4 onwards, the newspaper said, adding that initially the increased rate was applicable for food orders in Hyderabad and Bengaluru, but was later expanded to all areas of operation across the country.
The Bengaluru-based food delivery aggregator has been applying the platform fee on food orders from April this year. The platform fee charged is ₹5, but Swiggy offers a ₹2 discount, which brings the effective rate to ₹3 on each order.
The company's main rival, Zomato, has also been levying a platform fee of ₹2 per order. In some cities, however, it is charging ₹3, the report noted.
A Swiggy spokesperson who spoke to the publication suggested that there was no unusual step enacted in charging a platform fee, as the same is applied by most food aggregators.
Notably, the platform fee is considered as a measure to improve unit economics – a reference to the revenue generated by an entity from each unit of sale or order. Companies such as Uber, BB Now, the quick commerce arm of BigBasket and Zepto have been imposing this charge on each order, a Business Standard report said.
Swiggy, a homegrown food aggregator, had reported an 80 percent on-year jump in losses to around $540 million in 2022, as per the information shared by its owner Prosus in June. Swiggy's chief executive and founder, Sriharsha Majety, in a blog post in May, claimed that the food delivery business turned profitable as of March this year.
Unlock a world of Benefits! From insightful newsletters to real-time stock tracking, breaking news and a personalized newsfeed – it's all here, just a click away! Login Now!
|
english
|
/*-
* Copyright (c) 2017 <NAME>
* All rights reserved.
*
* This software was developed by SRI International and the University of
* Cambridge Computer Laboratory under DARPA/AFRL contract FA8750-10-C-0237
* ("CTSRD"), as part of the DARPA CRASH research programme.
*
* @BERI_LICENSE_HEADER_START@
*
* Licensed to BERI Open Systems C.I.C. (BERI) under one or more contributor
* license agreements. See the NOTICE file distributed with this work for
* additional information regarding copyright ownership. BERI licenses this
* file to you under the BERI Hardware-Software License, Version 1.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.beri-open-systems.org/legal/license-1-0.txt
*
* Unless required by applicable law or agreed to in writing, Work 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.
*
* @BERI_LICENSE_HEADER_END@
*/
#include "../c/assert.h"
__attribute__((noinline)) void cxx_function(const char* msg) {
DEBUG_MSG(msg);
}
extern "C" int test(void)
{
assert(1);
cxx_function("hello, world");
return 0;
}
|
cpp
|
<gh_stars>10-100
.label-switch {
cursor: pointer;
}
.label-switch input[type="checkbox"] {
position: absolute;
clip: rect(0 0 0 0);
height: 1px;
margin: -1px;
overflow: hidden;
width: 1px;
}
.label-switch input[type="checkbox"]:focus + .checkbox {
border-color: #0071bc;
box-shadow: 0 0 5px #0071bc;
outline: none;
}
.label-switch input[type="checkbox"] + .checkbox {
position: relative;
background: #AAA;
border-radius: 25px;
color: white;
cursor: pointer;
font-size: 0.7em;
height: 25px;
transition: all 0.05s ease;
-moz-transition: all 0.05s ease;
-webkit-transition: all 0.05s ease;
width: 62px;
}
.label-switch input[type="checkbox"] + .checkbox span {
display: none;
}
.label-switch input[type="checkbox"] + .checkbox:before {
position: relative;
border-radius: 25px;
bottom: 0;
content: "NO";
height: 21px;
left: 31px;
right: 0;
top: 6px;
-moz-transform: scale(1);
-ms-transform: scale(1);
-o-transform: scale(1);
-webkit-transform: scale(1);
transform: scale(1);
-moz-transition: all 0.05s ease;
transition: all 0.0.5s ease;
-webkit-transition: all 0.05s ease;
width: 58px;
z-index: 1;
}
.label-switch input[type="checkbox"] + .checkbox:after {
position: absolute;
background: white;
border-radius: 21px;
bottom: 0;
content: "";
height: 21px;
left: 1px;
right: 0;
top: 2px;
-moz-transition: all 0.2s ease;
-webkit-transition: all 0.2s ease;
transition: all 0.2s ease;
width: 21px;
z-index: 2;
}
.label-switch input[type="checkbox"]:checked + .checkbox {
background: #477DCA;
}
.label-switch input[type="checkbox"]:checked + .checkbox span {
position: relative;
bottom: 0;
display: inline;
left: 13px;
right: 0;
top: 6px;
}
.label-switch input[type="checkbox"]:checked + .checkbox:before {
position: absolute;
bottom: 0;
left: 30px;
right: 0;
top: 2px;
-moz-transform: scale(0);
-ms-transform: scale(0);
-o-transform: scale(0);
-webkit-transform: scale(0);
transform: scale(0);
}
.label-switch input[type="checkbox"]:checked + .checkbox:after {
left: 40px;
}
|
css
|
Google Search is one of the most powerful search engines in the world. It processes more than three billion searches everyday. The search autofill or suggestions feature is a very helpful tool to help you with the most used search terms and keywords on thew web.
Naturally, when you try to search a football personality it suggests some of the most used keywords associated with that personality. Here are the top 20 of them:
Mario Balotelli is a jolly personality on and off the field. Remember when he showed the ‘Why Always Me’ t-shirt after scoring against Manchester United in a derby? Or when he tried to set off his house with firecrackers?
However, the most searched aspect of Balotelli is his abysmal penalty record, which you can check here: http://hasbalotellimissedapenalty. com/.
Joey Barton is one of the most infamous footballers in the world due to his fights and his vocal presence on Twitter. However, if you put ‘is’, the scenario changes dramatically.
Nicklas Bendtner is one of the most trolled footballers on the internet. And of course, no one can ever forget his ‘best striker in the world’ quote. Wonder why people would search him in Armani underwear though. Maybe that has something to do with Paddy power?
FIFA president Sepp Blatter had to face a lot of criticism after it was rumoured that the 2022 World Cup to Qatar deal was a corrupt deal, and that Blatter was involved.
He also got in trouble after his comments on Cristiano Ronaldo didn’t go down that well with the CR7 fans worldwide.
One blatant dive was enough for the talented Barcelona midfielder to become the butt of all the jokes on the internet. And people were really interested in his religion as well.
Even aside from footballers, the Football Association or the FA is not far behind when it comes to searchability. Failing to regulate refereeing decisions and harsh punishments on the footballers resulted in the above Google searches.
One of the most celebrated and loyal servants for Manchester United was not spared either after it was reported that he had an affair with his brother’s wife.
Emile Heskey is one of the most trolled personalities on the internet as well. He is often compared to Lionel Messi, presumably in a sarcastic sense.
Adnan Januzaj was the talk of the Manchester fans after some superb performances in the pre-season games and a few Premier League matches as well. Januzaj, aged 18, is eligible to play for six countries at the international level, which is one of the reasons for the high search results for his country.
Yes, Adnan Januzaj is a Muslim and for some reason a lot of people were curious about the fact.
The search results for arguably the best player today were not shocking at all. It seems Messi is arrogant, bully and a good boy all at the same time. Just to let you know, Sepp Blatter thinks Messi is a good boy.
Piers Morgan is known for his outspoken views on football and his Twitter exchanges with the likes of Rio Ferdinand, Gary Neville and Wayne Rooney.
Morgan is a British journalist and TV host and by the looks of it, is not very likeable on the internet.
P. S. Piers Morgan is an Arsenal fan.
David Moyes was appointed the manager of Manchester United in May after the retirement of Sir Alex Ferguson. With the Red Devils struggling to find any sort of form this season, the search results tells you the story about how fans feel about the manager.
Samir Nasri had to face a lot of slack from Arsenal fans after he joined rivals Manchester City for a ‘higher’ paycheck. Most used words in association with him are ‘prick’ and ‘traitor’.
The FIFA Ballon d’Or 2013 winner is one of the best without a doubt. And of course, he is compared with Lionel Messi constantly. His religion and sexual orientation get a lot of search hits as well.
One of the best performers on the football pitch, often called ‘The White Pele’ and ‘Shrek’. The top search, however, is unfortunately related to his looks.
Robin van Persie or RVP joined Manchester United for £24 million, because of which the former Arsenal player was branded as ‘Judas’ and a traitor. He is one player Arsenal fans will always dislike, maybe even more than Adebayor and Nasri.
The second search term, “an Arsenal man”, is somewhat amusing though.
One of the best centre-backs in the Premier League has always been in the news for all the wrong reasons. After having an affair with his team-mate Wayne Bridge’s wife, his reputation took a huge hit.
The Chelsea captain was in further trouble when he was banned for 4 matches and fined for racially abusing QPR’s Anton Ferdinand in 2012.
English referee Howard Webb has been frequently criticized for ‘favouring’ the Red Devils. He is also one of the most trolled personalities on the internet. It is debatable though if he really is a Manchester United fan.
Ashley Young has been synonymous with diving lately. Most football fans think that he is a disgrace to football and is a cheat.
Surprisingly, he was searched with the keywords “on par with Lionel Messi” as well.
Manchester United’s new recruit Wilfried Zaha was rumored to have an affair with the manager’s daughter. No surprises then that he was searched alongside David Moyes in three out of four occasions as shown.
Did we miss someone? Leave your comments.
|
english
|
Mustard color in clothes - unexpected and attractive!
Do you want to be bright and attract the attention of everyone around you? Do you want to be stylish and similar to a girl who came off the cover of a glossy magazine? To do this, you do not need to make yourself crazy hairstyles or bright makeup, be a first-class fashion expert and buy up all the new items in expensive boutiques. Girls and women, know that this season in fashion is a unique mustard color. It is enough to wear a dress, a scarf or shoes of mustard color, and you will certainly be in the center of everyone's attention.
What does the mustard color look like?
Mustard color in clothes is unique. He, it seems, is not very bright, calm, but at the same time, he attracts attention, forcing the surrounding people to turn around and watch with all the women of fashion who wear such things. It is difficult to choose a shade for its designation. Pale yellow? No. Light olive? Again, no. The color of fallen autumn leaves? The same is not it, too pale and boring. This is a mustard color, so delicious, with pepper and bitter taste, as well as mustard itself.
Mustard-colored outerwear is an excellent choice!
And now let's talk about what kind of things the mustard color fits most, with what colors it blends. The color of mustard is best seen on the outer clothing. Get a coat of this shade and become the most irresistible woman this fall. The dress is mustard-colored - and all the men you meet follow with your eyes, and women too, because stylish things cause admiration in all people.
But it is not necessary to wear all things of mustard color at once. It is undesirable for you to have a dress, boots and a cardigan or a mustard-colored coat, and in your hand there was a handbag of the same shade. This is considered bad form. In addition, this color is perfectly combined with other bright or neutral colors - with chocolate, brown, terracotta, beige, yellow, khaki, olive, turquoise, bright pink and coral.
The dress of mustard color is fashionable and stylish!
To a monotonous dress of mustard color, you can wear a belt of dark brown or olive color. Get an excellent universal outfit for all occasions. In it you can go to work and to a party. A short coat of mustard color can also be supplemented with a wide belt of bright pink or turquoise color. Get a very impressive and unusual outfit. Or you can, on the contrary, bright cherry or brown coat or dress complement with a mustard-colored belt. Get an equally bright outfit.
Mustard color cardigan - why not?
A knitted cardigan color of mustard and boots without a heel of the same color will make an excellent ensemble with a short khaki dress or fashionable tight-fitting sea-colored jeans . Also, to the shorts of mustard-colored, you can put on light boots or mustard, or beige.
To attract the attention of others, it is not necessary to buy new-fangled coats or dresses of this unique shade. According to designers of well-known world brands, it is enough to wear, for example, a scarf and boots of mustard color or take the same handbag. Especially spectacular these things will look with a black classic coat, because black color is universal.
Mustard color is truly unique. Use it in clothes can only the most daring and ready-for-experiment women and men. But if you are not afraid of close attention to your person, and sometimes of gossip behind your back, then safely wear things of mustard color!
|
english
|
<reponame>chamberone/Leaflet.PixiOverlay<gh_stars>100-1000
{"nom":"<NAME>","circ":"2ème circonscription","dpt":"Eure","inscrits":472,"abs":259,"votants":213,"blancs":12,"nuls":5,"exp":196,"res":[{"nuance":"REM","nom":"<NAME>","voix":118},{"nuance":"FN","nom":"M. <NAME>","voix":78}]}
|
json
|
<reponame>shubhamjain/earphone-event
import threading
class mini_event:
BUTTON_DOWN = 1
BUTTON_UP = 2
BUTTON_HOLD = 3
subscribers = { BUTTON_DOWN: [], BUTTON_UP : [], BUTTON_HOLD: [] }
trigger_hold_stop = False # This value should be turned to True if the hold event callback needs to be stopped.
def add_subscriber( self, callback, event ):
self.subscribers[event].append( callback )
def fire_event( self, event ):
if( event == self.BUTTON_UP ):
self.trigger_hold_stop = True
if( event == self.BUTTON_DOWN ):
self.trigger_hold_stop = False
for callback in self.subscribers[event]:
if( event == self.BUTTON_HOLD ):
thread = threading.Thread(target=callback, args=[self.BUTTON_HOLD, self])
thread.start()
else:
callback(event)
|
python
|
So much for Intel’s bid to get hip with our app-filled times: the company is shutting down its consumer-facing AppUp, its app store for Windows-based PC apps. “The world’s largest app store that nobody’s ever heard of,” in the words of AppUp boss Peter Biddle, a description that in hindsight may have been tempting fate.
The service will be closed for good on March 11, with the apps from the store that communicated with the AppUp client no longer working by May 15, 2015 — or earlier if you uninstall the store client. (The large, full list of affected apps is here.) Other apps that did not communicate with the client should still work, Intel says, although they will have to be launched separately.
Intel doesn’t provide much of an explanation for the closure on the now-redirected landing page for AppUp. “At Intel, we’re always thinking about the future, which often means making changes today. That’s why, on March 11th, 2014, Intel AppUp® center will come to a close as we focus on developing new and exciting PC innovations that will continue to shape your world,” Intel writes.
A spokesperson fills us in on a bit more detail: this is part of a shift towards offering more services for enterprises and less for consumers:
There may be more app activity in the future, but in more of a B2B2C vein. “We are moving from directly providing apps to consumers to providing services to enterprise who will have an interface to consumers,” she adds. She did not disclose the number of apps or users in the AppUp store. “We have been communicating with the companies directly. They have very broad markets and are unlikely to be impacted by the change,” she says.
Intel also sent out a note to AppUp users describing the shut down and detailing refunds:
Dear valued Intel AppUp® user,
At Intel, we’re always thinking about tomorrow, which sometimes means making changes today. That’s why we’ll be closing Intel AppUp on March 11th, 2014 to focus on other groundbreaking platform innovations. As part of this closure your AppUp Center Customer Account Registration Agreement also will terminate effective March 11th, 2014.
Some apps you have downloaded may stop working on May 15th 2015, or earlier if you uninstall the store client, and you can confirm if any of your apps are affected here. You can claim a full refund of $4.99 through our AppUp refund program, for the amount you paid for apps. Your transaction history appears at the bottom of this email.
Closing Intel AppUp was a tough decision and we understand how important the service has become to our users so we’ve provided a detailed FAQ section with links to guided support to answer your questions as the program comes to a close.
Of course, Intel AppUp would not have been possible without loyal users like you. Thank you for participating in the experience. It’s been a fun ride.
Back in 2010, taking a leaf from the app explosion on mobile devices, Intel saw an opportunity to leverage its brand recognition with Windows device users, and build out its ecosystem of developers, by building out a store specifically to cater to new devices like Ultrabooks and netbooks, although AppUP worked on all PCs. In launching AppUp, Intel preceded Apple announcing a Mac App Store by some 10 months.
But whether it’s because Windows users were simply not as keen to use Intel’s AppUp, or whether it’s because Microsoft has stolen a march in this space with its own store, it’s not clear that AppUp ever really took off in terms of traffic and downloads.
Intel had been aiming for as global a reach as possible, with the store working in over 60 countries, with paid transactions in 45 countries and five languages. A year after launch, it announced a $100 million AppUp fund to encourage developers to create apps for the store and businesses that might encourage the wider ecosystem.
But geographical reach and paying money to encourage developers doesn’t equal loyal users. “Intel has put itself out of its own misery by shutting down the ill-fated “AppUp” app store,” is how one tipster described it to us.
Updated with comment from Intel.
(H/T Apu Kumar)
|
english
|
mod common;
extern crate notion_into_sqlite;
use rusqlite::params;
use std::collections::HashMap;
use common::{fixtures, helpers};
use notion_into_sqlite::notion_database::parse_database_schema;
use notion_into_sqlite::notion_pages::{NotionPage, NotionPropertyValue};
use notion_into_sqlite::sqlite::{
Sqlite, PAGE_ID_COLUMN, PAGE_METADATA_TABLE, PAGE_PROPERTIES_TABLE,
};
use std::error::Error;
#[test]
fn it_creates_tables() -> Result<(), Box<dyn Error>> {
let database_path = "tmp/test1.db";
helpers::before_db(database_path);
let json = serde_json::from_str::<serde_json::Value>(fixtures::NOTION_DATABASE_JSON)?;
let schema = parse_database_schema(&json)?;
let sqlite = Sqlite::new(database_path, &schema)?;
sqlite.create_tables()?;
let table_def_sql: String = sqlite.conn.query_row(
"SELECT sql FROM sqlite_master where name=?1",
params![PAGE_PROPERTIES_TABLE],
|row| Ok(row.get(0)?),
)?;
assert!(table_def_sql.contains(&format!(
"{id_column} TEXT PRIMARY KEY",
id_column = PAGE_ID_COLUMN
)));
assert!(table_def_sql.contains(r#""Name" TEXT"#));
assert!(table_def_sql.contains(r#""Animal" TEXT"#));
assert!(table_def_sql.contains(r#""Age" REAL"#));
let table_def_sql: String = sqlite.conn.query_row(
"SELECT sql FROM sqlite_master where name=?1",
params![PAGE_METADATA_TABLE],
|row| Ok(row.get(0)?),
)?;
assert!(table_def_sql.contains(r#"url TEXT"#));
Ok(())
}
#[test]
fn it_creates_table_when_column_name_includes_double_quote() -> Result<(), Box<dyn Error>> {
let database_path = "tmp/test2.db";
helpers::before_db(database_path);
let json = serde_json::from_str::<serde_json::Value>(fixtures::NOTION_DATABASE_IRREGULAR_JSON)?;
let schema = parse_database_schema(&json)?;
let sqlite = Sqlite::new(database_path, &schema)?;
sqlite.create_tables()?;
let (table_name, sql): (String, String) =
sqlite
.conn
.query_row("SELECT name, sql FROM sqlite_master", [], |row| {
Ok((row.get(0)?, row.get(1)?))
})?;
assert_eq!(table_name, PAGE_PROPERTIES_TABLE);
assert!(sql.contains(r#""あ&"";#' f _" REAL"#));
Ok(())
}
#[test]
fn it_inserts_notion_entry() -> Result<(), Box<dyn Error>> {
let database_path = "tmp/test3.db";
helpers::before_db(database_path);
let json = serde_json::from_str::<serde_json::Value>(fixtures::NOTION_DATABASE_JSON)?;
let schema = parse_database_schema(&json)?;
let sqlite = Sqlite::new(database_path, &schema)?;
sqlite.create_tables()?;
let page = NotionPage {
id: "xxxx".to_string(),
properties: HashMap::from([
(
"Name".to_string(),
NotionPropertyValue::Text("Meu".to_string()),
),
("Age".to_string(), NotionPropertyValue::Number(5.0)),
]),
url: "https://www.notion.so/xxxx".to_string(),
created_time: "2022-03-12T00:15:00.000Z".to_string(),
created_by: serde_json::from_str(
r#"{
"object": "user",
"id": "9d069f8b-6223-4853-b7eb-8fe3dfe7d389"
}"#,
)
.unwrap(),
last_edited_time: "2022-03-12T00:16:00.000Z".to_string(),
last_edited_by: serde_json::from_str(
r#"{
"object": "user",
"id": "9d069f8b-6223-4853-b7eb-8fe3dfe7d389"
}"#,
)
.unwrap(),
archived: false,
};
sqlite.insert(&page)?;
let (page_id, name, age): (String, String, f64) = sqlite.conn.query_row(
format!(
r#"SELECT page_id,"Name","Age" from {table_name}"#,
table_name = PAGE_PROPERTIES_TABLE
)
.as_str(),
[],
|row| Ok((row.get(0)?, row.get(1)?, row.get(2)?)),
)?;
assert_eq!(page_id, "xxxx");
assert_eq!(name, "Meu");
assert_eq!(age, 5.0);
let (page_id, url, created_time, created_by): (String, String, String, String) =
sqlite.conn.query_row(
format!(
r#"SELECT id, url, created_time, created_by from {table_name}"#,
table_name = PAGE_METADATA_TABLE
)
.as_str(),
[],
|row| Ok((row.get(0)?, row.get(1)?, row.get(2)?, row.get(3)?)),
)?;
assert_eq!(page_id, "xxxx");
assert_eq!(url, "https://www.notion.so/xxxx");
assert_eq!(created_time, "2022-03-12T00:15:00.000Z");
assert!(serde_json::from_str::<serde_json::Value>(&created_by).is_ok());
Ok(())
}
|
rust
|
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var FilesHttpServiceV1_1 = require("./FilesHttpServiceV1");
exports.FilesHttpServiceV1 = FilesHttpServiceV1_1.FilesHttpServiceV1;
//# sourceMappingURL=index.js.map
|
javascript
|
<gh_stars>100-1000
{
"id": 85973,
"info": {
"name": "gMail v.2.0",
"description": "Adjustment a for large monitors (increasing size of a readable text blocks), removing of unused items and ad elements, thus expanding the storage space for the readable elements. \r\n\r\nПодстраивание сайта под большие мониторы (увеличение читаемых текстовых блоков), удаление неиспользуемых элементов и рекламных блоков, тем самым расширяя полезное пространство для читаемых элементов.",
"additionalInfo": null,
"format": "uso",
"category": "google",
"createdAt": "2013-04-13T02:05:00.000Z",
"updatedAt": "2013-04-13T02:05:00.000Z",
"license": "NO-REDISTRIBUTION",
"author": {
"id": 145412,
"name": "Cartmаn"
}
},
"stats": {
"installs": {
"total": 123,
"weekly": 0
}
},
"discussions": {
"stats": {
"discussionsCount": 1,
"commentsCount": 1
},
"data": [
{
"id": 40482,
"title": "no changes",
"createdAt": "2014-02-10T15:31:19.000Z",
"author": {
"id": 7728,
"name": "UGLYBOYS"
}
}
]
},
"style": {
"css": "@-moz-document url-prefix(\"https://mail.google.com/\"), url-prefix(\"http://mail.google.com/\") {\r\ntd.Bu.y3\r\n{\r\n display:none;\r\n}\r\n.ao8 \r\n{\r\n padding-right: 0px !important;\r\n}\r\n.if\r\n{\r\n margin-right: 0px !important;\r\n}\r\n}"
}
}
|
json
|
import { STU3_BackboneElement } from './STU3_BackboneElement'
import { STU3_ConsentDataMeaningEnum } from './STU3_ConsentDataMeaningEnum'
import { STU3_DomainResource } from './STU3_DomainResource'
import { STU3_Reference } from './STU3_Reference'
export class STU3_Consent_Data1 extends STU3_BackboneElement
{
static def : string = 'Consent_Data1';
meaning : STU3_ConsentDataMeaningEnum ;
reference : STU3_Reference ;
}
|
typescript
|
<reponame>pbv2/rpg
package repositoriosarray;
import basicas.NPC;
import interfaces.RepositorioNPCs;
public class RepositorioNPCsArray implements RepositorioNPCs{
private NPC[] npcs;
private int posit;
private int tamanho;
public RepositorioNPCsArray(int tamanho){
this.tamanho = tamanho;
this.npcs = new NPC[tamanho];
this.posit = 0;
}
public void inserir(NPC npc) {
this.npcs[posit] = npc;
posit++;
}
public NPC procurar(String nome) {
for(int i = 0; i < this.posit; i++){
if(nome.equals(npcs[i].getNome())){
return npcs[i];
}
}
return null;
}
public void atualizar(NPC npc) {
for(int i = 0; i < this.posit; i++){
if(npc.getNome().equals(npcs[i].getNome())){
npcs[i] = npc;
}
}
}
public void remover(String nome) {
for(int i = 0; i < this.posit; i++){
if(nome.equals(npcs[i].getNome())){
npcs[i] = null;
for(int j = i; j < this.tamanho; j++){
if(j != this.tamanho-1){
npcs[j] = npcs[j + 1];
}
}
this.posit = this.posit - 1;
}
}
}
public boolean existe(int id,String nome) {
if(this.posit!=0){
for(int i = 0; i < posit; i++){
if(this.npcs[i].getNome().equals(nome)||this.npcs[i].getId()==id){
return true;
}else if(i == this.tamanho-1){
return false;
}
}
}else{
return false;
}
return false;
}
public int tamanho() {
return this.posit;
}
}
|
java
|
New Delhi: Amid political turmoil in Uttarakhand and talk about instability in Congress-ruled Himachal Pradesh, the BJP on Tuesday stepped up attack on the Congress, saying even “elected leaders” in that party seem to have lost faith in Congress vice president Rahul Gandhi’s leadership.
“You have lost ground, people had deserted you long back. Now the situation is such that your own elected people are deserting the party because they have lost faith in your leadership,” Bharatiya Janata Party (BJP) national secretary Shrikant Sharma, referring to Rahul Gandhi, told reporters here.
Joining issue with Rahul Gandhi for his “continued attack” on the Narendra Modi regime, the BJP leader said the Congress should rather focus on managing their own house instead of directing the tirade against the government.
“You manage your own house. Your failures will not be forgotten by simply attacking the Modi government,” he said.
The remarks comes amid reports that political instability could hit Himachal Pradesh. The Congress party has lost power owing largely to defection from its camp in Arunachal Pradesh and in Uttarakhand, where President’s Rule was imposed on Sunday.
In the last 15 years in Assam, he alleged, the Congress party’s name in the poll-bound state has become synonymous with “corruption” and “misgovernance”.
“You have nothing to speak on Assam,” he said, and lashed out at the Congress for pursuing “vote bank politics” in the northeastern state.
“Congress has rather shown love for infiltrators and not for natives,” Sharma said, alleging that the Congress party has played vote bank politics by favouring infiltrators and “betrayed” the cause of the local inhabitants.
The BJP leader alleged that in the last 15 years as many as 32,000 small industrial units have been closed in Assam.
He also dubbed beleaguered liquor baron Vijay Mallya as a “baby of Congress” and asked how was the owner of Kingfisher Airlines given a bailout package in 2012.
International online casino Casino Days has published a report sharing their internal data on what types and brands of devices are used to play on the platform by users from the South Asian region.
Such aggregate data analyses allow the operator to optimise their website for the brands and models of devices people are actually using.
The insights gained through the research also help Casino Days tailor their services based on the better understanding of their clients and their needs.
The primary data samples analysed by Casino Days reveal that mobile connections dominate the market in South Asia and are responsible for a whopping 96.6% of gaming sessions, while computers and tablets have negligible shares of 2.9% and 0.5% respectively.
The authors of the study point out that historically, playing online casino was exclusively done on computers, and attribute thе major shift to mobile that has unfolded over time to the wide spread of cheaper smartphones and mobile data plans in South Asia.
“Some of the reasons behind this massive difference in device type are affordability, technical advantages, as well as cheaper and more obtainable internet plans for mobiles than those for computers,” the researchers comment.
Chinese brands Xiaomi and Vivo were used by 21.9% and 20.79% of Casino Days players from South Asia respectively, and together with the positioned in third place with a 18.1% share South Korean brand Samsung dominate the market among real money gamers in the region.
Cupertino, California-based Apple is way down in seventh with a user share of just 2.29%, overshadowed by Chinese brands Realme (11.43%), OPPO (11.23%), and OnePlus (4.07%).
Huawei is at the very bottom of the chart with a tiny share just below the single percent mark, trailing behind mobile devices by Motorola, Google, and Infinix.
The data on actual phone usage provided by Casino Days, even though limited to the gaming parts of the population of South Asia, paints a different picture from global statistics on smartphone shipments by vendors.
Apple and Samsung have been sharing the worldwide lead for over a decade, while current regional leader Xiaomi secured their third position globally just a couple of years ago.
The shifted market share patterns of the world’s top smartphone brands in South Asia observed by the Casino Days research paper reveal a striking dominance of Android devices at the expense of iOS-powered phones.
On the global level, Android enjoys a comfortable lead with a sizable 68.79% share which grows to nearly 79% when we look at the whole continent of Asia. The data on South Asian real money gaming communities suggests that Android’s dominance grows even higher and is north of the 90% mark.
Among the major factors behind these figures, the authors of the study point to the relative affordability of and greater availability of Android devices in the region, especially when manufactured locally in countries like India and Vietnam.
“And, with influencers and tech reviews putting emphasis on Android devices, the choice of mobile phone brand and OS becomes easy; Android has a much wider range of products and caters to the Asian online casino market in ways that Apple can’t due to technical limitations,” the researchers add.
The far better integration achieved by Google Pay compared to its counterpart Apple Pay has also played a crucial role in shaping the existing smartphone market trends.
|
english
|
<filename>src/application/reducers/auth.js
import { LOAD_AUTH_VALID, SIGNOUT_SUCCESS } from "../actions/auth";
const initialState = {
authState: [],
isAuth: false,
error: null,
};
const reducer = (state = initialState, action) => {
switch (action.type) {
case LOAD_AUTH_VALID:
return { authState: action.payload, isAuth:true, error: null };
case SIGNOUT_SUCCESS:
return { error: null };
default:
return state;
}
};
export default reducer;
|
javascript
|
<reponame>RuslanYestemessov/booking-app-nestjs
import { Module } from '@nestjs/common';
import { TelegramUpdate } from './telegram.update';
import { MongooseModule } from '@nestjs/mongoose';
import { User, userSchema } from './schemas/user-schema';
import { Cottage, cottageSchema } from './schemas/cottage.schema';
import { UserService } from './services/user.service';
import { CottageService } from './services/cottage.service';
import { HttpModule } from '@nestjs/axios';
import { FilesService } from './services/files.service';
import { AuthorizationScene } from './scenes/authorization.scene';
import { MainScene } from './scenes/main.scene';
import { SelectCottageScene } from './scenes/select-cottage.scene';
import { AddNewCottagePhotosScene } from './scenes/add-new-cottage-photos.scene';
import { AdministrationStartScene } from './scenes/administration-start.scene';
import { EditAdministratorsScene } from './scenes/edit-administrators.scene';
import { EditCottagesScene } from './scenes/edit-cottages.scene';
import { AddNewCottageScene } from './scenes/add-new-cottage.scene';
import { AddNewAdministratorScene } from './scenes/add-new-administrator.scene';
import { ViewBookedScene } from './scenes/view-booked.scene';
import { AddNewCottageDescriptionScene } from './scenes/add-new-cottage-description.scene';
import { RemoveAdministratorScene } from './scenes/remove-administrator.scene';
import { SelectCottageByGuestsNumberScene } from './scenes/select-cottage-by-guests-number.scene';
import { AddNewCottageMaxGuestsScene } from './scenes/add-new-cottage-max-guests.scene';
const scenes = [
AuthorizationScene,
MainScene,
SelectCottageScene,
AddNewCottagePhotosScene,
AdministrationStartScene,
EditAdministratorsScene,
EditCottagesScene,
AddNewCottageScene,
AddNewAdministratorScene,
ViewBookedScene,
AddNewCottageDescriptionScene,
RemoveAdministratorScene,
SelectCottageByGuestsNumberScene,
AddNewCottageMaxGuestsScene
];
const services = [
TelegramUpdate,
UserService,
CottageService,
FilesService
];
@Module({
imports: [
MongooseModule.forFeature([
{ name: User.name, schema: userSchema },
{ name: Cottage.name, schema: cottageSchema }
]),
HttpModule
],
providers: [
...scenes,
...services
]
})
export class TelegramModule {
}
|
typescript
|
Karnataka Congress chief DK Shivakumar has ridiculed the idea mooted by the state’s BJP government to build a Ram Temple in Karnataka. In an exclusive interview to News18, Shivakumar said there is no trace of any connection between Ram and Ramdevarabetta, the proposed site for the “majestic” Ram Temple.
Presenting the latest budget, the last before Karnataka goes to polls in a few months, Chief Minister Basavaraj Bommai had announced the allocation of Rs 425 crore towards building a “majestic” Rama Mandira (temple in Kannada) along the lines of the Ram Mandir being built in Ayodhya, Uttar Pradesh.
“Where are they going to build the Ram Mandira? They (BJP) are trying to woo people emotionally. Go and ask the people of Ramanagara, where is the Ram Mandir there… whether Rama was born there, whether Sita or Anjaneya were born there. There is no history there, but there is a small Ram Temple. Let them build anything, it will not affect us politically,” Shivakumar told News18 as he officially started his Prajadhwani Yatra.
Bommai’s announcement came after several senior BJP leaders wrote to him seeking the constitution of a temple development committee that would plan and execute the building of the Ram Temple at Ramadevarabetta in Ramanagara district, which is known to be a stronghold of the Janata Dal (Secular) and the Congress.
With an allocation of Rs 425 crore, the BJP plans to make Ramadevarabetta the ‘Ayodhya of the South’ that will span over 19 acres.
The Karnataka Congress chief added that there are a ‘few local ministers and leaders who want to create communal disturbance” in the region and are, hence, making this demand. Shivakumar also went on to challenge Bommai to build a BJP office in Ramnagara first before thinking of building a Ram Temple.
“Let Mr. Bommai ask his leaders to build a BJP office there. For the Congress, the Congress office is a temple. Let them build a BJP office there first and then Ram Mandir,” Shivakumar said.
As he began the first leg of his bus-bound Prajadhwani Yatra towards Mysuru, the senior Congress leader spoke of how the winds of change are blowing in favour of the Congress. Having set a target of 135-plus seats to be won in the upcoming elections, Shivakumar believes that after this special yatra — undertaken by him from the northern side of Karnataka and by Leader of Opposition Siddaramaiah from the southern side — the Congress will be able to add more seats to its kitty.
“It is now 141 seats. 136 was my prediction, but now after this yatra, we will add five more at least… People want to send this BJP government away after 50 days. The countdown has started… in the next 50 days, you will have a new Congress government,” he said.
On the issue of inflation and handling the Covid-19 pandemic, Shivakumar spoke of the BJP’s “inefficiency” in controlling price rise. He added that lakhs of people lost their lives during the pandemic, “but the BJP used PM Modi’s face as a marketing gimmick on vaccination certificates” to popularise him as a leader.
“Those who were affected by Covid and admitted to hospitals were promised that their medical bills will be reimbursed. Those who died, did not get a certificate. You gave a certification of vaccination with the PM’s photo, why not a death certificate with the PM’s photo as well? In Karnataka, more than 4. 5 lakh people died, you could have given death certificates with the PM’s photo as well,” Shivakumar said.
Asked what is clicking in favour of the Congress, Shivakumar said it was the failure of the BJP to deliver on promises to the people, both from the manifesto as well as the budget. He believes that only Congress can restore the glory of Karnataka and Bangalore.
“The BJP has no vision and its ministers are constantly fighting. You see the tears of Yediyurappa, why did he resign? What made him resign? These are the questions in the eyes of the public. We want to restore the glory of Karnataka, we want to restore the glory of Bangalore, give a clean administration, a government with good governance because every common man has been pickpocketed, prices are in the sky and income is at the bottom,” the Congress leader said.
He went on to say that BJP actually stood for ‘Brashtachaar (corruption) Janata Party’.
“Why did Bommai arrest all those who put up PayCM posters, including me and Siddaramaiah? BJP stands for Brashtachaar Janata Party wherein the ‘B’ stands for bramandh brashtachaar (absolute corruption),” he said.
The Congress has been, of late, harping on the BS Yediyurappa factor and how he was “insulted and side-lined” by the BJP. It has even reached out to the people, especially the Lingayat community, saying their tallest leader Yediyurappa was ill-treated by the BJP and that it will not happen if they support the Congress.
“They have packed him up and silenced him. The BJP knows now that they cannot sell his face anymore, which is why they got Bommai. Amit Shah said Bommai will lead the state, now he says they will fight the election in Modiji’s name. That means they are fighting an election without a leader,” Shivkuamr said, attacking the ruling party in the state.
On the question of infighting within the Congress and who would be the chief ministerial face of the party, the KPCC president made it clear that he will follow what the Congress high command says.
“There is no fight. Whatever the high command says, we will go by it. The high command has said that with (Mallikarjun) Kharge’s leadership, DK Shivakumar’s leadership, Siddaramaiah’s leadership … collective leadership… we will all work together and bring a Congress government,” he told News18.
Replying to a question about pressure from the Lingayat community for maximum tickets and a Lingayat leader as the CM if Congress wins, Shivakumar said the party will take all leaders and communities into confidence.
“Social justice must be maintained, winnability is important. Who all wins will be our priority,” he said in the interview.
|
english
|
package search
import (
"fmt"
"strings"
"github.com/profclems/glab/commands/cmdutils"
"github.com/profclems/glab/internal/utils"
"github.com/spf13/cobra"
"github.com/xanzy/go-gitlab"
)
func NewCmdSearch(f *cmdutils.Factory) *cobra.Command {
var projectSearchCmd = &cobra.Command{
Use: "search [flags]",
Short: `Search for GitLab repositories and projects by name`,
Long: ``,
Args: cobra.ExactArgs(1),
Aliases: []string{"find", "lookup"},
RunE: func(cmd *cobra.Command, args []string) error {
var err error
out := utils.ColorableOut(cmd)
apiClient, err := f.HttpClient()
if err != nil {
return err
}
search, _ := cmd.Flags().GetString("search")
page, _ := cmd.Flags().GetInt("page")
perPage, _ := cmd.Flags().GetInt("per-page")
projects, _, err := apiClient.Search.Projects(search, &gitlab.SearchOptions{
Page: page,
PerPage: perPage,
})
if err != nil {
return err
}
fmt.Fprintln(out, utils.DisplayList(utils.ListInfo{
Name: "Projects",
Columns: []string{"", "", "", ""},
Total: len(projects),
Description: fmt.Sprintf("Showing results for \"%s\"", search),
EmptyMessage: fmt.Sprintf("No results found for \"%s\"", search),
TableWrap: true,
GetCellValue: func(ri int, ci int) interface{} {
p := projects[ri]
switch ci {
case 0:
return utils.Green(string(rune(p.ID)))
case 1:
var description string
if p.Description != "" {
description = fmt.Sprintf("\n%s", utils.Cyan(p.Description))
}
return fmt.Sprintf("%s%s\n%s",
strings.ReplaceAll(p.PathWithNamespace, "/", " / "),
description, utils.Gray(p.WebURL))
case 2:
return fmt.Sprintf("%d stars %d forks %d issues", p.StarCount, p.ForksCount, p.OpenIssuesCount)
case 3:
return "updated " + utils.TimeToPrettyTimeAgo(*p.LastActivityAt)
default:
return ""
}
},
}, ""))
return nil
},
}
projectSearchCmd.Flags().IntP("page", "p", 1, "Page number")
projectSearchCmd.Flags().IntP("per-page", "P", 20, "Number of items to list per page")
projectSearchCmd.Flags().StringP("search", "s", "", "A string contained in the project name")
_ = projectSearchCmd.MarkFlagRequired("search")
return projectSearchCmd
}
|
go
|
Asus has introduced six new ZenBooks at IFA in Berlin. The new laptops feature compact, lightweight designs and what the company described as "productivity enhancing features" for business and personal users, including a new dual-function touchpad.
The ZenBook 13 (UX333), ZenBook 14 (UX433) and ZenBook 15 (UX533) run on 8th-generation Core i5 or i7 processors with up to 16GB of RAM, 1TB of PCIe SSD storage and discrete NvidiaGeForce graphics (MX 150 on the 13- and 14-inch models, GTX 1050 Max-Q on the ZenBook 15). All three laptops come with a 3D infrared camera that allows rapid face login via Windows Hello. The new design also features ultra-slim NanoEdge bezels, giving screen-to-body ratios of up to 95 percent.
The 13-inch and 14-inch models make up for the lack of a number pad on the keyboard by incorporating an LED-illuminated NumberPad into the touchpad. The ZenBook 15, meanwhile, is big enough to accommodate a number pad in its traditional location.
SEE: 20 pro tips to make Windows 10 work the way you want (free PDF)
The new ZenBook laptops are built to military-grade (MIL-STD-810G) standard and deliver claimed battery life of between 14 hours (ZenBook 13 and 14, 50Wh battery) and 16 hours (ZenBook 15, 73Wh battery).
The new ZenBooks currently don't have a release date beyond 'Q4', while Asus says that prices will be confirmed 'shortly'.
The Asus ZenBook Flip 13 (UX362) and Flip 15 (UX562) are 360-degree convertible touch-screen laptops that can also be used as tablets.
Like the ZenBooks described above, the new Flip models feature NanoEdge displays that make for a more compact chassis with a ten percent smaller footprint than previous models.
The Flip 13 and 15 are powered by 8th-generation Core i5 and i7 processors with up to 16GB of RAM and 512GB of SSD storage. The 15-inch model can also accommodate a 2TB hard drive. While the Flip 13 is limited to an integrated GPU, the Flip 15 has a discrete Nvidia GeForce GTX 1050 Max-Q chipset, plus the option for a PANTONE validated 4K UHD display -- features that make this model suitable for graphics professionals.
The Flip 13 has the dual-function touchpad with built-in LED-illuminated NumberPad, both models have the infrared Windows Hello camera, and there's an optional Full-HD 'world-facing' camera designed for use with Windows 10's Mixed Reality Viewer. Like the ZenBooks, the new Flip models are MIL-STD-810G compliant.
Asus ZenBook Flip 13 and Flip 15 will be available from mid Q4. Pricing has not been confirmed yet.
Asus also took the opportunity to show off the ZenBook Pro 14, announced earlier this year, at IFA. This 14-inch laptop is designed for "highly mobile artists, designers, programmers" and other "high performance professionals".
The ZenBook Pro 14 features 8th-generation Core i5 and i7 processors, up to 16GB of RAM, Nvidia GeForce GTX 1050 Max-Q graphics, a 1TB PCIe x4 SSD and Intel Optane memory -- a platform that allows this laptop to handle demanding tasks.
The key feature on the ZenPad Pro 14 is the ScreenPad, which combines the touchpad with a high-resolution secondary 5.5-inch touchscreen. Selected desktop apps -- including Microsoft Word, Excel, PowerPoint -- offer close integration with ScreenPad in order to boost productivity; ScreenPad apps can also be downloaded from the Windows Store.
The Asus ZenBook Pro 14 (UX480) will be available from late October, with pricing to be confirmed.
In addition to new hardware, Asus also announced new apps for the ScreenPad, allowing users to use new functions and features. New apps include Adobe Sign, Handwriting and SpeechTyper.
|
english
|
{
"label_printing/js/label_printing.min.js": [
"public/js/label_printing_desk.js"
]
}
|
json
|
{
"format_version": "1.16.100",
"minecraft:item": {
"description": {
"identifier": "exnihilo:silkworm",
"category": "Items"
},
"components": {
"minecraft:creative_category": {
"parent": "itemGroup.name.items"
},
"minecraft:icon": {
"texture": "silkworm",
"frame": 0
},
"minecraft:on_use_on": {
"on_use_on": {
"event": "setblock"
}
}
},
"events": {
"setblock": {
"run_command": {
"command": [
"fill ~~~ ~~~ exnihilo:infested_oak_leaves 0 replace leaves 0",
"fill ~~~ ~~~ exnihilo:infested_oak_leaves 0 replace leaves 4",
"fill ~~~ ~~~ exnihilo:infested_spruce_leaves 0 replace leaves 1",
"fill ~~~ ~~~ exnihilo:infested_spruce_leaves 0 replace leaves 5",
"fill ~~~ ~~~ exnihilo:infested_birch_leaves 0 replace leaves 2",
"fill ~~~ ~~~ exnihilo:infested_birch_leaves 0 replace leaves 6",
"fill ~~~ ~~~ exnihilo:infested_jungle_leaves 0 replace leaves 3",
"fill ~~~ ~~~ exnihilo:infested_jungle_leaves 0 replace leaves 7",
"fill ~~~ ~~~ exnihilo:infested_acacia_leaves 0 replace leaves2 0",
"fill ~~~ ~~~ exnihilo:infested_acacia_leaves 0 replace leaves2 4",
"fill ~~~ ~~~ exnihilo:infested_dark_oak_leaves 0 replace leaves2 1",
"fill ~~~ ~~~ exnihilo:infested_dark_oak_leaves 0 replace leaves2 5"
],
"target": "block"
},
"decrement_stack": {}
}
}
}
}
|
json
|
/*
* Copyright 2015-2017 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* 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 org.hawkular.agent.helloworld;
import java.io.IOException;
import java.io.PrintWriter;
import javax.inject.Inject;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@WebServlet(value = "/HelloWorld", loadOnStartup = 1)
public class HelloWorldServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
@Inject
private SimpleMXBeanImpl mbean;
@Override
public void init(ServletConfig config) throws ServletException {
super.init(config);
mbean.setTestInteger(0);
log("Test MBean has been registered: " + SimpleMXBeanImpl.OBJECT_NAME);
}
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
Integer num = Integer.valueOf(mbean.getTestInteger().intValue() + 1);
mbean.setTestInteger(num);
resp.setContentType("text/html");
PrintWriter writer = resp.getWriter();
writer.println("<html><head><title>helloworld</title></head><body><h1>");
writer.println(mbean.getTestString());
writer.println(" #");
writer.println(num);
writer.println("</h1></body></html>");
writer.close();
}
}
|
java
|
Panasonic, not content to only release new still cameras and normal camcorders this week, has revealed the 3D camcorder we’ve been looking forward to for some time now. It’s called the HDC-SDT750. Catchy!
Quick digression: Whose job is it to come up with names for Panasonic electronics? I’m guessing they would see a measurable increase in sales of their flagship items if they gave them names people could remember. When someone puts “flip camera” into Google, they get what they’re looking for. “Panasonic camera”? Not so much. Moving on.
The SDT750 records at 1080p/60FPS on its 3MOS sensor, and has the usual fixins you’d expect on a $1000+ camera: manual settings ring, optical image stabilization, and a nice big 3′′ touchscreen (not 3D, unfortunately). Unfortunately, once you put the 3D conversion lens on there, it has to split the image, producing two 960×1080 side-by-side images at 60FPS. This is a little puzzling to me; why not just have 1080p at 30FPS? It seems a bit odd, and hopefully Panasonic will make that a possibility soon.
The main lens (i.e. for 2D shooting) is a 46mm F/1.5 Leica Dicomar, which sounds pretty awesome. You lose almost two full stops of light when you put on the 3D lens, though, bringing it down to F/3.2. That’s not so bad still for a camcorder, but you’ll need to keep it in mind when you’re shooting. It’s got 12x optical zoom, though of course you’ll lose a lot of light there too.
Another cool feature is built-in 5.1 channel recording; it uses five actual microphones and automatically mixes it. That’s pretty awesome, and I really hope it trickles down to more consumer-level cameras.
On the other hand, that handy manual settings ring, normally able to control focus, zoom, exposure, white balance, and shutter speed, can only control white balance when the 3D lens is on. That’s what they get for half-assing the 3D capability. Pity!
So what can you expect to pay for this sucker? $1400. Yeah, a bit expensive, but really, it’s one of the few all-in-one 3D systems on the market. It’s more than a fair price if you ask me, although the framerate limitation is baffling.
It’ll be available in October. More specs and info at Panasonic.
|
english
|
* {
margin: 0;
padding: 0;
}
html {
scroll-behavior: smooth;
}
body {
font-family: Futura, sans-serif;
background-color: #262749;
min-width: 100vw;
min-height: 100vh;
cursor: default;
overflow-x: hidden;
position: relative;
}
/**********HEADER SECTION**********/
header {
color: #fe7281;
padding-top: 20px;
font-size: 20px;
display: flex;
justify-content: center;
position: fixed;
top: 0;
left: 50%;
transform: translateX(-50%);
z-index: 5;
}
header a {
display: inline-block;
text-decoration: none;
color: #fe7281;
}
header h2 {
display: inline-block;
cursor: default;
text-shadow: 1px 1px 0 #c35964, 2px 2px 0 #c35964, 3px 3px 0 #c35964,
8px 8px 0 transparent, 9px 9px 0 transparent, 10px 10px 0 transparent,
11px 11px 0 transparent, 12px 12px 0 transparent,
13px 16px 13px rgba(0, 0, 0, 0.4);
margin-left: 15px;
transition: 0.3s;
}
header h2:hover {
transform: translate(6px, 6px);
text-shadow: 1px 1px 0 #c35964, 2px 2px 0 #c35964, 3px 3px 0 #c35964;
}
.toggle {
position: relative;
display: flex;
justify-content: center;
align-items: center;
background-color: #262749;
width: 40px;
height: 40px;
border-radius: 5px;
box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.7);
cursor: pointer;
overflow: hidden;
}
.toggle span {
position: absolute;
width: 30px;
height: 3px;
background-color: #a7e8bd;
border-radius: 4px;
transition: 0.5s;
}
.toggle span:nth-child(1) {
transform: translateY(-10px);
width: 20px;
left: 5px;
background-color: #fff6b8;
}
.toggle.active span:nth-child(1) {
width: 30px;
transform: translateY(0px) rotate(45deg);
}
.toggle span:nth-child(2) {
transform: translateY(10px);
width: 13px;
left: 5px;
background-color: #fe7281;
}
.toggle.active span:nth-child(2) {
width: 30px;
transform: translateY(0px) rotate(315deg);
-webkit-transform: translateY(0px) rotate(315deg);
}
.toggle.active span:nth-child(3) {
transform: translateX(60px);
}
/*===== MENU =====*/
.menu {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 0vh;
background-color: #20213b;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
z-index: 4;
transition: 0.5s;
overflow: hidden;
}
.menu.active {
height: 100vh;
}
.menu a {
text-decoration: none;
color: white;
font-family: Futura, sans-serif;
font-size: 50px;
font-weight: bold;
text-shadow: 10px 10px 10px rgba(0, 0, 0, 0.6);
}
/*===== MENU HOME LINK =====*/
#homelink {
display: inline-block;
margin-bottom: 50px;
position: relative;
}
#homelink::before {
content: "";
position: absolute;
bottom: -15px;
left: -100%;
width: 0%;
height: 5px;
background-color: #fe7281;
border-radius: 50px;
transition: 0.5s;
}
#homelink::after {
content: "";
position: absolute;
top: -10px;
right: -100%;
width: 0%;
height: 5px;
background-color: #fe7281;
border-radius: 50px;
transition: 0.5s;
}
#homelink:hover::before {
width: 100%;
left: 90%;
}
#homelink:hover::after {
width: 100%;
right: 90%;
}
#homelink span {
display: inline-block;
}
#homelink span:nth-child(1) {
color: #fe7281;
}
#homelink span:nth-child(2) {
color: #a7e8bd;
}
#homelink span:nth-child(3) {
color: #c7eae4;
}
#homelink span:nth-child(4) {
color: #fff6b8;
}
/*===== MENU ABOUT LINK =====*/
#aboutlink {
display: inline-block;
margin-bottom: 50px;
position: relative;
}
#aboutlink::before {
content: "";
position: absolute;
bottom: -15px;
left: -100%;
width: 0%;
height: 5px;
background-color: #fe7281;
border-radius: 50px;
transition: 0.5s;
}
#aboutlink::after {
content: "";
position: absolute;
top: -10px;
right: -100%;
width: 0%;
height: 5px;
background-color: #fe7281;
border-radius: 50px;
transition: 0.5s;
}
#aboutlink:hover::before {
width: 100%;
left: 90%;
}
#aboutlink:hover::after {
width: 100%;
right: 90%;
}
#aboutlink span {
display: inline-block;
}
#aboutlink span:nth-child(1) {
color: #a7e8bd;
}
#aboutlink span:nth-child(2) {
color: #fff6b8;
}
#aboutlink span:nth-child(3) {
color: #fe7281;
}
#aboutlink span:nth-child(4) {
color: #c7eae4;
}
#aboutlink span:nth-child(5) {
color: #fff6b8;
}
/*===== MENU SKILLS LINK =====*/
#skillslink {
display: inline-block;
margin-bottom: 50px;
position: relative;
}
#skillslink::before {
content: "";
position: absolute;
bottom: -15px;
left: -100%;
width: 0%;
height: 5px;
background-color: #fe7281;
border-radius: 50px;
transition: 0.5s;
}
#skillslink::after {
content: "";
position: absolute;
top: -10px;
right: -100%;
width: 0%;
height: 5px;
background-color: #fe7281;
border-radius: 50px;
transition: 0.5s;
}
#skillslink:hover::before {
width: 100%;
left: 90%;
}
#skillslink:hover::after {
width: 100%;
right: 90%;
}
#skillslink span {
display: inline-block;
}
#skillslink span:nth-child(1) {
color: #fff6b8;
}
#skillslink span:nth-child(2) {
color: #a7e8bd;
}
#skillslink span:nth-child(3) {
color: #fe7281;
}
#skillslink span:nth-child(4) {
color: #c7eae4;
}
#skillslink span:nth-child(5) {
color: #fff6b8;
}
#skillslink span:nth-child(6) {
color: #c7eae4;
}
/*===== MENU PROJECTS LINK =====*/
#projectslink {
display: inline-block;
margin-bottom: 50px;
position: relative;
}
#projectslink::before {
content: "";
position: absolute;
bottom: -15px;
left: -100%;
width: 0%;
height: 5px;
background-color: #fe7281;
border-radius: 50px;
transition: 0.5s;
}
#projectslink::after {
content: "";
position: absolute;
top: -10px;
right: -100%;
width: 0%;
height: 5px;
background-color: #fe7281;
border-radius: 50px;
transition: 0.5s;
}
#projectslink:hover::before {
width: 100%;
left: 90%;
}
#projectslink:hover::after {
width: 100%;
right: 90%;
}
#projectslink span {
display: inline-block;
}
#projectslink span:nth-child(1) {
color: #c7eae4;
}
#projectslink span:nth-child(2) {
color: #a7e8bd;
}
#projectslink span:nth-child(3) {
color: #fff6b8;
}
#projectslink span:nth-child(4) {
color: #fe7281;
}
#projectslink span:nth-child(5) {
color: #fff6b8;
}
#projectslink span:nth-child(6) {
color: #c7eae4;
}
#projectslink span:nth-child(7) {
color: #fe7281;
}
#projectslink span:nth-child(8) {
color: #fff6b8;
}
#projectslink span:nth-child(9) {
color: #a7e8bd;
}
/*===== MENU CONTACT LINK =====*/
#contactlink {
display: inline-block;
position: relative;
}
#contactlink::before {
content: "";
position: absolute;
bottom: -15px;
left: -100%;
width: 0%;
height: 5px;
background-color: #fe7281;
border-radius: 50px;
transition: 0.5s;
}
#contactlink::after {
content: "";
position: absolute;
top: -10px;
right: -100%;
width: 0%;
height: 5px;
background-color: #fe7281;
border-radius: 50px;
transition: 0.5s;
}
#contactlink:hover::before {
width: 100%;
left: 90%;
}
#contactlink:hover::after {
width: 100%;
right: 90%;
}
#contactlink span {
display: inline-block;
}
#contactlink span:nth-child(1) {
color: #fff6b8;
}
#contactlink span:nth-child(2) {
color: #a7e8bd;
}
#contactlink span:nth-child(3) {
color: #fe7281;
}
#contactlink span:nth-child(4) {
color: #c7eae4;
}
#contactlink span:nth-child(5) {
color: #fff6b8;
}
#contactlink span:nth-child(6) {
color: #c7eae4;
}
#contactlink span:nth-child(7) {
color: #a7e8bd;
}
/**********MAIN SECTION**********/
.homepage {
min-height: 100vh;
position: relative;
display: flex;
justify-content: flex-start;
align-items: center;
}
.aboutpage {
min-height: 800px;
display: flex;
justify-content: center;
align-items: center;
}
.skillspage {
min-height: 1000px;
position: relative;
}
.projectspage {
min-height: 1000px;
position: relative;
display: flex;
justify-content: space-evenly;
align-items: center;
}
.contactpage {
min-height: 800px;
display: flex;
justify-content: center;
align-items: center;
}
.fade-in {
opacity: 0;
transform: translateX(-50px);
transition: 0.6s ease-in;
}
.fade-in.appear {
opacity: 1;
transform: translateX(0);
}
.fade-in.disappear {
opacity: 0;
}
/***intro***/
.homepagetext {
cursor: default;
width: 80%;
}
.intro-faded {
font-size: 16vw;
opacity: 0.13;
z-index: -1;
position: absolute;
bottom: 30%;
}
.intro {
font-size: 18vh;
margin-left: 45px;
}
#h {
color: #fff6b8;
display: inline-block;
transition: 0.15s;
text-shadow: 1px 1px 0 #cfc794, 2px 2px 0 #cfc794, 3px 3px 0 #cfc794,
4px 4px 0 #cfc794, 5px 5px 0 #cfc794, 6px 6px 0 #cfc794, 7px 7px 0 #cfc794,
8px 8px 0 transparent, 9px 9px 0 transparent, 10px 10px 0 transparent,
11px 11px 0 transparent, 12px 12px 0 transparent,
13px 16px 13px rgba(0, 0, 0, 0.4);
}
#h:hover {
animation: bounce 0.3s infinite alternate;
}
#i-first {
color: #c7eae4;
display: inline-block;
transition: 0.15s;
text-shadow: 1px 1px 0 #a3c0bb, 2px 2px 0 #a3c0bb, 3px 3px 0 #a3c0bb,
4px 4px 0 #a3c0bb, 5px 5px 0 #a3c0bb, 6px 6px 0 #a3c0bb, 7px 7px 0 #a3c0bb,
8px 8px 0 transparent, 9px 9px 0 transparent, 10px 10px 0 transparent,
11px 11px 0 transparent, 12px 12px 0 transparent,
13px 16px 13px rgba(0, 0, 0, 0.4);
}
#i-first:hover {
animation: bounce 0.3s infinite alternate;
}
#coma {
color: #fe7281;
display: inline-block;
transition: 0.15s;
text-shadow: 1px 1px 0 #c35964, 2px 2px 0 #c35964, 3px 3px 0 #c35964,
4px 4px 0 #c35964, 5px 5px 0 #c35964, 6px 6px 0 #c35964, 7px 7px 0 #c35964,
8px 8px 0 transparent, 9px 9px 0 transparent, 10px 10px 0 transparent,
11px 11px 0 transparent, 12px 12px 0 transparent,
13px 16px 13px rgba(0, 0, 0, 0.4);
}
#coma:hover {
animation: bounce 0.3s infinite alternate;
}
#i-second {
color: #fe7281;
display: inline-block;
transition: 0.15s;
text-shadow: 1px 1px 0 #c35964, 2px 2px 0 #c35964, 3px 3px 0 #c35964,
4px 4px 0 #c35964, 5px 5px 0 #c35964, 6px 6px 0 #c35964, 7px 7px 0 #c35964,
8px 8px 0 transparent, 9px 9px 0 transparent, 10px 10px 0 transparent,
11px 11px 0 transparent, 12px 12px 0 transparent,
13px 16px 13px rgba(0, 0, 0, 0.4);
}
#i-second:hover {
animation: bounce 0.3s infinite alternate;
}
#apostrophe {
color: #fff6b8;
display: inline-block;
transition: 0.1s;
text-shadow: 1px 1px 0 #cfc794, 2px 2px 0 #cfc794, 3px 3px 0 #cfc794,
4px 4px 0 #cfc794, 5px 5px 0 #cfc794, 6px 6px 0 #cfc794, 7px 7px 0 #cfc794,
8px 8px 0 transparent, 9px 9px 0 transparent, 10px 10px 0 transparent,
11px 11px 0 transparent, 12px 12px 0 transparent,
13px 16px 13px rgba(0, 0, 0, 0.4);
}
#apostrophe:hover {
animation: bounce 0.3s infinite alternate;
}
#m {
color: #fff6b8;
display: inline-block;
transition: 0.15s;
text-shadow: 1px 1px 0 #cfc794, 2px 2px 0 #cfc794, 3px 3px 0 #cfc794,
4px 4px 0 #cfc794, 5px 5px 0 #cfc794, 6px 6px 0 #cfc794, 7px 7px 0 #cfc794,
8px 8px 0 transparent, 9px 9px 0 transparent, 10px 10px 0 transparent,
11px 11px 0 transparent, 12px 12px 0 transparent,
13px 16px 13px rgba(0, 0, 0, 0.4);
}
#m:hover {
animation: bounce 0.3s infinite alternate;
}
#b {
color: #a7e8bd;
display: inline-block;
transition: 0.15s;
text-shadow: 1px 1px 0 #89be9b, 2px 2px 0 #89be9b, 3px 3px 0 #89be9b,
4px 4px 0 #89be9b, 5px 5px 0 #89be9b, 6px 6px 0 #89be9b, 7px 7px 0 #89be9b,
8px 8px 0 transparent, 9px 9px 0 transparent, 10px 10px 0 transparent,
11px 11px 0 transparent, 12px 12px 0 transparent,
13px 16px 13px rgba(0, 0, 0, 0.4);
}
#b:hover {
animation: bounce 0.3s infinite alternate;
}
#r {
color: #a7e8bd;
display: inline-block;
transition: 0.15s;
text-shadow: 1px 1px 0 #89be9b, 2px 2px 0 #89be9b, 3px 3px 0 #89be9b,
4px 4px 0 #89be9b, 5px 5px 0 #89be9b, 6px 6px 0 #89be9b, 7px 7px 0 #89be9b,
8px 8px 0 transparent, 9px 9px 0 transparent, 10px 10px 0 transparent,
11px 11px 0 transparent, 12px 12px 0 transparent,
13px 16px 13px rgba(0, 0, 0, 0.4);
}
#r:hover {
animation: bounce 0.3s infinite alternate;
}
#i {
color: #a7e8bd;
display: inline-block;
transition: 0.15s;
text-shadow: 1px 1px 0 #89be9b, 2px 2px 0 #89be9b, 3px 3px 0 #89be9b,
4px 4px 0 #89be9b, 5px 5px 0 #89be9b, 6px 6px 0 #89be9b, 7px 7px 0 #89be9b,
8px 8px 0 transparent, 9px 9px 0 transparent, 10px 10px 0 transparent,
11px 11px 0 transparent, 12px 12px 0 transparent,
13px 16px 13px rgba(0, 0, 0, 0.4);
animation: bounce 0.3s infinite alternate;
}
#a {
color: #fe7281;
display: inline-block;
transition: 0.15s;
text-shadow: 1px 1px 0 #c35964, 2px 2px 0 #c35964, 3px 3px 0 #c35964,
4px 4px 0 #c35964, 5px 5px 0 #c35964, 6px 6px 0 #c35964, 7px 7px 0 #c35964,
8px 8px 0 transparent, 9px 9px 0 transparent, 10px 10px 0 transparent,
11px 11px 0 transparent, 12px 12px 0 transparent,
13px 16px 13px rgba(0, 0, 0, 0.4);
}
#a:hover {
animation: bounce 0.3s infinite alternate;
}
#n {
color: #fe7281;
display: inline-block;
transition: 0.15s;
text-shadow: 1px 1px 0 #c35964, 2px 2px 0 #c35964, 3px 3px 0 #c35964,
4px 4px 0 #c35964, 5px 5px 0 #c35964, 6px 6px 0 #c35964, 7px 7px 0 #c35964,
8px 8px 0 transparent, 9px 9px 0 transparent, 10px 10px 0 transparent,
11px 11px 0 transparent, 12px 12px 0 transparent,
13px 16px 13px rgba(0, 0, 0, 0.4);
}
#n:hover {
animation: bounce 0.3s infinite alternate;
}
@keyframes bounce {
100% {
transform: translateY(-15px);
}
}
/***paragraph***/
#homepageparagraph {
color: #fff6b8;
font-size: 50px;
font-weight: bold;
margin-left: 45px;
margin-top: 45px;
text-shadow: 7px 10px 13px rgba(0, 0, 0, 0.4);
display: inline-block;
}
#homepageparagraph span {
display: inline-block;
transition: 0.2s;
}
#homepageparagraph span:nth-child(1) {
color: #fe7281;
animation: bounce 0.3s infinite alternate;
}
#homepageparagraph:hover span:nth-child(1) {
color: #fe7281;
animation: none;
transform: translateY(-20px);
}
#homepageparagraph:hover span:nth-child(2) {
color: #fff6b8;
transform: translateY(-20px);
transition-delay: 0.05s;
}
#homepageparagraph:hover span:nth-child(3) {
color: #a7e8bd;
transform: translateY(-20px);
transition-delay: 0.1s;
}
#homepageparagraph:hover span:nth-child(4) {
color: #fe7281;
transform: translateY(-20px);
transition-delay: 0.15s;
}
#homepageparagraph:hover span:nth-child(5) {
color: #fff6b8;
transform: translateY(-20px);
transition-delay: 0.2s;
}
#homepageparagraph:hover span:nth-child(6) {
color: #fff6b8;
transform: translateY(-20px);
transition-delay: 0.25s;
}
#homepageparagraph:hover span:nth-child(7) {
color: #c7eae4;
transform: translateY(-20px);
transition-delay: 0.3s;
}
#homepageparagraph:hover span:nth-child(8) {
color: #fe7281;
transform: translateY(-20px);
transition-delay: 0.35s;
}
#homepageparagraph:hover span:nth-child(9) {
color: #a7e8bd;
transform: translateY(-20px);
transition-delay: 0.4s;
}
#homepageparagraph:hover span:nth-child(10) {
color: #a7e8bd;
transform: translateY(-20px);
transition-delay: 0.45s;
}
#homepageparagraph:hover span:nth-child(11) {
color: #fff6b8;
transform: translateY(-20px);
transition-delay: 0.5s;
}
#homepageparagraph:hover span:nth-child(12) {
color: #c7eae4;
transform: translateY(-20px);
transition-delay: 0.55s;
}
#homepageparagraph:hover span:nth-child(13) {
color: #a7e8bd;
transform: translateY(-20px);
transition-delay: 0.6s;
}
#homepageparagraph:hover span:nth-child(15) {
color: #fe7281;
transform: translateY(-20px);
transition-delay: 0.65s;
}
#homepageparagraph:hover span:nth-child(16) {
color: #fe7281;
transform: translateY(-20px);
transition-delay: 0.7s;
}
#homepageparagraph:hover span:nth-child(17) {
color: #fff6b8;
transform: translateY(-20px);
transition-delay: 0.75s;
}
#homepageparagraph:hover span:nth-child(18) {
color: #a7e8bd;
transform: translateY(-20px);
transition-delay: 0.8s;
}
#homepageparagraph:hover span:nth-child(19) {
color: #c7eae4;
transform: translateY(-20px);
transition-delay: 0.85s;
}
#homepageparagraph:hover span:nth-child(20) {
color: #c7eae4;
transform: translateY(-20px);
transition-delay: 0.9s;
}
#homepageparagraph:hover span:nth-child(21) {
color: #fff6b8;
transform: translateY(-20px);
transition-delay: 0.95s;
}
#homepageparagraph:hover span:nth-child(22) {
color: #a7e8bd;
transform: translateY(-20px);
transition-delay: 1s;
}
#homepageparagraph:hover span:nth-child(23) {
color: #fe7281;
transform: translateY(-20px);
transition-delay: 1.05s;
}
#homepageparagraph:hover span:nth-child(24) {
color: #fe7281;
transform: translateY(-20px);
transition-delay: 1.1s;
}
#homepageparagraph:hover span:nth-child(25) {
color: #fe7281;
transform: translateY(-20px);
transition-delay: 1.15s;
}
/**********FOOTER SECTION**********/
.footer {
min-height: 450px;
position: absolute;
top: 50%;
right: 5%;
transform: translateY(-50%);
display: flex;
flex-direction: column;
justify-content: space-between;
}
.footer a {
width: 60px;
height: 60px;
border: 2px solid #262749;
border-radius: 50%;
box-shadow: 5px 5px 8px rgba(0, 0, 0, 0.3), -5px -5px 8px #2c2d55;
text-decoration: none;
position: relative;
transition: 0.3s;
}
.footer a:hover {
box-shadow: 5px 5px 8px rgba(0, 0, 0, 0.3), -5px -5px 8px #2c2d55,
inset 8px 8px 8px rgba(0, 0, 0, 0.2);
}
.footer a span {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.fa-github {
color: rgba(0, 0, 0, 0.25);
transition: 0.25s;
}
.footer a:hover .fa-github {
color: #a7e8bd;
}
.fa-linkedin {
color: rgba(0, 0, 0, 0.25);
transition: 0.25s;
}
.footer a:hover .fa-linkedin {
color: #fff6b8;
}
.fa-instagram {
color: rgba(0, 0, 0, 0.25);
transition: 0.25s;
}
.footer a:hover .fa-instagram {
color: #fe7281;
}
.fa-facebook-f {
color: rgba(0, 0, 0, 0.25);
transition: 0.25s;
}
.footer a:hover .fa-facebook-f {
color: #c7eae4;
}
/*
==============
Media Queries
==============
*/
@media screen and (max-width: 1145px) {
.intro {
font-size: 140px;
}
#homepageparagraph {
font-size: 40px;
text-shadow: 7px 10px 13px rgba(0, 0, 0, 0.4);
}
.footer {
min-height: 400px;
}
}
@media screen and (max-width: 915px) {
.intro {
font-size: 100px;
}
#homepageparagraph {
font-size: 30px;
}
.footer {
transform: translateY(-50%) scale(0.8);
}
}
@media screen and (max-width: 675px) {
.intro {
font-size: 70px;
}
#homepageparagraph {
font-size: 20px;
}
}
@media screen and (max-width: 455px) {
.intro {
font-size: 70px;
}
.intro-faded {
font-size: 30vw;
}
#homepageparagraph {
font-size: 20px;
}
.footer {
min-width: 450px;
min-height: 0;
bottom: -275%;
left: 50%;
transform: translateX(-50%) scale(0.8);
flex-direction: row;
justify-content: center;
}
.footer a {
margin-left: 15px;
margin-right: 15px;
}
}
@media screen and (max-height: 620px) {
.intro {
font-size: 70px;
}
#homepageparagraph {
font-size: 20px;
}
.footer {
transform: translateY(-50%) scale(0.8);
}
}
@media screen and (max-height: 500px) {
.footer {
transform: translateY(-50%) scale(0.65);
}
}
|
css
|
.output {
width: 100%;
height: 300px;
background-color: $darkGrey;
color: $mainWhite;
font-weight: 300;
font-size: 1.2rem;
position: relative;
}
.budget {
position: absolute;
width: 350px;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
color: #mainWhite;
&__title {
font-size: 1.1rem;
text-align: center;
margin-bottom: 10px;
font-weight: 300;
}
&__value {
font-weight: 300;
text-align: center;
margin-bottom: 10px;
letter-spacing: 2px;
&--small{
font-size: 2.1rem;
}
&--large{
font-size: 2.9rem;
}
}
&__income,
&__expenses {
text-align: center;
width: 200px;
padding: 1rem;
text-transform: uppercase;
}
&__income {
margin-bottom: 10px;
}
&__expenses {
}
&__income--text,
&__expenses--text {
float: left;
font-size: 1.1rem;
margin-top: 2px;
}
&__income--text,
&__income--value {
color: $mainGreen;
}
&__expenses--text,
&__expenses--value{
color: $mainRed;
}
&__income--value,
&__expenses--value {
letter-spacing: 1px;
float: left;
}
}
|
css
|
NewZNew (Chandigarh) : Happy Mexican Independence Day Celebrations Wishes Status SMS Flag Parade Images Photos 2015 : Today is 16th September and this day is celebrated as Mexican Independence Day. Mexican celebrates its independence every September 16 with parades, festivals, feasts, parties and more. Mexican flags are everywhere and the main plaza in Mexico City is packed. Mexicans celebrate their country’s Independence Day with fireworks, parties (fiestas), food, dance, music and much more. Flags, flowers and decorations in the colors of the Mexican flag – red, white and green – are seen in public areas in cities and towns in Mexico. Whistles and horns are blown and confetti is thrown to celebrate this festive occasion. “Viva Mexico” or “Viva la independencia” are shouted amidst the crowds on this day. Now below get complete details of Happy Mexican Independence Day 2015.
If you think Independence Day is America’s defining holiday, think again. Thanksgiving deserves that title, hands-down.
When I saw ‘Independence Day,’ I said, ‘I want to be like Will Smith.’ I want to do something like that. If he can do it, maybe one day I can come close to a set like that.
Every year thousands of Americans mistakenly refer to Cinco de Mayo as Mexico’s Independence Day.
As for ‘Independence Day,’ we never intended to do any films in that series beyond the first one.
Cinco de Mayo is an important day. The Mexicans had to defend themselves from the French. It is historically significant, but it is not Mexican Independence Day.
I am going to take something I learned over in Israel. Their Independence Day is preceded the 24 hours before with Memorial Day, so it gives them a chance to serve and reflect and then celebrate. I am going to try to start that tradition here in America.
|
english
|
<reponame>AmrEldib/AMapOfIceAndFire
{
"category": "NobleHouses",
"images": [
{
"url": "http://awoiaf.westeros.org/images/thumb/4/47/RygerCoA.png/250px-RygerCoA.png",
"caption": ""
}
],
"name": "House Ryger",
"summary": "<p><b>House Ryger of Willow Wood</b> is a noble house from <a href=\"http://awoiaf.westeros.org/index.php/Willow_Wood\" title=\"Willow Wood\">Willow Wood</a> in the <a href=\"http://awoiaf.westeros.org/index.php/Riverlands\" title=\"Riverlands\">Riverlands</a>. It is one of the main houses sworn to <a href=\"http://awoiaf.westeros.org/index.php/House_Tully\" title=\"House Tully\">House Tully</a><sup id=\"cite_ref-Ragotappendix.7B.7B.7B3.7D.7D.7D_0-0\" class=\"reference\"><a href=\"http://awoiaf.westeros.org/index.php/House Ryger#cite_note-Ragotappendix.7B.7B.7B3.7D.7D.7D-0\">[1]</a></sup>. They blazon their arms with a weeping willow, green on white.<sup id=\"cite_ref-Raffc33.7B.7B.7B3.7D.7D.7D_1-0\" class=\"reference\"><a href=\"http://awoiaf.westeros.org/index.php/House Ryger#cite_note-Raffc33.7B.7B.7B3.7D.7D.7D-1\">[2]</a></sup><sup id=\"cite_ref-2\" class=\"reference\"><a href=\"http://awoiaf.westeros.org/index.php/House Ryger#cite_note-2\">[3]</a></sup>"
}
|
json
|
Baghpat: Two groups of shopkeepers and workers brutally beat each other up over getting customers to their shops in Uttar Pradesh's Baghpat on Monday. Armed with rods and sticks, the men thrashed each other in an ugly fight that lasted for around 20 minutes. The incident was reported from a busy market in Baraut town of Baghpat.
Baghpat police said that 12 people were injured in the incident and eight were arrested. However, no serious injuries were reported.
Reportedly, police complaints have been filed by both shopkeepers in the case.
Soon, a video from the fight which was filmed by a bystander started circulating on social media. A photo of the arrested people also started doing rounds online. Netizens got interested in one particular man who had long, orange hair. The man, identified as Harinder, reminded social media users of Albert Einstein and Boman Irani's Virus from the Bollywood movie 3 Idiots. Check out some of the best memes here:
One user said, "Albert Einstein of Uttar Pradesh, Discovering new WWE moves. " Another wrote, "Me and my bois at principal’s office after playing WWE in the recess time. "
A third user added, "After ‘Battle of Panipat’, lets Introduce ‘Battle of Baghpat’ in the syllabus now. #Baghpat. " Yet another user tagged actor Boman Irani and asked, "@bomanirani! was that you in royal rumble fight? quite similar. "
The incident happened in the town's Atithi Bhavan market area on Tuesday.
Which meme did you find the most hilarious?
|
english
|
[{"subject":"EDUC","catalog_nbr":867,"section":1,"class_nbr":7812,"title":"ISSUES IN ED POLICY & RESEARCHLecture","component":"3","units":0,"bldg":"Peabody","room":"0204","days":"Th","time":"12","instructor":"<NAME>","load":"100","rank":"INST","attributes":null,"enrl_cap":22,"enrl_tot":22,"wait_cap":0,"wait_tot":0,"prereqs":null,"rmp":null}]
|
json
|
<filename>config.js
module.exports = {
title: 'Blog', // Required
author: '<NAME>', // Required
description: 'AI R&D',
primaryColor: '#3498db', // Required
showHeaderImage: true,
showShareButtons: true,
postsPerPage: 5, // Required
social: {
website: 'https://www.farpointst.com/',
github: 'https://github.com/sersoage',
twitter: 'https://twitter.com/Sergio_Soage',
instagram: 'https://www.instagram.com/sergio_soage/',
},
pathPrefix: 'Blog',
siteUrl: 'https://www.farpointst.com//',
};
|
javascript
|
- 2 hrs ago 5 Best Microwave Ovens For Your Kitchen: Deals To Consider As Amazon Sale 2023 Is Nearing!
- Technology Samsung Galaxy Z Fold 5, Galaxy Z Flip 5 Price Leaks Ahead Of Launch: Premium Foldable Smartphones Start At?
- Travel Have you been to Vishveshwaraya Falls in Mandya yet? If not, this is the best time!
Being young and beautifulis a boon, and if a person succeeds in maintaining their youth and beauty, then she not only has a secret but is also considered to be lucky. People can go to any extent when it comes to looking young and beautiful, even if it has to involve those painful waxing sessions or even a slimyfish manicure.
Just like these, there are some a few more weird beauty treatments which will blow your mind. These strange yet effective beauty treatments are unpleasant to try, but most people go to any extent when it is a question of staying young and beautiful.
It is human nature to get compliments from everyone, and this makes us tempted to use these strange beauty treatments, all the more.
Like the famous quote, Nothing is good or bad but our mind makes it so". So, today, let us take a look at these strange beauty treatments which will make us feel and look young and beautiful. .
People visit salons to get their face slapped, pinched and manipulated to remove wrinkles and pores. This 10 to 15 minute session of face slapping is considered to be the best weird treatment to stay young and beautiful.
This practice is famous in London where salons mix bull semen with hair care products. The high protein content in the bull semen is said to promotehair strength, repair damaged hair and adda shine to the hair.
You might have heard people drinking urine as a health treatment. Urine is used as a beauty treatment too. Rinsing the face with human urine helps to clear acne, psoriasis and eczema. This may seem as an unpleasant beauty treatment but some people actually follow it. Beauty therapists state that one should rinse the face with the urine early morning after your best hormones have built up overnight.
Leecheswere used as a primitive form of medicine in ancient times to treat skin infections. These little pests also remove toxins from the body, when they are placed on human skin to suck out the blood. . Today, leeches have been completely replaced by modern medicine. However, many people including some celebrities such as Demi Moore put leeches on their body for beautiful skin. This is one strange beauty treatment.
This beauty treatment was popular during the time of the ancient Greeks and Romans. This weird beauty treatment is used as a face mask to achieve beautiful skin.
This tops the list of weird beauty treatments. Bird poop is the best to apply on the skin to remain young and beautiful Nightingale bird's poop is used as a beauty treatment as it is considered as an upper-class bird. It is applied and massaged on the skin to remove scars and deep, dark marks. Victoria Beckham is one celebrity who uses this strange beauty treatment for better skin.
Famous model, Christie Brinkley uses cat litter as a body scrub Cat litter helps in promoting better skin and it is the best weird treatment to use when wrinkles begin to develop.
Many people inject sheep embryo cells into their body to retain youthfulness and stay younger. A singer Debbie Harry has injected this beauty treatment into her skin to stay and feel beautiful, forever.
- offer of the dayAmazon Sale 2023: It’s Raining Discounts On Beauty Products, Don't Miss Out!
- beautyBenefits Of Facial Steaming; How To Do It At Home?
|
english
|
package stud.opencv.server.utils;
import javafx.application.Platform;
import javafx.scene.Node;
import javafx.scene.Scene;
import javafx.stage.Stage;
import stud.opencv.server.fx.PropertiesFxFrame;
import java.util.concurrent.TimeUnit;
/**
* Created by Light on 03.02.2017.
*/
public class FXUtils {
public static void runStyleDevHelper(Stage stage, String host) {
Scheduler.runWithDelay(() -> Platform.runLater(() -> {
Scene scene = stage.getScene();
scene.getStylesheets().clear();
scene.getStylesheets().add(host + "?v=" + System.currentTimeMillis());
stage.sizeToScene();
}), 1, TimeUnit.SECONDS);
}
public static void setMovable(Stage dialog, Node node) {
Delta dragDelta = new Delta();
node.setOnMousePressed(mouseEvent -> {
// record a delta distance for the drag and drop operation.
dragDelta.x = dialog.getX() - mouseEvent.getScreenX();
dragDelta.y = dialog.getY() - mouseEvent.getScreenY();
});
node.setOnMouseDragged(mouseEvent -> {
dialog.setX(mouseEvent.getScreenX() + dragDelta.x);
dialog.setY(mouseEvent.getScreenY() + dragDelta.y);
});
}
private static class Delta { double x, y; }
}
|
java
|
["crawl_status", "generator:crawldb_size", "CC-MAIN-2021-04"] 22704928999
["crawl_status", "generator:fetch_list", "CC-MAIN-2021-04"] 3980206624
["crawl_status", "generator:selected:db_duplicate", "CC-MAIN-2021-04"] 1059166
["crawl_status", "generator:selected:db_fetched", "CC-MAIN-2021-04"] 2145623932
["crawl_status", "generator:selected:db_gone", "CC-MAIN-2021-04"] 76460
["crawl_status", "generator:selected:db_notmodified", "CC-MAIN-2021-04"] 5544952
["crawl_status", "generator:selected:db_orphan", "CC-MAIN-2021-04"] 13591
["crawl_status", "generator:selected:db_redir_perm", "CC-MAIN-2021-04"] 17792209
["crawl_status", "generator:selected:db_redir_temp", "CC-MAIN-2021-04"] 17326509
["crawl_status", "generator:selected:db_unfetched", "CC-MAIN-2021-04"] 1792769805
["crawl_status", "generator:skipped_domains_overflow", "CC-MAIN-2021-04"] 9320
["crawl_status", "fetcher:total", "CC-MAIN-2021-04"] 4304731128
["crawl_status", "fetcher:success", "CC-MAIN-2021-04"] 3409444621
["crawl_status", "fetcher:notmodified", "CC-MAIN-2021-04"] 23666907
["crawl_status", "fetcher:temp_moved", "CC-MAIN-2021-04"] 133952596
["crawl_status", "fetcher:moved", "CC-MAIN-2021-04"] 212581925
["crawl_status", "fetcher:notfound", "CC-MAIN-2021-04"] 105535443
["crawl_status", "fetcher:access_denied", "CC-MAIN-2021-04"] 980927
["crawl_status", "fetcher:gone", "CC-MAIN-2021-04"] 4031652
["crawl_status", "fetcher:exception", "CC-MAIN-2021-04"] 148320153
["crawl_status", "fetcher:robots_denied", "CC-MAIN-2021-04"] 109606192
["crawl_status", "fetcher:robots_denied_maxcrawldelay", "CC-MAIN-2021-04"] 143857
["crawl_status", "fetcher:filtered", "CC-MAIN-2021-04"] 4129763
["crawl_status", "fetcher:redirect_count_exceeded", "CC-MAIN-2021-04"] 2606640
["crawl_status", "fetcher:redirect_deduplicated", "CC-MAIN-2021-04"] 45292256
["crawl_status", "fetcher:hitByThrougputThreshold", "CC-MAIN-2021-04"] 11426935
["crawl_status", "fetcher:hitByTimeLimit", "CC-MAIN-2021-04"] 42826071
["crawl_status", "fetcher:AboveExceptionThresholdInQueue", "CC-MAIN-2021-04"] 50185190
["crawl_status", "fetcher:bytes_downloaded", "CC-MAIN-2021-04"] 387617418169542
["crawl_status", "crawldb:size", "CC-MAIN-2021-04"] 22704928999
["crawl_status", "crawldb:status:db_unfetched", "CC-MAIN-2021-04"] 4286112571
["crawl_status", "crawldb:status:db_fetched", "CC-MAIN-2021-04"] 12206803964
["crawl_status", "crawldb:status:db_gone", "CC-MAIN-2021-04"] 1113131343
["crawl_status", "crawldb:status:db_redir_temp", "CC-MAIN-2021-04"] 401279933
["crawl_status", "crawldb:status:db_redir_perm", "CC-MAIN-2021-04"] 595411182
["crawl_status", "crawldb:status:db_notmodified", "CC-MAIN-2021-04"] 1098610883
["crawl_status", "crawldb:status:db_duplicate", "CC-MAIN-2021-04"] 1042496692
["crawl_status", "crawldb:status:db_orphan", "CC-MAIN-2021-04"] 1961082431
|
json
|
<reponame>andreytkachenko/opencm
use core::ops::Deref;
use rcc;
use common::asm;
use common::VolatileCell;
pub const SPI1: Spi = Spi { addr: 0x40013000 };
pub const SPI2: Spi = Spi { addr: 0x40003800 };
pub const SPI3: Spi = Spi { addr: 0x40003c00 };
pub const SPI4: Spi = Spi { addr: 0x40013400 };
pub const SPI5: Spi = Spi { addr: 0x40015000 };
pub const SPI6: Spi = Spi { addr: 0x40015400 };
mod flags {
pub mod cr1 {
/* BIDIMODE: Bidirectional data mode enable */
pub const BIDIMODE_2LINE_UNIDIR: u32 = 0 << 15;
pub const BIDIMODE_1LINE_BIDIR: u32 = 1 << 15;
pub const BIDIMODE: u32 = 1 << 15;
/* BIDIOE: Output enable in bidirectional mode */
pub const BIDIOE: u32 = 1 << 14;
/* CRCEN: Hardware CRC calculation enable */
pub const CRCEN: u32 = 1 << 13;
/* CRCNEXT: Transmit CRC next */
pub const CRCNEXT: u32 = 1 << 12;
pub const CRCL_8BIT: u32 = 0 << 11;
pub const CRCL_16BIT: u32 = 1 << 11;
/**@}*/
pub const CRCL: u32 = 1 << 11;
pub const DFF_8BIT: u32 = 0 << 11;
pub const DFF_16BIT: u32 = 1 << 11;
/**@}*/
pub const DFF: u32 = 1 << 11;
/* RXONLY: Receive only */
pub const RXONLY: u32 = 1 << 10;
/* SSM: Software slave management */
pub const SSM: u32 = 1 << 9;
/* SSI: Internal slave select */
pub const SSI: u32 = 1 << 8;
/* LSBFIRST: Frame format */
/****************************************************************************/
/** @defgroup spi_lsbfirst SPI lsb/msb first
@ingroup spi_defines
@{*/
pub const MSBFIRST: u32 = 0 << 7;
pub const LSBFIRST: u32 = 1 << 7;
/**@}*/
/* SPE: SPI enable */
pub const SPE: u32 = 1 << 6;
/* BR[2:0]: Baud rate control */
/****************************************************************************/
/** @defgroup spi_baudrate SPI peripheral baud rates
@ingroup spi_defines
@{*/
pub const BAUDRATE_FPCLK_DIV_2: u32 = 0x00 << 3;
pub const BAUDRATE_FPCLK_DIV_4: u32 = 0x01 << 3;
pub const BAUDRATE_FPCLK_DIV_8: u32 = 0x02 << 3;
pub const BAUDRATE_FPCLK_DIV_16: u32 = 0x03 << 3;
pub const BAUDRATE_FPCLK_DIV_32: u32 = 0x04 << 3;
pub const BAUDRATE_FPCLK_DIV_64: u32 = 0x05 << 3;
pub const BAUDRATE_FPCLK_DIV_128: u32 = 0x06 << 3;
pub const BAUDRATE_FPCLK_DIV_256: u32 = 0x07 << 3;
/**@}*/
/****************************************************************************/
/** @defgroup spi_br_pre SPI peripheral baud rate prescale values
@ingroup spi_defines
@{*/
pub const BR_FPCLK_DIV_2: u32 = 0x0;
pub const BR_FPCLK_DIV_4: u32 = 0x1;
pub const BR_FPCLK_DIV_8: u32 = 0x2;
pub const BR_FPCLK_DIV_16: u32 = 0x3;
pub const BR_FPCLK_DIV_32: u32 = 0x4;
pub const BR_FPCLK_DIV_64: u32 = 0x5;
pub const BR_FPCLK_DIV_128: u32 = 0x6;
pub const BR_FPCLK_DIV_256: u32 = 0x7;
/**@}*/
/* MSTR: Master selection */
pub const MSTR: u32 = 1 << 2;
/* CPOL: Clock polarity */
/****************************************************************************/
/** @defgroup spi_cpol SPI clock polarity
@ingroup spi_defines
@{*/
pub const CPOL_CLK_TO_0_WHEN_IDLE: u32 = 0 << 1;
pub const CPOL_CLK_TO_1_WHEN_IDLE: u32 = 1 << 1;
/**@}*/
pub const CPOL: u32 = 1 << 1;
/* CPHA: Clock phase */
/****************************************************************************/
/** @defgroup spi_cpha SPI clock phase
@ingroup spi_defines
@{*/
pub const CPHA_CLK_TRANSITION_1: u32 = 0 << 0;
pub const CPHA_CLK_TRANSITION_2: u32 = 1 << 0;
/**@}*/
pub const CPHA: u32 = 1 << 0;
}
pub mod cr2 {
/* LDMA_TX: Last DMA transfer for transmission */
pub const LDMA_TX: u32 = 1 << 14;
/* LDMA_RX: Last DMA transfer for reception */
pub const LDMA_RX: u32 = 1 << 13;
/* FRXTH: FIFO reception threshold */
pub const FRXTH: u32 = 1 << 12;
/* DS [3:0]: Data size */
/* 0x0 - 0x2 NOT USED */
pub const DS_4BIT: u32 = 0x3 << 8;
pub const DS_5BIT: u32 = 0x4 << 8;
pub const DS_6BIT: u32 = 0x5 << 8;
pub const DS_7BIT: u32 = 0x6 << 8;
pub const DS_8BIT: u32 = 0x7 << 8;
pub const DS_9BIT: u32 = 0x8 << 8;
pub const DS_10BIT: u32 = 0x9 << 8;
pub const DS_11BIT: u32 = 0xA << 8;
pub const DS_12BIT: u32 = 0xB << 8;
pub const DS_13BIT: u32 = 0xC << 8;
pub const DS_14BIT: u32 = 0xD << 8;
pub const DS_15BIT: u32 = 0xE << 8;
pub const DS_16BIT: u32 = 0xF << 8;
pub const DS_MASK: u32 = 0xF << 8;
/* Bits [15:8]: Reserved. Forced to 0 by hardware. Used on F3. */
/* TXEIE: Tx buffer empty interrupt enable */
pub const TXEIE: u32 = 1 << 7;
/* RXNEIE: Rx buffer not empty interrupt enable */
pub const RXNEIE: u32 = 1 << 6;
/* ERRIE: Error interrupt enable */
pub const ERRIE: u32 = 1 << 5;
/* FRF: Frame format */
/* Note: Not used in I2S mode. */
pub const FRF: u32 = 1 << 4;
pub const FRF_MOTOROLA_MODE: u32 = 0 << 4;
pub const FRF_TI_MODE: u32 = 1 << 4;
/* NSSP: NSS pulse management */
pub const NSSP: u32 = 1 << 3;
/* SSOE: SS output enable */
/* Note: Not used in I2S mode. */
pub const SSOE: u32 = 1 << 2;
/* TXDMAEN: Tx buffer DMA enable */
pub const TXDMAEN: u32 = 1 << 1;
/* RXDMAEN: Rx buffer DMA enable */
pub const RXDMAEN: u32 = 1 << 0;
}
pub mod sr {
/* FTLVL[1:0]: FIFO Transmission Level */
pub const FTLVL_FIFO_EMPTY: u32 = 0x0 << 11;
pub const FTLVL_QUARTER_FIFO: u32 = 0x1 << 11;
pub const FTLVL_HALF_FIFO: u32 = 0x2 << 11;
pub const FTLVL_FIFO_FULL: u32 = 0x3 << 11;
/* FRLVL[1:0]: FIFO Reception Level */
pub const FRLVL_FIFO_EMPTY: u32 = 0x0 << 9;
pub const FRLVL_QUARTER_FIFO: u32 = 0x1 << 9;
pub const FRLVL_HALF_FIFO: u32 = 0x2 << 9;
pub const FRLVL_FIFO_FULL: u32 = 0x3 << 9;
/* TIFRFE: TI frame format error */
pub const TIFRFE: u32 = 1 << 8;
/* BSY: Busy flag */
pub const BSY: u32 = 1 << 7;
/* OVR: Overrun flag */
pub const OVR: u32 = 1 << 6;
/* MODF: Mode fault */
/* Note: Not used in I2S mode. */
pub const MODF: u32 = 1 << 5;
/* CRCERR: CRC error flag */
/* Note: Not used in I2S mode. */
pub const CRCERR: u32 = 1 << 4;
/* UDR: Underrun flag */
/* Note: Not used in SPI mode. */
pub const UDR: u32 = 1 << 3;
/* CHSIDE: Channel side */
/* Note: Not used in SPI mode. No meaning in PCM mode. */
pub const CHSIDE: u32 = 1 << 2;
/* TXE: Transmit buffer empty */
pub const TXE: u32 = 1 << 1;
/* RXNE: Receive buffer not empty */
pub const RXNE: u32 = 1 << 0;
}
pub mod i2scfgr {
/* I2SMOD: I2S mode selection */
pub const I2SMOD: u32 = 1 << 11;
/* I2SE: I2S enable */
pub const I2SE: u32 = 1 << 10;
/* I2SCFG[9:8]: I2S configuration mode */
pub const I2SCFG_LSB: u32 = 8;
pub const I2SCFG_SLAVE_TRANSMIT: u32 = 0x0;
pub const I2SCFG_SLAVE_RECEIVE: u32 = 0x1;
pub const I2SCFG_MASTER_TRANSMIT: u32 = 0x2;
pub const I2SCFG_MASTER_RECEIVE: u32 = 0x3;
/* PCMSYNC: PCM frame synchronization */
pub const PCMSYNC: u32 = 1 << 7;
/* Bit 6: Reserved. Forced to 0 by hardware. */
/* I2SSTD[5:4]: I2S standard selection */
pub const I2SSTD_LSB: u32 = 4;
pub const I2SSTD_I2S_PHILIPS: u32 = 0x0;
pub const I2SSTD_MSB_JUSTIFIED: u32 = 0x1;
pub const I2SSTD_LSB_JUSTIFIED: u32 = 0x2;
pub const I2SSTD_PCM: u32 = 0x3;
/* CKPOL: Steady state clock polarity */
pub const CKPOL: u32 = 1 << 3;
/* DATLEN[2:1]: Data length to be transferred */
pub const DATLEN_LSB: u32 = 1;
pub const DATLEN_16BIT: u32 = 0x0;
pub const DATLEN_24BIT: u32 = 0x1;
pub const DATLEN_32BIT: u32 = 0x2;
/* CHLEN: Channel length */
pub const CHLEN: u32 = 1 << 0;
}
pub mod i2spr {
/* Note: None of these bits are used in SPI mode. */
/* Bits [15:10]: Reserved. Forced to 0 by hardware. */
/* MCKOE: Master clock output enable */
pub const MCKOE: u32 = 1 << 9;
/* ODD: Odd factor for the prescaler */
pub const ODD: u32 = 1 << 8;
}
}
#[repr(C)]
pub struct Registers {
pub cr1: VolatileCell<u32>,
pub cr2: VolatileCell<u32>,
pub sr: VolatileCell<u32>,
pub dr: VolatileCell<u32>,
pub crcpr: VolatileCell<u32>,
pub rxcrcr: VolatileCell<u32>,
pub txcrcr: VolatileCell<u32>,
pub i2scfgr: VolatileCell<u32>,
pub i2spr: VolatileCell<u32>,
}
#[derive(PartialEq, Eq)]
pub struct Spi {
addr: usize
}
impl Deref for Spi {
type Target = Registers;
fn deref(&self) -> &Self::Target {
unsafe { &*(self.addr as *const Registers) }
}
}
impl Spi {
/** @brief SPI Reset.
The SPI peripheral and all its associated configuration registers are placed in
the reset condition. The reset is effected via the RCC peripheral reset system.
@param[in] spi_peripheral Unsigned int32. SPI peripheral identifier @ref
spi_reg_base.
*/
pub fn reset(&self) {
match self {
&SPI1 => rcc::reset_pulse(rcc::Peripheral::SPI1),
&SPI2 => rcc::reset_pulse(rcc::Peripheral::SPI2),
&SPI3 => rcc::reset_pulse(rcc::Peripheral::SPI3),
&SPI4 => rcc::reset_pulse(rcc::Peripheral::SPI4),
&SPI5 => rcc::reset_pulse(rcc::Peripheral::SPI5),
&SPI6 => rcc::reset_pulse(rcc::Peripheral::SPI6),
_ => {}
}
}
/* TODO: Error handling? */
/*---------------------------------------------------------------------------*/
/** @brief SPI Enable.
The SPI peripheral is enabled.
@todo Error handling?
@param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base.
*/
pub fn enable(&self) {
self.cr1.check(flags::cr1::SPE); /* Enable SPI. */
}
/* TODO: Error handling? */
/*---------------------------------------------------------------------------*/
/** @brief SPI Disable.
The SPI peripheral is disabled.
@param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base.
*/
pub fn disable(&self) {
self.cr1.uncheck(flags::cr1::SPE); /* Disable SPI. */
}
/*---------------------------------------------------------------------------*/
/** @brief SPI Clean Disable.
Disable the SPI peripheral according to the procedure in section 23.3.8 of the
reference manual. This prevents corruption of any ongoing transfers and
prevents the BSY flag from becoming unreliable.
@param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base.
@returns data Unsigned int16. 8 or 16 bit data from final read.
*/
pub fn clean_disable(&self) -> u16 {
/* Wait to receive last data */
while !self.sr.test(flags::sr::RXNE) { asm::nop(); }
let data = self.dr.get();
/* Wait to transmit last data */
while !self.sr.test(flags::sr::TXE) { asm::nop(); };
/* Wait until not busy */
while self.sr.test(flags::sr::BSY) { asm::nop(); };
self.cr1.uncheck(flags::cr1::SPE);
return data as u16;
}
/*---------------------------------------------------------------------------*/
/** @brief SPI Data Write.
Data is written to the SPI interface.
@param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base.
@param[in] data Unsigned int16. 8 or 16 bit data to be written.
*/
pub fn write(&self, data: u16) {
/* Write data (8 or 16 bits, depending on DFF) into DR. */
self.dr.set(data as u32);
}
/*---------------------------------------------------------------------------*/
/** @brief SPI Data Write with Blocking.
Data is written to the SPI interface after the previous write transfer has
finished.
@param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base.
@param[in] data Unsigned int16. 8 or 16 bit data to be written.
*/
pub fn send(&self, data: u16) {
/* Wait for transfer finished. */
while !self.sr.test(flags::sr::TXE) { asm::nop(); };
/* Write data (8 or 16 bits, depending on DFF) into DR. */
self.dr.set(data as u32);
}
/*---------------------------------------------------------------------------*/
/** @brief SPI Data Read.
Data is read from the SPI interface after the incoming transfer has finished.
@param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base.
@returns data Unsigned int16. 8 or 16 bit data.
*/
pub fn read(&self) -> u16 {
/* Wait for transfer finished. */
while !self.sr.test(flags::sr::RXNE) { asm::nop(); }
/* Read the data (8 or 16 bits, depending on DFF bit) from DR. */
return self.dr.get() as u16;
}
/*---------------------------------------------------------------------------*/
/** @brief SPI Data Write and Read Exchange.
Data is written to the SPI interface, then a read is done after the incoming
transfer has finished.
@param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base.
@param[in] data Unsigned int16. 8 or 16 bit data to be written.
@returns data Unsigned int16. 8 or 16 bit data.
*/
pub fn xfer(&self, data: u16) -> u16 {
self.write(data);
/* Wait for transfer finished. */
while !self.sr.test(flags::sr::RXNE) { asm::nop(); }
/* Read the data (8 or 16 bits, depending on DFF bit) from DR. */
return self.dr.get() as u16;
}
/*---------------------------------------------------------------------------*/
/** @brief SPI Set Bidirectional Simplex Mode.
The SPI peripheral is set for bidirectional transfers in two-wire simplex mode
(using a clock wire and a bidirectional data wire).
@param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base.
*/
pub fn set_bidirectional_mode(&self) {
self.cr1.check(flags::cr1::BIDIMODE);
}
/*---------------------------------------------------------------------------*/
/** @brief SPI Set Unidirectional Mode.
The SPI peripheral is set for unidirectional transfers. This is used in full
duplex mode or when the SPI is placed in two-wire simplex mode that uses a
clock wire and a unidirectional data wire.
@param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base.
*/
pub fn set_unidirectional_mode(&self) {
self.cr1.uncheck(flags::cr1::BIDIMODE);
}
/*---------------------------------------------------------------------------*/
/** @brief SPI Set Bidirectional Simplex Receive Only Mode.
The SPI peripheral is set for bidirectional transfers in two-wire simplex mode
(using a clock wire and a bidirectional data wire), and is placed in a receive
state.
@param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base.
*/
pub fn set_bidirectional_receive_only_mode(&self) {
self.cr1.check(flags::cr1::BIDIMODE);
self.cr1.uncheck(flags::cr1::BIDIOE);
}
/*---------------------------------------------------------------------------*/
/** @brief SPI Set Bidirectional Simplex Receive Only Mode.
The SPI peripheral is set for bidirectional transfers in two-wire simplex mode
(using a clock wire and a bidirectional data wire), and is placed in a transmit
state.
@param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base.
*/
pub fn set_bidirectional_transmit_only_mode(&self) {
self.cr1.check(flags::cr1::BIDIMODE);
self.cr1.check(flags::cr1::BIDIOE);
}
/*---------------------------------------------------------------------------*/
/** @brief SPI Enable the CRC.
The SPI peripheral is set to use a CRC field for transmit and receive.
@param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base.
*/
pub fn enable_crc(&self) {
self.cr1.check(flags::cr1::CRCEN);
}
/*---------------------------------------------------------------------------*/
/** @brief SPI Disable the CRC.
@param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base.
*/
pub fn disable_crc(&self) {
self.cr1.uncheck(flags::cr1::CRCEN);
}
/*---------------------------------------------------------------------------*/
/** @brief SPI Next Transmit is a Data Word
The next transmission to take place is a data word from the transmit buffer.
This must be called before transmission to distinguish between sending
of a data or CRC word.
@param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base.
*/
pub fn set_next_tx_from_buffer(&self) {
self.cr1.uncheck(flags::cr1::CRCNEXT);
}
/*---------------------------------------------------------------------------*/
/** @brief SPI Next Transmit is a CRC Word
The next transmission to take place is a crc word from the hardware crc unit.
This must be called before transmission to distinguish between sending
of a data or CRC word.
@param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base.
*/
pub fn set_next_tx_from_crc(&self) {
self.cr1.check(flags::cr1::CRCNEXT);
}
/*---------------------------------------------------------------------------*/
/** @brief SPI Set Full Duplex (3-wire) Mode
@param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base.
*/
pub fn set_full_duplex_mode(&self) {
self.cr1.uncheck(flags::cr1::RXONLY);
}
/*---------------------------------------------------------------------------*/
/** @brief SPI Set Receive Only Mode for Simplex (2-wire) Unidirectional
Transfers
@param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base.
*/
pub fn set_receive_only_mode(&self) {
self.cr1.check(flags::cr1::RXONLY);
}
/*---------------------------------------------------------------------------*/
/** @brief SPI Disable Slave Management by Hardware
In slave mode the NSS hardware input is used as a select enable for the slave.
@param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base.
*/
pub fn disable_software_slave_management(&self) {
self.cr1.uncheck(flags::cr1::SSM);
}
/*---------------------------------------------------------------------------*/
/** @brief SPI Enable Slave Management by Software
In slave mode the NSS hardware input is replaced by an internal software
enable/disable of the slave (@ref spi_set_nss_high).
@param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base.
*/
pub fn enable_software_slave_management(&self) {
self.cr1.check(flags::cr1::SSM);
/* allow slave select to be an input */
self.cr2.uncheck(flags::cr2::SSOE);
}
/*---------------------------------------------------------------------------*/
/** @brief SPI Set the Software NSS Signal High
In slave mode, and only when software slave management is used, this replaces
the NSS signal with a slave select enable signal.
@todo these should perhaps be combined with an SSM enable as it is meaningless
otherwise
@param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base.
*/
pub fn set_nss_high(&self) {
self.cr1.check(flags::cr1::SSI);
}
/*---------------------------------------------------------------------------*/
/** @brief SPI Set the Software NSS Signal Low
In slave mode, and only when software slave management is used, this replaces
the NSS signal with a slave select disable signal.
@param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base.
*/
pub fn set_nss_low(&self) {
self.cr1.uncheck(flags::cr1::SSI);
}
/*---------------------------------------------------------------------------*/
/** @brief SPI Set to Send LSB First
@param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base.
*/
pub fn send_lsb_first(&self) {
self.cr1.check(flags::cr1::LSBFIRST);
}
/*---------------------------------------------------------------------------*/
/** @brief SPI Set to Send MSB First
@param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base.
*/
pub fn send_msb_first(&self) {
self.cr1.uncheck(flags::cr1::LSBFIRST);
}
/*---------------------------------------------------------------------------*/
/** @brief SPI Set the Baudrate Prescaler
@todo Why is this specification different to the spi_init_master baudrate
values?
@param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base.
@param[in] baudrate Unsigned int8. Baudrate prescale value @ref spi_br_pre.
*/
pub fn set_baudrate_prescaler(&self, baudrate: u8) {
if baudrate > 7 {
return;
}
let mut reg32 = self.cr1.get() & 0xffc7; /* Clear bits [5:3]. */
reg32 |= (baudrate as u32) << 3;
self.cr1.set(reg32);
}
/*---------------------------------------------------------------------------*/
/** @brief SPI Set to Master Mode
@param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base.
*/
pub fn set_master_mode(&self) {
self.cr1.check(flags::cr1::MSTR);
}
/*---------------------------------------------------------------------------*/
/** @brief SPI Set to Slave Mode
@param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base.
*/
pub fn set_slave_mode(&self) {
self.cr1.uncheck(flags::cr1::MSTR);
}
/*---------------------------------------------------------------------------*/
/** @brief SPI Set the Clock Polarity to High when Idle
@param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base.
@sa spi_set_clock_polarity_0
*/
pub fn set_clock_polarity_1(&self) {
self.cr1.check(flags::cr1::CPOL);
}
/*---------------------------------------------------------------------------*/
/** @brief SPI Set the Clock Polarity to Low when Idle
@param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base.
@sa spi_set_clock_polarity_1
*/
pub fn set_clock_polarity_0(&self) {
self.cr1.uncheck(flags::cr1::CPOL);
}
/*---------------------------------------------------------------------------*/
/** @brief SPI Set the Clock Phase to Capture on Trailing Edge
@param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base.
@sa spi_set_clock_phase_0
*/
pub fn set_clock_phase_1(&self) {
self.cr1.check(flags::cr1::CPHA);
}
/*---------------------------------------------------------------------------*/
/** @brief SPI Set the Clock Phase to Capture on Leading Edge
@param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base.
@sa spi_set_clock_phase_1
*/
pub fn set_clock_phase_0(&self) {
self.cr1.uncheck(flags::cr1::CPHA);
}
/*---------------------------------------------------------------------------*/
/** @brief SPI Enable the Transmit Buffer Empty Interrupt
@param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base.
*/
pub fn enable_tx_buffer_empty_interrupt(&self) {
self.cr2.check(flags::cr2::TXEIE);
}
/*---------------------------------------------------------------------------*/
/** @brief SPI Disable the Transmit Buffer Empty Interrupt
@param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base.
*/
pub fn disable_tx_buffer_empty_interrupt(&self) {
self.cr2.uncheck(flags::cr2::TXEIE);
}
/*---------------------------------------------------------------------------*/
/** @brief SPI Enable the Receive Buffer Ready Interrupt
@param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base.
*/
pub fn enable_rx_buffer_not_empty_interrupt(&self) {
self.cr2.check(flags::cr2::RXNEIE);
}
/*---------------------------------------------------------------------------*/
/** @brief SPI Disable the Receive Buffer Ready Interrupt
@param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base.
*/
pub fn disable_rx_buffer_not_empty_interrupt(&self) {
self.cr2.uncheck(flags::cr2::RXNEIE);
}
/*---------------------------------------------------------------------------*/
/** @brief SPI Enable the Error Interrupt
@param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base.
*/
pub fn enable_error_interrupt(&self) {
self.cr2.check(flags::cr2::ERRIE);
}
/*---------------------------------------------------------------------------*/
/** @brief SPI Disable the Error Interrupt
@param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base.
*/
pub fn disable_error_interrupt(&self) {
self.cr2.uncheck(flags::cr2::ERRIE);
}
/*---------------------------------------------------------------------------*/
/** @brief SPI Set the NSS Pin as an Output
Normally used in master mode to allows the master to place all devices on the
SPI bus into slave mode. Multimaster mode is not possible.
@param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base.
*/
pub fn enable_ss_output(&self) {
self.cr2.check(flags::cr2::SSOE);
}
/*---------------------------------------------------------------------------*/
/** @brief SPI Set the NSS Pin as an Input
In master mode this allows the master to sense the presence of other masters. If
NSS is then pulled low the master is placed into slave mode. In slave mode NSS
becomes a slave enable.
@param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base.
*/
pub fn disable_ss_output(&self) {
self.cr2.uncheck(flags::cr2::SSOE);
}
/*---------------------------------------------------------------------------*/
/** @brief SPI Enable Transmit Transfers via DMA
This allows transmissions to proceed unattended using DMA to move data to the
transmit buffer as it becomes available. The DMA channels provided for each
SPI peripheral are given in the Technical Manual DMA section.
@param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base.
*/
pub fn enable_tx_dma(&self) {
self.cr2.check(flags::cr2::TXDMAEN);
}
/*---------------------------------------------------------------------------*/
/** @brief SPI Disable Transmit Transfers via DMA
@param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base.
*/
pub fn disable_tx_dma(&self) {
self.cr2.uncheck(flags::cr2::TXDMAEN);
}
/*---------------------------------------------------------------------------*/
/** @brief SPI Enable Receive Transfers via DMA
This allows received data streams to proceed unattended using DMA to move data
from the receive buffer as data becomes available. The DMA channels provided
for each SPI peripheral are given in the Technical Manual DMA section.
@param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base.
*/
pub fn enable_rx_dma(&self) {
self.cr2.check(flags::cr2::RXDMAEN);
}
/*---------------------------------------------------------------------------*/
/** @brief SPI Disable Receive Transfers via DMA
@param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base.
*/
pub fn disable_rx_dma(&self) {
self.cr2.uncheck(flags::cr2::RXDMAEN);
}
/*---------------------------------------------------------------------------*/
/** @brief SPI Standard Mode selection
@details Set SPI standard Modes
Mode | CPOL | CPHA
---- | ---- | ----
0 | 0 | 0
1 | 0 | 1
2 | 1 | 0
3 | 1 | 1
@param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base.
@param[in] mode Unsigned int8. Standard SPI mode (0, 1, 2, 3)
@sa spi_set_clock_phase_0 spi_set_clock_phase_1
@sa spi_set_clock_polarity_0 spi_set_clock_polarity_1
*/
pub fn set_standard_mode(&self, mode: u8) {
if mode > 3 {
return;
}
let reg32 = self.cr1.get() & !(flags::cr1::CPOL | flags::cr1::CPHA);
self.cr1.set(reg32 | mode as u32);
}
/*---------------------------------------------------------------------------*/
/** @brief Configure the SPI as Master.
The SPI peripheral is configured as a master with communication parameters
baudrate, crc length 8/16 bits, frame format lsb/msb first, clock polarity
and phase. The SPI enable, CRC enable and CRC next controls are not affected.
These must be controlled separately.
@todo NSS pin handling.
@param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base.
@param[in] br Unsigned int32. Baudrate @ref spi_baudrate.
@param[in] cpol Unsigned int32. Clock polarity @ref spi_cpol.
@param[in] cpha Unsigned int32. Clock Phase @ref spi_cpha.
@param[in] crcl Unsigned int32. CRC length 8/16 bits @ref spi_crcl.
@param[in] lsbfirst Unsigned int32. Frame format lsb/msb first @ref
spi_lsbfirst.
@returns int. Error code.
*/
pub fn init_master(&self, br: u32, cpol: u32, cpha: u32, crcl: u32, lsbfirst: u32) {
let mut reg32 = self.cr1.get();
/* Reset all bits omitting SPE, CRCEN and CRCNEXT bits. */
reg32 &= flags::cr1::SPE | flags::cr1::CRCEN | flags::cr1::CRCNEXT;
reg32 |= flags::cr1::MSTR; /* Configure SPI as master. */
reg32 |= br; /* Set baud rate bits. */
reg32 |= cpol; /* Set CPOL value. */
reg32 |= cpha; /* Set CPHA value. */
reg32 |= crcl; /* Set crc length (8 or 16 bits). */
reg32 |= lsbfirst; /* Set frame format (LSB- or MSB-first). */
/* TODO: NSS pin handling. */
self.cr1.set(reg32);
}
pub fn send8(&self, data: u8) {
/* Wait for transfer finished. */
while !self.sr.test(flags::sr::TXE) { asm::nop(); };
/* Write data (8 or 16 bits, depending on DFF) into DR. */
self.dr.set(data as u32);
}
fn read8(&self) -> u8 {
/* Wait for transfer finished. */
while !self.sr.test(flags::sr::RXNE) { asm::nop(); };
/* Read the data (8 or 16 bits, depending on DFF bit) from DR. */
self.dr.get() as u8
}
/*---------------------------------------------------------------------------*/
/** @brief SPI Set CRC length to 8 bits
@param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base.
*/
pub fn set_crcl_8bit(&self) {
self.cr1.uncheck(flags::cr1::CRCL);
}
/*---------------------------------------------------------------------------*/
/** @brief SPI Set CRC length to 16 bits
@param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base.
*/
pub fn set_crcl_16bit(&self) {
self.cr1.check(flags::cr1::CRCL);
}
pub fn set_data_size(&self, data_size: u32) {
let mut reg32 = self.cr2.get();
reg32 &= !flags::cr2::DS_MASK;
reg32 |= data_size & flags::cr2::DS_MASK;
self.cr2.set(reg32);
}
pub fn fifo_reception_threshold_8bit(&self) {
self.cr2.check(flags::cr2::FRXTH);
}
pub fn fifo_reception_threshold_16bit(&self) {
self.cr2.uncheck(flags::cr2::FRXTH);
}
pub fn i2s_mode_spi_mode(&self) {
self.i2scfgr.uncheck(flags::i2scfgr::I2SMOD);
}
/*---------------------------------------------------------------------------*/
/** @brief SPI Set Data Frame Format to 8 bits
@param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base.
*/
pub fn set_dff_8bit(&self) {
self.cr1.uncheck(flags::cr1::DFF);
}
/*---------------------------------------------------------------------------*/
/** @brief SPI Set Data Frame Format to 16 bits
@param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base.
*/
pub fn set_dff_16bit(&self) {
self.cr1.check(flags::cr1::DFF);
}
}
|
rust
|
La Liga remains the crucible of football, with a majority of world superstars plying their trade for Barcelona and Real Madrid. Cristiano Ronaldo and Leo Messi remain the most iconic names in the world of football, with the Argentine currently valued the highest in the world – at a staggering £102 million, way higher that the world record fee of Paul Pogba (£89.6 million)
A move to a top team in La Liga does not always guarantee an increase in transfer value, with multiple players struggling for game time and consequently being valued poorly.
Here are the top 10 La Liga stars with the largest decrease in transfer value in 2016. (Stats courtesy: Transfermarkt)
Forever linked with Manchester United, Nico Gaitan surprised everyone with a move to Atletico Madrid in the summer. The Argentine midfielder was once considered on of the hottest prospects in the world when he moved from Boca Juniors to Benfica in 2010, but has failed to set the world alight.
Benfica managed to eke out a €25 million fee from Atletico Madrid in the summer for Gaitan’s services. It was viewed as a smart buy by Rojiblancos fans, but the midfielder has been restricted to substitute appearances for Atletico.
Having only managed 918 minutes in 19 appearances for Atletico (avg 48 min per appearance) this season in all competitions, Gaitan’s 4 goals and 2 assists does not seem to cut muster, thus reducing in a 26.7% drop in his transfer value, which is also precipiated by the fact that Gaitan will turn 29 in February.
The presence of another over-hyped Argentinian footballer forever linked with Manchester United who played for Benfica in this list is not really surprising. Garay was once considered one of the most promising young defenders in the world when he moved from Racing Santander to Real Madrid in 2008, but things have gone downhill since then.
The player enjoyed a revival at Benfica, subsequently moving on to Zenit St. Petersburg for €6 million. Eyebrows were raised when Valencia parted with a cool €20 million for a declining 30-year-old in the summer of 2016. His performances subsequently have ensured his transfer value has gone down, with Valencia languishing in 15th place in La Liga.
Garay has played over half the games for Valencia in La Liga, totalling 990 minutes in 11 appearances for the club. Los Che have conceded a staggering 33 goals in just 18 games of La Liga, which is the fourth-worst defence in Spain – with Garay often a culprit for the concession of goals. It’s no wonder that he’s experienced a 34.8% drop in transfer value.
Jeremy Mathieu’s presence in this list would not come as a surprise to Barcelona fans, with the Frenchman hardly a fan-favourite. It’s a steep decline in reputation for Mathieu after moving to Barcelona, but that is hardly surprising considering he is 33 years old.
When Unai Emery signed Mathieu for free in 2009, Valencia fans grew to love the centre-back quickly – with his all-action performances often a lone shining star in a declining Valencia side. That prompted Barcelona to part with €20 million for the Frenchman in 2014, and set a staggering €50 million as his buyout clause.
You’d be hard pressed to even find a Chinese Super League club willing to part with that amount for Mathieu now. The Frenchman has only managed 8 appearances for Barcelona this season, and coupled with him turning 33 last October, Mathieu experienced a 64.3% drop in transfer value.
A 24-year-old who has experienced a decrease in transfer market value should seriously re-evaluate the direction of his career, but the amout of times that it has been the story of a Real Madrid youngster is not surprising. Isco’s talent is still undeniable, having showed flashes of brilliance on the rare occasion he has been called upon by Zinedine Zidane.
The Spanish midfielder has made 20 appearances this season under Zinedine Zidane, although it has often been as a substitute, averaging 54 minutes per appearance, with most of his 90 minute appearances in the cups. A return of 4 goals and 4 assists is fairly decent, although that has still resulted in a 22.2% drop in transfer value.
Ironically enough, Isco’s valuation of £38.25m at the start of 2016 was his highest ever, with many expecting the youngster to take La Liga by storm as he reaches his peak football years. If Real Madrid do decide to sell the Spaniard, they are likely to recoup the €30 million fee they paid Malaga in 2013.
Not many would guess Enzo Perez when asked to name to 10th most expensive Argentine player of all time, but the defensive midfielder’s performances for Benfica in Europe gained him worldwide notoreity and thus, a €25 million fee when Valencia came calling in the summer of 2015.
The tough-tackling midfielder has proceeded to endure a miserable time at Los Che, missing a staggering 31 games through injury, while another 4 through suspensions in just 2 and a half seasons at the club. It’s no wonder then, that Perez has lost 50% of his transfer value, escpecially after turning 30 years old.
There’s not much hope for Perez – while he has been ever present for Valencia this season, racking up 1300 minutes on the pitch in 16 appearances. Given the La Liga side’s poor position in the table due to a poor defensive output, it doesn’t seem like his transfer value will be going up anytime soon.
Cristiano Ronaldo described 2016 as the best year of his career, which is quite the feat for the multiple Champions League, La Liga and Premier League winning superstar. The past year has seen Ronaldo lift Euro 2016 with Portugal, the UEFA Champions League and Club World Cup with Real Madrid and also win the Ballon d’Or, being crowned the FIFA BEST Men’s Player of 2016 as well.
The only explanation for Ronaldo’s decrease in transfer value is perhaps his age – he will turn 32 in February. Despite a ton of criticism in the 2016/17 season, Ronaldo has been involved in 24 goals (18 goals, 6 assists) in 23 appearances for Real Madrid this season – although there seems to be a reduction in his effectiveness for teammates the past couple of months.
Ronaldo is still the 2nd most valuable player in the world though, tied with Neymar. And with his personal ‘brand’ having doubled in value in the last two years according to a study by Portuguese market research centre IPAM, Ronaldo should be fine, despite a 9.1% decrease in transfer value.
For a player to have made just 56 appearances in 5 and a half seasons at the club is downright awful. Coentrao being injury prone has also been a factor, as the left-back has missed 51 games for Real Madrid through injury.
It’s a poor return for the €30 million Real Madrid paid Benfica in 2011, with Coentrao just managing a paltry 150 minutes on the pitch in 4 appearances for Real Madrid this season. No wonder then, that the Portuguese defender has seen his value fall by 58.3% in 2016. He’s still 28 years old though, and can perhaps reverse the downward trend of his career.
Cruzeiro were paid €14 million for Lucas Silva by Real Madrid in January 2015 – a deal that looks like daylight robbery right now. Brazilian youngsters are always a gamble, but Lucas came with a burgeoning reputation.
He was loaned to Marseille, but that quickly proved to be a disaster as he refused to cut short the loan deal despite not shining on the pitch and was relegated to the reserves. To put his current plight in perspective, Lucas has not even been named in Real Madrid’s squad for the 2016/17 season.
It’s hardly a surprise then, that his value has fallen 84.6% in 2016. Real Madrid would find it difficult to find any suitors for the 23-year-old.
News of Eliaquim Mangala’s loan deal with Valencia was met with positive reactions from Manchester City fans in the summer. The talented young defender could have time away from the pressures of English football to develop technically, La Liga’s strong suit.
It’s gone pear-shaped. Mangala has been part of a Valencia defence that has conceded 33 times, with the Frenchman making 16 appearances for Los Che. 15th place in La Liga is hardly where you would expect a player who is expected to be part of Manchester City’s title challenge next year to be.
The 42 million that City parted with for Mangala’s services look increasingly like a blunder of epic proportions, which has consequently seen his value reduce by 46.4 % in 2016.
James Rodriguez’ presence in the list makes it 5 Real Madrid players to have dropped the most in transfer value in 2016. The Colombian was the fourth-most expensive player in the world when Real Madrid paid AS Monaco €80 million after an impressive 2014 FIFA World Cup.
The Colombian took his time to adapt to La Liga, but has shown flashes of brilliance. Zinedine Zidane’s system does not seem to suit James, who has consequently seen his time on the pitch reduce massively. Yet, he has impressed when called upon, being involved in a goal every 70 minutes.
James has scored 4 and assisted 10 goals in 18 appearances for Real Madrid this season, playing just 982 minutes, most of which came in the Copa del Rey. With his situation unlikely to change, the Colombian has seen his value fall by a staggering 37.5% in 2016.
|
english
|
<filename>docs/data/leg-t2/088/08802375.json
{"nom":"Raves","circ":"2ème circonscription","dpt":"Vosges","inscrits":400,"abs":227,"votants":173,"blancs":11,"nuls":5,"exp":157,"res":[{"nuance":"LR","nom":"<NAME>","voix":87},{"nuance":"REM","nom":"<NAME>","voix":70}]}
|
json
|
#define WIN32_LEAN_AND_MEAN
#define STRICT_GS_ENABLED
#define _ATL_NO_AUTOMATIC_NAMESPACE
#define _ATL_NO_DEFAULT_LIBS
#define _ATL_NO_WIN_SUPPORT
#define _CRTDBG_MAP_ALLOC
#include <atlbase.h>
#include <windows.h>
#include <winioctl.h>
#include <algorithm>
#include "reflink.h"
#include <crtdbg.h>
constexpr LONG64 inline ROUNDUP(LONG64 file_size, ULONG cluster_size) noexcept
{
return (file_size + cluster_size - 1) / cluster_size * cluster_size;
}
static_assert(ROUNDUP(5678, 4 * 1024) == 8 * 1024);
_Success_(return == true)
bool reflink(_In_z_ PCWSTR oldpath, _In_z_ PCWSTR newpath)
{
ATL::CHandle source(CreateFileW(oldpath, GENERIC_READ, FILE_SHARE_READ, nullptr, OPEN_EXISTING, 0, nullptr));
if (source == INVALID_HANDLE_VALUE)
{
source.Detach();
return false;
}
ULONG fs_flags;
if (!GetVolumeInformationByHandleW(source, nullptr, 0, nullptr, nullptr, &fs_flags, nullptr, 0))
{
return false;
}
if (!(fs_flags & FILE_SUPPORTS_BLOCK_REFCOUNTING))
{
SetLastError(ERROR_NOT_CAPABLE);
return false;
}
FILE_END_OF_FILE_INFO file_size;
if (!GetFileSizeEx(source, &file_size.EndOfFile))
{
return false;
}
FILE_BASIC_INFO file_basic;
if (!GetFileInformationByHandleEx(source, FileBasicInfo, &file_basic, sizeof file_basic))
{
return false;
}
ULONG junk;
FSCTL_GET_INTEGRITY_INFORMATION_BUFFER get_integrity;
if (!DeviceIoControl(source, FSCTL_GET_INTEGRITY_INFORMATION, nullptr, 0, &get_integrity, sizeof get_integrity, &junk, nullptr))
{
return false;
}
#ifdef _DEBUG
SetFileAttributesW(newpath, FILE_ATTRIBUTE_NORMAL);
ATL::CHandle destination(CreateFileW(newpath, GENERIC_READ | GENERIC_WRITE | DELETE, 0, nullptr, CREATE_ALWAYS, 0, source));
#else
ATL::CHandle destination(CreateFileW(newpath, GENERIC_READ | GENERIC_WRITE | DELETE, 0, nullptr, CREATE_NEW, 0, source));
#endif
if (destination == INVALID_HANDLE_VALUE)
{
destination.Detach();
return false;
}
FILE_DISPOSITION_INFO dispose = { TRUE };
if (!SetFileInformationByHandle(destination, FileDispositionInfo, &dispose, sizeof dispose))
{
return false;
}
if (!DeviceIoControl(destination, FSCTL_SET_SPARSE, nullptr, 0, nullptr, 0, &junk, nullptr))
{
return false;
}
FSCTL_SET_INTEGRITY_INFORMATION_BUFFER set_integrity = { get_integrity.ChecksumAlgorithm, get_integrity.Reserved, get_integrity.Flags };
if (!DeviceIoControl(destination, FSCTL_SET_INTEGRITY_INFORMATION, &set_integrity, sizeof set_integrity, nullptr, 0, nullptr, nullptr))
{
return false;
}
if (!SetFileInformationByHandle(destination, FileEndOfFileInfo, &file_size, sizeof file_size))
{
return false;
}
const LONG64 split_threshold = (1LL << 32) - get_integrity.ClusterSizeInBytes;
DUPLICATE_EXTENTS_DATA dup_extent;
dup_extent.FileHandle = source;
for (LONG64 offset = 0, remain = ROUNDUP(file_size.EndOfFile.QuadPart, get_integrity.ClusterSizeInBytes); remain > 0; offset += split_threshold, remain -= split_threshold)
{
dup_extent.SourceFileOffset.QuadPart = dup_extent.TargetFileOffset.QuadPart = offset;
dup_extent.ByteCount.QuadPart = (std::min)(split_threshold, remain);
_ASSERTE(dup_extent.SourceFileOffset.QuadPart % get_integrity.ClusterSizeInBytes == 0);
_ASSERTE(dup_extent.ByteCount.QuadPart % get_integrity.ClusterSizeInBytes == 0);
_ASSERTE(dup_extent.ByteCount.QuadPart <= UINT32_MAX);
_RPT3(_CRT_WARN, "Remain=%llx\nOffset=%llx\nLength=%llx\n\n", remain, dup_extent.SourceFileOffset.QuadPart, dup_extent.ByteCount.QuadPart);
if (!DeviceIoControl(destination, FSCTL_DUPLICATE_EXTENTS_TO_FILE, &dup_extent, sizeof dup_extent, nullptr, 0, &junk, nullptr))
{
_CrtDbgBreak();
return false;
}
}
if (!(file_basic.FileAttributes & FILE_ATTRIBUTE_SPARSE_FILE))
{
FILE_SET_SPARSE_BUFFER set_sparse = { FALSE };
if (!DeviceIoControl(destination, FSCTL_SET_SPARSE, &set_sparse, sizeof set_sparse, nullptr, 0, &junk, nullptr))
{
return false;
}
}
file_basic.CreationTime.QuadPart = 0;
if (!SetFileInformationByHandle(destination, FileBasicInfo, &file_basic, sizeof file_basic))
{
return false;
}
if (!FlushFileBuffers(destination))
{
return false;
}
dispose = { FALSE };
return !!SetFileInformationByHandle(destination, FileDispositionInfo, &dispose, sizeof dispose);
}
|
cpp
|
import numpy as np
import math
import time
class PulsedProgramming:
"""
This class contains all the parameters for the Pulsed programming on a memristor model.
After initializing the parameters values, start the simulation with self.simulate()
Parameters
----------
max_voltage : float
The max voltage (V) of a pulse. If 0, no limit is apply.
pulse_algorithm : string
The pulse algorithm use. Those are the available choices (Sources in the methods). Default is 'fabien'.
'fabien' : Use fabien_convergence()
'log' : Use a log_convergence()
tolerance : float
The tolerance_value input is an int that represent the absolute tolerance (Ohm) from the res_states the
pulsed programming will find. Smaller is more precise, but too small can never converge.
is_relative_tolerance : bool
If true, the tolerance_value would be in percentage instead of (Ohm). ex: 10 : if true, 10% : if false, 10 Ohm
variability_write : iterable[float]
A gaussian distribution with (mu=0, sigma=variance_write)
index_variability : int
Index of the current variability. If over 1000, reset to 0.
variance_write : float
Variance of the gaussian distribution on the memristor write. See variability.
graph_resistance : List[Union[float, int]]
Contains all resistance of the simulation. It's used in the creation of plots.
graph_voltages : List[Union[float, int]]
Contains all voltages of the simulation. It's used in the creation of plots.
number_of_reading : int
The number of correct value read before passing to the next state.
max_pulse : int
The max number of pulses.
"""
def __init__(self, memristor_simulation, pulse_algorithm='fabien', max_voltage=0, tolerance=0, is_relative_tolerance=False,
variance_write=0, number_of_reading=1, max_pulse=20000, verbose=False, plot_memristor=0):
self.memristor_simulation = memristor_simulation
self.pulse_algorithm = pulse_algorithm
self.tolerance = tolerance
self.max_voltage = max_voltage
self.is_relative_tolerance = is_relative_tolerance
self.variance_write = variance_write
self.number_of_reading = number_of_reading
self.max_pulse = max_pulse
self.verbose = verbose
self.voltage_output = {}
self.plot_memristor = plot_memristor
self.index_variability = 0
self.variability_write = np.random.normal(0, variance_write, 1000)
self.graph_resistance = []
self.graph_voltages = []
def print(self):
print(self.pulse_algorithm)
print(self.tolerance)
print(self.max_voltage)
print(self.voltage_output)
print(self.is_relative_tolerance)
print(self.variance_write)
print(self.number_of_reading)
print(self.max_pulse)
print(self.verbose)
print(np.array(self.graph_resistance))
print(np.array(self.graph_voltages))
def write_resistance(self, memristor, voltage, t_pulse):
"""
This function change the resistance of the memristor by applying a voltage fo t_pulse.
Parameters
----------
memristor : Memristor
The memristor wrote.
voltage : float
The voltage (V) applied.
t_pulse : float
The time of the writing pulse. (s)
Returns
----------
"""
t = int(t_pulse / memristor.time_series_resolution)
signal = [voltage] * t
memristor.simulate(signal)
self.index_variability = self.index_variability + 1 if self.index_variability < len(self.variability_write) - 1 else 0
memristor.g = 1 / (1 / memristor.g + (1 / memristor.g) * self.variability_write[self.index_variability])
def find_number_iteration(self):
"""
This function find the number of iteration needed to create the resistance list depending on the distribution type
Returns
----------
number_iteration : int
number of iteration
"""
number_iteration = 1
if self.distribution_type == 'full_spread':
number_iteration = self.circuit.number_of_memristor
return number_iteration
def simulate(self, voltages_target, precision=None):
"""
This function will set the memristors to the resistance wanted in each voltages_target package.
Parameters
----------
voltages_target : dict
dict with keys as voltage and package as list of resistance
precision : list
[[macro_tune, is_relative_variability], [fine_tune, is_relative_variability]] for the balance() method.
"""
if self.pulse_algorithm != 'fabien' and self.pulse_algorithm != 'log':
raise(Exception(f'Pulse algorithm not supported: {self.pulse_algorithm}'))
# voltages_target_list = list(voltages_target.keys())
# resolution = voltages_target_list[1] - voltages_target_list[0]
index = 1
conf_done = 0
start_time = time.time()
diff_voltage = {}
for v in list(voltages_target.keys()):
if index == 1:
start_time_ = time.time()
self.simulate_list_memristor(voltages_target[v], precision)
self.voltage_output[self.memristor_simulation.circuit.current_v_out()] = [i.read() for i in self.memristor_simulation.circuit.list_memristor]
diff_voltage[abs(v - self.memristor_simulation.circuit.current_v_out())] = [round(1 / np.sum([1/res for res in voltages_target[v]]), 4), round(1 / self.memristor_simulation.circuit.current_conductance(), 4)]
if index == 50 and self.verbose:
conf_done += index
print(f'Conf done: {conf_done}\tTook: {round(time.time() - start_time_, 2)} s\tTime left: {round((time.time() - start_time_) * (len(voltages_target.keys()) - conf_done) / 50, 2)} s')
index = 0
index += 1
if self.verbose:
print(f'Total time: {time.time() - start_time}')
print()
for key in diff_voltage.keys():
print(f'{round(key*1000, 4)} mV\t{diff_voltage.get(key)[0]}\t{diff_voltage.get(key)[1]} (Ohm)')
print(f'Mean diff: {np.mean(list(diff_voltage.keys()))}')
print(f'Min diff: {np.min(list(diff_voltage.keys()))}\tMax diff: {np.max(list(diff_voltage.keys()))}')
return self.voltage_output
def simulate_list_memristor(self, list_resistance, precision):
"""
This function will set the memristors to the resistance wanted list_resistance.
Parameters
----------
list_resistance : list
list of the wanted resistance for the memristor.
precision : list
[[macro_tune, is_relative_variability], [fine_tune, is_relative_variability]] for the balance() method.
"""
for i in range(self.memristor_simulation.circuit.number_of_memristor):
plot = True if i == self.plot_memristor else False
if self.pulse_algorithm == 'fabien':
self.fabien_convergence(self.memristor_simulation.circuit.list_memristor[i], list_resistance[i], plot=plot)
elif self.pulse_algorithm == 'log':
self.log_convergence(self.memristor_simulation.circuit.list_memristor[i], list_resistance[i], plot=plot)
self.balance(list_resistance, precision)
def balance(self, list_resistance, precision):
"""
This function will set the memristors to the resistance wanted list_resistance.
Parameters
----------
list_resistance : list
list of the wanted resistance for the memristor.
precision : list
[[macro_tune, is_relative_variability], [fine_tune, is_relative_variability]] for the balance() method. If 0,
won't do it.
"""
final_g = np.sum([1 / i for i in list_resistance])
delta_g = final_g - self.memristor_simulation.circuit.current_conductance()
for i in range(self.memristor_simulation.circuit.number_of_memristor):
plot = True if -(i+1) == self.plot_memristor else False
final_res = 1 / (self.memristor_simulation.circuit.list_memristor[-(i+1)].g + delta_g)
if self.memristor_simulation.circuit.memristor_model.r_on <= final_res <= self.memristor_simulation.circuit.memristor_model.r_off:
p_tolerance, p_relative = self.tolerance, self.is_relative_tolerance
# print(f'{final_res}\t{1 / self.memristor_simulation.circuit.list_memristor[-(i+1)].g}\t{final_g - self.memristor_simulation.circuit.current_conductance()}')
if precision[0][0] != 0 or precision is not None:
self.tolerance, self.is_relative_tolerance = precision[0][0], precision[0][1]
self.fabien_convergence(self.memristor_simulation.circuit.list_memristor[-(i+1)], final_res, plot)
# print(f'{final_res}\t{1 / self.memristor_simulation.circuit.list_memristor[-(i+1)].g}\t{final_g - self.memristor_simulation.circuit.current_conductance()}')
if precision[1][0] != 0 or precision is not None:
self.tolerance, self.is_relative_tolerance = precision[1][0], precision[1][1]
self.small_convergence(self.memristor_simulation.circuit.list_memristor[-(i+1)], final_res, plot)
# print(f'{final_res}\t{1 / self.memristor_simulation.circuit.list_memristor[-(i+1)].g}\t{final_g - self.memristor_simulation.circuit.current_conductance()}')
self.tolerance, self.is_relative_tolerance = p_tolerance, p_relative
break
def small_convergence(self, memristor, target_res, plot=False):
"""
This function run the pulsed programming with a variable voltage to set the target_res for the memristor with a
really small increment.
Parameters
----------
memristor : Memristor
The memristor object
target_res : float
The target resistance
"""
step = 0.001
positive_voltage = voltage_set = 0.1
negative_voltage = voltage_reset = -0.1
if self.is_relative_tolerance:
res_max = target_res + self.tolerance * target_res / 100
res_min = target_res - self.tolerance * target_res / 100
else:
res_max = target_res + self.tolerance
res_min = target_res - self.tolerance
start_len_res = len(self.graph_resistance)
start_len_v = len(self.graph_voltages)
counter = 0
action = 'read'
flag_finish = False
counter_read = 0
while not flag_finish:
current_res = memristor.read()
if res_min <= current_res <= res_max:
counter_read += 1
if plot:
action = 'read'
self.graph_voltages.append([0.2, counter + start_len_v, action])
elif current_res < res_min:
if self.max_voltage != 0:
negative_voltage = -self.max_voltage if negative_voltage <= -self.max_voltage else negative_voltage
self.write_resistance(memristor, negative_voltage, 200e-9)
if plot:
action = 'reset'
self.graph_voltages.append([negative_voltage, counter + start_len_v, action])
negative_voltage -= step
positive_voltage = voltage_set
elif current_res > res_max:
if self.max_voltage != 0:
positive_voltage = self.max_voltage if positive_voltage >= self.max_voltage else positive_voltage
self.write_resistance(memristor, positive_voltage, 200e-9)
if plot:
action = 'set'
self.graph_voltages.append([positive_voltage, counter + start_len_v, action])
positive_voltage += step
negative_voltage = voltage_reset
if counter_read == self.number_of_reading:
flag_finish = not flag_finish
if counter >= self.max_pulse:
flag_finish = not flag_finish
print(f'Got max pulse {self.max_pulse}')
if plot:
self.graph_resistance.append([current_res, counter + start_len_res, action, flag_finish])
counter += 1
def log_convergence(self, memristor, target_res, plot=False):
"""
This function run the pulsed programming with a variable voltage to set the target_res for the memristor.
From : https://arxiv.org/abs/2103.09931
Parameters
----------
memristor : Memristor
The memristor object
target_res : float
The target resistance
"""
positive_voltage = voltage_set = 0.5
negative_voltage = voltage_reset = -0.5
# additional parameters
min_shift = 0.005
max_shift = 0.2
a = 0.1
if self.is_relative_tolerance:
res_max = target_res + self.tolerance * target_res / 100
res_min = target_res - self.tolerance * target_res / 100
else:
res_max = target_res + self.tolerance
res_min = target_res - self.tolerance
start_len_res = len(self.graph_resistance)
start_len_v = len(self.graph_voltages)
counter = 0
action = 'read'
flag_finish = False
counter_read = 0
r_shift = 1
current_res = memristor.read()
while not flag_finish:
if res_min < current_res < res_max:
counter_read += 1
if plot:
action = 'read'
self.graph_voltages.append([0.2, counter + start_len_v, action])
elif current_res > res_max:
if r_shift < min_shift * (memristor.r_off - memristor.r_on):
positive_voltage += a * np.log10(abs(target_res - current_res) / r_shift)
elif r_shift > max_shift * (memristor.r_off - memristor.r_on):
positive_voltage = voltage_set
if self.max_voltage != 0:
positive_voltage = self.max_voltage if positive_voltage >= self.max_voltage else positive_voltage
self.write_resistance(memristor, positive_voltage, 200e-9)
if plot:
action = 'set'
self.graph_voltages.append([positive_voltage, counter + start_len_v, action])
elif current_res < res_min:
if r_shift < min_shift * (memristor.r_off - memristor.r_on):
negative_voltage -= a * np.log10(abs((target_res - current_res) / r_shift))
elif r_shift > max_shift * (memristor.r_off - memristor.r_on):
negative_voltage = voltage_reset
if self.max_voltage != 0:
negative_voltage = -self.max_voltage if negative_voltage <= -self.max_voltage else negative_voltage
self.write_resistance(memristor, negative_voltage, 200e-9)
if plot:
action = 'reset'
self.graph_voltages.append([negative_voltage, counter + start_len_v, action])
if counter_read == self.number_of_reading:
flag_finish = not flag_finish
if counter >= self.max_pulse:
flag_finish = not flag_finish
print('Got max pulse')
if plot:
self.graph_resistance.append([current_res, counter + start_len_res, action, flag_finish])
counter += 1
previous_res = current_res
current_res = memristor.read()
r_shift = abs(current_res - previous_res) if abs(current_res - previous_res) != 0 else 1
def fabien_convergence(self, memristor, target_res, plot=False):
"""
This function run the pulsed programming with a variable voltage to set the target_res for the memristor.
From : https://iopscience.iop.org/article/10.1088/0957-4484/23/7/075201
Parameters
----------
memristor : Memristor
The memristor object
target_res : float
The target resistance
"""
step = 0.005
positive_voltage = voltage_set = 0.5
negative_voltage = voltage_reset = -0.5
if self.is_relative_tolerance:
res_max = target_res + self.tolerance * target_res / 100
res_min = target_res - self.tolerance * target_res / 100
else:
res_max = target_res + self.tolerance
res_min = target_res - self.tolerance
start_len_res = len(self.graph_resistance)
start_len_v = len(self.graph_voltages)
counter = 0
action = 'read'
flag_finish = False
counter_read = 0
while not flag_finish:
current_res = memristor.read()
if res_min <= current_res <= res_max:
counter_read += 1
if plot:
action = 'read'
self.graph_voltages.append([0.2, counter + start_len_v, action])
elif current_res < res_min:
if self.max_voltage != 0:
negative_voltage = -self.max_voltage if negative_voltage <= -self.max_voltage else negative_voltage
self.write_resistance(memristor, negative_voltage, 200e-9)
if plot:
action = 'reset'
self.graph_voltages.append([negative_voltage, counter + start_len_v, action])
negative_voltage -= step
positive_voltage = voltage_set
elif current_res > res_max:
if self.max_voltage != 0:
positive_voltage = self.max_voltage if positive_voltage >= self.max_voltage else positive_voltage
self.write_resistance(memristor, positive_voltage, 200e-9)
if plot:
action = 'set'
self.graph_voltages.append([positive_voltage, counter + start_len_v, action])
positive_voltage += step
negative_voltage = voltage_reset
if counter_read == self.number_of_reading:
flag_finish = not flag_finish
if counter >= self.max_pulse:
flag_finish = not flag_finish
print('Got max pulse')
if plot:
self.graph_resistance.append([current_res, counter + start_len_res, action, flag_finish])
# print(f'{self.graph_resistance[-1]}\t{self.graph_voltages[-1]}')
counter += 1
|
python
|
<filename>public/json/words/hebrew-7656.json
{"pos":"proper","translits":{"šiḇ·‘āh":{"gen.26.33|2":["it","Shebah–","upon"]}},"meanings":{"shebah":1},"meaningsCount":1,"occurences":1}
|
json
|
.home-page-modal {
padding: 50px;
z-index: 1000;
text-align: center;
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background: rgba( 255, 255, 255, 0.35 );
box-shadow: 0 8px 32px 0 rgba( 31, 38, 135, 0.37 );
backdrop-filter: blur( 2.5px );
-webkit-backdrop-filter: blur( 2.5px );
border-radius: 10px;
border: 1px solid rgba( 255, 255, 255, 0.18 );
}
#textSvg {
margin: 30px;
border-radius: 50px;
}
.card-body {
padding: 20px;
text-align: center;
justify-content: center;
align-items: center;
}
.card-header {
text-align: center;
}
.card {
margin: 10px;
background: rgba( 255, 255, 255, 0.35 );
box-shadow: 0 8px 32px 0 rgba( 31, 38, 135, 0.37 );
backdrop-filter: blur( 2.5px );
-webkit-backdrop-filter: blur( 2.5px );
border-radius: 10px;
border: 1px solid rgba( 255, 255, 255, 0.18 );
}
|
css
|
Liverpool FC’s Kit Manager Lee Radcliffe on Monday revealed the real reason behind the team’s defender Trent Alexander-Arnold’s jersey number 66.
Explaining the reason behind his jersey number, Lee stated that whenever a new and a young player joins the side, the management tends to give him a higher Jersey number.
“When we get any young lads that come down from the academy, we always deliberately try to give them a high-ish number. We don’t like to give them a low number in case they sort of think they’ve made it straight away, if you know what I mean,” official website of Liverpool quoted Radcliffe as saying.
“When you see him now lifting trophies and celebrating with 66 on the back, it’s a weird feeling and I can’t really describe it. It’s weird to see such a high number and for someone to be happy with it,” he added.
The 21-year-old Arnold has been a phenomenal talent, the side has seen him grow as a player since his inclusion in the senior team in 2016. Wearing the jersey number 66, Arnold has made 125 appearances for the side and has been a part of the Champions League-winning team.
Not just for Liverpool, Arnold has also cemented his place as the first-team player in the England Football team also, however, he continues to wear the number 66 – and Liverpool’s kit management coordinator Lee Radcliffe puts that down to the right-back’s modest personality.
Before the halting of the Premier League due to the coronavirus, Liverpool FC was just three wins away from their first-ever Premier-League Title in 30 years.
|
english
|
“சரி சரி நான் வந்துடறேன் நீ போய் தூங்கு” என சொல்ல அவளும் போனை வைத்துவிட்டு சென்று உறங்கலானாள்.
This story is now available on Chillzee KiMo.
Sasirekha has written more than 33 Tamil series in Chillzee and many more Novels in Chillzee KiMo.
Copyright © 2009 - 2023 Chillzee.in. All Rights Reserved.
|
english
|
package de.mari_023.fabric.ae2wtlib.wct;
import com.mojang.blaze3d.systems.RenderSystem;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.widget.AbstractButtonWidget;
import net.minecraft.client.render.VertexConsumerProvider;
import net.minecraft.client.render.entity.EntityRenderDispatcher;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.client.util.math.Vector3f;
import net.minecraft.entity.LivingEntity;
import net.minecraft.text.LiteralText;
import net.minecraft.util.math.Quaternion;
import org.lwjgl.opengl.GL11;
public class PlayerEntityWidget extends AbstractButtonWidget {
private final LivingEntity entity;
public PlayerEntityWidget(LivingEntity entity) {
super(0, 0, 0, 0, new LiteralText(""));
this.entity = entity;
}
@Override
public void renderBg(MatrixStack matrices, MinecraftClient client, int mouseX, int mouseY) {
float f = (float) Math.atan((x - mouseX) / 40.0F);
float g = (float) Math.atan((y - 36 - mouseY) / 40.0F);
GL11.glPushMatrix();
GL11.glTranslatef((float) x, (float) y, 1050.0F);
GL11.glScalef(1.0F, 1.0F, -1.0F);
MatrixStack matrixStack = new MatrixStack();
matrixStack.translate(0.0D, 0.0D, 1000.0D);
matrixStack.scale(30F, 30F, 30F);
Quaternion quaternion = Vector3f.POSITIVE_Z.getDegreesQuaternion(180.0F);
Quaternion quaternion2 = Vector3f.POSITIVE_X.getDegreesQuaternion(g * 20.0F);
quaternion.hamiltonProduct(quaternion2);
matrixStack.multiply(quaternion);
float h = entity.bodyYaw;
float i = entity.yaw;
float j = entity.pitch;
float k = entity.prevHeadYaw;
float l = entity.headYaw;
entity.bodyYaw = 180.0F + f * 20.0F;
entity.yaw = 180.0F + f * 40.0F;
entity.pitch = -g * 20.0F;
entity.headYaw = entity.yaw;
entity.prevHeadYaw = entity.yaw;
EntityRenderDispatcher entityRenderDispatcher = MinecraftClient.getInstance().getEntityRenderDispatcher();
quaternion2.conjugate();
entityRenderDispatcher.setRotation(quaternion2);
entityRenderDispatcher.setRenderShadows(false);
VertexConsumerProvider.Immediate immediate = MinecraftClient.getInstance().getBufferBuilders().getEntityVertexConsumers();
RenderSystem.runAsFancy(() -> entityRenderDispatcher.render(entity, 0.0D, 0.0D, 0.0D, 0.0F, 1.0F, matrixStack, immediate, 15728880));
immediate.draw();
entityRenderDispatcher.setRenderShadows(true);
entity.bodyYaw = h;
entity.yaw = i;
entity.pitch = j;
entity.prevHeadYaw = k;
entity.headYaw = l;
GL11.glPopMatrix();
}
}
|
java
|
<filename>DefaultOptions.json
{
"SuppressedSymbols": [
"MemTrace::Encoder::BeginEvent",
"MemTrace::HeapAllocate",
"__tmainCRTStartup",
"RtlUserThreadStart",
"BaseThreadInitThunk",
"wWinMainCRTStartup",
"MemTrace::HeapFree"
],
"EnableSuppression": true,
"BindAddress": "0.0.0.0",
"BindPort": 9811,
"SymbolPaths": [
],
"ModulePathRemappings": [
]
}
|
json
|
A $27 million fund aimed at applying artificial intelligence to the public interest has announced the first targets for its beneficence: $7.6 million will be split unequally between MIT’s Media Lab, Harvard’s Berkman Klein Center and seven smaller research efforts around the world.
The Ethics and Governance of Artificial Intelligence Fund was created by Reid Hoffman, Pierre Omidyar and the Knight Foundation back in January; the intention was to ensure that “social scientists, ethicists, philosophers, faith leaders, economists, lawyers and policymakers” have a say in how AI is developed and deployed.
To that end, this first round of fundings supports existing organizations working along those lines, as well as nurturing some newer ones.
The lion’s share of this initial round, $5.9 million, will be split by MIT and Harvard, as the initial announcement indicated. Media Lab is, of course, on the cutting edge of many research efforts in AI and elsewhere; Berkman Klein focuses more on the legal and analysis side of things.
The fund’s focuses are threefold:
- Media and information quality – looking at how to understand and control the effects of autonomous information systems and “influential algorithms” like Facebook’s news feed.
- Social and criminal justice – perhaps the area where the bad influence of AI-type systems could be the most insidious; biases in data and interpretation could be baked into investigative and legal systems, giving them the illusion of objectivity. (Obviously the fund seeks to avoid this.)
- Autonomous cars – although this may seem incongruous with the others, self-driving cars represent an immense social opportunity. Mobility is one of the most influential social-economic factors, and its reinvention offers a chance to improve the condition of nearly everyone on the planet — great potential for both advancement and abuse.
Those two well-known organizations will be pursuing issues related to those (they’re already working together anyway), but the seven smaller efforts are also being more modestly funded.
Digital Asia Hub, FAT ML and ITS Rio will be hosting conferences and workshops to which experts across fields will be invited, advancing and enriching the conversations around various AI issues. ITS Rio also will be translating debates on the topics — a critical task, since there are important thinkers worldwide and these conversations shouldn’t be limited by something as last-century as native language.
On the research side, AI Now will be looking at bias in data collection and healthcare; the Leverhulme Center will be looking at interpretability of AI-related data; Data & Society will be conducting “ethnographically-informed” studies on the human element of AI and data — for example, how demographic imbalances in who runs real estate businesses might inform the systems they create and use.
Access Now (which doesn’t really fit in either category) will be working to create a set of guidelines for businesses and services looking to conform to major upcoming data regulations in the EU.
“For this initial cohort, we looked for projects that fit our goal of building networks across fields, and that would complement the work of our ‘anchor’ partners at the Media Lab and Berkman Klein,” said Knight’s VP of Technology and Innovation, John Bracken, in an email to TechCrunch.
Although the funds are in the public interest, they aren’t just handouts; I asked Bracken whether there were any concrete expectations for the organizations involved.
We’ll hear about them soon, no doubt.
A few million bucks may seem like a drop in the bucket among the herds of unicorns we track here at TechCrunch, but on the other hand it may seem cheap when the studies and events being funded come to fruition and result in the kind of productive dialogue this fast-moving field needs.
|
english
|
{
"name": "wanjee/shuwee-config-bundle",
"type": "symfony-bundle",
"description": "Config bundle. Part of the Shuwee project",
"keywords": [
"administration",
"admin",
"backend",
"shuwee",
"symfony2",
"bundle",
"Wanjee"
],
"homepage": "https://github.com/wanjee/ShuweeConfigBundle",
"license": "MIT",
"authors": [
{
"name": "<NAME>",
"email": "<EMAIL>",
"homepage": "http://www.wanjee.be",
"role": "Developer"
},
{
"name": "Shuwee's tribe",
"homepage": "https://github.com/wanjee/ShuweeConfigBundle/graphs/contributors"
}
],
"require": {
"php": ">=5.5",
"symfony/framework-bundle": "~2.8|~3.0",
"twig/twig": "~1.5",
"wanjee/shuwee-admin-bundle": "^1.0.0|dev-master"
},
"require-dev": {
"phpunit/phpunit": "4.*"
},
"autoload": {
"psr-4": {
"Wanjee\\Shuwee\\ConfigBundle\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"Wanjee\\Shuwee\\ConfigBundle\\": "tests"
}
},
"extra": {
"branch-alias": {
"dev-master": "0.1.x-dev"
}
}
}
|
json
|
{"type":"Feature","id":"node/8662312914","properties":{"amenity":"vending_machine","fixme":"position","vending":"eggs","id":"node/8662312914"},"geometry":{"type":"Point","coordinates":[12.9198478,52.3955147]}}
|
json
|
In the run up to the Gujarat elections, other younger leaders with forceful campaigns have challenged Narendra Modi’s brand appeal.
At the entrance to a small lane leading into Dhalni Pole in Ahmedabad’s old city, one finds a panwalla, a galla piled with rolled fabric, a blackboard, a chakki with old fashioned grinding machines and a reading room where several old men sit in chairs with their faces buried in newspapers. Nothing seems to have changed here in over half a century.
Except for one thing: ‘RG’s Salon’ has granite on the walls, new tiles on the floor, six large new chairs facing full length mirrors, each with its individual supply station, fluorescent lights and a board offering a range of services including facials, hair cut, hair colour, highlighting, straightening etc. The young man who has taken over the management of what used to be his father’s barber shop, shows me the styles favoured by today’s youth on his smartphone: mohawks, burst fades, skin fades, razor tattoos.
In the streets, the crowded marketplaces, in malls and in small town nukkads one sees small-built, sallow-skinned, thin young men in gaudy shirts, sporting spiky Mohawks and faux hawks or hurtling down streets on motorbikes. In a deeply stratified society where appearance is often a signifier of caste, local observers suggest that this form of style assertion is tied to the rise of the OBC. OBC or Other Backward Castes, which include several communities such as Thakors, Rabaris, and Kolis, and forms a hefty 45 per cent of Gujarat’s population.
Benefiting from expanded reservations in education and public sector jobs in the 1980s , which created a professional class, backward castes have continued to improve their economic lot. Many came into big money by selling their land to real estate developers seeking to build in the rural margins of cities (and sometimes blew it up in unwise spending sprees). At the lower end of the socio-economic scale, they have moved into the bootlegging business, once cornered by Muslims and now also supply the growing demand in the service industry, working alongside Dalits in malls and as couriers. The current reigning superstar of the Gujarati screen, Vikram Thakor, belongs to a backward caste and is a sensuous, fiery personality whose entry on screen is often marked by a camera lingering lovingly on his various style markers: tight white trousers, a flashy watch, tan leather brogues and layered locks.
Gujarat, as this brief preamble suggests, is at once a deeply stratified as well as a fluid society, where aspiration plays a strongly motivating role. Among other characteristics one can identify a marked strain of anti-elitism that draws both from tradition but also from the indigenous schools inspired by Gandhi as an alternative to colonial education during the freedom struggle. The extreme commercialisation of education starting in the 1970s lowered standards of learning, creating a sense of inadequacy among people known for their commercial acumen and entrepreneurial talents.
A significant part of Narendra Modi’s appeal as chief minister derived from his understanding of, and ability to harness, the latent insecurities arising from these factors. In the aftermath of the 2002 mass violence when Gujarat was at the receiving end of worldwide criticism Modi crafted a narrative of victimhood by harping on Gujarati asmita (pride) and offering himself as an embodiment of the same.
He was the virile figure with a 56-inch chest, wrestling with alligators in a lake. He was the leader who manifested the desires of his audience in his flamboyant dress style, not unlike a film star, appearing in glossy indo-west ethnic wear at times that would do a TV star proud, in bright turbans, in suits, sometimes with a cravat and even a cowboy hat.
As prime minister he has continued this strategy by attempting to symbolise the nation. There are shades of India-is-Indira-and-Indira-is-India here but the more relevant example is Richard Branson’s strategy of embodying the corporation. As Branson talks about his hectic work schedule and performs adventurous stunts, offering himself up for the public gaze at all times, he is the brand. Modi works with a similar combination of narrative, virility and visibility.
These strategies have always existed and been used by politicians to build charisma, but in a world intensely driven by media and glamour, they have become more intense. Vladimir Putin’s sporty, bare torso images, and Justin Trudeau’s boyish good looks and sensitivity, all underscore certain narratives. Donald Trump and Ronald Reagan both benefited by their high visibility, as did N. T. Rama Rao in his day in Andhra Pradesh.
But, to come back to the Gujarat elections: the ongoing campaign has been analysed in terms of issues—a disgruntlement over the adverse effects of GST, joblessness etc. —and personalities. The emergence of new leaders, each representing a constituency, and the combativeness of a Hardik Patel and even Rahul Gandhi, has been perceived as posing a threat to the BJP’s fortunes in the state.
How this will play out will be seen when the results emerge in a few days. But in the run up to the elections, the young leaders with their forceful campaigns have challenged Modi’s brand appeal by competing, not for stature but for attention. For a strategy that relies on undiluted attention this is a concern, and the days ahead might see a course correction that could have more enduring political implications.
Amrita Shah is Visiting Faculty, Centre for Contemporary Studies, Indian Institute of Science, Bangalore.
|
english
|
import React, {PropsWithChildren} from 'react';
import {mountWithContext} from '../../test-utilities';
import {Labelled, Props} from './Labelled';
import {useLabelled} from './hook';
import {LabelledContext} from './context';
const defaultProps: PropsWithChildren<Props> = {
children: <Child />,
label: '',
htmlFor: '',
empty: true,
};
describe('<Labelled />', () => {
it('renders the children', async () => {
const labelled = mountWithContext(<Labelled {...defaultProps} />);
expect(labelled).toContainReactComponent(Child);
});
it('wraps children with a LabelledContext.Provider', async () => {
const labelled = mountWithContext(
<Labelled {...defaultProps} label="Email" />,
);
expect(labelled).toProvideReactContext(LabelledContext);
});
it('renders a floating label when the value is prefilled', async () => {
const labelled = mountWithContext(
<Labelled {...defaultProps} label="Email" empty={false} />,
);
expect(labelled).toProvideReactContext(
LabelledContext,
expect.objectContaining({
floating: true,
}),
);
});
it('does not render a floating label on focus when empty', async () => {
const labelled = mountWithContext(
<Labelled {...defaultProps} label="Email" />,
);
// Gain focus
labelled.act(() => {
labelled.find('input')?.trigger('onFocus');
});
expect(labelled).toProvideReactContext(
LabelledContext,
expect.objectContaining({
floating: false,
}),
);
});
it('renders a floating label once a value is entered', async () => {
const labelled = mountWithContext(
<Labelled {...defaultProps} label="Email" />,
);
// Enter value
labelled.act(() => {
labelled.setProps({empty: false});
});
expect(labelled).toProvideReactContext(
LabelledContext,
expect.objectContaining({
floating: true,
}),
);
});
it('renders a floating label when focused, then the value is removed', async () => {
const labelled = mountWithContext(
<Labelled {...defaultProps} empty={false} label="Email" />,
);
// Gain focus
labelled.act(() => {
labelled.find('input')?.trigger('onFocus');
});
// Remove value
labelled.act(() => {
labelled.setProps({empty: true});
});
expect(labelled).toProvideReactContext(
LabelledContext,
expect.objectContaining({
floating: true,
}),
);
});
it('does not render a floating label when not focused and the value is removed', async () => {
const labelled = mountWithContext(
<Labelled {...defaultProps} empty={false} label="Email" />,
);
// Remove value
labelled.act(() => {
labelled.setProps({empty: true});
});
expect(labelled).toProvideReactContext(
LabelledContext,
expect.objectContaining({
floating: false,
}),
);
});
it('does not render a floating label when focused, then a value is entered, then removed, then the focus is lost', async () => {
const labelled = mountWithContext(
<Labelled {...defaultProps} label="Email" />,
);
// Gain focus
labelled.act(() => {
labelled.find('input')?.trigger('onFocus');
});
// Enter value
labelled.act(() => {
labelled.setProps({empty: false});
});
// Remove value
labelled.act(() => {
labelled.setProps({empty: true});
});
// Lose focus
labelled.act(() => {
labelled.find('input')?.trigger('onBlur');
});
expect(labelled).toProvideReactContext(
LabelledContext,
expect.objectContaining({
floating: false,
}),
);
});
it('renders a floating label when focused, then a value is entered, then the focus is lost', async () => {
const labelled = mountWithContext(
<Labelled {...defaultProps} label="Email" />,
);
// Gain focus
labelled.act(() => {
labelled.find('input')?.trigger('onFocus');
});
// Enter value
labelled.act(() => {
labelled.setProps({empty: false});
});
// Lose focus
labelled.act(() => {
labelled.find('input')?.trigger('onBlur');
});
expect(labelled).toProvideReactContext(
LabelledContext,
expect.objectContaining({
floating: true,
}),
);
});
it('renders a floating label when focused, then a value is entered, then lost focus, then focused, then the value removed', async () => {
const labelled = mountWithContext(
<Labelled {...defaultProps} label="Email" />,
);
// Gain focus
labelled.act(() => {
labelled.find('input')?.trigger('onFocus');
});
// Enter value
labelled.act(() => {
labelled.setProps({empty: false});
});
// Lose focus
labelled.act(() => {
labelled.find('input')?.trigger('onBlur');
});
// Gain focus
labelled.act(() => {
labelled.find('input')?.trigger('onFocus');
});
// Remove value
labelled.act(() => {
labelled.setProps({empty: true});
});
expect(labelled).toProvideReactContext(
LabelledContext,
expect.objectContaining({
floating: true,
}),
);
});
});
function Child({value}: {value?: string}) {
const {onBlur, onFocus} = useLabelled();
return (
<input
value={value}
onBlur={onBlur}
onFocus={onFocus}
onChange={() => {}}
/>
);
}
|
typescript
|
import { Module } from '@nestjs/common'
import { ExternalRendererModule } from '../../src'
import { ExecController } from './exec.controller'
import { RenderController } from './render.controller'
@Module({
imports: [
ExternalRendererModule.register({
url: 'http://localhost:3000',
}),
],
controllers: [RenderController, ExecController],
})
export class ExternalRendererIntegrationModule {}
|
typescript
|
<gh_stars>1-10
{% load template_tags %}
{% if display_format == 'text' %}
{% block plain_text_content %}
{% comment %} being careful about the spacing since the target is USSD or plain text. This part needs to be made more readable {% endcomment %}
{% if answer_form.errors %}{{answer_form.text_error}}{% endif %}{% if interview %}{% if 'prompt_user_loop' in loops %}{% if loops.prompt_user_loop %}{{loops.prompt_user_loop}}{% else %}{{answer_form.DEFAULT_LOOP_PROMPT}}{% endif %}{{ answer_form.render_extra_ussd }}{% else %}{% build_question_text interview.last_question.text existing_answers as text %}
{% if text %}{% if answer_form.render_prepend_ussd %}
{{answer_form.render_prepend_ussd}}{% endif %}{{text}} ({{interview.last_question.answer_type}})
{{ answer_form.render_extra_ussd }}{% endif %}
{% endif %}
{% else %}
{% if access and not answer_form.errors %}Welcome {{access.interviewer.name}}!{% endif %}
{{answer_form.render_prepend_ussd}}
{{ answer_form.render_extra_ussd }}
{% endif %}
{% endblock %}
{% else %}
<div class="row" id="preview-container">
<div class="row">
<div class="col-md-6">
</div>
<div>
<!-- Mobile view start-->
<div class="iphone_bg">
<div class="geni">
<div class="block">
<div class="previewstyle">
<div class="statusbar-overlay"></div>
<div class="panel-overlay"></div>
<div class="views">
<div class="view view-main" data-page="form">
<div class="pages">
<div data-page="features" class="page no-navbar page-on-left">
<div class="page-content">
</div>
</div>
<div data-page="form" class="page no-toolbar no-navbar page-on-center">
<div class="page-content">
<div id="pages_maincontent">
{% block preview_title %}
{% if title %}
<h2 class="page_title">{{interview.question_set.name|default:title }}</h2>
{% else %}
<h2 class="page_title">{{interview.question_set.name|default:'Data Entry'}}</h2>
{% endif %}
{% endblock %}
{% if answer_form.non_field_errors %}
<br /><br />
<div id="non_field_errors" class="alert alert-error">{{ answer_form.non_field_errors }}</div>
{% endif %}
<div class="page_single layout_fullwidth_padding">
<div class="contactform">
{% block contactform %}
{% if answer_form.is_multipart %}
<form enctype="multipart/form-data" id="interview_form" method="post" action="{{action}}">
{% else %}
<form id="interview_form" method="post" action="{{action}}">
{% endif %}
{% if interview.last_question.loops and access.choice_name != 'Ussd Access' %}
<div class="loops form_row">
{% for loop in interview.last_question.loops %}
» {{ loop.loop_starter.identifier }} ({{loops.count|get_value:loop.id}})
{% endfor %}
</div>
{% endif %}
{% csrf_token %}
{% block form_fields %}
<div class="form_row">
{% if 'prompt_user_loop' in loops %}
<label>{% if loops.prompt_user_loop %}{{loops.prompt_user_loop}}{% else %}{{answer_form.DEFAULT_LOOP_PROMPT}}{% endif %}</label>
{% else %}
{% build_question_text interview.last_question.text existing_answers as text %}
{% if text %}
<label>{{text}} ({{interview.last_question.answer_type}})</label>
{% endif %}
{% endif %}
{% if access.choice_name == 'Ussd Access' %}
<div>{{ answer_form.render_extra_ussd_html }}</div>
{% endif %}
{% include "bland_form.html" with a_form=answer_form %}
</div>
<br />
<input name="submit" class="form_submit submit" id="submit" value="Go" type="submit">
{% if is_preview or has_go_back %}
<input name="has-go-back" class="form_submit submit" id="has-go-back" value="true" type="hidden">
{% if has_go_back %}
<input name="go-back" class="form_submit submit" id="go-back" value="Back" type="submit">
{% endif %}
{% endif %}
{% endblock %}
</form>
{% endblock %}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Mobile View End-->
</div>
</div>
</div>
<style type="text/css">
.iphone_bg {
width: 100%;
height: 639px;
margin: 0px auto auto;
background: url('{{STATIC_URL}}img/iphone-sim.png') no-repeat center;
}
.geni {
width:247px;
margin:0px auto;
padding-top:57px;
padding-left:6px;
z-index:1;
}
.exod {
margin-bottom:5px;
}
#id_gender{
display: inline-block;
vertical-align: middle;
margin-bottom: -6px;
}
#id_access_channels{
display: inline-block;
vertical-align: middle;
}
#text-counter{
margin-left: 10px !important;
}
.ms-container{
margin-left: auto;
margin-right: auto;
width: 915px;
}
.ms-list{
margin-top: -14px !important;
}
.inline pos-rel > open {
display: none !important;
}
.exod {
text-algin:center;
margin-bottom:5px;
}
.previewstyle {
border: 1px solid #307ecc;
height: 360px;
padding-top: 20px;
min-height: 300px;
text-align: left;
padding-left: 15px;
padding-right: 15px;
width: 100%;
background:#fff;
}
.form-horizontal .control-label {
padding-top:25px;text-align: left;
}
.int-part{margin-top: -25px;}
.dataTables_wrapper input[type="text"] {
margin: 0px;
}
.error{padding-top: 3px;font-size: 11px;font-weight: normal;}
label {
margin-bottom: 2px;
}
.controls{font-weight: bold;}
</style>
<script src="{{ STATIC_URL }}js/jquery-ui.min.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
jQuery(function($) {
$(".datepicker").datepicker({
changeMonth: true,
changeYear: true,
dateFormat: 'dd-mm-yy',
yearRange: "-120:+nn"
});
});
</script>
<script type="text/javascript">
$(document).ready(function(){
$('.controls textarea ').after($('<span id="text-counter"></span>'));
});
</script>
{% endif %}
|
html
|
<reponame>Dundun1024/dashboard
import i18n from '@/locales'
export const CEHCK_STATUS_CN = {
UNK: {
textColor: '#909399',
text: i18n.t('network.text_507'),
},
INI: {
textColor: '#67C23A',
text: i18n.t('network.text_508'),
},
SOCKERR: {
textColor: '#F56C6C',
text: i18n.t('network.text_509'),
},
L4OK: {
textColor: '#67C23A',
text: i18n.t('network.text_510'),
},
L4TOUT: {
textColor: '#F56C6C',
text: i18n.t('network.text_511'),
},
L4CON: {
textColor: '#F56C6C',
text: i18n.t('network.text_512'),
},
L6OK: {
textColor: '#67C23A',
text: i18n.t('network.text_513'),
},
L6TOUT: {
textColor: '#F56C6C',
text: i18n.t('network.text_514'),
},
L6RSP: {
textColor: '#F56C6C',
text: i18n.t('network.text_515'),
},
L7OK: {
textColor: '#67C23A',
text: i18n.t('network.text_516'),
},
L7OKC: {
textColor: '#67C23A',
text: i18n.t('network.text_516'),
},
L7TOUT: {
textColor: '#F56C6C',
text: i18n.t('network.text_517'),
},
L7RSP: {
textColor: '#F56C6C',
text: i18n.t('network.text_518'),
},
L7STS: {
textColor: '#F56C6C',
text: i18n.t('network.text_519'),
},
}
export const HAD_DASHBOARD_DATA = ['tcp', 'http', 'https']
export const LB_HOST = 'lbagent1'
export const FRONTEND = 'FRONTEND'
|
javascript
|
<reponame>jansupol/helidon
/*
* Copyright (c) 2020 Oracle and/or its affiliates.
*
* 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 io.helidon.media.multipart;
import java.util.List;
/**
* Readable multipart message.
*/
public final class ReadableMultiPart implements MultiPart<ReadableBodyPart> {
private final List<ReadableBodyPart> parts;
/**
* Create a new readable multipart instance.
* @param parts body parts
*/
ReadableMultiPart(List<ReadableBodyPart> parts) {
this.parts = parts;
}
@Override
public List<ReadableBodyPart> bodyParts() {
return parts;
}
}
|
java
|
Let's get straight to the point. Rio Olympics are over and India's largest-ever contingent is back with all of two medals to show for its efforts – a bronze for Sakshi Malik in wrestling and a silver for PV Sindhu in badminton. Even the tiny Ivory Coast won a gold and silver each while the island nation of Fiji too won a gold.
Clearly things are not well, and as everyone gets down to do the postmortem of our performances, often breathless, apportion blame, and move on.
Are there no positives for us from our show? What are the lessons learnt, if any? And what can be done? Let us look at them one by one.
In short, there are several positives and that several were on the cusp of a medal shouldn’t be missed by any analyst. If anything, we should be mighty proud of our athletes. They have always delivered despite, not because of the system that believes in only lip-service.
Hope so, but given the past record, it is unlikely. The same guys who are responsible for the fiasco would be doing the analysis, and they themselves would be giving solution. It has not helped and will not help even now. Having those who have failed us year after year to somehow offer redemption is living in a fool’s paradise.
The federations and the SAI and all those involved with sports in this country are a law unto themselves. They are mostly headed by fat cats with almost zero knowledge of sports. Even if there are sportspersons at the helm, they are titular heads, put there by political strongmen to do their bidding. That they do so on money that is being paid by you and I, courtesy our tax, hurts, indeed infuriates.
In fact, the first step the government should take is to rejig these federations, perform a surgery. If not, at least make them accountable. Let them be judged like the private sector would any project. These satraps need to get out of their habit of free lunches at our expense. If they don’t deliver, boot them out. Their sole interest seems to lie in free boarding, lodging, or, as someone put very bluntly – ‘touring and whoring’.
Their actions are so pathetic often. Let us look at those who went to Rio itself. Pot bellied, ill-informed with zero knowledge of sports officials go as support staff. Take the case of our marathoner, OP Jaisha. While she might be exaggerating that there was no water, because there are hydration stations at prescribed intervals set up by the organisers, the fact that the stations available to each nation to offer personalized drinks were not manned tells a different story. Honestly, the Athletics Federation of India’s assertion that the Indian runners had themselves refused to take such drinks is baloney.
The support staff, knowing fully well that the temperature is scorching and one never knows when an athlete may want something, should have stationed someone there. Those two and a half hours should have been devoted to the athlete and not to sightseeing. The officials responsible for this should be booted out, and idiots who drafted and approved that explanation in the AFI behalf need to find a place to hide. They are shameless!
In fact, the irresponsible behavior of our support/accompanying staff has always been a matter of shame. Except a few, most shouldn’t be there as part of the contingent anyway. All of them have an ego the size of Jupiter, knowledge of sport, or even interest, is nil. And this time, the boorish behaviour of those accompanying our minister of sports made headlines after the organisers threatened to cancel their accreditation.
The minister’s office offered a lame explanation. Lame because if you say your staff didn’t tell you that you weren’t supposed to be there, they are NOT FIT to be there. Only buttresses the point that they are clueless. And as a minister, if Vijay Goel does not take the blame on himself, then he should at least kick out the staff that accompanied him. But will he?
To be fair, there are some in the government who are thinking right. The move to set up a national sports university is a step in the right direction. But, unless its aim is defined, it would be an exercise in futility. Is the aim to produce a certain number of students, or is it to produce medal winners at international events? Will what they do be measured? The general dictum is – What gets measured, gets done. Why can’t this be the norm in this university too?
There are some who want the government to set up sports institutes on the lines of IITs and IIMs, to be called Indian Institute of Sports (IIS). Some merit in this too, but again, this would miss out on ‘catching ‘em young’.
There is a lot of talk on why corporates don’t invest in sportsperson. So many needless tax breaks are given to those who don’t need it, several for historical reasons too. Why can’t there be tax breaks for corporates who sponsor athletes, or employ them?
In the end, while it is alright to say the government should stay away, it is wishful thinking. Government, if it has the will, can do more for sports than any corporate ever can. But, it really needs to bite the bullet and get these federations shape up and make them accountable. Make them run like private entities with clear deliverables and the option to chuck them out of they fail to deliver.
As for the politicians themselves, the less said the better. What can one say when the joker in Telangana, even as he felicitated Sindhu, promised her an even better coach so she gets the gold next time. That one statement was, in fact, the truth of Indian politicos understanding of sports and the disrespect they have for everyone, leave alone for a player cum coach of the caliber of P Gopichand.
As if all that Gopi was teaching Sindhu was how to stitch falls on sarees.
Jai Hind!
|
english
|
<filename>pkg/vif/ip/addr_key.go
package ip
import (
"encoding/binary"
"fmt"
"net"
)
// AddrKey is an immutable form of an L4 address (ip and port), suitable as a map key.
type AddrKey string
func MakeAddrKey(ip net.IP, port uint16) AddrKey {
// Ensure that we use the short 4-byte form if this is an ipv4
if ip4 := ip.To4(); ip4 != nil {
ip = ip4
}
bs := make([]byte, len(ip)+2)
binary.BigEndian.PutUint16(bs, port)
copy(bs[2:], ip)
return AddrKey(bs)
}
func (a AddrKey) Port() uint16 {
return binary.BigEndian.Uint16([]byte(a))
}
func (a AddrKey) IP() net.IP {
return []byte(a)[2:]
}
func (a AddrKey) String() string {
if len(a) < 6 {
return "invalid address"
}
ip := a.IP()
if len(ip) > 4 {
return fmt.Sprintf("[%s]:%d", ip, a.Port())
}
return fmt.Sprintf("%s:%d", ip, a.Port())
}
|
go
|
{
"name": "hots-caster-cards",
"version": "2.2.0",
"description": "An Anki flash card deck export script for reviewing Heroes of the Storm talent and ability names.",
"bugs": "<EMAIL>",
"author": "Falindrith",
"license": "MIT",
"files": [
"cards.js"
],
"dependencies": {
"download-git-repo": "^1.0.2",
"fs-extra": "^7.0.0",
"yargs-parser": "^10.1.0"
}
}
|
json
|
# Copyright 2020 Google LLC
#
# 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.
# ==============================================================================
# Lint as: python3
"""Tests for lit_nlp.components.pdp."""
from typing import List
from absl.testing import absltest
from lit_nlp.api import dataset as lit_dataset
from lit_nlp.api import model as lit_model
from lit_nlp.api import types as lit_types
from lit_nlp.components import pdp
from lit_nlp.lib import caching
from lit_nlp.lib import testing_utils
JsonDict = lit_types.JsonDict
class TestRegressionPdp(lit_model.Model):
def input_spec(self):
return {'num': lit_types.Scalar(),
'cats': lit_types.CategoryLabel(vocab=['One', 'None'])}
def output_spec(self):
return {'score': lit_types.RegressionScore()}
def predict_minibatch(self, inputs: List[JsonDict], **kw):
return [{'score': i['num'] + (1 if i['cats'] == 'One' else 0)}
for i in inputs]
class TestClassificationPdp(lit_model.Model):
def input_spec(self):
return {'num': lit_types.Scalar(),
'cats': lit_types.CategoryLabel(vocab=['One', 'None'])}
def output_spec(self):
return {'probas': lit_types.MulticlassPreds(vocab=['0', '1'])}
def predict_minibatch(self, inputs: List[JsonDict], **kw):
def pred(i):
val = (i['num'] / 100) + (.5 if i['cats'] == 'One' else 0)
return {'probas': [1 - val, val]}
return [pred(i) for i in inputs]
class PdpTest(absltest.TestCase):
def setUp(self):
super(PdpTest, self).setUp()
self.pdp = pdp.PdpInterpreter()
self.reg_model = TestRegressionPdp()
self.class_model = TestClassificationPdp()
examples = [
{
'num': 1,
'cats': 'One',
},
{
'num': 10,
'cats': 'None',
},
{
'num': 5,
'cats': 'One',
},
]
indexed_inputs = [{'id': caching.input_hash(ex), 'data': ex}
for ex in examples]
self.dataset = lit_dataset.IndexedDataset(
spec=self.reg_model.input_spec(), id_fn=caching.input_hash,
indexed_examples=indexed_inputs)
def test_regression_num(self):
config = {
'feature': 'num',
}
result = self.pdp.run_with_metadata([self.dataset.indexed_examples[0]],
self.reg_model, self.dataset,
config=config)
expected = {1.0: 2.0, 2.0: 3.0, 3.0: 4.0, 4.0: 5.0, 5.0: 6.0, 6.0: 7.0,
7.0: 8.0, 8.0: 9.0, 9.0: 10.0, 10.0: 11.0}
testing_utils.assert_deep_almost_equal(self, result['score'], expected)
def test_provided_range(self):
config = {
'feature': 'num',
'range': [0, 9]
}
result = self.pdp.run_with_metadata([self.dataset.indexed_examples[0]],
self.reg_model, self.dataset,
config=config)
expected = {0.0: 1.0, 1.0: 2.0, 2.0: 3.0, 3.0: 4.0, 4.0: 5.0, 5.0: 6.0,
6.0: 7.0, 7.0: 8.0, 8.0: 9.0, 9.0: 10.0}
testing_utils.assert_deep_almost_equal(self, result['score'], expected)
def test_regression_cat(self):
config = {
'feature': 'cats',
}
result = self.pdp.run_with_metadata([self.dataset.indexed_examples[0]],
self.reg_model, self.dataset,
config=config)
expected = {'One': 2.0, 'None': 1.0}
testing_utils.assert_deep_almost_equal(self, result['score'], expected)
def test_class_num(self):
config = {
'feature': 'num',
}
result = self.pdp.run_with_metadata([self.dataset.indexed_examples[0]],
self.class_model, self.dataset,
config=config)
expected = {1.0: [0.49, 0.51], 2.0: [0.48, 0.52], 3.0: [0.47, 0.53],
4.0: [0.46, 0.54], 5.0: [0.45, 0.55], 6.0: [0.44, 0.56],
7.0: [0.43, 0.57], 8.0: [0.42, 0.58], 9.0: [0.41, 0.59],
10.0: [0.4, 0.6]}
testing_utils.assert_deep_almost_equal(self, result['probas'], expected)
def test_classification_cat(self):
config = {
'feature': 'cats',
}
result = self.pdp.run_with_metadata([self.dataset.indexed_examples[0]],
self.class_model, self.dataset,
config=config)
expected = {'One': [0.49, 0.51], 'None': [0.99, 0.01]}
testing_utils.assert_deep_almost_equal(self, result['probas'], expected)
def test_multiple_inputs(self):
config = {
'feature': 'num',
}
result = self.pdp.run_with_metadata(self.dataset.indexed_examples[0:2],
self.reg_model, self.dataset,
config=config)
expected = {1.0: 1.5, 2.0: 2.5, 3.0: 3.5, 4.0: 4.5, 5.0: 5.5, 6.0: 6.5,
7.0: 7.5, 8.0: 8.5, 9.0: 9.5, 10.0: 10.5}
testing_utils.assert_deep_almost_equal(self, result['score'], expected)
if __name__ == '__main__':
absltest.main()
|
python
|
/**
* 自定义事件
* author hjj
*/
class EventEmitter {
constructor() {
this.events = {};
}
getEvents() {
return this.events;
}
once(eventName, listener) {
return this.on(eventName, listener, 0);
}
on(eventName, listener, timer = -1) {
let listeners = this.getListeners(eventName);
listeners.push({
listener,
timer
});
}
emit(eventName, ...args) {
return this.trigger(eventName, args);
}
remove(eventName) {
this.events[eventName] && delete this.events[eventName];
}
off(eventName, listener) {
let listeners = this.getListeners(eventName);
let index = listeners.findIndex(item => item.listener === listener);
index !== -1 && listeners.splice(index, 1);
}
clear(){
this.events = {};
}
trigger(eventName, args) {
let listeners = this.getListeners(eventName);
for (let i = 0; i < listeners.length; i++) {
let listener = listeners[i];
if (listener) {
listener.listener.apply(this, args || []);
listener.timer === 0 && listeners.splice(i, 1);
listeners.length === 0 && delete this.events[eventName];
listener.timer !== -1 && listener.timer--;
}
}
}
getListeners(eventName) {
return this.events[eventName] || (this.events[eventName] = []);
}
}
export default EventEmitter
|
javascript
|
What's the story?
Sean Strickland secured a second-round TKO stoppage victory over Canada's fan-favourite Nordine Taleb in the featured bout of the preliminary card at UFC Fight Night 138.
Sean bounced back with a morale-boosting victory, making a statement during a close-fought knockout victory over Montreal's Taleb, who came into this fight with significant crowd support from his home supporters.
Local hero and UFC welterweight Taleb (14-5) faced California's Sean "Tarzan" Stickland (19-3) in the featured bout of the preliminary card of UFC Fight Night 138.
During a stacked fight card with a light-heavyweight headliner between Volkan Oezdemir and surging contender Anthony Smith, Taleb and Stickland both came into this fight seeking redemption after having lost their previous fights via knockouts.
Taleb came into this fight as the slight favourite on the odds and naturally, a huge fan favourite too in his home country here. The Canadian representative looked to put on a dominant performance for the loyal crowd, who were vocal in support of their compatriot.
The fight was back-and-forth from the offset with both fighters landing big shots while equally taking damage too. Taleb seemingly got the better of Strickland in the opening round, landing bigger shots and making Strickland miss and visibly tiring.
He began the second-round on the front foot, looking to impose pressure and landed a bunch of nasty leg kicks. However, Strickland came out on top eventually and landed a massive right hand to drop Taleb - who would get back to his feet before both exchanged blows.
Eventually Strickland came out on top once more, landing a flurry of elbows to finally drop Taleb and finish him via ground-and-pound. You can read the play by play and result updates to the preliminary card here.
What's next?
With an impressive display during a close fight, Strickland's stock is bound to increase.
He came back from adversity to deliver a stunning knockout - not least against a local hero - and his 20-3 record will see him target a breakthrough into the division's top 15 fighters, where he'll potentially begin fighting elite opposition soon.
|
english
|
const repeatString = function(givenString, num) {
let repeated = '';
if (num < 0) {
return 'ERROR'
}
for (let i = 0; i < num ; i++) {
repeated += givenString
}
return repeated;
}
module.exports = repeatString
|
javascript
|
<reponame>su-gu/react-typescript-boilerplate
{
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact"
],
"eslint.options": {
"parserOptions": {
"project": [
"${workspaceFolder}/tsconfig.json"
],
}
},
"path-intellisense.autoSlashAfterDirectory": false,
"path-intellisense.mappings": {
"~$images": "${workspaceRoot}/src/assets/images",
}
}
|
json
|
{"title": "Man-in-the-Machine: Exploiting Ill-Secured Communication Inside the Computer.", "fields": ["internet privacy", "computer science", "computer security"], "abstract": null, "citation": "Not cited", "year": "2018", "departments": ["Aalto University", "Nokia Networks", "University of Helsinki", "Aalto University"], "conf": "uss", "authors": ["<NAME>.....http://dblp.org/pers/hd/b/Bui:Thanh", "<NAME>.....http://dblp.org/pers/hd/r/Rao:Siddharth_Prakash", "<NAME>.....http://dblp.org/pers/hd/a/Antikainen:Markku", "<NAME>.....http://dblp.org/pers/hd/b/Bojan:Viswanathan_Manihatty", "<NAME>.....http://dblp.org/pers/hd/a/Aura:Tuomas"], "pages": 15}
|
json
|
“You don’t need to do everything yourself,” says successful entrepreneur, Mark Lachance. As a CEO and investor of many different companies, he knows a thing or two about getting things done. He’s also a thought leader in marketing, author, and entrepreneur. So it should come as no surprise that when asked what the most important lesson is for entrepreneurs today, he started with delegation — something many people struggle with, but which can make all the difference in business success.
Delegation is important. This is what entrepreneurs should focus on if they want their businesses to thrive. It’s easy to think that you’re the only person who can do a job because it’s your company, or you want to make sure everything gets done. But this isn’t true in entrepreneurship! Use other people’s talents wisely by learning how they work better than yours, so that both parties benefit from it. As a result, your team will have increased productivity, reduced stress levels and better relationships in the workplace.
He went on to explain that without exceptional individuals working for your organisation, there can be no valuable product or service. Hence his mention of putting effort into building up workforce diversity by using training programs when available, rather than just relying solely on hiring more staff members who may turn out poorly because they’re not trained properly. He also talked about ensuring each employee feels valued so you’ll have employees who will fight for you no matter what.
Lachance’s story is one of many that show the struggles and triumphs of entrepreneurship, including a betrayal from someone who he had thought could be trusted. He hasn’t let any of these setbacks get him down for long though, because every obstacle has given Lachance new knowledge and skills, which have made him stronger than ever before.
Entrepreneurship is a tough journey, one that does not come with any guarantees. There are no limits to learning and self-betterment, but you should never give up when the going gets tough. Learning is a lifelong journey; don’t throw in the towel when things get tough because your next opportunity might just be around the corner — you’ll thank yourself later for sticking through those difficult times.
And if you’re interested to see the same success and attract more luck in your life, grab a copy of his upcoming book, The Lucky Formula, and learn how you can stack the odds in your favor and cash in on success. You can start with calculating your Lucky Score. Simply go to TheLuckyFormula. com/Quiz to calculate your ability to attract luck and success.
(ThePrint ValueAd Initiative content is a paid-for, sponsored article. Journalists of ThePrint are not involved in reporting or writing it. )
|
english
|
<reponame>param108/profile
package postgres
import (
"database/sql"
"fmt"
"os"
_ "github.com/lib/pq"
"github.com/param108/profile/api/models"
"github.com/pkg/errors"
"gorm.io/driver/postgres"
"gorm.io/gorm"
)
type PostgresDB struct {
db *gorm.DB
}
func NewPostgresDB() (*PostgresDB, error) {
sqlDB, err := sql.Open("postgres",
fmt.Sprintf("postgres://%s:%s@%s:%s/%s?sslmode=disable",
os.Getenv("DB_USER"),
os.Getenv("DB_PASS"),
os.Getenv("DB_HOST"),
os.Getenv("DB_PORT"),
os.Getenv("DB_NAME"),
))
if err != nil {
return nil, errors.Wrap(err, "cant open db")
}
gormDB, err := gorm.Open(postgres.New(postgres.Config{
Conn: sqlDB,
}), &gorm.Config{})
if err != nil {
return nil, errors.Wrap(err, "gorm db error")
}
return &PostgresDB{db: gormDB}, nil
}
func (db *PostgresDB) CreateUser(u *models.User) error {
return db.db.Create(u).Error
}
func (db *PostgresDB) GetUser(userID string, writer string) (*models.User, error) {
user := &models.User{}
err := db.db.Find(user).Where("id = ? and writer = ?", userID, writer).Error
return user, err
}
// Delete deletes all entries in a table of a writer
// ONLY USE IN TESTS
func (db *PostgresDB) Delete(table string, writer string) error {
query := fmt.Sprintf("delete from %s where writer = ?", table)
return db.db.Exec(query, writer).Error
}
|
go
|
2K Sports has announced the following regarding the new WWE 2K15 “Path of the Warrior” DLC, which will be available from today.
New York? March 31, 2015? 2K today announced the availability of the newest downloadable content for WWE® 2K15, the latest release in the flagship WWE video game franchise. As the third addition to the game's story-driven 2K Showcase mode, Path of the Warrior takes players on a journey through the legendary career of WWE Hall of Famer Ultimate Warrior and commences with his victory over WWE Legend Honky Tonk Man® in record time at SummerSlam® in 1988.
2K Showcase: Path of the Warrior also features historic moments with WWE Hall of Famers Hulk Hogan®, Andre the Giant® and Sgt. Slaughter®, WWE Legends Rick Rude, Randy "Macho Man" Savage and Colonel Mustafa, as well as WWE Superstars Undertaker® and Hunter Hearst Helmsley®.
The downloadable content offering* via Xbox Live online entertainment network from Microsoft for Xbox One, the all-in-one games and entertainment system and Xbox 360 games and entertainment system from Microsoft, as well as PlayStation®Network for the PlayStation®4 and PlayStation®3 computer entertainment systems, includes the following items:
- Story focused on the career of WWE Hall of Famer Ultimate Warrior;
- Playable WWE Hall of Famers: Ultimate Warrior (1989-1996), Hulk Hogan (1990), Andre the Giant (1988) and Sgt. Slaughter (1991);
- Playable WWE Legends: Honky Tonk Man (1988), Rick Rude (1990), Randy "Macho Man" Savage (1991) and Colonel Mustafa (1991);
- Playable WWE Superstars: Undertaker (1991) and Hunter Hearst Helmsley (1996);
- Access to WWE Hall of Fame ring announcer Howard Finkel and WWE managers Jimmy Hart, Bobby Heenan, Paul Bearer, Sherri, Sid Justice and General Adnan;
- Playable arenas: WrestleMania® VI, VII and XII; SummerSlam (1988, 1990 and 1991); Saturday Night's Main Event® XXIV and Madison Square Garden;
- 2K Showcase: Path of the Warrior is available now for a suggested price of $9. 99, as well as through the Season Pass program.
Additional downloadable content available for WWE 2K15 includes the following items:
- Players gain instant access to all unlockable content available in the game (excluding downloadable content);
- The Accelerator is available now for a suggested price of $1. 99, as well as through the Season Pass program.
- Playable WCW Superstars: Bam Bam Bigelow, Diamond Dallas Page, Fit Finlay, Lord Steven Regal and Lex Luger;
- The WCW Pack is available now for a suggested price of $7. 99.
- Spinning Powerbomb (made popular by Jimmy Uso® and Jey Uso®);
- The New Moves Pack is available now for a suggested price of $3. 99.
- Story focused on the rivalry between WWE Superstars Randy Orton® and Christian® in 2011;
- Playable WWE Superstars (2011 versions): Christian, Randy Orton, Edge®, Mark Henry® and Sheamus®;
- Playable arenas from 2011: SmackDown®, Extreme Rules®, Over the Limit® and Capitol Punishment? ;
- 2K Showcase: One More Match is available now for a suggested price of $9. 99, as well as through the Season Pass program.
- Story focused on top matches for WWE Superstar Mark Henry;
- Playable WWE Superstars (2011 versions): Mark Henry, Big Show®, Kane®, Jey Uso, Jimmy Uso, Sheamus, The Great Khali®, Randy Orton, Daniel Bryan® and Ryback®;
- Playable arenas: SmackDown (2011), Vengeance® (2011) and WrestleMania 29;
- 2K Showcase: Hall of Pain is available now for a suggested price of $9. 99, as well as through the Season Pass program.
- Playable Former WWE Champion, NXT General Manager and Monday Night Raw announcer: JBL®;
- Playable NXT Superstars: Adam Rose? and The Ascension? (Konnor? and Viktor? );
- Playable NXT Diva: Emma? ;
- NXT Arrival is available now for a suggested price of $6. 99.
What's next for The Bloodline?
|
english
|
<gh_stars>100-1000
{
"word": "Mutual",
"definitions": [
"A mutual building society or insurance company."
],
"parts-of-speech": "Noun"
}
|
json
|
{
"ConnectionStrings": {
"Default": "Server=localhost;Port=3306; Database=ABP_VUEDb; Uid=root;Pwd=<PASSWORD>.;"
}
}
|
json
|
Recently, through a gazette notification issued by the Home Ministry, it has been stated that some states of India including West Bengal, the perimeter of the BSF's jurisdiction has been increased from 15 kms to 50 kms from the border. Hence the BSF will enforce their rule within 50 kms inside Indian territory from the international border. Due to this about half of West Bengal's districts will fall under the BSF's regime. As a result, it is apprehended that torture by the BSF upon civilians will increase severely. A study reveals that more than 150 civilians are being killed by the BSF along the border in a year during 2011 to 2020, which has increased from 100 during 2001 to 2010. More than 1000 civilians per year are being tortured and sexually abused resulting in impunity. Police and the BSF working with similar capacity in the same area may also result in further complexity. This is a step of the central government to militarize the state and curb the federal structure of the country.
According to the constitution of the country the responsibility of law and order is bestowed upon the state police. In this case the BSF is also being handed over the charge of controlling law and order of the states. Therefore, according to this, the union structure of the country is being dismissed and central administration is being enforced upon the states. At the end of the day, India will experience a dictatorial regime instead of democracy. Moreover, the lower house of the Parliament, the Lok Sabha, has been completely ignored while taking this crucial decision. Therefore, we will have to stop making India a police state. Hence, our demand is as follows:
We are looking forward to your whole-hearted support and cooperation in this cause.
|
english
|
import $ from 'jquery';
export const REQ_GET_CLIENTS = 'REQ_GET_CLIENTS';
export const reqGetClients = () => {
return {
type: REQ_GET_CLIENTS
};
};
export const RES_GET_CLIENTS_SUC = 'RES_GET_CLIENTS_SUC';
export const resGetClientsSuc = (data) => {
return {
type: RES_GET_CLIENTS_SUC,
clients: data.clients.map(c => { c.isEditing = false; return c; }),
meta: data.meta
};
};
export const RES_GET_CLIENTS_ERR = 'RES_GET_CLIENTS_ERR';
export const resGetClientsErr = () => {
return {
type: RES_GET_CLIENTS_ERR
};
};
export const FETCH_CLIENTS = 'FETCH_CLIENTS';
export function fetchClients(page = 1) {
return function (dispatch) {
dispatch(reqGetClients());
return $.get({
url: "http://primary-workspace-mak4alex.c9users.io/api/clients",
data: { "page": page }
})
.done((data) => {
dispatch(resGetClientsSuc(data));
})
.fail(() => {
dispatch(resGetClientsErr());
});
};
}
export const REQ_POST_CLIENT = 'REQ_POST_CLIENT';
export const reqPostClient = () => {
return {
type: REQ_POST_CLIENT
};
};
export const RES_POST_CLIENT_SUC = 'RES_POST_CLIENT_SUC';
export const resPostClientSuc = (client) => {
client.isEditing = false;
return {
type: RES_POST_CLIENT_SUC,
client
};
};
export const RES_POST_CLIENT_ERR = 'RES_POST_CLIENT_ERR';
export const resPostClientErr = (err) => {
return {
type: RES_POST_CLIENT_ERR,
errorMessage: err
};
};
export const ADD_CLIENT = 'ADD_CLIENT';
export function addClient(name, sex, id_number, phone, address) {
return function (dispatch) {
dispatch(reqPostClient());
return $.ajax({
type: "POST",
contentType: "application/json",
url: "https://primary-workspace-mak4alex.c9users.io/api/client",
data: JSON.stringify({
client: {
name,
sex,
id_number,
phone,
address
}
}),
dataType: "json"
})
.done((data) => {
dispatch(resPostClientSuc(data.client));
})
.fail((err) => {
dispatch(resPostClientErr(err));
});
}
};
export const EDIT_CLIENT = 'EDIT_CLIENT';
export const editClient = (id) => {
return {
type: EDIT_CLIENT,
id
}
}
export const CANCEL_EDIT = 'CANCEL_EDIT';
export const cancelEdit = (id) => {
return {
type: CANCEL_EDIT,
id
};
};
export const REQ_UPDATE_CLIENT = 'REQ_UPDATE_CLIENT';
export const reqUpdateClient = () => {
return {
type: REQ_UPDATE_CLIENT
};
};
export const RES_UPDATE_CLIENT_SUC = 'RES_UPDATE_CLIENT_SUC';
export const resUpdateClientSuc = (client) => {
client.isEditing = false;
return {
type: RES_UPDATE_CLIENT_SUC,
client
}
}
export const RES_UPDATE_CLIENT_ERR = 'RES_UPDATE_CLIENT_ERR';
export const resUpdateClientErr = (error) => {
return {
type: RES_UPDATE_CLIENT_ERR,
errorMessage: error
}
}
export const UPDATE_CLIENT = 'UPDATE_CLIENT';
export function updateClient(id, name, sex, id_number, phone, address) {
return function (dispatch) {
dispatch(reqUpdateClient());
return $.ajax({
type: "PUT",
contentType: "application/json",
url: `https://primary-workspace-mak4alex.c9users.io/api/client/${id}`,
data: JSON.stringify({
client: {
name,
sex,
id_number,
phone,
address
}
}),
dataType: "json"
})
.done((data) => {
dispatch(resUpdateClientSuc(data.client));
})
.fail((error) => {
dispatch(resUpdateClientErr(error));
});
};
};
export const REQ_DELETE_CLIENT = 'REQ_DELETE_CLIENT';
export const reqDeleteClient = () => {
return {
type: REQ_DELETE_CLIENT
};
};
export const RES_DELETE_CLIENT_SUC = 'RES_DELETE_CLIENT_SUC';
export const resDeleteClientSuc = (id) => {
return {
type: RES_DELETE_CLIENT_SUC,
id
};
}
export const RES_DELETE_CLIENT_ERR = 'RES_DELETE_CLIENT_ERR';
export const resDeleteClientErr = () => {
return {
type: RES_DELETE_CLIENT_ERR
};
}
export const DELETE_CLIENT = 'DELETE_CLIENT';
export function deleteClient(id) {
return function (dispatch) {
dispatch(reqDeleteClient());
return $.ajax({
type: "DELETE",
url: `https://primary-workspace-mak4alex.c9users.io/api/client/${id}`})
.done(() => {
dispatch(resDeleteClientSuc(id));
})
.fail(() => {
dispatch(resDeleteClientErr());
});
};
}
export const CLOSE_ERROR_MESSAGE = 'CLOSE_ERROR_MESSAGE';
export const closeErrorMessage = () => {
return {
type: CLOSE_ERROR_MESSAGE
};
}
|
javascript
|
Indian fast-bowler Arshdeep Singh on Thursday was a happy man. Arshdeep was one of the central figures for India in the IND vs SA 3rd ODI as India won the IND vs SA ODI series 2-1. Chasing a total of 298, the Proteas fell short by 78 runs. Arshdeep was at the fore of the South Africa batting collapse, taking four wickets to tilt the tie in India’s favour. The left-arm pacer took 10 wickets in the three-match series, including a fifer in the first match. Arshdeep was adjudged Man-of-the-Series due to his dominant performance.
- Why return of Virat Kohli-Rohit Sharma in T20Is could be a step backward?
The wickets Arshdeep Singh took were of immense importance. Arshdeep provided the first breakthrough in Thursday’s match, breaking the opening partnership to get rid of Reeza Hendricks. However, it was Arshdeep’s second wicket that proved to be the all-important one. Tony de Zorzi was batting at 81 and looked to take the game away from the hosts when Arshdeep tactfully trapped him in front of the stumps. The match could have gone either way if de Zorzi stayed at the crease for a bit longer.
Arshdeep’s next two wickets came at the end, with the pacer sending tailenders Wiaan Mulder and Keshav Maharaj back to the pavillion.
At the post-match presentation ceremony, the left-arm pacer discussed his plans for the South African batting line-up coming into the series.
“There was always something in the wicket throughout the day. Sometimes it was gripping and stopping. The plan was simple, it was to bowl wicket-to-wicket and get LBWs and bowled. IPL has been a very good platform for us youngsters, there isn’t a big gap between IPL and international cricket. You understand the mindset of international cricketers and it helps. We are all loving the chances we got. We’d love to give our all in the future as well and do well,” Arshdeep said.
Arshdeep was also asked about the reason for appealing loudly. “We had very little support from the umpires, so I had to appeal loudly,” Arshdeep quipped.
|
english
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.