Posts

clojure - Composing a Buffy buffer from the middle of an array and finding out how much it has consumed -

i'd use buffy interpret binary data starting middle of array. need find out how many bytes of array have been consumed buffy. let's have dynamic buffer definition this: (ns foo.core (:refer-clojure :exclude [read]) (:use [byte-streams]) (:require [clojurewerkz.buffy.core :refer :all] [clojurewerkz.buffy.frames :refer :all] [clojurewerkz.buffy.types.protocols :refer :all]) (:import [io.netty.buffer unpooled bytebuf])) (def dynbuf (let [string-encoder (frame-encoder [value] length (short-type) (count value) string (string-type (count value)) value) string-decoder (frame-decoder [buffer offset] length (short-type) string (string-type (read length buffer offset)))] (dynamic-buffer (frame-type string-encoder string-decoder second)))) i hoped use netty bytebuf parse bunch of b...

python - AttributeError: 'Series' object has no attribute 'sort_values' -

pyldavis library prepare method has crashed while using pandas library inside. here code: def load_r_model(filename): open(filename, 'r') j: data_input = json.load(j) data = {'topic_term_dists': data_input['phi'], 'doc_topic_dists': data_input['theta'], 'doc_lengths': data_input['doc.length'], 'vocab': data_input['vocab'], 'term_frequency': data_input['term.frequency']} return data movies_model_data = load_r_model('movie_reviews_input.json') print('topic-term shape:%s' %str(np.array(movies_model_data['topic_term_dists']).shape)) print('doc-topic shape: %s' %str(np.array(movies_model_data['doc_topic_dists']).shape)) movies_vis_data = pyldavis.prepare(np.array(movies_model_data['topic_term_dists']), ...

javascript - How to align text in bottom of label -

i've got problems text in label bottom of label. i'm animating falling text, label "seem" fall should, text stays on top, it's not following label downwards. please check jsfiddle out, press button see problem. have tried many different ways without coming working solution. http://jsfiddle.net/kaze72/jq6ua/ .uppgifter { vertical-align: text-bottom; } seems not help! you can try .uppgifter { display: table-cell; vertical-align: bottom; background-color: yellow; } jsfiddle updated jsfiddle .uppgifter 's height in animate method matches #spelplan 's height.

image - Building fiware/cygnus docker from source code - issue with the last step (8) -

when trying build fiware/cygnus docker image source code, last part of it, namely building of image jar with: docker build -f ./docker/dockerfile -t fiware/cygnus . gives following message in last step (8) of building process: "no source files specified". @ point building appears aborted. the building done according: https://github.com/telefonicaid/fiware-cygnus/tree/master/docker (source code from: https://github.com/telefonicaid/fiware-cygnus.git ), , amounts first building java archive (jar) provided source code, , subsequently building docker image jar file. 1) reason message in step 8? since, according documentation, no other steps mentioned. also, "target" directory, mentioned in documentation, appears not made. 2) however, there appear image, no tags ( cf "-t fiware/cygnus" flag in command mentioned above). result fact building done step 8, leaving incomplete image? many thanks! step 8 is step 8 : add ./target/*.jar /tm...

android - Custom Navigation drawer without ListView and ActionBar -

i use navigation drawer in app, should [this]: http://godpowerturbo.com/app/uploads/nav.png [a], make design have used imagebutton in place of listview plus i'm not using fragments , open navigation drawer on imagebutton click exits null pointer exception. i have searched everywhere on google , stackoverflow couldn't fix error. this main activity drawerlayout dw; percentrelativelayout rl; imagebutton nav; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); log.d(tag, "oncreate()"); session session = new session(mctx); log.e(tag, "log_id: " + session.getlogid()); session.putall(); rl = (percentrelativelayout) findviewbyid(r.id.nav_left); dw = (drawerlayout) findviewbyid(r.id.nav_drawer); nav = (imagebutton) findviewbyid(r.id.nav_menu); nav.setonclicklistener(ne...

jquery - Prettyphoto and event click on iframe -

uui'm trying detect click event inside iframe. found (not working) solution on so, , wasn't able fix them , them working on code. how can detect target of click event inside iframe? since prettyphoto loaded $("a[rel^='prettyphoto']").prettyphoto(); i hoping solution similar to $("a[rel^='prettyphoto']").prettyphoto( $('#myframe').bind('click', function(event) { alert("cliked"); }) ); but doesn't work. idea? use .on() $('#myframe').on('click', function(event) { alert("cliked"); })

doctrine - Symfony doesn't find pdo_sqlsrv driver -

i have 1 problem doctrine (or server configuration, don't know problem) in symfony2 web. have been looking answer since several days haven't found yet. i need connect symfony web remote microsoft sql database through doctrine. reason, have added "database_driver: pdo_sqlsrv" param in app/config/parameters.yml, when try execute (in mac) command like: php bin/console doctrine:database:create or php bin/console doctrine:generate:entities appbundle/entity/product i following error: [doctrine\dbal\driver\pdoexception] not find driver [pdoexception] not find driver i have checked phpinfo , driver doesn't appear (only mysql, sqlite). don't know if it's possible add mssql, because in microsoft sql server functions ( pdo_sqlsrv ) appears needs running on windows. is not possible access mssql database without windows? (if yes, how can it). would need windows hosting? thanks in advance. i'm using sql server on last project. ...