演进式架构:数字化世界"进化论" 肖然Technical Debt RELEASE TO MARKET RELEASE TO MARKET Months to Years Cost Multiple Iterative Releases Time VALUE Days to Weeks Technical Debt OPPORTUNITY0 码力 | 22 页 | 2.14 MB | 1 年前3
Laravel 5.6 中文文档return view('user.index', ['users' => $users]); } } get 方法返回包含结果集的 Illuminate\Support\Collection,其中每一个结果都是 PHP 的 StdClass 对象实例: 你可以像访问对象的属性一样访问字段的值: foreach ($users as $user) { echo 查询中使用查询构建器的所有方法。 集合 对 Eloquent 中获取多个结果的方法(比如 all 和 get)而言,其返回值是 Illuminate\Database\Eloquent\Collection 的一个实例, Collection 类提供了多个有用的函数来处理 Eloquent 结果集: $flights = $flights->reject(function ($flight) { return 中文学习资源:http://laravelacademy.org 176 Eloquent 返回的包含多条记录的结果集都是 Illuminate\Database\Eloquent\Collection 对象的实例,包括通过 get 方法或者通过访问关联关系 获取的结果。Eloquent 集合对象继承自 Laravel 的集合基类,因此很自然的继承了很多处理 Eloquent 模型底层数组的方法。0 码力 | 377 页 | 14.56 MB | 1 年前3
Laravel 5.1 中文文档$columns); // ... return $model; } lists 方法 lists 方法现在返回一个 Collection 实例而不是包含 Eloquent 查询结果的数组,如果你想 将 Collection 转化为数组,使用 all 方法: User::lists('id')->all(); 注意:Query Builder 的 lists 返回的仍然是数组。 6 Collection 类 sortBy 方法 sortBy 方法现在返回一个新的 collection 实例而不是改变已有的 collection: $collection = $collection->sortBy('name'); groupBy 方法 groupBy 方法现在为每个父级 Collection 中的 item 返回 Collection 实例,如果你想要将这些 map 方法实现: $collection->groupBy('type')->map(function($item){ return $item->all(); }); lists 方法 lists 方法现在返回一个 Collection 实例而不是数组,如果你想要将 Collection 转化数组,使 用 all 方法: $collection->lists('id')->all();0 码力 | 307 页 | 3.46 MB | 1 年前3
Laravel 6.0 中文文档RateLimited]; } 懒集合 许多开发者已经使用过 Laravel 功能强大的集合方法了,在 Laravel 6.0 中新引入了一个 LazyCollection 类来对 Collection 类进行 补充,LazyCollection 底层基于 PHP 的生成器实现,适用于处理 大型数据集。 例如,假设你的应用需要处理 GB 级别的日志文件,并使用 Laravel 的集 un.com 607 集合 简介 Illuminate\Support\Collection 类为处理数组数据提供了流式、 方便的封装。例如,查看下面的代码,我们使用辅助函数 collect 创 建一个新的集合实例,为每一个元素运行 strtoupper 函数,然后移 除所有空元素: $collection = collect(['taylor', 'abigail', null])->m 正如你所看到的,Collection 类允许你使用方法链对底层数组执行 匹配和移除操作,通常,每个 Collection 方法都会返回一个新 的 Collection 实例。 创建集合 正如上面所提到的,辅助函数 collect 为给定数组返回一个新 的 Illuminate\Support\Collection 实例,所以,创建集合很简单: $collection = collect([10 码力 | 1442 页 | 14.66 MB | 1 年前3
Laravel 5.2 中文文档建器的所有方法。 集合 对 Eloquent 中获取多个结果的方法(比如 all 和 get)而言,其返回值是 Illuminate\Database\Eloquent\Collection 的一个实例,Collection 类提供了多个有用 的函数来处理 Eloquent 结果。当然,你可以像操作数组一样简单循环这个集合: foreach ($flights as $flight) { comment!'; $comment->save(); 集合 1、简介 Eloquent 返回的所有的包含多条记录的结果集都 是 Illuminate\Database\Eloquent\Collection 对象的实例,包括通过 get 方法或者通过访 问关联关系获取的结果。Eloquent 集合对象继承自 Laravel 的集合基类,因此很自然的继 承了很多处理 Eloquent 模型底层数组的方法。 Eloquent 集合实例 * * @param array $models * @return \Illuminate\Database\Eloquent\Collection */ public function newCollection(array $models = []) { return new Cus0 码力 | 377 页 | 4.56 MB | 1 年前3
JAVA 应用与开发 - 集合与映射���������� ������iterator��Enumeration ��������� API ������的������������ 1 28 �� 1 ������� 2 Collection � Map �� 3 �� 4 Iterator �� 5 � 6 �� 7 ���� API 2 28 ������� 集合��� O 面向存放多个数据的需求 ��用����������� 集合�� API ��� Collection Map Set List HashMap HashTable TreeMap HashSet TreeSet ArrayList Stack Vector Properties Enumeration Collections Arrays Class Interface 5 28 Collection � Map �� Collection �� java.util.Collection ����� Set � List �������� Map� 的���������������的������ boolean add(Object o) �������������������������� Set ����������������� false����� ���List ������������� true�0 码力 | 66 页 | 713.79 KB | 1 年前3
Laravel 5.3 中文文档3,并没有什么重大更新。 集合 key/value 顺序调整 集合方法 first, last 和 contains 都将“value”作为第一个参数传递给相应的回调闭包,例如: $collection->first(function ($value, $key) { return ! is_null($value); }); 在 Laravel 之前的版本中,$key 部分由网友 AC1982(微信号)提供翻译支持。 数据库 集合 查询构建器现在返回 Illuminate\Support\Collection 实例而不是原生数组,以便保持和 Eloquent 返回结果类型一致。 如果你不想要迁移查询构建器结果到 Collection 实例,可以在查询构建器的 get 方法后调用 call 方法,这将会返回原生的 PHP 数组结果,从而保证向后兼容: 集合序列化 Illuminate\Queue\SerializesModels trait 现 在 适 当 实 例 化 了 Illuminate\Database\Eloquent\Collection。对绝大多数应用来说这不算重大更新,但是,如果 你的应用绝对依赖于不是通过队列任务从数据库重新获取的集合,那么就要验证这一改动对应用 没有负面影响。 后台 woker 在使用 Artisan0 码力 | 691 页 | 9.37 MB | 1 年前3
Blender v4.1 Manualinstance. Which information is shown can be chosen by clicking RMB. Scene Statistics Collection Name of the active Collection. Active Object Name of the active selected object. Geometry Displays information (dark blue) Indicates vector, coordinate and normal information. Data-Blocks Collection (white) Used to pass a collection data-block. Object (orange) Used to pass an object data-block. Material (salmon) Timeline. Object Info – Shows the current frame in parentheses, followed by the names of the selected Collection and the active object. When applicable, also shows the selected Shape Key and (in angle brackets)0 码力 | 6263 页 | 303.71 MB | 1 年前3
传智播客 mybatis 框架课程讲义ids 存储多个用户 id,并添加 getter/setter 方法 mapper.xml 测试代码: resultType="user"> select * from usercollection="ids" open=" and id in(" close=")" item="id" separator="," > #{id} resultType="user"> select * from usercollection="list" item="item" open="and id in("separator=","close=")"> #{item.id} collection="array" index="index" item="item" open="and id in("separator=","close=")"> #{item.id} 0 码力 | 75 页 | 1.16 MB | 1 年前3
Julia 中文文档the ccall. ccall automatically arranges that all of its arguments will be preserved from garbage collection until the call returns. If a C API will store a reference to memory allocated by Julia, after of finalization. That is, if a contained a reference to b and both a and b are due for garbage collection, there is no guarantee that b would be finalized after a. If proper finalization of a depends memory allocations–as reported by @time, @allocated, or the profiler (through calls to the garbage-collection routines)–hint that there might be issues with your code. If you don’t see an- other reason for0 码力 | 1238 页 | 4.59 MB | 1 年前3
共 233 条
- 1
- 2
- 3
- 4
- 5
- 6
- 24













