Posts

Showing posts from July, 2012

ios - SiriKit INPayBillIntentHandling - Siri says, "I wish I could, but <App> hasn't set that up with me yet." -

i'm integrating sirikit , bill payment using intent: inpaybillintenthandling (which released in ios 10.3+ , 27 mar 2017). apple documentation here . note: i'm using obj-c language, xcode 8.3, device iphone 6s ios 10.3 & demo project ios deployment target ios 10.3 , enabled siri when asked permission first time , verified in settings, siri enabled. when launch app on device , "bill payment using demoapp", siri says "i wish could, demoapp hasn't set me yet" please me. in advance! so far did following steps: 1) create demo xcode project 2) in main app capabilities, enabled siri. 3) added sirikit extension using file -> new -> add target -> intent extension -> next ->add productname , finish note: i've disabled sirikit ui extension. 4) in main appdelegate added following: #import <intents/intents.h> [inpreferences requestsiriauthorization:^(insiriauthorizationstatus status) {

reactjs - React Add Css to Component without addon library -

i have created react component. in case component called header.js. here code: import react "react"; export class header extends react.component { render() { return ( <div> <h1>header component</h1> </div> ); } } what need add css same component file inside js. i need without using addon libraries jss etc. how can this? you can apply css following ways: 1. directly html element: import react "react"; export class header extends react.component { render() { return ( <div style={{fontsize: '10px'}}> <h1>header component</h1> </div> ); } } 2. can define css object in starting of file use object in style attribute: let style = { a: {fontsize: '10px'} }; import react "react"; export class header extends react.component

javascript - AJAX requests from a React component -

