header

PHP headers already sent

Getting the following error: "Warning: Cannot modify header information - headers already sent by (output started at..." for the following line: echo '<center>Current Time is '. gmdate("H:i A") . ' GMT (Greenwich Mean Time or UTC)<br />'; If I comment it out it just throws up the error at the next echo statement. Thoughts on why PH...

defining a function twice in C

hey :) i have a problem. i wrote this code, a.h. a.c and the main.c: file: a.h #ifndef _a_H #define _a_H int poly (int a, int b, int c, int x); int square (int x) { return x*x; } #endif // _a_H file: a.c #include "a.h" int poly (int a, int b, int c, int x) { return a*square(x) + b * x +c; } file: main.c #include <st...

Keeping directory structure when creating frameworks in xcode

I'm trying to create a .framework in Xcode and have successfully done so, but as it turns out, Xcode flattens the directory structure of when copying headers in the Copy Headers build phase. I've tried adding the files as Folder References instead of the groups, but then it won't even recognize the header-files as header files! So, how ...

With CXF (actually GroovyWS), how do I generate a SOAP header with one child node having a text node?

I'm creating a Groovy client for a .net SOAP service that requires a soap header that looks like this: <soap:Header> <HeaderInfo xmlns="http://foo.bar.com/ns"&gt; <token>abc-unique-token</token> </HeaderInfo> </soap:Header> I found the faq for adding headers to CXF messages and it gets me almost there, but not quite. ...

What HTTP header RESPONSES should I be explicitly setting when I output a webpage?

So I just now learned of the X-Robots-Tag which can be set as part of a server response header. Now that I have learned about this particular field, I am wondering if there are any other specific fields I should be setting when I output a webpage via PHP? I did see this list of responses, but what should I be manually setting? What do...

How do I force-download a dynamic image that requires arguments?

I have a dynamic image which uses GD to throw in some overlay images/text. This would be dynamicImage.php?firstName=Bob&lastName=Sacamano. I want to be prompted to download that file, so I created a download.php file to act as the middle-man: //Get the Arguments $file .= "firstName=".filter_var($_GET['firstName'], FILTER_SANITIZE_STRING...

(C++) Whole class in .h file?

If I am creating a class with small functions that don't do much, is it acceptable to just put them all into the header file? So for a particular class, it's only just the .h with no .cpp to go with it. ...

CMake and absolute header paths

Hi folks, I've been googling for a while and I no result yet so I turn to you guys ^^ I'm trying to use CMake to build my C++ project and I have a problem in the header paths. Since I'm using a lot of classes organized in several directories, all my include statements are with absolute paths (so no need to use "../../") but when try to...

Url redirect after click and downloading a file

Hi; My goal is to redirect or refresh my page while downloding excel file : Details : In my application i am sending dynamically generated excel file setContentType("application/vnd.ms-excel; charset=windows-1254"); setCharacterEncoding(Constants.ENCODING); setHeader("content-disposition", "attachment;filename=" + Constants.DEFAULT_...

What's the bestway to include "third party" headers to your C++ project

I'm building a bunch of windows libraries (mostly simple wrappers to compine features from API and third party libraries) to be consumed later by set of applications which have very similar requirements. Most of libraries are depending from another library and all of them are depending from one common library. This common library contai...

wordpres editor (tiny mce) and inline header tags

hi, I am using wordpress for a site, I want to created a couple of sizes of text on the same line with h1 and h2 tags. The problem is when I try and create the h2 on the same line it changes the whole line to h2. Now if I was doing this I could just switch to source and edit but the person editing may not have the technical ability to ...

PHP download method hanging up page... best practices for pushing a download?

Hi there, quick question: I've got a form that forces a user to enter an email, after which a download/attachment is pushed and a file is downloaded... the file downloads fine... however... My problem is that when the download starts, the page locks up, and the user can't navigate anywhere or do anything on the page until the file is do...

XTHML thead, tfoot and tbody importance

Hello! Does XHTML have an 'opinion' regarding the use of <thead>, <tfoot> and <tbody>? Is there a case where they should be used? Thank you. ...

Using PHP mail - setting correct MIME type

I've got a problem with a PHP script which sends an email confirmation. When receiving the email in Thunderbird, the header comes through with the \r\n present and with the MIME type also containing the Content-type information. Hence the email renders as plain text, rather than HTML. If I comment out the MIME type as below, the email r...

Child headers for ExpandableListView using CursorTreeAdapter

How do I create a header for every expanded ChildView without affecting my underlying data and onClick / onLongClick events on the ChildView. Below is the skeleton implementation of my ExpandableListView adapter: private class EAdapter extends CursorTreeAdapter { public EAdapter(Cursor cursor, Context context) { super(cursor, contex...

I Need Help Understanding Zend Framework (MVC) Header and Footer Best Practices

I'm new to MVC and Zend Framework and I'm working on a project, mostly on the front end. I'm trying to get a sense of what are best practices. Currently the footer and header are setup through several scripts, one that is a giant XML file of all the content on the website (I think to make the website international friendly, things are w...

Force cache thru header for dynamic generated JS/CSS files not working for all browsers

I have a lot of JS and CSS files for my site. In order to minimize connection requests from browsers, I join them in a single php file. I'm using header parameters to force the files to BE cached. Here is how I do for the JS case (CSS is exactly the same way): <?php ob_start("ob_gzhandler"); $expires= 60 * 60 * 24 * 14; header('Pragma: ...

php header redirect not working

Hi all, I'm using an ajax call to trigger a php redirect using headers. According to chrome's developer tools the content of the page is loaded (ie: is in the resource list), but the page never redirects. I'm not getting any error codes. Here's the php: <?php ini_set('display_errors', false); if (!isset($_SESSION)) { if($_POS...

UTF-8 content type meta tag is slowing down the page loading, why?

I'm setting the following meta tag to set the content type and in doing so the page load time jumps by about 30% (350 --> 500 msec using chrome dev tools and firefox firebug). Note: I have it placed first thing inside the tag to prevent re-rendering of page content. Also, the size of the page in kb is essentially the same, so that is no...

Section header in ListView not show correctly

This question is the same as my another question http://stackoverflow.com/questions/3648840/listview-with-section-header-problem When scrolling the ListView, some header text will appear, below are the related code for easier understanding: records.setViewBinder(new SimpleCursorAdapter.ViewBinder() { public boolean setViewValue(Vie...