跨平台桌⾯应⽤框架:Electron
Unexpected token { 问题:打包: npm npm run dist run dist 报错: /Users/limao/dev/src/electron/electron-quick-start/node_modules/electron-builder/node_ /Users/limao/dev/src/electron/electron-quick-start/node_modu error: expected /binding.cc:1610:23: error: expected '}' '}' /Users/limao/.electron-gyp/7.1.7/include/node/v8.h:37:14: note: to match this /Users/limao/.electron-gyp/7.1.7/include/node/v8.h:37:14: note: to ! stack at ChildProcess.onExit stack at ChildProcess.onExit ((/Users/limao/dev/crifan/mitmdump/mitmdumpUrlSav /Users/limao/dev/crifan/mitmdump/mitmdumpUrlSav er/electron_python/electron-pyt0 码力 | 123 页 | 21.81 MB | 1 年前3Laravel 5.1 中文文档
admin: Route::group(['prefix' => 'admin'], function () { Route::get('users', function () { // 匹配 "/admin/users" URL }); }); 你还可以使用 prefix 参数为群组路由指定公共参数: Route::group(['prefix' Route::controller 方法定义一个路由,该 controller 方法接收两个参数,第一个参数是控 制器处理的 baseURI,第二个参数是控制器的类名: Route::controller('users', 'UserController'); 接下来,添加方法到控制器,方法名应该以 HTTP 请求方法开头: users 请求 */ public function getIndex() { // } /** * 响应 GET /users/show/1 请求 */ public function getShow($id)0 码力 | 307 页 | 3.46 MB | 1 年前3Laravel 5.2 中文文档
,从而允许你轻松限制给定 IP 地址在 指定时间内对某个路由发起请求的数目。例如,要限制某个 IP 地址每分钟只能访问某个 路由 60 次,你可以这么做: Route::get('/api/users', ['middleware' => 'throttle:60,1', function () { // }]); 数组输入验证 在 Laravel 5.2 可轻松实现表 是唯一的,可以这么实现: $validator = Validator::make($request->all(), [ 'person.*.email' => 'email|unique:users' ]); 同样,你可以在语言文件中使用 * 来指定验证数组字段: 'custom' => [ 'person.*.email' => [ 'unique' /auth.php 更新完成后,基于原来的配置设置认证选项,如果不做改动,认证服务将基于 Laravel 5.1。 在新的 auth.php 配置文件中,要特别注意 passwords.users.email 配置项,由于在 Laravel 5.2 对 email 视图路径有所改动,因此要确保该视图路径与应用实际的路径相匹 配,如果不匹配的话要更新该配置值。 Contracts 如果你实现了0 码力 | 377 页 | 4.56 MB | 1 年前3Laravel 5.3 中文文档
为了订阅到传统频道,Laravel Echo 还使得订阅到提供谁在监听给定频道信息的已存在频道变得 简单: Echo.join('chat.' + roomId) .here((users) => { // }) .joining((user) => { console.log(user.name); }) Blade 模板中循环遍历的时候,$loop 变量将会在循环中生效。通过该变量可以访问很 多有用的信息,比如当前循环索引值,以及当前循环是第一个还是最后一个迭代: @foreach ($users as $user) @if ($loop->first) This is the first iteration. @endif @if 如果你不想要迁移查询构建器结果到 Collection 实例,可以在查询构建器的 get 方法后调用 call 方法,这将会返回原生的 PHP 数组结果,从而保证向后兼容: $users = DB::table('users')->get()->all(); Eloquent $morphClass 属性 可以在 Eloquent 模型上定义的$morphClass 属性已经被移除,以便定义一个“morph0 码力 | 691 页 | 9.37 MB | 1 年前3Laravel 5.6 中文文档
* @var UserRepository */ protected $users; /** * Create a new controller instance. * * @param UserRepository $users * @return void 本文档由 Laravel 学院提供 中文学习资源:http://laravelacademy.org 29 */ public function __construct(UserRepository $users) { $this->users = $users; } /** * Show the profile for the given user. * $id * @return Response */ public function show($id) { $user = $this->users->find($id); return view('user.profile', ['user' => $user]); } } 在本例中,UserController0 码力 | 377 页 | 14.56 MB | 1 年前3Laravel 6.0 中文文档
}); 或者,假设你需要迭代 10000 个 Eloquent 模型实例,如果使用传 统的 Laravel 集合,所有 10000 个 Eloquent 模型会同时加载到内 存中: $users = App\User::all()->filter(function ($user) { return $user->id > 500; }); 本文档由学院君提供 学院君致力于提供优质 在这个示例中,filter 回调只有在迭代完每个用户时才会执行,从 而极大减少内存的使用量: $users = App\User::cursor()->filter(function ($user) { return $user->id > 500; }); foreach ($users as $user) { echo $user->id; } Eloquent 子查询优化 Laravel Illuminate\Support\LazyCollection 实例而不 是 Generator,LazyCollection 可以像生成器一样迭代: $users = App\User::cursor(); foreach ($users as $user) { // } Eloquent BelongsTo::update 方法 影响级别:中等 为了整体一致性,BelongsTo0 码力 | 1442 页 | 14.66 MB | 1 年前3Apache ShardingSphere v5.5.0 document
the key to connecting data ecosystems. ShardingSphere provides mi‐ gration capabilities to help users migrate the data from other data sources, while simul‐ taneously performing data sharding. Q ue smooth online expansion, which can meet diverse business needs. • Open Ecosystem It can provide users with flexibility thanks to custom systems based on multi‐level (kernel, feature, and ecosystem) plugin the mailing list and discuss via mail. 13 7 Quick Start In shortest time, this chapter provides users with a simplest quick start with Apache ShardingSphere. Example Codes: https://github.com/apache0 码力 | 602 页 | 3.85 MB | 1 年前32021 中国开源年度报告
their problems. 堵俊平:用户是大部分人接触开源的首要角色,也是最重要的角色。对开源项目而言,有 独创性的特色功能是引发大众关注和使用的关键。 Du Junping: Users are the first and most crucial role for most people to approach open source. Innovative features “本土平台” 视⻆。 Gitee is the code hosting platform of Open Source China which has over 8 million users. We have conducted a statistical analysis of the open source projects hosted on Gitee to understand repositories hosted on Gitee in 2021 2021 年 Gitee ⽤户总量超过 800 万。 Over 8 million total Gitee users in 2021 2.2 总体语言趋势 General Language Trends 排名 Ranking 语言 Language 占比 Percentage 排名变化 Ranking0 码力 | 199 页 | 9.63 MB | 1 年前3Weblate 4.2 用户文档
Everybody can browse projects, view translations or suggest translations by default. Only registered users are allowed to actually save changes, and are credited for every translation made. You can register Projects can either be set up for direct translation, or by way of accepting suggestions made by users without accounts. Overall, there are two modes of translation: The project accepts direct translations depending on your Weblate configuration. Anonymous users can only (if permitted) forward suggestions. Doing so is still available to signed in users, in cases where uncertainty about the translation arises0 码力 | 648 页 | 9.34 MB | 1 年前3Weblate 4.2 用户文档
Everybody can browse projects, view translations or suggest translations by default. Only registered users are allowed to actually save changes, and are credited for every translation made. You can register Projects can either be set up for direct translation, or by way of accepting suggestions made by users without accounts. Overall, there are two modes of translation: • The project accepts direct translations depending on your Weblate configuration. Anonymous users can only (if permitted) forward suggestions. Doing so is still available to signed in users, in cases where uncertainty about the translation arises0 码力 | 410 页 | 4.56 MB | 1 年前3
共 375 条
- 1
- 2
- 3
- 4
- 5
- 6
- 38