Posts

tel - iOS: How to launch call applications like native phone app, skype, lin phone etc from my application -

i have explored tel:// pattern establish call. in ipad mini have wi-fi support. uri fails. want know if there nay way write code such application ask user choose among calling feature supporting application. i tried callto: pattern no luck. on this? to make calls via skype can use url scheme, source skype docs bool installed = [[uiapplication sharedapplication] canopenurl:[nsurl urlwithstring:@"skype:"]]; if(installed) { [[uiapplication sharedapplication] openurl:[nsurl urlwithstring:@"skype:echo123?call"]]; } else { [[uiapplication sharedapplication] openurl:[nsurl urlwithstring:@"http://itunes.com/apps/skype/skype"]]; } to make calls via facetime can use use similar url scheme nsurl *url = [nsurl urlwithstring:@"facetime://+123456789"]; [[uiapplication sharedapplication] openurl:url]; hope helps , there no such feature aware of give list of calling apps , can manually show selection option , let user select of...

how to cin to int _value:1; C++ -

i have try code, wanna use 1 byte of integer save number, how can value cin , out value cout struct songuyen{ int _value:1; void input(){ // how can cin value _value; } void output(){ // how can cout value of _value; } } thks got tip.!! struct songuyen{ int _value:1; void input(){ int value; std::cin >> value; _value = value; } void output(){ std::cout << _value; } }; the integer way not 1 byte 1 bit wide (think why called feature bit fields ). bit fields bad programming practice , should avoided possible. if need member width of 1 byte, rather use std::int8_t or signed char . if need 1 with width of 1 bit, use bool (even though waste 7 bits, doesn't matter on modern platforms). a more c++ approach implement input / output of class contain operators: struct songuyen{ int _value:1; }; template<typename chart, typename chartraits> std::basic_istream...

javascript - Why doesn't ajax load() work after second and third call? -

i've been trying 3 update same time when click button update count new feeds, notifications , messages. i've tried using setinterval( "getupdate()", 10000 ) too, update automatically every 10 seconds doesn't work second , third divs. or because ajax doesn't support many load() call? now, have no idea how should , need helps. thanks. javascript </script> function getupdate(){ $('#newsfeed').load('getnewsfeed.php'); $('#notify').load('getnewnoti.php'); $('#message').load('getnewmessage.php'); } </script> html <button type="button" onclick="getupdate()" class="btn btn-primary">get update</button> <div id="newsfeed"></div> <div id="notify"></div> <div id="message"></div> if problem concurrent ajax calls, can load them in sequence: function getupdate(){ ...

java - Does IntelliJ IDEA Have Built-In Reverse Debugging Feature? -

i guess header obvious , undo debug process save lots time. 1 of coworker said me did once couldn't remember again how it. it's not undo operation in usual sense, can drop stack frame , re-enter same method again calling run -> drop frame menu item.

linux - how to run .run file in fedora through terminal command? -

i new user of fedora linux , trying install xampp server , have .run file have tried alien command unfortunately command not working step 1: delete .run file, don't need it. step 2: install apache (the in xampp), mysql (the m in xampp), php (the 1st p in xampp) , perl (the 2nd p in xampp) through package manager. have x (linux <- x). yum install apache mysql php perl

ruby on rails - What should be a simple render takes almost a minute -

i'm using passenger start in development environment, yet thin , webbrick , puma have same results. problem seems consistent across development machines running ubuntu 14.04. in production, not have issue @ all. ruby version 2.1.3 , 2.1.2 (tried both). using rails 4.1.6 (and tried 4.1.5 ). the login page being rendered simple , small. form posts devise session controller log in. ran strace passenger start see taking forever. thoughts on causing this? slow request started "/users/sign_in" 10.0.2.2 @ 2014-09-19 11:26:24 -0400 processing devise::sessionscontroller#new html "", 8192) = 0 sched_yield() = 0 close(9) = 0 socket(pf_inet, sock_stream|sock_cloexec, ipproto_tcp) = 9 fcntl(9, f_getfd) = 0x1 (flags fd_cloexec) fstat(9, {st_mode=s_ifsock|0777, st_size=0, ...}) = 0 fstat(9, {st_mode=s_ifsock|0777, st_size=0, ...}) = 0 connect(9, {sa_family=af_i...

mysql - How to add primary key in SQL? -

this question has answer here: how add primary key mysql table? 8 answers i created table(let's contact info), forgot create primary key. since entered values in table want keep table , want add primary key column. how add primary key column on left side of table incremental numbers? you can add auto-incrementing column: alter table contact_info add column id int primary key auto_increment;