使用 通过 -
,列为 id
转换为索引带有 > - 然后将浮子转换为整数,重命名
列 3
并创建3列dataframe:
df = df.set_index('id')
df.columns = df.columns.str.split('-', expand=True)
df = (df.stack()
.rename_axis(('id','instance'))
.rename(int, level=1)
.rename(columns={'3':'measure'})
.reset_index()[['id','measure','instance']]
)
print (df)
id measure instance
0 1 20 0
1 1 10 1
2 1 5 2
3 2 21 0
4 2 11 1
5 2 6 2
6 3 19 0
7 3 29 1
8 3 7 2
9 4 18 0
10 4 12 1
11 4 8 2
with wide_to_long
用指定 3
-
和Regex r'\ d+\。\ d+'用于匹配浮点:
df = (pd.wide_to_long(df,
stubnames=['3'],
i='id',
j='instance',
sep='-',
suffix=r'\d+\.\d+')
.rename(int, level=1)
.sort_index()
.rename(columns={'3':'measure'})
.reset_index()[['id','measure','instance']])
print (df)
id measure instance
0 1 20 0
1 1 10 1
2 1 5 2
3 2 21 0
4 2 11 1
5 2 6 2
6 3 19 0
7 3 29 1
8 3 7 2
9 4 18 0
10 4 12 1
11 4 8 2
奖金:从一部分的一部分修改列的解决方案之前的列名称 -
:
df = df.set_index('id')
df.columns = df.columns.str.split('-', expand=True)
df = (df.stack()
.rename_axis(('id','instance'))
.rename(int, level=1)
.reset_index()
)
print (df)
id instance 3 4
0 1 0 20 10
1 1 1 10 5
2 1 2 5 20
3 2 0 21 11
4 2 1 11 6
5 2 2 6 21
6 3 0 19 29
7 3 1 29 7
8 3 2 7 19
9 4 0 18 12
10 4 1 12 8
11 4 2 8 18
df = (pd.wide_to_long(df,
stubnames=['3','4'],
i='id',
j='instance',
sep='-',
suffix=r'\d+\.\d+')
.rename(int, level=1)
.sort_index()
.reset_index())
print (df)
id instance 3 4
0 1 0 20 10
1 1 1 10 5
2 1 2 5 20
3 2 0 21 11
4 2 1 11 6
5 2 2 6 21
6 3 0 19 29
7 3 1 29 7
8 3 2 7 19
9 4 0 18 12
10 4 1 12 8
11 4 2 8 18
首先,您需要检查git日志文件,并查看它避开您的消息,例如,这是我的git日志:
⧗输入:壮举:: sparkles :( 这是我的提交消息)
(在这里,是我的提交消息的较长描述)✖标题
必须不超过100个字符,当前长度为102
[标头 - 最大长度]✖发现了1个问题,0警告ⓘ获得帮助:
https://github.com/github.com/conventional-commitlink/commitlint/commitlint/commitlint/commitlint/what----- IS-Commitlint沙哑的 - commit -msg挂钩,用代码1(错误)
退出
挂钩看到问题是关于标题(提交消息)超过100个字符的标头式长度,因此您应该使其更短。
以下代码来自以前的条纹评估阶段。但是它奏效了。减少您的需求。
请记住将您的秘密键发布到服务器上,以便服务器可以与Stripe交谈。
code.dart
Future<bool> payWithPaymentSheet(
ProductModel productModel, PriceModel priceModel,
{String merchantCountryCode = 'DE'}) async {
if (kIsWeb) {
throw 'Implementation not availabe on Flutter-WEB!';
}
String uid = AuthService.instance.currentUser().uid;
String email = AuthService.instance.currentUser().email ?? '';
HttpsCallableResult response;
try {
response = await FirebaseFunctions
.httpsCallable('createPaymentIntent')
.call(<String, dynamic>{
'amount': priceModel.unitAmount,
'currency': priceModel.currency,
'receipt_email': email,
'metadata': {
'product_id': productModel.id,
'user_id': uid,
"valid_until": productModel.getUntilDateTime().toIso8601String(),
'product_name': productModel.name.tr,
},
'testEnv': kDebugMode,
});
} on FirebaseFunctionsException catch (error) {
log(error.code);
log(error.details);
log(error.message ?? '(no message)');
Get.snackbar(
error.code,
error.message ?? '(no message)',
icon: const Icon(Icons.error_outline),
);
return false;
}
Map<String, dynamic> paymentIntentBody = response.data;
await Stripe.instance.initPaymentSheet(
paymentSheetParameters: SetupPaymentSheetParameters(
paymentIntentClientSecret: paymentIntentBody["clientSecret"],
currencyCode: priceModel.currency,
applePay: false,
googlePay: false,
merchantCountryCode: merchantCountryCode,
merchantDisplayName: Strings.appName,
testEnv: kDebugMode,
customerId: paymentIntentBody['customer'],
customerEphemeralKeySecret: paymentIntentBody['ephemeralKey'],
));
try {
await Stripe.instance.presentPaymentSheet();
return true;
} on StripeException catch (e) {
log(e.error.code.name);
log(e.error.message ?? '(no message)');
log(e.error.localizedMessage ?? '(no message)');
Get.snackbar(e.error.code.name, e.error.message ?? '',
icon: const Icon(Icons.error_outline));
} catch (e) {
Get.snackbar('An unforseen error occured', e.toString(),
icon: const Icon(Icons.error_outline));
}
return false;
}
index.ts
// SETTING SECRET KEY ON SERVER:
// cd functions
// firebase functions:config:set stripe.secret_key="sk_live_51L...Noe"
// firebase deploy --only functions
let stripe = require("stripe")(functions.config().stripe.secret_key);
exports.createPaymentIntent = functions
.https.onCall((data, context) => {
// if (!context.auth) {
// return { "access": false };
// }
return new Promise(function (resolve, reject) {
stripe.paymentIntents.create({
amount: data.amount,
currency: data.currency,
receipt_email: decodeURIComponent(data.receipt_email),
metadata: data.metadata,
}, function (err, paymentIntent) {
if (err != null) {
functions.logger.error("Error paymentIntent: ", err);
reject(err);
}
else {
resolve({
clientSecret: paymentIntent.client_secret,
paymentIntentData: paymentIntent,
});
}
});
});
});
如果不存在组ID,则无法获得图API的结果。
它始终返回 request_resourcenotfound。”资源'xxxx-xxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxxxxxx'不存在或存在其查询的参考 - 普罗伯特对象之一,而不是存在
删除 li 填充,并添加宽度100%,并填充到 a tag
li.nav-item > a, li.nav-item > .dropdown show a{
display: block;
width: 100%;
}
.navbar {
position: relative;
min-height: 40px !important;
margin-bottom: 20px;
border: none !important;
}
li.nav-item a{ padding: 10px 0px;}
#navbarSupportedContent .nav-item {
text-transform: uppercase;
text-align: center;
font-weight: 800;
border-right: 1px solid #01154D;
padding: 0px 24px;
}
#navbarSupportedContent .nav-item:hover {
background-color: #DBDDFD;
color: #000 !important;
}
<div role="navigation">
<div class="container">
<div id="undefined-sticky-wrapper" class="sticky-wrapper" style="height: 42px;"><nav class="navbar navbar-expand-lg navbar-dark bg-primary sticky-top">
<div class="collapse navbar-collapse justify-content-center" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto" style="float:inherit;">
<li class="nav-item active">
<a class="nav-link" href="/webcenter/portal/dummy/pages_en">
<span id="submenu1">Home</span>
</a>
</li>
<li class="nav-item ">
<a class="nav-link" href="/webcenter/portal/dummy/pages_employeetools">
<span id="submenu1">Employee Tools</span>
</a>
</li>
<li class="nav-item ">
<div class="dropdown show">
<a style="color:#e6ecf2;" aria-expanded="false" aria-haspopup="true" class="dropdown-toggle" data-toggle="dropdown" href="#" id="dropdownMenuLink" role="button">MEDIA CENTER</a>
<div aria-labelledby="dropdownMenuLink" class="dropdown-menu">
<a class="dropdown-item" href="/webcenter/portal/dummy/pages_mediacenter/photogallery">PHOTO GALLERY</a>
<a class="dropdown-item" href="/webcenter/portal/dummy/pages_mediacenter/news1">NEWS</a>
<a class="dropdown-item" href="/webcenter/portal/dummy/pages_mediacenter/newpage">dummy MAGAZINE</a>
<a class="dropdown-item" href="/webcenter/portal/dummy/pages_mediacenter/ashurtiassagheer">dummy</a>
</div>
</div>
</li>
<li class="nav-item ">
<a class="nav-link" href="/webcenter/portal/dummy/pages_documents">
<span id="submenu1">Documents</span>
</a>
</li>
<li class="nav-item"><a data-afr-tlen="7" id="T:arabic2" class="nav-link xej" style="font-size: initial;" onclick="this.focus();return false;" data-afr-fcs="true" href="#"><span style="">العربية</span>
<i aria-hidden="true" class="fa fa-language"></i></a>
</li>
<li class="nav-item" style="margin-left: auto;"><span id="T:wcLogoutLink:spacesActionPGL" class="x1a"><a data-afr-tlen="0" id="T:wcLogoutLink:logoutLink" title="Log out of WebCenter Portal" class="nav-link glyphicon glyphicon-log-out xf0 p_AFTextOnly" style="" onclick="this.focus();return false;" data-afr-fcs="true" href="#"></a></span>
</li>
</ul><span id="T:search2" class="x1a">
<div class="navbar-form navbar-left visible-xs" id="searchxs"><div id="T:searchbox2" class="x131" aria-live="polite"><div style="display:none"><a id="T:searchbox2:_afrCommandDelegate" class="xej" onclick="this.focus();return false;" data-afr-fcs="true" href="#"></a></div></div>
</div></span>
</div>
</nav></div>
</div>
</div>
方法 bodies.Rectangle
调用 vertices.chamfer
,如这些倒角属性是对象。但是,如果您通过一个数字,它将将相同的倒角号应用于与在这里。
通过文档,我们发现::
半径参数是单个数字或一个数组来指定每个顶点的半径。
对于矩形,顶点是从左上方开始的。毕竟,要倒角左上角和右上角,代码应为:
Bodies.rectangle(x, y, w, h, {
chamfer: {
radius: [5,5,0,0]
}
})
这不是一个完整的答案,而是API参考。
'''
nvmlreturn_t nvmlunitgethandlebyIndex(unsigned int index,nvmlunit_t *单元)
目标单位的索引,&gt; = 0 and&lt;单位单位参考
返回单元手柄的
返回
‣nvml_success是否已设置单位
‣nvml_error_uninitialialized如果未成功初始化库,
则‣nvml_error_invalid_argument(如果索引无效或单位为null null null null null
nvml_error_error_unknown null‣nvml_error_unknown上的任何出乎意料的错误
描述
都会在其特定的单位上获得其特定单位的index,则该单位。
对于S级产品。&lt;&lt; - 什么是S级产品。
返回的UnitCount得出的
有效索引是从NVMlunitGetCount() 。例如,如果UnitCount为2,则有效索引
为0和1,对应于单元0和单元1。
尝试先拉图像,然后创建部署。
minikube image pull mongo
upd :有时甚至图像拉
无济于事。 Minikube开发人员说,您可以卷曲检查是否可以连接到回购。也可能存在ISP问题。临时将我的ISP更改为移动数据,并且安装所需的POD对我有用。
您应该使用 argsort
:
导入numpy作为NP
A = np.array([[[0, 1],[0, 2],[1, 3],[2, 3],[2, 5],[3, 4],[3, 6],[4, 7],[5, 6],[6, 7]]])
B = np.array([[[10],[20],[30],[40],[50],[60],[70],[80],[90],[100]]])
idxs = np.argsort(A, axis=1)
A1 = np.take_along_axis(A, idxs, axis=1)
B1 = np.take_along_axis(B, idxs, axis=1)
除了我的评论外,您可能可以仔细检查您在全球导入的插件的侧面,并且在初始负载中影响您的页面。
https://bundlephobia.com/package/package/package/ [email&nbsp; prectioned]
vue-html2pdf
vue-html2pdf in 很重很重。由于您在全球加载它,因此没有帮助JS解析/执行时间。
另外,考虑一些部分水合元框架,例如:
如果您想完全跳过水合价格。
当然,也可以通过使用 vue-lazy-hydration 。
只需键入您要使用用户许可执行的命令,如果您不想更改权限:
pip install pygame --user
如果要更改用户权限,请按照以下步骤操作:
只需 更改访问权限,其中特定软件包将安装。
在 Windows 10 上:
- 转到安装文件夹。例如:
c:\ program文件(x86)\ python37
- 右键单击python安装root,然后单击
properties
。在这种情况下,python37
文件夹。 - 转到
安全性
选项卡,单击编辑
按钮,并允许完全控制 用户组。请记住单击应用
。 - 尝试再次安装软件包。
SQL Server(Express)中的分布式交易依赖于MSDTC,而MSDTC作为Azure SQL数据库不存在的MSDTC。在同一交易中,您不能在本地数据库和云数据库中包含插入物。也许您最好是基于更改跟踪?
Distributed transactions in SQL Server (Express) relies on MSDTC which does not exist for cloud services as Azure SQL Database. You cannot include an insert in your local db and in cloud db in the same transaction. Perhaps you are better off with building a solution based on change tracking?
SQL Server 2019 Express:从 /写入到SQL Server数据库(无服务器) - 在SSM中工作,但在插入触发器中失败