How to create a mysql table using a variable name in Python?

I've tried to use the article Python MySQLdb execute table variable as an example, but so far no joy. I'm trying to create a table whose name is a concatenation of "archive" and the year passed in as a variable. This is an alternative to hardcod

Unable to Style WPF ComboBox on Mouse Hover

Does anyone know how to style the background property of a WPF ComboBox when a mouse is hovering on top of it? I cannot get rid of the blue-ish button like background off the ComboBox.It will not work.Its because of the default control template of Co

How and when to hydrate domain objects in the CQRS stack

Suppose I have a command that saves an application Role along with some application Permissions. My roles and permissions have (or will have) business rules, so I'll use domain objects: class Role { ... IEnumerable<Permission> Permissions { ... } Ad

Application of the rails deployed with the Chief

Is there is any predefined cookbook to deployed rails app using chef. I have searched a lot and found a resources: http://www.concreteinteractive.com/how-to-deploy-a-rails-application-anywhere-with-chef/ Is there any good stuff from it or alternative

Some git usage questions

say I create a branch, then merge into master, then realize things went wrong. How can I revert back to before I merged? say I create a branch, work on it, and then go to merge and get allot of conflicts. Say I don't want to deal with it and make the

Invalid domain error in the messaging settings API

I tried to create labels in my personal Gmail Account using Email Settings API. I have sent http post reqeust to the below URL https://apps-apis.google.com/a/feeds/emailsettings/2.0/gmail.com/username/label but am getting invalid domain (403) error.

Are there good strategies for A / B testing on mobile devices?

Based on what I know, A/B testing frameworks are for working with websites. For example, you want to know which of blue/red color of "Buy" button will encourage user to click it. Since website information of user interface comes from server, and

Create a custom line in yii Cgridview

I had created a yii Cgridview but how to make custom row in the it. I want to make the custom row whose data is static not related to database? the problem is similar to below http://www.yiiframework.com/forum/index.php/topic/47751-insert-first-row-i

Read MVC slightly according to a condition

My model has an property whcih I assigned a ReadOnly tag. My intention is to set a propery to readonly true or false depending of a condition like class Test { static bool test() { // It is my model // My logical response ... return true; } [ReadOnly

The RequireJs text plugin gives a cross-origin error in Chrome

I have some very basic RequireJs code that fetches an html file with simple html. In Firefox 8.0 it works fine, however in my build of Chrome (17.0.9.xxx) I get the following error: Cross origin requests are only supported for HTTP. Could this just b

Search speed: State or database?

I have a bunch of wordlists on a server of mine, and I've been planning to make a simple open-source JSON API that returns if a password is on the list1, as a method of validation. I'm doing this in Python with Flask, and literally just returning if

How to hide error notifications in linux bash aliases?

I wrote an alias to show me 10 biggest files and 10 biggest directories, so I tried to hide "du cannot access" and "no such file or directory" errors, without success. Below the alias that I wrote: alias big="echo 'Big Files:';fin

jQuery: how to select the input fields that appear in the tabs

I came across a situation, where I want to select the input elements which are not hidden and visible in other nav-tabs. I am using the following code to select the input fields $("input[type!=hidden]").each(function(){ ...... }); But, it select

Multiple Gross Input Buffer

Is there a way to have one raw input buffer per device? So I would like to have a buffer for mouse and another one for keyboard. Is it possible?Yes, try SetWindowsHookEx. You will have to convert WM_KEY* messages to WM_CHAR yourself, though.

The Dimple.js multi-storey bar is not stacked

Here is sample code... var svg = dimple.newSvg("#chartContainer", 600, 400), chart = null, s1 = null, s2 = null, x = null, y1 = null, y2 = null, data = [ { "ID" : "1", "Value 1" : 100000, "Value 2" : 11000

PLSQL: the varchar variable becomes null without any reason

trying to migrate some pgpl/SQL to psql oracle function, i discover a strange behaviour i cant explain at all. Here is my function : CREATE OR REPLACE FUNCTION small_distinct( tableName IN varchar, cols IN COL_ARRAY, whereCond IN varchar ) RETURN var

XMLDocument, difference between innerxml and outerxml

OuterXml - gets the XML markup representing the current node and all its child nodes. InnerXml - gets the XML markup representing only the child nodes of the current node. But for XMLDocument does it really matter? (result-wise, well I know it doesn'

Excel / VBA formula to get unique values ​​of two columns

For the following data in excel, I want to retrieve the unique pairs via Formula/VBA. Can someone please suggest a solution? NAME RESULT atest PASS atest PASS atest PASS atest FAIL atest PASS btest PASS btest PASS btest PASS The output should like fo

Invalid method when method is valid

I have just started a new version of my Crysis Wars Server Side Modification called InfinityX. For better management, I have put the functions inside tables as it looks neater and I can group functions together (like Core.PlayerHandle:GetIp(player)),

LDA for subject modeling in Python

I am new to Python, and I am trying to use the LDA package (https://pypi.python.org/pypi/lda). I have a list of titles and topics each one is related to. However, I have no clue how to use the package in the first place. I have read the documentation

What do you do to make the compilation lines shorter?

Often when I'm working on a project with others, the amount of library paths and include paths that get sourced by the compiler in the Makefile get more numerous as time goes by. Also the paths can get very long as well. Here's an example: g++ -c -pi