我对IIS的重写并不非常熟悉,但是我已经检查了他们的doc ,它似乎非常接近nginx。
在NGINX上,建议使用返回
(如果可能)( doc在这里)。 {r:0}
与在这种情况下,。
您也可以与〜*
结合使用,这是“正则表达式”,该表达式用前面的“〜*”修饰符(对于不敏感的匹配)( doc there )。 ^/...
表示它需要从它开始(例如,以/wuneng-platform-web
以及此后的其他任何内容开始(。*)
。
http {
## ...
server {
## ...
location ~* ^/(auth|platform-admin|product|substation-admin)(.*) {
return 301 https://google.com$request_uri;
}
location ~* ^/(wuneng-platform-web|wuneng-channel-web|wuneng-web|wuneng-user-web|mini-program)(.*) {
return 301 https://api.google.com$request_uri;
}
## ...
}
## ...
}
现在有效:
.onDrop(of: [UTType.utf8PlainText], isTargeted: $isDropping) { providers in
_ = providers.first?.loadItem(forTypeIdentifier: "public.utf8-plain-text") { data, error in
if let error = error { print(error.localizedDescription) }
if let data = data as? Data {
DispatchQueue.main.async {
let string = NSString(data: data, encoding: 4) ?? "failed"
print(string)
self.array2.insert(Item(title: string as String, url: URL(string: "http://www.apple.com")!), at: 0)
}
}
}
return true
}
vadeout文档: https://api.jquery.com/fadeout/
代码>需要2个参数 - 持续时间和回调。因此,只需将其设置为较慢并在第二个元素上调用 fadein
即可;
function fadeImages($first, $second){
$first.fadeOut(1000, () => $second.fadeIn(1000));
}
工作示例:
/////////////////scripts///////////////////////
function fadeSquares($el1, $el2){
$el1.fadeOut(2000, ()=>{
$el2.fadeIn(2000);
});
}
/////////////////execute///////////////////////
let $el1 = $('#red');
let $el2 = $('#blue');
fadeSquares($el1, $el2);
.square {
height: 100px;
width: 100px;
}
#red {
background-color: red;
}
#blue {
background-color: blue;
display: none;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div id='wrapper'>
<div id='red' class='square'>a red square</div>
<div id='blue' class='square'>a blue square</div>
</div>
请注意,V5的此更改
是通过标头,不再使用标题类。使用RequestConfiguration修饰符添加标题如下
var user = await graphServiceClient
.Users["{user-id}"]
.GetAsync(requestConfiguration => requestConfiguration.Headers.Add("ConsistencyLevel","eventual"));
按照您发布的内容,您在tbl_api_data -id,cui_id上有一个复合索引。在SQL中,您将使用“ CUI_ID”字段的另一个表加入此表,并且您还将此字段用于组。但是,您还没有在此字段上添加索引。那可能是原因。
请记住,您发布的复合索引不能用于此连接和组,因为“ CUI_ID”不是最左侧的字段(或复合索引中的第一个字段)。
因此,尝试在“ CUI_ID”上添加单独的索引
由于您的时间重叠跨度,我认为我们可以 lapply
在您的结束日期上,稍微突变一些数据,然后使用普通 ggplot2
审美学来为它们着色。
spans <- bind_rows(lapply(mdy("11/10/2010", "11/10/2011", "11/10/2012", "11/10/2013"), function(end) {
filter(minex, between(dts, end - (365 + 180), end)) %>%
mutate(day = day - min(day), end = end)
}))
ggplot(spans, aes(day, v1)) +
geom_point(aes(color = factor(end)))
您可以通过快速摘要看到每个范围:
spans %>%
group_by(end) %>%
summarize(startdate = min(dts), enddate = max(dts))
# # A tibble: 4 x 3
# end startdate enddate
# <date> <date> <date>
# 1 2010-11-10 2010-01-01 2010-11-10
# 2 2011-11-10 2010-05-14 2011-11-10
# 3 2012-11-10 2011-05-15 2012-11-10
# 4 2013-11-10 2012-05-14 2013-11-10
我将实现我在评论中所说的禁用属性策略:
$("#myfile").on("change", function() {
if ($("#myfile")[0].files.length > 4) {
alert("You can select only 4 images");
$(".form-control").prop("disabled",true);
}
});
使用上述代码,用户将无法提交表格
CLI适用于Windows 8和更高版本。我在较旧的笔记本电脑上发现了这个问题,尝试了所有内容使其在这家笔记本电脑上使用。
现在,当我将操作系统升级到Win11 ..工作时,它可以工作。
-pix_fmt
选项需要是输出选项,而不是输入以使输出格式为灰度。尝试
ffmpeg -framerate 1 -r 30 -i C:\%d.png \
-vcodec libx264 -pix_fmt gray -crf 0 C:\test.mkv
说明
这里有几个基本的OOP 错误。
首先,为什么当您的 Maze
类创建一个实例时,当您的 generateMaze
类是 static
,然后返回迷宫作为<代码>布尔值[] [] 而不是迷宫
。您可能打算将数组作为类的字段,而不是直接通过迷宫实例访问数组。
接下来, walk
方法是非静态的,并且是 Walker
实例的一部分。因此,您需要创建该类的实例并在该实例上调用该方法。
迷宫生成
您可能打算这样做:
public final class Maze {
// Arrays as field of maze instances
private boolean[][] mazeArray;
// return maze instance instead of array
public static Maze generateMaze(int width, int height) {
// create maze instance
Maze maze = new Maze();
// manipulate array of that maze instance
maze.mazeArray = new boolean[width][height];
for (int x = 0; x < width; x++) {
maze.mazeArray[x][0] = true;
}
for (int y = 0; y < height; y++) {
maze.mazeArray[0][y] = true;
}
// return the maze, not its array
return maze;
}
}
呼叫
Maze maze = Maze.generateMaze(2, 2);
使用构造函数
或更好的
public final class Maze {
private final boolean[][] mazeArray;
public Maze(int width, int height) {
mazeArray = new boolean[width][height];
for (int x = 0; x < width; x++) {
mazeArray[x][0] = true;
}
for (int y = 0; y < height; y++) {
mazeArray[0][y] = true;
}
}
}
,使用构造函数:并在 main
中这样称呼它:
Maze maze = new Maze(2, 2);
工厂
您仍然可以将其与出厂方法相结合,如果您真的想要。但是创建逻辑应该在(可能 private
)构造函数中:尽管如此,
public final class Maze {
private final boolean[][] mazeArray;
private Maze(int width, int height) {
mazeArray = new boolean[width][height];
for (int x = 0; x < width; x++) {
mazeArray[x][0] = true;
}
for (int y = 0; y < height; y++) {
mazeArray[0][y] = true;
}
}
public static Maze generate(int width, int height) {
return new Maze(width, height);
}
}
请将其称为:
Maze maze = Maze.generate(2, 2);
Walker
现在,您需要一个 Walker
类的实例,并在此上调用该方法,让它成为您刚刚产生的迷宫:
Maze maze = new Maze(2, 2);
Walker walker = new Walker();
walker.walk(maze);
使用 pack
cli,您可以运行 pack config config concortry-mirrors add&lt;登记室&gt; [-m&lt; irrile ...] [flags]
,ex: pack config config注册表添加index.docker.io - mirror 10.0.0.1
其中 10.0。 0.1
是您的私人注册表。
在Spring Boot的Gradle支持中,您拥有 docker.builderregistry
和 docker.publishremegrighregistry
设置,但是这些主要用于提供凭证,以提供用于用于用于用于使用的凭据。从注册表中获取或发布图像。他们在这里不完全做我们需要的事情。
支持镜像功能,例如 pack pack pack pack
cli,目前不是一个选项。一个已经打开了以跟踪此的支持'将在以后的版本中提供。
同时,您可以将 pack
cli带有上面的镜像选项来构建图像。
测试/验证的快速方法:
-
运行
docker run -d -d -p 5000:5000 -restart = ewland -name = registry -e consistry_proxy_remoteurl = https://registry-1.docker.io cumigistr :2
。这将运行一个本地注册表,该注册表镜像docker hub 。 -
运行
PACK配置注册表 - mirrors add'*' - mirror localhost:5000
告诉pack
cli使用注册表镜子。 -
运行
Pack Build
针对您的应用程序。您应该看到以下输出:
Using mirror localhost:5000/paketobuildpacks/builder:base for index.docker.io/paketobuildpacks/builder:base
base: Pulling from paketobuildpacks/builder
83525de54a98: Pulling fs layer
807f554cf05f: Pulling fs layer
...
如果看到该行,则知道它的工作正常。
您还应该在 pack
config:
> cat ~/.pack/config.toml
[registry-mirrors]
"*" = "localhost:5000"
这意味着您已经正确设置了注册表镜子。
的确,没有办法将过滤器传递给pandas的'或dask的read_csv函数,因此这是Intake的CSV驱动程序支持的选项。
但是,进气口支持数据集变换: https://intake.readthedocs.io/en//en/最新/变换。将在每个访问中执行转换/计算,过滤的数据集不会存储任何地方(除非您还使用持久功能)。
由于
fs.ReadFile
方法是一种异步方法,因此在此方法运行之前运行循环的过程在异步过程之前运行。异步过程有望花费更多的时间,因此测序阶段将转移到同步过程中。
要解决问题,您可以使用
fs.ReadFilesync
方法,即同步替代方案,而不是fs.ReadFile
,如下:注意不建议同步读取文件的数据。如果有大量数据,则可以阻止事件循环。这可能导致服务器无法响应其他请求。
Since the
fs.readFile
method is an asynchronous method, thefor
loop runs before this method runs, so thearr
variable is not iterable, synchronous processes run before asynchronous processes. The asynchronous process is expected to take more time, so the sequencing phase is transferred to the synchronous process.To fix your problem, you can use the
fs.readFileSync
method, which is a synchronous alternative instead offs.readFile
, as follows:Note that it is not recommended to read data from a file synchronously. The event loop can be blocked if there is a large amount of data. This may cause the server to fail to respond to other requests.
无法从nodejs中的fs.ReadFile获取数据