Posts

Showing posts from April, 2015

css - Bootstrap space between rows -

this question has answer here: space between buttons bootstrap class 3 answers i put space between rows buttons (three buttons in each row). in example each row inside div element marked bootstrap class btn-toolbar . i know can solve problem using inline styling , put parameter margin-top or writing custom css class wondering if there bootstrap class this? code: <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.0/jquery.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> <br/> <button type="button" class="btn btn-primary" style="margin-right:30px;">naz

system verilog - systemverilog return dynamic array from function -

i trying return dynamic array function, did dome job dont know how dynamic, mean without declare "data_len" helping, module test1(); typedef integer dyn_arr[]; function dyn_arr get_register_name(); int data_len = 3; get_register_name = new [data_len] ; get_register_name[0] = 5; get_register_name[1] = 2; endfunction dyn_arr my_q; initial begin my_q = get_register_name(); $display("%d",my_q[1]); $display("%d",my_q[0]); end endmodule you can pass dynamic array reference in function purpose. here sample code it. module tp(); integer a[]; initial begin return_x(a); $display("a - %p", a); end endmodule function automatic void return_x(ref integer x[]); x = new [3]; x = '{3,3,3}; endfunction // output - // - '{3, 3, 3}

PHP array with mysql and other -

i have table1 phone numbers data 09454151,094949154 , other data client. my input data in phone number like: 000385926555494 or 0385981961969 convert to: 0926555494 or 0981961969 that works fine code (where $broj00 = '000385926555494 '): $broj00 = preg_replace('/'.ulazni_poziv.'/', '', $broj); //dodavanje prefixa za ljepsi pregeld broja $prfix = 0; $broj01 = array($prefix,$broj00); $broj02 = implode('',$broj01); then have problem, work if $broj 1 data can have in $broj = '09846646646,098956565,0989898' 3 number in date. how can explode 3 number 1 ? , search database number name , return name? full code working $broj = '0986464646'; -> 1 number. function realbroj_ul($broj){ global $database; global $session; $result = ""; //uklanjanje odredenog djela iz broja $broj00 = preg_replace('/'.ulazni_poziv.'/', '', $broj); //dodavanje prefixa za ljepsi pregeld b

javascript - chrome.runtime.sendMessage error in Chrome version 57.0.2987 -

i've updated google chrome browser version: 56.0.2924 57.0.2987 . i have extension, , can not work in new version. debuged, , find reason chrome.runtime.sendmessage not work. send message in background page : chrome.runtime.sendmessage({"name": event_enum.job_init, "data": job}); and have listener (the same background page): chrome.runtime.onmessage.addlistener( function (request, sender, sendresponse) { if (request.name == event_enum.job_init) { //do } }); my manifiest has surely injected these codes. but after run chrome.runtime.sendmessage nothing happened. searched got no issue that. has same issue me? thank you i don't know why works in 56.0.2924 because behavior changed intentionally long time ago in 49.0.2622.0, see crbug.com/ 479425 commit r369379 : never connect port same frame. connecting same frame not make sense because onmessage should not triggered same frame. the fact worked af

c# - Hot to get content from another page in uwp after a few seconds -

i have page1.xaml <grid background="{themeresource applicationpagebackgroundthemebrush}"> <stackpanel horizontalalignment="left" height="720" verticalalignment="top" width="575"> <textblock foreground="white" textwrapping="wrap" margin="28,20,31,0" fontsize="14" height="145"> <textblock.transitions> <transitioncollection> <entrancethemetransition fromhorizontaloffset="400"/> </transitioncollection> </textblock.transitions> <run text="text 1"/> </textblock> </stackpanel> </grid> and page2.xaml <grid background="{themeresource applicationpagebackgroundthemebrush}"> <textblock foreground="white selectionchanged="textblock_selectionchanged"

embedded - Can ARM qemu system emulator boot from card image without kernel param? -

