var viewer = OpenSeadragon({
id: "openseadragon1",
prefixUrl: "images/openseadragon/",
showNavigator: true,
navigatorPosition: "BOTTOM_RIGHT",
tileSources: '/fcgi-bin/iipsrv.fcgi?Deepzoom=<?=$plink?>.jp2.dzi',
crossOriginPolicy: 'Anonymous',
zoomInButton: "zoom-in",
zoomOutButton: "zoom-out",
homeButton: "home",
fullPageButton: "full-page"
});
anno.makeAnnotatable(viewer);
$.ajax({
url: "handlers/H_AnnotationHandler.php",
data: "case_id=<?=$case_id?>&plink=<?=$plink?>&mode=get",
type: "post",
dataType: "json",
success: function(response) {
if (!response.error) {
for (var i=0; i<response.annots.length; i++) {
console.log(response.annots[i].comment);
anno.addAnnotation({
text: response.annots[i].comment,
shapes: [{
type: 'rect',
geometry: {
x: response.annots[i].rect_x,
y: response.annots[i].rect_y,
width: response.annots[i].rect_w,
height: response.annots[i].rect_h
}
}]
});
}
} else {
console.log(response.error);
}
}
});
Run Code Online (Sandbox Code Playgroud)
我可以直接添加注释:http://annotorious.github.io/demos/openseadragon-preview.html …
我有一个十六进制的字符串值.我想将其转换为整数.
function HexStrToInt(const str: string): Integer;
begin
Result := ??;
end;
Run Code Online (Sandbox Code Playgroud)
使得HexStrToInt('22')
,例如,返回34
.
$.ajax({
url: "/api/v1/cases/annotations/" + case_id + "/" + encodeURIComponent(current_plink),
Run Code Online (Sandbox Code Playgroud)
我正在使用encodeURIComponent来转义斜线。但这对我不起作用。此代码将“斜杠”转换为“%2F”,但是apache无法识别它。
我的PHP部分是这样的:
$app->get('/cases/annotations/:case_id/:prep_name', 'authenticatePathologist', function($case_id, $prep_name) use ($app) {
Run Code Online (Sandbox Code Playgroud)
我正在尝试使用如下联合查询在两个表中搜索:
public function searchInAll($keyword) {
$sql = "(SELECT * FROM user_information
WHERE title LIKE ? OR name LIKE ? OR surname LIKE ?)
UNION
(SELECT * FROM groups WHERE name LIKE ?)";
$query = $this->db->prepare($sql);
$result = $query->execute(array("%$keyword%", "%$keyword%", "%$keyword%", "%$keyword%"));
if($query->rowCount()) {
$results = $query->fetchAll();
return $results;
}
return false;
}
Run Code Online (Sandbox Code Playgroud)
它总是返回 false。例如,我尝试使用一张桌子
SELECT * FROM groups WHERE name LIKE ?
Run Code Online (Sandbox Code Playgroud)
或者
SELECT * FROM user_information WHERE title LIKE ? OR name LIKE ? OR surname LIKE ?
Run Code Online (Sandbox Code Playgroud)
这些可以工作,但是对于两个表来说,它不起作用。 …
setTimeout(function() {
$.ajax({
url : "handlers/H_AnnotationHandler.php",
data : "case_id=<?=$case_id?>&plink=<?=$plink?>&mode=get",
type : "post",
dataType : "json",
success : function (response) {
if (!response.error) {
annotation_length = response.annots.length;
for (var i = 0; i < response.annots.length; i++) {
var elt = document.createElement("div");
elt.id = "runtime-overlay" + i;
elt.className = "highlight";
viewer.addOverlay({
element: elt,
location : viewer.viewport.imageToViewportRectangle(parseInt(response.annots[i].rect_x), parseInt(response.annots[i].rect_y), parseInt(response.annots[i].rect_w), parseInt(response.annots[i].rect_h))
});
$("#runtime-overlay"+i).attr("onclick", "$.clickOverlay('"+i+"')");
}
}
}
});
}, 3000);
$.clickOverlay = function(whichOverlay) {
var flag = 0;
$("#runtime-overlay"+whichOverlay).addEventListener("mousedown", function(){
flag = 0;
}, …
Run Code Online (Sandbox Code Playgroud)