Posts

sql server 2008 - django connection.cursor.execute() returns None -

in python shell (python 2.7, django 1.6, windows 8), i'm trying execute simple query against 1 of table in sql server 2008 (engine=django_mssql): connection.cursor.execute("select * mymodel_mytable") the result none. connection working since simple : mymodel.objects.get(pk=1) returns expected row. if same in shell (ubuntu, engine=django_pyodbc), returns expected pyodbc_cursor object on can fetch rows. where wrong? please, help! regards, patrick edit: databases dict in settings is: databases = { 'default': { 'engine': "sqlserver_ado", 'host': "myhost,myport", 'user': "myuser", 'password': "mypass", 'name': "mydb", 'options': { 'provider': "sqlncli10", 'extra_params': "datatypecompatibility=80;mars connection=true;" }, 'command_time...

Android - How to call an intent(activity) inside the onDraw(Canvas) properly? -

i'm trying call intent inside canvas doesn't seem work way thought should be. have in mind when passes through startactivity() , that's it, exits canvas right away wrong. flow should be: menu -> pong(activity) -> canvas -> game_over what's happening: menu -> pong(activity) -> canvas(screen stuck here) -> game_over(iterates unknown times) sometimes crashes , won't proceed game_over. inside ondraw() code below when game on condition met: intent = new intent(getcontext(), gameover.class); i.putextra("score", integer.tostring(ball.getscore())); i.putextra("level", integer.tostring(ball.getlevel())); getcontext().startactivity(i); from i've observed after making scores, seems looping 20+ times since toast "high score" found in next activity won't stop , screen stuck @ canvas until loop stops. gave me clue activity called looping countless times. who's @ fault here? ondraw() redrawing thou...

java - My buttons wont appear until i hover over it with my mouse -

i have problem , yes saw other people had problem not realy able compare there code mine , see problem way hope u can me. i use intellij write code , use there gui desinger make gui's when added button didnt display untill hover mouse , possitions wrong , cant realy work. here classes // jpanel class public class paintmenu extends jpanel{ public jpanel menupanel; public jbutton newgamebutt; public jbutton loadgamebutt; public jbutton helpbutt; public jbutton optionsbutt; public jbutton info; public jbutton quitbutt; public paintmenu(){ add(newgamebutt); add(loadgamebutt); add(helpbutt); add(info); add(optionsbutt); add(quitbutt); setvisible(true); } //this de jframe class public class jframepainter extends jframe { paintmenu menupaint = new paintmenu(); public jframepainter(){ //main frame settings settitle("kingdom v " + reference.version); setsize(reference.width, reference.height); setresizable(false...

oracle11g - OBIEE 11G writeback Insert XML -

this question exact duplicate of: write form in obiee 1 answer i creating xml inserting values table using writeback feature in obiee 11g. here xml coding , getting error message says...."the system unable read write template 'stg_de_accounts_receivable_insert'. please contact system administrator." <?xml version="1.0" encoding="utf-8" ?> <webmessagetables xmlns:sawm="com.siebel.analytics.web/message/v1"> <webmessagetable lang="en-us" system="writeback" table="messages"> <webmessage name="stg_de_accounts_receivable_insert"> <xml> <writeback connectionpool="lcs_cp_var"> <insert>insert stg_de_accounts_receivable(al_90_rcvbl, al_cur_rcvbl, al_tot_rcvbl) values (@{c3},@{c4},@{c5}) </insert> <update...

Highcharts change symbol and hover text of individual points Line Chart -

in reference example: http://www.highcharts.com/demo/spline-irregular-time how 1 change symbols individual points , put custom hover on text each individual point, when our series structured in example? thanks! solved using this code. var chart = new highcharts.chart({ chart: { renderto: 'container', defaultseriestype: 'line' }, series: [{ data: [{x:1.0,y:209.9,marker: {symbol: 'url(http://www.highcharts.com/demo/gfx/sun.png)'}}, {x:4.0,y:71.5}] }] });

php - How to use variables in a curl post? -

i creating php script use curl add new row in parse database. having difficulty adding variables setopt statement. if lead me in right direction, appreciate it. this php code executing curl statment: //curl commands send information parse $ch = curl_init('https://api.parse.com/1/classes/classname'); curl_setopt($ch,curlopt_httpheader, array('x-parse-application-id:secret1', 'x-parse-rest-api-key:secret2', 'content-type: application/json')); curl_setopt($ch, curlopt_returntransfer, 1); curl_setopt($ch, curlopt_post, 1); curl_setopt($ch, curlopt_postfields, "{\"name\":\"$devicename\"}" ); echo curl_exec($ch); curl_close($ch); the response is: {"code":107,"error":"invalid json"} thank in advance! is there reason can't encode array before sending data? for example (untested): $arr = [ "name" => $devicename ]; $arr_string = json_enco...

addeventlistener - addEventListner not working in Lua -

here's relevant functions in code, following error: stack traceback: [c]: in function 'error' ?: in function 'getorcreatetable' ?: in function 'addeventlistener' ?: in function 'addeventlistener' main.lua:26: in function 'createplayscreen' main.lua:79: in main chunk my code: -- set forward references local spawnenemy --create play screen local function createplayscreen() local background = display.newimage("spacebackground.jpg") background.x = centerx background.y = -100 background.alpha = 0 background:addeventlistener ( "tap", shipsmash ) local planet = display.newimage("earth.png") planet.x = centerx planet.y = display.contentheight+60 planet.alpha = .2 planet.xscale = 2 planet.yscale = 2 planet:addeventlistener ( "tap", shipsmash ) transition.to(background, {time = 2000, alpha = 1, y = centery, x = centerx}) local function showti...