header

Caching image requests through PHP - If-Modified-Since not being sent.

I am serving images through php and having some problems setting it up to respond with 304 headers to save on load time. Most of the code below I found on php.net. It works, however ALWAYS responds with 200. For some reason the If-Modified-Since header is not being received on any requests even though I am sending the Last-Modified head...

Header files in subdirectories (e.g. gtk/gtk.h vs gtk-2.0/gtk/gtk.h)

Hello, I'm trying to build a hello world using GTK, which includes the line: #include <gtk/gtk.h> as you would expect. The Makefile supplied has the line: GTK_INCLUDE = -I/usr/local/include so it would expect to find gtk.h in /usr/local/include/gtk/gtk.h. However on my system, it is located in /usr/local/include/gtk-2.0/gtk/gtk.h...

Is a code only ASP.NET Header and Footer possible?

I have a global header and footer that has a Database connection and a disconnection in the header and footer and need to convert this to ASP.NET - this needs to be done before any HTML is output and after any HTML is output for the footer. I cannot seem to find any easy way to do this, like in Classic ASP - if possible post an example o...

Get HttpWebResponse headers WITHOUT redirecting

I want to check if a particular page gets redirected or not. However, whenever I try this the headers I get back seem to be from the redirected page, not the initially requested page (and, in particular, the status is OK rather than the 302 I want to see). Is there something I can set so that it won't automatically follow the redirects?...

How to track down cause of missing struct from include files in C?

Hey, I have a rather large project I'm porting, and in one of the MANY headers I've included a file that contains a struct definition for pmc_mdep. (prior in the file its just declared, but later its actually defined). Trying to compile it gives me errors about that struct being an incomplete type (which I believe means that it's lack...

Linker Error on having non Inline Function defined in header file?

Non inline function defined in header file with guards #if !defined(HEADER_RANDOM_H) #define HEADER_RANDOM_H void foo() { //something } #endif Results in linker error : Already defined in someother.obj file Making the function inline works fine but I am not able to understand why the function is already erroring out in first case. ...

Grep Usage help

I want to use grep to find all of the headers in a corpus, I want to find every thing up to the : and ignore every thing after that. Does anyone know how to do that? (Could I get a complete line of code) ...

Adding custom HTTP headers in java

Hello, I'm trying to create a simulation for our web Portal and need to add custom HTTP headers. I am to assume the user has already been authenticated and these headers are just for storing user information (ie, "test-header: role=user; oem=blahblah; id=123;"). I've setup a filter to extract the header information but I can't find a...

size_t can not be found by g++-4.1 or others on Ubuntu 8.1

This has happened before to me, but I can't remember how I fixed it. I can't compile some programs here on a new Ubuntu install... Something is awry with my headers. I have tried g++-4.1 and 4.3 to no avail. g++ -g -frepo -DIZ_LINUX -I/usr/include/linux -I/usr/include -I/include -c qlisttest.cpp /usr/include/libio.h:332: error: ‘siz...

Strip wav header in c#

I want to be able to strip off a header from a wav file. Is there any way to do this in C#? ...

While loop combined with header() in PHP

I've written a script to geocode some points which has a structure basically like this: //get an unupdated record $arr_record; while(count($arr_record) > 0) { //strings are derived from $arr_record geocode($string1); geocode($string2); geocode($string3); array_pop($arr_record); } function geocode($string) { //if successful upd...

Just adding some documentation triggers recompilation: Is there a solution?

Sometimes, when I look through my header files I'd like to add something little to the (doxygen) documentation. That might be a quick note about the use of some function parameter, or just fixing a little typo. But then I think: Oh no, that'll trigger a recompile on the next make call! And for certain basic headers the whole project wou...

php header download redirect

I'm making a file sharing site for the fun. Trying to make it so that when I hit download, it starts the download. Instead of just a link to /files/$file im trying to do a header redirect: download.php /** * File Download */ $query = mysql_query("SELECT id,name,desc FROM files WHERE id = ".intval($_GET['id'])); $row = mysql_fetch_asso...

Moving an R Plot header

Hi, I was trying to create a graph in R Plot and was just wondering if there was any way to move the side header lable closer to the graph. I've made the font smaller and put the lable into two lines, but when I put it into two lines the top line falls off the screen and the bottom line is rather far away from the numbered Y-Axis of ...

Send Headers + Display Image

I don't think this is possible but I'm going to ask here and see what people think. Programming language is irrelevant (I'll use PHP for this example), I just would like to do this someway. I have a file on one of my domains (different server) and in a PHP file (for example) I need to somehow inlude that file (probably using header(Loca...

What if the default parameter value is defined in code not visible at the call site?

I've found some strange code... //in file ClassA.h: class ClassA { public: void Enable( bool enable ); }; //in file ClassA.cpp #include <ClassA.h> void ClassA::Enable( bool enable = true ) { //implementation is irrelevant } //in Consumer.cpp #inclide <ClassA.h> .... ClassA classA; classA.Enable( true ); Obviously since Consum...

Cannot properly set the Accept http header with Jquery

I'm trying to set the Accept HTTP header to "text/xml" with this jquery code: $.ajax({ beforeSend: function(req) { req.setRequestHeader("Accept", "text/xml"); }, type:"GET", url: "[proper url]", contentType: "text/plain; charset=utf-8", dataType: ($.browser.msie) ? "text" : "xml", username: '---', password: '-------', ...

PHP process HTTP headers

How do I obtain the HTTP headers in response to a POST request I made with PHP? ...

Tool for converting C header files (.h) to VB?

I can see that there are tools for converting .h to Python, Perl, D, Pascal etc. Are there any for VB6 or any other VB-alike tool (like Jabaco for instance)? ...

Redirect doesn't work after using AjaxContext

In my controllers init() method I call the AjaxContext-Helper and set it for some methods/actions in that controller. Like so: public function init() { $ajaxContext = $this->_helper->getHelper('AjaxContext'); $ajaxContext->addActionContext('setlabel', 'html'); $ajaxContext->initContext(); } Now when I want to use redirect ...