Posts

Showing posts from June, 2013

ios - Close and Re-open or refresh downloaded database -

This summary is not available. Please click here to view the post.

drupal - drupal_write_records() doesn’t work for those fields which was created by hook_update_n() -

currently have created table using install schema in drupal 7. after table alter add new column using hook_update_n(). now drupal_write_records() doesn’t work fields created hook_update_n(). regards, raj. hook_schema or hook_update_n ? drupal provides powerful , structured way of upgrading sites , making ddic changes. 2 important hooks hook_schema() provides structured, db independent way of defining table schema. when new module installed, hook_schema() automatically invoked (yes that's case in drupal 7, while in drupal 6 had explicitly used create tables) , tables created. now tables created , module being used, decide change in table, let's decided add new field. how change reach system , upgrade seamlessly module / code depending on field not break. drupal provides hook called hook_update_n() n numerical value indicating version of schema e.g. mymodule_update_1() first change , mymodule_update_2() second change , on. coming our example, suppose need

html - whitespace nowrap on span -

in case: <td> text <span class="icon"></span> </td> i want line break when necessary on text don't want span on new line, want stick part of text. how can it? thanks, how solved problem <table style="width:100px"> <tr> <td> showing <span style=" white-space: nowrap;">i meant <span> blah blah </span></span> </td> </tr> http://jsfiddle.net/v86tvqn0/

ios crash before launch - black screen on simulator -

Image
2014-11-18 16:33:01.840 record-upload[2077:112380] *** terminating app due uncaught exception 'nsunknownkeyexception', reason: '[<viewcontroller 0x7f84b3076400> setvalue:forundefinedkey:]: class not key value coding-compliant key pausebuttontapped.' *** first throw call stack: ( 0 corefoundation 0x00000001049cbf35 __exceptionpreprocess + 165 1 libobjc.a.dylib 0x00000001042bbbb7 objc_exception_throw + 45 2 corefoundation 0x00000001049cbb79 -[nsexception raise] + 9 3 foundation 0x0000000103a4a7b3 -[nsobject(nskeyvaluecoding) setvalue:forkey:] + 259 4 corefoundation 0x0000000104915e80 -[nsarray makeobjectsperformselector:] + 224 5 uikit 0x000000010507dc7d -[uinib instantiatewithowner:options:] + 1506 6 uikit 0x0000000104edcf98 -[uiviewcontroller _loadviewfr

java - No valid constructor error in EJB -

recently changing machine , had work creating new workspace environment. using eclipse kepler. code worked on previous machine don't know went wrong , tried recreating workspace again , again on previous machine. when running web application(primefaces,jsf,jpa 2.1 eclipselink 2.5,tomee 7,java 6,mojarra 2.1.6), "no valid constructor error" in ejb working on other machines. error : com.sun.faces.renderkit.clientsidestatehelper dogetstate severe: com.magnus.sessionejb.util.fiscalyrejb$$localbeanproxy; com.magnus.sessionejb.util.fiscalyrejb$$localbeanproxy; no valid constructor java.io.invalidclassexception: com.magnus.sessionejb.util.fiscalyrejb$$localbeanproxy; com.magnus.sessionejb.util.fiscalyrejb$$localbeanproxy; no valid constructor @ java.io.objectstreamclass.checkdeserialize(unknown source) @ java.io.objectinputstream.readordinaryobject(unknown source) @ java.io.objectinputstream.readobject0(unknown source) @ java.io.objec

php - Searching through multidimensional array to get information? -

i working on multidimensional array shows information riotgames's (the creators of league of legends) api. request api searched username , summonerid (playerid) returns information looks : array ( [summonerid] => 34943406 [playerstatsummaries] => array ( [0] => array ( [playerstatsummarytype] => aramunranked5x5 [wins] => 273 [modifydate] => 1416009440000 [aggregatedstats] => array ( [totalchampionkills] => 5808 [totalturretskilled] => 298 [totalassists] => 9025 ) ) [1] => array ( [playerstatsummarytype] => ascension [wins] => 2 [modifydate] => 1415466770000 [aggregatedstats] => array ( ) ) [2] => array ( [playerstatsummarytype] => cap5x5 [wins] => 41 [modifydate] => 1416177610000 [aggregatedstats] => array ( [totalchampionkills] => 562 [totalminionkills] => 9087 [totalturretskilled] => 79 [totalneutralminionskilled] => 2371 [totalassists] => 475 ) ) and goes on, depending on how many gamemodes p

lisp - Using entities from parent function -

usually obvious use entities of parent function function called within parent function. if have, (defun fun1(x)(let ((y nil))(fun2))) (defun fun2 () (print y))) then (fun1 2) complains y. how use entities parent function child function, fun2 able access entities of let scope of f1. you descritption , code wrong, i'll answer understanding want do. to such thing need declare variable special : (defun parent-fun (x) (let ((y nil)) (declare (special y)) (child-fun x))) (defun child-fun (x) (declare (special y)) ;; without declatation it'll work `(,x ,y)) ;; you'll warning cl-user> (parent-fun '(a b c)) ((a b c) nil)

android - how to declare R.color as a constant or retrieve it from the resources? -

is there way declare selector of listview constant in activity or refer constant resurces. i have following drawerlist.setselector(android.r.color.holo_red_light); , want declare holo_red_light constant in activity or retrieve thr resources, possible? create color.xml in res->values folder and add following tag <color name="holo_color">#your color hex value</color>

javascript (frontend) <--> node.js (backend) | Simulate websockets -

i hosting little website using iis 7.5 on windows server 2008 r2. i've got node.js application running on port 3000 , http calls frontend (client browser) reverse-proxied node.js app running on localhost:3000. works perfect. the problem comes when try use socket.io. i encountering problems trying reverse-proxy socket.io communitactions. it seems websocket support not available in iis 7.5. http://www.iis.net/learn/get-started/whats-new-in-iis-8/iis-80-websocket-protocol-support so without being able use socket.io, need simulate it's functionality using javascript on frontend , javascript (node.js) on backend. i need to: stablish comunication between frontend-backend. client waiting 10 minutes message-event sent server. a) if message received alert "ok". b) if message not received in 10 minutes alert "time up". regards,

Communicate between Shell and PHP? -

im going write php script should following: create user check for, download , install packages download files wget move files set permissions start applications screen stop screen session i don't want use default www-data user - how can exec cmd user? whats best way php on debian/ubuntu ? maybe run .sh file (+ params) shell_exec() ? depending upon need can use .sh exec too if have lots of commands under single action should prefer shell script for 1 liners shell_exec works efficiently. for more reference (regarding syntax) visit documentation

akka - How to provide subscriber with routing capability -

i have following path stream - kafkastream[message] -> kafkastream[message] -> mergedkafkastream[message] -> stream[enrichedmessage] -> i/o kafkastream[message] -> i not sure how write in akka stream way. tried following (pseudo). kafkastream extends actorpublisher[message] { } iohandler extends actorsubscriber { } k1, k2, k3 kafka streams publishers f = flow[message].map(_.enrichmessage) flowgraph { b => k1 ~> merge k2 ~> merge k3 ~> merge merge ~> f ~> iohandlersink } so way connect publisher sink. here problem want resolve slow io. iohandler actor slow processing message, how can have multiple iohandlers , should able distribute tasks. , want maintain pressure not using fire , forget using router. i new akka stream, suggest me way out. thanks you can route multiple iohandler sinks using balance junction in flowgraph .

jquery - Stop sticky sidebar overlapping with footer waypoints -

i have app has side navigation bar several links. using jquery waypoints make sure side navigation fixed user scrolls down page. working except links overlapping footer @ bottom of page. the view follows .container .row .col-sm-3 .side-navbar .nav %li %a{href: '#overview'} overview %li %a{href: '#specification'} ... .col-sm-9 #overview ... content ... #specification ... content ... #footer ... content .... i have following in js: $('.side-navbar').waypoint('sticky', { offset: 0 }); i aware bootstrap comes affix built in keen keep using waypoints if possible. advice on how stop overlap appreciated :) $('#footer').waypoint(function(direction) { $('.side-navbar') .toggleclass('sticky', direction === 'up') .toggleclass('at-bottom', direction === 'down') },

javascript - How to get content from external page where itemprop equals...? -

i content app page on google play website. right content included in .content class. numbers of installs. div looks this: <div class="content" itemprop="numdownloads"> </div> anybody knows how itemprop="numdownloads" .content class? this code right now: blade.php <?php echo file_get_contents($_get['url']); ?> script <script> $(function(){ var contenturi= 'https://play.google.com/store/apps/someapp .content'; $('#response').load('grab.php?url='+ contenturi); }); </script> you can use regular expression in php or in javascript also. i've implemented php version, pattern easy implement in javascript: $sitecontent = '' . '<div class="content" itemprop="7"> </div>' . '<div class="content" itemprop="5768"> </div>' . '<div class="content" i

android testing - Caching issue in uiautomator -

i have android app. doing automated testing of app using uiautomator. before doing processing need login app. @ first time store data in cache , login automatically every time when launch. i want application should logged in every time filled credential. is there way stop caching using uiautomator api. you can give below command before start tests, clear application data. start tests ! adb shell pm clear yourpackagename

python - Access Users Model foreign Key -

i writing first django app wanting utilise built in user model map own custom model. my application going manage users devices. this, have table called devices. wanting foreign key per device maps user model (so 1 user can have multiple devices). my question is, how add mapping in model. thing? class devices(model.model): deviceid = model.charfield(maxlength=10) owner = model.foreignkey(<user??>) thanks in advance, paul class device(model.model): deviceid = model.charfield(maxlength=10) owner = model.foreignkey(user) you should check standarts coding styles django coding style standarization use singular words classes begin class name capital letter begin class field non capital letter etc... you should check oficial documentation django: foreign key after model related via foreignkey can following actions, if have device object in variable called dev : dev.owner # return user object, can access user fields dev.owner.username d

android - How to handle home button click event in custom lock screen application -

i working in project custom lock screen must implemented once user clicks lock button. after clicking, application should locked , should prevent closing app while pressing home button. used following code disable home key pressed state: @override public void onattachedtowindow(){ log.i("teste", "onattachedtowindow"); this.getwindow().settype(windowmanager.layoutparams.type_keyguard); super.onattachedtowindow(); } public boolean onkeydown(int keycode, keyevent event){ if (keycode == keyevent.keycode_home) { log.i("teste", "botao home"); return true; } the problem above method not working latest versions. helpful if mentor me alternative solutions achieve task. in advance you can not override home key button.

c++ - How to convert ULONG64 to pointer -

i have ulong64 variable symbol_info structure contains virtual address represented 18446744073709551572 value , need convert void* can pass readprocessmemory function. if do reinterpret_cast<void*>(psyminfo->address) it gives me ffffffd4. why? doing wrong? how can fix it? thanks in advance. not sure why reinterpret_cast not working should use ulongtoptr these kind of things. readprocessmemory(process, ulongtoptr(virtual_address), &content, sizeof content, nullptr);

r - delete vertices using which on igraph vector -

Image
i trying delete vertices graph in igraph , not working. think issue might with > toosmall <- which(v(g)$coreness.all <= 5) as appears return integer(0). how can remove vertices graph below? > graph.coreness(g) [1] 1 19 1 3 17 19 5 19 19 19 19 7 19 18 17 12 12 19 19 17 16 19 3 3 7 12 18 4 5 12 12 3 1 6 19 5 19 19 3 19 17 17 19 19 5 1 1 7 8 19 1 2 [53] 7 3 17 5 4 19 3 16 1 3 13 3 14 10 10 13 8 18 18 12 6 10 12 14 11 16 12 7 5 7 5 10 15 16 10 3 5 5 16 16 16 13 16 16 16 16 16 15 10 6 2 1 [105] 14 16 16 11 5 11 16 11 10 16 2 14 7 8 1 10 12 12 12 19 8 10 7 5 13 3 19 16 3 4 4 19 13 7 16 13 11 13 15 13 3 2 3 3 2 9 14 16 16 14 16 13 [157] 13 15 13 11 12 11 1 1 11 19 7 3 19 3 7 5 19 19 19 19 19 19 19 18 19 11 13 17 4 19 16 19 11 9 9 12 19 16 11 19 4 7 4 19 6 6 9 2 15 8 7 5 [209] 10 7 3 10 6 8 4 11 13 2 7 6 7 6 9 4 3 3 13 3 13 9 4 13 5 5 6 6 6 14 8 2 5 7 7 14

c# - PayPal recurring payments using express checkout order summary -

Image
i trying setup paypal recurring payments using express checkout. follow instructions here . although code has bugs on own, got work. want customize order summary on paypal side, cannot work.. basicly, now, when user redirected paypal, user in order summary can see "recurringbilling" in picture below: "recurring billing details here" value batype.billingagreementdescription paypal's example. i show information in place order, purchasing, in pic below: i tried add info paymentdetail.paymentdetailsitem ( list<paymentdetailsitemtype> ), shows description anyway. maybe missing something, can this? also, can include receipt number link database?

java - Why do we need JSF tags , If we have HTML tags -

jsf mvc framework,but confused why need jsf tags if have many html tags. no doubt jsf has simplified lot of things. know more model view , controller in jsf. jsf component based mvc framework built on top of servlet api , provides components in favor of taglibs, can used in jsp or other java based view technology such facelets. facelets more suited jsf jsp. namely provides great templating capabilities such composite components, while jsp offers templating, you're forced create custom components raw java code (which bit opaque , lot of tedious work in jsf) when want replace repeated group of components single component. if can, recommend drop jsp , go facelets when want develop jsf. as being mvc (model-view-controller) framework, jsf provides facesservlet sole request-response controller. takes standard , tedious http request/response work hands, such gathering user input, validating/converting them, putting them in model objects, invoking actions , rendering resp

call - Android: calling a phone number on start of an application -

this question has answer here: how make phone call programmatically? 7 answers i'm new android, there way automatically call number (or @ least put in phone's dialer) when app opened? (the app needs no gui, needs call when opened) thank time! to make call, private void performdial(string numberstring) { if (!numberstring.equals("")) { uri number = uri.parse("tel:" + numberstring); intent dial = new intent(intent.action_call, number); startactivity(dial); } } add permission manifest. <uses-permission android:name="android.permission.call_phone" /> refer this

Grails rollback withTransaction on save -

i'm testing withtransaction got problem. why after saved object, cannot rollback it? example domain1 obj1 = new domain(name: "obj1") domain1.withtransaction { status -> if(obj1.save(flush:true)){ //save object, has no errors domain2 obj2 = new domain(name: asdasd) // making error happen if(!obj2.save(flush:true)){ // dont save, because not string status.setrollbackonly() // rollback obj1 } } else{ throw new persistenceexception("error", obj1.errors) } } there's way roll save()? when using transactions there important considerations must take account regards how underlying persistence session handled hibernate. when transaction rolled hibernate session used gorm cleared. means objects within session become detached , accessing uninitialized lazy-loaded collections lead lazyinitializationexceptions. to understand why important hibernate session cleared. consider following example: cla

How to use ActionForm, ActionForward, DispatchAction, ActionMessages in Struts2 -

i converting application struts1 struts2 need use actionform , actionforward , dispatchaction , actionmessages . how can use in struts 2? if convert app struts1 struts2 don't need use these classes because belong struts1, if want use struts2-struts1-plugin can use them. note using plugin is not easy , requires effort configure such application. see struts 1 plugin .

c# - ASP.NET website and ms excel integration -

i working on asp.net website , excel integration project. have excel file having lots of macros performs calculation. can pass values of cells , based on macros formula displays output in other cell of excel. need pass parameters asp.net website , display out put of excel on asp.net webform. able implement functionality using following code , working fine on while development. application excel = new application(); excel.displayalerts = false; excel.enableevents = true; //excel.visible = true; workbook wb = excel.workbooks.open(path, 0, false, 5, "", "", true, microsoft.office.interop.excel.xlplatform.xlwindows, "\t", true, false, 0, true, 1, 0); worksheet excelsheet = (worksheet)wb.activesheet; excelsheet.cells[37, 11] = 65; excelsheet.cells[37, 9] = 70; excelsheet.cells[14, 8] = "a"; excelsheet.cells[15, 8] = "b"

visual studio 2013 - Change name of source in Enterprise Library Logging -

Image
i using enterprise library logging easly log event viewer in windows. but don't know how change source if possible in enterprise library logging name of application (myapp example). i using visual editor easly edit options in enterprise library logging called: enterprise library configuration can see in picture. this app.config file generated enterprise library configuration editor: <configuration> <configsections> <section name="loggingconfiguration" type="microsoft.practices.enterpriselibrary.logging.configuration.loggingsettings, microsoft.practices.enterpriselibrary.logging, version=6.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35" requirepermission="true" /> <section name="exceptionhandling" type="microsoft.practices.enterpriselibrary.exceptionhandling.configuration.exceptionhandlingsettings, microsoft.practices.enterpriselibrary.exceptionhandling, version=6.0.0.0, culture=neu

rounding - PHP auto convert price to 99 rather than 100 -

i have different prices: 100 550 799 1200 350 wonder how can automatically convert them 99 549 799 1200 349 i'd -1, correct 799, , don't want 798. cant think of way conversion php not great math. bet need find if divides 2 if yes subtract 1 if not nothing. if ($price % 2) { $price = intval($price) - 1; } is best way it? something this? if(($price % 10) == 0) { $price--; }

c# - Get the text from a radiobuttonlist instead of the value -

i've searched on internet , can't seem find solution little problem. got radiobuttonlist selected value saying: radiobuttonlist1.selectedvalue this works great when trying value <asp:radiobuttonlist id="radiobuttonlist1" runat="server" repeatdirection="horizontal" repeatlayout="table" cellspacing="50"> <asp:listitem value="1" text="helt enig"></asp:listitem> <asp:listitem value="2" text="delvist enig"></asp:listitem> <asp:listitem value="3" text="hverken eller"></asp:listitem> <asp:listitem value="4" text="delvist uenig"></asp:listitem> <asp:listitem value="5" text="helt uenig"></asp:listitem> </asp:radiobuttonlist

azure - WCF on cloud is not working -

i created wcf service , deployed in 1 of machine's iis , checked works fine. when deploy same service on cloud vm's iis not able consume service. getting error saying "there no listener endpoint". can deploy normal wcf on cloud or need create wcf cloud service? environment(iis 8.5) it several things, probably: asp.net not activated on iis also check: the url using firewall problems site not started

ios - UIDevice has phone capability? iOS8 (can make phone call) -

i use method in uidevice category detect device phone capability. on ios8 not work more =( +(bool)hasphonecapability; { return [[uiapplication sharedapplication] canopenurl:[nsurl urlwithstring:@"tel:+11111"]]; } i suppose because of new handoff / continuety features introduced in ios8. lets answer or place phone calls on ipad , mac. i know revert detecting if device iphone , settle that. accurately test current device capability. an ipad correctly configured , in proximity paired iphone should detected device phone capability, not configured / without paired phone should declare device no phone capability. on ios 8, it's better check if device ipad or ipod touch, because hands off, device device return yes (simulator return no) on test. hope apple correct in future. that's block hands off capabilities work.

mysql - Echo out specific value from array PHP? -

i need insert specific array values in html form. query, fetch , array mysql table. when print_r($array) below output. question : let´s want echo out value dæk bag html form question, how do that? info : have 40 questions in form. ps. app own use only, , aware of use of mysqli or pdo instead of mysql -> change asap. array: array ( [0] => 1 [id] => 1 [1] => dæk [title_task_dk] => dæk ) array ( [0] => 2 [id] => 2 [1] => dæk bag [title_task_dk] => dæk bag ) array ( [0] => 3 [id] => 3 [1] => dæk alm. [title_task_dk] => dæk alm. ) array ( [0] => 4 [id] => 4 [1] => dæk indl. [title_task_dk] => dæk indl. ) array ( [0] => 5 [id] => 5 [1] => slange/lapning [title_task_dk] => slange/lapning ) my php code: <?php $results = mysql_query("select * task_list"); while($array = mysql_fetch_array($results)) { print_

ruby on rails - How to get all the associated models from ActiveRecord object? -

for example have class order < activerecord::base has_many :shippings has_one :contact_information belongs_to :shop end how array of associated objects order. example order.associations # [:shipping, :contact_information, :shop] order.reflect_on_all_associations.map(&:class_name) you can pass type of relation parameter: order.reflect_on_all_associations(:has_one) read activerecord::reflection::classmethods edit just realised, you've asked object's associated models. so, having i've showed, can along following lines: @some_order = order.first associated_models = @some_order.class.reflect_on_all_associations.map(&:class_name)

Regex: words containing alphabetic characters surrounded by non-alphabetic characters -

i'm noob regex , need solving this: find , remove ocurrences of groups of 1 or 2 alphabetic characters, surrounded non-alphabetic characters. may encounter latin characters must treated alphabetic character. using php, pcre regex flavor. for example: remove: a aa 33 a3 3a aa3 a3a 3aa 33a a33 3a3 aa3a a3aa 33a3 3a33 aa33 33aa a3a3 3a3a 3aa3 a33a aa3aa 3aa3a a3a3a aa3a3 33a33 a33a3 3a3a3 33a3a a3a33 aa3aa3 a3a3a3 3a3a3a 33a33a and on... in cases "aa3aaa", regex need match aa3 part. this got far: (\b\d*?[a-z]{1,2}\d*?\b)|(\b(\d+?[a-z]{1,2}\d+?)+?\b)|(\b([a-z]{1,2}\d+?[a-z]{1,2})+?\b)|(\b(\d+?[a-z]{1,2})+?\b)|(\b([a-z]{1,2}\d+?)+?\b) img: https://www.debuggex.com/i/gkz0uhvvhoysmn81.png regex @ debuggex i cannot match words: 3l3l3 l3l3l also cannot match partially word: aa3aaa any improving regex appreciated! thank much! you didn't regex flavor use, here's way using pcre: (?<!\p{l})\p{l}{1,2}(?!\p{l}) de

excel - Forms with vba code and importing -

how create access form has 2 fields importing 2 different excel files, , after selecting excel files press button run query (already exist) , automatically export query result in excel sheet. able create vba code (once played import dialog pop waiting user enter file path pops time second file, dialoge exporting result excel. problem how using forms in microsoft access.please give me suggestions or reference. agree boeckm, question little lacking in detail :-) if asking vba code fire macro's have create button , add following [on click] property private sub excel_button_click(cancel integer) docmd.setwarnings false ' switch off "are sure" message dim stdocname string stdocname = "qry_import file 1" docmd.openquery stdocname, acnormal, acedit stdocname = "qry_import file 2" docmd.openquery stdocname, acnormal, acedit stdocname = "qry_export file 3" docmd.openquery stdocname, acnormal,

Referential integrity constraint violation. H2 database -

im using h2 database. im have tables student(n_zk,fio,propiska....etc) , ekzamen(n_zk, pred, ocenka). ekzamen contains foreign key n_zk student. pieces of code: connecting database: public studentdao() throws exception { string url = "jdbc:h2:file:e:/kursach/db/db"; string user = "weaver"; string password = "12345"; // connect database myconn = drivermanager.getconnection(url,user,password); system.out.println("db connection successful to: " + url); } method addekzamen: public void addekzamen(ekzamen theekzamen) throws exception { preparedstatement mystmt = null; try { mystmt = myconn.preparestatement( "insert ekzamen " + " (n_zk, pred, ocenka)" + " values(?, ?, ?)"); //установить значения mystmt.setint(1, theekzamen.getnzk()); mystmt.setstring(2, theekzamen.getpred()); mystmt.setint(3, theekzamen.getocenka()); //применить sql mystmt.executeupdate(); } { close(mystmt); } } main: public stat

html - What are the input required attribute default declaration? -

Image
i facing strange problem. i have wordpress site, mailchimp wordpress plugin . there email field, has required attribute. around field, there red border or something. first inspected element, turn of css properties, border still there. i wondering why. when removed required attribute, border has gone. thought on right way, , add css: :required { border: none; outline: none; } that not helped me out. i visit page: http://www.w3schools.com/cssref/sel_required.asp but not see, default declarations selector. i tried search required on w3.org wiki, no success. so, of course first question how remove border, , second is, can find default declarations required? input[required], input:required { display:block; background-color: yellow; border: 0 !important; outline: none !important; }

java - How to display count of received message on tab of viewpager with PagerSlidingTabStrip android? -

Image
i building chat application. , in application using view pager pagerslidingtabstrip . below snapshot. now want show numeric counter on recent's tab when ever received new message user . please me stuck on point many days. thanks i did custom view. edit pagerslidingtabstrip.java file below. private void addicontab(final int position, int resid) { layoutinflater inflater = (layoutinflater)getcontext().getsystemservice(context.layout_inflater_service); view view = inflater.inflate(r.layout.image_tab, null); imagebutton tab = (imagebutton)view.findviewbyid(r.id.img_icon); tab.setimageresource(resid); addtab(position, view); } if use text tab, modify addtexttab() method. and layout.xml <?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/layout_container" android:layout_width="match_parent" andro

c# - read line from text file then How show line 1st word textbox1 until : symbol then 2nd textbox show after : symbol? -

my have below process 1 .txt file firstname:lastname sumon:kamal abdul:halim kamrul:khan rafiq: akbor how show 1st name textbox1 2nd textbox show last name? example clear textbox1 show sumon & textbox2 show kamal i trying more road still not getting road this. i trying using streamreader show textbox data full line coming. how reading 1 line 2 textbox both name? if take question right, want this. public partial class main : form { private const string path = "c:\\person.txt"; public main() { initializecomponent(); // read lines file @ specified path var lines = file.readlines(path); // take first line aquired collection var line = lines.firstordefault(); if (line == null) return; // split string first , last names var parts = line.split(':'); if (parts.length != 2) return; // send them textbox.text property t

Telerik rad schedule in wpf -

i using rad schedule control in wpf application .. want change label names appear in custom appointment pop appears when u click on appointment. default labels subject, start date, end date want change these names. please me in this. have been struggling long time

Python pip pkg_resources.DistributionNotFound -

pip sees package of version 1.4.0 , complains need >=0.9.34 version of it. isn't 1.4.0 > 0.9.34 ? root@36e7a0a55174:~/tldr-integration-tests# pip show testtools --- name: testtools version: 1.4.0 location: /usr/local/lib/python2.7/dist-packages requires: python-mimeparse, unittest2, extras root@36e7a0a55174:~/tldr-integration-tests# lettuce ./tldr_integration_tests traceback (most recent call last): file "/usr/local/bin/lettuce", line 5, in <module> pkg_resources import load_entry_point file "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2707, in <module> working_set.require(__requires__) file "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 686, in require needed = self.resolve(parse_requirements(requirements)) file "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 584, in resolve raise distributionnotfound(req) pkg_resources.distributionnotfound: testtools>=0.9.

c# - wcf client .exception "The provided URI scheme 'http' is invalid; expected 'https" -

i creating client wcf service. service works across sharepoint(i don't know, maybe it's important) config: <system.servicemodel> <bindings> <basichttpbinding> <binding name="commonservicejssoap_binding" > <security mode="transport"> <transport clientcredentialtype="windows"/> </security> </binding> </basichttpbinding> </bindings> <client> <endpoint address="http://blackwhite/_layouts/15/eos/commonservicejs.asmx" binding="basichttpbinding" bindingconfiguration="commonservicejssoap_binding" contract="commonservices.commonservicejssoap" name="commonservicejssoap_endpint" /> </client> </system.servicemodel> code: commonservicejssoapclient client = new commonservicejssoapclient(

python - How to scale Seaborn's y-axis with a bar plot? -

Image
i'm using factorplot(kind="bar") . how scale y-axis, example log-scale? i tried tinkering plot's axes, messed bar plot in 1 way or another, please try solution first make sure works. you can use matplotlib commands after calling factorplot . example: import seaborn sns import matplotlib.pyplot plt sns.set(style="whitegrid") titanic = sns.load_dataset("titanic") g = sns.factorplot("class", "survived", "sex", data=titanic, kind="bar", size=6, palette="muted", legend=false) g.fig.get_axes()[0].set_yscale('log') plt.show()

c - Why does my append function no longer write to file -

i'm writing code simple phone book. works fine except after deleting entry using delete function append function cant seem write entries file anymore. unless delete database.data file i'm using store entries. note: character array file="database.data" delete function: void deletee() { int tode,count; char ch; printc(); count=1; file *filepointer,*filepointer2; filepointer=fopen(file,"r+"); filepointer2=fopen("datatemp.data","w+"); if(filepointer==null) { printf("error error!"); } printf("enter line number of line deleted: \n"); scanf("%d",&tode); while (ch!=eof) { ch=getc(filepointer); if(ch=='\n') { count++; } if(count!=tode) { fprintf(filepointer2,"%c",ch); } } fclose(filepointer); fclose(filepointer2); remove(file); renam

Scaling on SVG icons through CSS within a :before selector -

This summary is not available. Please click here to view the post.

gmail - How to send to a "group contact" or distribution list using Google Inbox -

after moving on inbox unable send emails groups/distribution lists have set in gmail contacts. i must missing simple.. can set me straight? from gmail google group: "not feature of google inbox" https://productforums.google.com/forum/#!searchin/gmail/inbox$20group$20email/gmail/u-l6qsj68gw/oev7uxibvuej

javascript - Get element by ID is not working -

verry simple question: i have html: <div id="test" style="border: 1px solid red; width: 300px;"> text </div> and js in seperate .js file: $('#test').hover(function(){ alert('it's working'); }); i no errors fire bug , googled lot on this. please help: why code not working? thanks in advance you need wait until dom loaded, otherwise, javascript run before #test exists. can wrapping code in ready function, this: $(document).ready( function() { $('#test').hover(function(){ alert("it's working"); }); }; this tricky problem can go unnoticed, because won't error jquery operating on empty selection. alternatively, move script bottom of page, executes after rest of dom loads, preference approach way.

user interface - How to style each item of a Spinner in Android (fontColor, typeface) -

i want dislplay spinners selecting fontcolor , fontfamily. aim give user preview of font/color inside spinner. need style each item of spinner individually. how can achive that? from question, guessed going customize spinner in android. first of all, please refer xml code snippet. activity_main.xml <spinner android:id="@+id/service_spinner" style="@style/drop_down_spinner_style" /> styles.xml <style name="drop_down_spinner_style"> <item name="android:layout_width">match_parent</item> <item name="android:layout_height">@dimen/spinner_normal_height</item> <item name="android:background">@drawable/spinner_bg1</item> <item name="android:dropdownwidth">match_parent</item> </style> /drawable/spinner_bg1.xml <?xml version="1.0" encoding="utf-8&q