header

dojo datagrid custom sorting server side

Hello I am using dojo.data.ItemFileWriteStore to draw a dojo datagrid (which works fine) and the grid shows properly. I was using client side sorting and that was also working fine. but now I need to change the sorting and do that server side. For this I am trying to use onHeaderCellClick event, using which I am able to run a javascript ...

How Do I Cache Just the Homepage with Apache .htaccess?

Below is an example on how to cache all files on the server ending in html or htm for 2 hours (7200 seconds). So how would I go about doing this only for the homepage of the website, but not any other URL? <FilesMatch "\.(html|htm)$"> Header set Cache-Control "max-age=7200, must-revalidate" </FilesMatch> I tried a Directory and a Loca...

Why can't I put a "using" declaration inside a class declaration?

I understand the troubles you can get into when you put a using declaration inside a header file, so I don't want to do that. Instead I tried to put the using (or a namespace foo =) within the class declaration, to cut down on repetitive typing within the header file. Unfortunately I get compiler errors. Seems like it would be a usefu...

Html: Should the h1 tag be used for the site title or the page title?

In the past I have often put the site title in an <h1> tag, and then the main page title in an <h2>. Is this considered correct, or should the main page title be in the <h1> tag? If so, where do you put the site title? In a regular <div>? Or? What is the most semantically correct, and what is the best when considering things like access...

gcc Can't Find a Included Header

I'm using a header called colors.h to organize my source code. The header is like this: #define DEFAULT 0x07 #define BLACK 0 #define GRAY 7 #define BLUE 9 #define GREEN 10 #define CYAN 11 #define RED 12 #define MAGENTA 13 #define YELLOW 14 I'm putting the header at the same directory of the main source code, called kernel.c, and inclu...

WPF Toolkit DataGrid: how to get ColumnHeader width to be the same as GridColumn width

For my WPF Toolkit DataGrid I use the following custom column header style: <Style x:Name="ColumnStyle" x:Key="ColumnHeaderStyle" TargetType="my:DataGridColumnHeader"> <Setter Property="ContentTemplate"> <Setter.Value> <DataTemplate> <StackPanel Orientation="Vertical" HorizontalAlignment="Stretch"...

What is the best way to deal with co-dependent classes in C++?

Say I have a class foo with an object of class bar as a member class foo { bar m_bar; }; Now suppose bar needs to keep track of the foo that owns it class bar { foo * m_pfoo; } The two classes reference each other and without a forward declaration, will not compile. So adding this line before foo's declaration solves that p...

How to create a soap client without WSDL

i need to visit a secure web service, every request in the header need to carry a token. i know the endpoint to the web service, i also know how to create the token. but i cannot see the WSDL for the webservice. is there a way in C#, to create a soap client, without the WSDL file. ...

C header file with bitmapped fonts

Hi, I need to do some rudimentary text rendering to a pixel buffer, and I think that having a table indexed by char with the representation of the letters as a binary array would be more than enough... Anybody knows about a free header as such? Example: char data[256][8][8]; void init() { data['a'] = { {0,0,1,1,1,0,0,0}, {0,1...

HTTP If-None-Match vs. If-Match

I'm currently building up a PHP script that will answer HTTP "304 Not Modified" when required. (See question #2086712 for what I do so far). Currently I answer to the following: If-Modified-Since If-None-Match But I found out that 3 more headers can trigger a "conditional GET" (See http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.h...

Why do I get "Premature end of script headers" from my CGI proxy?

Hello, I have CGI proxy that works on my localhost, but when I try to get it work on another server I get Premature end of script headers. I have included the source below. I also tried print header instead of the text/xml and it worked localhost but it failed on the server. use strict; #use warnings; use CGI qw(:standard); use CGI::Car...

PHP Header problem even i use ob_start() and ob_end_flush()

i m getting header problem while i m using ob_start(); in the start of a page and ob_end_flush(); end of the page. because i m using header function after some query execution my code is here <?php ob_start();?> <?php include_once("header.php"); ?> <?php global $db; $countstmt="SELECT COUNT(*) FROM tbl_lib_hours dh WHE...

How to get wxCurl to automatically follow redirects?

I have a project that uses wxCurl to retrieve a file over HTTP. However, if the server sends a 301 or 302, all I get back is an empty string. I heard there was a way to get cURL to follow the location: headers sent by the server. How is this done? Also, how do you set the User-agent header in wxCurl? ...

Automatically Passing WCF headers from Service to Service

Hi, We have and app that is using custom headers to pass what we call a "callerid". The caller is just a way of identify which customer is calling the service, so we can connect them to the right db etc. At the moment we have 3 services which all require the callerid to function. so a call might be callerid --> callerid --> callerid S...

XCode 3.1.2, header file not found

Hi All: I have been trying to build a code that has dependencies with other header files that are not in the project directory. I added the paths to these header files in both HEADER_PATH and USER_PATH. However, I still see error while building. It says that the file is not found. I verified that the file exist in the path added t...

HTML Headers for blocking file download prompt in webbrowser control in C#.net

is adding header in webbrowser.navigate ok to block file download prompt in webbrowser control in C#.net? ...

How to send a HTTP Header request rather than HTTP URL in Python.

I'm doing Oauth, and Linkedin needs me to send a "header" request instead of URL request (I have no idea what that means). This is what someone says on Google: If the library you are using isn't using HTTP headers for the authorization, you're not going to be able to access protected resources. Most OAuth libraries have an o...

How can I add SOAP Headers to a WSDL generated Borland C++ Builder 6 application.

Using a WSDL that requires a SOAP HEADER for Authentication (fragment below) code that gets generated when creating a web service client via the "WSDL Importer" has no concept of the Authentication Headers and there are no examples in BCB6 C++ Examples/WebServices directories that show how, and nothing on Web that I can find. Anyone wit...

Struct with a value in a header file causing "duplicate symbol" linker error

This is a cut down example of a much larger project. You can see it here. I have a header file containing the limits of the system time functions. Call it time_config.h. #ifndef TIME_CONFIG_H #define TIME_CONFIG_H #define HAS_TIMEGM #define SYSTEM_LOCALTIME_MAX 2147483647 #define SYSTEM_LOCALTIME_MIN -2147483...

Cache-Control HTML Headers

In an effort to tell a browser's cache how to treat my site, I wanted to write some cache control rules in the header. There is a great resource here, but I cant seem to find the correct cache control code for my situation. Because my website is static, I want the browser to always keep the data in its cache. BUT, the pages that do chan...