Posts

Showing posts from January, 2013

jquery - Show/Hide specified number of table rows -

jquery - Show/Hide specified number of table rows - i working on html page multiple number of tables, each containing big number of rows. these table rows taking much space on webpage trying create show/hide link below each table display specified number of rows. found out scripts on stackoverflow couldn't them work reason. help appreciated ... this illustration of tables: <table border="0" cellspacing="0" cellpadding="0" width="98%" class="dir_cat"> <tr><th><a href="/posts/10-auto/">auto</a></th></tr> <tr class="auto"><td><a href="/cars/">cars</a></td></tr> <tr class="auto"><td><a href="/accessories/">car accessories</a></td></tr> <tr class="auto"><td><a href="/detailing/">car detailing</a></td></tr> <

java - I'm getting a cannot format given object as number exception when I run this code. Not sure what's wrong -

java - I'm getting a cannot format given object as number exception when I run this code. Not sure what's wrong - i'm new java , running code display contents of 1 table in database(logs). function getdata converts resultset 2d string array , returns it. funtion working fine other queries. in database timestamp of time stamp type. creating problem? package stock; public class viewtrans extends javax.swing.jframe { public viewtrans() { initcomponents(); login l=new login(); string uname=l.getusername(); dbconnect db=new dbconnect(); string str[][]=db.getdata("select sname,amount,value,timestamp,operation,brokerage logs username='"+uname+"'"); for(int i=0;i<10;i++) { for(int j=0;j<5;j++) { ltable.setvalueat(str[i][j],i,j); } } } @suppresswarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="generated code">

javascript - Load iframe before other content -

javascript - Load iframe before other content - i have iframe loading on page. content of iframe loads after rest of content has loaded on page. possible load content within iframe before rest of content on main page? thanks <iframe id="miiframe" src="http://www.apple.com"></iframe> <!-- illustration --> <div id="loading" style="position:fixed;background:red;width:100%;height:100%;top:0;left:0;z-index:2;"></div> <img id="background" style="position:absolute;width:100%;height:100%;top:0;left:0;z-index:-1;"/> <script> var loaded = false; console.log(loaded); function preloader(){ document.getelementbyid("loading").style.display = "none"; document.getelementbyid("miiframe").style.display = "block"; loaded = true; console.log(loaded); }//preloader var loadiframe = document.getel

javascript - AJAX: Pass a value to ajax method -

javascript - AJAX: Pass a value to ajax method - ive tried couple out-of-the-box ways trying value ajax everytime js error's. 1 of can help. i have next jquery ajax: $("#usertasklist").click(function () { $('#basicmodal4').modal('hide'); $.ajax({ type: "get", url: "/home/getajaxusertasksexecuted", data: { filterdate: variable1 }, datatype: "html", success: function (data) { console.log("succes!"); var $titlediv = $('#modal5label'); $titlediv.replacewith("<h3><b>user tasks executed</b></h3>"); var $detaildiv = $('#superdatadivthing3'); $detaildiv.replacewith(data); }, error: function () { console.log("error!"); }, complete: function () { $('#basicmodal5').modal('show');

LLVM: Check if physical register is live -

LLVM: Check if physical register is live - how can find out whether @ given time physical cpu register contains "used" value, ie if live? using llvm 3.4 c++ api. short answer: cannot. long answer: llvm ir represents virtual machine infinite number of typed registers. there no info how turned physical registers before codegeneration. register liveness info available within backend after register allocation performed. llvm llvm-c++-api

c# - SqlDependency and SignalR ASP.NET -

c# - SqlDependency and SignalR ASP.NET - web application asp.net not work. versions visual studio 2010 , signalr 1.0.0-rc2. debug application without problems, getnotifications event not work. this code: notificaciones.cs public class notificaciones : hub { public ienumerable<sqlnotificaciones> getnotifications() { homecoming sqlwatcher.data; } sqlwatcher.cs public class sqlnotificaciones { public string nombre { get; set; } public string apellido { get; set; } public string fecha { get; set; } } public static class sqlwatcher { private static list<sqlnotificaciones> objloc = new list<sqlnotificaciones>(); private static sqlconnection connection = new sqlconnection(configurationmanager.connectionstrings["datos2"].connectionstring); private static sqlcommand command = new sqlcommand("select nombre, apellidop dbo.usuarios", connection); private static sqldependency dependency = ne

