我是wordpress的新手.我只是安装wordpress 4.2.2.我想用postgresql在heroku上安装wordpress.在此之前,我尝试在我的localhost上安装带有postgresql的wordpress.我遵循PG4WP安装步骤,但仍然使用mysql数据库我的wordpress安装它没有给我选择安装postgresql.
我正在使用Wordpress 4.2.2版本和我正在使用的数据库postgresql 9.1
我有 2 个模式,第一个是城市,第二个是 pincode。具有城市参考的 Pincode。他们都是这样的
城市模式
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
// create a all city list
var allCitySchema = new Schema({
cities: {
type: String
}
}, {collection: 'allcities'});
var allcities = mongoose.model('allcities', allCitySchema);
module.exports = allcities;
Run Code Online (Sandbox Code Playgroud)
Pin 码模式
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var allPincode = new Schema({
city_id: {
type: Schema.ObjectId,
ref: 'allcities'
},
pincode: {
type: String
}
}, {collection: 'pincode'});
var allPincode = mongoose.model('pincode', allPincode);
module.exports = allPincode;
Run Code Online (Sandbox Code Playgroud)
现在的问题是,当我尝试根据城市 …
我有 2 个 csv 文件,它们具有不同的数据但具有相同的标题,例如。文件 1 数据是
"CODE","NAME","SUB_USER","SCORE"
"01","TEST","1","5"
"01","TEST","2","6"
Run Code Online (Sandbox Code Playgroud)
其他文件FILE2有这样的数据
"CODE","NAME","SUB_USER","SCORE"
"02","TEST2","3","5"
"02","TEST2","4","6"
Run Code Online (Sandbox Code Playgroud)
所以我想像这样合并两个文件创建FILE3输出
"CODE","NAME","SUB_USER","SCORE"
"01","TEST","1","5"
"01","TEST","2","6"
"02","TEST2","3","5"
"02","TEST2","4","6"
Run Code Online (Sandbox Code Playgroud)
我试过下面的代码
var express = require('express');
var router = express.Router();
var fs = require('fs');
var parse = require('csv-parse');
var async = require('async');
var csv = require("fast-csv");
var file1 = appRoot + '\\csvFiles\\details1.csv';
var file2 = appRoot + '\\csvFiles\\details2.csv';
var stream = fs.createReadStream(file1);
var stream2 = fs.createReadStream(file2);
var fileData1 = [],
fileData2 = [];
csv
.fromStream(stream)
.on("data", …Run Code Online (Sandbox Code Playgroud) 我正在尝试上传图像和调整图像大小.我想要图像原始图像和拇指图像.
但问题是图像调整大小代码不起作用.
图像上传代码工作正常,它将图像存储在文件夹中,但图像大小调整代码不起作用.
我怎样才能做到这一点 ?
这是我的代码
public function add_images(){
$this->form_validation->set_rules('description','Description','required');
$this->form_validation->set_rules('status','Status','required');
if($this->form_validation->run() == TRUE) {
// print_r($this->input->post());
$config['upload_path'] = 'public/img/inner_images/';
$config['allowed_types'] = 'gif|jpg|jpeg|png'; // upload only valid images
// update library setting of upload
$this->load->library('upload', $config);
//upload image
$this->upload->do_upload('image');
$fInfo = $this->upload->data(); // get all info of uploaded file
//for image resize
$img_array = array();
$img_array['image_library'] = 'gd2';
$img_array['maintain_ratio'] = TRUE;
$img_array['create_thumb'] = TRUE;
//you need this setting to tell the image lib which image to process
$img_array['source_image'] = $fInfo['full_path']; …Run Code Online (Sandbox Code Playgroud) 我已经在redhat服务器上安装了redis。当我使用以下命令运行 redis 服务器时
$ ./redis-server --protected-mode no
Run Code Online (Sandbox Code Playgroud)
然后当我重新启动我的 redis 服务器时,存储在 redis 中的所有数据都将被删除。但是当我运行正常的 redis 服务器命令来启动时,它工作正常。
$ ./redis-server
Run Code Online (Sandbox Code Playgroud)
我已经检查了 redis 配置文件,appendonly yes但我不知道为什么它不以保护模式持久保存其数据。有没有办法使用保护模式并使用redis将数据保存在磁盘上。
我使用的是 redis 4.0.1 版本,您可以查看屏幕截图,我在没有保护模式的情况下运行的第一个屏幕截图。当我关闭请求时,它说数据保存到磁盘
它不将数据保存在磁盘上。
我已附加我已更改的配置文件的某些部分。我已经使用了appendonly yes,不知道我做错了什么。
################################ SNAPSHOTTING ################################
#
# Save the DB on disk:
#
# save <seconds> <changes>
#
# Will save the DB if both the given number of seconds and the given
# number of write operations against the DB occurred.
#
# In the example below the behaviour …Run Code Online (Sandbox Code Playgroud) 我有多个类似这样的数据
{
"_id" : ObjectId("57189fcd72b6e0480ed7a0a9"),
"venueId" : ObjectId("56ce9ead08daba400d14edc9"),
"companyId" : ObjectId("56e7d62ecc0b8fc812b2aac5"),
"cardTypeId" : ObjectId("56cea8acd82cd11004ee67a9"),
"matchData" : [
{
"matchId" : ObjectId("57175c25561d87001e666d12"),
"matchDate" : ISODate("2016-04-08T18:30:00.000Z"),
"matchTime" : "20:00:00",
"_id" : ObjectId("57189fcd72b6e0480ed7a0ab"),
"active" : 3,
"cancelled" : 0,
"produced" : 3
},
{
"matchId" : ObjectId("57175c25561d87001e666d13"),
"matchDate" : ISODate("2016-04-09T18:30:00.000Z"),
"matchTime" : "20:00:00",
"_id" : ObjectId("57189fcd72b6e0480ed7a0aa"),
"active" : null,
"cancelled" : null,
"produced" : null
}
],
"__v" : 0
}
Run Code Online (Sandbox Code Playgroud)
我正在做分组companyId并且它的工作很好但是我想matchData 根据matchtime和matchId为此目的进行搜索,我$unwind matchData在放松之后我使用这样的搜索查询 …
在html文件中,我有以下部分代码:
<!-- Contact Form -->
<section>
<form method="post" action="sendmail.php">
<div class="row 50%">
<div class="6u">
<input type="text" name="name" id="contact-name" placeholder="Name" />
</div>
<div class="6u">
<input type="text" name="email" id="contact-email" placeholder="Email" />
</div>
</div>
<div class="row 50%">
<div class="12u">
<textarea name="message" id="contact-message" placeholder="Message" rows="4"></texta$
</div>
</div>
<div class="row">
<div class="12u">
<ul class="actions">
<li><input type="submit" class="style1" value="Send" /></li>
<li><input type="reset" class="style2" value="Reset" /></li>
</ul>
</div>
</div>
</form>
</section>
Run Code Online (Sandbox Code Playgroud)
在php文件sendmail.php中,我有:
<?php
$address = $_POST['contact-email'];
$body = $_POST['contact-message'];
$name = $_POST['contact-name'];
echo($address);
echo($body);
echo($name);
Run Code Online (Sandbox Code Playgroud)
?>
当我尝试运行此表单时,它不会执行任何操作.也许我做错了什么?
node.js ×3
mongodb ×2
php ×2
codeigniter ×1
csv ×1
heroku ×1
html ×1
image ×1
linux ×1
post ×1
postgresql ×1
redhat ×1
redis ×1
redis-server ×1
wordpress ×1