我在laravel app中返回一个视图这是路线
Route::get('roles', 'CreateList@create');
Run Code Online (Sandbox Code Playgroud)
然后在控制器中
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
class CreateList extends Controller
{
function create(){
$roles = DB::table('sec_role')->get();
return view('roles.blade.php', compact('role_id', 'name'));
}
}
Run Code Online (Sandbox Code Playgroud)
最后我在我的Resources/views文件夹中有一个roles.blade.php,但是当我去路线时,我得到了
InvalidArgumentException in FileViewFinder.php line 137:
View [roles.blade.php] not found.
Run Code Online (Sandbox Code Playgroud)
错误
我已经尝试清除并配置缓存
所以我有
hours = [x for x in range(7,18)]
columns = [1, 2, 3, 4, 5]
matrixDatos = [[0,1,0,1,0],
[0,1,0,1,1],
[2,3,2,3,2],
[2,3,2,3,3],
[4,5,4,5,4],
[4,5,4,5,5],
[6,7,6,7,6],
[6,7,6,7,7],
[8,9,8,9,8],
[8,9,8,9,8]
]
table = ff.create_table(matrixDatos)
fig = ff.create_annotated_heatmap(matrixDatos, x=columns, y=hours, colorscale='Viridis')
Run Code Online (Sandbox Code Playgroud)
但是它打印y轴从18到7的热图,是否有办法从7到18打印它?
让我们说:
a = [(0, 1), (0, 2), (3, 0)]
b = [(4, 5), (2, 0)]
c = [(2, 6), (5,3)]
lists = [a, b, c]
Run Code Online (Sandbox Code Playgroud)
所以我需要一个函数来生成
list = [(0, 1), (0, 2), (3, 0), (4, 5),(2, 6), (5,3) ]
Run Code Online (Sandbox Code Playgroud)
提到这个问题我已经能够删除重复的元素,但我无法弄清楚如何解决回文