header

writing dynamic headers

I have a php dynamically generated image which I need to write to file to call later. My problem is that I need this image to have appropriate expiration headers included in it. There are a massive number of these and their headers vary individually file-by-file making .htaccess controls not an option. I can write expiration headers i...

Can one get SSRS List area elements into the Header area?

I have an SSRS 2008 report that uses a list area and several subreports. I need to have a few data items (company name, invoice number) repeat on each page that relates to that company. The report will print pages for multiple companies, with multiple pages for each company. I know how to get repeat headers to work. I also know how...

Difference between putting variables in header vs putting variables in source

Say I declare a header file with a variable: int count; Then in the source file, I want to use count. Do I have to declare it as: extern int count Or can I just use it in my source file? All assuming that I have #include "someheader.h". Or should I just declare it in the source file? What is the difference between putting count in...

wsimport and header params for logging

I have this situation. Generating form based on the WSDL. I made it but I came to the situation when the wsimport tool generates classes with methods with params for header(for authentication) and the params are not just simple types. But some complex. The problem is that I dont know which classes will be generated so I need simple type...

Send javax.mail.internet.MimeMessage to a recipient with non-ASCII name?

I am writing a piece of Java code that needs to send mail to users with non-ASCII names. I have figured out how to use UTF-8 for the body, subject line, and generic headers, but I am still stuck on the recipients. Here's what I'd like in the "To:" field: "ウィキペディアにようこそ" <[email protected]>. This lives (for our purposes today) in a String c...

Is there a standard format for email addresses in MIME messages?

When I get an email, there is a header From: in the actual MIME message that specifies who the sender of the email is. I notice that the format of that particular header is sometimes: From: [email protected] or From: Human Readable Name <[email protected]> Are these the only ways that standard clients format the From: header? Or...

Can you add any request header when you request from a webpage?

Also, can you SEND any header back? (return headers) when you run a web server? Or, are headers limited? ...

PHP File unreadable after being downloaded

Hi I have a script that creates a file and stores it on the server. The file is encoded in UTF-8 and is a kind of xml file for the cmap software. If i open the file directly from the server then there is no problem and the file can be read. I am forcing a download of this file when a user goes to a specific url. After such a download...

Alternative to header_remove

I know that header_remove doesn't work in php versions < 5.3 and I use 5.2.1. I am looking for an alternative to header_remove to remove the X-Powered-By header. I tried using header("X-Powered-By: "); but it still generates a blank header. I tried using Header unset X-Powered-By in .htaccess, but for some reason it's not working. I am ...

How do I initialize the vector I have defined in my header file?

I have the following in my Puzzle.h class Puzzle { private: vector<int> puzzle; public: Puzzle() : puzzle (16) {} bool isSolved(); void shuffle(vector<int>& ); }; and then my Puzzle.cpp looks like: Puzzle::Puzzle() { // Initialize the puzzle (0,1,2,3,...,14,15) for(int i = 0; i <= puzzl...

Custom message headers in WCF on Mono

I'm making WCF calls from a Mono client running on Ubuntu (Mono 2.6). I can't seem to add a custom header to my messages. I have tried two different ways: Using a [MessageContract] and [MessageHeader] attributes on a custom class Adding the header to the outgoing messages programmatically, e.g. MessageHeader mhg = new MessageHeader("...

Office Word 2007 Interop - Header FieldCodes not showing up in my code, but are when viewed with Word

Hello, I'm writing an application in Delphi (have two over revisions of it written in both C# and Visual Basic, also). In my C# and Visual Basic version, I did something like the following to loop through the header/footer FieldCodes: // Supress filename, date and username field codes in headers fieldCount = WordApp.ActiveDocum...

Append some HTML into the HEAD tag?

Hi! I want to add some style to head tag in html page using javascript. var h = document.getElementsByTagName('head').item(0); h.innerHTML += '<style>a{font-size:100px;}</style>'; But when I run this code in IE8 I see this error message: Could not set the innerHTML property. Invalid target element for this operation. Any ideas? ...

Use of type 'id' in cocoa class

Hey guys, I want to implement a class which can be used by two classes of my project. One is manipulating 'NewsRecord' objects. One is manipulating 'GalleriesRecord' objects. In another class, I may use one of the two objects so i do something like that : // header class id myNewsRecordOrGalleriesRecord; // class.m // NewsRecord an...

Displaying only the similarities between 20 or so files?

Say I've got a directory full of html pages. Their headers and footers are basically the same, but I want to be able to see only the portions of all the pages that are the same. I'd like to call it an n-way merge, but that isn't what it is, it's looking for just the similarities between the header and the footers of all the files. (an...

PHP header() redirect not working after shortening URL using bit.ly

Hi, I have a problem with php header redirect. I already spent hours trying to fix it. The problem doesn't occur when the bit.ly api is not used in the script, I have no clue why. <?php if (strlen($_GET['url']) > 26) { $shortenedURL = $_GET['url']; if (isset($_GET['login']) && isset($_GET['apikey'])) { $s...

How do I pass a multi-dimensional array as a GET parameter in PHP?

I have the following code. $connect = new Connection (); $response = $connect->putFile($fileName, $destination); header("Location: /test.php?response=" . $response); When I invoke header with the response, the file will stop execution, but I will have no error in the console... I am thinking maybe this array needs to be encoded for ...

Access to content disposition header in php/server

I am doing some debugging in php and I need to take a look at the full headers sent to the server in including the multipart form-data information stored in content disposition. However apache_request_headers() doesn't return that information. Any clues? I am also happy to look at a non php solution if possible ...

WCF - Passing CurrentPrincipal in the Header

I have a WCF service that needs to know the Principal of the calling user. In the constructor of the service I have: Principal = OperationContext.Current.IncomingMessageHeaders.GetHeader<MyPrincipal>("myPrincipal", "ns"); and in the calling code I have something like: using (var factory = new ChannelFactory<IMyService>(loca...

Declaring a string array in class header file - compiler thinks string is variable name?

Hey everybody, I need a bit of a hand with declaring a string array in my class header file in C++. atm it looks like this: //Maze.h #include <string> class Maze { GLfloat mazeSize, mazeX, mazeY, mazeZ; string* mazeLayout; public: Maze ( ); void render(); }; and the constructor looks like this: //Maze.cpp #include...