我试图将所有对/ api的调用传递给我的webservice,但我继续使用以下配置获得404s.按预期调用/返回index.html.有谁知道为什么?
upstream backend{
server localhost:8080;
}
server {
location /api {
proxy_pass http://backend;
}
location / {
root /html/dir;
}
}
Run Code Online (Sandbox Code Playgroud)
adept@HogWarts:/etc/nginx/sites-available$ curl -i localhost/api/authentication/check/user/email
HTTP/1.1 404 Not Found
Server: nginx/1.2.1
Date: Mon, 22 Apr 2013 22:49:03 GMT
Content-Length: 0
Connection: keep-alive
adept@HogWarts:/etc/nginx/sites-available$ curl -i localhost:8080/authentication/check/user/email
HTTP/1.1 200 OK
Content-Type: application/json
Date: Mon, 22 Apr 2013 22:49:20 GMT
Transfer-Encoding: chunked
{"user":["false"],"emailAddress":["false"]}
Run Code Online (Sandbox Code Playgroud) 我正在尝试让 distcc 在两台机器 CLIENT 和 SERVER 之间工作我“认为”我已经正确设置但我仍然收到此错误
(dcc_build_somewhere) 警告:无法分发,而是在本地运行
没有正在服务器上编译。
我的配置如下
客户端 = 192.168.0.14 服务器 = 192.168.0.15
服务器上的 /etc/default/distcc
STARTDISTCC="true"
ALLOWEDNETS="192.168.0.0/24" // Also tried CLIENT IP here
LISTENER="192.168.0.15" // SERVER IP
NICE="10"
JOBS="16"
ZEROCONF="false"
Run Code Online (Sandbox Code Playgroud)
客户端 - 是的,我知道它当前设置为仅在服务器上编译
DISTCC_HOSTS="192.168.0.15"
/etc/distcc/host set to 192.168.0.15
$HOME/.distcc/host set to 192.168.0.15
Run Code Online (Sandbox Code Playgroud)
命令
make -jx CC=distcc
Run Code Online (Sandbox Code Playgroud)
我尝试了不同的软件存储库,以查看单个存储库是否存在问题,但无论软件包如何,问题仍然存在。
编辑 未能分发错误是客户端错误。服务器端日志指示
distccd[1046] (dcc_job_summary) 客户端:192.168.0.14:40732 COMPILE_ERROR exit:1 sig:0 core:0 ret:0 time:94ms gcc certs/system_keyring.c
运行此代码后,我在数据库中找不到任何内容.我没有从代码中收到任何错误.
有谁知道我做错了什么?
PeopleEntities1 db = new PeopleEntities1();
Person roger = new Person()
{
age = 25,
firstname = "Roger",
lastname = "Rabbit",
location = "Canada",
job = "freelance",
};
db.AddToPeople(roger);
db.SaveChanges(true);
Run Code Online (Sandbox Code Playgroud) 我正在尝试从excel工作簿中读取数据,并注意到需要很长时间才能阅读3560行和7列的工作表,大约需要1分17秒.我所做的只是遍历整个工作表并将值存储在列表中.
这是正常的,还是我做错了什么?
static void Main(string[] args)
{
List<string> testList = new List<string>();
Excel.Application excelApp = new Excel.Application();
Excel.Workbook workbook = excelApp.Workbooks.Open(@"C:\Users\rnewell\Desktop\FxData.xlsx");
Excel.Worksheet worksheet = workbook.Sheets[1];
Excel.Range range = worksheet.UsedRange;
int rowCount = range.Rows.Count;
int colCount = range.Columns.Count;
int rowCounter = 1;
int colCounter = 1;
while (rowCounter < rowCount)
{
colCounter = 1;
while (colCounter <= colCount)
{
//Console.Write(range.Cells[rowCounter, colCounter].Value2.ToString() + " ");
testList.Add(range.Cells[rowCounter, colCounter].Value2.ToString());
colCounter++;
}
Console.WriteLine();
rowCounter++;
}
Console.ReadKey();
excelApp.Workbooks.Close();
}
Run Code Online (Sandbox Code Playgroud) 尝试一些FreeBSD内核黑客攻击,我在一个简单的钩子示例中遇到了错误.代码如下
*注意 - 我添加了#include <sys/stat.h>
尽可能多的建议,但继续得到相同的错误.
#include <sys/types.h>
#include <sys/param.h>
#include <sys/proc.h>
#include <sys/module.h>
#include <sys/sysent.h>
#include <sys/kernel.h>
#include <sys/systm.h>
#include <sys/syscall.h>
#include <sys/sysproto.h>
#include <sys/stat.h>
static int mkdir_hook(struct thread *td, void *syscall_args) {
struct mkdir_args *uap;
uap = (struct mkdir_args *)syscall_args;
char path[255];
size_t done;
int error;
error = copyinstr(uap->path, path, 255, &done);
if(error != 0)
return (error);
uprintf("hooked it\n");
return (mkdir(td, syscall_args));
}
static int load(struct module *module, int cmd, void *arg) {
int error = 0; …
Run Code Online (Sandbox Code Playgroud)