Posts

android - Problems with layout -

i trying create own phone dialer scratch in eclipse android, did simple phone layout in xml numbers 0-9 , buttons/imagebuttons. basically put button s , imagebutton s , understand need call setonclicklistener() on them in java code. like: button no1 = (button) findviewbyid(r.id.button1); no1.setonclicklistener(new view.onclicklistener() i did <edittext on top of numbers (buttons , imagebuttons) display numbers. nothing come out when click. not sure miss out cause problem. i did "settings" button in same xml file, upon clicking on button, toast pop out have couple of clickable icons. not sure on how it. did read tutorials mine seems not quite right. hopefully if above-mentioned points can rectified, hope can try make sms characters unicode, can limit lets 50 characters etc.. that's still far-fetched me though. i'll in later part. i did google research don't quite correct info bits , pieces here , there... actually want create customized phone ...

c++ - why compiler is not eliding away copy construction in this case -

class test { public: int data; test(int var = 0):data(var){cout<<"constructor"<<endl;} ~test(){ cout<<"destructor"<<endl; } test(const test& var) { cout<<"copy constructor"<<endl; this->data = var.data; } test& operator=( const test& var) { cout<<"assignment op"<<endl; this->data = var.data; return *this; } }; test passbyref_returnbyval(test& obj) { return obj; } int main() { test o1(5); test o2 = passbyref_returnbyval(o1); cout<<"=========================="<<endl; test o3; o3 = passbyref_returnbyval(o1); } output: constructor copy constructor constructor copy constructor assignment op destructor in given example , object o2 directly copy constructed without using temporaries. but in second case want o3 assigned re...

apache - Mediawiki can't display images or styles -

i`m using mediawiki v1.19.1. my wiki works when use locally. when access on network (from computer, or different ip), displays text only. there no images. it seems classic skin it`s not. reason there no layout on wiki (other public wiki pages show ok). my wiki uses monobook skin now, can see text on page. i have changed permission 777, including on directories ( /var/www/kj/* ), still no images. help me, please... i got same issue time ago , following worked fine me. issue might related localsettings.php file , general setting $wgserver . the following link can provide more details : manual of $wgserver since 1.18 mediawiki has supported setting $wgserver protocol-relative url. eg, //www.mediawiki.org this used supporting both http , https same caches using links work under both protocols. so try removing localhost , provide url; eg ; $wgserver = "//mywebsite.com";

Eclipse + JBoss Tools won't run webapp to configured JBoss AS -

i using eclipse 3.7.2 jboss tools 3.3 under ubuntu 12 , have configured locally installed copy of jboss 7.1.1 in eclipse under " preferences::server::runtime " environments. however, when trying run java ee application double-clicking on project or .xhtml page see " run / run " on server option , http 404 apache tomcat/7.0.26 @ localhost:8080 . is, seems eclipse trying deploy tomcat server opposed jboss have configured in " preferences::server::runtime " , don't option "run on jboss" or anything. when export application war , manually deploy jboss app runs fine. the idea add application specific server have configured. additionally; adding server runtime isn't enough. you need open servers view, , there right click on background , select new , , server . if choose jboss community -> jboss 7.1 here, can select created server runtime in server runtime environment , or optionally create new one. then comes mental tw...

hybridauth - How to solve this This sample requires a Mysql database. Please edit the configuration file: application.config.php? -

i using hybridauth userinformation social web sites facebook,twitter, etc. php lib connect configured using install.php available in lib itself. when tried use examples available following errore this sample requires mysql database. please edit configuration file: application.config.php i don't know file application.config.php available. also got error! hybridauth library needs curl php extension. since new php blinking next. please me solve this. regards tony firstly, need php-curl.. repo's php installs include this, it's odd haven't gotton it. have specified os you're working on, quick google search give instructions on installing this. if you're working on rhel-based system, do; yum install php-common yum install php-curl the former installing php common packs, , latter installing curl. likewise, you'll need find application.config.php - again, on rhel-based systems, can run; find -name application.config.php - otherw...

css - IE8 embedded font dissapears on refresh -

Image
i using embedded font via @font-face , works fine... until on ie8 (haven't tried on newer versions) when crazy refresh or use backward , forward buttons reload page. what's worse doesn't default font in font stack, appears go straight arial (with serious spacing issues). a live example can seen here: http://rcnhca.org.uk/sites/first_steps/ an image comparison viewing pleasure: the relevant css perusing pleasure: @font-face { font-family: 'droidserifregular'; src: url('droidserif-regular-webfont.eot'); src: url('droidserif-regular-webfont.eot?#iefix') format('embedded-opentype'), url('droidserif-regular-webfont.woff') format('woff'), url('droidserif-regular-webfont.ttf') format('truetype'), url('droidserif-regular-webfont.svg#droidserifregular') format('svg'); font-weight: normal; font-style: normal; } an interesting note: som...

html5 - What is the HTML equivalent of #define in C/C++? -

i have multiple html files vary little - few bits of text , javascript constants here , there. want make easy maintain 1 master version , make generating variants simple. something compile time substitution in c/c++ simple , perfect: #define constant 1.23456 how? ideas? additional info: using html 5 these html files use in phonegap, no server-side stuff allowed. you can use templating engine that. 1 content 1 twitter http://twitter.github.com/hogan.js/