如何在FineUploader Azure请求中包含Content-MD5标头?(How to include Content-MD5 header in FineUploader Azure request?)
我想使用Content-MD5标头为Azure提供正在上载的文件的客户端生成的MD5哈希值。 我如何在FineUploader中完成此任务?
目标受众:Firefox,Chrome,Safari,Opera和IE10 +。
从这个答案来看,我认为它应该是可能的,但至少有一半的客户将在非常旧的(慢)计算机上运行。 那么客户端MD5哈希方法是否可行?
有些相关的问题:我还认为设置最大文件大小以减少MD5散列算法的压力可能是明智之举。 也许只是在Azure的“分块”限制之下? 从不同的角度来看:我可以禁用分块吗?
I would like to use the Content-MD5 header to supply Azure with a client-side generated MD5 hash of the files being uploaded. How would I accomplish this task in FineUploader?
Target audience: Firefox, Chrome, Safari, Opera and IE10+.
Judging by this answer I gather that it should be possible but at least half of our clients will run on very old (slow) computers. Is it feasible to do this client side MD5 hashing approach then?
Somewhat related side question: I was also thinking that it might be wise to set a maximum file size to reduce strain on the MD5 hashing algorithm. Maybe just below Azure's "chunking" limit? From a different view: Can I disable chunking?
原文:https://stackoverflow.com/questions/29939610
最满意答案
我足够接近,可以回答我的原始问题。 为此目的,我对ggplot2失去了信心,因为我找不到使用coord_polar绘制多边形的方法。 我发现了另一个符合我需求的包,叫做“plotrix”。 无论如何这里是我使用的数据集的一个例子:
# Wind-Currents data intensity_measured <- matrix(c(0.20289, 0.14956, 0.24291, 0.35733, 0.59993, 0.89495, 0.71406, 0.38831), nrow=1, ncol=8) intensity_simulated <- matrix(c(0.17853, 0.07568, 0.52146, 1.94222, 0.08634, 0.02636, 0.04742, 0.04162), nrow=1, ncol=8) direction_measured <- matrix(c(42.21043, 88.41437, 137.7938, 182.6797, 227.6208, 269.7415, 313.8207, 358.0944), nrow=1, ncol=8) direction_simulated <- matrix(c(36.13772, 85.17624, 148.96940, 176.66004, 210.36353, 282.38215, 314.35050, 0.72026), nrow=1, ncol=8) # Library allowing polygon plot on polar coordinates library(plotrix) # Function for plotting wind data by date polar.plot(rbind(intensity_measured, intensity_simulated), rbind(direction_measured, direction_simulated),main="My plot", rp.type="p", poly.col=c(rgb(255/255, 215/255, 0, .8), rgb(0, 0, 1, .8)), start=90, clockwise=TRUE, radial.labels = "", label.pos=NULL, line.col=c("black", "black"), radial.lim=c(0,max(rbind(intensity_measured, intensity_simulated))), boxed.radial=FALSE)
我们到了 :
这很清楚,所以,现在我可以比较我的测量风和模拟风! 如果有人有个好主意,我仍然对使用ggplot2的解决方案感兴趣;)
感谢Stackoverflow社区,希望这个例子可以帮助你们中的一些人!
I'm close enough to give an answer to my original question I think. I lost my faith in ggplot2 for this purpose, since I couldn't find a way to plot polygons using coord_polar. I discovered an another package fitting my needs, called "plotrix". Anyway here is an example of dataset I used :
# Wind-Currents data intensity_measured <- matrix(c(0.20289, 0.14956, 0.24291, 0.35733, 0.59993, 0.89495, 0.71406, 0.38831), nrow=1, ncol=8) intensity_simulated <- matrix(c(0.17853, 0.07568, 0.52146, 1.94222, 0.08634, 0.02636, 0.04742, 0.04162), nrow=1, ncol=8) direction_measured <- matrix(c(42.21043, 88.41437, 137.7938, 182.6797, 227.6208, 269.7415, 313.8207, 358.0944), nrow=1, ncol=8) direction_simulated <- matrix(c(36.13772, 85.17624, 148.96940, 176.66004, 210.36353, 282.38215, 314.35050, 0.72026), nrow=1, ncol=8) # Library allowing polygon plot on polar coordinates library(plotrix) # Function for plotting wind data by date polar.plot(rbind(intensity_measured, intensity_simulated), rbind(direction_measured, direction_simulated),main="My plot", rp.type="p", poly.col=c(rgb(255/255, 215/255, 0, .8), rgb(0, 0, 1, .8)), start=90, clockwise=TRUE, radial.labels = "", label.pos=NULL, line.col=c("black", "black"), radial.lim=c(0,max(rbind(intensity_measured, intensity_simulated))), boxed.radial=FALSE)
Here we are :
This is pretty clear, so, now I can compare my measured and simulated winds ! I'm still interested in a solution using ggplot2 if anyone has a brilliant idea ;)
Thanks to the Stackoverflow community, hope this example can help some of you !
相关问答
更多-
你不需要使用PBS(我已经很难了解到这一点,因为@flowla发布的r-sig-geo链接是我最初发布的问题!)。 此代码显示了如何在rgeos中完成所有操作,并感谢来自Roger Bivand的各种不同发布 。 这将是更加规范的子集化方式,而不是强制PolySet对象。 错误消息的原因是您无法在SpatialPolygons的集合上进行交互,因此您需要单独执行它们。 用gIntersects找出你想要的。 然后使用gIntersection每个国家多边形gIntersection 。 我有一个问题,将Sp ...
-
R sp:多边形面积单位(R sp: unit of area of Polygon)[2023-11-18]
要在lat-lon坐标中获得多边形的正确面积计算,最好事先使用“spTransform”将它们转换为公制等面积投影。 或者,您可以使用允许的包geosphere “用于地理应用的球面三角法。也就是说,计算角度(经度/纬度)位置的距离和相关度量” 例如,这个: require(geosphere) areaPolygon(mypoly) (mypoly是一个spatialPolygons对象)将以平方公里为单位给出它的面积。 HTH。 To get a correct area computation fo ... -
我不知道这是多么好,但也许在polygon之后添加curve curve(dnorm(x), -3, 3, bty="n", ann=F, axes=F, col=NA) xs <- seq(-0.5, 0.5, len=1000) polygon(c(xs[1], xs, xs[1000]), c(0, dnorm(xs), 0), col='grey', border = NA) curve(dnorm(x), -3, 3, col='blue', add = TRUE, n = 1e4) #n = 1 ...
-
将多边形添加到地图R小册子(Add polygon to map R leaflet)[2024-02-07]
通过转换为geoJSON格式将多边形添加到地图中,如rCharts源代码中的示例10所示: https : //github.com/ramnathv/rCharts/blob/master/inst/libraries/leaflet/examples/example10.R 请注意geoJSON中的xy坐标和setView之间lat和long的差别。 这里的代码给了我一个捷克共和国靠近德国的蓝框。 xy = cbind( c(13.42666, 13.42666, 13.56383, 13.5635 ... -
我无法说出为什么你的代码没有产生输出 - 有太多可能的原因 - 但这是你想要实现的吗? 码 library(rgdal) library(ggplot2) library(plyr) library(RColorBrewer) setwd("< directory with all your files >") map <- readOGR(dsn=".",layer="ALRIS_tigcounty") marriages <- read.csv("marriages.2012.csv",h ...
-
这是我的解决方案。 我尽可能使用sf 。 根据我的经验, sf与raster功能并不完全兼容,所以这里有几个解决方法不是太难看。 我使用的是不同于您提供的基础数据。 基础数据 library(sf) library(raster) library(magrittr) set.seed(1) ## We will create your polygons from points using a voronoi diagram x <- runif(10, 640000, 641000) y <- runi ...
-
Windrose与多边形基于R中的“climatol”包(Windrose with polygon based on the “climatol” package in R)[2022-12-13]
我足够接近,可以回答我的原始问题。 为此目的,我对ggplot2失去了信心,因为我找不到使用coord_polar绘制多边形的方法。 我发现了另一个符合我需求的包,叫做“plotrix”。 无论如何这里是我使用的数据集的一个例子: # Wind-Currents data intensity_measured <- matrix(c(0.20289, 0.14956, 0.24291, 0.35733, 0.59993, 0.89495, 0.71406, 0.38831), nrow=1, ncol=8) ... -
如果您致力于使用spatstat包,这可能不会非常有用。 如果没有,请继续阅读...... 如果你想做的只是将多边形绘制为单独的图层,请使用ggplot library(ggplot2) library(sp) library(maptools) setwd("
") poly1 <- readShapeSpatial("Polygon_One") poly2 <- readShapeSpatial("Polygon_Two") # pl ... -
如何在R中划分多边形?(How to divide polygon in R?)[2024-01-03]
关注@jbaums评论,我使用了包rgeos中的gDifference: intflv <- gDifference(state,rivers) 但由于“state”只有一个多边形,因此intflv成为一个SpatialPolygons对象,只有一个Polygon,由数千个子多边形组成。 为了更好地在GIS软件中工作,我希望它成为一个包含所有数千个多边形的对象,每个多边形都是一个子多边形。 所以我做了: l <- list() total <- length(intflv@polygons[[1]]@Po ... -
rgdal对于这种事情非常棒。 http://www.gdal.org/提供了您可能希望获得哪些格式的大部分信息。 在这种情况下,您需要writeOGR函数 # this will create a shapefile called poly within the working directory library(rgdal) writeOGR(poly, dsn = '.', layer = 'poly', driver = "ESRI Shapefile") 您可以轻松地使用它来编写任何形状文件(点 ...