If you want to revalidate the contents of some kind of image, without delivering the entire image, on each call: no-cache-Header won't be the right choice.
You may workaround this issue, by setting:
Cache-Control: max-age=3600, must-revalidate
If you want to revalidate the contents of some kind of image, without delivering the entire image, on each call: no-cache-Header won't be the right choice.
You may workaround this issue, by setting:
Cache-Control: max-age=3600, must-revalidate
In phing there is a task called
exec. Even though it provides a "passthru"-property it's not really possible to directly get the response from the output.
Since I wanted to have direct output of all data, I created an adhock-task called "run". You can add it to your phing build file, by adding this tag right before the usage.
<adhoc-task name="run">
class RunTest extends Task {
private $dir;
private $command;
function setCommand($command) {
$this->command = $command;
}
function setDir($dir) {
$this->dir = $dir;
}
function main() {
$this->log("Changing to: " . $this->dir);
chdir($this->dir);
$this->log("Executing: " . $this->command);
system($this->command);
}
}
</adhoc-task>
Remember, that this task does not check wether the directory exists and always requires it to be set. If you want to extend the task for your needs and mind to share it, feel free to post a reply!
Today I tried to mount a raid volume by using the following command:
# mount /dev/sda1 /mnt/disk
mount: unknown filesystem type 'mdraid'
I tried to figure out how to mount this then, but was not successful by searching for a filesystem type called mdraid to install. The reason is, that the software raid system (if detected) is an extra device (next to the physical harddisks) so using the following command:
#cat /proc/mdstat
Personalities : [raid1]
md2 : active raid1 sda3[0] sdb3[1]
726266432 blocks [2/2] [UU]
gave me the information I needed to know.
Mounting was now very easy:
mount /dev/md2 /mnt/disk
Today I was checking the
JSON-Support page for the Webservice Framework CXF.
While the webservice engine works great, I was not able to enable json-support, because the class HttpBindingInfoFactoryBean gave me a NoDefFoundError.
sf.setBindingFactory(new HttpBindingInfoFactoryBean());
It seems like the
documentation is just out of date.
The proper code (like taken from the mailinglist mail)
sf.setBindingId(HttpBindingFactory.HTTP_BINDING_ID);
No everything works fine. Also the ?wsdl is still available, useful for fetching information about all available functions/methods.
When you have (this should be discussed anyways) code in your javascript application changing to a different website, you'll see something similar to that:
location.href = 'test.php';
If you want to retrieve the referer on the next page, this will not work anymore. This is a
known IE Bug and not fixed in IE 8.
For instance this in javascript:
location.href = 'test.php';
And this as test.php
echo $_SERVER['REFERER'];
In this case, the output in IE will always be empty. In the other big browsers, it works like a charm.
But there is always, also this time, a workaround. Found at
If you use for all browsers such wrapper function:
function goto(url){
location.href = url;
}
You just have to make it like that for the one browser:
function goto(url){
var referLink = document.createElement('a');
referLink.href = url;
document.body.appendChild(referLink);
referLink.click();
}
As you can see, it will create a link with exactly the refer link. And will properly work then.