text stringlengths 1 1.04M | language stringclasses 25 values |
|---|---|
<div class="transferTransaction-page">
<div class="container-fluid main">
<div class="row">
<div class="col-lg-6 col-md-12">
<div class="panel-body">
<fieldset class="form-group">
<div class="input-group">
<span class="input-group-btn">
<label>{{'SIGNUP_NETWORK_SELECT' | translate}}: </label>
</span>
<select class="form-control" ng-model="$ctrl.network" ng-change="$ctrl.changeNodes()" ng-options="network.id as (network.id | toNetworkName) for network in $ctrl.networks">
<option value="" disabled selected>{{'SIGNUP_NETWORK_SELECT' | translate}}</option>
</select>
</div>
</fieldset>
<fieldset class="form-group">
<div class="input-group">
<span class="input-group-btn">
<label>{{ 'HEADER_NODE_SELECT' | translate }}: </label>
</span>
<select class="form-control" ng-model="$ctrl.selectedNode" ng-options="node.uri as (node.uri | toHostname) for node in $ctrl.nodes"><option value="" disabled selected>{{ 'HEADER_NODE_SELECT' | translate }}</option></select>
</div>
</fieldset>
<fieldset class="form-group">
<div class="input-group">
<span class="input-group-btn">
<label>{{ 'OFFLINE_TX_SIGNED' | translate }}: </label>
</span>
<textarea class="form-control" rows="8" cols="25" ng-model="$ctrl.transaction" style="white-space: normal;" ng-show="!$ctrl.showReader"></textarea>
</div>
</fieldset>
<button class="btn btn-success" type="submit" ng-disabled="$ctrl.okPressed || !$ctrl.transaction" ng-click="$ctrl.send()">
<i class="fa fa-send"></i> {{ 'GENERAL_SEND' | translate }}
</button>
</div>
</div>
<div class="col-lg-6 col-md-12">
<div class="panel-heading">
<h3>{{ 'GENERAL_INFORMATION' | translate }}</h3>
</div>
<div class="panel-body">
<p>{{ 'RELEASE_OFFLINE_TX_INFO_1' | translate }}</p>
<p>{{ 'RELEASE_OFFLINE_TX_INFO_2' | translate }}</p>
<p>{{ 'RELEASE_OFFLINE_TX_INFO_3' | translate }}</p>
<p>{{ 'RELEASE_OFFLINE_TX_INFO_4' | translate }}</p>
</div>
</div>
</div>
</div>
</div> | html |
Hyderabad: In another blow to the Telugu Desam Party and its leader N Chandrababu Naidu, Chirala MLA Amanchi Krishna Mohan resigned from his TDP membership today and had also submitted a letter to that effect and officially joined the YSR Congress Party (YSRCP).
Speaking to the media after meeting YSRCP Chief YS Jagan Mohan Reddy at his residence in Hyderabad, Krishna Mohan said that YS Jagan was man of conviction and has stood by his words and was the only alternative for the state of Andhra.
He said that YS Jagan had the same kind of conviction like his father late Dr YS Rajasekhara Reddy and was the true successor, which is why he was joining the party.
He also said that he would be contesting from Chirala under the YSRCP ticket in the upcoming AP assembly elections and that there were several reasons as to why he was resigning from the Party membership. He also assured that he would continue to work in the same manner for his constituency and his people as he had earlier, and that people of Chirala were aware of it. .
Criticising the TDP chief N Chandrababu Naidu , he said that Babu was behaving like a dictator and that one has to be in sync with the party high command's whimsical ways. He also alleged that the Pasupu Kumkuma scheme was a big farce and said that the money was not used for the purpose it was intended to and that it was just wasted without actually reaching the poor women.
He also alleged that in the Tuni episode , false cases were put on his brother and the whole issue was unnecessarily politicised. He also said that he had sent petitions about issues in his constituency to Chandrababu , but nobody paid heed. “There are many outsiders who are influencing Chandrababu and he is not in any position to listen to anybody as of now,” he concluded. | english |
<div>
<div class="general" *ngIf="showGeneral==true" >
<div class="rec-1">
<div class="imagen">
<img src="assets/img/diagnostico.png">
</div>
<div class="titulo-diagnostico">
<h1 class="titulo-pediatrico">
Diagnóstico del Cáncer Pediátrico
</h1>
</div>
</div>
<div class="rec-2">
<div class="titulo-cancer">
<h2>
CÁNCER : LEUCEMIA
</h2>
</div>
<br>
<div class="resultados">
<h2 class="tipo-leucemia">
Leucemia Linfocítica Crónica o CLL
</h2>
</div>
<div class="sint-sig">
<div class="blanco">
</div>
<!--//! -->
<div class="symtomps">
<input type="checkbox" id="title4" />
<label for="title4">General</label>
<div class="content">
<br><br> <br>
<h4 class="sintomas-signos" *ngIf="cll.general.PreviousDiseases==true">Enfermedades previas</h4>
</div>
</div>
<!--//! -->
<br>
<br>
<div class="symtomps">
<input type="checkbox" id="title1" />
<label for="title1">Sintomas</label>
<div class="content">
<br>
<h4 class="sintomas-signos" *ngIf=" cll.symptom.NightSweats==true"> Sudores nocturnos </h4>
<h4 class="sintomas-signos" *ngIf=" cll.symptom.FeelingFull==true">Sensación de saciedad </h4>
<h4 class="sintomas-signos" *ngIf=" cll.symptom.InfectionOfTheSkinLungsKidneysOrOtherOrgans==true">Infección de la piel, pulmones, riñones u otros órganos </h4>
<h4 class="sintomas-signos" *ngIf=" cll.symptom.ShortOfBreath==true">Falta de aliento </h4>
<h4 class="sintomas-signos" *ngIf=" cll.symptom.Exhausted==true">Cansancio extremo </h4>
</div>
</div>
<br>
<br>
<!--//! -->
<div class="symtomps">
<input type="checkbox" id="title2" />
<label for="title2">Signos</label>
<div class="content">
<br>
<h4 class="sintomas-signos" *ngIf=" cll.sign.Fatigue==true">Fatiga</h4>
<h4 class="sintomas-signos" *ngIf=" cll.sign.ShortnessOfBreathDuringActivities==true">Falta de aliento durante las actividades</h4>
<h4 class="sintomas-signos" *ngIf=" cll.sign.EnlargedLymphNodes==true">Agrandamiento de los ganglios linfáticos </h4>
<h4 class="sintomas-signos" *ngIf=" cll.sign.LowGradeFever==true">Fiebre de bajo grado </h4>
<h4 class="sintomas-signos" *ngIf=" cll.sign.Weightloss==true">Pérdida de peso </h4>
</div>
</div>
<br>
<br>
<!--//! -->
<div class="symtomps">
<input type="checkbox" id="title3" />
<label for="title3">Resultados de laboratorio</label>
<div class="content">
<br>
<h4 class="sintomas-signos" *ngIf=" cll.labResult.InsufficientNumberOfPlatelets==true">Cantidad insuficiente de plaquetas < 10,000/Ul</h4>
<h4 class="sintomas-signos" *ngIf=" cll.labResult.CD38==true">CD38</h4>
<h4 class="sintomas-signos" *ngIf=" cll.labResult.Beta2Microglobulin==true">Microglobulina beta-2</h4>
<h4 class="sintomas-signos" *ngIf=" cll.labResult.AbnormalIncreaseLymphocytesBlood==true">Aumento anormal de cantidad de linfocitos en la sangre</h4>
<h4 class="sintomas-signos" *ngIf=" cll.labResult.Anemia==true">Anemia</h4>
</div>
</div>
</div>
</div>
<div class="rec-3">
<div class="estadio">
<h2 class="estadio-nombre">Estado: </h2>
<h2 class="estadio-positivo">Positivo</h2>
</div>
<div class="blanco">
</div>
<div class="pre">
<h5 class="pre-descripcion">Se tiene una precisión del 92.86% que el paciente padece de la enfermedad de la leucemia linfocítica crónica (CLL).</h5>
</div>
<div class="descrip">
<div class="blanco"></div>
<div class="t-descripcion">
<h2>Descripción</h2>
</div>
<div class="p-descripcion">
<p style="font-size: 16px">
La leucemia linfocítica crónica (CLL, por sus siglas en inglés) es un tipo de cáncer de la sangre. Este tipo de leucemia se inicia con una mutación en el linfocito (células leucémicas) donde de forma descontrolada, se acumulan en la sangre, médula ósea, bazo y ganglios linfáticos.
<br> <br> <br>
El sistema linfático forma parte del sistema inmunitario, que ayuda a proteger al organismo de las infecciones y enfermedades.
</p>
</div>
</div>
<div class="blanco"></div>
<div class="tratamiento">
<div>
<button type="submit" class="button-tratamiento" (click)="onSendCardsTratamientoAll()" > TRATAMIENTO </button>
</div>
</div>
</div>
</div>
<app-detalletratamientocll *ngIf="showGeneral==false"></app-detalletratamientocll>
</div>
| html |
<reponame>Angelesp0/sturdy-computing-machine
import { Injectable } from '@angular/core';
import {HttpHeaders, HttpClient, HttpErrorResponse, HttpParams } from '@angular/common/http';
import { Observable, throwError, BehaviorSubject } from 'rxjs';
import { User } from '../../models/user';
import { retry, catchError } from 'rxjs/operators';
import { stringify } from 'querystring';
import { map } from 'rxjs/operators';
const headers = new HttpHeaders();
@Injectable({
providedIn: 'root'
})
export class UserService {
// tslint:disable-next-line: variable-name
base_path = 'http://192.168.127.12:3000/users';
private currentUserSubject: BehaviorSubject<User>;
public currentUser: Observable<User>;
constructor(private http: HttpClient) {
this.currentUserSubject = new BehaviorSubject<User>(JSON.parse(localStorage.getItem('currentUser')));
this.currentUser = this.currentUserSubject.asObservable();
}
public get currentUserValue(): any {
return this.currentUserSubject.value;
}
httpOptions = {
headers: new HttpHeaders({
'Access-Control-Allow-Origin':'*',
'Access-Control-Allow-Methods':'GET',
'Access-Control-Allow-Headers':'application/json',
'Content-Type': 'application/json; charset=utf-8',
})
};
handleError(error: HttpErrorResponse) {
if (error.error instanceof ErrorEvent) {
// A client-side or network error occurred. Handle it accordingly.
console.error('An error occurred:', error.error.message);
} else {
// The backend returned an unsuccessful response code.
// The response body may contain clues as to what went wrong,
console.error(
`Backend returned code ${error.status}, ` +
`body was: ${error.error}`);
}
// return an observable with a user-facing error message
return throwError(
'Something bad happened; please try again later.');
}
getUsers() {
return this.http.get('http://192.168.127.12:3000/users', this.httpOptions);
}
getExecutive() {
return this.http.get('http://192.168.127.12:3000/executive', this.httpOptions);
}
getUser(id) {
return this.http.get('http://192.168.127.12:3000/users/' + id, this.httpOptions);
}
updateItem(id, item) {
const params = new HttpParams()
.set('first_name', item.first_name)
.set('last_name', item.last_name )
.set('direction', item.direction)
.set('colony', item.colony)
.set('cp', item.cp)
.set('role', item.role)
.set('email', item.email)
.set('password', <PASSWORD>);
return this.http
.put<User>(this.base_path + '/' + id, item, {params} )
.pipe(
retry(2),
catchError(this.handleError)
);
}
deleteItem(id) {
return this.http
.delete<User>(this.base_path + '/' + id, this.httpOptions)
.pipe(
retry(2),
catchError(this.handleError)
);
}
createItem(item): Observable<User> {
const params = new HttpParams()
.set('first_name', item.first_name)
.set('last_name', item.last_name )
.set('direction', item.direction)
.set('colony', item.colony)
.set('cp', item.cp)
.set('role', item.role)
.set('email', item.email)
.set('password', <PASSWORD>)
.set('username', item.username);
return this.http
.post<User>(this.base_path, item, {params})
.pipe(
retry(2),
catchError(this.handleError)
);
}
login(username: string, password: string) {
return this.http.post<any>('http://192.168.127.12:3000/auth', { username, password })
.pipe(
map(
user => {
// login successful if there's a user in the response
if (user) {
// store user details and basic auth credentials in local storage
// to keep user logged in between page refreshes
user.authdata = window.btoa(username + ':' + password);
localStorage.setItem('currentUser', JSON.stringify(user));
this.currentUserSubject.next(user);
}
return user;
}),
catchError(this.handleError)
);
}
logout() {
// remove user from local storage to log user out
localStorage.removeItem('currentUser');
this.currentUserSubject.next(null);
}
uploadImage( image , componentId?) {
// this.http is the injected HttpClient
const uploadData = new FormData();
uploadData.append('file', image, image.name);
return this.http.post('http://74.208.71.98:3000/subir', uploadData) ;
}
getImg(id) {
return this.http.get('http://192.168.127.12:3000/imagenes/' + id, this.httpOptions);
}
getdocuments(id) {
return this.http.get('http://74.208.71.98:3000/user/files/' + id, this.httpOptions);
}
getDocumentsByIdCompany(id) {
return this.http.get('http://192.168.127.12:3000/company/files/' + id, this.httpOptions);
}
getServices() {
return this.http.get('http://192.168.127.12:3000/services', this.httpOptions);
}
getServicesByUserId(id) {
return this.http.get('http://192.168.127.12:3000/user/' + id + '/services/', this.httpOptions);
}
getCompaniesByUserId(id) {
return this.http.get('http://74.208.71.98:3000/users/' + id + '/companies/', this.httpOptions);
}
getPaymentsByCompanyId(id) {
return this.http.get('http://74.208.71.98:3000/companies/' + id + '/payments/', this.httpOptions);
}
getVerification() {
return this.http.get('http://192.168.127.12:3000/verification', this.httpOptions);
}
putVerification(id) {
console.log(id);
return this.http.put('http://74.208.71.98:3000/verification/' + id, this.httpOptions);
}
}
| typescript |
After a tough environment for 15 months, the automobile industry now faces the final set of hurdles in the transition to BS-VI emission rules, say analysts. ‘Business as usual’ is likely, they expect, from the second quarter (July-September) of the coming financial year.
A nationwide and compulsory switch to BS-VI is due from April 1, 2020.
Amid increase in input and other costs, companies had decided to increase the price of their vehicles from January 2020. This is expected to push sales of passenger vehicles by 2 to 4 per cent in December; reportedly, bookings are in that range. Discounts and like other schemes, as high as Rs 1-1. 5 lakh for volume segments, are aiding this.
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 |
<reponame>HiBrowser/Hi-Browser
{"text":"Any insurer or health maintenance organization aggrieved by an assessment may appeal under procedures established in § 101 of Title 26 of the District of Columbia Municipal Regulations (26 DCMR 101), or as otherwise may be provided by the Mayor. If an appellant fails to pay the assessment when due, the appellant shall be liable for any amounts correctly assessed and any penalties and interest due thereon. The appellant shall pay any amounts owed within 10 days of a final decision and the Mayor may take whatever action is appropriate under this chapter, including action under § 31-1204, or any other laws regulating the insurance industry to effect collection. In addition, the Insurance Regulatory Trust Fund Bureau may appeal to the Mayor the entire annual assessment or a specific expenditure or category of expenditure, in accordance with the procedures established in 26 DCMR 101, if it believes the assessment is not in accordance with this chapter or applicable laws.","historical":"Prior Codifications\n\n1981 Ed., § 35-2705.\n\nLegislative History of Laws\n\nFor legislative history of D.C. Law 10-40, see Historical and Statutory Notes following § 31-1201.\n\nFor legislative history of D.C. Law 11-235, see Historical and Statutory Notes following § 31-1201.\n\nDC CODE § 31-1205\n\nCurrent through December 11, 2012","credits":"(Oct. 21, 1993, D.C. Law 10-40, § 6, 40 DCR 6009; Apr. 9, 1997, D.C. Law 11-235, § 24(i), 44 DCR 818.)","sections":[],"division":{"identifier":"V","text":"Local Business Affairs"},"title":{"identifier":"31","text":"Insurance and Securities. (Refs & Annos)"},"subtitle":{"prefix":"II","text":" Regulation of Insurance Industry Generally."},"chapter":{"identifier":"12","text":"Insurance Regulatory Trust Fund."},"heading":{"title":"31","chaptersection":"1205","identifier":"31-1205","catch_text":"Appeal from assessment."}} | json |
<gh_stars>1-10
/**
*
*/
package org.sagacity.sqltoy.dialect;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
/**
* @project sagacity-sqltoy4.0
* @description
* <p>
* 请在此说明类的功能
* </p>
* @author chenrenfei <a href="mailto:<EMAIL>">联系作者</a>
* @version id:DBUtils.java,Revision:v1.0,Date:2017年12月9日
*/
public class DBUtils {
/**
* 定义日志
*/
private final static Logger logger = LogManager.getLogger(DBUtils.class);
/**
* url like:jdbc:sqlserver://localhost:1433;databasename=PMCenter_CCB
*/
public final static String DRIVER_SQLSERVER = "com.microsoft.sqlserver.jdbc.SQLServerDriver";
/**
* url like:jdbc:mysql://localhost:3306/sagacity?useUnicode=true&
* characterEncoding=utf-8
*/
public final static String DRIVER_MYSQL = "com.mysql.jdbc.Driver";
/**
* url like:jdbc:oracle:thin:@localhost:1521:sagacity
*/
public final static String DRIVER_ORACLE = "oracle.jdbc.driver.OracleDriver";
/**
* url like:jdbc:db2://localhost:60004/apms
*/
public final static String DRIVER_DB2 = "com.ibm.db2.jcc.DB2Driver";
// url like: jdbc:sybase:Tds:localhost:2638?ServiceName=iqdemo
public final static String DRIVER_SYBASE_IQ = "com.sybase.jdbc4.jdbc.SybDriver";
/**
* url like:jdbc:postgresql://host:port/database
*/
public final static String DRIVER_POSTGRESQL = "org.postgresql.Driver";
/**
* 获取数据库连接
*
* @param driver
* @param url
* @param username
* @param password
* @return
*/
public static Connection getConnection(String driver, String url, String username, String password) {
logger.info("获取数据库连接!");
Connection conn = null;
try {
Class.forName(driver);
conn = DriverManager.getConnection(url, username, password);
} catch (ClassNotFoundException connectionException) {
System.out.println(connectionException.getMessage());
} catch (SQLException connectionException) {
System.out.println(connectionException.getMessage());
logger.error("获取数据库失败!" + connectionException.getStackTrace());
}
return conn;
}
}
| java |
Xiaomi is all set to launch its three new high-end smartphones- Xiaomi 13, 13 Pro and the 13 Ultra. It is expected that all three smartphones will be available in China by the end of November or December.
If rumours are to be believed, Xiaomi 13 will go on sale with Android 13 while running under MIUI 14. However, it is also anticipated that the global launch will take place somewhere next year. But the launch seems imminent as the series was recently spotted on the 3C website.
As for the pricing, the upcoming Xiaomi 13 smartphones will be priced at the higher end, according to reports, in part due to global inflation.
A report by Gizchina mentions that the standard Xiaomi 13 will come with a 2.5D flat screen. It will be of 6.36-inches. Whereas, Xiaomi 13 Pro will come with a 6.73-inch QHD+ display. Both Xiaomi 13 Pro and 13 Ultra will use LTPO 2.0 panel which will allow them to dynamically vary the refresh rate from 1 to 120 Hz.
It is expected that the upcoming Xiaomi 13 will come with a triple rear camera setup. The sensors will form a shape of ‘P’ at the back of the camera panel. The setup will reportedly include a 50 MP sensor accompanied by an ultra-wide sensor and a macro sensor.
It has also been rumoured that the Xiaomi 13 Ultra will be the only model out of the Xiaomi 13 series to come with IP68 certification for water and dust resistance. Speaking of the processor, the Xiaomi 13 will come Snapdragon 8 Gen 2 chip.
Xiaomi 12 had a 4500 mAh battery and Xiaomi 12 Pro had a 4600 mAh battery. It is expected that the Xiaomi 13 will get a 5000 mAh battery.
| english |
The T1 is the tiniest portable drive you can buy, yet it also has the best performance.
The Samsung Portable SSD T1 is a one-of-kind portable drive. It's a bit larger than a thumbdrive, as easy to use, yet has up to 1TB of storage space and, most importantly, delivers unmatched performance.
What's more, unlike other compact storage devices, the T1 supports data encryption. It also works with both Windows and Mac computers, after a brief setup process.
All that makes it an excellent portable storage device that has enough to justify its current hefty cost of $179 (£125), $299 (£210), and $599 (£406) for 250GB, 500GB and 1TB, respectively. In Australia you'll pay AU$269 for 250GB, AU$429 for 500GB and AU$799 for the 1TB. If you can stomach the price, I recommend it without any reservation.
For other options, including some that are more affordable, check out this list of top portable drives on the market.
The T1 is based on the recently reviewed Samsung SSD 850 Evo solid-state drive -- but not the 2.5-inch version. Instead, it uses the mSATA version that's much smaller. The result: the T1 is tiny, measuring just 2.5 by 0.35 by 2.1 inches (64 by 9 by 53mm). It's basically about the size of a large thumbdrive.
Housed in a plastic chassis, the drive is also very light. At just 1 ounce (30 grams), it's about as heavy as the included 5-inch USB cable. The drive connects to a computer via its standard Micro-USB 3.0 port for both power and data.
|USB 3.0 (USB 2.0 compatible)
|Dimensions (W x H x D)
|Password setting (optional)
Despite its size, the T1 has the main features of the 850 Evo, which include the use of 3D-vertical NAND flash memory. Traditionally, 2D-planar type NAND flash memory cells -- the storage units on an SSD -- lie flat on the surface of the silicon wafer. The T1's internal storage's flash memory cells are stacked in up to 32 layers, which allows for significantly more cells in the same number of wafer bits. This greatly increases the density and means, among other things, more storage space for less cost.
The T1 also supports Samsung's TurboWrite technology, which enables the drive to operate a portion of its flash memory in a simulated high-performance mode of single-layer-cell flash memory, as a buffer zone. During write operations, data is first written to this zone at high speeds, then, during idle periods, it's moved from the buffer to the primary storage region. The end result is much faster performance from the user's perspective.
The T1 doesn't have all of the 850 Evo's features, however. Most noticeable is the omission of the RAPID mode, which uses the available system memory (RAM) on the host computer as an input/output cache to boost the drive's performance. Since this feature is only applicable for internal drives and the T1 works externally, RAPID is not implemented. This means it's likely that the T1's write performance will not be as good as its read performance.
Out of the box, the T1 appears to the host computer as a small FAT32 partition that contains the Samsung Portable SSD setup software. Once run, this application walks you through a few steps to set up the drive, including naming it and, optionally, picking a password to protect its content. Depending on the system you're using, be it a Windows or a Mac, the software will then reformat the drive into a new full-capacity partition that uses an applicable file system -- NTFS or HFS+, respectively. The whole process took me just a few seconds.
You can always use the Samsung Portable SSD application later to change the password option. If you choose to password protect the drive, keep in mind that there's no way to access the data on the drive if you forget the password. This is because the drive supports AES 256-bit, which is currently the strongest encryption standard.
The Samsung Portable SSD T1 totally delivered in real-world performance. When used with USB 3.0, it registered a sustained write speed of almost 160MBps and a read speed of close to 300MBps.
The T1 also works with USB 2.0 with a sustained speed of around 28MBps and 30MBps for writing and reading, respectively.
Note that while super-fast, the drive wasn't as fast as Samsung claims, which is 450MBps. When it comes to storage devices, however, it's quite common for there to be a huge disparity between real-world performance and the number the vendor claims. So far, the T1 is still the fastest on the market among non-RAID portable drives.
Super-compact, the Samsung Portable SSD T1 redefines portability. Super-fast, it raises the expectation of what a portable storage device is capable of. In fact, it's how any portable drive should be. The drive is perfect for those needing to quickly back up data or even do some video editing on the go.
My only minor concern is its three-year warranty. Considering Samsung backs the 850 Evo drive with a five-year warranty and the 850 Pro drive with a 10-year, the T1 looks short-changed. Plus, of course, paying $600 for just 1TB of storage space is a luxury most people can't afford.
That said, the T1 is best suited for professional and high-end business users. For the rest of us, I'd wait till the price comes down before getting your own.
| english |
Eight people including pedestrians and hawkers were on Sunday injured when the boundary wall of Bangladesh Bank in Chattogram collapsed after being hit by a covered van, police said.
The identity of the injured couldn’t be known immediately.
Kotwali Police Station Officer-in-Charge Nezam Uddin said a covered van lost its control and crashed into the boundary wall of Bangladesh Bank at around 12:15 pm on leaving at least eight people injured. The injured were taken to Chattogram Medical College and Hospital.
The driver of the van was arrested and the vehicle was seized, the OC added.
Meanwhile, a team from the Chattogram Fire Service Department went to the spot to rescue the victims, said Kafil Uddin, an officer of the fire service control room.
Mohammad Ali, senior station officer of Agrabad Fire Service, said, "The injured were taken to hospital before we arrived. So far, the number of injured people was not known yet."
A number of hawkers sit on the pavement beside the boundary wall of Bangladesh Bank that collapsed. Many pedestrians also use this sidewalk.
| english |
The Delhi High Court Thursday advanced the hearing of AAP communication’s in-charge Vijay Nair’s bail plea to May 9 in the Enforcement Directorate’s money laundering probe into the now-scrapped excise policy.
On Thursday a single-judge bench of Justice Dinesh Kumar Sharma preponed the hearing of Nair’s bail plea from May 19 to May 9.
Appearing for Nair, senior advocate Manish Vashisht urged that the HC should not have an impression they were trying to put any pressure. He submitted that his client had been behind bars based on “merely assumptions and probabilities” without there being any “iota of evidence”.
On April 12, the HC had issued notice to the ED on Nair’s bail plea. Nair had been arrested by the ED on November 13, 2022. | english |
<filename>README.md
# Pitch-Perfect
Record audio and change up the pitch and pace.
## Common usage
Users can:
- Record audio.
- Pause the recording and resume recording by tapping on the mic icon.
- Stop the recording and choose from different effects to manipulate the audio, such as by slowing it down, speeding it up, or changing the pitch.
## Installation
Install Xcode able to run iOS 9.2 and up. Clone or download the repository from GitHub.
Run with deployment target of 9.2 on the simulator or device.
##License
The MIT License (MIT)
Copyright (c) 2016 <NAME>
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.
| markdown |
import fs from 'fs';
import path from 'path';
import { directories, files } from 'src/cli/helpers/project_structure';
import log from 'src/utils/log';
import { createHash } from 'crypto';
import dotenv from 'dotenv';
export default async () => {
const root = process.rootPath;
let hasBadDirs = false;
Object.keys(directories).forEach((dir) => {
const dirPath = path.resolve(root, dir);
if (!fs.existsSync(dirPath)) {
hasBadDirs = true;
fs.mkdirSync(dirPath, { recursive: true });
log.info('[Directory Created]', dir);
}
});
if (hasBadDirs) {
log('');
}
let envEmitted = false;
let hasBadFiles = false;
Object.keys(files).forEach((file) => {
const filePath = path.resolve(root, file);
if (!fs.existsSync(filePath)) {
hasBadFiles = true;
if (files[file] === 'dotenv') {
const appName = path.basename(root);
const appHash = createHash('sha256').update(`${appName}${Date.now()}${Math.random()}`).digest('hex');
const content = fs
.readFileSync(path.resolve(__dirname, `./samples/dotenv.txt`), 'utf8')
.replace(/APP_NAME=/, `APP_NAME=${/\s/gi.test(appName) ? `"${appName}"` : appName}`)
.replace(/APP_KEY=/, `APP_KEY=${appHash}`);
fs.writeFileSync(filePath, content, 'utf8');
envEmitted = true;
} else {
fs.copyFileSync(path.resolve(__dirname, `./samples/${files[file]}.txt`), filePath);
}
log.info('[File Created]', file);
}
});
const typesFilePath = path.resolve(root, 'src/bootstrap/types.d.ts');
if (!fs.existsSync(typesFilePath)) {
fs.copyFileSync(path.resolve(__dirname, `./samples/types.d.txt`), typesFilePath);
log.info('[File Created]', 'src/bootstrap/types.d.ts');
}
let envOK = true;
if (!envEmitted) {
const appName = path.basename(root);
const appHash = createHash('sha256').update(`${appName}${Date.now()}${Math.random()}`).digest('hex');
const envPath = path.resolve(root, '.env');
let content = fs.readFileSync(envPath, 'utf8');
const { parsed } = dotenv.config({ path: envPath });
if (!parsed.APP_KEY) {
envOK = false;
if (parsed.APP_KEY === '') {
content = content.replace(/APP_KEY=/, `APP_KEY=${appHash}`);
} else {
content += `\nAPP_KEY=${appHash}`;
}
}
if (!parsed.APP_PORT) {
envOK = false;
if (parsed.APP_PORT === '') {
content = content.replace(/APP_PORT=/, `APP_PORT=3000`);
} else {
content += `\nAPP_PORT=3000`;
}
}
if (!parsed.DB_TYPE) {
envOK = false;
if (parsed.DB_TYPE === '') {
content = content.replace(/DB_TYPE=/, `DB_TYPE=mysql`);
} else {
content += `\nDB_TYPE=mysql`;
}
}
if (!parsed.DB_HOST) {
envOK = false;
if (parsed.DB_HOST === '') {
content = content.replace(/DB_HOST=/, `DB_HOST=localhost`);
} else {
content += `\nDB_HOST=localhost`;
}
}
if (!parsed.DB_PORT) {
envOK = false;
if (parsed.DB_PORT === '') {
content = content.replace(/DB_PORT=/, `DB_PORT=3306`);
} else {
content += `\nDB_PORT=3306`;
}
}
if (!parsed.DB_DATABASE) {
envOK = false;
if (parsed.DB_DATABASE === '') {
content = content.replace(/DB_DATABASE=/, `DB_DATABASE=test`);
} else {
content += `\nDB_DATABASE=test`;
}
}
if (!parsed.DB_USERNAME) {
envOK = false;
if (parsed.DB_USERNAME === '') {
content = content.replace(/DB_USERNAME=/, `DB_USERNAME=root`);
} else {
content += `\nDB_USERNAME=root`;
}
}
if (!envOK) {
fs.writeFileSync(envPath, content, 'utf8');
log.info('[Dotenv]', '.env file has been fixed');
}
}
if (!(hasBadDirs || hasBadFiles) && envOK) {
log.success('[ALL GOOD]', 'There is nothing to be fixed.');
}
};
| typescript |
<reponame>sunli829/gcp_auth
//! GCP auth provides authentication using service accounts Google Cloud Platform (GCP)
//!
//! The library looks for authentication methods in the following order:
//!
//! 1. Path to service account JSON configuration file using GOOGLE_APPLICATION_CREDENTIALS environment
//! variable. The service account configuration file can be downloaded in the IAM service when displaying service account detail.
//! The downloaded JSON file should be provided without any further modification.
//! 2. Invoking the library inside GCP environment fetches the default service account for the service and
//! the application is authenticated using that particular account
//! 3. Application default credentials. Local user authentication for development purposes created using `gcloud auth` application.
//! 4. If none of the above can be used an error occurs
//!
//! The tokens are single-use and as such they shouldn't be cached and for each use a new token should be requested.
//! Library handles token caching for their lifetime and so it won't make a request if a token with appropriate scope
//! is available.
//!
//! # Default service account
//!
//! When running inside GCP the library can be asked directly without any further configuration to provide a Bearer token
//! for the current service account of the service.
//!
//! ```async
//! let authentication_manager = gcp_auth::init().await?;
//! let token = authentication_manager.get_token().await?;
//! ```
//!
//! # Custom service account
//!
//! When running outside of GCP e.g on development laptop to allow finer granularity for permission a
//! custom service account can be used. To use a custom service account a configuration file containing key
//! has to be downloaded in IAM service for the service account you intend to use. The configuration file has to
//! be available to the application at run time. The path to the configuration file is specified by
//! `GOOGLE_APPLICATION_CREDENTIALS` environment variable.
//!
//! ```async
//! // GOOGLE_APPLICATION_CREDENTIALS environment variable is set-up
//! let authentication_manager = gcp_auth::init().await?;
//! let token = authentication_manager.get_token().await?;
//! ```
//! You may instantiate `authentication_manager` from a credentials file path using the method `from_credentials_file`:
//!
//! ```async
//! // `credentials_path` variable is the path for the credentials `.json` file.
//! let authentication_manager = gcp_auth::from_credentials_file(credentials_path).await?;
//! let token = authentication_manager.get_token().await?;
//! ```
//!
//! # Local user authentication
//! This authentication method allows developers to authenticate again GCP services when developing locally.
//! The method is intended only for development. Credentials can be set-up using `gcloud auth` utility.
//! Credentials are read from file `~/.config/gcloud/application_default_credentials.json`.
//!
//! # FAQ
//!
//! ## Does library support windows?
//!
//! No
#![deny(missing_docs)]
#![deny(warnings)]
#![deny(unreachable_pub)]
#![allow(clippy::pedantic)]
mod authentication_manager;
mod custom_service_account;
mod default_authorized_user;
mod default_service_account;
mod error;
mod gcloud_authorized_user;
mod jwt;
mod types;
use custom_service_account::CustomServiceAccount;
pub use authentication_manager::AuthenticationManager;
pub use error::Error;
pub use types::Token;
use std::path::Path;
use reqwest::Client;
/// Initialize GCP authentication based on a credentials file
///
/// Returns `AuthenticationManager` which can be used to obtain tokens
pub async fn from_credentials_file<T: AsRef<Path>>(
path: T,
) -> Result<AuthenticationManager, Error> {
get_authentication_manager(Some(path.as_ref())).await
}
async fn get_authentication_manager(
credential_path: Option<&Path>,
) -> Result<AuthenticationManager, Error> {
#[cfg(feature = "webpki-roots")]
let https = HttpsConnectorBuilder::new().with_webpki_roots();
#[cfg(not(feature = "webpki-roots"))]
let https = HttpsConnectorBuilder::new().with_native_roots();
let client =
Client::builder().build::<_, hyper::Body>(https.https_only().enable_http2().build());
let custom = match credential_path {
Some(path) => CustomServiceAccount::from_file(path).await,
None => match std::env::var("GOOGLE_APPLICATION_CREDENTIALS") {
Ok(path) => CustomServiceAccount::from_file(Path::new(&path)).await,
Err(_) => Err(Error::ApplicationProfileMissing),
},
};
if let Ok(service_account) = custom {
return Ok(AuthenticationManager::new(
client,
Box::new(service_account),
));
}
let gcloud = gcloud_authorized_user::GCloudAuthorizedUser::new().await;
if let Ok(service_account) = gcloud {
return Ok(AuthenticationManager::new(
client.clone(),
Box::new(service_account),
));
}
let default = default_service_account::DefaultServiceAccount::new(&client).await;
if let Ok(service_account) = default {
return Ok(AuthenticationManager::new(
client.clone(),
Box::new(service_account),
));
}
let user = default_authorized_user::DefaultAuthorizedUser::new(&client).await;
if let Ok(user_account) = user {
return Ok(AuthenticationManager::new(client, Box::new(user_account)));
}
Err(Error::NoAuthMethod(
Box::new(custom.unwrap_err()),
Box::new(gcloud.unwrap_err()),
Box::new(default.unwrap_err()),
Box::new(user.unwrap_err()),
))
}
/// Initialize GCP authentication
///
/// Returns `AuthenticationManager` which can be used to obtain tokens
pub async fn init() -> Result<AuthenticationManager, Error> {
get_authentication_manager(None).await
}
| rust |
<reponame>mechiru/google-api-proto<filename>google-api-proto/src/google/cloud/networkservices/mod.rs
#[cfg(any(feature = "google-cloud-networkservices-v1"))]
pub mod v1;
#[cfg(any(feature = "google-cloud-networkservices-v1beta1"))]
pub mod v1beta1;
| rust |
<reponame>alexboii/Discover-Poetry
{
"author": "<NAME>",
"classification": "Ode",
"keywords": [
"Trees",
"Flowers",
"Relationships",
"Arts",
"Sciences",
"Nature",
"Seas, Rivers,",
"Streams",
"Landscapes",
"Pastorals",
"Heroes",
"Patriotism",
"Love",
"Music",
"Men",
"Women",
"Mythology",
"Folklore",
"Romantic Love",
"Infatuation",
"Crushes",
"Greek",
"Roman Mythology"
],
"period": "Romantic",
"reference": "http://www.poetryfoundation.org/poem/173745",
"region": "England",
"text": [
"O Goddess! hear these tuneless numbers, wrung",
"By sweet enforcement and remembrance dear,",
"And pardon that thy secrets should be sung",
"Even into thine own soft-conched ear:",
"Surely I dreamt to-day, or did I see",
"The winged Psyche with awaken'd eyes?",
"I wander'd in a forest thoughtlessly,",
"And, on the sudden, fainting with surprise,",
"Saw two fair creatures, couched side by side",
"In deepest grass, beneath the whisp'ring roof",
"Of leaves and trembled blossoms, where there ran",
"A brooklet, scarce espied:",
"Mid hush'd, cool-rooted flowers, fragrant-eyed,",
"Blue, silver-white, and budded Tyrian,",
"They lay calm-breathing, on the bedded grass;",
"Their arms embraced, and their pinions too;",
"Their lips touch'd not, but had not bade adieu,",
"As if disjoined by soft-handed slumber,",
"And ready still past kisses to outnumber",
"At tender eye-dawn of aurorean love:",
"The winged boy I knew;",
"But who wast thou, O happy, happy dove?",
"His Psyche true!",
"O latest born and loveliest vision far",
"Of all Olympus' faded hierarchy!",
"Fairer than Phoebe's sapphire-region'd star,",
"Or Vesper, amorous glow-worm of the sky;",
"Fairer than these, though temple thou hast none,",
"Nor altar heap'd with flowers;",
"Nor virgin-choir to make delicious moan",
"Upon the midnight hours;",
"No voice, no lute, no pipe, no incense sweet",
"From chain-swung censer teeming;",
"No shrine, no grove, no oracle, no heat",
"Of pale-mouth'd prophet dreaming.",
"O brightest! though too late for antique vows,",
"Too, too late for the fond believing lyre,",
"When holy were the haunted forest boughs,",
"Holy the air, the water, and the fire;",
"Yet even in these days so far retir'd",
"From happy pieties, thy lucent fans,",
"Fluttering among the faint Olympians,",
"I see, and sing, by my own eyes inspir'd.",
"So let me be thy choir, and make a moan",
"Upon the midnight hours;",
"Thy voice, thy lute, thy pipe, thy incense sweet",
"From swinged censer teeming;",
"Thy shrine, thy grove, thy oracle, thy heat",
"Of pale-mouth'd prophet dreaming.",
"Yes, I will be thy priest, and build a fane",
"In some untrodden region of my mind,",
"Where branched thoughts, new grown with pleasant pain,",
"Instead of pines shall murmur in the wind:",
"Far, far around shall those dark-cluster'd trees",
"Fledge the wild-ridged mountains steep by steep;",
"And there by zephyrs, streams, and birds, and bees,",
"The moss-lain Dryads shall be lull'd to sleep;",
"And in the midst of this wide quietness",
"A rosy sanctuary will I dress",
"With the wreath'd trellis of a working brain,",
"With buds, and bells, and stars without a name,",
"With all the gardener Fancy e'er could feign,",
"Who breeding flowers, will never breed the same:",
"And there shall be for thee all soft delight",
"That shadowy thought can win,",
"A bright torch, and a casement ope at night,",
"To let the warm Love in!"
],
"title": "Ode to Psyche",
"year": ""
} | json |
<filename>README.md<gh_stars>1-10
# Periodic Table
This is a Python program that displays a periodic table with the following for each element:
* Element Name
* Element Abbreviation/Symbol
* Atomic Number
* Atomic Mass
* Electron Shells
The periodic table opens in a window with scroll bars.
**NOTE**: You must drag the scrollbars in the window to pan the periodic table;
mouse scroll wheel and other such methods of scrolling do not work.