i've seen lot of examples how run qemu arm board emulator. in every case, besides sd card image param, qemu supplied kernel param, i.e.: qemu-system-arm -m versatilepb \ -kernel vmlinuz-2.6.18-6-versatile \ #kernel param here -initrd initrd.gz \ -hda hda.img -append "root=/dev/ram" i palying bootloaders , want create own bootable sd card, don't have real board yet , want learn emulated one. however, if run described above, qemu skips bootloader stage , runs kernel. so should emulate full boot sequence on qemu executes bootloader? should rom dump , pass -bios param? you can feeding uboot image. never used rom dump. qemu boot sqeuqnce: on real, physical boards boot process involves non-volatile memory (e.g. flash) containing boot-loader , operating system. on power on, core loads , runs boot-loader, in turn loads , runs operating system. qemu has possibility emulate flash memory on many platforms,

Merging mySQL database with PHP while maintaining field -

background: group of students including me creating website merit system our school. had no experience in html, css, php or sql databases @ start. we've managed decently. however, we've run problem updating database. every week, need merge table students csv, updated classes , department of education system. there thousands of students , each of them have details when updated can change others need stay same. example, have number of merits needs stay same when update details such year group or classes can change. thing is, update done of csv file may have new students need updated database , csv not in order. trying find solution allows 1 field same allow others change. so we've tried load data infile unique key problem found while preserved merits, ignored other details , added new students. edit: students have class field contains classes of student. when import, need able change still maintain merit field not in csv file. understand manually import suspect take

javascript - How to represent range in mongoose schema? -

