Posts

xcode - How to send message to virtual port in iOS -

i'm starting project need control external device using ipad. my device connected via usb, , far know, ipad should detect virtual port, i'm having problems in finding how can make ipad app send messages device. the first part of project consist on sending messages, later i'll receiving external devices, knowing how communicate virtual port think can go on. so, questions are: 1) ipad communicate external devices connected via usb virtual ports? 2) how can send messages them? thanks to connect via usb (over lightning connector) you'll need join mfi program .

adobe - Can't open TOOL GALLERIES Illustrator CC on second monitor -

i have laptop , second display (via hdmi). in illustrator cc, trial version, can't open flyout menus(known 'tool galleries'). know how work, nothing seems trick (click , hold, right click, click on corner). when drag illustrator on laptop display, functionality reappears, flyout menus work, need use second monitor. is bug? how can fix it? i have same issue have 2 monitors , happens when illustrator open on 'second' monitor. a work-around make monitor wish use illustrator 'primary' monitor in settings (in windows 8 right click on desktop - screen resolution) - hdmi display.

sql - Comparing all data in two tables whilst ignoring certain differences -

i trying compare 2 sql server database tables. i've found various methods online, seem work, other don't. the 1 used worked was: select * table1 except select * table2 the issue (as far aware) is, table says there difference between 'null' value , '0'. correct, there difference. however question is, there way comparison difference check, whilst ignoring conditions such null , 0. you can use select isnull(column1, 0) column1 table1 except select isnull(column1, 0) column1 table2 to consider values 0 , null same. also, if wish consider more values same null = 0 = '' (empty string) you can use case: select case when (column1 null or column1 = '') 0 end column1 table1 except select case when (column1 null or column1 = '') 0 end column1 table2

javascript - Adding <ul></ul> after every 2nd <li> with angular ngRepeat -

i have ul , apply ngrepeart on li want after every 2nd li it's create new ul this. possible ? <ul> <li>simth</li> <li>aryan</li> </ul> <ul> <li>john</li> <li>mark</li> </ul> <ul> <li>cooper</li> <li>lee</li> </ul> and angular.js code function mycrtl($scope){ $scope.namelist= [{ name:'simth' },{ name:'aryan' },{ name:'john' },{ name:'mark' },{ name:'cooper' },{ name:'lee' }] } you can split array chunks. please see demo below var app = angular.module('app', []); app.controller('homectrl', function($scope) { $scope.namelist = [{ name: 'simth' }, { name: 'aryan' }, { name: 'john' }, { name: 'mark' }, { name: 'cooper' }, { ...

scala - Slick string sanitation -

i want perform query using sql operation string parameter. example: coffee <- coffees if coffee.name s"%$querystring%" is safe? from slick documentation : slick’s key feature type-safe, composable queries. slick comes scala-to-sql compiler, allows (purely functional) sub-set of scala language compiled sql queries [...] the fact such queries type-safe not catches many mistakes @ compile time, eliminates risk of sql injection vulnerabilities i did no try myself, think safe when using user params

performance - In R, how to modify a column in a big dataframe based on rows in a small dataframe in an efficient way -

i have big dataframe called big_set : hash is_in_small_set 1 6694662834f3d2942ec4c6af20ab0520 na 2 265e53ecdb68d360890f9aa2d99c1ebe na 3 0b7cd1f468c88de7c8bf822a77d4dc4d na # have printed first 3 rows and small dataframe called small_set : hash result 1 703a4f40f24afe5baadb03412514048f b 2 d0cabfc660bf334524e758ef5c9774a4 3 265e53ecdb68d360890f9aa2d99c1ebe c i need fill column big_set$is_in_small_set : hash is_in_small_set 1 6694662834f3d2942ec4c6af20ab0520 false 2 265e53ecdb68d360890f9aa2d99c1ebe true 3 0b7cd1f468c88de7c8bf822a77d4dc4d false i have working solution 2 nested for-loop unfortunately slow purposes nrow(big_set) 10k , nrow(small_set) 100. getrandstring<-function(len=32) return(paste(sample(c(0:9,c('a','b','c','d','e','f')),len,repl...

php - Why does my mysql query takes way too long to produce results -

hi wrote following code retrieve data database, slow on execution, can have on , give few optimizing tips better performance. what happens im creating new table binding existing current data few other tables. $table_count = mysql_query("select table_name information_schema.tables table_schema = 'datamatrix' , table_name 'tracking_%' "); while($row = mysql_fetch_array($table_count)){ $trackingtable = $row["table_name"]; $update = mysql_query("select id unp $trackingtable"); $col = mysql_fetch_assoc($update); $col_id = ($col["unp"]); $var1 = mysql_query("select useragent ua trackpanel id = $col_id"); $col_ua = ($var1["ua"]); $browser = get_browser($col_ua, true); $new_timestamp = mysql_query("select timestamp $trackingtable order timestamp desc limit 1"); $col_new = mysql_fetch_assoc($new_timestamp); $new_timestamp1 = mysql_query("select timestamp $trackingtable order...