header

best-practice on C header files with #ifndef #define #endif

what is concerned best practice regarding the following "pattern"? #ifndef BLAFOO_H #define BLAFOO_H /* ... * ... */ #endif /* BLAFOO_H */ how should i name the header in the #define directive? i've seen all from said BLAFOO_H to __BLAFOO_H to _BLAFOO_H_ etc.. ...

How are constants initialized in Objective-C header files?

How do you initialise a constant in a header file? For example: @interface MyClass : NSObject { const int foo; } @implementation MyClass -(id)init:{?????;} ...

Make browser to go back by reloading page 1st and then scrolling it back again too

EXPLAINING WHAT I'M TRYING TO SOLVE: I have a webpage (file_list.php) showing a list of files, and next to each file there is a button to delete it. When user press the DELETE button close to a certain file name, the browser goes to a script called delete_file.php that deletes the file and then it tells browser to go back to the file_li...

PHP header redirection does not reload <iframe> in IE

When displaying data from DB usually I'm in this situation I'm in page A.php that shows data from DB, user performs some action (like edit/delete etc) and page B.php is loaded to perform the action, once page B performed the action, it redirects browser to page A, page A is auto reloaded during step (3) therefor it shows an updated sit...

Sinatra not passing header with redirect

Hi All I have a simple Sinatra proxy, which when an endpoint is called, will redirect to another endpoint on the same Sinatra proxy. When I make a request with a header, the proxy doesn't seem to pass this header through to the second endpoint when the request redirects in the first. This is my code: get '/first' do # g...

How to create manual php header?

hello i would like to know how would it be possible to create a manual php header example header("Content-Disposition: form-data; name=\"$fieldname\"; filename=\"$filename\"); instead of using that i would like to create manual it as $senddata = "Content-Disposition: form-data; name=\"$fieldname\"; filename=\"$filename\"".$nn; ...

Is it a header file or library? in a makefile

I already know the differences between a header file and a library. However, when I'm writing my makefile, I have some difficulties on deciding if I should put something as a dependency of the file or just at the linking rule. For example: I have 2 simple files: main.c: #include <stdio.h> main(){ printf("this is the sine or 90"); s...

WCF (REST) multiple host headers with one endpoint

I have an issue with a WCF REST service (.NET 4) which has multiple host headers, but one end point. The host headers are for example: xxx.yyy.net xxx.yyy.com Both host headers are configured in IIS over HTTPS and redirect to the same WCF service endpoint. I have an Error Handling behavior which logs some extra information in case of a...

IE/FF-compatible HTML table with fixed header and footer, scrollable vertically and horizontally

I need an HTML super-table of a sorts. It's fine if it's based on jQuery or some other JavaScript library. In fact I don't really care what the drawbacks are provided that the following requirements are met. Must support: At least IE8 and the most recent version of Firefox Variable-width columns (no pre-defined widths) A fixed header ...

How do I get header from a PHP download page?

Hi, I have a PHP download page. When i submit a form to the page, it prompts a download window (save,open,run..). How do I get header of the download page in php? I tried to use curl, but the result was empty. $post_data = "var=value"; $agent = curl_init(); curl_setopt($agent,CURLOPT_URL,MY URL); curl_setopt($agent, CURLOPT_POST, true...

Getting the correct headers automatically given a filetype in PHP...

Sorry - looks like this is a duplicate of: http://stackoverflow.com/questions/1232769/how-to-get-the-content-type-of-a-file-in-php A few times I've run into situations where I'd like to be able to include a file using PHP, and depending on the included filetype, output the appropriate headers. In the past I've just done this manually ...

PHP: session isnt saving before header redirect

Hi guys, I have read through the php manual for this problem and it seems quite a common issue but i have yet to find a solution. I am saving sessions in a database. My code is as follows: // session $_SESSION['userID'] = $user->id; header('Location: /subdirectory/index.php'); Then at the top of index.php after the session_...

C++: How to use types that have not been defined?

C++ requires all types to be defined before they can be used, which makes it important to include header files in the right order. Fine. But what about my situation: Bunny.h: class Bunny { ... private: Reference<Bunny> parent; } The compiler complains, because technically Bunny has not been completely defi...

Working with wchar in C

I have this code: #include <stdio.h> #include <wchar.h> int main() { wchar_t *foo = L"ðħ"; wprintf(L"[%ls]\n", foo); return 0; } And when I compile it, it gives me the implicit declaration of function ‘wprintf’ warning. I know that I should link the wchar library during compilation, but how do I do that? ...

Inserting username/password in soap header using wse

I am creating an asp.net web service using visual studio 2008 using wse3.0. It will be calling a java web service in JBoss WebSphere. The java web service expects username/password token in the soap header. i have created web service proxy Dim srv As New externalWebservice.externalWebservice() Dim userToken As UsernameToken userT...

How to make fixed header in gridView inside asp:panel?

Hi I ran into a strange issue. I am able to put gridview inside asp:panel and scrolling works too. But the moment I down, the header of gridView scrolls above inside the panel and gets hidden. I just want to scroll rows, not the header. How can I do that? Please advise. Following is what I am using. On a side note, I have tried to wra...

Alternatives to the --sysroot switch of gcc?

The --sysroot switch is useful when you don't want the headers/libraries in the standard paths affect your build. --sysroot=dir: Use dir as the logical root directory for headers and libraries. For example, if the compiler would normally search for headers in /usr/include and libraries in /usr/lib, it will instead search di...

How to get response headers from WebBrowser control in .NET ?

After WebBrowser.Navigate() how to retreive response headers returned by server ? ...

Make function declarations based on function definitions

I've written a .cpp file with a number of functions in it, and now need to declare them in the header file. It occurred to me that I could grep the file for the class name, and get the declarations that way, and it would've worked well enough, too, had the complete function declaration before the definition -- return code, name, and par...

Reuse C++ Header files

Guys, I have a Visual C++ solution with 2 projects AlgorithmA & AlgorithmB and both share a common header file RunAlgo.h with the class declaration. Each project in the solution has its own unique implementation for the header file. I am trying to compile a DLL out of the common header file RunAlgo.h and add reference to this DLL i...