css - drupal 7 : use a template to display my form -

css - drupal 7 : use a template to display my form - i have drupal 7 , want utilize template (.tpl.php) display form in table html. i have code in template file : <?php print '<form id="'.$form['#id'].'" accept-charset="utf-8" method="'.$form['#method'].'" action="'.$form['#action'].'">'; print drupal_render_children($form); print '</form>'; ?> what should ? css drupal-7 hook

python - Spyder doesn't load from Anaconda 3.4 -

python - Spyder doesn't load from Anaconda 3.4 - i've installed anaconda 3 (for python 3.4) on fresh ubuntu 14.04 installation. when go launch spyder ide, receive next error message: no module named 'version' traceback (most recent phone call last): file "/home/daniel/anaconda3/bin/spyder", line 3, in <module> start_app.main() file "/home/daniel/anaconda3/lib/python3.4/site-packages/spyderlib/start_app.py", line 91, in main spyderlib import spyder file "/home/daniel/anaconda3/lib/python3.4/site-packages/spyderlib/spyder.py", line 158, in <module> spyderlib.utils.environ import winuserenvdialog file "/home/daniel/anaconda3/lib/python3.4/site-packages/spyderlib/utils/environ.py", line 17, in <module> spyderlib.widgets.dicteditor import dicteditor file "/home/daniel/anaconda3/lib/python3.4/site-packages/spyderlib/widgets/dicteditor.py", line 28, in <module> spyderlib.utils.qt

mysql - Google Cloud SQL & PHP tutorial isn't editing database? -

mysql - Google Cloud SQL & PHP tutorial isn't editing database? - i'm learning how utilize google cloud sql , trying connect database using php. i'm next google instructions here. i created 3 files ( guestbook.php , sign.php , , app.yaml ) , copied code presented in article. in order connect database, used pdo_mysql variant. in guestbook.php , sign.php , in if statement: replaced <your-project-id> , <your-instance-name> appropriate. left '' password empty. in guestbook.php , sign.php , in else statement: replaced 127.0.0.1 , <password> appropriate. left 3306 is. in app.yaml : replaced <your-application-name> appropriate. i saved 3 files in local directory , deployed using googleappenginelauncher . when loaded first page, looked fine. typed in , nail submit . got redirected page /guestbook , told: error: not found requested url /guestbook not found on server. i new web apps , php in general. have no

canvas - How to crop and resize JavaFX Image? -

canvas - How to crop and resize JavaFX Image? - i'm trying display big images on javafx canvas. resolution of single image 11980x8365. each image has corresponding world file , can utilize position images correctly. canvas size 800x600. need write whole image on canvas, , part of it. here i've done far: load total sized image file image object. calculate part of image show , calculate scale parameters correctly fit 800x600 canvas. so wanted utilize graphicscontext.drawimage(...) - draws current source rectangle of given image given destination rectangle of canvas. for method calculated parameters correctly. problem image larger 2048x2048, , reason javafx tries draw image straight canvas using gpu (if understood correctly). that's when exception: java.lang.nullpointerexception @ com.sun.prism.sw.swgraphics.drawtexture(swgraphics.java:686) @ com.sun.prism.sw.swgraphics.drawtexture(swgraphics.java:686) @ com.sun.prism.sw.swgraphics.drawtexture(sw

compilation - Intel Fortran 11.1 Long Compile Times For Sources with Over 140 Modules -

compilation - Intel Fortran 11.1 Long Compile Times For Sources with Over 140 Modules - i don't have grasp how long "too long" when compiling , linking fortran executables many modules, seems intel fortran v11.1 linux seems take 1.5 hours compile single .f90 file contains on 140 modules. providing more background information, i'm compiling using exe in eclipse photran using intel build chain , default compiler options. i'm reaching out see if can reply following: is normal intel fortran take long time (over 1 hr) build .mod files , link files? am not setting build order or taking advantage of compiler options speed process? do new versions of intel fortran solve issue (if mutual one) can compiler gfortran compile many modules faster? thanks in advance fortran jedi's respond! module compilation fortran intel

