Problems with OAuth on node.js
I am trying to get OAuth to work on node.js. I found this in the documentation of node-oauth:var OAuth= require('oauth').OAuth;var oa = new...
View ArticleMake HTMLUnit less verbose
I am using HTMLUnit to crawl pages and my log keeps getting cluttered by HTMLUnit output. I.e. It send a whole pages HTML to the log if it returns a 403 status-code.I tried the following to put it...
View ArticleExcluding large sets of objects from a query on a table with fast changing order
I have a table of products with a score column, which has a B-Tree Index on it. I have a query which returns products that have not been shown to the user in the current session. I can't simply use...
View ArticleNon-blocking HTTP calls in Storm with php
I am evaluating to built a webcrawler using Storm (the real time framework, not the IDE). My Spout would deliver a Stream of URIs, which have to be called and retrieved in the first Bolt, which is...
View Articlelog4j kafka appender doesn't use defined ConversionPattern
I am running a Storm cluster which uses log4j for logging. I want to add a kafka appender in addition to the standard file-based logging. My log4j config file looks like this:log4j.rootLogger=INFO,...
View ArticleTool to visualize cloud architectures
Is there a good tool to draw diagramms of cloud architectures? I know pen and paper is a good way, but I need something to use in an article, so the output should look professional and well rendered.An...
View ArticleHow to preserve DOCTYPE declarations when manipulating xml with Jsoup
I have a XML document which starts the following way:<?xml version="1.0"?><!DOCTYPE viewdef [<!ENTITY nbsp " "> <!-- no-break space = non-breaking space U+00A0 ISOnum...
View ArticleHow to concatenate a list with conditional entries to one string with SQL
I need to create a csv file which includes a field, where different elements should be listed, based on a condition for each entry.In example I have this tableid col1 col2 col31 false false true2 true...
View ArticlePhpmyadmin blocks when executing a large query
I am using phpmyadmin for my MySQL administration. When I'm doing an expensive query, which takes several minutes, phpmyadmin seems to block all other activities going on in other tabs. I can still use...
View ArticleHow to make a delayed non-blocking function call
I want to call the add function of an HashSet with some delay, but without blocking the current thread. Is there an easy solution to achieve something like this:Utils.sleep(1000, myHashSet.add(foo));...
View ArticleCronjobs in node.js
Is there a possibility to periodically call functions at a specific time of the day in node.js? My first implementation was setInterval(functionName(),(24*60*60*1000));This is suboptimal, because it...
View ArticleWhich split testing tools can be used for ajax heavy sites?
I want to do split testing on my single page website. The website is written with node.js server-side and also relies on Javascript in the front-end. All the content is accessed through an API which is...
View Articleparsererror after jQuery.ajax request with jsonp content type
I am using jQuery Version 1.5.1 to do the following ajax call:$.ajax({ dataType: 'jsonp', data: { api_key : apiKey }, url: "http://de.dawanda.com/api/v1/"+ resource +".json", success: function(data) {...
View ArticleUse specific middleware in Express for all paths except a specific one
I am using the Express framework in node.js with some middleware functions:var app = express.createServer(options);app.use(User.checkUser);I can use the .use function with an additional parameter to...
View ArticleSave session as BSON instead of a String on node.js with MongoDB
I am using node.js with express and connect-mongo as session store. When I am checking my sessions collection in mongo, there is only the _id attribute a session attribute in each dataset. The value of...
View ArticleHow to reference the latest Stream of a DynamoDB table in a Cloudformation...
I am writing a plugin for the serverless framework, which references a DynamoDB Stream by its ARN. I can construct the DynamoDB tables ARN with the information I have at hand, but I don't know the...
View ArticleHow to paginate with Mongoose in Node.js?
I am writing a webapp with Node.js and mongoose. How can I paginate the results I get from a .find() call? I would like a functionality comparable to "LIMIT 50,100" in SQL.
View ArticleCallback function for expired session for connect-redis in node.js
I am using Connect on node.js with connect-redis as session store. Is there a way to attach a callback function to the the event when the session expires, so I can backup data from the session, before...
View Article