如何使用smarty获取URL(类似于URLJavaScript)?
我这样做了
{$smarty.server.PHP_SELF}
Run Code Online (Sandbox Code Playgroud)
但它不起作用.
我有一张像下面这样的表
CREATE TABLE Products(Product_id INT, ProductName VARCHAR(255),
Featured enum('Yes', 'No'), Priority enum('p1', 'p2', 'p3'))
INSERT INTO Products(ProductName, Featured, Priority)
VALUES('Product A', 'Yes', 'p1'),
('Product B', 'No', 'p2'),
('Product C', 'Yes', 'p1'),
('Product D', 'No', 'p1'),
('Product E', 'Yes', 'p3'),
('Product F', 'No', 'p2'),
('Product G', 'Yes', 'p1'),
('Product H', 'Yes', 'p2'),
('Product I', 'No', 'p2'),
('Product J', 'Yes', 'p3'),
('Product K', 'Yes', 'p1'),
('Product L', 'No', 'p3');
我需要获得精选产品,然后是优先级为p1,p2和p3的产品
Op:
ProdName | Featured | Priority
Product A Yes p1
Product C … 如何在hummusJS中画出箭头?我使用鹰嘴豆泥以pdf格画.我需要用pdf画一个箭头.我能画出这条线.但我怎么画箭头?我尝试了以下内容
if(x2 > y2)
{
a1 = x2-5;
b1 = y2-5;
a2 = x2-5;
b2 = y2+5;
a3 = x2+5;
b3 = y2;
}
else
{
a1 = x2-5;
b1 = y2+5;
a2 = x2+5;
b2 = y2+5;
a3 = x2;
b3 = y2-5;
}
cxt.drawPath(a1,b1,a2,b2,a3,b3,{type: 'fill',
color: '#000000'})
Run Code Online (Sandbox Code Playgroud)
我也尝试过这样
var d =5;
a1 = x2-d*Math.sin(45);
b1 = y2-d*Math.cos(45);
a2 = x2+d*Math.sin(45);
b2 = y2+d*Math.cos(45);
cxt.drawPath(x2,y2,a1,b1,{type: 'fill',
color: '#000000'})
cxt.drawPath(x2,y2,a2,b2,{type: 'fill',
color: '#000000'})
Run Code Online (Sandbox Code Playgroud)
我在节点js工作.我已经安装了鹰嘴豆泥包.它安装得当.我正在使用此包修改pdf文件.在下载pdf时我称之为鹰嘴豆泥.Onclick下载我收到此错误.
Error: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /var/www/html/node_modules/hummus/binding/hummus.node)
at Object.Module._extensions..node (module.js:681:18)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/var/www/html/node_modules/hummus/hummus.js:5:31)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at /var/www/html/app/routes.js:2250:18
at Layer.handle [as handle_request] (/var/www/html/node_modules/express/lib/router/layer.js:95:5)
Run Code Online (Sandbox Code Playgroud)
在这个链接的帮助下,我更新了glibc.但我仍然得到同样的错误.请帮我找出问题所在.我正在使用CentOs 6.9
如何在mysql查询中编写一个案例,该案例检查特定列的null或0
CREATE TABLE tblConfirmationStatus (Confirm_Status TINY INT)
INSERT INTO tblConfirmationStatus
Confirm_Status
VALUES
(1),
(0),
(1),
({null}),
(0),
(1),
({null})
要求的输出
ConfirmStatus
Confirmed Not Confirmed Confirmed Not Confirmed Not Confirmed Confirmed Not Confirmed
0或Null - 未确认,1 - 确认
SELECT CASE Confirm_Status
WHEN NULL OR 0 THEN 'Not Confirmed'
ELSE 'Confirmed' END AS ConfirmStatus
FROM tblConfirmationStatus;
我必须在我的网站上播放视频.视频通过multer与node.js和express框架上传.文件正在插入数据库和指定的文件夹(文件名如1b47c24b20cc2465fbcb395fd1a9dfb4).我上传的图像也正常显示但视频没有播放.
这是我的HTML代码
<div class="form-group">
<label>Upload image</label>
<input type="file" name="file" id="file" ng-model="testimonial.file" ngf-select ngf-max-size="25MB" required">
<img ng-src="/images/{{testimonial.image.filename}}" width="49" height="49" ng-model="testimonial.file" /><br/>
<label>Upload video</label>
<input type="file" name="video" id="video" ng-model="testimonial.video" ngf-select ngf-max-size="25MB" required">
<video width="320" height="240" controls>
<source src="/images/{{testimonial.video.filename}}" type="video/mp4">
<source src="movie.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>
</div>
Run Code Online (Sandbox Code Playgroud)
请帮我找出解决方案.什么是.ogg文件我在上传视频时如何生成?
CREATE TABLE Countries(location varchar(255), country varchar(255))
INSERT INTO Countries(location, country)
VALUES('Arkansas', 'US'),
('Newyork', 'US'),
('New Jersey', 'US'),
('Tokyo', 'JP'),
('Yokohama', 'JP'),
('Chennai', 'IN'),
('Delhi', 'IN'),
('Sydney', 'AU'),
('Melbourne', 'AU');
Run Code Online (Sandbox Code Playgroud)
我需要查询以下输出
Location | Country
--------------------------------
Arkansas US
Tokyo JP
Chennai IN
Sydney AU
Newyork US
Yokohama JP
Delhi IN
Melbourne AU
New Jersey US
Run Code Online (Sandbox Code Playgroud) 我有一个 for 循环,其中显示所选的产品名称和价格。用户可以选择输入数量,但默认情况下,数量应为 1。如何将文本字段值设置为默认值 1。
我已经尝试过以下方法,但它不起作用:
<tr *ngFor="let spro of selectedProd;let i = index;">
<td data-title="Product Name">{{spro.product_description}}</td>
<td data-title="Unit Price" class="numeric">
<i class="fa fa-inr"></i>2000</td>
<td data-title="Qty" class="numeric">
<input type="text" [(ngModel)]="selectedProd[i].qty" name="qty" value="1">
</td>
<td data-title="Total Price" class="numeric">
<i class="fa fa-inr"></i>{{selectedProd[i].qty*2000}}</td>
</tr>
Run Code Online (Sandbox Code Playgroud) 如何绘制透明色的矩形?
我尝试了下面的代码.我正在使用hummusjs来修改pdf.
cxt.drawRectangle(x,y,width,height,{type: 'fill',
color: '#eeeeee',
opacity: 0.9});
Run Code Online (Sandbox Code Playgroud) 下拉列表包含数组值.如果我从下拉列表中选择一个值,它将从其工作的数组中删除该值.但是点击重置按钮它应该重置旧值.这是我的代码
HTML代码
<html>
<head>
<script src="angular/angular.js"></script>
<script src="js/controllers.js"></script>
</head>
<body ng-app="myApp">
<div ng-controller="exerciseTypeCtrl">
<select id="exerciseSuperCategory" data-role="listview" ng-options="Lay.id as Lay.value for Lay in Layer " ng-model="itemsuper" ng-change="changeData(itemsuper)">
</select>
<input type="button" ng-click="resetLayer()" value="Reset"/>
</div>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
angularjs控制器代码
<script>
var myApp = angular.module('myApp',[]);
myApp.controller('exerciseTypeCtrl',function($scope)
{
$scope.Layer = [
{ id: 1, value: '0.38'},
{ id: 2, value: '0.76'},
{ id: 3, value: '1.14'},
{ id: 4, value: '1.52'},
{ id: 5, value: '1.9'},
{ id: 6, value: '2.28'},
{ id: 7, value: '2.66'}, …Run Code Online (Sandbox Code Playgroud)