Posts

mysql - Table insert unexisting values -

current situation tblgamepoints id gamenumber playerid game points ----------------------------------------------- 1 1 fps 150 2 1 b fps 150 3 2 fps 100 4 2 b fps 75 when starting gamenumber 3 add empty rows of game in case not allready have points (penalty points). example 1: id gamenumber playerid game points ----------------------------------------------- 1 1 fps 150 2 1 b fps 150 3 2 fps 100 4 2 b fps 75 in example above, there aren't existing rows gamenumber 3 insert statement should insert games points 0 playerids example 2: id gamenumber playerid game points ----------------------------------------------- 1 1 fps 150 2 1 b fps ...

d3.js - Extending c3js with d3js code -

i new c3js, apologies if question sounds basic. c3js library seems powerful yet there features in d3js not available in c3js plan use inside c3js code. has experience in using d3js code c3js or using d3js inside or c3js code. reference, plan use click functions present in d3js on visualizations built in c3js. thanks while can access c3 chart elements using classes c3 uses (you can find full list of classes in source @ https://github.com/masayuki0812/c3/blob/master/c3.js#l5754 ), wouldn't right way attach click handlers - reason being c3 charts rendered in layers , click event may not triggered because it's used layer comes above. for instance, while var chart = c3.generate({ data: { columns: [ ['data1', 30, 200, 100, 400, 150, 250], ['data2', 130, 100, 140, 200, 150, 50] ], type: 'bar' } }); d3.selectall('.' + c3.chart.internal.fn.class.bar + ':nth-child(2)').attr...

Cant Increase Android Studio's Memory Heap -

Image
i using latest version of android studio 1.3 preview beta release. working slow on system (ram 4gb). when try edit java or xml file in editor takes 3-4 second write word. have followed this blog increase android studio's memory heap size. have updated studio64.exe.vmoptions file @ path c:\program files\android\android studio\bin\studio64.exe here inside vmoptions file: -xms128m -xmx4096m -xx:maxpermsize=1024m -xx:reservedcodecachesize=200m -xx:+useconcmarksweepgc -xx:softreflrupolicymspermb=50 -ea -djna.nosys=true -djna.boot.library.path= -djna.debug_load=true -djna.debug_load.jna=true -dsun.io.usecanoncaches=false -djava.net.preferipv4stack=true -xx:+heapdumponoutofmemoryerror -didea.paths.selector=androidstudiopreview1.3 -didea.platform.prefix=androidstudio but android studio memory heap remains same after changes in file. here screen shot still 512m: please suggest other solution? this file ignored android studio. on windows path update is %userprofil...

Using process in c# to run multiple matlab scripts -

so have matlab script initializes values , want run matlab script. there way tell process run script after first one. here's code, works fine runs 1 script. processstartinfo info = new processstartinfo(@"matlab.exe", @"-r script1"); process process = new process(); process.startinfo = info; process.enableraisingevents = true; process.start(); process.waitforexit(); process.exited += new eventhandler(myprocess_exited); evhandledgetlatest = process.hasexited; how can after script1 run script2? want run script1 , script2 in same process, script2 needs have values (in matlab workspace) created script1. if i'd consider calling matlab script directly c#. approach allow results script1 , pass them script2. you'll need add reference matlab com object. for full details see: http://www.mathworks.com/help/matlab/matlab_external/call-matlab-function-from-c-client.html

python - pandas handle NaN/None inserts into sybase -

is there working solution insert nan/none values pandas dataframe sybase-ase tables? i tried suggested solution after researching online (for pandas side): df.where(pd.notnull(df), none) however, when try insert sybase-ase using bulk_copy/bcp, none gets inserted 'nan.0' reason. any ideas why happen or knows of workaround accomplish these insertions of nan/none null sybase? [sybase supports null] full stacktrace databaseerror: df.to_sql('test_table', engine, if_exists='append', index=false, chunksize=1) traceback (most recent call last): file "<stdin>", line 1, in <module> file "/7ff6xgw24wvny74gfgzcvf6p88vc6k1a-pandas-0.15.2-16/lib/pandas/core/generic.py", line 966, in to_sql dtype=dtype) file "/7ff6xgw24wvny74gfgzcvf6p88vc6k1a-pandas-0.15.2-16/lib/pandas/io/sql.py", line 538, in to_sql chunksize=chunksize, dtype=dtype) file "/7ff6xgw24wvny74gfgzcvf6p88vc6k1a-pandas-0.15.2-16/lib/pan...

svn - Android Studio with Subversion on Windows works fine, but keeps throwing errors -

my environment android studio, win 7, subversion. everything works fine, however, related subversion, commits, updates keeps throwing errors if didn't work. but worked! when commit change, colleagues can update files , changes there. it's these annoying random messages. this message when update repository: error:svn: e155000: failed add directory 'app/build/intermediates/res/debug': unversioned directory of same name exists work, because can see changes colleagues. this when try check in error:warning: post-commit fs processing had error 'attempt write readonly database'. weird... still working fine! what's happening , how can rid of these error messages? thanks help. i fixed problem going on subversion server , adding permissions write group on file: /home/svn/repos/db/rep-cache.db hope helps else.

css - Why does my <ul> have a background of an element which isn't its parent? -

i trying build page header, includes navigation bar @ bottom. however, navigation bar has background colour of main content, not of header. i searched site similar problems, , tried overflow: hidden, or adding overflow: auto .main, suggested, none of these solutions worked. have tried removing lines css, such float: left; didn't work. adding background: inherit ul gives background colour small area around nav bar, not width of header. .main { background-color: darkolivegreen; border-radius: 15px; max-width: 1000px; margin: 0 auto; text-align: center; height: 800px; } header { background: chartreuse; border-radius: 15px 15px 0 0; padding: 10px 10px 10px 10px; } ul { float: left; display: block; position: absolute; margin-left: -45px; } li { display: inline; background: cyan; border: 2px solid black; border-radius: 5px 5px 0 0; margin-left: -5px; } h1 { font-size: 35px; margin: 10px 0 0 0; } img { ma...