country.json.[
{
"name": "WORLD",
"population": 6916183000
},
{
"name": "More developed regions",
"population": 1240935000
},
{
"name": "Less developed regions",
"population": 5675249000
},
{
"name": "Least developed countries",
"population": 838807000
},
{
"name": "Less developed regions, excluding least developed countries",
"population": 4836442000
},
{
"name": "Less developed regions, excluding China",
"population": 4284697000
},
{
"name": "Sub-Saharan Africa",
"population": 831464000
},
{
"name": "AFRICA",
"population": 1031084000
},
{
"name": "Eastern Africa",
"population": 342595000
},
{
"name": "Burundi",
"population": …Run Code Online (Sandbox Code Playgroud) 描述:
我现在一直在使用Laravel进行一系列项目.在Laravel中实现用户身份验证很简单.现在,我正在处理的结构有点不同 - 我没有本地database的users表或表.我必须进行API调用以查询我需要的内容.
我试过了
public function postSignIn(){
$username = strtolower(Input::get('username'));
$password_api = VSE::user('password',$username); // abc <-----
$password = Input::get('password'); // abc <-----
if ( $password == $password_api ) {
//Log user in
$auth = Auth::attempt(); // Stuck here <----
}
if ($auth) {
return Redirect::to('/dashboard')->with('success', 'Hi '. $username .' ! You have been successfully logged in.');
}
else {
return Redirect::to('/')->with('error', 'Username/Password Wrong')->withInput(Request::except('password'))->with('username', $username);
}
}
Run Code Online (Sandbox Code Playgroud)
更新
我shell_exec在VSE班上使用一个简单的命令连接到API
public static function …Run Code Online (Sandbox Code Playgroud) 在我运行Ubuntu的临时服务器上,我执行git pull,我一直得到:
错误:RPC失败; result = 6,HTTP code = 0致命:远程端意外挂断
我通过设置增加了Git的HTTP缓冲区.
git config --global http.postBuffer 2M
再做git pull一次,仍然有同样的错误.
我如何解决这个问题,以便git pull再次表现?
我真的在努力解决这个错误:
AbstractSmtpTransport.php第404行中的Swift_TransportException:连接到tcp://smtp.mail.yahoo.com:465超时
我希望有人可以对此有所了解.
这是我.env文件中的设置
MAIL_DRIVER=smtp
MAIL_HOST=smtp.mail.yahoo.com
MAIL_PORT=465
MAIL_USERNAME=dev.email@yahoo.com
MAIL_PASSWORD=******
Run Code Online (Sandbox Code Playgroud) 我是Heroku的新手,我正在尝试将一个非常简单的站点部署到Heroku中.
网站结构
如您所见,我不打算在此处部署复杂的Node.js或Laravel站点.
我当然登录到heroku
cd idesign4u/
git init
heroku git:remote -a idesign4u
git add .
git commit -am "Project Initialization"
heroku buildpacks:set heroku/php
Run Code Online (Sandbox Code Playgroud)
我懂了
Buildpack set. Next release on idesign4u will use heroku/php.
Run git push heroku master to create a new release using this buildpack.
Run Code Online (Sandbox Code Playgroud)
我以为我已经准备好了.然后我跑了
git push heroku master
Run Code Online (Sandbox Code Playgroud)
我不断得到
Counting objects: 67, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (64/64), done.
Writing objects: 100% (67/67), 60.75 MiB | …Run Code Online (Sandbox Code Playgroud) 我不断得到
403 Forbidden nginx/1.11.9
我已经跑了: sudo composer update
我想我设置了适当的权限.
-rwxrwxrwx 1 root root 149 Feb 24 03:45 .gitignore
-rwxrwxrwx 1 root root 12 Feb 24 03:45 .gitattributes
-rwxrwxrwx 1 root root 146 Feb 24 03:45 CONTRIBUTING.md
drwxrwxrwx 15 root root 4096 Feb 24 03:45 app
-rwxrwxrwx 1 root root 567 Feb 24 03:45 phpunit.xml
drwxrwxrwx 2 root root 4096 Feb 24 03:45 bootstrap
-rwxrwxrwx 1 root root 2452 Feb 24 03:45 artisan
drwxrwxrwx 19 root root 4096 Feb 24 03:45 …Run Code Online (Sandbox Code Playgroud) 我为我的数据库播种
curl -s http://site/api/seed/user/1000
Run Code Online (Sandbox Code Playgroud)
我做到了
psql --username=nm -d portal -h 192.168.1.27 -c "SELECT count(*) from users;"
Run Code Online (Sandbox Code Playgroud)
我有
count
-------
1000
(1 row)
Run Code Online (Sandbox Code Playgroud)
watch psql --username=nm -d portal -h 192.168.1.27 -c "SELECT count(*) from users;"
Run Code Online (Sandbox Code Playgroud)
我有
Every 2.0s: psql --username=nm -d portal -h 192.168.1.27 -... bh-macbook-pro-15-512gb.local: Tue Nov 21 15:19:08 2017
sh: -c: line 0: syntax error near unexpected token `('
sh: -c: line 0: `psql --username=nm -d portal -h 192.168.1.27 -c SELECT count(*) from users;'
Run Code Online (Sandbox Code Playgroud)
我该如何修复这个错误?
安装设备API
我有一个安装设备的API.当我点击它时,API将开始安装我的设备,并返回一个taskID
监控API
然后,我将使用taskID传递给另一个API调用来跟踪安装进度.
Monitor API将返回1到200之间的整数,这是我安装进度的百分比.
是继续调用监视器API,并实时异步更新我的进度条.当它达到200时,它就完成了,我将隐藏进度条并显示成功消息.
逻辑
核心代码
码
var ajax = $.ajax({
headers: {'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('value')},
url: '/installDevice',
type: 'POST',
dataType: 'json',
data: {'security-level':'medium'}
});
ajax.done(function ($installDeviceResponse) {
console.log($installDeviceResponse);
if($installDeviceResponse['result'][0]['status']['code'] == 0){
var taskId = $installDeviceResponse['result'][0]['data']['task'];
var $percent = 0;
do {
$.ajax({url: '/monitor/'+taskId})
.done(function ($percent) {
setTimeout(function(){
console.log('P TaskIdResponse : ',$percent);
// update prograssbar
// I don't have this yet.
// I'm trying to print …Run Code Online (Sandbox Code Playgroud) 我有一张桌子,我正在努力使它具有响应性。
当我从右向左调整大小时,它会完美地缩小
在小窗口中,我点击刷新并尝试将其调整回原来的大小
这就是我现在为 CSS 所做的
@media only screen and (max-width: 1555px) {
td:nth-child(9),th:nth-child(9) {
display: none;
}
td:nth-child(8),th:nth-child(8) {
display: none;
}
td:nth-child(7),th:nth-child(7) {
display: none;
}
}
@media only screen and (max-width: 1080px) {
td:nth-child(6),th:nth-child(6) {
display: none;
}
td:nth-child(5),th:nth-child(5) {
display: none;
}
}
@media only screen and (max-width: 840px) {
td:nth-child(5),th:nth-child(5) {
display: none;
}
td:nth-child(4),th:nth-child(4) {
display: none;
}
}
Run Code Online (Sandbox Code Playgroud)
注意:我已经在所有浏览器类型上尝试过这个:Chrome、Firefox、Safari,结果相同。
@media (min-width: 1300px) and (max-width: 1555px) {
th {
color:brown; …Run Code Online (Sandbox Code Playgroud) 我有一个菜单,当我点击每个导航时,它用于动画以恢复该特定部分。
不知何故,现在它最近不再这样做了。
我应该检查什么?我在控制台中什么也看不到。
直播:https : //www.bunlongheng.com/
我用过JS
这是片段
$('#main-menu').onePageNav({
currentClass: "active",
changeHash: false,
scrollThreshold: 0.5,
scrollSpeed: 750,
filter: "",
easing: "swing"
});
Run Code Online (Sandbox Code Playgroud)