Apache 408 Connection timedout
nohup tail -f access.log | grep ‘408’ –line-buffered | awk ‘{split($0,a,” “); print a[1]; fflush()}’ | tee -a bad-408.txt
nohup tail -f access.log | grep ‘408’ –line-buffered | awk ‘{split($0,a,” “); print a[1]; fflush()}’ | tee -a bad-408.txt
This method uses strtok to tokeninze our string given a specific delimeter, results of that are put into supplied vector. There are few other ways we can do this but this one is straight forward. #include <iostream> #include <string> #include <string.h> #include <memory> #include <stdlib.h> #include <stdio.h> #include <list> #include <vector> using namespace …
So I been offline for a while, did not update my blog or do anything else. But I am back now. In up coming days I will post what have happen since begging of the year.
This is a simple mod that allow us to have custom product tabs in BigCommerce system, there is no limit on how many tabs you can have. Our final result will be this. Mod This mod requires modification to only one file /Panels/ProductTabs.html Step 1 Add current JavaScript to the existing script tag /** * …
Showing brand logos on product pages in BigCommerce sites is harder than it should be. Here is a quick mod that will let us do that without need of using the API. Here is the desired result Code This works by parsing you /brands page and then comparing current brand name to the one from …
BigCommerce Mod : Show brand logo image on Product Page Read More »
This is matlab function to calculate sum of A to N power using matrix diagonalization, it assumes that matrix is a square matrix. function [x] = powersum(A, m) % Greg Bugaj % Y = powersum(A, n) gives an sum of matrices to N power, if matrix size % is less than 2 then we simply …
Calculate A to N power matrix using matrix diagonalization. Read More »
Well here is my way on how to handle the ENTER key on the TextBox in asp.net so it execute my method call instead the default form action. I have a textbox and a linkbutton that invokes the search, but I also would like to hook up to that linkbutton when I press ENTER on …
There are many ways to accomplish this but this one does not use any external dependencies like Apache commons. Two common pitfalls that I see are that people forget to flush the ByteArrayOutputStream and they call ‘baos.write(buffer)’ instead of ‘baos.write(buffer, 0, read)’ without actually clearing the buffer, which causes the last write to append previous …
Sometimes its nice to be able to transfer object between request or for flash messages without need for a whole session. Here we will use session as our store mechanism for our flash scope. This concept here can be extended into implementing a ‘Conversation Scope’ but that is a whole different animal. Example Usage @FlashAttribute(TABNAME_ATTRIB) …
Title might be little misleading since in java we pass always by value, but we can mimic passing by reference. /** * This class allows us to pass values by reference ranter than value. * Not directly as java just passes reference of the object by value but indirecly * @author Greg * * @param …