relative-path

Aggregating a list of http log paths in kibana

谁说我不能喝 提交于 2019-12-12 04:30:56
问题 I have a nginx->fluentd->elasticsearch->kibana stack up and running. Trying to figure if I can do something like a "terms" panel but with a path string component from logs. Using a terms panel directly on that results in top used words from paths, e.g. for drupal it shows "node" as the most popular, which is quite useless without actual node id. Is that something that is possible to do with elasticsearch? Update : Here's a sample of my logs: "path": "/node/123" "path": "/node/456" "path": "

Web service returns “301 error moved permanently” in production environment

耗尽温柔 提交于 2019-12-12 03:39:49
问题 I am calling a web service using jQuery, and I have a very strange problem i've had problems with all morning. When I call the web service in my development environment, everything works perfectly. When put into production, I get an "301 Moved Permanently 38ms" from Firebug. I have my script which is like this: var data = '{"product":"' + productName + '", "from":"' + from + '", "question":"' + question + '", "phone":"' + phone + '", "type":"' + typeOfMail + '"}'; $.ajax({ type: "POST",

How to save generated file temporarily in servlet based web application

让人想犯罪 __ 提交于 2019-12-12 03:34:14
问题 I am trying to generate a XML file and save it in /WEB-INF/pages/ . Below is my code which uses a relative path: File folder = new File("src/main/webapp/WEB-INF/pages/"); StreamResult result = new StreamResult(new File(folder, fileName)); It's working fine when running as an application on my local machine (C:\Users\userName\Desktop\Source\MyProject\src\main\webapp\WEB-INF\pages\myFile.xml). But when deploying and running on server machine, it throws the below exception: javax.xml.transform

relative url in asp.net website applications

强颜欢笑 提交于 2019-12-12 03:19:01
问题 I have an image that I want to use it's src attribute in relative format when my website URL was http://localhost/ I used to use this code to access this image file: <img alt="something" src="/Files/pic.png"> But now I have to add an application to my site and change my site URL to http://localhost/mysite . Now none of my images load in this site because the path is still http://localhost/Files/pic.png not http://localhost/mysite/Files/pic.png how can I change my root URL ( / ) to http:/

How do I add relative hyperlinks to a group of pdf files using pdfbox?

ⅰ亾dé卋堺 提交于 2019-12-12 03:07:29
问题 I am currently implementing functionality to parse a group of pdf's to retrieve each pdfs meta data.And then interlink these by adding hyperlinks links to each pdf wherever another pdf is being referenced inside it.I am able to create absolute hyperlinks.But after these pdfs are uploaded to a server, then they can be downloaded from server to any local machine path.I want these hyperlinks to work after they are downloaded to a different location.So, how can create hyperlinks which are

Running a PHP file from Crontab that includes require_once()

与世无争的帅哥 提交于 2019-12-11 20:54:44
问题 I'm trying to run a php file from a crontab. The aim of the php is to simply send an email to a user. Including the header files of my php framework. But the crontab seems to be having a problem with the paths. I've tried changing it to an absolute path.. see test cases below. Using require_once(http://www.test.com/inc/header.php) and running php -f test.php to the command line results in: PHP Warning: require_once(): http:// wrapper is disabled in the server configuration by allow_url

OpenGL Texture issue

不想你离开。 提交于 2019-12-11 17:07:49
问题 Im trying to texture the bottom part of a level but for some reason the code cant find my bmp file, the bmp file is in the same folder as my code so im wondering if its an issue with my code, any help would be great #include windows.h #include gl\gl.h #include glut.h #include stdlib.h #include iostream void init(void); void display(void); void keyboard(unsigned char, int, int); void resize(int, int); void drawcube(float, float, float, float, float, float, int); #define ROAD 0 struct Image {

How to load a config file based on user selection from “unknown” location

你说的曾经没有我的故事 提交于 2019-12-11 15:33:23
问题 I have searched and searched and can't find a solution to my specific problem. I am updating a console app that will now be used for more than one client. We have decided, over storing the info in a db at least for now, to store the clients info in config files. Each client will have their own configuration file. I need to know how to load a/any config file from an "unknown" location. All of the examples that I found want me to put in the path of the file. While using my computer, I will know

hardcoded to relative paths

六眼飞鱼酱① 提交于 2019-12-11 14:35:23
问题 I'm working on a project that on the click of a button a random image for a folder I specified will appear in a specific picturebox. Here's what I have already: namespace WindowsFormsApplication12 { public partial class Form1 : Form { Random r = new Random(); public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { pictureBox1.Image = Image.FromFile(r.Next(3).ToString() + ".jpg"); } } Now how can i add a relative path to this? My hardcoded path is c:

wordpress permalinks

我们两清 提交于 2019-12-11 13:50:13
问题 I set my wordpress permalink structure to /%postname%/ but now when I go to a page other than the home page (for example if I went to somelink.com/about) I lose all javascript references. I think this happens because the links to the js files are no longer right as it is in the imaginary folder "about". This is how the js files are referenced in the header.php file. <script type="text/javascript" src="wp-content/themes/default/js/jquery-1.4.2.min.js"></script> <script type="text/javascript"