Posts

Showing posts from June, 2012

css - What's the proper HTML use for a signature line? -

while making form in html converted pdf, realized there no solid line designed signatures. and far recall, don't know of html tag supports it. closest hr cannot moved @ bottom via css. other alternative using td bottom-border solid 1px black doesn't convey semantics of whatsoever. if use underscores, see tiny space gaps between underscores. any suggestions? why not use input? way, correct semantics. example, screen readers understand user expected submit information. .signature { border: 0; border-bottom: 1px solid #000; } <input type="text" class="signature" />

bash - How to remove files using grep and rm? -

grep -n magenta *| rm * grep: a.txt : no such file or directory grep: b : no such file or directory above command removes files present in directory except ., .. . should remove files contains word "magenta" also, tried grep magenta * -exec rm '{}' \; no luck. idea? use xargs : grep -l --null magenta ./* | xargs -0 rm the purpose of xargs take input on stdin , place on command line of argument. what options do: the -l option tells grep produce filenames without matching text. the --null option tells grep separate filenames nul characters. allows manor of filename handled safely. the -0 option xargs treat input nul-separated.

python - Tkinter: right align Labels within stretched LabelFrames using grid -

using grid in tkinter , i'm trying align set of frames (i love post picture, i'm not allowed.) i've 2 outer labelframes of different sizes , on top of each other i'd stretch , align. within bottom frame, i've stack of several other labelframes , within each of labelframes there label . labelframes extend as outer container , each of inner labels right align respect containing labelframe . i've tried, without success, various combinations of sticky , anchor , justify . any suggestion, recommendation? #!/usr/bin/env python import tkinter tk class aligntest(tk.frame): def __init__(self, parent): tk.frame.__init__(self, parent) self.parent = parent self.grid() self.parent.title('align test') self.createmenus() self.createwidgets() def createmenus(self): # menu self.menubar = tk.menu(self.parent) self.parent.config(menu=self.menubar) # menu->fil

load image on canvas when navigate.. which is on other canvas in other page with c# and xaml in windows app -

i have used following code pick image on canvas.now want add image on canvas on different page when navigate it. private async void edit_click(object sender, routedeventargs e) { windows.storage.pickers.fileopenpicker filepicker = new windows.storage.pickers.fileopenpicker(); filepicker.suggestedstartlocation = windows.storage.pickers.pickerlocationid.pictureslibrary; filepicker.filetypefilter.add(".jpg"); filepicker.filetypefilter.add(".png"); filepicker.filetypefilter.add(".bmp"); filepicker.viewmode = windows.storage.pickers.pickerviewmode.thumbnail; windows.storage.storagefile imagefile = await filepicker.picksinglefileasync(); if (imagefile != null) { windows.ui.xaml.media.imaging.bitmapimage bitmap = new windows.ui.xaml.media.imaging.bitmapimage(); windows.storage.streams.irandomaccessstream stream = await imagefile.openasync(windows.storage.fil

c - A __attribute__((packed)) like attribute not GCC Specific -

i use __attribute__((packed)); make items of struct being stored in memory after critical low-level development. __attribute__((packed)); gcc specific wonder if there similar solution works on ansi/c89/c99/c11 compilers or @ least of them. there no standard approach accomplish __attribute__((packed)) does. typical solution use #ifdef 's handle different compilers. can find few solutions approach @ so post contains details on visual c++ equivalent of __attribute__((packed)) . alternatively, gcc supports windows struct packing pragmas , if concerned windows , gcc use windows approach.

javascript - Hide div based on selected dropdown -

this code works fine when creating new page. selecting dropdown show or hide decorated markup. problem in edit page default selected id id 3 want div decorated 3 hidden on page load. @ sea javascript , jquery. <div class="form-group"> <label class="control-label col-md-2" for="articlecategoryid">menu category</label> <div class="col-md-10"> <select class="chooseoption form-control" id="articlecategoryid" name="articlecategoryid"> <option value="1">pages</option> <option value="2">about</option> <option selected="selected" value="3">project</option> <option value="4">gallery</option> <option value="5">news</option> <option value="6">events</option> <option value="7">faqs</option>

eclipse - Can't get a Java Spring webapp to deploy to Tomcat -

i've got project in eclipse, .war file inside it. i'm using spring project, of maven too. i've installed tomcat 8, i'm having trouble deploying webapp tomcat. tomcat runs without errors , console output of launching tomcat looks deploying it, when go localhost displays generic tomcat home page saying have deployed tomcat. i've tried changing server location use tomcat installation, i've changed location in properties of server not workspace metadata. when add jars tomcat, click on project, , under it lists spring jar if of relevance. i don't know else put here @ moment, i'm @ hand respond questions or more info require. thanks. edit: http://localhost:8080 , leads me this: http://i.imgur.com/82lmpai.png tomcat console output is: https://gist.githubusercontent.com/j-owens/8164b3ec6dbed9986322/raw/6756486aad0092647bbea8f315c42ac5ba9550b1/tomcatconsole each war file have name associated it. when use localhost:8080 url, tomcat use

shell - Call Google Spreadsheet by bash -

i call private google spreadsheet bash/shell. don't want edit or something, read , put content on stand-output... possible? found way, can call published projects google drive, doesn't fit, have confidential data in spreadsheet! also haven't find easy use api solution 1 simple thing. thanks! yes it's possible. your script need 3 things, each curl:- use saved refresh token request access token use access token fetch spreadsheet's file resource (json) parse json extract exportlinks object, , choose format (eg. csv) want download get exportlink

C#, Shared Assemblies, publisher policy not working, MS VS .NET 2013 -

i can't figured out how use publisher policy correctly , seem have similiar issue related to: how make publisher policy file redirect assembly request i've created shared assemply named "sharedassembly.dll" in version "1.0.0.0", , in version "2.0.0.0". both instaled in gac (msil_gac, target .net framework 4.5). i've created following publisher policy file *.xml (redirecting older version "1.0.0.0" on purpose behaviour): <?xml version="1.0" encoding="utf-8" ?> <configuration> <runtime> <assemblybinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentassembly> <assemblyidentity name="sharedassembly" publickeytoken="89f6ea550599ca14" culture="neutral"/> <bindingredirect oldversion="2.0.0.0" newversion="1.0.0.0"/> <

javascript - `Event.ImageLoaded` event never triggered in FramerJS? -

here code, can pasted framer studio directly: layera = new layer() # listen loading event layera.on events.imageloaded, -> print "the image loaded" layera.on events.imageloaderror, -> print "the image not loaded" layera.image = "http://framerjs.com/static/images/home/app-icon.png" however, found the image loaded string never printed.. caused cache? , have ideas how fix this? there an issue related imageloaded event. should solved in current version of framer.

html - javascript display multiple Highcharts using single function -

i trying display multiple highcharts on same webpage in different containers. know can copy , paste standard highcharts function bunch of time render many graphs page in different containers, since number of highcharts want display going depend on value extracted database (in example below number of charts equal @value) ideally want write 1 highcharts function, , loop on many times, in each iteration set chart options different. i've tried various permutations following code: for (i = 0; <= <% @value %>; ++){ $(function (i) { graphtitlearray = <% @markers.split(',') %> graphtitle = graphtitlearray[i] graphdata = <% @array[i].to_json %> switch(i){ case 0: containernum = 'container0' case 1: containernum = 'container1' ... } $(containternum).highcharts({ title: { text: graphtitle } serie

exception - Hibernate: org.hibernate.TransactionException. -

the issue following function is it throws transactionexception if no users in database, when rollback transaction in catch block. if remove rollbackstatement throws datanotfoundexception expected. public list<t> findall() { list<t> entitylist= null; transaction tr = sessionutil.getsession().gettransaction(); try { tr.begin(); entitylist= sessionutil.getsession() .createquery("from "+type.getsimplename()).list(); tr.commit(); if(entitylist.isempty()) throw new datanotfoundexception("404", "no "+type.getsimplename()+"'s present "); } catch ( runtimeexception e) { // tr.rollback(); throw new evaluateexception(e); } return entitylist; } please help. thank you

objective c - How to get list of all start up/login applications on mac? -

i want list/array of application launch @ startup mac using objective c. thanks in advance!! here code applicaiton list startup // loginitems list. lssharedfilelistref loginitemsref = lssharedfilelistcreate(null, klssharedfilelistsessionloginitems, null); if (loginitemsref == nil) return nil; // iterate on loginitems. nsarray *loginitems = (__bridge nsarray *)lssharedfilelistcopysnapshot(loginitemsref, nil); (id item in loginitems) { // want }

java - Convert String to Array to Objects in Observable -

i'm trying use closeablehttpasyncclient read endpoint, marshall string object (using javax.json) convert array on object it's individual components: closeablehttpasyncclient client = httpasyncclientbuilder.create().setdefaultcredentialsprovider(provider).build(); client.start(); observable<observablehttpresponse> observable = observablehttp.createrequest(httpasyncmethods.createget(uri), client) .toobservable(); observable<jsonarray> shareable = observable.flatmap(response -> response.getcontent().map(bb -> { string stringval = new string(bb); stringreader reader = new stringreader(stringval); jsonobject jobj = json.createreader(reader).readobject(); return jobj.getjsonarray("elements"); })).share(); i need json array, filter objects of array: observable<jsonobject> firststream = shareable.filter(item -> item.getstring("type").equals("type_1")); observable<js

How to make JQuery Draggable in Meteor work with touch devices? -

i learning meteor , jquery , created project in meteor uses jquery ui draggable. works fine in desktop browsers. assumed work in mobile devices when dragged fingers isn't (thats why have jquery mobile). there anyway can create application works in both desktop browsers , able use mobile. might silly basic question don't know how progress. appreciate directions could be of use you? basically, should translate touch events such tap in mouse events such click.

xaml - WPF - Radio button control template binding "IsChecked" not working -

i have control template below, , want ischecked property when user selects radio button. but when user select radio button "a" it's ischecked property still show false. why? <controltemplate x:key="radiobtntemplate" targettype="{x:type radiobutton}"> <grid> <stackpanel margin="5"> <radiobutton name="tempbtn" ischecked="{templatebinding ischecked}" fontfamily="segoe ui" fontsize="18.667" content="{templatebinding content}" groupname="{templatebinding groupname}"/> </stackpanel> </grid> </controltemplate> and use template: <radiobutton groupname="cg" x:name="_rdobtna" content="a" template="{dynamicresource radiobtntemplate}" ischecked="true"/> <radiobutton groupname="cg" x:name="_rdobtnb" content="b" template="{

JAVA JPanel not displaying image -

i playing around reading image (a google street view) url , adding jpanel. start, taking url " https://maps.googleapis.com/maps/api/streetview?size=600x300&location=46.414382,10.013988 " , trying read image add image jpanel display. not receiving compilation or runtime errors, jpanel never pops cannot tell if image on or not. ideas here? edit: clarify, want pop new window containing image read in url, not add image existing panel url url = new url("https://maps.googleapis.com/maps/api/streetview?size=600x300&location=46.414382,10.013988"); bufferedimage streetview = imageio.read(url); jlabel label = new jlabel(new imageicon(streetview)); jpanel panel = new jpanel(); panel.add(label); panel.setlocation(0,0); panel.setvisible(true); i want pop new window display image in url, not add existing frame i asked why expect display window, , stated, i expect because have instantiated , call setvisible on it. understand jpanel container

android - How to find the source view of a MotionEvent ACTION_CANCEL -

Image
how can find view causing motionevent action_cancel? have view "a" receiving action_cancel , don't want happen. somewhere, view "b" "consuming" motionevent. i'm hoping there way find out "b" can address misfunctionality. i've tried looking through code various ontouchevent() , onintercepttouchevent() handlers haven't yet found culprit. i've put break point @ problematic action_cancel not able recognize in motionevent might represent "b". if parent intercepting motion event, way prevent prevent parent intercepting event. can managed in 2 ways. without seeing specific code , wanting generalised solution suggest following. i suggest managing touch events parents , child managing the requestdisallowintercepttouchevent(boolean) , onintercepttouchevent(android.view.motionevent) event handlers of every view/viewgroup within affected views a, b c. by disallowing parent intercepts in child, ass

javascript - How do I return the response from an asynchronous call? -

i have function foo makes ajax request. how can return response foo ? i tried return value success callback assigning response local variable inside function , return one, none of ways return response. function foo() { var result; $.ajax({ url: '...', success: function(response) { result = response; // return response; // <- tried 1 } }); return result; } var result = foo(); // ends being `undefined`. -> more general explanation of async behavior different examples, please see why variable unaltered after modify inside of function? - asynchronous code reference -> if understand problem, skip possible solutions below. the problem the a in ajax stands asynchronous . means sending request (or rather receiving response) taken out of normal execution flow. in example, $.ajax returns , next statement, return result; , executed before function passed success callback

ios - Code=-1011 "Request failed: unauthorized (401)" AFNetwoking -

i'm trying make request setting header called x-user-authorization i'm getting following error: code=-1011 "request failed: unauthorized (401)" afnetwoking -(void) listargruposdedistancia { nsmutablearray *listadistancias = [[nsmutablearray alloc]init]; afhttprequestoperationmanager *manager = [afhttprequestoperationmanager manager]; manager.requestserializer = [afhttprequestserializer serializer]; manager.requestserializer.allowscellularaccess = yes; [manager.requestserializer setvalue:@"valuehere" forhttpheaderfield:@"x-user-authorization"]; afsecuritypolicy *policy = [afsecuritypolicy policywithpinningmode:afsslpinningmodenone]; policy.allowinvalidcertificates = yes; manager.securitypolicy = policy; nsstring *url = @"https://url:3000/api/v0.1/groups/"; [manager get:url parameters:nil success:^(afhttpreques

type families - Haskell: Function to apply some function to nested 2-tuples -

say have tuple ('a',(1,("hello",false)) . fun (read: learning), i'd create function applies function of correct form such tuple , returns result. example usage: applyfntotuple ('o',('t','w')) $ \a b c -> [a,b,c] == "otw" applyfntotuple ('h','i') $ \a b -> [a,b] == "hi" applyfntotuple ("hello",('y','o')) $ \a b c -> ++ [b,c] i've done of follows: type family tuplefn ty out tuplefn (a,b) output = -> (tuplefn b output) tuplefn b output = b -> output class applyfntotuple applyfntotuple :: -> tuplefn out -> out instance applyfntotuple b => applyfntotuple (a,b) applyfntotuple (a,b) fn = applyfntotuple b (fn a) instance applyfntotuple applyfntotuple b fn = fn b the sticking point last instance. expect need add {-# overlappable #-} since a more general (a,b) . struggle see how ghc resolve a , correct version of tuplefn c

javascript - How to realize maximally user friendly date input? -

i have wrote following code date input: $( "#datepicker" ).datepicker(); full demo but input not enough friendly user. user can type input wrong , confusion date format can happen. there way make date input dramatically friendly user? p.s. i know can use masks. can advise options? just add readonly input avoid user entering text input. demo

jquery - Cant remove my list bulletin style even if its set to none in CSS -

i creating website wordpress cms, , installed "food , drink" plugin, , when put content via plugin creates list of food( doing menu). , bulletin style on list when removed via inspect element(chrome) nothing happened. here code: .fdm-menu.clearfix, .fdm-menu .clearfix { clear: both; } .entry-content ol, .entry-content ul { margin-left: 40px; } .entry-content ol, .entry-content p, .entry-content ul, .quote-caption { margin-bottom: 26px; } .fdm-menu, .fdm-menu>li, .fdm-section, .fdm-section>li { list-style: none; } while have list-style set none in base.css, have in style.css overrides it. .entry-content ul > li { list-style-type: disc; } remove style.css

android - How to filter listview data from PHP JSON Parser -

how can filter data using textview in listview , data php using json parser. searched net don't point because using array of string while im using parsed data php. help. this code productlist.java import java.util.arraylist; import java.util.hashmap; import org.json.jsonarray; import org.json.jsonexception; import org.json.jsonobject; import android.app.listactivity; import android.app.progressdialog; import android.content.intent; import android.os.asynctask; import android.os.bundle; import android.text.editable; import android.text.textwatcher; import android.view.view; import android.widget.adapterview; import android.widget.adapterview.onitemclicklistener; import android.widget.edittext; import android.widget.listadapter; import android.widget.listview; import android.widget.simpleadapter; public class productlist extends listactivity { // progress dialog private progressdialog pdialog; private edittext et; int textlength = 0; private static fin

java - How to get width and height of resized custom view , before it is drawn -

in custom view .xml , have defined width , height w = 600dp , h = 700dp . know getmeasuredheight() / getmeasuredwidth() give values of width , height after view drawn , may differ i've given in .xml file , there workaround getmeasuredheight() , getmeasuredwidth() values before view drawn on layout, without use of onmeasure() ? and how calculate changed dp sizes in different screens ? 600h*700w when run on emulator converts 300*300 . you can override onsizechanged() height , width of view when drawn.refer below: @override protected void onsizechanged(int w, int h, int oldw, int oldh) { mwidth = w; mheight = h; super.onsizechanged(w, h, oldw, oldh); log.d(tag, "onsizechanged: " + " width: " + w + " height: " + h + " oldw " + oldw + " oldh " + oldh); } to convert dp pixels can use following code: sizeinpixels = (int) typedvalue.applydimension(typedvalue.complex_unit_dip, size

ExtJS -- how to render an html element -

i have image , when clicked want show html ( div text , buttons). know can use html config in window or panel possible show element without being encapsulated in component? here code image , click handler: { xtype:"image", src:"/blah/helpicon.png", listeners:{ render: function (c) { c.getel().on('click', function(e) { //show html here, targeted on image icon }, c); } } } here html want show. fancy tooltip, thats all. , since tooltip dont want encapsulate in window: <div id="test" class="hopscotch-bubble-container" style="width: 280px; padding: 15px;"><span class="hopscotch-bubble-number">1</span> <div class="hopscotch-bubble-content"><h3 class="hopscotch-title">step 1</h3> <div class="hopscotch-content">step 1 instructions here.</div> </div> <div class="hopscotc

java - Assert Specify Text Present or not -

i need verify whether specific banner present or not , tried storing src value of image , comparing , not able , also related text change banner name uploaded same , need assert store value . here code public void testssssss() throws exception { driver.get(baseurl + "/?country=us"); string storze = driver.findelement(by.cssselector("img[alt=\"website banner\"]")).getattribute("outerhtml"); system.out.println(storze); assertequals(storze, storze.contains("bannerbanner-2015-summersplashout_affbanners-664x272-881.gif")); } value store in storze : img src="/wp-content/uploads/2015/07/bannername-2015-summersplashout_affbanners-664x272-88.gif" alt="bannerbanner" height="289" width="677" i need check text " bannername-2015-summersplashout_affbanners-664x272-88.gif ". not able automate.code appreciated . from question come know want assert storz valu

php - SQL query finding maximum for two joint tables by category -

i'm wondering how find maximum of each category if have join 2 tables. i have 2 tables. restaurant possesses name, address, cuisine, county (area) , rid (restaurant id). i have inspection has rid, idate (date of inspection) , totalscore (the inspection score restaurant). say have display cuisine of restaurant, name of restaurant, address , totalscore (from inspection class). have list best restaurant each cuisine in particular county ('cobb' in code) , date of inspection must in 2015. instance, chinese cuisine "beijing central" totalscore of 99 (out of 100). so far have code: select distinct cuisine, name,address, max(totalscore) restaurant r join inspection on r.rid = i.rid county = 'cobb' , year(idate) = 2015 group cuisine, name, adddress; while gets me close, keep getting duplicate copies. instance, lists 2 different chinese restaurants instead of choosing best one. i'm trying improve sql coding style if has soluti

javascript - animate scroll to specific page position on scroll -

i'm trying replicate scroll event found on http://blkboxlabs.com/ , when user scrolls animates screen next full height section, depending on if scroll or down. i've got similar functionality, less smooth, , if user scrolls enough skip 2 sections, opposed stopping @ next section. var didscroll; var lastscrolltop = 0; var delta = 5; $(window).scroll(function(event){ didscroll = true; }); setinterval(function() { if (didscroll) { hasscrolled(); didscroll = false; } }, 800); function hasscrolled() { var st = $(document).scrolltop(); var wintop = $(window).scrolltop(); var winbottom = wintop + ($(window).height()); // make sure scroll more delta /*if(math.abs(lastscrolltop - st) <= delta) return;*/ // if scrolled down , past navbar, add class .nav-up. // necessary never see "behind" navbar. if (st > lastscrolltop){ // scroll down $('.fullheightscrollassist').each

ruby - How to get values in show action in rails controller -

i have access parameters in nested attributes..... below code. <%= link_to "invoice", user_invoice_path(@user, invoice) %> how access user , invoice in invoice controller show action. def show @user = user.find(params[:user_id]) @invoice = invoice.find(params[:id]) end user model: class user < activerecord::base has_many :invoices end invoice model: class invoice < activerecord::base belongs_to :user end i know how works when not nested.... can anyone, please help? if understand correctly, can't find @user or @invoice in way. please debug show action , find params follows, {"action"=>"show", "controller"=>"invoices", "user_id"=>"307", "id"=>"359"} so write show action like, def show @invoice = invoice.find(params[:id]) @user = user.find(params[:user_id]) end there may better ways find objects in controller action.

caching - How can I prevent a Dockerfile instruction from being cached? -

in dockerfile use curl or add download latest version of archive like: from debian:jessie ... run apt-get install -y curl ... run curl -sl http://example.com/latest/archive.tar.gz --output archive.tar.gz ... add http://example.com/latest/archive2.tar.gz ... the run statement uses curl or add creates own image layer. used cache future executions of docker build . question : how can disable caching instructions? it great cache invalidation working there. e.g. using http etags or querying last modified header field. give possibility quick check based on http headers decide whether cached layer used or not. i know dirty tricks e.g. executing download shell script in run statement instead. filename changed before docker build triggered our build system. , http checks inside script. need store either last used etag or last modified file somewhere. wondering whether there more clean , native docker functionality use, here. a build-time argument can specifi

android - Find object A and number of objects B has pointer with object A in a query -

i have big question , need help. it's parse sdk. i have 2 class named , b. b has column named author pointer a. my question: in query find object a, want number of b object has pointer a. if cannot in query, can suggest me solution task minimum request parse? thanks. parsequery<parseobject> query = parsequery.getquery("b"); query.whereequalto("pointertoa", objecta ); query.countinbackground(new countcallback() { public void done(int count, parseexception e) {{ if (e == null) { // "use count } else { // went wrong... } } });

c# - Nuget restore error: This folder contains more than one solution file -

i have structure of solutions , projects: projects |--.nuget | |--packages.config | |--projfoldera | |--projecta.csproj | |--projfolderb | |--projectb.csproj | |--projfolderc | |--projectc.csproj | |--solutionab.sln |--solutionbc.sln |--solutionca.sln each solution configured use libraries using nuget. now, when run: nuget restore , got error: this folder contains more 1 solution file. if open each solution in vs2013 it's fine. this nuget settings in each of *.sln file: project("{2150e333-8fdc-42a3-9474-1a3956d46de8}") = ".nuget", ".nuget", "{334b5d1d-8694-472b-8170-3d36a395dcef}" projectsection(solutionitems) = preproject .nuget\packages.config = .nuget\packages.config endprojectsection endproject what did wrong ? how can run nuget restore console in case ? try nuget restore solutionabc.sln see https://docs.nuget.org/consume/command-line-reference see bolded section below why error

telerik - Kendo UI Auto Complete displaying undefined -

trying work telerik kendo ui mvc autocomplete control. i'm using server side filtering works. results coming in controller method, i'm seeing 'undefined' in list of choice on view. mvc details below. view @model list<usfs.lending.loanapprovalconditionsetup> @(html.kendo().autocomplete() .name("conditions") .datatextfield("conditionname") .bindto(model) .minlength(3) .filter(filtertype.contains) .placeholder("conditions search...") .datasource(source => { source.read(read => { read.action("searchloanconditions", "loancondition") .data("onconditionssearch"); }) .serverfiltering(true); }) ) <script> function onconditionssearch() { return { searchtext: $("#conditions").val() }; } </script> controller public actionresult searchloanconditions(strin

r - Shiny: How to change a background colour of a column? -

i've got fluidrow 3 columns containing widgets. possible change colour of middle column (or widgets in column) ? for example: white column - gray column - white column i think can add style element; this: column(3, style = "background-color:#4d3a7d;", ...) hope helps

javascript - Getting an attribute from the same html file I am working on -

i creating plugin template. after publishing template web, there attribute inside inserted script need value , use in plugin. is there way js/jquery? here part of page in attribute located: platform.utils.initwidget('#skyline', function (elem) { new website.tool.constantin(elem, { event: 'click', transitionduration: 93000 }); }); i need find way search html , value transitionduration i.e 93000 . additional comment: this code generated template , have no control on changing how formed. inspected html, , template places code js code ( "the code" ) somewhere in body. assumed there might way plugin making able read html, find attribute , use same transition duration html defines on elements. after re-reading , seeing comments, assume template inserts script somewhere , want @ transitionduration plugin. as in var scripts = document.getelementsbytagname("script"), duration=0; (var i=0;

android - How do I make my web browser app show up in "Open with..." when clicking a link? -

when click link in gmail, how can have web browser show option open said link? , code implement go it? link correct documentation incredibly helpful. thanks! you missing declare <intent-filter> in manifest <intent-filter> <action android:name="android.intent.action.view" /> <category android:name="android.intent.category.default" /> <category android:name="android.intent.category.browsable" /> <data android:scheme="http"/> </intent-filter>

javascript - strings in a variable to use as condition for if statement -

i'm making chart if person visits country in region (in case asia), make bar color. if ( d.visitcountry === "china" || d.visitcountry === "japan" || d.visitcountry === "afghanistan" || d.visitcountry === "armenia" || d.visitcountry === "azerbaijan" || d.visitcountry === "bangladesh" || d.visitcountry === "bhutan" || d.visitcountry === "brunei darussalam" || d.visitcountry === "cambodia" || d.visitcountry === "georgia" || d.visitcountry === "hong kong" || d.visitcountry === "india" || d.visitcountry === "indonesia" || d.visitcountry === "kazakhstan" || d.visitcountry === "north korea" || d.visitcountry === "south korea" || d.visitcountry === "kyrgyzstan" || d.visitcountry === "laos" || d.visitcountry === "macau" || d.visitcountry === "malaysia" || d.visitcount