background lets doing schema fruits can buy. in schema, fruit has price range: let fruit = { name: "banana", price: { currency: "eur", range: [2, 10] } }; to achieve saving above object, trying use following schema: let fruitschema = { name: {type: string, required: true}, price: { currency: {type: string, required: true}, range: [{ type: number, min: 0 }], validate: [arraysize] } }; const arraysize = function arraylimit(val) { return val.length === 2; }; problem: my solution range part feels clunky, on complicated , doesn't check if max range value bigger min range value, i.e., doesn't check if 10 > 2. question: how implement price range in schema in mongoose ? my solution i decided have both values in schema separately, in example bellow: income: { currency: { type: string }, range: { min: { type: number,

Unreachable Browser Exception using Appium -

i automating android app using appium. getting exception while using androiddriver(). below code snippet. public class test1 { public static androiddriver driver; public static void main(string[] args) throws exception { file appdir= new file(system.getproperty("user.dir")+"/app/"); system.out.println(appdir); file app=new file(appdir,"android-debug.apk"); desiredcapabilities cap=new desiredcapabilities(); cap.setcapability(mobilecapabilitytype.app,app.getabsolutepath()); cap.setcapability(mobilecapabilitytype.platform,mobileplatform.android); cap.setcapability(mobilecapabilitytype.platform_name,"android"); cap.setcapability(mobilecapabilitytype.device_name,"my phone"); cap.setcapability(mobilecapabilitytype.version,"5.0.2"); cap.setcapability(androidmobilecapabilitytype.app_package,"com.ionicframework.appsix821050" ); cap.setcapability(androidmobileca

php - How to save this type of time format 147:12:55 in postgresql -

i want save column total working hours spent in table , format 147:25:55 in postgresql excel sheet using php it interval type. here: t=# select '147:25:55'::interval,justify_interval('147:25:55'::interval); interval | justify_interval -----------+------------------ 147:25:55 | 6 days 03:25:55 (1 row)

can't use different environment for puppet agent -

i have agent/master setup. have created new environment in /etc/puppetlabs/code/environments/ called master . the content of environment.conf master directory environment is modulepath = site:modules:$basemodulepath manifest = manifests/site.pp and when try puppet agent -t --environment master getting error notice: local environment: 'master' doesn't match server specified node environment 'production', switching agent 'production'. info: retrieving pluginfacts info: retrieving plugin info: loading facts info: caching catalog node1.localpuppet.com info: applying configuration version '1490712072' notice: applied catalog in 0.67 seconds i new puppet. changes need? pe console config this "really fun" quirk of puppet enterprise showed in last couple of years. have specify nodes in pe classifier allowed specify directory environment in puppet.conf or in puppet agent -t --environment arguments. in agent-specified

ios - Pass data between ViewControllers in a non-based storyboard app -

i creating ios app without storyboard, setting window's frame in appdelegate. now, have 2 view controllers viewcontroller , settingscontroller. in settings controller have created text field(mytextfield) want store mytextfield.text in variable. how can do? you can create 1 public property inside appdelegate file, @property(nonatomic,strong) nsstring *passingtext; 1. viewcontroller 2 import appdelegate: @interface viewcontroller2() { appdelegate *appdelegate; } @end - (void)viewdidload { appdelegate = (appdelegate *)[uiapplication sharedapplication].delegate; } once user entered text in mytextfield, using delegate: - (void)textfielddidendediting:(uitextfield *)textfield { appdelegate.passingtext = textfield.text; } on second controller can read value of appdelegate. this solve requirement.

Jquery alter date format based on selector -

my hands tied bit using fullcalendar.js parse ical on site. want create different format altogether limited bit. question is, can use jquery re-format dates specific selector? for example: <tr class="fc-list-heading" data-date="2017-03-28"> <td class="fc-widget-header" colspan="3"> <span class="fc-list-heading-main">tuesday</span> <span class="fc-list-heading-alt">march 28, 2017</span> </td> </tr> could select .fc-list-heading-alt span classes , re-format date 28 march? i've looked on net havent found solution. for(var = 0; < $(".fc-list-heading-alt").length; i++) { var elem =$(".fc-list-heading-alt").get(i); var date = new date($(elem).text()); $(elem).text(date.todatestring()); } <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <t

configuration - add http header to zeppelin server rest api -

i integrate zeppelin on application , rest api's return me following error : xmlhttprequest cannot load http://localhost:8080/api/notebook/2cbb836vw/permissions. request header field x-requested-with not allowed access-control-allow-headers in preflight response. after searching found must include header in server "x-access_token", "access-control-allow-origin", "authorization", "origin", "x-requested-with", "content-type", "content-range", "content-disposition", "content-description" where can found configuration file , add on zeppelin .

php - Link Intuit app to Quickbooks company data rather than snadbox data -

i've been following keith palmer tutorial linking quickbooks php. used sample code (example_app_ipp_v3/index.php) , works great. the problem how can set production keys can use actual company data not sandbox data. in simple words i've got development keys used sandbox data. how shall go on syncing company data. shell start form. many thanks, to go, live, need to: click publish button in intuit control panel, production keys put production keys in code make sure not telling code you're in sandbox mode (search code ->sandbox( click connect quickbooks button connect live company

Ruby Watir Iterate through list and find element -

i have unordered list. ul-list ------------ li-ola ola description ------------ li-james james description ------------ li-jake joe description ------------ all descriptions embedded in div using same id name "description" need verify items in list has description. without knowing how big list is. so far have: bb = @browser.ul(:id => 'ul-list') bb.lis.each |li| fail unless @browser.div(:class => 'description').exists? end fixed previous error test pass when there nothing in list. :/ sample html <ul id=“ul-list”> <li id=“li-ola”> <div class=“return”> <table> <tbody> <tr class=“info_return”> <td class="info_return_label">brand</td> <td class="info_return_value"> ola </td> </tr> <tr class="info_return_row">

php - Laravel development server doesn't work windows -

i installed laravel on computer, works fine through phpstorm, laravel commands in git command prompt, composer , php artisan ones work fine. command php artisan serve it gives me address doesn't work laravel development server started: <http://127.0.0.1:8000> if try access address, says "this site can't reached". way, i'm using chrome why may , how make work? thank in advance. i recommend use laragon developing laravel or php app on windows. it'll set easy use , fast development environment. have been using on year now. here: https://laragon.org/ this app specific windows users. of features include; cmder git node.js npm ssh putty php 7 & 5.6 (easily switchable 1 click) activate/deactivate php extensions on fly xdebug composer apache mariadb/mysql phpmyadmin full lumen , laravel support auto create virtual hosts mail catcher - laragon show small window on bottom right of screen , view content of generated email mail sender

java - Vaadin Grid Custom Renderer not working -

i want build custom renderer of grids columns hide text if user doesn't have right read it. it's still important data accessible if user not able read it. wrote custom renderer looks this: package <package>.util.renderer; import com.vaadin.client.renderers.renderer; import com.vaadin.client.widget.grid.renderercellreference; import <package>.util.customsecurityconstants; import <package>.baseui; public class blockedstringrendererclient implements renderer<string> { private boolean canreadblocked = baseui.getcurrentprincipal().get().getauthorities().contains(customsecurityconstants.read_permission_blocked); @override public void render(renderercellreference renderercellreference, string s) { if (canreadblocked) { renderercellreference.getelement().setinnertext(s); } else { renderercellreference.getelement().setinnertext(""); } } } then wrote server side of renderer, following tutorial https://vaa

fbsdk - FB SDK produces a PHP Fatal error -

first noticed [27-mar-2017 17:47:16 gmt+0] fb sdk integration worked allowing people login our site via facebook account stopped working. server logs show following error php fatal error: cannot use object of type stdclass array in fb-sdk/facebookredirectloginhelper.php on line 191 we have not done relevant code change should have initiated it. have missed upgrade? suggested fix line 191-193: if (isset($response->access_token)) { return new facebooksession($response->access_token); } you can try converting $respons array won't optimized solutions. so, go ahead , try aforementioned solution. or try replacing in src/facebook/facebookredirectloginhelper.php if (isset($response['access_token'])) { return new facebooksession($response['access_token']); with $accesstoken = null; if (is_object($response) && isset($response->access_token)) { $accesstoken = $response->access_token; } elseif (is_array($response)

Swift regex for characters and empty spaces -

i'm trying regex expression allow characters , spaces full name field i.e. mr bob smith what i've tried: let textregex = "[a-za-z+\\s]" let textregex = "[a-za-z ]" let textregex = "[a-za-z+ ]" let textregex = "([a-za-z ])" it doesn't appear working. thanks your regular expression isn't working because misplaced + symbol. this 1 work: ([a-za-z ]+) i don't know how swift handles regex keep in mind if strictly want whitespaces only, better add " " character instead of \s can extended other spaces.

r - Shiny multiple dynamic subsetting -

i trying make app in shiny dynamically subsetting data-set 3 times users input. let's assume dataset number<- c(10, 20, 30 , 40, 50 ,60, 70, 80, 90,100,110,120,130,140) att1 <- c('a','a','a','a','a','a','a','b','b','b','b','b','b','b') att2 <- c('c','c','c','d','d','d','d','e','e','e','g','g','g','g') index<-c('i1','i2','i3','i4', 'i5','i6','i7','i8','i9','i10', 'i11','i12','i13','i14') df <- data.frame(number, att1 , att2,index) what want create dropdown menu gives choices or b att1 choice reacts second drop down choices of att2 displayed subsetted choice att1. depending on choice user last drop down give him choices index choo

Google Play Android: issue while publishing a new build as staged rollout -

i have existing build 100% rollout. but, when rolling out new android build 5% rollout getting following error : fully shadowed apk problem apk not served users because shadowed 1 or more apks higher version codes. resolution remove apk release or review targeting , version codes of apks including in release. any idea how solve issue , have 2 builds, 1 5% rollout , other 95% rollout. screenshot

parameters - Openssl batch command use -

i have been requested fill field 344 characters long crypted string . program uses batch command produce string (cf.enc.b64) , starting string 16 char long (cf.inp) openssl rsautl -encrypt -in cf.inp -out cf.enc -inkey farma-fur.cer -certin -pkcs openssl base64 -base64 -e -in cf.enc -out cf.enc.b64 i string 6 '0x0a' , , length 350 ! there parameter avoid these charachters ? sorry english , in advance marina

jquery - count down timer plugin restarts after page refresh -

im using count down timer plugin restarts after page refresh , cannot values inside timer div because div binds every time time running wanna store in cookie , retrieve after page refresh can refer code this. i using below code call timer plugin $("#hms_timer").countdowntimer({ hours : hrs, minutes : mins, seconds : sec, size : "lg", pausebutton : "pausebtnhms", stopbutton : "stopbtnhms" }); this link got timer plugin looking @ plugin documentation, there no way retrieve current time left. way can current time left parse html output of timer. since countdown timer pretty basic, advise write own countdown timer, , add required cookie mechanism you're talking about.

How to use Snap.svg with Angular v4.0 -

i don't know how use snap.svg angular (created angular-cli). i've tried call snap.svg in index.html cdn, import in component adding : import 'snapsvg' message : uncaught typeerror: cannot read property 'on' of undefined any idea ? edit import : import 'snapsvg' template : <svg id="test" width="100%" height="100%" viewbox="0 0 300 300" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;"> <path d="m84.403,145.423c65.672,64.179 136.318,0 136.318,0" /> </svg> in component : ngoninit() { let s = snap('#test') this.path = s.path(this.start) this.path.animate({ d: this.end }, 1000, mina.bounce) } currently there

css - telerik asp.net mvc grid - how to style selected row on hover -

i tried lot of question , answers here , on telerik forums none worked reason. have grid want style wish , things managed, failed setting selected row hover background-color. any idea? here grid: @(html.kendo().grid < apdashboard.models.orderviewmodel > () .name("grid") .columns(columns => { columns.bound(p => p.freight).title("מספר ספינה"); columns.bound(p => p.orderdate).title("תאריך הזמנה").format("{0:mm/dd/yyyy}"); columns.bound(p => p.shipname).title("שם משלוח"); columns.bound(p => p.shipcity).title("עיר משלוח"); }) .pageable() .sortable() .scrollable() .filterable() .clientdetailtemplateid("template") .htmlattributes(new { style = "height:550px;" }) .datasource(datasource => datasource .ajax() .pagesize(20) .read(read => read.action("orders_read", &

jquery - how can I set only one text from <a attribute list? -

Image
here, trying update input type attribute text only, if obj.idpartneroffice == json.idpartneroffice condition true. how can update project name ? if (json.idpartnerproject == "0") { json.idpartnerproject = math.random(); hidjson.form5.projects.push(json); $("#divbindprojectlist").append('<a href="#" id="anchorproject1" class="list-group-item projectlist" >' + json.projectname + '<input type="hidden" name="hiddenproject1" class="hidprojectid" value="' + json.idpartnerproject + '" /></a>'); } else { $.each(hidjson.form5.projects, function (i, obj) { if (obj.idpartnerproject == json.idpartnerproject) { hidjson.form5.projects[i] = json; $("#anchorproject1").html(json.projectnam

case - How can I assign roles to a user for a specific process during runtime in BPMN (or CMMN)? -

i have solve specific issue company work for. have bpmn experience (obviously) not enough. question this: there way may assign roles specific user specific process instance during runtime in bpmn . the case: suppose have web app user logs in , starts new process concerning insurance claim car. manager of department handles these specific claims needs assign access rights various users of course specific instance. due nature of work going long running process. lets suppose there 3 roles each case: applicant (ap) investigator (in) , decision maker (dm) , manager wishes assign these roles users john mary nick. how can implement process? seems custom solution might fit: implement class uses bpmn engine api in order assign roles users, expose ws, , invoke using service task , dynamically passing parameters. however, avoid custom solution. should consider adaptive case management approach instead? acm tools have kind of functionality?

java - Database connection leak -

recently, had measure time taken of sql requests of our software. that, decided take naive approach , surround queries calls system.nanotime(). while doing found class (sqlsuggest) containing 4 similar queries in 4 similar methods. thought idea refactor , regroup common parts. this created connection leak, connections weren't closed anymore. rolled refactor i'd still understand did wrong. the first version of sqlsuggest class has 4 methods getsuggestlistbyitems, getdisplayvaluebyitems, getsuggestlistbylistid , getdisplayvaluebylisteid. each of these methods opens , closes connection, statement , resultset (in block) through class: dbaccess. the second version of class has same 4 methods except instead of opening , closing connection, call 1 of 2 methods depending on whether need 1 result or list. those 2 methods (executequerygetstring , executequerygetlistofstringarray) each declare connection, statement , resultset, call method: executequery connection open, statem

Sitecore Powershell Workflow State Name -

how retrieve name of workflow state content item, not workflow state id (guid)? get-childitem -path ("master:\content") -recurse ` | select-object -first 10 -property itempath, name, "templatename", "version", @{label="updated";expression={$_.__updated}}, @{label="workflow state"; expression={$_._state}}, ` @{label="published"; expression={$_.__publish}} i have see many examples of how workflow state id, need human-readable name of workflow state particular item. you need workflow state name passing item id retrieved. because workflow in raw values stored id. why id of workflow state returned. using below script, return name of workflow state get-childitem -path ("master:\content") -recurse ` | select-object -first 10 -property itempath, name, "templatename", "version", @{label="updated";expression={$_.__updated}}, @{label="workflow state"; expression={(ge

python - How to get value (not key) data from SelectField in WTForms -

this question has answer here: get selected text form using wtforms selectfield 4 answers i have wtf selectfield, , i'm trying store name of user's choice display on page. given form is choice = selectfield('choice', choices=[('cho_1', 'choice one'), ('cho2', 'choice two')]) i understand self.choice = form.choice.data will me user's choice (say, cho_1), how value ("choice one")? feel it's simple dicts, various attempts plus googling/searching haven't helped far. thanks ashish nitin patil directing me here . i needed transform 'choices' dict, value key form.data, thus: value = dict(form.choice.choices).get(form.choice.data)

nested promise typescript angular 2 -

i have method fallbacktolocaldbfileorlocalstoragedb return promise , calls method getdbfilexhr promise. in code, know have use 'resolve()' or if resolving getdbfilexhr automatically resolve fallbacktolocaldbfileorlocalstoragedb ? as can see commented then().catch() parts, don't know if have leave them or not. thanks help. fallbacktolocaldbfileorlocalstoragedb() { return new promise(function (resolve, reject) { if (this.storageservice.get('prodata') === null) { if (this.connectionstatus.f() !== 'online') { } else { this.senderroremail("bl: online falling local prodb", 10); } console.log('...falling local probd.jsonp.'); return this.getdbfilexhr('prodb.jsonp'); // .then(function () { // console.log('...falling local probd.jsonp succeeded.');

typescript - how to add parameter in parameter decorator? -

i have class this: export class foocontroller{ constructor( @inject(true) private fooservice: fooservice) { } } i want implement parameter decorator passing argument on it. i had tried below approach, doesn't work, giving error "supplied parameter doesn't match signature of call target" public static inject(isfoo: boolean = false) { return (target: any, key: string, index: number) => { } } please me issue

Unity3D Network ReadMessage -

how check error if client trying connect absent server? my code! //server void start () { networkserver.listen(13044); } //client networkclient thisclient = new networkclient (); thisclient.connect ("127.0.0.1", 13044); thisclient.registerhandler(msgtype.error, errortest); thisclient.registerhandler (msgtype.disconnect, dctest); void errortest(networkmessage netmsg){ var errormsg = netmsg.readmessage<errormessage>(); debug.log("error:" + errormsg.errorcode);} void dctest(networkmessage netmsg){ //if run client while server not present, goes here instead of errortest } you using readmessage errormessage, errormessage valid in error messages (onerror). your dctest function triggered on disconnection, not on error. disconnect special msgtype (see https://docs.unity3d.com/scriptreference/networking.msgtype.html ) (if remember) doesn't contain data. so answer question : have result. in netmsg. https://docs.unity3d.com/ma

vue.js - Vue js v-for v-bind not unique -

i'm trying create form have select list (fetched api) , user can add items seperate array list. new array rendered via v-for , uses v-model edit additional data. for example have list of goods/services defined beforehand rendered select option block. user can select 1 of these products , add them invoice. after adding (pushed new array), user must able make additional changes. <select class="form-control" v-model="selectedserviceid"> <option v-for="service in services" :value="service._id">{{service.name}}</option> </select> <button type="button" class="btn btn-primary" v-on:click="addservice">add</button> add service method: addservice() { (var = 0; < this.services.length; i++) { if (this.services[i]._id == this.selectedserviceid) { this.services_goods.push(this.services[i]) break; } } } and want render list i've

java - CamcorderProfile.get(int) returns null for any value -

in app i'm using mediarrcorder recording videos, works fine, problem appears huawei devices, camcorderprofile.get(int) returns null, tried many number getting camcorderprofile, nothing worked. here mediarecorder init params mediarecorder.setpreviewdisplay(surfaceholder.getsurface()); mediarecorder.setcamera(camera); mediarecorder.setorientationhint(270); mediarecorder.setaudiosource(mediarecorder.audiosource.camcorder); mediarecorder.setvideosource(mediarecorder.videosource.camera); mediarecorder.setprofile(camcorderprofile.get(videoquality)); here mediarecorder.setprofile() throws null pointer exception. had same problem? os version 4.2.2

aframe - A-frame - glTF - Asset not found -

i'm trying import gltf-model scene, correct paths , references console claims "core:propertytypes:warn "#model" asset not found. +0ms". tried gltf-model exported blender me downloaded working model. not having problem .obj-files in scene. suggestions try change? <a-assets> <a-asset-item id="monster" src="/monster.gltf"></a-asset-item> <a-asset-item id="separaterunner" src="/separaterunner.gltf"></a-asset-item> <item id="plane" src="/plane.glb"></item> </a-assets> <a-entity id="separaterunner" gltf-model="gltf: #separaterunner"></a-entity> <a-entity id="plane" gltf-model="gltf: #plane"></a-entity> <a-entity id="monster" gltf-model="#monster"></a-entity> if use same code structure .gltf-files .obj-files no longer error "asset not found" instead

python - Handling percentage sign in url -

i've got app processes requests. read variable holds pattern querying using % wildcard. if url contains patt=m% i'm fetching names starting m . worked fine till tried use %d0 search pattern. following error: the given query string not processed. query strings resource must encoded 'utf8'. as i've found out using https://www.w3schools.com/tags/ref_urlencode.asp , %d0 string being treated code non-unicode character. now question is: how handle such patterns %d0 ? in other words: how treat 3 characters without encoding? one workaround i've found far use %25 instead of % , using patt=%25d - i'd need handle requests. edit: here's example. let's take basic cherrpy example tutorial . i've modified handle params , return value of myvar : import cherrypy class helloworld(object): @cherrypy.expose def index(self, **params): #return "hello world!" return cherrypy.request.params['myvar'] if

How to prevent webpack/sass-loader from converting font URLs to data URIs? -

given following webpack v1 loader configuration ... { test: /\.scss$/, loader: extracttextplugin.extract('style-loader', 'css-loader!autoprefixer-loader!sass-loader'), }, ... , importing bootstrap sass in main .scss file ... @import "~bootstrap-sass/assets/stylesheets/bootstrap"; ... reason, bit bootstrap sass ... url(if($bootstrap-sass-asset-helper, twbs-font-path('#{$icon-font-path}#{$icon-font-name}.woff2'), '#{$icon-font-path}#{$icon-font-name}.woff2')) format('woff2') ... gets converted to ... url(data:application/font-woff2;base64,bw9kdwxllmv4cg9ydhmgpsbfx3dlynbhy2tfchvibgljx3bhdghfxyaricjmngy4zta2ndg0zjy2odqzywy0mzdhytc0n2q5nwywny53b2zmmii7) format("woff2") ... decodes to: module.exports = __webpack_public_path__ + "f4f8e06484f66843af437aa747d95f07.woff2"; when expect/need is: url("f4f8e06484f66843af437aa747d95f07.woff2") format("woff2")

application shutdown - How to log messages for signaltype in Tylerb Graceful in go? -

i have been looking go programming couple of days now. have been looking way of gracefully shutting down go app. app serves http request , should complete outstanding requests before exiting. using tylerb graceful. https://github.com/tylerb/graceful my question is: how can log message captures type of signal? eg. interrupted, terminated or sigkill, sigterm, sigint so far thing have been able implement simple message telling exited gracefully, if sigkill it, there no message being logged: mux := // ... srv := &graceful.server{ timeout: 10 * time.second, server: &http.server{ addr: ":1234", handler: mux, }, } srv.listenandserve() log.println("server stopped gracefully")

ios - Playgrounds broken in Xcode 8.3 -

since started working xcode 8.2 (and 8.3 lately), playgrounds broken me. when opening playground see message "failed launch process. error returned in reply: connection interrupted" complete re-installation of xcode or removing / re-creating /private/tmp folder (as suggested other posts) did not help. did encounter similar problem? there other known work-arounds? ( http://www.openradar.me/31296836 ) here sample output coresimulator.log mar 28 16:19:30 sergey-macbook com.apple.dt.xcode[6955] <error>: error domain=nsposixerrordomain code=53 "software caused connection abort" userinfo={nslocalizeddescription=error returned in reply: connection interrupted} mar 28 16:19:30 sergey-macbook com.apple.dt.xcode[6955] <error>: error looking host support port: error domain=nsposixerrordomain code=53 "software caused connection abort" userinfo={nslocalizeddescription=error returned in reply: connection interrupted} mar 28 16:19:30 sergey-macb

android - How add custom icons from my pc to my ReactNative app (NativeBase TabBar Icon) -

* imported nativebase components *i using "tabbar" contains item *the platform android i designed many icons app, , used several tag need add custom icon in tag can't. way try used it. also... way call local icon: const iconmore = require('../../../static/img/tabbarandroid/more.png'); render() { return ( <tabs> <tab heading={ <tabheading> <icon name={iconhome} /> </tabheading>} > <newslist /> </tab> <tab heading={ <tabheading> <icon android={iconinterest} /> </tabheading>} > <favoritelistcomponent /> </tab> <tab heading={ <tabheading> <icon android={iconsearchchurches} /> </tabheading>} > <mapchurchcomp

python - Having Trouble With Assignments -

using python 3.4, lines include eg. num = num + 1 fail process correctly, returns error goes along lines of "article referenced before assignment". what error? first, try initialize variable follows: num = 0 ... num = num + 1

html - What i did wrong in this css? -

Image
in below image please take @ request form (inside green background) , it's aligned on top, instead need align in centered vertically css style used , .rtitle { background-color: green; width: 300px; height: 50px; border-radius: 25px; font-size: 30px; padding-right: 10px; padding-left: 10px; text-align: center; font-weight: bold; } i need centered div style using css please help. when use styling on button in center. other styling have this. or in html. .rtitle { background-color: green; width: 300px; height: 50px; border-radius: 25px; font-size: 30px; padding-right: 10px; padding-left: 10px; text-align: center; font-weight: bold; } <button class="rtitle">hello</button>

java - Finding mean and median in constant time -

this common interview question. have stream of numbers coming in (let's more million). numbers between [0-999]). implement class supports 3 methods in o(1) * insert(int i); * getmean(); * getmedian(); this code. public class findaverage { private int[] store; private long size; private long total; private int highestindex; private int lowestindex; public findaverage() { store = new int[1000]; size = 0; total = 0; highestindex = integer.min_value; lowestindex = integer.max_value; } public void insert(int item) throws outofrangeexception { if(item < 0 || item > 999){ throw new outofrangeexception(); } store[item] ++; size ++; total += item; highestindex = integer.max(highestindex, item); lowestindex = integer.min(lowestindex, item); } public float getmean(){ return (float)total/size; } public float getmedian(){ } } i can't seem think of way median in o(1) time. appr

java - Why am I suddenly getting an NPE on counters in Flying Saucer? -

i have html template have been using flying saucer pdf since last november. rebuilt project , same html , same code throwing npe. narrowed down page counters. when remove them works. here sample of html demonstrates issue. <?xml version="1.0" encoding="utf-8" ?> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <style type="text/css"> @page { @top-right { content: element(header); } } #pagenumber:before { content: counter(page); } #pagecount:before { content: counter(pages); } </style> </head> <body> <header id="header" class="clearfix"> <div class="page-header"> <span class="label">order status</span><br/> page <div id="pagenumber">&