Posts

c++ - OpenGL: GL_FRAMEBUFFER_UNSUPPORTED on specific combinations of framebuffer attachments -

im trying attach multiple targets framebuffer object. have following problem: there no error, when using float texture attachments , depth attachment. there no error, when using float texture attachments , integer texture attachments. although these combinations work, cant use float, integer , depth attachments @ same time. results in gl_framebuffer_unsupported status. this code: //working: framebuffer fb = framebuffer( 1280,720, { //attachmentinfo(gl_depth_component16,gl_depth_attachment), attachmentinfo(gl_rg32f,gl_color_attachment0), attachmentinfo(gl_rgb16ui,gl_color_attachment1), attachmentinfo(gl_rgb32f,gl_color_attachment2), attachmentinfo(gl_rgb32f,gl_color_attachment3), attachmentinfo(gl_rgba16f,gl_color_attachment4), attachmentinfo(gl_rgb32f,gl_color_attachment5), attachmentinfo(gl_rgb32f,gl_color_attachment6), } ); //working: framebuffer fb = framebuffer( 1280,720, { attac...

Using pure Python over grep? -

i not familiar grep i've been on windows system when suggested add these lines code, i'm little confused... grep = 'grep -e \'@import.*{}\' * -l'.format(name) proc = popen(grep, shell=true, cwd=info['path'], stdout=pipe, stderr=pipe) from understanding, trying find files in cwd contain @import given_file_name essentially, right? if how grep works, need write in python me, i'm worried time may take such thing. the script in sublime text 3 plugin runs sublime_plugin.eventlistener method on_post_save find files containing saved filename , build list of file names compile. def files_that_import(filename, project_root): files = [] root, dirnames, files in os.walk(project_root): fn in files: if fn.endswith(('.scss', '.sass')): open(fn, 'r') f: data = f.read() if re.search(r'@import.*["\']{}["\'];'.format(fn),...

r - SparkR and Packages -

how 1 call packages spark utilized data operations r? example trying access test.csv in hdfs below sys.setenv(spark_home="/opt/spark14") library(sparkr) sc <- sparkr.init(master="local") sqlcontext <- sparkrsql.init(sc) flights <- read.df(sqlcontext,"hdfs://sandbox.hortonworks.com:8020 /user/root/test.csv","com.databricks.spark.csv", header="true") but getting error below: caused by: java.lang.runtimeexception: failed load class data source: com.databricks.spark.csv i tried loading csv package below option sys.setenv('sparkr_submit_args'='--packages com.databricks:spark-csv_2.10:1.0.3') but getting below error during loading sqlcontext launching java spark-submit command /opt/spark14/bin/spark-submit --packages com.databricks:spark-csv_2.10:1.0.3 /tmp/rtmpuvwoky /backend_port95332e5267b error: cannot load main class jar file:/tmp/rtmpuvwoky/backend_port95332e5267b any highly appre...

C# comparing 2 lists with string array property -

i have class 1 property of list<string> hold dynamic list of 1 or more string ids. public class fieldcompareitem { public list<string> fields = new list<string>(); public fieldcompareitem(string[] fields) { (int = 0; < fields.count(); i++) fields.add(fields[i]); } } } i'm trying compare 2 lists see if string arrays match doesn't work. basically, want a/b compare items exist in a, in b, , in both, this: var lista = new list<fieldcompareitem> { new fieldcompareitem(new[] {"a1"}), new fieldcompareitem(new[] {"a2"}), new fieldcompareitem(new[] {"a3","001"}) }; var listb = new list<fieldcompareitem> { new fieldcompareitem(new[] {"a2"}), new fieldcompareitem(new[] {"a3"}), new fieldcompareitem(new[] {"a3","001"}), ...

javascript - Access the nested value in JSON without looping through it -

this json, want directly zipcodes values json without looping through json. how can it? countries:[ { name:'india', states:[{ name:'orissa', cities:[{ name:'sambalpur', zipcodes:{'768019','768020'} }] }] } ] as not associative array, option use indexes this: countries[x].states[y].cities[0].zipcodes where x each representation of state in array, in case, of course, have more one. similarly y each state in each state in each country, in case have more of , can same cities if need to. edit: here's how can iterate array: for(var c in countries) { var name = countries[c].name; if (name === "countryiamlookingfor") { var stateslist = coun...

c++ - BAD_ACCESS (code=EXC_I386_GPFLT) when signing with ECDSA -

Image
i trying use crypto++ on ios. downloaded prebuilt version of library marek kotewicz's github . i struggling hard run this sample code crypto++ wiki. ecdsa<ecp, cryptopp::sha256>::privatekey privatekey; ecdsa<ecp, cryptopp::sha256>::publickey publickey; autoseededrandompool prng, rrng; privatekey.initialize(prng, cryptopp::asn1::secp256k1()); privatekey.makepublickey(publickey); string signature; string message = "do or not. there no try."; stringsource s(message, true, new signerfilter(rrng, ecdsa<ecp, cryptopp::sha256>::signer(privatekey), new stringsink(signature))); its crashing following. showing in xcode output window: bad_access (code=exc_i386_gpflt) this code snippet memory.h of c++ file pointing bad_access _libcpp_inline_visibility ~auto_ptr() throw() {delete __ptr_;} i getting bad_access(code=1 , address=0x0) error pointing line of code ...

html - Page CSS is randomly adding padding to portfolio images -

Image
my team developed portfolio website. but facing strange issue. we pasted issue in theme support, not yet solved. while loading page , giving this: and this(we want this): how rid of this?? i'm not familiar wordpress if have access css controls template them maybe can use firebug or inspect element find out if upper , lower divs have class specifications, , set margins 0 in css file this: i'll pretend firebug revealed div classes upperdiv , lowerdiv this: <div class="upperdiv">photos</div> <div class="lowerdiv">photos</div> in css try: .upperdiv { margin-bottom: 0px; } .bottomdiv { margin-top: 0px; } hope helps.