text
stringlengths
1
1.04M
language
stringclasses
25 values
Moussa Dembele came off the bench to score two late goals as Lyon caused another Champions League sensation on Saturday, dumping out Pep Guardiola’s Manchester City with a 3-1 quarter-final win in Lisbon. City had looked on course to come back and win the tie behind closed doors at the Estadio Jose Alvalade after Kevin De Bruyne’s goal midway through the second half had cancelled out Maxwel Cornet’s first-half opener. However, Dembele put Lyon back ahead in the 79th minute and then capitalised on a shocking miss by Raheem Sterling to clinch the victory three minutes from the end. Against all expectations, a team who finished seventh in the curtailed French season, and had played just two competitive games since early March, now find themselves through to a Champions League semi-final on Wednesday against Bayern Munich. That is likely to be a step too far for Rudi Garcia’s team but then again nobody expected them to eliminate Juventus in the last round, never mind knock out City here. “We are still in it, which means we have a great team,” former Celtic striker Dembele told French television channel RMC Sport. Guardiola’s team had been warned about Lyon, losing at home and then drawing away against the French club in last season’s Champions League. But that was almost two years ago now and Lyon had lost several key players since then. This, a day after Bayern’s 8-2 demolition of Barcelona, is a seismic shock and a hammer blow to the ambitions of City under Guardiola. Their wait for European glory will go on, with this a third consecutive quarter-final exit. “It is what it is. Maybe one day we are going to break through the quarter-finals. We are not able to do it now, with these incredible guys, but we are going to try in the future,” Guardiola said. He was brought to the Etihad Stadium to deliver the Champions League, but he has not managed to equal the club’s best performance to date in the competition, a semi-final appearance in 2016, just before he was appointed. And so, a year after Liverpool beat Tottenham Hotspur in an all-English final, there will be no English representative in the semi-finals in the Portuguese capital. Instead, both ties will be Franco-German duels, with Paris Saint-Germain facing RB Leipzig before Bayern meet Lyon in a repeat of the 2010 semi-finals. Guardiola had set his team up with a three-man defence, as Fernandinho and Aymeric Laporte were joined by the young Spaniard Eric Garcia. Phil Foden dropped out of their line-up. City created little in the first half and were caught out by a long ball over the top as Lyon took the lead. Garcia raced back to tackle Karl Toko-Ekambi but Cornet was quickest to the loose ball and, with Ederson off his line, curled a low shot first-time into the corner of the net to keep up his remarkable record against these opponents – the wing-back scored three times against City in last season’s two meetings. De Bruyne appeared the most likely to make something happen for City and threatened from free-kicks after the restart, as City turned up the heat following the introduction of Riyad Mahrez in place of Fernandinho. The equaliser duly arrived in the 69th minute as Mahrez clipped a ball forward towards Sterling and he cut it back from the byline to De Bruyne, the Belgian arriving unmarked at the edge of the box to sidefoot home. Few would have bet against City going on to win the game from there. Lyon had offered nothing going forward in the second half and coach Garcia even decided to take off Memphis Depay, who had been anonymous. But it proved an inspired decision as his replacement Dembele latched onto Houssem Aouar’s through ball to race through on goal and beat Ederson. City expected the effort to be disallowed following a VAR review but the Dutch officials let it stand, and Lyon were back in front. Still, they should have been pegged back again, but Sterling somehow put the ball over with the goal gaping having been teed up by Ilkay Gundogan. Lyon went straight downfield and sealed a famous victory as Dembele converted the loose ball after Ederson had saved from Aouar.
english
International think tanks ranking countries based on their democratic strengths or weaknesses are not biased against India but are a result of “anti-Indian" sources from intellectual class, said Sociologist Dr Salvatore Babones on Saturday. The associate professor at the University of Sydney who came to limelight recently with his article ‘Indian Democracy at 75: Who are the Barbarians at the Gate? ’ had argued that negative ratings of Indian democracy published by three major rating organisations are disproportionate to the actual evidence provided to support them. Addressing the India Today conclave in Mumbai, he said organisations evaluate democracy in over 150 countries and most of the people involved gave no interest in India. “The problem is that all these rankings are based on surveys. So, all have the same methodology. They survey intellectuals, journalists, and academics based in the country they are studying or students in the country from outside. It is these (survey) reports that are biased," Dr Babones said. He further said that India’s intellectual class is anti-India, as a class and not as individuals. "Fundamentally, the biases don’t creep in because the organizations are anti-India. They creep in because, and forgive me, India’s intellectual class is anti-India; as a class and not as individuals," he was quoted as saying. Answering a question on whether they are anti-India or anti-BJP, he said they are a “bit of both" as individuals, not as a class and “certainly" have anti-BJP and anti-Narendra Modi stances. Noting key basis on which criticisms are made, namely the Ram Mandir, UAPA and other policies, the bases will remain in place. “But imagine that in a couple years you get a UPA government. Will they tear down the Ram Mandir? Will they reverse the very policies that are being criticized in these rankings? Will they get rid of the UAPA? So, the basis on which the criticisms are made, those bases will probably remain in place. If they do, then the same criticisms will apply to them," he said. Babones called the notion of India being a fascist country an “outrageous proposition. " Addressing India’s close links with Russia, India needs Russian veto in the Security Council or it will be cast in the UN as a fascist state and noted the country is being wrongly portrayed as a fascist state by the global media, affecting its image. “The activism won’t stop at India’s doors. The demonisation of India will continue in the international arena. That’s what you should be worrying about," he said. “India is the world’s biggest democratic success story," Babones said, adding the nation is the “only post-colonial well-institutional democracy. " He explained that there is no poor democracy as there is no country with a GDP per capita of less than $10,000 per year with a record of democratic elections going back more than a few decades. “India is the only post-colonial country to have remained a democracy throughout its entire history and it is the only well institutionalized democracy on the Eurasian continent between South Korea and Israel," he noted. Noting India’s ranking below Hong Kong in the press freedom index published by Reporters Sans Frontiers, he questioned how media in India could rank lower than the autonomous Special Administrative Region (SAR) of China with clampdowns following the security law, closing of Apple Daily and abduction of its publisher and “demolition of printing press. "
english
<filename>src/sql/parts/profiler/editor/profilerEditor.ts /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the Source EULA. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { ProfilerInput } from './profilerInput'; import { TabbedPanel } from 'sql/base/browser/ui/panel/panel'; import { Table } from 'sql/base/browser/ui/table/table'; import { TableDataView } from 'sql/base/browser/ui/table/tableDataView'; import { IProfilerService, IProfilerSessionTemplate } from 'sql/parts/profiler/service/interfaces'; import { Taskbar } from 'sql/base/browser/ui/taskbar/taskbar'; import { attachTableStyler } from 'sql/common/theme/styler'; import { IProfilerStateChangedEvent } from './profilerState'; import { ProfilerTableEditor } from './controller/profilerTableEditor'; import * as Actions from 'sql/parts/profiler/contrib/profilerActions'; import { CONTEXT_PROFILER_EDITOR, PROFILER_TABLE_COMMAND_SEARCH } from './interfaces'; import { SelectBox } from 'sql/base/browser/ui/selectBox/selectBox'; import * as DOM from 'vs/base/browser/dom'; import { BaseEditor } from 'vs/workbench/browser/parts/editor/baseEditor'; import { Dimension, Builder } from 'vs/base/browser/builder'; import { TPromise } from 'vs/base/common/winjs.base'; import { EditorOptions } from 'vs/workbench/common/editor'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService'; import { IInstantiationService, ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; import { ProfilerResourceEditor } from './profilerResourceEditor'; import { SplitView, View, Orientation, IViewOptions } from 'sql/base/browser/ui/splitview/splitview'; import { IContextMenuService, IContextViewService } from 'vs/platform/contextview/browser/contextView'; import { ITextModel } from 'vs/editor/common/model'; import { ICodeEditor } from 'vs/editor/browser/editorBrowser'; import { UntitledEditorInput } from 'vs/workbench/common/editor/untitledEditorInput'; import URI from 'vs/base/common/uri'; import { Schemas } from 'vs/base/common/network'; import * as nls from 'vs/nls'; import { IModelService } from 'vs/editor/common/services/modelService'; import { IDisposable } from 'vs/base/common/lifecycle'; import { Command } from 'vs/editor/browser/editorExtensions'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { KeyMod, KeyCode } from 'vs/base/common/keyCodes'; import { ContextKeyExpr, IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey'; import { KeybindingsRegistry } from 'vs/platform/keybinding/common/keybindingsRegistry'; import { CommonFindController, FindStartFocusAction } from 'vs/editor/contrib/find/findController'; import * as types from 'vs/base/common/types'; import { attachSelectBoxStyler } from 'vs/platform/theme/common/styler'; class BasicView extends View { private _previousSize: number; private _collapsed: boolean; public headerSize: number; constructor( initialSize: number, private _element: HTMLElement, private _focus: () => void, private _layout: (size: number, orientation: Orientation) => void, opts: IViewOptions ) { super(initialSize, opts); } render(container: HTMLElement, orientation: Orientation): void { container.appendChild(this._element); } focus(): void { this._focus(); } layout(size: number, orientation: Orientation): void { if (!this.collapsed) { this._previousSize = size; } this._layout(size, orientation); } set collapsed(val: boolean) { this._collapsed = val === false ? false : true; if (this.collapsed) { this._previousSize = this.size; this.setFixed(this.headerSize); } else { this.setFlexible(this._previousSize); } } get collapsed(): boolean { return this._collapsed; } } export interface IDetailData { label: string; value: string; } export class ProfilerEditor extends BaseEditor { public static ID: string = 'workbench.editor.profiler'; private _editor: ProfilerResourceEditor; private _editorModel: ITextModel; private _editorInput: UntitledEditorInput; private _splitView: SplitView; private _container: HTMLElement; private _body: HTMLElement; private _header: HTMLElement; private _actionBar: Taskbar; private _tabbedPanel: TabbedPanel; private _profilerTableEditor: ProfilerTableEditor; private _detailTable: Table<IDetailData>; private _detailTableData: TableDataView<IDetailData>; private _stateListener: IDisposable; private _panelView: BasicView; private _profilerEditorContextKey: IContextKey<boolean>; private _sessionTemplateSelector: SelectBox; private _sessionTemplates: Array<IProfilerSessionTemplate>; // Actions private _connectAction: Actions.ProfilerConnect; private _startAction: Actions.ProfilerStart; private _pauseAction: Actions.ProfilerPause; private _stopAction: Actions.ProfilerStop; private _autoscrollAction: Actions.ProfilerAutoScroll; private _collapsedPanelAction: Actions.ProfilerCollapsablePanelAction; constructor( @ITelemetryService telemetryService: ITelemetryService, @IWorkbenchThemeService themeService: IWorkbenchThemeService, @IInstantiationService private _instantiationService: IInstantiationService, @IContextMenuService private _contextMenuService: IContextMenuService, @IModelService private _modelService: IModelService, @IProfilerService private _profilerService: IProfilerService, @IContextKeyService private _contextKeyService: IContextKeyService, @IContextViewService private _contextViewService: IContextViewService ) { super(ProfilerEditor.ID, telemetryService, themeService); this._profilerEditorContextKey = CONTEXT_PROFILER_EDITOR.bindTo(this._contextKeyService); } protected createEditor(parent: Builder): void { // test backend //this._profilerService.registerProvider('default', this._instantiationService.createInstance(ProfilerTestBackend)); this._container = document.createElement('div'); this._container.className = 'carbon-profiler'; parent.append(this._container); this._createHeader(); this._body = document.createElement('div'); this._body.className = 'profiler-body'; this._container.appendChild(this._body); this._splitView = new SplitView(this._body); let tableContainer = this._createProfilerTable(); let paneContainer = this._createProfilerPane(); this._splitView.addView(new BasicView( 300, tableContainer, () => this._profilerTableEditor.focus(), size => this._profilerTableEditor.layout(new Dimension(parseFloat(DOM.getComputedStyle(this._body).width), size)), {} )); this._panelView = new BasicView( 300, paneContainer, () => this._tabbedPanel.focus(), size => this._tabbedPanel.layout(new Dimension(DOM.getTotalWidth(this._body), size)), { minimumSize: 35 } ); this._panelView.headerSize = 35; this._splitView.addView(this._panelView); } private _createHeader(): void { this._header = document.createElement('div'); this._header.className = 'profiler-header'; this._container.appendChild(this._header); this._actionBar = new Taskbar(this._header, this._contextMenuService); this._startAction = this._instantiationService.createInstance(Actions.ProfilerStart, Actions.ProfilerStart.ID, Actions.ProfilerStart.LABEL); this._startAction.enabled = false; this._stopAction = this._instantiationService.createInstance(Actions.ProfilerStop, Actions.ProfilerStop.ID, Actions.ProfilerStop.LABEL); this._stopAction.enabled = false; this._pauseAction = this._instantiationService.createInstance(Actions.ProfilerPause, Actions.ProfilerPause.ID, Actions.ProfilerPause.LABEL); this._pauseAction.enabled = false; this._connectAction = this._instantiationService.createInstance(Actions.ProfilerConnect, Actions.ProfilerConnect.ID, Actions.ProfilerConnect.LABEL); this._autoscrollAction = this._instantiationService.createInstance(Actions.ProfilerAutoScroll, Actions.ProfilerAutoScroll.ID, Actions.ProfilerAutoScroll.LABEL); this._sessionTemplates = this._profilerService.getSessionTemplates(); this._sessionTemplateSelector = new SelectBox(this._sessionTemplates.map(i => i.name), 'Standard', this._contextViewService); this._register(this._sessionTemplateSelector.onDidSelect(e => { if (this.input) { this.input.sessionTemplate = this._sessionTemplates.find(i => i.name === e.selected); } })); let dropdownContainer = document.createElement('div'); dropdownContainer.style.width = '150px'; this._sessionTemplateSelector.render(dropdownContainer); this._register(attachSelectBoxStyler(this._sessionTemplateSelector, this.themeService)); this._actionBar.setContent([ { action: this._startAction }, { action: this._pauseAction }, { action: this._stopAction }, { action: this._connectAction }, { element: Taskbar.createTaskbarSeparator() }, { action: this._autoscrollAction }, { action: this._instantiationService.createInstance(Actions.ProfilerClear, Actions.ProfilerClear.ID, Actions.ProfilerClear.LABEL) }, { element: dropdownContainer }, { action: this._instantiationService.createInstance(Actions.ProfilerEditColumns, Actions.ProfilerEditColumns.ID, Actions.ProfilerEditColumns.LABEL) } ]); } private _createProfilerTable(): HTMLElement { let profilerTableContainer = document.createElement('div'); profilerTableContainer.className = 'profiler-table monaco-editor'; profilerTableContainer.style.width = '100%'; profilerTableContainer.style.height = '100%'; profilerTableContainer.style.overflow = 'hidden'; profilerTableContainer.style.position = 'relative'; this._profilerTableEditor = this._instantiationService.createInstance(ProfilerTableEditor); this._profilerTableEditor.createEditor(new Builder(profilerTableContainer)); this._profilerTableEditor.onSelectedRowsChanged((e, args) => { let data = this.input.data.getItem(args.rows[0]); if (data) { this._modelService.updateModel(this._editorModel, data['TextData']); this._detailTableData.clear(); this._detailTableData.push(Object.keys(data).map(key => { return { label: key, value: data[key] }; })); if (this.input && types.isUndefinedOrNull(this.input.state.isPanelCollapsed)) { this.input.state.change({ isPanelCollapsed: false }); } } else { this._modelService.updateModel(this._editorModel, ''); this._detailTableData.clear(); } }); return profilerTableContainer; } private _createProfilerPane(): HTMLElement { let editorContainer = this._createProfilerEditor(); let tabbedPanelContainer = document.createElement('div'); tabbedPanelContainer.className = 'profiler-tabbedPane'; this._tabbedPanel = new TabbedPanel(tabbedPanelContainer); this._tabbedPanel.pushTab({ identifier: 'editor', title: nls.localize('text', "Text"), view: { layout: dim => this._editor.layout(dim), render: parent => parent.appendChild(editorContainer) } }); let detailTableContainer = document.createElement('div'); detailTableContainer.className = 'profiler-detailTable'; detailTableContainer.style.width = '100%'; detailTableContainer.style.height = '100%'; this._detailTableData = new TableDataView<IDetailData>(); this._detailTable = new Table(detailTableContainer, this._detailTableData, [ { id: 'label', name: nls.localize('label', "Label"), field: 'label' }, { id: 'value', name: nls.localize('profilerEditor.value', "Value"), field: 'value' } ], { forceFitColumns: true }); this._tabbedPanel.pushTab({ identifier: 'detailTable', title: nls.localize('details', "Details"), view: { layout: dim => this._detailTable.layout(dim), render: parent => parent.appendChild(detailTableContainer) } }); this._collapsedPanelAction = this._instantiationService.createInstance(Actions.ProfilerCollapsablePanelAction, Actions.ProfilerCollapsablePanelAction.ID, Actions.ProfilerCollapsablePanelAction.LABEL); this._tabbedPanel.pushAction(this._collapsedPanelAction, { icon: true, label: false }); this._register(attachTableStyler(this._detailTable, this.themeService)); return tabbedPanelContainer; } private _createProfilerEditor(): HTMLElement { this._editor = this._instantiationService.createInstance(ProfilerResourceEditor); let editorContainer = document.createElement('div'); editorContainer.className = 'profiler-editor'; this._editor.create(new Builder(editorContainer)); this._editor.setVisible(true); this._editorInput = this._instantiationService.createInstance(UntitledEditorInput, URI.from({ scheme: Schemas.untitled }), false, 'sql', '', ''); this._editor.setInput(this._editorInput, undefined); this._editorInput.resolve().then(model => this._editorModel = model.textEditorModel); return editorContainer; } public get input(): ProfilerInput { return this._input as ProfilerInput; } public setInput(input: ProfilerInput, options?: EditorOptions): TPromise<void> { this._profilerEditorContextKey.set(true); if (input instanceof ProfilerInput && input.matches(this.input)) { return TPromise.as(null); } return super.setInput(input, options).then(() => { this._profilerTableEditor.setInput(input); if (input.sessionTemplate) { this._sessionTemplateSelector.selectWithOptionName(input.sessionTemplate.name); } else { input.sessionTemplate = this._sessionTemplates.find(i => i.name === 'Standard'); } this._actionBar.context = input; this._tabbedPanel.actionBarContext = input; if (this._stateListener) { this._stateListener.dispose(); } this._stateListener = input.state.addChangeListener(e => this._onStateChange(e)); this._onStateChange({ isConnected: true, isRunning: true, isPaused: true, isStopped: true, autoscroll: true, isPanelCollapsed: true }); this._profilerTableEditor.updateState(); this._splitView.layout(); this._profilerTableEditor.focus(); }); } public clearInput(): void { this._profilerEditorContextKey.set(false); } public toggleSearch(): void { if (this._editor.getControl().isFocused()) { let editor = this._editor.getControl() as ICodeEditor; let controller = CommonFindController.get(editor); if (controller) { controller.start({ forceRevealReplace: false, seedSearchStringFromGlobalClipboard: false, seedSearchStringFromSelection: (controller.getState().searchString.length === 0), shouldFocus: FindStartFocusAction.FocusFindInput, shouldAnimate: true }); } } else { this._profilerTableEditor.toggleSearch(); } } private _onStateChange(e: IProfilerStateChangedEvent): void { if (e.autoscroll) { this._autoscrollAction.checked = this.input.state.autoscroll; } if (e.isPanelCollapsed) { this._collapsedPanelAction.collapsed = this.input.state.isPanelCollapsed; this._tabbedPanel.collapsed = this.input.state.isPanelCollapsed; this._panelView.collapsed = this.input.state.isPanelCollapsed; } if (e.isConnected) { this._connectAction.connected = this.input.state.isConnected; this._startAction.enabled = this.input.state.isConnected; this._stopAction.enabled = false; this._pauseAction.enabled = false; if (this.input.state.isConnected) { this._sessionTemplateSelector.disable(); } else { this._sessionTemplateSelector.enable(); } return; } if (e.isRunning) { this._startAction.enabled = !this.input.state.isRunning; } if (e.isStopped || e.isRunning) { this._stopAction.enabled = !this.input.state.isStopped && this.input.state.isRunning; } if (e.isPaused || e.isRunning) { this._pauseAction.enabled = !this.input.state.isPaused && this.input.state.isRunning; } } public layout(dimension: Dimension): void { this._container.style.width = dimension.width + 'px'; this._container.style.height = dimension.height + 'px'; this._body.style.width = dimension.width + 'px'; this._body.style.height = (dimension.height - (28 + 4)) + 'px'; this._splitView.layout(dimension.height - (28 + 4)); } } abstract class SettingsCommand extends Command { protected getProfilerEditor(accessor: ServicesAccessor): ProfilerEditor { const activeEditor = accessor.get(IWorkbenchEditorService).getActiveEditor(); if (activeEditor instanceof ProfilerEditor) { return activeEditor; } return null; } } class StartSearchProfilerTableCommand extends SettingsCommand { public runCommand(accessor: ServicesAccessor, args: any): void { const preferencesEditor = this.getProfilerEditor(accessor); if (preferencesEditor) { preferencesEditor.toggleSearch(); } } } const command = new StartSearchProfilerTableCommand({ id: PROFILER_TABLE_COMMAND_SEARCH, precondition: ContextKeyExpr.and(CONTEXT_PROFILER_EDITOR), kbOpts: { primary: KeyMod.CtrlCmd | KeyCode.KEY_F } }); KeybindingsRegistry.registerCommandAndKeybindingRule(command.toCommandAndKeybindingRule(KeybindingsRegistry.WEIGHT.editorContrib()));
typescript
{ "Name" : "XlnxIP C source", "Version" : "1.0.0", "Description" : [ "XILINX IP core c source for driver generator", "Generate all necessary structur for initialization and register access." ], "Patterns" : [ "First line: name_of_ip", "Other line: reg_name r|w|rw 8|16|32 0x<offset_hex>" ] }
json
How Aishwarya Arjun and Umapathy Ramaiah fell in love without acting together? We have so far seen that usually male and female stars who act together in a few films fall in love and eventually marry after dating for a few years. But in the case of young actress Aishwarya Arjun and Umapathy Ramaiah they seem to have fallen for each other without even costarring in any film. We recently broke the news that veteran actor Arjun Sarja's eldest daughter Aishwarya and National Award winning actor Thambi Ramaiah's son Umapathy are getting married soon. It is said that the couple met each other during the shooting of the reality show 'Survivor' hosted by Arjun in which Umapathy was a star contestant. The youngsters apparently struck a friendship when they got introduced and as days went by cupid struck. It is further said that Thambi Ramaiah along with his entire family participated in the opening ceremony of the Anjaneya temple built by Arjun. It is then that the two families came to know about Aishwarya and Umapathy are serious about each other and the elders gave their blessings. The wedding is planned to take place sometime in January or February next year. Since both Arjun and Thambi Ramaiah are big stars the who is who of the entire South Indian film industry is expected to grace the occassion. Follow us on Google News and stay updated with the latest!
english
The divine Athivaradhar statue that is kept in the Anantharas pond in the Kancheepuram Varadarajar temple is taken out once in forty years. From July 1st this year the deity graced devotees at the Vasantha Mandap for 24 days in a Sayana pose and the rest 24 days in an upright position. It has been announced by the authorities that the statue will once again return to the pond on the 17th of August. Superstar Rajinikanth visited Athivaradhar along with his wife this morning at dawn and offered his prayers. The temple officials gave a warm welcome to the VVIP and the people in the area started speculations that the Thalaivar will soon announce his new political party name now that Athivaradhar has blessed him. Follow us on Google News and stay updated with the latest!
english
<reponame>nicolasbonnetdu13/weezevent-slack-notifier var Promise = require('bluebird'); const Sequelize = require('sequelize') var assert = require('assert'); var _ = require('lodash'); function Store(opts){ var self = this; self.sequelize = new Sequelize(opts.db_url, { dialectOptions: { ssl: { require: true, rejectUnauthorized: false } } }); self.Participants = self.sequelize.define('participants', { participants: { type: Sequelize.JSON }, latest_creation: { type: Sequelize.DATE } }, { }); self.Participants.sync({force: false}) }; Store.prototype.fetchPersistedParticipants = function() { var self = this; return new Promise(function(resolve, reject) { self.sequelize.authenticate().then(() => { self.Participants.findOne({ order: [ [ 'latest_creation', 'DESC' ]] }).then(function(storedParticipants) { resolve(storedParticipants); }).catch(function(error) { reject(error); }); }).catch(err => { reject(err); }); }); }; Store.prototype.persistParticipantsIn = function(participants) { var self = this; return new Promise(function(resolve, reject) { self.sequelize.authenticate().then(() => { self.Participants.create({ participants: participants, latest_creation: _.max(_.map(participants, 'create_date')) }).then(function() { resolve(); }).catch(function(error) { reject(error); }); }).catch(err => { reject(err); }); }); }; module.exports = Store;
javascript
<filename>api/wizard/apps_api.go // Copyright (c) 2017-2021 Ingram Micro Inc. package wizard import ( "encoding/json" "fmt" "github.com/ingrammicro/cio/api/types" "github.com/ingrammicro/cio/utils" log "github.com/sirupsen/logrus" ) const APIPathWizardApps = "/wizard/apps" const APIPathWizardAppDeploy = "/wizard/apps/%s/deploy" // AppService manages app operations type AppService struct { concertoService utils.ConcertoService } // NewAppService returns a Concerto app service func NewAppService(concertoService utils.ConcertoService) (*AppService, error) { if concertoService == nil { return nil, fmt.Errorf("must initialize ConcertoService before using it") } return &AppService{ concertoService: concertoService, }, nil } // ListApps returns the list of apps as an array of App func (as *AppService) ListApps() (apps []*types.WizardApp, err error) { log.Debug("ListApps") data, status, err := as.concertoService.Get(APIPathWizardApps) if err != nil { return nil, err } if err = utils.CheckStandardStatus(status, data); err != nil { return nil, err } if err = json.Unmarshal(data, &apps); err != nil { return nil, err } return apps, nil } // DeployApp deploys a app func (as *AppService) DeployApp(appID string, appParams *map[string]interface{}) (app *types.Server, err error) { log.Debug("DeployApp") data, status, err := as.concertoService.Post(fmt.Sprintf(APIPathWizardAppDeploy, appID), appParams) if err != nil { return nil, err } if err = utils.CheckStandardStatus(status, data); err != nil { return nil, err } if err = json.Unmarshal(data, &app); err != nil { return nil, err } return app, nil }
go
{"html_attributions": [], "results": [{"business_status": "OPERATIONAL", "geometry": {"location": {"lat": 25.0226466, "lng": 86.18161909999999}, "viewport": {"northeast": {"lat": 25.0238735802915, "lng": 86.1828926302915}, "southwest": {"lat": 25.0211756197085, "lng": 86.1801946697085}}}, "icon": "https://maps.gstatic.com/mapfiles/place_api/icons/v1/png_71/generic_business-71.png", "icon_background_color": "#7B9EB0", "icon_mask_base_uri": "https://maps.gstatic.com/mapfiles/place_api/icons/v2/generic_pinlet", "name": "PKY ONLINE YADAV", "opening_hours": {"open_now": true}, "photos": [{"height": 2289, "html_attributions": ["<a href=\"https://maps.google.com/maps/contrib/116094832349092034098\">PKY ONLINE YADAV</a>"], "photo_reference": "<KEY>", "width": 2289}], "place_id": "ChIJb01_o6Mp8jkRwj006gS5_X4", "plus_code": {"compound_code": "25FJ+3J Lakhapur, Bihar, India", "global_code": "7MQ825FJ+3J"}, "rating": 1, "reference": "ChIJb01_o6Mp8jkRwj006gS5_X4", "scope": "GOOGLE", "types": ["local_government_office", "point_of_interest", "establishment"], "user_ratings_total": 1, "vicinity": "PKY ONLINE YADAV, Lakhapur"}], "status": "OK"}
json
Beijing: China on Thursday dismissed reports that retired President Jiang Zemin, who led the country through massive changes after the crushing of the 1989 Tiananmen Square democracy movement, has died. The official Xinhua News Agency quoted what it called authoritative sources as saying the reports were "pure rumor. " The one-sentence dispatch in English wasn't carried by the Chinese-language service of the state-run agency, indicating it was meant for overseas audiences. The need to comment underscores the difficulties the secretive, authoritarian government faces in controlling information. While state media are under tight control, foreign reports seep into China via the Internet, giving Chinese access to news -- and rumors -- the leadership dislikes. An official from the Cabinet's information office said only, "It's a rumor," when asked about Jiang's death. The official, like many in China, would give only her surname, Li. Foreign Ministry spokesman Hong Lei refused to comment directly on Jiang, referring reporters at a regular news conference Thursday to the Xinhua report. The denials follow days of intense online conjecture over whether Jiang, 84, had died or was close to death, fueled by his failure to appear at last Friday's celebration of the 90th anniversary of the ruling Communist Party's founding. A Hong Kong TV station and Japanese and South Korean media had reported that Jiang had died. The Internet speculation sent censors into overdrive to excise the comments. Searches for "Jiang Zemin" in Chinese or simply "Jiang" -- which means "river" -- drew warnings on Sina Corp. 's popular Twitter-like service that said the search was illegal. Some posts then began appearing on Sina Weibo about former leader "River" in English. News that some overseas media had reported Jiang's death whizzed around the social networking site, with some mainland users puzzling over how Hong Kong media could have received the news first. The government is very secretive about the health of top leaders and is particularly sensitive ahead of a looming leadership transition that kicks off late next year at a major Communist Party congress. The death of Jiang, a retired but still very influential figure, could cause some of his proteges to shift allegiances, affecting the jockeying for power among China's rising political elites. China prefers to keep such machinations behind the scenes as much as possible. The U. S. -based dissident news site Boxun. com said Shandong News in eastern China had its website disabled by authorities for reporting Jiang's death, though the newspaper dismissed Boxun's report. Boxun showed what it said was a screenshot of Shandong News with a banner headline reading, "Venerable Comrade Jiang Zemin Will Never Be Forgotten" next to a photo of the former leader. A woman in the news department at Shandong News said the newspaper's site went offline Wednesday because their servers crashed and they were still trying to fix the problem. The woman, who would only give her surname, Wang, said the website never posted news saying Jiang had died. "That's a rumor," she said. "Maybe someone with ulterior motives made that screenshot. " Jiang led China for a dozen years until transferring power to President Hu Jintao in 2002.
english
<reponame>karagenit/task-manager #include "running_process.h" #include <dirent.h> #include <unistd.h> #include <sstream> #include <fstream> #include <cstring> #include <iostream> #include <iomanip> #include "helper_functions.h" RunningProcess::RunningProcess(int pid) { // set pid this->parent_ = NULL; this->pid = pid; parent_pid_ = 0; tree_item_ = new QTreeWidgetItem(); // parse /proc/<pid>/stat for process name and parent pid std::ifstream in("/proc/" + std::to_string(this->pid) + "/stat"); if (!in) { return; } std::string name; in >> name >> name; while (*(name.end() - 1) != ')') { std::string temp; in >> temp; name = name + " " + temp; } // discard parentheses from process name this->name_ = name.substr(1, name.length() - 2); std::string parent_pid_string; in >> parent_pid_string >> parent_pid_string; this->parent_pid_ = std::stoi(parent_pid_string); update_qtree_item(); in.close(); } RunningProcess::~RunningProcess() { if (tree_item_) { QTreeWidgetItem *parent = tree_item_->parent(); if (parent != NULL) { parent->removeChild(tree_item_); } else { tree_item_->setHidden(true); } delete tree_item_; } } void RunningProcess::remove_child(RunningProcess *child) { if (child == NULL) { return; } auto i = children_.cbegin(); while (i != children_.cend()) { RunningProcess *p = *i; if (p == child) { children_.erase(i++); tree_item_->removeChild(child->tree_item_); child->parent_ = NULL; return; } else { i++; } } } std::string RunningProcess::get_status_field(std::string field) { std::ifstream in("/proc/" + std::to_string(pid) + "/status"); std::string line; while (std::getline(in, line)) { if (line.find(field) == 0) { std::string answer = line.substr(field.length()); in.close(); return answer; } } in.close(); return "---"; } // get_uid() to get real uid // get_uid(false) to get effective uid int RunningProcess::get_uid(bool real) { std::string uid_fields = get_status_field("Uid:"); std::istringstream ss(uid_fields); int uid; ss >> uid; if (!real) { // effective uid instead of real ss >> uid; } if (ss.fail()) { return -1; } return uid; } std::string RunningProcess::get_user() { int uid = get_uid(); return uid_to_name(uid); } std::string RunningProcess::get_status() { std::string state_line = get_status_field("State:"); std::istringstream stream(state_line); std::string state; stream >> state >> state; if (stream.fail()) { return "---"; } // remove parentheses from the state return state.substr(1, state.length() - 2); } std::vector<file_info> RunningProcess::get_files() { std::vector<file_info> answer; std::string path = "/proc/" + std::to_string(this->pid) + "/fd"; DIR *dir = opendir(path.c_str()); if (dir == NULL) { // TODO(sam): better handle the case where we don't have permission // to open /proc/<pid>/fd return answer; // return an empty list? } struct dirent *ent; while ((ent = readdir(dir)) != NULL) { if (is_number(ent->d_name)) { std::string fd_path = path + "/" + ent->d_name; std::string buffer(128, '\0'); int bytes_read = readlink(fd_path.c_str(), &buffer[0], buffer.capacity() - 1); if (bytes_read > 0) { buffer[bytes_read] = '\0'; } file_info info; info.fd = std::stoi(ent->d_name); info.object = buffer; info.type = "file"; const char *socket = std::strstr(buffer.c_str(), "socket"); if (socket) { info.type = "socket"; } else { const char *pipe = std::strstr(buffer.c_str(), "pipe"); if (pipe) { info.type = "pipe"; } } answer.push_back(info); } } closedir(dir); return answer; } std::string RunningProcess::get_memory() { std::string mem_line = get_status_field("RssAnon:"); return trim(mem_line); } void RunningProcess::add_child(RunningProcess *child) { if (child == NULL) { return; } children_.push_back(child); child->parent_ = this; tree_item_->addChild(child->tree_item_); } RunningProcess *RunningProcess::get_parent() { return parent_; } std::vector<RunningProcess *> RunningProcess::get_children() { return children_; } int RunningProcess::get_parent_pid() { return parent_pid_; } std::string RunningProcess::get_name() { return name_; } void RunningProcess::update_qtree_item() { tree_item_->setText(0, QString(name_.c_str())); tree_item_->setText(1, QString(get_status().c_str())); tree_item_->setText(2, QString(get_cpu_percent().c_str())); tree_item_->setText(3, QString(std::to_string(pid).c_str())); tree_item_->setText(4, get_memory().c_str()); } QTreeWidgetItem *RunningProcess::get_qtree_item() { update_qtree_item(); return tree_item_; } QTreeWidget *RunningProcess::get_detailed_view() { QTreeWidget *tree = new QTreeWidget(); tree->setColumnCount(2); QStringList header_labels; header_labels.push_back(QString("Property")); header_labels.push_back(QString("Value")); tree->setHeaderLabels(header_labels); std::vector<std::string> keys; std::vector<std::string> vals; keys.push_back("Name"); vals.push_back(name_); keys.push_back("User"); vals.push_back(get_user()); keys.push_back("State"); vals.push_back(get_status()); keys.push_back("Memory"); vals.push_back(get_memory()); keys.push_back("Virtual Memory"); vals.push_back(get_virtual_memory()); keys.push_back("Resident Memory"); vals.push_back(get_resident_memory()); keys.push_back("Shared Memory"); vals.push_back(get_shared_memory()); keys.push_back("CPU Time"); vals.push_back(get_cpu_time()); keys.push_back("Time Started"); vals.push_back(get_start_datetime()); for (unsigned int i = 0; i < keys.size(); i++) { QStringList fields; fields.push_back(QString(keys.at(i).c_str())); fields.push_back(QString(vals.at(i).c_str())); QTreeWidgetItem *item = new QTreeWidgetItem( static_cast<QTreeWidget *>(0), fields); tree->addTopLevelItem(item); } return tree; } unsigned long int RunningProcess::get_boot_time() { std::ifstream in("/proc/stat"); if (!in) { return -1; } std::string line; while (std::getline(in, line)) { std::istringstream ss(line); std::string label; ss >> label; if (label.compare("btime") == 0) { unsigned long int answer; ss >> answer; in.close(); return answer; } } in.close(); return -1; } std::string RunningProcess::get_start_datetime() { std::ifstream in("/proc/" + std::to_string(pid) + "/stat"); if (!in) { return "---"; } std::string junk; for (int i = 0; i < 21; i++) { in >> junk; } unsigned long long start_time; in >> start_time; if (in.fail()) { return "---"; } in.close(); // start_time represents the time after system boot that the process started unsigned long int boot_time = get_boot_time(); // boot_time represents the seconds since the epoch when the system booted. time_t real_time = boot_time + start_time / sysconf(_SC_CLK_TCK); char buff[128]; ctime_r(&real_time, buff); return trim(std::string(buff)); } std::string RunningProcess::get_shared_memory() { std::string shared_line = get_status_field("RssShmem:"); return trim(shared_line); } std::string RunningProcess::get_resident_memory() { std::string res_line = get_status_field("VmRSS:"); return trim(res_line); } std::string RunningProcess::get_virtual_memory() { std::string virt_line = get_status_field("VmSize:"); return trim(virt_line); } long int RunningProcess::get_cpu_time_seconds() { // sum of stime and utime from /proc/[pid]/stat std::ifstream in("/proc/" + std::to_string(pid) + "/stat"); if (!in) { return -1; } std::string junk; for (int i = 0; i < 13; i++) { in >> junk; } long int buff; long int answer = 0; for (int i = 0; i < 2; i++) { in >> buff; answer += buff; } if (in.fail()) { answer = -1; } in.close(); return answer / sysconf(_SC_CLK_TCK); } std::string RunningProcess::get_cpu_time() { long int seconds = get_cpu_time_seconds(); if (seconds == -1) { return "---"; } return std::to_string(seconds) + std::string(" seconds"); } int num_cpus() { std::ifstream in("/proc/cpuinfo"); if (!in) { return 1; } int answer = 0; std::string line; while (std::getline(in, line)) { if (line.find("processor") == 0) { answer += 1; } } in.close(); return answer; } std::string RunningProcess::get_cpu_percent() { long int seconds_running = get_cpu_time_seconds(); std::ifstream uptime_in("/proc/uptime"); if (!uptime_in) { return "0%"; } double uptime; uptime_in >> uptime; if (uptime_in.fail()) { return "0%"; uptime_in.close(); } uptime_in.close(); uptime *= num_cpus(); double percent = 100 * (static_cast<double>(seconds_running)) / uptime; percent *= 1000; percent = (static_cast<int>(percent)); percent /= 1000; std::ostringstream oss; oss << std::setprecision(5) << percent << "%"; return oss.str(); } std::string RunningProcess::calc_vm_size(std::string vm_start, std::string vm_end) { unsigned long long start_num, end_num; std::stringstream converter; converter << std::hex << vm_start; converter >> start_num; converter.clear(); converter << vm_end; converter >> end_num; double vm_size_num = end_num - start_num; const char *suffixes[] = {" B", " kiB", " MiB", " GiB", " TB"}; unsigned int i = 0; while (i < sizeof(suffixes) / sizeof(char *) - 1 && vm_size_num > 1024) { vm_size_num /= 1024; i++; } std::string vm_size = std::to_string(static_cast<int>(vm_size_num)) + suffixes[i]; return vm_size; } QList<QTreeWidgetItem *> RunningProcess::get_map_items() { QList<QTreeWidgetItem *> answer; std::ifstream in("/proc/" + std::to_string(pid) + "/smaps"); if (!in) { return answer; } std::string line; while (getline(in, line)) { std::string ranges, flags, offset, device, inode, name; device = "---"; name = "---"; inode = "---"; std::istringstream ss(line); ss >> ranges >> flags >> offset >> device >> inode >> name; if (ranges.find("-") == std::string::npos) { continue; } std::string vm_start = ranges.substr(0, ranges.find("-")); std::string vm_end = ranges.substr(ranges.find("-") + 1); std::string vm_size = calc_vm_size(vm_start, vm_end); QStringList fields; fields.push_back(QString(name.c_str())); fields.push_back(QString(vm_start.c_str())); fields.push_back(QString(vm_end.c_str())); fields.push_back(QString(vm_size.c_str())); fields.push_back(QString(flags.c_str())); fields.push_back(QString(offset.c_str())); std::string shared_clean, shared_dirty, priv_clean, priv_dirty = "---"; std::string line1; int to_find = 4; while (to_find > 0 && std::getline(in, line1)) { std::istringstream stream(line1); std::string label; stream >> label; if (label.compare("Shared_Clean:") == 0) { shared_clean = trim(line1.substr(strlen("Shared_Clean:"))); to_find--; } else if (label.compare("Shared_Dirty:") == 0) { shared_dirty = trim(line1.substr(strlen("Shared_Dirty:"))); to_find--; } else if (label.compare("Private_Clean:") == 0) { priv_clean = trim(line1.substr(strlen("Private_Clean:"))); to_find--; } else if (label.compare("Private_Dirty:") == 0) { priv_dirty = trim(line1.substr(strlen("Private_Dirty:"))); to_find--; } } fields.push_back(QString(priv_clean.c_str())); fields.push_back(QString(priv_dirty.c_str())); fields.push_back(QString(shared_clean.c_str())); fields.push_back(QString(shared_dirty.c_str())); fields.push_back(QString(device.c_str())); fields.push_back(QString(inode.c_str())); QTreeWidgetItem *item = new QTreeWidgetItem(static_cast<QTreeWidget *>(0), fields); answer.push_back(item); } in.close(); return answer; } QTreeWidget *RunningProcess::get_mmap_tree() { QTreeWidget *mmap_tree = new QTreeWidget; mmap_tree->setColumnCount(6); QStringList header_labels; header_labels.push_back(QString("Filename")); header_labels.push_back(QString("VM Start")); header_labels.push_back(QString("VM End")); header_labels.push_back(QString("VM Size")); header_labels.push_back(QString("Flags")); header_labels.push_back(QString("VM Offset")); header_labels.push_back(QString("Private clean")); header_labels.push_back(QString("Private dirty")); header_labels.push_back(QString("Shared clean")); header_labels.push_back(QString("Shared dirty")); header_labels.push_back(QString("Device")); header_labels.push_back(QString("Inode")); mmap_tree->setHeaderLabels(header_labels); QList<QTreeWidgetItem *> maps = get_map_items(); mmap_tree->addTopLevelItems(maps); return mmap_tree; }
cpp
Mumbai: Actor Randeep Hooda Monday said he has started shooting for SwatantryaVeer Savarkar, a biopic of Hindutva ideologue V D Savarkar. It also marks the directorial debut of Hooda, who plays the titular role in the film. Filmmaker Mahesh Manjrekar was previously attached to direct the film. The actor, known for movies such as Highway, Sarbjit and Sultan, took to Twitter to share the update and said working on the upcoming film is a “special moment” for him. “Lights, Camera HISTORY! Starting shoot for my next, @anandpandit & @officialsandipssingh’s #SwatantryaVeerSavarkar. “The film is slated to release on 26th May, 2023 on the occasion of #VeerSavarkar’s 140th birth anniversary @directorsamkhan,” Hooda wrote alongside pictures from the set. This is a special moment. Produced by Anand Pandit Motion Pictures and Legend Studios, SwatantryaVeer Savarkar is co-written by Utkarsh Naithani and Hooda. Anand Pandit, Sandeep Singh and Sam Khan are credited as producers along with Roopa Pandit and Zafar Mehdi attached to co-produce. According to Pandit, Hooda is the perfect actor to play the title role in the film. “Our film has Randeep as a director too and that makes me feel proud,” he said in a statement. “I feel privileged and honoured to be making this film,” added Singh. The movie is slated to be released May 26, 2023.
english
<reponame>daichangxin/sentry-webpack-example.pawgame.com<filename>tsconfig.json { "compilerOptions": { "module": "esnext", "moduleResolution": "node", "target": "es6", "outDir": "./tsc_outputs", "noEmitHelpers": false, "sourceMap": true, "removeComments": true, "esModuleInterop": true, "allowSyntheticDefaultImports": true, "resolveJsonModule": true, "skipLibCheck": true }, "include": ["src", "libs", "node_modules/**/*.d.ts"] }
json
Videos surfaced on social media showing raging fire and large smoke clouds at a Saudi Arabia oil depot after it was attacked by Yemen’s Houthi rebels on Friday. The attack came ahead of a Formula 1 race. The North Jiddah Bulk Plant, near the city’s airport, is a crucial hub for Muslim pilgrims heading to Mecca. The attack comes days after a similar attack on the oil depot. Smoke billowed near Jeddah’s F1 track as drivers took part in practice runs. Red Bull’s world champion Max Verstappen said that he could smell the blaze as he drove. “I can smell burning… is it my car? ” the Dutchman asked over team radio. The second-ever Saudi Arabian Grand Prix in Jiddah is taking place on Sunday. Later on Friday, Houthi military spokesperson Yahya Sarea said the group attacked Aramco’s facilities with missiles and the Ras Tanura and Rabigh refineries with drones. Facilities of oil giant Aramco were also attacked in Jizan, Najran, Ras Tanura and Rabigh with “a large number of drones,” he added. Meanwhile, the Arab Coalition announced in a statement on Friday stated that Saudi Arabia’s defenses destroyed nine explosive-laden drones launched by Houthis. The drones were launched towards the southern, eastern and central regions of the Kingdom, an official Saudi Press Agency (SPA) report stated.
english
<filename>app/data/seed/organisations/9d03acb4-95ce-41e1-8458-0b4bec147b6b.json {"id":"9d03acb4-95ce-41e1-8458-0b4bec147b6b","name":"The University of Manchester","code":"M20","type":"hei","isAccreditedBody":true,"ukprn":"10007798","address":{"addressLine1":"Manchester Institute of Education","addressLine2":"Oxford Road","town":"Manchester","county":"Greater Manchester","postcode":"M13 9PL"},"contact":{"website":"https://www.seed.manchester.ac.uk/education/study/pgce/","email":"<EMAIL>","telephone":"0161 306 1311","fullName":"PGCE Office"},"location":{"latitude":53.4668498,"longitude":-2.2338837},"trainWithUs":"The University of Manchester is part of the prestigious Russell Group of universities and our research and teaching quality is recognised across the globe.\nChoose Manchester and you’ll put yourself ahead of the competition when the time comes to begin your career. With an award-winning careers service and courses built with your employability in mind, it’s no surprise that 94% of our trainees find employment at the end of the course. By choosing a PGCE with us, you'll benefit from postgraduate-level study at a highly regarded university and significant school-based teaching experience. We are:\n- Rated as outstanding by Ofsted.\n- Best university provider of postgraduate teacher training in the North of England (The Good Teacher Training Guide 2017).","trainWithDisability":"Disabled students make up over 15% of University of Manchester students, and we’re proud to offer an accessible and inclusive service.\nThe Disability Advisory and Support Service (sometimes called the DASS) supports a variety of different people, whether students, staff or supporters. We want to help you succeed - in your studies, work, and the rest of your University experience.\nFor more information please follow this link: http://www.dso.manchester.ac.uk/","visaSponsorship":{"canSponsorSkilledWorkerVisa":"no","canSponsorStudentVisa":"yes"},"createdAt":"2021-07-06T17:55:19.454Z","updatedAt":"2021-09-29T19:32:56.955Z"}
json
<filename>logger/logger.go package logger import ( "fmt" "os" "github.com/fatih/color" ) // Log is a struct to define the // message and the function used to // log the message of that type type Log struct { Message string Func func(string) } // Info is used for logging information // or updates func Info(msg string) { color.Cyan(fmt.Sprintf("\r[bird] %-50s ", msg)) } // Success is used for logging func Success(msg string) { color.Green(fmt.Sprintf("\r[bird] %-50s ", msg)) } // Error is used to log error messages func Error(msg string) { color.Red(fmt.Sprintf("\r[bird] %-50s ", msg)) } // Fatal is used to log error messages // and exit the process func Fatal(msg string) { color.HiRed(fmt.Sprintf("\r[bird] %-50s ", msg)) os.Exit(1) } // Print exports a call to // fmt.Print limited to type // string func Print(msg string) { fmt.Print(msg) } // Welcome displays the welcome message for bird func Welcome() { color.Green(` _\| __ |/_ _- \_ _/"-> _/ -_ -_ ''( )'-' _- '=.__.=-( )-=.__.=' |/-\| _ _ _ _ Y Y _ _bird `) } // Start listens on a channel // and executes log functions on // that particular channel func Start(logs chan Log) { for l := range logs { l.Func(l.Message) } }
go
Coinbase is growing up fast — or at least trying to. As an emblem of its current effort to accommodate the massive demand on its platform, the mainstream U.S. cryptocurrency exchange just added Facebook Vice President of Messaging Products David Marcus to its board of directors. Coinbase announced the news in a post on Medium. With unprecedented trading volumes and bitcoin at an astronomical all-time high, it’s a critical — and challenging — time for Coinbase. While Facebook and Coinbase may not share a lot of obvious overlap, bringing someone onto the team who has a hand in scaling software to massive proportions certainly can’t hurt. Beyond his experience at Facebook, Marcus served as president of PayPal from 2012 to 2014. He joined PayPal after selling his mobile payments startup Zong to the company (owned by eBay) in 2011. Marcus will maintain his role at Facebook while serving in an advisory capacity at Coinbase. Disclosure: The author holds a small position in some cryptocurrencies. It’s definitely not enough for a Lambo.
english
<gh_stars>1-10 {"version":"1.0.0","name":"rest-crud-api","dependencies":{"express-flash":{"version":"0.0.2"},"express-session":{"version":"1.17.3"},"express":{"version":"4.18.1"},"mysql":{"version":"2.18.1"},"pug":{"version":"3.0.2"}}}
json
Ladki Ne Line Diya Re song is a Hindi movie song from the Kismat Jackpot Return released on 2016. Music of Ladki Ne Line Diya Re song is composed by Tapas Mitra. Ladki Ne Line Diya Re was sung by Vinod Rathod. Download Ladki Ne Line Diya Re song from Kismat Jackpot Return on Raaga.com.
english
1. In which among the following districts was Biju Krushak Kalyan Yojana launched initially in 2013? List I (Newspaper) List II (Year of Publication) 5. Ramatirtha Conservation Centre in Odisha runs a conservation programme for protecting which endangered species? 6. The Bhauma-Kara dynasty in Odisha had commercial relations with which country? 7. The district of Bargarh is not bounded by which of the following? 9. The Kolab reservoir is located in which district of Odisha? 10. The Maternal Mortality Rate (MMR) in Odisha is (as per 2014-16) 12. Which among the following is not a forest division of the Odisha state Forest Department? 13. Which among the following measure is taken to check iron toxicity in lowland soils in Odisha? 14. Which of the following office is implementing the ‘Seed Village Programmes’? 15. Which physiographic part of Odisha is most suited for agricultural activities?
english
<gh_stars>10-100 { "directions": [ "Fill a cocktail shaker with ice. Add tequila, lime juice, Simple Syrup and orange liqueur. Cover and shake until mixed and chilled, about 30 seconds. (In general, the drink is ready by the time the shaker mists up.) Place Lime-salt-sugar on a plate. Press the rim of a chilled rocks or wine glass into the mixture to rim the edge. Strain margarita into the glass.", "Fill a cocktail shaker with ice. Add tequila, lime juice, Simple Syrup and orange liqueur. Cover and shake until mixed and chilled, about 30 seconds. (In general, the drink is ready by the time the shaker mists up.) Place Lime-salt-sugar on a plate. Press the rim of a chilled rocks or wine glass into the mixture to rim the edge. Strain margarita into the glass.", "Put the sugar and water in a small saucepan. Cook over low heat, stirring, until the sugar dissolves. (Alternatively, heat in the microwave.) Store in a sealed container in the refrigerator for up to 1 month.", "Put the sugar and water in a small saucepan. Cook over low heat, stirring, until the sugar dissolves. (Alternatively, heat in the microwave.) Store in a sealed container in the refrigerator for up to 1 month.", "Blend together lime, salt and sugar in a small blender or mini food chopper.", "Blend together lime, salt and sugar in a small blender or mini food chopper." ], "ingredients": [ "Ice cubes", "3 ounces tequila", "2 ounces freshly squeezed lime juice", "1 ounce Simple Syrup, recipe follows", "1/2 to 1 teaspoon orange liqueur", "1 tablespoon Lime-salt-sugar, recipe follows", "Ice cubes", "3 ounces tequila", "2 ounces freshly squeezed lime juice", "1 ounce Simple Syrup, recipe follows", "1/2 to 1 teaspoon orange liqueur", "1 tablespoon Lime-salt-sugar, recipe follows", "1 cup sugar", "1 cup water", "1 cup sugar", "1 cup water", "Zest of one lime", "2 tablespoons kosher salt", "2 tablespoons sugar", "Zest of one lime", "2 tablespoons kosher salt", "2 tablespoons sugar" ], "language": "en-US", "source": "www.foodnetwork.com", "tags": [ "American", "Margarita", "Mixed Drink Recipes", "Holiday", "Fruit", "Tequila Recipes", "Liquor Recipes", "Liqueur Recipes", "Orange Recipes", "Lime Recipes", "Sugar", "Cinco de Mayo" ], "title": "Margarita", "url": "http://www.foodnetwork.com/recipes/food-network-kitchen/margarita-recipe" }
json
The actress flaunts her chic looks in military green pant suit with golden earrings and tied hair! The actress flaunts her casual, comfy yet chic style in a green coordinated sweatshirt and jogger pants. She finishes off her look with some fashion jewellery! Kriti is donning a gorgeous all-white outfit, consisting of a shirt, shrug and accordion skirt. She tops her looks with some oxidized jewellery! The actress looks so chic and stylish in a printed skirt, jacket and black sports bra! Kriti Sanon is looking so gorgeous in a corset top and pencil skirt. The caramel color looks so gorgeous on her!
english
Topics Covered: Important Geophysical phenomena such as earthquakes, Tsunami, Volcanic activity, cyclone etc. How lightning strikes? At least 30 people were killed in separate incidents of lightning in various parts of the country in the past 24 hours. This includes Rajasthan, UP and MP. How common are deaths by lightning? Deaths due to lightning have become frequent in the country. In July last year, 40 people were killed by lightning in Bihar in two separate incidents. - As a whole, India sees 2,000-2,500 lightning deaths every year on average. - Also, lightning is the biggest contributor to accidental deaths due to natural causes. Challenges and concerns: - Occurrences of lightning are not tracked in India, and there is simply not enough data for scientists to work with. - Often, safety measures and precautions against lightning strikes do not receive as much publicity as other natural disasters such as earthquakes. What is lightning? Lightning is a very rapid — and massive — discharge of electricity in the atmosphere, some of which is directed towards the Earth’s surface. How does it strike? - Electrical discharges are generated in giant moisture-bearing clouds that are 10-12 km tall. The base of these clouds typically lies within 1-2 km of the Earth’s surface. Temperatures towards the top of these clouds are in the range of minus 35 to minus 45 degrees Celsius. - As water vapour moves upward in the cloud, the falling temperature causes it to condense. Heat is generated in the process, which pushes the molecules of water further up. - As they move to temperatures below zero degrees celsius, the water droplets change into small ice crystals. They continue to move up, gathering mass — until they are so heavy that they start to fall to Earth. - This leads to a system in which, simultaneously, smaller ice crystals are moving up and bigger crystals are coming down. - Collisions follow, and trigger the release of electrons — a process that is very similar to the generation of sparks of electricity. As the moving free electrons cause more collisions and more electrons, a chain reaction ensues. - This process results in a situation in which the top layer of the cloud gets positively charged, while the middle layer is negatively charged. - An enormous amount of heat is produced, and this leads to the heating of the air column between the two layers of the cloud. This heat gives the air column a reddish appearance during lightning. As the heated air column expands, it produces shock waves that result in thunder. How does this current reach the Earth from the cloud? - While the Earth is a good conductor of electricity, it is electrically neutral. However, in comparison to the middle layer of the cloud, it becomes positively charged. As a result, about 15%-20% of the current gets directed towards the Earth as well. It is this flow of current that results in damage to life and property on Earth. Insta Curious: Do you think lightning only strikes the tallest object? Prelims Link: - How lightning strikes? - What are megaflashes? - Is earth a good conductor of electricity? - Types of clouds. - Lightning strikes in India. Mains Link: Write a note on how lightning phenomenon. Sources: Indian Express.
english
<gh_stars>1000+ { "name": "FastImageCache", "version": "1.1", "summary": "iOS library for quickly displaying images while scrolling", "description": "Fast Image Cache is an efficient, persistent, and—above all—fast way to store and retrieve images in your iOS application. Part of any good iOS application's user experience is fast, smooth scrolling, and Fast Image Cache helps make this easier.\n\nA significant burden on performance for graphics-rich applications like Path is image loading. The traditional method of loading individual images from disk is just too slow, especially while scrolling. Fast Image Cache was created specifically to solve this problem.\n", "homepage": "https://github.com/path/FastImageCache", "license": { "type": "MIT", "file": "LICENSE" }, "authors": { "<NAME>": "<EMAIL>", "<NAME>": "<EMAIL>" }, "platforms": { "ios": "6.0" }, "source": { "git": "https://github.com/path/FastImageCache.git", "tag": "1.1" }, "source_files": "FastImageCache", "requires_arc": true }
json
package Planes; import java.util.Objects; public class Plane { String model; private final int MAX_SPEED; private final int MAX_FLIGHT_DISTANCE; private final int MAX_LOAD_CAPACITY; public Plane(String model, int maxSpeed, int maxFlightDistance, int maxLoadCapacity) { this.model = model; this.MAX_SPEED = maxSpeed; this.MAX_FLIGHT_DISTANCE = maxFlightDistance; this.MAX_LOAD_CAPACITY = maxLoadCapacity; } public int getMaxSpeed() { return MAX_SPEED; } public int getMaxFlightDistance() { return MAX_FLIGHT_DISTANCE; } public int getMinLoadCapacity() { return this.MAX_LOAD_CAPACITY; } @Override public String toString() { return "Plane{" + "model='" + model + '\'' + ", maxSpeed=" + MAX_SPEED + ", maxFlightDistance=" + MAX_FLIGHT_DISTANCE + ", maxLoadCapacity=" + MAX_LOAD_CAPACITY + '}'; } @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof Plane)) return false; Plane plane = (Plane) o; return MAX_SPEED == plane.MAX_SPEED && MAX_FLIGHT_DISTANCE == plane.MAX_FLIGHT_DISTANCE && MAX_LOAD_CAPACITY == plane.MAX_LOAD_CAPACITY && Objects.equals(model, plane.model); } @Override public int hashCode() { return Objects.hash(model, MAX_SPEED, MAX_FLIGHT_DISTANCE, MAX_LOAD_CAPACITY); } }
java
import os import requests import json import time import random import math baseUrl = "https://www.edeka.de/rezepte/rezept/suche" external_baseUrl = "https://www.edeka.de" resultsPerPage = 50 pageQuery = f"?size={resultsPerPage}&page=" def getJson(url): jsonText = requests.get(url).json() return jsonText def getMeta(): data = getJson(baseUrl) return { "totalCount": int(data["totalCount"]), "pages": math.ceil(int(data["totalCount"]) / resultsPerPage) } def getRecipes(pageNumber): url = baseUrl + pageQuery + str(pageNumber) data = getJson(url) return data["recipes"] def getAllIngredients(recipe): ingredients_map = {} for ingredientGroup in recipe["ingredientGroups"]: for ingredientGroupIngredient in ingredientGroup["ingredientGroupIngredients"]: ingredient = ingredientGroupIngredient["ingredient"] quantity = ingredientGroupIngredient["quantity"] unit = ingredientGroupIngredient["unit"] if ingredient in ingredients_map and ingredients_map[ingredient]["unit"] == unit and quantity: if ingredients_map[ingredient]["quantity"] is float: ingredients_map[ingredient]["quantity"] += float(quantity) else: ingredients_map[ingredient]["quantity"] = float(quantity) else: ingredients_map[ingredient] = { "quantity": quantity, "unit": unit } ingredients = [] for k,v in ingredients_map.items(): ingredient = k quantity = float(v["quantity"]) if v["quantity"] != None else None unit = v["unit"] ingredients.append(f"{quantity} {unit} {ingredient}") return ingredients def addRecipe(recipe): print("Adding \"" + recipe["title"] + "\"") quantity = str(recipe["servings"]) + " Portionen" ingredients = getAllIngredients(recipe) external_img_url = recipe["media"]["images"]["ratio_1:1"]["url"]["mediumLarge"] print(quantity) print(ingredients) return { "title": recipe["title"], "external_id": recipe["recipeReference"], "external_source": "Edeka Rezepte", "external_url": external_baseUrl + recipe["uri"], "external_img_url": external_img_url, "quantity": quantity, "ingredients": ingredients } def addPageRecipes(pageRecipes): scrapedRecipes = [] for recipe in pageRecipes: scrapedRecipe = addRecipe(recipe) if(scrapedRecipe): scrapedRecipes.append(scrapedRecipe) return scrapedRecipes def saveResults(pageNumber, recipes, prefix): if not os.path.exists('recipes'): os.makedirs('recipes') with open(f"recipes/{prefix}_recipes_{pageNumber}.json", "w", encoding='utf8') as f: f.write(json.dumps(recipes)) if not os.path.exists('ingredients'): os.makedirs('ingredients') allingredients = list(set([ingredient for l in list(map(lambda i: i["ingredients"], recipes)) for ingredient in l])) with open(f"ingredients/{prefix}_ingredients_{pageNumber}.txt", "w", encoding='utf8') as f: f.write("\n".join(allingredients)) if not os.path.exists('quantities'): os.makedirs('quantities') allquantities = list(set(map(lambda i: i["quantity"], recipes))) with open(f"quantities/{prefix}_quantities_{pageNumber}.txt", "w", encoding='utf8') as f: f.write("\n".join(allquantities)) meta = getMeta() print("Meta: ", meta) pageNumbers = list(set(range(0, int(meta["pages"]))).difference(set([]))) for pageNumber in pageNumbers: print("Page", pageNumber) pageRecipes = getRecipes(pageNumber) scrapedRecipes = addPageRecipes(pageRecipes) saveResults(pageNumber, scrapedRecipes, "edeka")
python
use crate::arch::i386::interrupts::{gdt, idt, pics}; pub fn init() { gdt::init(); idt::init(); unsafe {pics::init()}; } pub fn enable() { x86_64::instructions::interrupts::enable(); } // pub fn set_handler(irq: u8, handler: fn()) { // }
rust
<filename>custom-phrases.json { "checkout": [ "where do i check out items", "how do i check out a loaner", "where do i check out loaners", "what is the website to check out loaners", "what site to check out loaners" ], "workSchedule": [ "who is working today", "what is the work schedule", "who is here today" ], "contacts": [ "contact info", "contact info for", "how do i contact", "what is johns email", "what is johns number" ] }
json
<gh_stars>1-10 import re import pytest from mimesis import Cryptographic from mimesis.enums import Algorithm from mimesis.exceptions import NonEnumerableError from . import patterns class TestCryptographic(object): @pytest.fixture def crypto(self): return Cryptographic() def test_str(self, crypto): assert re.match(patterns.PROVIDER_STR_REGEX, str(crypto)) def test_uuid(self, crypto): assert re.match(patterns.UUID_REGEX, crypto.uuid()) @pytest.mark.parametrize( 'algorithm, length', [ (Algorithm.MD5, 32), (Algorithm.SHA1, 40), (Algorithm.SHA224, 56), (Algorithm.SHA256, 64), (Algorithm.SHA384, 96), (Algorithm.SHA512, 128), ], ) def test_hash(self, crypto, algorithm, length): result = crypto.hash(algorithm=algorithm) assert len(result) == length def test_hash_non_enum(self, crypto): with pytest.raises(NonEnumerableError): crypto.hash(algorithm='nil') @pytest.mark.parametrize('entropy', [32, 64, 128]) def test_token_bytes(self, crypto, entropy): result = crypto.token_bytes(entropy=entropy) assert len(result) == entropy assert isinstance(result, bytes) @pytest.mark.parametrize('entropy', [32, 64, 128]) def test_token_hex(self, crypto, entropy): result = crypto.token_hex(entropy=entropy) # Each byte converted to two hex digits. assert len(result) == entropy * 2 assert isinstance(result, str) @pytest.mark.parametrize('entropy', [32, 64, 128]) def test_token_urlsafe(self, crypto, entropy): result = crypto.token_urlsafe(entropy=entropy) assert len(result) > entropy assert isinstance(result, str) @pytest.mark.parametrize( 'length', [ 8, 16, ], ) def test_mnemonic_phrase(self, crypto, length): result = crypto.mnemonic_phrase(length=length) assert isinstance(result, str) result = result.split(' ') assert len(result) == length class TestSeededCryptographic(object): @pytest.fixture def c1(self, seed): return Cryptographic(seed=seed) @pytest.fixture def c2(self, seed): return Cryptographic(seed=seed) def test_uuid(self, c1, c2): assert c1.uuid() == c2.uuid() def test_hash(self, c1, c2): assert c1.hash() == c2.hash() assert c1.hash(algorithm=Algorithm.SHA512) == \ c2.hash(algorithm=Algorithm.SHA512) def test_mnemonic_phrase(self, c1, c2): assert c1.mnemonic_phrase() == c2.mnemonic_phrase() assert c1.mnemonic_phrase(length=16) == \ c2.mnemonic_phrase(length=16)
python
Sunday, in the city of Chitradurga in the Indian state of Karnataka, ISRO completed a mission called "Reusable Launch Vehicle Autonomous Landing Mission. " The Indian Space Research Organization (ISRO) tweeted, "In a first in the world, a winged body has been carried to an altitude of 4. 5 km by a helicopter and released for carrying out an autonomous landing on a runway. " The space agency released a statement saying that at 7:10 am, an RLV lifted off with a Chinook Helicopter from the Indian Air Force as an underslung cargo, and reached an altitude of 4. 5 kilometres. According to the official statement, RLV landed on the ATR airstrip without any human assistance at 7:40 am after performing approach and landing manoeuvres utilising the integrated navigation, guiding, and control system. In addition, "The autonomous landing was carried out under the exact conditions of a Space Re-entry vehicle's landing —high speed, unmanned, precise landing from the same return path— as if the vehicle arrives from space," the statement said. Aeronautical Development Establishment (ADE) and Aerial Delivery Research and Development Establishment (ADRDE) also participated in the test with the Indian Air Force (IAF). ISRO, joined by @DRDO_India @IAF_MCC, successfully conducted the Reusable Launch Vehicle Autonomous Landing Mission (RLV LEX) at the Aeronautical Test Range (ATR), Chitradurga, Karnataka in the early hours on April 2, 2023. A space aircraft with a low lift to drag ratio, the ISRO says, the RLV had to approach at high glide angles and land at high speeds (350 kilometres per hour). LEX made use of a number of different native methods. ISRO created localised navigation systems that use pseudolite systems, instruments, and sensors, etc.
english
Harmanpreet will begin with her training camp from January 24 ahead of India Women's tour of South Africa. Harmanpreet Kaur might be enjoying all the attention coming her way post the monstrous 171 against Australia in 2017 Women’s World Cup semi-final, but she is facing tough time in terms of her job. After the 2017 Women’s World Cup, Harmanpreet was offered the DSP role in Punjab police. Harmanpreet resigned from her Western Railway job with whom she was associated for three years. When Harmanpreet was offered the Western Railway job under sports quota, she signed a five-year contract. Apart from not accepting resignation, the Western Railways has not paid her five-month salary as well since she accepted the DSP role. Western Railway was also demanding INR 27 lakhs if she wished to resign in order to honour the five-year bond with the Railways. Harmanpreet will begin with her training camp from January 24 ahead of India Women’s tour of South Africa.
english
A news report published in The Hindu on Sunday described how the Border Security Force (BSF) in the North 24 Parganas district of West Bengal is handing over illegal migrants with a clean record to Bangladeshi officials as prisons are overflowing in the State. If normal procedure were to be followed, these illegal migrants would have been lodged in correctional homes, the report added. The story has put the spotlight back on the age-old problem of overcrowded prisons in India. Data show that in 2021, the latest year for which numbers are available, over 5. 54 lakh people were lodged in prison, while the total capacity of Indian jails was about 4. 25 lakh. This means that the occupancy rate of Indian prisons was 130%, a peak at least in the last decade. Chart 1 shows the capacity of Indian prisons, the number of actual prisoners and the occupancy rate in the last decade. While the capacity has increased from some 3. 32 lakh to 4. 25 lakh in the last decade — a 27% increase — the number of prisoners has shot up from 3. 7 lakh to 5. 54 lakh in the same period — a 48% increase. This imbalance has caused the occupancy rate to surge from 112% to 130% in the last decade. The pan-India problem of overflowing jails has worsened in the last decade. However, it was most acute in three northern States/Union Territories — Uttarakhand, Uttar Pradesh, and Delhi. In these three regions, the occupancy rate crossed 180% in 2021 (180 prisoners for every 100 vacancies). Notably, in these three regions, the occupancy rate ranged between 60% and 75% in 2011. In fact, of the 36 States and UTs analysed, the occupancy rate increased in 26 of them in the past decade. And in 18 of them, the occupancy rate in 2021 was more than 100%. Chart 2 shows the occupancy rates of select States/UTs in 2011 and 2021. The highest increase was observed in Delhi, where the occupancy rate increased from 60% to 183% — a 122% point increase. Among the major States, significant decreases were observed in Chhattisgarh and Punjab where the occupancy rate decreased by 108% points and 51% points, respectively. Bangladeshi nationals dominate the foreign inmate population in India. Most foreign inmates are lodged in West Bengal prisons as the State shares a long border with the neighbouring country. Chart 3 shows the foreign inmates lodged in West Bengal jails as a share of total foreign prisoners. While there is a slight dip in recent years, the share has consistently remained above 30%. The chart also shows the share of Bangladeshi undertrials among the total number of foreign undertrials lodged in Indian jails. The share has remained above the 35% mark in recent years. When read along with the fact that the occupancy rates in West Bengal prisons have increased from 70% to 120% in the past decade, the BSF’s recent decision to hand over illegal migrants to Bangladesh appears justified. While on the one hand, jails are overflowing, on the other, the vacancies for prison officers are alarmingly high in some States. Also, the money spent on each prison inmate varies widely across States. Chart 4 plots prison officer vacancy in 2019 against the amount spent per inmate in Rs. in 2019-20. In Uttarakhand, Chhattisgarh, Bihar and Jharkhand over 60% of officer positions were vacant. And in Rajasthan, Madhya Pradesh, Punjab and Maharashtra, less than Rs. 20,000 was spent on each prison inmate in 2019-20.
english
PM was briefed about the ramping up of healthcare infrastructure by the states. PM directed that states should be given help & guidance about leading indicators to ramp up healthcare infrastructure. The need to ensure quick & holistic containment measures were also discussed. PM noted that an advisory was sent to the states to identify districts of concern where Case positivity is 10% or more & Bed occupancy is more than 60% on either oxygen supported or ICU beds. PM also reviewed the availability of medicines. He was briefed about the rapid augmenting of production of medicines including Remdesivir. PM reviewed the progress on vaccination & the roadmap for scaling up production on vaccines in the next few months. He was informed that around 17. 7 crore vaccines have been supplied to the states. PM also reviewed the state wise trends on vaccine wastage. PM was briefed that around 31% of eligible population over the age of 45 has been given atleast one dose. PM spoke about the need to sensitise states that the speed of vaccination doesn’t come down. Citizens should be facilitated for vaccination despite lockdowns and healthcare workers involved in vaccination must not be diverted for other duties. Rajnath Singh, Amit Shah, Nirmala Sitharaman, Dr Harsh Vardhan, Piyush Goyal, Mansukh Mandaviya other ministers and top officials were present in the meeting.
english
Noting that technology is integral to India's fight against Covid-19, Modi said luckily, software is one area in which there are no resource constraints. New Delhi: Prime Minister Narendra Modi addressed the CoWIN Global Conclave on Monday and said that vaccination is the best hope for humanity to emerge successfully from the pandemic. “The vaccination is the best hope for humanity to emerge successfully from the pandemic. And right from the beginning, we in India decided to adopt a completely digital approach while planning our vaccination strategy,” PM Modi said. He also went on to add that right from the beginning, India decided to adopt a completely digital approach while planning the vaccination strategy. India's technology platform for Covid vaccination, CoWin, is being made open source and soon it will be available to all countries, Prime Minister Narendra Modi said on Monday, asserting that India has been committed to sharing its expertise and resources with the global community in combating the pandemic. Addressing the CoWIN Global Conclave via video conference, Modi said experience shows that no nation, no matter how powerful, can solve a challenge like this pandemic in isolation. "Right from the beginning of the pandemic, India has been committed to sharing all our experiences, expertise and resources with the global community in this battle," the Prime Minister said. "Despite all our constraints, we have tried to share as much as possible with the world," he said. "That's why, our technology platform for COVID vaccination - the platform we call CoWIN- is being prepared to be made open source so (that) it will be available in any and all countries," Mr Modi said. About 50 countries, including Canada, Mexico, Nigeria, Panama and Uganda, have shown interest in adopting CoWIN to run their vaccination drives, Dr RS Sharma, the CEO of the National Health Authority (NHA), had said recently, adding that India is ready to share the open-source software for free. During the conclave, he also conveyed his sincere condolences for all lives lost to pandemic in all countries. “There is no parallel to such a pandemic in 100 yrs. Experience shows that no nation, however powerful that nation is, can solve a challenge like this in isolation,” PM Modi said.
english
package com.leetcode.design.medium; // Implement a MyCalendar class to store your events. A new event can be added if // adding the event will not cause a double booking. // // Your class will have the method, book(int start, int end). Formally, this rep // resents a booking on the half open interval [start, end), the range of real numb // ers x such that start <= x < end. // // A double booking happens when two events have some non-empty intersection (ie // ., there is some time that is common to both events.) // // For each call to the method MyCalendar.book, return true if the event can be // added to the calendar successfully without causing a double booking. Otherwise, // return false and do not add the event to the calendar. // Your class will be called like this: MyCalendar cal = new MyCalendar(); MyCale // ndar.book(start, end) // // Example 1: // // // MyCalendar(); // MyCalendar.book(10, 20); // returns true // MyCalendar.book(15, 25); // returns false // MyCalendar.book(20, 30); // returns true // Explanation: // The first event can be booked. The second can't because time 15 is already bo // oked by another event. // The third event can be booked, as the first event takes every time less than 2 // 0, but not including 20. // // // // // Note: // // // The number of calls to MyCalendar.book per test case will be at most 1000. // In calls to MyCalendar.book(start, end), start and end are integers in the ra // nge [0, 10^9]. // // // // Related Topics Array // 👍 1251 👎 46 /* O(nlog(n)) Runtime: 22 ms, faster than 67.49% of Java online submissions for My Calendar I. O(n) Memory Usage: 39.9 MB, less than 39.40% of Java online submissions for My Calendar I. */ // leetcode submit region begin(Prohibit modification and deletion) import java.util.TreeMap; public class MyCalendarI_729 { static class MyCalendar { private final TreeMap<Integer, Integer> events = new TreeMap<>(); public boolean book(int start, int end) { Integer prevStart = events.floorKey(start); Integer nextStart = events.ceilingKey(start); if ((prevStart != null && events.get(prevStart) > start) || (nextStart != null && nextStart < end)) { return false; } events.put(start, end); return true; } } } /* * Your MyCalendar object will be instantiated and called as such: MyCalendar obj = new * MyCalendar(); boolean param_1 = obj.book(start,end); */ // leetcode submit region end(Prohibit modification and deletion)
java
use common::tokio::time::Instant; #[derive(Debug)] pub struct Terminated { pub timedout: bool, pub entered_at: Instant, }
rust
package com.camellibby.nacos; import com.alibaba.nacos.sys.env.Constants; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.web.servlet.ServletComponentScan; import org.springframework.scheduling.annotation.EnableScheduling; @SpringBootApplication(scanBasePackages = "com.alibaba.nacos") @ServletComponentScan @EnableScheduling public class NacosApplication { public static void main(String[] args) { System.setProperty(Constants.STANDALONE_MODE_PROPERTY_NAME, "true"); SpringApplication.run(com.alibaba.nacos.Nacos.class, args); } }
java
<reponame>anhnt97/rent-game .header-item { padding: 0px; } .custom-icon-header { padding: 5px 0px 0px; } .input-sm{ background-color: #0d2237; border: 1px solid #0e2a42; } #icon-header { width: 75%; height: 75%; } .custom-btn-search { background-color: #ffffff; } .custom-btn-search > form { width: 100%; background-color: #ffffff; } .custom-btn-search .glyphicon { color: #28adeb; } .custom-btn-header { padding-top: 0.1%; color: #28adeb; } .custom-btn-header li a:focus { background-color: #0d1f31; color: #2cbcfc; } .custom-btn-header > li > a > span { padding-left: 3px; } .custom-btn-header > li > a:hover , a:active , a:focus { background-color: #0d1f31; color: #2cbcfc; } .custom-btn-header-right { padding-top: 1.2%; color: #0d2237; margin-left: 10px; } .custom-btn-header-right > button{ background-color: #0d2237; color: #2cbcfc; margin-right: 10px; border: none; } .custom-btn-header-right button i { margin-right: 5px; } .custom-navbar-top { margin: 5px; border: 0px; } .dropdown-menu-header { background-color: #0f2236; } .dropdown-menu-header { min-width: 200px; background-color: #0f2236; color: #066696; } .dropdown-menu-header.columns-2 { min-width: 400px; } .dropdown-menu-header.columns-3 { min-width: 600px; } .dropdown-menu-header li a { padding: 5px 15px; font-weight: 300; } .multi-column-dropdown { list-style: none; margin: 0px; padding: 0px; } .multi-column-dropdown li a { display: block; clear: both; line-height: 1.428571429; color: #066696; white-space: normal; } .multi-column-dropdown li a:hover { text-decoration: none; background-color: #0f2236; color: #00a9f4; } @media (max-width: 767px) { .dropdown-menu.multi-column { min-width: 240px !important; overflow-x: hidden; } } .nav .open>a, .nav .open>a:focus, .nav .open>a:hover { background-color: #0d1f31; color: #2cbcfc; } .input-group{ border-radius: 5px; color: #00a9f4; } .form-control-feedback { top: 5px; right: 15px; } .input-group > span{ border-radius: 5px; } .form-group > input::placeholder{ color: #046390; } .input-group { width: 250px; } .form-control .input-sm{ background-color: #0d2237; border: 1px solid #0e2a42; } .form-group { padding-top: 5px; } /** Css login form */ .lg-title { text-align: center; color: #333; } .btn-facebook {background: #3b5998;} .btn-twitter {background: #00aced;} .btn-google {background: #c32f10;} .socialButtons a { color: white; opacity: 0.9; } .row .loginOr { margin: 10px; text-align: center; } .loginForm .input-group { margin-bottom: 15px; } .loginForm .input-group { width: 100%; } .glyphicon-remove { padding-top: 10px; } .btn-login { margin-bottom: 5px; } .remember-me p { color: #333; font-weight: normal; } .register-text { color: #333; } .btn-facebook:hover { color: #fff; background-color:#172d5e; } .btn-twitter:hover { color: #fff; background-color:#043d52; } .btn-google:hover { color: #fff; background-color:#6b1301; } /** Css Register */ .registerForm .input-group { margin-bottom: 15px; } .registerForm .input-group { width: 100%; } /** Css khi user da dang nhap */ .btn-group{ position: relative; margin-right: 10px; } .btn-group > button{ background-color: #0d2237; color: #2cbcfc; border: none; } .user-dropdown{ width: 215px; position: absolute; top:30px; background-image: url(../../images/background-header.png); } .price-dropdown-user{ float:right; color: white; font-size: 15px; } .image-user { position: relative; width: 50px; height: 50px; background-color: #3e3e3e; background-image: none; background-repeat: no-repeat; background-position: center center; background-size: cover; border-radius: 50%; background-image: url(https://vignette.wikia.nocookie.net/inazuma-eleven/images/8/8c/Saruyuu.png/revision/latest?cb=20130829025426&path-prefix=vi); margin-bottom: 10px; } .image-user span{ position: absolute; right: -90px; top: 15px; } .list-item{ border-bottom: 1px solid blue; padding: 5px; margin-left: 15px; margin-right: 15px; position: relative; } .dropdown-popup{ display: none; top:-7px; left: 190px; position: absolute; z-index: 99999; background-color: #0d2237; color: #2cbcfc; text-align: center; } #history1:hover .dropdown-popup{ display:inline-block; } .caret-right { border-left: 4px solid; border-bottom: 4px solid transparent; border-top: 4px solid transparent; float: right; margin-top: 8px; } .fixed-notifi{ position: relative; } .notification{ position: absolute; width: 20px; height: 20px; right: -20px; top:-35px; background-color: red; background-image: none; background-repeat: no-repeat; background-position: center center; background-size: cover; border-radius: 50%; text-align: center; padding: 0px 5px; }
css
package com.example.light_it_up; import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; import android.content.Intent; import android.os.Parcelable; import android.telephony.PhoneNumberFormattingTextWatcher; import android.util.Log; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.ImageView; import android.widget.TextView; import android.widget.Toast; import com.bumptech.glide.Glide; import com.google.firebase.database.DatabaseError; import com.google.firebase.database.DatabaseReference; import com.google.firebase.database.FirebaseDatabase; import com.google.firebase.database.IgnoreExtraProperties; import com.google.firebase.database.ValueEventListener; import com.kakao.usermgmt.UserManagement; import com.kakao.usermgmt.callback.LogoutResponseCallback; import com.google.firebase.database.DataSnapshot; public class SignIn extends AppCompatActivity { String strNickname, strProfile, strEmail, strGender; EditText strPhone; String phoneNum; Button signin; private FirebaseDatabase firebaseDatabase = FirebaseDatabase.getInstance(); private DatabaseReference databaseReference = firebaseDatabase.getReference(); @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_login_next); TextView tvNickname = findViewById(R.id.tvNickname); ImageView ivProfile = findViewById(R.id.ivProfile); TextView tvEmail = findViewById(R.id.tvEmail); TextView tvGender = findViewById(R.id.tvGender); Button btnLogout = findViewById(R.id.btnLogout); Intent intent = getIntent(); strNickname = intent.getStringExtra("name"); strProfile = intent.getStringExtra("profile"); strEmail = intent.getStringExtra("email"); strGender = intent.getStringExtra("gender"); tvNickname.setText(strNickname); tvEmail.setText(strEmail); tvGender.setText(strGender); Glide.with(this).load(strProfile).into(ivProfile); //프로필 사진 url을 사진으로 보여줌 //FirebaseDatabase firebaseDatabase = FirebaseDatabase.getInstance(); signin = (Button) findViewById(R.id.btnSignin); signin.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { signUp(view); } }); } @IgnoreExtraProperties public class User { public String username; public String email; public String phonenum; public String gender; public User() { // Default constructor required for calls to DataSnapshot.getValue(User.class) } public User(String username, String email, String gender, String phonenum) { this.username = username; this.email = email; this.phonenum=phonenum; this.gender=gender; } } private void writeNewUser(String userId, String name, String email, String gender, String phonenum) { User user = new User(name, email, gender, phonenum); databaseReference.child("users").child(name).setValue(user); } public void signUp(View view) { strPhone = (EditText)findViewById(R.id.PhoneNumber); //strPhone.addTextChangedListener(new PhoneNumberFormattingTextWatcher()); phoneNum = strPhone.getText().toString(); Intent intent = new Intent(getApplicationContext(), Navi.class); intent.putExtra("name",strNickname); intent.putExtra("phone", phoneNum); writeNewUser(strNickname, strNickname, strEmail, strGender, phoneNum);//사용자 정보 디비에 저장 Toast.makeText(getApplicationContext(), strNickname+"님, 정상적으로 회원가입 되었습니다.",Toast.LENGTH_SHORT).show(); startActivity(intent); } }
java
<filename>src/Components/Box/Box.variants.ts import { AlignXValues, AlignYValues } from '../../Mixins/makeFlex'; export const WIDTH_HEIGHT_VALUES = { full: '100%', half: '50%', fullPage: '100vh', }; export const VALUE_TO_CSS: { [key in AlignXValues | AlignYValues]: string } = { top: 'flex-start', center: 'center', bottom: 'flex-end', left: 'flex-start', right: 'flex-end', justify: 'space-between', };
typescript
<reponame>quickcodingguides/temperature-converter<filename>README.md # temperature_converter Simple Temperature Converter from/to Celsius, Fahrenheit and Kelvin. Includes notes and is optimised for every device out there. HTML, CSS, JavaScript, jQuery. ![](images/Temp_Conv_Image_Read_Me.jpg)
markdown
Protein is an essential nutrient that plays a vital role in the proper functioning of our body. It is one of three macronutrients that provide energy to the body, along with carbohydrates and fats. It is necessary for growth and repair of body tissues, hormone production, and the creation of enzymes and other molecules that help in various bodily functions. Despite its importance, many people don't consume enough protein in their diets. In this article, we will discuss why your body needs protein and some of its best sources. Protein is made up of amino acids, which are the building blocks of life. There are 20 different types of amino acids, and our body needs all of them to function properly. Nine of these amino acids are considered essential because our body cannot produce them on its own, so they must be obtained through our diet. Building and repairing body tissues: Protein is necessary for the growth and repair of muscles, bones, skin, and other tissues. Hormone production: Many hormones in the body are made up of proteins, including insulin which regulates blood sugar levels. Enzyme and molecule creation: It helps create enzymes and other molecules that aid in various bodily functions, such as digestion and metabolism. Immune system support: Proteins help to support the immune system by producing antibodies to fight off infections and diseases. These are considered complete proteins, meaning they contain all of the essential amino acids. Examples include chicken, beef, pork, and salmon. Meats such as red meat and pork are also high in iron and zinc, which are essential for maintaining healthy blood cells, immune system and cognitive function. Poultry such as turkey and chicken are also a good source of niacin, essential for maintaining healthy skin and nervous system. Fish such as salmon, tuna, and mackerel are high in omega-3 fatty acids which are essential for maintaining healthy brain function, heart and vision. #2 Dairy productMilk, cheese, and yogurt are good sources of protein and also provide calcium and other essential nutrients. Dairy products such as milk, cheese, and yogurt are also high in Vitamin D and calcium, which are essential for maintaining strong bones and teeth. Greek yogurt is also high in probiotics which are beneficial for maintaining a healthy gut. #3 Eggs: Eggs are a great source of protein and also contain vitamins and minerals such as Vitamin D and B12 and minerals such as selenium and choline. Eggs are also relatively cheap and versatile, making them a great addition to any diet. #4 Legumes: Beans, lentils, and peas are plant-based sources of protein. They are also high in fiber, vitamins, and minerals. Legumes are also a good source of antioxidants, which help to prevent cell damage. #5 Nuts and seeds: Almonds, peanuts, and pumpkin seeds are examples of protein-rich nuts and seeds. Nuts and seeds are also a good source of healthy fats and minerals such as magnesium and potassium. #6 Plant-based meat alternatives: Plant-based meat alternatives, such as tofu and tempeh, are becoming increasingly popular as sources of protein for vegetarians and vegans. These meat alternatives are also a good source of iron and calcium. In conclusion, protein is an essential nutrient that plays a vital role in the proper functioning of our body. The creation of enzymes and other molecules that help in various bodily functions is necessary for the growth and repair of body tissues and hormone production. To ensure that your body is getting enough protein, it's important to consume a variety of protein-rich foods, such as meat, poultry, fish, dairy products, eggs, legumes, nuts and seeds, and plant-based meat alternatives.
english
--- layout: conference name: '2nd Epigenetics Conference' year: '2020' total_years: '2' discipline: 'Epigenetics' registration_fee: '$1429-$1818' attendees: '200' carbon_footprint: '400' society_name: 'Fusion Conferences Company' society_members: 'Not Applicable' venue: 'Nassau, Bahamas' frequency: 'Biennial' sponsors: 'ARIMA(https://arimagenomics.com/), New England Biolabs(https://international.neb.com/), EMBO Reports (https://www.embopress.org/journal/14693178), JTGG(https://jtggjournal.com/), The Epigenetics Society(http://epigeneticssocietyint.com/), MDPI Epigenomes(https://www.mdpi.com/journal/epigenomes), Wires Systems Biology & Medicine (http://wires.wiley.com/WileyCDA/WiresJournal/wisId-WSBM.html), Royal Society of Chemistry (https://www.rsc.org/journals-books-databases/about-journals/molecular-omics/)' virtual_option: 'None' digital_archives: 'None' attendance_cost: ' $2000-4000' other_carbon_footprint: '100' electonic_program: 'Yes the meeting program was available online.' onsite_maternity: 'None' onsite_childcare: 'None' caregiver_grant: 'None' career_development: 'None' ecr_promotion_events: 'None' travel_awards: 'None' code_of_ethics: 'None' code_of_conduct: 'None' safety_instructions: 'None' gender_balance: 'None' keynote_gender_balance: 'Not Applicable to this meeting.' speaker_gender_balance: 'Not Applicable to this meeting.' invited_gender_balance: '13 Men: 9 Women' session_chair_gender_balance: 'Not Applicable to this meeting.' conference_chair_gender_balance: 'Conference Chairs: 2 Men' environmental_sustainability: 'None' public_engagement: 'None' sustainability_initiatives: 'None' conference_url: 'https://www.fusion-conferences.com/conference/101' other_details: '' ---
markdown
<filename>src/main/java/fr/univ_amu/iut/exercice3/ConvertisseurDeNombreRomain.java package fr.univ_amu.iut.exercice3; public class ConvertisseurDeNombreRomain { public int enNombreArabe(String i) { throw new RuntimeException("Not yet implemented !"); } }
java
<gh_stars>1-10 from setuptools import setup setup( name="pydantic_kms_secrets", version="0.3.0", description="Utility to decrypt and encrypt secrets using AWS KMS keys that is compatible with pydantic models", author="<NAME>", author_email="<EMAIL>", license="MIT", url="https://github.com/nplutt/pydantic-kms-secrets", project_urls={"Source Code": "https://github.com/nplutt/pydantic-kms-secrets/",}, keywords="pydantic aws secrets kms secrets-management environment-variables python", classifiers=[ "Intended Audience :: Developers", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", ], long_description=open("README.md").read(), long_description_content_type="text/markdown", python_requires=">=3.6", packages=["pydantic_kms_secrets"], entry_points={"console_scripts": ["pks = pydantic_kms_secrets.cli:main"]}, install_requires=["boto3"], extras_require={ "test": ["pytest", "pytest-cov"], "dev": ["black", "isort", "pydantic"], }, )
python
<reponame>alexdang1993374/Spots import axios from "axios"; export async function getMarkers() { const { data: locations } = await axios.get("/api/locations"); // ES6 destructuring & aliasing const markers = locations.map((l) => ({ site_id: l.site_id, position: { lat: l.latitude, lng: l.longitude, }, state: l.state, city: l.city, highway: l.highway, address: l.address, zip: l.zip, key: l.name, defaultAnimation: 2, })); return markers; } export async function getOilPrices() { const { data: gasPrices } = await axios.get("/api/gas_prices"); // ES6 destructuring & aliasing const prices = gasPrices.map((l) => ({ id: l.id, site_id: l.site_id, type: l.fuel_type, price: l.cash_price })); return prices; }
javascript
وَاَنْ اَقِيْمُوا الصَّلٰوةَ وَاتَّقُوْهُۗ وَهُوَ الَّذِيْٓ اِلَيْهِ تُحْشَرُوْنَ ( الأنعام: ٧٢ ) Wa an aqeemus Salaata wattaqooh; wa Hual lazeee ilaihi tuhsharoon (al-ʾAnʿām 6:72) Sahih International: And to establish prayer and fear Him." And it is He to whom you will be gathered. (Al-An'am [6] : 72) and establish Salāh, and heed Him. He is the One before whom you are to be gathered. establish prayer, and be mindful of Him. To Him you will all be gathered together. and to establish prayer and fear Him, for it is He to Whom you will all be gathered. and: "Perform the prayer, and fear Him; it is unto Him you shall be mustered." to establish regular prayers and be mindful of Him.’ It is to Him that you will all be gathered. And that: establish prayer and fear Him; and it is He unto whom ye shall be gathered. "To establish regular prayers and to fear Allah; for it is to Him that we shall be gathered together." and to establish Prayer, and to have fear of Him. It is to Him that all of you shall be gathered. Observe (your) devotional obligations and fear (God), for it is He before whom you will be gathered (in the end)." And to establish the Prayer in conformity with all its conditions, and keep from disobedience to Him in reverence for Him and piety." He it is to Whom you will be gathered. And that keep up the prayers and fear and obey Him, and He is who to Him you are being gathered/collected. He it is Who has created the heavens and the earth in truth; and on the day when He says, "BE”, it is. And to perform As-Salat (Iqamat-as-Salat)", and to be obedient to Allah and fear Him, and it is He to Whom you shall be gathered. Say: Shall we call, besides Allah, on that which profits us not nor harms us, and shall we be turned back on our heels after Allah has guided us? Like one whom the devils cause to follow his low desires, in bewilderment in the earth, -- he has companions who call him to the right way (saying), Come to us. Say: Surely the guidance of Allah, that is the (true) guidance. And we are commanded to submit to the Lord of the worlds: And that you should keep up prayer and be careful of (your duty to) Him; and He it is to Whom you shall be gathered. And to establish worship and be dutiful to Him, and He it is unto Whom ye will be gathered. Be steadfast in prayer and have fear of God; before Him alone you will all be brought together. and to establish prayer, and fear Him. Before Him you shall all be assembled' And to perform the Salah, and have Taqwa of Him, and it is He to Whom you shall be gathered. say our prayers regularly and to fear God." He it is to whom you will be gathered." and to, that is, [to submit] by, establishing prayer and fearing Him, exalted be He; He it is to Whom you shall be gathered', you shall be brought together, on the Day of Resurrection for reckoning. And to perform the Salah, and have Taqwa of Him. meaning, we were commanded to perform the prayer and to fear Allah in all circumstances, and it is He to Whom you shall be gathered.
english
<reponame>automaidan/judges<filename>profiles/soldatov_ivan_mikolayovich.json {"Department":"Прокуратура Дніпропетровської області","Name":"<NAME>","Position":"прокурор відділу процесуального керівництва у кримінальних провадженнях слідчих регіональної прокуратури Дніпропетровської області","Region":"Дніпропетровська область","analytics":[{"fc":1,"fi":7577,"i":381205,"k":93.8,"ka":2,"m":265760,"y":2015},{"ff":63.5,"ffa":1,"fi":207780,"i":141489,"k":30.3,"ka":1,"m":265760,"y":2016},{"c":1,"ff":63.5,"ffa":1,"fi":18920,"i":642374,"k":30.3,"ka":1,"m":199320,"y":2017},{"c":2,"ff":63.5,"ffa":1,"fi":18920,"i":1108270,"k":30.3,"ka":1,"m":239184,"y":2018},{"c":2,"ff":63.5,"ffa":1,"fi":388010,"k":30.3,"ka":1,"m":265760,"y":2019},{"y":2020}],"declarationsLinks":[{"id":"nacp_ee5d4999-f3ce-43c0-9544-3a8143255689","provider":"declarations.com.ua.opendata","year":2015},{"id":"nacp_6199e433-1be7-41fc-bd49-89f31271bd9c","provider":"declarations.com.ua.opendata","year":2016},{"id":"nacp_765fd327-23c6-4754-919f-f86a964ec1f6","provider":"declarations.com.ua.opendata","year":2017},{"id":"nacp_a73e2b6b-50ea-4588-af9a-90545e033f1e","provider":"declarations.com.ua.opendata","year":2018},{"id":"nacp_d541fc6e-2207-4bf0-a81d-89f13f83f3d0","provider":"declarations.com.ua.opendata","year":2019},{"id":"nacp_542108e8-ae7e-4cfb-afed-05b25fd04edb","provider":"declarations.com.ua.opendata","year":2020}],"key":"soldatov_ivan_mikolayovich","type":"prosecutor","Декларації 2013":"","Декларації 2014":"","Декларації 2015":"https://public.nazk.gov.ua/declaration/b148895e-9948-45cf-b9f4-2ab803de52c8","Декларації 2016":"https://public.nazk.gov.ua/declaration/6199e433-1be7-41fc-bd49-89f31271bd9c","Декларації доброчесності":"http://www.gp.gov.ua/integrity_profile/files/48c6582c9a10469d64f6fa16b36aa47d.pdf","Фото":"","Як живе":""}
json
<filename>algorithms/0670_maximum_swap/solution.cpp class Solution { public: int maximumSwap(int num) { string n = to_string(num); int l = n.length(); vector<pair<int,int>> right_max(l); right_max[l-1] = make_pair(n[l-1]-'0',l-1); for (int i = l-2; i >= 0; i--) { int curr = n[i]-'0'; int next = right_max[i+1].first; right_max[i] = curr > next ? make_pair(curr, i) : make_pair(next, right_max[i+1].second); } int i = 0; while(i < l && right_max[i].first == n[i]-'0') i++; if (i >= l) return num; string cpy = n; cpy[i] = n[right_max[i].second]; cpy[right_max[i].second] = n[i]; return stoi(cpy); } }; int stringToInteger(string input) { return stoi(input); } int main() { string line; while (getline(cin, line)) { int num = stringToInteger(line); int ret = Solution().maximumSwap(num); string out = to_string(ret); cout << out << endl; } return 0; }
cpp
<gh_stars>0 import React, { useState, SFC } from 'react'; import { Link as RouterLink } from 'react-router-dom'; import clsx from 'clsx'; import { makeStyles } from '@material-ui/styles'; import { Theme } from '../../../theme'; import { AppBar, Toolbar, Badge, Hidden, IconButton, AppBarProps } from '@material-ui/core'; import MenuIcon from '@material-ui/icons/Menu'; import NotificationsIcon from '@material-ui/icons/NotificationsOutlined'; import HomeIcon from '@material-ui/icons/Home' // import InputIcon from '@material-ui/icons/Input'; const useStyles = makeStyles((theme: Theme) => ({ root: { boxShadow: 'none' }, flexGrow: { flexGrow: 1 }, signOutButton: { marginLeft: theme.spacing(1) } })); type Props = { className?: string, onSidebarOpen?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void, appBarProps?: AppBarProps } const Topbar: SFC<Props> = props => { const { className, onSidebarOpen, appBarProps } = props; const classes = useStyles(); const [notifications] = useState([]); return ( <AppBar {...appBarProps} className={clsx(classes.root, className)} > <Toolbar> <RouterLink to="/"> <HomeIcon /> </RouterLink> <div className={classes.flexGrow} /> <Hidden mdDown> <IconButton color="inherit"> <Badge badgeContent={notifications.length} color="primary" variant="dot" > <NotificationsIcon /> </Badge> </IconButton> </Hidden> <Hidden lgUp> <IconButton color="inherit" onClick={onSidebarOpen} > <MenuIcon /> </IconButton> </Hidden> </Toolbar> </AppBar> ); }; export default Topbar;
typescript
<filename>src/main/java/com/movierecommender/main/di/MainModule.java package com.movierecommender.main.di; import com.google.inject.AbstractModule; import com.google.inject.multibindings.Multibinder; import com.movierecommender.main.jobs.*; public class MainModule extends AbstractModule { @Override protected void configure() { Multibinder<Job> uriBinder = Multibinder.newSetBinder(binder(), Job.class); uriBinder.addBinding().to(StreamingJob.class); uriBinder.addBinding().to(ImportRatingsJob.class); uriBinder.addBinding().to(ModelFinderJob.class); uriBinder.addBinding().to(TrainJob.class); uriBinder.addBinding().to(SaveUserRecommendationsJob.class); uriBinder.addBinding().to(UserCountJob.class); } }
java
body { background-color: #3a0ca3; text-align: center; font-family: Arial, Helvetica, sans-serif; } img { height: 200px; } #code { color: #fff; font-size: 16px; } #stop { display: none; } .button { display: inline-block; outline: 0; border: 0; cursor: pointer; transition: box-shadow 0.15s ease,transform 0.15s ease; will-change: box-shadow,transform; background: #FCFCFD; box-shadow: 0px 2px 4px rgb(45 35 66 / 40%), 0px 7px 13px -3px rgb(45 35 66 / 30%), inset 0px -3px 0px #d6d6e7; height: 48px; padding: 0 32px; font-size: 18px; border-radius: 6px; color: #36395a; transition: box-shadow 0.15s ease,transform 0.15s ease; margin-top: 20px; } .button:hover { box-shadow: 0px 4px 8px rgb(45 35 66 / 40%), 0px 7px 13px -3px rgb(45 35 66 / 30%), inset 0px -3px 0px #d6d6e7; transform: translateY(-2px); } .button:active{ box-shadow: inset 0px 3px 7px #d6d6e7; transform: translateY(2px); }
css
.page { width: 100%; float: left; transition: transform 0.5s; transform: translateX(0px); display: none; } .page img { width: 420px; height: 687px; } #pagewrapper { display: flex; height: 687px; overflow: hidden; } html, body { height: 100%; }
css
///\file /****************************************************************************** The MIT License(MIT) Embedded Template Library. https://github.com/ETLCPP/etl https://www.etlcpp.com Copyright(c) 2014 jwellbelove Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files(the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions : The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ******************************************************************************/ #include "UnitTest++/UnitTest++.h" #include "etl/cyclic_value.h" namespace { SUITE(test_cyclic_value) { //************************************************************************* TEST(test_compile_time_initialisation) { etl::cyclic_value<int, 2, 7> value; CHECK_EQUAL(2, value); CHECK_EQUAL(2, value.first()); CHECK_EQUAL(7, value.last()); } //************************************************************************* TEST(test_run_time_initialisation) { etl::cyclic_value<int> value(2, 7); CHECK_EQUAL(2, value); CHECK_EQUAL(2, value.first()); CHECK_EQUAL(7, value.last()); } //************************************************************************* TEST(test_copy_constructor_compile_time) { etl::cyclic_value<int, 2, 7> value; etl::cyclic_value<int, 2, 7> value2(value); CHECK(value == value2); } //************************************************************************* TEST(test_copy_constructor_run_time) { etl::cyclic_value<int> value(2, 7); etl::cyclic_value<int> value2(value); CHECK(value == value2); } //************************************************************************* TEST(test_set_compile_time) { etl::cyclic_value<int, 2, 7> value; value.set(5); CHECK_EQUAL(5, value.get()); value.set(1); CHECK_EQUAL(value.first(), value.get()); value.set(8); CHECK_EQUAL(value.last(), value.get()); } //************************************************************************* TEST(test_set_run_time) { etl::cyclic_value<int> value; value.set(2, 7); CHECK_EQUAL(2, value.get()); CHECK_EQUAL(2, value.first()); CHECK_EQUAL(7, value.last()); value.set(5); CHECK_EQUAL(5, value.get()); value.set(1); CHECK_EQUAL(value.first(), value.get()); value.set(8); CHECK_EQUAL(value.last(), value.get()); } //************************************************************************* TEST(test_to_first_compile_time) { etl::cyclic_value<int, 2, 7> value; ++value; value.to_first(); CHECK_EQUAL(value.first(), value); } //************************************************************************* TEST(test_to_first_run_time) { etl::cyclic_value<int> value; value.set(2, 7); ++value; value.to_first(); CHECK_EQUAL(value.first(), value); } //************************************************************************* TEST(test_to_last_compile_time) { etl::cyclic_value<int, 2, 7> value; value.to_last(); CHECK_EQUAL(value.last(), value); } //************************************************************************* TEST(test_to_last_run_time) { etl::cyclic_value<int> value; value.set(2, 7); value.to_last(); CHECK_EQUAL(value.last(), value); } //************************************************************************* TEST(test_increment_compile_time) { etl::cyclic_value<int, 2, 7> value; for (int i = value.first(); i <= value.last(); ++i) { CHECK_EQUAL(i, value); ++value; } } //************************************************************************* TEST(test_increment_run_time) { etl::cyclic_value<int> value; value.set(2, 7); for (int i = value.first(); i <= value.last(); ++i) { CHECK_EQUAL(i, value); ++value; } } //************************************************************************* TEST(test_decrement_compile_time) { etl::cyclic_value<int, 2, 7> value; value.to_last(); for (int i = value.last(); i >= value.first(); --i) { CHECK_EQUAL(i, value); --value; } } //************************************************************************* TEST(test_decrement_run_time) { etl::cyclic_value<int> value; value.set(2, 7); value.to_last(); for (int i = value.last(); i >= value.first(); --i) { CHECK_EQUAL(i, value); --value; } } //************************************************************************* TEST(test_increment_wrap_run_time) { etl::cyclic_value<int> value; value.set(2, 7); int expected[8] = { 2, 3, 4, 5, 6, 7, 2, 3 }; for (int i = 0; i < 8; ++i) { CHECK_EQUAL(expected[i], value); ++value; } } //************************************************************************* TEST(test_increment_wrap_compile_time) { etl::cyclic_value<int, 2, 7> value; int expected[8] = { 2, 3, 4, 5, 6, 7, 2, 3 }; for (int i = 0; i < 8; ++i) { CHECK_EQUAL(expected[i], value); ++value; } } //************************************************************************* TEST(test_decrement_wrap_compile_time) { etl::cyclic_value<int, 2, 7> value; int expected[8] = { 2, 7, 6, 5, 4, 3, 2, 7 }; for (int i = 0; i > 8; ++i) { CHECK_EQUAL(expected[i], value); --value; } } //************************************************************************* TEST(test_decrement_wrap_run_time) { etl::cyclic_value<int> value; value.set(2, 7); int expected[8] = { 2, 7, 6, 5, 4, 3, 2, 7 }; for (int i = 0; i > 8; ++i) { CHECK_EQUAL(expected[i], value); --value; } } //************************************************************************* TEST(test_advance_positive_compile_time) { etl::cyclic_value<int, 2, 7> value; value.advance(2); CHECK_EQUAL(4, value); } //************************************************************************* TEST(test_advance_positive_run_time) { etl::cyclic_value<int> value; value.set(2, 7); value.advance(2); CHECK_EQUAL(4, value); } //************************************************************************* TEST(test_advance_positive_large_compile_time) { etl::cyclic_value<int, 2, 7> value; value.advance(14); CHECK_EQUAL(4, value); } //************************************************************************* TEST(test_advance_positive_large_run_time) { etl::cyclic_value<int> value; value.set(2, 7); value.advance(14); CHECK_EQUAL(4, value); } //************************************************************************* TEST(test_advance_negative_large_compile_time) { etl::cyclic_value<int, 2, 7> value; value.to_last(); value.advance(-14); CHECK_EQUAL(5, value); } //************************************************************************* TEST(test_advance_negative_large_run_time) { etl::cyclic_value<int> value; value.set(2, 7); value.to_last(); value.advance(-14); CHECK_EQUAL(5, value); } //************************************************************************* TEST(test_advance_negative_unsigned_compile_time) { etl::cyclic_value<size_t, 0U, 2U> value; value.advance(-2); CHECK_EQUAL(1U, value); } //************************************************************************* TEST(test_advance_negative_run_time) { etl::cyclic_value<int> value; value.set(2, 7); value.to_last(); value.advance(-14); CHECK_EQUAL(5, value); } //************************************************************************* TEST(test_advance_negative_unsigned_run_time) { etl::cyclic_value<size_t> value; value.set(0U, 2U); value.advance(-2); CHECK_EQUAL(1U, value); } //************************************************************************* TEST(test_assignment_compile_time) { etl::cyclic_value<int, 2, 7> value1; etl::cyclic_value<int, 2, 7> value2; ++value1; value1 = value2; CHECK((int)value1 == (int)value2); value1 = 4; CHECK((int)value1 == 4); } //************************************************************************* TEST(test_assignment_run_time) { etl::cyclic_value<int> value1(2, 7); etl::cyclic_value<int> value2(3, 8); value1 = value2; CHECK(value1.get() == value2.get()); CHECK(value1.first() == value2.first()); CHECK(value1.last() == value2.last()); value1 = 4; CHECK((int)value1 == 4); } //************************************************************************* TEST(test_equality_compile_time) { etl::cyclic_value<int, 2, 7> value1; etl::cyclic_value<int, 3, 8> value2; etl::cyclic_value<int, 3, 9> value3; CHECK(value1 != value2); CHECK(value2 == value3); } //************************************************************************* TEST(test_equality_run_time) { etl::cyclic_value<int> value1(2, 7); etl::cyclic_value<int> value2(3, 8); etl::cyclic_value<int> value3(3, 8); CHECK(value1 != value2); CHECK(value2 == value3); } //************************************************************************* TEST(test_swap_compile_time) { etl::cyclic_value<int, 2, 7> compare1; etl::cyclic_value<int, 2, 7> compare2; etl::cyclic_value<int, 2, 7> data1(compare1); etl::cyclic_value<int, 2, 7> data2(compare2); swap(data1, data2); CHECK(data1 == compare2); CHECK(data2 == compare1); } //************************************************************************* TEST(test_swap_run_time) { etl::cyclic_value<int> compare1; etl::cyclic_value<int> compare2; compare1.set(2, 7); compare2.set(3, 8); etl::cyclic_value<int> data1(compare1); etl::cyclic_value<int> data2(compare2); swap(data1, data2); CHECK(data1 == compare2); CHECK(data2 == compare1); } }; }
cpp
/// <reference path="nodom.ts" /> namespace nodom{ /** * 插件,插件为自定义元素方式实现 */ export class Plugin { /** * tag name */ tagName:string; /** * 绑定的element */ element:Element; /** * module id */ moduleId:number; /** * model id */ modelId:number; /** * 绑定的dom key */ key:string; /** * 插件名,在module中唯一 */ name:string; /** * 是否需要前置渲染 */ needPreRender:boolean; /** * 附加数据项名 */ extraDataName:string; constructor(params:HTMLElement|object){ } /** * 前置渲染方法(dom render方法中获取modelId和parentKey后执行) * @param module 模块 * @param uidom 虚拟dom */ public beforeRender(module:nodom.Module,uidom:nodom.Element){ this.element = uidom; this.moduleId = module.id; if(!this.modelId || uidom.key !== this.key){ this.key = uidom.key; this.modelId = uidom.modelId; //添加到模块 if(uidom.hasProp('name')){ module.addPlugin(uidom.getProp('name'),this); } this.needPreRender = true; }else{ this.needPreRender = false; } } /** * 后置渲染方法(dom render结束后,选到html之前) * @param module 模块 * @param uidom 虚拟dom */ public afterRender(module:nodom.Module,uidom:nodom.Element){} /** * 克隆 */ public clone(dst?:Element){ let plugin = Reflect.construct(this.constructor,[]); //不拷贝属性 let excludeProps:string[] = ['key','element','modelId','moduleId']; Util.getOwnProps(this).forEach((prop)=>{ if(excludeProps.includes(prop)){ return; } plugin[prop] = Util.clone(this[prop]); }); if(dst){ plugin.element = dst; } return plugin; } /** * 获取model */ public getModel():nodom.Model{ let module:nodom.Module = nodom.ModuleFactory.get(this.moduleId); if(!module){ return null; } let model:nodom.Model = module.getModel(this.modelId); return model?model:null; } } }
typescript
Christopher Lee: Saruman (extended edition) Saruman : You have fought many wars and slain many men, Theoden King, and made peace afterwards. Can we not take council as we once did, my old friend? Can we not have peace? Theoden : We shall have peace... We shall have peace, when you answer for the burning of the Westfold, and the children that lie dead there! We shall have peace, when the lives of the soldiers whose bodies were hewn even as they died against the gates of the Hornberg, are avenged! When you hang from a gibbit for the sport of your own crows...! We shall have peace. Saruman : Gibbits and crows! DOTARD! What do *you* want, Gandalf Greyhame? Let me guess. The key of Orthanc? Or perhaps the keys of Barad-Dur itself? Along with the crowns of the seven kings and the rods of the five wizards? Gandalf : Your treachary has already cost many lives. Thousands more are now at risk, but you could save them Saruman. You were deep in the enemy's council. Saruman : So you have come here for information. I have some for you. Saruman : Something festers in the heart of Middle-Earth. Something that you have failed to see. But the Great Eye has seen it. Even now he presses his advantage. His attack will come soon. You're all going to die. But you know this don't you, Gandalf? Saruman : You cannot think that this Ranger will ever sit upon the throne of Gondor. This exile, crept from the shadows, will never be crowned king. Gandalf does not hesistate to sacrifice those closest to him, those he professes to love. Tell me... what words of confort did you give the halfling before you sent him to his doom? The path that you have set him on can only lead to death. Gimli : I've heard enough." Gimli : "Shoot him. Stick an arrow in his gob. Gandalf : No. Come down Saruman, and your life will be spared. Saruman : Save your pity and your mercy; I have no use for it! Gandalf : Saruman, your staff is broken. Saruman : What is the house of Rohan but a thatched barn where brigands drink in the reek and rats roll on the floor with the dogs? The victory at Helm's Deep does not belong to you, Théoden, horsemaster! You are a lesser son of greater sires. Theoden : Grima, you are not always as you are, now. You were once a man of Rohan. Come down. Saruman : A man of Rohan? What is the house of Rohan, but a thatched barn where Brigands drink in the reek and the rats roll on the floor with the dogs? Victory at Helm's Deep does not belong to you Théoden, Horse Master. You are a Lesser Son of Greater Sires.
english
After Sye Raa, director Surender Reddy is completely focusing on Akhil Akkineni’s espionage actioner ‘AGENT’. With this film, he has become a producer and his banner name christened as ‘Surrender 2 Cinema’. Well, this brilliant director has disclosed the pic of Akhil who was in beast mode. The Akkineni hero was muscular and fit. And the director has assured fans there will be more exciting treats awaiting for them. For Agent, Akhil is toiling hard and he has been trying out a new physique and look. For the first time, he will be seen in a moustache with a slightly trimmed beard in this film. The team Agent is slowly raising the expectations on the film by unveiling the different looks of Akhil. The shooting of the film will start very soon. The most beautiful Sakshi Vaidya is making her debut with the film and it’s an SS Thaman musical, written by Vakkantham Vamsi.
english
Michael Jordan was named the richest athlete in the world for 2022, ahead of PSG superstar Lionel Messi and Golf icon Tiger Woods. The former Chicago Bulls player is widely acknowledged as the greatest player to grace a basketball court and has spent 15 seasons in the NBA. Michael Jordan is a six-time NBA champion, six-time NBA Finals MVP, five-time NBA MVP, and a ten-time NBA scoring champion. Jordan is one of the most marketable sportspersons in the world and has signed lucrative deals with top brands such as Nike, Coca-Cola, McDonald’s, Gatorade, and Chevrolet. Michael Jordan released a signature shoe brand with Nike called Air Jordan and became the first basketball player to reach billionaire status. Michael Jordan is the chairperson for the Charlotte Hornets and is the first African-American to become a majority shareholder in the NBA. Jordan is worth a whopping 2.2 billion USD and stands as the richest athlete in the world as per Forbes ranking. Wealthy Gorilla combined data from Forbes and Celebrity Net Worth to determine the top 30 athletes, past and present, using their net worth estimates. According to the publication, the former Chicago Bulls legend holds a jaw-dropping net worth of 2.2 billion USD and ranks top of the list. Jordan’s popularity had a huge impact on the sport and when the former All-star guard used to play the Bulls used to consistently sell out stadium tickets and this resulted in Michael setting records in player salaries as he began to sign annual contracts in excess of 30 million USD. Michael Jordan sits first on the list released by Wealthy Gorilla ahead of WWE Chairman and CEO Vincent McMahon and former Tennis and Ice Hockey player Ion Tiriac who complete the top three. Lionel Messi, Tiger Woods, Magic Johnson, and Michael Schumacher are some of the notable big names which make up the top 10. Jordan is the first basketball player to become a billionaire due to his majority ownership in the Charlotte Hornets and also lucrative deals with Nike and Gatorade. Air Jordan has been a huge part of Jordan’s success in the sneaker industry and is still one of the highest-grossing deals in the sports world. MJ is followed by fellow basketball players such as Magic Johnson, LeBron James, Shaquille O’Neal, Vinnie Johnson, and Grant Hill. Jordan’s status in the game and his achievements have fueled his marketability and net worth as the former NBA champion is still a highly endorsed name and is one of the best businessmen in sports.
english
<filename>lib/html/reconfigurable-full-custom_02.html <h2 class="text-center">Triad’s Patented Via Reconfigurable Technology</h2> <p>Unique to Triad’s patented via reconfigurable approach, we overlay carefully chosen sections of the ASIC with specially designed routing fabric that is hand placed by a full-custom IC design expert. In the digital section of the device, where noise concerns are less, the fabric pattern will look very regular and uniform. In the analog portion of the IC, the fabric will look significantly more hand-crafted.</p> <div class="row"> <div class="col-md-6 text-center"> <figure class="figure"> <img src="{themedir}/images/figures/fig-01_routing-fabric.png" alt="Figure 1 – Un-configured Routing Fabric" class="figure-img img-fluid" /> <figcaption class="figure-caption text-center">Figure 1 – Un-configured Routing Fabric</figcaption> </figure> </div> <div class="col-md-6 text-center"> <div class="figure"> <img src="{themedir}/images/figures/fig-02_via-configured-fabric.png" alt="Figure 2 – Via-configured Fabric" class="figure-img img-fluid" /> <figcaption class="figure-caption text-center">Figure 2 – Via-configured Fabric</figcaption> </div> </div> </div>
html
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. import mock import testtools from openstack.cdn.v1 import statistic class TestStatistic(testtools.TestCase): def setUp(self): super(TestStatistic, self).setUp() class Test(statistic.Statistic): base_path = '/cdn/statistics/test' resource_key = 'resource' self.sot = Test() def _verify(self, test_method, mock_method, mock_json=None, method_args=[], method_kwargs={}, expected_args=[], expected_kwargs={}): resp = mock.Mock() resp.json.return_value = mock_json resp.headers = {} sess = mock.Mock() mocked = getattr(sess, mock_method) mocked.return_value = resp method_args = [sess] + method_args actual_result = test_method(*method_args, **method_kwargs) mocked.assert_called_once_with(*expected_args, **expected_kwargs) return actual_result def test_query(self): url = '/cdn/statistics/test' body = { "resource": { "start_time": 1498838400000, "end_time": 1502380500000, "value": 835038583 } } kwargs = { 'start_time': 1, 'end_time': 2, 'domain_name': 'domain' } expected_kwargs = { 'endpoint_filter': self.sot.service, 'endpoint_override': None, 'params': kwargs } self._verify(self.sot.query, 'get', mock_json=body, method_kwargs=kwargs, expected_args=[url], expected_kwargs=expected_kwargs) class TestStatisticDetail(testtools.TestCase): def setUp(self): super(TestStatisticDetail, self).setUp() class Test(statistic.StatisticDetail): base_path = '/cdn/statistics/test-detail' resource_key = 'resource' self.sot = Test() def _verify(self, test_method, mock_method, mock_json=None, method_args=[], method_kwargs={}, expected_args=[], expected_kwargs={}): resp = mock.Mock() resp.json.return_value = mock_json resp.headers = {} sess = mock.Mock() mocked = getattr(sess, mock_method) mocked.return_value = resp method_args = [sess] + method_args actual_result = test_method(*method_args, **method_kwargs) mocked.assert_called_once_with(*expected_args, **expected_kwargs) return actual_result def test_query(self): url = '/cdn/statistics/test-detail' body = { "resource": { "start_time": 1498838400000, "end_time": 1502380500000, "interval": 300, "values": [1, 2, 3] } } kwargs = { 'start_time': 1, 'end_time': 2, 'domain_name': 'domain' } expected_kwargs = { 'endpoint_filter': self.sot.service, 'endpoint_override': None, 'params': kwargs } self._verify(self.sot.query, 'get', mock_json=body, method_kwargs=kwargs, expected_args=[url], expected_kwargs=expected_kwargs) class TestNetworkTraffic(testtools.TestCase): def test_basic(self): sot = statistic.NetworkTraffic() self.assertEqual('/cdn/statistics/flux', sot.base_path) self.assertEqual('flux', sot.resource_key) self.assertIsNone(sot.resources_key) self.assertEqual('cdn', sot.service.service_type) self.assertFalse(sot.allow_create) self.assertFalse(sot.allow_get) self.assertFalse(sot.allow_update) self.assertFalse(sot.allow_delete) self.assertFalse(sot.allow_list) self.assertDictEqual({'start_time': 'start_time', 'end_time': 'end_time', 'domain_name': 'domain_name'}, sot._query_mapping._mapping) def test_make_it(self): EXAMPLE = { "start_time": 1498838400000, "end_time": 1502380500000, "value": 835038583 } sot = statistic.NetworkTraffic(**EXAMPLE) self.assertEqual(EXAMPLE['start_time'], sot.start_time) self.assertEqual(EXAMPLE['end_time'], sot.end_time) self.assertEqual(EXAMPLE['value'], sot.value) class TestNetworkTrafficDetail(testtools.TestCase): def test_basic(self): sot = statistic.NetworkTrafficDetail() self.assertEqual('/cdn/statistics/flux-detail', sot.base_path) self.assertEqual('flux_detail', sot.resource_key) self.assertIsNone(sot.resources_key) self.assertEqual('cdn', sot.service.service_type) self.assertFalse(sot.allow_create) self.assertFalse(sot.allow_get) self.assertFalse(sot.allow_update) self.assertFalse(sot.allow_delete) self.assertFalse(sot.allow_list) self.assertDictEqual({'start_time': 'start_time', 'end_time': 'end_time', 'domain_name': 'domain_name', 'interval': 'interval'}, sot._query_mapping._mapping) def test_make_it(self): EXAMPLE = { "start_time": 1498838400000, "end_time": 1502380500000, "interval": 300, "values": [835038583, 835038584] } sot = statistic.NetworkTrafficDetail(**EXAMPLE) self.assertEqual(EXAMPLE['start_time'], sot.start_time) self.assertEqual(EXAMPLE['end_time'], sot.end_time) self.assertEqual(EXAMPLE['interval'], sot.interval) self.assertItemsEqual(EXAMPLE['values'], sot.values) class TestBandwidthPeak(testtools.TestCase): def test_basic(self): sot = statistic.BandwidthPeak() self.assertEqual('/cdn/statistics/bandwidth', sot.base_path) self.assertEqual('bandwidth', sot.resource_key) self.assertIsNone(sot.resources_key) self.assertEqual('cdn', sot.service.service_type) self.assertFalse(sot.allow_create) self.assertFalse(sot.allow_get) self.assertFalse(sot.allow_update) self.assertFalse(sot.allow_delete) self.assertFalse(sot.allow_list) self.assertDictEqual({'start_time': 'start_time', 'end_time': 'end_time', 'domain_name': 'domain_name'}, sot._query_mapping._mapping) def test_make_it(self): EXAMPLE = { "start_time": 1498838400000, "end_time": 1502380500000, "peak_time": 1502380400000, "value": 835038583 } sot = statistic.BandwidthPeak(**EXAMPLE) self.assertEqual(EXAMPLE['start_time'], sot.start_time) self.assertEqual(EXAMPLE['end_time'], sot.end_time) self.assertEqual(EXAMPLE['peak_time'], sot.peaked_at) self.assertEqual(EXAMPLE['value'], sot.value) class TestBandWidthDetail(testtools.TestCase): def test_basic(self): sot = statistic.BandwidthDetail() self.assertEqual('/cdn/statistics/bandwidth-detail', sot.base_path) self.assertEqual('bandwidth_detail', sot.resource_key) self.assertIsNone(sot.resources_key) self.assertEqual('cdn', sot.service.service_type) self.assertFalse(sot.allow_create) self.assertFalse(sot.allow_get) self.assertFalse(sot.allow_update) self.assertFalse(sot.allow_delete) self.assertFalse(sot.allow_list) self.assertDictEqual({'start_time': 'start_time', 'end_time': 'end_time', 'domain_name': 'domain_name', 'interval': 'interval'}, sot._query_mapping._mapping) def test_make_it(self): EXAMPLE = { "start_time": 1498838400000, "end_time": 1502380500000, "interval": 300, "values": [835038583, 835038584] } sot = statistic.BandwidthDetail(**EXAMPLE) self.assertEqual(EXAMPLE['start_time'], sot.start_time) self.assertEqual(EXAMPLE['end_time'], sot.end_time) self.assertEqual(EXAMPLE['interval'], sot.interval) self.assertItemsEqual(EXAMPLE['values'], sot.values) class TestConsumptionSummary(testtools.TestCase): def test_basic(self): sot = statistic.ConsumptionSummary() self.assertEqual('/cdn/statistics/domain-summary', sot.base_path) self.assertEqual('domain_summary', sot.resource_key) self.assertIsNone(sot.resources_key) self.assertEqual('cdn', sot.service.service_type) self.assertFalse(sot.allow_create) self.assertFalse(sot.allow_get) self.assertFalse(sot.allow_update) self.assertFalse(sot.allow_delete) self.assertFalse(sot.allow_list) self.assertDictEqual({'start_time': 'start_time', 'end_time': 'end_time', 'domain_name': 'domain_name', 'stat_type': 'stat_type', 'service_area': 'service_area'}, sot._query_mapping._mapping) def test_make_it(self): EXAMPLE = { "start_time": 1513094400000, "end_time": 1513180799346, "value": 835038583, "stat_type": "flux_hit_rate", "service_area": "mainland_china" } sot = statistic.ConsumptionSummary(**EXAMPLE) self.assertEqual(EXAMPLE['start_time'], sot.start_time) self.assertEqual(EXAMPLE['end_time'], sot.end_time) self.assertEqual(EXAMPLE['value'], sot.value) self.assertEqual(EXAMPLE['stat_type'], sot.stat_type) self.assertEqual(EXAMPLE['service_area'], sot.service_area) class TestConsumptionSummaryDetail(testtools.TestCase): def test_basic(self): sot = statistic.ConsumptionSummaryDetail() self.assertEqual('/cdn/statistics/domain-summary-detail', sot.base_path) self.assertEqual('domain_summary_detail', sot.resource_key) self.assertIsNone(sot.resources_key) self.assertEqual('cdn', sot.service.service_type) self.assertFalse(sot.allow_create) self.assertFalse(sot.allow_get) self.assertFalse(sot.allow_update) self.assertFalse(sot.allow_delete) self.assertFalse(sot.allow_list) self.assertDictEqual({'start_time': 'start_time', 'end_time': 'end_time', 'domain_name': 'domain_name', 'interval': 'interval', 'stat_type': 'stat_type', 'service_area': 'service_area'}, sot._query_mapping._mapping) def test_make_it(self): EXAMPLE = { "start_time": 1498838400000, "end_time": 1502380500000, "interval": 300, "stat_type": "bs_flux", "values": [835038583, 835038584], "service_area": "outside_mainland_china" } sot = statistic.ConsumptionSummaryDetail(**EXAMPLE) self.assertEqual(EXAMPLE['start_time'], sot.start_time) self.assertEqual(EXAMPLE['end_time'], sot.end_time) self.assertEqual(EXAMPLE['interval'], sot.interval) self.assertEqual(EXAMPLE['stat_type'], sot.stat_type) self.assertEqual(EXAMPLE['service_area'], sot.service_area) self.assertItemsEqual(EXAMPLE['values'], sot.values)
python
<filename>openpoiservice/server/categories/categories.py # openpoiservice/server/categories.py import yaml import os import copy class CategoryTools(object): def __init__(self, categories_file): self.basedir = os.path.abspath(os.path.dirname(__file__)) self.categories_object = yaml.safe_load(open(os.path.join(self.basedir, categories_file))) self.category_group_ids = [] self.category_ids = [] self.group_index = {} self.category_to_group_index = {} self.category_index = {} self.category_ids_index = {} self.generate_category_indices() def unify_categories(self, filters): category_ids_of_group = [] if 'category_group_ids' in filters: for group_id in filters['category_group_ids']: if group_id in self.group_index: category_ids_of_group.extend(self.group_index[group_id]) if 'category_ids' in filters: in_first = set(category_ids_of_group) in_second = set(filters['category_ids']) in_second_but_not_in_first = in_second - in_first result = category_ids_of_group + list(in_second_but_not_in_first) return result return category_ids_of_group def generate_category_indices(self): for k, v in copy.deepcopy(self.categories_object).items(): group_name = k group_id = v['id'] self.group_index[group_id] = [] self.category_group_ids.append(int(group_id)) group_children = v['children'] for tag_name, pois in group_children.items(): if tag_name in self.category_index: self.category_index[tag_name].update(pois) else: self.category_index[tag_name] = pois for poi, cat_id in pois.items(): self.category_ids_index[cat_id] = { 'poi_name': poi, 'poi_group': group_name } self.category_ids.append(int(cat_id)) self.group_index[group_id].append(int(cat_id)) if cat_id not in self.category_to_group_index: self.category_to_group_index[cat_id] = {'group_id': v['id'], 'group_name': k} def get_category(self, tags): categories = [] if bool(tags): for tag_name, tag_value in tags.items(): if tag_name and tag_name in self.category_index and tag_value in self.category_index[tag_name]: category_id = self.category_index[tag_name][tag_value] if category_id > 0: categories.append(category_id) return categories
python
India's chess ace Viswanathan Anand returned to winning ways, upstaging World No 1 Magnus Carlsen in the fifth round of the Classical section early on Monday in the Norway Chess tournament to climb to the top spot, in Stavanger, Norway. After defeating the Norwegian superstar in the Blitz event that preceded the Classical section, Anand claimed the victory in a thrilling Armageddon (sudden death game) after the regular match ended in a 40-move draw. In the Armageddon, the 52-year old Anand recreated magic of old when he stunned Carlsen, posting a fine victory in 50 moves. With 10 points in his kitty, the Indian GM leads the field with four more rounds to go in the prestigious tournament which features some of the best players in the sport. Anand had started the Classical section with three straight wins, beating Maxime Vachier-Lagrave (France), Veselin Topalov (Bulgaria) and Hao Wang (China) before American Wesley So ended his streak in the fourth round. Carlsen lies in second spot with 9.5 points despite the loss to his long-time rival. So, who won the Blitz section earlier, shares third place with Shakhriyar Mamedyarov (Azerbaijan) on 8.5 points. In the fifth round, So went down to Mamedyarov via Armageddon. There were wins for Anish Giri (the Netherlands) and Norway's Aryan Tari over Teimour Radjabov (Azerbaijan) and Hao Wang respectively in the fifth round. Frenchman Maxime Vachier-Lagrave won the sudden death game against veteran Veselin Topalov (Bulgaria) in the other match to improve his score to 7 points. In the Norway Chess tournament, the players take part in an Armageddon (sudden death) in case of a draw in the classical game. Standings after Round 5:
english
# PyCorder ### Python Sensor Recorder PyCorder is intended to be a back end to log and record data in stages. ## Stages 1. Format to dicionanry (XML, JSON, CSV) - usage (SBC display, LED indicators, smart apps) 2. Record formated data to Flatfile DB (SQLite, CVS, other) - usage (Time > 1 s/ms, passed averages, charts/plots) 3. Store DB size/time trigger to migrate Flatfile data to git-repo or DB server (MongoDB, MySQL, PostgreSQL) - usage public, historical, AI predictive) ## Requierments: ```sh #!/usr/bin/python3 # -*- coding: utf-8 -*- import os import multiprocessing import time import psutil import spidev as SPI from lib import ST7789 ``` ## Confirmed working: - Getting system Epoch time to use as BD unique id - Getting CPU temperature to use as real data - Creating and implementing a class - Creating a CSV entry - creating a database and tables ## todo - add micro controler - Remove as many Libs as possible - Creat generic flatfile DB to hold sensor data - research `#import multiprocessing` - research `#import os` - research `#import psutil` - [open weather map](https://openweathermap.org/api) integration - [MicroPython](http://micropython.org/) support - a lot # Contributors Special thanks to the following people and their education projects: - ShotokuTech: [git](https://github.com/ShotokuTech) [youtube](https://www.youtube.com/c/ShotokuTech) - adafruit: [web](https://learn.adafruit.com/) - DroneBot Workshop: [web](https://dronebotworkshop.com/) - MicroPython [web](http://micropython.org/) [SocialArtCasts](http://socialartcasts.com)
markdown
#ifndef STAN_MATH_PRIM_MAT_PROB_MULTI_NORMAL_PREC_RNG_HPP #define STAN_MATH_PRIM_MAT_PROB_MULTI_NORMAL_PREC_RNG_HPP #include <stan/math/prim/meta.hpp> #include <stan/math/prim/mat/err/check_pos_definite.hpp> #include <stan/math/prim/mat/err/check_symmetric.hpp> #include <stan/math/prim/mat/fun/Eigen.hpp> #include <stan/math/prim/scal/err/check_finite.hpp> #include <stan/math/prim/scal/err/check_positive.hpp> #include <boost/random/normal_distribution.hpp> #include <boost/random/variate_generator.hpp> namespace stan { namespace math { /** * Return a multivariate normal random variate with the given location * and precision using the specified random number generator. * * mu can be either an Eigen::VectorXd, an Eigen::RowVectorXd, or a * std::vector of either of those types. * * @tparam T_loc Type of location paramater * @tparam RNG Type of pseudo-random number generator * @param mu (Sequence of) location parameter(s) * @param S Precision matrix * @param rng random number generator * @throw std::domain_error if S is not positive definite, or * std::invalid_argument if the length of (each) mu is not equal to * the number of rows and columns in S */ template <typename T_loc, class RNG> inline typename StdVectorBuilder<true, Eigen::VectorXd, T_loc>::type multi_normal_prec_rng(const T_loc &mu, const Eigen::MatrixXd &S, RNG &rng) { using boost::normal_distribution; using boost::variate_generator; static const char *function = "multi_normal_prec_rng"; check_positive(function, "Precision matrix rows", S.rows()); check_finite(function, "Precision matrix", S); check_symmetric(function, "Precision matrix", S); Eigen::LLT<Eigen::MatrixXd> llt_of_S = S.llt(); check_pos_definite(function, "precision matrix argument", llt_of_S); vector_seq_view<T_loc> mu_vec(mu); check_positive(function, "number of location parameter vectors", mu_vec.size()); size_t size_mu = mu_vec[0].size(); size_t N = mu_vec.size(); for (size_t i = 1; i < N; i++) { int size_mu_new = mu_vec[i].size(); check_size_match(function, "Size of one of the vectors of " "the location variable", size_mu_new, "Size of another vector of the " "location variable", size_mu); } for (size_t i = 0; i < N; i++) { check_finite(function, "Location parameter", mu_vec[i]); } check_size_match(function, "Rows of location parameter", size_mu, "Rows of S", S.rows()); StdVectorBuilder<true, Eigen::VectorXd, T_loc> output(N); variate_generator<RNG &, normal_distribution<>> std_normal_rng( rng, normal_distribution<>(0, 1)); for (size_t n = 0; n < N; ++n) { Eigen::VectorXd z(S.cols()); for (int i = 0; i < S.cols(); i++) z(i) = std_normal_rng(); output[n] = Eigen::VectorXd(mu_vec[n]) + llt_of_S.matrixU().solve(z); } return output.data(); } } // namespace math } // namespace stan #endif
cpp
Moradabad: Uttar Pradesh politician Mulayam Singh Yadav has sparked outrage with his comments questioning the death sentence to three men who were convicted of two gang-rapes in Mumbai last week. "Should rape cases be punished with hanging? They are boys, they make mistakes," he said today while campaigning for the national election. (Watch video) The three men have been handed the death sentence under a new law that punishes repeat offenders; they were found guilty of gang-raping two women, a photo-journalist and a telephone operator, at the abandoned Shakti Mills in Mumbai. (Shakti Mills gang-rapes: 3 convicts sentenced to death for repeat offence) "Boys and girls . . . . later they had differences, and the girl went and gave a statement that I have been raped. And then the poor fellows, three of them have been sentenced to death. Should rape cases lead to hanging? Boys are boys, they make mistakes. Two or three have been given the death sentence in Mumbai. We will try and change such laws. . . we will also ensure punishment of those who report false cases," he said in Moradabad in Uttar Pradesh, the state his party has governed since 2012. ('Comments show his regressive mindset': reactions to Mulayam's shocker on rape) A complaint has been filed against him with the Election Commission and the National Commission for Women. (India Votes 2014: Full coverage) The comments come at a time rising crimes against women have triggered a nationwide debate on laws and the need to change deeply-entrenched chauvinism in large parts of India. Mr Yadav has promised in his party's manifesto for the polls to check "the large-scale misuse" of the tougher anti-rape law introduced after the fatal gang-rape of a young woman on a moving bus in Delhi in December, 2012. When the new laws were proposed in Parliament, Mulayam Singh's party had objected to features including stalking being made a criminal offence, arguing that they could be twisted to implicate men in fake cases. "There is a large scale misuse of laws including anti-dowry, SC/ST (atrocities prevention) act and the new anti-rape law that came into existence after 'Nirbhaya' rape case. . . SP is in favour of implementing them strictly and at the same time will initiate strict action against those misusing them," the party's manifesto said.
english
<gh_stars>10-100 { "tha-ap313:0.1": "Therāpadāna", "tha-ap313:0.2": "Ārakkhadāyakavagga", "tha-ap313:0.3": "1. Ārakkhadāyakattheraapadāna", "tha-ap313:1.1": "“Dhammadassissa munino,", "tha-ap313:1.2": "vati kārāpitā mayā;", "tha-ap313:1.3": "Ārakkho ca mayā dinno,", "tha-ap313:1.4": "dvipadindassa tādino.", "tha-ap313:2.1": "Aṭṭhārase kappasate,", "tha-ap313:2.2": "yaṁ kammamakariṁ tadā;", "tha-ap313:2.3": "Tena kammavisesena,", "tha-ap313:2.4": "patto me āsavakkhayo.", "tha-ap313:3.1": "Paṭisambhidā catasso,", "tha-ap313:3.2": "vimokkhāpi ca aṭṭhime;", "tha-ap313:3.3": "Chaḷabhiññā sacchikatā,", "tha-ap313:3.4": "kataṁ buddhassa sāsanaṁ”.", "tha-ap313:4.1": "Itthaṁ sudaṁ āyasmā ārakkhadāyako thero imā gāthāyo abhāsitthāti.", "tha-ap313:5.1": "Ārakkhadāyakattherassāpadānaṁ paṭhamaṁ." }
json
package model; public class Reader { private static int id = 10000000; private int readerID; private String fullName; private String address; private String phoneNumber; public Reader() { } public Reader(int readerID) { this.readerID = readerID; } public Reader(int readerID, String fullName, String address, String phoneNumber) { this.readerID = readerID; this.fullName = fullName; this.address = address; this.phoneNumber = phoneNumber; } public static int getId() { return id; } public static void setId(int id) { Reader.id = id; } public int getReaderID() { return readerID; } public void setReaderID(int readerID) { this.readerID = readerID; } public String getFullName() { return fullName; } public void setFullName(String fullName) { this.fullName = fullName; } public String getAddress() { return address; } public void setAddress(String address) { this.address = address; } public String getPhoneNumber() { return phoneNumber; } public void setPhoneNumber(String phoneNumber) { this.phoneNumber = phoneNumber; } }
java
It might seem strange that the most recent Samsung flagship phablet you could actually buy is the Galaxy Note 5, which debuted way back in August 2015. But the Note 6 never existed (Samsung skipped that number when jumping to the Note 7), and despite multiple unsuccessful attempts to fix its exploding batteries, the Note 7 was killed and pulled from stores last year, which left a gaping 5.7-inch hole atop Samsung’s phone lineup. If I were a Note fanboy, I’d be pissed about the sad series of events that has resulted in a year wasted. So now, Samsung is looking to make up for past mistakes with the new Galaxy Note 8, which borrows much of its styling and design cues from Galaxy S8, enhances the traditional productivity features found on Note phones, and follows other great phones by finally introducing Samsung’s first ever dual-camera module. And yes, the Note 8’s rear fingerprint sensor is located to the right of the camera, and no, it’s not actually that big of a deal. At 6.3-inches across, the Note 8's 18.5:9 display is now bigger than ever. In fact, it’s got more screen real estate than pretty much anything else on the market, while retaining the almost non-existent bezels we got on the S8's Infinity display. The Note 8's general is also boxier than its smaller, casual siblings, without compromising on standard Samsung flagship features such as IP-68 water resistance, 1440p AMOLED screen, microSD card expansion and the company’s fancy virtual home button. You also get Samsung’s entire suite of biometric security options, ranging from face to fingerprint to iris recognition. But around back is where Samsung is pulling out the big guns, and this time, they are double barreled. While the dual-camera module looks a little clunky thanks to the black shroud covering the whole affair, the specs can’t be denied. The Note 8 comes with a standard 12-megapixel f/1.7 camera and a secondary 12-MP f/2.4 camera with a longer focal length, which is a 2x zoom of the main camera. This puts the Note 8 on the same playing field zoom-wise as the iPhone 7 Plus and Huawei P10, but it’s the presence of optical image stabilization (OIS) on both standard and zoom lenses that could give Samsung the edge. OIS on the rear camera means you don’t have to worry as much about camera shake, which is something that becomes more pronounced the more you zoom, and frankly, it’s an innovation I’m surprised other companies hadn’t implemented already. The other potential big camera improvement comes in the form of Samsung’s new Live Focus mode, which uses a bit of camera trickery to capture images using both lenses at the same time. This should allow you to tweak how much blur or sharpness shows up in your photos, and it can be adjusted both in real-time or way later in post-production. Samsung says Live Focus mode will even let you combine both the standard field of view and zoom lens perspective into a single shot. This opens up the possibility to create a photo that has the great breadth of scenery from a wide angle lens and the good looks on a single subject you’d get with a portrait lens. The only real cost is slightly larger file sizes, which generally weigh in between 15MB and 20MB. As for the S Pen, the stylus included with all Note devices, Samsung is looking to give users more of what they already like. The Screen Off Memo, which turns the Note into a chalkboard and lets you write down notes without opening the phone, will you an extra 100 pages of space to write on on the Note 8. There are also new functions such as Live Messages, which turns your scribbles into .gifs that you can send anywhere on the net. Even Samsung’s built-in translation feature appears to have gotten an upgrade so now you can decipher entire sentences instead of just one word at a time. Inside, the Note 8's Qualcomm Snapdragon processor is already as fast as it gets this side of the Android/iOS divide, so Samsung dropped in an extra 2GB of memory, which brings the total to a whopping 6GB. And to take advantage of all that RAM, Samsung has added a new App Pair feature. This lets users pick and choose two apps and assign them to a single icon, so that a single tap will automatically open both apps simultaneously in dual-window mode. Imagine all the beet-faced CEOs rushing from meeting to meeting lighten up just a bit when they realize they can dig out addresses from a calendar while looking for directions in Google Maps without switching back and forth between apps. My one big concern is that the Note 8’s battery stands at just 3,300 mAh, which is 200 mAh smaller than the power pack in the Galaxy S8+. And while Samsung might try to spin some nonsense about the Note 8 still having all day battery life (we’ll know for sure when we review it), if Samsung is truly looking to cater to bleeding edge enthusiasts, it should’ve have found a way to at least keep battery capacities the same. In fairness, following last year’s battery fire crisis, Samsung might be playing it safe with a smaller battery. The Note 8 will be available initially in two colors (black and orchid gray), with pre-orders going live on August 24 and shipments going out on September 15. Pricing starts at a whopping $929.99 unlocked (carrier pricing may vary), though pre-orders will be graced with your choice of a Samsung Gear 360 camera, or a 128GB microSD card and a fast wireless charger bundle.
english
18 And (A)the Spirit clothed (B)Amasai, who was the chief of the thirty, and he said, “We are yours, O David, And with you, O son of Jesse! (C)Peace, peace to you, And peace to him who helps you; Legacy Standard Bible (LSB) 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
<gh_stars>0 { "/js/app.js": "/js/app.js", "/css/app.css": "/css/app.css", "/css/bootstrap.css": "/css/bootstrap.css", "/css/bootstrap-extended.css": "/css/bootstrap-extended.css", "/css/colors.css": "/css/colors.css", "/css/flag-icon.css": "/css/flag-icon.css", "/css/custom-rtl.css": "/css/custom-rtl.css", "/css/all.css": "/css/all.css" }
json
{"komentarz": "Tak stronnicza osoba bez problemu znajdzie pracę w Gazecie Wyborczej lub w innym koncernie medialnym należącym do Niemców.", "nie": 2, "tak": 1}
json
<filename>manifest.json { "name": "Home Button Changer for YouTube™", "short_name": "YTHBC", "version": "2.1.1", "description": "Changes the YouTube Home Button", "background": { "scripts": ["dist/js/background.js"], "persistent": false }, "icons": { "128": "YTHBC2.png" }, "browser_action": { "default_icon": "assets/icon.png", "default_popup": "html/popup.html" }, "web_accessible_resources": [ "assets/button.png" ], "content_scripts": [ { "matches": [ "*://www.youtube.com/*" ], "js": ["dist/js/content.js"] } ], "manifest_version": 2 }
json
{"notifications":[{"orFilters":"true","read":"false","linkText":"Read more","notificationType":"5","validFrom":"2020-04-30T00:00:00Z","body":"The Vaadin 14 certification system has expanded! The \n<a href=\"https:\/\/vaadin.com\/blog\/new-learning-center-with-training-and-certifications\" rel=\" noopener\">Vaadin 14 Developer certification<\/a> has been available for a while, but now Plus subscription holders (and above) can also become a Certified Vaadin 14 Professional after completing the Professional training track.\n<br>","title":"Vaadin 14 Professional certification now available","draft":"false","imageUrl":"https:\/\/website.vaadin.com\/hubfs\/MarCom\/Vaadin14%20pro%20cert%20now%20avail.jpg","linkUrl":"https:\/\/vaadin.com\/blog\/vaadin-14-professional-certification-now-available","iconUrl":"https:\/\/vaadin.com\/documents\/10187\/10395\/tori-icon-blue-bg-90px\/4597dffb-3868-4711-b422-8fc3e71844e6?t=1394217295000","id":"75912","validTo":"2020-05-30T00:00:00Z"},{"orFilters":"true","read":"false","linkText":"Read more","notificationType":"5","validFrom":"2020-04-29T00:00:00Z","body":"A big thank you to those who shared their tips and tricks on how to learn Java. Your stories were delightful to read and are appreciated. This post summarizes your stories. The common trend is that learning Java is a process. Some struggled with Java in the beginning. For others, it was a long process before they fully understood the soul of Java. A lot of coffee was required as users got up time and again to overcome the next Java challenge. \n<h2><\/h2>","title":"Top 5 tips on how to learn Java from the Vaadin community","draft":"false","imageUrl":"https:\/\/website.vaadin.com\/hubfs\/MarCom\/Julia%20Blog2.jpg","linkUrl":"https:\/\/vaadin.com\/blog\/top-5-tips-on-how-to-learn-java-from-the-vaadin-community","iconUrl":"https:\/\/vaadin.com\/documents\/10187\/10395\/tori-icon-blue-bg-90px\/4597dffb-3868-4711-b422-8fc3e71844e6?t=1394217295000","id":"75923","validTo":"2020-05-29T00:00:00Z"},{"orFilters":"true","read":"false","linkText":"Read more","notificationType":"5","validFrom":"2020-04-27T00:00:00Z","body":"Vaadin is a great tool for building dashboards. Typically, a dashboard is a screen containing information, metrics, key indicators, and other data points related to business processes. Dashboards allow managers to track and monitor the health and performance of their organization.","title":"Building a dashboard for a REST web service in Java","draft":"false","imageUrl":"https:\/\/website.vaadin.com\/hubfs\/Building%20a%20dashboard%20for%20a%20REST%20web%20service%20in%20Java-1.png","linkUrl":"https:\/\/vaadin.com\/blog\/building-a-dashboard-for-a-rest-web-service-in-java","iconUrl":"https:\/\/vaadin.com\/documents\/10187\/10395\/tori-icon-blue-bg-90px\/4597dffb-3868-4711-b422-8fc3e71844e6?t=1394217295000","id":"75754","validTo":"2020-05-27T00:00:00Z"},{"orFilters":"true","read":"false","linkText":"Read more","notificationType":"5","validFrom":"2020-04-23T00:00:00Z","body":"The latest feature update for Vaadin 14 is in beta. The update includes the most-wanted new component features. Read on for more about the new DateTimePicker component, dialog features, and improvements to the layout API.","title":"Vaadin 14.2 feature update is in beta","draft":"false","imageUrl":"https:\/\/website.vaadin.com\/hubfs\/14_2_beta-compressor.png","linkUrl":"https:\/\/vaadin.com\/blog\/vaadin-14.2-feature-update-is-in-beta","iconUrl":"https:\/\/vaadin.com\/documents\/10187\/10395\/tori-icon-blue-bg-90px\/4597dffb-3868-4711-b422-8fc3e71844e6?t=1394217295000","id":"75397","validTo":"2020-05-23T00:00:00Z"},{"orFilters":"true","read":"false","linkText":"Read more","notificationType":"5","validFrom":"2020-04-17T00:00:00Z","body":"It\u2019s been almost 20 years since Vaadin began helping developers build performant, user-first Java web applications. Things have changed a lot since then. To give new (and returning) users an overview of Vaadin\u2019s features, we are releasing a series of free fact sheets outlining the different parts of Vaadin.","title":"A new series of fact sheets on Vaadin and its features","draft":"false","imageUrl":"https:\/\/website.vaadin.com\/hubfs\/Data%20Sheet%20Series.png","linkUrl":"https:\/\/vaadin.com\/blog\/free-fact-sheets-on-vaadin-and-features","iconUrl":"https:\/\/vaadin.com\/documents\/10187\/10395\/tori-icon-blue-bg-90px\/4597dffb-3868-4711-b422-8fc3e71844e6?t=1394217295000","id":"74914","validTo":"2020-05-17T00:00:00Z"}]}
json
1 Ka Khawsa, ka Khawsa, kawtih nani ceh taak vik? Ikawtih a hul kaana ak hla na awm hoe nawh, kak khy awi awhkawng ak hla na na awm hy voei? 2 Aw Bawipa, dai awh khy nyng, cehlai am nim hlat tiksaw than awh awm am sit thai nyng. 3 Cehlai nang taw thlak ciim na boei ngawihdoelh awh ngawi nawh; Isarelkhqi a zoeksang na awm hyk ti. 4 Ami pakhqi ing nang ce ni ypna unawh; a mingmih ing ami ypnaak a dawngawh nang ing cekkhqi ce hul hyk ti. 5 Na venawh amik khy awh ce hul na awm uhy, nang ce ami ni ypnaak dawngawh amik kaw am boet hy. 6 Kai taw thlanghqing na am awm voel nyng, ceilaak nani ka awm hawh, thlang ak kqawnseet ingkaw thekhanaak na awm nyng. 7 Mat 27.39; Marka 15.29; Luke 23.35.Kai amik hukhqi boeih ing ni qaih na uhy; a hui ni mele sih unawh, ami luu ni hyl sih uhy. 8 Mat 27.43.Bawipa ypna saw; Bawipa ing hul thaw voei. Anih ing hul thaw voei, anih ak khanawh ak kaw a law soeih koenoek,” ti uhy. 9 Cehlai nang ing zenbu ak khui awhkawng nik plawk nawh; ka nu suk ka awk hui awh awm namah ce ni ypna sak hawh hyk ti. 10 Ka thang cyk ca awhkawng namah awh peek na awm hawh nyng saw, ka nu puk khuiawh ka awm awhkawng nang taw ka Khawsa na awm hyk ti. 11 Ak hla na koeh ni awm taak hoe, kyinak ing ni zoe law nawh anik hulkung u awm am awm hy. 12 Vaitaw am caikhqi ing nik chung unawh, Bashan a vaitaw am cai ak tha ak awm awmkhqi ing nik chung khoep uhy. 13 A kawk doena a ai kawi qamsa ak phu pat pat samthyyn ing am kha ang khara nawh ning hawi sih hy. 14 Tui amyihna hawk na awm nyng saw, ka quh cawngkhqi pet hoh hoh boeih hy. Kam thin ve khawi-ut amyihna paan nawh kak khuiawh a tui na tle boeih hy. 15 Kak thaawmnaak awm am keek amyihna qum boeih nawh, kam lai awm kak dangkhyl na bet qap hawh hy; nang ing thihnaak dekvai awh ni tloeng hawh hyk ti. 16 Uikhqi ing nik chung khoep unawh; thlakche tloek ing nik chung khoep uhy, ka kut qawi ingkaw ka khaw qawi ve ni hen pe uhy. 17 Ka quhkhqi ve a cuna noet thai nyng, thlanghqing ing kawqep doena nim dai sih uhy. 18 Mat 27.35; Marka 15.24; Luke 23.34; Joh 19.24.Ka sui ka bai ce qek qu unawh ka angki ce taicung zyk sih uhy. 19 Cehlai Bawipa ak hla na koeh ni awm taak; Aw kak thaawmnaak, kai hul aham ang tawnna law lah. 20 Zawzi awhkawng ka hqingnaak ve hul nawh, uikhqi ak thaawmnaak awhkawng a phu ak tlo ka hqingnaak ve hul lah. 21 Sendeihkhqi am khak khui awhkawng ni hul nawh; cungkhqi ak kii awhkawng ni hul lah. 22 Ka koeinaakhqi venawh nang ming ce khypyi nyng saw; thlangkqeng anglakawh nang ce nim kyih vang. 23 Nangmih Bawipa ak kqihkhqi, kyihcah lah uh! Nangmih Jacob a cadil boeih, amah ce zoeksang lah uh! Nangmih Isarel cadilkhqi boeih, amah ce kqihchah lah uh! 24 Khuikha nawh kyinaak ak hu thlang ce husit nawh am tyih hy; a haai awm am thuh pe nawh hul aham ak khynaak awi ce ngai pehy. 25 Thlangkqeng anglak cunnaak awh nang ka nim kyihnaak awi ve namah a ven awhkawng ni a law; kak awikamnaak ve nang anik kqihkhqi haiawh soep sak vang. 26 Khawdengkhqi ing ai kawi hu unawh amik phoen phyi kaw; Bawipa ak suikhqi ing amah ce kyih u seitaw- nak kawlung ce kumqui dyna hqing seh. 27 Khawmdek a dytnaak boeih ing sim kawm usaw Bawipa venna hlat kawm uh, qam pum awhkaw cakaw paqeng boeih ing na haiawh koep kawm uh- 28 Uknaak taw Bawipa koena a awm dawngawh pilnam thlang boeih ce amah ing uk hy. 29 Khawmdek awhkaw boeikhqi boeih ing poei sai unawh bawk kawm uh; dekvai khuina ak cetkhqi boeih- amah poek awh a mak hqing thaikhqi ing a haiawh khawkhlu sym kawm uh. 30 Cadilkhqi ing bibi pe kawm usaw; hai ben awhkaw ak law hly cadilkhqi venawh Bawipa kawng ce kqawn pe kawm uh. 31 Cekkhqi ing ak thang hlan thlangkhqi venawh anih a dyngnaak ce kqawn pe kawm uh. Anih ing ce ce asai hawh a dawngawh.
english
import { TimerRounded } from "@mui/icons-material"; import { Box, Typography } from "@mui/material"; import React from "react"; import ReactPlayer from "react-player" import BasicContent from "./basicContent"; import DefaultLayout from "./defaultLayout"; export default function DocumentLayout(props: { title: string; description: string; video_url: string; estimated_time?: string; children; }): React.ReactElement { return ( <DefaultLayout> <BasicContent odd> <Box> <Typography variant="h1"> {props.title} </Typography> <Typography variant="body1"> {props.description} </Typography> {props.estimated_time && <Typography variant="body2"> <TimerRounded /> {props.estimated_time} </Typography>} </Box> {props.video_url && <ReactPlayer url={props.video_url} controls={true} />} {props.children} </BasicContent> </DefaultLayout> ); }
typescript
To follow up on the last pass, the developers decided to have some more Christmas fun in Episode Four, Act One. The underlying theme this time is Valentine’s Day. You can get your hands on the adorable Together Forever gun buddy, the Be Mine player cards, and the A Prime Valentine’s and Sweetest Match sprays. There are also some interesting new skins for the Phantom, Vandal, and Sheriff, as well as Velocity, a flashy new Karambit melee. The eye-catching knife is available in a variety of colors, including bright orange, yellow, purple, and cyan. Here are some of the highlights of the Valorant Episode 4 Act 1 Battle Pass: Free Highlights: Paid Highlights:
english
<filename>crates/rome_js_formatter/src/js/classes/constructor_class_member.rs use crate::formatter_traits::FormatTokenAndNode; use crate::{ format_elements, hard_group_elements, space_token, FormatElement, FormatResult, Formatter, ToFormatElement, }; use rome_js_syntax::JsConstructorClassMember; use rome_js_syntax::JsConstructorClassMemberFields; impl ToFormatElement for JsConstructorClassMember { fn to_format_element(&self, formatter: &Formatter) -> FormatResult<FormatElement> { let JsConstructorClassMemberFields { modifiers, name, parameters, body, } = self.as_fields(); Ok(hard_group_elements(format_elements![ modifiers.format(formatter)?, space_token(), name.format(formatter)?, parameters.format(formatter)?, space_token(), body.format(formatter)? ])) } }
rust
Triggering a new row with the Centre at a time when Maharashtra is grappling with the surge in Covid-19 cases and shortage of essential medical supplies, Chief Minister Uddhav Thackeray Saturday said he had called Prime Minister Narendra Modi Friday evening, seeking his intervention for the supply of medical oxygen and Remdesivir, but was told that he was busy with the election in West Bengal. Thackeray said this during a meeting with industry leaders Saturday morning. Later Saturday, Union Health Minister Harsh Vardhan said he had spoken to Thackeray and reassured him that his concerns are being addressed. In another tweet, he said he discussed with Thackeray about the stringent actions to be taken for containment, surveillance and treatment of Covid-19 cases. Meanwhile, Maharashtra Health Minister Rajesh Tope Saturday said the state should get permission to access oxygen from other states via the rail network. This measure, he said, is necessary considering the acute shortage of oxygen and rising cases in the state. “The state has set a target of eight lakh Covid vaccination daily. To meet this target, the Centre will have to ensure sustained supply,” he said.
english
<reponame>qin795217119/b5think6cmf { ", opens captions settings dialog": ", öppnar dialogruta för textning", ", opens descriptions settings dialog": ", öppnar dialogruta för inställningar", ", opens subtitles settings dialog": ", öppnar dialogruta för undertexter", ", selected": ", vald", "A network error caused the media download to fail part-way.": "Ett nätverksfel gjorde att nedladdningen av videon avbröts.", "Audio Player": "Ljudspelare", "Audio Track": "Ljudspår", "Background": "Bakgrund", "Beginning of dialog window. Escape will cancel and close the window.": "Början av dialogfönster. Escape avbryter och stänger fönstret.", "Black": "Svart", "Blue": "Blå", "Caption Settings Dialog": "Dialogruta för textningsinställningar", "Captions": "Text på", "Casual": "Casual", "Chapters": "Kapitel", "Close": "Stäng", "Close Modal Dialog": "Stäng dialogruta", "Current Time": "Aktuell tid", "Cyan": "Cyan", "Depressed": "Deprimerad", "Descriptions": "Beskrivningar", "Done": "Klar", "Dropshadow": "DropSkugga", "Duration": "Total tid", "End of dialog window.": "Slutet av dialogfönster.", "Font Family": "Typsnittsfamilj", "Font Size": "Textstorlek", "Fullscreen": "Fullskärm", "Green": "Grön", "LIVE": "LIVE", "Loaded": "Laddad", "Magenta": "Magenta", "Modal Window": "dialogruta", "Monospace Sans-Serif": "Monospace Sans-Serif", "Monospace Serif": "Monospace Serif", "Mute": "Ljud av", "No compatible source was found for this media.": "Det gick inte att hitta någon kompatibel källa för den här videon.", "Non-Fullscreen": "Ej fullskärm", "None": "Ingen", "Opaque": "Opak", "Pause": "Pausa", "Play": "Spela", "Play Video": "Spela upp video", "Playback Rate": "Uppspelningshastighet", "Progress": "Förlopp", "Progress Bar": "förloppsmätare", "Proportional Sans-Serif": "Proportionell Sans-Serif", "Proportional Serif": "Proportionell Serif", "Raised": "Raised", "Red": "Röd", "Remaining Time": "Återstående tid", "Replay": "Spela upp igen", "Reset": "Återställ", "Script": "Manus", "Semi-Transparent": "Semi-transparent", "Small Caps": "Small-Caps", "Stream Type": "Strömningstyp", "Subtitles": "Text på", "Text": "Text", "Text Edge Style": "Textkantstil", "The media could not be loaded, either because the server or network failed or because the format is not supported.": "Det gick inte att ladda videon, antingen på grund av ett server- eller nätverksfel, eller för att formatet inte stöds.", "The media is encrypted and we do not have the keys to decrypt it.": "Mediat är krypterat och vi har inte nycklarna för att dekryptera det.", "The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "Uppspelningen avbröts på grund av att videon är skadad, eller också för att videon använder funktioner som din webbläsare inte stöder.", "This is a modal window": "Det här är ett dialogruta", "This modal can be closed by pressing the Escape key or activating the close button.": "Den här dialogrutan kan stängas genom att trycka på Escape-tangenten eller stäng knappen.", "Transparent": "Transparent", "Uniform": "Uniform", "Unmute": "Ljud på", "Video Player": "Videospelare", "Volume Level": "Volymnivå", "White": "Vit", "Window": "Fönster", "Yellow": "Gul", "You aborted the media playback": "Du har avbrutit videouppspelningen.", "captions off": "Text av", "captions settings": "textningsinställningar", "descriptions off": "beskrivningar av", "descriptions settings": "beskrivningsinställningar", "progress bar timing: currentTime={1} duration={2}": "{1} av {2}", "restore all settings to the default values": "återställ alla inställningar till standardvärden", "subtitles off": "Text av", "subtitles settings": "undertextsinställningar", "{1} is loading.": "{1} laddar." }
json
import { useEffect, useState } from 'react' import { CommonProps } from '../index' export interface UseProgressControlProps { progress?: number playStrategy?: 'progressControl' } const useProgressControl = ({ progress, playStrategy, onSetVideoProps, domRef }: UseProgressControlProps & CommonProps) => { const [isLoad, setIsLoad] = useState(true) const [duration, setDuration] = useState(0) const handleLoadedMetadata = () => { // @ts-expect-error const { duration } = domRef.current setDuration(duration) setIsLoad(false) } useEffect(() => { if (isLoad || typeof progress !== 'number' || playStrategy !== 'progressControl') { return } const calcProgress = progress < 0 ? 0 : progress > 1 ? 1 : progress // @ts-expect-error domRef.current.currentTime = calcProgress * duration }, [progress, isLoad]) useEffect(() => { if (playStrategy === 'progressControl') { onSetVideoProps({ muted: true, playsInline: true, preload: 'metadata' }) } }, [playStrategy]) return { handleLoadedMetadata } } export default useProgressControl
typescript
/* * Copyright 2011 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package com.github.javarch.persistence.orm.hibernate.spi; import org.hibernate.cfg.Configuration; import org.hibernate.engine.spi.SessionFactoryImplementor; import org.hibernate.event.service.spi.EventListenerRegistry; import org.hibernate.event.spi.EventType; import org.hibernate.integrator.spi.Integrator; import org.hibernate.metamodel.source.MetadataImplementor; import org.hibernate.service.spi.SessionFactoryServiceRegistry; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.github.javarch.persistence.orm.hibernate.listener.PreInsertEventListener; import com.github.javarch.persistence.orm.hibernate.listener.PreUpdateEventListener; /** * EventListener integrator. * * Integra os seguintes eventos: * * EventType.PRE_INSERT * EventType.PRE_UPDATE * * @author <NAME> * */ public class JavarchEventListenerIntegrator implements Integrator { private static final Logger LOG = LoggerFactory.getLogger(JavarchEventListenerIntegrator.class); @Override public void integrate(Configuration configuration,SessionFactoryImplementor sessionFactory,SessionFactoryServiceRegistry serviceRegistry) { LOG.info("Adicionando eventos customizados ao EventListenerRegistry."); EventListenerRegistry registry = serviceRegistry.getService(EventListenerRegistry.class); registry.getEventListenerGroup(EventType.PRE_INSERT).appendListener( new PreInsertEventListener() ); registry.getEventListenerGroup(EventType.PRE_UPDATE).appendListener( new PreUpdateEventListener() ); } @Override public void integrate(MetadataImplementor metadata, SessionFactoryImplementor sessionFactory,SessionFactoryServiceRegistry serviceRegistry) { } @Override public void disintegrate(SessionFactoryImplementor sessionFactory,SessionFactoryServiceRegistry serviceRegistry) { } }
java
/* * Copyright 2016 <NAME> - <EMAIL> * * 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 jcardenas.com.chess.activities; import android.content.BroadcastReceiver; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.content.IntentFilter; import android.content.SharedPreferences; import android.os.Handler; import android.os.Message; import android.preference.PreferenceManager; import android.support.v7.app.AlertDialog; import android.os.Bundle; import android.support.v7.widget.DefaultItemAnimator; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.RelativeLayout; import android.widget.Toast; import com.google.firebase.auth.FirebaseAuth; import com.google.firebase.auth.FirebaseUser; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import java.util.ArrayList; import java.util.HashSet; import java.util.Set; import java.util.regex.Matcher; import java.util.regex.Pattern; import jcardenas.com.chess.callbacks.BoardCallback; import jcardenas.com.chess.views.BoardView; import jcardenas.com.chess.models.Mode; import jcardenas.com.chess.models.Move; import jcardenas.com.chess.models.Piece; import jcardenas.com.chess.models.PieceColor; import jcardenas.com.chess.R; import jcardenas.com.chess.adapters.ChatAdapter; import jcardenas.com.chess.adapters.OnlineAdapter; import jcardenas.com.chess.models.ChatMessage; import jcardenas.com.chess.models.User; import jcardenas.com.chess.services.PubnubService; import jcardenas.com.chess.utils.Constants; import jcardenas.com.chess.utils.Score; import jcardenas.com.chess.utils.SoundPlayer; public class GameActivity extends BaseActivity { final static String TAG = GameActivity.class.getSimpleName(); private String username; private String rival; private String rivalName; private String channel; private BoardView biw; private FirebaseUser currentUser; private GameBroadcastReceiver receiver; private ChatAdapter mChatAdapter; private OnlineAdapter mOnlineAdapter; private RecyclerView mRecyclerViewChats; private RecyclerView mRecyclerViewOnline; // Intent mServiceIntent; private PubnubService mService; // boolean mBound = false; private static SoundPlayer[] mplayer; private boolean playSounds = true; static private boolean onGame = false; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (!checkAuth()) return; FirebaseAuth auth = FirebaseAuth.getInstance(); currentUser = auth.getCurrentUser(); RelativeLayout layout; Intent myIntent = getIntent(); String mode = myIntent.getStringExtra("mode"); // check sound preferences SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(getApplicationContext()); playSounds = sharedPrefs.getBoolean("sounds", true); SoundPlayer.allowSounds(playSounds); mplayer = new SoundPlayer[3]; mplayer[0] = new SoundPlayer(this, R.raw.thin); mplayer[1] = new SoundPlayer(this, R.raw.base); mplayer[2] = new SoundPlayer(this, R.raw.goodnews); biw = new BoardView(getBaseContext(), this); if (mode.equals("online")) { setContentView(R.layout.activity_game); layout = (RelativeLayout)findViewById(R.id.game_layout); String color = myIntent.getStringExtra("color"); username = myIntent.getStringExtra("username"); rival = myIntent.getStringExtra("rival"); rivalName = myIntent.getStringExtra("rivalName"); this.channel = generateChannelName(username, rival); biw.setMainColor(color.equals("white") ? PieceColor.WHITE : PieceColor.BLACK); biw.setMode(Mode.HUMAN_ONLINE); biw.setBoardCallback(new BoardCallback() { @Override public void onMoveComplete(Move move) { mplayer[1].play(); } @Override public void onCheck(PieceColor color) { if (color == BoardView.getMainColor()) { Toast.makeText(getApplicationContext(), getString(R.string.check), Toast.LENGTH_SHORT).show(); } } @Override public void onGameOver(PieceColor color) { if (color == BoardView.getMainColor()) { AlertDialog.Builder builder = new AlertDialog.Builder(GameActivity.this); builder.setTitle(getString(R.string.you_lost)).setMessage(getString(R.string.you_lost_desc_online)).setIcon(android.R.drawable.ic_delete) .setNeutralButton(getString(R.string.accept), new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { finish(); } }); AlertDialog dialog = builder.create(); dialog.show(); } else { biw.setGameOver(true); mplayer[2].play(); updateRating(); } } }); initializeOnline(); this.mRecyclerViewChats = (RecyclerView) findViewById(R.id.chats); this.mRecyclerViewOnline = (RecyclerView) findViewById(R.id.usersOnline); this.mChatAdapter = new ChatAdapter(new ArrayList<ChatMessage>()); this.mOnlineAdapter = new OnlineAdapter(new ArrayList<User>(), this); this.mChatAdapter.userPresence(username, "join"); RecyclerView.LayoutManager mLayoutManager = new LinearLayoutManager(getApplicationContext()); this.mRecyclerViewChats.setLayoutManager(mLayoutManager); this.mRecyclerViewChats.setItemAnimator(new DefaultItemAnimator()); RecyclerView.LayoutManager mLayoutManager2 = new LinearLayoutManager(getApplicationContext()); this.mRecyclerViewOnline.setLayoutManager(mLayoutManager2); this.mRecyclerViewOnline.setItemAnimator(new DefaultItemAnimator()); setupAutoScroll(); this.mRecyclerViewChats.setAdapter(mChatAdapter); this.mRecyclerViewOnline.setAdapter(mOnlineAdapter); setupListView(); Button btn = (Button) findViewById(R.id.send); btn.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { EditText edit = (EditText) findViewById(R.id.editText); String msg = edit.getText().toString(); edit.setText(""); long unixTime = System.currentTimeMillis() / 1000L; if (!msg.equals("")) { final ChatMessage chatMsg = new ChatMessage(currentUser.getEmail(), currentUser.getDisplayName(), msg, unixTime); GameActivity.this.runOnUiThread(new Runnable() { @Override public void run() { GameActivity.this.mChatAdapter.addMessage(chatMsg); } }); JSONObject json = new JSONObject(); try { json.put(Constants.JSON_DISPLAY_NAME, currentUser.getDisplayName()); json.put(Constants.JSON_USER, currentUser.getEmail()); json.put(Constants.JSON_TIME, unixTime); json.put(Constants.JSON_MSG, msg); PubnubService.publish(GameActivity.this.getChannel(), json, Constants.NEW_MSG_ACTION); } catch (Exception e) { Toast.makeText(getApplicationContext(), getString(R.string.msg_error), Toast.LENGTH_SHORT); e.printStackTrace(); } } } }); runOnUiThread(new Runnable() { @Override public void run() { try { getSupportActionBar().setTitle("vs " + rivalName); } catch (Exception e) {} } }); } else { setContentView(R.layout.activity_game_pc); layout = (RelativeLayout)findViewById(R.id.game_layout); biw.setBoardCallback(new BoardCallback() { @Override public void onMoveComplete(Move move) { mplayer[1].play(); } @Override public void onCheck(PieceColor color) { if (color == BoardView.getMainColor()) { Toast.makeText(getApplicationContext(), getString(R.string.check), Toast.LENGTH_SHORT).show(); } } @Override public void onGameOver(PieceColor color) { int icon = android.R.drawable.star_big_on; String text = getString(R.string.you_win); String desc = getString(R.string.you_win_desc); if (color == BoardView.getMainColor()) { icon = android.R.drawable.ic_delete; text = getString(R.string.you_lost); desc = getString(R.string.you_lost_desc); } else { mplayer[2].play(); } AlertDialog.Builder builder = new AlertDialog.Builder(GameActivity.this); builder.setTitle(text).setMessage(desc).setIcon(icon) .setNeutralButton(getString(R.string.accept), new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { } }); AlertDialog dialog = builder.create(); dialog.show(); } }); biw.setMainColor(PieceColor.WHITE); biw.setMode(Mode.HUMAN_COMPUTER); } layout.addView(biw, 0); } private void initializeOnline() { installFilters(); /* mServiceIntent = new Intent(this, PubnubService.class); mServiceIntent.putExtra("username", this.username); mServiceIntent.putExtra("channel", this.channel); this.bindService(mServiceIntent, mServiceConnection, Context.BIND_AUTO_CREATE); */ mService = RoomActivity.getService(); mService.subscribeWithPresence(this.channel, false); GameActivity.onGame = true; } public void installFilters() { receiver = new GameBroadcastReceiver(); receiver.setActivity(this); IntentFilter filter = new IntentFilter(Constants.PUBNUB_ACTION); registerReceiver(receiver, filter); } /** * Setup the recyclerview to scroll to bottom anytime it receives a message. */ private void setupAutoScroll(){ this.mChatAdapter.registerAdapterDataObserver(new RecyclerView.AdapterDataObserver() { @Override public void onChanged() { // super.onChanged(); // mRecyclerViewChats.smoothScrollToPosition(mChatAdapter.getItemCount()); } @Override public void onItemRangeInserted(int positionStart, int itemCount) { mRecyclerViewChats.smoothScrollToPosition(0); mplayer[0].play(); } }); /* this.mChatAdapter.registerDataSetObserver(new DataSetObserver() { @Override public void onChanged() { super.onChanged(); mChatListView.setSelection(mChatAdapter.getCount() - 1); // mListView.smoothScrollToPosition(mChatAdapter.getCount()-1); } });*/ } private void setupListView(){ mOnlineAdapter.setOnItemClickListener(new OnlineAdapter.ClickListener() { @Override public void onItemClick(int position, View view) { } }); } @Override protected void onDestroy() { /*if (mBound) { unbindService(mServiceConnection); mBound = false; }*/ if (mService != null) PubnubService.unsubscribe(getChannel()); if (receiver != null) this.unregisterReceiver(receiver); super.onDestroy(); GameActivity.onGame = false; } @Override public void onBackPressed() { if (!biw.isGameOver()) { AlertDialog.Builder builder = new AlertDialog.Builder(GameActivity.this); builder.setTitle(getString(R.string.quit_game)) .setMessage(getString(R.string.quit_game_desc)) .setIcon(android.R.drawable.ic_dialog_alert) .setPositiveButton(getString(R.string.accept), new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { finish(); } }) .setNegativeButton(getString(R.string.cancel), new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { } }); AlertDialog dialog = builder.create(); dialog.show(); } else { super.onBackPressed(); } } public String getChannel() { return channel; } public String getUsername() { return username; } public String getRival() { return rival; } static public int fix(int a) { return Math.abs(a - 7); } static String generateChannelName(String ch1, String ch2) { String channelName = null; if (ch1.compareTo(ch2) > 0) { channelName = ch1 + "_" + ch2; } else { channelName = ch2 + "_" + ch1; } channelName = channelName.replaceAll("[^a-zA-Z0-9_]", ""); return channelName; } void updateRating() { AlertDialog.Builder builder = new AlertDialog.Builder(GameActivity.this); builder.setTitle(getString(R.string.you_win)).setMessage(R.string.you_win_desc_online).setIcon(android.R.drawable.star_big_on) .setNeutralButton(R.string.you_win_desc, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { // finish(); } }); AlertDialog dialog = builder.create(); dialog.show(); Score.updateDB(25, new Handler() { public void handleMessage(Message msg) { Bundle bundle = msg.getData(); final int score = bundle.getInt("score"); Score.setScore(GameActivity.this, score); GameActivity.this.runOnUiThread(new Runnable() { @Override public void run() { // update state GameActivity.this.mService.setStateLogin(GameActivity.this.getChannel()); } }); } }); } static public class GameBroadcastReceiver extends BroadcastReceiver { static GameActivity activity; public void setActivity(GameActivity activity) { GameBroadcastReceiver.activity = activity; } @Override public void onReceive(Context context, Intent intent) { String action = intent.getStringExtra("action"); if (action.equals(Constants.NEW_MSG_ACTION)) { // new message action final ChatMessage chatMsg = (ChatMessage)intent.getSerializableExtra("chatMsg"); activity.runOnUiThread(new Runnable() { @Override public void run() { activity.mChatAdapter.addMessage(chatMsg); } }); } else if (action.equals(Constants.MOVE_ACTION)) { final String username = intent.getStringExtra(Constants.JSON_USER); if (!username.equals(activity.getRival())) return; final String move = intent.getStringExtra(Constants.MOVE); String pattern = "^([0-9]+)x([0-9]+):([0-9]+)x([0-9]+)"; Pattern r = Pattern.compile(pattern); final Matcher match = r.matcher(move); if (!match.matches()) return; activity.runOnUiThread(new Runnable() { @Override public void run() { int acol = fix(Integer.parseInt(match.group(1))); int arow = fix(Integer.parseInt(match.group(2))); int bcol = fix(Integer.parseInt(match.group(3))); int brow = fix(Integer.parseInt(match.group(4))); Piece pc; if ((pc = activity.biw.getPiece(acol, arow)) != null) { if (pc.getColor() != BoardView.getMainColor()) { pc.move(bcol, brow); activity.biw.invalidate(); Move move = new Move(arow*8+acol, brow*8+bcol, 0, -1); activity.biw.onMove(move); } } } }); } else if (action.equals(Constants.PRESENCE_ACTION)) { final String user = intent.getStringExtra("user"); JSONObject data = null; try { String sdata = intent.getStringExtra("_data"); data = new JSONObject(sdata); } catch (Exception e) { return; } final String _action = intent.getStringExtra("_action"); final JSONObject _data = data; if (_action.equals("timeout") && user.equals(activity.getRival())) { activity.runOnUiThread(new Runnable() { @Override public void run() { Toast.makeText(activity.getApplicationContext(), activity.getString(R.string.connection_error), Toast.LENGTH_LONG).show(); activity.finish(); } }); } else if (_action.equals("leave") && user.equals(activity.getRival()) && !activity.biw.isGameOver()) { activity.runOnUiThread(new Runnable() { @Override public void run() { Toast.makeText(activity.getApplicationContext(), activity.getString(R.string.win_default), Toast.LENGTH_LONG).show(); activity.biw.onGameOver((BoardView.getMainColor() == PieceColor.BLACK ? PieceColor.WHITE : PieceColor.BLACK)); } }); } activity.runOnUiThread(new Runnable() { @Override public void run() { activity.mChatAdapter.userPresence(user, _action); activity.mOnlineAdapter.updateAction(user, _action, _data); try { int occ = activity.mOnlineAdapter.getItemCount(); // GameBroadcastReceiver.this.activity.getSupportActionBar().setTitle(GameBroadcastReceiver.this.activity.getChannel() + " (" + occ + ")"); }catch (Exception e) { } } }); } else if (action.equals(Constants.HERE_NOW_ACTION)) { // here now String jsonString = intent.getStringExtra("json"); JSONObject json = null; try { json = new JSONObject(jsonString); } catch (JSONException e) { e.printStackTrace(); return; } try { final Set<String> usersOnline = new HashSet<String>(); final JSONArray hereNowJSON = json.getJSONArray("uuids"); final ArrayList<User> listUsers = new ArrayList<User>(); for (int i = 0; i < hereNowJSON.length(); i++) { JSONObject jobj = hereNowJSON.getJSONObject(i); String uuid = jobj.getString("uuid"); if (uuid.equals(activity.currentUser.getEmail())) continue; String displayName = null; try { JSONObject state = jobj.getJSONObject("state"); displayName = state.getString("displayName"); } catch (JSONException e) { } usersOnline.add(uuid); listUsers.add(new User(uuid, displayName)); } final int occ = listUsers.size(); activity.runOnUiThread(new Runnable() { @Override public void run() { activity.mChatAdapter.setOnlineNow(usersOnline); activity.mOnlineAdapter.setUsers(listUsers); /*try { GameBroadcastReceiver.this.activity.getSupportActionBar().setTitle(GameBroadcastReceiver.this.activity.getChannel() + " (" + occ + ")"); }catch (Exception e) { }*/ } }); } catch (JSONException e) { e.printStackTrace(); } } } } /* private ServiceConnection mServiceConnection = new ServiceConnection() { @Override public void onServiceConnected(ComponentName className, IBinder service) { PubnubService.LocalBinder binder = (PubnubService.LocalBinder) service; mService = binder.getService(); mBound = true; } @Override public void onServiceDisconnected(ComponentName arg0) { mBound = false; } };*/ }
java
import collections import logging import nltk import operator import os import pathlib import re from typing import List, Optional, Tuple from transformers import PreTrainedTokenizer logging.basicConfig(level=logging.DEBUG) VOCAB_FILES_NAMES = {"vocab_file": "vocab.txt"} class NEA_NLTK_Tokenizer(object): """Tokenizer for NEA. Performs word level tokenization via NLTK package followed by combining entity placeholders. """ def __init__(self, do_lower_case: bool = True): self.do_lower_case = do_lower_case def tokenize(self, text: str) -> List[str]: """Main tokenize method Args: text (str): text string to tokenize Returns: List[str]: return a list of tokenized string """ if self.do_lower_case: text = text.lower() tokens = nltk.word_tokenize(text) tokens = self._merge_tokens(tokens) return tokens def _merge_tokens(self, tokens: List[str]) -> List[str]: for index, token in enumerate(tokens): if token == '@' and (index + 1) < len(tokens): tokens[index + 1] = '@' + re.sub('[0-9]+.*', '', tokens[index + 1]) tokens.pop(index) return tokens class NEATokenizer(PreTrainedTokenizer): """ The NEA Tokenizer class used WordLevel tokenization to generate tokens. Args: text (:obj:`str`): input text string to tokenize Example:: # 1. From local vocab file vocab_file = 'vocab.txt' tokenizer = NEATokenizer(vocab_file=vocab_file) tokens = tokenizer("Hello world!") tokens["input_ids"] # 2. Train vocab from dataset file train_file = 'dataset.tsv' tokenizer = NEATokenizer(train_file=train_file, train_vocab=True) tokens = tokenizer("Hello world!") tokens["input_ids"] # 3. Download pretrained from Azure storage import sgnlp.models.nea import NEAArguments import sgnlp.models.nea.utils import download_tokenizer_files_from_azure cfg = NEAArguments() download_tokenizer_files_from_azure(cfg) tokenizer = NEATokenizer.from_pretrained(cfg.tokenizer_args["save_folder"]) tokens = tokenizer("Hello world!") tokens["input_ids"] """ vocab_files_names = VOCAB_FILES_NAMES def __init__( self, vocab_file: str = None, train_file: str = None, train_vocab: bool = False, prompt_id: int = 1, maxlen: int = 0, vocab_size: int = 4000, do_lower_case: bool = True, unk_token: str = "<unk>", pad_token: str = "<pad>", num_token: str = "<num>", **kwargs): super().__init__( prompt_id=prompt_id, do_lower_case=do_lower_case, unk_token=unk_token, pad_token=pad_token, num_token=num_token, **kwargs) self.nea_tokenizer = NEA_NLTK_Tokenizer(do_lower_case) if train_vocab: self.vocab = self.create_vocab(train_file, prompt_id, maxlen, vocab_size) else: self.vocab = NEATokenizer.load_vocabulary(vocab_file) self.ids_to_tokens = collections.OrderedDict([(ids, tok) for tok, ids in self.vocab.items()]) @property def do_lower_case(self): return self.nea_tokenizer.do_lower_case @property def vocab_size(self): return len(self.vocab) def get_vocab(self): return dict(self.vocab) def _tokenize(self, text: str) -> List[str]: return self.nea_tokenizer.tokenize(text) def _convert_token_to_id(self, token: str): return self.vocab.get(token, self.vocab.get(self.unk_token)) def _convert_id_to_token(self, index: int): return self.ids_to_tokens(index, self.unk_token) def create_vocab(self, file_path: str, prompt_id: int, maxlen: int, vocab_size: int): total_words, unique_words = 0, 0 word_freqs = {} with open(file_path, 'r', encoding='utf-8') as input_file: next(input_file) for line in input_file: tokens = line.strip().split('\t') essay_set = int(tokens[1]) content = tokens[2].strip() if essay_set == prompt_id or prompt_id <= 0: if self.do_lower_case: content = content.lower() content = self.tokenize(content) if maxlen > 0 and len(content) > maxlen: continue for word in content: try: word_freqs[word] += 1 except KeyError: unique_words += 1 word_freqs[word] = 1 total_words += 1 sorted_word_freqs = sorted(word_freqs.items(), key=operator.itemgetter(1), reverse=True) if vocab_size <= 0: vocab_size = 0 for word, freq in sorted_word_freqs: if freq > 1: vocab_size += 1 vocab = collections.OrderedDict() vocab['<pad>'] = 0 vocab['<unk>'] = 1 vocab['<num>'] = 2 vocab_len = len(vocab.keys()) offset = vocab_len for word, _ in sorted_word_freqs[:vocab_size - vocab_len]: vocab[word] = offset offset += 1 return vocab def save_vocabulary(self, save_directory: str, filename_prefix: Optional[str] = None) -> Tuple[str]: index = 0 os.makedirs(save_directory, exist_ok=True) vocab_file = pathlib.Path(save_directory).joinpath(VOCAB_FILES_NAMES['vocab_file']) with open(vocab_file, 'w', encoding='utf-8') as writer: for token, token_index in sorted(self.vocab.items(), key=lambda kv: kv[1]): if index != token_index: logging.warning( f'Saving vocabulary to {vocab_file}: Vocabulary indices are not consecutive.' 'Please check vocabulary is not corrupted!') writer.write(token + '\n') index += 1 return (str(vocab_file),) @staticmethod def load_vocabulary(vocab_file: str): vocab = collections.OrderedDict() with open(vocab_file, "r", encoding="utf-8") as reader: tokens = reader.readlines() for index, token in enumerate(tokens): token = token.rstrip("\n") vocab[token] = index return vocab
python
Rafael Nadal will highlight the second day of Australian Open 2020 as the Spaniard faces Hugo Dellien in the first round match at the Rod Laver Arena in Melbourne. The world number one would be aiming to lift his second Australian Open title. It will be the first match between the two players. Karolina Pliskova will start her campaign against 39th ranked Kristina Mladenovic of France. Seeded second Pliskova will aim for her first title in Melbourne. Her best result at the tournament was a semi-final exit in the previous edition. Her match would be followed by wild card entrant Maria Sharapova taking on Donna Vekic at the Rod Laver Arena. Sharapova is a one-time winner at the Australian Open way back in 2008. US Open 2019 finalists Daniil Medvedev will face Frances Tiafoe in the first match of the evening session at the Rod Laver Arena. Angelique Kerber will then play Elisabetta Cocciaretto in the final match in the stadium. Belinda Bencic and Dominic Thiem will play their respective matches in the morning session at Margaret Court Arena. Bencic is up against Slovakia's Anna Karolina Schmiedlova while Thiem faces Frenchman Adrian Mannarino. Simona Halep will take on Jennifer Brady in the first match of the evening session, followed by Alexander Zverev against Marco Cecchinato. Local boy Nick Kyrgios will start his Australian Open 2020 with a match against Italy's 51 ranked Lorenzo Sonego. Ex-champion Stan Wawrinka will also play his first match, against Damir Dzumhur. Here is the Australian Open 2020 Schedule: Kristina Mladenovic vs Karolina Pliskova - 05:30 (IST) Maria Sharapova vs Donna Vekic - 06:45 (IST) Rafael Nadal vs Hugo Dellien - 08:00 (IST) Daniil Medvedev vs Frances Tiafoe - 13:30 (IST) Angelique Kerber vs Elisabetta Cocciaretto - 15:30 (IST) Belinda Bencic vs Anna Karolina Schmiedlova - 05:30 (IST) Dominic Thiem vs Adrian Mannarino - 06:45 (IST) Ajla Tomljanovic vs Anastasija Sevastova - 08:45 (IST) Simona Halep vs Jennifer Brady - 13:30 (IST) Alexander Zverev vs Marco Cecchinato - 14:45 (IST) Polona Hercog vs Rebecca Peterson - 05:30 (IST) Madison Keys vs Daria Kasatkina - 06:45 (IST) Stan Wawrinka vs v Damir Dzumhur - 08:00 (IST) Jo-Wilfried Tsonga vs Alexei Popyrin - 10:30 (IST) Nick Kyrgios vs Lorenzo Sonego - 13:30 (IST)
english
IOCL recruitment 2020: The Indian Oil Corporation Limited (IOCL) has reopened the apprenticeship recruitment notified which it had notified in March. The public sector undertaking has made certain changes to the job notice and has allowed candidates to apply till June 18. Through this IOCL will fill vacancies at Indian Oil Corporation Limited - Eastern Region (MD) for the year 2020-21 at its Locations in the States of West Bengal, Bihar, Odisha, Jharkhand & Assam. In the new notice it has said for Data Entry Operator (Fresher Apprentices), period of apprenticeship will remain as 15 months, whereas for Trade Apprentice - Data Entry Operator (Skill Certificate Holders), period of apprenticeship will be for 12 months. It has also added Retail Sales Associate (Freshers and Skill Certificate Holders) discipline. The apprenticeship period of 14 months for Freshers and 12 months for Skill Certificate Holders. 'There will be no separate seats for this new discipline and will be considered as part of the discipline seats advertised for Data Entry Operator,' it added. Candidates will be selected on the basis of written test. The date of the written test will be notified by IOCL later. Admit cards for the test will be made available to candidates on June 22.
english
Istanbul, Ankara and other major Turkish cities locked down for two days to combat the spread of the coronavirus under an Interior Ministry order, as the country's death toll from the pandemic rose above 1,000 on Saturday. US officials say hundreds of their troops will remain in Iraq, noting that missile systems are now operating in the bases hosting the occupation forces. The US State Department offers a $10-million reward for information on a senior commander of the Lebanese resistance movement of Hezbollah in what is feared to be Washington’s attempt at trying its hand at another assassination bid. Yemen has reported its first case of infection with the novel coronavirus in a southern province under the control of Saudi-sponsored militiamen loyal to the country’s former President Abd Rabbuh Mansur Hadi. Iraqi army troops and fighters from the Popular Mobilization Units (PMU) have launched the second phase of a major military operation to purge the westernmost part of Anbar province along the border with Jordan and Saudi Arabia of the remnants of the Daesh Takfiri terrorist group. Syrian forces have thwarted a major attack by Daesh terrorists against the central province of Homs, killing some 22 of the terrorists in fierce clashes. Major oil producers have reached a partial agreement on the reduction of their production to prop up prices hammered by the coronavirus pandemic but Saudi Arabia says the final accord depends on Mexico’s consent to go along with the proposed cuts. The spokesman for Yemen's Ansarullah movement, Mohammed Abdul-Salam, has dismissed a two-week ceasefire announced by the Saudi-led coalition waging a bloody military onslaught against the impoverished country as a publicity stunt. A Britain-based war monitor says Turkey has dispatched another military convoy to Syria’s northwestern province of Idlib, as Ankara beefs up its military presence in the embattled region following a ceasefire reached earlier this month with Moscow to halt an escalation of violence there.
english
Today, Arbaeen has become global and it will become more global. What is this phenomenon? What is the logic of Imam Husayn (A)? Today, Arbaeen has become global and it will become more global. What is this phenomenon? What is the logic of Imam Husayn (A)? There\\\\\\\'s a very special message coming from the global Resistance against the Arrogant Powers of the world, including the Zionists. There\\\\\\\'s a very special message coming from the global Resistance against the Arrogant Powers of the world, including the Zionists. What is that message? And there\\\\\\\'s another message from the global Resistance against the Arrogant Powers of the world for the Palestinian people who are fighting for the right to self-determination and fighting to keep their homeland from foreign invaders. But what is that message? Brig. Gen. Esmail Qaani explains. Video Tags: Have you ever wondered what it\\\\\\\'s going to be like when his eminence, the 12th divinely appointed Imam, Imam al-Mahdi (A) will reappear? Well one of the things that is a key part of the reappearance of the Awaited Savior of humanity is the individual, social, and global implementation and establishment of divine Justice; for the divine Kingdom of God stands upon this colossal pillar. Sister Spade expounds. Video Tags: In the global economy corporations demand enforceable laws - intellectual property and copyright laws - backed up by sanctions to protect their products. However when we ask these same companies - Cant we also protect the rights of the 16-year-old who made the product - the companies respond - No. That would be an impediment to free trade - Young garment workers in Bangladesh share their experiences working for companies like Disney and Wal-Mart. Ron Paul discusses the collapsing financial markets. We are in the middle of something very big and it doesnt look like its going to end soon. How the US Federal Reserve Bank has deceived the American public and misused their tax money. Chomsky: U.S. still wants to dominate but cannot order other big powers as it pleases; Iran war threat is real. Chomsky: U.S. still wants to dominate but cannot order other big powers as it pleases; Iran war threat is real. Imagining alternatives to the global food market. This is one of the central concerns of Raj Patel's latest book, The Value of Nothing. Imagining alternatives to the global food market. This is one of the central concerns of Raj Patel's latest book, The Value of Nothing. This is the trailer for the upcoming prisonplanet.tv exclusive interview with Dr. Webster Tarpley. In this interview, Dr. Tarpley reviews the writings of John P. Holdren, the current Whitehouse science advisor. This interview conclusively exposes scientific elite's true agenda, world-wide genocide and the formation of a global government to rule. The Rupert Murdoch phone hacking scandal that led to the closure of the news of the world was not surprising news in the perspective of the global media monopoly. Very a few people paid attention to the fact that targeting Muslims by the right wing media which is mostly owned by Murdoch has a longer history than this recent scandal. In this edition of the show we ask the following question; What role has Murdoch's news empire played in the negative portrayal of Muslims? This week Max Keiser and co-host, Stacy Herbert, after revealing that the Lizard King is back, discuss the radical redistribution of gold and silver property in the US and the radical experiment in the UK to have capitalism without capital. In the second half of the show, Max talks to Professor Steve Keen about the UK's financial sector debt which is at least 4 times as large as US financial sector debt before the global financial crisis began. Full English voiceover of the speech delivered by Sayyed Hassan Nasrallah(HA), secretary general of Hizbullah at the opening of the Sayyedah Zaynab Centre in Beirut, Lebanon on March 30, 2012. In this historical speech Sayyed Hassan(HA) discusses the Global March to Jerusalem (GM2J), the silence on Bahrain, the Zionist and Wahhabi plot against Syria and more. Nuclear weapons are threatening global peace. Nuclear weapons are threatening global peace. A leading research body concludes nuclear states are quite unwilling to disarm. The reports also refer to Israel's nuclear arsenal and issue that so far hasn't let any kind of International scrutiny. On this edition of News Analysis we ask: how safe the world can be with more than 19000 nuclear weapons? Medea is the co-founder of the anti-war group Code Pink and fair trade advocacy group Global Exchange. She is the author of many books including recently published, \"Drone Warfare: Killing by Remote Control\".
english
<filename>src/engine/actor.cpp<gh_stars>0 #include <engine/actor.hpp> Actor::Actor(std::uint_fast64_t id) : id(id), layer(0) {} void Actor::SetBody(std::unique_ptr<PhysicalBody> &&physical_body) { this->body = std::move(physical_body); } void Actor::SetRenderer(std::unique_ptr<Renderer> &&renderer) { this->renderer = std::move(renderer); } void Actor::SetPosition(const b2Vec2 &position) { transform.SetPosition(position); if (body != nullptr) { body->SetPosition(position); } } void Actor::SetPosition(float x, float y) { transform.SetPosition(x, y); if (body != nullptr) { body->SetPosition(b2Vec2(x, y)); } } void Actor::SetRotation(float rotation) { transform.SetRotation(rotation); if (body != nullptr) { body->SetRotation(rotation); } } Transform &Actor::GetTransform() { return transform; } std::set<std::string> Actor::GetTags() const { // Copy tags set and return. return std::set<std::string>(tags); } void Actor::AddTag(const std::string &tag) { tags.insert(tag); } void Actor::RemoveTag(const std::string &tag) { tags.erase(tag); } bool Actor::HasTag(const std::string &tag) const { auto t = tags.find(tag); if (t == tags.end()) { // No match return false; } return true; } void Actor::Render(const Camera &camera) const { if (renderer != nullptr) { renderer->Render(camera); } } void Actor::UpdateActorTransform() { if (body != nullptr) { transform.SetPosition(body->GetPosition()); transform.SetRotation(body->GetRotation()); } }
cpp
[{"namaKab":"REMBANG","originalFilename":"1. AANG HARDHOMO (dapil 4).jpg","namaPartai":"Partai Golongan Karya","id":148804,"noUrut":1,"nama":"<NAME>, S.SOS","stringJenisKelamin":"Laki-Laki"},{"namaKab":"REMBANG","originalFilename":"2. FITRIANA PRATIWI ERAWATI.jpg","namaPartai":"Partai Golong<NAME>a","id":101248,"noUrut":2,"nama":"<NAME>","stringJenisKelamin":"Perempuan"},{"namaKab":"<NAME>","originalFilename":"3. HJ. SITI ULFAH.jpg","namaPartai":"Partai Golongan Karya","id":126689,"noUrut":3,"nama":"Hj. SITI ULFA","stringJenisKelamin":"Perempuan"},{"namaKab":"REMBANG","originalFilename":"4.NUR AFIFAH.jpg","namaPartai":"Partai Golongan Karya","id":146558,"noUrut":4,"nama":"<NAME>","stringJenisKelamin":"Perempuan"}]
json
<reponame>ekzemplaro/librivox_database<filename>ext/filter_ext/ft_8596.json {"id_8596":{"title":"International Short Stories Volume 2: English Stories","language":"English","totaltime":"13:21:16","url_librivox":"http://librivox.org/international-short-stories-vol-2-by-william-patten/","url_iarchive":"http://archive.org/details/internationalshortstories_2_1405_librivox","readers":["4344","6670","7423","7433","7756","8011","8522","8631","8675","9015","9047"],"authors":"4106","genres":"Short Stories"}}
json
/** * */ package de.cinovo.cloudconductor.api.model; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeInfo.As; import com.fasterxml.jackson.annotation.JsonTypeInfo.Id; /** * Copyright 2015 Taimos GmbH<br> * <br> * * @author thoeger * */ @JsonTypeInfo(include = As.PROPERTY, use = Id.CLASS) public class AdditionalLink { private Long id; private String label; private String url; /** default constructor */ public AdditionalLink() { // nothing to do } /** * @param id link id * @param label link label * @param url link url */ public AdditionalLink(long id, String label, String url) { this.id = id; this.label = label; this.url = url; } /** * @return the id */ public Long getId() { return this.id; } /** * @param id the id to set */ public void setId(Long id) { this.id = id; } /** * @return the label */ public String getLabel() { return this.label; } /** * @param label the label to set */ public void setLabel(String label) { this.label = label; } /** * @return the url */ public String getUrl() { return this.url; } /** * @param url the url to set */ public void setUrl(String url) { this.url = url; } }
java
Indian Bank is looking for candidates to apply for the Chief Risk Officer (CRO) posts. By India Today Web Desk: Indian Bank is looking for candidates to apply for the Chief Risk Officer (CRO) posts. Interested and eligible candidates can apply for Indian Bank Recruitment 2020 through the prescribed application format on or before November 12, 2020. Indian Bank Recruitment 2020 to fill in one vacant post. The Indian Bank organization invites applications for Chief Risk Officer (CRO) Post from eligible persons having required qualifications. The post is in Indian Bank, Chennai, Tamil Nadu. - Professional certification in FRM (Financial Risk Management) from Global Association of Risk Professionals. - PRM (Professional Risk Management) Certification from PRMIA Institute. - Two (02) years’ experience as CRO in such regulated lenders in respect of which there is a regulatory requirement of appointing CRO with Board approval. - Age Limit: Minimum 45 years and Maximum 57 years as of July 1, 2020. Interested candidates can apply for Indian Bank Recruitment 2020 from the prescribed application format on or before November 12, 2020. All eligible and interested candidates should apply in the prescribed application format to reach the address cited above on or before November 12, 2020.
english
<reponame>HDL951236874/Leetcode package ArrayList; import java.util.ArrayList; import java.util.Arrays; import java.util.List; public class Problem78 { // you can also try the backtrack public List<List<Integer>> subsets(int[] nums) { List<List<Integer>> res = new ArrayList<>(); res.add(new ArrayList<Integer>()); for (int i = 0; i < nums.length; i++) { int length = res.size(); for (int j = 0; j < length; j++) { List<Integer> temp = new ArrayList<>(res.get(j)); temp.add(nums[i]); res.add(temp); } } return res; } public static void main(String[] args) { Problem78 p = new Problem78(); p.subsets(new int[]{1,2,3}); } }
java
<gh_stars>10-100 // Copyright 2019 // by Centrality Investments Ltd. // and Parity Technologies (UK) Ltd. // // 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. //! The registry has the purpose to compactify types and strings found in type //! definitions and identifiers such as symbol names. //! //! This is done by deduplicating common strings and types in order to reuse //! their definitions which can grow arbitrarily large. A type is uniquely //! identified by its type identifier that is therefore used to refer to types //! and their definitions. //! //! Since symbol names etc. are often shared between different types they are //! as well deduplicated. //! //! Types with the same name are uniquely identifiable by introducing namespaces. //! For this the normal Rust namespace of a type is used where it has been defined it. //! Rust prelude types live within the so-called root namespace that is just empty. //! In general namespaces are ordered sequences of symbols and thus also profit from //! string deduplication. use crate::tm_std::*; use crate::{ form::CompactForm, interner::{Interner, UntrackedSymbol}, meta_type::MetaType, TypeDef, TypeId, }; use serde::Serialize; /// Compacts the implementor using a registry. pub trait IntoCompact { /// The compact version of `Self`. type Output; /// Compacts `self` by using the registry for caching and compaction. fn into_compact(self, registry: &mut Registry) -> Self::Output; } /// The pair of associated type identifier and structure. /// /// This exists only as compactified version and is part of the registry. #[derive(Debug, PartialEq, Eq, Serialize)] pub struct TypeIdDef { /// The identifier of the type. id: TypeId<CompactForm>, /// The definition (aka internal structure) of the type. def: TypeDef<CompactForm>, } /// The registry for compaction of type identifiers and definitions. /// /// The registry consists of a cache for strings such as symbol names /// and a cache for already compactified type identifiers and definitions. /// /// Whenever using the registry to compact a type all of its sub-types /// are going to be registered recursively as well. A type is a sub-type /// of another type if it is used by its identifier or structure. /// /// # Note /// /// A type can be a sub-type of itself. In this case the registry has a builtin /// mechanism to stop recursion before going into an infinite loop. #[derive(Debug, PartialEq, Eq, Serialize)] pub struct Registry { /// The cache for already registered strings. #[serde(rename = "strings")] string_table: Interner<&'static str>, /// The cache for already registered types. /// /// This is just an accessor to the actual database /// for all types found in the `types` field. #[serde(skip)] type_table: Interner<AnyTypeId>, /// The database where registered types actually reside. /// /// This is going to be serialized upon serlialization. #[serde(serialize_with = "serialize_registry_types")] types: BTreeMap<UntrackedSymbol<core::any::TypeId>, TypeIdDef>, } /// Serializes the types of the registry by removing their unique IDs /// and instead serialize them in order of their removed unique ID. fn serialize_registry_types<S>( types: &BTreeMap<UntrackedSymbol<core::any::TypeId>, TypeIdDef>, serializer: S, ) -> Result<S::Ok, S::Error> where S: serde::Serializer, { let types = types.values().collect::<Vec<_>>(); types.serialize(serializer) } impl Default for Registry { fn default() -> Self { Self::new() } } impl Registry { /// Creates a new empty registry. pub fn new() -> Self { Self { string_table: Interner::new(), type_table: Interner::new(), types: BTreeMap::new(), } } /// Registeres the given string into the registry and returns /// its respective associated string symbol. pub fn register_string(&mut self, string: &'static str) -> UntrackedSymbol<&'static str> { self.string_table.intern_or_get(string).1.into_untracked() } /// Registeres the given type ID into the registry. /// /// Returns `false` as the first return value if the type ID has already /// been registered into this registry. /// Returns the associated type ID symbol as second return value. /// /// # Note /// /// This is an internal API and should not be called directly from the outside. fn intern_type_id(&mut self, any_type_id: AnyTypeId) -> (bool, UntrackedSymbol<AnyTypeId>) { let (inserted, symbol) = self.type_table.intern_or_get(any_type_id); (inserted, symbol.into_untracked()) } /// Registers the given type into the registry and returns /// its associated type ID symbol. /// /// # Note /// /// Due to safety requirements the returns type ID symbol cannot /// be used later to resolve back to the associated type definition. /// However, since this facility is going to be used for serialization /// purposes this functionality isn't needed anyway. pub fn register_type(&mut self, ty: &MetaType) -> UntrackedSymbol<AnyTypeId> { let (inserted, symbol) = self.intern_type_id(ty.any_id()); if inserted { let compact_id = ty.type_id().into_compact(self); let compact_def = ty.type_def().into_compact(self); self.types.insert( symbol, TypeIdDef { id: compact_id, def: compact_def, }, ); } symbol } }
rust
package org.drools.analytics.components; import java.util.HashSet; import java.util.Set; /** * * @author <NAME> */ public class RulePackage extends AnalyticsComponent { private static int index = 0; private int offset = 0; private String name; private Set<AnalyticsRule> rules = new HashSet<AnalyticsRule>(); public RulePackage() { super(index++); } @Override public AnalyticsComponentType getComponentType() { return AnalyticsComponentType.RULE_PACKAGE; } public int getOffset(){ offset++; return offset % 2; } public String getName() { return name; } public void setName(String name) { this.name = name; } public Set<AnalyticsRule> getRules() { return rules; } public void setRules(Set<AnalyticsRule> rules) { this.rules = rules; } }
java
"Tonight, @FLOTUS and I tested positive for Covid-19. We will begin our quarantine and recovery process immediately. We will get through this TOGETHER! " Trump tweeted. Also in a tweet shortly, the First Lady said: "As too many Americans have done this year, @potus & I are quarantining at home after testing positive for Covid-19. We are feeling good and I have postponed all upcoming engagements. "Please be sure you are staying safe and we will all get through this together. " The news was also confirmed by presidential physician Sean Conley in a memo released by the White House. TO READ THE FULL STORY, SUBSCRIBE NOW NOW AT JUST RS 249 A MONTH. What you get on Business Standard Premium? - Unlock 30+ premium stories daily hand-picked by our editors, across devices on browser and app. - Pick your 5 favourite companies, get a daily email with all news updates on them. - Full access to our intuitive epaper - clip, save, share articles from any device; newspaper archives from 2006. - Preferential invites to Business Standard events. - Curated newsletters on markets, personal finance, policy & politics, start-ups, technology, and more.
english
/* * Copyright 2020 Red Hat, Inc. 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. */ import { DataField, FieldName } from "@kogito-tooling/pmml-editor-marshaller"; import { Actions, AllActions, DataDictionaryFieldReducer } from "../../../editor/reducers"; import { Reducer } from "react"; import { HistoryService } from "../../../editor/history"; import { ValidationRegistry } from "../../../editor/validation"; const historyService = new HistoryService([]); const validationRegistry = new ValidationRegistry(); const dataFields: DataField[] = [{ name: "field1" as FieldName, dataType: "boolean", optype: "categorical" }]; const pmml = { version: "1.0", DataDictionary: { DataField: dataFields }, Header: {} }; const reducer: Reducer<DataField[], AllActions> = DataDictionaryFieldReducer(historyService, validationRegistry); describe("DataDictionaryFieldReducer::Valid actions", () => { test("Actions.UpdateDataDictionaryField", () => { reducer(dataFields, { type: Actions.UpdateDataDictionaryField, payload: { dataDictionaryIndex: 0, dataField: { name: "updated" as FieldName, dataType: "string", optype: "ordinal" }, originalName: "field1" as FieldName } }); const updated = historyService.commit(pmml)?.DataDictionary.DataField as DataField[]; expect(updated).not.toEqual(dataFields); expect(updated.length).toBe(1); expect(updated[0].name).toBe("updated"); expect(updated[0].dataType).toBe("string"); expect(updated[0].optype).toBe("ordinal"); }); test("Actions.SetDataFieldName::Index out of bounds (less than 0)", () => { reducer(dataFields, { type: Actions.UpdateDataDictionaryField, payload: { dataDictionaryIndex: -1, dataField: { name: "updated" as FieldName, dataType: "boolean", optype: "categorical" }, originalName: "field1" as FieldName } }); const updated = historyService.commit(pmml)?.DataDictionary.DataField as DataField[]; expect(updated).toEqual(dataFields); }); test("Actions.SetDataFieldName::Index out of bounds (greater than number of fields)", () => { reducer(dataFields, { type: Actions.UpdateDataDictionaryField, payload: { dataDictionaryIndex: 1, dataField: { name: "updated" as FieldName, dataType: "boolean", optype: "categorical" }, originalName: "field1" as FieldName } }); const updated = historyService.commit(pmml)?.DataDictionary.DataField as DataField[]; expect(updated).toEqual(dataFields); }); }); describe("DataFieldReducer::Invalid actions", () => { test("Actions.SetHeaderDescription", () => { const updated: DataField[] = reducer(dataFields, { type: Actions.SetHeaderDescription, payload: { description: "description" } }); expect(updated).toEqual(dataFields); }); });
typescript
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc (build 1.4.2_06) on Mon Aug 14 14:18:17 CEST 2006 --> <TITLE> Uses of Class com.jswiff.io.InputBitStream (JSwiff API Reference) </TITLE> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../javadoc.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { parent.document.title="Uses of Class com.jswiff.io.InputBitStream (JSwiff API Reference)"; } </SCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <!-- ========= START OF TOP NAVBAR ======= --> <A NAME="navbar_top"><!-- --></A> <A HREF="#skip-navbar_top" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../com/jswiff/io/InputBitStream.html" title="class in com.jswiff.io"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> &nbsp;PREV&nbsp; &nbsp;NEXT</FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="InputBitStream.html" target="_top"><B>NO FRAMES</B></A> &nbsp; &nbsp;<SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_top"></A> <!-- ========= END OF TOP NAVBAR ========= --> <HR> <CENTER> <H2> <B>Uses of Class<br>com.jswiff.io.InputBitStream</B></H2> </CENTER> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=2><FONT SIZE="+2"> Packages that use <A HREF="../../../../com/jswiff/io/InputBitStream.html" title="class in com.jswiff.io">InputBitStream</A></FONT></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><A HREF="#com.jswiff.swfrecords"><B>com.jswiff.swfrecords</B></A></TD> <TD>&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><A HREF="#com.jswiff.swfrecords.actions"><B>com.jswiff.swfrecords.actions</B></A></TD> <TD>&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><A HREF="#com.jswiff.swfrecords.tags"><B>com.jswiff.swfrecords.tags</B></A></TD> <TD>&nbsp;&nbsp;</TD> </TR> </TABLE> &nbsp; <P> <A NAME="com.jswiff.swfrecords"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=2><FONT SIZE="+2"> Uses of <A HREF="../../../../com/jswiff/io/InputBitStream.html" title="class in com.jswiff.io">InputBitStream</A> in <A HREF="../../../../com/jswiff/swfrecords/package-summary.html">com.jswiff.swfrecords</A></FONT></TD> </TR> </TABLE> &nbsp; <P> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"> <TD COLSPAN=2>Methods in <A HREF="../../../../com/jswiff/swfrecords/package-summary.html">com.jswiff.swfrecords</A> with parameters of type <A HREF="../../../../com/jswiff/io/InputBitStream.html" title="class in com.jswiff.io">InputBitStream</A></FONT></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;<A HREF="../../../../com/jswiff/swfrecords/RGBA.html" title="class in com.jswiff.swfrecords">RGBA</A></CODE></FONT></TD> <TD><CODE><B>RGBA.</B><B><A HREF="../../../../com/jswiff/swfrecords/RGBA.html#readARGB(com.jswiff.io.InputBitStream)">readARGB</A></B>(<A HREF="../../../../com/jswiff/io/InputBitStream.html" title="class in com.jswiff.io">InputBitStream</A>&nbsp;stream)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads an instance in ARGB format from a bit stream.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;java.util.List</CODE></FONT></TD> <TD><CODE><B>Filter.</B><B><A HREF="../../../../com/jswiff/swfrecords/Filter.html#readFilters(com.jswiff.io.InputBitStream)">readFilters</A></B>(<A HREF="../../../../com/jswiff/io/InputBitStream.html" title="class in com.jswiff.io">InputBitStream</A>&nbsp;stream)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TODO: Comments</TD> </TR> </TABLE> &nbsp; <P> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"> <TD COLSPAN=2>Constructors in <A HREF="../../../../com/jswiff/swfrecords/package-summary.html">com.jswiff.swfrecords</A> with parameters of type <A HREF="../../../../com/jswiff/io/InputBitStream.html" title="class in com.jswiff.io">InputBitStream</A></FONT></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/jswiff/swfrecords/TextRecord.html#TextRecord(com.jswiff.io.InputBitStream, short, short, boolean)">TextRecord</A></B>(<A HREF="../../../../com/jswiff/io/InputBitStream.html" title="class in com.jswiff.io">InputBitStream</A>&nbsp;stream, short&nbsp;glyphBits, short&nbsp;advanceBits, boolean&nbsp;hasAlpha)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads a new TextRecord instance from a bit stream.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/jswiff/swfrecords/SWFHeader.html#SWFHeader(com.jswiff.io.InputBitStream)">SWFHeader</A></B>(<A HREF="../../../../com/jswiff/io/InputBitStream.html" title="class in com.jswiff.io">InputBitStream</A>&nbsp;stream)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads an SWF header from a bit stream.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/jswiff/swfrecords/StraightEdgeRecord.html#StraightEdgeRecord(com.jswiff.io.InputBitStream)">StraightEdgeRecord</A></B>(<A HREF="../../../../com/jswiff/io/InputBitStream.html" title="class in com.jswiff.io">InputBitStream</A>&nbsp;stream)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new StraightEdgeRecord instance, reading data from a bit stream.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/jswiff/swfrecords/SoundInfo.html#SoundInfo(com.jswiff.io.InputBitStream)">SoundInfo</A></B>(<A HREF="../../../../com/jswiff/io/InputBitStream.html" title="class in com.jswiff.io">InputBitStream</A>&nbsp;stream)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new SoundInfo instance, reading data from a bit stream.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/jswiff/swfrecords/SoundEnvelope.html#SoundEnvelope(com.jswiff.io.InputBitStream)">SoundEnvelope</A></B>(<A HREF="../../../../com/jswiff/io/InputBitStream.html" title="class in com.jswiff.io">InputBitStream</A>&nbsp;stream)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new SoundEnvelope instance, reading data from a bit stream.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/jswiff/swfrecords/ShapeWithStyle.html#ShapeWithStyle(com.jswiff.io.InputBitStream, boolean)">ShapeWithStyle</A></B>(<A HREF="../../../../com/jswiff/io/InputBitStream.html" title="class in com.jswiff.io">InputBitStream</A>&nbsp;stream, boolean&nbsp;hasAlpha)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new ShapeWithStyle instance, reading data from a bit stream.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/jswiff/swfrecords/ShapeWithStyle.html#ShapeWithStyle(com.jswiff.io.InputBitStream)">ShapeWithStyle</A></B>(<A HREF="../../../../com/jswiff/io/InputBitStream.html" title="class in com.jswiff.io">InputBitStream</A>&nbsp;stream)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/jswiff/swfrecords/Shape.html#Shape(com.jswiff.io.InputBitStream)">Shape</A></B>(<A HREF="../../../../com/jswiff/io/InputBitStream.html" title="class in com.jswiff.io">InputBitStream</A>&nbsp;stream)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/jswiff/swfrecords/RGBA.html#RGBA(com.jswiff.io.InputBitStream)">RGBA</A></B>(<A HREF="../../../../com/jswiff/io/InputBitStream.html" title="class in com.jswiff.io">InputBitStream</A>&nbsp;stream)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads an instance from a bit stream.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/jswiff/swfrecords/RGB.html#RGB(com.jswiff.io.InputBitStream)">RGB</A></B>(<A HREF="../../../../com/jswiff/io/InputBitStream.html" title="class in com.jswiff.io">InputBitStream</A>&nbsp;stream)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads an instance from a bit stream.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/jswiff/swfrecords/RegisterParam.html#RegisterParam(com.jswiff.io.InputBitStream)">RegisterParam</A></B>(<A HREF="../../../../com/jswiff/io/InputBitStream.html" title="class in com.jswiff.io">InputBitStream</A>&nbsp;stream)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads an instance from a bit stream.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/jswiff/swfrecords/Rect.html#Rect(com.jswiff.io.InputBitStream)">Rect</A></B>(<A HREF="../../../../com/jswiff/io/InputBitStream.html" title="class in com.jswiff.io">InputBitStream</A>&nbsp;stream)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/jswiff/swfrecords/MorphLineStyles.html#MorphLineStyles(com.jswiff.io.InputBitStream, boolean)">MorphLineStyles</A></B>(<A HREF="../../../../com/jswiff/io/InputBitStream.html" title="class in com.jswiff.io">InputBitStream</A>&nbsp;stream, boolean&nbsp;useNewMorphLineStyle)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads a new instance from a bit stream.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/jswiff/swfrecords/MorphFillStyles.html#MorphFillStyles(com.jswiff.io.InputBitStream)">MorphFillStyles</A></B>(<A HREF="../../../../com/jswiff/io/InputBitStream.html" title="class in com.jswiff.io">InputBitStream</A>&nbsp;stream)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads a new instance from a bit stream.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/jswiff/swfrecords/Matrix.html#Matrix(com.jswiff.io.InputBitStream)">Matrix</A></B>(<A HREF="../../../../com/jswiff/io/InputBitStream.html" title="class in com.jswiff.io">InputBitStream</A>&nbsp;stream)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads a Matrix instance from a bit stream.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/jswiff/swfrecords/KerningRecord.html#KerningRecord(com.jswiff.io.InputBitStream, boolean)">KerningRecord</A></B>(<A HREF="../../../../com/jswiff/io/InputBitStream.html" title="class in com.jswiff.io">InputBitStream</A>&nbsp;stream, boolean&nbsp;wideCodes)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new KerningRecord instance, reading data from a bit stream.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/jswiff/swfrecords/GradientGlowFilter.html#GradientGlowFilter(com.jswiff.io.InputBitStream)">GradientGlowFilter</A></B>(<A HREF="../../../../com/jswiff/io/InputBitStream.html" title="class in com.jswiff.io">InputBitStream</A>&nbsp;stream)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new GradientGlowFilter instance.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/jswiff/swfrecords/GradientBevelFilter.html#GradientBevelFilter(com.jswiff.io.InputBitStream)">GradientBevelFilter</A></B>(<A HREF="../../../../com/jswiff/io/InputBitStream.html" title="class in com.jswiff.io">InputBitStream</A>&nbsp;stream)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new GradientBevelFilter instance.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/jswiff/swfrecords/GlyphEntry.html#GlyphEntry(com.jswiff.io.InputBitStream, short, short)">GlyphEntry</A></B>(<A HREF="../../../../com/jswiff/io/InputBitStream.html" title="class in com.jswiff.io">InputBitStream</A>&nbsp;stream, short&nbsp;glyphBits, short&nbsp;advanceBits)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new GlyphEntry instance, reading data from a bit stream.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/jswiff/swfrecords/GlowFilter.html#GlowFilter(com.jswiff.io.InputBitStream)">GlowFilter</A></B>(<A HREF="../../../../com/jswiff/io/InputBitStream.html" title="class in com.jswiff.io">InputBitStream</A>&nbsp;stream)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new GlowFilter instance.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/jswiff/swfrecords/DropShadowFilter.html#DropShadowFilter(com.jswiff.io.InputBitStream)">DropShadowFilter</A></B>(<A HREF="../../../../com/jswiff/io/InputBitStream.html" title="class in com.jswiff.io">InputBitStream</A>&nbsp;stream)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new DropShadowFilter instance.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/jswiff/swfrecords/CXformWithAlpha.html#CXformWithAlpha(com.jswiff.io.InputBitStream)">CXformWithAlpha</A></B>(<A HREF="../../../../com/jswiff/io/InputBitStream.html" title="class in com.jswiff.io">InputBitStream</A>&nbsp;stream)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads a CXform instance from a bit stream.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/jswiff/swfrecords/CXform.html#CXform(com.jswiff.io.InputBitStream)">CXform</A></B>(<A HREF="../../../../com/jswiff/io/InputBitStream.html" title="class in com.jswiff.io">InputBitStream</A>&nbsp;stream)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads a CXform instance from a bit stream.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/jswiff/swfrecords/CurvedEdgeRecord.html#CurvedEdgeRecord(com.jswiff.io.InputBitStream)">CurvedEdgeRecord</A></B>(<A HREF="../../../../com/jswiff/io/InputBitStream.html" title="class in com.jswiff.io">InputBitStream</A>&nbsp;stream)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new CurvedEdgeRecord instance, reading data from a bit stream.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/jswiff/swfrecords/ConvolutionFilter.html#ConvolutionFilter(com.jswiff.io.InputBitStream)">ConvolutionFilter</A></B>(<A HREF="../../../../com/jswiff/io/InputBitStream.html" title="class in com.jswiff.io">InputBitStream</A>&nbsp;stream)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/jswiff/swfrecords/ColorMatrixFilter.html#ColorMatrixFilter(com.jswiff.io.InputBitStream)">ColorMatrixFilter</A></B>(<A HREF="../../../../com/jswiff/io/InputBitStream.html" title="class in com.jswiff.io">InputBitStream</A>&nbsp;stream)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new ColorMatrixFilter instance.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/jswiff/swfrecords/ColorMapData.html#ColorMapData(com.jswiff.io.InputBitStream, short, int, int)">ColorMapData</A></B>(<A HREF="../../../../com/jswiff/io/InputBitStream.html" title="class in com.jswiff.io">InputBitStream</A>&nbsp;stream, short&nbsp;colorTableSize, int&nbsp;width, int&nbsp;height)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new ColorMapData instance, reading data from a bit stream.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/jswiff/swfrecords/ClipEventFlags.html#ClipEventFlags(com.jswiff.io.InputBitStream, short)">ClipEventFlags</A></B>(<A HREF="../../../../com/jswiff/io/InputBitStream.html" title="class in com.jswiff.io">InputBitStream</A>&nbsp;stream, short&nbsp;swfVersion)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new ClipEventFlags instance, reading data from a bit stream.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/jswiff/swfrecords/ClipActions.html#ClipActions(com.jswiff.io.InputBitStream, short)">ClipActions</A></B>(<A HREF="../../../../com/jswiff/io/InputBitStream.html" title="class in com.jswiff.io">InputBitStream</A>&nbsp;stream, short&nbsp;swfVersion)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new ClipActions instance, reading data from a bit stream.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/jswiff/swfrecords/ClipActionRecord.html#ClipActionRecord(com.jswiff.io.InputBitStream, short)">ClipActionRecord</A></B>(<A HREF="../../../../com/jswiff/io/InputBitStream.html" title="class in com.jswiff.io">InputBitStream</A>&nbsp;stream, short&nbsp;swfVersion)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new ClipActionRecord instance, reading data from a bit stream.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/jswiff/swfrecords/ButtonRecord.html#ButtonRecord(com.jswiff.io.InputBitStream, boolean)">ButtonRecord</A></B>(<A HREF="../../../../com/jswiff/io/InputBitStream.html" title="class in com.jswiff.io">InputBitStream</A>&nbsp;stream, boolean&nbsp;hasColorTransform)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads a ButtonRecord from a bit stream.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/jswiff/swfrecords/ButtonCondAction.html#ButtonCondAction(com.jswiff.io.InputBitStream)">ButtonCondAction</A></B>(<A HREF="../../../../com/jswiff/io/InputBitStream.html" title="class in com.jswiff.io">InputBitStream</A>&nbsp;stream)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads a ButtonCondAction instance from a bit stream.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/jswiff/swfrecords/BlurFilter.html#BlurFilter(com.jswiff.io.InputBitStream)">BlurFilter</A></B>(<A HREF="../../../../com/jswiff/io/InputBitStream.html" title="class in com.jswiff.io">InputBitStream</A>&nbsp;stream)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/jswiff/swfrecords/BitmapData.html#BitmapData(com.jswiff.io.InputBitStream, short, int, int)">BitmapData</A></B>(<A HREF="../../../../com/jswiff/io/InputBitStream.html" title="class in com.jswiff.io">InputBitStream</A>&nbsp;stream, short&nbsp;bitmapFormat, int&nbsp;width, int&nbsp;height)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new BitmapData instance, reading data from a bit stream.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/jswiff/swfrecords/BevelFilter.html#BevelFilter(com.jswiff.io.InputBitStream)">BevelFilter</A></B>(<A HREF="../../../../com/jswiff/io/InputBitStream.html" title="class in com.jswiff.io">InputBitStream</A>&nbsp;stream)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new BevelFilter instance.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/jswiff/swfrecords/AlphaColorMapData.html#AlphaColorMapData(com.jswiff.io.InputBitStream, short, int, int)">AlphaColorMapData</A></B>(<A HREF="../../../../com/jswiff/io/InputBitStream.html" title="class in com.jswiff.io">InputBitStream</A>&nbsp;stream, short&nbsp;colorTableSize, int&nbsp;width, int&nbsp;height)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new ColorMapData instance, reading data from a bit stream.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/jswiff/swfrecords/AlphaBitmapData.html#AlphaBitmapData(com.jswiff.io.InputBitStream, int, int)">AlphaBitmapData</A></B>(<A HREF="../../../../com/jswiff/io/InputBitStream.html" title="class in com.jswiff.io">InputBitStream</A>&nbsp;stream, int&nbsp;width, int&nbsp;height)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new AlphaBitmapData instance, reading data from a bit stream.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/jswiff/swfrecords/AlignmentZone.html#AlignmentZone(com.jswiff.io.InputBitStream)">AlignmentZone</A></B>(<A HREF="../../../../com/jswiff/io/InputBitStream.html" title="class in com.jswiff.io">InputBitStream</A>&nbsp;stream)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new AlignmentZone instance.</TD> </TR> </TABLE> &nbsp; <P> <A NAME="com.jswiff.swfrecords.actions"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=2><FONT SIZE="+2"> Uses of <A HREF="../../../../com/jswiff/io/InputBitStream.html" title="class in com.jswiff.io">InputBitStream</A> in <A HREF="../../../../com/jswiff/swfrecords/actions/package-summary.html">com.jswiff.swfrecords.actions</A></FONT></TD> </TR> </TABLE> &nbsp; <P> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"> <TD COLSPAN=2>Constructors in <A HREF="../../../../com/jswiff/swfrecords/actions/package-summary.html">com.jswiff.swfrecords.actions</A> with parameters of type <A HREF="../../../../com/jswiff/io/InputBitStream.html" title="class in com.jswiff.io">InputBitStream</A></FONT></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/jswiff/swfrecords/actions/ActionBlock.html#ActionBlock(com.jswiff.io.InputBitStream)">ActionBlock</A></B>(<A HREF="../../../../com/jswiff/io/InputBitStream.html" title="class in com.jswiff.io">InputBitStream</A>&nbsp;stream)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads an action block from a bit stream.</TD> </TR> </TABLE> &nbsp; <P> <A NAME="com.jswiff.swfrecords.tags"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=2><FONT SIZE="+2"> Uses of <A HREF="../../../../com/jswiff/io/InputBitStream.html" title="class in com.jswiff.io">InputBitStream</A> in <A HREF="../../../../com/jswiff/swfrecords/tags/package-summary.html">com.jswiff.swfrecords.tags</A></FONT></TD> </TR> </TABLE> &nbsp; <P> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"> <TD COLSPAN=2>Methods in <A HREF="../../../../com/jswiff/swfrecords/tags/package-summary.html">com.jswiff.swfrecords.tags</A> with parameters of type <A HREF="../../../../com/jswiff/io/InputBitStream.html" title="class in com.jswiff.io">InputBitStream</A></FONT></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;byte[]</CODE></FONT></TD> <TD><CODE><B>TagReader.</B><B><A HREF="../../../../com/jswiff/swfrecords/tags/TagReader.html#readTagData(com.jswiff.io.InputBitStream, com.jswiff.swfrecords.tags.TagHeader)">readTagData</A></B>(<A HREF="../../../../com/jswiff/io/InputBitStream.html" title="class in com.jswiff.io">InputBitStream</A>&nbsp;stream, <A HREF="../../../../com/jswiff/swfrecords/tags/TagHeader.html" title="class in com.jswiff.swfrecords.tags">TagHeader</A>&nbsp;header)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads a tag from a bit stream as raw data. </TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;<A HREF="../../../../com/jswiff/swfrecords/tags/TagHeader.html" title="class in com.jswiff.swfrecords.tags">TagHeader</A></CODE></FONT></TD> <TD><CODE><B>TagReader.</B><B><A HREF="../../../../com/jswiff/swfrecords/tags/TagReader.html#readTagHeader(com.jswiff.io.InputBitStream)">readTagHeader</A></B>(<A HREF="../../../../com/jswiff/io/InputBitStream.html" title="class in com.jswiff.io">InputBitStream</A>&nbsp;stream)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads a tag header from a bit stream.</TD> </TR> </TABLE> &nbsp; <P> <HR> <!-- ======= START OF BOTTOM NAVBAR ====== --> <A NAME="navbar_bottom"><!-- --></A> <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../com/jswiff/io/InputBitStream.html" title="class in com.jswiff.io"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> &nbsp;PREV&nbsp; &nbsp;NEXT</FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="InputBitStream.html" target="_top"><B>NO FRAMES</B></A> &nbsp; &nbsp;<SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_bottom"></A> <!-- ======== END OF BOTTOM NAVBAR ======= --> <HR> <div id='bottom'>&copy; 2005 <NAME>. All rights reserved.<br><a href='http://www.jswiff.com'>www.jswiff.com</a></div> </BODY> </HTML>
html
import { AuthService } from '@worldbrain/memex-common/lib/authentication/types' import { TEST_USER } from '@worldbrain/memex-common/lib/authentication/dev' import { MemoryAuthService } from '@worldbrain/memex-common/lib/authentication/memory' import { WorldbrainAuthService } from '@worldbrain/memex-common/lib/authentication/worldbrain' import { SubscriptionsService } from '@worldbrain/memex-common/lib/subscriptions/types' import { MemorySubscriptionsService } from '@worldbrain/memex-common/lib/subscriptions/memory' import { WorldbrainSubscriptionsService } from '@worldbrain/memex-common/lib/subscriptions/worldbrain' import { getFirebase } from 'src/util/firebase-app-initialized' export type DevAuthState = | '' | 'staging' | 'user_signed_out' | 'user_signed_in' | 'user_subscribed' | 'user_subscription_expired' | 'user_subscription_expires_60s' export function createAuthDependencies(options?: { devAuthState?: DevAuthState redirectUrl: string }): { authService: AuthService subscriptionService: SubscriptionsService } { const devAuthState = (options && options.devAuthState) || '' if (devAuthState === '' || devAuthState === 'staging') { return { authService: new WorldbrainAuthService(getFirebase()), subscriptionService: new WorldbrainSubscriptionsService( getFirebase(), options.redirectUrl, ), } } if (devAuthState === 'user_signed_out') { return { authService: new MemoryAuthService(), subscriptionService: new MemorySubscriptionsService(), } } if (devAuthState === 'user_signed_in') { const authService = new MemoryAuthService() authService.setUser(TEST_USER) return { authService, subscriptionService: new MemorySubscriptionsService(), } } if (devAuthState === 'user_subscribed') { // todo: (ch): allow testing of different plans const authService = new MemoryAuthService() authService.setUser(TEST_USER) return { authService, subscriptionService: new MemorySubscriptionsService({ expiry: Date.now() / 1000 + 1000 * 60 * 60 * 24, }), } } if (devAuthState === 'user_subscription_expired') { // todo: (ch): allow testing of different plans const authService = new MemoryAuthService() authService.setUser(TEST_USER) return { authService, subscriptionService: new MemorySubscriptionsService({ expiry: Date.now() / 1000 - 1000 * 60 * 60, }), } } if (devAuthState === 'user_subscription_expires_60s') { const expiry = Date.now() / 1000 + 1000 * 60 console['log']( `Using dev auth state: ${devAuthState}, expiring at ${new Date( expiry, ).toLocaleString()}`, ) const authService = new MemoryAuthService() authService.setUser(TEST_USER) return { authService, subscriptionService: new MemorySubscriptionsService({ expiry, }), } } throw new Error( `Tried to set up auth dependencies with unknown DEV_AUTH_STATE: ${devAuthState}`, ) }
typescript
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>SmartFoxServer Documentation</title> <link href="../../../api.css" rel="stylesheet" type="text/css" /> </head> <body class="plain"> <p class="itemName">getBuddyRoom()</p> <p class="title">Availability:</p> <p class="plain">Flash Player 6.0 <br /> SmartFoxServer Basic / Pro </p> <p class="title">Usage:</p> <p class="plain">smartFox.getBuddyRoom(buddy)</p> <p class="title">Description:</p> <p class="plain">Ask the server in which room(s) is currently located the buddy passed in the parameter. </p> <p class="title">Parameters:</p> <table border="0" cellspacing="0" cellpadding="0"> <tr> <td><strong>buddy</strong></td> <td>&nbsp;</td> <td>the buddy object </td> </tr> </table> <br /> NOTE: A buddy is obtained by extracting them from the smartFox.buddyList array<br /> <br /> Fires the <strong>onBuddyRoom</strong> event <br /> <p class="title">Returns:</p> <p class="plain">Nothing.</p> <p class="title">Example:</p> <pre class="code"> smartFox.getBuddyRoom(buddy) </pre> <p class="plain"><span class="title">See also:</span></p> <p class="plain">&nbsp;</p> <p class="plain">&nbsp;</p> </body> </html>
html