Posts

Showing posts from March, 2011

javascript - Show a tasks list by clicking on project name -

i have 2 models project , task. each project has many tasks. there list of projects on project index page. and want, when user clicks on project name, list of project's tasks shown aside projects list i try that. application.js $(document).ready(function(){ $('#projects').on('click', 'h2', function(){ $('#tasks').append("<%= escape_javascript render(:file => 'tasks/index.html.erb') %>"); }); }); is correct change application.js file extansion js.erb? update result of work _project.html.erb <%= link_to " #{project.title} tasks list", project_tasks_path(project), :remote => true %> task_controller.rb def index @project = project.find(params[:project_id]) @tasks = @project.tasks respond_with @tasks end index.js.erb $('#project-tasks').html("<%= j render :file => 'projects/tasks/_tasks', :locals => { :tasks => @tasks } %>"

javascript - Can't get stellar.js working -

so i've been trying create somekind of 1 page layout website parallax scrolling , smooth animation navigation. so far, smooth animation working fine problem comes in when creating parallax scrolling background images. absolutely nothing happens when scrolling. here's script info html: <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script> <script src="js/jquery.stellar.min.js"></script> <script>$.stellar();</script> <script> $(document).ready(function() { $('a[href*=#]').each(function() { if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname && this.hash.replace(/#/,'') ) { var $targetid = $(this.hash), $targetanchor = $('[name=' + this.hash.slice(1) +']'); var $target = $targetid.length ? $targetid : $targetanchor.length ? $targetanchor : false;

How to avoid re-authorization request for a copied Google Spreadsheet + script -

i have spreadsheet functions template weekly reports. @ point copy undated template sheet using driveapp file has date in name. user shown date-specific spreadsheet , can interact it. when done user instigates function copies of portion of spreadsheet data third file. every time user calls function authorization request shown. trying avoid authorization request. possible? i using stand-alone google apps script copy original template date-specific file. have considered trying perform of ui there. there many contingencies make practical. stands once template copied stand-alone script returns url of date-specific file , ends. every time user calls function authorization request shown. trying avoid authorization request. possible? publishing script add-on facilitate this; each user need authorize add-on once, , authorization remain in effect in sheet add-on used in.

android - passing data from BroadcastReceiver to Service -

my goal create method gets data broadcast receiver. i have service register broadcastreceiver monitor battery plug , unplug. how can data broadcastreceiver ? want receive data in service class: service: public class myservice extends service { @override public int onstartcommand(intent intent, int flags, int startid) { registerreceivers(); return start_not_sticky; } @nullable @override public ibinder onbind(intent intent) { return null; } private synchronized void registerreceivers() { intentfilter chargefilter = new intentfilter( intent.action_power_connected ); chargefilter.addaction(intent.action_power_disconnected); registerreceiver(echarge, chargefilter); } } and receiver: public class eventcharge extends broadcastreceiver { private static string tag = "event charge"; @override public void onreceive(context context, intent intent) { string acti

Is it possible to use PJSIP only for SIP signaling and handle media separately? -

can guide me api can tell pjsip use own local ports (udp) used media? @ time of sdp negotiation, read can know active local sdp calling pjmedia_sdp_neg_get_active_local(), , active remote sdp calling pjmedia_sdp_neg_get_active_remote(). but outgoing call, need create custom sdp modifying local ports. thus, there way tell pjsip not open ports media, , use custom ports created application? you can it, should use pjsip core library , remove other libraries pjsip such pjmedia,codec,nath etc. need samething i.e pjsip sip messaging difficult( exp) still im not able separate correctly.

amazon web services - IOPS limits on EC2 with EBS mounting -

Image
i had posted question on iops limit in ec2 instance not use ebs. question deals ec2 instance elastic block storage. environment goes - two c4.8xlarge ec2 instances, 1 c4.8xlarge instance supports 500 mb/s throughput connection pool 2049 got rid of dns cache ebs storage of 120 gb each instance application load tested jmeter 2.13 1 hour on distributed mode using 10 m4.4xlarge instance test executed 700 threads ramp period of 30 mins , continues 700 threads 30 mins. there 2 apis being load tested 1 has write operation (post request) , other had read operation (get request) test reaches throughput of 7800 requests/sec read operation , 300 requests/sec write operation 400 threads , stays @ ~7800 requests/sec irrespective of threads increasing 700 threads. following graphs of read , write throughput during tests ebs - and how average read , write size appear during test - considering graphs above safely assume not hit iops limit? 7800 requests per second.

php - javascript code execute on button click but not on enter key presses -

i searching location onclick on button. result getting on onclick button. same code have put in submit function here searching not working. on button click code.(this working) $("#gobuttton").click(function() { $("#gmaplatlon").validate({ rules:{"latitude":{number:true}, "longitude":{number:true}, "zoom":{digits:true,min:0}}, errorplacement:errormessages }); $("#address").change(function(){ geocoder.geocode({"address": $(this).attr("value")}, function(results, status) { if (status == google.maps.geocoderstatus.ok) { map.setzoom(16); map.setcenter(results[0].geometry.location); } else { alert("geocode not successful following reason: " + status); } }); }); }); press enter button code(same not working) $('#frm').keypress(function(e) { var code = e.keycode; if(code === 13){ e.preventd

c++11 - C++ nested method try catch (practices) -

i'm new c++ (coming c) , writing class b member of class a . the member b throw exception if parent tries access data not exist b 's container (i throw invalid_argument exception). member b has object can thought of stl container, example. my question is: if catch original invalid_parameter exception in a , considered c++ practice re-throw same exception (i'd re-throw original error, logging in it, what() different), or can throw std::exception . code has many try { a.calls_b_exception } catch (std::invalid_argument& ie) {...} catch (std::exception& e) {...} blocks , wondering if reduce them try { a.calls_b_exception } catch (std::exception& e) {...} and still following c++ paradigms. example code similar situation: class b { std::vector<int> stuff; int get_value(int index) { if (index >= stuff.size()) { stringstream err; err << "--> invalid index " << index <

java - Xml validation with xsl -

i have been trying validate xml through xslt couple of hours. have following xsl form xml validation. every time try validate xml, following warnings below , empty currencyid attributes in xml ignored , xml validate although not. has idea why ignored , validated ? <xsl:variable name="currencycodelist" select="',aed,afn,all,amd,ang,aoa,ars,aud,awg,azn,bam,bbd,bdt,bgn,bhd,bif,bmd,bnd,bob,bov,brl,bsd,btn,bwp,byr,bzd,cad,cdf,che,chf,chw,clf,clp,cny,cop,cou,crc,cuc,cup,cve,czk,djf,dkk,dop,dzd,eek,egp,ern,etb,eur,fjd,fkp,gbp,gel,ghs,gip,gmd,gnf,gtq,gwp,gyd,hkd,hnl,hrk,htg,huf,idr,ils,inr,iqd,irr,isk,jmd,jod,jpy,kes,kgs,khr,kmf,kpw,krw,kwd,kyd,kzt,lak,lbp,lkr,lrd,lsl,ltl,lvl,lyd,mad,mad,mdl,mga,mkd,mmk,mnt,mop,mro,mur,mvr,mwk,mxn,mxv,myr,mzn,nad,ngn,nio,nok,npr,nzd,omr,pab,pen,pgk,php,pkr,pln,pyg,qar,ron,rsd,rub,rwf,sar,sbd,scr,sdg,sek,sgd,shp,sll,sos,srd,std,svc,syp,szl,thb,tjs,tmt,tnd,top,try,ttd,twd,tzs,uah,ugx,usd,usn,uss,uyi,uyu,uzs,vef,vnd,vuv,

sql - mysql sum union results -

see below sample. if id, a, b, d same other records, union , sum column "c" . my data: id b c d --------------------------- 1 1 2 3 4 2 aa bb 10 dd 3 1 2 3 4 4 1 2 3 4 2 aa bb 30 dd how after below result: id b c d --------------------------- 1 1 2 3 4 2 aa bb 40 dd <----if id,a,b,d same other records,then union , sum column "c" 3 1 2 3 4 4 1 2 3 4 tried union records,but fail , show" id b c d --------------------------- 2 aa bb 49 dd just use group id, a, b, d sum(c) this: select id, a, b, sum(c) c, d tablename group id, a, b, d; sql fiddle demo

.htaccess - htaccess : %{HTTP_HOST} not interpreted in redirect destination -

i'm trying setup redirections in htaccess file using tag %{http_host} in destination url not work. example : redirectpermanent /test http://%{http_host}/fr/news/test? i want use %{http_host} tag because want htaccess file work on local machine , on production server, without needing update htaccess. in firefox, when enter http://www.example.com/test , address in address bar converted http://% {http_host}/fr/news/test, if tag not interpreted ! page remains white. in chrome, nothing happens, neither in address bar nor in page. isn't possible use %{http_host} tag in destination of redirect ? thanks help. %{http_host} variable part of mod_rewrite, can not use in mod_alias, try : rewriteengine on rewriterule ^test/?$ http://%{http_host}/fr/news/test? [l,r]

elasticsearch - Implementing search : Identifying known keywords -

i have implemented search functionality e-commerce website using elastic search. basic structure like, each product has title , whatever user enters search exact string using elastic , return result. now notice of search phrases (almost 90%) follow similar pattern. contains: brand name of product (apple, nokia etc.) category of product (phone, mobile phone, smartphone etc.) model name of product (iphone 6s, lumia 950 etc.) now think if able identify specific components, can return better results text match. i have list of brands, categories , models. if able identify terms present, can request elasticsearch field example, search string of "apple iphone 5s", should able deduce brand=apple. edit : more details asked in comments structure of document: i have single index , each document id sku of product , contains following fields title (apple iphone 5s) brand (apple) categ (electronics) sub_categ (smartphones) model (iphone 5s) attribs (dictionary

choicefield - Request Clarification of Django Model Choice Code from Docs -

in official docs, https://docs.djangoproject.com/en/1.8/ref/models/fields/#choices given example: class student(models.model): freshman = 'fr' sophomore = 'so' junior = 'jr' senior = 'sr' year_in_school_choices = ( (freshman, 'freshman'), (sophomore, 'sophomore'), (junior, 'junior'), (senior, 'senior'), ) year_in_school = models.charfield(max_length=2, choices=year_in_school_choices, default=freshman) what purpose of setting variables strings before, , in addition to, actual tuples of year_in_school_choices ? strings used? these variables same ones used in tuple? if so, why? seems additional , unnecessary step. it not in example before one, use different year_in_school_choices . clarifying. update since sitting here wrestling code speak, quick responses. add understanding

node.js - Resource Optimization: which one to use Knapsack, brute-force or any other approach? -

in resource allocation problem have n bucket sizes , m resources. resources should allocated buckets in such way there max utilization. need write algorithm in node js here's problem: let's have 2 buckets of sizes 50 , 60 respectively. resource sizes 20, 25, 40. following more proper representation possible solutions: solution 1 : | bucket size | resource(s) allocated | utilization | |             50             |                       20, 25                   |    45/50 = 0.9    | |             60             |                          40                      |  40/60 = 0.667  | total utilization in case >1.5 solution 2 : | bucket size | resource(s) allocated | utilization | |             50             |                          25                      |    25/50 = 0.5    | |             60             |                       20, 40                   |    60/60 = 1.0    | total utilization in case 1.5 inference: -- knapsack approach return s

angularjs - html select option have issue using angular.js -

i have problem > http://jsfiddle.net/wwno55hj/109/ want stay 2 string: true , false. if $scope.readonly = true; in html selected must true , if $scope.readonly = false; in html selected must false. ngselected used in <option> not <select> . https://docs.angularjs.org/api/ng/directive/ngselected see this: http://jsfiddle.net/wwno55hj/112/

java - Selenium wont click the first checkbox on the page -

i testing webpage need select couple of checkboxes , click submit. my problem ever checkbox ask selenium click on first ignored. no matter order put them in, first 1 comes in code won't clicked, conversely test won't fail, know selenium has @ least located it, , thinks it's clicked on it. here's html of check boxes: <ul class="input"> <li class="expandable"> <span class="expand-link collapsed" title="click collapse"></span> <input type="checkbox" id="g1:1" name="g1" value="1"> <label for="g1:1">some text</label> <ul class=""> <ul class="input"> <li class="expandable"> <span class="expand-link collapsed" title="click collapse"></span> <input type="checkbox" id="g2:1" name="g2" value="1"> <label for="

asp.net - using simple injector in mvc6 with cookie auth -

i have mvc6 project using simple injector , cookie middleware authentication without asp.net identity (tutorials below) http://simpleinjector.readthedocs.org/en/latest/aspnetintegration.html http://docs.asp.net/en/latest/security/authentication/cookie.html i have custom signinmanager / usermanager wraps principalcontext validate windows credentials (sidenote: not using azure ad aspnet 5 because [in future] know there mix of windows , non windows usernames. plus not permissions in enough time). initial issue injecting ihttpcontextaccessor signinmanager , cookieauthenticationoptions both classes. kept receiving error below: no authentication handler configured handle scheme: thiscompany.identity to solve issue had ihttpcontextaccessor asp.net services , register simple injector. worked, seemed wrong , maybe there way it. so, wrong? if so, hoping others have tried , can chime in solution if exists. below abbreviated versions of classes: public class startup

swift - iOS only advertises one service as peripheral BTLE -

ios advertising 1 service despite me specifying 2 service uuid's , services, don't errors, , add service error function called twice, both times without error, code for uuids in advertisinguuids { self.mainservicesarray.append(cbmutableservice(type: uuids, primary: true)) } services in mainservicesarray { self.peripheralmanager.addservice(services) } self.peripheralmanager.startadvertising([cbadvertisementdataserviceuuidskey: [mainservicesarray[0].uuid,mainservicesarray[1].uuid]]) the rest of code runs fine, in example i've put there advertise first of 2 services, order doesn't matter first 1 advertised second not, uuid's valid services won't advertise them both, i'm sure simple i'm stuck. thanks the reason second uuid doesn't fit in advertising packet. the second service still not shown when scan connected device though, thats problem.

emacs - Copying sections in hexl-mode -

when using hexl-mode in emacs view binary file, there way of copying , pasting section file? i have tried standard c-spc , select region, m-w but pasting new file treats whole thing normal text, i.e. text file looks lots of these: 000159a0: 6e00 1295 00e0 3400 0a51 0942 0701 1295 n.....4..q.b.... i.e. making literal copy of text, not copying binary data representing what want copy section, paste new file such binary representation of section in other words want able generate new binary files parts of original binary file using hexl-mode viewing original binary file hope makes sense.. that sounds cool feature, unforuntately hexl-mode doesn't that. next best thing can clip file head , tail , example yank file.txt 000002a0 00000340, you'd run head file.txt -c $((0x00000340)) | tail -c +$((0x000002a0)) | xclip -sel c

Setup port mirorring on Sonos speakers -

i'd capture traffic sent sonos speaker (to troubleshoot streaming issues). i've found 1 way it's bit cumbersome: plug sonos speaker via ethernet usb adapter pc, share pc connection , capture on interface. it's limited 1 speaker , if speaker has ever been configured use wifi, seems uses wifi plugged way (and don't capture anything). what's detailed setup use port mirorring this? i'd compare 2 solutions , don't know port mirorring setup. thanks! i recommend getting network hub plug sonos , computer , capture that.

nginx: Install vimbadmin in to subfolder -

i tried install vimbadmin in subfolder, can't. no matter configuration use, vimbadmin never work. last configuration # vimbadmin location /vimbadmin { alias /usr/share/vimbadmin/public; index index.php index.html index.htm; location ~ ^/vimbadmin/(.*\.(js|css|gif|jpg|png|ico))$ { alias /usr/share/vimbadmin/public/$1; } } but nginx return me error: 403 - *14 fastcgi sent in stderr: "primary script unknown" while reading response header upstream, client: 90.154.205.85, server: mail.devx.biz, request: "get /vimbadmin/ http/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "mail.example.com" i not imagine how hard is. here original nginx confiration whick work on domain/subdomain. can me advices, or example configuration that? finally, last , worked nginx configuration location ^~ /vimbadmin { alias /usr/share/vimbadmin/public; try_files $uri $uri/ @vimbadmin; loc

python - django formset update existing -

i want create similar django admin changelist view list_editable items... i succeeded in creating view. when post dies on validation errors. if request.post: formset_class = modelformset_factory(job) formset =formset_class(request.post, request.files) if formset.is_valid(): formset.save() the problem have couple of attributes editable. therefore of them not part of post , model complains them being mandatory. but want update objects not create them. want same thing admin when having set list_editable in own view i wanted functionality admin using list_editable, went , pretty copied code options.py of django source. retrieved admin object , saved original values (function fix_old_job_admin sets them back) this code solved problem job_admin = admin.site._registry[job] # save old values can go them later old_list_display = job_admin.list_display old_list_filter = job_admin.list_filter old_ordering = job_admin.model._meta.orde

ios - Updating geometry in SpriteKit (or SceneKit) -

we porting game spritekit , i've run in bit of problem. objects in our game have triangle-strip trails attached them. vertex buffers of trails continuously updated objects move in world create seamless , flowing effect (there constraints on how many vertices in buffer , how emit new vertices). in previous implementation updated affected vertices in corresponding buffer whenever emitted new vertices. in scenekit seems unable update geometry sources, unless use geometrysourcewithbuffer:vertexformat:semantic:vertexcount:dataoffset:datastride: . however, seems need metal device, command queue , encoder, able submit commands update buffer before renders. is there way can normal scnview , or have manually cametallayer , creating own metal device etc? in essence, everything need, bar trail geometry available in spritekit, hoping there way hold of metal device , command queue used skview , use upload geometry. make things a lot simpler. i've used particle system si

python - Extraction of 2 or more digit number into a list from string like 12+13 -

i'm trying extract numbers string "12+13" . when extract numbers list becomes [1,2,1,3] actually want list take numbers [12,13] , 12,13 should integers also. i have tried level best solve this,the following code but still has disadvantage . i forced put space @ end of string...for it's correct functioning. my code def extract(string1): l=len(string1) pos=0 num=[] continuity=0 in range(l): if string[i].isdigit()==true: continuity+=1 else: num=num+ [int(string[pos:continuity])] continuity+=1 pos=continuity return num string="1+134-15 "#added spaces @ end of string num1=[] num1=extract(string) print num1 the other answer great (as of now), want provide detailed explanation. what trying split string on "+" symbol. in python, can done str.split("+") . when translates code, turns out this. ourstr = "12+13"

android - How to set time to MaterialDateTimePicker with Espresso -

im trying create simple ui test using espresso set date newly created item. project using https://github.com/wdullaer/materialdatetimepicker , shows dialog fragment complex ui , nothing hold on to. i create custom viewaction set date or time similar pickeractions espresso. any suggestions how it? in end i've created viewaction able set time too, messy, have know classname of view in dialog, have match matcher. /** * returns {@link viewaction} sets date on {@link datepicker}. */ public static viewaction setdate(final int year, final int monthofyear, final int dayofmonth) { return new viewaction() { @override public void perform(uicontroller uicontroller, view view) { final daypickerview daypickerview = (daypickerview) view; try { field f = null; //nosuchfieldexception f = daypickerview.class.getdeclaredfield("mcontroller");

asp.net - Make ajax call to update Video Hits when showing Video -

i working on asp.net web page showing you-tube videos using fancy-box. so far working fine, need make ajax call asp.net file updatehits.aspx?videoid=xyzxvtmiw can update hits/views video in database (when clicks thumbnail). not quite sure how make call when user click on image thumbnail of video on video.aspx page. below part of script <script type="text/javascript"> //code reinitialize fancybox script when using update panel start var prm = sys.webforms.pagerequestmanager.getinstance(); prm.add_initializerequest(initializerequest); prm.add_endrequest(endrequest); function initializerequest(sender, args) { } function endrequest(sender, args) { initmyfancybox(); } $(document).ready(function () { initmyfancybox(); }); function initmyfancybox() { $(document).ready(function () { $(".youtube").click(function () { // first, value alt attribute var newtitle =

html - Jquery animation img hover and click -

i need combine 2 animations. have checked if can find answer on site , i'm still looking answer. why i'm posting. here jquery code $('.bloc-search').on('click mouseover', function () { $(this).find('.search').attr('src', function(i, val) { return val.replace('-blue.png','-blanc.png'); }); }); it works perfectly. why ? because want "clic out" function. in fact, when user clic on image 1 changing when i'm clicking again want comes original one. like search button on website : http://www.sony.fr/ sorry english i'm not bilingual ;-) thank help

javascript - How to use double quotes inside double quotes -

consider following: var child = require('child_process'); var res = child.execsync("df -l | awk '{t += $2} end {printf "%d g\n", t / 2^20 + 0.5}'"); i'm getting syntax error (the " in printf @ fault here). i tried escape using \" , no avail. using: "df -l | awk '{t += $2} end {printf \"%d g\n\", t / 2^20 + 0.5}'" . i get: awk: cmd. line:1: {t += $2} end {printf "%d g awk: cmd. line:1: ^ unterminated string what syntactically correct way proceed here? var res = child.execsync("df -l | awk \'{t += $2} end {printf \"%d g\\n\", t / 2^20 + 0.5}\'"); works, tested. the problem \n . should \\n . can debug shell task this: console.log(shell_command) , mannually run output string. for example, this: var child = require('child_process'); var cmd = "df -l | awk '{t += $2} end {printf \"%d g\n\", t / 2

php - morris.js charts- Javascript var as label -

i'm using morris.js charts statistics page written in php , want make multiple labels. my data array looks like: { y: '2015-12-24', z0: 'page' , a0: 275, z1: 'fb' , a1: 75, z2: 'gimper' , a2: 45, z3: 'kolegaignacy' , a3: 30, z4: 'ponki' , a4: 25}, { y: '2015-12-25', z0: 'page' , a0: 440, z1: 'rojo' , a1: 332, z2: 'fb' , a2: 145, z3: 'mamiko' , a3: 134, z4: 'gimper' , a4: 44}, { y: '2015-12-26', z0: 'izak' , a0: 450, z1: 'page' , a1: 425, z2: 'nitro' , a2: 330, z3: 'fb' , a3: 152, z4: 'rojo' , a4: 45}, { y: '2015-12-27', z0: 'izak' , a0: 462, z1: 'page' , a1: 435, z2: 'nitro' , a2: 219, z3: 'fb' , a3: 182, z4: 'mandzio' , a4: 145}, { y: '2015-12-28', z0: 'page' , a0: 504, z1: 'fb' , a1: 162, z2: 'nitro' , a2: 77, z3: 'mandzio' , a3: 66, z4: '

dnsjava - Storing key-value pairs in DNS request -

what recommended place storing key-value pairs in dns request? i'm designing system dns requests traverse multiple hops. hops may need append key-value pairs traversing dns request. i thought adding txt record questions section looks no data can set on txt record when present in questions section (i used dnsjava library generate dns request). thought using opt record. what best practice? thanks, mickael there no recommended place store random information in dns query packet. can perhaps try stick in unused parts of opt rr (or add random rdata it) , hope nobody on way drop or corrupt it, there absolutely no guarantees whatsoever work. unless, of course, control software involved, in case you're free redefine dns wire format see fit (just don't expect interoperate internet). also question smells lot "a-b-question". you're trying achieve?

swagger - API design pattern for specifying different response models -

i'm trying rough out api returning article content. seems valuable able specify whether want entire article, summary, or possibly other variation on content. my instinct add query parameter request datamodel (feel free suggest better names). instance, default may entire article, summary may id, title, & description, , list might return id, title, author, & lastmodifieddate. /v0/articles/{id} /v0/articles/{id}?datamodel=summary /v0/articles/{id}?datamodel=list however using swagger documentation , swagger doesn't appear support returning different objects based on query parameters ( see this ). i'm wondering if there other established patterns equally acceptable? the right solution swagger create return type contains common properties across data models. can model discriminator , use allof constructs creating proper response type. if take @ sample definition here: https://swaggerhub.com/api/swagger-tutorials/modeling-samples/1.0.0

angularjs - Image not refreshed after taking a photo from a camera -

i using simple code ionic 2 : <button (click)="takepicture()" >take pic!</button> <img [src]="url || '//:0'"> then typescript page : import {page} "ionic-framework/ionic"; @page({ templateurl: 'build/pages/smartscan/smartscan.html' } ) export class smartscan { public url:string; constructor() { console.log("starting smartscan page ..."); } public takepicture() { console.log("going take pic ..."); navigator.camera.getpicture( (imageuri) => { this.url = imageuri; console.log("uri of picture taken : "+this.url); console.log(json.stringify(this)); //var image = document.getelementbyid('myimage'); //image.src = imageuri; }, function (err) { console.log(json.stringify(err)); }, {}); /* this.url = "http://maison-cresci.fr/uploads/images/nice_cresci_slide_environnement_003.jpg"; */ } }

crash - Where is the Error in my C++ code? -

here error screenshot: http://prntscr.com/9n6ybt here code: #include <iostream> using namespace std; int main() { int a, b; cin>>a>>b; for(int i=a;i<=b;i++) { if (b%i==0) { cout << << " "; } } return 0; } you not handling case might 0 (division 0) b % indetermined. can solve going way: if (i==0) continue;

bluetooth - can we implement SPP profile on android device? -

how can achieve or implement spp profile android bluetooth? it's entry level question please give me entry point start with? spp profile can reliably use on android. use bluetoothsocket , away go.

javascript - Polymer paper-header-panel not showing any content in paper-drawer-panel -

when run code can see standard test paper-header-panel. within paper-drawer-panel seems hidden. if set initial paper-header-panel(class=blue) 1000px, rest of content show. is there need set initial paper-header-panel change it's height automatically based on content? thanks <link rel="import" href="/apps/polymer-chat/js/bower_components/polymer/polymer.html"> <link rel="import" href="/apps/polymer-chat/js/bower_components/paper-header-panel/paper-header-panel.html"> <link rel="import" href="/apps/polymer-chat/js/bower_components/iron-flex-layout/iron-flex-layout.html"> <link rel="import" href="/apps/polymer-chat/js/bower_components/paper-menu/paper-menu.html"> <link rel="import" href="/apps/polymer-chat/js/bower_components/paper-item/paper-item.html"> <link rel="import" href="/apps/polymer-chat/js/bower_components/p