Posts

Showing posts from May, 2013

iphone - how to pass data from one view to another view through parentviewcontroller -

i have data in read.m class. created parent view controller read. so,parent view home.m. in home.m used present modal view controller retailer class. want data read.m retailer.m through home.m. read.m -(void)requestfromtblviews:(id)navigation forindex:(int)index fortext:(nsstring *)text withdbdata:(nsarray *)dbdata{ [dbdata objectatindex:index]; } -(void)showretailerinfo { //nslog(@"show retailer information is...."); [self.readviewcontent getshowretailerinfo:self]; } home.m -(void)getshowretailerinfo:(id)currentview; { // nslog(@"get retailer info...."); retailer_info = [[retailerinfoviewcontroller alloc]initwithnibname:@"retailerinfoviewcontroller" bundle:[nsbundle mainbundle]]; retailer_info.view.frame = cgrectmake(0, 0, 320, 480); [retailer_info loaddefaultview]; [self presentviewcontroller:retailer_info animated:yes completion:nil]; [retailer_info release]; } make values or variables...

html - Twitter-bootstrap 3. Table with one row lose border after hover in Opera -

here html markup: <table class="table table-hover" style="width: 300px;"> <thead> <tr> <th>#</th> <th>first name</th> <th>last name</th> <th>username</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>mark</td> <td>otto</td> <td>@mdo</td> </tr> </tbody> </table> and jsfiddle after hovering on row lost border after change resize window stay visible . if table has more 1 row works fine. can see @ screencast video also: http://screencast.com/t/hpruvsubmce this bug exists in opera(any version) only. i'm using bootstrap 3 really interesting bug managed work around adding rule css .table th, .table td { padding: 4px; line-height: 5px; text-align: left; vertical-align: middle; border-top: 1px solid red ! importan...

symfony1 - How to write a route who accepts parameters from a model and custom parameters -

i want write route accepts kind of url: controller\:id\action\:param1\:param2 the route should mixed. should accept model doctrine primary key id should accept 2 custom parameters too: param1 , param2 how can achieve in symfony 1.4 ?

ios - iTunesConnect App Name Confusion -

i've developed ios app , going submit itunes. have following things. member center : a. create app id b. create certificates (for this, have create csr file key chain access) c. create profiles itunes : d. create app in itunes (on first time itunes asks company name display in itunes) e. enter details f. upload binary so far have done upto step d . step b , have created single csr file name common name (not company name), , used create both development , distribution certificates. when checked certificates in keychain access, both certificates show name. suspect distribution profile should show company name. i have following questions now. will itunes show name in distribution certificate company name? will itunes show name entered while created first app company name? is way created distribution certificate correct? can use same csr file certificates? i'll try answer questions, might mistaken, since it's been 1 , 1/2 years since did this....

c++ - Issue with Assignment Operator and Array Subscription operators -

i trying overload subscription operator , faced issue example class e , did @ first is: int e::operator[](int n){ if(n<length && n>0) return data[n]; else return 0; } let have object of e ( ), , want return a[0]. operator works fine. second thing wanted if want a[0] = 4 . need implement here? assignment operator? or subscription operator? advice how that, thanks! commonly subscript operator written 2 overloads: 1 read , 1 write. allows read in const contexts: write overload: int& e::operator[](size_t index) { if( index >= lenght ) throw std::out_of_range("subscript out of range"); else return data[n]; } read overload: (note const cualified) int e::operator[](size_t index) const { if( index >= lenght ) throw std::out_of_range("subscript out of range"); else return data[n]; }

Spring Custom filter chain -

i writing own filter chain dynamically load user roles database , filter urls application works fine when login application using login page but when try access protected url requires authentication instead of being redirected login page; getting class cast exception. debugging shows me string "anonymoususer" returned instead of domain principal object :( java.lang.classcastexception: java.lang.string cannot cast com.mytech.myapp.model.myappuser @ com.mytech.myapp.web.controller.helper.leftmenuhelper.getmanageleftmenu(leftmenuhelper.java:171) @ com.mytech.myapp.web.controller.managecontroller.setlefttree(managecontroller.java:1377) @ com.mytech.myapp.web.controller.managecontroller.rendermanagepage(managecontroller.java:379) @ com.mytech.myapp.web.controller.managecontroller.handlenosuchrequesthandlingmethod(managecontroller.java:371) @ org.springframework.web.servlet.mvc.multiaction.multiactioncontroller.handlerequestinternal(multiactioncontroller.java:413) @ or...

php - Insert pdf as blob and display -

so i'm getting pdf file send webservice me upload, it's send me base64binary type variable, and uploaded using below script : function saveeim($parameters) { mysql_query("insert tablename (filename, filesize, file) values ( '" . $parameters['filename'] . "', '". $parameters['filesize'] . "', '" . $parameters['file'] . "' ) ") or die (mysql_error()); } now getting uploaded, weird thing is, instance if upload 370kb file, it's 490kb in database.... don't know how happens, , if normal? now save in fileserver : $query = mysql_query("select file tablename id = '1' ") or die (mysql_error()); $fetch = mysql_fetch_array($query); $data = $fetch[0]; file_put_contents("user_123.pdf", $data); when open file getting saved in fileserver, error : "user_123.pdf cannot opened because filetype not supported or because damaged." ...

java - Implement JNI application to use dll methods without implementation -

i have intention of create java application use methods dll. for have been reading, in few words, process use jni consists of: declaring native methods in java, generate .h file, , code c or cpp file implementation create dll. but problem have dll, big library many methods. know interfaces of these methods. not want implement them. want use dll avoid using these methods. understand using dll may improve performance. in case want use because want use code done other party. am missing anything? possible use jni, or other java interface, use dll methods, skipping coding part? thank much. if don't have problem use lib recommend use jna. has more flexible api dll access. @ least preffered use it. you can find examples here: https://github.com/twall/jna/tree/master/www therefore need have dll loaded , interfaces call java , need. maybe blog helps you, too: http://jnaexamples.blogspot.de/2012/03/java-native-access-is-easy-way-to.html

Android onPreExecute cannot show a ProgressDialog -

so, have asynctask below: private class asyncretriever extends asynctask<iotdhandler,void,iotdhandler>{ progressdialog pdialog; @override protected void onpreexecute(){ pdialog = new progressdialog(getapplicationcontext()); pdialog.setmessage(getresources().getstring(r.string.toast_msg1)); pdialog.show(); } //------------------------------------------------------------------------------ this inner class of mainactivity . however, logcat flags pdialog.show() error. says, unable start activity componentinfo. how solve this? a progressdialog needs activity context. try this: pdialog = new progressdialog(youractivity.this);

php - CodeIgniter Muliptle File Upload -

this question has answer here: upload multiple files in codeigniter 7 answers i'm new codeigniter, can me on muliptle image uploads. scenario is, validate each image if there errors, show each message below each input file. if there's no error upload , save file name database. need basic way on how this. i've tried no luck. appreciated. in advance! this controller hotel.php public function add() { //if(!is_ajax_request()) return; $this->set_validation_rules(); if($this->form_validation->run()) { $m_insert = $this->get_posted_hotel_data(); $hotel_id = $this->hotel_model->insert($m_insert); $this->upload_image($hotel_id); redirect('hotel'); } else { $data['accept'] = array( 0 => 'f...

javascript - Samsung TV APP - Update scenes content on network reconnection -

the issue face has loading , reloading of scenes content. app works today not respond network disconnection , reconnection. for example ,there states ajax-state 200 / fine .. data coming in null -> leads empty scenes. here snippet controller looks : controller.assignevents = function() { var player = document.getelementbyid('pluginobjectplayer'); player.onconnectionfailed = 'controller.connectionfailed'; player.onnetworkdisconnected = 'controller.networkdisconnected'; player.onstreamnotfound = 'controller.streamnotfound'; $$(document).ajaxerror(function(e, xhr, settings, exception) { alert('error (' + xhr.status + ') ' + 'in: ' + settings.url + ' | error: ' + exception); if(xhr.status === 0 || xhr.status === 408 || xhr.status === 504) controller.networkdisconnected(); }); $$(document).ajaxsuccess(function(event, xhr, settings){ alert('ajaxsuccess('+xh...

Nullpointer exception when modifying string through another class - Java -

in main method, doing this: rtalgorithm rt = new rtalgorithm(); string s = "looooolasdasdl"; rt.encrypt(s); system.out.println(s); here rt class: package rt.encrypt; public class rtalgorithm { public static string encrypt(string s) { alg_flip(s); return s; } private static string alg_flip(string s) { string s1 = ""; for(int = s.length() - 1; >= 0; i++) { s1 = s1 + s.charat(i); } return s1; } } however, giving me nullpointerexception on rt.encrypt(s) line in main method have if return value in method in .modify have value back: you're doing: string s = "looooolasdasdl"; rt.modify(s); system.out.println(s); you need string s = "looooolasdasdl"; string s2 = rt.modify(s); system.out.println(s2); and in modify method need return of alg_flip() call public string modify(string s) { return alg_flip(s); } edit if use lot of algorithms should consider strategy pattern the m...

oop - Retrieve property from all instances of one class in Matlab, write value to file -

i automatically retrieve properties instances of same class in workspace. ex.: have class c1, instances a, b, c, d. each of these have property called x. retrieve x's. how go this? here's 1 possibility. let's want find doubles in workspace. this >> x = 12.3; >> y = 45.6; >> z = '789'; get list of variables in workspace >> vars = whos(); figure out ones doubles >> location = strcmp('double',{vars.class}); get names >> names = {vars(location).name}; >> names names = 'x' 'y' if wanted array of property x (say want cosine of each double) this >> n = length(names); >> arr = nan(1,n); >> n = 1:n obj = eval(names{n}); # dubious use of 'eval' arr(n) = cos(obj); # assign relevant property array end now have >> arr arr = 0.9647 -0.0469 here's example using custom object. first, put code in file ...

android - How to actually search for a song in a mediastore cursor using a string -

i have set cursor still struggling searching it. how search track name? how id can pass mediaplayer? have tried different things didn't succeed. basically, want know how search mediastore string (string songtoplay in case), results, id of best match , pass mediaplayer service play in background. thing asking how id though. this code using: uri uri = mediastore.audio.media.external_content_uri; string[] songtoplay = value.split("play song"); string[] searchwords = songtoplay[1].split(" "); string [] keywords = null; stringbuilder = new stringbuilder(); where.append(mediastore.audio.media.title + " != ''"); string selection = where.tostring(); string[] projection = { basecolumns._id, mediastore.audio.media.mime_type, mediastore.audio.artists.artist, ...

form symfony 2 many many self reference entity -

i create form collection of self reference entity. i need form create new product ,this form have select field (child) existing products. i have product entity , entity include child field (child product too). product entity : /** * @var integer * * @orm\column(name="id", type="bigint", length=20) * @orm\id * @orm\generatedvalue(strategy="auto") */ protected $id; /** * @var string * * @orm\column(name="title", type="string", length=255) */ protected $title; /** * @var string * * @orm\column(name="manufacturer_reference", type="string", length=255, nullable=true) */ protected $manufacturer_reference; /** * @var string * * @orm\column(name="resume", type="text", nullable=true) */ protected $resume; /** * @var boolean * * @orm\column(name="is_salable", type="boolean", options={"default" = 1}) */ protected $is_salable = 1; /** * @va...

java - Android - Set Layout_Gravity programmatically for LinearLayout -

i've got following problem: implemented horizontalscrollview contains in 1 case linearlayout , imageview . in case image 50% of screen width. want center it. unfortunately way found center is, use layout_gravity="center" on linearlayout . here's xml: <horizontalscrollview android:layout_gravity="center" android:layout_width="fill_parent" android:layout_height="wrap_content"> <linearlayout android:orientation="horizontal" android:layout_width="wrap_content" android:layout_height="wrap_content"> <imageview android:src="@drawable/myimg" android:layout_width="wrap_content" android:adjustviewbounds="true" android:layout_height="150dp"/> </linearlayout...

iphone - NSTimer does not work properly -

i'm pretty new ios development can me! i'm using xcode5-dp4 right , code isn't working (although worked fine before). there countdown 2:00 (min:sec) starting tapping button: firstviewcontroller.h: @interface firstviewcontroller : uiviewcontroller { iboutlet uilabel *countdownlabel; iboutlet uibutton *countdownstart; nstimer *countdowntimer; int secondscount; } -(ibaction)alert; -(void)delay; firstviewcontroller.m: uialertview *alert; -(void)delay { [alert show]; } -(ibaction)alert{ alert = [[uialertview alloc] initwithtitle:@"die zeit ist um!" message:@"du darfst das zähneputzen nun beenden, aber vergiss nicht, noch mehr für deine mundhygiene zu tun." delegate:self cancelbuttontitle:@"ok" otherbuttontitles:nil]; [self performselector:@selector(delay) withobject:nil afterdelay:120.0]; } - (ibaction)zaehneputzen:(id)sender { [self setti...

context switch - Zend Framework 1.12 and 'ContextSwitch' helper -

i'm writing rest api , return responses in json format. so, read about 'contextswitch'. can't make change headers 'application/json' , convert data json. here code of controller: public function predispatch() { $this->getrequest()->setparam('format', 'json'); $this->_helper->layout()->disablelayout(); $this->_helper->viewrenderer->setnorender(true); } public function _init() { $contextswitch = $this->_helper->gethelper('contextswitch'); $contextswitch ->addactioncontext('post', 'json') ->initcontext('json'); } public function postaction() { echo 'test'; } when check response curl command line tool received: < content-length: 4 < content-type: text/html < * connection #0 host localhost left intact test* closing connection #0 why header , data not changed? how can fix it? looks _init() meth...

java - Effects on bars generated from Jfreechart -

Image
this question has answer here: jfreechart barchart -> no gradient 3 answers i new jfreechart , have generated barchart. bars have shining line in it. want know if possible rid of line in bars. want bars have matte effect. have attached image of barchart have generated. pointers of great help. thanks in advance. sscce: public jfreechart createbarchart(categorydataset dataset) { // todo auto-generated method stub string unter_title="no of counts"; jfreechart jfreechart = chartfactory.createbarchart(title, unter_title, "frequencies", dataset, plotorientation.vertical, true, true, false); string text="test start time: "+(new date(test.getstart_utc_timestamp()).tostring()+" "+"test end time: "+new date(test.getend_utc_timestamp())); jfreechart.addsubtitle(new texttitle(text, new font("di...

windows - Can a thread call SuspendThread passing its own thread ID? -

can windows thread suspend suspendthread() ? i can awake 1 but, can call suspendthread(getcurrentthreadid()) ? it seems possible, slight alteration (see cygwin mailing list discussing here ): suspendthread(getcurrentthread()); i found msdn saying thread should suspend itself, doesn't make clear me. quote (from here , emphasis mine): this function designed use debuggers. not intended used thread synchronization. calling suspendthread on thread owns synchronization object, such mutex or critical section, can lead deadlock if calling thread tries obtain synchronization object owned suspended thread. avoid situation, a thread within application not debugger should signal other thread suspend itself . target thread must designed watch signal , respond appropriately.

c# SIMPLE factorial program -

private void button1_click(object sender, eventargs e) { string usernumber = this.textbox1.text; int newusernumber = convert.toint32(usernumber); int result = 0; int second = 0; while (newusernumber >= 1) { result = newusernumber * (newusernumber - 1); newusernumber--; } string = convert.tostring(result); this.textbox2.text = i; } } while understand homework me, stuck. really don't want solved, want myself. i don't understand why it's not working.. it's outputting 2 no matter put in. i in java converting gets me.. any great. your problem not in conversion. please at result = newusernumber * (newusernumber - 1);

How to let choose the directory to save csv file in python? -

i have function python create simple csv outfile want choose directory of save windows explorer, function : def exporter(): name_of_file="export" l = [[1, 2], [2, 3], [4, 5]] completename = os.path.abspath("c:\temp\%s.csv" % name_of_file) out = open(completename,"w") row in l: column in row: out.write('%d;' % column) out.write('\n') out.close() qobject.connect(export, signal('clicked()'),exporter) export qpushbutton ,thanks ! def exporter(directory='c:\temp\\'): name_of_file = "export" l = [[1, 2], [2, 3], [4, 5]] completename = os.path.abspath("c:/temp/%s.csv" % name_of_file) full_path = '%(directory)s\%(name_of_file)s.csv' % locals() out = open(full_path, "w") row in l: column in row: out.write('%d;' % column) out.write('\n') ...

jquery - Resize text in a fixed size div to fit -

i have <div> 400px wide , 100px high. want put heading in vary in length, , take 2 lines in <div> if long enough (i.e <div> have default font size of 50px). want have text start @ 50px, , have shrink down if text long fit in box on 2 lines. how go this? i've been playing around javascript few hours not able come or find anything. can find how text on 1 line. you need javascript solve this. example markup <div style="width: 400px; border: 1px solid black;"> <span style="display: inline-block; font-size: 50px;">this text want fit</span> </div> i gave span display value inline-block measuer width. then following jquery based script make shink until it's little bit small. $(function() { var span = $('span'); var fontsize = parseint(span.css('font-size')); { fontsize--; span.css('font-size', fontsize.tostring() + 'px'); } while...

css - JQuery mobile / input text in listview -

Image
i have several input fields inside listview entry. i´m trying style css of input fields in such way looks normal listview entry. the input field filled out angular´s ng-model, not important. this did far, think need margin/padding etc. // css input .ui-input-text{ border: none !important; box-shadow: none !important; background-color : transparent; } // html <ul data-role="listview" data-divider-theme="b"> <li data-role="list-divider">verbraucher</li> <li data-mini="true"> <a href="#"> // should "normal" listview entry! <input type="text" ng-model="cust.firstname" name="cust_firstname" required> </a></li> ... both should same! try add following css: .ui-input-listview { margin-top: -1em !important; margin-bottom: -1em !important; margin-left: -0.5em !important; /* if want fix left */ margin-right: -0.5em ...

ios - adding button in cloudReco in vuforia sample -

i need add button instead of image on scanning through camera. after scanning able display image getting web service.but not able add button nor action working on targetoverlay class.can let me know how add button/action in targetoverlay class? hope developing ios app. isn't possible dynamically load button loaded image using webservices. button needs compiled before run application. if want you can dynamically change background image of button did image before. to overlay button , implement callbacks following: drag , drop button targetoverlayview.xib file. in targetoverlayview.h add: @property(retain,nonatomic) iboutlet uibutton *yourbutton; -(ibaction)onyourbuttonclick(id)sender; (link both of them button in xib.) in targetoverlayview.m implement callback: -(ibaction)onyourbuttonclick:(id)sender { // code here }

Inner workings of yaml-cpp vs c++ maps -

just quick question inner workings of yaml-cpp. i noticed when tried key didn't exist got error such as: yaml-cpp: error @ line 0, column 0: bad conversion i suprised because have assumed point post loading operating directly off in memory map if lookup such as string foo = myyaml["bar"]["foo"].as<string>(); does happen efficiently if had typed map. more efficient if preprocess things know exist in yaml c++ map , access them directly rather via node? i guess i'm asking if perf of map faster acessing node thanks lookup in map in yaml-cpp o(n) - loops through entries in map. see this issue on project page. lookup in std::map o(log n) - stores keys in order, , binary searches find key. if have large number of keys, might faster preprocess data. should measure first :)

matlab - How to put conversion operation in a for loop? -

below code convert .tim file ascii file 1 particular file. need convert 500 files( .tim ). need save .ascii file in same name .tim file name below 500 files. bin=fopen('file_01.tim','r'); ascii = fread(bin, [43,21000], 'float32'); data_values=ascii'; dlmwrite('file_01.xls', data_values, 'delimiter', '\t', ... 'precision', '%.6f','newline','pc'); using "for loop" conversion , save ascii file same name of tim , first thought don't know how that. you can use dir list of filenames in folder , proceed have using replacing 'file_01.tim' [d(ii).name] e.g. d = dir('*.tim'); ii = 1:size(d,1) bin=fopen(d(ii).name,'r'); %your processing etc savename = [strtok(d(ii).name,'.'), '.xls']; %change file ext .tim .xls dlmwrite(savename, ...  

android - can devices with bluetooth 4.0 and 3.0 or older interact with 2.0+EDR i.e send the command to be executed and recieve the output produced? -

i want communicate device bluetooth 2.0+edr type using android device i.e need send command , output device but problem have doubt whether bluetooth versions after 2.0+edr (2.1,3 , 4) can or must use same type this... are 3.0 , 4.0 backward compatible? , backward compatible mean can interact older versions or particular version?? please help. yes, backwards compatible have no problem. note, though, bluetooth 4.0 spec includes addition of new standard - bluetooth le - incompatible classic bluetooth. when people refer bluetooth 4 typically referring ble (though technically bluetooth 4 includes classic bluetooth too).

database - How to find the mysql data directory from command line in windows -

in linux find mysql installation directory command which mysql . not find in windows. tried echo %path% , resulted many paths along path mysql bin. i wanted find mysql data directory command line in windows use in batch program. find mysql data directory linux command line. possible? or how can that? in case, mysql data directory on installation folder i.e. ..mysql\mysql server 5\data might installed on drive however. want returned command line. you can issue following query command line: mysql -uuser -p -e 'show variables variable_name "%dir"' output (on linux): +---------------------------+----------------------------+ | variable_name | value | +---------------------------+----------------------------+ | basedir | /usr | | character_sets_dir | /usr/share/mysql/charsets/ | | datadir | /var/lib/mysql/ | | innodb_data_home_dir | ...

Cannot get ip address on raspberry pi -

i'm trying ssh raspberry pi wanted ip address mentioned in following link using ifconfig http://learn.adafruit.com/adafruits-raspberry-pi-lesson-6-using-ssh/using-ssh-on-a-mac-or-linux eth0 link encap:ethernet hwaddr b8:27:eb:63:40:b8 broadcast running multicast mtu:1500 metric:1 rx packets:27224 errors:0 dropped:0 overruns:0 frame:0 tx packets:733 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 rx bytes:2801074 (2.6 mib) tx bytes:107019 (104.5 kib) lo link encap:local loopback inet addr:127.0.0.1 mask:255.0.0.0 loopback running mtu:16436 metric:1 rx packets:0 errors:0 dropped:0 overruns:0 frame:0 tx packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 rx bytes:0 (0.0 b) tx bytes:0 (0.0 b) i did not list starts wlan0 i tried typing sudo ifconfig wlan0 got following error wlan0 error fetching interface information: device not found i'm connected through wired cable , ye...

android - Cordova's distro files (jar) are not generated -

i'm trying start simple cordova 3.0.0 project under windows. development environment (including java, eclipse, ant, android sdk) exist , has been used numerous native apps. i able create "hello" project using: >create hellocordova com.example.hellocordova "helloworldcordova" creating new android project... building jar , js files... copying template files... copying js, jar & config.xml files... creating appinfo.jar... copying cordova command tools... updating androidmanifest.xml , main activity... it worked ok, though there no distro files in project. after i've tried build cordova's distro files using update : >update hellocordova microsoft (r) windows script host version 5.7 copyright (c) microsoft corporation. rights reserved. building jar , js files... copying js, jar & config.xml files... copying cordova command tools... it not show errors, files cordova-3.0.0.jar , cordova-3.0.0.js missing in respective folders ( l...

authentication - Laravel - Auth:attempt no password -

my user migrate is: $table->increments('id'); $table->integer('matricula')->unique(); $table->timestamps(); the user log in 'matricula', don't need password in application, model user 'force' use password: class user extends eloquent implements userinterface, remindableinterface { ... public function getauthpassword() { return $this->password; } how authenticate without password? you set password field matricula. or, write own auth driver. default l4 allows use username or password login, can use 1 or other, or both. in laravel 3 specify field use username (email or username). regards

java - How can I modify generated files ,created using cxf-codegen plugin and then compile? -

i using cxf-codegen maven plugin .the first time did mvn install ,it generated set of files , placed in target/generated-sources/cxf folder , generated files compiled , packed in resulting jar maven. now find reason namespace attribute not fetched package--info.java while rest response created . server flings error saying javax.xml.bind.unmarshalexception: unexpected element (uri:"", local:"com.collabnet.teamforge.ia.types.getconfigurationparametersresponse"). expected elements \lt{http://www.collab.net/teamforge/integratedapp}createprojectconfigurationrequest\gt, \lt{http://www.collab.net/teamforge/integratedapp}getconfigurationparametersrequest\gt, \lt{http://www.collab.net/teamforge/integratedapp}getconfigurationparametersresponse\gt, \lt{http://www.collab.net/teamforge/integratedapp}getpagecomponentparametersrequest> so have planned , set namespace attribute in generated file (getconfigurationparametersresponse.java) @xmlrootelement(name = ...

Spring integration imap - multiple email accounts from the same domain -

i'm using spring's imap mechanism in order recieve emails account server. this works charm. anyhow, new requirmemnt came - instead of listening single email account have listen on multiple number of accounts. iv'e tried creating new channel each of these account. works! problem each channel added meaning new thread running. since i'm talking large number of accounts quiet issue. my question is: since email accounts (i listen to) in same domain i.e: acount1@mydomain.com acount2@mydomain.com acount3@mydomain.com .... is possible create single channel multiple accounts? is there alternative me defining n new channels? thanks. nir i assume mean channel adapter, not channel (multiple channel adapters can send messages same channel). no, can't use single connection multiple accounts. this limitation of underlying internet mail protocols. if using imap idle adapters, yes, not scale because needs thread each. however, if talking few 10...

string - R: How to change the column names in a data frame based on a specification -

i have data frame, start of below: sm_h1455 sm_v1456 sm_k1457 sm_x1461 sm_k1462 ensg00000000419.8 290 270 314 364 240 ensg00000000457.8 252 230 242 220 106 ensg00000000460.11 154 158 162 136 64 ensg00000000938.7 20106 18664 19764 15640 19024 ensg00000000971.11 30 10 4 2 10 note there many more cols , rows. here's want do: want change name of columns. important information in column's name, e.g. sm_h1455, 4th character of character string. in case it's h. want change "sm" part "control" if 4th character "h" or "k", , ...

Convert int datatype to string datatype c# access database -

i created windows application form project , there problem facing right now. problem is: had array of textboxes, , wanted connect database textboxes, however, cannot data because data want connect int datatype. there 2 form has been created, 1 login form, login form, database string, autocomplete working. second 1 second form, second form, database int, autocomplete not working. my question is: how convert int datatype string datatype? here code second form: string connectionstring = (@"provider=microsoft.ace.oledb.12.0;data source=\archives\projects\program\sell system\sell system\app_data\db1.accdb;persist security info=false;"); private list<list<textbox>> textboxcodecontainer = new list<list<textbox>>(); oledbdatareader dreader; oledbconnection conn = new oledbconnection(connectionstring); conn.open(); oledbcommand cmd = new oledbcommand("select distinct [code] [data] order [code] asc", conn); dreader...

sql - Cast/Convert Text-Decimal -

i know bad practice way can due data migration column requirements. i looking round up(ceil) or round down (floor) value in text feild. i know fact either integers or decimals no worry bad data there. update [dbo].[t01] set [2 37] = cast( floor(convert(decimal(10,5),(cast([2 37] varchar(10))))) text ) [2 37] '%.%' my first attempt was: update [dbo].[tomcat 19032013 01] set [2 37] = floor([2 37]) [2 37] '%.%' long story short want able floor or ceil data in text field! i using sql 2005 - developer edition you should add columns conversion. declare @t01 table([2 37] text, [2 37 floor] int, [2 37 ceiling] int) insert @t01 ([2 37]) values('1.5') insert @t01 ([2 37]) values('4.1') insert @t01 ([2 37]) values('5.9') update t set [2 37 floor]=floor(convert(decimal(8,2),(cast([2 37] varchar(10)))) ) , [2 37 ceiling] =ceiling(convert(decimal(8,2),(cast([2 37] varchar(10))))) @t01 t [2 37] '%...

Android service not starting, no idea why -

i'm trying run thread starting service, won't start. won't log. this inner service class. service class creates new background thread , starts it. backgroundthread , service class both innerclasses can reach variables. public class myservice extends service { private backgroundthread background; @override public ibinder onbind(intent intent) { return null; } @override public void oncreate() { super.oncreate(); toast.maketext(this, "my service created", toast.length_long).show(); log.d(tag, "oncreate"); background = new backgroundthread(); } @override public void ondestroy() { super.ondestroy(); toast.maketext(this, "my service stopped", toast.length_long).show(); log.d(tag, "ondestroy"); } public int onstartcommand(intent intent, int flags, int startid) { super.onstartcommand(intent, startid, startid)...