Posts

Error while running python program -

Error while running python program - i running code pyzillow , encountering next problem while importing django library. from django.contrib.gis.geos.error import geosexception importerror: no module named django.contrib.gis.geos.error thoughts? follow django docs, find line in settings , create this- geos_library_path = r'c:\program files\osgeo4w64\bin\geos_c.dll' this solve issue python

mysql - The couchdb equivalent of a relational database model -

mysql - The couchdb equivalent of a relational database model - i new @ utilize of couchdb, have background in backend programming , relational databases. i want "migrate knowledge" mysql couchdb. although found lot of info installation , getting started tutorials, having problem "translate" relational model couchdb document storage. , know, need reset way of thinking... i want matter best way possible, started basic exercise. have simple relational model actual in utilize software application. simplicity purposes, toned downwards number of fields. case we have stack of cards. each card has own properties (id, name, imgpath, etc). each user can have random collection of cards picked stack in own cards collection. mysql in mysql there 3 tables: users [id, name, password] cards [id, name, value1, value2, imgpath, etc] usercards [userid, cardid] other relevant information: we have more 10k users , growing. it's mobile app, speed much r...

Python pyodbc Unicode issue -

Python pyodbc Unicode issue - i have string variable res have derived pyodbc cursor shown in bottom. table test has single row info รค unicode codepoint u'\xe4' . the result >>> res,type(res) ('\xe4', <type 'str'>) whereas result should have got is. >>> res,type(res) (u'\xe4', <type 'unicode'>) i tried adding charset utf-8 pyodbc connect string shown below. result correctly set unicode codepoint someother string ꓃ due possible bug in pyodbc driver. conn = pyodbc.connect(dsn='datbase;charset=utf8',ansi=true,autocommit=true) >>> res,type(res) (u'\ua4c3', <type 'unicode'>) actual code import pyodbc pyodbc.pooling=false conn = pyodbc.connect(dsn='datbase',ansi=true,autocommit=true) cursor = conn.cursor() cur = cursor.execute('select col1 test') res = cur.fetchall()[0][0] print(res) additional details database: teradata pyodbc versio...

Syntax when calling an array as the variable in a new block of code? [C] -

Syntax when calling an array as the variable in a new block of code? [C] - i'm still pretty new coding i'm having problem syntax in situation. how supposed format this? whenever seek build program, says there error: error: expected primary-expression before ']' token assign_q(chess[][]); there's no need me set code here, here's little snippet: #define n 8 int chess[n][n] = {2}, l, m; void assign_q(int chess[n][n]); int main() { int i, j; assign_q(chess[][]); in c, if want pass array, have not have utilize [] -operator. [] -operator access array-elements. in illustration chess of type int [][] , there no need de-reference it. however, may not have pass array @ all. if declare array @ global scope have done it, can access straight anywhere within same compilation unit or 1 using extern . c arrays

Serilog - Output/Enrich All Messages with MethodName from which log entry was Called -

Serilog - Output/Enrich All Messages with MethodName from which log entry was Called - is there anyway enrich serilog output method name. for instance consider if have following; public class myclassname private function myfunctionname() boolean logger.information("hello world") homecoming true end function end class the desired output follows; 2015-04-06 18:41:35.361 +10:00 [information] [myfunctionname] hello world! actually qualified name good. 2015-04-06 18:41:35.361 +10:00 [information] [myclassname.myfunctionname] hello world! it seems "enrichers" static info , won't work each time. it's possible enricher reflecting on phone call stack, expensive so, serilog doesn't offer it. instead can utilize like: logger.here().information("hello, world!"); and implement here() method extension method on ilogger : <extension> public sub here(byval logger ilogger, <callermem...

spring mvc wrong error code (405 instead of 415) -

spring mvc wrong error code (405 instead of 415) - i've got next (simple) controller method: @requestmapping( value = "/testjson", method = requestmethod.post, consumes = application_json_value, produces = application_json_value) @responsebody public string testjson() { logger.info("got test"); homecoming "test"; } when send post request url containing header "content-type=application/json" works fine. the unusual thing is, when don't send content-type or content-type "text/plain" (still post request), next error code server: 405 method not allowed. but expect error code: 415 unsupported media type. response header contains next line: allow: get, head not create sense too... i right error code api. thought problem be? i'm using spring 4.1.6.release on tomcat 7.0.59. thanks help. spring-mvc error-code

java - Get Android Notification To Appear As Banner -

java - Get Android Notification To Appear As Banner - i've looked extensively across wide range of terminology ("banner", "pop down", "notification type") , can't seem find clarity on 'think' mutual issue. if there obvious solution missed due lack of terminology please advice. the problem this: want android notification appear "banner" drops downwards top of screen (if banner wrong word please advise). went through docs , didn't seem across setting toggles behaviour. here illustration of like: i have notification working showing within drawer. it's not popping downwards drawer (which want). here code, if can advise how can create appear banner appreciate it: public void createnotification(context context, bundle extras) { notificationmanager mnotificationmanager = (notificationmanager) getsystemservice(context.notification_service); string appname = getappname(this); intent notificationin...