tcp - Linux not accepting connections to port 25 -

tcp - Linux not accepting connections to port 25 - i working on simple smtp server, stuck on accepting tcp connections on port 25. i tried running server , using telnet localhost , works. separate computer says trying (ip)... when sending email's gmail smtp server not see connection relevant code in golang func main() { listener, err := net.listen("tcp", ":25") checkerror(err) { conn, err := listener.accept() checkerror(err) go handleconnection(conn) } } it ubuntu server running on digital ocean i know port 25 not beingness used , have file descriptors remaining tried on different port , worked. seems digital ocean thing. linux tcp go smtp

algorithm - Efficient way to walk directory tree containing link cycles -

algorithm - Efficient way to walk directory tree containing link cycles - is there more efficient way walk directory tree contains link cycles tracking files have been visited? for illustration consider walking directory containing these files: symlink "parent" -> ".." symlink "uh_oh" -> "/" regular file "reg" symlink "reg2" -> "reg" you should track directories have been visited, per first example, otherwise there no improve solution maintaining visited flags every file. maintaining flags easier if there portable way of getting short unique identifier mounted filesystem. then, need think through consequences of mount , umount operations occurring during scan, particularly since such scan might take quite long time if filesystem tree includes remote filesystems. in theory, can "filesystem id" stafvfs interface, in practice not totally portable. quoting man statfs linux dis

java - Overwriting Plaintext File With Ciphertext -

java - Overwriting Plaintext File With Ciphertext - i've got function encrypts file, encryption bit seems working, can't overwrite current file. fileinputstream inputstream = new fileinputstream(input); // selects file encrypt cipher.init(cipher.encrypt_mode, secret, ivspec); // sets encryption // creates output stream, encryption performed here cipheroutputstream cos = new cipheroutputstream(new fileoutputstream(input + ".secure"), cipher); byte[] block = new byte[8]; int i; while ((i = inputstream.read(block)) != -1) // reads file { cos.write(block, 0, i); // writes new file } cos.close(); this working fine, end encrypted file original_file_name.txt.secure , want overwrite original file. if remove .secure bit doesn't write file properly. how can overwrite file original file encrypted text? if remove .secure part, you'll trying read file @ same time you're writi

charts - Android charting libraries -

