text
stringlengths 1
1.04M
| language
stringclasses 25
values |
|---|---|
{"project":{"profile":{"name":"filestack_","description":""},"commands":[{"father":"module","command":"{\"module_name\":\"filestack_\",\"module\":\"upload_\",\"key_\":\"{api_key}\",\"path_\":\"C:/Users/User/Downloads/frog.jpg\",\"id_\":\"original\"}","option":"","var":"","index":0,"group":"scripts","execute":2,"if":"","children":[],"else":[],"id":"ac8ad79c-2644-ccdd-52cb-8fc4f6aaadcf","mode_live":true,"getvar":"","screenshot":"","img":"","message":"module {\"module_name\":\"filestack_\",\"module\":\"upload_\",\"key_\":\"{api_key}\",\"path_\":\"C:/Users/Marce/Downloads/frog.jpg\",\"id_\":\"original\"}","extra":[],"result":"True"},{"father":"module","command":"{\"module_name\":\"filestack_\",\"module\":\"resize\",\"id_\":\"{original}\",\"width_\":\"500\",\"height_\":\"600\",\"check_\":true,\"var_\":\"resized\"}","option":"","var":"","index":1,"group":"scripts","execute":2,"if":"","children":[],"else":[],"id":"1362bb5d-adec-de10-2c66-990c01dfc778","mode_live":true,"getvar":"","extra_data":null,"screenshot":"","img":"","message":"module {\"module_name\":\"filestack_\",\"module\":\"resize\",\"id_\":\"{original}\",\"width_\":\"500\",\"height_\":\"600\",\"check_\":true,\"var_\":\"resized\"}","extra":[],"result":"True"},{"father":"module","command":"{\"module_name\":\"filestack_\",\"module\":\"download_\",\"id_\":\"{resized}\",\"path_\":\"C:/Users/User/Desktop\",\"name_\":\"resized.jpg\"}","option":"","var":"","index":2,"group":"scripts","execute":2,"if":"","children":[],"else":[],"id":"ef3acb0f-5c3a-7cbb-8e3c-d504c72a6ff0","mode_live":true,"getvar":"","extra_data":null,"screenshot":"","img":"","message":"module {\"module_name\":\"filestack_\",\"module\":\"download_\",\"id_\":\"{resized}\",\"path_\":\"C:/Users/Marce/Desktop\",\"name_\":\"resized.jpg\"}","extra":[],"result":"True"},{"father":"module","command":"{\"module_name\":\"filestack_\",\"module\":\"crop\",\"x_\":\"250\",\"y_\":\"400\",\"width_\":\"300\",\"height_\":\"400\",\"var_\":\"crop\",\"id_\":\"{resized}\"}","option":"","var":"","index":3,"group":"scripts","execute":2,"if":"","children":[],"else":[],"id":"a43d6ad3-475d-c18a-3d58-7bba8c35ce22","mode_live":true,"getvar":"","extra_data":null,"screenshot":"","img":"","message":"module {\"module_name\":\"filestack_\",\"module\":\"crop\",\"x_\":\"250\",\"y_\":\"400\",\"width_\":\"300\",\"height_\":\"400\",\"var_\":\"crop\",\"id_\":\"{resized}\"}","extra":[],"result":"True"},{"father":"module","command":"{\"module_name\":\"filestack_\",\"module\":\"download_\",\"id_\":\"{crop}\",\"path_\":\"C:/Users/User/Desktop\",\"name_\":\"crop.jpg\"}","option":"","var":"","index":4,"group":"scripts","execute":2,"if":"","children":[],"else":[],"id":"fd5c0592-4e89-8b55-1d03-0eef249eaa34","mode_live":true,"getvar":"","extra_data":null,"screenshot":"","img":"","message":"module {\"module_name\":\"filestack_\",\"module\":\"download_\",\"id_\":\"{crop}\",\"path_\":\"C:/Users/Marce/Desktop\",\"name_\":\"crop.jpg\"}","extra":[],"result":"True"}],"vars":[{"name":"original","data":"","type":"string","$$hashKey":"object:1167"},{"name":"resized","data":"","type":"string","$$hashKey":"object:1168"},{"name":"crop","data":"","type":"string","$$hashKey":"object:1169"},{"name":"api_key","data":"","type":"string","$$hashKey":"object:1170"}],"ifs":[]}}
|
json
|
package com.mars.mvc.util;
import com.alibaba.fastjson.JSONObject;
import com.mars.common.annotation.api.MarsDataCheck;
import com.mars.common.util.MatchUtil;
import com.mars.common.util.MesUtil;
import com.mars.common.util.StringUtil;
import com.mars.server.server.request.HttpMarsRequest;
import com.mars.server.server.request.HttpMarsResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* 校验前端传参
*/
public class ParamsCheckUtil {
private static Logger logger = LoggerFactory.getLogger(ParamsCheckUtil.class);
/**
* 校验参数
* @param params 参数集合
* @param method 要执行的方法
* @return 校验结果
*/
public static JSONObject checkParam(Object[] params, Method method){
if(params == null){
return null;
}
Class requestClass = HttpMarsRequest.class;
Class responseClass = HttpMarsResponse.class;
Class mapClass = Map.class;
for(Object obj : params){
if(obj == null){
return null;
}
Class cls = obj.getClass();
if(requestClass.equals(cls) || responseClass.equals(cls) || mapClass.equals(cls)){
continue;
}
JSONObject result = checkParam(cls,obj,method);
if(result != null){
return result;
}
}
return null;
}
/**
* 校验参数
* @param cls 参数类型
* @param obj 参数对象
* @return 校验结果
*/
private static JSONObject checkParam(Class<?> cls, Object obj, Method method) {
try {
Field[] fields = cls.getDeclaredFields();
for(Field field : fields){
field.setAccessible(true);
/* 获取校验的注解 */
MarsDataCheck marsDataCheck = field.getAnnotation(MarsDataCheck.class);
if(marsDataCheck == null){
continue;
}
/* 判断此注解是否生效与当前api,如果不生效那就直接跳入下一次循环 */
String[] apis = marsDataCheck.apis();
if(!isThisApi(apis,method)){
continue;
}
/* 校验参数是否符合规则 */
Object val = field.get(obj);
int errorCode = 1128;
if(!reg(val,marsDataCheck.reg())){
return MesUtil.getMes(errorCode,marsDataCheck.msg());
}
if(!notNull(marsDataCheck, val)){
return MesUtil.getMes(errorCode,marsDataCheck.msg());
}
}
return null;
} catch (Exception e){
logger.error("校验参数出现异常",e);
return null;
}
}
/**
* 校验正则
* @param val 数据
* @param reg 正则
* @return 结果
*/
private static boolean reg(Object val,String reg){
if(StringUtil.isNull(reg)){
return true;
}
if(StringUtil.isNull(val)){
return false;
}
Pattern pattern = Pattern.compile(reg);
Matcher matcher = pattern.matcher(val.toString());
return matcher.matches();
}
/**
* 校验长度
* @param val 数据
* @param marsDataCheck 注解
* @return 结果
*/
private static boolean length(MarsDataCheck marsDataCheck, Object val){
long valLen = val.toString().length();
if(valLen < marsDataCheck.minLength() || valLen > marsDataCheck.maxLength()){
return false;
}
return true;
}
/**
* 非空校验
* @param marsDataCheck 注解
* @param val 数据
* @return 结果
*/
private static boolean notNull(MarsDataCheck marsDataCheck, Object val){
if(!marsDataCheck.notNull()){
return true;
}
if(StringUtil.isNull(val)){
return false;
}
return length(marsDataCheck, val);
}
/**
* 校验apis列表里是否包含此api
* @param method 此api
* @param apis api列表
* @return
*/
private static boolean isThisApi(String[] apis, Method method){
if(apis == null || apis.length < 1){
return true;
}
for(String api : apis){
if(MatchUtil.isMatch(api,method.getName())){
return true;
}
}
return false;
}
}
|
java
|
---
uid: Microsoft.Quantum.Canon.ApplyBound
title: Operación ApplyBound
ms.date: 1/23/2021 12:00:00 AM
ms.topic: article
qsharp.kind: operation
qsharp.namespace: Microsoft.Quantum.Canon
qsharp.name: ApplyBound
qsharp.summary: ''
ms.openlocfilehash: 14b99d0b50531d90340a93749266eae040128702
ms.sourcegitcommit: 71605ea9cc630e84e7ef29027e1f0ea06299747e
ms.translationtype: MT
ms.contentlocale: es-ES
ms.lasthandoff: 01/26/2021
ms.locfileid: "98845159"
---
# <a name="applybound-operation"></a>Operación ApplyBound
Espacio de nombres: [Microsoft. Quantum. Canon](xref:Microsoft.Quantum.Canon)
Paquete: [Microsoft. Quantum. Standard](https://nuget.org/packages/Microsoft.Quantum.Standard)
```qsharp
operation ApplyBound<'T> (operations : ('T => Unit)[], target : 'T) : Unit
```
## <a name="input"></a>Entrada
### <a name="operations--t--unit-"></a>operaciones: ' t => [unidad](xref:microsoft.quantum.lang-ref.unit) []
### <a name="target--t"></a>destino: ' t
## <a name="output--unit"></a>Salida: [unidad](xref:microsoft.quantum.lang-ref.unit)
## <a name="type-parameters"></a>Parámetros de tipo
### <a name="t"></a>Traslada
## <a name="see-also"></a>Consulte también
- [Microsoft. Quantum. Canon. Bound](xref:Microsoft.Quantum.Canon.Bound)
|
markdown
|
The opening day of the U. N. climate change conference on Monday laid great emphasis on achieving a package of decisions at the end of the 10-day deliberations. “Cancun can,” quipped Danish Minister for Climate Change Lykke Friis. A sticky point could be the International Consultation and Analysis (ICA), in which India hopes to play a deal-maker, according to official sources.
With 25 heads of state confirming their participation in the conference, things hope to hot up next week. The developed countries, including the United States, are pushing for transparency from countries where they will fund climate change mitigation. The feeling is that without any movement on the ICA, the U. S. will not come on board; and unless there is some commitment on technology transfer, the developing countries will not agree to any monitoring.
High-level sources said, the idea was to position India as a deal-maker, as a bridge between the developing and developed countries. This is in keeping with the Prime Minister's vision of a new India on world forums, an India willing to engage proactively and willing to offer pragmatic solutions.
At the plenary session, India made it clear that the Kyoto Protocol was always intended to continue, and if a developed country fell short of compliance in the first phase, that country would make good the deficiency in the second period of commitment, according to Environment Secretary Vijay Sharma, who is in Cancun for the deliberations.
The U. S. and other countries believe that the ICA or measurement, reporting and verification (MRV) is not as contentious or complicated as it is being made out to be once it is agreed that it will not be intrusive, it will respect national sovereignty, and it will not undermine the United Nations Framework Convention on Climate Change (UNFCCC) and the Bali Action Plan.
Official sources said that without a firm commitment to have a second commitment period for the Kyoto Protocol and improved mitigation pledges from the U. S. , the ICA framework might not take off. There has to be at the very minimum a firm and tangible commitment to fast-start finance with focus on actual disbursement of new and additional resources and the establishment of a technology mechanism with a network of climate innovation centres.
U. S. Deputy Special Envoy for Climate Change Jonathan Pershing told the press that the U. S. still reckoned that legislation was the right approach, and the ICA was supported by India, China and South Africa, and there was a broad consensus. The ICA would make the mitigation measures and emissions public and transparent. A commitment to report on the emissions in any case was being done, and already there was an obligation to report them. Since the first step was already in existence, he said, they needed to be updated regularly.
The U. S. was also committed to the fast-start funding, and it had already committed $1. 7 billion. This funding, he pointed out, was one example of how the U. S. was keeping its end of the bargain.
However, China has not been too keen on the ICA. It is proposed that the ICA proceed ideally on the understanding that it is a facilitative process for transparency and accountability, and that it will not have any punitive implication, official sources said. The ICA could be held every two or three years for countries with a share of world greenhouse gas emissions in excess of 1 per cent (or any other appropriate indicator). All other countries will have the ICA process every four or five years.
|
english
|
Canberra, Dec 12 The Australian government has revealed its plan to continue fighting the Covid-19 pandemic in 2023, focusing support on the country's most vulnerable people.
Health Minister Mark Butler and Chief Medical Officer (CMO) Paul Kelly on Monday released the national Covid-19 health management plan for 2023, Xinhua news agency reported.
A significant change is that Austral will require a referral from their doctor to receive a free polymerase chain reaction (PCR) test for Covid-19 from Jan. 1, 2023.
Vaccinations against coronavirus will continue to be entirely subsidized by the government and the availability of oral antiviral treatments will be scaled up for elderly Austral.
"We will continue to protect those most at risk, while ensuring we have the capacity to respond to future waves and variants," Butler said in a media release.
The end of free PCR tests for all came 12 months after testing services were overwhelmed amid a wave of Omicron variant infections.
Butler said with all isolation and testing requirements now scrapped, resources would be better spent focused on the vulnerable in 2023.
Kelly said waves are expected to continue until at least 2025, but future outbreaks were unlikely to be as deadly as those in the past.
"The severity of future waves may be milder, placing less pressure on the health system," he told the Australian Associated Press (AAP).
"This, combined with improved immunity and hybrid immunity from repeat infections and targeted vaccinations, would reduce the clinical impact and result in fewer Austral suffering severe illness and death," added Kelly.
Australia reported an average of 15,569 new Covid-19 cases every day over the latest seven-day period.
|
english
|
<reponame>VEuPathDB/FunctionalTests<filename>src/main/java/org/apidb/eupathsitecommon/watar/pages/SearchResultsPage.java
package org.apidb.eupathsitecommon.watar.pages;
import java.text.NumberFormat;
import java.text.ParseException;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
public class SearchResultsPage extends AjaxPage{
private By primaryKeyColumn = By.cssSelector(".HeadingCell--key-primary_key");
private By organismFilterFirstNode = By.cssSelector(".wdk-CheckboxTreeItem:nth-child(1) .OrganismFilter--NodeCount");
public SearchResultsPage(WebDriver driver, String url) {
super(driver, url);
}
@Override
public void waitForPageToLoad() {
new WebDriverWait(driver, 30, 3)
.until(
ExpectedConditions.presenceOfElementLocated(this.primaryKeyColumn)
);
}
public int organismFilterFirstNodeCount() {
new WebDriverWait(driver, 30, 3)
.until(
ExpectedConditions.presenceOfElementLocated(this.organismFilterFirstNode)
);
try {
return NumberFormat.getNumberInstance(java.util.Locale.US).parse(this.driver.findElement(this.organismFilterFirstNode).getText()).intValue();
// return Integer.parseInt(this.driver.findElement(this.organismFilterFirstNode).getText());
}
catch (ParseException e) {
}
return 0;
}
}
|
java
|
// Code generated by go-swagger; DO NOT EDIT.
// Copyright 2017-2020 Authors of Cilium
// SPDX-License-Identifier: Apache-2.0
package apps_v1
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the generate command
import (
"net/http"
"github.com/go-openapi/runtime/middleware"
)
// WatchAppsV1NamespacedDeploymentHandlerFunc turns a function with the right signature into a watch apps v1 namespaced deployment handler
type WatchAppsV1NamespacedDeploymentHandlerFunc func(WatchAppsV1NamespacedDeploymentParams) middleware.Responder
// Handle executing the request and returning a response
func (fn WatchAppsV1NamespacedDeploymentHandlerFunc) Handle(params WatchAppsV1NamespacedDeploymentParams) middleware.Responder {
return fn(params)
}
// WatchAppsV1NamespacedDeploymentHandler interface for that can handle valid watch apps v1 namespaced deployment params
type WatchAppsV1NamespacedDeploymentHandler interface {
Handle(WatchAppsV1NamespacedDeploymentParams) middleware.Responder
}
// NewWatchAppsV1NamespacedDeployment creates a new http.Handler for the watch apps v1 namespaced deployment operation
func NewWatchAppsV1NamespacedDeployment(ctx *middleware.Context, handler WatchAppsV1NamespacedDeploymentHandler) *WatchAppsV1NamespacedDeployment {
return &WatchAppsV1NamespacedDeployment{Context: ctx, Handler: handler}
}
/*WatchAppsV1NamespacedDeployment swagger:route GET /apis/apps/v1/watch/namespaces/{namespace}/deployments/{name} apps_v1 watchAppsV1NamespacedDeployment
watch changes to an object of kind Deployment. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.
*/
type WatchAppsV1NamespacedDeployment struct {
Context *middleware.Context
Handler WatchAppsV1NamespacedDeploymentHandler
}
func (o *WatchAppsV1NamespacedDeployment) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
route, rCtx, _ := o.Context.RouteInfo(r)
if rCtx != nil {
r = rCtx
}
var Params = NewWatchAppsV1NamespacedDeploymentParams()
if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params
o.Context.Respond(rw, r, route.Produces, route, err)
return
}
res := o.Handler.Handle(Params) // actually handle the request
o.Context.Respond(rw, r, route.Produces, route, res)
}
|
go
|
package com.github.games647.changeskin.bungee.command;
import com.github.games647.changeskin.bungee.ChangeSkinBungee;
import com.github.games647.changeskin.core.model.UserPreference;
import com.github.games647.changeskin.core.model.skin.SkinModel;
import com.github.games647.changeskin.core.shared.SkinFormatter;
import java.util.Optional;
import net.md_5.bungee.api.CommandSender;
import net.md_5.bungee.api.chat.TextComponent;
import net.md_5.bungee.api.connection.ProxiedPlayer;
public class InfoCommand extends ChangeSkinCommand {
private final ChangeSkinBungee plugin;
private final SkinFormatter formatter = new SkinFormatter();
public InfoCommand(ChangeSkinBungee plugin) {
super("skin-info", plugin.getName().toLowerCase() + ".command.skininfo");
this.plugin = plugin;
}
@Override
public void execute(CommandSender sender, String[] strings) {
if (!(sender instanceof ProxiedPlayer)) {
plugin.sendMessage(sender, "no-console");
return;
}
ProxiedPlayer player = (ProxiedPlayer) sender;
UserPreference preference = plugin.getLoginSession(player.getPendingConnection());
Optional<SkinModel> optSkin = preference.getTargetSkin();
if (optSkin.isPresent()) {
String template = plugin.getCore().getMessage("skin-info");
sender.sendMessage(TextComponent.fromLegacyText(formatter.apply(template, optSkin.get())));
} else {
plugin.sendMessage(sender, "skin-not-found");
}
}
}
|
java
|
<reponame>RelativityMC/RaknetFabric<gh_stars>10-100
package com.ishland.raknetify.common.connection;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;
import network.ycc.raknet.frame.FrameData;
public class FrameDataBlocker extends ChannelInboundHandlerAdapter {
private static final boolean printBlockedFrames = Boolean.getBoolean("raknetify.printBlockedFrames");
@Override
public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
if (msg instanceof FrameData) {
if (printBlockedFrames) System.out.println("Blocked %s".formatted(msg));
return;
}
ctx.fireChannelRead(msg);
}
}
|
java
|
/*
Copyright 2020 Balena Ltd.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import { promises as fs } from 'fs';
import * as path from 'path';
import { StorageLike } from './local-storage';
export class NodeStorage implements StorageLike {
private initialized: boolean | Promise<void> = false;
constructor(private dataDirectory: string) {}
private async init() {
if (this.initialized === true) {
return;
}
if (this.initialized === false) {
this.initialized = fs.mkdir(this.dataDirectory);
}
try {
await this.initialized;
} catch {
// ignore if it already exists
} finally {
this.initialized = true;
}
}
private getPath(key: string): string {
return path.join(this.dataDirectory, encodeURIComponent(key));
}
public async clear() {
try {
await Promise.all(
(await fs.readdir(this.dataDirectory)).map(async (f) => {
f = path.join(this.dataDirectory, f);
try {
if ((await fs.stat(f)).isDirectory()) {
await fs.rmdir(f);
} else {
await fs.unlink(f);
}
} catch {
// ignore
}
}),
);
} catch {
// ignore
}
}
public async getItem(key: string) {
try {
return await fs.readFile(this.getPath(key), 'utf8');
} catch (err) {
if (err.code === 'EACCES') {
throw err;
}
return null;
}
}
public async setItem(key: string, data: string) {
await this.init();
await fs.writeFile(this.getPath(key), data, 'utf8');
}
public async removeItem(key: string) {
try {
await fs.unlink(this.getPath(key));
} catch (e) {
// ignore
}
}
}
|
typescript
|
package wang.sunnly.modules.auth.service;
import javax.servlet.http.HttpServletRequest;
/**
* AuthService
*
* @author Sunnly
* @since 2020/12/11
*/
public interface AuthService {
/**
* 获取锁定时长
* @param id id
* @return 返回锁定时长
*/
long lockedTime(String id);
/**
* 锁定用户
* @param id ID
*/
void lockedUser(String id);
/**
* 获取登录Token
* @param request 请求
* @param username 用户名
* @param password 密码
* @return 返回Token
*/
String login(HttpServletRequest request, String username, String password);
}
|
java
|
<reponame>hertzZhang/biglvan
{
"DenoChmod": {
"prefix": ["dchm", "Deno.chmod"],
"body": "Deno.chmod('${1:path}', ${2:mode});$0",
"description": "更改指定路径下特定的文件/目录的权限。忽略进程的 umask。该 API 当前在 Windows 上使用会抛出异常。"
},
"DenoChmodSync": {
"prefix": ["dchms", "Deno.chmodSync"],
"body": "Deno.chmodSync('${1:path}', ${2:mode});$0",
"description": "更改指定路径下特定的文件/目录的权限。忽略进程的 umask。该 API 当前在 Windows 上使用会抛出异常。"
},
"DenoChown": {
"prefix": ["dcho", "Deno.chown"],
"body": "Deno.chown('${1:path}', ${2:uid}, ${3:gid});$0",
"description": "更改常规文件或目录的所有者。该功能在 Windows 上不可用。"
},
"DenoChownSync": {
"prefix": ["dchos", "Deno.chownSync"],
"body": "Deno.chownSync('${1:path}', ${2:uid}, ${3:gid});$0",
"description": "更改常规文件或目录的所有者。该功能在 Windows 上不可用。"
},
"DenoClose": {
"prefix": ["dclo", "Deno.close"],
"body": "Deno.close(${1:rid});$0",
"description": "使用给定的资源 ID (rid) 来关闭先前创建或打开的文件。 为避免资源泄露,事关重大,文件应当用完即关。"
},
"DenoConnectTLS": {
"prefix": ["dcont", "Deno.connectTLS"],
"body": "Deno.connectTLS(${1:options});$0",
"description": "使用可选的证书文件、主机名(默认值为 '127.0.0.1') 和端口在 TLS(安全传输层协议)建立安全连接。 证书文件是可选的,如果不包含,则使用 Mozilla 的根证书。"
},
"DenoCopy": {
"prefix": ["dcp", "Deno.copy"],
"body": "Deno.copy(${1:dst}, ${2:src});$0",
"description": "从 src 拷贝文件至 dst,拷贝至 src 的 EOF 或有异常出现时结束。 copy() 函数返回一个 Promise, 成功时 resolve 并返回拷贝的字节数,失败时 reject 并返回拷贝过程中的首个异常。"
},
"DenoCopyFile": {
"prefix": ["dcpf", "Deno.copyFile"],
"body": "Deno.copyFile(${1:fromPath}, ${2:toPath});$0",
"description": "将一个文件的内容和权限复制到另一个指定的路径,默认情况下根据需要 创建新文件或者覆盖原文件。 如果目标路径是目录或不可写,则失败。"
},
"DenoCopyFileSync": {
"prefix": ["dcpfs", "Deno.copyFileSync"],
"body": "Deno.copyFileSync(${1:fromPath}, ${2:toPath});$0",
"description": "采用同步方式将一个文件的内容和权限复制到另一个指定的路径,默认情况下根据需要 创建新文件或者覆盖原文件。 如果目标路径是目录或不可写,则失败。"
},
"DenoCreateSync": {
"prefix": ["dcres", "Deno.createSync"],
"body": "Deno.createSync(${1:path});$0",
"description": "创建文件并异步返回一个 Deno.File 实例,如果文件已存在则进行覆盖。"
}
}
|
json
|
A surprising number of Mac users would really, really like to have touchscreens. But that can't happen with MacOS, unless Apple undertakes the same long, slow, painful journey that Microsoft has been on.
Microsoft has worked on making third-party software work well with touch instead of a mouse ever since Windows 7 first added touch support, and Microsoft cheated by using Microsoft Research and machine learning to make Office touch more accurate without making the icons any bigger.
Neither Apple, nor its third-party software developers, nor its users, really have the appetite for that.
But touchscreen 'laptops' could happen easily, if iOS grew up into Apple's laptop operating system, and Apple is clearly making some big investments in the way it designs the ARM chips iPads use.
Apple this week told Imagination Technologies, which has been providing the GPU for its ARM SoCs, that it will stop using them in "15 months to two years". So will that be when we see something you could call a touchscreen Mac, if you didn't look too closely, that satisfies the unhappy MacBook Pro customers?
Apple has always been very ready to fire customers it doesn't see as worth investing in. It used to be that you had to regularly buy a new Mac to be able to get the latest version of OS X.
The expectation is that users will buy a new iPhone, if not every year, then every other year. While you can upgrade the OS, older phones often don't cope well with the latest version, or don't have the hardware to support new features.
So it's possible that Apple is willing to give up 'Pro' customers who want a more powerful machine than fits in the sleek, thin, lightweight systems that Apple wants to create.
Those priorities have shaped the design of the new MacBooks. Adding more than 16GB of RAM would mean using more power, which would mean shorter battery life. The new keyboard technology hasn't been universally popular in the USB-C MacBook, but it means the keyboard is thinner. Don't like the tradeoffs in that design? You probably aren't Apple's target customer.
After all, Macs are only 10 percent of Apple's income, and its CEO Tim Cook suggested at the launch of the iPad Pro that tablets will replace notebooks.
"If you're looking at a PC, why would you buy a PC anymore? No really, why would you buy one? Yes, the iPad Pro is a replacement for a notebook or a desktop for many, many people. They will start using it and conclude they no longer need to use anything else, other than their phones," he said.
Apple is still making Intel Macs; there's a new Mac Pro on the way that's being completely rethought, yet again, and interim models with new Xeon processors.
Apple is also rumored to be interested in Intel's 3DX Point memory, now with the easier to pronounce name of Optane, which has made it as far as the datacenter as SSDs and will be available as DRAMs some time after that.
It's unlikely that Apple was ever hoping to get those in the 2016 MacBooks. Apple just doesn't gamble on unfinished components like that. But this kind of new technology may be what it's waiting for to give the developers who need speed a new generation of systems.
But those customers aren't the biggest group of Apple's customers, no matter how vocal they're being about frustrations that are enough to drive some of them to Windows, now that it can run command-line Linux tools that developers depend on.
However much Apple mocked touchscreen PCs as vintage trucks and toaster fridges, there's clearly a market for devices that let you both touch the screen and type on the keyboard, and iOS is a better way for Apple to build that.
Apple has been using its ARM license to design its own CPUs since the first iPad. Now it has hired enough silicon designers, several of them from Imagination, to design its own graphics processors to go alongside those. And that happens just as ARM CPUs go from being underpowered but very good at processing lots of threads at the same, to having performance that's remarkable close to Intel CPUs on the right tasks.
That's why Microsoft is adding ARM servers to Azure. In the datacenter, ARM is right for very parallel tasks like machine learning and search indexing.
But that's also enough performance to build a next-generation iPad Pro that could run something closer to Photoshop than a mobile app. After all, Microsoft thinks next-generation ARM chips are fast enough to run the Windows version of Photoshop in emulation.
|
english
|
Saudi Newcastle can only be loved by Newcastle fans – that is, people who are so obsessed with the prospect of their club winning something that they are ready to ignore the fact that ‘their’ club is now an instrument of Saudi foreign policy. Many of these fans are, in fact, happy to be used in this way by the Saudi state. They don’t see themselves as living stage props in a Saudi soft power show. They think they have “won the lottery”.
“We’re not here to be popular and get other teams to like us” in the words of their anti-charismatic coach, Eddie Howe, whose ethos is defined by the fact that Newcastle games boast the second-lowest average ball-in-play time in the Premier League.
Yet it seems to matter to the fans of Manchester City, who for more than a decade have been inhabiting the gilded world of which Newcastle now dream. Success doesn’t seem to have improved the mood over there.Read more:
Ken Early: To become the possession of a state would be a tragedy for Manchester UnitedA takeover by Qatar would would rob the club’s subsequent achievements of any real meaning Aah now!
Anneleise Duffy on the impact fast fashion is having on Irish fashion industry'As a third generation fashion designer and manufacturer, I feel that the process and skill of the work that is done in producing clothing should be honoured and supported'
Manchester United claim first trophy of Erik ten Hag’s reign with Newcastle winCasemiro goal helps club to first trophy since 2017.
Erik ten Hag warns Manchester United players there is no room for ‘laziness’ after cup winTen Hag: 'Okay, be happy for 24 hours but not satisfied because satisfaction, that leads to laziness and when you become lazy, you don’t win any more games and you can’t win trophies.'
Michael Walker: Newcastle United no longer rely on omens, its currency and character has changedIt may be a great feeling for a Newcastle fan to believe that their long-neglected club, borne up on a limitless tide of Saudi petrodollars, is destined for imminent spectacular success. But it’s not the kind of story that will win over many neutrals.
Saudi Newcastle is different from the Newcastle teams of Kevin Keegan and Bobby Robson, teams that attracted others with their flair and charisma. In 1995-96, everyone who didn’t support Manchester United was cheering Keegan’s side on. When they wept at the end of that campaign, the world wept with them.
Saudi Newcastle can only be loved by Newcastle fans – that is, people who are so obsessed with the prospect of their club winning something that they are ready to ignore the fact that ‘their’ club is now an instrument of Saudi foreign policy. Many of these fans are, in fact, happy to be used in this way by the Saudi state. They don’t see themselves as living stage props in a Saudi soft power show. They think they have “won the lottery”.
Newcastle fans will defensively scoff at the notion that the feelings of neutrals are of any consequence – after all, the world’s warm regards never helped Newcastle in the past.
“We’re not here to be popular and get other teams to like us” in the words of their anti-charismatic coach, Eddie Howe, whose ethos is defined by the fact that Newcastle games boast the second-lowest average ball-in-play time in the Premier League.
Popularity evidently doesn’t matter to Kieran Trippier, who talked in the build-up to this match about the need for a team on the rise to be ‘cute’ – that is, to cheat – giving the example of his former team-mate at Atletico Madrid, Stefan Savic, who used to pull opponents’ hair to put them off.
Yet it seems to matter to the fans of Manchester City, who for more than a decade have been inhabiting the gilded world of which Newcastle now dream. Success doesn’t seem to have improved the mood over there. If anything City have become the angriest club out there, to the point where they might as well adopt “Cry More” as the club motto.
They are now ritually booing the pre-match ceremonials at both Uefa and Premier League matches, and recently hoisted a stadium banner celebrating the expensive lawyer City hired to defend them against charges of breaking the Premier League’s financial rules.
The basic problem with City is very simple: they are a great team, but they are not respected as some other great teams of the past have been, because people feel their rich owners have bought their success.
All this is especially relevant for Manchester United in the month when they ended a near six-year wait for a trophy, knocked Barcelona out of the Europa League, and became the focus of a takeover bid from Qatar.
The strange thing about the news of that Qatari interest is how many United fans appeared to welcome it, even though the idea of having success bought for you by a trillionaire sugar daddy is antithetical to everything Manchester United is supposed to be.
This is a club that, more than any other, has built itself on the myth of homegrown success, of organic growth: the Busby Babes, the Fergie Fledglings, an unbroken run of youth team players in the matchday squad stretching back to the 1930s.
The Treble they won in 1999 was so much more precious because, to a large extent, it was won with players who had come up at the club, who felt to the crowd like an extension of themselves. When you know this is what real success feels like, why would any supporter prefer to become an extension of a rich country’s foreign policy?
The truth is that Manchester United need a trillionaire owner less than any other club in the world. They have more than enough money to succeed, if they only can start getting some decisions right, as they finally seem to be doing under Erik ten Hag.
Ten Hag has created a sense of excitement and growth, a conviction that after a decade of drift they are going somewhere again, and they didn’t need anyone else’s money to make it happen.
To now become the possession of a state would be a tragedy for United. Even fans who are untroubled by the ethical concerns must surely see that state ownership would rob the club’s subsequent achievements of meaning. Only City and Newcastle fans could seriously want this to happen: after all, misery loves company.
|
english
|
<reponame>JefferyLukas/SRIs<gh_stars>1-10
{"ember-runtime.js":"<KEY>,"ember-template-compiler.js":"<KEY>,"ember-testing.js":"<KEY>,"ember.debug.js":"sha512-5hA7ZeKi8w177VWhtEzn2l/fG52jhMF7oEj2Z291Ko9F/Yw66K0I0kwtcbiM4fZd/XrcqsdZCky/EbPLYuqVZw==","ember.js":"<KEY>,"ember.min.js":"<KEY>,"ember.prod.js":"<KEY>=="}
|
json
|
<gh_stars>1-10
{"id_921":{"title":"Short Story Collection Vol. 011","language":"English","totaltime":"3:19:44","url_librivox":"http://librivox.org/short-story-collection-011/","url_iarchive":"http://www.archive.org/details/short_story_011_librivox","readers":["1166","1206","27","286","32","681","899"],"authors":"18","genres":"Short Stories"}}
|
json
|
{
"name": "<NAME>",
"website": "https://littlefishmoon.finance/",
"description": "It is a community driven project built on Binance Smart Chain.",
"explorer": "https://bscscan.com/token/0x473eb9bd02ad444d7e686fab384afc476cc337b8",
"type": "BEP20",
"symbol": "LTFM",
"decimals": 9,
"status": "active",
"id": "0x473Eb9Bd02Ad444D7E686FAB384afC476cC337B8"
}
|
json
|
/*
* BkZOO!
*
* Copyright 2011-2017 yoichibeer.
* Released under the MIT license.
*/
#include "SearchWordHelper.h"
#include "bkzoo_string.h"
#include <sstream>
#include <regex>
#include "for_debug/detect_memory_leak.h"
namespace bkzoo
{
namespace command
{
namespace helper
{
PostParam getPostParam(const std::wstring& originalUrl)
{
PostParam postParam;
const std::wregex regex(L"^(http.*)\\?(.*)$");
std::wsmatch results;
if (!std::regex_search(originalUrl, results, regex))
{
return postParam;
}
if (results.size() != 3)
{
return postParam;
}
// actionUrl
postParam.actionUrl = results[1];
// params
const std::vector<std::wstring> queries = StringUtils::split(static_cast<std::wstring>(results[2]), L'&');
for (const std::wstring query : queries)
{
const std::vector<std::wstring> keyValue = StringUtils::split(query, L'=');
if (keyValue.size() != 2)
{
continue;
}
postParam.params[keyValue[0]] = keyValue[1];
}
return postParam;
}
}
}
}
|
cpp
|
<filename>src/nameserver/logdb.cc
// Copyright (c) 2016, Baidu.com, Inc. All Rights Reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
#include <errno.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <dirent.h>
#include <common/logging.h>
#include <common/string_util.h>
#include <boost/bind.hpp>
#include <boost/lexical_cast.hpp>
#include "nameserver/logdb.h"
namespace baidu {
namespace bfs {
LogDB::LogDB() : thread_pool_(NULL), next_index_(0), smallest_index_(-1),
write_log_(NULL), write_index_(NULL), marker_log_(NULL) {}
LogDB::~LogDB() {
if (thread_pool_) {
thread_pool_->Stop(true);
}
if (write_log_) fclose(write_log_);
for (FileCache::iterator it = read_log_.begin(); it != read_log_.end(); ++it) {
fclose((it->second).first);
fclose((it->second).second);
}
if (write_index_) fclose(write_index_);
if (marker_log_) fclose(marker_log_);
}
void LogDB::Open(const std::string& path, const DBOption& option, LogDB** dbptr) {
*dbptr = NULL;
LogDB* logdb = new LogDB();
logdb->dbpath_ = path + "/";
logdb->snapshot_interval_ = option.snapshot_interval * 1000;
logdb->log_size_ = option.log_size << 20;
mkdir(logdb->dbpath_.c_str(), 0755);
if(!logdb->RecoverMarker()) {
LOG(WARNING, "[LogDB] RecoverMarker failed reason: %s", strerror(errno));
delete logdb;
return;
}
std::map<std::string, std::string>::iterator it = logdb->markers_.find(".smallest_index_");
if (it != logdb->markers_.end()) {
logdb->smallest_index_ = boost::lexical_cast<int64_t>(it->second);
}
if (!logdb->BuildFileCache()) {
LOG(WARNING, "[LogDB] BuildFileCache failed");
delete logdb;
return;
}
logdb->thread_pool_ = new ThreadPool(10);
logdb->WriteMarkerSnapshot();
*dbptr = logdb;
return;
}
StatusCode LogDB::Write(int64_t index, const std::string& entry) {
MutexLock lock(&mu_);
if (index != next_index_ && smallest_index_ != -1) {
LOG(INFO, "[LogDB] Write with invalid index = %ld smallest_index_ = %ld next_index_ = %ld ",
index, smallest_index_, next_index_);
return kBadParameter;
}
if (smallest_index_ == -1) { // empty db
StatusCode s = WriteMarkerNoLock(".smallest_index_", common::NumToString(index));
if (s != kOK) {
return s;
}
smallest_index_ = index;
LOG(INFO, "[LogDB] Set smallest_index_ to %ld ", smallest_index_);
}
uint32_t len = entry.length();
std::string data;
data.append(reinterpret_cast<char*>(&len), 4);
data.append(entry);
if (!write_log_) {
if (!NewWriteLog(index)) {
return kWriteError;
}
}
int64_t offset = ftell(write_log_);
if (offset > log_size_) {
if (!NewWriteLog(index)) {
return kWriteError;
}
offset = 0;
}
if (fwrite(data.c_str(), 1, data.length(), write_log_) != data.length() || fflush(write_log_) != 0) {
LOG(WARNING, "[LogDB] Write log %ld failed", index);
CloseCurrent();
return kWriteError;
}
if (fwrite(reinterpret_cast<char*>(&index), 1, 8, write_index_) != 8) {
LOG(WARNING, "[LogDB] Write index %ld failed", index);
CloseCurrent();
return kWriteError;
}
if (fwrite(reinterpret_cast<char*>(&offset), 1, 8, write_index_) != 8 || fflush(write_index_) != 0) {
LOG(WARNING, "[LogDB] Write index %ld failed", index);
CloseCurrent();
return kWriteError;
}
next_index_ = index + 1;
return kOK;
}
StatusCode LogDB::Read(int64_t index, std::string* entry) {
if (read_log_.empty() || index >= next_index_ || index < smallest_index_) {
return kNsNotFound;
}
FileCache::iterator it = read_log_.lower_bound(index);
if (it == read_log_.end() || (it != read_log_.begin() && index != it->first)) {
--it;
}
if (index < it->first) {
LOG(FATAL, "[LogDB] Read cannot find index file %ld ", index);
}
FILE* idx_fp = (it->second).first;
FILE* log_fp = (it->second).second;
// find entry offset
int offset = 16 * (index - it->first);
int64_t read_index = -1;
int64_t entry_offset = -1;
{
MutexLock lock(&mu_);
if (fseek(idx_fp, offset, SEEK_SET) != 0) {
LOG(FATAL, "[LogDB] Read cannot find index file %ld ", index);
}
StatusCode s = ReadIndex(idx_fp, index, &read_index, &entry_offset);
if (s != kOK) {
return s;
}
}
// read log entry
{
MutexLock lock(&mu_);
if(fseek(log_fp, entry_offset, SEEK_SET) != 0) {
LOG(WARNING, "[LogDB] Read %ld with invalid offset %ld ", index, entry_offset);
return kReadError;
}
int ret = ReadOne(log_fp, entry);
if (ret <= 0) {
LOG(WARNING, "[LogDB] Read log error %ld ", index);
return kReadError;
}
}
return kOK;
}
StatusCode LogDB::WriteMarkerNoLock(const std::string& key, const std::string& value) {
if (marker_log_ == NULL) {
marker_log_ = fopen((dbpath_ + "marker.mak").c_str(), "a");
if (marker_log_ == NULL) {
LOG(WARNING, "[LogDB] open marker.mak failed %s", strerror(errno));
return kWriteError;
}
}
std::string data;
uint32_t len = 4 + key.length() + 4 + value.length();
data.append(reinterpret_cast<char*>(&len), 4);
EncodeMarker(MarkerEntry(key, value), &data);
if (fwrite(data.c_str(), 1, data.length(), marker_log_) != data.length()
|| fflush(marker_log_) != 0) {
LOG(WARNING, "[LogDB] WriteMarker failed key = %s value = %s", key.c_str(), value.c_str());
return kWriteError;
}
fflush(marker_log_);
markers_[key] = value;
return kOK;
}
StatusCode LogDB::WriteMarker(const std::string& key, const std::string& value) {
MutexLock lock(&mu_);
return WriteMarkerNoLock(key, value);
}
StatusCode LogDB::WriteMarker(const std::string& key, int64_t value) {
return WriteMarker(key, std::string(reinterpret_cast<char*>(&value), 8));
}
StatusCode LogDB::ReadMarker(const std::string& key, std::string* value) {
MutexLock lock(&mu_);
std::map<std::string, std::string>::iterator it = markers_.find(key);
if (it == markers_.end()) {
return kNsNotFound;
}
*value = it->second;
return kOK;
}
StatusCode LogDB::ReadMarker(const std::string& key, int64_t* value) {
std::string v;
StatusCode status = ReadMarker(key, &v);
if (status != kOK) {
return status;
}
memcpy(value, &(v[0]), 8);
return kOK;
}
StatusCode LogDB::GetLargestIdx(int64_t* value) {
MutexLock lock(&mu_);
if (smallest_index_ == next_index_) {
*value = -1;
return kNsNotFound;
}
*value = next_index_ - 1;
return kOK;
}
StatusCode LogDB::DeleteUpTo(int64_t index) {
if (index < smallest_index_) {
return kOK;
}
if (index >= next_index_) {
LOG(INFO, "[LogDB] DeleteUpTo over limit index = %ld next_index_ = %ld", index, next_index_);
return kBadParameter;
}
MutexLock lock(&mu_);
smallest_index_ = index + 1;
WriteMarkerNoLock(".smallest_index_", common::NumToString(smallest_index_));
FileCache::reverse_iterator upto = read_log_.rbegin();
while (upto != read_log_.rend()) {
if (upto->first <= index) break;
++upto;
}
if (upto == read_log_.rend()) {
return kOK;
}
int64_t upto_index = upto->first;
FileCache::iterator it = read_log_.begin();
while (it->first != upto_index) {
fclose((it->second).first);
fclose((it->second).second);
std::string log_name, idx_name;
FormLogName(it->first, &log_name, &idx_name);
remove(log_name.c_str());
remove(idx_name.c_str());
read_log_.erase(it++);
}
LOG(INFO, "[LogDB] DeleteUpTo done smallest_index_ = %ld next_index_ = %ld",
smallest_index_, next_index_);
return kOK;
}
StatusCode LogDB::DeleteFrom(int64_t index) {
if (index >= next_index_) {
return kOK;
}
if (index < smallest_index_) {
LOG(INFO, "[LogDB] DeleteUpTo over limit index = %ld smallest_index_ = %ld next_index_ = %ld",
index, smallest_index_, next_index_);
return kBadParameter;
}
MutexLock lock(&mu_);
FileCache::iterator from = read_log_.lower_bound(index);
bool need_truncate = index != from->first;
for (FileCache::iterator it = from; it != read_log_.end(); ++it) {
fclose((it->second).first);
fclose((it->second).second);
std::string log_name, idx_name;
FormLogName(it->first, &log_name, &idx_name);
remove(log_name.c_str());
remove(idx_name.c_str());
}
CloseCurrent();
// truancate the last log and open it for read
read_log_.erase(from, read_log_.end());
if (need_truncate && !read_log_.empty()) {
FileCache::reverse_iterator it = read_log_.rbegin();
int offset = 16 * (index - it->first);
fseek((it->second).first, offset, SEEK_SET);
char buf[16];
int len = fread(buf, 1, 16, (it->second).first);
assert(len == 16);
int64_t tmp_offset;
memcpy(&tmp_offset, buf + 8, 8);
fclose((it->second).first);
fclose((it->second).second);
std::string log_name, idx_name;
FormLogName(it->first, &log_name, &idx_name);
truncate(log_name.c_str(), tmp_offset);
truncate(idx_name.c_str(), offset);
(it->second).first = fopen(idx_name.c_str(), "r");
(it->second).second = fopen(log_name.c_str(), "r");
}
next_index_ = index;
LOG(INFO, "[LogDB] DeleteFrom done smallest_index_ = %ld next_index_ = %ld",
smallest_index_, next_index_);
return kOK;
}
bool LogDB::BuildFileCache() {
// build log file cache
struct dirent *entry = NULL;
DIR *dir_ptr = opendir(dbpath_.c_str());
if (dir_ptr == NULL) {
LOG(WARNING, "[LogDB] open dir failed %s", dbpath_.c_str());
return false;
}
bool error = false;
while ((entry = readdir(dir_ptr)) != NULL) {
size_t idx = std::string(entry->d_name).find(".idx");
if (idx != std::string::npos) {
std::string file_name = std::string(entry->d_name);
int64_t index = boost::lexical_cast<int64_t>(file_name.substr(0, idx));
std::string log_name, idx_name;
FormLogName(index, &log_name, &idx_name);
FILE* idx_fp = fopen(idx_name.c_str(), "r");
if (idx_fp == NULL) {
LOG(WARNING, "[LogDB] open index file failed %s", file_name.c_str());
error = true;
break;
}
FILE* log_fp = fopen(log_name.c_str(), "r");
if (log_fp == NULL) {
LOG(WARNING, "[LogDB] open log file failed %s", file_name.c_str());
fclose(idx_fp);
error = true;
break;
}
read_log_[index] = std::make_pair(idx_fp, log_fp);
LOG(INFO, "[LogDB] Add file cache %ld to %s ", index, file_name.c_str());
}
}
closedir(dir_ptr);
// check log & idx match, build largest index
if (error || !CheckLogIdx()) {
LOG(WARNING, "[LogDB] BuildFileCache failed error = %d", error);
for (FileCache::iterator it = read_log_.begin(); it != read_log_.end(); ++it) {
fclose((it->second).first);
fclose((it->second).second);
}
read_log_.clear();
return false;
}
return true;
}
bool LogDB::CheckLogIdx() {
if (read_log_.empty()) {
if (smallest_index_ == -1) {
next_index_ = 0;
} else {
next_index_ = smallest_index_;
}
LOG(INFO, "[LogDB] No previous log, next_index_ = %ld ", next_index_);
return true;
}
FileCache::iterator it = read_log_.begin();
if (smallest_index_ < it->first) {
LOG(WARNING, "[LogDB] log does not contain smallest_index_ %ld %ld",
smallest_index_, it->first);
return false;
}
next_index_ = it->first;
bool error = false;
for (; it != read_log_.end(); ++it) {
if (it->first != next_index_) {
LOG(WARNING, "[LogDB] log is not continous, current index %ld ", it->first);
return false;
}
FILE* idx = (it->second).first;
FILE* log = (it->second).second;
fseek(idx, 0, SEEK_END);
int idx_size = ftell(idx);
if (idx_size < 16) {
LOG(WARNING, "[LogDB] index file too small %ld ", it->first);
error = true;
break;
}
int reminder = idx_size % 16;
if (reminder != 0) {
LOG(INFO, "[LogDB] incomplete index file %ld.idx ", it->first);
}
fseek(idx, idx_size - 16 - reminder, SEEK_SET);
int64_t expect_index = it->first + (idx_size / 16) - 1;
int64_t read_index = -1;
int64_t offset = -1;
StatusCode s = ReadIndex(idx, expect_index, &read_index, &offset);
if (s != kOK) {
LOG(WARNING, "[LogDB] check index file failed %ld.idx %s",
it->first, StatusCode_Name(s).c_str());
return false;
}
fseek(log, 0, SEEK_END);
int log_size = ftell(log);
fseek(log, offset, SEEK_SET);
int len;
int ret = fread(&len, 1, 4, log);
if (ret < 4 || (offset + 4 + len > log_size)) {
LOG(WARNING, "[LogDB] incomplete log %ld ", it->first);
return false;
}
next_index_ = expect_index + 1;
}
if (error) {
if (++it != read_log_.end()) {
return false;
}
FileCache::reverse_iterator rit = read_log_.rbegin();
fclose((rit->second).first);
fclose((rit->second).second);
read_log_.erase(rit->first);
}
LOG(INFO, "[LogDB] Set next_index_ to %ld", next_index_);
return true;
}
bool LogDB::RecoverMarker() {
// recover markers
FILE* fp = fopen((dbpath_ + "marker.mak").c_str(), "r");
if (fp == NULL) {
if (errno == ENOENT) {
fp = fopen((dbpath_ + "marker.tmp").c_str(), "r");
}
}
if (fp == NULL) {
LOG(INFO, "[LogDB] No marker to recover");
return errno == ENOENT;
}
std::string data;
while (true) {
int ret = ReadOne(fp, &data);
if (ret == 0) break;
if (ret < 0) {
LOG(WARNING, "[LogDB] RecoverMarker failed while reading");
fclose(fp);
return false;
}
MarkerEntry mark;
DecodeMarker(data, &mark);
markers_[mark.key] = mark.value;
}
fclose(fp);
LOG(INFO, "[LogDB] Recover markers done");
rename((dbpath_ + "marker.tmp").c_str(), (dbpath_ + "marker.mak").c_str());
return true;
}
void LogDB::WriteMarkerSnapshot() {
MutexLock lock(&mu_);
FILE* fp = fopen((dbpath_ + "marker.tmp").c_str(), "w");
if (fp == NULL) {
LOG(WARNING, "[LogDB] open marker.tmp failed %s", strerror(errno));
return;
}
std::string data;
for (std::map<std::string, std::string>::iterator it = markers_.begin();
it != markers_.end(); ++it) {
MarkerEntry marker(it->first, it->second);
uint32_t len = 4 + (it->first).length() + 4 + (it->second).length();
data.clear();
data.append(reinterpret_cast<char*>(&len), 4);
EncodeMarker(marker, &data);
if (fwrite(data.c_str(), 1, data.length(), fp) != data.length() || fflush(fp) != 0) {
LOG(WARNING, "[LogDB] write marker.tmp failed %s", strerror(errno));
fclose(fp);
return;
}
}
fclose(fp);
if (marker_log_) {
fclose(marker_log_);
marker_log_ = NULL;
}
rename((dbpath_ + "marker.tmp").c_str(), (dbpath_ + "marker.mak").c_str());
marker_log_ = fopen((dbpath_ + "marker.mak").c_str(), "a");
if (marker_log_ == NULL) {
LOG(WARNING, "[LogDB] open marker.mak failed %s", strerror(errno));
return;
}
LOG(INFO, "[LogDB] WriteMarkerSnapshot done");
thread_pool_->DelayTask(snapshot_interval_, boost::bind(&LogDB::WriteMarkerSnapshot, this));
}
void LogDB::CloseCurrent() {
if (write_log_) {
fclose(write_log_);
write_log_ = NULL;
}
if (write_index_) {
fclose(write_index_);
write_index_ = NULL;
}
}
int LogDB::ReadOne(FILE* fp, std::string* data) {
int len;
int ret = fread(&len, 1, 4, fp);
if (ret == 0) {
return 0;
}
if (ret != 4) return -1;
char* buf = new char[len];
ret = fread(buf, 1, len, fp);
if (ret != len) {
LOG(WARNING, "Read(%d) return %d", len, ret);
delete[] buf;
return -1;
}
data->clear();
data->assign(buf, len);
delete[] buf;
return len;
}
StatusCode LogDB::ReadIndex(FILE* fp, int64_t expect_index, int64_t* index, int64_t* offset) {
char buf[16];
int ret = fread(buf, 1, 16, fp);
if (ret == 0) {
return kNsNotFound;
} else if (ret != 16) {
LOG(WARNING, "[logdb] Read index file error %ld", expect_index);
return kReadError;
}
memcpy(index, buf, 8);
memcpy(offset, buf + 8, 8);
if (expect_index != *index) {
LOG(WARNING, "[LogDB] Index file mismatch %ld ", index);
return kReadError;
}
return kOK;
}
void LogDB::EncodeMarker(const MarkerEntry& marker, std::string* data) {
int klen = (marker.key).length();
int vlen = (marker.value).length();
data->append(reinterpret_cast<char*>(&klen), 4);
data->append(marker.key);
data->append(reinterpret_cast<char*>(&vlen), 4);
data->append(marker.value);
}
void LogDB::DecodeMarker(const std::string& data, MarkerEntry* marker) { // data = klen + k + vlen + v
int klen;
memcpy(&klen, &(data[0]), 4);
(marker->key).assign(data.substr(4, klen));
int vlen;
memcpy(&vlen, &(data[4 + klen]), 4);
(marker->value).assign(data.substr(4 + klen + 4, vlen));
}
bool LogDB::NewWriteLog(int64_t index) {
if (write_log_) fclose(write_log_);
if (write_index_) fclose(write_index_);
std::string log_name, idx_name;
FormLogName(index, &log_name, &idx_name);
write_log_ = fopen(log_name.c_str(), "w");
write_index_ = fopen(idx_name.c_str(), "w");
FILE* idx_fp = fopen(idx_name.c_str(), "r");
FILE* log_fp = fopen(log_name.c_str(), "r");
if (!(write_log_ && write_index_ && idx_fp && log_fp)) {
if (write_log_) fclose(write_log_);
if (write_index_) fclose(write_index_);
if (idx_fp) fclose(idx_fp);
if (log_fp) fclose(log_fp);
LOG(WARNING, "[logdb] open log/idx file failed %ld %s", index, strerror(errno));
return false;
}
read_log_[index] = std::make_pair(idx_fp, log_fp);
return true;
}
void LogDB::FormLogName(int64_t index, std::string* log_name, std::string* idx_name) {
log_name->clear();
log_name->append(dbpath_);
log_name->append(common::NumToString(index));
log_name->append(".log");
idx_name->clear();
idx_name->append(dbpath_);
idx_name->append(common::NumToString(index));
idx_name->append(".idx");
}
} // namespace bfs
} // namespace baidu
|
cpp
|
A total number of 5811 project proposals have been received by the Council for Advancement of People’s Action and Rural Technology (CAPART) Headquarters and its 9 regional offices at Ahmedabad, Bhubaneswar, Chandigarh, Dharwad, Guwahati, Hyderabad, Jaipur, Lucknow and Patna during these two years. 461 projects have been sanctioned and 2997 projects have been rejected due to non-adherence to prescribed parameters, faulty documentation and non-viable projects. The remaining 2353 project proposals are under various stages of process viz., scrutiny, pre-funding appraisal and awaiting required documents. The (CAPART) is presently providing assistance under the schemes like Public Cooperation (PC), Organisation of Beneficiaries (OB), Advancement of Rural Technology Scheme (ARTS) and Disability.
This was stated by the Minister of State in the Ministry of Rural Development, Smt. Suryakanta Patil in reply to a question in Lok Sabha today.
|
english
|
The Representation of American Society in Baseball Alex S. & Seth G. Horace Greeley HS KLM 2006 How has baseball reflected American society over the course of the first half of the 20 th century?
The Representation of American Society in Baseball. Alex S. & Seth G. Horace Greeley HS KLM 2006. How has baseball reflected American society over the course of the first half of the 20 th century?.
EMPLOYMENT, LABOR, AND WAGES. CHAPTER 8. Warm up Question: April 4th, 2017. Have you ever convinced a person in authority to do something differently than before? Would it work better if only one person in the group made the attempt? What does this teach you about strength in numbers?.
Chapter 9 Section 4. Reforming the Industrial World. Main Idea. The Industrial Revolution led to economic, social and political reforms. Many modern social welfare programs developed during the period of reform. Introduction.
Labor Strikes. Fixing labor conditions and the Progressive movement. Labor Strikes. By the end of the 19 th century, many workers belonged to these labor unions Unions started to argue vocally for change and encouraged workers to join. Labor Strikes.
OLIGOPOLY. Market in which there are few firms, so individual firms can affect market price. Interdependence of firms is an important characteristic. The demand curves for the individual firms are dependent on the pricing and marketing decisions of competitors.
View Labor unions PowerPoint (PPT) presentations online in SlideServe. SlideServe has a very huge collection of Labor unions PowerPoint presentations. You can view or download Labor unions presentations for your school assignment or business presentation. Browse for the presentations on every topic that you want.
|
english
|
Chennai Super Kings bought veteran cricketer, Harbhajan Singh was purchase by Chennai Super Kings at his base price of Rs 2 Crore. This was only the second time when Bhajji was in the auction as he was retained by Mumbai Indians on previous two occasions.
He also led the side on few occasions before stepping down from the post.
He played for the franchise for a total of 10 years but was not retained during the retention ceremony as the franchise retained Rohit Sharma, Hardik Pandya and Jasprit Bumrah. Bhajji going at his base price comes as a big surprise.
Harbhajan Singh will again be playing under MS Dhoni, having played under him at international level.
|
english
|
{
"authors": [
{
"author": "<NAME>"
},
{
"author": "<NAME>"
},
{
"author": "<NAME>"
},
{
"author": "<NAME>"
},
{
"author": "<NAME>"
},
{
"author": "<NAME>"
},
{
"author": "<NAME>"
},
{
"author": "<NAME>"
},
{
"author": "<NAME>"
}
],
"doi": "10.1186/s12902-018-0234-6",
"publication_date": "2018-01-31",
"id": "EN113541",
"url": "https://pubmed.ncbi.nlm.nih.gov/29378555",
"source": "BMC endocrine disorders",
"source_url": "",
"licence": "CC BY",
"language": "en",
"type": "pubmed",
"description": "",
"text": "A 16-year-old pregnant woman was urgently transferred to our hospital because of threatened premature labor when the Kumamoto earthquakes hit the area where she lived. During her hospitalization, she complained of gradually increasing symptoms of polyuria and polydipsia. The serum level of arginine vasopressin (AVP) was 1.7 pg/mL, which is inconsistent with central DI. The challenge of diagnostic treatment using oral 1-deamino-8-D-AVP (DDAVP) successfully controlled her urine and allowed for normal delivery. DDAVP tablets were not necessary to control her polyuria thereafter. Based on these observations, clinical diagnosis of GDI was confirmed. Pathophysiological analyses revealed that vasopressinase expression was more abundant in the GDI patient's syncytiotrophoblast in placenta compared with that in a control subject. Serum vasopressinase was also observed during gestation and disappeared soon after delivery. Vasopressinase is reportedly identical to oxytocinase or insulin regulated aminopeptidase (IRAP), which is an abundant cargo protein associated with the glucose transporter 4 (GLUT4) storage vesicle. Interestingly, the expression and subcellular localization of GLUT4 appeared to occur in a vasopressinase (IRAP)-dependent manner."
}
|
json
|
The COVID-19 pandemic has had a significant impact on the way we work, leading to a shift towards remote and flexible working arrangements and introducing the new norms, ‘Work From Office’, ‘Return to Office’, ‘Hybrid Working’, and ‘Flexible working’. In the last year, the workspace industry has undergone a significant transformation as the anticipated "return to the office" became a more acceptable approach with a mix of remote and in-person work.
Despite this, the importance of flexibility remains a crucial factor in workspace strategies. Companies arenow expecting more from their office spaces, providing new opportunities for landlords and occupiers to adapt their flexible solutions to meet the needs of their clients.
Expansion and growth of Operators - Operators would be on an expansion spree in all 3 segments:
a. Premium Enterprise coworking and Managed offices' roll-out would be concentrated in metros and Top office micro Markets within the metros.
b. Home Grown operators’ local and National would be in full throttle and confidence to build speculative assets and products backed by strong demand data and trends around the affordable segment. This is going to be a Massive India Story where existing operators as well as new entrants will focus on Metro and Non-Metros - Top micro market but A- B+ Asset with compliance in place. The target price for the occupier here is 7k-9k per desk. This segment is seeing massive demand and occupancy levels.
c. Depth in product and Large campus Strategy - Some operators in the last 2 years have demonstrated great success in this strategy. Instead of multiple centers and locations, they're changing the narrative to concentration and economies of scale. Companies like Smartworks and Indiqube have adopted this strategy, where they lease out a single large standalone campus to multiple flexible occupants, primarily providing privately managed offices at competitive price points, design specifications, and usage terms. For instance, within the same campus, there are average seat prices of INR 7K and INR 15K, depending on the occupiers' specifications and deal terms.
Occupier's Preference and Demands: As a result of the after-effects of the COVID-19 pandemic and economic recession, occupiers are likely to demand more flexibility and shorter lease terms. They will be more cautious in the allocation of their capital as well as operational expenses. This trend is expected to continue in the future, and the enterprise corporate office might look like shorter leases, fitted-out spaces, or privately managed spaces with an average lock-in period of 36 months or less.
The critical metric for success will be the demand for coworking spaces and hybrid usage across India, offering fixed inventory but unfixed and unlimited access within the company, and providing flexibility for employees to work on a day-to-day basis, like an "Uber for office space" - the hyper flex of flex.
The cost per desk in the flexible workspace segment is expected to rise by 5-7% to improve the return on investment and profitability for operators and providers. In the last 2 years, there has been pressure on pricing due to competition and high vacancy rates. However, with an increase in occupancy levels and demand, operators in key micro markets are looking to increase their prices. Occupiers will likely be open to this, as long as it is justified by the design specifications and services provided.
India has a history of showing resilience and strong immunity to global challenges such as the financial crisis of 2008. It is expected to do the same in the face of a potential global recession. However, if large economies are affected, it may also impact the funding and investment climate in India, although to a lesser extent and in a more sporadic or specific manner, rather than an overall recession.
In the past, economic downturns and recessions have had a positive impact on the flexible office industry, as companies tend to reduce their office footprint and seek more flexibility in terms of pricing, lease terms, and usage patterns. After the COVID-19 pandemic, there has been a significant increase in demand for flexible office spaces, which is likely to drive further adoption across various sectors.
|
english
|
{
"an5.212:0.1": "Nummerierte Lehrreden 5 ",
"an5.212:0.2": "22. Beschimpfung ",
"an5.212:0.3": "212. Ein Zänker ",
"an5.212:1.1": "„Mönche und Nonnen, ein Mönch, der Zwist, Zank und Streit anfängt, diskutiert und disziplinarische Angelegenheiten im Saṅgha aufbringt, kann fünf nachteilige Folgen erwarten. ",
"an5.212:1.2": "Welche fünf? ",
"an5.212:1.3": "Er erringt nicht, was noch nicht errungen ist. Was er errungen hat, verliert er. Er hat einen schlechten Ruf. Wenn er stirbt, fühlt er sich verloren. Und wenn sein Körper auseinanderbricht, nach dem Tod, wird er an einem verlorenen Ort wiedergeboren, einem schlechten Ort, in der Unterwelt, der Hölle. ",
"an5.212:1.4": "Ein Mönch, der Zwist, Zank und Streit anfängt, diskutiert und disziplinarische Angelegenheiten im Saṅgha aufbringt, kann diese fünf nachteiligen Folgen erwarten.“ "
}
|
json
|
<filename>examples/nni_data_augmentation/basenet/data.py
#!/usr/bin/env python
"""
data.py
"""
import itertools
def loopy_wrapper(gen):
while True:
for x in gen:
yield x
class ZipDataloader:
def __init__(self, dataloaders):
self.dataloaders = dataloaders
self._len = len(dataloaders[0])
def __len__(self):
return self._len
def __iter__(self):
counter = 0
iters = [loopy_wrapper(d) for d in self.dataloaders]
while counter < len(self):
yield tuple(zip(*[next(it) for it in iters]))
counter += 1
|
python
|
The 2nd ODI match of the Zimbabwe Women Tour of Thailand will be played on the 21st of April between Zimbabwe Women and Thailand Women at the Terdthai Cricket Ground, Bangkok.
Current Form Zimbabwe Women and Thailand Women:
Thailand Women have won the first ODI of the 3 match series to take a 1-0 lead.
The highest run scorer for Thailand Women in the series is Naruemol Chaiwai with 57 runs to her name.
The highest run scorer for Zimbabwe Women in the series is Sharne Mayers with 24 runs to her name.
The highest wicket taker for Thailand Women in the series is Thipatcha Putthawong with 6 scalps under her belt.
The highest wicket taker for Zimbabwe Women in the series is Kelis Ndhlovu with 5 scalps under her belt.
In the first ODI, Thailand Women batted first and they were bowled out for 154 in the 43rd over. The start was terrible for the hosts as they lost 4 wickets for just 21 runs. Skipper Naruemol Chaiwai came to her team's rescue as she smashed 57 runs in 104 balls to take her team to a competitive total of 154 before they were bowled out.
During the chase, Zimbabwe Women lost their key batter Kelis Ndhlovu early on in the innings. Sharne Mayers played well and scored 24 runs. Once wickets started falling after the powerplay was over, it was in regular fashion. No batted could withstand the accurate bowling display by Thipatcha Putthawong. She picked up 6 wickets, giving away just 6 runs and helped wrap Zimbabwe Women innings at 76, as Thailand Women won the match by 78 runs.
Let’s have a look at the squads:
Thailand Women:
Zimbabwe Women:
Top Batter (Runs Scored) – Naruemol Chaiwai (Thailand Women), Mary Anne Musonda (Zimbabwe Women)
Top Bowler (Wickets taken) –Thipatcha Putthawong (Thailand Women), Josephine Nkomo (Zimbabwe Women)
Most Sixes – Naruemol Chaiwai (Thailand Women), Mary Anne Musonda (Zimbabwe Women)
Player of the Match- Thipatcha Putthawong (Thailand Women)
Live Cricket Streaming Zimbabwe Women Tour of Thailand 2023:
*NB these predictions may be changed nearer the start of the match once the final starting teams have been announced and we will be running ‘In-Play’ features, so stay tuned.
|
english
|
Agra Police said the excavation work was going on in a dharamshala in Tila Maithan locality near Agra City Railway Station. But six houses and one temple were collapsed due to its impact.
An excavation work at a dharamshala in Uttar Pradesh's Agra on Thursday morning turned fatal as a four-year-old girl was killed and a few others were injured after six houses collapsed, news agency PTI reported.
Deputy commissioner of police (City) Vikas Kumar the incident took place around 7am. He said the excavation work was going on in a dharamshala in Tila Maithan locality near Agra City Railway Station. But six houses and one temple were collapsed due to its impact.
“Three persons were trapped under the debris. They were identified as Vivek Kumar and his two daughters - Videhi, 5, and Rusali, 4,” PTI quoted Kumar as saying. They were taken to a hospital where Rusali died.
Chief minister Yogi Adityanath reportedly took cognizance of the building collapse incident and instructed the district administration and senior police officers to visit the incident spot and conduct relief work.
The police have begun a probe into the matter.
The incident took place two days after Samajwadi Party spokesperson Abbas Haider lost his wife and mother in a multi-storey building collapse in Lucknow. The five-storey Alaya Apartments in the Hazratganj area in the Uttar Pradesh capital collapsed on Tuesday evening, trapping more than a dozen people under it.
Haider's wife Uzma Haider, 30, and mother Begum Haider, 87, have died, while two more people were still feared trapped under the debris.
(With inputs from PTI, ANI)
|
english
|
{"etp.js":"sha256-jWErrGohfi/YOCgIDVPhQjdpHUvpuHA6AyPbmJr5EkY=","etp.min.js":"sha256-9iwrJBjJ6OljSTnWZV9e/zihwUwgbytXWSqp9504nG8="}
|
json
|
extern crate xdg;
#[macro_use]
extern crate diesel;
#[macro_use]
extern crate diesel_migrations;
use diesel::prelude::*;
use std::env;
pub mod schema;
pub mod models;
use schema::tils;
use models::{NewTIL, TIL};
embed_migrations!();
fn main() {
let data_file_path_buf = match env::var("TIL_FILE") {
Ok(non_default_path) => std::path::PathBuf::from(non_default_path),
Err(env::VarError::NotPresent) => {
let xdg_dirs = xdg::BaseDirectories::with_prefix("til").unwrap();
xdg_dirs.place_data_file("data.sqlite3").unwrap()
}
Err(env::VarError::NotUnicode(_)) => panic!("TIL_FILE is not valid unicode"),
};
let data_file_str = data_file_path_buf.to_str().unwrap();
let connection = SqliteConnection::establish(&data_file_str).unwrap();
// TODO: log this to a file instead of stdout
embedded_migrations::run_with_output(&connection, &mut std::io::stdout()).unwrap();
let mut args = env::args();
if let Some(cmd) = args.nth(1) {
if cmd == "new" {
if let Some(contents) = args.nth(0) {
let new_til = NewTIL { contents: &contents };
diesel::insert_into(tils::table)
.values(&new_til)
.execute(&connection)
.unwrap();
println!("Inserted new til: {:?}", contents);
} else {
println!("Don't forget to provide contents for your new til");
}
} else if cmd == "list" {
{
use schema::tils::dsl::*;
let results = tils.order(created_at.desc())
.load::<TIL>(&connection)
.unwrap();
let len = results.len();
for til in results {
println!("{} - {}", til.created_at, til.contents);
}
if len == 0 {
println!("None yet. Why not create one?");
}
}
} else {
println!("Only subcommands currently are \"new\" and \"list\"");
}
} else {
println!("Don't forget to provide a command. Usage: `til new 'Rust is cool'`");
}
}
|
rust
|
<filename>packages/media/media-picker/src/popup/components/styled.ts
import styled from 'styled-components';
import { HTMLAttributes, ComponentClass } from 'react';
import { fontFamily } from '@atlaskit/theme/constants';
import { N30 } from '@atlaskit/theme/colors';
const MIN_HEIGHT = '498px';
export const MediaPickerPopupWrapper = styled.div`
display: flex;
cursor: default;
user-select: none;
font-family: ${fontFamily()};
border-radius: 3px;
position: relative;
/* Ensure that the modal has a static size */
width: 968px;
`;
export const SidebarWrapper: ComponentClass<HTMLAttributes<{}>> = styled.div`
width: 235px;
min-width: 235px;
background-color: ${N30};
min-height: ${MIN_HEIGHT};
`;
export const ViewWrapper: ComponentClass<HTMLAttributes<{}>> = styled.div`
display: flex;
flex-direction: column;
flex: 1;
/* Height of the Popup should never change */
height: calc(100vh - 200px);
background-color: white;
min-height: ${MIN_HEIGHT};
`;
|
typescript
|
'use strict';
const chalk = require('chalk');
const prettifyTime = require('./prettify-time');
/**
* Compiler logger function that transforms the output into a readable stream of text
*
* @param {Error} error - Error object in case webpack fails (these are not compilation errors)
* @param {object} stats - Webpack stats object that contains all information about your build
* @param {EventEmitter} logger - Logger event emitter
* @returns {object} Error object or nothing if there is no error
*/
function compilerLogger(error, stats, logger) {
if (error) {
logger.emit('fatal', chalk.red(`${error.name} ${error.message}`));
logger.emit('log', error.details);
return error;
}
const jsonStats = stats.toJson();
if (stats.hasErrors()) {
const compilerError = new Error(jsonStats.errors[0]);
compilerError.errors = jsonStats.errors;
compilerError.warnings = jsonStats.warnings;
logger.emit('error', chalk.red(compilerError));
logger.emit('error', chalk.red('Failed to build webpack'));
} else {
const compileTime = prettifyTime(stats.endTime - stats.startTime);
logger.emit('log', `compilation finished\n${stats.toString({ colors: true })}`);
logger.emit('log', `compiled with ${chalk.cyan('webpack')} in ${chalk.magenta(compileTime)}`);
}
return stats;
}
module.exports = compilerLogger;
|
javascript
|
Dinesh played a very short but very effective cameo in the second T20I against Australia. Thus, his skills of finishing the game superbly were at full display here. He said that he has executed this role of a finisher was quite some time in the IPL and is happy to continue with it for India now.
After losing the first T20I of the three-match series against Australia, India came back quite strongly in the second game at Nagpur. After putting Australia to bat in the rain-curtailed 8 overs per side game, the visitors managed to put 90 runs on the board. In reply India chased down the score with 6 wickets in hand courtesy of a 46 run innings from skipper Rohit Sharma, and a very short but very effective cameo from Dinesh Karthik.
Coming in to bat ahead of Rishabh Pant in the order, Karthik came in the crease with India needing 8 off the last over. The veteran wicketkeeper-batsman, however, didn't take time to stretch the game. He hit Daniel Sams for a six and a four of the first two deliveries, as he finished with an innings of 10 from 2 balls. Thus, his skills of finishing the game superbly were at full display here.
Dinesh Karthik said that he has executed this role of a finisher was quite some time in the IPL and is happy to continue with it for India now.
"Look, I think over a period of time I've been practicing for this. I've been doing it for RCB (Royal Challengers Bangalore) now, and I'm happy doing it here. So it's a consistent routine over a period of time, the kind of, you know, when I get off time, I do a lot of scenario practices," Karthik said in a press conference after the game.
Dinesh Karthik also gave an insight into how his practice sessions go to perfect his skills. "You know, Vikram (Rathour) and Rahul (Dravid) have also been accommodating of how I want to practice. What are the kind of shots I want to practice, so I've been very specific with it. I don't practice too much, but I try and keep it as specific as possible," he said.
With the series now level at 1-1, India will take on Australia in the third T20I at Hyderabad on Sunday (September 25) in order to win the series.
|
english
|
module.exports = {
oFlag_xs: 'ln-o-flag@xs',
u1of2_md: 'ln-u-1/2@md',
cComponent: {
element_something: 'ln-c-component__element@something',
$modifier_something: 'ln-c-component ln-c-component--modifier@something',
element: {
$modifier_something: 'ln-c-component__element ln-c-component__element--modifier@something'
}
}
}
|
javascript
|
Are you an aspiring entrepreneur, but bogged down by questions like Why, What and How to start your own business? Well, You Can Do It is a step by step guide to take you through key decisions before and during your entrepreneurial journey. Packed with insights, business hacks, strategies, case studies and best practices, this book is a must-have for first generation entrepreneurs who understand that success comes from constant learning – not just from mistakes but also from the success stories of others. How? • Neatly divided into ten chapters, the authors compel the readers to move beyond the ordinary to newer, unexplored targets. • Chase your dream; be your own boss and create wealth pipelines to boost passive income for future generations. • It is a ready reckoner of not just tips and tricks, but also oft-ignored, yet highly important issues like selecting the right business location, operational challenges and effective way to use social media marketing. • That’s not all. An entire chapter is dedicated to starting a business while still working which can create parallel incomes for you and your family. Grab your copy now to enter the entrepreneurial world with poise and élan. After all, success in business cannot be achieved with a management degree alone.
|
english
|
My family is planning for a car more suitable for the comfort of passengers rather than driving experience. And the most important thing is that it should be have good fuel efficiency whether its petrol or diesel and maintenance should be fair.
1.accent petrol with lpg for 1.3k 180000 mileage done 2000 model.
3.or should i get accent petrol within 1.2 and convert it to cng ?
what u think about it ?
As oil traded near four-year lows, the government on Friday cut petrol and diesel prices by Rs 5 and Rs 2 a litre, respectively -- a move that will help tame inflation and foster easy money policy to push growth.
Three new shots from the upcoming "Fast and Furious," which is the fourth installment in the "Fast and the Furious" franchise, have popped up online. The feature shots of Vin Diesel and Paul Walker, with one picture showing a stunt from the movie.
Planning to buy a Tata Indigo Diesel version.As my budget is very limited, I have decided to go for a 2nd hand Indigo. Now I have the following doubts:
1:> Hows the car (Diesel) performance wise ?
2:> Fuel Efficiency ?
Tata Motors today announced the launch of its entry level common rail diesel (DICOR) offering in the sedan range with the Indigo LS version at Rs.5.25 lakhs (ex-showroom Delhi).
The price of petrol would be cut by Rs 2 per litre, while diesel would go down by Re 1 per litre, Union Petroleum Minister, Murli Deora, said.
|
english
|
Do Not Buy;
Do Not Buy;
I own a Volkswagen Polo Diesel DSG Highline model. I bought this car in Dec 2015. Since it has been giving me lots of issues. First Steering stud failure for which I had to visit 3 times to dealer. Now there is a brake noise issue and it's been 5 times car went to showroom but no solution. VW employees do not talk to you even after your request.
- Mileage (89)
- Performance (77)
- Interior (57)
Do Not Buy;
Good Car;
Safe Car;
|
english
|
package org.maera.plugin.impl;
import org.apache.commons.lang.Validate;
import org.maera.plugin.JarPluginArtifact;
import org.maera.plugin.PluginArtifact;
import org.maera.plugin.classloader.PluginClassLoader;
import org.maera.plugin.loaders.classloading.DeploymentUnit;
import java.io.InputStream;
import java.net.URL;
/**
* A dynamically loaded plugin is loaded through the plugin class loader.
*/
public class DefaultDynamicPlugin extends AbstractPlugin {
private final PluginArtifact pluginArtifact;
private final PluginClassLoader loader;
public DefaultDynamicPlugin(final DeploymentUnit deploymentUnit, final PluginClassLoader loader) {
this(new JarPluginArtifact(deploymentUnit.getPath()), loader);
}
public DefaultDynamicPlugin(final PluginArtifact pluginArtifact, final PluginClassLoader loader) {
Validate.notNull(pluginArtifact, "The plugin artifact cannot be null");
Validate.notNull(loader, "The plugin class loader cannot be null");
this.pluginArtifact = pluginArtifact;
this.loader = loader;
}
public <T> Class<T> loadClass(final String clazz, final Class<?> callingClass) throws ClassNotFoundException {
@SuppressWarnings("unchecked")
final Class<T> result = (Class<T>) loader.loadClass(clazz);
return result;
}
public boolean isUninstallable() {
return true;
}
public URL getResource(final String name) {
return loader.getResource(name);
}
public InputStream getResourceAsStream(final String name) {
return loader.getResourceAsStream(name);
}
public ClassLoader getClassLoader() {
return loader;
}
/**
* This plugin is dynamically loaded, so returns true.
*
* @return true
*/
public boolean isDynamicallyLoaded() {
return true;
}
/**
* @deprecated Since 2.2.0, use {@link #getPluginArtifact()} instead
*/
public DeploymentUnit getDeploymentUnit() {
return new DeploymentUnit(pluginArtifact.toFile());
}
/**
* @since 2.2.0
*/
public PluginArtifact getPluginArtifact() {
return pluginArtifact;
}
public boolean isDeleteable() {
return true;
}
public boolean isBundledPlugin() {
return false;
}
@Override
protected void uninstallInternal() {
loader.close();
}
}
|
java
|
<reponame>unfoldingWord-box3/lexicon-poc
{"brief":"Sheshbatstsar","long":"<i>Meaning:</i> \"Sheshbatstsar\", Zerubbabel's Persian name.<br/><i>Usage:</i> Sheshbazzar.<br/><i>Source:</i> of foreign derivation;"}
|
json
|
5 take away (A)the wicked from the presence of the king, and his (B)throne will be established in righteousness.
28 (A)Steadfast love and faithfulness preserve the king, and by steadfast love his (B)throne is upheld.
14 If a king (A)faithfully judges the poor, his throne will (B)be established forever.
The Holy Bible, English Standard Version. ESV® Text Edition: 2016. Copyright © 2001 by Crossway Bibles, a publishing ministry of Good News Publishers.
|
english
|
AEW has seemingly leveled up since NXT moved to Tuesdays as Tony Khan and co. have consistently breached the one million mark in TV viewership and ratings.
All Elite Wrestling has caught the attention of the masses, and there are several stories to discuss in today's edition of the AEW rumor roundup.
A promising talent has revealed that she turned down a big WWE contract following a tryout. Elsewhere, a few AEW Dark regulars recently appeared at a WWE Tryout.
There is massive speculation regarding there being legitimate heat between Cody Rhodes and other top AEW executives.
Former WWE superstar Big Cass also confirmed rumors about his relationship with an AEW personality. The roundup ends with Chris Jericho talking about Samoa Joe's possible AEW signing.
Let's take a look at the stories in detail:
Jade Cargill might be new to the wrestling business, but the fitness model has shown enough signs of being a future star in the making.
Cargill appeared on the "Wrestling With the Week" podcast, and the AEW star opened up about how close she was to signing with WWE.
Mark Henry set Jade Cargill up for a WWE tryout, and she impressed WWE officials, resulting in a contract offer.
Dave Meltzer first reported back in November that WWE had passed on signing Cargill in the past. Meltzer said that Jade Cargill attended a WWE tryout in 2019 but was not given a deal.
Cargill's latest revelation confirms only half of Meltzer's report, as the AEW star turned down the opportunity to go to Vince McMahon's company.
Cargill eventually found her way into the AEW ranks, and she is admittedly having a great time.
"I came in maybe around the Attitude Era. I came from more of a football background. My mother and father loved football, and I was the one my brother and I loved Wrestling growing up. Got away from it, and then the opportunity came up with Mark Henry. He set me up with a (WWE) tryout. It went well; I was asked to come, turned it down, and here I am in AEW. And I'm enjoying it," said Cargill.
Jade Cargill is earmarked to be one of the top names in AEW in the time to come, and her development will coincide with the growth of the company's women's division.
On a related note, a few AEW Dark regulars and other indie talents recently attended a WWE Tryout for female wrestlers on May 6th and 7th, respectively. Fightful Select revealed that Tesha Price, Alex Gracia, Ava Everett, and Natalia Markova were amongst the dozen participants at the tryout.
#4 Legitimate backstage heat between Cody Rhodes and The Elite in AEW?
Cody Rhodes' recent absence from Being The Elite has given rise to speculation about the former WWE star's relationship with other AEW executives.
Brian Last revealed on Jim Cornette's podcast that angry messages might have been exchanged between Cody Rhodes and other Elite members, including the Young Bucks and Kenny Omega.
Rhodes being away from BTE could be due to his reported backstage beef with The Elite. The former TNT Champion has been in a feud with QT Marshall, and the mid-card angle could be a way to keep the American Nightmare away from the main event picture.
Omega and the Bucks are dominating the main event picture of AEW, but is there any truth to the rumors of behind-the-scenes unrest?
Sean Ross Sapp addressed the speculation during the recent Q&A session on Fighful Select. While SRS has heard the rumors, he has not received any confirmation from a talent or executive in AEW.
Here's what Sean Ross Sapp had to say:
"I've heard the rumors. I haven't heard that from any talents. I haven't heard that from any executives, but I've heard it's worth me asking about. It is not something that wrestlers are talking about, and it's not been something I've asked about a tonne," SRS said. (H/t WrestleTalk)
Cody is embroiled in a feud with Marshall and The Factory, and we should know more about the circulating rumors in the weeks to follow.
The partnership between AEW and IMPACT Wrestling has gone along fine thus far, but it could get even better.
W. Morrissey, fka Big Cass, has endured a challenging spell of late due to alcoholism and depression, but he looks more than ready to restart his pro wrestling career.
The former WWE star recently debuted for IMPACT Wrestling, and while his pro wrestling fortunes are improving with each passing day, there is also a positive development in his personal life.
Morrissey is currently in a relationship with AEW personality Lexy Nair, the daughter of Diamond Dallas Page. For those of you who don't know, Big Cass got his life back on track with the help of DDP Yoga, and he met Lexy Nair while he was a part of the highly successful DDPY program.
Here's what Morrissey had to say about his relationship during a recent interview with Chris Van Vliet:
Lexy Nair has been involved in several backstage interviews in AEW, and she confirmed the news of her relationship by posting an adorable Instagram post.
Morrissey has another chance to prove his worth in the wrestling business, and he also has some lady luck on his side.
There have been conflicting reports circulating regarding Tessa Blanchard's status, as rumors suggested that she and her husband Daga were close to signing with AEW.
However, that is far from the truth. Mike Johnson of PWInsider reported that Tessa Blanchard is currently not scheduled to make an AEW debut. It was added that the former IMPACT Wrestling World Champion hasn't even had any discussions about joining Tony Khan's promotion.
AEW has also not offered any contracts to Blanchard and Daga, and the report was backed by Sean Ross Sapp of Fightful Select, who said that the idea of getting Tessa Blanchard into AEW 'was currently a firm no. '
It should also be noted that Tessa Blanchard is not involved with the mysterious 'Diamond Mine' act in NXT.
As things stand, Tessa Blanchard is nowhere close to signing with either WWE or AEW.
Dave Meltzer clarified his earlier report in the latest Wrestling Observer Newsletter and added that Tess Blanchard's controversial past had stopped AEW from pursuing the highly-rated star.
Tessa Blanchard is widely considered one of the best female wrestlers globally. The speculation about her wrestling status will continue to be a trending topic until Blanchard decides to put pen to paper and commit her future to a company.
The rumors and speculation regarding Samoa Joe's possible AEW debut just don't seem to die down.
Several fans and pundits are still shocked over WWE's decision to release Samoa Joe as the former WWE US Champion is one of the most complete performers in the business.
It didn't take time for the 'Samoa Joe to AEW' rumors to kick off, and many All Elite personalities have since commented on the potential signing.
During a recent interview with the New York Post, Chris Jericho revealed that he would love to see Samoa Joe in AEW. The Demo God stated that he'd never wrestled Samoa Joe in a proper pay-per-view match. Jericho said the clash has all the potential to be a show-stealer at a major PPV.
Jericho felt that the possibilities for Joe in AEW were endless, and he would love to see the former WWE star in an AEW ring somewhere down the line.
"Obviously, the one name that stands out as an established main-event heavyweight champion guy is Samoa Joe. Those guys have three months before they can go anywhere. But I'd love to see Joe in an AEW ring at some point. That's another dream match if you want to go there. I've never (wrestled him). I think we had one little, three-minute sh*tty little match on Raw, and it was just kind of thrown away. And I didn't want to do it because I said this is a pay-per-view match, but that's the WWE style. I think Joe and Jericho, Joe and Omega, Joe with Cody, Joe with put name here is a money match," said Jericho.
Samoa Joe will be eligible to sign up with another company after July, and AEW seems like the ideal destination for the 42-year-old star.
|
english
|
{"name":"<NAME> an der Konrad-Mayer-Straße","id":"BY-4614","address":"Konrad-Mayer-Straße 2 92237 Sulzbach-Rosenberg","school_type":"Grundschule","fax":"09661 53511","phone":"09661 4524","website":null,"state":"BY","programs":{"programs":[]},"full_time_school":false,"lon":11.747226,"lat":49.500054}
|
json
|
At WWDC 2013 today, Apple CEO Tim Cook announced that the company now hosts over 575 million accounts on its App Store, with more than 900,000 apps available to customers. Furthermore, the company revealed it has paid out over $10 billion to third-party developers, half of that in the last year alone.
Of the 900,000 apps, 375,000 are optimized for the iPad. The larger majority of these apps are at the very least being tried out by Apple users: Cook says 93 percent of them are downloaded each month.
For the sake of comparison, at last year’s WWDC, Apple said it had over 400 million accounts and 650,000 apps available in more than 120 countries. At the start of 2013, there were over 800,000 apps available.
The company may see 1 million apps in its store before the end of the year, but if not, it will definitely pass the milestone in 2014. Before that happens though, its biggest mobile competitor is likely to see more apps appear in Google Play first.
Last month, Apple passed 50 billion App Store downloads (compared to Google Play’s 48 billion), adding 10 billion downloads in just over four months. Cook reiterated this number again today, emphasizing it was achieved in just five years.
As for the money paid out to developers, the $10 billion milestone isn’t a huge surprise. After all, Apple revealed it had passed the $7 billion mark in January and the $8 billion mark in February. As such, the $10 billion mark likely came much sooner than June, but Apple likely saved it to for WWDC. After all, this is an event centered around developers.
Get the most important tech news in your inbox each week.
|
english
|
essentially, back in the 70s some people started to realize that we would be dealing with a nuclear hangover for the next hundreds of thousands of years. and so they began to ask, "how will we discourage people from digging up the waste, say 10k years from now?"
over the past 50 years, lots of potential solutions or warning markers have been floated. in the 90s carl sagan suggested a skull & crossbones, and a landscape architect proposed a landscape of massive granite thorns to cover the WIPP site outside of Carlsbad.
languages have half-lives, too, so it would be futile to write out a sign. storyboard style warning narratives are also difficult because meaning is inverted depending on language or conditioning to read left to right or right to left.
so, back in the 80's when Yucca Mountain was proposed as a nuclear & radioactive waste isolation site (coming before WIPP), two philosophers (Françoise Bastide and Paolo Fabbri) came up with what would be the "Ray Cat Solution"
it proposes that we would engineer cats that change color in response to radiation, and that we would create a culture where if your cat changes color, you should move some place else and never return to where the cat changed color.
lyrics from “10,000-Year Earworm to Discourage Settlement Near Nuclear Waste Repositories”:
"Don’t change color, kitty.
Keep your color, kitty.
Stay that midnight black.
can kill, and that’s a fact."
"Don’t change color, kitty.
Keep your color, kitty.
Stay that midnight black.
can kill, and that’s a fact."
the point is not that the song would exist for 10k years, or that the language would be audibly legible for even half that amount of time. the point is that the cats and the danger their color change implies would outlast the song, becoming legend and lesson.
I recommend appendixes F & G for deterrent marker and sign proposals.
I recommend appendixes F & G for deterrent marker and sign proposals.
my understanding is that as of now, though WIPP is not really the solution for "long-term storage" of nuclear waste that it was billed to be, the waste in there now will be marked by a large berm, granite monuments, & buried libraries (in the 6 UN languages, plus Navajo)
|
english
|
Degrees awarded climbed 2.8 percent last year, likely easing some worries that the nation is losing its technological edge.
U.S. universities awarded 25,258 science and engineering doctorates from July 1, 2002, to June 30, 2003, according to data published this month by the National Science Foundation. That's a 2.8 percent rise from the 24,571 doctorates awarded the previous year, reversing a downward trend that began after a 1998 peak of 27,278.
Production of science and engineering doctorates in the United States is seen by some as vital to the country's technological leadership, given the way fundamental research can translate into new products and even industries.
The post-Internet-bubble drop in new doctorates has caused concern, as has the degree to which research projects these days are seen as too safe or less likely to lead to dramatic breakthroughs.
A more recent worry centers on a decline in enrollment of international graduate students in the United States. Foreigners historically have earned a large percentage of technology-related doctorates. According to NSF data, foreign students with temporary visas comprised 55 percent of the 5,265 engineering Ph.D.s last year.
Not everyone thinks the number of Ph.D.s awarded is critical to the country's global competitiveness. Some observers argue that the country already has plenty of doctorates and that a drop in foreign students isn't cause for alarm.
"It's not clear to me that just looking at production of Ph.D.s is a good way of assessing innovation," Ron Hira, a public-policy professor at the Rochester Institute of Technology, said in an August interview with CNET News.com.
Moreover, some view the currently large proportion of foreigners in U.S. graduate programs as a source of trouble--such as fewer openings for Americans. "(Universities) have preferred foreign students over American students," said John Miano, founder of The Programmers Guild activist group.
The number of doctorates awarded from U.S. universities in all fields increased 1.9 percent last year, to 40,710, according to NSF.
|
english
|
Begin typing your search above and press return to search.
Monika makes a quick run down the left flank and bursts into the D. But Singapore steals the ball and gets into the attack. India 7-0 Singapore.
|
english
|
{
"name": "workbox-precaching",
"version": "5.1.3",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"workbox-core": {
"version": "5.1.3",
"resolved": "https://registry.npmjs.org/workbox-core/-/workbox-core-5.1.3.tgz",
"integrity": "<KEY>
}
}
}
|
json
|
Connect PSN account to Discord and show the games you’re playing on your Discord profile.
Connect PSN account to Discord and show the games you’re playing on your Discord profile.
People want their Discord kittens!
Check what’s wrong with Discord.
Having trouble opening the app?
Time to say goodbye to Discord listening parties.
Learn how to fix Discord voice connection errors easily.
Learn how to set up roles for your Discord servers.
|
english
|
{
"templmd5": "523d4615240572e66d3c9373d01f37cd",
"number": "1009",
"title": "Assistenza Scolastica Online dei Volontari del Servizio Civile #SanMarzano #Taranto",
"BACKCOLOR": "black",
"FRONTCOLOR": "white",
"filemd5": "5104851200e109c1b30bab8d77c4b667"
}
|
json
|
---
layout: post
title: "Capernaum"
description: "Capernaüm (Chaos) tells the story of Zain (<NAME>-Rafeea), a Lebanese boy who sues his parents for the crime of giving him life. The film follows Zain as he journeys from gutsy, streetwise child to hardened 12-year-old adult fleeing his negligent parents, surviving through his wits on the streets, where he meets Ethiopian migrant worker Rahil, who provides him with shelter and food, as Zain takes care of her baby son Yonas in return. Zain later gets jailed for committing a violent crime, and finally se.."
img: 8267604.jpg
kind: movie
genres: [Drama]
tags: Drama
language: Arabic
year: 2018
imdb_rating: 8.4
votes: 52056
imdb_id: 8267604
netflix_id: 81002571
color: ee6c4d
---
Director: `<NAME>`
Cast: `<NAME>` `<NAME>` `Boluwatife Treasure Bankole` `<NAME>` `<NAME>`
With his family grappling with extreme poverty, forever indebted to their ruthless landlord, the sad twelve-year-old boy, Zain, is forced to fend for himself in the squalid and overcrowded slums of Beirut. Unable to save his eleven-year-old sister, Sahar, from an uneasy arrangement, Zain will soon find himself all alone in a faceless city, ending up at a small amusement park to befriend another lost soul: the Ethiopian cleaner and mother of one, Rahil. But, in this grim and hostile world, there is no room for dreamers--and as a horrifying discovery is the last straw--a rabid desire for retribution possesses Zain and his blood-thirsty knife demands justice. Who is to blame when love becomes hate, and life turns into an unendurable torment?::<NAME>
|
markdown
|
<reponame>33kk/uso-archive
/* ==UserStyle==
@name ithome去广告
@namespace USO Archive
@author zhou1992
@description `ithome去广告v0.0.1`
@version 20140411.15.7
@license NO-REDISTRIBUTION
@preprocessor uso
==/UserStyle== */
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document domain("www.ithome.com") {
.bx-recom2 {
display:none;
}
.bx-recom {
display:none;
}
}
|
css
|
{
"name": "ncmake",
"version": "1.0.2",
"description": "CMake utility for native nodejs compiler",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"install": "./install.sh",
"docs": "mkdir -p ./docs/ && documentation build src/index.js -f md -o ./docs/reference.md",
"build": "babel src --out-dir lib --copy-files",
"watch": "babel src --watch --out-dir lib --copy-files"
},
"publishConfig": {
"registry": "https://registry.npmjs.org/"
},
"repository": {
"type": "git",
"url": "git+https://github.com/rubeniskov/ncmake.git",
"url_commit": "git+https://github.com/rubeniskov/ncmake/commit",
"url_tag": "git+https://github.com/rubeniskov/ncmake/releases/tag"
},
"author": {
"name": "<NAME>",
"email": "<EMAIL>",
"url": "https://twitter.com/Rubeniskov"
},
"licenses": [
{
"type": "MIT",
"url": "https://github.com/rubeniskov/ncmake/blob/master/LICENSE.md"
}
],
"babel": {
"presets": [
"es2015",
"stage-0"
],
"plugins": [
"transform-class-constructor-call",
[
"transform-runtime",
{
"polyfill": true,
"regenerator": true,
"helpers": true
}
]
]
},
"bugs": {
"url": "https://github.com/rubeniskov/ncmake/issues"
},
"homepage": "http://rubeniskov.com/projects/ncmake",
"devDependencies": {},
"dependencies": {
"resolve": "^1.4.0",
"yargs": "^8.0.2"
},
"devDependencies": {
"babel-cli": "^6.26.0",
"babel-core": "^6.26.0",
"babel-plugin-transform-class-constructor-call": "^6.24.1",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-stage-0": "^6.24.1",
"documentation": "^5.2.1"
}
}
|
json
|
{
"de": {
"adv-fields": [
"Name",
"ID",
"Typ",
"Aktion",
"Parent",
"Children",
"Hinzugefügt in der Version"
],
"adv-help": "Dieser Befehl gibt dir die Möglichkeit Informationen über jede Minecraft Errungenschaft zu erhalten. Gib dafür einfach `%{p}mc advancement <name>` ein.",
"block-fields": [
"ID",
"Stack größe",
"Creative mod tab",
"Schadenspunkte",
"Haltbarkeit",
"Werkzeuge zum abbauen",
"Mobs, welche dieses Item einsammeln können",
"Hinzugefügt in der Version"
],
"block-help": "Dieser Befehl gibt dir die Möglichkeit Informationen über jeden Minecraft Block zu erhalten. Gib dafür einfach `%{p}mc block <name>` ein",
"cant-embed": "Embed konnte nicht gefunden werden. Bitte stelle sicher, dass ich die \"Embed links\" Berechtigung habe.",
"cmd-fields": [
"Name",
"Syntax",
"Beispiel",
"Hinzugefügt in der Version"
],
"cmd-help": "Dieser Befehl gibt dir die Möglichkeit Informationen über jeden Minecraft Befehl zu erhalten. Gib dafür einfach `%{p}mc command <name>` ein.",
"contact-mail": "Wenn dir irgendein Fehler oder etwas falsches auffällt wende dich bitte an uns oder melde es direkt [auf der Seite](https://fr-minecraft.net).",
"dimensions": "Weite: %{la}\nLänge: %{lo}\nHöhe: %{ha}",
"entity-fields": [
"ID",
"Typ",
"Lebenspunkte",
"Angriffspunkte",
"Todes XP",
"Bevorzugte Biome",
"Hinzugefügt in der Version"
],
"entity-help": "Dieser Befehl gibt dir die Möglichkeit Informationen über jedes Minecraft Entity zu erhalten. Gib dafür einfach `%{p}mc entity <name>` ein.",
"item-fields": [
"ID",
"Size of a stack",
"Kreativmodus Tab",
"Schadenspunkte",
"Haltbarkeit",
"Werkzeuge zum abbauen",
"Mobs, die dieses Item droppen könnten",
"Hinzugefügt in der Version"
],
"item-help": "Dieser Befehl gibt dir die Möglichkeit Informationen über jedes Minecraft Item zu erhalten. Gib dafür einfach `%{p}mc item <name>` ein",
"mojang_desc": {
"account.mojang.com": "Mojang Account Management Seite",
"api.mojang.com": "API-Service von Mojang",
"authserver.mojang.com": "Authentication server",
"minecraft.net": "Offizielle Seite",
"mojang.com": "Offizielle Webseite",
"session.minecraft.net": "Mehrspieler Sitzung (veraltet)",
"sessionserver.mojang.com": "Authentifizierungsserver",
"textures.minecraft.net": "Texture Server (skin & capes)"
},
"names": [
"Block",
"Entity",
"Item",
"Befehl",
"Errungenschaft"
],
"no-adv": "Errungenschaft konnte nicht gefunden werden",
"no-api": "Error: Keine Verbindung zur API möglich",
"no-block": "Block konnte nicht gefunden werden",
"no-cmd": "Befehl konnte nicht gefunden werden",
"no-entity": "Entity konnte nicht gefunden werden",
"no-item": "Item konnte nicht gefunden werden",
"no-ping": "Error: Es ist nicht möglich diesen Server zu erreichen",
"serv-0": "Anzahl Spieler",
"serv-1": "Liste der ersten 20 verbundenen Spieler",
"serv-2": "Liste aller Spieler, die online sind",
"serv-3": "Verzögerung",
"serv-error": "Oops, ein unbekannnter Fehler ist aufgetaucht. Bitte versuche es nocheinmal :confused:",
"serv-title": "Server Information %{ip}",
"success-add": "Eine Nachricht mit allen Serverdetails %{ip} durde zu dem Kanal %{channel}!"
}
}
|
json
|
{
"id": 24732,
"name": "Hallowed ring",
"incomplete": true,
"members": false,
"tradeable": false,
"tradeable_on_ge": false,
"stackable": false,
"stacked": null,
"noted": false,
"noteable": false,
"linked_id_item": 24731,
"linked_id_noted": null,
"linked_id_placeholder": null,
"placeholder": true,
"equipable": false,
"equipable_by_player": false,
"equipable_weapon": false,
"cost": 1,
"lowalch": null,
"highalch": null,
"weight": 0.004,
"buy_limit": null,
"quest_item": false,
"release_date": "2020-06-04",
"duplicate": true,
"examine": "A ring which prevents damage from traps in the Hallowed Sepulchre.",
"icon": "<KEY>
"wiki_name": "Hallowed ring",
"wiki_url": "https://oldschool.runescape.wiki/w/Hallowed_ring",
"wiki_exchange": null,
"equipment": null,
"weapon": null
}
|
json
|
package CollectionFram_WOrk;
import java.util.Hashtable;
public class HashTableDemoo
{
public static void main(String[] args) {
Hashtable<Integer, String> ht = new Hashtable<Integer, String>();
ht.put(1, null);
}
}
|
java
|
<reponame>steuwe/coco-analyze<gh_stars>0
## imports
import os, sys, time, json
import numpy as np
from colour import Color
import matplotlib.pyplot as plt
import matplotlib.path as mplPath
from matplotlib.collections import PatchCollection
from matplotlib.patches import Polygon
from skimage.transform import resize as imresize
import skimage.io as io
"""
Utility functions
"""
num_kpts = 20
oks = [0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95]
sqrt_neg_log_oks = np.sqrt(-2*np.log(oks))
sigmas = np.array([.028, .028, .07, .07,.07,.07, .07, .084,.07, .07, .07, .07, .052, .052, .052, .052, .042, .042, .042, .042])
#sigmas = np.array([.04, .04, .1, .1, .1, .1, .1, .12, .1, .1, .1, .1, .075, .075, .075, .075, .06, .06, .06, .06])
#sigmas = np.array([.028, .028, .07, .07,.07,.07, .07, .084,.07, .07, .07, .07, .052, .052, .052, .052, .042, .042, .042, .042])*2
variances = (sigmas * 2)**2
skeleton = [[0, 3], [1, 3], [3, 2], [0, 1], [5, 0], [6, 1], [2, 4], [4, 7], [7, 10], [7, 11], [8, 12], [9, 13], [12, 16], [13, 17], [10, 14], [11, 15], [14, 18], [15,19]]
colors = {(0,3): '#cd87ff', (1,3): '#cd87ff', (3,2): '#cd87ff', (0,1): '#cd87ff', (5,0): '#cd87ff',
(6,1): '#74c8f9', (2,4): '#74c8f9', (4,7): '#feff95', (7,10): '#74c8f9', (7,11): '#feff95',
(8,12): '#74c8f9', (9,13): '#feff95',(12,16): '#74c8f9', (13,17): '#74c8f9',(10,14): '#feff95',
(11,15): '#a2805b',(14,18): '#a2805b',(15,19): '#a2805b'}
def show_dets(coco_dts, coco_gts, img_info, save_path=None):
if len(coco_dts) == 0 and len(coco_gts)==0:
return 0
I = io.imread(img_info['coco_url'])
plt.figure(figsize=(10,10)); plt.axis('off')
plt.imshow(I)
ax = plt.gca(); ax.set_autoscale_on(False)
polygons = []; color = []
for ann in coco_gts:
c = (np.random.random((1, 3))*0.6+0.4).tolist()[0]
if 'keypoints' in ann and type(ann['keypoints']) == list:
# turn skeleton into zero-based index
sks = np.array(skeleton)
kp = np.array(ann['keypoints'])
x = kp[0::3]; y = kp[1::3]; v = kp[2::3]
for sk in sks:
if np.all(v[sk]>0):
plt.plot(x[sk],y[sk], linewidth=3, color='green')
plt.plot(x[v>0], y[v>0],'o',markersize=2, markerfacecolor='green',
markeredgecolor='k',markeredgewidth=3)
plt.plot(x[v>1], y[v>1],'o',markersize=2, markerfacecolor='green',
markeredgecolor='green', markeredgewidth=2)
for x1, y1, sigma1 in zip(x[v>0], y[v>0], sigmas[v>0]):
r = sigma1 * (np.sqrt(ann["area"])+np.spacing(1))
circle = plt.Circle((x1,y1), sqrt_neg_log_oks[0]*r, fc=(1,0,0,0.4),ec='k')
ax.add_patch(circle)
for a1 in sqrt_neg_log_oks[1:]:
circle = plt.Circle((x1,y1), a1*r, fc=(0,0,0,0),ec='k')
ax.add_patch(circle)
if len(coco_dts)==0 and len(coco_gts)==1:
bbox = ann['bbox']
rect = plt.Rectangle((bbox[0],bbox[1]),bbox[2],bbox[3],fill=False,edgecolor=[1, .6, 0],linewidth=3)
ax.add_patch(rect)
title = "[%d][%d][%d]"%(coco_gts[0]['image_id'],coco_gts[0]['id'],coco_gts[0]['num_keypoints'])
plt.title(title,fontsize=20)
for ann in coco_dts:
c = (np.random.random((1, 3))*0.6+0.4).tolist()[0]
sks = np.array(skeleton)
kp = np.array(ann['keypoints'])
x = kp[0::3]; y = kp[1::3]; v = kp[2::3]
for sk in sks:
plt.plot(x[sk],y[sk], linewidth=3, color=colors[sk[0],sk[1]])
for kk in range(20):
if kk in [0,5,8,10,12,14,16,18]:
plt.plot(x[kk], y[kk],'o',markersize=5, markerfacecolor='r',
markeredgecolor='r', markeredgewidth=3)
elif kk in [1,6,9,11,13,15,17,19]:
plt.plot(x[kk], y[kk],'o',markersize=5, markerfacecolor='g',
markeredgecolor='g', markeredgewidth=3)
else:
plt.plot(x[kk], y[kk],'o',markersize=5, markerfacecolor='b',
markeredgecolor='b', markeredgewidth=3)
bbox = ann['bbox']; score = ann['score']
rect = plt.Rectangle((bbox[0],bbox[1]),bbox[2],bbox[3],fill=False,edgecolor=[1, .6, 0],linewidth=3)
if len(coco_dts)==1:
if len(coco_gts)==0:
title = "[%d][%d][%.3f]"%(coco_dts[0]['image_id'],coco_dts[0]['id'],coco_dts[0]['score'])
plt.title(title,fontsize=20)
if len(coco_gts)==1:
oks = compute_kpts_oks(coco_dts[0]['keypoints'], coco_gts[0]['keypoints'],coco_gts[0]['area'])
title = "[%.3f][%.3f][%d][%d][%d]"%(score,oks,coco_gts[0]['image_id'],coco_gts[0]['id'],coco_dts[0]['id'])
plt.title(title,fontsize=20)
else:
ax.annotate("[%.3f][%.3f]"%(score,0), (bbox[0]+bbox[2]/2.0, bbox[1]-5),
color=[1, .6, 0], weight='bold', fontsize=12, ha='center', va='center')
ax.add_patch(rect)
p = PatchCollection(polygons, facecolor=color, linewidths=0, alpha=0.4)
ax.add_collection(p)
p = PatchCollection(polygons, facecolor="none", edgecolors=color, linewidths=2)
ax.add_collection(p)
if save_path:
plt.savefig(save_path,bbox_inches='tight',dpi=50)
else:
plt.show()
plt.close()
def compute_kpts_oks(dt_kpts, gt_kpts, area):
# this function only works for computing oks with keypoints
g = np.array(gt_kpts); xg = g[0::3]; yg = g[1::3]; vg = g[2::3]
assert( np.count_nonzero(vg > 0) > 0)
d = np.array(dt_kpts); xd = d[0::3]; yd = d[1::3]
dx = xd - xg; dy = yd - yg
e = (dx**2 + dy**2) / variances / (area+np.spacing(1)) / 2
e=e[vg > 0]
return np.sum(np.exp(-e)) / e.shape[0]
def compute_oks(dts, gts):
if len(dts) * len(gts) == 0:
return np.array([])
oks_mat = np.zeros((len(dts), len(gts)))
# compute oks between each detection and ground truth object
for j, gt in enumerate(gts):
# create bounds for ignore regions(double the gt bbox)
g = np.array(gt['keypoints'])
xg = g[0::3]; yg = g[1::3]; vg = g[2::3]
k1 = np.count_nonzero(vg > 0)
bb = gt['bbox']
x0 = bb[0] - bb[2]; x1 = bb[0] + bb[2] * 2
y0 = bb[1] - bb[3]; y1 = bb[1] + bb[3] * 2
for i, dt in enumerate(dts):
d = np.array(dt['keypoints'])
xd = d[0::3]; yd = d[1::3]
if k1>0:
# measure the per-keypoint distance if keypoints visible
dx = xd - xg
dy = yd - yg
else:
# measure minimum distance to keypoints in (x0,y0) & (x1,y1)
z = np.zeros((len(sigmas)))
dx = np.max((z, x0-xd),axis=0)+np.max((z, xd-x1),axis=0)
dy = np.max((z, y0-yd),axis=0)+np.max((z, yd-y1),axis=0)
e = (dx**2 + dy**2) / variances / (gt['area']+np.spacing(1)) / 2
if k1 > 0:
e=e[vg > 0]
oks_mat[i, j] = np.sum(np.exp(-e)) / e.shape[0]
return oks_mat
def compute_iou(bbox_1, bbox_2):
x1_l = bbox_1[0]
x1_r = bbox_1[0] + bbox_1[2]
y1_t = bbox_1[1]
y1_b = bbox_1[1] + bbox_1[3]
w1 = bbox_1[2]
h1 = bbox_1[3]
x2_l = bbox_2[0]
x2_r = bbox_2[0] + bbox_2[2]
y2_t = bbox_2[1]
y2_b = bbox_2[1] + bbox_2[3]
w2 = bbox_2[2]
h2 = bbox_2[3]
xi_l = max(x1_l, x2_l)
xi_r = min(x1_r, x2_r)
yi_t = max(y1_t, y2_t)
yi_b = min(y1_b, y2_b)
width = max(0, xi_r - xi_l)
height = max(0, yi_b - yi_t)
a1 = w1 * h1
a2 = w2 * h2
if float(a1 + a2 - (width * height)) == 0:
return 0
else:
iou = (width * height) / float(a1 + a2 - (width * height))
return iou
def compute_ious(anns):
num_boxes = len(anns)
ious = np.zeros((num_boxes, num_boxes))
for i in range(num_boxes):
for j in range(i,num_boxes):
ious[i,j] = compute_iou(anns[i]['bbox'],anns[j]['bbox'])
if i!=j:
ious[j,i] = ious[i,j]
return ious
|
python
|
const joi = require('joi')
// Define config schema
const schema = joi.object({
serviceName: joi.string().default('Calculate my progressive reductions'),
port: joi.number().default(3000),
env: joi.string().valid('development', 'test', 'production').default('development'),
staticCacheTimeoutMillis: joi.number().default(7 * 24 * 60 * 60 * 1000),
googleTagManagerKey: joi.string().default('<KEY>'),
cookieOptions: joi.object({
ttl: joi.number().default(1000 * 60 * 60 * 24 * 365),
isSameSite: joi.string().valid('Lax').default('Lax'),
encoding: joi.string().valid('base64json').default('base64json'),
isSecure: joi.bool().default(true),
isHttpOnly: joi.bool().default(true),
clearInvalid: joi.bool().default(false),
strictHeader: joi.bool().default(true)
})
})
// Build config
const config = {
serviceName: process.env.SERVICE_NAME,
port: process.env.PORT,
env: process.env.NODE_ENV,
staticCacheTimeoutMillis: process.env.STATIC_CACHE_TIMEOUT_IN_MILLIS,
googleTagManagerKey: process.env.GOOGLE_TAG_MANAGER_KEY,
cookieOptions: {
ttl: process.env.COOKIE_TTL_IN_MILLIS,
isSameSite: 'Lax',
encoding: 'base64json',
isSecure: process.env.NODE_ENV === 'production',
isHttpOnly: true,
clearInvalid: false,
strictHeader: true
}
}
// Validate config
const result = schema.validate(config, {
abortEarly: false
})
// Throw if config is invalid
if (result.error) {
throw new Error(`The server config is invalid. ${result.error.message}`)
}
// Use the joi validated value
const value = result.value
value.isDev = (value.env === 'development' || value.env === 'test')
module.exports = value
|
javascript
|
<filename>cards/pt/dt/378.json
{"card_title":"Tubarão-Æmbar","card_type":"Creature","card_text":"Play: Give Æmberfin Shark three +1 power counters.\r\nAt the end of your turn, remove a +1 power counter from Æmberfin Shark. If you do, each player gains 1A.","traits":"Beast","amber":0,"power":"3","armor":null,"rarity":"Rare","flavor_text":null,"card_number":"378","expansion":496,"is_maverick":false,"is_anomaly":false,"is_enhanced":false,"is_non_deck":false,"houses":[{"id":"5534b986-0202-466f-bb12-d46f4a9bb793","house":"Untamed","normal":"https://cdn.keyforgegame.com/media/card_front/pt/496_378_PQ4M889XG43W_pt.png","zoom":"https://cards-keyforge.s3.eu-north-1.amazonaws.com/media/pt/dt/Untamed-378.png"}],"rules":[]}
|
json
|
<reponame>banalna/docsearch-configs
{
"index_name": "getambassador",
"start_urls": [
"https://www.getambassador.io/docs/argo/latest/",
"https://www.getambassador.io/docs/cloud/latest/",
"https://www.getambassador.io/docs/edge-stack/latest/",
"https://www.getambassador.io/docs/telepresence/latest/"
],
"stop_urls": [
"https://www.getambassador.io/docs/edge-stack/pre-release/",
"https://www.getambassador.io/docs/edge-stack/1.*",
"https://www.getambassador.io/docs/telepresence/pre-release/",
"https://www.getambassador.io/docs/telepresence/2.*"
],
"selectors": {
"lvl0": {
"selector": "(//*[contains(@class,'Sidebar')][1]//a[contains(//aside/a/@href,@href)])[2]/preceding::button[1]/span[1]",
"type": "xpath",
"global": true,
"default_value": "Documentation"
},
"lvl1": "main h1",
"lvl2": "main h2",
"lvl3": "main h3",
"lvl4": "main h4",
"lvl5": "main h5",
"text": "main p, main li"
},
"conversation_id": [
"685947392"
],
"nb_hits": 8589
}
|
json
|
{
"word": "A",
"definitions": [
"The first letter of the alphabet.",
"Denoting the first in a set of items, categories, sizes, etc.",
"Denoting the first of two or more hypothetical people or things.",
"The highest class of academic mark.",
"(in the UK) denoting the most important category of road, other than a motorway.",
"Denoting the highest-earning socio-economic category for marketing purposes, including top management and senior professional personnel.",
"Denoting the first file from the left, as viewed from White's side of the board.",
"The first constant to appear in an algebraic expression.",
"Denoting the uppermost soil horizon, especially the topsoil.",
"The human blood type (in the ABO system) containing the A antigen and lacking the B.",
"(with numeral) denoting a series of international standard paper sizes each twice the area of the next, as A0, A1, A2, A3, A4, etc., A4 being 210 \u00d7 297 mm.",
"A shape like that of a capital A.",
"The sixth note of the diatonic scale of C major. The A above middle C is usually used as the basis for tuning and in modern music has a standard frequency of 440 Hz.",
"A key based on a scale with A as its keynote."
],
"parts-of-speech": "Noun"
}
|
json
|
<filename>data/glosses/uhl/v0.1/content/2140.json
{"brief":"Zakkai","long":"<i>Meaning:</i> \"Zakkai\", an Israelite.<br/><i>Usage:</i> Zaccai.<br/><i>Source:</i> from \"H2141\"; pure;"}
|
json
|
<filename>testes/teste_pontos.py
import unittest
def remove_pontos(palavra):
resultado = palavra.split('.')
return "".join(resultado)
def adiciona_pontos(palavra):
resultado = list(palavra)
return ".".join(resultado)
class RemovePontosTest(unittest.TestCase):
def test_com_pontos(self):
esperado = "teste"
resultado = remove_pontos("t.e.s.t.e")
self.assertEqual(esperado, resultado)
def test_com_outros_pontos(self):
esperado = "virginia"
resultado = remove_pontos("v.i.r.g.i.n.i.a")
self.assertEqual(esperado, resultado)
def test_sem_pontos(self):
esperado = "nana"
resultado = remove_pontos("nana")
self.assertEqual(esperado, resultado)
class AdicionaPontosTest(unittest.TestCase):
def test_com_pontos(self):
esperado = "t.e.s.t.e"
resultado = adiciona_pontos("teste")
self.assertEqual(esperado, resultado)
def test_com_outros_pontos(self):
esperado = "d.o.u.g.l.a.s"
resultado = adiciona_pontos("douglas")
self.assertEqual(esperado, resultado)
if __name__ == '__main__':
unittest.main()
|
python
|
This Slideon concept MP3 player has a simple premise: slider cellphones have grown in popularity, so why not make a slider MP3 player? This flash-based player tucks the buttons, of which there are only five, underneath the screen when not being used. The screen looks to be plenty large with an adorable, ghost-like character floating around the infinite blueness. One more hot pics inside.
I like the Slideon because of its minimalist design, to use a tired, empty phrase. It sort of reminds me of a Game Boy Advance SP. No, in fact, it completely reminds me of the SP.
|
english
|
Gautham Menon movie's new trailer is here!
Trance is recently released Malayalam which will now be dubbed an aired in Telugu on Aha OTT channel. The streaming platform had arranged a small interview with Gautham Menon who has acted in Trance; The director later released the Telugu trailer of Trance as well. Here is what the director had to talk about Trance and why he was a part of the project followed by the trailer,“I hope even Trance does well just the way Kanulu Kanulanu Dochayante (Telugu version of Kannum Kannum Kollaiyadithaal) performed. I won’t say I had a fun time; it was a huge learning experience for me working on this film with some masters at work I would say, the director Anwar Rasheed, cinematographer Amal Neerad and Fahad Fassil whom I am a big fan of. These three were this film completely, I mean they put together this film and I went on board only for these three, the team as such. Just watching them at work, watching Fahad getting ready for every shot and being in the same frame with him and speaking the language maybe I am not entirely comfortable with but with live sound and all that, it was very very interesting for me and a huge learning.
I don’t think about me as an actor, I don’t wake up in the morning to act in a film but when the offer came my way and because of the team I said yes. I any day prefer to be behind the camera not in front of the camera at all. I think the possibility is endless here. You need to carry out what somebody is given it to you on paper really well, you need to execute what they want from a performer, you need to see your lines, you to remember a lot of things, you need to remember continuity, it is not easy to be an actor. You need to be with no inhibitions about yourself, how your face is looking, what your body language is like all that stuff. So, it is not easy at all. I will probably do it again and again only if I like the crew and if I like the space, I want to be in.
இணையத்தை அசத்தும் மாஸ்டர் இயக்குனரின் வீடியோ !
தல அஜித்தின் திரைப்பயணம் குறித்து பதிவு செய்த வலிமை பிரபலம் !
திருமணம் குறித்த கேள்விக்கு பதிவால் பதிலளித்த யாஷிகா !
வைரலாகும் சாக்ஷி அகர்வாலின் ஒர்க்கவுட் வீடியோ !
அருண் விஜயின் சினம் படம் குறித்த முக்கிய தகவல் !
|
english
|
<gh_stars>10-100
{"type":"Feature","id":"way/457085025","properties":{"amenity":"marketplace","building":"retail","description":"Nyitva minden hónap első vasárnapján","name":"<NAME>","id":"way/457085025"},"geometry":{"type":"Point","coordinates":[19.3012833,47.1957701]}}
|
json
|
<reponame>Sophize/set_mm
{
"citations" : [ {
"textCitation" : "[See inundifss on Metamath](http://us.metamath.org/mpegif/inundifss.html)"
} ],
"names" : [ "inundifss" ],
"language" : "METAMATH_SET_MM",
"lookupTerms" : [ "#T_cA", "#T_cin", "#T_cB", "#T_cun", "#T_cA", "#T_cdif", "#T_cB", "#T_wss", "#T_cA" ],
"metaLanguage" : "METAMATH",
"remarks" : " The intersection and class difference of a class with another class are contained in the original class. In classical logic we'd be able to make a stronger statement: that everything in the original class is in the intersection or the difference (that is, this theorem would be equality rather than subset). (Contributed by <NAME>, 4-Aug-2018.) ",
"statement" : "inundifss $p |- ( ( A i^i B ) u. ( A \\ B ) ) C_ A $."
}
|
json
|
104 Praise the Lord, O my soul!
You are robed in splendor and majesty.
2 He covers himself with light as if it were a garment.
He stretches out the skies like a tent curtain,
He makes the clouds his chariot,
4 He makes the winds his messengers,
5 He established the earth on its foundations;
it will never be moved.
6 The watery deep covered it[f] like a garment;
7 Your shout made the waters retreat;
8 as the mountains rose up,
9 You set up a boundary for them that they could not cross,
they flow between the mountains.
11 They provide water for all the animals in the field;
the wild donkeys quench their thirst.
12 The birds of the sky live beside them;
14 He provides grass[o] for the cattle,
the cedars of Lebanon that he planted,
17 where the birds make nests,
the rock badgers find safety in the cliffs.
during which all the beasts of the forest prowl around.
21 The lions roar for prey,
and sleep[ac] in their dens.
23 People then go out to do their work,
the earth is full of the living things you have made.
living things both small and large.
26 The ships travel there,
and over here swims the whale[ai] you made to play in it.
28 You give food to them and they receive it;
When you take away their life’s breath,
they die and return to dust.
30 When you send your life-giving breath, they are created,
and you replenish the surface of the ground.
32 He looks down on the earth and it shakes;
he touches the mountains and they start to smolder.
33 I will sing to the Lord as long as I live;
34 May my thoughts[aq] be pleasing to him.
I will rejoice in the Lord.
35 May sinners disappear[ar] from the earth,
and the wicked vanish.
Praise the Lord, O my soul.
Praise the Lord.
- Psalm 104:1 sn Psalm 104. The psalmist praises God as the ruler of the world who sustains all life.
- Psalm 104:3 tn Heb “one who lays the beams on water [in] his upper rooms.” The “water” mentioned here corresponds to the “waters above” mentioned in Gen 1:7. For a discussion of the picture envisioned by the psalmist, see L. I. J. Stadelmann, The Hebrew Conception of the World, 44-45.
- Psalm 104:3 sn Verse 3 may depict the Lord riding a cherub, which is in turn propelled by the wind current. Another option is that the wind is personified as a cherub. See Ps 18:10 and the discussion of ancient Near Eastern parallels to the imagery in M. Weinfeld, “‘Rider of the Clouds’ and ‘Gatherer of the Clouds’,” JANESCU 5 (1973): 422-24.
- Psalm 104:4 tc Heb “and his attendants a flaming fire.” The lack of agreement between the singular “fire” and plural “attendants” has prompted various emendations. Some read “fire and flame.” The present translation assumes an emendation from מְשָׁרְתָיו (mesharetayv, “his attendants”) to מְשָׁרְתוֹ (meshareto, “his attendant”), a reading supported by one of the Dead Sea Scrolls, 4Q93.sn In Ugaritic mythology Yam’s messengers appear as flaming fire before the assembly of the gods. See G. R. Driver, Canaanite Myths and Legends, 42.
- Psalm 104:6 tc Heb “you covered it.” The masculine suffix is problematic if the grammatically feminine noun “earth” is the antecedent. For this reason some emend the form from כִּסִּיתוֹ (kissito) to a feminine verb with feminine suffix, כִּסַּתָּה (kissattah, “[the watery deep] covered it [i.e., the earth]”), a reading assumed by the present translation.
- Psalm 104:6 sn Verse 6 refers to the condition described in Gen 1:2 (note the use of the Hebrew term תְּהוֹם [tehom, “watery deep”] in both texts).
- Psalm 104:8 tn Heb “from your shout they fled, from the sound of your thunder they hurried off.”sn Verses 7-8 poetically depict Gen 1:9-10.
- Psalm 104:10 tn Heb “[the] one who sends springs into streams.” Another option is to translate, “he sends streams [i.e., streams that originate from springs] into the valleys” (cf. NIV).
- Psalm 104:13 tn Heb “from the fruit of your works the earth is full.” The translation assumes that “fruit” is literal here. If “fruit” is understood more abstractly as “product; result,” then one could translate, “the earth flourishes as a result of your deeds” (cf. NIV, NRSV, REB).
- Psalm 104:14 tn Heb “for the service of man” (see Gen 2:5).
- Psalm 104:15 tn Heb “to make [the] face shine from oil.” The Hebrew verb צָהַל (tsahal, “to shine”) occurs only here in the OT. It appears to be an alternate form of צָהַר (tsahar), a derivative from צָהָרִים (tsaharim, “noon”).
- Psalm 104:16 sn The trees of the Lord are the cedars of Lebanon (see the next line), which are viewed as special because of their great size and grandeur. The Lebanon forest was viewed elsewhere in the OT as the “garden of God” (see Ezek 31:8).
- Psalm 104:16 tn Heb “are satisfied,” which means here that they receive abundant rain (see v. 13).
- Psalm 104:17 tn Heb “[the] heron [in the] evergreens [is] its home.”sn The cedars and evergreens of the Lebanon forest are frequently associated (see, for example, 2 Chr 2:8; Isa 14:8; 37:24; Ezek 31:8).
- Psalm 104:19 tn Heb “he made [the] moon for appointed times.” The phrase “appointed times” probably refers to the months of the Hebrew lunar calendar.
- Psalm 104:21 sn The lions’ roaring is viewed as a request for food from God.
- Psalm 104:24 tn Heb “How many [are] your works, O Lord.” In this case the Lord’s “works” are the creatures he has made, as the preceding and following contexts make clear.
- Psalm 104:26 tn Heb “[and] this Leviathan, [which] you formed to play in it.” Elsewhere Leviathan is a multiheaded sea monster that symbolizes forces hostile to God (see Ps 74:14; Isa 27:1), but here it appears to be an actual marine creature created by God, probably some type of whale.
- Psalm 104:27 tn Heb “All of them.” The pronoun “them” refers not just to the sea creatures mentioned in vv. 25-26, but to all living things (see v. 24). This has been specified in the translation as “all of your creatures” for clarity.
- Psalm 104:34 tn That is, the psalmist’s thoughts as expressed in his songs of praise.
NET Bible® copyright ©1996-2017 by Biblical Studies Press, L.L.C. http://netbible.com All rights reserved.
|
english
|
import { Component, Input, OnInit } from '@angular/core';
import { AbstractControl, FormControl, FormGroup } from '@angular/forms';
import { EXISTING_SOURCE, EXISTING_VOLUME_TYPE } from 'src/app/types';
import {
createExistingSourceFormGroup,
createSourceFormGroup,
} from 'src/app/shared/utils/volumes';
import { dump } from 'js-yaml';
import { V1Volume } from '@kubernetes/client-node';
import { parseYAML } from 'src/app/shared/utils/yaml';
@Component({
selector: 'app-existing-volume',
templateUrl: './existing-volume.component.html',
styleUrls: ['./existing-volume.component.scss'],
})
export class ExistingVolumeComponent implements OnInit {
@Input() volGroup: FormGroup;
EXISTING_VOLUME_TYPE = EXISTING_VOLUME_TYPE;
errorParsingYaml = '';
private yamlInternal = '';
get yaml(): string {
return this.yamlInternal;
}
set yaml(text: string) {
// Try to parse the YAML contents into a JS dict and store it in the
// FormControl for the existingSource
this.yamlInternal = text;
const [parsed, error] = parseYAML(text);
this.errorParsingYaml = error;
if (error) {
return;
}
this.volGroup.get('existingSource').setValue(parsed);
}
get type(): EXISTING_VOLUME_TYPE {
if (!this.volGroup) {
return EXISTING_VOLUME_TYPE.CUSTOM;
}
if (this.volGroup.get('existingSource') instanceof FormControl) {
return EXISTING_VOLUME_TYPE.CUSTOM;
}
if (this.volGroup.get('existingSource') instanceof FormGroup) {
return EXISTING_VOLUME_TYPE.PVC;
}
}
constructor() {}
ngOnInit(): void {
const existingSource: V1Volume = this.volGroup.get('existingSource').value;
this.yaml = dump(existingSource);
}
typeChanged(type: EXISTING_VOLUME_TYPE) {
// In case of custom we change from a form group to a simple form control
// The user will be inputing a YAML, which we will be converting to JS dict
if (type === EXISTING_VOLUME_TYPE.CUSTOM) {
const currSrc = this.volGroup.get('existingSource').value;
this.yamlInternal = dump(currSrc);
this.volGroup.setControl('existingSource', new FormControl(currSrc));
return;
}
// Use a FormGroup for PVC, since there will be a form with subfields
this.volGroup.setControl('existingSource', createExistingSourceFormGroup());
const sourceGroup = this.volGroup.get('existingSource') as FormGroup;
const source = EXISTING_SOURCE.PERSISTENT_VOLUME_CLAIM;
sourceGroup.addControl(source, createSourceFormGroup(source));
}
getPvcFormGroup(): AbstractControl {
return this.volGroup.get('existingSource.persistentVolumeClaim');
}
}
|
typescript
|
Naypyidaw, Oct 19: Three officials and five visitors died at Yangon's Insein Prison on Wednesday after at least two explosions occurred near a queue of people wanting to leave parcels for inmates, according to a statement by an information team for the country's junta.
Eighteen people were said to have been injured in the blasts. The junta blamed the explosions on "terrorists. "
Myanmar has been in chaos since last year, when a military junta overthrew an elected government led by Nobel laureate Aung San Suu Kyi's party.
The junta has launched a brutal clampdown on dissent, which is sometimes taking the form of self-declared civilian "people's defense forces" that are fighting the military.
The prison holds thousands of political prisoners who have been jailed since the military coup.
What else do we know about the incident?
According to the news portals Myanmar Now and Irawaddy News, the blasts occurred near the prison's parcel counter at 9:40 a. m. local time (0310 UTC) near the facility's parcels counter.
The junta said the dead included three prison staff and a 10-year-old girl. It said security forces had defused another "homemade mine" device found nearby.
A witness who declined to be named told Reuters news agency that soldiers at the prison had opened fire in response to the blasts.
"As soon as I heard the blast, I ran out and that's when I got hurt [by shrapnel]. The soldiers . . . at the entrance gate fired shots recklessly," said the witness.
Rights groups say that detainees held in the prison include the former British ambassador to Myanmar, Vicky Bowman, and Japanese journalist Toru Kubota.
More than 2,300 people have been killed since the coup amid the military clampdown and more than 15,000 arrested, according to a local monitoring group.
The junta blames anti-coup fighters for the deaths of almost 3,900 civilians.
|
english
|
<reponame>brendadavid/API
const constants = require('../config/contants')
const DAO = require('../DAO/UsersDAO')
const sha256 = require('sha256')
class UserController {
/* Fetch Users:
* Retorna uma lista de usuários
*/
static fetchUsers(query, callback) {
const orderQuery = UserController.constructOrderQuery(query)
const whereQuery = UserController.constructWhereQuery(query)
return DAO.fetchUsers(orderQuery, whereQuery, callback)
}
/* Find User:
* Retorna um único usuário
*/
static findUser(idUser, callback) {
return DAO.findUser(idUser, callback)
}
/* Add User:
* Cria um novo usuário, e retorna-o
*/
static addUser(newUserData, callback) {
//Gera um salt aleatório
let salt = UserController.randomSHA256(constants.minRandomNumber, constants.maxRandomNumber)
//Atualiza os campos do salt e password que serão gravados no banco de dados.
newUserData.salt = salt
newUserData.password = <PASSWORD>256(newUserData.password + salt)
DAO.addUser(newUserData, callback)
}
static updateUser(userDataToUpdate, callback) {
DAO.updateUser(userDataToUpdate, callback)
}
static deleteUser(idUser, callback) {
DAO.deleteUser(idUser, callback)
}
static constructOrderQuery(query) {
/**
* Construção do ORDER BY:
*
* isAscending: Define se a ordenação será ascendente ou descendente. (ASC ou DESC)
* field: Define por qual atributo da tabela a esquisa será ordenada. Possíveis valores:
* id: id_user
* name: name
* username: username
* email: email
* created: createdAt
* updated: updatedAt
*
* Verifique a coleção do postman para um exemplo de uso desses campos.
*/
let orderQuery = {}
//Definição do valor de isAscending. Por padrão é ASC (Ascendente), se falso será DESC (Descendente).
orderQuery.isAscending = query.isAscending === 'false'? '-1' : '1'
switch(query.sort) {
case '_id':
orderQuery.field = '_id'
break
case 'id':
orderQuery.field = '_id'
break
case 'name':
orderQuery.field = 'name'
break
case 'username':
orderQuery.field = 'username'
break
case 'email':
orderQuery.field = 'email'
break
case 'created':
orderQuery.field = 'createdAt'
break
case 'updated':
orderQuery.field = 'updatedAt'
break
default: //Campo padrão da ordenação
orderQuery.field = 'createdAt'
}
return orderQuery
}
static constructWhereQuery(query) {
/**
* Construição do WHERE:
*
* Possíveis parâmentros:
* contains: procura pela string informada em todos os campos especificados na função constructWhereClause(), no arquivo UsersDAO.js
*
* Verifique a coleção do postman para um exemplo de uso desse campo.
*/
let whereQuery = {}
if(query.contains !== undefined) {
whereQuery.contains = query.contains
}
return whereQuery
}
static randomSHA256(low, high) {
return sha256(UserController.randomInt(low, high))
}
static randomInt(low, high) {
return Math.floor(Math.random() * (high - low) + low).toString()
}
}
module.exports = UserController
|
javascript
|
version https://git-lfs.github.com/spec/v1
oid sha256:d8edb4f11c9ec2bbd0c9bc7568ede77c41e213127a9315a55c6ef598c1723eec
size 377
|
json
|
<filename>datasets/the-movie-db/sample-data/productionCompanies/348.json
{
"id": 348,
"logo_path": null,
"description": null,
"name": "<NAME>",
"parent_company": null,
"homepage": null,
"headquarters": null
}
|
json
|
Los Angeles, Policenama Online – About 2,000 people living in Northern California have been ordered to evacuate after a massive wildfire dubbed the ‘Kincade Fire’ exploded in size overnight. According to the California Department of Forestry and Fire Protection (Cal Fire), the blaze ignited on Wednesday night exploded very fast, scorching over 40. 5 sq. km by Thursday noon with zero containment, reports Xinhua news agency.
More than 500 firefighters were battling the blaze in Sonoma County, but their overnight efforts could only focus on evacuations and the high winds made the fire difficult to contain. ”Our aircraft can’t drop in those conditions. When you have that kind of wind speed, the resistance to control is beyond our capabilities. Because of the terrain and fuel conditions and the heat and humidity, the containment is still very challenging. ” Mark Parks with Cal Fire told local KCRA news channel. There were reports that dozens of buildings were burned down but so far there is no report of casualties. The fire was reported to have started near the Geysers Geothermal Plant, the world’s largest geothermal field, but there officials were yet to ascertain it.
Meanwhile, another wildfire dubbed the ‘Tick Fire’ was reported on Thursday in the Southern California city of Santa Clarita, 60 km northwest of downtown Los Angeles, which moved quickly downhill toward Canyon Country, a residential community nearby. The flames had spread to 0. 8 sq. km within 20 minutes and scorched over 3. 4 sq. km by Thursday evening. Aerial video showed that some outdoor structures were damaged and the flames were dangerously close to homes in some areas. At least one home appeared to be on fire. Hundreds of firefighter from Los Angeles County and Orange County were battling the blaze with four airtankers. The fire came amid red flag warnings issued for some areas in Southern California due to extreme wildfire risk.
|
english
|
<filename>src/server.ts<gh_stars>0
import { config } from "dotenv";
import { ElementHandle, launch } from "puppeteer";
config();
const { PASSWORD, LOGIN, MAX_AGE, MAX_PRICE } = process.env;
const systemLeadUrl = "https://www.systemlead.pl/system/wszystkie_leady.php";
const checkedLeads: Array<string> = [];
async function initialize() {
const browser = await launch({
headless: false,
});
const page = await browser.newPage();
await page.goto("https://www.systemlead.pl/");
const loginButton = await page.$("#zaloguj");
await page.type("#email", LOGIN);
await page.type("#haslo", PASSWORD);
await loginButton.click();
await page.waitForNavigation();
await page.goto(systemLeadUrl);
const setFiltersValue = async () => {
await page.$eval(
"[name=age-to]",
(el: Element, value: string) => el.setAttribute("value", value),
MAX_AGE
);
await page.$eval(
"[name=price-to]",
(el: Element, value: string) => el.setAttribute("value", value),
MAX_PRICE
);
};
const buyLead = async () => {
await page.goto(systemLeadUrl);
// Reset Filters
await setFiltersValue();
// Click for apply button
(await page.$("[name=filtr_leady]")).click();
const tableRows = await page.$$("#lead_lista > tbody > tr");
const correctLeadsUrl: Array<string> = await Promise.all(
tableRows.map(async (row): Promise<string> => {
const priceTd = await row.$(".koszt");
const age: string = await page.evaluate(
(singleRow) => singleRow.getAttribute("data-wiek"),
row
);
const priceValue: string = await (
await priceTd.getProperty("textContent")
).jsonValue();
if (
parseInt(age) <= parseInt(MAX_AGE) &&
parseInt(priceValue) <= parseInt(MAX_PRICE)
) {
const takeALookButton = await row.$(".przycisk > a");
return await (await takeALookButton.getProperty("href")).jsonValue();
}
})
);
const leads: Array<string> = correctLeadsUrl.filter((leadUrl) => leadUrl);
if (leads.length > 0) {
for (let i = 0; i < leads.length; i += 1) {
const url = leads[i];
if (!checkedLeads.includes(url)) {
const subPage = await browser.newPage();
subPage.on("dialog", async (dialog) => {
await dialog.accept();
await subPage.close();
});
await subPage.goto(url);
const buyButton: ElementHandle = await subPage.$(
"#lead_lista_tu > tbody > tr > td > .przycisk"
);
checkedLeads.push(url);
if (buyButton) {
await buyButton.click();
} else {
await subPage.close();
}
} else {
setTimeout(async () => await buyLead(), 200);
}
if (i === leads.length - 1) {
await buyLead();
}
}
} else {
setTimeout(async () => await buyLead(), 200);
}
};
await buyLead();
}
initialize();
|
typescript
|
Asking two of the world’s greatest players to compromise on set-pieces is a task that any manager would pass on easily. But, Unai Emery has stepped in and taken matters into his own hands by dividing the responsibilities.
The decision to grant Neymar the spot kick duties has come as a shocker to Cavani’s former Uruguayan team mate Forlan who was quoted as saying “Cavani deserves respect, he has been scoring goals for years...”.
The decision comes across as a little unfair towards Cavani, especially with a conversion rate of 22-2 since moving to the French club against Neymar’s 15-6.
Ever since Neymar and Cavani had a fall out in a 2-0 win against Lyon over a second half free-kick, there have been rumours of Emery favouring the Brazilian star over PSG’s Uruguayan goal scoring machine.
ALSO READ : Very bad news regarding Sergio Ramos!
And with Dani Alves stepping in and standing up for Neymar, Cavani had very few chances of being favoured by his fellow team-mates. According to rumours Cavanis was offered a staggering 1 million Euros to step back from his set-piece responsibilities, the club has brushed aside any rumours of a pay-out for the sacrifice.
Being the top professionals they are, both the players have never let their personal feud to come in between their professional duties. In fact, Cavani was quoted as saying that they need not be best of friends to give their hundred percent for the club.
Cavani always played the second fiddle for the four years Zlatan was the spearhead for PSG, and when his time came to be the face of the PSG attack, Nemayr and Mbappe were signed by the French giants to make things worse for Cavani. His frustration towards the club and his manager may be justified, but he hasn’t let the feud affect his performances.
|
english
|
#![cfg(not(target_os = "redox"))]
use rustix::fs::{Dir, DirEntry};
use std::collections::HashMap;
#[test]
fn dir_entries() {
let tmpdir = tempfile::tempdir().expect("construct tempdir");
let dirfd = std::fs::File::open(tmpdir.path()).expect("open tempdir as file");
let mut dir = Dir::from(dirfd).expect("construct Dir from dirfd");
let entries = read_entries(&mut dir);
assert_eq!(entries.len(), 0, "no files in directory");
let _f1 = std::fs::File::create(tmpdir.path().join("file1")).expect("create file1");
let entries = read_entries(&mut dir);
assert!(
entries.get("file1").is_some(),
"directory contains `file1`: {:?}",
entries
);
assert_eq!(entries.len(), 1);
let _f2 = std::fs::File::create(tmpdir.path().join("file2")).expect("create file1");
let entries = read_entries(&mut dir);
assert!(
entries.get("file1").is_some(),
"directory contains `file1`: {:?}",
entries
);
assert!(
entries.get("file2").is_some(),
"directory contains `file2`: {:?}",
entries
);
assert_eq!(entries.len(), 2);
}
fn read_entries(dir: &mut Dir) -> HashMap<String, DirEntry> {
dir.rewind();
let mut out = HashMap::new();
loop {
match dir.read() {
Some(e) => {
let e = e.expect("non-error entry");
let name = e.file_name().to_str().expect("utf8 filename").to_owned();
if name != "." && name != ".." {
out.insert(name, e);
}
}
None => break,
}
}
out
}
|
rust
|
<filename>dist/style.css
@import url(https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css);
@import url(https://cdn.jsdelivr.net/npm/font-awesome@latest/css/font-awesome.min.css);
@import url(https://cdn.jsdelivr.net/npm/font-awesome-animation@0.2.1/dist/font-awesome-animation.min.css);
@import url(css/chunk-vendors.e81dccfb.css);
@import url(css/chunk-91c3565e.9b848216.css);
@import url(css/chunk-50779d2e.ce88a193.css);
@import url(css/chunk-498d4d6d.30be7901.css);
@import url(css/chunk-48822c69.ee3330ec.css);
@import url(css/chunk-2a286362.75822c75.css);
@import url(css/chunk-0547c3c8.63d5b552.css);
@import url(css/app.0b3f4d4c.css);
|
css
|
<reponame>dsrvlabs/chain-health-checker
{
"chainId": "sifchain-1",
"chainName": "Sifchain",
"rpc": [
{
"address": "https://rpc.sifchain.finance:443"
},
{
"address": "https://rpc-archive.sifchain.finance:443"
}
],
"rest": [
{
"address": "https://api.sifchain.finance:443"
}
],
"bip44": {
"coinType": 118
},
"bech32Config": {
"bech32PrefixAccAddr": "sif",
"bech32PrefixAccPub": "sifpub",
"bech32PrefixValAddr": "sifvaloper",
"bech32PrefixValPub": "sifvaloperpub",
"bech32PrefixConsAddr": "sifvalcons",
"bech32PrefixConsPub": "sifvalconspub"
},
"stakeCurrency": {
"coinDenom": "ROWAN",
"coinMinimalDenom": "urowan",
"coinDecimals": 18
},
"currencies": [
{
"coinDenom": "ROWAN",
"coinMinimalDenom": "urowan",
"coinDecimals": 18
}
],
"feeCurrencies": [
{
"coinDenom": "ROWAN",
"coinMinimalDenom": "urowan",
"coinDecimals": 18
}
],
"coinType": 118,
"gasPriceStep": {
"low": 0.0,
"average": 0.0,
"high": 0.0
}
}
|
json
|
<gh_stars>0
todo:
- add power supply from 5V (micro-usb);
- add one USB port(to use with usb-wifi dongle);
possible improvements:
- HDMI;
- GPIO;
-----------------------------------------------------
- compute module CM3+(with EMMC): DDR2 SO-DIMM
- 3 cam connectors 1x15: Cam0(2CSI Lines Cam0) and Cam1_0/Cam1_1 connected to 4CSI lines Cam1
done with KiCad 5.x
use local libs
autoreroute for kiCad 5.x.x https://www.youtube.com/watch?v=7Kk8T_bBaVY (installed in /opt/layout/bin/freeRouting.jar)
KiCad/rpi:
not integrated yet:
https://github.com/JoanTheSpark/KiCAD
https://github.com/KiCad/kicad-footprints/pull/1158
Docs:
https://www.raspberrypi.org/documentation/hardware/camera/schematics/rpi_SCH_Camera2_2p1.pdf
|
markdown
|
import React from 'react'
import { Link } from 'gatsby'
import SEO from '../../components/seo'
const SettingPage = props => (
<>
<SEO
title='Setting'
description='Choose option to get best experience !'
path={props.path}
/>
<h1>Hi from the Setting page</h1>
<p>Welcome to Setting</p>
<Link to='/'>Go back to the homepage</Link>
</>
)
export default SettingPage
|
javascript
|
<reponame>donaldcrane/patronize
import sequelize from "sequelize";
import database from "../models";
/**
* @class Admin
* @description allows admin user create and check Money details
* @exports Admin
*/
export default class Admin {
/**
* @param {string} newTransaction - The Transaction details
* @returns {object} An instance of the Transactions model class
*/
static async addTransaction(newTransaction) {
try {
return await database.Credits.create(newTransaction);
} catch (err) {
throw err;
}
}
/**
* @param {string} id - The user id
* @returns {object} - An instance of the Users model class
*/
static async profileExist(id) {
try {
return await database.Profiles.findOne({
where: {
userId: id
}
});
} catch (error) {
throw error;
}
}
/**
* @param {string} id - The user id
* @returns {object} - An instance of the Users model class
*/
static async userExist(id) {
try {
return await database.Users.findOne({
where: {
id
}
});
} catch (error) {
throw error;
}
}
/**
* @returns {object} An instance of the Transactions model class
*/
static async getAllIncomingTransaction() {
try {
return await database.Credits.findAll({ });
} catch (err) {
throw err;
}
}
/**
* @param {string} id - The transaction id
* @returns {object} An instance of the Transactions model class
*/
static async getTransactionById(id) {
try {
return await database.Credits.findOne({
where: {
id
}
});
} catch (err) {
throw err;
}
}
/**
* @param {string} id - The user id
* @param {string} status - The transaction status
* @returns {object} - An instance of the Profile model class
*/
static async updateTransactionStatus(id, status) {
try {
return await database.Credits.update({ status }, {
where: { id },
returning: true,
plain: true
});
} catch (error) {
throw error;
}
}
/**
* @param {string} id - The user id
* @param {string} ref - The transaction reference
* @returns {object} - An instance of the Profile model class
*/
static async updateTransactionRef(id, ref) {
try {
return await database.Credits.update({ reference: ref }, {
where: { id },
returning: true,
plain: true
});
} catch (error) {
throw error;
}
}
/**
* @param {string} id - The transaction name
* @returns {object} An instance of the Transactions model class
*/
static async deleteTransaction(id) {
try {
const Transaction = await database.Credits.findOne({ where: { id } });
return await Transaction.destroy({ cascade: true });
} catch (err) {
throw err;
}
}
/**
* @param {string} id - The transaction id
* @param {string} amount - The transaction amount
* @returns {object} An instance of the Transactions model class
*/
static async updateGlobalBalance(id, amount) {
try {
return await database.Users.increment({
globalBalance: +amount
}, {
where: {
id
},
returning: true,
plain: true
});
} catch (err) {
throw err;
}
}
}
|
javascript
|
<gh_stars>1-10
{"name":"<NAME>","symbol":"HIELON","logoURI":"https://raw.githubusercontent.com/solana-labs/token-list/main/assets/mainnet/H3JwKryBPTaH3meBcW5qYZVGTv5gceCYMQwmbmWZUzX9/logo.png","decimals":9,"address":"H3JwKryBPTaH3meBcW5qYZVGTv5gceCYMQwmbmWZUzX9","chainId":101}
|
json
|
4 Now when Mardochai had heard these things, he rent his garments, and put on sackcloth, strewing ashes on his head: and he cried with a loud voice in the street in the midst of the city, shewing the anguish of his mind.
2 And he came lamenting in this manner even to the gate of the palace: for no one clothed with sackcloth might enter the king's court.
3 And in all provinces, towns, and places, to which the king's cruel edict was come, there was great mourning among the Jews, with fasting, wailing, and weeping, many using sackcloth and ashes for their bed.
4 Then Esther's maids and her eunuchs went in, and told her. And when she heard it she was in a consternation: and she sent a garment, to clothe him, and to take away the sackcloth: but he would not receive it.
5 And she called for Athach the eunuch, whom the king had appointed to attend upon her, and she commanded him to go to Mardochai, and learn of him why he did this.
6 And Athach going out went to Mardochai, who was standing in the street of the city, before the palace gate:
7 And Mardochai told him all that had happened, how Aman had promised to pay money into the king's treasures, to have the Jews destroyed.
8 He gave him also a copy of the edict which was hanging up in Susan, that he should shew it to the queen, and admonish her to go in to the king, and to entreat him for her people.
9 And Athach went back and told Esther all that Mardochai had said.
10 She answered him, and bade him say to Mardochai:
11 All the king's servants, and all the provinces that are under his dominion, know, that whosoever, whether man or woman, cometh into the king's inner court, who is not called for, is immediately to be put to death without any delay: except the king shall hold out the golden sceptre to him, in token of clemency, that so he may live. How then can I go in to the king, who for these thirty days now have not been called unto him?
12 And when Mardochai had heard this,
13 He sent word to Esther again, saying: Think not that thou mayst save thy life only, because thou art in the king a house, more than all the Jews:
14 For if thou wilt now hold thy peace, the Jews shall be delivered by some other occasion: and thou, and thy father's house shall perish. And who knoweth whether thou art not therefore come to the kingdom, that thou mightest be ready in such a time as this?
15 And again Esther sent to Mardochai in these words:
16 Go, and gather together all the Jews whom thou shalt find in Susan, and pray ye for me. Neither eat nor drink for three days and three nights: and I with my handmaids will fast in like manner, and then I will go in to the king, against the law, not being called, and expose myself to death and to danger.
17 So Mardochai went, and did all that Esther had commanded him.
4 When Mordecai learned of all that had been done, he tore his clothes,(A) put on sackcloth and ashes,(B) and went out into the city, wailing(C) loudly and bitterly. 2 But he went only as far as the king’s gate,(D) because no one clothed in sackcloth was allowed to enter it. 3 In every province to which the edict and order of the king came, there was great mourning among the Jews, with fasting, weeping and wailing. Many lay in sackcloth and ashes.
4 When Esther’s eunuchs and female attendants came and told her about Mordecai, she was in great distress. She sent clothes for him to put on instead of his sackcloth, but he would not accept them. 5 Then Esther summoned Hathak, one of the king’s eunuchs assigned to attend her, and ordered him to find out what was troubling Mordecai and why.
6 So Hathak went out to Mordecai in the open square of the city in front of the king’s gate. 7 Mordecai told him everything that had happened to him, including the exact amount of money Haman had promised to pay into the royal treasury for the destruction of the Jews.(E) 8 He also gave him a copy of the text of the edict for their annihilation, which had been published in Susa, to show to Esther and explain it to her, and he told him to instruct her to go into the king’s presence to beg for mercy and plead with him for her people.
12 When Esther’s words were reported to Mordecai, 13 he sent back this answer: “Do not think that because you are in the king’s house you alone of all the Jews will escape. 14 For if you remain silent(I) at this time, relief(J) and deliverance(K) for the Jews will arise from another place, but you and your father’s family will perish. And who knows but that you have come to your royal position for such a time as this?”(L)
15 Then Esther sent this reply to Mordecai: 16 “Go, gather together all the Jews who are in Susa, and fast(M) for me. Do not eat or drink for three days, night or day. I and my attendants will fast as you do. When this is done, I will go to the king, even though it is against the law. And if I perish, I perish.”(N)
17 So Mordecai went away and carried out all of Esther’s instructions.
Public Domain (Why are modern Bible translations copyrighted?)
Holy Bible, New International Version®, NIV® Copyright ©1973, 1978, 1984, 2011 by Biblica, Inc.® Used by permission. All rights reserved worldwide.
NIV Reverse Interlinear Bible: English to Hebrew and English to Greek. Copyright © 2019 by Zondervan.
|
english
|
"""Common entities."""
from __future__ import annotations
from abc import ABC
import logging
from homeassistant.helpers.update_coordinator import CoordinatorEntity
from homeassistant.util import slugify
from .const import DOMAIN as MULTIMATIC
from .coordinator import MultimaticCoordinator
_LOGGER = logging.getLogger(__name__)
class MultimaticEntity(CoordinatorEntity, ABC):
"""Define base class for multimatic entities."""
coordinator: MultimaticCoordinator
def __init__(self, coordinator: MultimaticCoordinator, domain, device_id):
"""Initialize entity."""
super().__init__(coordinator)
id_part = slugify(
device_id
+ (f"_{coordinator.api.serial}" if coordinator.api.fixed_serial else "")
)
self.entity_id = f"{domain}.{id_part}"
self._unique_id = slugify(f"{MULTIMATIC}_{coordinator.api.serial}_{device_id}")
self._remove_listener = None
@property
def unique_id(self) -> str:
"""Return a unique ID."""
return self._unique_id
async def async_added_to_hass(self):
"""Call when entity is added to hass."""
await super().async_added_to_hass()
_LOGGER.debug("%s added", self.entity_id)
self.coordinator.add_api_listener(self.unique_id)
async def async_will_remove_from_hass(self) -> None:
"""Run when entity will be removed from hass."""
await super().async_will_remove_from_hass()
self.coordinator.remove_api_listener(self.unique_id)
@property
def available(self) -> bool:
"""Return if entity is available."""
return super().available and self.coordinator.data
|
python
|
The Rapid Repair crew ventured to France to obtain an early iPhone 3GS, dismantle it, and scope out the inner components. Their discovery? The same 600 MHz CPU powering the Palm Pre (that can actually run at 833 MHz).
Though the two phones share the same CPU and GPU, they run on different chipsets (iPhone: Samsung SoC S5PC100, Pre: TI OMAP 3430). However, this Samsung chipset is also capable of handling 720p video recording, streaming vid conferencing and even Dolby 5.1 audio processing, giving this hardware some serious future potential.
AnandTech also posted an interesting theory regarding this particular chipset and battery life last week after the 3GS announce. They noticed that the CortexA8 processor can use up to 3x more power than the previous ARM 11 in the first two iPhones, yet battery life managed to improve with the 3GS. At the time, they thought the hardware might be using a process similar to Intel's Quick Start technology, which saves power by quickly ramping the processor up to full power when in use, and then dropping it down to an idle state when not in use actually averages out saves more power than running it at more constant power levels.
|
english
|
The decision has been made during a press conference on 30th of January, Monday.
GUWAHATI : Ola-Uber services to stop from 1st of February, 2023. The All Assam Cab Mazdoor Sangha along with All Guwahati Bike Taxi Operator Union concluded that all services will be paused from the mentioned that.
The decision has been made during a press conference on 30th of January, Monday. The association as a whole asserts that, the companies of these cab services are fooling the drivers from a long time.
The company exploits the cab drivers in a way that it gets difficult for the employees under the services to maintain decent life quality. As per the All Assam Cab Mazdoor Sangha, over 18,000 vehicles are registered under the Ola-Uber cab service in the state.
Furthermore, All Guwahati Bike Taxi Operator Union has also decided to pause rapido bike services from 1st of February, 2023.
Notably, in November 2022, the taxi drivers claimed that they would not continue public transportation as long as the state administration does not respond to their plea and take action regarding the same.
Furthermore, the drivers also appealed the government to introduce a new app for their services. During this phase last year, can associations conducted day-long protest. As per the driver's association, more than 1500 accounts of can drivers were closed by the concerned company without any sort of prior notice consent.
While passengers have been repeatedly complaining about extra demands by the drivers, the can drivers on the other hand have been raising the issue of exploitation by the application aggregators.
Several people have raised the issue of sky-touching fares by Ola and Uber cab services. However, the decision to introduce an App-based taxi service in Guwahati by the state administration, follows slew of complaints by passengers as well as cab drivers.
Also Watch :
|
english
|
<filename>code/render/coregraphics/vk/vkshaderserver.cc
//------------------------------------------------------------------------------
// vkshaderserver.cc
// (C) 2016-2020 Individual contributors, see AUTHORS file
//------------------------------------------------------------------------------
#include "render/stdneb.h"
#include "vkshaderserver.h"
#include "effectfactory.h"
#include "coregraphics/shaderpool.h"
#include "vkgraphicsdevice.h"
#include "vkshaderpool.h"
#include "vkshader.h"
using namespace Resources;
using namespace CoreGraphics;
namespace Vulkan
{
__ImplementClass(Vulkan::VkShaderServer, 'VKSS', Base::ShaderServerBase);
__ImplementSingleton(Vulkan::VkShaderServer);
//------------------------------------------------------------------------------
/**
*/
VkShaderServer::VkShaderServer()
{
__ConstructSingleton;
}
//------------------------------------------------------------------------------
/**
*/
VkShaderServer::~VkShaderServer()
{
__DestructSingleton;
}
//------------------------------------------------------------------------------
/**
*/
bool
VkShaderServer::Open()
{
n_assert(!this->IsOpen());
// create anyfx factory
this->factory = n_new(AnyFX::EffectFactory);
ShaderServerBase::Open();
auto func = [](uint32_t& val, IndexT i) -> void
{
val = i;
};
this->texture2DPool.SetSetupFunc(func);
this->texture2DPool.Resize(MAX_2D_TEXTURES);
this->texture2DMSPool.SetSetupFunc(func);
this->texture2DMSPool.Resize(MAX_2D_MS_TEXTURES);
this->texture3DPool.SetSetupFunc(func);
this->texture3DPool.Resize(MAX_3D_TEXTURES);
this->textureCubePool.SetSetupFunc(func);
this->textureCubePool.Resize(MAX_CUBE_TEXTURES);
this->texture2DArrayPool.SetSetupFunc(func);
this->texture2DArrayPool.Resize(MAX_2D_ARRAY_TEXTURES);
// create shader state for textures, and fetch variables
ShaderId shader = VkShaderServer::Instance()->GetShader("shd:shared.fxb"_atm);
this->texture2DTextureVar = ShaderGetResourceSlot(shader, "Textures2D");
this->texture2DMSTextureVar = ShaderGetResourceSlot(shader, "Textures2DMS");
this->texture2DArrayTextureVar = ShaderGetResourceSlot(shader, "Textures2DArray");
this->textureCubeTextureVar = ShaderGetResourceSlot(shader, "TexturesCube");
this->texture3DTextureVar = ShaderGetResourceSlot(shader, "Textures3D");
this->tableLayout = ShaderGetResourcePipeline(shader);
this->ticksCbo = CoreGraphics::GetGraphicsConstantBuffer(MainThreadConstantBuffer);
this->cboSlot = ShaderGetResourceSlot(shader, "PerTickParams");
this->resourceTables.Resize(CoreGraphics::GetNumBufferedFrames());
IndexT i;
for (i = 0; i < this->resourceTables.Size(); i++)
{
this->resourceTables[i] = ShaderCreateResourceTable(shader, NEBULA_TICK_GROUP);
// fill up all slots with placeholders
IndexT j;
for (j = 0; j < MAX_2D_TEXTURES; j++)
ResourceTableSetTexture(this->resourceTables[i], {CoreGraphics::White2D, this->texture2DTextureVar, j, CoreGraphics::SamplerId::Invalid(), false});
for (j = 0; j < MAX_2D_MS_TEXTURES; j++)
ResourceTableSetTexture(this->resourceTables[i], { CoreGraphics::White2D, this->texture2DMSTextureVar, j, CoreGraphics::SamplerId::Invalid(), false });
for (j = 0; j < MAX_3D_TEXTURES; j++)
ResourceTableSetTexture(this->resourceTables[i], { CoreGraphics::White3D, this->texture3DTextureVar, j, CoreGraphics::SamplerId::Invalid(), false });
for (j = 0; j < MAX_CUBE_TEXTURES; j++)
ResourceTableSetTexture(this->resourceTables[i], { CoreGraphics::WhiteCube, this->textureCubeTextureVar, j, CoreGraphics::SamplerId::Invalid(), false });
for (j = 0; j < MAX_2D_ARRAY_TEXTURES; j++)
ResourceTableSetTexture(this->resourceTables[i], { CoreGraphics::White2DArray, this->texture2DArrayTextureVar, j, CoreGraphics::SamplerId::Invalid(), false });
ResourceTableCommitChanges(this->resourceTables[i]);
}
this->normalBufferTextureVar = ShaderGetConstantBinding(shader, "NormalBuffer");
this->depthBufferTextureVar = ShaderGetConstantBinding(shader, "DepthBuffer");
this->specularBufferTextureVar = ShaderGetConstantBinding(shader, "SpecularBuffer");
this->albedoBufferTextureVar = ShaderGetConstantBinding(shader, "AlbedoBuffer");
this->emissiveBufferTextureVar = ShaderGetConstantBinding(shader, "EmissiveBuffer");
this->lightBufferTextureVar = ShaderGetConstantBinding(shader, "LightBuffer");
this->environmentMapVar = ShaderGetConstantBinding(shader, "EnvironmentMap");
this->irradianceMapVar = ShaderGetConstantBinding(shader, "IrradianceMap");
this->numEnvMipsVar = ShaderGetConstantBinding(shader, "NumEnvMips");
return true;
}
//------------------------------------------------------------------------------
/**
*/
void
VkShaderServer::Close()
{
n_assert(this->IsOpen());
n_delete(this->factory);
IndexT i;
for (i = 0; i < this->resourceTables.Size(); i++)
{
DestroyResourceTable(this->resourceTables[i]);
}
ShaderServerBase::Close();
}
//------------------------------------------------------------------------------
/**
*/
uint32_t
VkShaderServer::RegisterTexture(const CoreGraphics::TextureId& tex, bool depth, CoreGraphics::TextureType type)
{
uint32_t idx;
IndexT var;
switch (type)
{
case Texture2D:
n_assert(!this->texture2DPool.IsFull());
idx = this->texture2DPool.Alloc();
var = this->texture2DTextureVar;
break;
case Texture2DArray:
n_assert(!this->texture2DArrayPool.IsFull());
idx = this->texture2DArrayPool.Alloc();
var = this->texture2DArrayTextureVar;
break;
case Texture3D:
n_assert(!this->texture3DPool.IsFull());
idx = this->texture3DPool.Alloc();
var = this->texture3DTextureVar;
break;
case TextureCube:
n_assert(!this->textureCubePool.IsFull());
idx = this->textureCubePool.Alloc();
var = this->textureCubeTextureVar;
break;
}
ResourceTableTexture info;
info.tex = tex;
info.index = idx;
info.sampler = SamplerId::Invalid();
info.isDepth = false;
info.slot = var;
// update textures for all tables
IndexT i;
for (i = 0; i < this->resourceTables.Size(); i++)
{
ResourceTableSetTexture(this->resourceTables[i], info);
}
return idx;
}
//------------------------------------------------------------------------------
/**
*/
void
VkShaderServer::UnregisterTexture(const uint32_t id, const CoreGraphics::TextureType type)
{
switch (type)
{
case Texture2D:
this->texture2DPool.Free(id);
break;
case Texture2DArray:
this->texture2DArrayPool.Free(id);
break;
case Texture3D:
this->texture3DPool.Free(id);
break;
case TextureCube:
this->textureCubePool.Free(id);
break;
}
}
//------------------------------------------------------------------------------
/**
*/
void
VkShaderServer::SetGlobalEnvironmentTextures(const CoreGraphics::TextureId& env, const CoreGraphics::TextureId& irr, const SizeT numMips)
{
this->tickParams.EnvironmentMap = CoreGraphics::TextureGetBindlessHandle(env);
this->tickParams.IrradianceMap = CoreGraphics::TextureGetBindlessHandle(irr);
this->tickParams.NumEnvMips = numMips;
}
//------------------------------------------------------------------------------
/**
*/
void
VkShaderServer::SetupGBufferConstants()
{
this->tickParams.NormalBuffer = TextureGetBindlessHandle(CoreGraphics::GetTexture("NormalBuffer"));
this->tickParams.DepthBuffer = TextureGetBindlessHandle(CoreGraphics::GetTexture("ZBuffer"));
this->tickParams.SpecularBuffer = TextureGetBindlessHandle(CoreGraphics::GetTexture("SpecularBuffer"));
this->tickParams.AlbedoBuffer = TextureGetBindlessHandle(CoreGraphics::GetTexture("AlbedoBuffer"));
this->tickParams.EmissiveBuffer = TextureGetBindlessHandle(CoreGraphics::GetTexture("EmissiveBuffer"));
this->tickParams.LightBuffer = TextureGetBindlessHandle(CoreGraphics::GetTexture("LightBuffer"));
}
//------------------------------------------------------------------------------
/**
*/
void
VkShaderServer::BeforeView()
{
// just allocate the memory
this->cboOffset = CoreGraphics::AllocateGraphicsConstantBufferMemory(MainThreadConstantBuffer, sizeof(Shared::PerTickParams));
IndexT bufferedFrameIndex = GetBufferedFrameIndex();
// update resource table
ResourceTableSetConstantBuffer(this->resourceTables[bufferedFrameIndex], { this->ticksCbo, this->cboSlot, 0, false, false, sizeof(Shared::PerTickParams), (SizeT)this->cboOffset });
ResourceTableCommitChanges(this->resourceTables[bufferedFrameIndex]);
}
//------------------------------------------------------------------------------
/**
*/
void
VkShaderServer::AfterView()
{
// update the constant buffer with the data accumulated in this frame
CoreGraphics::SetGraphicsConstants(MainThreadConstantBuffer, this->cboOffset, this->tickParams);
}
} // namespace Vulkan
|
cpp
|
<filename>SplashOutPages/navigation.html
<!DOCTYPE html>
<html>
<html lang="en">
<head>
<!-- your webpage info goes here -->
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Ubuntu:regular,bold&subset=Latin">
<title>SplashOut</title>
<meta name="PrimeStudios" content="<NAME>" />
<meta name="Navigation Menu" content="1" />
<style>
*{box-sizing: border-box}
body {
margin: 0;
padding: 0;
font-family: "Ubuntu";
}
.background{
width: 100%;
height: 100%;
background: #333;
position: fixed;
top: 0;
left: 0;
z-index: -1;
}
#nav{
text-decoration: none;
color: darkturquoise;
}
a:link{
text-decoration: none;
color: rgb(0, 206, 209);
}
a:visited{
text-decoration: none;
color: rgb(154,220,170);
}
#logo{
color: aliceblue;
}
</style>
</head>
<body>
<!-- webpage content goes here in the body -->
<div class="background"></div>
<div id="page">
<div id="logo">
<h1><a href="/" id="logoLink">Navigation Page</a></h1>
</div>
<div id="nav">
<ul>
<li><a href="#/activitesmovie.html">Activites Movie</a></li>
<li><a href="#/trysurfing.html">Try Surfing</a></li>
<li><a href="#/newthisyear.html">New This Year</a></li>
<li><a href="#/findoutmore.html">Find Out More</a></li>
</ul>
</div>
<div id="content">
<h2>Home</h2>
<p>
This is my first webpage! I was able to code all the HTML and CSS in order to make it. Watch out world of web design here I come!
</p>
<p>
I can use my skills here to create websites for my business, my friends and family, my C.V, blog or articles. As well as any games or more experiment stuff (which is what the web is really all about).
</p>
</div>
<div id="footer">
<p>
</p>
</div>
</div>
</body>
</html>
|
html
|
<filename>packages/manager/apps/cloud/client/app/iplb/home/translations/Messages_it_IT.json
{
"iplb_home_tile_status": "Stato",
"iplb_home_tile_status_frontends": "{{number}} frontend",
"iplb_home_tile_status_farms": "{{number}} server farm",
"iplb_home_tile_status_servers": "{{number}} server",
"iplb_home_tile_usage": "Utilizzo",
"iplb_home_tile_graph": "Grafica",
"iplb_home_tile_infos": "Informazioni",
"iplb_home_tile_infos_ipv4": "IPv4",
"iplb_home_tile_infos_ipv6": "IPv6",
"iplb_home_tile_infos_ip_failover": "IP Failover",
"iplb_home_tile_infos_ip_outbound": "IPv4 di uscita",
"iplb_home_tile_configuration": "Configurazione",
"iplb_home_tile_configuration_name": "Nome",
"iplb_home_tile_configuration_quota_max": "Quota mensile",
"iplb_home_tile_configuration_quota_alert": "Soglia di alert",
"iplb_home_tile_configuration_quota_unlimited": "Illimitato",
"iplb_home_tile_configuration_quota_cipher": "Ciphers",
"iplb_home_tile_configuration_quota_datacenter": "Localizzazioni",
"iplb_home_tile_configuration_private_network": "Reti private"
}
|
json
|
<reponame>learning-on-chip/planner
//! Formatting strategies.
use std::io::Write;
use Result;
use layout::Element;
/// A formatting strategy.
pub trait Format {
/// Perform the formatting.
fn write(&self, &[Element], &mut Write) -> Result<()>;
}
mod svg;
mod threed_ice;
pub use self::svg::SVG;
pub use self::threed_ice::ThreeDICE;
|
rust
|
import "./Box.css";
import React from "react";
const Box = ({ children, elevated, style }) => {
return (
<div style={style} className={`Box ${elevated && "elevated"}`}>
{children}
</div>
);
};
export default Box;
|
javascript
|
/**
* @module commutable
*/
/**
*
* This is the top level data structure for in memory data structures,
* and allows converting from on-disk v4 and v3 Jupyter Notebooks
*
*/
import * as v3 from "./v3";
import * as v4 from "./v4";
import { List as ImmutableList, Map as ImmutableMap, Record } from "immutable";
import { ImmutableCell } from "./cells";
import { CellId, JSONType } from "./primitives";
export interface NotebookRecordParams {
cellOrder: ImmutableList<CellId>;
cellMap: ImmutableMap<CellId, ImmutableCell>;
nbformat_minor: number;
nbformat: number;
metadata: ImmutableMap<string, any>;
}
export const makeNotebookRecord = Record<NotebookRecordParams>({
cellOrder: ImmutableList(),
cellMap: ImmutableMap(),
nbformat_minor: 0,
nbformat: 4,
metadata: ImmutableMap()
});
export type ImmutableNotebook = Record<NotebookRecordParams> &
Readonly<NotebookRecordParams>;
function freezeReviver<T extends JSONType>(_k: string, v: T) {
return Object.freeze(v);
}
export type Notebook = v4.NotebookV4 | v3.NotebookV3;
/**
* Converts a string representation of a notebook into a JSON representation.
*
* @param notebookString A string representation of a notebook.
*
* @returns A JSON representation of the same notebook.
*/
export function parseNotebook(notebookString: string): Notebook {
return JSON.parse(notebookString, freezeReviver);
}
export function fromJS(notebook: Notebook | ImmutableNotebook) {
if (Record.isRecord(notebook)) {
if (notebook.has("cellOrder") && notebook.has("cellMap")) {
return notebook;
}
throw new TypeError(
"commutable was passed an Immutable.Record structure that is not a notebook"
);
}
if (v4.isNotebookV4(notebook)) {
if (
Array.isArray(notebook.cells) &&
typeof notebook.metadata === "object"
) {
return v4.fromJS(notebook);
}
} else if (v3.isNotebookV3(notebook)) {
return v3.fromJS(notebook);
}
if (notebook.nbformat) {
throw new TypeError(
`nbformat v${notebook.nbformat}.${notebook.nbformat_minor} not recognized`
);
}
throw new TypeError("This notebook format is not supported");
}
/**
* Converts an immutable representation of a notebook to a JSON representation of the
* notebook using the v4 of the nbformat specification.
*
* @param immnb The immutable representation of a notebook.
*
* @returns The JSON representation of a notebook.
*/
export function toJS(immnb: ImmutableNotebook): v4.NotebookV4 {
const minorVersion: number | null = immnb.get("nbformat_minor", null);
if (
immnb.get("nbformat") === 4 &&
typeof minorVersion === "number" &&
minorVersion >= 0
) {
return v4.toJS(immnb);
}
throw new TypeError("Only notebook formats 3 and 4 are supported!");
}
/**
* Converts a JSON representation of a notebook into a string representation.
*
* @param notebook The JSON representation of a notebook.
*
* @returns A string containing the notebook data.
*/
export function stringifyNotebook(notebook: v4.NotebookV4) {
return JSON.stringify(notebook, null, 2);
}
|
typescript
|
{"contributors": null, "truncated": false, "text": "Are moderate muslims who executed the russian pilots ALSO not REAL muslims? #russia #putin #turkey #syria #abcnews24 #isis", "is_quote_status": false, "in_reply_to_status_id": null, "id": 669299005654896641, "favorite_count": 3, "source": "<a href=\"http://twitter.com/download/iphone\" rel=\"nofollow\">Twitter for iPhone</a>", "retweeted": false, "coordinates": null, "entities": {"symbols": [], "user_mentions": [], "hashtags": [{"indices": [76, 83], "text": "russia"}, {"indices": [84, 90], "text": "putin"}, {"indices": [91, 98], "text": "turkey"}, {"indices": [99, 105], "text": "syria"}, {"indices": [106, 116], "text": "abcnews24"}, {"indices": [117, 122], "text": "isis"}], "urls": []}, "in_reply_to_screen_name": null, "in_reply_to_user_id": null, "retweet_count": 1, "id_str": "669299005654896641", "favorited": false, "user": {"follow_request_sent": false, "has_extended_profile": false, "profile_use_background_image": true, "default_profile_image": false, "id": 311399175, "profile_background_image_url_https": "https://abs.twimg.com/images/themes/theme1/bg.png", "verified": false, "profile_text_color": "333333", "profile_image_url_https": "https://pbs.twimg.com/profile_images/666424746951639041/xgfvI3UA_normal.jpg", "profile_sidebar_fill_color": "DDEEF6", "entities": {"description": {"urls": []}}, "followers_count": 1273, "profile_sidebar_border_color": "C0DEED", "id_str": "311399175", "profile_background_color": "C0DEED", "listed_count": 40, "is_translation_enabled": false, "utc_offset": 39600, "statuses_count": 22834, "description": "if i told u,u wouldn't believe me proud dad 2Hannah&Aaron.Atheist Jew✡Cdn.Hungarian עם ישראל חי. ChiroToronto.Saluki breeder&judge.Cello.Saddlebredsmax.entropy", "friends_count": 2257, "location": "sydney", "profile_link_color": "0084B4", "profile_image_url": "http://pbs.twimg.com/profile_images/666424746951639041/xgfvI3UA_normal.jpg", "following": false, "geo_enabled": false, "profile_banner_url": "https://pbs.twimg.com/profile_banners/311399175/1439365282", "profile_background_image_url": "http://abs.twimg.com/images/themes/theme1/bg.png", "screen_name": "paddo_ron", "lang": "en", "profile_background_tile": false, "favourites_count": 7091, "name": "<NAME>", "notifications": false, "url": null, "created_at": "Sun Jun 05 11:33:15 +0000 2011", "contributors_enabled": false, "time_zone": "Sydney", "protected": false, "default_profile": true, "is_translator": false}, "geo": null, "in_reply_to_user_id_str": null, "lang": "en", "created_at": "Tue Nov 24 23:38:12 +0000 2015", "in_reply_to_status_id_str": null, "place": null, "metadata": {"iso_language_code": "en", "result_type": "recent"}}
|
json
|
version https://git-lfs.github.com/spec/v1
oid sha256:16b5fea94a71b88c4c829ae3c67d4558490eaa2d43f1aa53d7be0260c82b0e1f
size 510202
|
json
|
{"relation": [["", "", "", "", "", "", "", "", "", "", "", ">>"], ["", "1.", "2.", "3.", "6.", "8.", "9.", "4.", "5.", "7.", "10.", "11."], ["Date", "May 30, 10:14", "May 30, 11:19", "May 30, 11:39", "May 30, 14:48", "May 30, 17:15", "May 30, 19:49", "May 30, 12:38", "May 30, 12:55", "May 30, 16:10", "May 31, 02:05", "Jun 1, 04:57"], ["Subject", "Toilet trouble fix loaded onto shuttle", "Re: Toilet trouble fix loaded onto shut", "Antihistamine", "Re: Antihistamine", "Re: Antihistamine", "Re: Antihistamine", "Angelina?", "Perfect voice", "No subject", "I am a Registered Nurse, but....", "DO NOT DRINK AND TAKE PILLS!"], ["Author", "Jim", "Acleacius", "Acleacius", "banddirector", "Blue", "Retired", "LittleMe", "mag", "Retired", "steve", "shul"]], "pageTitle": "Out of the Blue - Blue's News Comments", "title": "", "url": "http://www.bluesnews.com/cgi-bin/board.pl?action=viewthread&boardid=1&threadid=88110&id=443949&view=threads", "hasHeader": true, "headerPosition": "FIRST_ROW", "tableType": "RELATION", "tableNum": 21, "s3Link": "common-crawl/crawl-data/CC-MAIN-2015-32/segments/1438042988061.16/warc/CC-MAIN-20150728002308-00231-ip-10-236-191-2.ec2.internal.warc.gz", "recordEndOffset": 327668657, "recordOffset": 327652263, "tableOrientation": "HORIZONTAL", "TableContextTimeStampAfterTable": "{39409=News CGI copyright \u00a9 1999-2015 James \"furn\" Furness & Blue's News. All rights reserved., 39612=Chatbear v1.4.0/blue++: Page generated 31 July 2015, 03:47. Chatbear Announcements., 37494=Copyright \u00a9 1996-2015 <NAME>. All rights reserved. All trademarks are properties of their respective owners.}", "textBeforeTable": "Toilet trouble fix loaded onto space shuttle. NASA flushed with success. Follow-up: Formula 'secret of perfect voice'. Bond gadgets: Never say they will never work. Thanks Digg. NASA picks \u201cbargain basement\u201d space technology candidates. Science: National Space Society Looking For A Space Ambassador To Fly On Virgin Galactic. Thanks Gizmodo. The Scoop on Fattening Ice Cream Flavors. Japan woman lived in man's closet. Stories: Spellblazer. Moss 2. Play: Thanks Ant and <NAME>z. Links in a Bottle: Time in a Bottle?\" But they never actually play the song. I wonder if this is a harbinger of a new trend... you could even do this with celebrities by having someone say: \"Do you know that actress <NAME>?\", without her actually appearing or endorsing the product. By the way. have you seen that TV commercial? It has the oddest approach to avoiding licensing fees I've ever noticed. It starts out saying: \"You know that song Well, I guess these", "textAfterTable": "\u00a0 Date Subject Author \u00a0 1. May 30, 10:14 Toilet trouble fix loaded onto shuttle Jim \u00a0 2. May 30, 11:19 \u00a0Re: Toilet trouble fix loaded onto shut Acleacius \u00a0 3. May 30, 11:39 Antihistamine Acleacius \u00a0 6. May 30, 14:48 \u00a0Re: Antihistamine banddirector \u00a0 8. May 30, 17:15 \u00a0\u00a0Re: Antihistamine \u00a0Blue\u00a0 \u00a0 9.", "hasKeyColumn": true, "keyColumnIndex": 3, "headerRowIndex": 0}
|
json
|
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<link rel="stylesheet" type="text/css" href="../style.css"/><script src="../highlight.pack.js"></script>
<title>ElasticInfo</title>
<base href="../"/>
<script src="search.js"></script>
</head>
<body><div class="breadcrumbs">
<table id="results"></table>
<input type="search" id="search" placeholder="Search" onkeyup="searchSubmit(this.value, event)"/>
vibe_elastic_logger.<a href="vibe_elastic_logger/logger.html">logger</a>.ElasticInfo</div>
<pre><code>public struct ElasticInfo
</code></pre><div class="section">
ElasticSearch server connection information.
</div>
<div class="section">
<h3>Variables</h3>
<table>
<tr><td><a href="vibe_elastic_logger/logger.ElasticInfo.hostName.html">hostName</a></td><td><pre><code>string</code></pre></td><td>Host name for the ElasticSearch server.</td></tr><tr><td><a href="vibe_elastic_logger/logger.ElasticInfo.portNumber.html">portNumber</a></td><td><pre><code>ushort</code></pre></td><td>Port for connecting to the ElasticSearch server.</td></tr><tr><td><a href="vibe_elastic_logger/logger.ElasticInfo.typeName.html">typeName</a></td><td><pre><code>string</code></pre></td><td>The log message's "type" within an index.</td></tr></table>
</div>
<script>hljs.initHighlightingOnLoad();</script>
</body>
</html>
|
html
|
{"id": 3029, "title": "Ticket #3029: job_dagman_large_dag test is failing often", "description": "<blockquote>\nIt seems like the job_dagman_large_dag started failing after dprintf 'flags' went into the repository at cd1b60d. The annoying thing is that it only fails sporadically, but more or less consistently on the x86_64_sol_5.11 x86_freebsd_7.4\tx86_rhap_5.8 x86_rhap_6.2 x86_sl_5.8 platforms.</blockquote>", "remarks": "<blockquote>\n<em>2012-Jun-04 14:49:28 by nwp:</em> <br/>\n\nMy understanding is that it is failing on 32-bit platforms. Greg believes it might be an issue of (systemwide) fd-limits.\n\n<p></p><hr/>\n<em>2012-Jun-05 16:57:20 by nwp:</em> <br/>\n\nIt looks like the log is being truncated when dagman starts up in recovery mode on these platforms.\n\n<p></p><hr/>\n<em>2012-Jun-06 09:04:02 by nwp:</em> <br/>\n\nLooks like line 323 in <code>src/condor_utils/dprintf_config.cpp</code> (commit b4934a0 -- master on 6 June 2012) is where the problem occurs:\n\n<p></p><div class=\"code\">\n<pre class=\"code\">DebugParams[param_index].want_truncate = dprintf_param_funcs->param_boolean_int(pname, DebugParams[param_index].want_truncate) ? 1 : 0;\n</pre></div>\n\nbacktrace in gdb shows the following:\n<div class=\"code\">\n<pre class=\"code\">#0 dprintf_config (subsys=0x66d2b0 \"DAGMAN\", p_funcs=0x7ffff7f56200, p_info=0x0, c_info=0) at /afs/cs.wisc.edu/u/n/w/nwp/CONDOR_SRC/src/condor_utils/dprintf_config.cpp:323\n#1 0x00007ffff7bfd1be in dc_main (argc=16, argv=0x7fffffffd868) at /afs/cs.wisc.edu/u/n/w/nwp/CONDOR_SRC/src/condor_daemon_core.V6/daemon_core_main.cpp:1949\n#2 0x0000000000430939 in main (argc=16, argv=0x7fffffffd868) at /afs/cs.wisc.edu/u/n/w/nwp/CONDOR_SRC/src/condor_dagman/dagman_main.cpp:1432\n</pre></div>\n\n\n<p></p><hr/>\n<em>2012-Jun-07 07:28:13 by nwp:</em> <br/>\n\nThis bug never appeared in a released version, so no version history is needed for this bug.</blockquote>", "derived_tickets": "", "attachments": "<html><head></head><body></body></html>", "check_ins": "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n<tbody><tr><td align=\"right\" valign=\"top\" width=\"160\">2012-Jun-07 07:07</td>\n<td align=\"center\" valign=\"top\" width=\"30\">\n<span class=\"icon dot\">\u00a0</span></td>\n<td align=\"left\" valign=\"top\"> \nCheck-in <span class=\"chng\"><a href=\"https://github.com/htcondor/htcondor/commit/4f462cc766ac53e245e9c7cf7b6727ab12c08877\">[32234]</a></span>: Watch your copy constructors <span class=\"ticket\"><a class=\"resolved\" href=\"/wiki-archive/tickets/?ticket=3029\" onclick=\"get_ticket_and_populate_wrapper('3029'); return false;\" title=\"job_dagman_large_dag test is failing often\">#3029</a></span> This seems to have fixed the job_dagman_large_dag test. (By <NAME> )</td></tr>\n</tbody></table>", "type": "defect", "last_change": "2013-Jan-29 14:11", "status": "resolved", "created": "2012-Jun-04 11:22", "fixed_version": "2012-Jun-04 11:22", "broken_version": "v070900", "priority": "3", "subsystem": "Tests", "assigned_to": "johnkn", "derived_from": "", "creator": "nwp", "rust": "", "customer_group": "other", "visibility": "public", "notify": "", "due_date": ""}
|
json
|
package main
import (
"fmt"
"log"
"net"
"os"
"github.com/finove/fsp"
"github.com/spf13/cobra"
)
var (
serverIP string
localPort, remotePort uint
serverPass, serverNewPass string
cmdLS, cmdGet, cmdSave, cmdPut string
showServerVersion bool
showClientVersion bool
)
var rootCmd = &cobra.Command{
Use: "fspclient",
Version: "1.0.1",
Short: "download file using fsp protocol",
Example: "some example usage",
Run: func(cmd *cobra.Command, args []string) {
var err error
var fspSession *fsp.Session
var addr *net.UDPAddr
var conn *net.UDPConn
addr, conn, err = getFSPServerIP()
if err != nil {
log.Printf("Failed, get fsp server ip %v", err)
return
}
fspSession, err = fsp.NewSessionWithConn(conn, addr.String(), serverPass)
if err != nil {
log.Printf("Failed, open fsp session %v", err)
return
}
if showServerVersion {
fmt.Printf("fsp server version: %s\n", fspSession.Version())
} else if cmdLS != "" {
err = fspSession.ShowDir(cmdLS)
if err != nil {
log.Printf("Failed, read dir %v", err)
}
} else if cmdGet != "" {
if len(cmdGet) > 0 && os.IsPathSeparator(cmdGet[len(cmdGet)-1]) {
err = fspSession.DownloadDirectory(cmdGet, cmdSave)
} else {
err = fspSession.DwonloadFile(cmdGet, cmdSave, 3)
}
if err != nil {
log.Printf("Failed, get file %s error %v", cmdGet, err)
}
} else if serverNewPass != "" {
err = fspSession.ChangePassword(serverNewPass)
if err != nil {
log.Printf("Failed, change password error %v", err)
}
} else if cmdPut != "" {
err = fspSession.UploadFile(cmdPut, cmdSave)
if err != nil {
log.Printf("Failed, upload file error %v", err)
}
}
fspSession.Close()
},
}
// Execute 执行命令行主程序
func Execute() {
if err := rootCmd.Execute(); err != nil {
fmt.Println(err)
os.Exit(1)
}
}
func init() {
rootCmd.Flags().StringVar(&serverIP, "ip", "", "fsp server ip:port")
rootCmd.Flags().UintVar(&localPort, "port", 0, "local port for used")
rootCmd.Flags().UintVar(&remotePort, "dport", 0, "fsp server port")
rootCmd.Flags().StringVarP(&serverPass, "password", "p", "", "fsp server password")
rootCmd.Flags().StringVar(&serverNewPass, "np", "", "change the password of FSP server")
rootCmd.Flags().StringVar(&cmdPut, "put", "", "upload file path")
rootCmd.Flags().StringVar(&cmdLS, "ls", "", "fsp command list files")
rootCmd.Flags().StringVarP(&cmdGet, "get", "g", "", "fsp command get files")
rootCmd.Flags().StringVarP(&cmdSave, "save", "s", "", "get file save path")
rootCmd.Flags().BoolVar(&showServerVersion, "server_version", false, "show server version")
}
func main() {
Execute()
return
}
func getFSPServerIP() (addr *net.UDPAddr, conn *net.UDPConn, err error) {
var localAddr *net.UDPAddr
if localPort > 0 {
localAddr, _ = net.ResolveUDPAddr("udp4", fmt.Sprintf(":%d", localPort))
}
if serverIP != "" {
addr, err = net.ResolveUDPAddr("udp4", serverIP)
if err != nil {
return nil, nil, err
}
conn, err = net.ListenUDP("udp4", localAddr)
} else {
err = fmt.Errorf("miss command line parameter, need -ip or -id or -mac value")
return nil, nil, err
}
return
}
|
go
|
Nuclear reactors contain very large amounts of radioactive isotopes—mostly fission products but also such heavy elements as plutonium. If this radioactivity were to escape the reactor, its impact on the people in the vicinity would be severe. The deleterious effects of exposure to high levels of ionizing radiation include increased probability of cancer, cellular damage, an increased number of developmental abnormalities in children exposed in the womb, and even death within a period of several days to months when irradiation is extreme (see radiation: Major types of radiation injury). For this reason, the primary consideration in the design of a reactor is ensuring that a significant release of radioactivity does not occur as a result of any plausible accident scenario. This is accomplished by a combination of preventive measures and mitigating measures. Preventive measures are those that are taken to avoid accidents, and mitigating measures are those that decrease the adverse consequences. In spite of the most stringent preventive and mitigating measures, however, it is still possible that accidents will reach an emergency scale, and in these cases, the nuclear industry and regulators have prepared a set of emergency responses.
Essentially, preventive measures are the set of design and operating rules that are intended to make certain that a reactor is operated safely. The nuclear industry in the United States created a design philosophy referred to as “defense in depth” that numerous other countries have also adopted. In a nuclear power plant following the defense-in-depth model, all safety systems are required to be functionally independent, inherently redundant, and diverse in design.
Among the most well-known preventive measures are the reports and inspections for double-checking that a plant is properly constructed, rules of operation, and qualification tests for operating personnel to ensure that they know their jobs. Nuclear reactors must operate under a very high standard of quality assurance, requiring staff members to audit, evaluate, survey, and verify that all procedures and maintenance are being performed as they should be.
An important part of a safety system is strict adherence to design requirements: the reactor must have a negative power-reactivity coefficient; the safety rods must be injectable under all circumstances; and no single regulating rod should be able to add substantial reactivity rapidly. Another important design requirement is that the structural materials used in the reactor must retain acceptable physical properties over their expected service life. Finally, construction is to be covered by stringent quality-assurance rules, and both design and construction must be in accordance with standards set by major engineering societies and accepted by regulatory bodies.
Since no human activity can be shown to be absolutely safe, all these measures cannot reduce the risks to zero. However, it is the aim of the regulations and safety systems to minimize risks to the point where a reasonable individual would conclude that they are trivial. What this de minimis risk value is, and whether it has been achieved by the nuclear industry, is a subject of bitter controversy, but it is generally accepted that independent regulatory agencies—the United States’ Nuclear Regulatory Commission (NRC), the United Kingdom’s Office for Nuclear Regulation (ONR), the International Atomic Energy Agency (IAEA), and similar agencies around the world—are the proper judges of such matters.
Prior to the development of current preventive-design philosophies, the world’s first large-scale nuclear reactor accident took place in October 1957 at Windscale, Cumberland (now part of Cumbria), northwestern England. The Windscale plant was powered by a pair of identical reactors, known as Piles 1 and 2, that were an air-cooled, graphite-moderated design. Initially constructed between 1946 and 1950 to produce plutonium for nuclear weapons, they also provided energy for electricity production. However, with Britain fully engaged in the nuclear arms race, the reactors’ operations were subject to direct political influence, and Windscale engineers were driven to modify the fuel design in order to increase plutonium and tritium production. These modifications increased heat generation in the fuel and therefore temperature levels within the reactor cores.
After approximately seven years of successful operation, the increased production rate became too much for Pile 1 to handle. Possibly as a result of imperfections in one of the fuel elements, the core began to overheat, and fire broke out within the lithium-magnesium-clad uranium fuel slug. In an attempt to remove heat from the core, operators turned on all the reactor’s air-cooling fans. Unfortunately, this only fanned the flames and spread the fire through the core region. In addition, a significant amount of radioactive contamination was released through the ventilation stacks when the fans were turned on. Operators ultimately put out the fire by turning the fans off and forcing water through the core.
The Windscale event caused much less damage than the Three Mile Island, Chernobyl, and Fukushima accidents of later years (see below). Nevertheless, it provided an explicit demonstration that political agendas (in this case, participation in the nuclear arms race) must be separated from those of energy and safety.
In 1972, as part of an effort to evaluate the risks from nuclear power plants, the U.S. Atomic Energy Commission (a predecessor of the NRC) authorized a major safety study. Conducted with major assistance from a number of laboratories, the AEC’s study involved the application of probabilistic risk assessment (PRA) techniques for the first time on a system as complex as a large nuclear power reactor. Also for the first time, the study compared the risk of a nuclear power plant accident with other events such as natural disasters and human-caused events. This work resulted in the publication in 1975 of a report titled Reactor Safety Study, also known as WASH-1400. The most useful aspect of the study was its delineation of components and accident sequences (scenarios) that were determined to be the most significant contributors to severe accidents.
The Reactor Safety Study concluded that the risks of an accident that would injure a large number of people were extremely low for the light-water reactor (LWR) systems being analyzed. This conclusion, however, was subject to very large quantitative uncertainties and was challenged. One basic problem with PRA techniques is that it cannot easily be confirmed by experience when the level of risk has been reduced to low values. That is to say, if PRA predicts that a reactor is subject to, say, one failure in 10,000 years, there is no way to prove that statement with only a few, or even with 10,000, years of experience. Thus, the results of the Reactor Safety Study as to risk levels were not confirmable. Nevertheless, updated versions of the report still provide the framework and reference for nuclear-related probability risk assessment.
|
english
|
Kathmandu - CPN (UML) Secretary Pradip Kumar Gyawali has said that the cabinet would get a complete shape by Wednesday.
At a programme in the capital city today, Gyawali said the current government would be devoted to the country's prosperity and the size of the government would be small one as directed by the constitution.
"Our taskforce has recommended to make 15 ministries. Now, some ministries would be integrated while some others would be dissolved," the UML leader added.
Strengthening of the democracy, safeguarding national interests, maintaining good governance by ending corruption, spurring investment for prosperity and implementing the federal constitution would the new government's priorities, Gyawali said.
|
english
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.