Tag Archives: dynamic

How to make mod_cache work properly with dynamic content?

Questions: I’m trying to use mod_cache to cache dynamically generated content. This is my Apache config: CacheEnable mem / MCacheSize 4096 MCacheMaxObjectCount 100 MCacheMinObjectSize 1 MCacheMaxObjectSize 2048 CacheIgnoreCacheControl On CacheIgnoreNoLastMod On CacheStorePrivate On CacheStoreNoStore On <Location /cgi-bin> SetHandler cgi-script Options +ExecCGI </Location> And this is one CGI script (just for testing): #!/opt/app/phantomjs/bin/phantomjs var date =… Read More »

How to dynamically add a hyperlink (BookmarkablePageLink) to DefaultDataTable that is rendered as an anchor

Questions: I have a DefaultDataTable that gets its columns programmatically. The markup is simple: <table wicket:id=”dataTable” border=”0″ cellpadding=”1″ cellspacing=”1″ width=”90%” /> All of the columns are dynamically generated from a passed in LinkedHashMap of labels and attributes: for (Entry<String, String> entry : entrySet) { final String label = entry.getKey(); final String attribute = entry.getValue(); columns.add(new… Read More »

Nginx “No input file specified.” in a dynamic folder subdomain setup

Questions: Right, so I have this folder: /home/sites/dev/testphp/ inside this folder there’s an index.php file, with a simple echo line. I also have a /home/sites/dev/testhtml/ with an index.html file. When I visit http://testhtml.dev.ilun.no/ it works as expected. But when I visit http://testphp.dev.ilun.no/ I simply get “No input file specified.” This is my config so far:… Read More »

Dynamic update statement with variable column names

Questions: We’re looking to do an update in several SQL Server databases to change all NULL values in a certain table to be empty strings instead of NULL. We’re potentially going to be doing this across hundreds of databases. The table name will always be the same, but the column names are variable based on… Read More »

SQL Server : dynamic pivot over 5 columns

Questions: I’m having a very tough time trying to figure out how to do a dynamic pivot in SQL Server 2008 with multiple columns. My sample table is as follows: ID YEAR TYPE TOTAL VOLUME DD1 2008 A 1000 10 DD1 2008 B 2000 20 DD1 2008 C 3000 30 DD1 2009 A 4000 40… Read More »

nginx proxy_pass dynamic hostname part

Questions: When nginx proxy_pass is a dynamic value expected to be build by substituting hostname part in URL, nginx is failing to proxy request with error: no resolver defined to resolve service where service=$1. Instead of trying to resolve service.abcd.local, it seems it is trying to resolve just service. Is there solution to this ?… Read More »

How can I make a SQL table from an XML file that will have a dynamic number of nodes?

Questions: I’m using SQL Server 2008. The task: take an XML file and parse it into a(n) SQL table. The problem: The number of columns and their names will vary based on the XML. Here’s some code: DECLARE @xmlData XML; SET @xmlData = ‘<root> <item id=”1″> <item_number>IT23</item_number> <title>Item number twenty-three</title> <setting>5 to 20</setting> <parameter>10 to… Read More »

Generate Dynamic Excel from Java

Questions: We’ve pre-defined Excel document structure with lots of formulas and macros written. During download of Excel, thru Java application we populate certain cells in Excel with data. After download when user open Excel, macros & formulas embedded in it will read the pre-populated data and behave accordingly. We are right now using ExtenXLS to… Read More »