charts - Android charting libraries - i developing app android , trying find fast , reliable charting library. after searching, found 4 libraries: achartengine, williamchart, hellocharts , androidplot. need date feedback performance , stability of these libraries because info find outdated. thanks. i can recommend mpandroidchart. core features: linechart, barchart (vertical & horizontal), piechart, scatterchart, candlestickchart (for financial data), radarchart (spider web chart), bubblechart combined charts (e.g. lines , bars in one) scaling on both axes (with touch-gesture, axes separately or pinch-zoom) dragging / panning (with touch-gesture) separate (dual) y-axes highlighting values (with customizeable popup-views) save chart sd-card (as image) predefined color templates legends (generated automatically, customizeable) customizeable axes (both x- , y-axis) animations (build animations, on both x- , y-axis) limit lines (providing additional information, maximu

jquery - How to display PHP if or else in customizable modal after form submit -

jquery - How to display PHP if or else in customizable modal after form submit - i have working php contact form on 1 page site. when user clicks submit, taken separate php page displays if statement filled form correctly, or, page displays php else statement if filled out wrong. want instead of opening php page, rather user see modal may style fit site look/feel, displays if or else statements. these statements in php file: function died($error) { // error code can go here echo "we sorry, there error(s) found form submitted. "; echo "these errors appear below.<br /><br />"; echo $error."<br /><br />"; echo "please go , prepare these errors.<br /><br />"; die(); } // validate expected info exists if(!isset($_post['visitorname']) || !isset($_post['company_name']) || !isset($_post['email']) || !isset($_post['phone']) || !isset($_post['subject']) ||!isset(

Have installed ILNumerics into VisualStudio 2012, no "Computing Module" is available -

Have installed ILNumerics into VisualStudio 2012, no "Computing Module" is available - starting fresh install of visual studio, used nuget console "install-package ilnumerics". i create new windows form project, added reference ilnumerics.dll , can utilize ilnumerics, that's fine. however, of getting started documentation references "computing module" should add together project. problem don't see in "add new item" dialog when opens up. had manually add together ilnumerics widgets toolbox (i.e. clicking "choose items. . ." , loading ilnumerics.dll). can please explain how can "computing module" widget appear in "add new item" dialog? thanks. nuget packages of ilnumerics obsolete now. go http://ilnumerics.net/download.html , install ilnumerics ultimate vs. ilnumerics visual studio extension installs computing module , visualization module templates in c#. docu: http://ilnumerics.net/gettin

WebDav Pdf Saving error -

WebDav Pdf Saving error - i have set webdav folder can access thorugh chrome , edit files , save them server, example, can open word doc, edit , save back. when come open pdf, wont save server , downloads re-create of pdf instead of original. is there way of enabling edit pdf? my end goal able open pdf, add together comments/highlights , save server, through browser. thank you edit: i have set through apache 2.4, no plug ins through chrome, have mapped network drive server folder can open , edit files. except pdfs, add together comments off when open 1 alternative greyed out , when seek , save after opening tries save desktop. i'm not sure i've got utilize case right, if i've understood correctly have link in web page pdf you're viewing in chrome. click on link , pdf downloads temp file opened. if edit , save changes saved temp file on local pc. correct? if so, normal behaviour links in web pages. there absolutely nil in html standard su

smarty - Simplify PHP multiply if conditions -

smarty - Simplify PHP multiply if conditions - i wonder there way create code more subtle? ex public function hookdisplayheader() { if(tools::getvalue('controller')=='index'){ $this->context->controller->addcss(($this->_path).'something.css', 'all'); } if(tools::getvalue('controller')=='cms'){ $this->context->controller->addcss(($this->_path).'something.css', 'all'); } if(tools::getvalue('controller')=='product'){ $this->context->controller->addcss(($this->_path).'something.css', 'all'); } if(tools::getvalue('controller')=='category'){ $this->context->controller->addcss(($this->_path).'something.css', 'all'); } } to simple public function hookdisplayheader() { if(tools::getvalue('controller')=='index , pr

jquery - zoomIn effect (Animate.css) doesnt works in second click or without page load -

jquery - zoomIn effect (Animate.css) doesnt works in second click or without page load - this question has reply here: animate.css doesnt work sec click 3 answers i trying zoomin text using animate.css on every click of button.it works first time. if page load works 1 time again first time. need help. html: <div class="row contact-section"> <div class="col-md-12"> <h1 id='an'> contact section</h1> </div> </div> <button class='.mini-contact'>animate</button> jquery: $('.mini-contact').on('click',function(){ $('.contact-section').fadein(); $('#an').addclass('animated zoomin'); }) it because not reapplying classes ( replaying animation ) try this: class="snippet-code-js lang-js prettyprint-override&

sql - How to get Entity name from the returned object in hibernate -

sql - How to get Entity name from the returned object in hibernate - i have application, takes sql query input , displays result. in scenario, user enters query, need info database. if table name , pojo class names different, how can cast returned object pojo class , data? is there way find pojo class returned object. thanks in advance. you can seek using (obj instanceof classname) find out if object/entity of type. sql hibernate table object pojo

python - Decrease array size by averaging adjacent values with numpy -

python - Decrease array size by averaging adjacent values with numpy - i have big array of thousands of vals in numpy. want decrease size averaging adjacent values. example: a = [2,3,4,8,9,10] #average downwards 2 values here = [3,9] #it averaged 2,3,4 , 8,9,10 so, basically, have n number of elements in array, , want tell average downwards x number of values, , averages above. is there way numpy (already using other things, i'd stick it). as mentioned in comments, want probably: group = 3 = a.reshape(-1, group).mean(axis=1) python arrays numpy mean

integrate spatial and non spatial database oracle -

integrate spatial and non spatial database oracle - hye all, have problem, situation is, have 2 database in difference server, spatial database oracle , non spatial database oracle, illustration below; spatial database(server 1)= id,code,name,x coordinate, y coordinate non spatial database (server 2)= no_id, code, street 1) how want integrate gis system, when user makes query example, insert code=123, info appear on map have id,name,code,street, x , y coordinate. 2) how wan handle, when user update non spatial database example, come in new code , @ same time spatial database have new record also thank help, need solution you bring together these in similar way other database instances, through utilize of database links , views. if take path recommend creating views pulling info spatial database, because sdo_geometry treated user defined info type there limitations on it's utilize across database links many of oracle locator or filter functions can

java - Embedding a Web page in an Android App -

java - Embedding a Web page in an Android App - i trying embed webpage within android app. next code written in main_activity java file of app. package com.example.webpage; import android.support.v7.app.actionbaractivity; import android.os.bundle; import android.view.menu; import android.view.menuitem; import android.webkit.webview; public class mainactivity extends actionbaractivity { @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); webview webview = new webview(this); setcontentview(webview); webview.loadurl("http://www.google.com/"); } @override public boolean oncreateoptionsmenu(menu menu) { // inflate menu; adds items action bar if present. getmenuinflater().inflate(r.menu.main, menu); homecoming true; } @override public boolean onoptionsitemselected(menuitem item) { // handle action bar item clicks here. action bar // automatically handle clicks on home/up button, long

android - set layout gravity to right -

android - set layout gravity to right - i set gravity right of layout not works fine : (below codes within loop) linearlayout lin = new linearlayout(getactivity()); layoutparams lin_parms = new layoutparams(layoutparams.fill_parent,layoutparams.wrap_content); lin_parms.gravity = gravity.right; lin.setlayoutparams(lin_parms); lin.setgravity(gravity.right); layoutparams txt_parms = new layoutparams(layoutparams.fill_parent,layoutparams.wrap_content); txt_parms.gravity = gravity.right; textview txt_view = new textview(getactivity()); txt_view.setlayoutparams(txt_parms); txt_view.settypeface(font); txt_view.settext("hello"); lin.addview(txt_view); lay_lin_list_tractions.addview(lin); set textview params wrap_content layoutparams txt_parms = new layoutparams(layoutparams.wrap_content, layoutparams.wrap_content); android android-linearlayout

arrays - Iterate through nested Javascript Objects from API response -

arrays - Iterate through nested Javascript Objects from API response - i've tried 100 different things, , spend days looking through google , stackoverflow, can't find solution problem. phone call after body of api response returns undefined! the response facebook sdk looks this: [ { "body": "[ "data": [ { "name": "larry syid wright", "administrator": false, "id": "xxx" }, { "name": "melissa long jackson", "administrator": false, "id": "xxx" }, { "name": "charlotte masson", "administrator": false, "id": "xxx"

python - IF and ELSE Exception in Python3 -

python - IF and ELSE Exception in Python3 - i trying grab exception 2 boolean (for if , else separately). this working on: from math import * decimal import decimal def add(self, *args): try: if all(isinstance(n, int) n in args): print(sum(int(n) n in args)) else: print(fsum(decimal(n) n in args)) except (nameerror, syntaxerror) e: print("error! {}".format(e)) def main(): add(a) if __name__ == '__main__': main() both if , else gives me 2 exceptions nameerror , syntaxerror , if give add(a) giving me nameerror exception. except not catching error. how should grab exception both of them separately? from understand think can seek this. except nameerror e : print "name error occured" print("error! {}".format(e)) except syntaxerror f: print "syntax error occurred" print("error! {}".format(f)) python python-3.x

php - Limit list using a button -

php - Limit list using a button - i want print lastly access application of each user, want limit list specific number (that configured user). atm can print everything, want implement button allow show 5 events , them go forth. 1 time implemented backing well. however code right follows: $min = 0; if(count($time) > 5) { $aux = 5; } else { $aux = count($time); } if(isset($_post['button'])) { if((count($time) - $aux) > 5) { $aux = aux + 5; $min = $min + 5; } else { $aux = count($time); if(count($time) > 5) { $min = count($time) - 5; } } } for($i = $min ; $i<$aux; $i++) { echo '<br>'.($i+1).'. '.date('y-m-d h:i:s&#

Google CALDAV XML request using curl (php) -

Google CALDAV XML request using curl (php) - i'm trying caldav xml request google caldav server php. for reason google caldav poorly documented. the purpose list of events, including event-specific data. (eg. begin, end, summary, ...). goal efficiently possible.(all event info in 1 request). i figured out can accomplished study request. i'm using code found in this post. my exact code : $xml= '<c:calendar-query xmlns:d="dav:" xmlns:c="urn:ietf:params:xml:ns:caldav"><d:prop><c:calendar-data /></d:prop></c:calendar-query>'; $url = "https://apidata.googleusercontent.com/caldav/v2/*email*/events"; $user = "**********@gmail.com"; $pw = "*********"; $data = $this->dorequest($user, $pw, $url, $xml); print_r($data); } public function dorequest($user, $pw, $url, $xml) { $c=curl_init(); $url = preg_replace('{^https?://[^/]+}', '

elisp - Make emacs next-buffer skip *Messages* buffer -

elisp - Make emacs next-buffer skip *Messages* buffer - i'd create simple alter emacs next-buffer , previous-buffer commands (which have bound c-x <right> , c-x <left> skip on *messages* buffer. i'm using emacs 24 , emacs starter kit. i've read next related questions , answers, not want: buffer cycling in emacs: avoiding scratch , messages buffer emacs disable *messages* buffer emacs lisp buffer out of focus function? here of reasons why don't work: i'd maintain simple possible. fewer configuration changes better. i don't want kill or prevent *messages* altogether. (add-to-list 'ido-ignore-buffers "^\*messages\*" helps c-x b ( ido-switch-buffer ) not alter how next-buffer , previous-buffer behave. the simplest can think of defining advice both functions. here next-buffer . previous-buffer . can define configuration variable enable/disable behavior (or activating/deactivating advice): (defadvice

casting - How to cast double or double array into double array always in C# -

casting - How to cast double or double array into double array always in C# - i have method process double arrays. supplying double arrays using keyword params . problem sometimesi have pass doubles , want utilize same method both types. method have signature public void dosomething(params double[][] arrays) above method definition works fine next arguments: double [] array = new double []{2,3,5} ; double [] anotherarray = new double []{7,8,10} ; dosomething (array, anotherarray) ; i thing pass object , cast them in method , utilize seek grab block , not know right approach or there exists elegant way handle kind of situation because can have mixed info input arguments. public void dosomething(params object objs) { // loop seek { var tempdata = (double) objs(loop index); double[] info = new double[] { tempdata }; } grab { var tempdata = (double []) objs(loop index); double [] info = tempdata; } //

d3.js - Fixing color to each path for donut in d3js -

d3.js - Fixing color to each path for donut in d3js - i drawing donut in d3js. had 3 values in array dataset (e.g totalpop, ruralpop,urbanpop-----> [1000,2000,3000]).i want these values fill specific color in donut (e.g totalpop - reddish color,ruralpop - blue, urbanpop-orange) below have tried in code var color = d3.scale.ordinal() .domain([totalpop,ruralpop,urbanpop]) .range(["red","blue","orange"]); var dataset = [parseint(totalpop),parseint(ruralpop),parseint(urbanpop)]; var arc = d3.svg.arc() .innerradius(r-20) .outerradius(r); var pie = d3.layout.pie() .value(function(dataset){return dataset;}); the main code color appending var arcs = groupx.selectall(".arc") .data(pie(dataset)) .enter() .append("g") .attr("class","arc"); here have added color path arcs.append("path") .attr("d",arc) .attr("fill",function(dataset){return color(dataset.data)});

wordpress - Asynchronous php code in WP Plugin -

wordpress - Asynchronous php code in WP Plugin - need create block of code asynchronous rest of code. going collect wp posts , send post request url. plugin should run asynchronously , doesn't hamper functioning of wordpress site. for ($x=0; $x<=n; $x++) { $data = posts[$x]; $ch = curl_init('http://myurl.com/'); curl_setopt($ch, curlopt_customrequest, "post"); curl_setopt($ch, curlopt_postfields, $data); curl_setopt($ch, curlopt_returntransfer, true); curl_setopt($ch, curlopt_httpheader, array( 'accept: application/json', 'content-length: ' . strlen($data)) ); $result = curl_exec($ch); curl_close($ch); } the proper way process asynchronous requests in wordpress utilize wp-cron schedule event. can either schedule run once, or on interval. see guides on setting here. 2 main functions check out wp_schedule_event() , wp_schedule_single_event() . one thing maintain in mind because code running when there request, if there low

javascript - back button causing scroll to top -

javascript - back button causing scroll to top - i have next scenario, user scrolled wheres downwards search page. click on item , after done viewing item nail button. button brings user exact location within search page it's suppose to. after second, page auto scrolls top of search results. can see behavior in action cardaddy.com/forsale i've spent couple hours trying figure out no success. i'm not aware of js causing issue either. please sense free take look. suggestions great since destroying ux i though maybe forwards root domain www.domain.com godaddy.com may of been cause, changed behavior around utilize amazons name server eliminating forwarding. thought repaired issue seem repaired on desktop, still seems happen on mobile. as far know, behaviour depends on browser. the button brings lastly site visited , loads site new. effect remain @ possition caused browser engine. javascript html

scala - how to sort JsArrays with play-json -

scala - how to sort JsArrays with play-json - simple question: how can 1 utilize play-json (2.3.x) sort jsarrays in jsvalue (recursively)? my usecase: consider app uses set[string] internally, , when info requested, output json serialize set json array. order not important. now, if 1 wants write tests cover functionality, since order of items not of import (it set after all. internally, , conceptually), , want check returned should, may want compare response json "expected" json object create explicitly. for exact reason, want sort json arrays, , compare jsvalue 's. how 1 write such transformer? edit: i have managed write transformer answers needs, won't sort every jsarry in jsvalue . i'll post here, since might useful others, not asking for. class="lang-scala prettyprint-override"> val jsonsorttransformer = (__ \ 'fields).json.update( reads.jsobjectreads.map{ case jsobject(xs) => jsobject( xs.map{

Huge array on C++ -

Huge array on C++ - i solve problem using c++. have huge array of double-s. used during process of solution, programme adresses different parts both reading them , changing ones. what type of container proper situation? must access elemetns quilckly , store info properly. is thought utilize std::vector<double> ? it depends on , how perform operation on container. like:- associative container std::set efficient in case implemented in terms of balanced binary tree. but sorted vector outperforms associative container in situations on basis of locality of reference. if operation on info construction categorized below sub-operations utilize sorted vector:- 1) there insert/delete set info structure. 2) after info construction setup operations predominant. note: should initialize vector big plenty avoid re-allocations in between. c++

scala - Why does Play with ReactiveMongo report Disk Write failures due to java.io.NotSerializableException: reactivemongo.bson.BSONObjectID -

scala - Why does Play with ReactiveMongo report Disk Write failures due to java.io.NotSerializableException: reactivemongo.bson.BSONObjectID - i trying utilize securesocial in combination reactivemongo. however, having problems when comes caching users. during development, user logged out each time play decides recompile files. think due next error: [error] n.s.e.s.d.diskstoragefactory - disk write of f097d7b2db41b48eb28d73fffe4a0b7af0d5723fd5ea27c3f14c21d559c4f5b7448730955aaa95700df906ac38a4b6833de0dae859d957a368d3e5028208c5ba522ffd779ac8d9e439f2c7ec516dd4ddb0005fda0a4f5cd035c3eedec717807518b4dec5f1e6781ee55125a6ae33db50cba107bb73311078d50ee947bcd92033 failed: java.io.notserializableexception: reactivemongo.bson.bsonobjectid @ java.io.objectoutputstream.writeobject0(objectoutputstream.java:1180) ~[na:1.7.0_21] @ java.io.objectoutputstream.defaultwritefields(objectoutputstream.java:1528) ~[na:1.7.0_21] @ java.io.objectoutputstream.writeserialdata(objec

vba - How to Tranpose Array with .EntireRow? -

vba - How to Tranpose Array with .EntireRow? - i have next array stores values found search function. if foundcells nil debug.print "value not found" else each foundcell in foundcells array1(i) = foundcell.value 'instead of .value can utilize .row .entirerow doesn't work = + 1 next foundcell j = - 1 = 1 end if i extract info array using transpose works '.value' , '.row' can not extract whole row each found value '.entirerow'. range("a1:a" & ubound(array1) + 1) = worksheetfunction.transpose(array1) i tried alter range in several way's, nil seem fit .entirerow criteria. update after comment loannis: how can utilize entirerow in array transpose rows target location based on search results stored in foundcell? i using findall search function cpearson http://www.cpearson.com/excel/findall.aspx you can extract entire row 2 dimensional array. sub methodname(

actionscript 3 - Mouse event to collision as3 -

actionscript 3 - Mouse event to collision as3 - hello trying convert as3 code, mouse event code collision event. sorry, don't know in code set other object instance name mcball. tile1.addeventlistener(mouseevent.click, tileclick); function tileclick(e:mouseevent):void { movieclip(e.currenttarget).gotoandstop(2); if(tile1.currentframe == 1) return; gotoandstop(5); } thank you. ok, got working. firstly made layers 'actions' , 'cont' run 5 frames , copied 'mcpaddle' & 'ball' layer1's (keyframe) on (frame 5). on actions layer added @ top of code. var bricksremoved=int(0); var newbricksremoved=bricksremoved; function removebrick(e:event=null):void{ newbricksremoved=newbricksremoved+1; if(newbricksremoved==2) {gotoandstop(5)} } function tracebricksremoved(e:event=null):void{ trace(newbricksremoved); } and added next code within brick 2, frame 2: object(root).removebrick();

ios - subclassing uitextfield with shouldChangeCharactersInRange to handle max length not working -

ios - subclassing uitextfield with shouldChangeCharactersInRange to handle max length not working - hello have searched many thread here subclassing uitextfield shouldchangecharactersinrange handle max length. tried these next thread still not work: - how subclass uitextfield in ios? - uitextfield shouldchangecharactersinrange delgate not working - set custom uitextfield max length my code bellow. .h //uitextfieldgeneral.h #import <uikit/uikit.h> @interface uitextfieldgeneral : uitextfield <uitextfielddelegate>{ int maxlength; } -(void)inisialisasi:(int)maxvalue; @end .m //uitextfieldgeneral.m #import "uitextfieldgeneral.h" @implementation uitextfieldgeneral - (id)initwithframe:(cgrect)frame { self = [super initwithframe:frame]; if (self) { // initialization code // self.delegate = self; } homecoming self; } -(void)inisialisasi:(int)maxvalue{ // self.keyboardtype = uikeyboardtypedecimalpad; sel

rethinkdb - Do shorter JSON keys make smaller NoSQL documents? -

rethinkdb - Do shorter JSON keys make smaller NoSQL documents? - i've been confused while. rethinkdb schema-less, way stores info (or other nosql database's method of storage), smaller json key create shorter documents? {"avg": 312} vs {"average": 312} thanks for yes since rethinkdb doesn't compress fields. see https://github.com/rethinkdb/rethinkdb/issues/1396 nosql rethinkdb

javascript - Leaflet Omnivore group markers from CSV individually -

javascript - Leaflet Omnivore group markers from CSV individually - i can't figure out grouping external info leaflet. have csv markers , set markers omnivore on map. how can grouping markers? for example: have 4 markers , have "type" specified in csv. let's type called "freibad". how grouping markers type "freibad" , set them in layergroup called "freibad" able filter them layer control? //markercluster //vars ii var freibad=[]; function eachlayer(marker) { var ltg = marker.togeojson(); if(ltg.properties.type != ""){ marker.seticon(l.icon({iconurl:'/icons/'+ltg.properties.type+'.png'})); } if(ltg.properties.img != ""){ marker.bindpopup('<strong>' + ltg.properties.name + '</strong>' + '<br>' + ltg.properties.description + '<br> <img src="/icons

pyramid pooling and max pooling in convolution neural network -

pyramid pooling and max pooling in convolution neural network - i utilize gaussian pyramid pooling in convolution neural network. target build decovolution network reconstruct input(a image). when obtain convolution neural network model generate feature, original image can reconstructed decovolution network. in convnet, mutual max pooling operation non-invertible reason utilize gaussian pyramid pooling. have google internet, seem pyramid pooling used in convolution neural network. so know difference between max pooling , pyramid pooling. drawback of pyramid pooling in convolution neural network. neural-network convolution pooling