我前段时间使用brew安装了postgresql,但是我还没有找到启动时自动启动的解决方案。你有什么解决办法吗?
这是我尝试连接到本地数据库时看到的内容。
这是$ brew services list输出(单行)
postgresql started root /Library/LaunchDaemons/homebrew.mxcl.postgresql.plist
安装后,我按照说明立即启动它并在登录时重新启动后
唯一的解决方法是运行这条线
pg_ctl -D /usr/local/var/postgres start这是非常不方便的,因为我必须在信息页面中查找它或分配给我每次重新启动计算机时都不记得的别名。
我有这个功能来获取单元格的字体颜色.测试函数工作正常(因此我得到十六进制代码#ff0000),但是当我get_color()从Google电子表格调用该函数时,它返回#ERROR.这似乎是因为我从函数参数中获取了一个纯字符串值,而不是Range对象.我怎么能实现它?
也许有一种更简单的方法来获取文本的字体颜色?
function test_get_color() {
var targetId = 'xxx'
var cell = SpreadsheetApp.openById(targetId).getSheetByName('Sheet1').getRange('B7');
Logger.log(get_color(cell));
}
function get_color(cell){
return cell.getFontColor();
}
Run Code Online (Sandbox Code Playgroud) 目前,我正在学习和尝试CodeIgniter能够做到的事情.但我立刻坚持制作多个缩略图.也许,我使用Wordpress搞砸了太多脑袋,并试图在Codeigniter中做这样的事情,但无论如何,这是我的代码
<?php
class Gallery_model extends CI_Model {
var $gallery_path;
function __construct() {
parent::__construct();
$this->load->helper('functions');
$this->gallery_path = realpath(APPPATH . '../uploads');
}
function do_upload() {
$config = array(
'allowed_types' => 'jpg|jpeg|gif|png',
'upload_path' => $this->gallery_path,
'max_size' => 2000
);
$this->load->library('upload', $config);
$this->upload->do_upload();
$image_data = $this->upload->data();
$image_sizes = array(
'thumb' => array(150, 100),
'medium' => array(300, 300),
'large' => array(800, 600)
);
foreach ($image_sizes as $resize) {
$config = array(
'source_image' => $image_data['full_path'],
'new_image' => $this->gallery_path . '-' . $resize[0] . 'x' . $resize[1], …Run Code Online (Sandbox Code Playgroud)