Posts

html - Changing a DIV class style in JavaScript -

this question has answer here: javascript getelementsbyclassname() returns none? 3 answers how apply style class in javascript? 2 answers i can change style of div id... document.getelementbyid('test').style.display = "none"; why can't same thing class? document.getelementsbyclassname('egg').style.display = "none"; how change style of class? thanks document.getelementsbyclassname returns list of elements class specified. can set display none of first element: document.getelementsbyclassname('egg')[0].style.display = "none"; or loop through list , set each desired effect: var eggs = document.getelementsbyclassname('egg'); for(var = 0; < eggs.length; i++) { eggs[i].style.display=...

java - Can't insert into Sql Server using Spring Framework SimpleJdbcInsert -

i'm trying insert row in sql server 2008 using jdbc spring framework: here code: bdclass bdclass= new bdclass(bdclass.bdconfig.connectionstring_myhome); person personanueva = new person(); personanueva.setidperson(5); personanueva.setusuario("javauser"); personanueva.setclave("javapassword"); personanueva.setnombre("javanombreusuario"); personanueva.setactivo("s"); personanueva.addperson(bdclass); //person class public void addperson(bdclass bdclass) { map<string, object> parameters = new hashmap<string, object>(); parameters.put(constantes.idperson, this.getidperson()); parameters.put(constantes.usuario,this.getusuario()); parameters.put(constantes.clave,this.getclave()); parameters.put(constantes.nombre,this.getnombre()); parameters.put(constantes.activo, this.getactivo()); bdclass.insert(parameters,constantes.table_name); } //bdclass insert in step enabling identity insert pub...

objective c - How to solve this error 'BIO_new' is deprecated in cocoa? -

i new macintosh development. have nsdata+connection.m file. file have more deprecated function bio_new , bio_write , bio_get_mem_data etc. functions encounter deprecated errors. - (nsstring *)base64encoding { bio * mem = bio_new(bio_s_mem()); bio * b64 = bio_new(bio_f_base64()); bio_set_flags(b64, bio_flags_base64_no_nl); mem = bio_push(b64, mem); bio_write(mem, [self bytes], [self length]); bio_flush(mem); char * base64pointer; long base64length = bio_get_mem_data(mem, &base64pointer); nsstring * base64string = [nsstring stringwithcstring:base64pointer length:base64length]; bio_free_all(mem); return base64string; } please me. what apple has deprecated using their openssl headers , their openssl dynamic library. reason openssl's interface changes in incompatible ways across minor revisions, it's hard keep date bugfixes , security updates without breaking clien...

java - Opencl with jocl: same computation rules for cpu and gpu -

i'm using jocl apply trigonometric functions on elements of float-array. while doing same code on both cpu , gpu @ same time, results vary minorly on 0.000x digits , rarely. must origineated differecies cores of cpu/gpu. 1 using little different algorithm(maybe i'm mistaken). question: how can tell opencl/jocl use same rounding/ieee-rules calculate trigonometric/exponential functions? edit: system.out.println() 's rounding incident when written on console? problem emerges especialy when applied sin() or cos() 80000 times of feedback. thanks. host: fx8150 devices: fx8150 + hd7870(will used on 2x xeons , 1 firegl 4800 later)

access xampp/htdocs directory from remote computer -

i have installed xampp server in computer a. want access xampp server other computer b.i typed ip address of computer ,where xampp server installed , in browser of computer b. landed **http://xx.xx.xx.xx/xampp** page. want access htdocs directory not able access it.i used path. http://xx.xx.xx.xx/htdocs and http://xx.xx.xx.xx/xampp/htdocs i getting error object not found somebody please explain doing wrong? first of have see permitions of xampp (they blocked default , can see @ php.ini if recall well) , firewall of computer b. after that, should see port of xampp in computer b , should see localhost of computer. if doing in differents places, should see if operator allow see ip remotely. in countries blocked too.

angularjs - Modify scope variables outside the controller -

is possible modify $scope variables on button click if button outside controller area? for example: <input type="button> <div ng-controller="meetingsctrl"> using classes or ids find elements not how things typically done in angular. a controller typically defined on top-level element of each view. if button belongs view managed meetingsctrl , should inside div . however, maybe button part of view, in case need 2 views interact each other. done via services, each controller injecting same service. or use events.

c++ - Will std::cout affect timers? -

i have graphics program, , want measure time function calls take. since not sure how std::cout works under hood, wanted ask if calls in between timer calls affect performance. know it's slow in naturally not put in functions i'm measuring, buffered/asynchronous effect linger after call returns in way? looking (pseudocode): timer->start(); runsomefunction(); timer->stop(); std::cout << timer << std::endl; // affect next timer event? timer->start(); runanotherfunction(); timer->stop(); std::cout << timer << std::endl; // etc in short, no. longer answer: however, depend, cout going to, , system running on. typically, internals of cout use sort of "write file" system call, file "standard out" filehandle - may sort of display device, window or file if output redirected. may of course lead sort of interrupt or process elsewhere running (e.g. "cmd.exe" in windows or "xterm" or similar in...