i having react component looks this. internally uses highcharts-react render chart fetching data api supplying api of state properties. export default class candlestickchart extends react.component { constructor (props) { super(props); this.state = { apiparam1: this.props.propdata.param1, apiparam2: this.props.propdata.param2, chartconfig: this.getchartconfig(this.props.apiparam1), }; } componentdidmount() { this.renderchart(); } render() { return ( <div classname='col-lg-6'> <div classname='well'> <reacthighstock config={this.state.chartconfig} /> </div> </div> ); } renderchart() { var = this; nanoajax.ajax({ url: 'myapi.com?param1=' + this.state.apiparam1 + '&param2=' + this.state.apiparam2;

How to get Mobile sim number(GSM) in android -

i developing android application. in need user mobile sim number calling purposes automatically. facing problem in getting mobile number of user. have tried this. telephonymanager telemamanger = (telephonymanager) getsystemservice(context.telephony_service); string getsimserialnumber = telemamanger.getsimserialnumber(); string deviceid = telemamanger.getdeviceid(); string getsimnumber = telemamanger.getline1number(); and telephonymanager tm = (telephonymanager) this.getsystemservice(context.telephony_service); string network; connectivitymanager cm = (connectivitymanager) this.getsystemservice(context.connectivity_service); if(cm.getactivenetworkinfo().gettypename().equals("mobile")) network = "cellnetwork/4g"; else if(cm.getactivenetworkinfo().gettypename().equals("wifi")) network = "wifi"; else network ="na"; string uphone = tm.getline1number

angularjs - Do I still need ngSanitize if I'm not going to use ng-bind-html? -

my questions are: do still need ngsanitize if i'm not going use ng-bind-html? if yes, why? is used anywhere else other ng-bind-html? does ngsanitize affect way dom input elements affect underlying model through ng-model? 1) yes will. ng-bind-html use $sanitize , requires have ngsanitize available. 2) probably 3) not work ng-model ( why ng-bind-html , $sanitize produce different results? )

ios - swift subview does not full-fill parent view -

Image
when app starts, use method set root view controller. func showrootviewcontroller() { let sb = uistoryboard.init(name: "main", bundle: nil) let mainviewcontroller = sb.instantiateinitialviewcontroller()! self.window?.rootviewcontroller = mainviewcontroller self.window?.makekeyandvisible() } in main view controller, i've code set view container view class mainviewcontroller: uiviewcontroller { @iboutlet weak var headerview: uiview! @iboutlet weak var containerview: uiview! override func viewdidload() { super.viewdidload() } override func viewdidappear(_ animated: bool) { super.viewdidappear(animated) if(usermanager.hasregistered()) { let sb = uistoryboard.init(name: "login", bundle: nil) self.setcontentviewcontroller(sb.instantiateinitialviewcontroller()!) } else { let sb = uistoryboard.init(name: "registration", bundle: nil)

scala - Handling chunked requests in Scalatra -

i’m interesting in processing chunked requests scalatra. scalatra support access single chunk of chunked http request? or have wait end of chunked request , process whole request after? the scalalatra wrapper around java servlets. allows access richrequest.inputstream directly . else same java. you might need parse chunked encoding input stream. see also: chunked http decoding in java? you can find wrapper inputstream here: http://www.java2s.com/code/java/file-input-output/aninputstreamthatimplementshttp11chunking.htm

Links not working Django -

in base.html links on nav bar not working reason. i've wrote correctly, when hover on link doesn't anything. <ul class="nav navbar-nav navbar-right"> <li class="active" role="presentation" data-aos="fade-down" data-aos-duration="900"><a href="{% url 'register' %}"><strong>join us?</strong></a></li> <li class="active" role="presentation" data-aos="fade-down" data-aos-duration="900"><a href="{% url 'login'%}"><strong>log in</strong></a></li> urls.py url('^delta/$', aircraft_delta, name='aircraft_delta'), #aircraft/detail/1 url('^aircraft/detail/(?p<id>\d+)/$', aircraft_detail, name='aircraft_detail'), #aircraft/ url(r'^aircraft/$', list_aircraft, name='aircraft_home'), #logi

php - multiple select with inner join -

i try translate simple sql request doctrine no success: select `groups`.`departure`, count(`group_users`.`group_id`) 'teamlength' `groups` inner join `group_users` `groups`.`id` = `group_users`.`group_id` , departure between '2017-03-01' , '2017-03-31' currently, code looks like: public function finddatesbetween(\appbundle\entity\itinerary $itinerary, \datetime $firstdate, \datetime $lastdate) { $q = $this->createquerybuilder('g') ->select('g', 'count(gu.group) teamlength') ->innerjoin('appbundle:groupuser', 'gu', join::with, 'g.id = gu.group') ->andwhere('g.itinerary = :itineraryid') ->setparameter('itineraryid', $itinerary->getid()) ->andwhere('g.departure between :firstdate , :lastdate') ->setparameter('firstdate', $firstdate->format('y-m-d')) ->setparameter('lastdate', $lastdate->format(

.htaccess - htaccess redirect without showing of page= -

on homepage have pages shown multiple times in google while content same. instance: example.com/services.html?page=services-old-page example.com/services.html both in google, want deleted part of questionmark, no doubles in google. have tried different things , best listed below, still not working: redirect 301 services-old-page.html http://www.example.com/services.html rewriterule ^([^/]*)/([^/]*)\.html$ /index.php?page=$2& [l] rewriterule ^([^/]*).html$ /index.php?page=$1 [l] i hope can me out?

ssl certificate - Adding HTTPS to Azure VM mapped through CNAME -

Image
i intend buy wildcard ssl certificate mydomain.com . isp map test.mydomain.com - using cname setting - azure vm (not simple web app) running webserver (e.g. blahblah-vm.cloudapp.net ) have opened port 80 , 443. now, client connects https://test.mydomain.com . there issues? need somehow prepare vm mydomain.com ssl certificate or work cname mapping? does vm have static public ip address ? if yes, use a records . also, can use cname map azure vm's fqdn. now, client connects https://test.mydomain.com . there issues? before connect https://test.mydomain.com , should install ssl certificate on pc first. do need somehow prepare vm mydomain.com ssl certificate or work cname mapping? there no need prepare except install ssl certificate. update: if vm windows, , use iis deploy web server, can use ssl certificate here:

javascript - Snap.svg and dynamic text -

Image
i'm trying place text dynamically svg created snap, tried: this.setcontent( `<svg id="${this.svgid}"></svg>` ); var snap = snap($(`#${this.svgid}`)[0]); text = "asdfsdfsdsfd"; var rect = snap.paper.rect(0, 0, 50, text.length*3 + 4, 10); snap.text(1.5,10, text); console.log("rect", rect); console.log("snap", snap); rect.attr({ fill: "#ffffff", fillopacity: 0.6, }); i this: i want rectangle little bigger text, there must better way calculate length , height of text, , that's assuming font size won't change. this result found regarding text in snap docs: http://snapsvg.io/docs/#paper.text you try using getbbox() on text element, , use figure size of rect. getbbox() wll give x,y,width,height,x2,y2 figures help. vat text = s.text(0,0,'blah blah') var bb = text.getbbox(); var rect = s.rect(bb.x, bb.y, bb.width, bb.height ) adjusting offsets whatever padding etc want. may need

jquery - Prevent click for Chocolat.js while dragging using slick.js -

right have draggable images container using slick , want preview full size when single click happens using chocolat.js , the problem when release mouse (after dragg), still fires full screen, i tried destroy chocolat when dragg event begins, persists.. var $chocolat = $('.chocolat').chocolat({ imagesize: 'contain', loop: true }).data('chocolat'); $('#bx-pager_builder').slick({ dots: true, infinite: true, speed: 300, slidestoshow: 1, centermode: true, variablewidth: true, beforechange: function() { $chocolat.api().destroy(); }, afterchange: function() { $chocolat = $('.chocolat').chocolat({ imagesize: 'contain', loop: true }).data('chocolat'); } }); the problem chocolat documentation doesn't provide examples.. any idea if i'm trying posible? ( , how? ^^ ) do have demo somewhere can understand bug ? any

c# - What is an IndexOutOfRangeException / ArgumentOutOfRangeException and how do I fix it? -

i have code , when executes, throws indexoutofrangeexception , saying, index outside bounds of array. what mean, , can it? depending on classes used can argumentoutofrangeexception an exception of type 'system.argumentoutofrangeexception' occurred in mscorlib.dll not handled in user code additional information: index out of range. must non-negative , less size of collection. what it? this exception means you're trying access collection item index, using invalid index. index invalid when it's lower collection's lower bound or greater or equal number of elements contains. when thrown given array declared as: byte[] array = new byte[4]; you can access array 0 3, values outside range cause indexoutofrangeexception thrown. remember when create , access array. array length in c#, usually, arrays 0-based. means first element has index 0 , last element has index length - 1 (where length total number of items in array) code doesn&

Snap.SVG s.node.offsetLeft [Top] is undefined? -

in snap.svg need position of svg container left upper corner. needed coordinates with s.mousemove(movefunc) but relative position of html body. html document responsive. result useing s.node.offsetleft or s.node.offsettop is undefined. svg container id , use of document.getelementbyid('usedid').offsetleft or other offset... give 'undefined'. results independent of browser. far couldn't find usefull answer or example. hope help. for completion ian's answer. html body ist centered viewport of browser , contents responsible. svg container should centered in body. mousemove event gives me correct coordinates relative viewport. if want example svg grafic element follow mouse or placed @ mousepointer need relative coordinates of svg container's upper left corner , not absolut coordinates x=0 , y=0. how can these coordinates? absolut positioned html element can needed offsets not svg. sorry, tried jsfiddle unsuccessful. here the code used:

forms - Rails views-table to display value from another model -

i have <table> in view it's showing username model - profile . i'm calling profile each row of table. there 2 problems this: exposing model in view calling & each time calling profile inefficient. is there way access usernames in controller first 1 sql query , display each value in table correspondingly or better approach show values without table? <table class="table table-bordered table-striped"> <thead> <tr> <th> applicant name </th> <th> email </th> <th> documents </th> </tr> </thead> <tbody> <% employee.eager_load(:application).each |e_application| %> <tr> <td><%= profile.find_by_user_id(e_application.user_id).full_name %></td> <td><%= mail_to(e_application.ap

angularjs - How to calculate the sum value of a set of arrays -

good day i wondering if can assist me in calculating sum value of array of data. var products = [{'size':'400' },{'size':'500' }] ; angular.foreach(products, function(item){ var total = 0; total += item.size++; return total; }); how use $q.all() statement store information file download section using ignores angular.foreach statment , checks individual items instead. use reduce instead of angular.foreach const productsum = products.reduce((sum, product) => sum + parseint (product.size, 10), 0) $q.all computing multiple promises. think looking in wrong direction.

php - Symfony2 Form ChoiceType External Datasource -

i have form class several choicetype fields contain array of options key:value pair. when form submitted value saved. when i'm rendering object show key value instead. example: 'monthly' => '1month'. 1month stored, prefer output monthly. i'm trying avoid conditionals check value , changing output key value. i wasn't able find documentation best practices sort of thing. i'm thinking creating service stores choice options arrays , build twig filter changing rendered output based on array service. am on right track or there easier way? i tried service solution , got working. i'm not sure if elegant or efficient way did job. form form class type , injected service contained choice arrays. i created choices.php class file inside form folder next formtype file. acts service returns choices formtype , custom twig extension filter created. formtype had set service in order inject choices service. /*choices.php*/ public function ge

resultset - Creating a result set in maximo -

Image
i've created result set in maximo , created object structures, i've added result set. i'm using query "supervisors" i've created , result set displays 2 supervisors in query , data have selected result set display: i've added multiple dates , work times each supervisor, displays 1 i've added first , doesn't show other ones. how can other dates , work times display too?

which version of firefox do we need for Selenium 3.3.1? -

which version of firefox need selenium 3.3.1?? i'm trying use firefox 51 selenium 3.3.1 , i'm not able launch application please let me know browser need use selenium 3.3.1 to quote team of geckodriver: support best in firefox 48 , onwards, although more recent firefox version, better experience have more bug fixes , features. advise using latest firefox nightly geckodriver, , want make clear firefox 47 , earlier explicitly not supported. since windows xp support in firefox dropped firefox 53, not support platform. see also: https://github.com/mozilla/geckodriver/blob/master/readme.md

DB2 SQL Using a set of clauses from this years sales to find out what the Client purchased last year -

db2 sql using set of clauses getting result of specific deals. now trying (using exists) @ same table , matching part_num, customer_name , date(date - 1 year) previous years sales same parts/cust. my end result if give me previous years deals customer number , part match years sales. cannot seem work suspect there maybe easier way. select part_num, customer_num,start_date, end_date tablea salesnumber = )as (exists ( select part_num, customer_num,start_date, end_date table )as b b.part_num = a.part_num , b.customer_num = a.customer_num , date(a.start_date) = year(b.start_date - 1 year) i sure have wrong. thoughts? try (but please try make effort next time...): select part_num ,customer_num ,start_date ,end_date table exists ( select part_num ,customer_num ,start_date ,end_date table b b.part_num = a.part_num , b.customer_num = a.customer_n

android - Soft keyboard looses prediction after restartInput() -

i have weird, consistent bug in app standard android keyboard supports word predictions. what i’m doing call inputmethodmanager.restartinput() after evaluated input of edittext show different ime label (i check current text textwatcher , set label ”close” when text empty , “send” when it's not). without calling restartinput() ime label change not taken on until connection otherwise renewed, e.g. closing , reopening keyboard again. now when manually enter characters through keyboard fine expected, labels changed, key strokes accepted, good, if click on 1 of predictions on keyboard paste word, second click on prediction lost (i.e. word should pasted after called restartinput() ). "lost" means different things different keyboards, swiftkey example keeps first word underlined , replaces second word on click, while google's keyboard keeps first word, ignores second word , continues next word. this video shows issue: https://puu.sh/v0wuo/8f9b3571ed.mp4 i

python - Trouble deploying Django application on Ubuntu server -

so i've managed setup django project on server following this tutorial. able run on port 8000 doing python manage.py runserver but want deploy server's domain name or ip address without specifying port. after configuring 000-default.conf instructed on tutorial 500 internal server error error.log: [tue mar 28 12:34:29.006570 2017] [wsgi:error] [pid 12773:tid 140065216325376] [remote 31.49.113.30:62072] mod_wsgi (pid=12773): target wsgi script '/home/ubuntu/myproject/myproject/wsgi.py' cannot loaded python module. [tue mar 28 12:34:29.006623 2017] [wsgi:error] [pid 12773:tid 140065216325376] [remote 31.49.113.30:62072] mod_wsgi (pid=12773): exception occurred processing wsgi script '/home/ubuntu/myproject/myproject/wsgi.py'. [tue mar 28 12:34:29.006695 2017] [wsgi:error] [pid 12773:tid 140065216325376] [remote 31.49.113.30:62072] traceback (most recent call last): [tue mar 28 12:34:29.006714 2017] [wsgi:error] [pid 12773:tid 140065216325376] [remote

R - Trying to avoid a loop here -

first post ever here, i've been reading lot thanks! i have huge dataframes many columns, 4 matter here: dates/classes/names/grades. for each date, have several classes (with students), each several people (names - same people in respective classes), each 1 having 1 grade per date. on first date, retrieve best student per class considering grade, using max[] . however, next dates, want following: if previous best student still in top 3 of class, consider him still best one. else, consider new 1st student best one. hence, every date depends on previous one. is possible without loop? can't find out how, every iteration depends on previous one. this code below. apologies if it's not optimized! thanks lot :) for (i in (1:(length(horizon)-1))) #horizon vector of dates { uni3 <- dataaf[dataaf[,1] == as.numeric(horizon[i]),] #dataaf contains data, keep date considered date if (i == 1) #we take best student per

unix - sed with line numbers as variables -

i want specific lines using sed , first line , last line stored in variables. here example, want lines between first line (here line number 5) , last line (here number 8), , use grep search specific word. firstline=5 lastline=8 sedresult="$(sed -n "$firstline,$lastline p" text.txt | grep word -aii)" but having errors. errors : sed: -e expression #1, char 5: unexpected `,' what proper way use variables line numbers ? your initial expression has broken double quotes usage . should be: firstline=5 lastline=8 sedresult=$(sed -n "$firstline,$lastline p" text.txt)

LightTPD reverse proxy timeout -

i'm using lighttpd reverse proxy our backend, both running in windows. nothing special @ all, just: $http["url"] =~ "^/s-api" { proxy.server = ("" => ( ( "host" => "127.0.0.1", "port" => 8220 ) ) ) } everything works fine when backend , running, but, if backend goes down requests throught proxy left in sort of endless wait state. no 504 - gateway timeout or anything. browser (both chrome , ie10) sits there waiting requests complete. in lighttpd debug logs can see proxy module tries connect fails: 2017-03-28 12:48:19: (mod_proxy.c.1058) establishing connection failed: connection refused but doesn't bubble browser. with ngingx can use proxy_connect_timeout setting handle how do in lighttpd? i've tried messing around of settings, like server.max-keep-alive-requests = 0 server.max-keep-alive-idle = 0 server.max-read-idle = 10 server.max-write-idle = 10 but make no difference. poss

java - svn ant make character uppercase -

i have path following values: fullpath="https://..starturl/st1.txt,https://..beginurl/bg32.txt,https://..darkurl/dk17.txt" <for list="${fullpath}" param="parsedname" > <sequential> <echo message="@{parsedname}" /> </sequential> </for> i got below result correct https://..starturl/st1.txt https://..beginurl/bg32.txt https://..darkurl/dk17.txt what want make last word upper https://..starturl/st1.txt https://..beginurl/bg32.txt https://..darkurl/dk17.txt

java - JPA query join error: org.hibernate.hql.internal.ast.QuerySyntaxException: Path expected for join -

i attempting join in following jpa query following error: org.hibernate.hql.internal.ast.querysyntaxexception: path expected join! [from com.crm.entity.user user join fetch role role on role.user_id = user.id user.deleted = false , user.enabled = true , user.username = :username] here implementation: import javax.persistence.entitymanager; import javax.persistence.persistencecontext; import javax.persistence.query; import javax.transaction.transactional; import org.springframework.stereotype.repository; import com.crm.entity.user; @transactional @repository public class userjpadaoimpl implements userjpadaocustom { @persistencecontext private entitymanager em; @override public user getuser(string username) { query query = em.createquery("from user user " + "join fetch role role on role.userid = user.id " + "where user.deleted = false "

ios - Firebase - Getting a reference to values stored under childByAutoID -

i've been following tutorial on making chat app, has separate "rooms", it's 1 central list every user - i'm trying alter each user sees list of own rooms (rooms create, , rooms added friends). this code handles creating room , adding list: // create new room @ibaction func createroom(_ sender: any) { if let name = newroomtextfield?.text { let newroomref = roomref.childbyautoid() let roomitem = [ "name": name ] newroomref.setvalue(roomitem) // how add room user's room? let userref: firdatabasereference = firdatabase.database().reference().child("users") } } private func observerooms() { // observe method listen new channels being written firebase roomrefhandle = roomref.observe(.childadded, with: { (snapshot) -> void in let roomdata = snapshot.value as! dictionary<string, anyobject> let id = snapshot.key if let name = roomda

android - SmoothAppBarLayout collapsed toolbar height is bigger than intended -

Image
i changed appbarlayout smoothappbarlayout it smoother , faster happy result. changed toolbar height somehow , couldn't yet fix it. collapsed toolbar's height should 'actionbarsize' bigger that. it not toolbar title, disabling or changing padding of doesnt work. behaviour. setting new behavior below solves problem want proper solution. appbarlayout.behavior behavior = new appbarlayout.behavior(); params.setbehavior(behavior); first image shows intended size, second shows actual size. here part of xml: (didn't put of since pretty long) <me.henrytao.smoothappbarlayout.smoothappbarlayout android:id="@+id/appbar" android:layout_width="match_parent" android:layout_height="210dp" android:minheight="50dp" android:theme="@style/themeoverlay.appcompat.dark.actionbar" app:sabl_target_id="@id/nestedscrollview"> <android

python - Converting 16 bit audio sample to char -

i using matrix creator board , trying make python wrapper mic array c++ code. the library has read function returns uint16_t array of 128 samples. i'm trying compare alsa readi function writes buffer char array user passes argument function. the question how alsa write 16-bit samples char array when single char 8 bit wide? , how same uint16_t array , pass python i'll same result alsa readi function? a uint16 can passed 2 bytes (uint8), c++ code uses union data can saved uint16 while usb code can pass data bytes. as python code, function use convert 8-bit bytes uint16 def convert_int8_int16(self, byte_array): new_array = [0]*(len(byte_array)/2) in range(len(byte_array)/2): new_array[i] = byte_array.pop(0)*256 + byte_array.pop(0) return new_array this go through byte array , add values new uint16 array.

c# - Caliburn resetting SelectedIndex on ComboBox -

i have combobox has itemssource bound list of items in viewmodel selecteditem being bound property. have combobox bound list, uses selectedindex instead. when select item first combobox, changes contents of seconds combobox, , property bound selectedindex gets set -1 , causes nothing selected in combobox. why selectedindex property reset -1, , can prevent it? view <combobox itemssource="{binding mylist}" selecteditem="{binding myselecteditem}"></combobox> <combobox itemssource="{binding myarray}" selectedindex="{binding myselectedindex}"></combobox> viewmodel public list<foo> mylist { get; set; } private foo _myselecteditem; public foo myselecteditem { { return _myselecteditem; } set { if (equals(value, _myselecteditem)) return; _myselecteditem = value; notifyofpropertychange(); myarray = new [] { "othervalue1", "othervalue2", "otherv

mysql - vb.net adding large sum on variable integer -

i created queuing system display multiple counters , queue number of customer , service group when update them, data looks first counter. update function refreshed on timer tick every 1 second updates information. public sub updatecountera() openconnect() sqli = "select `counter`, `logconcern`, `logcustcurr` `access` logstatus= 1 , counter=1 " sqlrun() if mydata.rows.count = 0 countera.text = "avail" counteracust.text = "avail" counteraservice.text = "avail" else countera.text = mydata.rows(0)(0) counteracust.text = mydata.rows(0)(1) counteraservice.text = mydata.rows(0)(2) end if closeconnect() end sub public sub updatecounterb() openconnect() sqli = "select `logconcern`, `logcustcurr` `access` logstatus= 1 , counter=2 " sqlrun() if mydata1.rows.count = 0 counterb.text = "avail" counterbcust.text = "

apache - .htaccess causing 500 Error while modifying it to add Authorization Header (PHP Service Api) -

i added undermentioned script .htaccess file enable adding of authorization header causes 500 error on request php apis. can me out? thank you. rewriteengine on rewritecond %{http:authorization} ^(.*)$ rewriterule .* - [e=http_authorization:%1] the problem wasn't .htaccess file, noticed interval server error occured due fetchall in mysqli didn't configured in server. so, did enable nd_mysqli , fine , sound. thank you.

Search email addresses in ElasticSearch by regexp -

how can search in elastic regexp find email addresses? i try that: { "query": { "regexp": { "data": { "value": "[\\w\\'\\.\\_\\+\\-]+@[\\w]+[\\w\\-\\.]*\\.[\\w]+", "flags": "all" } } } } but nothing. there https://www.elastic.co/guide/en/elasticsearch/reference/5.2/query-dsl-regexp-query.html written simbol @ means symbol , therefore should escaped. therefore try that: { "query": { "regexp": { "data": { "value": "\\@", "flags": "all" } } } } and that: { "query": { "regexp": { "data": { "value": "\\@", "flags": "all" } } } } but n

java - Execution of stored procedure using spring's SimpleJdbcCall not giving output -

this dao class, has datasource connects database, , retursn following : 2017-03-28 09:49:42 debug datasourceutils:327 - returning jdbc connection datasource 2017-03-28 09:49:42 debug callmetadatacontext:380 - using declared parameter for: pricetolerance_csr 2017-03-28 09:49:42 debug simplejdbccall:313 - compiled stored procedure. call string [{call z_getpricetolerancerejects(?)}] 2017-03-28 09:49:42 debug simplejdbccall:289 - sqlcall procedure [z_getpricetolerancerejects] compiled 2017-03-28 09:49:42 debug simplejdbccall:395 - following parameters used call {call z_getpricetolerancerejects(?)} {} 2017-03-28 09:49:42 debug simplejdbccall:398 - 1: pricetolerance_csr, sql type -10, type name null, parameter class [org.springframework.jdbc.core.sqloutparameter] 2017-03-28 09:49:42 debug jdbctemplate:1062 - calling stored procedure [{call z_getpricetolerancerejects(?)}] 2017-03-28 09:49:42 debug datasourceutils:110 - fetching jdbc connection datasource 2017-03-28 09:49:43 debug jdbcte

javascript - Gulp watch of changes not working -

i created gulpfile.js , put inside js file gulp .. main problem .. gulp not working in each changes in js file changes in component.vue not showing @ run time !! show int first time run gulp ! why ? webpack.config.js module.exports = { entry: './resources/assets/js/accountvue.js', output: { filename: 'app.js' }, devtool: 'source-map', resolve: { alias: { 'vue$': 'vue/dist/vue.js' } }, module: { loaders: [ { test: /\.js$/, loader: 'babel', exclude: /node_modules/, query: { "presets": ["es2015"], // "plugins": ["transform-runtime"], "comments": false } }, { test: /\.vue$/, loader: 'vue' } ] } }; gulpfile.js var elixir = require('laravel-elixir'); var gulp = require(&

cmd - Why does filtering output of git diff with findstr using a regular expression to get just lines ending with .js not work? -

i'm working on first javascript project. advised me use eslint git pre-hook check code. i'm writing own pre-hook pass eslint (only changed files checked). i'm trying find every file .js extension. tried following solutions none working: git diff --cached --name-only --diff-filter=acm | findstr /r ".js$" => returns nothing git diff --cached --name-only --diff-filter=acm | findstr /r ".js" => returns .js , .json git diff --cached --name-only --diff-filter=acm | findstr /r ".js^$" => returns nothing could me regular expression find every file .js extension? open command prompt window , run findstr /? output of standard windows console application. there perhaps no need regular expression find @ all. simple case-insensitive ( /i ) interpreted literal ( /l ) search string additional option match lines ending ( /e ) string enough. git diff --cached --name-only --diff-filter=acm | findstr /e /i /l .js another

javascript - Redux - Having an issue concatenating new state when an Item is added to an array -

Image
currently having issue reducer function not update questionlist.items array. i'm not sure i'm doing wrong here awesome if point me in right direction :) below snippet of code i'm having issue with. problem lies add_questions action it not concatenate existing items in array new item . instead, it overwrites existing item in array . const add_question = 'add_question'; const fetch_questions = 'fetch_questions'; const fetch_questions_success = 'fetch_questions_success'; const fetch_questions_failure = 'fetch_questions_failure'; const initial_state = { questionslist: {items: [{ id: 2222, questionstring: 'your name', rejected: true }], error:null, loading: false}, newquestion:{question:null, error: null, loading: false}, activequestion:{question:null, error:null, loading: false}, deletedquestion: {question: null, error:null, loading: false}, }; const questionsreducer = (state = initial_state, act

html - Youtube iframe don't do fullscreen?! w/bootstrap -

good afternoon everyone, have question regarding black bars appear in video, parameters stating video should fill space define not on computer or on phone have filled space, such small bar appears below. site http://www.mascoli.com/miguel/ , code written there <?php /** * template used displaying page content in page.php * * @package ducktours */?> <div class="container-fluid"> <div class="row"> <div class="col-xl-12"> <iframe width="800px" height="100%" frameborder="0" allowfullscreen src="https://www.youtube.com/embed/8ckplpqxcqk?rel=0&showinfo=0&autohide=1&modestbranding=1&autoplay=1&volume=0&wmode=opaque&yt:crop=16:9&amp;&hd=1&amp;&loop=1&amp;autoplay=1&amp;modestbranding=0&amp;controls=0&amp;showinfo=0&amp;rel=0&amp;allowfullscreen=true"></iframe> </div> </div> </div> ps: for

Sending Gmail with an attachment that allows for 2 factor authentication in Python -

i'm trying alter code can send attachments via google , 2 factor authentication. the below code works send emails i'm struggling getting work send attachments. any guidance appreciated. thanks! import httplib2 import os import oauth2client oauth2client import client, tools import base64 email.mime.multipart import mimemultipart email.mime.text import mimetext apiclient import errors, discovery email.mime.base import mimebase email import encoders scopes = 'https://www.googleapis.com/auth/gmail.send' client_secret_file = 'client_secret.json' application_name = 'gmail api python send email' def get_credentials(): home_dir = os.path.expanduser('~') credential_dir = os.path.join(home_dir, '.credentials') if not os.path.exists(credential_dir): os.makedirs(credential_dir) credential_path = os.path.join(credential_dir, 'gmail-python-email-send.json') store = oauth2client.file.storage(credential

python - Updating cards in deck loop issue -

after playing round, cards removed, if play again, (if click yes), goes 52 cards again. didn't remove cards has been removed in previous game.i think loop issue because calling mainfuction in end , goes first stage , ignoring cards been deleted before want ask if of can guide me or me in updating cards in deck if yes click thank alot below code: import random, sys # define global variables cards suits = ('clubs', 'spades', 'hearts', 'diamonds') pip = ('ace', '2', '3', '4', '5', '6', '7', '8', '9', '10', 'jack', 'queen', 'king') pipvalues = {'ace':11, '2':2, '3':3, '4':4, '5':5, '6':6, '7':7, '8':8, '9':9, '10':10, 'jack':10, 'queen':10, 'king':10} class card: #when create instance of card, pass suit ("c", "d"