Posts

Showing posts from April, 2013

jQuery form validation not working in CakePHP 2.8.5 -

actually html form contains textboxes name like, example name="data[user][username]" in cakephp 2.8.5. how can write jquery form validation code form fields. why because when use validation have use textbox field name, cannot use entire textbox name data[user][username] . my code below: <!doctype html> <html lang="en"> <head> <?php echo $this->html->css('jquery-ui.min.css'); ?> <?php echo $this->html->script('jquery.js'); ?> <?php echo $this->html->script('jquery-ui.min.js'); ?> <?php echo $this->html->script('jquery.validate.min'); ?> <script> $(function() { // setup form validation on #register-form element $("#useraddform").validate({ // specify validation rules rules: { username: "required", password: { required: true

Apache Beam maven dependencies: jdbc package is not downloaded in skd jar file -

downloaded maven dependecies in eclipse using <dependency> <groupid>org.apache.beam</groupid> <artifactid>beam-runners-direct-java</artifactid> <version>0.3.0-incubating</version></dependency> <dependency> only org.apache.beam.sdk.io,only org.apache.beam.sdk.io.range downloaded. .io.jdbc not being downloaded in dependencies. is there other specific artifactid have use other above mentioned? apache beam (incubating) publishes several convenience binaries maven central repository every release. there isn't artifact captures whole project. instead, should using specific components need (perhaps core sdk, additional libraries, , runner). specifically, if you'd use beam's jdbc connector, depend on following artifact (among other things): <dependency> <groupid>org.apache.beam</groupid> <artifactid>beam-sdks-java-io-jdbc</artifactid> <version>${some_version}<

reactjs - Testing Components with importing configs and other Components In React with Enzyme and Mocha -

i want write test in react testing component. i test individual component without imports or dependencies , passed. i have read , followed tutorial shallow testing , component testing. i not understand how can write test component has config file, other component , styles file imported. understand concept of mount , exporting component can't working.

ios - How to call timer one time in application using swift? -

hi developing app using swift 2 in app updating current location every x minutes using nstimer able update location , works fine.in app(first view controller) when user logged in , moves second view controller in(second view controller) wrote function updating location using nstimer works fine when user moves third view controller , return second view controller again start updating location cant able stop timer twice invalidate timer 1 time other 1 keep on updating location after users logged out.so please me out solve problem. my second view controller: class secondviewcontroller:uiviewcontroller{ in view did load method: var appdelegate:appdelegate = uiapplication.sharedapplication().delegate as! appdelegate appdelegate.timer = nstimer.scheduledtimerwithtimeinterval(10.0, target: self, selector: #selector(timetomoveon), userinfo: nil, repeats: true) //i declared var timer:nstimer! in appdelegate.swift , performed function using nstimer my third view co

python - Complex grouping list items -

Image
i need display notifications in facebook format using python. finding difficult group items. following list query the notification must displayed follows john changed name, code, description of product shirt john changed name of product hat john changed variant code of hat mike changed name of product trouser, hat kiet changed name of variant xxl shirt is there possibility of doing using python group by? , order date? you try following approach using groupby , seems work existing data might need further thought other edge cases: from itertools import groupby datetime import datetime results = [ ["user", "type", "changed", "product name", "date"], ["john", "product", "name", "shirt", "1-jan-17"], ["john", "product", "code", "shirt", "1-jan-17"], ["john", "product", "des

Python list memory reallocation issue -

if using c-python or jython (in python 2.7), , list ( [] ) data structure, if continue add new elements, there memory reallocation issue how java arraylist have (since java arraylist requires continuous memory space, if current pre-allocated space full, needs re-allocate new larger continuous large memory space, , move existing elements new allocated space)? http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/java/util/arraylist.java#arraylist.ensurecapacity%28int%29 regards, lin internally python lists array of pointers mentioned hpaulj the next question how can extend array in c explained in answer . explains can done using realloc function in c. this lead me in behavior of realloc mentions the function may move memory block new location (whose address returned function). from understanding array object extended if contiguous memory available, else memory block (containing array object not list object) copied newly allocated me

time - Return HH:mm in SQL Server -

i got date , time inside table. wonder if there way return date, count of date, , time. manage date , count of date following query. select date daterow, count(date) datecount dbname..tblname group date the value of time inside table hh:mm:ss wanted return hh:mm . sample expectation result daterow  |  datecount  |  timerow 2016-11-10     11           11:35 2016-11-11      3            11:40 if add convert(varchar(5),getdate(),108) timerow returned value expected result but query capturing current time. wanted display time table. edit : i had two different separated column date , time inside table. date column date datatype. time column time datatype. my question : how return value of date , count of date , , time in sql? if want time out of current system time. use query below, select left(convert (time, sysdatetime()),5); if time column present in table use query below. select left(timecolumn,5); hope helps!

c - Why am I not getting a memory exception here -

this question has answer here: how dangerous access array out of bounds? 10 answers suppose have data structure struct foo{ int a; int b; }; now create array of 2 items . this struct foo* farry = (struct foo*) malloc(2 * sizeof(struct foo)); please correct me if wrong above create 2 slots having foo structure default initialized ? correct ? if if this struct foo* farry = (struct foo*) malloc(2 * sizeof(struct foo)); farry[0].a =1; farry[1].a =2; farry[2].a =3; farry[3].a =4; farry[4].a =5; for(i=0 ; i<=4 ; i++) { printf("value %d \n",farry[i].a ); } then why @ farry[2].a =3 not tell me memory error occured. instead prints 1,2,3,4,5 you access uncontrolled locations in heap in program , user space. nothing wrong point of view no memory error. simply you're messing other static varia

Can a Select Count(*) Affect Writes in Cassandra -

i experienced scenario select count(*) on table every minute (yes, should avoided) caused huge increase in cassandra writes around 150k writes per second. can explain weird behavior? why select query increase write count in cassandra? thanks! if check org.apache.cassandra.metrics:type=readrepair,name=repairedbackground and org.apache.cassandra.metrics:type=readrepair,name=repairedblocking metrics can see if read repairs sending mutations. perhaps reading data service count(*) causing lot of read repairs if data inconsistent. if thats case lowering read_repair_chance , dclocal_read_repair_chance on table ( alter table ) reduce load. other possibilities are: you have tracing enabled (either globally or on table) %. or if use dse , have slow query's enabled.

delphi - Initial expanded-collapsed state of projects of a groupproject -

after opening groupproject, in project manager window see projects expanded , other projects collapsed. each time open groupproject, projects , states (expanded/collapsed) same , didn't understood how have set them expanded or collapsed. i tried checking .groupproj file didn't saw expanded/collapsed value projects. where these informations stored , how change them? update: i've opened same grouproject computer has delphi2007 installed. collapsed , expanded projects same can see computer. think these informations stored somewhere in source files.

need to add string in between a SQL statement using TCL -

i have sql statement stored inside variable: i "statement" ".sql" file using file operations set statement "select build_package, replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(substring(build_package, length(build_package) - position('/' in reverse(build_package)) + 2), '-bsd',''),'-lnx',''),'-esxi',''),'.repo',''),'.vmdk',''),'.qcow2',''),'.rpm',''),'.tbz',''),'-version',''),'.el7.x86_64','') ,'-nr',''),'-kvm',''),'-x86_64',''),'ptsvpl','svpts'),'spbvpl','svspb'),'sdevpl','svsde'),'-amd64',''),'.noarch',''),'.el6',''),'.x8

swift - Ranges in Swift3 -

i'm struggling 1 of swift3 changes. earlier treated ... , ..< range , have ton of new "sub-ranges". have function taking both range variants. struct test { var data = [1,2,3,4,5] subscript(r:range<int>) -> [int] { return array(data[r]) } } let t = test() print(t[0...1]) // fails because closedrange print(t[0..<2]) i'd have subscript(r:takesanyrange<int>) -> [int] { you can avoid duplication instead using countablerange , countableclosedrange , since 1 convertible other: struct test { var data = [1,2,3,4,5] subscript(r: countablerange<int>) -> [int] { return array(data[r]) } subscript(r: countableclosedrange<int>) -> [int] { return self[countablerange(r)] } } this works fine int range, specified in question. apple documentation: you can create countable range on type conforms strideable protocol , uses integer associated stride type. default, swift’s integer ,

php - Average number of queries for best performance -

i hope guys wont mind asking off-topic , naive question. but, not find satisfying answer this. maximum, how many queries on average page must allowed process rendering output(i looking quality aspect). example in e-commerce application, 4 5 queries on average required. minimum number of queries, shorter response time. hence question. question irrespective of programming platform. but, lets consider php , mysql example. a single complex query takes half second execute less optimal running 5 simple queries take total of 1/10 of second complete. having higher number of simple queries may trade-off in order keep code more organized. orms, example, wind making higher number of database calls if manually writing queries, make application substantially simpler develop. ultimately, though, application that's complex enough need worry number of database calls complex enough should utilizing caching layer wherever possible anyway. long there no pages take long time load, it&

multithreading - Multi threading for one process vb.net -

i learned basics of multi threading in vb.net need multi threading 1 process code : private sub btnloadnow_click(byval sender system.object, byval e system.eventargs) dim t1 new thread(addressof myprocess) t1.start() dim t2 new thread(addressof myprocess) t2.start() dim t3 new thread(addressof myprocess) t3.start() dim t4 new thread(addressof myprocess) t4.start() dim t5 new thread(addressof myprocess) t5.start() end sub private sub myprocess() 'my process codes end sub but code have error how can make it? you dont have defined autoload . dim t1 new thread(addressof autoload) just replace autoload ---> myprocess dim t1 new thread(addressof myprocess) and private sub myprocess() 'my process codes next sub have end end sub private sub myprocess() 'my process codes end sub this code working imports system.threading module module1 sub main()

How to pass allocatable arrays to subroutines in Fortran -

the following code returning segmentation fault because allocatable array trying pass not being recognized (size returns 1, when should 3). in page (http://www.eng-tips.com/viewthread.cfm?qid=170599) similar example seems indicate should work fine in f95; code file has .f90 extension, tried changing f95, , using gfortran compile. my guess problem should in way passing allocatable array subroutine; doing wrong? !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%! program test !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%! implicit none double precision,allocatable :: array(:,:) integer :: iii,jjj allocate(array(3,3)) iii=1,3 jjj=1,3 array(iii,jjj)=iii+jjj print*,array(iii,jjj) enddo enddo call subtest(array) end program !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%! subroutine subtest(array) double precision,allocatable,intent(in) :: array(:

powershell - Search for certain strings in a file, without looping through the content twice -

i have list of log files, these log files created every day @ 00:00:00, each day gets logged in seperate log file. 4 log files 4 different reasons created everyday, , have loop on them , select error messages. the log files have following structure: 07.11.2016 12:00:41 flag: mandant=1, modul=v, pool=5 07.11.2016 12:00:41 verarbeiten: m1, v, pool 5, dok 526198(), doktyp 3, skript bu-co110.ff, drucker 97 07.11.2016 12:00:41 fataler fehler saldocpoolitem_process(5,): err-226/ver-dokument nicht gefunden: 0 07.11.2016 12:00:57 flag: mandant=1, modul=v, pool=5 07.11.2016 12:00:57 verarbeiten: m1, v, pool 5, dok 526198(), doktyp 3, skript bu-co110.ff, drucker 97 07.11.2016 12:00:57 fataler fehler saldocpoolitem_process(5,): err-226/ver-dokument nicht gefunden: 0 07.11.2016 12:01:13 flag: mandant=1, modul=v, pool=5 07.11.2016 12:01:13 verarbeiten: m1, v, pool 5, dok 526198(), doktyp 3, skript bu-co110.ff, drucker 97 07.11.2016 12:01:13 fataler fehler sa

jquery - Basic UIKit (getuikit) accordion doesn't work -

in project i'm using uikit success (until now). trying use uikit accordion first time , failed badly. so reduced code this <!doctype html> <html> <head> <meta charset="utf-8" /> <link rel="stylesheet" href="css/uikit.min.css" /> <script src="https://code.jquery.com/jquery-1.12.4.min.js"></script> <script src="js/uikit.min.js"></script> </head> <body> <div class="uk-accordion" data-uk-accordion> <h3 class="uk-accordion-title">test 1</h3> <div class="uk-accordion-content">whatever</div> <h3 class="uk-accordion-title">test 2</h3> <div class="uk-accordion-content">everything else</div> <h3 class="uk-accordion-title">test 3</h3> <div class="uk-accordion-content">all rest</div> <

Powershell Function return array -

i have problem when i'm trying return array powershell function. my function: function filter-swcluster { param($path, $folderlist) $oldswcluster = new-object system.collections.arraylist foreach ($y in $folderlist) { get-childitem -path $path -filter $y* | sort { [version]($_.name -replace '^.*_(\d+(\.\d+){1,3})$', '$1') } -descending | select-object -skip 3 | foreach-object { $oldswcluster.add($path + "\" + $_) } } write-output $oldswcluster } the function call: $filerswcluster = filter-swcluster $networkpath $swcluster the output get: 0 1 \\server.domain\c$\temp\folders\testcluster_1.0.2 \\server.domain\c$\temp\folders\testcluster_1.0.1 the output want , need be: \\server.domain\c$\temp\folders\testcluster_1.0.2 \\server.domain\c$\temp\folders\testcluster_1.0.1 i need paths. know there solutions, please excuse me don't found 1 working me or dumb use right (could be). i hope of can me. thanks yo

wso2esb - WSO2 ESB escaping xml entity to correct form -

i stuck on creating output message wso2 esb 5.0. correct form of message should be: <request lang="11" user="user" pwd="pwd"> <query dateformat="%d-%m-%y" maxrecords="100"> <tables> <table tablename="company"/> </tables> <condition> <cond tablename="company" fieldname="upd" op="&gt;" value="10.11.2016"/> <cond tablename="company" fieldname="updtime" op="&gt;" value="01:00"/> </condition> the fun part "&gt;" in "op" attribute. there has "&gt;" , not ">". cdata , character doesn`t work: &#38; i tried payload factory, xslt transformation , script mediator different values no success. bad attempts: <payloadfactory description="create request" media-type=&q

iphone - iOS alarm clock with music -

i'm trying build ios alarm clock app plays music when goes off. there way accomplish this? i've seen various posts on years on topic , looks couldn't done because there no way wake app play music. i'm wondering if there's way? for example, can push notification lead playback of music? if not, there other way?

Authorization Bearer in URL Request using WSO2 API Manager -

is there way put authorization bearer in url request? curl command access api this: curl -x --header 'accept: application/xml' --header 'authorization: bearer ebcd41ac-3466-3262-8c8e-3c73c987dbde' ' https://gateway.api.cloud.wso2.com:443/t/jab7180/prod/1.0.0/inquire/promos/ibm ' but if use request url in browser using https://gateway.api.cloud.wso2.com:443/t/jab7180/prod/1.0.0/inquire/promos/ibm , getting error message: code = 900902 message: missing credentials description: required oauth credentials not provided. make sure api invocation call has header: "authorization: bearer access_token" i hope can me because want access api browser , not curl command. thanks. api manager uses org.wso2.carbon.apimgt.gateway.handlers.security.apiauthenticationhandler authenticate requests gateway using oauth authentication tokens. change behavior, have 3 options: delete authentication handler api definition on gateway (or velocity template,

java - How to use the Avg aggrigate function with spring data -

i'm using spring data , java. want calculate average of line in database group statut: @query( "select new com.app.gsc.entities.nbranomalieparstatut(fm.statut,avg(count(fm.id)) totalnumber) fichedemission fm group fm.statut" ) list<nbranomalieparstatut> getavgmissionparstatut(); it's giving me error: "could not extract resultset; nested exception org.hibernate.exception.genericjdbcexception: not extract resultset"

php - ajax, jquery contact form with reCAPTCHA v2 - clears form if invalid -

so managed jquery/ajax contact form google recaptcha v2 work, if recaptcha isn't entered or invalid, form cleared, user have enter again. recaptcha takes extremely long load, maybe can overlooked easily. how can prevent clearing form? i found solutions place php code in value of input fields, , htmlentities didn't quite understand, page form remain .html file. still possible prevent clearing form, or need make .html file .php file? here form: <div class="row"> <form id="ajax-contact" class="contact-form" role="form" method="post" action="mailer.php"> <div class="col-sm-4 col-sm-offset-2"> <div class="form-group"> <label for="name">name *</label> <input type="text" name="name" id="name" class="form-control"

[Azure][Application Insights agent for Java]java.lang.NoClassDefFoundError: http/RequestLine -

after launch jetty applicationinsights-agent-1.0.6.jar agent (see https://github.com/azure/azure-content/blob/master/articles/application-insights/app-insights-java-agent.md ), following stack trace. remove agent remove stack trace. i don't understand why bother "java.lang.noclassdeffounderror: http/requestline", found class ... is has same issue? java.lang.noclassdeffounderror: http/requestline @ org.apache.http.impl.client.httpclientbuilder.build(httpclientbuilder.java:1231) @ com.microsoft.applicationinsights.internal.channel.common.apachesender43.<init>(apachesender43.java:52) @ com.microsoft.applicationinsights.internal.channel.common.apachesenderfactory.create(apachesenderfactory.java:40) @ com.microsoft.applicationinsights.internal.channel.common.transmissionnetworkoutput.<init>(transmissionnetworkoutput.java:95) @ com.microsoft.applicationinsights.internal.channel.common.transmissionnetworkoutput.create(transmissionnet

android - Get details from recyclerview and show result in another fragment using cardview with retrofit 2 networking library -

iam using cardview in recyclerview list result of retrofit request, next want details of cardview clicked , display details of cardview (json) in fragment (to concise i'm using fragments listing , showing details) the below code first fragment in i'm fetching json using retrofit 2. code working fine, giving out put json. public class agentassetsfragment extends fragment implements view.onclicklistener { public textview titlename, assetrate, assetbrand; public recyclerview assetrecyclerview; list<agentasset> data; agentassetsadapter agentassetsadapter; framelayout mloadingframe; public sharedpreferences pref; public agentassetsfragment() { // required empty public constructor } @override public view oncreateview(layoutinflater inflater, viewgroup container, bundle savedinstancestate) { view view = inflater.inflate(r.layout.fragment_agent_assets, container, false); as

c++ - Why is a [[noreturn]] function checked for return type? -

suppose have function signature [[noreturn]] void die(int exit_code); . if write statement: check_some_condition() or die(exit_failure); i error message (with gcc 5.4.0): error: expression must have bool type (or convertible bool) but why type checked, if compiler knows going function, return value won't matter; , if condition checks out, again return type doesn't matter? edit: wording of standard regarding [[noreturn]] not address point, i.e. relax requirements regarding types "legitimize" such expressions? noreturn doesn't tell compiler function returns no value. tells compiler function not return. has no effect on function's return type. in expression, compiler required check operands of expressions have valid types. in expression check_some_condition() or die(exit_failure) , requires return type of both check_some_condition() , die() checked. noreturn not affect function's return type, not affect need check. if f

database - Why SQL Server has stopped the execution? -

i have sql server database , connect sql server management studio. when execute procedure if close client database not continue execution. why? i assumed execution runs on database , not in local. thank you. the execution runs on database server alright. however, when connection closed along client (in case management studio client), have sql server abort , roll running transaction. if want have run independently of client connection (at schedule or triggered), need jobs instance executed sql server agent .

Variables on PHP explode set to 1 character? -

i trying post 3 variables via checkbox. if user ticks checkbox each product, trying send 3 variables: <input type="checkbox" name="product[]" value="'. $rowattr["reference"] .'-'. $rowattr["price"] .'-'. $rowprod["unity"] .'"> the variables set have printed them page user can see product selecting. however, when submit form, variables checkbox set 1 characters? going wrong? $selected = explode('-', $product); $reference = $selected[0]; $price = $selected[1]; $unity = $selected[2]; echo '<table class="table table-striped">'; echo '<th>product reference</th><th>price</th><th>unit</th>'; if(isset($_post['product'])) { foreach($_post['product'] $product) { print '<tr>'; print '<td>'. $product['reference'

How to set max.poll.records in Kafka-Connect API of Confluent Platform -

i using confluent-3.0.1 platform , building kafka-elasticsearch connector. extending sinkconnector , sinktask (kafka-connect apis) data kafka. as part of code extending taskconfigs method of sinkconnector return "max.poll.records" fetch 100 records @ time. not working , getting records @ same time , failing commit offsets within stipulated time. please can 1 me configure "max.poll.records" public list<map<string, string>> taskconfigs(int maxtasks) { arraylist<map<string, string>> configs = new arraylist<map<string, string>>(); (int = 0; < maxtasks; i++) { map<string, string> config = new hashmap<string, string>(); config.put(configurationconstants.cluster_name, clustername); config.put(configurationconstants.hosts, hosts); config.put(configurationconstants.bulk_size, bulksize); config.put(configurationconstants.ids, elasticsearchids); config.put(configurationconst

angular ui router - AngularJS not setting location state with "skipReload" -

i working on site transitioning angular - uses angular single page application navigation , new feature i'm working on written entirely in angular. the rest of site takes navigation results , returns them through spa model, feature i'm working on runs entirely in single page, in order make links shareable , bookmarkable changes url in relation current state of page. so when selects new subsection of new feature, have code in subsection service: function setlocationforsubsection(subsection) { var path = subsection.id ? "subsections/" + subsection.id + "/" + subsection.urlslug : ""; $location.path("/section/" + path).search({}).skipreload(); }; if follow link elsewhere in site ( goes through $stateprovider.state('all', { url: '*urlpath?id', controller... pattern ) works correctly. if hit button, come correct page , setlocationforsubsection called. if click on same link outside of subsectio

r - Configure log directory for RStudio Server 1.0.44 -

i'm running rstudio server 1.0.44 on centos 7. according documentation , server monitor logs located @ /var/lib/rstudio-server/monitor/log , i'm unable find them there. there not monitor folder under /var/lib/rstudio-server folder, body , conf , proxy subfolders, , there not rstudio-server.log in system. maybe missed in installation? i try setting log folder manually, haven't found way set property. possible? any appreciated. p.s. user posted same (unanswered) question in rstudio forum. in centos 7 docker container, , rstudio server version 1.0.136, i've managed access logs using: journalctl -u rstudio-server some more logs can found using journalctl -f in more general point of view, there many logs in following folder: /var/log/anaconda according rstudio server support, solution launch rstudio-server --server-daemonize=0 in order output directly available on standard output & error.

cordova - With modernizing-oauth-interactions, can googleplus sign in auth token be used in google realtime apis? -

background question --> modernizing oauth interactions in native apps better usability , security in mobile app using inappbrowser, oauth requests restricted can use google plus sign in , use auth token in rtcclient js apis?? there alternatives suggested in blog itself to migrate, offer libraries , samples follow modern best practices can use: google sign-in android , ios, our recommended sdk sign-in , oauth google accounts. appauth android, ios, , os x, open source oauth client library can used google , other oauth providers. offer gtmappauth (for ios , os x), library enables appauth support google apis client library objective-c, , gtm session fetcher projects. google sign-in , oauth examples windows, examples demonstrating how use browser authenticate google users in various windows environments such universal windows platform (uwp), console , desktop apps. first alternative basic apis can used in android , ios apps did

javascript - DataTables - Ignore empty moment date values when sorting -

i'm using datatables , trying ignore empty values on date column based momentjs when sorting. e.g: 08 nov 2016 09:47 pm http://codepen.io/anon/pen/qqbwva?editors=1010 currently have , sorts values expected contains empty cells. $.fn.datatable.moment('dd mmm yyyy hh:mm a'); $('.table-data').datatable(); i've tried following custom sorting method posted here https://datatables.net/forums/discussion/1178/sorting-dates-handling-null-values jquery.extend(jquery.fn.datatableext.osort, { 'date-asc': function (a, b) { var x = date.parse(a); var y = date.parse(b); if (x == y) { return 0; } if (isnan(x) || x < y) { return 1; } if (isnan(y) || x > y) { return -1; } }, 'date-desc': function (a, b) { var x = date.parse(a); var y = date.parse(b); if (x == y) { return 0; } if (isnan(y) || x < y) { return -1; } if (isnan(x) || x > y) { return 1; } } }); $(

html - Child image in video tag downloads as well as the video -

i'm looking @ video tag on blog page announcing new autoplay policy mobile webkit: <video autoplay loop muted webkit-playsinline playsinline> <source src="/wp-content/uploads/forever.mp4"> <source src="/wp-content/uploads/forever.webm"> <img src="/wp-content/uploads/forever.gif"> </video> i notice on desktop chrome gif downloads video. point of view that's not thing - download gif fallback if neither of preceding 2 sources can played. there way achieve this? poster attribute on video tag wouldn't work either, image downloaded.

c# - Default size of Blocking collection -

i wanted know default size of blocking collection. somehow program not able add elements in blocking collection. the default size in code: var collection = new blockingcollection<int>(); is has no upper limit, according documentation : initializes new instance of blockingcollection class without upper-bound . (my emphasis) you can learn upper limit through .boundedcapacity property in case return -1 . try example on .net fiddle obviously unbounded blocking collection still has limit in number of elements can add in either underlying array or surrounding memory becomes full, not artificial limit imposed class itself. if you're observing cannot add elements such collection, blocks case, not constructed in way. instead constructed with specific limit , can still use .boundedcapacity property shown above learn limit.

BigQuery SQL - a way to pass values from more than one row and more than one column to User Defined Function -

i want create user defined function, ( create temporary function ) in bigquery standard sql accept values aggregated bunch of rows. my schema , table similar this: | c1 | c2 | c3 | c4 | |=======|=======|=======|=======| | 1 | 1-1 | 3a | 4a | | 1 | 1-1 | 3b | 4b | | 1 | 1-1 | 3c | 4c | | 1 | 1-2 | 3d | 4d | | 2 | 2-1 | 3e | 4e | | 2 | 2-1 | 3f | 4f | | 2 | 2-2 | 3g | 4g | | 2 | 2-2 | 3h | 4h | i can't change original schema made of nested or array fields. i want group c1 , c2 , pass values of c3 , c4 function, while being able match between values c3 , c4 each row. 1 way of doing using array_agg , pass values array , array_agg non-deterministic values c3 , c4 might come different orders source table. example : create temporary function tempconcatstrfunction(c3 array<string>, c4 array<string>) returns string language js "&quo

How to get map notification icon programatically in Android -

i'm looking way instructions maps navigation. think possible way read notification data placed @ top maps navigation. reason beleving way comes post. tried getting data onnotificationposted method, can't find directions data in statusbarnotification object. does have solution or better idea on how achieve this?

javascript - MaterializeCss: SideNav not working properly after update -

Image
i updated css/js files of materializecss design in project v0.97.5 v0.97.8. i thought wouldn't make of difference sidenav not working right anymore. when click on menu, slide out dark overlay on entire screen , cannot click anything. looks like: it looks 'sidenav-overlay' div opacity above sidenav. also, cannot click on menu inside sidenav. the implementation of similar mentioned in documentation. i'm not sure changed on here. edit1: code - <div class="navbar-fixed"> <nav> <div class="nav-wrapper light-blue lighten-1"> <ul id="slide-out" class="side-nav hide-on-med-and-down print-hidden"> <li><a href="#!">upload<i class="material-icons right">cloud_upload</i></a></li> <li class="divider"></li> <li class="div-title">admin</li> <li><a href=