Posts

Showing posts from September, 2010

sql - Mysql auto-initialization of timestamp column when adding it to an existent table -

sql - Mysql auto-initialization of timestamp column when adding it to an existent table - i want add together column table maintain track of when each record lastly updated. have info in table. the sql query running this: alter table `my_table` add together column `last_modified` timestamp not null default current_timestamp on update current_timestamp`; when adding columns of other types existent records default value specify column. in case existent records getting assigned value of: 0000-00-00 00:00:00 why happening if explicitly said wanted default current timestamp? mysql sql timestamp

python - File size not updated after write()? -

python - File size not updated after write()? - in below code trying receive file python sockets , write local file have next code chunk=clientdtsocket.recv(1024) while chunk: print("in chunk"+str(chunk)) incomingfile.write(chunk) chunk=clientdtsocket.recv(1024) i following class="lang-none prettyprint-override"> in chunkb'sohail khan' but file size remains same. how can count no of bytes have recieved. when open file set write buffer size 0: bufsize = 0 incomingfile = open('....', 'w', bufsize) it normal behevior, info saved file not immidiately after calling write function, afted write buffer totaly filled. if setup buffer size 0 in axample above, yoor info written immidiatel. writting info write buffer file callaed "flushing" flushing occured when close file: incomingfile.close() python sockets file-io

debugging - Printing out Haskell's evaluation (rewriting) steps for educational/learning purposes. Is it possible? -

debugging - Printing out Haskell's evaluation (rewriting) steps for educational/learning purposes. Is it possible? - i describe question using illustration book. in simon thompson's book "haskell craft of functional programming" on page 82 (see images below) shown evaluation steps fac 4 . question: is possible utilize tool or "haskell debugger" write out evaluation steps ghci uses when evaluate value of fac 4 ? preferably in human readable format, educational , learning purposes. it have automatic explanation each evaluation step, illustration equation used in rewriting step. my main purpose gain deeper understanding of how rewriting steps carried out when run simple educational haskell illustration programs (like fac ). is there way ? if yes, how ? yes , no. haven't seen tool yet line-by-line evaluation depicted in textbook - because haskell programm no "rewriting" of expressions. however, there tool visual

javascript - SVG-Pan-Zoom on DOM Object tag not working -

javascript - SVG-Pan-Zoom on DOM Object tag not working - i have <object> load external svg file: <object type="image/svg+xml" data="system.svg" id="graph_container" class="graphcontainmentarea"> browser not back upwards svg </object> i using svg pan , zoom functionality of next library: https://github.com/ariutta/svg-pan-zoom. however, adding svg-pan-zoom.js file page seems not sufficient in adding kind of functionality svg contained in object code: <?xml version="1.0" encoding="utf-8"?> <iw:iwidget id="graphcontainer" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:iw="http://www.ibm.com/xmlns/prod/iwidget" supportedmodes="view edit" lang="en" iscope="graphcontainerscope" title="graph container widget"> <iw:content mode="view"> <![cdata[ &l

git status shows staged files but git commit says nothing to commit -

git status shows staged files but git commit says nothing to commit - i added stage lot of files (renamed, deleted , new files). when git status, have lot of files staged commited in green, when git commit, says there nil commit... wrong? hope not lose changes. git status on branch develop changes committed: (use "git reset head <file>..." unstage) new file: docs/file1 new file: docs/file2 new file: docs/file3 modified: webapp/file1.py modified: webapp/file2.py # etc... git commit -m "commit message" on branch develop nil commit, working directory clean if git log, see commit weird still see files in stage when git status. git log commit 3a2b50f1f48912fc156504b82328fdcc3d6e2333 author: mike date: tue oct 7 15:28:06 2014 -0500 commit message git

objective c - How can IOS Photos app can show hundreds of photos in one screen? -

objective c - How can IOS Photos app can show hundreds of photos in one screen? - i working on application relies on showing lots of photos on screen multiple sources. i wondering how apple create "photo tile" view in photo app? much photos, in sentiment app should give memory warning less photos (even if load photos in "thumbnail size") displayed @ once, can see can show hundreds of photos in 1 screen when zoom out. one way can think of these views not individual photos single 'tiled' images generated photos on real time, app shows 2-3 photos @ once. still needs lots of cpu powerfulness , time generate fast. can zoom in or out instantly . i want accomplish similar functionality in app, directions on how accomplish great. thanks answers. i have made research , found ios8 has wonderful new framework called "photos framework" this framework lets cache images, phone call thumbnail images predefined sizes , load items. (ol

html - how align div one beside other, and on other div -

html - how align div one beside other, and on other div - i tried codes but, no works anything. create css, =) this code tried, doesn't work. #left{ float:left; width:65%; overflow:hidden; } #right{ overflow:hidden; } <div id="wrapper"> <div id="left">left side div</div> <div id="right">right side div</div> </div> i don{t know why doesnt work. html css share|improve question asked oct 14 '14 @ 21:47 mike brian olivera 87129 add comment |  4

x509certificate - Verifying Signed Hash using Digital Signature -

x509certificate - Verifying Signed Hash using Digital Signature - i implementing interface takes 3 things input x509 certificate a signedhash signed certificate’s private key the initial hash it must perform next actions: confirm hash signed using provided certificate. decrypt signed hash using public key of certificate provided input, , check matches provided hash. i have implemented next verifying digital signature :- public static boolean verifysignedhash(string x509certificate, string hash, string signedhash) { boolean isverified = false; bytearrayinputstream inputstream = null; bytearrayoutputstream outputstream = null; bytearrayoutputstream byo = null; seek { outputstream = new bytearrayoutputstream(); byte[] info = base64.decodebase64(x509certificate); /* writing decoded x509 certificate bytearrayoutputstream */ outputstream.write(data);

javascript - scroll horizontal and vertically -

javascript - scroll horizontal and vertically - i'm next scrolling page i've done horizontally. but have question, possible utilize both (verticall , horizontall) in same page? for example, have 3 items 1,2,3 scrolling horizontally. within 1, have 2 items, (1 1', , 2', 3'). can utilize scroll vertically here using above link? i think looking fullpage.js. it allows scroll vertically , horizontally. javascript jquery html css slider

jquery - JavaScript 'smooth scroll' will not scroll -

jquery - JavaScript 'smooth scroll' will not scroll - question background: i'm developing single page site using twitter bootstrap 3 within asp.net mvc project. the problem: im attempting implement 'smooth scrolling' should scroll to relevant div clicked navbar drop down. @ moment when section clicked navbar drop downwards 'jumps' div rather scroll. the code: this next '_layout.cshtml' markup provides navbar , footer. javascript scroll shown between script tags: <!doctype html> <html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>@viewbag.title - asp.net application</title> @styles.render("~/content/css") @scripts.render("~/bundles/modernizr") <script> $('#nav .navbar-nav li>a').click(function () { var link = $(this).attr('href')

sql - How generate oracle string sequence? -

sql - How generate oracle string sequence? - i need generate unique identifiers must no longer 5 length, because of numbers don't fit, there way generate unique strings in oracle database? this method utilize numbers in hex format. select to_char(seq.nextval, 'fm0xxxx') dual; or more compact method utilize symbols between ascii code 33 , 122: select num, chr(33 + mod(floor(num/(90*90*90*90)), 90))|| chr(33 + mod(floor(num/(90*90*90)), 90))|| chr(33 + mod(floor(num/(90*90)),90))|| chr(33 + mod(floor(num/90),90))|| chr(33 + mod(num,90)) x00000 (select seq.nextval num dual); basically representation of 90-based number. sql oracle sequence

objective c - Image orientation issue AVCaptureOutput delegate iOS sdk -

objective c - Image orientation issue AVCaptureOutput delegate iOS sdk - i'm working on face detection functionality , getting buffer in delegate below when seek create uiimage ciimage, i'm getting image in landscape code, have portrait orientation in app: 1)- on generating session, tried create portrait mode: // previewlayer kind of avcapturevideopreviewlayer if ([self.previewlayer.connection isvideoorientationsupported]) [self.previewlayer.connection setvideoorientation:avcapturevideoorientationportrait]; 2)- delegate: - (void)captureoutput:(avcaptureoutput *)captureoutput didoutputsamplebuffer:(cmsamplebufferref)samplebuffer fromconnection:(avcaptureconnection *)connection 3)- unable rotate uiimage image.cgimage nil cvpixelbufferref pixelbuffer = cmsamplebuffergetimagebuffer(samplebuffer); ///cvpixelbufferref pixelbuffer = [self rotatebuffer:samplebuffer]; cfdictionaryref attachments = cmcopy

objective c - How To Use Variable Value Outside Block? -

objective c - How To Use Variable Value Outside Block? - i have next code checking connectivity of app. want display connectivity status in uilabel on custom uiview slides in when connectivity status changes. [edit] __block nsstring * strconnectivitystatus = @""; [[afnetworkreachabilitymanager sharedmanager] startmonitoring]; [end edit] [[afnetworkreachabilitymanager sharedmanager] setreachabilitystatuschangeblock:^(afnetworkreachabilitystatus status) { nslog(@"reachability: %@", afstringfromnetworkreachabilitystatus(status)); strconnectivitystatus = afstringfromnetworkreachabilitystatus(status); switch (status) { case afnetworkreachabilitystatusreachableviawwan: viewconnectivitystatus.hidden = false; lblconnectivitystatus.text = afstringfromnetworkreachabilitystatus(status); case afnetworkreachabilitystatusreachableviawifi: viewconnectivitystatus.hidden = false; lbl

Three dimensional array in c program -

Three dimensional array in c program - after putting efforts unable solve next question. question asked in graduate aptitude test in engineering science (gate) 2014, india. question) c programme accessing x[i][j][k] , next intermediate code generated compiler. assume size of integer 32 bits , size of character 8 bits. t0 = * 1024 t1 = j * 32 t2 = k * 4 t3 = t1 + t0 t4 = t3 + t2 t5 = x[t4] which 1 of next statements source code c programme correct? (a) x declared " int x[32][32][8] ". (b) x declared " int x[4][1024][32] ". (c) x declared " int x[4][32][8] ". (d) x declared " int x[32][16][2] ". one of book provide solutions previous papers says reply alternative (a). how? explanation thanks in advance t1 i * (inumints * sizeof(int)) . so, inumints * 32 = 1024. thus, inumints = 32. t1 j * (jnumints * (inumints/sizeof(int)) , becasue there 1 j every row of i . so, jnumints * 1 = 32. thu

css - WordPress wp_enqueue_style not working -

css - WordPress wp_enqueue_style not working - i trying include css file in wordpress plugin admin page. have tried below method function theme_name_scripts() { wp_enqueue_style( 'jspro', '/includes/parts/css/jspro.min.css'); } but unfortunately doesn't work. css file path right given here,and have tried every method. idea? you need have absolute url css file, , hook right admin hook (in case, 'admin_init' ): add_action( 'admin_init', 'theme_name_scripts' ); function theme_name_scripts() { wp_enqueue_style( 'jspro', plugins_url('includes/parts/css/jspro.min.css', __file__)); } css wordpress styles

postgresql do not aggregate by my timestamp -

postgresql do not aggregate by my timestamp - i have sql following: with cte ( select user_id,level,plugged,plugged_ac,plugged_usb,created_at probe_batteries probe_batteries.user_id='91' , probe_batteries.created_at > timestamp '2014-06-07 17:00:00' , probe_batteries.created_at < timestamp '2014-06-07 23:00:00' ) select cte.user_id user_id, avg(cte.level), bool_or(cte.plugged), bool_or(cte.plugged_ac), bool_or(cte.plugged_usb),date_trunc('second',cte.created_at) created_at cte grouping created_at, user_id order created_at asc but table result not aggregate according created_at (see lastly column in results) timestamp type 91;95.0000000000000000;f;f;f;"2014-06-07 20:46:06" 91;95.0000000000000000;f;f;f;"2014-06-07 21:19:11" 91;95.0000000000000000;f;f;f;"2014-06-07 21:19:12" 91;95.0000000000000000;f;f;f;"2014-06-07 21:19:12" 91;95.0000000000000000;f;f;f;"2014-06-07 21:19:12" 9

struts2 - Not able to add a value dynamically in select tag using struts 2 -

struts2 - Not able to add a value dynamically in select tag using struts 2 - its simple question, yet not able find solution. i'm able print value without 0's in page, not able bind values select tag in options. my code ${sa.replace("0", "")} displays numbers without 0's but, options values doesn't display in ui <option value="<s:property value="%{#sa}"/>" <s:if test="%{#sa == #sumassured.tostring()}"> selected="" </s:if> > <span class="eurosymbol formatamount"><span> <s:property value="%{#sa.replace('0','')}"/></span></span> </option> to utilize objects in ognl, object should in value stack. can utilize attr object search in other scopes. class="lang-jsp prettyprint-override"> <option va

python - scikit-bio installation test failure, FAIL: _plot_box_data() should return a dictionary for Line2D's -

python - scikit-bio installation test failure, FAIL: _plot_box_data() should return a dictionary for Line2D's - installed scikit-bio on mac, dependencies scikit-bio installed. received error below. traceback included. followed instruction on https://pypi.python.org/pypi/scikit-bio skbio test , used "conda install scikit-bio" installed without error or issue. can help me understand having issues? give thanks tt0463-5:~ ron$ nosetests --with-doctest skbio ............................................................................./users/ron/anaconda/lib/python2.7/site-packages/skbio/alignment/_pairwise.py:594: userwarning: make_identity_substitution_matrix deprecated , replaced, though @ time of writing new name has not been finalized. updates posted issue #161: https://github.com/biocore/scikit-bio/issues/161 warn("make_identity_substitution_matrix deprecated , " .....................................................................................

mysql - Join album with its images count and cover? -

mysql - Join album with its images count and cover? - i'm trying results 2 tables using mysql, below format of 2 tables: albums images ------------------------------ ---------------------------- id | name | cover id | image | album ------------------------------ ---------------------------- 1 | album1 | 3 1 | image1.jpg | 2 2 | album2 | 1 2 | image2.jpg | 3 3 | album3 | 0 3 | image3.jpg | 1 4 | album4 | 0 4 | image4.jpg | 1 ------------------------------ 5 | image5.jpg | 3 6 | image6.jpg | 1 ---------------------------- now given tables above, i'd result this: ------------------

css - Image alignment in HTML -

css - Image alignment in HTML - i stuck on problem of aligning image next partition in html. below code. want image right of partition can't seem it. <h1><u><center> adolf hitler </center></u></h1> <br/> <div style="height:1000px; width:500px;"> adolf hitler (20 apr 1889 – 30 apr 1945) austrian-born high german politician , leader of nazi party. chancellor of federal republic of germany 1933 1945 , dictator of nazi federal republic of germany (as führer und reichskanzler) 1934 1945. hitler @ centre of nazi germany, world war ii in europe, , holocaust. hitler decorated veteran of world war i. joined high german workers' party (precursor of nsdap) in 1919, , became leader of nsdap in 1921. in 1923, attempted coup in munich seize power. failed coup resulted in hitler's imprisonment, during time wrote memoir, mein kampf (my struggle). after release in 1924, hitler gained popular back upw

Installing Nginx in front of node.js on local windows 7 -

Installing Nginx in front of node.js on local windows 7 - i have node.js server running locally on windows 7 , add together nginx server serve static files. after downloading , extracting nginx, when run nginx.exe, nginx accessible node within nginx folder. how can create run automatically , accessible globally in node? going on various tutorials, describe configuration linux assume there differences in .conf file? if so, they? edit using express.js maintain getting 404 when trying serve css file... here request url: 127.0.0.1:3000/public/css/style.css , here config file: worker_processes 1; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; server_names_hash_bucket_size 64; sendfile on; keepalive_timeout 65; server { hear 0.0.0.0:80; server_name localhost; access_log path_to_log; location / { proxy_set_header x-real-ip $remote_addr; proxy_s

geotools - Neo4j Spatial over REST through the JAVA API not working (for me) -

geotools - Neo4j Spatial over REST through the JAVA API not working (for me) - i'm working on grails app on neo4j i'd export gis database. looking @ examples how utilize neo4j in geoserver/udig appears spatial integration via embedded neo4j databases. does know whether it's possible set things neo4j available on rest, can interface variety of places? at first sight appears ought possible: // works embedded database //def graphdb = new graphdatabasefactory().newembeddeddatabase("/tmp/foo.db"); // doesn't work rest database graphdb = new restgraphdatabase("http://localhost:7474/db/data"); transaction tx = graphdb.begintx() spatialdatabaseservice spatialservice = new spatialdatabaseservice(graphdb) simplepointlayer layer = spatialservice.createsimplepointlayer("points") with embedded database, spatial index gets created fine. however, rest database, null pointer: caused nullpointerexception: null ->> 149 | create

Copy data from EWS Extended property to Outlook item UserProperty -

Copy data from EWS Extended property to Outlook item UserProperty - in plugin utilize extendedproperty save metadata on it. set values of extendedproperties using ews. receive requirement not utilize ews anymore , it's allowed connect outlook only. see can utilize userpropery of mailitem. have migrate old info way. firs come mind query items have specific extended property using ews , re-create values mailitem.userproperty. know how query ews or maybe have ideas how migrate data? using extendedproperties ews creates custom mapi properties on outlook items, accessible in outlook object model via userproperties collection or via propertyaccessor. shouldn't need migrate anything. outlook outlook-addin ews

c# - Constants in static classes -

c# - Constants in static classes - with utilize of static classes (and constant strings) want able constant values this: var value = constants.labels.controls.topnavigation.save; i created construction problem: public static class constants { public static class labels { public static class controls { public static class topnavigation { public const string save = "save"; public const string refresh = "refresh"; } } public static class general { public static class errors { public const string unexpectederror = "an unexpected error occured."; } } } } now problem is, if define in it, grow enormously. best way split different/partial classes or folder construction keeps maintainable. maintain in mind... value, want obligate user start constants.labels.... if

cordova - APPHOST9613 InAppBrowser on Windows 8.1 -

cordova - APPHOST9613 InAppBrowser on Windows 8.1 - i error code when seek open url on windows 8.1. code works on ios , android. apphost9613 any ideas why? cordova visual-studio-2013 hybrid-mobile-app inappbrowser

javascript - Is it possible to determine whether you are in the last row of a css-defined column? -

javascript - Is it possible to determine whether you are in the last row of a css-defined column? - i using new css-style column break single ul multiple columns. wish select lastly element in each column javascript or css. html: <ul> <li /> <li /> <li><h4 /></li> ... </ul> css: ul{ column-count: 6; } sometimes line-items h4:s in them end lastly item of row, beingness orphans. solve this, , have been looking @ 2 alternatives. using css orphan property, due markup don't think work @ , not unsupported in firefox , safari, back upwards not must nice. adding top-margin/padding h4 @ end of column, don't know how select them, either css or javascript/jquery. prefer keeping markup, is, if it's not possible, can alter it. columns in css aren't content aware. 2 properties related columns can help in way column-fill (which works in firefox) , break-inside. column-fill distribute contents t

Does the Java VM provide custom stream handlers like PHP -

Does the Java VM provide custom stream handlers like PHP - php's stream api provides features create custom "streams" within zend engine. these stream features designed , sense if native unix-like file descriptors 1 can fopen, fwrite, fread, fseek, etc if normal file, custom handlers (for example) open database connection on fopen, perform sql select on fread, sql insert on fwrite, etc, creating "high-level" database api behaves normal file. these stream handlers best when written in c/c++, , php/zend provide native api creating stream handlers. does java vm provide native api type of info handling? it sounds describing java.nio , particularly java.nio.channels packages. example, java.nio.channels.channel javadoc says (in part) a channel represents open connection entity such hardware device, file, network socket, or programme component capable of performing 1 or more distinct i/o operations, illustration reading or writing. j

python - Django Haystack Reverse URL Failing -

python - Django Haystack Reverse URL Failing - i trying configure barebones possible setup django haystack. in html, have form resolves url using named url pattern. here html code. <form id="search-ticket-form" class="navbar-form navbar-left dropdown" method="get" action="{% url "search_ticket" %}" role="search"> django returns error every time saying "reverse 'search_ticket' arguments '()' , keyword arguments '{}' not found. 0 pattern(s) tried: []" here configuration in urls.py: urlpatterns = patterns('', url(r'^$', contact.views.home, name='homepage'), #url(r'^blog/', include('zinnia.urls', namespace='zinnia')), url(r'^profile/', include('user_profile.urls')), url(r'^registration/', include('registration.urls')), url(r'^comments/', include('django_comments.urls'))

c++ - Are there any alternatives to making const version of class? -

c++ - Are there any alternatives to making const version of class? - in c++ i'm facing situation when need prepare const , non-const version of class in analogy const_iterator , iterator standard library. class const_myclass { public: const_myclass(const int * arr): m_arr(arr) { } int method() const; //does m_arr without modifying private: const int * m_arr; } class myclass { public: myclass(int * arr): m_arr(arr) { } int method() const; //does m_arr without modifying void modify(int i); //modify m_arr private: int * m_arr; } the problem need repeat whole code of const_myclass in myclass , distribute changes in api both classes. inherit const_myclass , const_casts, isn't perfect , pretty solution. still when want pass const_myclass instance reference looks moronic: void func(const const_myclass & param) instance param marked 2 "consts", , has c

vb.net - Need to catch if a string has a number in it vb -

vb.net - Need to catch if a string has a number in it vb - i want add together grab statement see if targetword has number inputted it. console.writeline("enter word want guess: ") targetword = console.readline if want know if given string contains digits can utilize char.isdigit : dim input = console.readline() ' example: abc123def dim digits = input.where(addressof char.isdigit) if digits.any() ' ... end if so if want inquire user new string until enters 1 without digits: while digits.any() input = console.readline() digits = input.where(addressof char.isdigit) end while vb.net try-catch

list - Print columns of Pandas dataframe to separate files + dataframe with datetime (min/sec) -

list - Print columns of Pandas dataframe to separate files + dataframe with datetime (min/sec) - i trying print pandas dataframe's columns separate *.csv files in python 2.7. using code, dataframe 4 columns , index of dates: import pandas pd import numpy np col_headers = list('abcd') dates = pd.date_range(dt.datetime.today().strftime("%m/%d/%y"),periods=rows) df2 = pd.dataframe(np.random.randn(10, 4), index=dates, columns = col_headers) df = df2.tz_localize('utc') #this not seem giving me hours/minutes/seconds i remove index , set separate column: df['date'] = df.index col_headers.append('date') #update column keys at point, need print 5 columns of dataframe separate files. here have tried: for ijk in range(0,len(col_headers)): df.to_csv('output' + str(ijk) + '.csv', columns = col_headers[ijk]) i next error message: keyerror: "[['d', 'a', 't', 'e']] not i

ruby on rails - Getting Records Based on Count of Associated Model -

ruby on rails - Getting Records Based on Count of Associated Model - i want utilize statement following: baseproduct.where(baseproduct.products.count => 1) this doesn't work.i undefined method 'products' class xyz. in rails console though, can do baseproduct.first.products and output. how records associated model count 1? associations: class baseproduct < activerecord::base has_many :products end class product < activerecord::base belongs_to :base_product end please seek this product.select('base_product_id, count(base_product_id) c').includes('base_product').group('products.base_product_id').having('c > 1') ruby-on-rails ruby

Html scaling row -

Html scaling row - i have table layout as can see first row on left scaling accordingly "notes" column. how can create left rows same height? this: here fiddle layout. http://jsfiddle.net/cleverketchup/nhe26e8y/ and code: <table cellspacing="1" cellpadding="5" width="100%" border="1"> <tr> <td rowspan="2">arrival<br/>atis 1</td> <td rowspan="2"></td> <td colspan="5">notes</td> </tr> <tr> <td colspan="5" rowspan="3">selected profiles:</td> </tr> <tr> <td>arrival<br/>atis 2</td> <td></td> </tr> <tr> <td>alt<br/>atis</td> <td></td> </tr> </table> solution 1: css overflow why don't utilize css t

Problems enrolling Android client in WSO2 EMM -

Problems enrolling Android client in WSO2 EMM - i want utilize wso2's enterprise mobility manager manage big amount of android-tablets (100+). don't have ios devices, @ moment focus on android. have setup emm server , able acces device manager @ https://myurl.com:9443/emm . have downloaded wso2 android agent app wso2 git here. after fixing ssl-related errors able succesfully create connection server. however, when utilize agent app enroll device (an acer iconiatab android 4.0.3) logcat in eclipse shows various logging messages (at verbose level): 11-10 14:55:29.050: d/wso2mdm(4573): effort #1 register 11-10 14:55:29.190: d/dalvikvm(4573): gc_concurrent freed 368k, 12% free 7903k/8903k, paused 2ms+9ms 11-10 14:55:29.320: d/dalvikvm(4573): gc_concurrent freed 710k, 14% free 7705k/8903k, paused 3ms+4ms 11-10 14:55:29.410: v/wso2mdm(4573): posting '{regid=apa...wrg}' https://myurl.com:9443/mdm/api/devices/isregistered 11-10 14:55:29.410: v/wso2mdm(4573): post

c++ - Incrementing Progressbar continously in MFC -

c++ - Incrementing Progressbar continously in MFC - completing execution in application have modal dialog. when clicks on button in dialog, pops modelless dialog progress bar. i using worker thread incrementing progress bar in modelless dialog. in parent dialog after popping modelless dialog, calling api dll , main thread busy.when main thread( parent dialog) busy, worker thread not incrementing progress bar.if main thread not busy progress bar getting incremented. i tried sending notification main thread worker thread using postmessage , sendmessage also... after completing execution of dll api main thread updating ui. any help appreciated. thanks. while main thread busy not process messages. postmessage or sendmessage worker thread has wait. solution perform busy function in worker thread, not main thread. c++ multithreading visual-c++ mfc

java - Checking user input against information in a .txt file -

java - Checking user input against information in a .txt file - i creating project in currency exchange. 1 of steps have user input type of currency want convert dollar. have while loop check , create sure input right against text file. the text file has cd 1.05 0.93 mp 0.11 0.095 european union 1.554 1.429 so person come in cd mp or european union not sure how check it. using eclipse , txt file in project folder. public class communication { public string askforcode(){ string currencycode = joptionpane.showinputdialog(null, "we exchange next currencies: \n " + "cd (canadian dollar)\n" + "mp (mexican peso) \n" + "eu (euro) \n" + "enter currency code"); file myfile = new file("dailyrates.txt"); while (!currencycode.equals){ } homecoming currencycode; } would utilize file.next line validate it? you utilize showop

java - SpeechRecognizer keeps getting ERROR_NETWORK -

java - SpeechRecognizer keeps getting ERROR_NETWORK - i'm using speechrecognizer convert voice text, encounter problem speechrecognizer keeps getting error_network (like 80 percent possiblilty). encounter kind of problem. have on this , this. and android define speechrecognizer. got error because utilize other network. seek utilize google default netowrk using setting. may helps... java android error-handling speech-recognition

haskell - Type-level restriction on "mixed" arrays, while allowing arrays of arrays with different content in the inner arrays -

haskell - Type-level restriction on "mixed" arrays, while allowing arrays of arrays with different content in the inner arrays - i have next info structure: data value = vstring text | vinteger integer | vdouble double | vbool bool | varray [value] | vdate utctime deriving (eq, ord, show) the next arrays valid according value info type: varray [vinteger 1, vinteger 2] varray [varray [vinteger 1, vinteger 2], varray [vstring "a", vstring "b"]] now want enforce on type-level next arrays prohibited (while above definition of value allowed): varray [vinteger 1, vdouble 2.0] varray [varray [vinteger 1, vinteger 2], vbool true] in other words, want prohibit "mixed" arrays, while allowing arrays of arrays different content in inner arrays. arrays may nested arbitrarily deep levels. how can alter definition of value (and perchance add together other definitions) facilit