然而,在这些艰难时期,我们现在拥有价值高达18位小数的货币(谢谢ETH).
这现在重新提出经典论点.
IDEAS
选项1 BIGINT使用一个大的整数,以节省的实际价值,然后存储货币有多少位小数有(简单地将A通过10^B中译本)?
选项2 Decimal(60,30)将数据类型存储为大小数,这不可避免地会占用大量空间.
选项3 VARCHAR(64)存储在字符串中.哪会产生性能影响.
我想了解人们的想法以及他们在处理加密货币价值时所使用的内容.因为我难以接受最好的处理方法.
我在干预/图像方面遇到问题,Laravel#composer install
- intervention/image 2.1.1 requires ext-fileinfo * -> the requested PHP
extension fileinfo is missing from your system.
Run Code Online (Sandbox Code Playgroud)
我知道它正在尝试检索扩展程序,fileinfo但是我在加载扩展程序方面运气不佳。
我相信从 PHP 5.4 开始,该扩展fileinfo会自动启用,但它不会显示在#php -m模块中。
#pecl install fileinfo也不起作用,因为我的 php 版本不适合任何版本的fileinfo.
我的 PHP 版本是:
PHP 5.4.37 (cli)
Run Code Online (Sandbox Code Playgroud)
操作系统:
Linux
CentOS 6.5 cPanel 11.46 / Softaculous x64
Run Code Online (Sandbox Code Playgroud)
我尝试过添加
extension = "fileinfo.so"
Run Code Online (Sandbox Code Playgroud)
到php.ini但不幸的是,它什么也没做。
注意:我设法让 Windows 版本的 php 5.4 扩展工作正常...只是当我将我的网站上传到我的服务器时,我无法加载它,我们将该库(干预/图像)添加到加载。
其他详情:
问题:
@ContentChildren似乎不适用于父<ng-content>容器。即使内容是该组件的子代。
Plunker:https ://plnkr.co/edit/J5itJmDfwKwtBsG6IveP ? p = preview
注意:我正在使用{descendants: true}
示例代码:
主要HTML:
<div>
<child>
<test></test>
<test></test>
<test></test>
</child>
<br><br>
<parent>
<test></test>
<test></test>
<test></test>
</parent>
</div>
Run Code Online (Sandbox Code Playgroud)
子组件:
<h2>Child</h2>
<parent>
<ng-content></ng-content>
</parent>
Run Code Online (Sandbox Code Playgroud)
父组件:
<h3>Parent</h3>
<ng-content></ng-content>
<div class='length'>Line count : {{length}}</div>
Run Code Online (Sandbox Code Playgroud)
问题test对于子组件,组件
的长度为0,对于父组件,组件的长度为3。
详细代码:
import {
Component, ContentChildren, Directive
} from '@angular/core';
@Directive({selector: 'test'})
export class Test {}
@Component({
selector: 'parent',
template: `
<h3>Parent</h3>
<ng-content></ng-content>
<div class='length'>Line count : {{length}}</div>
`
})
export class ParentComponent { …Run Code Online (Sandbox Code Playgroud) 我正在使用干预图像类进行laravel,并且正在复制,调整图像大小并将图像编码到sites目录.基本上模拟上传到虚假列表.
但是,在运行数据库种子时,我似乎遇到了内存问题.
错误信息:
local.ERROR: exception 'Symfony\Component\Debug\Exception\FatalErrorException'
with message 'Allowed memory size of 134217728 bytes exhausted (tried to allocate 5056 bytes)'
in C:\xampp\htdocs\equezone\vendor\intervention\image\src\Intervention\Image\Gd\Decoder.php:115
Run Code Online (Sandbox Code Playgroud)
每张图片不超过1265x625.仅当大于1300x700时,图像才会调整大小.因此,没有图像实际调整大小...
Gd\Decoder.php的第115行
$canvas = imagecreatetruecolor($width, $height);
Run Code Online (Sandbox Code Playgroud)
imagecreatetruecolor 似乎扩展了php的gd类.
这是我的代码的基础知识:
$image = Image::make(( ! is_string($file))? $file->getRealPath(): $file);
if ($image->width() > self::MAX_IMAGE_WIDTH || $image->height() > self::MAX_IMAGE_HEIGHT) {
self::resizeImage($image, self::MAX_IMAGE_WIDTH, self::MAX_IMAGE_HEIGHT);
}
/*
Some code here to retrieve the listing from the database,
create an image in the database
assign image to the listing
*/
$image->encode('jpg',100);
$image->save($img->getImageLocation(), 100);
Run Code Online (Sandbox Code Playgroud)
我找出了内存泄漏的来源.
在内存崩溃之前,种子将播种大约8-14个列表.上传大约60 …
php ×2
angular ×1
apache ×1
centos6.5 ×1
currency ×1
javascript ×1
laravel ×1
linux ×1
memory-leaks ×1
mysql ×1
pecl ×1
seeding ×1
sql ×1
sqldatatypes ×1