如何通过简单的功能将波斯语/阿拉伯数字转换为英文数字?
波斯语/阿拉伯数字:
? // -> 0
? // -> 1
? // -> 2
? // -> 3
? // -> 4
? // -> 5
? // -> 6
? // -> 7
? // -> 8
? // -> 9
Run Code Online (Sandbox Code Playgroud)
unicode上的数字:
$num0="۰";
$num1="۱";
$num2="۲";
$num3="۳";
$num4="۴";
$num5="۵";
$num6="۶";
$num7="۷";
$num8="۸";
$num9="۹";
Run Code Online (Sandbox Code Playgroud) 当PHP脚本从命令行(windows)运行时,如何从脚本中清除控制台屏幕.
例如 :
while(true){
// sleep for 10 seconds , then clear the console
sleep(10);
// below command execute to clear the console windows
**COMMAND**
}
Run Code Online (Sandbox Code Playgroud) [重复]
fopen()
当所有路径都具有 777 权限时,PHP 函数出现权限错误。
服务器详情:Centos 7 , PHP 7.1.8 , Apache 2.4.27
PHP源代码:
$myfile = fopen("newfile.txt", "w") or die("Unable to open file!");
Run Code Online (Sandbox Code Playgroud)
错误信息 :
警告:fopen(newfile.txt):无法打开流:第 3 行 /var/www/html/test/file.php 中的权限被拒绝
我的测试网址: http://MyIPAddress/test/file.php
777 权限路径:
/var/www
/var/www/html
/var/www/html/test
/var/www/html/test/file.php
Run Code Online (Sandbox Code Playgroud)
具有权限的文件列表:( 编辑 1)
[root@localhost ~]# ls -la /var/www/html/test
total 8
drwxrwxrwx. 2 root root 41 Aug 24 20:26 .
drwxrwxrwx. 4 root root 48 Aug 24 19:37 ..
-rwxrwxrwx. 1 root root 179 Aug 24 20:22 file.php
-rwxrwxrwx. 1 root …
Run Code Online (Sandbox Code Playgroud) 我有以下两个查询的SUM值
Query1:*
SELECT SUM(price)FROM TABLE1 WHERE
acc_id
='555'
QUERY2:
SELECT SUM(price)FROM TABLE2 WHERE
account
='555'&& active ='1'
我尝试将这两个查询结合起来,但给出错误的求和结果,例如if query1 sum is: -86500
和Query2 sum is: 76000
,RESULT必须是-10500
结果,但结果显示为-486000
我正在尝试这样,但我没有得到预期的结果.
SELECT SUM(t1.price + t2.price) AS TotalCredit
FROM TABLE1 AS t1, TABLE2 AS t2
WHERE t1.`acc_id` = '555' && t2.`Account`='555' && t2.`Active`='1'
Run Code Online (Sandbox Code Playgroud)
表格图片:
在桌面上设置偶数/奇数样式但是表格行的悬停不起作用.
试试吧:http://jsfiddle.net/w7brN/
CSS风格:
#table_even tr:hover { background-color:#fffbae!important; } /* hovering */
#table_even tr:nth-child(odd) td { background-color:#fbfbfb } /*odd*/
#table_even tr:nth-child(even) td { background-color:#e8ecee } /* even*/
Run Code Online (Sandbox Code Playgroud)
HTML代码:
<table id="table_even" style="width: 100%">
<tr>
<td>##</td>
<td>##</td>
</tr>
<tr>
<td>##</td>
<td>##</td>
</tr>
<tr>
<td>##</td>
<td>##</td>
</tr>
</table>
Run Code Online (Sandbox Code Playgroud)
怎么解决?
这是我的查询:
SELECT user,name,SUM(price) FROM $tableName WHERE faktor='1' GROUP BY user ORDER BY SUM(price) ASC
Run Code Online (Sandbox Code Playgroud)
这个查询工作,但我想显示谁有总和(价格)大于100美元.我测试它WHERE SUM(Price) < '100'
但没有工作,结果是错误的.
谢谢 ;)
我从ajax页面加载标记和折线,每个请求数据显示在索引页面上,现在我想在从ajaxPage获取新数据之前清除数据(标记,折线,...)
索引页面:
var gmarkers = [];
var map = null;
function initialize() {
var myOptions = {
zoom: 15,
center: new google.maps.LatLng(35, 53),
// mapTypeControlOptions: {style: google.maps.MapTypeControlStyle.DROPDOWN_MENU},
mapTypeId: google.maps.MapTypeId.ROADMAP
}
map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
google.maps.event.addListener(map, 'click', function() {
infowindow.close();
});
}
var infowindow = new google.maps.InfoWindow(
{
size: new google.maps.Size(150,50)
});
function myclick(i) {
google.maps.event.trigger(gmarkers[i], "click");
}
function createMarker(latlng, name, html) {
var contentString = html;
var marker = new google.maps.Marker({
position: latlng,
map: map,
zIndex: Math.round(latlng.lat()*-100000)<<5
}); …
Run Code Online (Sandbox Code Playgroud) javascript jquery google-maps google-maps-api-3 google-maps-markers
我尝试创建一个匹配大小写的正则表达式A-Z
,digits
以及所有字符串的@#$_
长度限制符号4 to 16
.
我无用的正则表达式:
/^([a-zA-Z])|(\d)|(@#\$_){4,16}$/
我测试了在线正则表达式生成器,如http://www.jslab.dk/tools.regex.php但没有很好的结果.
php ×4
mysql ×2
chmod ×1
css ×1
google-maps ×1
html ×1
javascript ×1
jquery ×1
linux ×1
permissions ×1
regex ×1
sum ×1
unicode ×1
windows ×1