Posts

Showing posts from February, 2010

java - timmolter/XChange - Cryptsy GetFee -

i know may obscure api have idea how can fee market? i tried this system.out.println("\ncalculatefees:\n" + ((cryptsytradeserviceraw) tradeservice).calculatecryptsyfees(cryptsyordertype.sell, new bigdecimal("2"), new bigdecimal("286.62403820"))); and gives me wrong fee. looks cryptsy posts fees here: fees if(volumeinbtc < 0.5){ pairfee = 0.0033; //0.33% } else if(volumeinbtc >= 0.5 && volumeinbtc < 1.0){ pairfee = 0.0031; //0.31% } else if(volumeinbtc >= 1.0 && volumeinbtc < 5.0){ pairfee = 0.0029; //0.29% } else if(volumeinbtc >= 5 && volumeinbtc < 20){ pairfee = 0.0027; //0.27% } else if(volumeinbtc >= 20){ pairfee = 0.0025; //0.25% } else{ system.exit(1);//something went wrong } return pairfee; }

testing - Django test client post data is empty -

i have application have create simple post request using django test client. userfrom = client() userfrom.login(username="admin1",password=test_password) data = {"some":"data"} responsenew = userfrom.post("/foo/too/",simplejson.dumps(data),content_type="application/json") when check post request @ view of "/foo/too/" post dictionary empty. i have checked following question. not work. using django 1.5. post dictionary empty you can try like: responsenew = userfrom.post("/foo/too/", data)

visual studio 2015 - Error On Deploying App to Windows Phone -

i updated logo's , app description in package manifest of windows 8.1 app. when deploy app windows phone shows error. building of app goes perfect no issues. enters deploying phone , updating layout. shows following error. need help! severity code description project file line error error : dep0001 : unexpected error: appx package's manifest invalid. (exception hresult: 0x80080204) mynewapp went online , checked it. found following link: https://msdn.microsoft.com/en-us/library/windows/desktop/br211474.aspx didn't quite went wrong i solved issue. issue didn't load logo wide tiles , yet had checked option show name on wide tile.

c# - Do structs add any overhead to instance size? -

specifically, if make struct has single field, acts wrapper around value, safe pass struct p/invoke method expecting underlying type? i'm working native library api involves lot of pointer-to-struct types, , i'd use bit more typesafe intptr keep them straight, wrapping intptr in generic struct. work? (and has been done?) don't pass struct, then. instead of figuring out how directly p/invoke, keep p/invoke methods private , , expose public methods take wrapper type directly - , handle whatever need pass forward. code going use these public methods without having worry unsafe structures :) mixing different types , expecting them magically work recipe disaster. make explicit, , don't rely on hiding , implicit forced casts. the best thing allows use pointer wrapper safe - can keep reference, , if it's ever lost, can use finalizer dispose of unmanaged resource needed. have @ how safehandle , it's descendants work great sample.

python - How to prevent incorrect exit from QTapplication when running from within Spyder -

this question related code shown here an more down-to-the-point code this: import sys import os pyqt4 import qtgui class window(qtgui.qdialog): def __init__(self, parent=none): super(window, self).__init__(parent) # button mess around self.button= qtgui.qpushbutton('push me') # set layout layout = qtgui.qvboxlayout() layout.addwidget(self.button) self.setlayout(layout) if __name__ == '__main__': app = qtgui.qapplication(sys.argv) main = window() main.show() sys.exit(app.exec_()) when run this, silly one-button window appears, nothing :-) still, when close it, following complaint ipython console: an exception has occurred, use %tb see full traceback. to exit: use 'exit', 'quit', or ctrl-d. exception has occurred, use %tb see full traceback. systemexit: 0 in [3]: %tb traceback (most recent call last): file "<ipython-input-2-0a8f6cad0df5>&quo

c++ - Two functions variables in to a single function -

i have 2 variables in 2 different functions, i'd store them in third function without using global variables. how it? something this void function1() { = 1; b = 2; } void function2() { c = 3; d = 4; } void function3 () { cout << a; cout << b; cout << c; cout << d; } your functions can return values can pass variables other functions, so std::pair<int, int> function1() { int = 1; int b = 2; return {a, b}; } std::pair<int, int> function2() { int c = 3; int d = 4; return {c, d}; } void function3 () { int a, b, c, d; std::tie(a, b) = function1(); std::tie(c, d) = function2(); std::cout << a; std::cout << b; std::cout << c; std::cout << d; } working demo

linux - How to list recently deleted files from a directory? -

i'm not sure if possible, list files deleted directory, recursively if possible. i'm looking solution not require creation of temporary file containing snapshot of original directory structure against compare, because write access might not available. edit: if it's possible achieve same result storing snapshot in shell variable instead of file, solve problem. something like: find /some/directory -type f -mmin -10 -deletedfilesonly edit: os: i'm using ubuntu 14.04 lts, command(s) running in variety of linux boxes or docker containers, or of should using ext4 , , not have access make modifications. you can use debugfs utility, debugfs simple use ram-based file system specially designed debugging purposes first, run debugfs /dev/hda13 in terminal (replacing /dev/hda13 own disk/partition). (note: can find name of disk running df / in terminal). once in debug mode, can use command lsdel list inodes corresponding deleted files. w

sharepoint - How can I remove box-sizing: border-box from Bootstrap CSS? -

i building sharepoint 2013 site , i'm including bootstrap minified css v3.3.4 files within site able use tabs organizational purposes. this thing inclusion of bootstrap css makes "help" symbol , "focus on content" button messed up. problem 1 line of code within bootstrap css file. "box-sizing:border-box;" , when turned off (while using inspect element tool) looks fine again. i'm asking how can remove/turn off line of code within css file can include css file no issues? note: i'm asking here because has css , bootstrap - asking on sharepoint stack exchange doesn't fit question. thanks. i had same problem sharepoint 2013 sites when using bootstrap in branding. need override effects adding css file after corev15.css , bootstrap.css references, following: #suitebar *, #s4-ribbonrow * { -webkit-box-sizing: initial; -moz-box-sizing: initial; box-sizing:content-box; } this target box-sizing:content-box suitebar

android - Why is Logcat showing "E/SQLiteLog﹕ (1) no such table: reg_info"? -

i changed database version, added appropriate amount of spaces sql function create table , updated parameters function inserts input database, logcat still displays: e/sqlitelog: (1) no such table: reg_info e/sqlitedatabase: error inserting user_password=e user_email=e user_name=e while compiling: insert reg_info(user_password,user_email,user_name) i condensed information displayed errors focus on these specific errors. problem occurs on emulator , android devices. thank you. this contract class declared columns table: package com.example.xxx.datadigger; import android.provider.basecolumns; public final class tabledata { public tabledata() { } public static abstract class tableinfo implements basecolumns { public static final string database_name="user_info"; public static final string table_name="reg_info"; public static final string key_id = "id"; public static final string user_name = &qu

Cordova Ionic: Enable android emoji soft keyboard -

Image
with cordova ionic android can call search keyboard with: <input type="search"> : i'm trying access emoji keyboard with: <input type="textshortmessage"> but isn't working. textshortmessage based off question: android keyboard emoji direct android development.

java - TEXT must be immediately followed by END_TAG and not START_TAG -

i trying add simple property in local profile. <profile> <id>local</id> <properties> <property> <name>localurl</name> // line 111, column 27 "l" <value>http://localhost:8080</value> </property> </properties> </profile> when clean project, following error. text must followed end_tag , not start_tag (position: start_tag seen ...<property>\n <name>... @111:27) @ line 111, column 27 i mentioned line number in above profile snippet. not sure why happening. using maven 3.3.3 , java 1.8 . i have searched few articles , this question in stackoverflow did not much. any idea why error coming? edit if comment <property> part, error not come. this pom.xml <?xml version="1.0" encoding="utf-8"?> <project xmlns="http://maven.apache.org/pom/4.0

Strikeout all repeated words using jquery, javascript or PHP -

is there easy way strikeout repeated words (excluding first one) in string using jquery/javascript or php? ex (using javascript): var text = 'you know that. know that. might know'; strikeoutrepeatedfunction(text); result: know that. know . might know . thanks you can this, split string using split(' ') , split space. now iterate on them using map() , store unique words in array in case of repetition return string wrapped del tag else return string itself. to avoid problem case convert string lowercase while comparing , use tolowercase() that. combine array using join(' ') var text = 'you know that. know that. might know'; function strikeoutrepeatedfunction(t) { var words = []; return t.split(' ').map(function(v) { if (words.indexof(v.tolowercase()) === -1) words.push(v.tolowercase()); else return '<del>' + v + '</del>'; return v; }).j

sql - Join two Tables with one have columns to rows -

i have table structure: table 1: id(pk) | <other columns> 1 | otherdata 2 | otherdata the other table, it´s list of documents (pdf,doc,etc) url download. these documents stored in network. table 2: id | iddoc | linkdoc | info 1 | 1 | 'http://url1' | 'info1' 1 | 2 | 'http://url2' | 'info2' 2 | 1 | 'http://url3' | 'info3' id foreign key table 1,iddoc foreign key 3rd table (below) describe document type: table 3: iddoc | name 1 | 'contract' 2 | 'notification' i need generate query join these tables , similar structure id | <somecollumstable1> | namedesc1 | nameurl1 | ... | namedesc2 | nameurl2 example output: id | <somecollumstable1> | contractdesc | contracturl | notificationdesc | notificationurl 1 | otherdata | 'info1' | 'http://url1' | 'info

asp.net mvc 4 - Reditect url from the method of notify_url of paypal in mvc -

i using paypal payment. in paypal found 2 type url - return_url notify_url i wan check validity after transaction, save data , redirect buyer receipt page unique value saved in db. why m not using redirect_url here code [httppost] public actionresult testpaypalipn() { var response = new streamreader(request.inputstream, system.text.encoding.utf8).readtoend(); var webclient = new webclient(); string address = "https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_notify-validate&" + response; system.io.file.writealltext(@"d:\streamstech\content\requestaddress.txt", address); try { string result = webclient.downloadstring(address); system.io.file.writealltext(@"d:\streamstech\content\response.txt", result); if (result == "verified") { if (request.params["pa

Excel Slicer Manipulation with VBA -

i learning how create , manipulate excel slicers vba. have been following examples paul te braack on "business intelligence website: https://paultebraak.wordpress.com/2012/02/24/accessing-the-slicer-through-vba/ when try cycle through items of slicer cache , print values of "caption", "value" , "name" in immediate window, returns error of "run-time error '1004': application-defined or object-defined error line: " code: "set sl = sc.slicercachelevels(1)" sub btest() dim sc slicercache dim sl slicercachelevel dim si sliceritem application.enableevents = false application.calculation = xlmanual set sc = activeworkbook.slicercaches(5) set sl = sc.slicercachelevels(1) debug.print “——————————————————————————” each si in sl.sliceritems debug.print “caption; – > ” & si.caption debug.print “value; – > ” + cstr(si.value) debug.print “unique; name; – > ” + si.name debug.print “——————————————————————————” nex

vba - Clear contents and formatting of an Excel cell with a single command -

if want clear contents of cell or range in microsoft excel, can use .clearcontents . if want clear formatting, can use .clearformats . sheets("test").range("a1:c3").clearcontents sheets("test").range("a1:c3").clearformats if want both, can use .delete , other cells in spreadsheet shift replace deleted cells. sheets("test").range("a1:c3").delete how can remove contents and formatting of cell or range in vba single command, without affecting rest of worksheet? use .clear method. sheets("test").range("a1:c3").clear msdn documentation here.

Maintain session when calling a REST service from Java -

i trying call web services requires authorization(login) user. possible maintain session can call web services in java console base application. for example:- have 1 rest api in can investor's investment passing investor id. investment details particular investor user has login(that web service(i have create api login calling authorize user)). can pass header along request if can't maintain session that? please tell me. if not clear please comment below. thank you. since it's vague problem, try give pointers 'generic' solution. rest service can return object linked credentials of user. it's what's called 'cookie'. then, @ each call, have resend cookie, , have credentials... see: http://docs.oracle.com/javaee/7/api/javax/servlet/http/cookie.html http://www.java2s.com/tutorial/java/0400__servlet/getsetcookie.htm

hyperlink - iOS Widevine with Xamarin -

i needing use widevine api in ios app written in xamarin. understand need make wrapper library , such, have no idea start. can either explain in more detail do, or point me somewhere explains well? thanks, quite new xamarin, , rusty on c# you want follow jason's comment . in short, need .a (fat library) , header files , create xamarin.ios binding project exposes native interface c#. access source code not necessary.

How to search a folder with its subfolders and save the results to an array VB.NET -

i trying execute search on folder , array of every result back. found code doesn't go subfolders: dim results new list(of string) each strfilename string in io.directory.getfiles("pathtosearch") if strfilename.contains("searchterm") results.add(strfilename) end if next how can this, subfolders? i'm not knowledgeable search options in vb.net yet, apologize in advance if seems stupid. have tried searching online haven't found anything. can't have single string, needs array (this needs interpreted machine later in program) thanks help no recursion required. there overload this. need call appropriate search option. e.g. list txt files in directory subdirectories can do: dim foundfiles() string = system.io.directory.getfiles("path/to/dir", "*.txt", system.io.searchoption.alldirectories)

Sails.js 'schema: true' equivalent for response JSON -

i had assumed sails model schema: true config option worked in 2 directions; i.e. 1. strip out fields not defined in attributes hash before writing database, , 2. strip out fields in database before serving application (in cases database has data don't need get. it looks 1, , not 2. correct? if so, there more elegant built in way 2 rather overwriting tojson() method return fields want? it true schema: true 1 i.e. strip out fields before saving database. if not want override tojson , create instance method that. you consider overriding toobject if suits use case.

oracle11g - Oracle SQL : Wrong error count per error code -

i trying run 1 sql query find out count per error code database. have 2 table sw_sms_events transaction id , sms sent stored. sw_events transaction id , error reason in case failed stored otherwise reason "successfully sent tarifftext". total error count :- select count(*) sw_sms_events sms_text '%welkom in het buitenland%' total error count per error reason :- select distinct count(*) on (partition b.reason) , b.reason sw_sms_events a, sw_events b a.transaction_id= b.transaction_id , a.sms_text '%welkom in het buitenland%' , b.reason !='successfully sent tarifftext' order (count(*) on (partition b.reason)) desc normally these queries gives same result i.e. sum of individual error count = total number of errors.but in worst case scenarios same transaction retried multiple times results not same .i.e. have multiple rows in table same transaction id. below 1 of result in case of worst case : name 24-07-2015 total number of

routes - Zend framework 2 application in subdomain -

good day, have 1 zend 2 application in shared host(www.mydomain.com). need run new zend 2 application in sobdomain(www.subdomain.mydomain.com ). not use shieldroutes 2 applications without dependencies. idea? thanks! you define in nginx/apache configuration. define 2 separate domains, , point each host config separate apps. it's intuitive in end, 2 separate apps, 2 configs - same approach either.

Connect to remote PostgreSql database using Powershell -

i'm trying connect remote postgresql database using powershell. first time using powershell i'm sorry if noob question. code: $dbconnectionstring = "driver={postgresql unicode}:server=$myserver;port=$myport;database=$mydb;uid=$myuid;pwd=$mypass;" $dbconn = new-object system.data.odbc.odbcconnection; $dbconn.connectionstring = $dbconnectionstring; $dbconn.open(); $dbcmd = $dbconn.createcommand(); $dbcmd.commandtext = "select * mytable;"; $dbcmd.executereader(); $dbconn.close(); when run "exception calling "open" "0" argument(s): error [im002] [microsoft][odbc driver manager] data source name not found , no default driver specified". i've downloaded , installed pgsqlodbc driver i'm still getting error. have ideas how fix this? have searched internet , i'm not getting anywhere @ point. thanks. check if dsn exists in odbc data source. if not have create 1 going 'control panel', 'admin.

sql - Counting Occurrences in MS Access -

Image
i trying return list of rooms occupant or investigator associated with. want include people associated more 1 room. i tried following query select [occupant], [investigator], [room number], [room subuse], count([occupant]), count([investigator]) [facilities management schedule] group [occupant], [investigator], [room number], [room subuse] having (count([occupant]) > 1 or count([investigator]) > 1); which returns result but data which seems not include weibo cai or occupancy in rooms 7148-*. because count of him existing in space not greater 1, there way reformat query obtain data want? thanks, otterman group by , having right idea, need group room information. use having filter want: select [room number], count([occupant]), count([investigator]) [facilities management schedule] group [room number] having (count([occupant]) > 1 or count([investigator]) > 1); i don't know if [room subuse] of interest. assume

c - iterating over const matrix and vector -

i have function constant matrix , vector input, , trying iterate on columns follows void matx_mut(const int *a, const int **b, unsigned int c, unsigned int a_col_start, unsigned int a_col_end, unsigned int a_row_start, unsigned int a_row_end) { unsigned int int *a_ptr, *b_ptr; // initial processing for( = a_col_start; <= a_col_end; i++) { // code a_ptr = &a[a_col_start]; b_ptr = &b[i][a_row_start]; // more code } } however, getting following warning "warning c4090: '=' : different 'const' qualifiers" . can't change a_ptr , b_ptr const because changing value on every iteration, right? is there nice way resolve warning?, beside declaring both pointers inside 2nd loop. i tried using initial pointers , b, made not easy read :( as per description of c4090 warning, a variable used in operation defined specified modifie

php - Symfony2 form don't persist empty collection -

i have form containing entity collection : public function buildform(formbuilderinterface $builder, array $options) { $builder ->add('name', 'text') ->add('fichiers', 'collection', array( 'type' => new fichiertype(), 'allow_add' => true, 'allow_delete' => true, 'by_reference' => false )) ; } but, collection contains 4 non required field : public function buildform(formbuilderinterface $builder, array $options) { $builder ->add('url', 'text', array( 'required' => false )) ->add('name', 'text', array( 'required' => false )) ->add('size', 'text', array( 'required' => false )) ->add('type', 'text', array( &#

pdf - Download using jsPDF on a mobile devices -

i have page includes download button using jspdf. on desktop machines downloads page should. however, pdf.save() not work on tablet or phone. i tried add special case mobile devices open pdf in new window, since mobile devices don't download things same desktops, idea being once pdf open in new window user can choose save manually. var pdf = new jspdf('p', 'pt', 'letter'); var specialelementhandlers = { '#editor': function (element, renderer) { return true; } }; html2canvas($("#pdf-area"), { onrendered: function (canvas) { $("#pdf-canvas").append(canvas); $("#pdf-canvas canvas").css("padding", "20px"); } }); var options = { pagesplit: true }; function download(doctitle) { pdf.addhtml($("#pdf-area")[0], options, function () { if (/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.useragent)) {

c# - What's a good way to send changes to an object over a socket? -

i'm trying implement system synchronising changes in objects on tcp. want generic system can use number of different objects. object in case set of key-value pairs, array of objects, or map of strings objects. object structure changes, values change multiple times per second. i'm trying implement sends changes instead of serializing entire object every time changes can reduce bandwidth requirements , reduce latency. what i'm thinking of right turning this: [ { a: 5, b: "abc"}, { a: 3, b: "xyz" } ] into set of 1-dimensional arrays: values = [ 5, "abc", 3, "xyz" ] objects = [ { a: 0, b: 1 }, { a: 2, b: 3 } ] conainer = [ [ 0, 1 ] ] the integers point element in 1 of 3 arrays. elements point sent in advance , shouldn't change. when value changes, thing needs sent index in value array , new value. i feeling i'm massively over-thinking (read: i'm pretty sure i'm making million times more complicated needs

html - Stretch images contained in 1 div across screen -

probably simple fix here, have 3x images in line want stretch across browser window, no matter resolution. i've messed around percentages in css can seem control 1 object. my guess possibly create individual div each image, assign each div percentage of screen, 1/3 of screen's width reserved each image - stretch / re-size depending on resolution. can point me in right direction? not sure if i'm thinking this. cheers! just add: width: 33.3%; to your: img.selector1 {}

wordpress - Implementing Post Thumbnail from a Loop in functions.php -

Image
i'm using ajax load queried posts in page, i've got function in functions.php helps implement this. outposts correct markup posts should in when loaded page. the majority of working fine except post thumbnail. i won't bore query don't think need it. in page template first posts loaded in in markup , works perfectly: <div class="small-12 large-3 columns end thumb"> <div class="grid"> <figure class="effect-zoe"> <?php the_post_thumbnail( $size, $attr ); ?> <figcaption> <h2><?php the_title(); ?></h2> <hr class="light"> <p class="description"><?php the_content(); ?></p> </figcaption> </figure> </div> </div> this want replicate in functions.php, here code

django - How to use mixins properly -

please, understand, why following doesn't work me. so, need display information on page logged in user. in order not retype code in every view decided create mixin. class mymixin(object): def my_view(self): args = {} args['username'] = auth.get_user(request).username args['first_name'] = auth.get_user(request).first_name args['last_name'] = auth.get_user(request).last_name return args class someview (templateview, loginrequiredmixin, mymixin): template_name = 'index.html but doesn't show in template. {{ first_name }} there @ least 2 ways of getting these "context variables" template: your templateview includes contextmixin . override contextmixin 's get_context_data method view, this: class someview (templateview, loginrequiredmixin): template_name = 'index.html def get_context_data(self, **kwargs): context = super(someview, self).get_context_data(**kwargs)

how use rtsp in android media player with wowza? -

i want play mp4 in android app, when set file url in server app pushes message "cannot play video" sometimes had anerror in eclipse "app can not find directory" and had error "status: rtsp/1.0 401 unauthorized" here's code i'm using set url: objitem.setvideourl("rtsp://ipserver:1935/live/mp4:sample.mp4"); how can play properly? after hour spent found answer forgot set "none" in this node value <publishmethod>digest</publishmethod> <playmethod>none</playmethod>

c# - WCF namespace prefix -

i trying consume understand older style asmx web service third party provider, want use wcf since recommended approach newer style applications. when add service reference application web reference (click advanced button in add service reference dialog , choose add web reference), can consume web service. works. this, however, older style method of setting web service, understand. what want via wcf, went adding service reference without doing web reference (e.g. add service reference dialog, putting in address , clicking go). of code talk web service seems work, keep getting following exception: system.servicemodel.communicationexception unhandled user code hresult=-2146233087 message=unrecognized message version. source=mscorlib stacktrace: server stack trace: @ system.servicemodel.channels.receivedmessage.readstartenvelope(xmldictionaryreader reader) @ system.servicemodel.channels.bufferedmessage..ctor(ibufferedmessagedata messagedata, recycled

Importing Ghostscript in Python on Windows 8 -

i've been trying import ghostscript python in order convert pdf files .tiff format. i using python version 2.7.10 on windows 8. i have downloaded , installed ghostscript using pip, , appears in correct location (...\anaconda\lib\sitepackages). i've confirmed other packages located in directory can imported python. i using command import ghostscript when so, error message: runtimeerror: can not find ghostscript dll in registry the traceback indicates calling file "ghoscript_init_.py" imports _gsprint gs. however, when import function attempts access "ghostscript_gsprint.py", produces runtimeerror unable find ghostscript dll. i grateful advice or tips. thanks! as installing ghostscript python bindings pypi pip install ghostscript , need install correct ghostscript program platform, described on pypi page . page states version 8.x required, i'm using 9.2 successfully. the download links here .

user interface - Text area for progress bar -

i add text area user can see information can see in console while progress bar updating. how can add text area ? here sample of code have used make progress bar. can add below progress bar text area should fill while computations mare? import javafx.application.application; import javafx.concurrent.task; import javafx.event.actionevent; import javafx.event.eventhandler; import javafx.geometry.pos; import javafx.scene.scene; import javafx.scene.control.button; import javafx.scene.control.label; import javafx.scene.control.progressbar; import javafx.scene.control.progressindicator; import javafx.scene.layout.hbox; import javafx.scene.layout.stackpane; import javafx.stage.modality; import javafx.stage.stage; import javafx.stage.stagestyle; public class progressdialogexample extends application { static int option = 0; static progressform pform = new progressform(); @override public void start(stage primarystage) { button startbutton = new button("start"); sta

static object c++ "does not name a type" -

i have following code: // header.h class outer { class mid { mid(); ~mid (); }; class inner { private: static mid m_mid; }; }; when define static private object in cpp file, gives me error saying mid not name type: // header.cpp: # include "header.h" mid mid::m_mid; {begin definitions outer, mid , inner here} any clue why compiler complain ? : mid not name type there no class mid ; there no member of mid named m_mid . there is, however, class outer::mid , , class outer::inner has member named m_mid . write instead. :) outer::mid outer::inner::m_mid;

jdbc - Apache Drill - connection to Drill in Embedded Mode [java] -

i want connect drill java app, , far trying use jdbc , i'm using example https://github.com/vicenteg/drilljdbcexample , but... when change db_url static variable "jdbc:drill:zk=local" , start app exception: java.sql.sqlnontransientconnectionexception: running drill in embedded mode using drill's jdbc-all jdbc driver jar file alone not supported. and far didn't found workaround. idea how connect drill in embedded mode? don't want set distributed mode far. there not on web. any appreciated! if connecting local embedded instance(without zookeeper), should use drillbit host directly like: jdbc:drill:drillbit=<drillbit-host>:[port] eg: jdbc:drill:drillbit=localhost

arrays - Trouble with javascript function to generate exact change -

i'm working on challenge online coding community. object write function generate exact change highest lowestusing denominations shown in cid array (cash in drawer). function takes 3 arguments, price, cash, cid. cid cash in drawer. i'm trying compare cash amounts of denominations in cid against cash amounts of exact change computation. for example, if change = 96, exact change highest lowest ['twenty', 80], ['ten', 1], ['five', 1], ['one', 1] . however, if cid shows ['twenty', 60], ['ten', 20], ["five, 55] code must compute exact change using amount in cid. in case, result be, ['twenty', 60], ['ten', 20], ['five', 15], ['one', 1] in code below, display() function includes conditional statement intended make comparison , switch in cid value if necessary. however, causing duplicate value ["twenty"] appear. questions ar causing , how fix it. the input function produces

curl - Only one tokenizer filter is added when creating/replacing a new field type -

i'm adding field type using curl: curl -x post -h 'content-type:application/json' --data-binary '{ "add-field-type" : { "name":"valuewithsubfields", "class":"solr.textfield", "positionincrementgap":"100", "indexanalyzer":{ "tokenizer": { "class":"solr.keywordtokenizerfactory" }, "filters": [{ "class":"solr.lowercasefilterfactory"}], "filters": [{ "class":"solr.asciifoldingfilterfactory" }], "filters": [{ "class":"solr.reversedwildcardfilterfactory" }] }, "queryanalyzer": { "tokenizer": { "class":"solr.keywordtokenizerfactory" }, "filters": [{ "class":"solr.lowercasefil

mediacodec - Streaming MedicCodec encoder output using libstreaming -

i have compiled camera streaming example libstreaming wowza. https://github.com/fyhertz/libstreaming have been googling , still have not found example on how can stream own output mediacodec instead. scenario rendering images in opengl , encode them h.264 stream using mediccodec encoder. now, how pipe encoded bytes libstreaming? thanks reading. libstreaming looks promising need do. huj from understanding, libstreaming not support mediacodecs input yet. if simple (video only) rtp stream enough you, may modify h264packetizer, rtpsocket , senderreport classes. mediacodec outputs raw nal units need feed packetizer , send via rtpsocket.

javascript - jQuery not removing selectors -

this bugs been annoying me bit now, im having validate form data client side before being pushed external api im validating requirements on user passwords function //check passwords match , strong enough $(document).on('change', '#password-confirm', function () { var $password = $('#password').val(); var $password_confirmation = $(this).val(); if ($password.length >= 8) { $('#password').parent().removeclass("validationerrors"); $('#password-confirm').parent().removeclass("validationerrors"); $('#password-help-block').removeclass("validationerrors").removeclass("passwordvalidationerrors"); console.log($('#password').parent()); console.log($('#password-confirm').parent()); if ($password === $password_confirmation) { //passwords match check strengths enough if ($('.strength_meter div&