## Installation on macOS
Install `brew` if you don't have it:
```
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
```
Install `python3` if you don't have it:
```
brew install python
```
Install tkinter if you don't have it:
```
brew install python-tk
```
Download the code in this repository, `cd` into the directory, and run the following command:
```
python3 main.py
``` | markdown |
Quotes by Helene Hanff (?)
Quotes are added by the Goodreads community and are not verified by Goodreads. (Learn more)
What book would you like to read for our April BOTM Group Read? For this month, we will be reading nonfiction.
| english |
<reponame>rbalves/users-app
import { Grid } from "@mui/material";
import Link from "next/link";
import { User } from "types/User";
import { PaginationFlex } from "../Users.styles";
import UserCard from "./UserCard/UserCard";
import { MainBox } from "./UsersGrid.styles";
type UsersGrid = {
users: User[];
page: number;
setPage: (arg: number) => void;
totalPages: number;
};
const UsersGrid = ({
users,
page,
setPage,
totalPages,
}: UsersGrid): JSX.Element => {
const handlePage = (event: React.ChangeEvent<unknown>, value: number) => {
setPage(value);
};
return (
<MainBox>
<Grid
container
spacing={{ xs: 2, md: 3 }}
columns={{ xs: 4, sm: 8, md: 12 }}
>
{users.map((user: any, index) => (
<UserCard user={user} key={index} />
))}
</Grid>
<PaginationFlex page={page} count={totalPages} onChange={handlePage} />
</MainBox>
);
};
export default UsersGrid;
| typescript |
<filename>packages/document/src/__tests__/doc-parser.test.ts
import { DocParser } from '../doc-parser';
import { createDocCode } from '../__mocks__/doc-code';
describe('DocParser', () => {
let parser: DocParser;
beforeEach(() => {
parser = new DocParser();
});
test('correct and incorrect', () => {
const rule = 'rule-name';
const path = `path/${rule}.md`;
const codes = parser.parse({
path,
content: `
# Rule title
summary [link](#to) \`code\` text.
description.
\`\`\`html
<p class="other-1"></p>
\`\`\`
## Correct
\`\`\`bash
$ no-html "foo bar baz"
\`\`\`
\`\`\`html
<p class="correct-1"></p>
\`\`\`
### Heading3
\`\`\`html acot-ignore, opener:[data-dialog="opener"], dialog:.dialog
<p class="correct-2"></p>
\`\`\`
\`\`\`html acot-head
<title>Title</title>
\`\`\`
## Incorrect
\`\`\`html attr1:"string1", attr2:'string2', attr3:string3, attr4:1000, attr5:false, attr6:null
<p class="incorrect-1"></p>
\`\`\`
\`\`\`html acot-ignore
<p class="incorrect-2"></p>
\`\`\`
## Other
\`\`\`html
<p class="other-2"></p>
\`\`\`
> not a summary
`,
});
const summary = {
markdown: 'summary [link](#to) `code` text.',
text: 'summary link code text.',
};
expect(codes).toEqual([
createDocCode({
path,
rule,
summary,
type: 'correct',
id: '1',
meta: {},
html: '<p class="correct-1"></p>',
}),
createDocCode({
path,
rule,
summary,
type: 'correct',
id: '2',
meta: {
'acot-ignore': true,
opener: '[data-dialog="opener"]',
dialog: '.dialog',
},
html: '<p class="correct-2"></p>',
}),
createDocCode({
path,
rule,
summary,
type: 'correct',
id: '3',
meta: {
'acot-head': true,
},
html: '<title>Title</title>',
}),
createDocCode({
path,
rule,
summary,
type: 'incorrect',
id: '4',
meta: {
attr1: 'string1',
attr2: 'string2',
attr3: 'string3',
attr4: 1000,
attr5: false,
attr6: null,
},
html: '<p class="incorrect-1"></p>',
}),
createDocCode({
path,
rule,
summary,
type: 'incorrect',
id: '5',
meta: {
'acot-ignore': true,
},
html: '<p class="incorrect-2"></p>',
}),
]);
});
test('correct only', () => {
const rule = 'rule-name';
const path = `${rule}.md`;
const codes = parser.parse({
path,
content: `
## Correct
\`\`\`html
<p class="correct-1"></p>
\`\`\`
`,
});
expect(codes).toEqual([
createDocCode({
path,
rule,
type: 'correct',
id: '1',
meta: {},
html: '<p class="correct-1"></p>',
}),
]);
});
test('incorrect only', () => {
const rule = 'rule-name';
const path = `${rule}.md`;
const codes = parser.parse({
path,
content: `
## Incorrect
\`\`\`html
<p class="incorrect-1"></p>
\`\`\`
`,
});
expect(codes).toEqual([
createDocCode({
path,
rule,
type: 'incorrect',
id: '1',
meta: {},
html: '<p class="incorrect-1"></p>',
}),
]);
});
test('heading format', () => {
const rule = 'rule-name';
const path = `${rule}.md`;
const codes = parser.parse({
path,
content: `
## :dog: Correct :new:
\`\`\`html
correct1
\`\`\`
## :cat: Incorrect :new:
\`\`\`html
incorrect1
\`\`\`
`,
});
expect(codes).toEqual([
createDocCode({
path,
rule,
type: 'correct',
id: '1',
meta: {},
html: 'correct1',
}),
createDocCode({
path,
rule,
type: 'incorrect',
id: '2',
meta: {},
html: 'incorrect1',
}),
]);
});
test('empty code', () => {
const rule = 'rule-name';
const path = `${rule}.md`;
const codes = parser.parse({
path,
content: `
## Heading
\`\`\`html
correct1
\`\`\`
`,
});
expect(codes).toEqual([]);
});
});
| typescript |
The yellow pack with the picture of a cherubic baby sits quietly on supermarket racks. One of India’s best-known comfort foods — Parle-G biscuits — is available in stores despite the nationwide lockdown that has hampered production in overall fast-moving consumer goods (FMCG) sector for a month now.
At nearly 60 per cent capacity utilisation, Parle Products, maker of Parle-G, appears to be bucking this trend by keeping production lines going, encouraging workers to get back to work, talking to district authorities to meet hygiene standards and pushing the distribution wheel in the face of growing number of containment zones and limited movement of trucks.
Mayank Shah, senior category head, Parle Products, admits that the first phase of the lockdown saw the company operate with a few plants and acute labour shortage. Capacity utilisation was down to 20-25 per cent, with distribution patchy and trucks barely plying on the roads.
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 |
<filename>src/main/java/com/webcheckers/ui/HtmlRoutes/PostBuildConfig.java
package com.webcheckers.ui.HtmlRoutes;
import static com.webcheckers.ui.HtmlRoutes.GetHomeRoute.PLAYER;
import static spark.Spark.halt;
import com.google.gson.Gson;
import com.google.gson.JsonObject;
import com.webcheckers.application.GameCenter;
import com.webcheckers.application.PlayerLobby;
import com.webcheckers.model.Board.InitConfig;
import com.webcheckers.ui.WebServer;
import spark.Request;
import spark.Response;
import spark.Session;
import spark.TemplateEngine;
/**
* The {@code POST /buildConfig} route handler.
* This is page where a user is able to build the configuration
* settings for starting a game.
*
* @author <a href='mailto:<EMAIL>'><NAME></a>
* @author <a href='mailto:<EMAIL>'><NAME></a>
* @author <a href='mailto:<EMAIL>'><NAME></a>
* @author <a href='mailto:<EMAIL>'><NAME></a>
*/
public class PostBuildConfig extends HtmlRoute {
//
// Constants
//
public static final String INIT_CONFIG = "initConfig";
/**
* Create the Spark Route (UI controller) for the {@code POST /buildConfig} HTTP request.
* {@inheritDoc}
*/
public PostBuildConfig(GameCenter gameCenter,
PlayerLobby playerLobby, TemplateEngine templateEngine)
throws NullPointerException {
super(gameCenter, playerLobby, templateEngine);
}
@Override
public Object handle(Request request, Response response) {
final Session session = request.session();
String currPlayerName = session.attribute(PLAYER);
if(checkValidPlayerName(currPlayerName)){
Gson gson = new Gson();
JsonObject jObj = gson.fromJson(request.body(), JsonObject.class);
InitConfig config = gson.fromJson(request.body(), InitConfig.class);
session.attribute(INIT_CONFIG, config);
}
response.redirect(WebServer.HOME_URL);
halt();
return "nothing";
}
}
| java |
<filename>_posts/2022-05-24-baekjoon12865.md
---
layout: single
title: 백준 12865 - 평범한 배낭 (Python3)
categories: baekjoon
tag: [python, algorithm, coding_test]
toc: true
author_profile: false
sidebar:
nav: "docs"
---
## 코드
```python
n, k = map(int, input().split())
# 가지고갈 물건의 무게와 가치를 담을 리스트
# 처음 0,0 값을 넣어서 인덱스를 편하게 관리할 수 있음
ob = [[0, 0]]
# DP 테이블
# k+1만큼 0을 넣고, n+1만큼 행을 갖게 만듬
# 마찬가지로 인덱스를 편하게 관리할 수 있음
pack = [[0 for _ in range(k+1)] for _ in range(n+1)]
for _ in range(n):
# w, v 입력받음
ob.append(list(map(int, input().split())))
# 1~n, 1~k 만큼 반복
for i in range(1, n+1):
# j : 배낭에 담을 수 있는 최대 무게
for j in range(1, k+1):
# 무게와 가치를 뽑아냄
w = ob[i][0]
v = ob[i][1]
# i번째 물건의 무게보다 작다 => 배낭이 담을 수 있는 무게를 초과했다
# 당연히 못 넣으므로 그전 DP 테이블의 값을 그대로 가져옴
if j < w:
# 바로 전까지의 누적 v값을 그대로 가져옴
pack[i][j] = pack[i-1][j]
# 크거나 같다 => 배낭에 추가로 더 넣을 수 있다
else:
# pack[i-1][j-w] + v의 의미
# i번째 물건을 넣지 않는 경우, 배낭에 담을 수 있는 최대 무게는
# i번째 물건의 무게를 뺀 나머지가 되므로 => j-w가 된다
# pack[i-1][j-w]는 i번째 물건을 넣기 전까지의 최대 효용 가치가 되고
# 여기에 v (i번째 물건의 가치)를 더해주면 원하는 값을 구할 수 있다
# 위의 주석 과정을 넣은 경우와 넣지 않은 경우 둘 중 더 큰 값을 DP 테이블에 업데이트 해줌
pack[i][j] = max(pack[i-1][j], pack[i-1][j-w] + v)
print(pack[n][k])
```
## 문제 해설
DP 문제에서 매우 유명한 냅색(배낭) 문제. [(냅색 문제 나무위키 참고)](https://namu.wiki/w/%EB%B0%B0%EB%82%AD%20%EB%AC%B8%EC%A0%9C)
이 문제를 접하기 전까지 이 유형의 문제가 유명하다는 것 조차 알지 못했다 ㅠㅠ
---
풀이 순서
1. DP 테이블을 2차원 리스트로 생성하여 보유한 물건들을 순서대로 최대 허용 무게만큼 하나씩 넣어주면서 최대 효용 가치를 계산한다
2. 무게가 초과되면 이전 아이템을 빼거나 기존 그대로 가지는 방법 중 하나를 선택하여 DP 테이블을 계속해서 업데이트 해준다
---
위 두 과정을 반복하여 거쳐 마지막 DP 테이블까지 모두 업데이트 시키면 최종적으로 가치합의 최댓값을 구할 수 있다.
| markdown |
Our editors will review what you’ve submitted and determine whether to revise the article.
- Key People:
- Related Topics:
suit, in dress design, matching set of clothes consisting, for example, of a coat, vest, and trousers. The shift in Western masculine attire from the doublet to the present-day suit began in the 1660s at the courts of Louis XIV of France and Charles II of England. The reformed style consisted of a long coat with wide, turned-back sleeves and a row of buttons down the front, some of which were left unbuttoned to reveal a vest (later called a waistcoat in England), an undergarment almost identical to the coat.
At first the vest had long sleeves that showed below the turned-back sleeves of the coat and then the sleeves were dispensed with entirely. Neither coat nor vest had a collar or lapels. To complete the new mode, tight-fitting breeches were worn with stockings gartered below the knee. By 1670 this type of suit had become the firmly established style for men and was worn with no essential change until the end of the 18th century.
From the time of the French Revolution until well into the 19th century, a man’s suit consisted of a short, fitted waistcoat (called a veston in France); below-knee-length breeches or long trousers; and a long outer coat. A top hat was worn with it. By the 1830s, breeches were worn as compulsory court attire and by the elderly and the unfashionable, and long trousers were worn by everyone else.
The prototype of the modern suit appeared in 1860 as the “lounge suit,” which was for informal wear and consisted of long trousers; a waistcoat, or vest (often elaborately decorated); and a short coat. The desire on the part of the middle class for gentlemanly clothes led to great conformity in men’s suits; since the 19th century men’s fashions have remained more or less static.
Women’s “tailor-made” suits became very popular in the second half of the 19th century for sport and traveling. When women began to work outside the home after the Civil War and even more so after World War I, they adopted this form of suit, which consisted of a matching skirt and jacket. In the second half of the 20th century, women began to wear matching jackets and trousers (pantsuits).
| english |
<filename>www/css/variables.css
.channel-card-drop-shadow {
border-bottom: none;
border-left: none;
border-right: none;
border-top: none;
-webkit-box-shadow: 0 0 1px 1px rgba(0, 0, 0, 0.5);
-moz-box-shadow: 0 0 1px 1px rgba(0, 0, 0, 0.4);
box-shadow: 0 0 1px 1px rgba(0, 0, 0, 0.4);
}
| css |
The actor became ill while vacationing with his wife and children.
Richard Gere is doing "much better," according to his wife, Alejandra Gere.
She shared a brief update on Instagram Tuesday after news broke over the weekend that the "Pretty Woman" star was hospitalized with pneumonia while on a family vacation in Mexico.
"Richard is feeling much better, we are all feeling much better, ‘almost’ back to normal," she wrote in the caption for a photo of her, Gere, and their two sons together.
The activist shared that their youngest son, James, also had pneumonia, and she and eldest son Alexander had sinusitis and ear infections.
She also shared some details about their trip, writing, "We came to Mexico to continue with our conservation project south of Puerto Vallarta, we all came sick from NY… now we are all well and almost fully recovered. "
She also joked around a bit, sharing a shirtless throwback photo of Gere and writing, "Richard wanted me to post this second photo to show you that he is feeling much better. "
According to reports, Gere checked himself into a hospital after a cough he had developed worsened while in Mexico. He was eventually diagnosed with pneumonia and stayed overnight in the hospital.
The latest update from Gere’s wife comes two days after her initial post about his illness.
"I woke up this morning and I saw the news and all your kind and worry (sic) messages, he is recovering…he is felling (sic) much better today! " she wrote in an Instagram post of the family.
"The worst has already pass (sic)! Thank you all for you sweet messages we really appreciate them! " she added.
In addition to their conservation project, the Gere family was vacationing in Mexico to celebrate Alejandra’s 40th birthday, which she posted about as well.
"Thank you all for the birthday wishes… after almost 3 weeks of everyone being sick in our family today finally I feel much better! Thank you for all the love," she wrote in the caption on a post with a photo of her walking on a beach with her children.
The "Maybe I Do" actor married Alejandra in 2018. In addition to his children with her, he is also father to 23-year-old son Homer James, whom he shares with his ex-wife Carey Lowell. | english |
import { Task } from './task';
export class TasksResponse {
tasks: Array<Task>;
total: number;
constructor() {
this.tasks = [];
this.total = 0;
}
}
| typescript |
<filename>gov.nasa.arc.verve.robot.freeflyer/src/gov/nasa/arc/verve/robot/freeflyer/utils/MathHelp.java<gh_stars>1-10
package gov.nasa.arc.verve.robot.freeflyer.utils;
import com.ardor3d.math.Quaternion;
import com.ardor3d.math.Vector3;
import com.ardor3d.math.type.ReadOnlyMatrix3;
public class MathHelp {
public static Vector3 findZYXEulerAngles(Quaternion q)
{
// roll (x-axis rotation)
double sinr_cosp = +2.0 * (q.getW() * q.getX() + q.getY() * q.getZ());
double cosr_cosp = +1.0 - 2.0 * (q.getX() * q.getX() + q.getY() * q.getY());
double roll = Math.atan2(sinr_cosp, cosr_cosp);
// pitch (y-axis rotation)
double sinp = +2.0 * (q.getW() * q.getY() - q.getZ() * q.getX());
double pitch;
if (Math.abs(sinp) >= 1)
pitch = Math.copySign(Math.PI / 2, sinp); // use 90 degrees if out of range
else
pitch = Math.asin(sinp);
// yaw (z-axis rotation)
double siny_cosp = +2.0 * (q.getW() * q.getZ() + q.getX() * q.getY());
double cosy_cosp = +1.0 - 2.0 * (q.getY() * q.getY() + q.getZ() * q.getZ());
double yaw = Math.atan2(siny_cosp, cosy_cosp);
return new Vector3(roll, pitch, yaw);
}
public static Vector3 findZYXEulerAngles(ReadOnlyMatrix3 m33) {
double sy = Math.sqrt(m33.getM00() * m33.getM00() + m33.getM10() * m33.getM10());
boolean singular = sy < 1e-6; // If
double x, y, z;
if (!singular)
{
x = Math.atan2(m33.getM21(), m33.getM22());
y = Math.atan2(-m33.getM20(), sy);
z = Math.atan2(m33.getM10(), m33.getM00());
}
else
{
x = Math.atan2(-m33.getM12(), -m33.getM11());
y = Math.atan2(-m33.getM20(), sy);
z = 0;
}
return new Vector3(x, y, z);
}
public static boolean anglesAreDifferent(int degrees, double radians) {
double deg2 = radians * 180.0 / Math.PI;
if(Math.abs(degrees - deg2) > 3) {
return true;
}
return false;
}
}
| java |
<gh_stars>0
{
"name": "event-calendar",
"version": "1.0.0",
"description": "event calendar",
"main": "index.js",
"scripts": {
"start": "webpack-dev-server",
"build": "webpack -p --config webpack.production.config.js",
"build-no-source-map": "webpack -p --config webpack.production.config.js --devtool none",
"upload": "node upload.js",
"test-unit": "jest --watch",
"test-integration": "testcafe-live chrome ./src/__tests__/integration",
"test-integration-remote": "testcafe-live remote ./src/__tests__/integration --qr-code",
"update": "node update.js",
"debug": "ngrok http --host-header=rewrite 8080"
},
"author": "<NAME>",
"license": "MIT",
"dependencies": {
"react": "^16.8.6",
"react-dom": "^16.8.6",
"react-scripts": "3.0.1"
},
"devDependencies": {
"@types/react": "^16.8.20",
"@types/react-dom": "^16.8.4",
"awesome-typescript-loader": "^5.2.1",
"css-loader": "^3.0.0",
"source-map-loader": "^0.2.4",
"style-loader": "^0.23.1",
"tslint": "^5.17.0",
"tslint-loader": "^3.5.4",
"tslint-react": "^4.0.0",
"typescript": "^3.5.2",
"webpack": "^4.35.0",
"webpack-cli": "^3.3.4",
"webpack-dev-server": "^3.7.2",
"write-file-webpack-plugin": "4.4.1"
},
"flow": {
"tenantId": "d1b3e73f-3f2a-4159-8fbb-ceb11a84e28d",
"id": "88b7b053-049b-402d-b614-597bed6a4b78",
"versionId": "",
"filenames": {
"js": "EventCalendar.js",
"css": "EventCalendar.css"
}
},
"peerDependencies": {},
"bundledDependencies": [],
"optionalDependencies": {}
}
| json |
<filename>utils/generateMarkdown.js
// object contains the license names as keys and their link urls and badge urls as a nested object properties
const licenseList = {
'Apache-2.0': {
link: 'https://www.apache.org/licenses/LICENSE-2.0.html',
badge: '[](https://www.apache.org/licenses/LICENSE-2.0.html)'
},
'BSD-3-Clause': {
link: 'https://opensource.org/licenses/BSD-3-Clause',
badge: '[](https://opensource.org/licenses/BSD-3-Clause)'
},
'BSD-2-Clause': {
link: 'https://opensource.org/licenses/BSD-2-Clause',
badge: '[](https://opensource.org/licenses/BSD-2-Clause)'
},
'GPL-2.0': {
link: 'https://opensource.org/licenses/GPL-2.0',
badge: '[](https://opensource.org/licenses/GPL-2.0)'
},
'GPL-3.0': {
link: 'https://opensource.org/licenses/GPL-3.0',
badge: '[](https://www.gnu.org/licenses/gpl-3.0)'
},
'LGPL-3.0': {
link: 'https://opensource.org/licenses/LGPL-3.0',
badge: '[](https://opensource.org/licenses/LGPL-3.0)'
},
'MIT': {
link: 'https://opensource.org/licenses/MIT',
badge: '[](https://opensource.org/licenses/MIT)'
},
'MPL-2.0': {
link: 'https://opensource.org/licenses/MPL-2.0',
badge: '[](https://opensource.org/licenses/MPL-2.0)'
},
'None': { link: '', badge: '' },
}
// Returns the license's badge url. If there is no license, return an empty string
function renderLicenseBadge(license) {
return licenseList[license].badge
}
// Returns the license's link url. If there is no license, return an empty string
function renderLicenseLink(license) {
return licenseList[license].link
}
// Renders the License section. If there is no license, return an empty string
function renderLicenseSection(license) {
if (license === 'None') {
return ''
} else {
return `## License
[This project is covered by the ${license} license](${renderLicenseLink(license)})`
}
}
// Renders the Table of Contents sections. Omits license if None selected.
function renderTableOfContents(license) {
var tableLicense;
if (license === 'None') {
tableLicense = ''
} else {
tableLicense = '- [License](#license)'
}
return `
## Table of Contents
- [Installation](#installation)
- [Usage](#usage)
${tableLicense}
- [Contributing](#contributing)
- [Tests](#tests)
- [Questions](#questions)
`
}
// Renders the Description Section and the License Badge
function renderDescriptionSection(description, license) {
return `
## Description
${renderLicenseBadge(license)}
${description}
`
}
// Renders the title.
function renderTitleSection(title) {
return `# ${title}`
}
// Renders the Installation Section
function renderInstallationSection(install) {
return `
## Installation
${install}
`
}
// Renders the Usage Section
function renderUsageSection(usage) {
return `
## Usage
${usage}
`
}
// Renders the Contributing Section
function renderContributingSection(contribute) {
return `
## Contributing
${contribute}
`
}
// Renders the Tests Section
function renderTestsSection(tests) {
return `
## Tests
${tests}
`
}
// Renders the Questions Section
function renderQuestionsSection(githubProfile, email) {
return `
## Questions
For any additional questions please reach out to me at:\n
[My Github Profile](https://github.com/${githubProfile})\n
[Email](mailto:${email})
`
}
// Takes the response object and renders the data from it into a string and returns that string
function generateMarkdown(data) {
// destructured variables from data object
const {
title,
description,
install,
usage,
license,
contribute,
tests,
githubProfile,
email,
} = data;
// returns a string that will be passed into a markdown file
return `
${renderTitleSection(title)}
${renderDescriptionSection(description, license)}
${renderTableOfContents(license)}
${renderInstallationSection(install)}
${renderUsageSection(usage)}
${renderLicenseSection(license)}
${renderContributingSection(contribute)}
${renderTestsSection(tests)}
${renderQuestionsSection(githubProfile, email)}
`;
}
// export the generated string
module.exports = generateMarkdown;
| javascript |
import React from 'react'
import PropTypes from 'prop-types'
import { TouchableHighlight, Text } from 'react-native'
import { Background, Alignment, Fonts, Colors } from 'theme'
export default function TextButton({ onPress, text, children, style, fontSize }) {
return (
<TouchableHighlight
underlayColor={Colors.transparent}
style={{ ...Background.bg_transparent, ...Alignment.align_center, ...style }}
onPress={onPress}
>
<Text style={[ { ...Fonts.text_amber }, fontSize ]}>{text}</Text>
</TouchableHighlight>
)
}
TextButton.defaultProps = {
children: null,
onPress: () => {},
text: '',
style: {},
fontSize: Fonts.f_12
}
TextButton.propTypes = {
children: PropTypes.node,
text: PropTypes.string,
onPress: PropTypes.func,
fontSize: PropTypes.string,
style: PropTypes.shape({}),
}
| javascript |
<filename>simbeeotic-core/src/main/java/harvard/robobees/simbeeotic/ClockControl.java
/*
* Copyright (c) 2012, The President and Fellows of Harvard College.
* All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* 3. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
package harvard.robobees.simbeeotic;
import org.apache.log4j.Logger;
import java.util.Date;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
import java.util.concurrent.locks.Condition;
import java.util.Set;
import java.util.HashSet;
/**
* A class that controls the clock in the simulation engine.
*
* @author bkate
*/
public class ClockControl {
private boolean paused = false;
private Lock lock = new ReentrantLock();
private Condition condition = lock.newCondition();
private long epoch = 0; // ms since standard epoch
private SimTime currTime;
private SimTime endTime;
private Set<ClockListener> listeners = new HashSet<ClockListener>();
private Logger logger = Logger.getLogger(ClockControl.class);
public ClockControl(SimTime end, long dateEpoch) {
endTime = end;
epoch = dateEpoch;
}
/**
* Pauses the clock. The clock can be restarted by calling the
* {@link #start()} method. If the clock is already in a paused
* state, calling the method has no effect.
*/
public void pause() {
lock.lock();
try {
paused = true;
}
finally {
lock.unlock();
}
}
/**
* Starts the clock. The clock can be paused by calling the
* {@link #pause()} method. If the clock is already in the running
* state, calling the method has no effect.
*/
public void start() {
lock.lock();
try {
paused = false;
condition.signalAll();
}
finally {
lock.unlock();
}
}
/**
* Blocks until the clock is started. If the clock is in a
* running state, the method will not block.
*/
public void waitUntilStarted() {
lock.lock();
try {
while(paused) {
try {
condition.await();
}
catch(InterruptedException ie) {
logger.warn("Clock control was interrupted.");
return;
}
}
}
finally {
lock.unlock();
}
}
/**
* Notifies listeners that the clock has been updated.
*
* @param time The latest virtual time.
*/
public void notifyListeners(SimTime time) {
currTime = time;
for (ClockListener listener : listeners) {
listener.clockUpdated(time);
}
}
/**
* Gets the time of the event that was last processed (or is currently being processed). This
* is essentially the global virtual time (GVT) of the simulation. No events can be scheduled
* prior to this time.
*
* @return The current simulation time.
*/
public SimTime getCurrentTime() {
return currTime;
}
/**
* Gets the date that is associated with the current virtual time. Since the units
* of the date are less precise than the units of virtual time, multiple
* events with different virtual times may correspond to the same Date. As such, the
* Date should not be sued to distinguish between events (use the SimTime).
*
* @return The current virtual time as a Date.
*/
public Date getCurrentDate() {
return new Date(epoch + TimeUnit.NANOSECONDS.toMillis(currTime.getTime()));
}
/**
* Gets the time at which the scenario will end. The simulation engine will execute all events
* that are less than or equal to this time.
*
* @return The time at which the simulation ends.
*/
public SimTime getEndTime() {
return endTime;
}
/**
* Adds a listener to the set of interested classes.
*
* @param listener The listener to be added.
*/
public void addListener(ClockListener listener) {
listeners.add(listener);
}
/**
* Removes a listener from the set of interested classes.
*
* @param listener The listener to be removed.
*/
public void removeListener(ClockListener listener) {
listeners.remove(listener);
}
}
| java |
<reponame>TeamGalacticraft/MachineLib
package dev.galacticraft.machinelib.gametest;
import dev.galacticraft.impl.fluid.FluidStack;
import net.minecraft.item.ItemStack;
import net.minecraft.test.GameTestException;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.Objects;
public final class Assertions {
public static void assertTrue(boolean b) {
if (!b) {
throw new GameTestException(format(true, false, 1));
}
}
public static void assertFalse(boolean b) {
if (b) {
throw new GameTestException(format(false, true, 1));
}
}
public static void assertEquals(boolean a, boolean b) {
if (a != b) {
throw new GameTestException(format(a, b, 1));
}
}
public static void assertEquals(byte a, byte b) {
if (a != b) {
throw new GameTestException(format(a, b, 1));
}
}
public static void assertEquals(short a, short b) {
if (a != b) {
throw new GameTestException(format(a, b, 1));
}
}
public static void assertEquals(int a, int b) {
if (a != b) {
throw new GameTestException(format(a, b, 1));
}
}
public static void assertEquals(long a, long b) {
if (a != b) {
throw new GameTestException(format(a, b, 1));
}
}
public static void assertEquals(float a, float b) {
if (a != b) {
throw new GameTestException(format(a, b, 1));
}
}
public static void assertEquals(double a, double b) {
if (a != b) {
throw new GameTestException(format(a, b, 1));
}
}
public static void assertEquals(Object a, Object b) {
if (!Objects.equals(a, b)) {
throw new GameTestException(format(a, b, 1));
}
}
//apparently itemstack does not implement Object#equals()
public static void assertEquals(ItemStack a, ItemStack b) {
if (a == null || b == null || !ItemStack.canCombine(a, b) || a.getCount() != b.getCount()) {
throw new GameTestException(format(a, b, 1));
}
}
public static void assertEquals(FluidStack a, FluidStack b) {
if (a == null || b == null || !FluidStack.canCombine(a, b) || a.getAmount() != b.getAmount()) {
throw new GameTestException(format(a, b, 1));
}
}
public static void assertSame(Object a, Object b) {
if (a != b) {
String aStr = "null";
String bStr = "null";
if (a != null) {
aStr = a.getClass().getName() + "@" + Integer.toHexString(System.identityHashCode(a)) + "[" + a + "]";
}
if (b != null) {
bStr = b.getClass().getName() + "@" + Integer.toHexString(System.identityHashCode(b)) + "[" + b + "]";
}
throw new GameTestException(format(aStr, bStr, 1));
}
}
public static void assertThrows(Runnable runnable) {
try {
runnable.run();
} catch (Throwable throwable) {
return;
}
throw new GameTestException(format("<any exception>", "<none>", 1));
}
public static <T extends Throwable> void assertThrows(Class<T> clazz, Runnable runnable) {
try {
runnable.run();
} catch (Throwable throwable) {
if (!clazz.isInstance(throwable)) {
GameTestException gameTestException = new GameTestException(format(clazz.getName(), throwable.getClass().getName(), 1));
gameTestException.addSuppressed(throwable);
throw gameTestException;
} else {
return;
}
}
throw new GameTestException(format(clazz.getName(), "<none>", 1));
}
public static <T extends Throwable> void assertThrowsExactly(Class<T> clazz, Runnable runnable) {
try {
runnable.run();
} catch (Throwable throwable) {
if (!clazz.equals(throwable.getClass())) {
GameTestException gameTestException = new GameTestException(format(clazz.getName(), throwable.getClass().getName(), 1));
gameTestException.addSuppressed(throwable);
throw gameTestException;
}
}
throw new GameTestException(format(clazz.getName(), "<none>", 1));
}
private static @NotNull String format(@Nullable Object expected, @Nullable Object found, int depth) {
return "[Expected: " + expected + ", Found: " + found + "] (Line: " + StackWalker.getInstance().walk(s -> s.skip(depth + 1).findFirst().map(StackWalker.StackFrame::getLineNumber).orElse(-1)) + ")";
}
}
| java |
Threat of breach to embankment has loomed over the Ramlingam tank, the large water body at the heart of Berhampur.
Continuous rains have filled the water body almost to the brim. If rains would continue, then it may also start to overflow leading to collapse of the dilapidated embankments. In such a case, it may lead to flooding of the densely-populated localities like Gandhi Nagar and Dharma Nagar.
A portion of its embankment along with a section of road by its side collapsed on the southern side of the tank in the past.
The Phailin cyclone and the present rains have led to collapse of another portion of its embankment on the eastern side. The greatest danger is that this tank is located at a crowded portion of the city which has three film halls and several eateries.
Although bricks have been placed to check people from getting near the tank at the places where the embankments have collapsed, yet people seem to ignore the warning.
The metal structures for large hoardings that had been put up around the tank got uprooted due to the cyclone weakening the condition of embankments of the tank.
Berhampur tahsildar Rashmi Ranjan Nayak has admitted that the condition of the embankment after the Phailin cyclone and recent rains became too dangerous. The official has said that he has drawn the attention of the Berhampur Municipal Corporation (BMC) to it. It may be noted that through a petition, Ganjam Bar Association former general secretary Manoj Patnaik has urged the Sub-Divisional Magistrate (SDM) of Berhampur to intervene and direct the BMC to take up renovation work of dilapidated and collapsed embankment of the tank as early as possible. But the BMC has not been in a position to renovate it due to legal hurdles.
Tussle between the BMC and a private trust on ownership of the tank is said to be the major reason for deterioration of the large water body called ‘breathing space' of this city. In 2011, Chief Minister Naveen Patnaik intervened to save the tank.
At his initiation, Berhampur Municipal Corporation (BMC) started cleaning of the tank in February 2011.
The corporation authorities convinced the trustees that this large tank could not be let to die out due to pollution and it needed immediate renovation as the trust was not taking any steps to clean or renovate it.
But legal tussle put a stumbling block in the whole process.
The continuing pollution of the tank due to dumping of garbage by eateries and automobile workshops around the tank continue to pollute it by dumping garbage into it. | english |
<reponame>JonasStrt/Angular-DockingLayout-Skeleton<filename>src/assets/dockingComponents.json
[{"id":"4711","componentName":"test","title":"4711 Tab","componentData":{"myValue":"My 4711 Tab"}},{"id":"f07067a6-1673-2ff7-0c92-b19d5279fcdc","componentName":"test","title":"my Tab","componentData":{"myValue":"Top Tab"}},{"id":"08325c8d-58bb-ab85-e33c-7622bdf0f03a","componentName":"test","title":"my Tab","componentData":{"myValue":"Bottom Tab"}}]
| json |
<filename>test/integration/broken/maint/test_vpc_host_maintenance.py
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you 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.
""" Component tests VM life cycle in VPC network functionality
"""
#Import Local Modules
from nose.plugins.attrib import attr
from marvin.cloudstackTestCase import cloudstackTestCase
import unittest
from marvin.cloudstackAPI import migrateSystemVm
from marvin.lib.utils import cleanup_resources
from marvin.lib.base import (Host,
VirtualMachine,
ServiceOffering,
VPC,
VpcOffering,
Router,
Network,
NetworkOffering,
Cluster,
Account)
from marvin.lib.common import (get_domain,
get_zone,
get_template,
wait_for_cleanup)
import time
class Services:
"""Test VM life cycle in VPC network services
"""
def __init__(self):
self.services = {
"account": {
"email": "<EMAIL>",
"firstname": "Test",
"lastname": "User",
"username": "test",
# Random characters are appended for unique
# username
"password": "password",
},
"service_offering": {
"name": "Tiny Instance",
"displaytext": "Tiny Instance",
"cpunumber": 1,
"cpuspeed": 100,
"memory": 64,
},
"service_offering_1": {
"name": "Tiny Instance- tagged host 1",
"displaytext": "Tiny off-tagged host2",
"cpunumber": 1,
"cpuspeed": 100,
"memory": 64,
"hosttags": "hosttag1"
},
"service_offering_2": {
"name": "Tiny Instance- tagged host 2",
"displaytext": "Tiny off-tagged host2",
"cpunumber": 1,
"cpuspeed": 100,
"memory": 64,
"hosttags": "hosttag2"
},
"network_offering": {
"name": 'VPC Network offering',
"displaytext": 'VPC Network off',
"guestiptype": 'Isolated',
"supportedservices": 'Dhcp,Dns,SourceNat,PortForwarding,Lb,UserData,StaticNat,NetworkACL',
"traffictype": 'GUEST',
"availability": 'Optional',
"useVpc": 'on',
"serviceProviderList": {
"Dhcp": 'VpcVirtualRouter',
"Dns": 'VpcVirtualRouter',
"SourceNat": 'VpcVirtualRouter',
"PortForwarding": 'VpcVirtualRouter',
"Lb": 'VpcVirtualRouter',
"UserData": 'VpcVirtualRouter',
"StaticNat": 'VpcVirtualRouter',
"NetworkACL": 'VpcVirtualRouter'
},
},
"network_offering_no_lb": {
"name": 'VPC Network offering',
"displaytext": 'VPC Network off',
"guestiptype": 'Isolated',
"supportedservices": 'Dhcp,Dns,SourceNat,PortForwarding,UserData,StaticNat,NetworkACL',
"traffictype": 'GUEST',
"availability": 'Optional',
"useVpc": 'on',
"serviceProviderList": {
"Dhcp": 'VpcVirtualRouter',
"Dns": 'VpcVirtualRouter',
"SourceNat": 'VpcVirtualRouter',
"PortForwarding": 'VpcVirtualRouter',
"UserData": 'VpcVirtualRouter',
"StaticNat": 'VpcVirtualRouter',
"NetworkACL": 'VpcVirtualRouter'
},
},
"network_off_shared": {
"name": 'Shared Network offering',
"displaytext": 'Shared Network offering',
"guestiptype": 'Shared',
"traffictype": 'GUEST',
"availability": 'Optional',
"useVpc": 'on',
"specifyIpRanges": True,
"specifyVlan": True
},
"vpc_offering": {
"name": 'VPC off',
"displaytext": 'VPC off',
"supportedservices": 'Dhcp,Dns,SourceNat,PortForwarding,Lb,UserData,StaticNat',
},
"vpc": {
"name": "TestVPC",
"displaytext": "TestVPC",
"cidr": '10.0.0.1/24'
},
"network": {
"name": "Test Network",
"displaytext": "Test Network",
"netmask": '255.255.255.0',
"limit": 5,
# Max networks allowed as per hypervisor
# Xenserver -> 5, VMWare -> 9
},
"lbrule": {
"name": "SSH",
"alg": "leastconn",
# Algorithm used for load balancing
"privateport": 22,
"publicport": 2222,
"openfirewall": False,
"startport": 2222,
"endport": 2222,
"protocol": "TCP",
"cidrlist": '0.0.0.0/0',
},
"natrule": {
"privateport": 22,
"publicport": 22,
"startport": 22,
"endport": 22,
"protocol": "TCP",
"cidrlist": '0.0.0.0/0',
},
"fw_rule": {
"startport": 1,
"endport": 6000,
"cidr": '0.0.0.0/0',
# Any network (For creating FW rule)
"protocol": "TCP"
},
"http_rule": {
"startport": 80,
"endport": 80,
"cidrlist": '0.0.0.0/0',
"protocol": "ICMP"
},
"virtual_machine": {
"displayname": "Test VM",
"username": "root",
"password": "password",
"ssh_port": 22,
"hypervisor": 'XenServer',
# Hypervisor type should be same as
# hypervisor type of cluster
"privateport": 22,
"publicport": 22,
"protocol": 'TCP',
"userdata": 'This is sample data',
},
"ostype": 'CentOS 5.3 (64-bit)',
# Cent OS 5.3 (64 bit)
"sleep": 60,
"timeout": 30,
"mode": 'advanced'
}
class TestVMLifeCycleHostmaintenance(cloudstackTestCase):
@classmethod
def setUpClass(cls):
cls.testClient = super(TestVMLifeCycleHostmaintenance, cls).getClsTestClient()
cls.api_client = cls.testClient.getApiClient()
cls.services = Services().services
# Get Zone, Domain and templates
cls.domain = get_domain(cls.api_client)
cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
cls.template = get_template(
cls.api_client,
cls.zone.id,
cls.services["ostype"]
)
cls.hypervisor = cls.testClient.getHypervisorInfo()
if cls.hypervisor.lower() in ['lxc']:
raise unittest.SkipTest("Template creation from root volume is not supported in LXC")
cls.services["virtual_machine"]["zoneid"] = cls.zone.id
cls.services["virtual_machine"]["template"] = cls.template.id
clusterWithSufficientHosts = None
clusters = Cluster.list(cls.api_client, zoneid=cls.zone.id)
for cluster in clusters:
cls.hosts = Host.list(cls.api_client, clusterid=cluster.id)
if len(cls.hosts) >= 2:
clusterWithSufficientHosts = cluster
break
if clusterWithSufficientHosts is None:
raise unittest.SkipTest("No Cluster with 2 hosts found")
Host.update(cls.api_client, id=cls.hosts[0].id, hosttags="hosttag1")
Host.update(cls.api_client, id=cls.hosts[1].id, hosttags="hosttag2")
cls.service_offering_1 = ServiceOffering.create(
cls.api_client,
cls.services["service_offering_1"]
)
cls.service_offering_2 = ServiceOffering.create(
cls.api_client,
cls.services["service_offering_2"]
)
cls.vpc_off = VpcOffering.create(
cls.api_client,
cls.services["vpc_offering"]
)
cls.vpc_off.update(cls.api_client, state='Enabled')
cls.account = Account.create(
cls.api_client,
cls.services["account"],
admin=True,
domainid=cls.domain.id
)
cls.vpc_off = VpcOffering.create(
cls.api_client,
cls.services["vpc_offering"]
)
cls.vpc_off.update(cls.api_client, state='Enabled')
cls.services["vpc"]["cidr"] = '10.1.1.1/16'
cls.vpc = VPC.create(
cls.api_client,
cls.services["vpc"],
vpcofferingid=cls.vpc_off.id,
zoneid=cls.zone.id,
account=cls.account.name,
domainid=cls.account.domainid
)
cls.nw_off = NetworkOffering.create(
cls.api_client,
cls.services["network_offering"],
conservemode=False
)
# Enable Network offering
cls.nw_off.update(cls.api_client, state='Enabled')
# Creating network using the network offering created
cls.network_1 = Network.create(
cls.api_client,
cls.services["network"],
accountid=cls.account.name,
domainid=cls.account.domainid,
networkofferingid=cls.nw_off.id,
zoneid=cls.zone.id,
gateway='10.1.1.1',
vpcid=cls.vpc.id
)
cls.nw_off_no_lb = NetworkOffering.create(
cls.api_client,
cls.services["network_offering_no_lb"],
conservemode=False
)
# Enable Network offering
cls.nw_off_no_lb.update(cls.api_client, state='Enabled')
# Creating network using the network offering created
cls.network_2 = Network.create(
cls.api_client,
cls.services["network"],
accountid=cls.account.name,
domainid=cls.account.domainid,
networkofferingid=cls.nw_off_no_lb.id,
zoneid=cls.zone.id,
gateway='10.1.2.1',
vpcid=cls.vpc.id
)
# Spawn an instance in that network
cls.vm_1 = VirtualMachine.create(
cls.api_client,
cls.services["virtual_machine"],
accountid=cls.account.name,
domainid=cls.account.domainid,
serviceofferingid=cls.service_offering_1.id,
networkids=[str(cls.network_1.id)]
)
# Spawn an instance in that network
cls.vm_2 = VirtualMachine.create(
cls.api_client,
cls.services["virtual_machine"],
accountid=cls.account.name,
domainid=cls.account.domainid,
serviceofferingid=cls.service_offering_1.id,
networkids=[str(cls.network_1.id)]
)
cls.vm_3 = VirtualMachine.create(
cls.api_client,
cls.services["virtual_machine"],
accountid=cls.account.name,
domainid=cls.account.domainid,
serviceofferingid=cls.service_offering_2.id,
networkids=[str(cls.network_2.id)]
)
routers = Router.list(
cls.api_client,
account=cls.account.name,
domainid=cls.account.domainid,
listall=True
)
if isinstance(routers, list):
cls.vpcvr = routers[0]
cls._cleanup = [
cls.service_offering_1,
cls.service_offering_2,
cls.nw_off,
cls.nw_off_no_lb,
]
return
@classmethod
def tearDownClass(cls):
try:
#Delete the host tags
Host.update(cls.api_client, id=cls.hosts[0].id, hosttags="")
Host.update(cls.api_client, id=cls.hosts[1].id, hosttags="")
cls.account.delete(cls.api_client)
wait_for_cleanup(cls.api_client, ["account.cleanup.interval"])
#Cleanup resources used
cleanup_resources(cls.api_client, cls._cleanup)
cls.vpc_off.delete(cls.api_client)
except Exception as e:
raise Exception("Warning: Exception during cleanup : %s" % e)
return
def setUp(self):
self.apiclient = self.testClient.getApiClient()
self.dbclient = self.testClient.getDbConnection()
self.debug("Check the status of VPC virtual router")
routers = Router.list(
self.apiclient,
networkid=self.network_1.id,
listall=True
)
if not isinstance(routers, list):
raise Exception("No response from list routers API")
self.router = routers[0]
if self.router.state == "Running":
self.debug("Verified that the Router is in Running State")
self.cleanup = []
return
def tearDown(self):
try:
#Clean up, terminate the created network offerings
cleanup_resources(self.apiclient, self.cleanup)
except Exception as e:
raise Exception("Warning: Exception during cleanup : %s" % e)
return
def validate_vm_deployment(self):
"""Validates VM deployment on different hosts"""
vms = VirtualMachine.list(
self.apiclient,
account=self.account.name,
domainid=self.account.domainid,
networkid=self.network_1.id,
listall=True
)
self.assertEqual(
isinstance(vms, list),
True,
"List VMs shall return a valid response"
)
host_1 = vms[0].hostid
self.debug("Host for network 1: %s" % vms[0].hostid)
vms = VirtualMachine.list(
self.apiclient,
account=self.account.name,
domainid=self.account.domainid,
networkid=self.network_2.id,
listall=True
)
self.assertEqual(
isinstance(vms, list),
True,
"List VMs shall return a valid response"
)
host_2 = vms[0].hostid
self.debug("Host for network 2: %s" % vms[0].hostid)
self.assertNotEqual(
host_1,
host_2,
"Both the virtual machines should be deployed on diff hosts "
)
return
@attr(tags=["advanced", "intervlan"])
def test_01_enable_maintenance_with_vpc_nw(self):
""" Test enable Maintenance Mode on Hosts which have VPC elements
"""
# Validate the following
# 1. Create a VPC with cidr - 10.1.1.1/16
# 2. Add network1(10.1.1.1/24) and network2(10.1.2.1/24) to this VPC.
# 3. Deploy vm1 and vm2 in network1 and vm3 and vm4 in network2. Make
# sure vm1 and vm3 are deployed on one host in the cluster while
# vm2 and vm4 are deployed on the other host in the cluster. This
# can be done using host's tags & service offerings with host tags
# Steps:
# 1.Enable Maintenance on one of host on which VPCVR is present
# Validations:
# 1. Successfully push the host into maintenance mode.
# 2. VMs present on the above host should successfully migrate to the
# other host present in the cluster
Host.update(self.apiclient, id=self.hosts[0].id, hosttags="hosttag1,hosttag2")
Host.update(self.apiclient, id=self.hosts[1].id, hosttags="hosttag1,hosttag2")
self.validate_vm_deployment()
self.debug("Stop the host on which the VPC virtual router is running")
try:
Host.enableMaintenance(self.apiclient, id=self.vpcvr.hostid)
except Exception as e:
self.fail("Failed to enable maintenance mode on host: %s" % e)
self.debug(
"Check if all instances belonging to the account are up again?")
routers = Router.list(
self.apiclient,
account=self.account.name,
domainid=self.account.domainid,
listall=True
)
self.assertEqual(
isinstance(routers, list),
True,
"List routers shall return a valid VPCVR for account"
)
router = routers[0]
try:
timeout = self.services["timeout"]
self.debug("Timeout Value %d : " % timeout)
while True:
list_router_response = Router.list(
self.apiclient,
id = router.id,
state = "Running"
)
if list_router_response is not None:
break
elif timeout == 0:
raise Exception("Router state should be running after migration")
time.sleep(self.services["sleep"])
timeout = timeout - 1
self.debug("Waiting for %d seconds - %d tries left" % (self.services["sleep"],timeout))
self.debug("Verified that the Router is in Running State")
except Exception as e:
self.fail("Failed to find the Router in Running state %s " % e)
vms = VirtualMachine.list(
self.apiclient,
account=self.account.name,
domainid=self.account.domainid,
listall=True
)
self.assertEqual(
isinstance(vms, list),
True,
"VM response should return instances running for account"
)
for vm in vms:
self.assertEqual(
vm.state,
"Running",
"Vm state should be running after migration"
)
return
@attr(tags=["advanced", "intervlan"])
def test_02_cancel_maintenance(self):
""" Test cancel Maintenance Mode on the above Hosts + Migrate VMs Back
"""
# Steps
# 1. Cancel Maintenance Mode on the host.
# 2. Migrate the VMs back onto the host on which Maintenance mode is
# cancelled.
# Validate the following
# 1. Successfully cancel the Maintenance mode on the host.
# 2. Migrate the VMs back successfully onto the host.
# 3. Check that the network connectivity exists with the migrated VMs.
try:
timeout = self.services["timeout"]
while True:
list_host_response = Host.list(
self.apiclient,
id=self.vpcvr.hostid,
resourcestate="Maintenance")
if list_host_response is not None:
break
elif timeout == 0:
raise Exception("Failed to list the Host in Maintenance State")
time.sleep(self.services["sleep"])
timeout = timeout - 1
self.debug("Verified that the Host is in Maintenance State")
except:
self.fail("Failed to find the Host in maintenance state")
self.debug("Cancel host maintenence on which the VPCVR is running")
try:
Host.cancelMaintenance(self.apiclient, id=self.vpcvr.hostid)
timeout = self.services["timeout"]
while True:
list_host_response = Host.list(
self.apiclient,
id=self.vpcvr.hostid,
state="Up")
if list_host_response is not None:
break
elif timeout == 0:
raise Exception("Failed to list the Host in Up State after Canceling Maintenance Mode")
time.sleep(self.services["sleep"])
timeout = timeout - 1
self.debug("Verified that the Host is in Up State after Canceling Maintenance Mode")
except Exception as e:
self.fail("Failed to cancel maintenance mode on host: %s" % e)
self.debug(
"Migrating the instances back to the host: %s" %
self.vpcvr.hostid)
try:
cmd = migrateSystemVm.migrateSystemVmCmd()
cmd.hostid = self.vpcvr.hostid
cmd.virtualmachineid = self.vpcvr.id
self.apiclient.migrateSystemVm(cmd)
except Exception as e:
self.fail("Failed to migrate VPCVR back: %s" % e)
self.debug("Check the status of router after migration")
routers = Router.list(
self.apiclient,
id=self.vpcvr.id,
listall=True
)
self.assertEqual(
isinstance(routers, list),
True,
"List routers shall return the valid response"
)
self.assertEqual(
routers[0].state,
"Running",
"Router state should be running"
)
# TODO: Check for the network connectivity
return
@attr(tags=["advanced", "intervlan"])
def test_03_reconnect_host(self):
""" Test reconnect Host which has VPC elements
"""
# Steps:
# 1.Reconnect one of the host on which VPC Virtual Router is present.
# Validate the following
# 1. Host should successfully reconnect.
# 2. Network connectivity to all the VMs on the host should not be
# effected due to reconnection.
try:
timeout = self.services["timeout"]
while True:
list_host_response = Host.list(
self.apiclient,
id=self.vpcvr.hostid,
resourcestate="Enabled")
if list_host_response is not None:
break
elif timeout == 0:
raise Exception("Failed to list the Host in Up State")
time.sleep(self.services["sleep"])
timeout = timeout - 1
self.debug("Verified that the Host is in Up State")
except:
self.fail("Failed to find the Host in Up State")
self.debug("Reconnecting the host where VPC VR is running")
try:
Host.reconnect(self.apiclient, id=self.vpcvr.hostid)
except Exception as e:
self.fail("Failed to reconnect to host: %s" % e)
self.debug("Check the status of router after migration")
routers = Router.list(
self.apiclient,
id=self.vpcvr.id,
listall=True
)
self.assertEqual(
isinstance(routers, list),
True,
"List routers shall return the valid response"
)
self.assertEqual(
routers[0].state,
"Running",
"Router state should be running"
)
# TODO: Check for the network connectivity
return
| python |
<gh_stars>0
{
"name": "wg-system",
"version": "0.1.0",
"private": true,
"description": "Management system for flat sharing",
"type": "module",
"main": "build/server.js",
"workspaces": [
"backend",
"frontend"
],
"scripts": {
"build-all": "npm run build --workspaces --if-present && npm run build",
"build": "rimraf build && tsc",
"start": "npm run build-all && npm run production",
"production": "node build/server.js",
"dev": "npm start -w frontend",
"lint-all": "npm run lint --workspaces --if-present",
"lint-fix-all": "npm run lint-fix --workspaces --if-present"
},
"engines": {
"node": ">=16.0.0"
},
"repository": {
"type": "git",
"url": "git+https://github.com/meyfa/wg-system.git"
},
"author": "<NAME>",
"license": "MIT",
"bugs": {
"url": "https://github.com/meyfa/wg-system/issues"
},
"homepage": "https://github.com/meyfa/wg-system#readme",
"devDependencies": {
"@types/express": "4.17.13",
"@types/node": "16.11.38",
"@types/ws": "8.5.3",
"eslint": "7.32.0",
"eslint-config-standard-with-typescript": "21.0.1",
"eslint-plugin-import": "2.26.0",
"eslint-plugin-node": "11.1.0",
"eslint-plugin-promise": "5.2.0",
"rimraf": "3.0.2",
"typescript": "4.7.3"
},
"dependencies": {
"express": "4.18.1",
"omniwheel": "0.2.0",
"ws": "8.7.0"
}
}
| json |
#include <Windows.h>
#include <bitset>
#include <cstdlib>
#include <exception>
#include <iostream>
#include <memory>
#include <optional>
#include <string>
using namespace std::string_literals;
class arguments
{
private:
std::optional<size_t> job_commit_megabytes_;
std::optional<size_t> process_commit_megabytes_;
std::optional<size_t> process_ws_megabytes_;
std::optional<size_t> cpu_seconds_;
std::optional<unsigned int> num_procs_;
std::optional<bool> breakaway_;
std::optional<size_t> affinity_;
std::optional<unsigned int> priority_;
std::optional<unsigned int> sched_class_;
std::optional<unsigned int> cpu_rate_;
std::optional<unsigned int> cpu_weight_;
std::optional<unsigned int> ui_restrictions_;
std::wstring application_;
int argc_;
wchar_t** argv_;
int current_;
public:
arguments(int argc, wchar_t** argv)
: argc_(argc), argv_(argv)
{
if (argc < 2)
usage();
parse();
}
std::optional<size_t> const& job_commit_megabytes() const { return job_commit_megabytes_; }
std::optional<size_t> const& process_commit_megabytes() const { return process_commit_megabytes_; }
std::optional<size_t> const& process_ws_megabytes() const { return process_ws_megabytes_; }
std::optional<size_t> const& cpu_seconds() const { return cpu_seconds_; }
std::optional<unsigned int> const& num_procs() const { return num_procs_; }
std::optional<bool> const& breakaway() const { return breakaway_; }
std::optional<size_t> const& affinity() const { return affinity_; }
std::optional<unsigned int> const& priority() const { return priority_; }
std::optional<unsigned int> const& sched_class() const { return sched_class_; }
std::optional<unsigned int> const& cpu_rate() const { return cpu_rate_; }
std::optional<unsigned int> const& cpu_weight() const { return cpu_weight_; }
std::optional<unsigned int> const& ui_restrictions() const { return ui_restrictions_; }
std::wstring application() const { return application_; }
private:
void parse()
{
for (current_ = 1; current_ < argc_; ++current_)
{
if (argv_[current_] == L"-M"s)
{
job_commit_megabytes_ = parse_uint();
}
else if (argv_[current_] == L"-m"s)
{
process_commit_megabytes_ = parse_uint();
}
else if (argv_[current_] == L"-w"s)
{
process_ws_megabytes_ = parse_uint();
}
else if (argv_[current_] == L"-c"s)
{
cpu_seconds_ = parse_uint();
}
else if (argv_[current_] == L"-n"s)
{
num_procs_ = static_cast<unsigned int>(parse_uint());
}
else if (argv_[current_] == L"-b"s)
{
breakaway_ = parse_bool();
}
else if (argv_[current_] == L"-a"s)
{
affinity_ = parse_uint();
}
else if (argv_[current_] == L"-p"s)
{
priority_ = static_cast<unsigned int>(parse_uint());
}
else if (argv_[current_] == L"-s"s)
{
sched_class_ = static_cast<unsigned int>(parse_uint());
if (sched_class_.value() < 0 || sched_class_.value() > 9)
{
std::cout << "Scheduling class value must be 0-9, but got: " << sched_class_.value() << '\n';
usage();
}
}
else if (argv_[current_] == L"-r"s)
{
cpu_rate_ = static_cast<unsigned int>(parse_uint());
if (cpu_rate_.value() <= 0 || cpu_rate_.value() > 100)
{
std::cout << "CPU rate must be 1-100 (%), but got: " << cpu_rate_.value() << '\n';
usage();
}
}
else if (argv_[current_] == L"-t"s)
{
cpu_weight_ = static_cast<unsigned int>(parse_uint());
if (cpu_weight_.value() < 1 || cpu_weight_.value() > 9)
{
std::cout << "Scheduling weight must be 1-9, but got: " << cpu_weight_.value() << '\n';
usage();
}
}
else if (argv_[current_] == L"-u"s)
{
ui_restrictions_ = static_cast<unsigned int>(parse_uint());
}
else
{
application_ = argv_[current_];
}
}
if (application_.empty())
{
std::cout << "Expected: application name\n";
usage();
}
}
size_t parse_uint()
{
if (current_ == argc_ - 1)
{
std::cout << "Expected: integer value\n";
usage();
}
++current_;
auto value = std::wcstoul(argv_[current_], nullptr, 10);
if (value == 0)
{
std::cout << "Expected: integer value, found '" << argv_[current_] << "'\n";
usage();
}
return value;
}
bool parse_bool()
{
if (current_ == argc_ - 1)
{
std::cout << "Expected: Boolean value (\"yes\" or \"no\")\n";
usage();
}
++current_;
if (argv_[current_] == L"yes"s)
{
return true;
}
else if (argv_[current_] == L"no"s)
{
return false;
}
else
{
std::cout << "Expected: Boolean value (\"yes\" or \"no\"), found '" << argv_[current_] << "'\n";
usage();
}
}
[[noreturn]] void usage()
{
std::cout << '\n';
std::cout << "jobrun - run a process inside a job and limit its behavior\n";
std::cout << " copyright (C) 2017 <NAME>\n";
std::cout << '\n';
std::cout << "USAGE: jobrun [-M MEGABYTES] [-m MEGABYTES] [-w MEGABYTES] [-c SECONDS]\n";
std::cout << " [-n NUMPROCS] [-b yes|no] [-a AFFINITY] [-p PRIORITY]\n";
std::cout << " [-s SCHEDCLASS] [-r CPURATE] [-t CPUWEIGHT] [-u UIRESTRS]\n";
std::cout << " <application>\n";
std::cout << '\n';
std::cout << " -M MEGABYTES Limit the total committed memory of the job's processes\n";
std::cout << " -m MEGABYTES Limit the committed memory of each of the job's processes\n";
std::cout << " -w MEGABYTES Limit the process working set of each of the job's processes (soft limit)\n";
std::cout << " -c SECONDS Limit the total CPU time of the job's processes\n";
std::cout << " -n NUMPROCS Limit the number of processes in the job\n";
std::cout << " -b yes|no Allow job processes to break away\n";
std::cout << " -a AFFINITY Set the processor affinity of the job's processes\n";
std::cout << " -p PRIORITY Set the priority class of the job's processes\n";
std::cout << " -s SCHEDCLASS Set the scheduling class (0-9) of the job's processes\n";
std::cout << " -r CPURATE Set the portion (%) of the CPU cycles this job's threads can use\n";
std::cout << " -t CPUWEIGHT Set the scheduling weight (1-9) of the job object\n";
std::cout << " -u UIRESTRS Set the UI restriction class for the job's processes, a bitmask:\n";
std::cout << " 1 - prevent using USER handles from other processes\n";
std::cout << " 2 - prevent reading the clipboard\n";
std::cout << " 4 - prevent writing the clipboard\n";
std::cout << " 8 - prevent changing system parameters with SystemParametersInfo\n";
std::cout << " 16 - prevent changing display settings with ChangeDisplaySettings\n";
std::cout << " 32 - prevent accessing global atoms\n";
std::cout << " 64 - prevent creating desktops and switching desktops\n";
std::cout << " 128 - prevent shutting down or restarting with ExitWindows(Ex)\n";
std::cout << '\n';
std::exit(1);
}
};
std::wostream& operator<<(std::wostream& os, arguments const& args)
{
os << "Launching application '" << args.application() << "'\n";
if (args.job_commit_megabytes())
os << " with committed memory limit of " << args.job_commit_megabytes().value() << "MB\n";
if (args.process_commit_megabytes())
os << " with committed memory limit of " << args.process_commit_megabytes().value() << "MB\n";
if (args.process_ws_megabytes())
os << " with working set memory limit of " << args.process_ws_megabytes().value() << "MB\n";
if (args.cpu_seconds())
os << " with CPU limit of " << args.cpu_seconds().value() << " seconds\n";
if (args.num_procs())
os << " with maximum of " << args.num_procs().value() << " active processes\n";
os << " " << (args.breakaway() ? "allowing" : "not allowing") << " breakaway\n";
if (args.affinity())
{
auto affinity = args.affinity().value();
os << " with processor affinity of " << std::bitset<8 * sizeof(affinity)>(affinity) << '\n';
}
if (args.priority())
os << " with priority class of " << args.priority().value() << '\n';
if (args.sched_class())
os << " with scheduling class of " << args.sched_class().value() << '\n';
if (args.cpu_rate())
os << " with CPU rate of " << args.cpu_rate().value() << "%\n";
if (args.cpu_weight())
os << " with CPU weight of " << args.cpu_weight().value() << '\n';
if (args.ui_restrictions())
os << " with UI restrictions of " << std::bitset<7>(args.ui_restrictions().value()) << '\n';
return os;
}
class job_exception : public std::exception
{
private:
DWORD error_;
public:
job_exception(char const* message) : job_exception(message, GetLastError())
{
}
job_exception(char const* message, DWORD error) : std::exception(message), error_(error)
{
}
DWORD error() const { return error_; }
};
class job
{
private:
HANDLE job_;
public:
job()
{
job_ = CreateJobObject(nullptr, nullptr);
if (job_ == nullptr)
throw job_exception("CreateJobObject failed");
JOBOBJECT_EXTENDED_LIMIT_INFORMATION info = { 0 };
info.BasicLimitInformation.LimitFlags = JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE; // TODO Doesn't seem to work
if (FALSE == SetInformationJobObject(job_, JobObjectExtendedLimitInformation, &info, sizeof(info)))
throw job_exception("SetInformationJobObject failed when setting JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE");
}
void set_job_commit_limit(size_t megabytes)
{
JOBOBJECT_EXTENDED_LIMIT_INFORMATION info = { 0 };
info.JobMemoryLimit = megabytes * 1048576;
info.BasicLimitInformation.LimitFlags = JOB_OBJECT_LIMIT_JOB_MEMORY;
if (FALSE == SetInformationJobObject(job_, JobObjectExtendedLimitInformation, &info, sizeof(info)))
throw job_exception("SetInformationJobObject failed when setting JOB_OBJECT_LIMIT_JOB_MEMORY");
}
void set_process_commit_limit(size_t megabytes)
{
JOBOBJECT_EXTENDED_LIMIT_INFORMATION info = { 0 };
info.ProcessMemoryLimit = megabytes * 1048576;
info.BasicLimitInformation.LimitFlags = JOB_OBJECT_LIMIT_PROCESS_MEMORY;
if (FALSE == SetInformationJobObject(job_, JobObjectExtendedLimitInformation, &info, sizeof(info)))
throw job_exception("SetInformationJobObject failed when setting JOB_OBJECT_LIMIT_PROCESS_MEMORY");
}
void set_ws_limit(size_t megabytes)
{
JOBOBJECT_BASIC_LIMIT_INFORMATION info = { 0 };
info.MinimumWorkingSetSize = (megabytes / 2) * 1048576;
info.MaximumWorkingSetSize = megabytes * 1048576;
info.LimitFlags = JOB_OBJECT_LIMIT_WORKINGSET;
if (FALSE == SetInformationJobObject(job_, JobObjectBasicLimitInformation, &info, sizeof(info)))
throw job_exception("SetInformationJobObject failed when setting JOB_OBJECT_LIMIT_WORKINGSET");
}
void set_cpu(size_t seconds)
{
JOBOBJECT_BASIC_LIMIT_INFORMATION info = { 0 };
info.PerJobUserTimeLimit.QuadPart = seconds * 10000000;
info.LimitFlags = JOB_OBJECT_LIMIT_JOB_TIME;
if (FALSE == SetInformationJobObject(job_, JobObjectBasicLimitInformation, &info, sizeof(info)))
throw job_exception("SetInformationJobObject failed when setting JOB_OBJECT_LIMIT_JOB_TIME");
}
void set_num_procs(unsigned int num_procs)
{
JOBOBJECT_BASIC_LIMIT_INFORMATION info = { 0 };
info.ActiveProcessLimit = num_procs;
info.LimitFlags = JOB_OBJECT_LIMIT_ACTIVE_PROCESS;
if (FALSE == SetInformationJobObject(job_, JobObjectBasicLimitInformation, &info, sizeof(info)))
throw job_exception("SetInformationJobObject failed when setting JOB_OBJECT_LIMIT_ACTIVE_PROCESS");
}
void set_breakaway(bool breakaway)
{
if (breakaway)
{
JOBOBJECT_EXTENDED_LIMIT_INFORMATION info = { 0 };
info.BasicLimitInformation.LimitFlags = JOB_OBJECT_LIMIT_BREAKAWAY_OK;
if (FALSE == SetInformationJobObject(job_, JobObjectExtendedLimitInformation, &info, sizeof(info)))
throw job_exception("SetInformationJobObject failed when setting JOB_OBJECT_LIMIT_BREAKAWAY_OK");
}
}
void set_affinity(size_t affinity)
{
JOBOBJECT_BASIC_LIMIT_INFORMATION info = { 0 };
info.Affinity = affinity;
info.LimitFlags = JOB_OBJECT_LIMIT_AFFINITY;
if (FALSE == SetInformationJobObject(job_, JobObjectBasicLimitInformation, &info, sizeof(info)))
throw job_exception("SetInformationJobObject failed when setting JOB_OBJECT_LIMIT_AFFINITY");
}
void set_priority(unsigned int priority)
{
JOBOBJECT_BASIC_LIMIT_INFORMATION info = { 0 };
info.PriorityClass = priority;
info.LimitFlags = JOB_OBJECT_LIMIT_PRIORITY_CLASS;
if (FALSE == SetInformationJobObject(job_, JobObjectBasicLimitInformation, &info, sizeof(info)))
throw job_exception("SetInformationJobObject failed when setting JOB_OBJECT_LIMIT_PRIORITY_CLASS");
}
void set_sched_class(unsigned int sched_class)
{
JOBOBJECT_BASIC_LIMIT_INFORMATION info = { 0 };
info.SchedulingClass = sched_class;
info.LimitFlags = JOB_OBJECT_LIMIT_SCHEDULING_CLASS;
if (FALSE == SetInformationJobObject(job_, JobObjectBasicLimitInformation, &info, sizeof(info)))
throw job_exception("SetInformationJobObject failed when setting JOB_OBJECT_LIMIT_SCHEDULING_CLASS");
}
void set_cpu_rate(unsigned int cpu_rate)
{
JOBOBJECT_CPU_RATE_CONTROL_INFORMATION info = { 0 };
info.ControlFlags = JOB_OBJECT_CPU_RATE_CONTROL_ENABLE | JOB_OBJECT_CPU_RATE_CONTROL_HARD_CAP;
info.CpuRate = cpu_rate * 100;
if (FALSE == SetInformationJobObject(job_, JobObjectCpuRateControlInformation, &info, sizeof(info)))
throw job_exception("SetInformationJobObject failed when setting JOB_OBJECT_CPU_RATE_CONTROL_HARD_CAP");
}
void set_cpu_weight(unsigned int cpu_weight)
{
JOBOBJECT_CPU_RATE_CONTROL_INFORMATION info = { 0 };
info.ControlFlags = JOB_OBJECT_CPU_RATE_CONTROL_ENABLE | JOB_OBJECT_CPU_RATE_CONTROL_WEIGHT_BASED;
info.Weight = cpu_weight;
if (FALSE == SetInformationJobObject(job_, JobObjectCpuRateControlInformation, &info, sizeof(info)))
throw job_exception("SetInformationJobObject failed when setting JOB_OBJECT_CPU_RATE_CONTROL_WEIGHT_BASED");
}
void set_ui_restrictions(unsigned ui_restrictions)
{
JOBOBJECT_BASIC_UI_RESTRICTIONS restrictions = { 0 };
restrictions.UIRestrictionsClass = ui_restrictions;
if (FALSE == SetInformationJobObject(job_, JobObjectBasicUIRestrictions, &restrictions, sizeof(restrictions)))
throw job_exception("SetInformationJobObject failed when setting JobObjectBasicUIRestrictions");
}
void run_process_in_job(std::wstring const& application)
{
std::unique_ptr<wchar_t[]> cmd(new wchar_t[application.size() + 1]);
wcscpy_s(cmd.get(), application.size() + 1, application.c_str());
STARTUPINFO si = { 0 };
PROCESS_INFORMATION pi = { 0 };
if (FALSE == CreateProcess(nullptr, cmd.get(), nullptr, nullptr, FALSE,
CREATE_NEW_CONSOLE | CREATE_SUSPENDED, nullptr, nullptr, &si, &pi))
{
throw job_exception("CreateProcess failed");
}
if (FALSE == AssignProcessToJobObject(job_, pi.hProcess))
throw job_exception("AssignProcessToJobObject failed");
if (static_cast<DWORD>(-1) == ResumeThread(pi.hThread))
throw job_exception("ResumeThread failed");
CloseHandle(pi.hProcess);
}
~job()
{
CloseHandle(job_);
}
};
int wmain(int argc, wchar_t* argv[])
{
arguments args(argc, argv);
std::wcout << args;
try
{
job job;
if (args.job_commit_megabytes())
job.set_job_commit_limit(args.job_commit_megabytes().value());
if (args.process_commit_megabytes())
job.set_process_commit_limit(args.process_commit_megabytes().value());
if (args.process_ws_megabytes())
job.set_ws_limit(args.process_ws_megabytes().value());
if (args.cpu_seconds())
job.set_cpu(args.cpu_seconds().value());
if (args.num_procs())
job.set_num_procs(args.num_procs().value());
if (args.breakaway())
job.set_breakaway(args.breakaway().value());
if (args.affinity())
job.set_affinity(args.affinity().value());
if (args.priority())
job.set_priority(args.priority().value());
if (args.sched_class())
job.set_sched_class(args.sched_class().value());
if (args.cpu_rate())
job.set_cpu_rate(args.cpu_rate().value());
if (args.cpu_weight())
job.set_cpu_weight(args.cpu_weight().value());
if (args.ui_restrictions())
job.set_ui_restrictions(args.ui_restrictions().value());
job.run_process_in_job(args.application());
std::cout << "Press ENTER to exit the job\n";
std::cin.get();
}
catch (job_exception& je)
{
std::cout << je.what() << " with error code: " << je.error() << '\n';
}
return 0;
} | cpp |
<filename>Data/Bundesfinanzministerium/Press_reports/Pressemitteilung_2013-06-05_378.json
{"id": 378, "url": "https://web.archive.org/web/2020/http://www.bundesfinanzministerium.de/Content/DE/Pressemitteilungen/Finanzpolitik/2013/06/2013-06-05-PM39.html", "author": null, "title": "Vermittlungsausschuss macht den Weg für wichtige Änderungen im Steuerrecht frei", "text": "Nach der Einigung im Vermittlungsausschuss vom 5. Juni 2013 können wichtige Neuregelungen aus dem Jahressteuergesetz 2013 umgesetzt werden. \nDazu gehört insbesondere die Umsetzung des Urteils des Bundesverfassungsgerichts zur Grunderwerbsteuer bei Geschäften unter Lebenspartnern. Die private Nutzung von betrieblichen Elektrofahrzeugen wird künftig steuerlich günstiger bewertet. Für Arbeitnehmer wird es einfacher, einen Lohnsteuerfreibetrag geltend zu machen. Für freiwillig Wehrdienstleistende gelten steuerliche Neuregelungen, ihr Wehrsold bleibt auch in Zukunft steuerfrei. Weiterhin wird die geförderte private Altersvorsorge noch attraktiver gestaltet. Außerdem werden Steuergestaltungsmodelle eingeschränkt.\nDazu erklärt der Parlamentarische Staatssekretär im Bundesministerium der Finanzen Hartmut Koschyk:\n„Nach der überfälligen Einigung ist sichergestellt, dass Steueransprüche auch künftig gleichmäßig durchzusetzen sind, ohne dabei aber die steuerliche Wettbewerbsfähigkeit Deutschlands zu gefährden. Außerdem wird das Steuerrecht für die Bürger leichter handhabbar und die private Altersvorsorge besser gefördert.“\nMit der vorliegenden Einigung gehören drei Steuergestaltungsmodelle der Vergangenheit an: Dies sind das sogenannte Goldfinger-Modell, der RETT-Blocker und die erbschaftsteuerliche Cash-GmbH. Die Regelungen sollen kurzfristig in Kraft treten. Die bisherigen jährlichen Steuermindereinnahmen durch die drei Modelle wurden bisher auf einen dreistelligen Millionenbetrag geschätzt.\nDas sogenannte Goldfinger-Modell nutzt den negativen Progressionsvorbehalt aus. Künftig werden bei der Ermittlung von ausländischen Einkünften, die dem Progressionsvorbehalt unterliegen, Aufwendungen für den Erwerb von Umlaufvermögen erst im Zeitpunkt der Veräußerung der angeschafften Wirtschaftsgüter angerechnet. Damit können Steuerpflichtige, die der Reichensteuer unterliegen, nicht mehr in einem Jahr den negativen Progressionsvorbehalt zu ihren Gunsten ausnutzen, ohne dass sich im Anschluss eine korrespondierende Wirkung zu ihren Lasten ergibt.\nÜber RETT-Blocker als weiterer Käufer beim Erwerb von Immobilien konnte bisher Grunderwerbsteuer vermieden werden. Der Vermittlungsausschuss einigte sich darauf, dass dies nicht mehr möglich ist, wenn bei wirtschaftlicher Betrachtung die vom RETT-Blocker erworbenen Anteile an der Immobilie dem anderen Erwerber zuzurechnen sind.\nMit einer Cash-GmbH konnte bisher die Erbschaft- und Schenkungsteuer im Bereich der privaten Vermögensverwaltung teilweise vermieden werden. Damit wird verhindert, dass privates Vermögen in erbschaftsteuerlich begünstigtes Betriebsvermögen umgewandelt wird. Im Vermittlungsausschuss wurde vereinbart, wie betrieblich notwendiges und daher steuerlich begünstigtes Finanzvermögen von anderen Finanzmitteln im Einzelnen abzugrenzen ist. \nIm Rahmen des EU-Amtshilfegesetz wird weitgehend das bisher vom Bundesrat abgelehnte Jahressteuergesetz 2013 beschlossen. Damit werden bereits lang geplante zwingende Rechtsanpassungen vorgenommen. Arbeitnehmer können zudem die Geltungsdauer eines Freibetrages von einem auf zwei Jahre verlängern. Ebenso wie der Wehrsold freiwillig Wehrdienstleistender bleibt das für den Bundesfreiwilligendienst gezahlte Taschengeld steuerfrei. Weitere Bezüge wie der Wehrdienstzuschlag und besondere Zuwendungen werden dagegen steuerpflichtig.\nMit dem Altersvorsorge-Verbesserungsgesetz wird ein neues Produktinformationsblatt eingeführt, das beim Vergleich der verschiedenen Vorsorgeprodukte helfen wird. Zudem wird die Eigenheim-Rente vereinfacht, indem künftig in der Ansparphase jederzeit Kapital entnommen werden kann. \nSobald Bundestag und Bundesrat dem Vermittlungsvorschlag zustimmen, können die Gesetze in Kraft treten.", "published_date": "2013-06-05", "section": "Pressemitteilung"} | json |
<filename>src/apps/admin/src/assets/style/base.css
html {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
/*font-weight: 380;*/
}
body {
font-size: 13px;
background: #f7f7f7;
font-family: "Helvetica","Tahoma","Arial","PingFang SC","Microsoft JhengHei","SimSun","sans-serif";
}
a {
cursor: pointer;
}
.app_mask {
position: fixed;
width: 100%;
height: 100%;
z-index: -1;
top: 0;
left: 0;
background-repeat: no-repeat;
background-size: cover;
background-position: right bottom;
-webkit-transition: all .7s;
transition: all .7s;
}
.app_topbar {
display: none;
height: 50px;
position: fixed;
top: 0;
right: 0;
width: 100%;
z-index: 101;
}
.app_topbar .navbar {
margin-bottom: 0;
background: #17a2b8;
padding: 0 15px 0 0;
border-radius: 0;
border: none;
}
.app_topbar .navbar .navbar-brand {
background: #16AA93;
padding-left: 0px;
width: 160px;
color: #fff;
font-size: 14px;
text-align: center;
background: linear-gradient(60deg, #ec407a, #d81b60);
box-shadow: 0 4px 20px 0px rgba(0, 0, 0, 0.14), 0 7px 10px -5px rgba(233, 30, 99, 0.4);
}
.app_topbar .navbar-nav>li>a {
padding: 0;
height: 50px;
line-height: 50px;
}
.app_topbar .btn-group {
margin: 5px 1px;
}
.topbar_avatar {
border-radius: 50%;
cursor: pointer;
height: 40px;
}
.app_topbar .navbar-default .navbar-collapse,
.app_topbar .navbar-default .navbar-form {
background: none;
border: none;
}
.app_leftbar {
width: 180px;
position: fixed;
height: calc(100vh);
left: 0;
top: 0px;
background: #0066bc;
border-right: 1px solid rgba(255, 255, 255, 0.8);
box-shadow: 0 5px 15px rgba(0, 0, 0, .3);
}
.app_leftbar .navbar-default {
border-radius: 0;
background: transparent;
}
.app_leftbar .navbar-default .navbar-nav {
float: none;
}
.app_leftbar .navbar-default .navbar-nav>li {
text-align: left;
float: none;
border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}
.app_leftbar .navbar-default .navbar-nav>li>a {
display: block;
padding: 12px 15px;
color: #ccc;
text-decoration: none;
}
.app_leftbar .app_leftbar_sub_nav {
background: rgba(255, 255, 255, 0.15);
max-height: 0;
position: relative;
overflow: hidden;
-webkit-transition: max-height 0.3s;
-moz-transition: max-height 0.3s;
-o-transition: max-height 0.3s;
transition: max-height 0.3s;
}
.app_leftbar li.active .app_leftbar_sub_nav {
max-height: 280px;
}
.app_leftbar .navbar-default .navbar-nav>li.active>a,
.app_leftbar .navbar-default .navbar-nav>li:hover>a {
color: #fff;
}
.app_leftbar li.active .fa-angle-double-right:before {
content: "\f103";
color: #fff
}
.app_leftbar .app_leftbar_sub_nav li a {
padding: 12px 15px 12px 30px;
color: #fff;
font-size: 13px;
display: block;
text-decoration: none;
}
.app_leftbar .app_leftbar_sub_nav li a:hover {
background: rgba(0, 0, 0, 0.07);
}
.app_leftbar_rightico {
padding-right: 0px;
color: #777;
font-size: 12px;
line-height: 16px;
color: #ddd;
}
.icon-wrapper {
display: inline-block;
width: 18px;
}
.app_main {
/*margin-top: 50px;*/
margin-left: 190px;
padding: 10px;
}
.ant-layout {
background: #f7f7f7;
}
.ant-layout-header {
background: #05668D;
}
.ant-menu-dark,
.ant-menu-dark .ant-menu-sub {
background: #0066bc;
}
.ant-menu.ant-menu-dark .ant-menu-item-selected {
background: rgba(255, 255, 255, 0.15)
}
.ant-breadcrumb {
text-align: left;
}
.ant-breadcrumb a {
text-decoration: none;
}
.ant-breadcrumb>span:last-child {
font-weight: 450;
}
.ant-input {
height: 34px;
}
.ant-btn {
font-weight: 350;
line-height: 1
}
.text-center {
text-align: center;
}
.text-left {
text-align: left;
}
.text-right {
text-align: right;
}
.form-group {
padding: 5px 0;
}
.info-row {
padding: 8px 0;
}
.ant-card-head-title {
font-weight: 350;
}
.ant-layout-sider-collapsed .fa {
font-size: 16px;
margin-left: 8px;
}
.ant-layout-sider-collapsed>ul.ant-menu>li.ant-menu-item>.nav-text,
.ant-layout-sider-collapsed>ul.ant-menu>li.ant-menu-submenu div.ant-menu-submenu-title>span>.nav-text {
display: none;
}
.ant-layout-sider-trigger {
background: transparent;
position: fixed;
width: 180px;
}
.ant-layout-sider-collapsed .ant-layout-sider-trigger {
width: 64px;
}
.ant-menu-dark .ant-menu-inline.ant-menu-sub,
.ant-menu-dark .ant-menu-sub .ant-menu-vertical {
background: rgba(255, 255, 255, 0.07);
}
.ant-layout-sider-collapsed .ant-menu-submenu-inline>.ant-menu-submenu-title:after,
.ant-menu-submenu-vertical>.ant-menu-submenu-title:after {
display: none;
}
/*.ant-confirm-confirm .ant-modal-body {
padding: 5px 10px 15px 10px;
}
.ant-confirm-confirm .ant-confirm-body i {
display: none;
}
.ant-confirm-confirm .ant-modal-body .ant-confirm-title {
border-bottom: 1px solid #d9d9d9;
height: 32px;
line-height: 32px;
display: block;
padding-left: 10px;
font-size: 13px;
font-weight: 350;
}
.ant-confirm-confirm .ant-modal-body .ant-confirm-content {
}*/
.admin-spin {
width: 100%;
position: relative;
height: 100vh;
}
.admin-spin .ant-spin {
width: 300px;
height: 80px;
position: absolute;
left: 0px;
top: 150px;
right: 0;
margin: 0 auto;
}
.admin-spin .ant-spin.ant-spin-show-text .ant-spin-text {
padding-top: 20px;
}
.table {
font-size: 13px;
border-collapse: collapse;
border-spacing: 0;
empty-cells: show;
width: 100%;
margin: 16px 0;
}
.table th {
background: #f7f7f7;
white-space: nowrap;
color: #5c6b77;
font-weight: 400;
}
.table td,
.table th {
padding: 5px 10px;
}
.table-border {
border: 1px solid #e9e9e9;
}
.table-border td,
.table-border th {
border: 1px solid #e9e9e9;
}
.table-border-limit {
border: 1px solid transparent;
margin-left:1px;
margin-right: 1px;
}
.table-border-limit thead tr:first-child th,
.table-border-limit thead tr:first-child td,
.table-border-limit tbody tr:first-child th,
.table-border-limit tbody tr:first-child td {
border-top-color: transparent;
}
.table-border-limit thead tr th:first-child,
.table-border-limit tbody tr td:first-child {
border-left-color: transparent;
}
.table-border-limit tbody tr:last-child td {
border-bottom-color: transparent;
}
.table-border-limit thead tr th:last-child,
.table-border-limit tbody tr td:last-child {
border-right-color: transparent;
}
.table.table-padding-lg td,
.table.table-padding-lg th {
padding: 16px 16px;
}
.table.table-padding-sm th,
.table.table-padding-sm td {
padding: 3px 5px;
}
.table-striped tr:nth-child(even) {
background-color: #f7f7f7;
}
.table-striped tr:nth-child(odd) {
background-color: #fff;
}
/*.table-tr-striped td:nth-child(even) {
background: #fff;
}
.table-tr-striped td:nth-child(odd) {
background: #F5F5F5;
}*/
code {
padding: 3px 5px 2px 5px;
border-radius: 3px;
font-size: 90%;
line-height: 1.2;
display: inline-block;
vertical-align: middle;
color: #9E9E9E;
background: #9e9e9e1a;
}
code.info {
background: #03a9f41f;
color: #03A9F4;
}
code.warning {
background: #ff98001c;
color: #FF9800;
}
code.danger {
background: #e91e631f;
color: #E91E63;
}
code.success {
background: #95d9ad47;
color: #4CAF50;
}
.confirm-desc {
padding: 0px 10px 20px 10px;
}
.confirm-desc h5 {
font-weight: 450;
color: #444;
}
.confirm-desc p {
padding-left: 25px;
color: #777;
}
.confirm-h4 {
padding-left: 10px;
padding-top: 18px;
}
.amount {
font-weight: normal;
color: #F44336;
font-size: 14px;
font-family: Consolas, Menlo, Courier, monospace !important;
}
.btn-xsm {
padding: 0 3px;
height: 18px;
border-radius: 3px;
width: 20px;
text-align: center;
}
.ant-modal-title {
margin: 0;
font-size: 12px;
line-height: 21px;
font-weight: 350;
color: rgba(0, 0, 0, .55);
}
.server-block {
font-size: 12px;
margin: 15px 10px 15px 10px;
padding-bottom: 15px;
}
.server-block h2 {
color: #353535;
padding-bottom: 10px;
line-height: 30px;
font-size: 14px;
border-bottom: 1px solid #d9d9d9;
}
.text-sm {
font-size: 12px;
color: #555;
}
.separator {
display: inline-block;
width: 1px;
height: 10px;
margin: 0 3px;
background-color: #ddd;
}
.opt-group {
display: inline-block;
min-width: 80px;
max-width: 240px;
font-size: 12px;
}
.opt-group-sm {
width: 100px;
}
.opt-group-lg {
width: 240px;
}
.usage.ant-progress-show-info .ant-progress-outer {
width: calc(100% - 35px);
}
.usage.ant-progress-show-info .ant-progress-text {
width: auto;
max-width: 40px;
min-width: 2em;
}
.admin-layout {
height: calc(100vh - 50px);
padding: 10px 10px;
overflow-y: auto;
}
.hr {
margin: 15px 0;
max-height: 1px;
height: 1px;
display: block;
background: #9e9e9e33;
border: none;
}
.card-title {
font-size: 14px;
font-weight: 450;
line-height: 48px;
color: #555;
padding: 0 10px;
}
.card-title-border {
border-bottom: 4px solid #f7f7f7;
}
.admin-info {
padding: 15px;
text-align: center;
}
.admin-info h2 {
font-size: 18px;
}
.form-filter {
padding-top: 20px;
border-top: 4px solid #f7f7f7;
border-bottom: 4px solid #f7f7f7;
}
small {
font-size: 12px !important;
}
select.form-control {
width: 100%;
height: 34px;
background: #fff;
border: 1px solid #d9d9d9;
border-radius: 4px;
}
.category_before {
position: relative;
text-indent: 8px;
padding: 3px 0;
display: inline-block;
width: 10px;
margin-left: 5px;
}
.category_before_1 {
margin-left: 25px;
}
.category_before_2 {
margin-left: 45px;
}
.category_before_3 {
margin-left: 75px;
}
.category_before:before {
position: absolute;
content: '';
top: -0.7em;
left: -0.5em;
width: 0.6em;
height: 1em;
border-bottom-left-radius: 5px;
border-style: none none solid solid;
border-width: 0.1em;
color: #dedddd;
} | css |
{
"bail": true,
"rootDir": "../../",
"browser": true,
"testRegex": ".*\\.spec\\.ts$",
"transform": {
"^.+\\.ts$": "<rootDir>config/test/jest-typescript-transform.js"
},
"moduleNameMapper": {
"^webpack-file-changer\\/lib\\/(.*)": "<rootDir>/lib/$1",
"^webpack-file-changer$": "<rootDir>/lib/index"
},
"setupTestFrameworkScriptFile": "<rootDir>config/test/setupFile.ts",
"testEnvironment": "node",
"collectCoverage": false,
"modulePathIgnorePatterns": [
"<rootDir>/config/.*"
],
"moduleFileExtensions": ["js", "json", "ts"]
} | json |
<reponame>ruiyangio/game-auth
const path = require('path');
const constants = require('../constants');
module.exports = function authMiddleware(req, res, next) {
if (!req.url.match(/^\/graphql/g)) {
res.contentType = constants.CONTENT_TYPE_HTML;
res.sendFile(path.join(process.cwd(), '/dashboard/build/index.html'));
}
next();
};
| javascript |
package marketing
import "github.com/zhaoyoucai/aeop/top"
type ProductsQueryAPI struct {
Ae top.Aliexpress
Api top.API
}
func (a *ProductsQueryAPI)Init(session string) {
ae := top.Aliexpress{}
ae.InitAPI(session)
api := top.API{}
api.SetApiName("aliexpress.marketing.storepromotion.products.query")
a.Ae = ae
a.Api = api
}
func (a *ProductsQueryAPI)SetParams(qs map[string]string) {
//qs = {"aeop_a_e_product":{}}
a.Api.SetParams(qs)
}
func (a *ProductsQueryAPI)GetResponse() (string){
return top.BuildRequest(a.Ae,a.Api)
} | go |
import { createStore } from 'redux';
import { createMiddleware } from '../src';
import { ActionHandler } from '../src/listenerMiddleware';
afterEach(() => {
jest.clearAllMocks();
});
const mockNext = (dispatch) => dispatch;
const mockStore = createStore((state, action) => state);
test('Should create middleware and check types', () => {
const listenMiddleware = createMiddleware();
expect(typeof listenMiddleware).toBe('function');
expect(typeof listenMiddleware(mockStore)).toBe('function');
expect(typeof listenMiddleware.addListener).toBe('function');
expect(typeof listenMiddleware.actionHandler).toBe('object');
expect(listenMiddleware.actionHandler instanceof ActionHandler).toBe(true);
expect(
listenMiddleware.listeners === listenMiddleware.actionHandler.listeners
).toBe(true);
expect(
listenMiddleware.cleanup === listenMiddleware.actionHandler.cleanup
).toBe(true);
});
test('Should allow multiple listeners', () => {
const listenMiddleware = createMiddleware();
let cnt = 0;
listenMiddleware.addListener('TEST', () => {
cnt += 1;
});
listenMiddleware.addListener('TEST', () => {
cnt += 1;
});
const middleware = listenMiddleware(mockStore)(mockNext);
middleware({ type: 'TEST' });
expect(cnt).toBe(2);
});
test('Should listen only registerd action', () => {
const listenMiddleware = createMiddleware();
let cnt = 0;
listenMiddleware.addListener('TEST', () => {
cnt += 1;
});
const middleware = listenMiddleware(mockStore)(mockNext);
middleware({ type: 'OTHER' });
expect(cnt).toBe(0);
});
test('Should register multiple action types', () => {
const listenMiddleware = createMiddleware();
let increment = 0;
listenMiddleware.addListener(['TEST', 'ANOTHER'], () => {
increment += 1;
});
const middleware = listenMiddleware(mockStore)(mockNext);
middleware({ type: 'TEST' });
expect(increment).toBe(1);
middleware({ type: 'ANOTHER' });
expect(increment).toBe(2);
});
test('Should dispatch an action in other listener', () => {
const listenMiddleware = createMiddleware();
let increment = 0;
listenMiddleware.addListener('TEST', (action, dispatch) => {
expect(increment).toBe(0);
increment += 1;
// dispatch function of dispatchableStore
dispatch({ type: 'ANOTHER' });
});
const dispatchableStore: any = {
dispatch(action) {
expect(increment).toBe(1);
expect(action.type).toBe('ANOTHER');
increment += 1;
},
};
const next: any = () => expect(increment).toBe(1);
const middleware = listenMiddleware(dispatchableStore)(next);
middleware({ type: 'TEST' });
});
test('Should read payload of action', () => {
const listenMiddleware = createMiddleware();
listenMiddleware.addListener('TEST', (action) => {
expect(action.payload).toBe(1);
});
const middleware = listenMiddleware(mockStore)(mockNext);
middleware({ type: 'TEST', payload: 1 });
});
test('Should cleanup', () => {
const listenMiddleware = createMiddleware();
listenMiddleware.addListener('TEST', (action) => {});
listenMiddleware.cleanup();
expect(Object.keys(listenMiddleware.listeners).length).toBe(0);
});
| typescript |
Venus Williams raced to her first Australian Open singles final on Thursday with a powerful 6-3 6-3 win (in 74 minutes) over fifth seed Justine Henin-Hardenne.
The world number two, runner-up to sister Serena in the last three grand slam finals, played with bone-rattling power throughout to overwhelm the Belgian for the seventh time in eight matches.
Venus will face either her top-seeded younger sister or Henin-Hardenne's friend and compatriot Kim Clijsters in Saturday's final.
"It's so exciting. You know I've struggled and failed and done everything but get to this position before where I can win the Australian Open," a joyous Venus beamed after a victory jig on court.
"I am just so happy."
Both players sprung from the blocks, determined to make a positive start on centre court but it was the Belgian fifth seed who struck first, breaking in the third game when Venus slapped a swing volley into the net.
Willowy, with her white dress topped off with a retro white sun visor, Venus covered every inch of court in the next game to break back with some brave hitting and dogged retrieving to put Henin-Hardenne on the defensive.
Venus reeled off the next two games as she threatened to run away with the set but Henin-Hardenne stopped the American her in her tracks, winning the Venus serve to trail 4-3.
Once again, though, Venus hit back to win two successive games to seal the set with a running backhand down the line after 37 minutes.
Henin-Hardenne was into her rhythm and held comfortably to open the second set while Venus began to look less convincing on her own delivery. The Belgian took the serve early to put the second seed on the defensive.
But Henin-Hardenne's ground strokes lost a little of their bite midway through the second set as she began to misfire. Her fluid backhand began hitting the tape of the net and her forehand flew a little off line.
A double fault allowed Venus three break points in the fifth game at love-40. The Belgian saved one but her forehand let her down on the second, firing fractionally over the baseline to put Venus firmly in control of the match.
A devastating backhand pass, a backhand high swing volley, a sizzling backhand return down the line and a heavy crosscourt forehand gave Venus another break for 5-2.
Serving to reach the final, Venus took her eye off the ball, though. She double-faulted to miss her first match-point and another double-fault a point later allowed Henin-Hardenne back into the match.
Given a lifeline, the Belgian then suffered a bout of nerves, poking a backhand long to give Venus another match point. The American did not squander this opportunity and finished the match by thumping a deep drive into the forehand corner, which Henin-Hardenne drifted wide.
| english |
Having sought permission from the BCCI to participate in franchise T20 Leagues abroad, Yuvraj Singh's signing for the Toronto Nationals was the biggest news to come out of the Global T20 Canada draft held today. With former India seamer Manpreet Gony also picked up by the Nationals, it appears that the BCCI have relaxed their stance on Indian players plying their trade in franchise cricket abroad, at least when retired players and comparatively minor leagues are concerned.
Rumours of a policy change had been swirling for some time, centred specifically on Singh, who announced his retirement from all formats just nine days ago. The signing is quite a coup for Cricket Canada and the league's backers, Mercuri group. With Singh's name also connected to the Euro T20 Slam, the GT20's sister-league hosted jointly by Ireland, the Netherlands and Scotland later in the northern Summer, it would appear that the India icon could be enjoying a very busy retirement.
Other big names set to debut or return for the second edition of the six-team, 22 match tournament which kicks off in Brampton near Toronto on the 25th of July include Brandon McCullum (also at the Nationals), Chris Gayle, Andre Russel (both Vancouver Knights), Sunil Narine, Fawad Ahmed (Montreal Tigers), Chris Lynn, Dwayne Bravo (Winnipeg Hawks), Kane Williamson, Faf du Plessis (Edmonton Royals) Shahid Afridi, Darren Sammy and Shakib al Hasan, the latter three picked by a new franchise, dubbed the Brampton Wolves.
It is understood that objections from USA Cricket, who are developing their own franchise league, prevented the use of the originally intended name "New York Legends" for the sixth franchise, which replaces the West Indies development side which participated last year. The league has also moved locations since the 2018 edition, moving across to Brampton - about 30km East of downtown Toronto, from Maple Leaf CC in King City - a suburb approximately the same distance north of the City, making the Wolves the nominal home team.
Another significant change since the 2018 edition is a tightening of the restrictions on squad composition in favour of Canadian, ICC Americas and other Associate players, seeing an influx of lesser known names from across the cricketing world. Whilst established Associate stars such as Nepal's Sandeep Lamichhane, USA's Ali Khan and Scotland's Calum MacLeod were swiftly picked up, selectors were clearly willing to look beyond the obvious, with Namibia's pace all-rounder JJ Smit picked up by the Vancouver Knights likely on the back of a barnstorming performance on the comparatively lowly stage of World Cricket League Division 2 earlier this year.
The rule changes and restrictions seemed at times to confuse matters at the draft, with several camps repeatedly asking for clarification on whether ICC Americas players could be picked in the Associate round, and ambiguous name spellings or duplicate entries apparently making teams unsure exactly who they were drafting. The Edmonton Royals at one stage asking for confirmation that the Mohammad Nawaz they were picking was indeed a left arm spinner from Pakistan, and selectors generally made good use of the generous four minutes allotted for each pick. The entire ceremony and draft taking comfortably over four hours to narrow a long list of well over 1,000 applicants from over 40 different countries.
The Global T20 will be hosted entirely at Brampton, Ontario, and run from 25 July to 11 August. The six teams will play a round-robin format followed by playoffs., comprising 22 matches in total.
Full squads and coaches:
Brampton Wolves (New team)
| english |
<reponame>shinyichen/biblebase<filename>public/json/words/hebrew-4413.json
{"pos":"proper","translits":{"lə·mal·lō·w·ṯî":{"1ch.25.26|2":["and ten–","for Mallothi、","his sons、"]},"mal·lō·w·ṯî":{"1ch.25.4|14":["Joshbekashah、","Mallothi、","Hothir、"]}},"meanings":{"mallothi":2},"meaningsCount":1,"occurences":2} | json |
<gh_stars>0
.topic_list{background: #fff;padding:25px;}
.topic_list h4{font-size: 24px; color: #111;font-family: "微软雅黑";height: 45px;vertical-align: top;}
.topic_list ul{margin-bottom: 30px;}
.topic_list ul li{font-size: 12px;height:40px;line-height:40px;padding:10px 0px;border-bottom: 1px solid #F3F3F3;color:#999;}
.topic_list ul a{font-size: 16px;height:40px;line-height:40px;}
.topic_list ul a:hover{color:#0096e6;}
.topic_list ul li:first-child{border-top: 1px solid #F3F3F3;} | css |
#include <sirius.h>
using namespace sirius;
void f1(int num_gvec, int lmmax, int num_atoms)
{
mdarray<double_complex, 3> alm(num_gvec, lmmax, num_atoms);
mdarray<double_complex, 2> o(num_gvec, num_gvec);
alm.randomize();
o.zero();
Timer t("rank2_update");
for (int ia = 0; ia < num_atoms; ia++)
{
for (int lm = 0; lm < lmmax; lm++)
{
#pragma omp parallel for schedule(static)
for (int ig2 = 0; ig2 < num_gvec; ig2++)
{
for (int ig1 = 0; ig1 < num_gvec; ig1++)
{
o(ig1, ig2) += conj(alm(ig1, lm, ia)) * alm(ig2, lm, ia);
}
}
}
}
double tval = t.stop();
printf("\n");
printf("execution time (sec) : %12.6f\n", tval);
printf("performance (GFlops) : %12.6f\n", 8e-9 * num_gvec * num_gvec * lmmax * num_atoms / tval);
}
void f2(int num_gvec, int lmmax, int num_atoms)
{
mdarray<double_complex, 3> alm(num_gvec, lmmax, num_atoms);
mdarray<double_complex, 2> o(num_gvec, num_gvec);
alm.randomize();
o.zero();
Timer t("zgemm");
blas<cpu>::gemm(0, 2, num_gvec, num_gvec, lmmax * num_atoms, alm.ptr(), alm.ld(), alm.ptr(), alm.ld(), o.ptr(), o.ld());
double tval = t.stop();
printf("\n");
printf("execution time (sec) : %12.6f\n", tval);
printf("performance (GFlops) : %12.6f\n", 8e-9 * num_gvec * num_gvec * lmmax * num_atoms / tval);
}
int main(int argn, char** argv)
{
cmd_args args;
args.register_key("--NG=", "{int} number of G-vectors");
args.register_key("--NL=", "{int} number of lm components");
args.register_key("--NA=", "{int} number of atoms");
args.parse_args(argn, argv);
if (argn == 1)
{
printf("Usage: %s [options]\n", argv[0]);
args.print_help();
exit(0);
}
Platform::initialize(1);
int num_gvec = args.value<int>("NG");
int lmmax = args.value<int>("NL");
int num_atoms = args.value<int>("NA");
f1(num_gvec, lmmax, num_atoms);
f2(num_gvec, lmmax, num_atoms);
Timer::print();
Platform::finalize();
}
| cpp |
<filename>native/fantomCX.ios.cpp
class fantomCX
{
public:
static String DeviceName()
{
NSString * localizedModel = [[UIDevice currentDevice] localizedModel];
return [localizedModel UTF8String];
}
static String Hardware()
{
NSString *model = [[UIDevice currentDevice] model];
return [model UTF8String];
}
static String User()
{
NSString * name = [[UIDevice currentDevice] name];
return [name UTF8String];
}
static String Product()
{
return '-' ;
}
static String Serial()
{
NSString *uniqueIdentifier = [[UIDevice currentDevice] uniqueIdentifier];
return [uniqueIdentifier UTF8String];
}
static String GetBrowserName()
{
return '-' ;
}
static String GetBrowserVersion()
{
return '-' ;
}
static String GetBrowserPlatform()
{
return '-' ;
}
};
| cpp |
import { MonstersState } from './monsters';
import { UIState } from './ui';
export interface SharedState {
ui: UIState;
monsters: MonstersState;
}
| typescript |
<gh_stars>0
package com.denis.home.sunnynotes;
import android.app.Application;
import com.google.android.gms.analytics.GoogleAnalytics;
import com.google.android.gms.analytics.Tracker;
import timber.log.Timber;
/**
* Created by Denis on 20.03.2016.
*/
public class CustomApplication extends Application {
private Tracker mTracker;
@Override
public void onCreate() {
super.onCreate();
if (BuildConfig.DEBUG) {
Timber.plant(new Timber.DebugTree());
}
}
synchronized public Tracker getDefaultTracker() {
if (mTracker == null) {
GoogleAnalytics analytics = GoogleAnalytics.getInstance(this);
// To enable debug logging use: adb shell setprop log.tag.GAv4 DEBUG
analytics.enableAutoActivityReports(this);
mTracker = analytics.newTracker(R.xml.global_tracker);
}
return mTracker;
}
}
| java |
body {
background-image: url("../img/bg-repeat.png");
background-repeat: repeat;
background-color: ghostwhite;
color: white;
}
a {
color: white!important;
text-decoration: underline;
}
.container {
background-color: darkcyan;
padding-bottom: 20px;
}
#login-required, #theme-selector, #write-permission, #invitation-response, #real-time-setup, #real-time-quit, #real-time-opponent-quit {
color: black;
}
#navbarDropdown {
color: white
}
.fa-user {
color: white;
}
#user-menu {
color: white;
}
#content {
margin-top: 50px;
}
#user-name {
color: white;
padding-left: 5px;
}
#how-it-works {
margin-top: 50px;
}
#custom-position-chk-group, #real-time-chk-group {
margin-bottom: 15px;
}
#game-details {
margin-top: 20px;
}
.hidden {
display: none!important;
}
#board {
width: 95vw;
max-width: 500px;
}
#continue-game-table {
table-layout: fixed!important;
word-wrap: break-word;
}
#continue-game-table tr {
font-size: 14px;
}
#table-title {
width: 50%;
}
tr.clickable-row {
cursor: pointer;
}
.btn-cancel, #start-new-game-btn, #join-game-btn, #stop-playing {
margin-bottom: 25px;
}
table.table > thead > tr > th{
border: none;
}
table.table > tbody > tr > td{
border-top: 1px solid white;
}
code {
color: antiquewhite;
}
| css |
<reponame>carrascomj/rust-sbml<gh_stars>1-10
// use mathml::MathNode;
use super::mathml::Math;
use super::rdf::Annotation;
use super::UnitSIdRef;
#[cfg(feature = "default")]
use pyo3::prelude::*;
use serde::{Deserialize, Serialize};
/// A compartment in SBML represents a bounded space in which species are located.
///
/// # Example
///
/// ```
/// use quick_xml::de::from_str;
/// use rust_sbml::Compartment;
///
/// let compartments: Vec<Compartment> = from_str(
/// "<compartment id='Extracellular' spatialDimensions='3' size='1e-14' constant='true'/>
/// <compartment id='PlasmaMembrane' spatialDimensions='2' size='1e-14' constant='true'/>
/// <compartment id='Cytosol' spatialDimensions='3' size='1e-15' constant='true'/>"
/// )
/// .unwrap();
/// assert!(compartments.iter() .any(|c| c.spatial_dimensions.unwrap() as i32 == 2));
/// assert!(compartments.iter()
/// .any(|c| c.id == "Cytosol"));
/// assert!(compartments.iter()
/// .all(|c| c.constant));
/// ```
#[cfg_attr(feature = "default", pyclass)]
#[derive(Debug, Deserialize, Serialize, PartialEq, Clone)]
#[serde(rename_all = "camelCase")]
pub struct Compartment {
pub units: Option<UnitSIdRef>,
pub id: String,
pub name: Option<String>,
pub sbo_term: Option<String>,
pub spatial_dimensions: Option<f64>,
pub size: Option<f64>,
pub constant: bool,
}
/// A species in SBML refers to a pool of entities that
///
/// ⁻ are considered indistinguishable from each other for the purposes of the model;
/// - may participate in reactions;
/// - are located in a specific compartment.
///
/// # Example
///
/// ```
/// use quick_xml::de::from_str;
/// use rust_sbml::Species;
///
/// let species: Vec<Species> = from_str(
/// "<species id='Glucose' compartment='cell' initialConcentration='4'
/// hasOnlySubstanceUnits='false' boundaryCondition='false' constant='false'/>"
/// )
/// .unwrap();
/// assert_eq!(species[0].id, "Glucose");
/// assert_eq!(species[0].compartment, "cell");
/// assert_eq!(species[0].initial_concentration.unwrap() as u8, 4);
/// assert!(!species[0].constant);
/// assert!(!species[0].boundary_condition);
/// assert!(!species[0].has_only_substance_units);
/// ```
#[cfg_attr(feature = "default", pyclass)]
#[derive(Debug, Deserialize, Serialize, PartialEq, Clone)]
#[serde(rename_all = "camelCase")]
pub struct Species {
pub id: String,
pub name: Option<String>,
pub meta_id: Option<String>,
pub sbo_term: Option<String>,
pub compartment: String,
/// Species elemental composition
#[serde(rename = "fbc:chemicalFormula")]
pub formula: Option<String>,
/// The optional field charge takes an integer indicating the charge on the species (in terms of electrons, not the SI unit coulombs).
#[serde(rename = "fbc:charge")]
pub charge: Option<i32>,
pub initial_concentration: Option<f64>,
pub initial_amount: Option<f64>,
pub substance_units: Option<UnitSIdRef>,
pub has_only_substance_units: bool,
pub boundary_condition: bool,
pub constant: bool,
pub conversion_factor: Option<String>,
pub annotation: Option<Annotation>,
}
/// A Parameter is used in SBML to define a symbol associated with a value;
/// this symbol can then be used in mathematical formulas in a model.
///
/// # Example
/// ```
/// use quick_xml::de::from_str;
/// use rust_sbml::{Parameter, UnitSIdRef, UnitSId};
///
/// let parameter: Vec<Parameter> = from_str(
/// "<parameter id=\"tau2\" value=\"3e-2\" units=\"second\" constant=\"true\"/>
/// <parameter id=\"Km1\" value=\"10.7\" units=\"molesperlitre\" constant=\"true\"/>"
/// )
/// .unwrap();
/// assert_eq!(
/// parameter[0].units.to_owned().unwrap(),
/// UnitSIdRef::SIUnit(UnitSId::second)
/// );
/// assert_eq!(parameter[1].id, "Km1");
#[cfg_attr(feature = "default", pyclass)]
#[derive(Debug, Deserialize, Serialize, PartialEq, Clone, Default)]
pub struct Parameter {
pub id: String,
pub value: Option<f64>,
pub units: Option<UnitSIdRef>,
pub constant: bool,
}
/// InitialAssigments provide a way to declare initial values that must be
/// computed (using a MathML expression).
///
/// # Example
///
/// ```
/// use quick_xml::de::from_str;
/// use rust_sbml::{InitialAssignment, mathml::MathNode};
///
/// let initial_assg: InitialAssignment = from_str(
/// r#"<initialAssignment symbol="x">
/// <math xmlns="http://www.w3.org/1998/Math/MathML"
/// xmlns:sbml="http://www.sbml.org/sbml/level3/version2/core">
/// <apply>
/// <ci> y </ci>
/// <times/>
/// <cn sbml:units="dimensionless"> 2 </cn>
/// </apply>
/// </math>
/// </initialAssignment>
/// "#).unwrap();
/// assert_eq!(initial_assg.symbol, String::from("x"));
/// ```
#[derive(Debug, Deserialize, Serialize, PartialEq, Clone)]
pub struct InitialAssignment {
pub id: Option<String>,
pub symbol: String,
pub math: Option<Math>,
#[serde(rename = "sboTerm", default)]
sbo_term: Option<String>,
}
/// Provide a way for reactions to define species as products and reactants.
///
/// # Example
///
/// ```
/// use quick_xml::de::from_str;
/// use rust_sbml::Reaction;
///
/// let reactions: Reaction = from_str(
/// "<reaction id='J1' reversible='false' fbc:lowerFluxBound='-20'>
/// <listOfReactants>
/// <speciesReference species='X0' stoichiometry='2' constant='true'/>
/// <speciesReference species='X1' stoichiometry='1' constant='true'/>
/// </listOfReactants></reaction></listOfReactions></model>",
/// )
/// .unwrap();
/// println!("{:?}", reactions);
/// let mut specs_ref = reactions
/// .list_of_reactants
/// .species_references
/// .iter();
/// assert!(specs_ref
/// .any(|specref| specref.species == "X0"));
/// assert!(specs_ref
/// .any(|specref| {println!("{:?}", specref); specref.stoichiometry.unwrap() as i32 == 1}));
/// assert!(specs_ref
/// .all(|specref| specref.constant));
/// ```
#[cfg_attr(feature = "default", pyclass)]
#[derive(Deserialize, Serialize, Debug, PartialEq, Clone)]
pub struct SpeciesReference {
pub species: String,
pub constant: bool,
#[serde(rename = "sboTerm", default)]
pub sbo_term: Option<String>,
pub id: Option<String>,
pub name: Option<String>,
pub stoichiometry: Option<f64>,
}
#[derive(Debug, PartialEq, Clone, Default, Deserialize, Serialize)]
pub struct ListOfSpeciesReferences {
#[serde(rename = "speciesReference", default = "Vec::new")]
pub species_references: Vec<SpeciesReference>,
}
/// The [`KineticLaw`] object within a Reaction object can contain a
/// ListOfLocalParameters object containing the definitions of local parameter
/// that are only accessible within the scope of that particular reaction.
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
pub struct LocalParameter {
id: String,
#[serde(rename = "sboTerm")]
sbo_term: Option<String>,
value: Option<f32>,
units: UnitSIdRef,
}
#[derive(Debug, PartialEq, Clone, Default, Deserialize, Serialize)]
pub struct ListOfLocalParameters {
#[serde(rename = "localParameter")]
pub local_parameter: Vec<LocalParameter>,
}
/// The KineticLaw object class is used to describe the rate at which the
/// process defined by the Reaction takes place.
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct KineticLaw {
math: Math,
id: Option<String>,
sbo_term: Option<String>,
list_of_local_parameters: ListOfLocalParameters,
}
/// A reaction in SBML represents any kind of process that can change the
/// quantity of one or more species in a model. Examples of such processes can
/// include transformation, transport, molecular interactions, and more.
///
/// # Example
///
/// ```
/// use quick_xml::de::from_str;
/// use rust_sbml::Reaction;
///
/// let reactions: Reaction = from_str(
/// "<reaction id='J1' reversible='false' fbc:lowerFluxBound='-20'>
/// <listOfReactants>
/// <speciesReference species='X0' stoichiometry='2' constant='true'/>
/// </listOfReactants>
/// <kineticLaw>
/// <math xmlns='http://www.w3.org/1998/Math/MathML'>
/// <apply>
/// <times/> <ci> k </ci> <ci> S2 </ci> <ci> X0 </ci> <ci> c1 </ci>
/// </apply>
/// </math>
/// <listOfLocalParameters>
/// <localParameter id='k' value='0.1' units='per_concent_per_time'/>
/// </listOfLocalParameters>
/// </kineticLaw></reaction>"
/// )
/// .unwrap();
///
/// println!("{:?}", reactions);
/// assert!(reactions.kinetic_law.is_some());
/// assert!(reactions
/// .list_of_reactants
/// .species_references
/// .iter()
/// .any(|specref| specref.species == "X0"));
/// ```
#[cfg_attr(feature = "default", pyclass)]
#[derive(Debug, Deserialize, Serialize, PartialEq, Clone, Default)]
#[serde(rename_all = "camelCase")]
pub struct Reaction {
pub id: String,
#[serde(default)]
pub list_of_reactants: ListOfSpeciesReferences,
#[serde(default)]
pub list_of_products: ListOfSpeciesReferences,
pub reversible: bool,
pub compartment: Option<String>,
pub name: Option<String>,
pub sbo_term: Option<String>,
pub kinetic_law: Option<KineticLaw>,
#[serde(rename = "fbc:lowerFluxBound")]
pub lower_bound: Option<String>,
#[serde(rename = "fbc:lowerUpperBound")]
pub upper_bound: Option<String>,
pub annotation: Option<Annotation>,
}
/// The FunctionDefinition object associates an identifier with a function
/// definition. This identifier can then be4 used as the function called in
/// subsequent MathML apply elements.
///
/// # Example
/// ```
/// use quick_xml::de::from_str;
/// use rust_sbml::FunctionDefinition;
///
/// let function: FunctionDefinition = from_str(
/// r#"<functionDefinition id="pow3">
/// <math xmlns="http://www.w3.org/1998/Math/MathML"
/// xmlns:sbml="http://www.sbml.org/sbml/level3/version2/core">
/// <lambda>
/// <bvar><ci> x </ci></bvar>
/// <apply> <power/> <ci> x </ci> <cn sbml:units="dimensionless"> 3 </cn>
/// </apply>
/// </lambda>
/// </math>
/// </functionDefinition>"#).unwrap();
///
/// assert_eq!(function.id, "pow3");
/// ```
#[derive(Debug, PartialEq, Deserialize, Serialize, Clone)]
#[serde(rename_all = "camelCase")]
pub struct FunctionDefinition {
#[serde(rename = "$value")]
pub math: Math,
pub id: String,
pub sbo_term: Option<String>,
}
/// Rules provide additional ways to define the values of variables in a model, their
/// relationships, and the dynamical behaviors of those variables. Rules enable the encoding of
/// relationships that cannot be expressed using [`Reaction`]s alone nor by
/// an [`InitialAssignment`].
///
/// There are three function forms that involve a variable $x$; a function $f$;
/// $V$, a vector which does not include $x$; and $W$, a vector which may
/// include $x$.
///
/// # Example
///
/// The expression $k = \frac{k3}{k2}$ (from [the SBML3v2 spec](http://sbml.org/Special/specifications/sbml-level-3/version-2/core/release-2/sbml-level-3-version-2-release-2-core.pdf)):
///
/// ```
/// use quick_xml::de::from_str;
/// use rust_sbml::Rule;
///
/// let rule: Rule = from_str(
/// r#"<assignmentRule variable="k">
/// <math xmlns="http://www.w3.org/1998/Math/MathML">
/// <apply>
/// <divide/>
/// <ci> k3 </ci>
/// <ci> k2 </ci>
/// </apply>
/// </math>
/// </assignmentRule>"#).unwrap();
///
/// if let Rule::AssignmentRule { variable: k, .. } = rule {
/// assert_eq!(k.as_str(), "k");
/// } else {
/// panic!("Rule was not correctly parsed!")
/// }
/// ```
#[derive(Debug, PartialEq, Deserialize, Serialize, Clone)]
#[serde(rename_all = "camelCase")]
pub enum Rule {
/// $0 = f(W)$
AlgebraicRule {
#[serde(rename = "$value")]
math: Math,
},
/// $x = f(V)$ (does not allow algebraic loops)
AssignmentRule {
#[serde(rename = "$value")]
math: Math,
variable: String,
},
/// $\frac{dx}{dt} = f(W)$
RateRule {
#[serde(rename = "$value")]
math: Math,
variable: String,
},
}
/// A XML `<message>` node.
#[derive(Debug, Deserialize, Serialize, PartialEq, Clone)]
#[serde(rename = "message")]
pub struct Message {
#[serde(rename = "$value")]
pub content: String,
}
/// The Constraint object is a mechanism for stating the assumptions under
/// which a model is designed to operate.
///
/// # Example
///
/// Constraint species “S1” so that $1 \le S1 \le 100$:
///
/// ```
/// use quick_xml::de::from_str;
/// use rust_sbml::Constraint;
///
/// let constraint: Constraint = from_str(
/// r#"<constraint>
/// <math xmlns="http://www.w3.org/1998/Math/MathML"
/// xmlns:sbml="http://www.sbml.org/sbml/level3/version2/core">
/// <apply>
/// <and/>
/// <apply> <lt/> <cn sbml:units="mole"> 1 </cn> <ci> S1 </ci>
/// </apply>
/// <apply> <lt/> <ci> S1 </ci> <cn sbml:units="mole"> 100 </cn>
/// </apply>
/// </apply>
/// </math>
/// <message>
/// <p xmlns="http://www.w3.org/1999/xhtml"> Species S1 is out of range. </p>
/// </message>
/// </constraint>"#).unwrap();
///
/// assert_eq!(constraint.message.unwrap().content.as_str(), "Species S1 is out of range.");
/// assert!(constraint.math.is_some())
/// ```
#[derive(Debug, Deserialize, Serialize, PartialEq, Default, Clone)]
pub struct Constraint {
pub math: Option<Math>,
pub message: Option<Message>,
pub id: Option<String>,
#[serde(rename = "sboTerm")]
pub sbo_term: Option<String>,
}
/// The Flux Balance Constraints package of SBML defines extensions for the
/// model, including the FBC Objective.
///
/// See the [FBC specification](http://co.mbine.org/specifications/sbml.level-3.version-1.fbc.version-2.release-1.pdf)
/// for more details.
///
/// # Example
///
/// ```
/// use quick_xml::de::from_str;
/// use rust_sbml::Objective;
///
/// let objectives: Vec<Objective> = from_str(
/// "<fbc:objective fbc:id=\"obj1\" fbc:type=\"maximize\">
/// <fbc:listOfFluxObjectives>
/// <fbc:fluxObjective fbc:reaction=\"R101\" fbc:coefficient=\"1\"/>
/// </fbc:listOfFluxObjectives>
/// </fbc:objective>
/// <fbc:objective fbc:id=\"obj2\" fbc:type=\"minimize\">
/// <fbc:listOfFluxObjectives>
/// <fbc:fluxObjective fbc:reaction=\"R102\" fbc:coefficient=\"-2.5\"/>
/// <fbc:fluxObjective fbc:reaction=\"R103\" fbc:coefficient=\"1\"/>
/// </fbc:listOfFluxObjectives>
/// </fbc:objective>").unwrap();
///
/// objectives.iter().any(|o| o.sense == "maximize");
/// objectives[1].list_of_flux_objectives.flux_objectives.iter().any(|r| r.reaction.to_owned().unwrap() == "R103");
/// ```
#[derive(Debug, Deserialize, Serialize, PartialEq, Default, Clone)]
pub struct Objective {
#[serde(rename = "fbc:id")]
pub id: String,
#[serde(rename = "fbc:metaid")]
pub metaid: Option<String>,
#[serde(rename = "fbc:sboTerm")]
pub sbo_term: Option<String>,
#[serde(rename = "fbc:type")]
pub sense: String,
#[serde(rename = "listOfFluxObjectives", default)]
pub list_of_flux_objectives: ListOfFluxObjectives,
}
#[derive(Debug, Deserialize, Serialize, PartialEq, Default, Clone)]
pub struct ListOfFluxObjectives {
#[serde(rename = "fluxObjective", default)]
pub flux_objectives: Vec<FluxObjective>,
}
/// Relatively simple container for a model variable weighted by a signed
/// linear coefficient, defined in the Flux Balance Constraint package.
#[derive(Debug, Deserialize, Serialize, PartialEq, Default, Clone)]
pub struct FluxObjective {
#[serde(rename = "fbc:coefficient")]
pub coefficient: Option<f64>,
#[serde(rename = "fbc:reaction")]
pub reaction: Option<String>,
}
| rust |
{
"authors": [
[
"author:",
"<NAME>"
],
[
"author:",
"<NAME>"
],
[
"author:",
"<NAME>"
],
[
"author:",
"<NAME>"
],
[
"author:",
"<NAME>"
],
[
"author:",
"<NAME>"
],
[
"author:",
"<NAME>"
]
],
"doi": "http://doi.org/10.5281/zenodo.2560316",
"publication_date": "2018-12-01",
"id": "ES100789",
"url": "https://github.com/PlanTL-SANIDAD/SPACCC",
"source": "SPACCC corpus",
"source_url": "https://github.com/PlanTL-SANIDAD/SPACCC",
"licence": "CC-BY",
"language": "es",
"type": "dataset",
"description": "SPACCC corpus",
"text": "Paciente mujer de 68 años, que acude a la clínica del dolor remitida por su médico de cabecera, diagnosticada de espondiloartrosis grave, sobre todo a expensas de columna vertebral lumbar. Tiene pautado por su médico fentanilo transdérmico genérico de 25 μg/h desde hace 2 semanas, con regular control de dolor (EVA, 7-8).Tras estudio de la paciente, se plantea el intercambio de fentanilo genérico por Durogesic® Matrix 25 μg/h. A las 2 semanas la paciente presenta mejor control del dolor (EVA, 3-4), precisando aisladamente como rescate paracetamol 1 g. A los 3 meses continúa con Durogesic® Matrix 25 μg/h, con aceptable con-trol del dolor(EVA, 3), y esporádicamente, como rescate, paracetamol 1 g."
} | json |
import logging
from django import template
from django.db.models import Q
from django.utils import timezone
from django.utils.safestring import SafeString
from cms.contexts.utils import handle_faulty_templates
from cms.publications.models import Category, Publication, PublicationContext
logger = logging.getLogger(__name__)
register = template.Library()
def _get_pub_qparams(context, webpath, section = None,
categories_csv=None,
exclude_categories=False,
tags_csv=None):
now = timezone.localtime()
query_params = dict(webpath=context['webpath'],
is_active=True,
publication__is_active=True,
date_start__lte=now,
date_end__gt=now)
if section:
query_params['section'] = section
if categories_csv:
cats = [i.strip() for i in categories_csv.split(',')]
if exclude_categories:
categories = Category.objects.exclude(name__in=cats).\
values_list('name', flat=True)
query_params['publication__category__name__in'] = categories
else:
query_params['publication__category__name__in'] = cats
if tags_csv:
tags = [i.strip() for i in tags_csv.split(',')]
query_params['publication__tags__name__in'] = tags
return query_params
@register.simple_tag(takes_context=True)
def load_publication(context, template, publication_id):
_func_name = 'load_publication'
_log_msg = f'Template Tag {_func_name}'
request = context['request']
webpath = context['webpath']
language = getattr(request, 'LANGUAGE_CODE', '')
pub = Publication.objects.filter(pk=publication_id,
is_active=True).first()
if not pub:
_msg = '{} cannot find publication id {}'.format(_log_msg,
publication_id)
logger.error(_msg)
return SafeString('')
pub.translate_as(lang=language)
data = {'publication': pub, 'webpath': webpath}
return handle_faulty_templates(template, data, name=_func_name)
@register.simple_tag(takes_context=True)
def load_publications_preview(context, template,
section = None,
number=0,
in_evidence=False,
categories_csv=None,
exclude_categories=False,
tags_csv=None):
request = context['request']
webpath = context['webpath']
query_params = _get_pub_qparams(context=context ,
webpath=webpath,
section=section,
categories_csv=categories_csv,
exclude_categories=exclude_categories,
tags_csv=tags_csv)
pub_in_context = PublicationContext.objects.\
filter(**query_params).\
distinct().\
order_by('order','-date_start')
if in_evidence:
now = timezone.localtime()
pub_in_context = pub_in_context.filter(Q(in_evidence_end__gt=now) |
Q(in_evidence_end__isnull=True),
in_evidence_start__lt=now)
if number > 0:
pub_in_context = pub_in_context[0:number]
if not pub_in_context: return SafeString('')
# i18n
language = getattr(request, 'LANGUAGE_CODE', '')
for i in pub_in_context:
i.publication.translate_as(lang=language)
data = {'publications': pub_in_context}
return handle_faulty_templates(template, data,
name='load_publications_preview')
| python |
<gh_stars>1-10
from django import template
from django.utils.html import conditional_escape
from django.utils.safestring import mark_safe
import re
from counter.utils import removeAccentsToLowercase
from counter.models import Keyword
from django.core.urlresolvers import reverse
register = template.Library()
@register.filter(needs_autoescape=True, name='hashtag')
def linkifyHashtags(text, autoescape=True):
parts = re.split(r'(#[^#\s]+)', text)
result = ''
for part in parts:
if autoescape:
esc = conditional_escape
else:
esc = (lambda x: x)
if re.match(r'#[^#\s]+', part):
hashtag = removeAccentsToLowercase(part[1:])
try:
keyword = Keyword.objects.get(text=hashtag)
part = '<a href="%s">%s</a>' % (
esc(reverse('hashtag', kwargs={'keyword': keyword.text})),
esc(part))
except Keyword.DoesNotExist:
None
result += part
return mark_safe(result)
| python |
The Supreme Court’s order on Wednesday (May 11), effectively putting on hold cases under Section 124A of the Indian Penal Code (IPC) — the colonial-era law against sedition — could impact several high-profile cases in Maharashtra.
These include the investigation against Amravati MP Navneet Rana and her husband Badnera MP Ravi Rana; actor Kangana Ranaut; the accused in the Elgaar Parishad case; and three students booked for allegedly raising a slogan at a march.
A three-judge Bench of the Supreme Court led by Chief Justice of India N V Ramana said that until the re-examination of Section 124A has been completed, it would be appropriate not to continue the use of the provision by governments.
The court said that it hoped and expected that the Centre and states would “refrain from registering any FIR, continuing investigation, or taking coercive steps under Section 124 A IPC when it is under reconsideration”.
Here are some of the cases to be impacted in Maharashtra.
The case was filed last month against the Independent MP couple, who had declared their intention to recite the Hanuman Chalisa at the private residence of Chief Minister Uddhav Thackeray. The couple was given bail by a special court on May 4, which observed that mere expression of derogatory or objectionable words was not sufficient ground to invoke the sedition charge.
Wednesday’s Supreme Court order may stall the ongoing investigation by the Mumbai Police, and restrict them from filing a chargesheet under Section 124A against the couple.
However, the Ranas face charges under others sections too — and the police can continue investigations into them. These include Section 153A (promoting enmity between different groups) read with Section 34 (common intent) of the IPC and relevant sections of The Bombay Police Act, 1951.
The charges under sections other than 124A can be tried by a magistrate’s court as the maximum punishment under those sections is less than seven years in prison. The maximum punishment under Section 124A is life imprisonment.
The Mumbai Police are yet to file a chargesheet against three students and some others booked in 2020 under charges including sedition for allegedly raising a slogan in support of then JNU student Sharjeel Imam, who has been arrested on sedition charges by the Delhi Police. The three students have been granted anticipatory bail, their lawyer said.
Following Wednesday’s Supreme Court order, the police may have to file a chargesheet on sections other than 124A IPC under which they were booked. These include Sections 153B (imputations, assertions prejudicial to national integration), and 505 (statements conducing to public mischief) read with Section 34. These too are triable by a magistrate with punishment of less than seven years.
A petition seeking the quashing of the FIR is pending before the Bombay High Court, in which the Supreme Court order is now likely to be referred to.
In the case against actor Kangana Ranaut filed in 2020, too, a petition to quash the FIR on charges of sedition is pending before the Bombay High Court. She also faces other charges including under Sections 153A and 295A (deliberate acts hurting religious sentiments) of IPC which are triable by a magistrate.
In the case against 15 persons in the Elgaar Parishad matter, the National Investigation Agency (NIA) last year submitted draft charges against the accused, which included section 124A. The case is at the stage of framing of charges.
They face other serious charges under the Unlawful Activities (Prevention) Act and Section 121 (waging or attempting to wage a war or abetting) of IPC, in which the maximum penalty is death. | english |
<reponame>bundie1990/new-website
{"polythene-standalone.js":"sha256-DO2twb+A8sMWUZFqUg3zWlUDDn8f9TtTC6Ap/FBq7dY=","polythene-standalone.min.js":"sha256-J1mP8yl<KEY>} | json |
<reponame>JonKelley88/fluid
{"id":"index.js","dependencies":[{"name":"/Users/clay/_dev/fluid/.babelrc","includedInParent":true,"mtime":1539269257281},{"name":"/Users/clay/_dev/fluid/package.json","includedInParent":true,"mtime":1541173230943},{"name":"./editor","loc":{"line":1,"column":7},"parent":"/Users/clay/_dev/fluid/index.js","resolved":"/Users/clay/_dev/fluid/editor/index.js"}],"generated":{"js":"\"use strict\";\n\nrequire(\"./editor\");","map":{"mappings":[{"generated":{"line":3,"column":0},"source":"index.js","original":{"line":1,"column":0}}],"sources":{"index.js":"import './editor';\n"},"lineCount":null}},"hash":"b0889085df2d67a0d815ec4772d94f57","cacheData":{"env":{}}} | json |
# -*- coding: utf-8 -*-
# Generated by Django 1.11.8 on 2017-12-08 10:23
from __future__ import unicode_literals
from datetime import datetime
from django.db import migrations
from django.utils.timezone import utc
def update_uk_regions(apps, schema_editor):
Order = apps.get_model('order', 'Order')
release_date = datetime(2017, 11, 23, tzinfo=utc)
orders_after_release = Order.objects.filter(
created_on__gt=release_date
).select_related('company')
for order in orders_after_release:
order.uk_region = order.company.uk_region
order.save(update_fields=('uk_region',)) # so that modified_on doesn't change
class Migration(migrations.Migration):
dependencies = [
('order', '0006_order_uk_region'),
]
operations = [
migrations.RunPython(update_uk_regions, migrations.RunPython.noop, elidable=True),
]
| python |
class Cell:
def __init__(self, c=' '):
self.c = c
self.highlight = {}
def __mul__(self, n):
return [Cell(self.c) for i in range(n)]
def __str__(self):
return self.c
class Highlight:
def __init__(self, line, highlight):
self.line = line
self.highlight = highlight
self.start = 0
self.end = 0
def s(self):
return (self.line, self.start, self.end, tuple(self.highlight.items()))
def __eq__(self, h):
return self.s() == h.s()
def __hash__(self):
return hash((self.line, self.start, self.end, tuple(self.highlight.items())))
class Screen:
def __init__(self):
self.x = 0
self.y = 0
self.resize(1, 1)
self.highlight = {}
self.changes = 0
def resize(self, w, h):
self.w = w
self.h = h
# TODO: should resize clear?
self.screen = [Cell() * w for i in range(h)]
self.scroll_region = [0, self.h, 0, self.w]
# clamp cursor
self.x = min(self.x, w - 1)
self.y = min(self.y, h - 1)
def clear(self):
self.resize(self.w, self.h)
def scroll(self, dy):
ya, yb = self.scroll_region[0:2]
xa, xb = self.scroll_region[2:4]
yi = (ya, yb)
if dy < 0:
yi = (yb, ya - 1)
for y in range(yi[0], yi[1], int(dy / abs(dy))):
if ya <= y + dy < yb:
self.screen[y][xa:xb] = self.screen[y + dy][xa:xb]
else:
self.screen[y][xa:xb] = Cell() * (xb - xa)
def redraw(self, updates):
blacklist = [
'mode_change',
'bell', 'mouse_on', 'highlight_set',
'update_fb', 'update_bg', 'update_sp', 'clear',
]
changed = False
for cmd in updates:
if not cmd:
continue
name, args = cmd[0], cmd[1:]
if name == 'cursor_goto':
self.y, self.x = args[0]
elif name == 'eol_clear':
changed = True
self.screen[self.y][self.x:] = Cell() * (self.w - self.x)
elif name == 'put':
changed = True
for cs in args:
for c in cs:
cell = self.screen[self.y][self.x]
cell.c = c
cell.highlight = self.highlight
self.x += 1
# TODO: line wrap is not specified, neither is wrapping off the end. semi-sane defaults.
if self.x >= self.w:
self.x = 0
self.y += 1
if self.y >= self.h:
self.y = 0
elif name == 'resize':
changed = True
self.resize(*args[0])
elif name == 'highlight_set':
self.highlight = args[0][0]
elif name == 'set_scroll_region':
self.scroll_region = args[0]
elif name == 'scroll':
changed = True
self.scroll(args[0][0])
elif name in blacklist:
pass
# else:
# print('unknown update cmd', name)
if changed:
self.changes += 1
def highlights(self):
hlset = []
for y, line in enumerate(self.screen):
cur = {}
h = None
for x, cell in enumerate(line):
if h and cur and cell.highlight == cur:
h.end = x + 1
else:
cur = cell.highlight
if cur:
h = Highlight(y, cur)
h.start = x
h.end = x + 1
hlset.append(h)
return hlset
def p(self):
print('-' * self.w)
print(str(self))
print('-' * self.w)
def __setitem__(self, xy, c):
x, y = xy
try:
cell = self.screen[y][x]
cell.c = c
cell.highlight = self.highlight
except IndexError:
pass
def __getitem__(self, y):
if isinstance(y, tuple):
return self.screen[y[1]][y[0]]
return ''.join(str(c) for c in self.screen[y])
def __str__(self):
return '\n'.join([self[y] for y in range(self.h)])
| python |
A Solvency Opinion is a statement from an independent financial expert that assures a company’s board of directors and/or lender that a transaction is not likely to result in bankruptcy or liquidation. The opinion, which typically takes the form of a letter, expresses an independent expert opinion on a borrower’s ability to remain solvent under the burden of additional liability, to pay debts as they mature, and to continue operations as a going-concern in dynamic economic conditions. Solvency opinions are often issued in connection with major corporate transactions, such as dividend recapitalizations, restructurings, debt issuances, spin-offs, and asset sales.
Solvency opinions have become increasingly important due to recent economic conditions, including increased volatility in the financial markets, the war in Ukraine, rising inflation, elongated holding periods for private equity-backed companies, and continued uncertainty about the long-term effect COVID-19 will have on the global economy. In such conditions, businesses need to be able to demonstrate to their stakeholders that they are financially sound and able to withstand economic shocks. Although not typically required by law or a substitute for a board’s own judgment, a solvency opinion provided by an independent financial expert helps boards demonstrate that they executed their fiduciary duty of care, acted in good faith, and conducted appropriate due diligence in connection with the transaction. An independent solvency opinion also mitigates the risk of fraudulent conveyance claims and can improve borrowing terms.
With decades of experience and the support of our Opinion Committee, Centri’s opinion team is ideally suited to provide a truly independent, defensible solvency opinion that can help boards make prudent, well-informed decisions. If you are considering a transaction, consult with your attorney and Centri’s opinion team to see if obtaining a solvency opinion is the right course of action for your company.
Charles is a Managing Director in Centri’s Valuation Practice with more than 25 years of experience providing a variety of valuation and opinion services for clients, both nationally and internationally. He has provided fairness and solvency opinions in connection with going private transactions, spin-offs, related-party transactions, de-SPAC transactions, recapitalizations, and restructurings. His skillset spans across a wide variety of industries, including technology, life sciences, healthcare, manufacturing, retail, professional services, and alternative energy.
Centri Business Consulting provides the highest quality advisory consulting services to its clients by being reliable and responsive to their needs. Centri provides companies with the expertise they need to meet their reporting demands. Centri specializes in financial reporting, internal controls, technical accounting research, valuation, mergers & acquisitions, and CFO and HR advisory services for companies of various sizes and industries. From complex technical accounting transactions to monthly financial reporting, our professionals can offer any organization the specialized expertise and multilayered skillsets to ensure the project is completed timely and accurately.
| english |
Star Wars: The Rise of Skywalker — that's the official title for Episode IX, the third chapter of the Star Wars sequel trilogy and the final one in the Skywalker saga. The announcement was made as part of the teaser trailer on stage at the ongoing Star Wars Celebration in Chicago, where director J.J. Abrams was present alongside Lucasfilm president Kathleen Kennedy, Daisy Ridley, John Boyega, Oscar Isaac, Kelly Marie Tran, Joonas Soutamo, Billy Dee Williams, Anthony Daniels, R2-D2, and Naomi Ackie. Ian McDiarmid made a surprise appearance on stage after the teaser reveal, suggesting his character, Emperor Palpatine has a role to play in The Rise of Skywalker.
With the unveiling of the title for Episode IX, we have the sequel trilogy all in place: Episode VII – The Force Awakens, Episode VIII – The Last Jedi, and Episode IX – The Rise of Skywalker.
As a franchise, Star Wars didn't originate with a subtitle. The first episode, released in 1977, was simply called ‘Star Wars'. But a couple of years later, it was later retitled as Episode IV – A New Hope, to bring it in line with future chapters. George Lucas has claimed he had the subtitle in mind before release but didn't want to confuse audiences. All subsequent mainline Star Wars films have been released with subtitles.
1980 brought Episode V – The Empire Strikes Back, followed by Episode VI – Return of the Jedi, which brought an end to the original trilogy. George Lucas revived Star Wars with the prequel trilogy around the turn of the century, with Episode I – The Phantom Menace in 1999, Episode II – Attack of the Clones in 2002, and Episode III – Revenge of the Sith in 2005.
The returning cast for Star Wars: The Rise of Skywalker includes Daisy Ridley, Adam Driver, John Boyega, Oscar Isaac, Lupita Nyong'o, Domhnall Gleeson, Kelly Marie Tran, Joonas Soutamo, Anthony Daniels, Billie Lourd, Mark Hamill, and Carrie Fisher. Previously unreleased footage from The Force Awakens and The Last Jedi will be used for Fisher, who died in 2016.
Billy Dee Williams returns from the original trilogy as Lando Calrissian, and is joined by newcomers in Keri Russell, Dominic Monaghan, Naomi Ackie, and Richard E. Grant.
Star Wars: The Rise of Skywalker will release December 20, 2019 in India and across the world.
| english |
Blaise Pascal (1623 - 1662) is one of the most important French philosophers.
Pascal was a child prodigy, who was educated by his father. He was a mathematical genius.
At 16 he wrote the Essai pour les coniques which was published in 1640.
In 1642 he invented a calculating machine to help his father, who served as Royal Tax Commissioner at Rouen.
Pascal is often credited with the discovery of the mathematical theory of probability,
and he also made serious contributions to number theory and geometry.
Between 1642 and 1652 around 50 Pascaline's were manufactured, 8 or 9 survived:
1 or 2 are in the IBM collection;
4 at the Musée des arts et métiers (CNAM, Paris);
2 at the Musee du Ranquet (Clermont-Ferrand) and one at the Staatliche Kunstsammlungen Dresden,
Mathematisch-Physikalischer Salon.
Additional resources:
| english |
If there is one MC Business to avoid in GTA Online, it's the Document Forgery Office. The reason is simple: it's terrible for making cash. Many players have a limited time for what they can do in this game, so devoting some of it to the worst moneymaker is unwise. It's much better to get any other MC Business from an efficiency standpoint since the famous aphorism, "time is money," is especially relevant here.
This guide will go over why the Document Forgery Office might seem appealing to some players. Moreover, it will also discuss why gamers should avoid it at all costs for the sake of efficiency.
Note: Some aspects of this article are subjective.
In terms of hourly profit, the Document Forgery MC Business is the worst property to own in GTA Online. You can make a profit of about $22K every 60 minutes, which is very low. Many other good properties grant players double or more the cash per hour by comparison. The above infographic is for fully upgraded businesses — those that aren't will offer less money.
Moreover, unlike the Weed Farm, no feature like Street Dealers helps grant the Document Forgery Office an alternate moneymaker.
There are a few reasons why players opt to purchase this MC Business over others. Here is a list of them:
- Low cost to start: Its Grapeseed location is the cheapest option available, with other locations tending to be less expensive than other businesses on average.
- Cheapest upgrade expenses: All upgrades for this property are more affordable than those for its competitors.
- Fastest production time: Players don't have to wait long to do a Sell Mission.
All of these advantages seem good on paper, but they don't justify the lousy moneymaking potential in the long run. The money you save here will get overshadowed by an investment you could have made elsewhere.
Profit per hour is generally a much more important metric than being able to max out inventory as soon as possible. After all, players who go AFK for a long time won't care if this property gets all of its stock a bit before the much more rewarding Cocaine Lockup.
Similarly, many players won't have the time to do every possible Sell Mission in GTA Online. The title already has the following:
Adding a weak moneymaker in there would limit a person's time to do something much more productive, like The Cayo Perico Heist or any of the aforementioned Sell Missions.
Many gamers can earn millions of dollars in GTA Online without ever owning a Document Forgery Office. Unless you're a die-hard who wants every property in this title, there is no real reason to consider purchasing the Document Forgery Office over other MC Businesses.
For The Biggest GTA 6 Map Leaks, Click Here.
Poll : Do you ever use glitches to make money in GTA Online?
| english |
# Android Graphql Tutorial with Apollo
This is the tutorial application for working with the [Apollo Android SDK](https://github.com/apollographql/apollo-android).
The tutorial is available through our documentation site: [Android Tutorial](https://www.apollographql.com/docs/android/tutorial/00-introduction/).
This repo has one branch:
* main is the final state of the application with all functionality
| markdown |
<filename>package.json<gh_stars>1-10
{
"name": "vis-tarot",
"version": "1.0.0",
"description": "Data Visualization Tarot",
"main": "index.js",
"scripts": {
"lint": "eslint ."
},
"repository": {
"type": "git",
"url": "git+https://github.com/mcorrell/vis-tarot.git"
},
"author": "",
"license": "ISC",
"bugs": {
"url": "https://github.com/mcorrell/vis-tarot/issues"
},
"homepage": "https://github.com/mcorrell/vis-tarot#readme",
"devDependencies": {
"babel-eslint": "^10.0.3",
"eslint": "^6.7.2",
"eslint-config-prettier": "^6.7.0",
"eslint-plugin-prettier": "^3.1.2",
"prettier": "^1.19.1"
}
}
| json |
Virat Kohli’s legacy is radiating everywhere and the spectrum of his fan base is only getting broader and broader each day. Virat Kohli has emerged as not just India’s favourite batsman but also a cricketer loved beyond borders. He is loved and respected all over the world for the cricketer he is and even more imperatively the character he is.
He is briskly turning every batting record in his favour and he seems unstoppable at the moment. His rise is just like that of an emperor whose empire is touching new skies every day. He is a symbol of national pride and if someone says that he does not deserve all this respect and love then the person saying this would be stupid for sure.
He is loved by people and media in not just India but all over the globe and a similar display of love this time came from Pakistan. A news anchor from our neighbouring nation was talking about Virat’s stalwart batting style and then one of the panellists started criticising Virat Kohli.
The panellist was left all dry and high and the only option he had was to agree to the anchor and take his words back. The panellist who was stunned by the Anchor’s applause for Kohli then said that Pakistani players must show their real skills and a chance must be given to the youngsters in the team.
Seeing this amount of love and respect for Kohli from across the border you would surely smile and wonder for a while forgetting everything else that how wonderful it would have been if India and Pakistan were good friends.
| english |
After a fine time, Shikhar Dhawan will be back to his home-based franchise in Indian Premier League. He has been traded from Sunrisers Hyderabad to Delhi Capitals for the upcoming edition of the tournament. Meanwhile, the senior player of the side, Amit Mishra is confident of Dhawan doing well for the franchise.
Sunrisers will miss the services of Shikhar Dhawan, who has been pretty extraordinary for the team over the years. However, Dhawan would be happy to get back to his local team, who are desperately waiting for the coveted Trophy.
In exchange, Sunrisers Hyderabad received the services of Shahbaz Nadeem, Vijay Shankar, and youngster Abhishek Sharma. Perhaps, it would be a good deal for both the sides, as all the players are in brilliant form.
Speaking of the inclusion, Amit Mishra quoted that he is looking forward to joining him again. They both played together for the Hyderabad franchise. Dhawan being the local lad, Mishra believes that he could well be an asset for the team.
Further, he went on to add saying that the inclusion of Dhawan will bring left-right combination at the top for the team. Most probably, it would be Prithvi Shaw, who could be opening the innings with Dhawan for the team.
”I hope he brings similar sort of performances for DC and wins games for us this season. We are getting a good opener in him and a right hand-left hand combination at the top will surely help in balancing the side,” he added.
Mishra also quoted that the team is really pumped up for the upcoming season. They put on a flop show in IPL 2018 but Amit Mishra quoted that they are very determined to get perform as a unit in the upcoming edition and yield results.
”We are very excited for the new season. The team is new, the name is new and there is a lot of positive vibe around. There are a lot of new faces and the team is looking very balanced. Everybody is very excited to do well this season,” Mishra,” Mishra inferred.
Well, it would be interesting to see how things would pan out for Shikhar Dhawan in the upcoming season. Most probably, Delhi Capitals would be a determining unit to bag the trophy, as they never touched it so far in the IPL history.
| english |
Bollywood actor Sushant Singh Rajput’ suicide has opened up a book of debates in the Indian film industry. The debate of ‘insiders vs outsiders’ ignited since then like never before. Netizens are trolling the star kids and those belonging to the film basis almost every day on social media. Recently, Bollywood actress Mahima Chaudhry opened up on her journey as an outsider. ‘Lajja’ and ‘Pardesh’ fame actress Mahima Chaudhry narrated an incident where she was bullied by filmmaker Subhash Ghai who launched her with ‘Pardes’ in 1997.
Mahima Chaudhry revealed that she was even taken to the court by Subhas Ghai and how she was not allowed to take work without his permission. Pardes actress further mentioned that only stars who stood by her were Salman Khan, Sanjay Dutt, filmmakers David Dhawan and Rajkumar Santoshi.
| english |
package mvp.data.download.down.sql;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import java.util.concurrent.atomic.AtomicInteger;
/**
* Created by ericYang on 2017/6/1.
* Email:<EMAIL>
* what?
*/
public class RockDBHelper {
private final AtomicInteger mOpenCounter;
private static RockDBHelper instance;
private SQLiteDatabase mDatabase;
private static DBHelper dbHelper;
private RockDBHelper(Context context) {
this.mOpenCounter = new AtomicInteger(0);
dbHelper=new DBHelper(context);
}
public static RockDBHelper getInstance(Context context){
if(instance == null){
synchronized(RockDBHelper.class){
if(instance == null){
instance = new RockDBHelper(context);
}
}
}
return instance;
}
public synchronized SQLiteDatabase getWritableDatabase() {
if(mOpenCounter.incrementAndGet() == 1) {
// 获取一个数据库实例
mDatabase = dbHelper.getWritableDatabase();
}
return mDatabase;
}
public synchronized void close() {
if(mOpenCounter.decrementAndGet() == 0) {
//关闭没有连接的数据库
if (mDatabase!=null)
mDatabase.close();
}
}
} | java |
<reponame>bkvaiude/tictock
{
"locations" : ["Turambhe","Mumbai"],
"shifts" : { "morning": {"in_time":"10:00:00","out_time":"19:00:00"}},
"messages" :
{
"welcome":[
"People often say that motivation doesn't last. Well, neither does bathing -- that's why we recommend it daily. -- <NAME>",
"Sales are contingent upon the attitude of the salesman -- not the attitude of the prospect. -- <NAME>",
"Being good in business is the most fascinating kind of art. Making money is art and working is art and good business is the best art. -- <NAME>",
"Always do your best. What you plant now, you will harvest later. -- <NAME>",
"Everyone lives by selling something. -- <NAME>",
"Develop success from failures. Discouragement and failure are two of the surest stepping stones to success. -- <NAME>",
"Challenges are what make life interesting and overcoming them is what makes life meaningful. -- <NAME>",
"Action is the foundational key to all success. -- <NAME>",
"If you are not taking care of your customer, your competitor will. -- <NAME>",
"The golden rule for every businessman is this: Put yourself in your customer's place. -- <NAME>",
"Hire character. Train skill. -- <NAME>",
"The best leaders are those most interested in surrounding themselves with assistants and associates smarter than they are. They are frank in admitting this and are willing to pay for such talents. -- <NAME>",
"Be patient with yourself. Self-growth is tender; it’s holy ground. There’s no greater investment. -- <NAME>",
"The secret of joy in work is contained in one word -- excellence. To know how to do something well is to enjoy it. -- <NAME>",
"Nothing is really work unless you would rather be doing something else. -- <NAME>",
"Without a customer, you don’t have a business -- all you have is a hobby. -- <NAME>",
"To be most effective in sales today, it's imperative to drop your 'sales' mentality and start working with your prospects as if they've already hired you. -- <NAME>",
"Formula for success: rise early, work hard, strike oil. -- <NAME>"
],
"latecomer" : [ "Until you value yourself, you won’t value your time. Until you value your time, you will not do anything with it. ~ <NAME>",
"The key is in not spending time, but in investing it. ~ <NAME>",
"My favorite things in life don’t cost any money. It’s really clear that the most precious resource we all have is time. ~ <NAME>",
"Know the true value of time; snatch, seize, and enjoy every moment of it. ~ <NAME>",
"I recommend you take care of the minutes and the hours will take care of themselves. ~ Earl of Chesterfield",
"Realize that now, in this moment of time, you are creating. You are creating your next moment. That is what’s real. ~ <NAME>",
"If you spend too much time thinking about a thing, you’ll never get it done. ~ <NAME>",
"Most people spend more time and energy going around problems than in trying to solve them. ~ <NAME>",
"Don’t spend time beating on a wall, hoping to transform it into a door. ~ <NAME>",
"Ordinary people think merely of spending time. Great people think of using it. ~ Author Unknown",
"Time is what we want most, but what we use worst. ~ <NAME>",
"Men talk of killing time, while time quietly kills them. ~ <NAME>",
"Dost thou love life? Then do not squander time, for that is the stuff life is made of. ~ <NAME>",
"Time = Life, Therefore, waste your time and waste of your life, or master your time and master your life. ~ <NAME>",
"Lost time is never found again. ~ <NAME>",
"You can’t make up for lost time. You can only do better in the future. ~ <NAME>",
"Lack of direction, not lack of time, is the problem. We all have twenty-four hour days. ~ <NAME>",
"You will never find time for anything. If you want time you must make it. ~ <NAME>",
"The essence of self-discipline is to do the important thing rather than the urgent thing. ~ <NAME>",
"Don’t wait. The time will never be just right. ~ <NAME>",
"Better three hours too soon than a minute too late. ~ <NAME>",
"Determine never to be idle. No person will have occasion to complain of the want of time who never loses any. It is wonderful how much can be done if we are always doing. ~ <NAME>",
"The best time to plant a tree is twenty years ago. The second best time is now. ~ Proverb",
"One day at a time–this is enough. Do not look back and grieve over the past for it is gone; and do not be troubled about the future, for it has not yet come. Live in the present, and make it so beautiful it will be worth remembering. ~ Unknown"
]
}
} | json |
When it comes to the Internet, the shift has been moving toward more customization for years. As users, though, we’re not content with just throwing RSS feeds onto a page and calling it a day. We want information that’s specially curated for us.
When you’re on the go, catching up with social feeds via applications such as my6sense is somewhat easy. This “intuition-based” customization learns over time the things that you tend to read and then provides content based upon those preferences. For many of us, we spend far more time in front of our computers than we do away from them and an option such as this has been sorely lacking.
Enter Genieo.
Genieo is an application for your Mac that was built to answer a specific question — what is personalization? The answer, according to CEO Sol Tzvi is that it’s an entire experience, rather than just a few bits of filtered news. Rather than having to manually insert and remove RSS feeds, then sift through the stories included in them that you wouldn’t necessarily care about, Genieo learns what you love by watching what you read.
As you can see, I’ve connected Genieo with my Twitter and Facebook accounts so that I can share stories. But going a step further, Genieo has pulled in birthday reminders from my Facebook as well. You can choose to show or hide various sections of the page and there are some unique sharing options (a personal magazine cover, akin to Papre.li) as well.
What I find interesting about Genieo is that it has this tendency to pull in stories from sites that I might not have otherwise visited. While there are stories presently showing from TNW, Churchdrop and Engadget, I’ve seen some great content pop in from other sites that I’ve never been to, as well. Oh, and if something pops up that you don’t like, you can flag it as not interesting or remove the feed from the specific site entirely.
There are other parts that I’ve grown to love about it, as well. Visiting a question on Quora, for example, will cue Genieo to follow that question and wait for a relevant answer to be given. Once something has gotten a significant amount of positive action, Genieo will remind me to revisit the question by placing it onto my page with a snippet of the chosen answer.
The app runs natively on your Mac, so if you happen to be a browser switcher your homepage will stay current to your preferences. It does take a couple of days to really understand the types of stories that interest you, but you’ll start seeing fresh, relevant content from the first few minutes that you use it.
While I’m a big fan of customization, I’ve seen very few applications that do it right. Genieo for Mac is exactly what iGoogle should have been but never was. With support for nearly every browser and an algorithm that works continually, it’s become my favorite way to relax and read on my Mac.
Get the most important tech news in your inbox each week.
| english |
import { defineComponent,ref,inject } from 'vue';
import {PanelProps} from '../panel.type';
import Store from '../store/store';
export default defineComponent({
name: 'DPanelHeader',
props: PanelProps,
setup(props,ctx){
const beforeToggle = inject('beforeToggle');
const keys = Object.keys(Store.state());
const key = keys.pop();
const isCollapsed = ref(Store.state()[key]);
// 当beforeToggle为fals时
// 最好cursor是default 而不是 pointer;
// pointer一般用于可点击的
// 用changeFlag
let changeFlag = ref();
let header = null;
const canToggle = (): Promise<boolean> => {
let changeResult = Promise.resolve(true);
if(beforeToggle) {
const result = beforeToggle(isCollapsed);
if(typeof result !== undefined) {
if(result instanceof Promise) {
changeResult = result;
} else {
changeResult = Promise.resolve(result);
}
}
}
return changeResult;
}
// 需要执行一次才能生效;
canToggle().then((val)=>changeFlag.value = val)
const toggleBody = (): void => {
canToggle().then((val) => {
changeFlag.value = val;
if (!val){
// 禁止折叠不影响展开
if (!isCollapsed.value){
Store.setData(`${key}`, !isCollapsed.value);
isCollapsed.value = !isCollapsed.value;
props.toggle?.(isCollapsed.value);
}
return;
}
if (isCollapsed.value !== undefined) {
Store.setData(`${key}`, !isCollapsed.value);
isCollapsed.value = !isCollapsed.value;
props.toggle?.(isCollapsed.value);
}
})
};
return () => {
if (ctx.slots.default){
header = (
<div class="devui-panel-heading" onClick={toggleBody} style={{ 'cursor': changeFlag.value ? 'pointer' : 'auto' }}>
{ctx.slots.default?.()}
</div>
)
}
return header
}
},
}) | typescript |
A New South Wales man, Robert Xie, was sentenced to life imprisonment without parole last week for the horrific murders of five members of the Lin family.
Due to the shocking nature of the crime, Xie’s sentence has not attracted controversy. Yet NSW is the only jurisdiction in Australia that does not provide parole and review mechanisms for life sentences. This raises serious questions about whether such sentences are compatible with human rights.
The European Court of Human Rights has declared that a sentence of life imprisonment without the possibility of review is inhumane. Through legislative or judicial action, various European, South American and Scandinavian countries have abolished life imprisonment as unconstitutional or unfair.
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 |
<reponame>ans-group/basebot<filename>packages/basebot-util-fcm/package.json
{
"name": "basebot-util-fcm",
"version": "2.4.18",
"description": "Firebase Cloud Messaging integration for Basebot",
"main": "dist/index.js",
"scripts": {
"prepublish": "npm run build",
"build": "npx babel index.js --out-dir dist --ignore=\"node_modules\",\"dist\" --source-maps inline",
"dev": "npx babel ./ --watch --out-dir dist --ignore=\"node_modules\",\"dist\" --source-maps inline"
},
"repository": {
"type": "git",
"url": "git+https://github.com/ans-group/basebot.git"
},
"author": "<NAME>",
"license": "MIT",
"bugs": {
"url": "https://github.com/ans-group/basebot/issues"
},
"homepage": "https://github.com/ans-group/basebot#readme",
"gitHead": "396eca19b05aff6a0025727e4924a5ee22d8abf4",
"dependencies": {
"firebase-admin": "^7.3.0",
"node-schedule": "^1.3.2"
},
"devDependencies": {
"@babel/cli": "^7.4.3",
"@babel/core": "^7.4.3",
"@babel/preset-env": "^7.4.3"
}
}
| json |
<filename>src/main/resources/static/mas_json/2009_chi_2434634308453987242.json
{"title": "Design of haptic interfaces for therapy.", "fields": ["haptic technology", "wearable computer", "autism", "mood", "tangible user interface"], "abstract": "Touch is fundamental to our emotional well-being. Medical science is starting to understand and develop touch-based therapies for autism spectrum, mood, anxiety and borderline disorders. Based on the most promising touch therapy protocols, we are presenting the first devices that simulate touch through haptic devices to bring relief and assist clinical therapy for mental health. We present several haptic systems that enable medical professionals to facilitate the collaboration between patients and doctors and potentially pave the way for a new form of non-invasive treatment that could be adapted from use in care-giving facilities to public use. We developed these prototypes working closely with a team of mental health professionals.", "citation": "Citations (62)", "departments": ["Massachusetts Institute of Technology", "Massachusetts Institute of Technology", "Massachusetts Institute of Technology"], "authors": ["<NAME>.....http://dblp.org/pers/hd/v/Vaucelle:Cati", "<NAME>.....http://dblp.org/pers/hd/b/Bonanni:Leonardo", "<NAME>.....http://dblp.org/pers/hd/i/Ishii_0001:Hiroshi"], "conf": "chi", "year": "2009", "pages": 4} | json |
<filename>data/glosses/uhl/v0.1/content/5173.json
{"brief":"incantation","long":"<i>Meaning:</i> an \"incantation\" or \"augury\".<br/><i>Usage:</i> enchantment.<br/><i>Source:</i> from \"H5172\";"}
| json |
export type KeyValueStoreSuccessfulUpdateResult<TVersion> = {
readonly type: `successful`;
readonly version: TVersion;
};
| typescript |
would be able to swap their assets as well. This announcement may have been the reason for the recent growth of Tron on the social front., a social media analytics firm, Tron’s social mentions increased by 180.1%, and its social engagements appreciated by 135.2% in the last month.
Furthermore, from the image provided below, it can be seen that TRX’s volume observed a massive surge over the last few days. Tron’s volume grew from 336 million all the way to 1.2 billion in the last week. However, its development activity continued to decline over the past few days.
This decline in activity should be something that investors keep in mind before making any trades. Not to forget, a decline in development activity suggests that the contributions being made by Tron’s developers to their GitHub had decreased over the past week.Source: Santiment’s dApps also observed positive growth over the last week.Read more:
U.S. authorities investigate crypto exchange FTX: AP sourceThe swift collapse of cryptocurrency exchange FTX sent more shockwaves through the crypto world on Thursday, with authorities now investigating the firm for potential securities violations and analysts bracing for a further downturn in crypto prices.
| english |
import { TestBed } from '@angular/core/testing';
import { NhlService } from './nhl.service';
describe('NhlService', () => {
let service: NhlService;
beforeEach(() => {
TestBed.configureTestingModule({});
service = TestBed.inject(NhlService);
});
it('should be created', () => {
expect(service).toBeTruthy();
});
});
| typescript |
/*
* Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "normalizePlugin.h"
#include <cstring>
#include <cublas_v2.h>
#include <cudnn.h>
#include <iostream>
#include <sstream>
using namespace nvinfer1;
using nvinfer1::plugin::Normalize;
using nvinfer1::plugin::NormalizePluginCreator;
namespace
{
const char* NORMALIZE_PLUGIN_VERSION{"1"};
const char* NORMALIZE_PLUGIN_NAME{"Normalize_TRT"};
} // namespace
PluginFieldCollection NormalizePluginCreator::mFC{};
std::vector<PluginField> NormalizePluginCreator::mPluginAttributes;
Normalize::Normalize(const Weights* weights, int nbWeights, bool acrossSpatial, bool channelShared, float eps)
: acrossSpatial(acrossSpatial)
, channelShared(channelShared)
, eps(eps)
{
mNbWeights = nbWeights;
ASSERT(nbWeights == 1);
ASSERT(weights[0].count >= 1);
mWeights = copyToDevice(weights[0].values, weights[0].count);
cublasCreate(&mCublas);
}
Normalize::Normalize(
const Weights* weights, int nbWeights, bool acrossSpatial, bool channelShared, float eps, int C, int H, int W)
: acrossSpatial(acrossSpatial)
, channelShared(channelShared)
, eps(eps)
, C(C)
, H(H)
, W(W)
{
mNbWeights = nbWeights;
ASSERT(nbWeights == 1);
ASSERT(weights[0].count >= 1);
mWeights = copyToDevice(weights[0].values, weights[0].count);
cublasCreate(&mCublas);
}
Normalize::Normalize(const void* buffer, size_t length)
{
const char *d = reinterpret_cast<const char*>(buffer), *a = d;
C = read<int>(d);
H = read<int>(d);
W = read<int>(d);
acrossSpatial = read<bool>(d);
channelShared = read<bool>(d);
eps = read<float>(d);
int nbWeights = read<int>(d);
mWeights = deserializeToDevice(d, nbWeights);
ASSERT(d == a + length);
}
int Normalize::getNbOutputs() const
{
// Plugin layer has 1 output
return 1;
}
Dims Normalize::getOutputDimensions(int index, const Dims* inputs, int nbInputDims)
{
ASSERT(nbInputDims == 1);
ASSERT(index == 0);
ASSERT(inputs[0].nbDims == 3);
return DimsCHW(inputs[0].d[0], inputs[0].d[1], inputs[0].d[2]);
}
int Normalize::initialize()
{
return 0;
}
void Normalize::terminate()
{
CUBLASASSERT(cublasDestroy(mCublas));
}
size_t Normalize::getWorkspaceSize(int maxBatchSize) const
{
return normalizePluginWorkspaceSize(acrossSpatial, C, H, W);
}
int Normalize::enqueue(int batchSize, const void* const* inputs, void** outputs, void* workspace, cudaStream_t stream)
{
const void* inputData = inputs[0];
void* outputData = outputs[0];
pluginStatus_t status = normalizeInference(stream, mCublas, acrossSpatial, channelShared, batchSize, C, H, W, eps,
reinterpret_cast<const float*>(mWeights.values), inputData, outputData, workspace);
ASSERT(status == STATUS_SUCCESS);
return 0;
}
size_t Normalize::getSerializationSize() const
{
// C,H,W, acrossSpatial,channelShared, eps, mWeights.count,mWeights.values
return sizeof(int) * 3 + sizeof(bool) * 2 + sizeof(float) + sizeof(int) + mWeights.count * sizeof(float);
}
void Normalize::serialize(void* buffer) const
{
char *d = reinterpret_cast<char*>(buffer), *a = d;
write(d, C);
write(d, H);
write(d, W);
write(d, acrossSpatial);
write(d, channelShared);
write(d, eps);
write(d, (int) mWeights.count);
serializeFromDevice(d, mWeights);
ASSERT(d == a + getSerializationSize());
}
bool Normalize::supportsFormat(DataType type, PluginFormat format) const
{
return (type == DataType::kFLOAT && format == PluginFormat::kNCHW);
}
Weights Normalize::copyToDevice(const void* hostData, size_t count)
{
void* deviceData;
CUASSERT(cudaMalloc(&deviceData, count * sizeof(float)));
CUASSERT(cudaMemcpy(deviceData, hostData, count * sizeof(float), cudaMemcpyHostToDevice));
return Weights{DataType::kFLOAT, deviceData, int64_t(count)};
}
void Normalize::serializeFromDevice(char*& hostBuffer, Weights deviceWeights) const
{
CUASSERT(cudaMemcpy(hostBuffer, deviceWeights.values, deviceWeights.count * sizeof(float), cudaMemcpyDeviceToHost));
hostBuffer += deviceWeights.count * sizeof(float);
}
Weights Normalize::deserializeToDevice(const char*& hostBuffer, size_t count)
{
Weights w = copyToDevice(hostBuffer, count);
hostBuffer += count * sizeof(float);
return w;
}
// Set plugin namespace
void Normalize::setPluginNamespace(const char* pluginNamespace)
{
mPluginNamespace = pluginNamespace;
}
const char* Normalize::getPluginNamespace() const
{
return mPluginNamespace;
}
// Return the DataType of the plugin output at the requested index
DataType Normalize::getOutputDataType(int index, const nvinfer1::DataType* inputTypes, int nbInputs) const
{
ASSERT(index == 0);
return DataType::kFLOAT;
}
// Return true if output tensor is broadcast across a batch.
bool Normalize::isOutputBroadcastAcrossBatch(int outputIndex, const bool* inputIsBroadcasted, int nbInputs) const
{
return false;
}
// Return true if plugin can use input that is broadcast across batch without replication.
bool Normalize::canBroadcastInputAcrossBatch(int inputIndex) const
{
return false;
}
// Configure the layer with input and output data types.
void Normalize::configurePlugin(const Dims* inputDims, int nbInputs, const Dims* outputDims, int nbOutputs,
const DataType* inputTypes, const DataType* outputTypes, const bool* inputIsBroadcast,
const bool* outputIsBroadcast, PluginFormat floatFormat, int maxBatchSize)
{
ASSERT(*inputTypes == DataType::kFLOAT && floatFormat == PluginFormat::kNCHW);
C = inputDims[0].d[0];
H = inputDims[0].d[1];
W = inputDims[0].d[2];
if (channelShared)
{
ASSERT(mWeights.count == 1);
}
else
{
ASSERT(mWeights.count == C);
}
ASSERT(nbInputs == 1);
ASSERT(nbOutputs == 1);
ASSERT(inputDims[0].nbDims >= 1); // number of dimensions of the input tensor must be >=2
ASSERT(inputDims[0].d[0] == outputDims[0].d[0] && inputDims[0].d[1] == outputDims[0].d[1]
&& inputDims[0].d[2] == outputDims[0].d[2]);
}
// Attach the plugin object to an execution context and grant the plugin the access to some context resource.
void Normalize::attachToContext(cudnnContext* cudnnContext, cublasContext* cublasContext, IGpuAllocator* gpuAllocator)
{
}
// Detach the plugin object from its execution context.
void Normalize::detachFromContext() {}
const char* Normalize::getPluginType() const
{
return NORMALIZE_PLUGIN_NAME;
}
const char* Normalize::getPluginVersion() const
{
return NORMALIZE_PLUGIN_VERSION;
}
void Normalize::destroy()
{
delete this;
}
// Clone the plugin
IPluginV2Ext* Normalize::clone() const
{
// Create a new instance
IPluginV2Ext* plugin = new Normalize(&mWeights, mNbWeights, acrossSpatial, channelShared, eps);
// Set the namespace
plugin->setPluginNamespace(mPluginNamespace);
return plugin;
}
NormalizePluginCreator::NormalizePluginCreator()
{
mPluginAttributes.emplace_back(PluginField("weights", nullptr, PluginFieldType::kFLOAT32, 1));
mPluginAttributes.emplace_back(PluginField("acrossSpatial", nullptr, PluginFieldType::kINT32, 1));
mPluginAttributes.emplace_back(PluginField("channelShared", nullptr, PluginFieldType::kINT32, 1));
mPluginAttributes.emplace_back(PluginField("nbWeights", nullptr, PluginFieldType::kINT32, 1));
mPluginAttributes.emplace_back(PluginField("eps", nullptr, PluginFieldType::kFLOAT32, 1));
mFC.nbFields = mPluginAttributes.size();
mFC.fields = mPluginAttributes.data();
}
const char* NormalizePluginCreator::getPluginName() const
{
return NORMALIZE_PLUGIN_NAME;
}
const char* NormalizePluginCreator::getPluginVersion() const
{
return NORMALIZE_PLUGIN_VERSION;
}
const PluginFieldCollection* NormalizePluginCreator::getFieldNames()
{
return &mFC;
}
IPluginV2Ext* NormalizePluginCreator::createPlugin(const char* name, const PluginFieldCollection* fc)
{
std::vector<float> weightValues;
const PluginField* fields = fc->fields;
for (int i = 0; i < fc->nbFields; ++i)
{
const char* attrName = fields[i].name;
if (!strcmp(attrName, "nbWeights"))
{
ASSERT(fields[i].type == PluginFieldType::kINT32);
mNbWeights = *(static_cast<const int*>(fields[i].data));
}
else if (!strcmp(attrName, "acrossSpatial"))
{
ASSERT(fields[i].type == PluginFieldType::kINT32);
mAcrossSpatial = *(static_cast<const bool*>(fields[i].data));
}
else if (!strcmp(attrName, "channelShared"))
{
ASSERT(fields[i].type == PluginFieldType::kINT32);
mChannelShared = *(static_cast<const bool*>(fields[i].data));
}
else if (!strcmp(attrName, "eps"))
{
ASSERT(fields[i].type == PluginFieldType::kFLOAT32);
mEps = *(static_cast<const float*>(fields[i].data));
}
else if (!strcmp(attrName, "weights"))
{
ASSERT(fields[i].type == PluginFieldType::kFLOAT32);
int size = fields[i].length;
weightValues.reserve(size);
const auto* w = static_cast<const float*>(fields[i].data);
for (int j = 0; j < size; j++)
{
weightValues.push_back(*w);
w++;
}
}
}
Weights weights{DataType::kFLOAT, weightValues.data(), (int64_t) weightValues.size()};
Normalize* obj = new Normalize(&weights, mNbWeights, mAcrossSpatial, mChannelShared, mEps);
obj->setPluginNamespace(mNamespace.c_str());
return obj;
}
IPluginV2Ext* NormalizePluginCreator::deserializePlugin(const char* name, const void* serialData, size_t serialLength)
{
// This object will be deleted when the network is destroyed, which will
// call Normalize::destroy()
Normalize* obj = new Normalize(serialData, serialLength);
obj->setPluginNamespace(mNamespace.c_str());
return obj;
}
| cpp |
Tim Southee's arrivalin the UAE was incidental. Kolkata Knight Riders' 15-crore man Pat Cummins opting out of travelling for IPL's resumption meant KKR were left to find a replacement. They turned to the New Zealand pacer, who last featured in the IPL in 2019, where he played just three games and exited with an economy rate of 13.11. He began on the bench as KKR preferred to go with his compatriot Lockie Ferguson, and looked set to remain there as the latter made an impact right away.
KKR found a new lease of life since the restart in their sprint towards a playoffs finish, only to be thrown off-guard by an injury to Andre Russell in the fixture against CSK. More than anything, it messed with KKR's balance, and meant Morgan had to summon from his bench the players who could chip in with both bat and ball to compensate for the West Indian's absence.
In came Southee, making an alright beginning to his life in the tournament that hasn't previously been kind on him. He played a supporting role in the crucial win over 2020 finalists with figures of 1 for 29, but the spotlight soon got brighter on him as Lockie Ferguson too joined the injury list. It meant further depletion of balance and the risk of being lop-sided right when the race for the playoffs.
KKR went into Sunday's fixture as the best of the chasing pack - courtesy their superior NRR - and the knowledge that beating SRH - the most underwhelming side this season - would take them another step closer to making that fourth spot their own. It was one of those fixtures that could've gone very wrong for KKR considering the pressure they played under, and the complete contrast with which SRH operated.
Southee went a long way in easing such nerves in the very first over, after Kane Williamson decided to bat on a sluggish Dubai pitch. An inswinger flummoxed Wriddhiman Saha, who was perhaps shaping up for Southee to take the ball away like he usually does at the start. KKR unleashed their spin trio of Shakib Al Hasan, Varun CV and Sunil Narine to maintain control through the middle and even succeeded with wickets, but on a pitch like that, even a small contribution towards the end threatened to turn the tables.
Abdul Samad's was starting to look like one such contribution as he patiently got used to the surface and took on Varun in the 17th over to set SRH up for a late flourish. Morgan turned to Southee, who returned and nipped that in the bud straightaway. Southee took the pace off against a batsman who had a glint in his eye and the long on fence in his sights, only to mistime and hit it straight to the fielder there. That dimmed SRH's innings further, and the eventual narrow margin of KKR's victory enhanced Southee's effectiveness on the night.
"Tim's obviously had a huge impact in the side," Morgan said in the press conference after his team's win over SRH. "When you miss two or three big gun players - we miss Pat, we miss Lockie, and obviously Dre has been missing as well. His contribution with the ball in this phase has been brilliant. It's one thing contributing throughout a campaign, but I think, when you look at actually when you need players to stand up, senior players to be able to do that... Tim has done that brilliantly."
"He's come in seamlessly, showing a lot of experience. He's done it for a very long time for the Blackcaps. He's obviously one of their top-class bowlers in all formats of the game so it is great to see that in a KKR shirt," he added.
While a depleted KKR marched on despite key injuries, the medical staff spent day and night trying to get Russell and Ferguson back up to speed. The New Zealander was already at the venue on Sunday, doing a few run-throughs while Russell's rehabilitation continued.
Southee, with two bright performances in three outings, has done enough to give them a little more time for recovery, while the team gears up for one last must-win hurdle to surpass on October 7 against Rajasthan Royals.
| english |
<filename>resources/ayat/011/011067.json<gh_stars>0
{
"id": 1540,
"surahNumber": "011",
"ayatNumber": "067",
"arabic": "وَأَخَذَ الَّذِينَ ظَلَمُوا الصَّيْحَةُ فَأَصْبَحُوا فِي دِيَارِهِمْ جَاثِمِينَ",
"english": "And As-Saihah (torment - awful cry, etc.) overtook the wrong-doers, so they lay (dead), prostrate in their homes,",
"bengali": "আর ভয়ঙ্কর গর্জন পাপিষ্ঠদের পাকড়াও করল, ফলে ভোর হতে না হতেই তারা নিজ নিজ গৃহসমূহে উপুর হয়ে পড়ে রইল।"
}
| json |
<reponame>claryaldringen/karma-graphql-preprocessor<filename>package.json
{
"name": "karma-graphql-preprocessor",
"version": "1.0.0",
"description": "A Karma plugin. Convert GraphQL files into valid queries. ",
"main": "lib/index.js",
"author": "<NAME>",
"license": "MIT",
"scripts": {
"test": "mocha"
},
"repository": {
"type": "git",
"url": "<EMAIL>:claryaldringen/karma-graphql-preprocessor.git"
},
"devDependencies": {
"chai": "^4.1.2",
"mocha": "^4.0.1"
},
"dependencies": {
"graphql": "^0.11.7",
"graphql-tag": "^2.5.0"
}
}
| json |
module flowchart.model {
export class EventParamDeleteList {
Shapes: shape.ShapeBase[];
Connections: connection.ShapeConnection[];
constructor(shapes: shape.ShapeBase[], connections: connection.ShapeConnection[]) {
this.Shapes = shapes;
this.Connections = connections;
}
}
} | typescript |
{
"id": 12137,
"citation_title": "How Occupied France Financed Its Own Exploitation in World War II",
"citation_author": [
"<NAME>",
"<NAME>",
"<NAME>"
],
"citation_publication_date": "2006-04-17",
"issue_date": "2006-04-17",
"revision_date": "None",
"topics": [
"Macroeconomics",
"Macroeconomic Models",
"Fiscal Policy",
"History",
"Macroeconomic History",
"Other History"
],
"program": [
"Development of the American Economy"
],
"projects": null,
"working_groups": null,
"abstract": "\n\nThe occupation payments made by France to Nazi Germany between 1940 and 1944 represent one of the largest recorded international transfers and contributed significantly to financing the overall German war effort. Using a neoclassical growth model that incorporates essential features of the occupied economy and the postwar stabilization, we assess the welfare costs of French policies that funded payments to Germany. Occupation payments required a 16 percent reduction of consumption for twenty years, with the draft of labor to Germany and wage and price controls adding substantially to this burden. Vichy%u2019s postwar debt overhang would have demanded large budget surpluses; but inflation, which erupted after Liberation, reduced the debt well below its steady state level and redistributed the adjustment costs. The Marshall Plan played only a minor direct role, and international credits helped to substantially lower the nation%u2019s burden.\n\n",
"acknowledgement": "\n"
} | json |
Multi Commodity Exchange of India, or MCX share price continued its upward trend for the fourth consecutive session on Thursday and hit a 52-week high led by strong buying interest in the stock. MCX shares have rallied over 7% in the past one week.
On Thursday, MCX shares gained as much as 2.43% to a record high of ₹2,447.40 apiece on the BSE.
However, there is more steam left and MCX shares may see 25% more upside over the next 12 months as the company has its near-term growth drivers in place, according to brokerage firm UBS.
The brokerage maintained its ‘Buy’ rating on MCX shares and raised the target price to ₹3,000 from ₹2,100 earlier, implying an upside of over 25% from Wednesday’s closing price.
In October, the largest commodity bourse in the country MCX went live with its new commodity derivatives platform (CDP) after it received approval from Sebi's Technical Advisory Panel.
UBS noted that MCX’s operations have been smooth after the transition to a new platform. Volume at the exchange returned to normal levels with futures average daily value (ADV) at ₹220 billion and options ADV at ₹830 billion during 27-30 October.
The brokerage pointed out several near- to medium-term drivers of volume growth for MCX. These include new futures (Steel TMT) and options (shorter duration contracts) product launches; continued volatility in key commodity prices (gold, crude) amid global uncertainties; and a rise in retail participation in the options market.
(Exciting news! Mint is now on WhatsApp Channels Subscribe today by clicking the link and stay updated with the latest financial insights! Click here!)
Moreover, the brokerage expects no impact from competition on MCX’s volumes, as similar products are currently available on other exchanges.
“We expect MCX to maintain its leadership in commodity trading by attracting volume with better liquidity. We will continue to track volume closely to assess potential competitive risk," UBS said.
MCX stock has delivered more than 65% return in the past six months with the completion of the transition, and is trading at 31x 12-month forward PE, adjusted for one-off costs.
The brokerage believes the market has not fully factored in higher operating leverage and the growth potential of new products in the near to medium term.
“With the technology overhang over and near-term potential drivers in place, we see meaningful re-rating potential," UBS added.
It forecasts a 21.8% revenue CAGR, driven by an increase in futures and options ADV over the next two years. New products to be launched should also support growth. It also expects meaningful improvement in profitability from FY25E, after the company moved to the new technology platform.
UBS estimates EBITDA margin to improve to 55.7% in FY25-26, aided by operating leverage benefits.
At 1:10 pm, MCX shares were trading 0.87% higher at ₹2,410.00 apiece on the BSE.
Disclaimer: The views and recommendations made above are those of individual analysts or broking companies, and not of Mint. We advise investors to check with certified experts before taking any investment decisions.
Unlock a world of Benefits! From insightful newsletters to real-time stock tracking, breaking news and a personalized newsfeed – it's all here, just a click away! Login Now!
| english |
Manish Pandey slammed a magnificent 81* as he propelled Kolkata Knight Riders to a competitive 178/7 against Mumbai Indians at the Wankhede stadium in the 2017 Indian Premier League clash.
Manish Pandey blasted his eighth fifty as he boosted Kolkata Knight Riders to 178/7 in the clash against Mumbai Indians at the Wankhede stadium in the 2017 Indian Premier League. The right-hander’s 81* off 47 balls included five fours and five sixes. (MI vs KKR updates)
Pandey’s blitz allowed KKR to recover after Mumbai Indians’ Krunal Pandya had taken 3/24 in the middle overs to stall their progress. The Karnataka batsman began the rebuilding progress by sharing a 44-run stand with Suryakumar Yadav for the fifth wicket. Towards the end overs, Pandey opened up and he began in grand style by lofting the fifth ball of the 19th over bowled by Lasith Malinga over long on for a big six. (MI vs KKR scorecard)
Pandey holds the reputation for being the first Indian batsman to score a century in the Indian Premier League. He achieved this feat in 2009 while playing for Royal Challengers Bangalore against the Deccan Chargers in Centurion. | english |
<!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" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>
Class: Rex::Struct2::Restraint
— Documentation by YARD 0.8.7.4
</title>
<link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />
<link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />
<script type="text/javascript" charset="utf-8">
hasFrames = window.top.frames.main ? true : false;
relpath = '../../';
framesUrl = "../../frames.html#!Rex/Struct2/Restraint.html";
</script>
<script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
</head>
<body>
<div id="header">
<div id="menu">
<a href="../../_index.html">Index (R)</a> »
<span class='title'><span class='object_link'><a href="../../Rex.html" title="Rex (module)">Rex</a></span></span> » <span class='title'><span class='object_link'><a href="../Struct2.html" title="Rex::Struct2 (module)">Struct2</a></span></span>
»
<span class="title">Restraint</span>
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
</div>
<div id="search">
<a class="full_list_link" id="class_list_link"
href="../../class_list.html">
Class List
</a>
<a class="full_list_link" id="method_list_link"
href="../../method_list.html">
Method List
</a>
<a class="full_list_link" id="file_list_link"
href="../../file_list.html">
File List
</a>
</div>
<div class="clear"></div>
</div>
<iframe id="search_frame"></iframe>
<div id="content"><h1>Class: Rex::Struct2::Restraint
</h1>
<dl class="box">
<dt class="r1">Inherits:</dt>
<dd class="r1">
<span class="inheritName">Object</span>
<ul class="fullTree">
<li>Object</li>
<li class="next">Rex::Struct2::Restraint</li>
</ul>
<a href="#" class="inheritanceTree">show all</a>
</dd>
<dt class="r2 last">Defined in:</dt>
<dd class="r2 last">lib/rex/struct2/restraint.rb</dd>
</dl>
<div class="clear"></div>
<h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
<ul class="summary">
<li class="public ">
<span class="summary_signature">
<a href="#max_inv_transform-instance_method" title="#max_inv_transform (instance method)">- (Object) <strong>max_inv_transform</strong> </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Returns the value of attribute max_inv_transform.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#max_object-instance_method" title="#max_object (instance method)">- (Object) <strong>max_object</strong> </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Returns the value of attribute max_object.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#max_transform-instance_method" title="#max_transform (instance method)">- (Object) <strong>max_transform</strong> </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Returns the value of attribute max_transform.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#min_inv_transform-instance_method" title="#min_inv_transform (instance method)">- (Object) <strong>min_inv_transform</strong> </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Returns the value of attribute min_inv_transform.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#min_object-instance_method" title="#min_object (instance method)">- (Object) <strong>min_object</strong> </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Returns the value of attribute min_object.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#min_transform-instance_method" title="#min_transform (instance method)">- (Object) <strong>min_transform</strong> </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Returns the value of attribute min_transform.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#should_update-instance_method" title="#should_update (instance method)">- (Object) <strong>should_update</strong> </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Returns the value of attribute should_update.</p>
</div></span>
</li>
</ul>
<h2>
Instance Method Summary
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
</h2>
<ul class="summary">
<li class="public ">
<span class="summary_signature">
<a href="#initialize-instance_method" title="#initialize (instance method)">- (Restraint) <strong>initialize</strong>(max_object = nil, min_object = nil, should_update = false, max_transform = nil, min_transform = nil, max_inv_transform = nil, min_inv_transform = nil) </a>
</span>
<span class="note title constructor">constructor</span>
<span class="summary_desc"><div class='inline'>
<p>A new instance of Restraint.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#max-instance_method" title="#max (instance method)">- (Object) <strong>max</strong> </a>
</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#min-instance_method" title="#min (instance method)">- (Object) <strong>min</strong> </a>
</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#update-instance_method" title="#update (instance method)">- (Object) <strong>update</strong>(value) </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>update values if request (ie string set field to its length).</p>
</div></span>
</li>
</ul>
<div id="constructor_details" class="method_details_list">
<h2>Constructor Details</h2>
<div class="method_details first">
<h3 class="signature first" id="initialize-instance_method">
- (<tt><span class='object_link'><a href="" title="Rex::Struct2::Restraint (class)">Restraint</a></span></tt>) <strong>initialize</strong>(max_object = nil, min_object = nil, should_update = false, max_transform = nil, min_transform = nil, max_inv_transform = nil, min_inv_transform = nil)
</h3><div class="docstring">
<div class="discussion">
<p>Returns a new instance of Restraint</p>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/rex/struct2/restraint.rb', line 15</span>
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span>
<span class='id identifier rubyid_max_object'>max_object</span><span class='op'>=</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_min_object'>min_object</span><span class='op'>=</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_should_update'>should_update</span><span class='op'>=</span><span class='kw'>false</span><span class='comma'>,</span>
<span class='id identifier rubyid_max_transform'>max_transform</span><span class='op'>=</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_min_transform'>min_transform</span><span class='op'>=</span><span class='kw'>nil</span><span class='comma'>,</span>
<span class='id identifier rubyid_max_inv_transform'>max_inv_transform</span><span class='op'>=</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_min_inv_transform'>min_inv_transform</span><span class='op'>=</span><span class='kw'>nil</span>
<span class='rparen'>)</span>
<span class='ivar'>@max_object</span> <span class='op'>=</span> <span class='id identifier rubyid_max_object'>max_object</span>
<span class='ivar'>@min_object</span> <span class='op'>=</span> <span class='id identifier rubyid_min_object'>min_object</span>
<span class='ivar'>@should_update</span> <span class='op'>=</span> <span class='id identifier rubyid_should_update'>should_update</span>
<span class='id identifier rubyid_def_trans'>def_trans</span> <span class='op'>=</span> <span class='id identifier rubyid_proc'>proc</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_i'>i</span><span class='op'>|</span> <span class='id identifier rubyid_i'>i</span><span class='rbrace'>}</span>
<span class='ivar'>@max_transform</span> <span class='op'>=</span> <span class='id identifier rubyid_max_transform'>max_transform</span> <span class='op'>==</span> <span class='kw'>nil</span> <span class='op'>?</span> <span class='id identifier rubyid_def_trans'>def_trans</span> <span class='op'>:</span> <span class='id identifier rubyid_max_transform'>max_transform</span>
<span class='ivar'>@min_transform</span> <span class='op'>=</span> <span class='id identifier rubyid_min_transform'>min_transform</span> <span class='op'>==</span> <span class='kw'>nil</span> <span class='op'>?</span> <span class='id identifier rubyid_def_trans'>def_trans</span> <span class='op'>:</span> <span class='id identifier rubyid_min_transform'>min_transform</span>
<span class='ivar'>@max_inv_transform</span> <span class='op'>=</span> <span class='id identifier rubyid_max_inv_transform'>max_inv_transform</span> <span class='op'>==</span> <span class='kw'>nil</span> <span class='op'>?</span> <span class='id identifier rubyid_def_trans'>def_trans</span> <span class='op'>:</span> <span class='id identifier rubyid_max_inv_transform'>max_inv_transform</span>
<span class='ivar'>@min_inv_transform</span> <span class='op'>=</span> <span class='id identifier rubyid_min_inv_transform'>min_inv_transform</span> <span class='op'>==</span> <span class='kw'>nil</span> <span class='op'>?</span> <span class='id identifier rubyid_def_trans'>def_trans</span> <span class='op'>:</span> <span class='id identifier rubyid_min_inv_transform'>min_inv_transform</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
</div>
<div id="instance_attr_details" class="attr_details">
<h2>Instance Attribute Details</h2>
<span id="max_inv_transform=-instance_method"></span>
<div class="method_details first">
<h3 class="signature first" id="max_inv_transform-instance_method">
- (<tt>Object</tt>) <strong>max_inv_transform</strong>
</h3><div class="docstring">
<div class="discussion">
<p>Returns the value of attribute max_inv_transform</p>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
9
10
11</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/rex/struct2/restraint.rb', line 9</span>
<span class='kw'>def</span> <span class='id identifier rubyid_max_inv_transform'>max_inv_transform</span>
<span class='ivar'>@max_inv_transform</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<span id="max_object=-instance_method"></span>
<div class="method_details ">
<h3 class="signature " id="max_object-instance_method">
- (<tt>Object</tt>) <strong>max_object</strong>
</h3><div class="docstring">
<div class="discussion">
<p>Returns the value of attribute max_object</p>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
9
10
11</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/rex/struct2/restraint.rb', line 9</span>
<span class='kw'>def</span> <span class='id identifier rubyid_max_object'>max_object</span>
<span class='ivar'>@max_object</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<span id="max_transform=-instance_method"></span>
<div class="method_details ">
<h3 class="signature " id="max_transform-instance_method">
- (<tt>Object</tt>) <strong>max_transform</strong>
</h3><div class="docstring">
<div class="discussion">
<p>Returns the value of attribute max_transform</p>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
9
10
11</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/rex/struct2/restraint.rb', line 9</span>
<span class='kw'>def</span> <span class='id identifier rubyid_max_transform'>max_transform</span>
<span class='ivar'>@max_transform</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<span id="min_inv_transform=-instance_method"></span>
<div class="method_details ">
<h3 class="signature " id="min_inv_transform-instance_method">
- (<tt>Object</tt>) <strong>min_inv_transform</strong>
</h3><div class="docstring">
<div class="discussion">
<p>Returns the value of attribute min_inv_transform</p>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
9
10
11</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/rex/struct2/restraint.rb', line 9</span>
<span class='kw'>def</span> <span class='id identifier rubyid_min_inv_transform'>min_inv_transform</span>
<span class='ivar'>@min_inv_transform</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<span id="min_object=-instance_method"></span>
<div class="method_details ">
<h3 class="signature " id="min_object-instance_method">
- (<tt>Object</tt>) <strong>min_object</strong>
</h3><div class="docstring">
<div class="discussion">
<p>Returns the value of attribute min_object</p>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
9
10
11</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/rex/struct2/restraint.rb', line 9</span>
<span class='kw'>def</span> <span class='id identifier rubyid_min_object'>min_object</span>
<span class='ivar'>@min_object</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<span id="min_transform=-instance_method"></span>
<div class="method_details ">
<h3 class="signature " id="min_transform-instance_method">
- (<tt>Object</tt>) <strong>min_transform</strong>
</h3><div class="docstring">
<div class="discussion">
<p>Returns the value of attribute min_transform</p>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
9
10
11</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/rex/struct2/restraint.rb', line 9</span>
<span class='kw'>def</span> <span class='id identifier rubyid_min_transform'>min_transform</span>
<span class='ivar'>@min_transform</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<span id="should_update=-instance_method"></span>
<div class="method_details ">
<h3 class="signature " id="should_update-instance_method">
- (<tt>Object</tt>) <strong>should_update</strong>
</h3><div class="docstring">
<div class="discussion">
<p>Returns the value of attribute should_update</p>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
9
10
11</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/rex/struct2/restraint.rb', line 9</span>
<span class='kw'>def</span> <span class='id identifier rubyid_should_update'>should_update</span>
<span class='ivar'>@should_update</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
</div>
<div id="instance_method_details" class="method_details_list">
<h2>Instance Method Details</h2>
<div class="method_details first">
<h3 class="signature first" id="max-instance_method">
- (<tt>Object</tt>) <strong>max</strong>
</h3><table class="source_code">
<tr>
<td>
<pre class="lines">
37
38
39
40</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/rex/struct2/restraint.rb', line 37</span>
<span class='kw'>def</span> <span class='id identifier rubyid_max'>max</span>
<span class='kw'>return</span> <span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_max_object'>max_object</span>
<span class='kw'>return</span> <span class='id identifier rubyid_max_object'>max_object</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="min-instance_method">
- (<tt>Object</tt>) <strong>min</strong>
</h3><table class="source_code">
<tr>
<td>
<pre class="lines">
32
33
34
35</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/rex/struct2/restraint.rb', line 32</span>
<span class='kw'>def</span> <span class='id identifier rubyid_min'>min</span>
<span class='kw'>return</span> <span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_min_object'>min_object</span>
<span class='kw'>return</span> <span class='id identifier rubyid_min_object'>min_object</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="update-instance_method">
- (<tt>Object</tt>) <strong>update</strong>(value)
</h3><div class="docstring">
<div class="discussion">
<p>update values if request (ie string set field to its length)</p>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
43
44
45
46
47
48</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/rex/struct2/restraint.rb', line 43</span>
<span class='kw'>def</span> <span class='id identifier rubyid_update'>update</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
<span class='kw'>return</span> <span class='kw'>if</span> <span class='op'>!</span><span class='ivar'>@should_update</span>
<span class='id identifier rubyid_max_object'>max_object</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span> <span class='op'>=</span> <span class='id identifier rubyid_max_inv_transform'>max_inv_transform</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_max_object'>max_object</span>
<span class='id identifier rubyid_min_object'>min_object</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span> <span class='op'>=</span> <span class='id identifier rubyid_min_inv_transform'>min_inv_transform</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_min_object'>min_object</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
</div>
</div>
<div id="footer">
Generated on Mon Dec 8 15:51:45 2014 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.8.7.4 (ruby-2.1.5).
</div>
</body>
</html> | html |
Sambalpur- Sambalpur district police lodge another success in its drive against illegal arms as per ongoing campaign due to election . Briefing to media persons at his office, SDPO Bhawani Shankar Utgata said that a crack down was conducted today in the leadership of IIC Surubabu Chhatria on the shop of a scrape dealer Md Shami(46) at Pandloi under Rengali police station and recovered a country made pistol with three live ammunitions. A case no 56/2019, dt 03.04.2019 under section 25 arms act was registered at the police station. The accused will be forwarded to judicial custody tomorrow.
| english |
<reponame>ConstYavorskiy/HeractJS
/**
* Developer: <NAME>
* Date: 6/26/2015
* Copyright: 2009-2015 Comindware®
* All Rights Reserved
*
* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF Comindware
* The copyright notice above does not evidence any
* actual or intended publication of such source code.
*/
/* global define, require, Handlebars, Backbone, Marionette, $, _, Localizer, Ajax */
define([
'coreui',
'shared',
'../views/NavigationView',
'../services/NavigationItemFactory'
],
function (
core,
shared,
NavigationView,
NavigationItemFactory
) {
'use strict';
return Marionette.Controller.extend({
initialize: function (options) {
core.utils.helpers.ensureOption(options, 'context');
core.utils.helpers.ensureOption(options, 'predefinedItems');
this.bindReqres();
this.createModel(options.context);
this.createView();
},
bindReqres: function () {
this.reqres = new Backbone.Wreqr.RequestResponse();
this.reqres.setHandler('mode:toggle', this.__toggleMode, this);
},
createModel: function (context) {
this.model = new Backbone.Model();
this.model.set('children', new Backbone.Collection(this.__getNavigationItems(context)));
this.model.set('compactMode', false);
},
createView: function () {
this.view = new NavigationView({
reqres: this.reqres,
model: this.model
});
},
getDefaultUrl: function () {
var firstItem = this.model.get('children').at(0);
if (!firstItem || !firstItem.get('url')) {
core.utils.helpers.throwError('Failed to find a valid default module.');
}
return firstItem.get('url');
},
reload: function () {
//noinspection JSUnresolvedFunction
Ajax.Navigation.GetNavigationContext().then(function (context) {
this.model.get('children').reset(this.__getNavigationItems(context));
}.bind(this));
},
__getNavigationItems: function (context) {
//noinspection JSUnresolvedVariable
var itemsArray = _.chain(context.workspace)
.filter(function (wsItem) {
if (wsItem.systemType === 'cmw.workspace.SystemItem') {
switch (wsItem.id) {
case 'cmw.workspace.MyTasksItem':
return wsItem;
break;
case 'cmw.workspace.PeopleItem':
return wsItem;
break;
case 'cmw.workspace.RecordsItem':
return wsItem;
break;
case 'cmw.workspace.GridItem':
return wsItem;
break;
case 'cmw.workspace.GanttItem':
return wsItem;
break;
case 'cmw.workspace.FormItem':
return wsItem;
break;
case 'cmw.workspace.SettingsItem':
if (shared.services.SecurityService.hasGlobalPermission(shared.services.SecurityService.globalPermissions.APP_DESIGN) ||
shared.services.SecurityService.hasGlobalPermission(shared.services.SecurityService.globalPermissions.USER_MANAGEMENT)) {
return wsItem;
}
break;
case 'cmw.workspace.ProcessesItem':
if (shared.services.SecurityService.hasGlobalPermission(shared.services.SecurityService.globalPermissions.APP_DESIGN)) {
return wsItem;
}
break;
case 'cmw.workspace.ProcessMonitoringItem':
if (shared.services.SecurityService.hasGlobalPermission(shared.services.SecurityService.globalPermissions.APP_DESIGN)) {
return wsItem;
}
break;
case 'cmw.workspace.ArchitectureItem':
if (shared.services.SecurityService.hasGlobalPermission(shared.services.SecurityService.globalPermissions.APP_DESIGN)) {
return wsItem;
}
break;
case 'cmw.workspace.DataDiagramItem':
if (shared.services.SecurityService.hasGlobalPermission(shared.services.SecurityService.globalPermissions.APP_DESIGN)) {
return wsItem;
}
break;
case 'cmw.workspace.GlobalFunctionsItem':
if (shared.services.SecurityService.hasGlobalPermission(shared.services.SecurityService.globalPermissions.APP_DESIGN)) {
return wsItem;
}
break;
case 'cmw.workspace.CommunicationChannelsItem':
if (shared.services.SecurityService.hasGlobalPermission(shared.services.SecurityService.globalPermissions.APP_DESIGN)) {
return wsItem;
}
break;
case 'cmw.workspace.CommunicationRoutesItem':
if (shared.services.SecurityService.hasGlobalPermission(shared.services.SecurityService.globalPermissions.APP_DESIGN)) {
return wsItem;
}
break;
}
} else {
return wsItem;
}
}).map(function (wsItem) {
return NavigationItemFactory.createModel(wsItem);
}).value();
itemsArray.push(new Backbone.Model({
compactMode: false,
id: "dashboard",
name: "Dashboard",
tooltip: "Dashboard",
type: "system",
url: shared.services.ModuleService.getDefaultModuleUrl(shared.services.ModuleService.modules.DASHBOARD)
}));
if (window.flag_debug) {
itemsArray.push(new Backbone.Model({
compactMode: false,
id: "demoCore",
name: "Core UI Demo",
tooltip: "Core UI Demo",
type: "system",
url: shared.services.ModuleService.getDefaultModuleUrl(shared.services.ModuleService.modules.DEMO_CORE)
}));
}
_.each(this.options.predefinedItems, function (item) {
itemsArray.push(_.extend({
compactMode: false,
type: "system",
tooltip: item.name
}, item));
}, this);
return itemsArray;
},
__toggleMode: function () {
var newCompactMode = !this.model.get('compactMode');
this.model.set('compactMode', newCompactMode);
}
});
});
| javascript |
The internet transformed the way we get our dopamine fix by bombarding us with constant notifications that cater to our need for validation. Additionally, streaming platforms awakened our binge-watching tendencies, adding to the many digital stimuli that give us a dopamine rush at a faster and more frequent pace. “All of this conditions the brain to expect stimulation at a certain speed, so it tends to go back to the screen to look for that stimulation. And if you don’t get the same level of stimulation, you start feeling demotivated and irritable,” says Sharma.
After ending Thursday's session with a 20% rally, Allied Digital Services stock rallied another 14.7% on Friday to scale a fresh 52-week high of Rs 196 on the BSE. The microcap's market capitalisation also crossed Rs 1,000 crore on Friday.
Discover the pinnacle of innovation with the Best MacBooks in India. Immerse yourself in unmatched performance, stunning Retina displays, and a seamless blend of style and functionality. These top-tier laptops redefine the digital experience, delivering unparalleled power for productivity and creativity. Elevate your daily tasks and enjoy the epitome of technology. Invest in the Best MacBook for a transformative computing experience that exceeds expectations.
When it comes to smallcaps there is an interesting equation between desire and challenge. When the desire to own smallcaps is highest, challenges are also highest & vice-versa. Given the recent performance of smallcaps, the desire to own is highest but biggest challenge is to find good quality smallcaps with not-so-outlandish valuations. This is exactly opposite of what the situation was in last quarter of 2022, when valuations were not that expensive but there was hardly any clamour of buying into smallcaps. The reason why it is important to get the right smallcap is because only then return on higher and commensurate with the risks an investor is taking. ET screener powered by Refinitiv’s Stock Report Plus lists down stocks from smallcap space with high upside potential over the next 12 months, having an average recommendation rating of “Buy” or "Strong Buy" and also meeting some parameters like net margins and return on equity.
Founded in 2018 by orthodontists, Arpi Mehta Shah, Pravin Shetty, Manjul Jain and Anirudh Kal, MakeO is a digital-first clinical cosmetic makeover platform which gives customers access to dental, skin and hair treatment solutions.
Panasonic is expecting "double-digit" growth in the Indian market this fiscal and is preparing to tap into the country's long-term potential by introducing high-tech products. The company is committed to the Indian market, citing its high long-term potential due to lower product penetration, providing room for growth.
The Enforcement Directorate (ED) concluded its searches on Saturday in a money laundering investigation related to the alleged diversion of funds exceeding Rs 2,000 crore from Religare Finvest Limited (RFL). The searches, initiated on Friday, covered nine locations in Delhi-NCR, including the corporate offices of RFL, M3M India Holdings, RHC Holding Pvt Ltd, Hillgrow Infrastructure Pvt Ltd, Dion Global Solutions, and Prius commercial.
It is important to examine the implications of intellectual property rights in the digital era. Discussing issues such as online piracy, copyright infringement, and the need for effective IP protection in the digital space can be pivotal.
The S&P BSE Utilities index rallied 20% and hit a fresh lifetime high of 4825.36 points during the month, whereas S&P BSE Power index surged more than 18% and scaled a fresh lifetime high of 5869.23 points.
India, along with 110 other countries, has voted in favor of a UN Tax Convention Framework, despite opposition from 48 wealthy OECD members. The UN has been leading international tax reforms, including combating 'Base Erosion and Profit Shifting' (BEPS) and the ongoing 'two-pillar solution for digital taxation'. However, doubts have arisen about the inclusivity of the 'inclusive framework' for non-OECD countries.
Balance recovery Since UPI Lite has an on-device balance, the user will lose her wallet balance if she changes the mobile platform (Android to iOS, or vice versa), the registered mobile number with the bank or if the issuer bank changes its IFSC code. Recovering the balance is a tedious process. This harms user experience.
The USA's software development industry, led by top-ranked Sapphire Software Solutions, shapes the global tech landscape. Recognised by CLUTCH and The Manifest, Sapphire stands out for client-centric innovation, making it a prime choice in the competitive market.
Tata Motors on Thursday said it has partnered with HDFC Bank to provide digital financing solutions for its commercial vehicle customers. The two companies have signed a Memorandum of Understanding (MoU) to this effect, Tata Motors said in a statement.
The Indian Army and Ministry of Electronics and Information Technology (MeitY) have joined hands to revolutionize defense through cutting-edge technology. This alliance pioneers advancements like indigenous 5G solutions, AI-driven tools, and cybersecurity measures. With transformative projects, training programs, and digital innovations, the collaboration aims to fortify defense capabilities, ensuring a technologically advanced and strategically robust Indian Army on the global front.
This follows a series of recent partnerships made by Infosys to boost digital transformations across its customers globally. Earlier this month, it tied up with Amazon Web Services (AWS) leveraging its cloud platform Infosys Cobalt to accelerate cloud transformation in financial companies across Europe, Middle East and Africa.
ISB's Chief Digital Officer programme stands out due to its comprehensive approach to digital leadership education. The 40-week program covers critical frameworks such as digital leadership, fostering digital innovation, and digital strategy. What sets it apart is the combination of pre-recorded video lectures featuring globally renowned ISB faculty, masterclasses by industry experts, and the coveted ISB Executive Alumni Status. This multifaceted approach ensures that participants gain a holistic understanding of digital leadership, grounded in both academic excellence and real-world industry insights. The hands-on training through a capstone project further reinforces the practical application of learned concepts.
As per the bid document, those selected for income verification and analysis will need to extract data from the bank statement, analyse the data, determine income and expenditure, and detect fraudulent transactions and other anomalies.
Pakistan's former iconic pacer Wasim Akram suggested a hilarious approach to stop Indian speedster Jasprit Bumrah by stealing his boots after his spell played a crucial role in guiding the Men in Blue to a 100-run victory over England in the ongoing World Cup.
The tool, built in collaboration with PRe Sustainability, is based on open-source technologies and a cloud-agnostic architecture so it can be easily deployed across different cloud platforms, the IT major said in a statement.
| english |
<reponame>burdges/poly-commit<filename>src/single_pc/kzg10.rs
//! Here we constuct a polynomial commitment that enables users to commit to a
//! single polynomial `p`, and then later provide an evaluation proof that
//! convinces verifiers that a claimed value `v` is the true evaluation of `p`
//! at a chosen point `x`. Our construction follows the template of the construction
//! proposed by Kate, Zaverucha, and Goldberg ([KZG10](http://cacr.uwaterloo.ca/techreports/2010/cacr2010-10.pdf)).
//! This construction achieves extractability in the algebraic group model (AGM).
use crate::{
PCCommitment, PCCommitterKey, PCRandomness, PCVerifierKey, Polynomial,
SinglePolynomialCommitment,
};
use algebra::bytes::*;
use algebra::msm::{FixedBaseMSM, VariableBaseMSM};
use algebra::{
AffineCurve, Field, Group, PairingCurve, PairingEngine, PrimeField, ProjectiveCurve,
UniformRand,
};
use rand::RngCore;
use rayon::prelude::*;
use std::marker::PhantomData;
use std::ops::AddAssign;
/// `KZG10` is an implementation of the polynomial commitment scheme of
/// [Kate, Zaverucha and Goldbgerg][kzg10]
///
/// [kzg10]: http://cacr.uwaterloo.ca/techreports/2010/cacr2010-10.pdf
pub struct KZG10<E: PairingEngine> {
_engine: PhantomData<E>,
}
/// `ComitterKey` is used to commit to and create evaluation proofs for a given
/// polynomial.
#[derive(Derivative)]
#[derivative(
Default(bound = ""),
Hash(bound = ""),
Clone(bound = ""),
Debug(bound = "")
)]
pub struct CommitterKey<E: PairingEngine> {
/// Group elements of the form `{ \beta^i G }`, where `i` ranges from 0 to `degree`.
pub powers_of_g: Vec<E::G1Affine>,
/// Group elements of the form `{ \beta^i \gamma G }`, where `i` ranges from 0 to `degree`.
pub powers_of_gamma_g: Vec<E::G1Affine>,
/// Maximum degree of polynomials supported by these parameters
pub degree: usize,
}
impl<E: PairingEngine> PCCommitterKey for CommitterKey<E> {
fn max_degree(&self) -> usize {
self.degree
}
}
/// `VerifierKey` is used to check evaluation proofs for a given commitment.
#[derive(Derivative)]
#[derivative(Default(bound = ""), Clone(bound = ""), Debug(bound = ""))]
pub struct VerifierKey<E: PairingEngine> {
/// The generator of G1.
pub g: E::G1Affine,
/// The generator of G1 that is used for making a commitment hiding.
pub gamma_g: E::G1Affine,
/// The generator of G2.
pub h: E::G2Affine,
/// \beta times the above generator of G2.
pub beta_h: E::G2Affine,
/// The generator of G2, prepared for use in pairings.
pub prepared_h: <E::G2Affine as PairingCurve>::Prepared,
/// \beta times the above generator of G2, prepared for use in pairings.
pub prepared_beta_h: <E::G2Affine as PairingCurve>::Prepared,
/// Maximum degree of polynomials supported by these parameters
pub degree: usize,
}
impl<E: PairingEngine> PCVerifierKey for VerifierKey<E> {
fn max_degree(&self) -> usize {
self.degree
}
}
/// `Commitment` commits to a polynomial. It is output by `KZG10::commit`.
#[derive(Derivative)]
#[derivative(
Default(bound = ""),
Hash(bound = ""),
Clone(bound = ""),
Copy(bound = ""),
Debug(bound = ""),
PartialEq(bound = ""),
Eq(bound = "")
)]
pub struct Commitment<E: PairingEngine>(
/// The commitment is a group element.
pub E::G1Affine,
);
impl<E: PairingEngine> ToBytes for Commitment<E> {
#[inline]
fn write<W: std::io::Write>(&self, writer: W) -> std::io::Result<()> {
self.0.write(writer)
}
}
impl<E: PairingEngine> PCCommitment for Commitment<E> {
#[inline]
fn empty() -> Self {
Commitment(E::G1Affine::zero())
}
fn has_degree_bound(&self) -> bool {
false
}
fn size_in_bytes(&self) -> usize {
to_bytes![E::G1Affine::zero()].unwrap().len() / 2
}
}
impl<'a, E: PairingEngine> AddAssign<(E::Fr, &'a Commitment<E>)> for Commitment<E> {
#[inline]
fn add_assign(&mut self, (f, other): (E::Fr, &'a Commitment<E>)) {
let other = other.0.into_projective().mul(&f);
self.0 = (self.0.into_projective() + &other).into();
}
}
/// `Randomness` hides the polynomial inside a commitment. It is output by `KZG10::commit`.
#[derive(Derivative)]
#[derivative(
Default(bound = ""),
Hash(bound = ""),
Clone(bound = ""),
Debug(bound = ""),
PartialEq(bound = ""),
Eq(bound = "")
)]
pub struct Randomness<E: PairingEngine> {
/// For KZG10, the commitment randomness is a random polynomial.
blinding_polynomial: Polynomial<E::Fr>,
}
impl<E: PairingEngine> Randomness<E> {
#[inline]
fn is_hiding(&self) -> bool {
!self.blinding_polynomial.is_zero()
}
}
impl<E: PairingEngine> PCRandomness for Randomness<E> {
fn empty() -> Self {
Self {
blinding_polynomial: Polynomial::zero(),
}
}
fn rand<R: RngCore>(d: usize, rng: &mut R) -> Self {
let mut randomness = Randomness::empty();
randomness.blinding_polynomial = Polynomial::rand(d + 1, rng);
randomness
}
}
impl<'a, E: PairingEngine> AddAssign<(E::Fr, &'a Randomness<E>)> for Randomness<E> {
#[inline]
fn add_assign(&mut self, (f, other): (E::Fr, &'a Randomness<E>)) {
self.blinding_polynomial += (f, &other.blinding_polynomial);
}
}
/// `Proof` is an evaluation proof that is output by `KZG10::open`.
#[derive(Derivative)]
#[derivative(
Default(bound = ""),
Hash(bound = ""),
Clone(bound = ""),
Copy(bound = ""),
Debug(bound = ""),
PartialEq(bound = ""),
Eq(bound = "")
)]
pub struct Proof<E: PairingEngine> {
/// This is a commitment to the witness polynomial; see [KZG10] for more details.
pub w: E::G1Affine,
/// This is the evaluation of the random polynomial at the point for which
/// the evaluation proof was produced.
pub random_v: E::Fr,
}
/// The error type for `KZG10`.
#[derive(Debug)]
pub enum Error {
/// The provided polynomial was meant to be hiding, but `rng` was `None`.
MissingRng,
/// The degree provided in setup was too small; degree 0 polynomials
/// are not supported.
UnsupportedDegree,
/// The degree of the polynomial passed to `KZG10::commit` or `KZG10::open`
/// was too large.
PolynomialDegreeTooLarge {
/// The degree of the polynomial.
poly_degree: usize,
/// The maximum supported degree.
max_degree: usize,
},
}
impl std::fmt::Display for Error {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Error::MissingRng => write!(f, "hiding commitments require `Some(rng)`"),
Error::UnsupportedDegree => write!(
f,
"this scheme does not support committing to degree 0 polynomials"
),
Error::PolynomialDegreeTooLarge {
poly_degree,
max_degree,
} => write!(
f,
"the degree of the polynomial ({:?}) is greater than\
the maximum supported degree ({:?})",
poly_degree, max_degree
),
}
}
}
impl std::error::Error for Error {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
None
}
}
impl Error {
fn check_degree(d: usize, max_degree: usize) -> Result<(), Self> {
if d < 1 {
Err(Error::UnsupportedDegree)
} else if d > max_degree {
Err(Error::PolynomialDegreeTooLarge {
poly_degree: d,
max_degree,
})
} else {
Ok(())
}
}
}
impl<E: PairingEngine> SinglePolynomialCommitment<E::Fr> for KZG10<E> {
type CommitterKey = CommitterKey<E>;
type VerifierKey = VerifierKey<E>;
type Commitment = Commitment<E>;
type Randomness = Randomness<E>;
type Proof = Proof<E>;
type Error = Error;
/// Constructs public parameters when given as input the maximum degree `degree`
/// for the polynomial commitment scheme.
fn setup<R: RngCore>(
degree: usize,
rng: &mut R,
) -> Result<(Self::CommitterKey, Self::VerifierKey), Self::Error> {
if degree < 1 {
return Err(Error::UnsupportedDegree);
}
let setup_time = start_timer!(|| format!("Started KZG10::Setup with degree {}", degree));
let beta = E::Fr::rand(rng);
let g = E::G1Projective::rand(rng);
let gamma_g = E::G1Projective::rand(rng);
let h = E::G2Projective::rand(rng);
let mut powers_of_beta = vec![E::Fr::one()];
let mut cur = beta;
// TODO: can optimize by computing
// beta, beta^2, beta^4, ..., beta^d and using those to compute arbitrary
// powers of beta faster via a bit decomposition of each scalar.
// But that seems like it would be slower? log(D) additions instead of
// one multiplication.
// Anyway it shouldn't be a bottleneck?
// If we use MPC to run the setup, we can consider this optimization.
for _ in 0..degree {
powers_of_beta.push(cur);
cur *= β
}
let window_size = FixedBaseMSM::get_mul_window_size(degree + 1);
let scalar_bits = E::Fr::size_in_bits();
let g_time = start_timer!(|| "Generating powers of G");
let g_table = FixedBaseMSM::get_window_table(scalar_bits, window_size, g);
let mut powers_of_g = FixedBaseMSM::multi_scalar_mul::<E::G1Projective>(
scalar_bits,
window_size,
&g_table,
&powers_of_beta,
);
end_timer!(g_time);
let gamma_g_time = start_timer!(|| "Generating powers of gamma * G");
let gamma_g_table = FixedBaseMSM::get_window_table(scalar_bits, window_size, gamma_g);
let mut powers_of_gamma_g = FixedBaseMSM::multi_scalar_mul::<E::G1Projective>(
scalar_bits,
window_size,
&gamma_g_table,
&powers_of_beta,
);
end_timer!(gamma_g_time);
E::G1Projective::batch_normalization(powers_of_g.as_mut_slice());
E::G1Projective::batch_normalization(powers_of_gamma_g.as_mut_slice());
let ck = CommitterKey {
powers_of_g: powers_of_g.into_iter().map(|e| e.into_affine()).collect(),
powers_of_gamma_g: powers_of_gamma_g
.into_iter()
.map(|e| e.into_affine())
.collect(),
degree,
};
let beta_h = h.mul(&beta).into_affine();
let h = h.into_affine();
let prepared_h = h.prepare();
let prepared_beta_h = beta_h.prepare();
let vk = VerifierKey {
g: g.into_affine(),
gamma_g: gamma_g.into_affine(),
h,
beta_h,
prepared_h,
prepared_beta_h,
degree,
};
end_timer!(setup_time);
Ok((ck, vk))
}
/// Outputs a commitment to `polynomial`.
fn commit(
ck: &Self::CommitterKey,
polynomial: &Polynomial<E::Fr>,
hiding_bound: Option<usize>,
rng: Option<&mut dyn RngCore>,
) -> Result<(Self::Commitment, Self::Randomness), Error> {
Error::check_degree(polynomial.degree(), ck.max_degree())?;
let commit_time = start_timer!(|| format!(
"Committing to polynomial of degree {} with hiding_bound: {:?}",
polynomial.degree(),
hiding_bound,
));
let mut skip_zeros = 0;
while polynomial.coeffs[skip_zeros].is_zero() && skip_zeros < polynomial.coeffs.len() {
skip_zeros += 1;
}
let from_mont_repr_time =
start_timer!(|| "Converting plaintext polynomial from Montgomery repr");
let plain_coeffs = polynomial.coeffs[skip_zeros..]
.par_iter()
.map(|s| s.into_repr())
.collect::<Vec<_>>();
end_timer!(from_mont_repr_time);
let msm_time = start_timer!(|| "MSM to compute commitment to plaintext poly");
let mut commitment =
VariableBaseMSM::multi_scalar_mul(&ck.powers_of_g[skip_zeros..], &plain_coeffs);
end_timer!(msm_time);
let mut randomness = Randomness::empty();
if let Some(hiding_degree) = hiding_bound {
let mut rng = rng.ok_or(Error::MissingRng)?;
let sample_random_poly_time = start_timer!(|| format!(
"Sampling a random polynomial of degree {}",
hiding_degree
));
randomness = Randomness::rand(hiding_degree, &mut rng);
if randomness.blinding_polynomial.degree() > ck.max_degree() {
eprintln!("The hiding bound is too large for the commitment key.");
Err(Error::PolynomialDegreeTooLarge {
poly_degree: randomness.blinding_polynomial.degree(),
max_degree: ck.max_degree(),
})?;
}
end_timer!(sample_random_poly_time);
}
let from_mont_repr_time =
start_timer!(|| "Converting random polynomial from Montgomery repr");
let random_ints = randomness
.blinding_polynomial
.coeffs
.par_iter()
.map(|s: &E::Fr| s.into_repr())
.collect::<Vec<_>>();
end_timer!(from_mont_repr_time);
let msm_time = start_timer!(|| "MSM to compute commitment to random poly");
let random_commitment =
VariableBaseMSM::multi_scalar_mul(&ck.powers_of_gamma_g, random_ints.as_slice())
.into_affine();
end_timer!(msm_time);
commitment.add_assign_mixed(&random_commitment);
end_timer!(commit_time);
Ok((Commitment(commitment.into()), randomness))
}
/// On input a polynomial `p` and a point `point`, outputs a proof for the same.
fn open(
ck: &Self::CommitterKey,
p: &Polynomial<E::Fr>,
point: E::Fr,
randomness: &Self::Randomness,
) -> Result<Self::Proof, Error> {
Error::check_degree(p.degree(), ck.max_degree())?;
let open_time = start_timer!(|| format!("Opening polynomial of degree {}", p.degree()));
let eval_time = start_timer!(|| "Evaluating polynomial");
let value = p.evaluate(point);
end_timer!(eval_time);
let witness_time = start_timer!(|| "Computing witness polynomial");
let witness_polynomial = &(p - &Polynomial::from_coefficients_vec(vec![value]))
/ &Polynomial::from_coefficients_vec(vec![-point, E::Fr::one()]);
end_timer!(witness_time);
let convert_time = start_timer!(|| "Converting witness polynomial from Montgomery repr");
let witness_coeffs = witness_polynomial
.coeffs
.into_par_iter()
.map(|s| s.into_repr())
.collect::<Vec<_>>();
end_timer!(convert_time);
let witness_comm_time = start_timer!(|| "Computing commitment to witness polynomial");
let mut w = VariableBaseMSM::multi_scalar_mul(&ck.powers_of_g, &witness_coeffs);
end_timer!(witness_comm_time);
let mut random_v = E::Fr::zero();
if randomness.is_hiding() {
let random_p = &randomness.blinding_polynomial;
let rand_eval_time = start_timer!(|| "Evaluating random polynomial");
let random_value = random_p.evaluate(point);
end_timer!(rand_eval_time);
let witness_time = start_timer!(|| "Computing random witness polynomial");
let random_witness_polynomial = &(random_p
- &Polynomial::from_coefficients_vec(vec![random_value]))
/ &Polynomial::from_coefficients_vec(vec![-point, E::Fr::one()]);
end_timer!(witness_time);
let random_witness_coeffs = random_witness_polynomial
.coeffs
.into_par_iter()
.map(|s| s.into_repr())
.collect::<Vec<_>>();
let witness_comm_time =
start_timer!(|| "Computing commitment to random witness polynomial");
w += &VariableBaseMSM::multi_scalar_mul(&ck.powers_of_gamma_g, &random_witness_coeffs);
end_timer!(witness_comm_time);
random_v = random_value;
}
end_timer!(open_time);
Ok(Proof {
w: w.into_affine(),
random_v,
})
}
/// Verifies that `value` is the evaluation at `x` of the polynomial
/// committed inside `comm`.
fn check(
vk: &Self::VerifierKey,
comm: &Self::Commitment,
point: E::Fr,
value: E::Fr,
proof: &Self::Proof,
) -> Result<bool, Error> {
let check_time = start_timer!(|| "Checking evaluation");
let inner = comm.0.into_projective()
- &vk.g.into_projective().mul(&value)
- &vk.gamma_g.into_projective().mul(&proof.random_v);
let lhs = E::pairing(inner, vk.h);
let inner = vk.beta_h.into_projective() - &vk.h.into_projective().mul(&point);
let rhs = E::pairing(proof.w, inner);
end_timer!(check_time, || format!("Result: {}", lhs == rhs));
Ok(lhs == rhs)
}
fn batch_check<R: RngCore>(
vk: &Self::VerifierKey,
commitments: &[Self::Commitment],
points: &[E::Fr],
values: &[E::Fr],
proofs: &[Self::Proof],
rng: &mut R,
) -> Result<bool, Self::Error> {
let check_time =
start_timer!(|| format!("Checking {} evaluation proofs", commitments.len()));
let g = vk.g.into_projective();
let gamma_g = vk.gamma_g.into_projective();
let mut total_c = <E::G1Projective as ProjectiveCurve>::zero();
let mut total_w = <E::G1Projective as ProjectiveCurve>::zero();
let combination_time = start_timer!(|| "Combining commitments and proofs");
let mut randomizer = E::Fr::one();
// Instead of multiplying g and gamma_g in each turn, we simply accumulate
// their coefficients and perform a final multiplication at the end.
let mut g_multiplier = E::Fr::zero();
let mut gamma_g_multiplier = E::Fr::zero();
for (((c, z), v), proof) in commitments.iter().zip(points).zip(values).zip(proofs) {
let mut c = c.0.into_projective();
let w = proof.w.into_projective();
c += &w.mul(z);
g_multiplier += &(randomizer * &v);
gamma_g_multiplier += &(randomizer * &proof.random_v);
total_c += &c.mul(&randomizer);
total_w += &w.mul(&randomizer);
// We don't need to sample randomizers from the full field,
// only from 128-bit strings.
randomizer = u128::rand(rng).into();
}
total_c -= &g.mul(&g_multiplier);
total_c -= &gamma_g.mul(&gamma_g_multiplier);
end_timer!(combination_time);
let to_affine_time = start_timer!(|| "Converting results to affine for pairing");
let mut to_affine = [-total_w, total_c];
E::G1Projective::batch_normalization(&mut to_affine);
let [total_w, total_c] = to_affine;
let total_w = total_w.into_affine();
let total_c = total_c.into_affine();
end_timer!(to_affine_time);
let pairing_time = start_timer!(|| "Performing product of pairings");
let result = E::product_of_pairings(&[
(&total_w.prepare(), &vk.prepared_beta_h),
(&total_c.prepare(), &vk.prepared_h),
]) == E::Fqk::one();
end_timer!(pairing_time);
end_timer!(check_time, || format!("Result: {}", result));
Ok(result)
}
}
#[cfg(test)]
mod tests {
#![allow(non_camel_case_types)]
use crate::single_pc::kzg10::*;
use crate::*;
use algebra::fields::bls12_381::Fr;
use algebra::curves::bls12_377::Bls12_377;
use algebra::curves::bls12_381::Bls12_381;
use algebra::curves::mnt6::MNT6;
use algebra::curves::sw6::SW6;
use rand::thread_rng;
#[test]
fn add_commitments_test() {
let rng = &mut thread_rng();
let p = Polynomial::from_coefficients_slice(&[
Fr::rand(rng),
Fr::rand(rng),
Fr::rand(rng),
Fr::rand(rng),
Fr::rand(rng),
]);
let f = Fr::rand(rng);
let mut f_p = Polynomial::zero();
f_p += (f, &p);
let degree = 4;
let (ck, _) = KZG10::<Bls12_381>::setup(degree, rng).unwrap();
let hiding_bound = None;
let (comm, _) = KZG10::commit(&ck, &p, hiding_bound, Some(rng)).unwrap();
let (f_comm, _) = KZG10::commit(&ck, &f_p, hiding_bound, Some(rng)).unwrap();
let mut f_comm_2 = Commitment::empty();
f_comm_2 += (f, &comm);
assert_eq!(f_comm, f_comm_2);
}
type KZG_Bls12_381 = KZG10<Bls12_381>;
type KZG_Bls12_377 = KZG10<Bls12_377>;
type KZG_MNT6 = KZG10<MNT6>;
type KZG_SW6 = KZG10<SW6>;
#[test]
fn end_to_end_test() {
use crate::single_pc::tests::*;
end_to_end_test::<_, KZG_Bls12_377>().expect("test failed for bls12-377");
end_to_end_test::<_, KZG_Bls12_381>().expect("test failed for bls12-381");
end_to_end_test::<_, KZG_MNT6>().expect("test failed for MNT6");
end_to_end_test::<_, KZG_SW6>().expect("test failed for SW6");
}
#[test]
fn linear_polynomial_test() {
use crate::single_pc::tests::*;
linear_polynomial_test::<_, KZG_Bls12_377>().expect("test failed for bls12-377");
linear_polynomial_test::<_, KZG_Bls12_381>().expect("test failed for bls12-381");
linear_polynomial_test::<_, KZG_MNT6>().expect("test failed for MNT6");
linear_polynomial_test::<_, KZG_SW6>().expect("test failed for SW6");
}
#[test]
fn batch_check_test() {
use crate::single_pc::tests::*;
batch_check_test::<_, KZG_Bls12_377>().expect("test failed for bls12-377");
batch_check_test::<_, KZG_Bls12_381>().expect("test failed for bls12-381");
batch_check_test::<_, KZG_MNT6>().expect("test failed for MNT6");
batch_check_test::<_, KZG_SW6>().expect("test failed for SW6");
}
}
| rust |
@charset "UTF-8";
/* Welcome to Compass.
* In this file you should write your main styles. (or centralize your imports)
* Import this file using the following HTML or equivalent:
* <link href="/stylesheets/mobile.css" media="screen, projection" rel="stylesheet" type="text/css" /> */
/* line 5, ../../../../../../../../Ruby22-x64/lib/ruby/gems/2.2.0/gems/compass-core-1.0.3/stylesheets/compass/reset/_utilities.scss */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font: inherit;
font-size: 100%;
vertical-align: baseline;
}
/* line 22, ../../../../../../../../Ruby22-x64/lib/ruby/gems/2.2.0/gems/compass-core-1.0.3/stylesheets/compass/reset/_utilities.scss */
html {
line-height: 1;
}
/* line 24, ../../../../../../../../Ruby22-x64/lib/ruby/gems/2.2.0/gems/compass-core-1.0.3/stylesheets/compass/reset/_utilities.scss */
ol, ul {
list-style: none;
}
/* line 26, ../../../../../../../../Ruby22-x64/lib/ruby/gems/2.2.0/gems/compass-core-1.0.3/stylesheets/compass/reset/_utilities.scss */
table {
border-collapse: collapse;
border-spacing: 0;
}
/* line 28, ../../../../../../../../Ruby22-x64/lib/ruby/gems/2.2.0/gems/compass-core-1.0.3/stylesheets/compass/reset/_utilities.scss */
caption, th, td {
text-align: left;
font-weight: normal;
vertical-align: middle;
}
/* line 30, ../../../../../../../../Ruby22-x64/lib/ruby/gems/2.2.0/gems/compass-core-1.0.3/stylesheets/compass/reset/_utilities.scss */
q, blockquote {
quotes: none;
}
/* line 103, ../../../../../../../../Ruby22-x64/lib/ruby/gems/2.2.0/gems/compass-core-1.0.3/stylesheets/compass/reset/_utilities.scss */
q:before, q:after, blockquote:before, blockquote:after {
content: "";
content: none;
}
/* line 32, ../../../../../../../../Ruby22-x64/lib/ruby/gems/2.2.0/gems/compass-core-1.0.3/stylesheets/compass/reset/_utilities.scss */
a img {
border: none;
}
/* line 116, ../../../../../../../../Ruby22-x64/lib/ruby/gems/2.2.0/gems/compass-core-1.0.3/stylesheets/compass/reset/_utilities.scss */
article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, nav, section, summary {
display: block;
}
/* -------------------- FONT FAMILY ---------------------*/
@font-face {
font-family: 'NeoSansPro-Regular';
src: url("../../../fonts/NeoSansPro-Regular.woff") format("woff"), url("../../../fonts/NeoSansPro-Regular.ttf") format("truetype"), url("../../../fonts/NeoSansPro-Regular.svg") format("svg");
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'NeoSansPro-Bold';
src: url("../../../fonts/NeoSansPro-Bold.woff") format("woff"), url("../../../fonts/NeoSansPro-Bold.ttf") format("truetype"), url("../../../fonts/NeoSansPro-Bold.svg") format("svg");
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'NeoSansPro-Italic';
src: url("../../../fonts/NeoSansPro-Italic.woff") format("woff"), url("../../../fonts/NeoSansPro-Italic.ttf") format("truetype"), url("../../../fonts/NeoSansPro-Italic.svg") format("svg");
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'NeoSansPro-Light';
src: url("../../../fonts/NeoSansPro-Light.woff") format("woff"), url("../../../fonts/NeoSansPro-Light.ttf") format("truetype"), url("../../../fonts/NeoSansPro-Light.svg") format("svg");
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'NeoSansPro-Medium';
src: url("../../../fonts/NeoSansPro-Medium.woff") format("woff"), url("../../../fonts/NeoSansPro-Medium.ttf") format("truetype"), url("../../../fonts/NeoSansPro-Medium.svg") format("svg");
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'NeoSansPro-MediumItalic';
src: url("../../../fonts/NeoSansPro-MediumItalic.woff") format("woff"), url("../../../fonts/NeoSansPro-MediumItalic.ttf") format("truetype"), url("../../../fonts/NeoSansPro-MediumItalic.svg") format("svg");
font-weight: normal;
font-style: normal;
}
/* -------------------- VARIABLES ---------------------*/
/* -------------------- MIXINS ---------------------*/
/* line 81, ../sass/tablet3sep2015.scss */
.select, .main-middle select, .main-right select {
font-family: "NeoSansPro-Regular";
border: 1px solid #cecece;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
-ms-border-radius: 4px;
-o-border-radius: 4px;
border-radius: 4px;
padding: 5px;
width: 89%;
}
/* line 88, ../sass/tablet3sep2015.scss */
.input_txt, .main-middle input[type='text'], .main-right input[type='text'], .main-middle input[type="text"] {
font-family: "NeoSansPro-Regular";
border: 1px solid #cecece;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
-ms-border-radius: 4px;
-o-border-radius: 4px;
border-radius: 4px;
padding: 5px;
width: 89%;
}
/* line 95, ../sass/tablet3sep2015.scss */
.textarea, .main-right textarea {
font-family: "NeoSansPro-Regular";
border: 1px solid #cecece;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
-ms-border-radius: 4px;
-o-border-radius: 4px;
border-radius: 4px;
padding: 5px;
width: 100%;
resize: none;
height: 150px;
}
/* -------------------- MAIN CSS ---------------------*/
/* line 107, ../sass/tablet3sep2015.scss */
body {
margin: 0;
padding: 0;
font-family: "NeoSansPro-Regular" !important;
font-size: 12px !important;
color: #727376 !important;
}
/* line 114, ../sass/tablet3sep2015.scss */
a {
text-decoration: none;
color: #727376 !important;
}
/* line 117, ../sass/tablet3sep2015.scss */
a:hover {
color: #cc0000 !important;
text-decoration: none !important;
}
/* line 122, ../sass/tablet3sep2015.scss */
p {
margin-bottom: 10px;
}
/* line 125, ../sass/tablet3sep2015.scss */
b {
font-family: "NeoSansPro-Bold";
}
/* line 128, ../sass/tablet3sep2015.scss */
.top-strip {
background: #eeeeee;
}
/* line 131, ../sass/tablet3sep2015.scss */
.top-strip-inner, .header-inner, .container-inner {
padding: 7px;
}
/* line 134, ../sass/tablet3sep2015.scss */
.top-strip-inner {
text-align: left;
font-size: 13px;
line-height: 27px;
}
/* line 139, ../sass/tablet3sep2015.scss */
.main-header, .main-container {
width: 100%;
}
/* line 142, ../sass/tablet3sep2015.scss */
.main-header {
border-bottom: 1px solid #cecece;
}
/* line 145, ../sass/tablet3sep2015.scss */
.main-header .main-nav ul {
margin: 0;
padding: 0;
}
/* line 148, ../sass/tablet3sep2015.scss */
.main-header .main-nav ul li {
float: left;
margin: 0 35px 0 0;
}
/* line 151, ../sass/tablet3sep2015.scss */
.main-header .main-nav ul li a {
line-height: 84px;
}
/* line 159, ../sass/tablet3sep2015.scss */
.top-strip-inner .top-devider {
display: inline-block;
padding: 0 4px;
font-size: 0;
}
/* line 164, ../sass/tablet3sep2015.scss */
.top-strip-inner .top-text-fld {
font-family: "NeoSansPro-Regular";
margin: 0;
border: 1px solid #eaeaea;
padding: 3px 7px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
-ms-border-radius: 3px;
-o-border-radius: 3px;
border-radius: 3px;
width: 100%;
}
/* line 172, ../sass/tablet3sep2015.scss */
.top-strip-inner a {
color: #727376;
}
/* line 174, ../sass/tablet3sep2015.scss */
.top-strip-inner a:hover {
color: #cc0000;
}
/* line 177, ../sass/tablet3sep2015.scss */
.top-strip-inner a:focus {
border: 1px solid #dadada;
}
/* line 182, ../sass/tablet3sep2015.scss */
.responsive_sidebars {
background: #ec3235;
height: 40px;
width: 100%;
display: block;
clear: both;
border-bottom: 1px solid #cecece;
}
/* line 189, ../sass/tablet3sep2015.scss */
.responsive_sidebars .left-bar {
color: #ffffff;
cursor: pointer;
float: left;
box-sizing: border-box;
}
/* line 194, ../sass/tablet3sep2015.scss */
.responsive_sidebars .left-bar i {
font-size: 18px;
float: right;
line-height: 39px;
font-weight: 100;
}
/* line 200, ../sass/tablet3sep2015.scss */
.responsive_sidebars .left-bar .left-bar-title {
font-size: 16px;
float: left;
text-transform: uppercase;
line-height: 37px;
}
/* line 207, ../sass/tablet3sep2015.scss */
.responsive_sidebars .right-bar {
color: #ffffff;
height: 40px;
width: 100px;
cursor: pointer;
float: right;
box-sizing: border-box;
}
/* line 214, ../sass/tablet3sep2015.scss */
.responsive_sidebars .right-bar i {
font-size: 15px;
float: right;
line-height: 35px;
}
/* line 219, ../sass/tablet3sep2015.scss */
.responsive_sidebars .right-bar .right-bar-title {
font-size: 13px;
float: left;
text-transform: uppercase;
line-height: 37px;
}
/* line 227, ../sass/tablet3sep2015.scss */
.main-left {
float: left;
padding: 15px 0 10px;
position: absolute !important;
border: 1px solid #eeeeee;
top: 187px;
left: -100%;
z-index: 10;
background: #ffffff;
padding: 4%;
box-sizing: border-box;
}
/* line 238, ../sass/tablet3sep2015.scss */
.main-left h2.block-title {
font-size: 16px;
font-family: 'NeoSansPro-Medium';
margin: 15px 0 10px;
}
/* line 243, ../sass/tablet3sep2015.scss */
.main-left .rating {
margin: 5px 0;
}
/* line 246, ../sass/tablet3sep2015.scss */
.main-left .followers, .main-left .partners {
margin: 5px 0;
padding: 5px 0;
border-top: 1px solid #dadada;
}
/* line 252, ../sass/tablet3sep2015.scss */
.main-left .profile-block span {
margin: 2px 0 10px;
display: inline-block;
font-family: 'NeoSansPro-Medium';
color: #555555;
}
/* line 258, ../sass/tablet3sep2015.scss */
.main-left .profile-block a {
margin: 3px 0 20px;
display: block;
clear: both;
}
/* line 263, ../sass/tablet3sep2015.scss */
.main-left .profile-block p {
margin: 3px 0 0;
}
/* line 266, ../sass/tablet3sep2015.scss */
.main-left .profile-block .profile-bar {
height: 12px;
width: 115px;
background: #bbbdbf;
}
/* line 270, ../sass/tablet3sep2015.scss */
.main-left .profile-block .profile-bar .profile-complete {
width: 73px;
height: 12px;
background: #ed3237;
}
/* line 278, ../sass/tablet3sep2015.scss */
.block {
margin: 20px 0 5px;
}
/* line 281, ../sass/tablet3sep2015.scss */
.main-middle {
float: none;
padding: 15px 0 10px 0;
margin: auto;
width: 96%;
}
/* line 286, ../sass/tablet3sep2015.scss */
.main-middle .bread-crumb {
display: block;
}
/* line 290, ../sass/tablet3sep2015.scss */
.main-middle .tab-nav ul#tabs {
list-style-type: none;
margin: 0;
padding: 0;
}
/* line 295, ../sass/tablet3sep2015.scss */
.main-middle .tab-nav ul#tabs > li {
display: inline-block;
padding: 3px 0;
margin: 0 30px 10px 0;
cursor: pointer;
font-size: 13px;
position: relative;
}
/* line 303, ../sass/tablet3sep2015.scss */
.main-middle .tab-nav ul#tabs > li.active {
color: #cc0000;
}
/* line 306, ../sass/tablet3sep2015.scss */
.main-middle .tab-nav div#tab {
list-style-type: none;
margin: 0;
padding: 0;
}
/* line 311, ../sass/tablet3sep2015.scss */
.main-middle .tab-nav div#tab > div {
display: block;
padding: 10px;
background: #f0f1f1;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
-ms-border-radius: 5px;
-o-border-radius: 5px;
border-radius: 5px;
margin-bottom: 10px;
}
/* line 318, ../sass/tablet3sep2015.scss */
.main-middle .tab-nav div#tab > div h2 {
font-weight: 400;
margin: 0px 0 10px;
}
/* line 323, ../sass/tablet3sep2015.scss */
.main-middle select {
width: 100%;
margin-bottom: 10px;
}
/* line 328, ../sass/tablet3sep2015.scss */
.main-middle input[type='text'] {
width: 100%;
margin-bottom: 10px;
}
/* line 333, ../sass/tablet3sep2015.scss */
.main-middle .textbox_container:before {
font-family: FontAwesome;
content: "";
position: absolute;
top: 4px;
right: 5px;
}
/* line 340, ../sass/tablet3sep2015.scss */
.main-middle .new_msg_link {
padding-top: 5px;
}
/* line 342, ../sass/tablet3sep2015.scss */
.main-middle .new_msg_link a {
font-family: "NeoSansPro-Bold";
font-size: 13px;
text-decoration: underline;
}
/* line 348, ../sass/tablet3sep2015.scss */
.main-middle .table {
margin-bottom: 0;
width: 100% !important;
}
/* line 353, ../sass/tablet3sep2015.scss */
.main-middle .table thead tr th {
border-bottom: 1px solid #dddddd;
font-family: "NeoSansPro-Medium";
padding-left: 0;
}
/* line 362, ../sass/tablet3sep2015.scss */
.main-middle .table tbody tr td {
padding-left: 0;
}
/* line 368, ../sass/tablet3sep2015.scss */
.main-middle ul.bottom_text {
margin: 0;
padding: 0;
width: 100%;
}
/* line 372, ../sass/tablet3sep2015.scss */
.main-middle ul.bottom_text li {
width: 100%;
}
/* line 374, ../sass/tablet3sep2015.scss */
.main-middle ul.bottom_text li ol {
margin: 0 0 20px 15px;
width: 100%;
}
/* line 377, ../sass/tablet3sep2015.scss */
.main-middle ul.bottom_text li ol li {
width: 100%;
list-style-type: decimal;
text-decoration: underline;
margin-bottom: 2px;
}
/* line 386, ../sass/tablet3sep2015.scss */
.main-middle .bottom_link {
text-decoration: underline;
}
/* line 390, ../sass/tablet3sep2015.scss */
.main-right {
float: left;
padding: 4%;
position: absolute !important;
border: 1px solid #eeeeee;
top: 187px;
right: -100%;
z-index: 10;
background: #ffffff;
box-sizing: border-box;
}
/* line 400, ../sass/tablet3sep2015.scss */
.main-right .left-top-text {
margin: 0 0 10px 15px;
display: block;
}
/* line 404, ../sass/tablet3sep2015.scss */
.main-right h3.block-head {
font-size: 15px;
font-family: "NeoSansPro-Regular";
margin: 0;
background: #f0f1f1 none repeat scroll 0 0;
box-sizing: border-box;
padding: 9px 15px;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
-ms-border-radius: 4px;
-o-border-radius: 4px;
border-radius: 4px;
margin-bottom: 10px;
}
/* line 414, ../sass/tablet3sep2015.scss */
.main-right h3.block-head.dark {
background: #666666 none repeat scroll 0 0;
color: #ffffff;
font-family: "NeoSansPro-Regular";
margin-bottom: 5px;
}
/* line 420, ../sass/tablet3sep2015.scss */
.main-right .left-dropdown-text {
font-family: "NeoSansPro-Bold";
letter-spacing: normal;
display: block;
margin-bottom: 10px;
}
/* line 425, ../sass/tablet3sep2015.scss */
.main-right .left-dropdown-text i {
margin: 3px 5px 0 0;
font-size: 12px;
color: #727376 !important;
}
/* line 431, ../sass/tablet3sep2015.scss */
.main-right .block {
margin: 14px 0 15px;
clear: both;
display: block;
}
/* line 435, ../sass/tablet3sep2015.scss */
.main-right .block i {
font-size: 20px;
color: #cfcfcf;
}
/* line 440, ../sass/tablet3sep2015.scss */
.main-right select {
margin-bottom: 10px;
}
/* line 444, ../sass/tablet3sep2015.scss */
.main-right input[type='text'] {
margin-bottom: 10px;
}
/* line 448, ../sass/tablet3sep2015.scss */
.main-right .textbox_container:before {
font-family: FontAwesome;
content: "";
position: absolute;
top: 4px;
right: 5px;
}
/* line 455, ../sass/tablet3sep2015.scss */
.main-right textarea {
margin-bottom: 10px;
}
/* line 459, ../sass/tablet3sep2015.scss */
.main-right p {
font-family: "NeoSansPro-Regular";
}
/* line 463, ../sass/tablet3sep2015.scss */
.padding-none {
padding: 0 !important;
}
/* line 466, ../sass/tablet3sep2015.scss */
.padding-right-none, .container.container-inner {
padding-right: 0 !important;
}
/* line 469, ../sass/tablet3sep2015.scss */
.padding-left-none, .container.container-inner {
padding-left: 0 !important;
}
/* line 472, ../sass/tablet3sep2015.scss */
.mobile-form-padding-1 {
padding: 0 5px 0 0 !important;
}
/* line 475, ../sass/tablet3sep2015.scss */
.mobile-form-padding-2 {
padding: 0 0 0 5px !important;
}
/* line 482, ../sass/tablet3sep2015.scss */
.profile-block span {
margin: 2px 0 20px;
display: inline-block;
font-family: 'NeoSansPro-Medium';
color: #555555;
}
/* line 488, ../sass/tablet3sep2015.scss */
.profile-block a {
margin: 3px 0 20px;
display: block;
clear: both;
}
/* line 493, ../sass/tablet3sep2015.scss */
.profile-block p {
margin: 3px 0 2px;
}
/* line 496, ../sass/tablet3sep2015.scss */
.profile-block .profile-bar {
height: 12px;
width: 115px;
background: #bbbdbf;
}
/* line 500, ../sass/tablet3sep2015.scss */
.profile-block .profile-bar .profile-complete {
width: 73px;
height: 12px;
background: #ed3237;
}
/* line 506, ../sass/tablet3sep2015.scss */
.profile-block h3.block-head {
background: #f0f1f1 none repeat scroll 0 0;
border-radius: 4px;
box-sizing: border-box;
font-family: "NeoSansPro-Regular";
font-size: 12px;
margin: 0 0 10px;
padding: 9px 15px;
}
/* line 518, ../sass/tablet3sep2015.scss */
.post-but a {
border: 1px solid red;
border-radius: 5px;
display: block;
font-family: "NeoSansPro-Medium";
font-size: 14px;
margin-bottom: 6px;
padding: 5px 10px;
}
/* line 528, ../sass/tablet3sep2015.scss */
.bg-red {
background: #ff0000 none repeat scroll 0 0 !important;
color: #fff;
}
/* line 533, ../sass/tablet3sep2015.scss */
.profile-block ul {
line-height: 22px;
margin: 0px 10px;
}
/* line 536, ../sass/tablet3sep2015.scss */
.profile-block ul li {
padding-left: 15px;
}
/* line 540, ../sass/tablet3sep2015.scss */
.profile-block ul li .active {
background: url(../../../images/right-arrow.png) no-repeat left center;
font-family: "NeoSansPro-Medium";
}
@media only screen and (max-width: 480px) {
/* line 553, ../sass/tablet3sep2015.scss */
.mobile-fluid {
width: 100% !important;
}
/* line 557, ../sass/tablet3sep2015.scss */
.table-responsive {
padding: 10px !important;
}
/* line 560, ../sass/tablet3sep2015.scss */
.table-top {
margin-bottom: 10px;
}
}
/* ---------------------SUMAN ------------------------------*/
/* line 586, ../sass/tablet3sep2015.scss */
.help, .number, .address, .search-icon, .login-icon, .chat, .email, .website {
font-size: 0;
display: inline-block;
width: 20px;
height: 20px;
opacity: 0.7;
cursor: pointer;
}
/* line 587, ../sass/tablet3sep2015.scss */
.login-icon {
float: right;
background-image: url(../../../images/login.png);
background-repeat: no-repeat;
background-size: 15px 12px;
background-position: center;
}
/* line 588, ../sass/tablet3sep2015.scss */
.help {
background-image: url(../../../images/help.png);
background-repeat: no-repeat;
background-size: 15px;
background-position: center;
}
/* line 589, ../sass/tablet3sep2015.scss */
.number {
background-image: url(../../../images/number.png);
background-repeat: no-repeat;
background-size: 15px;
background-position: center;
}
/* line 590, ../sass/tablet3sep2015.scss */
.address {
background-image: url(../../../images/address.png);
background-repeat: no-repeat;
background-size: 15px;
background-position: center;
}
/* line 591, ../sass/tablet3sep2015.scss */
.search-icon {
background-image: url(../../../images/search.png);
background-repeat: no-repeat;
background-size: 15px;
background-position: center;
}
/* line 592, ../sass/tablet3sep2015.scss */
.chat {
background-image: url(../../../images/chat.png);
background-repeat: no-repeat;
background-size: 15px;
background-position: center;
}
/* line 593, ../sass/tablet3sep2015.scss */
.email {
background-image: url(../../../images/email.png);
background-repeat: no-repeat;
background-size: 15px;
background-position: center;
}
/* line 594, ../sass/tablet3sep2015.scss */
.website {
background-image: url(../../../images/website.png);
background-repeat: no-repeat;
background-size: 15px;
background-position: center;
}
/* line 596, ../sass/tablet3sep2015.scss */
.search-fld {
position: absolute;
left: 0;
right: 0;
padding: 12px 20px;
top: 45px;
z-index: 10;
background-color: #ffffff;
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.176);
display: none;
}
/* line 597, ../sass/tablet3sep2015.scss */
.mobile-hide {
display: none !important;
}
/* line 598, ../sass/tablet3sep2015.scss */
.mobile-show {
display: inline-block !important;
}
/* line 600, ../sass/tablet3sep2015.scss */
.login-dropdown li {
position: unset !important;
}
/* line 602, ../sass/tablet3sep2015.scss */
.login-dropdown li a {
padding: 5px 0 !important;
}
/* line 606, ../sass/tablet3sep2015.scss */
.login-dropdown .dropdown-menu {
left: auto !important;
right: 0 !important;
width: 100% !important;
padding: 5px 0 !important;
border: 0 !important;
border-radius: 0 !important;
margin-top: 0 !important;
}
/* line 615, ../sass/tablet3sep2015.scss */
.login-dropdown .dropdown-menu li a {
padding: 5px 10px !important;
}
/* line 624, ../sass/tablet3sep2015.scss */
.table-data .table-row div {
padding-top: 12px !important;
padding-bottom: 12px !important;
}
/* line 631, ../sass/tablet3sep2015.scss */
.table-details div:nth-child(1) {
text-align: left;
}
/* line 634, ../sass/tablet3sep2015.scss */
.table-details div:nth-child(2) {
text-align: center;
}
/* line 637, ../sass/tablet3sep2015.scss */
.table-details div:nth-child(3) {
text-align: right;
}
/* line 639, ../sass/tablet3sep2015.scss */
.table-slide {
border: 1px solid #dadada;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
-ms-border-radius: 3px;
-o-border-radius: 3px;
border-radius: 3px;
overflow: hidden;
padding: 5px !important;
display: none;
margin-top: 5px;
}
/* line 647, ../sass/tablet3sep2015.scss */
.table-control {
background: #ffffff !important;
}
/* line 649, ../sass/tablet3sep2015.scss */
.table-control div {
background: #ffffff !important;
}
/* line 652, ../sass/tablet3sep2015.scss */
.table-control div:first-child {
margin: 5px 0 10px !important;
}
/* line 656, ../sass/tablet3sep2015.scss */
.table-row {
padding: 0 5px !important;
background-color: #f0f1f1;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
-ms-border-radius: 3px;
-o-border-radius: 3px;
border-radius: 3px;
margin: 5px 0 0;
}
/* line 662, ../sass/tablet3sep2015.scss */
.detailsslide {
cursor: pointer;
}
/* line 663, ../sass/tablet3sep2015.scss */
.table-head {
margin: 10px 0 !important;
padding: 0 5px !important;
display: table;
}
/* line 668, ../sass/tablet3sep2015.scss */
.mobile-nav {
display: none;
}
/* line 671, ../sass/tablet3sep2015.scss */
.post-button a {
border: 1px solid red;
border-radius: 5px;
display: block;
font-family: "NeoSansPro-Medium";
font-size: 14px;
margin-bottom: 6px;
padding: 8px 16px;
}
/* line 680, ../sass/tablet3sep2015.scss */
.black-btn {
background: #808184 none repeat scroll 0 0;
border: 1px solid #808184 !important;
color: #fff;
font-size: 13px;
padding: 7px 20px;
}
/* line 686, ../sass/tablet3sep2015.scss */
.black-btn:hover {
background: #fff !important;
}
/* line 690, ../sass/tablet3sep2015.scss */
.radio-inline, .checkbox-inline {
padding: 0 !important;
}
/* line 693, ../sass/tablet3sep2015.scss */
.radio label, .checkbox label {
padding: 0 !important;
margin: 0 !important;
}
/* line 697, ../sass/tablet3sep2015.scss */
.radio input[type="radio"], .radio-inline input[type="radio"], .checkbox input[type="checkbox"], .checkbox-inline input[type="checkbox"] {
margin: 0 5px 0 0 !important;
position: relative !important;
}
/* line 702, ../sass/tablet3sep2015.scss */
.bootstrap-select .btn {
font-size: 12px !important;
padding-left: 7px !important;
padding-top: 8px !important;
padding-bottom: 7px !important;
}
/* line 709, ../sass/tablet3sep2015.scss */
.align-padding-div {
padding-bottom: 11px !important;
}
/* line 712, ../sass/tablet3sep2015.scss */
.margin-top.bold p {
margin-bottom: 10px !important;
}
/* line 715, ../sass/tablet3sep2015.scss */
.margin-bottom {
margin-bottom: 10px !important;
}
/* line 718, ../sass/tablet3sep2015.scss */
.mobile-margin-top {
margin-top: 10px !important;
}
/* line 721, ../sass/tablet3sep2015.scss */
.margin-none {
margin: 0 !important;
}
/* line 724, ../sass/tablet3sep2015.scss */
.low-top-padding {
padding-top: 7px !important;
}
/* line 727, ../sass/tablet3sep2015.scss */
input[type="radio"], input[type="checkbox"] {
margin: 0 5px 0 0 !important;
}
/* line 730, ../sass/tablet3sep2015.scss */
.gray_bg {
background: #f0f1f1;
padding: 10px 10px 0;
box-sizing: border-box;
border-radius: 5px;
margin-bottom: 5px;
}
/* line 737, ../sass/tablet3sep2015.scss */
.form-group {
margin-bottom: 10px;
}
/* line 740, ../sass/tablet3sep2015.scss */
.superscript {
position: absolute;
top: -4px;
}
/* line 744, ../sass/tablet3sep2015.scss */
.post-button {
margin: 0 !important;
}
/* line 747, ../sass/tablet3sep2015.scss */
.calendar {
background-color: #fff !important;
background-image: url("../../../images/calendar-icon.png") !important;
background-repeat: no-repeat !important;
background-attachment: scroll !important;
background-position: right center !important;
margin-bottom: 0px !important;
}
/* line 755, ../sass/tablet3sep2015.scss */
.form-group1 {
margin-bottom: 10px !important;
clear: both !important;
display: table;
width: 100%;
}
/* line 760, ../sass/tablet3sep2015.scss */
.form-group1 ul {
margin-bottom: 0 !important;
}
/* line 764, ../sass/tablet3sep2015.scss */
.font-bold {
font-family: "NeoSansPro-Medium";
}
/* line 767, ../sass/tablet3sep2015.scss */
.profile-bar {
height: 10px;
width: 100%;
background: #bbbdbf;
}
/* line 771, ../sass/tablet3sep2015.scss */
.profile-bar .profile-complete {
width: 59%;
height: 10px;
background: #ed3237;
}
/* line 778, ../sass/tablet3sep2015.scss */
.form-group select {
margin-bottom: 0 !important;
}
/* line 781, ../sass/tablet3sep2015.scss */
.form-group input {
margin-bottom: 0 !important;
}
/* line 785, ../sass/tablet3sep2015.scss */
.form-group {
margin-bottom: 10px !important;
}
/* line 788, ../sass/tablet3sep2015.scss */
.heading {
font-size: 14px;
font-weight: bold;
}
/* line 792, ../sass/tablet3sep2015.scss */
.main-right-10 {
margin-right: 10px !important;
}
/* line 795, ../sass/tablet3sep2015.scss */
.border-bottom {
border-bottom: 2px solid #e8e8e8;
}
/* line 798, ../sass/tablet3sep2015.scss */
.red {
color: #ff0000;
}
/* line 802, ../sass/tablet3sep2015.scss */
.main-middle select {
width: 100%;
}
/* line 806, ../sass/tablet3sep2015.scss */
.main-middle input[type="text"] {
width: 100%;
}
/* line 811, ../sass/tablet3sep2015.scss */
.border-top {
border-top: 1px solid #dddddd;
padding-top: 10px !important;
}
/* line 815, ../sass/tablet3sep2015.scss */
.heading {
font-size: 14px;
font-weight: bold;
}
/* line 819, ../sass/tablet3sep2015.scss */
.space-10px {
padding: 10px;
width: 100%;
float: left;
}
/* line 825, ../sass/tablet3sep2015.scss */
.right-menu li {
width: 100%;
float: left;
padding: 5px 0px;
}
/* line 829, ../sass/tablet3sep2015.scss */
.right-menu li .fa {
margin: 0px 10px 0px 0px;
}
/* line 834, ../sass/tablet3sep2015.scss */
.right-head {
background: #f0f1f1;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
-ms-border-radius: 4px;
-o-border-radius: 4px;
border-radius: 4px;
clear: both;
margin: 7px 0;
padding: 9px;
}
/* line 841, ../sass/tablet3sep2015.scss */
.grey {
background: #808184;
color: #fff;
font-family: "NeoSansPro-Regular";
margin: 0 0 2px 0;
font-size: 14px;
}
/* line 849, ../sass/tablet3sep2015.scss */
.trans_bg {
background: rgba(0, 0, 0, 0.7);
position: fixed;
top: 185px;
left: 0;
right: 0;
bottom: 0;
width: auto;
height: auto;
z-index: 10;
}
/* line 860, ../sass/tablet3sep2015.scss */
.border-bottom {
border-bottom: 2px solid #e8e8e8;
}
/* line 864, ../sass/tablet3sep2015.scss */
.border-bottom-red {
border-bottom: 2px solid red;
}
/* line 867, ../sass/tablet3sep2015.scss */
.margin-top {
margin-top: 10px;
}
| css |
/*
Copyright 2021 The Crossplane 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 eks
import (
"github.com/crossplane-contrib/terrajet/pkg/config"
"github.com/crossplane-contrib/provider-tf-aws/config/common"
)
const (
// SelfPackagePath is the golang path for this package.
SelfPackagePath = "github.com/crossplane-contrib/provider-tf-aws/config/eks"
)
// ClusterExternalNameConfigure configures cluster name.
func ClusterExternalNameConfigure(base map[string]interface{}, name string) {
base["name"] = name
}
// NodeGroupExternalNameConfigure configures nodegroup name.
func NodeGroupExternalNameConfigure(base map[string]interface{}, name string) {
base["name"] = name
}
// FargateProfileExternalNameConfigure configures fargate profile name.
func FargateProfileExternalNameConfigure(base map[string]interface{}, name string) {
base["fargate_profile_name"] = name
}
func init() {
config.Store.SetForResource("aws_eks_cluster", config.Resource{
ExternalName: config.ExternalName{
ConfigureFunctionPath: SelfPackagePath + ".ClusterExternalNameConfigure",
OmittedFields: []string{
"name",
},
},
References: config.References{
"role_arn": {
Type: "github.com/crossplane-contrib/provider-tf-aws/apis/iam/v1alpha1.Role",
Extractor: common.PathARNExtractor,
},
"vpc_config[*].subnet_ids": {
Type: "github.com/crossplane-contrib/provider-tf-aws/apis/ec2/v1alpha1.Subnet",
},
"vpc_config[*].security_group_ids": {
Type: "github.com/crossplane-contrib/provider-tf-aws/apis/ec2/v1alpha1.SecurityGroup",
},
},
UseAsync: true,
})
config.Store.SetForResource("aws_eks_node_group", config.Resource{
ExternalName: config.ExternalName{
ConfigureFunctionPath: SelfPackagePath + ".NodeGroupExternalNameConfigure",
OmittedFields: []string{
"node_group_name",
"node_group_name_prefix",
},
},
References: config.References{
"cluster_name": {
Type: "Cluster",
},
"node_role_arn": {
Type: "github.com/crossplane-contrib/provider-tf-aws/apis/iam/v1alpha1.Role",
Extractor: common.PathARNExtractor,
},
"remote_access[*].source_security_group_ids": {
Type: "github.com/crossplane-contrib/provider-tf-aws/apis/ec2/v1alpha1.SecurityGroup",
},
"subnet_ids": {
Type: "github.com/crossplane-contrib/provider-tf-aws/apis/ec2/v1alpha1.Subnet",
},
},
UseAsync: true,
})
config.Store.SetForResource("aws_eks_identity_provider_config", config.Resource{
ExternalName: config.ExternalName{
DisableNameInitializer: true,
},
References: config.References{
"cluster_name": {
Type: "Cluster",
},
},
})
config.Store.SetForResource("aws_eks_fargate_profile", config.Resource{
ExternalName: config.ExternalName{
OmittedFields: []string{
"fargate_profile_name",
},
},
References: config.References{
"cluster_name": {
Type: "Cluster",
},
"pod_execution_role_arn": {
Type: "github.com/crossplane-contrib/provider-tf-aws/apis/iam/v1alpha1.Role",
Extractor: common.PathARNExtractor,
},
"subnet_ids": {
Type: "github.com/crossplane-contrib/provider-tf-aws/apis/ec2/v1alpha1.Subnet",
},
},
})
config.Store.SetForResource("aws_eks_addon", config.Resource{
ExternalName: config.ExternalName{
DisableNameInitializer: true,
},
References: config.References{
"cluster_name": {
Type: "Cluster",
},
"service_account_role_arn": {
Type: "github.com/crossplane-contrib/provider-tf-aws/apis/iam/v1alpha1.Role",
Extractor: common.PathARNExtractor,
},
},
})
}
| go |
The U. S. Navy said Tuesday it found 70 tons of a missile fuel component hidden among bags of fertilizer aboard a ship bound to Yemen from Iran, the first-such seizure in that country’s yearslong war as a cease-fire there has broken down.
The Navy said the amount of ammonium perchlorate discovered could fuel more than a dozen medium-range ballistic missiles, the same weapons Yemen’s Iranian-backed Houthi rebels have used to target both forces allied to the country’s internationally recognized government and the Saudi-led coalition that supports them.
The apparent rearming effort comes as Iran has threatened Saudi Arabia, the United States and other nations over the monthslong protests calling for the overthrow the Islamic Republic’s theocracy. Tehran blames foreign powers — rather than its own frustrated population — for fomenting the protests, which have seen at least 344 people killed and 15,820 people arrested amid a widening crackdown on dissent there.
The Houthis could not be immediately reached for comment. Iran’s mission to the United Nations did not immediately respond to a request for comment.
The U. S. Coast Guard ship USCGC John Scheuerman and guided-missile destroyer USS The Sullivans stopped a traditional wooden sailing vessel known as a dhow in the Gulf of Oman on Nov. 8, the Navy said. During a weeklong search, sailors discovered bags of ammonium perchlorate hidden inside of what initially appeared to be a shipment of 100 tons of urea.
Urea, a fertilizer, also can be used to manufacture explosives.
The dhow was so weighted down by the shipment that it posed a hazard to nearby shipping in the Gulf of Oman, a route that leads from the Strait of Hormuz, the narrow mouth of the Persian Gulf, out to the Indian Ocean. The Navy ended up sinking the ship with much of the material still on board due to the danger, Hawkins said.
The Sullivans handed over the four Yemeni crew members to the country’s internationally recognized government on Tuesday.
Asked how the Navy knew to stop the ship, Hawkins only said the Navy knew through “multiple means” that the vessel carried the fuel and that it came from Iran bound for Yemen. He declined to elaborate.
The Houthis seized Yemen’s capital, Sanaa, in September 2014 and forced the internationally recognized government into exile. A Saudi-led coalition armed with U. S. weaponry and intelligence entered the war on the side of Yemen’s exiled government in March 2015. Years of inconclusive fighting has pushed the Arab world’s poorest nation to the brink of famine.
A United Nations arms embargo has prohibited weapons transfers to the Houthis since 2014. Despite that, Iran long has been transferring rifles, rocket-propelled grenades, missiles and other weaponry to the Houthis via dhow shipments. Though Iran denies arming the Houthis, independent experts, Western nations and U. N. experts have traced components seized abroad detained vessels back to Iran.
A six-month cease-fire in Yemen’s war, the longest of the conflict, expired in October despite diplomatic efforts to renew it. That’s led to fears the war could again escalate. More than 150,000 people have been killed in Yemen during the fighting, including over 14,500 civilians.
READ ALSO: | english |
<filename>data/terrainbuilding/2019/05/t3_brm9wl.json
{
"author": {
"id": "t2_14okxu",
"name": "MrMonkeyfeet"
},
"date": {
"day": 1558483200,
"full": 1558514950,
"month": 1556668800,
"week": 1558224000
},
"id": "t3_brm9wl",
"picture": {
"filesize": 132215,
"fullUrl": "https://external-preview.redd.it/17QJz77YjDo8G71srYa00FKKUkBIJi62LXxelTEIUns.jpg?auto=webp&s=1658dad91d0f51b2ecd5b8a13080211c271e1b1a",
"hash": "2dd0f243d8",
"height": 640,
"lqip": "data:image/jpg;base64,/9j/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wAARCAAQABADASIAAhEBAxEB/8QAFgABAQEAAAAAAAAAAAAAAAAABAUH/8QAJhAAAgIBAgQHAQAAAAAAAAAAAQMCBBEABQYSITETFCJBUWGBkf/EABUBAQEAAAAAAAAAAAAAAAAAAAEE/8QAGREAAgMBAAAAAAAAAAAAAAAAAAIBESET/9oADAMBAAIRAxEAPwDPt7fZdbLayw1cOQx5FgkETB+eg9OM/X3q/wAR8Q3bG63XVaspVmgTkyLBkMJPftgH9x+6Mdqu+bMKql10Nl4kkyYuZkBntkjp7jQdzrtr3XFcFlMyJMiQJBcgOuCCR/DqNVSU5tGDW2f/2Q==",
"url": "https://external-preview.redd.it/17QJz77YjDo8G71srYa00FKKUkBIJi62LXxelTEIUns.jpg?width=640&crop=smart&auto=webp&s=eef114b3d24a931ac6300c46bffffc0066e2eaa8",
"width": 640
},
"score": {
"comments": 8,
"downs": 0,
"ratio": 0.99,
"ups": 305,
"value": 305
},
"subreddit": {
"id": "t5_2xy5e",
"name": "TerrainBuilding"
},
"tags": [],
"title": "Started with watereffects on my big diorama",
"url": "https://www.reddit.com/r/TerrainBuilding/comments/brm9wl/started_with_watereffects_on_my_big_diorama/"
}
| json |
<!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.5.0_11) on Fri Jan 11 19:12:12 PST 2008 -->
<TITLE>
XQCancelledException (JSR 225: XQuery API for Java (XQJ))
</TITLE>
<META NAME="keywords" CONTENT="javax.xml.xquery.XQCancelledException class">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="XQCancelledException (JSR 225: XQuery API for Java (XQJ))";
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</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=2 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> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../javax/xml/xquery/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
XQJ v1.0, Jan 14, 2008</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../javax/xml/xquery/PooledXQConnection.html" title="interface in javax.xml.xquery"><B>PREV CLASS</B></A>
<A HREF="../../../javax/xml/xquery/XQConnection.html" title="interface in javax.xml.xquery"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html?javax/xml/xquery/XQCancelledException.html" target="_top"><B>FRAMES</B></A>
<A HREF="XQCancelledException.html" target="_top"><B>NO FRAMES</B></A>
<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>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#methods_inherited_from_class_javax.xml.xquery.XQQueryException">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | METHOD</FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
javax.xml.xquery</FONT>
<BR>
Class XQCancelledException</H2>
<PRE>
java.lang.Object
<IMG SRC="../../../resources/inherit.gif" ALT="extended by ">java.lang.Throwable
<IMG SRC="../../../resources/inherit.gif" ALT="extended by ">java.lang.Exception
<IMG SRC="../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">javax.xml.xquery.XQException</A>
<IMG SRC="../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../javax/xml/xquery/XQQueryException.html" title="class in javax.xml.xquery">javax.xml.xquery.XQQueryException</A>
<IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>javax.xml.xquery.XQCancelledException</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD>java.io.Serializable</DD>
</DL>
<HR>
<DL>
<DT><PRE>public class <B>XQCancelledException</B><DT>extends <A HREF="../../../javax/xml/xquery/XQQueryException.html" title="class in javax.xml.xquery">XQQueryException</A></DL>
</PRE>
<P>
<code>XQCancelledException</code> is an exception to indicate that the
current XQuery processing is cancelled by the application through a
<code>cancel()</code> request. This exception allows an application to
easily differentiate between a user's cancellation of the query from a
general execution failure.
<P>
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../serialized-form.html#javax.xml.xquery.XQCancelledException">Serialized Form</A></DL>
<HR>
<P>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../javax/xml/xquery/XQCancelledException.html#XQCancelledException(java.lang.String, java.lang.String, javax.xml.namespace.QName, int, int, int, java.lang.String, javax.xml.xquery.XQSequence, javax.xml.xquery.XQStackTraceElement[])">XQCancelledException</A></B>(java.lang.String message,
java.lang.String vendorCode,
javax.xml.namespace.QName errorCode,
int line,
int column,
int position,
java.lang.String moduleURI,
<A HREF="../../../javax/xml/xquery/XQSequence.html" title="interface in javax.xml.xquery">XQSequence</A> errorObject,
<A HREF="../../../javax/xml/xquery/XQStackTraceElement.html" title="class in javax.xml.xquery">XQStackTraceElement</A>[] stackTrace)</CODE>
<BR>
Constructs an <code>XQCancelledException</code> object with a given message,
vendor code, error code, line number, column number, position, module URI,
error object, and stack trace.</TD>
</TR>
</TABLE>
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_javax.xml.xquery.XQQueryException"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class javax.xml.xquery.<A HREF="../../../javax/xml/xquery/XQQueryException.html" title="class in javax.xml.xquery">XQQueryException</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../javax/xml/xquery/XQQueryException.html#getColumnNumber()">getColumnNumber</A>, <A HREF="../../../javax/xml/xquery/XQQueryException.html#getErrorCode()">getErrorCode</A>, <A HREF="../../../javax/xml/xquery/XQQueryException.html#getErrorObject()">getErrorObject</A>, <A HREF="../../../javax/xml/xquery/XQQueryException.html#getLineNumber()">getLineNumber</A>, <A HREF="../../../javax/xml/xquery/XQQueryException.html#getModuleURI()">getModuleURI</A>, <A HREF="../../../javax/xml/xquery/XQQueryException.html#getPosition()">getPosition</A>, <A HREF="../../../javax/xml/xquery/XQQueryException.html#getQueryStackTrace()">getQueryStackTrace</A></CODE></TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_javax.xml.xquery.XQException"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class javax.xml.xquery.<A HREF="../../../javax/xml/xquery/XQException.html" title="class in javax.xml.xquery">XQException</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../javax/xml/xquery/XQException.html#getNextException()">getNextException</A>, <A HREF="../../../javax/xml/xquery/XQException.html#getVendorCode()">getVendorCode</A>, <A HREF="../../../javax/xml/xquery/XQException.html#setNextException(javax.xml.xquery.XQException)">setNextException</A></CODE></TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_java.lang.Throwable"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Throwable</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString</CODE></TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
<P>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="XQCancelledException(java.lang.String, java.lang.String, javax.xml.namespace.QName, int, int, int, java.lang.String, javax.xml.xquery.XQSequence, javax.xml.xquery.XQStackTraceElement[])"><!-- --></A><H3>
XQCancelledException</H3>
<PRE>
public <B>XQCancelledException</B>(java.lang.String message,
java.lang.String vendorCode,
javax.xml.namespace.QName errorCode,
int line,
int column,
int position,
java.lang.String moduleURI,
<A HREF="../../../javax/xml/xquery/XQSequence.html" title="interface in javax.xml.xquery">XQSequence</A> errorObject,
<A HREF="../../../javax/xml/xquery/XQStackTraceElement.html" title="class in javax.xml.xquery">XQStackTraceElement</A>[] stackTrace)</PRE>
<DL>
<DD>Constructs an <code>XQCancelledException</code> object with a given message,
vendor code, error code, line number, column number, position, module URI,
error object, and stack trace.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>message</CODE> - the description of the error. <code>null</code> indicates
that the message string is non existant<DD><CODE>vendorCode</CODE> - a vendor-specific string identifying the error.
<code>null</code> indicates there is no vendor
code or it is unknown<DD><CODE>errorCode</CODE> - <code>QName</code> which identifies the error
according to the standard as described in
<a href="http://www.w3.org/TR/xquery/#id-errors">
<i>Appendix F, XQuery 1.0: An XML Query language</i></a>,
<a href="http://www.w3.org/TR/xpath-functions/#error-summary">
<i>Appendix C, XQuery 1.0 and XPath 2.0 Functions and Operators</i></a>,
and its associated specifications; implementation-defined
errors may be raised</li><DD><CODE>line</CODE> - the line number in the query string where the error occured.
Line numbering starts at <code>1</code>. <code>-1</code> if unknown<DD><CODE>column</CODE> - the column number in the query string where the error occured.
Column numbering starts at <code>1</code>. <code>-1</code> if unknown<DD><CODE>position</CODE> - the position in the query string where the error occured. This
is a <code>0</code> based position. <code>-1</code> if unknown<DD><CODE>moduleURI</CODE> - the module URI of the module in which the error occurred.
<code>null</code> when it is the main module or when the module is
unknown<DD><CODE>errorObject</CODE> - an <code>XQSequence</code> representing the error object passed to
<code>fn:error()</code>. <code>null</code> if this error was not
triggered by <code>fn:error()</code> or when the error object is
not available<DD><CODE>stackTrace</CODE> - the XQuery stack trace where the error occurred. <code>null</code>
if not available</DL>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<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=2 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> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../javax/xml/xquery/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
XQJ v1.0, Jan 14, 2008</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../javax/xml/xquery/PooledXQConnection.html" title="interface in javax.xml.xquery"><B>PREV CLASS</B></A>
<A HREF="../../../javax/xml/xquery/XQConnection.html" title="interface in javax.xml.xquery"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html?javax/xml/xquery/XQCancelledException.html" target="_top"><B>FRAMES</B></A>
<A HREF="XQCancelledException.html" target="_top"><B>NO FRAMES</B></A>
<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>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#methods_inherited_from_class_javax.xml.xquery.XQQueryException">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | METHOD</FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
Copyright (c) 2003, 2006, 2007, 2008 Oracle. All rights reserved. <br/>
</BODY>
</HTML>
| html |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.