Posts

angularjs - iPad radio button issue within ionic popover -

i using radio buttons in popover create dropdown type filter app. when use ipad radio buttons go haywire! works on every other device. best illustration in video https://www.youtube.com/watch?v=begkz4us8hq here code: <script id="templates/popover.html" type="text/ng-template"> <ion-popover-view> <ion-content> <div class="item bar-header bar-positive"> <h2 class="title">difficulty</h2> </div> <label class="item item-radio"> <input type="radio" ng-model="filter.difficulty" value="" name="group"> <div class="item-content"> </div> <i class="radio-icon ion-checkmark"></i> </label> <label class="item item-radio...

matrix - Subsetting by row condition in R -

i'm trying work out way of subsetting matrix purely numeric (i.e. no column/row names). put in form of worked example, drop rows not meet logical condition. set.seed(42) m <- matrix(sample.int(100, 10*10, true), 10, 10) say want make subset keep rows maximum row value 90 or over, drop not meet condition. the way can think of doing through if/else loop ( max(m[i,]) > 90 ) feel there must more elegant way of doing this. any ideas? you can in several steps. first, find maxima of rows using apply on rows: maxima = apply(m, 1, max) # [1] 92 99 99 98 93 96 98 91 98 84 next, greater threshold: above = maxima >= 90 # [1] true true true true true true true true true false now, use subset data: m[above, ] or, in 1 line: m[apply(m, 1, max) >= 90, ] you can expand condition arbitrarily. instance, test whether maximum between 2 values, can this: between = function (x, lower, upper) x >= lower & x <= upper m[between(a...

SAP Gateway runtime odata path permissions -

is there standard way change runtime permissions user able call odata resources of sap gateway service, other manually writing code in every service implementation method check if request allowed? for example, based on setting in customizing, odata paths below /foo , /bar user x should forbidden, i.e. http get/post/delete <host>:<port>/foo/test , http get/post/delete <host>:<port>/bar/test should yield http 403 user x , http get/post/delete <host>:<port>/something should ok . is there way can controlled @ single place rather being required implement check in every method implementing odata requests? the proper place authorization check in backend method. authorization error should populate service , yield 403 example. if reason don't want that, write own http handler , insert in sicf called on paths. the standard role setup allows access or no access service, "pattern" access referring missing. can't under...

ios - How to define url schemes starting with http ios7 -

i can define custom schemes myapp third applications can redirect links like: myapp://mypage.com app(if user installed it). want third applications open app if user try open links http://mysite/mypage.com too. right can see safari open yourtube when type links like: http://www.youtube.com/watch?v=wzh30t99mam or map application opens if type links like: http://maps.google.com/maps ..... so how can define custom scheme third applications open apps if user type: http://a.myapp.com short answer: can't without server support. apple tricks not available third party apps redirect http urls maps , youtube. the way set web server @ http://a.myapp.com redirected myapp://

java - NoClassDefFoundError on **CacheModel -

i trying add relationship between tables using below code <column name="categories" type="collection" entity="category" mapping-table="shoppingitem_category"/> after have built service using **localserviceutil.getcategoryitems(categoryid) api throwing exception java.lang.noclassdeffounderror: com/htmsd/slayer/model/impl/shoppingitemcachemodel @ com.htmsd.slayer.model.impl.shoppingitemmodelimpl.tocachemodel(shoppingitemmodelimpl.java:618) @ com.liferay.portal.dao.orm.common.entitycacheimpl.putresult(entitycacheimpl.java:241) @ com.liferay.portal.kernel.dao.orm.entitycacheutil.putresult(entitycacheutil.java:67) @ com.htmsd.slayer.service.persistence.shoppingitempersistenceimpl.cacheresult(shoppingitempersistenceimpl.java:1079) @ com.htmsd.slayer.service.persistence.shoppingitempersistenceimpl.fetchbyprimarykey(shoppingitempersistenceimpl.java:1431) @ com.htmsd.slayer.service.persistence.shoppingitempersistenceimpl.findbyprimarykey(s...

sql - Select a row, and the rows either side of it -

i'm putting blog posts implement json api. end, when retrieve post database, want include links next , previous posts. database means when retrieve row posts table, i'd retrieve row before , row after it. i'm bit of noob sql (specifically postgres). @ moment have following: select * posts id >= ( select id posts id < ( select id posts slug = 'the-slug' ) , published = true order id desc limit 1 ) , published = true order id asc limit 3; ( posts have serial id primary key, published boolean, , slug varchar) all have access slug of centre post. works, breaks if the-slug represents first published row. seems quite naive. there better way go this? edit: i'm trying avoid question being specific problem answers might of more use many. however, above quite loose. consider table created following: create table posts ( id serial primary key, slug varchar(255) unique not nu...

mysql - Storing SSNs in a database -

i'm working on web application users need submit social security numbers. i use asymmetric keys encryption if web server compromised private key still safe. application won't processed on webserver. however app needs ability know if ssn duplicate not allow duplicates , b allow users come application. can done? make sense use 1 way hash similar way passwords stored or compromise data? thanks in advance. -- edit i'm adding question after thinking bit more it. since there aprox. 10 billion ssns. make hashing alg. susceptible brute force attacks. salt here. if salt known isn't still susceptible brute force? possible hide salt since if has access database have access salt? don't encrypt ssns, hash them it sounds should hashing ssns rather encrypting them. difference between 2 hashing one-way while encryption not. don't need verify value of data, integrity, use hashing because hashing more secure encryption hashed ssns can not unhashe...