我在端口8080和9080上运行了两个iKaaro实例,其中9080实例是只读的.
我不确定如何使用nginx例如,如果请求方法是POST,PUT,DELETE然后发送到写实例(8080),否则发送到9080实例.
我使用正则表达式使用该位置做了一些事情,但这不正确.
从http://wiki.nginx.org/HttpLuaModule我看到有可以调用的'HTTP方法常量',所以添加位置块是正确的:
location ~* "(ngx.HTTP_POST|ngx.HTTP_DELETE|ngx.HTTP_PUT)" {
proxy_pass http://127.0.0.1:8080;
Run Code Online (Sandbox Code Playgroud)
谢谢
我有一个用例,我有一个AWS Step功能,当文件上传到S3时触发,从那里第一步运行ffprobe从外部服务获取文件的持续时间,如transloadit,其中写入输出回到S3.
我可以从该事件创建一个新的step函数,但是如果可以在原始step函数中有一个Await promise然后继续到下一个函数,我就会徘徊 - 考虑到ffprobe可能需要更长的时间才能恢复.
任何建议都非常感谢如何解决这个问题.
我在一个github项目中有几个文件夹,每个文件夹都有一个不同的.travis.yml文件.
设置travis-ci的正确方法是什么,以便我可以指定要构建的文件夹/子项目?
我可以添加,before_script: cd function但是有一种方法可以触发基于构建的功能在develop分支上更新- 基本上我不想触发构建,如果我更新子文件夹.
任何建议都非常感谢
在任何投影的地图数据中使用一些D3js代码和投影的topojson数据,我该如何找回地理坐标?这样的东西:
var svg = d3.select("#viz").append("svg:svg")
.attr("width", 320)
.attr("height", 200)
.on("mousedown", mousedown)
.on("click", mouselocation);
Run Code Online (Sandbox Code Playgroud)
如何通过点击D3js地图可视化来获取地理坐标?
欢迎使用演示链接.
编辑:相关演示列表:
projection.invert(d3.mouse(this))我正在使用 Windows WSL 并尝试配置 python 以连接到 MSSQL
和
但是当我按照https://docs.microsoft.com/en-us/sql/connect/python/pyodbc/step-3-proof-of-concept-connecting-to-sql-using-pyodbc运行示例连接时我收到此错误:
Traceback (most recent call last):
File "users.py", line 9, in <module>
cnxn = pyodbc.connect('DRIVER={ODBC Driver 17 for SQL Server};SERVER='+server+';DATABASE='+database+';UID='+username+';PWD='+ password)
pyodbc.Error: ('01000', u"[01000] [unixODBC][Driver Manager]Can't open lib '/opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.2.so.0.1' : file not found (0) (SQLDriverConnect)")
Run Code Online (Sandbox Code Playgroud)
文件已存在:
khinester@win ? /c/Users/norman/Projects/sysadmin ? ? master ? ?1 ?2 ? ls /opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.2.so.0.1 ? ? ? 5619 ? 15:52:53
-rwxr-xr-x 1 root root 18M Jul 3 2018 /opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.2.so.0.1
Run Code Online (Sandbox Code Playgroud)
非常感谢有关如何解决此问题的任何建议
我使用http://jamuhl.github.com/i18next本地化静态网站.
我的初始化脚本是:
jQuery(function($) {
var setLng = $.url().param('setLng');
if (setLng)
{
language_complete = setLng.split("-");
}
else
{
language_complete = navigator.language.split("-");
}
language = (language_complete[0]);
console.log("I speak (root): %s", language);
i18n.init({ lng: language, debug: true }, function() {
// save to use translation function as resources are fetched
$(".tzm-i18n").i18n();
$(".page-i18n").i18n();
$(".menu-i18n").i18n();
$(".user-i18n").i18n();
$(".search-i18n").i18n();
$(".footer-i18n").i18n();
});
// language selector
var lngSld = false;
$('.lng_trigger').click(function() {
Run Code Online (Sandbox Code Playgroud)
这是HTML:
<div id="page" class="page-i18n">
<!--${languages} Bread crumbs -->
<p data-i18n="welcome.p1"></p>
<p data-i18n="welcome.p2"></p>
</div>
<li id="set-lang"><!-- …Run Code Online (Sandbox Code Playgroud) 我有以下文档类型
{
"_id" : "-fA2845ORqeyMUItKXfqZw",
"user" : "553247ffdc8a4ade4bb09c5e",
"state" : 2,
"metadata" : {
"language" : "en-US"
},
"pipeline" : {
"api" : "http://localhost:4000",
"provider" : 0
},
"ingest" : {
"mimetype" : "audio/mpeg",
"size" : 92794268,
"client" : "computer",
"isWriteable" : true
},
"assembly" : {
"ok" : "ASSEMBLY_EXECUTING",
"message" : "The assembly is currently being executed.",
"assembly_id" : "23f29680b32911e59d48f358b85e112d",
"parent_id" : null,
"template_id" : null,
"bytes_received" : 1265,
"bytes_expected" : null,
"upload_duration" : 0.079,
"client_agent" : null,
"client_referer" …Run Code Online (Sandbox Code Playgroud) mongodb mongodb-query aggregation-framework mongodb-aggregation
当我运行此命令时:
ffmpeg -y -i ./in.mp4 -c:v png -f image2pipe -thread_queue_size 1024 -r 25 -t 186.75 -i - -filter_complex overlay=0:0 -c:v libx264 -pix_fmt yuv420p -movflags +faststart ./out.mp4 < ./out.png
Run Code Online (Sandbox Code Playgroud)
我收到一个错误:
(git)-[master]
ffmpeg version 2.8.11-0ubuntu0.16.04.1 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609
configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse …Run Code Online (Sandbox Code Playgroud) 我已将https://github.com/aws-samples/amazon-elasticsearch-service-with-cognito部署到我的堆栈中,并尝试master按照https://docs.aws.amazon.com/elasticsearch添加一个组-service/latest/developerguide/fgac.html#fgac-walkthrough-iam
diff --git a/lib/search-stack.ts b/lib/search-stack.ts
index 85de0c0..2493c92 100644
--- a/lib/search-stack.ts
+++ b/lib/search-stack.ts
@@ -3,7 +3,7 @@
import { Fn, Stack, Construct, StackProps, CfnParameter, CfnOutput } from '@aws-cdk/core';
import { CfnDomain } from '@aws-cdk/aws-elasticsearch';
-import { UserPoolAttribute, CfnUserPoolDomain, CfnIdentityPool, CfnIdentityPoolRoleAttachment, CfnUserPool } from '@aws-cdk/aws-cognito';
+import { UserPoolAttribute, CfnUserPoolDomain, CfnIdentityPool, CfnIdentityPoolRoleAttachment, CfnUserPool, CfnUserPoolGroup } from '@aws-cdk/aws-cognito';
import { Role, ManagedPolicy, ServicePrincipal, FederatedPrincipal } from '@aws-cdk/aws-iam';
import { CustomResource } from '@aws-cdk/aws-cloudformation';
@@ -55,6 …Run Code Online (Sandbox Code Playgroud) 我试图做一个基本的jplayer文本链接点击播放MP3文件,但我无法让它运行,因为没有声音.这是代码
$(document).ready(function(){
$("#jquery_jplayer").jPlayer({
ready: function (event) {
$('.voice').click(function(e) {
e.preventDefault();
$(this).jPlayer("setFile", $(this).attr('href')).jPlayer("play");
});
},
swfPath: "/ui/core/js/jPlayer/",
supplied: "mp3",
wmode: "window"
});
Run Code Online (Sandbox Code Playgroud)
});
这是html:
<table>
<tr>
<td>
<a href="music.mp3" class="voice">Listen</a>
</td>
</tr>
</table>
<div id="jquery_jplayer"></div>
Run Code Online (Sandbox Code Playgroud)
我错过了什么?
谢谢