Posts

Showing posts from July, 2012

jquery - only close tooltip if mouse is not over target or tooltip -

using jquery ui tooltip, keep tooltip open if i'm on target, or if i'm on tooltip itself. i'm thinking can use close callback see if i'm on tooltip or target area, although have assign mouseout function. here's jsfiddle: http://jsfiddle.net/handyman/fnjff/ ------------- html ---------------------- <div id="target"> <a href="#" class="target">hover on me!</a> <a href="#" class="target">hover on me too!</a> </div> ------------ javascript ----------------- $(function() { $('#target').tooltip({ items: 'a.target', content: 'just text browse around in' }); }); i'm working through see can come with. here solution came after searching , testing: http://jsfiddle.net/handyman/fnjff/11/ ------------------- html -------------------- <body> <div id="target"> <a href=...

How can I determine the line num and char position of my tag in a liquid template? -

i have custom liquid tag. inside of tag, i'd know specific line number , character position of tag itself, in original template file. i see tag has access tokens constructor. tokens array of lines follow closing tag in file. interesting, not i'm looking for. any ideas or tips? thanks! you didn't parser using, first step in official parser tokenize entire template array of strings 1 , losing file coordinates in process. think (and i) out of luck without revamping parser. 1 https://github.com/shopify/liquid/blob/master/lib/liquid/template.rb#l166

ios - NSDate doesn't refresh -

the nsdate in first view controller wont refresh until go view controller , come it. idea why be? viewdidload: nstimer *timer = [nstimer scheduledtimerwithtimeinterval:1.0 target:self selector:@selector(fadein) userinfo:nil repeats:no]; [timer fire]; viewwillappear: // date nsdateformatter *formatter = [[nsdateformatter alloc] init]; [formatter setdatestyle:nsdateformatterfullstyle]; nsstring *datetoday = [formatter stringfromdate:[nsdate date]]; [datelabel settext:datetoday]; datelabel.font = [uifont fontwithname:@"helvetica-bold" size:12]; method: -(void) fadein { datelabel.alpha = 0; [uiview beginanimations:nil context:nil]; [uiview setanimationdelay:1.0]; [uiview setanimationcurve:uiviewanimationcurveeasein]; [uiview setanimationdelegate:self]; [uiview setanimationduration:1.0]; datelabel.alpha = 1; [uiview setanimationdidstopselector:@selector(animationdidstop:finished:context:)]; [uiview com...

c++ - How to declare destructor of a templated class -

i error while trying compile following class stack.cpp:28: error: expected constructor, destructor, or type conversion before ‘::’ token #include <iostream> using namespace std; template <class t> class stack { public: stack(): head(null) {}; ~stack(); void push(t *); t* pop(); protected: class element { public: element(element * next_, t * data_):next(next_), data(data_) {} element * getnext() const { return next; } t * value() const {return data;} private: element * next; t * data; }; element * head; }; stack::~stack() { while(head) { element * next = head->getnext(); delete head; head = next; } } you declaring template class. can either: implement destructor within class declaration, this public: stack(): head(null) {}; ~stack() { // ... } define templated destructor outside ...

python - Moving objects as a list -

so in below code trying give menu of instructions. having problems 'n' command section calls maketurtle() function. trying add turtles list (children []) when iterate through list makes turtles move @ same time. problem can 1 turtle move (the first 1 create). able them move, stop working if made new one. can help? home = makeworld() children = [] def maketurtle(): newborn = maketurtle(home) children.append(newborn) return newborn def roamingturtles(): command = raw_input("---> ") if command == 'n': maketurtle() roamingturtles() if command == 'r': in children: i.turn(90) roamingturtles() if command == 'l': in children: i.turn(-90) roamingturtles() if command == 'm': in children: i.forward() roamingturtles() if command == 'q': print 'end' your issue appears you're not waiting until loop on children completes before ...

update from statement in SQL Server 2008 execution efficiency -

i have such functions in sql server 2008, execution time long. create table [dbo].[t_sourcepayin]( [sourcepayinid] [int] identity(1,1) not null, [checkperiod] [varchar](6) not null, [kddeptid] [varchar](20) not null, [zxdeptid] [varchar](20) not null, [amount] [decimal](18, 6) not null, [processdate] [smalldatetime] null, [operatorid] [varchar](20) not null, [manual] [bit] null, [disabled] [bit] not null, [chargetypeid] [varchar](20) not null, [nono] [varchar](20) null, [remarks] [varchar](50) null, [kddeptcode] [varchar](32) null, [zxdeptcode] [varchar](32) null, [hldeptcode] [varchar](10) null, [cwclass] [varchar](20) null, [outin] [varchar](6) null, [chargeitem] [varchar](20) null, [kdhsdeptid] [varchar](10) null, [zxhsdeptid] [varchar](10) null, [kdratio] [decimal](8, 6) null, [zxratio] [decimal](8, 6) null, [kdjjratio] [decimal](8, 6) null, [zxjjratio] [decimal](8, 6) null, [e...

collections - map update in cassandra with cql3 -

i have cf in cassandra have coulmn type map this cf below: create table word_cat ( word text, doc_occurrence map <text, int >, total_occurrence map <text, int >, primary key (word) ); i want update doc_occurrence value of key pluse new number.i want in 1 query. i think in can done in query this: update word_cat set doc_occurrence ['key']=doc_occurrence ['key']+5 word='name'; but not work, can body help? better explain example, considering schema. now here inserting data, followed output cqlsh:ks1> update word_cat set ... doc_occurrence= ... {'cassandra' : 1} ... word ='name'; cqlsh:ks1> select * word_cat ; word | doc_occurrence | total_occurrence ------+----------------+------------------ name | {cassandra: 1} | null now if want overwrite existing key (cassandra value 5) in map, here go cqlsh:ks1> update word_cat set ...

javascript - calculation based on input field for a result on the fly -

this extension this thread . my situation: i need user enter decimal value (ie 0.05) , show simple calculation on fly user types (or pastes). example shown works whole numbers not when decimal entered input field. i need display result in multiple places. assumed update getelementbyid getelementbyclass didn't work. my code: <input type="text" name="capname" id="numberfield" value="0.07" maxlength="5" /> <span name="mpd" id="mpdresult" class="mpdresult" ></span> <span class="mpdresult" ></span> (second display) <script> window.onload = function() { var base = 500; var numberfield = document.getelementbyid('numberfield'); numberfield.onkeyup = numberfield.onpaste = function() { if(this.value.length == 0) { document.getelementbyid('mpdresult').innerhtml = ''; return; } var ...

android - Issues in twitter integration using twitter4j -

i newbie twitter integration in android. integrated twitter in android app using tutorial. here faced problems. my app executed ics if removed targetversion manifeast. why? < uses-sdk android:minsdkversion="8" android:targetsdkversion="15" /> here removed android:targetsdkversion="15" manifeast file. now, < uses-sdk android:minsdkversion="8" /> 2.in developer console of twitter, set callback url of app " https://www.google.co.in/ " , trying run app using callback url in our code. after successful signin, should redirects app here redirects callback url(means here google console). static final string twitter_callback_url = " https://www.google.co.in/ "; but here set following callback url in our code it's working fine. why? default callback url in twitter4j. please can me. static final string twitter_callback_url = "oauth://t4jsample"; manifeast file ...

Paste json in a textarea and convert to formatted html with jquery -

the way should work is paste json textarea "jsonvalue" click "convert" formatted html appears in "placeholder" i trying title , url out of json , instead when click on "convert" button, - uncaught typeerror: cannot read property 'length' of undefined link jsfiddle this html , js <!doctype html> <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"/> <meta http-equiv="content-language" content="he" /> <title>json sample</title> </head> <body> <textarea id="jsonvalue" style="width:100%" rows="1"></textarea> <button id="convert">click here convert!</button> <div id="placeholder"></div> <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script> <script> $(document).r...

javascript - Detect date selection on an HTML5 calendar element, but not manually entered date -

i need able run javascript function when user clicks on date in html5 calendar element. tried using onchange , fires when user types in date: <input type="date" onchange="alert('fired');"/> it seems event doesn't fire until type in "complete" date, neat, doesn't meet needs. is there way fire when date clicked on in calendar? or maybe fire in both scenarios detect type of action was? i gather want disable keyboard input user can select valid dates mouse. you want detect clicks inside calendar. for have updated demo of answer: note how click handler have empty string value clicks on invalid dates. inputdatepreventkeyboard please note writing event handlers in html attributes not recommended. see https://developer.mozilla.org/en-us/docs/javascript/reference/global_objects/eval#use_functions_instead_of_evaluating_snippets_of_code here updated code of demo: <input type="date" onchange=...

jquery - Checkbox as image - Background Color -

Image
i have followed link image checkboxes http://jsfiddle.net/jtbowden/xp2ns/ . scripts , css worked perfectly. .checkbox, .radio { width: 19px; height: 20px; padding: 0px; background: url("http://i48.tinypic.com/raz13m.jpg"); display: block; clear: left; float: left; } my issue trying set background-color if user clicks checkbox: .green { background-color: green; } and background-color not looking expected , looking same fiddle o/p. how can fix or miss ? in html give <p> <input type="checkbox" name="1" class="styled green" />(green) <p> but still applying entire span. not sure doing wrong ! you can use class know background color (eg green), in docheck function can check class , add new class containing background (eg greenchecked). you can use same approach other colors. example: .greencheck { background-color: green; } function docheck() { i...

I want to create a drop down menu with multiple drop down options -

i want create drop down menu multiple drop down options. form looking this. county-->state-->city-->place description: in form there 4 drop downs when user select first 1 (country) other drop downs acting simultaneously. when user not select first 1 other drop downs disabled. when user select second 1 remaining drop downs acting simultaneously. when user not select second 1 remaining drop downs disabled. when user select third 1 last drop down acting simultaneously. when user not select third 1 last drop down disabled. finally select last 1 option , click button then there display of place attribute details that. example: select country(after selection) select state(after selection) select city(after selection) select place(after selection) after selection display data place. what have tried till now? language have used or want use? if website, using cms? if yes, one? provide details , codes have tried.

php - Saving generated pdf directly to a folder folder - Codeigniter -

i generate , send created pdf folder error, error : a php error encountered severity: warning message: file_put_contents(http://localhost/nqcl1/workbooks/ndqa000000001/ndqa000000001.pdf) [function.file-put-contents]: failed open stream: http wrapper not support writeable connections filename: libraries/dompdf_lib.php line number: 13 dompdf_lib.php //library file class dompdf_lib extends dompdf{ function createpdf($html, $filename='', $stream=true){ $this->load_html($html); $this->render(); $this->set_paper('a4', 'potratit'); if ($stream) { //$this->stream($filename.".pdf"); - works ok file_put_contents(base_url().'workbooks/s'.$filename.'/'.$filename.".pdf", $this->output()); } else { return $this->output(); } } } coa.php //controller function generate...

angularjs - angular, django and csrf -

from http://docs.angularjs.org/api/ng .$http , says should set default headers include token, following it. my code goes this var myapp = angular.module('myapp', ['ngcookies', 'ui.bootstrap']). config(['$routeprovider', function($routeprovider, $httpprovider, $cookies){ $routeprovider. when('/', { templateurl: '/partials/home.html', controller: homectrl }). when('/game/:gameid/shortlist/create',{ templateurl: '/partials/create-shortlist.html', controller: createshortlistctrl }). otherwise({redirectto: '/'}); }]); myapp.run(function($rootscope, $http, $cookies, $httpprovider){ $http.get('/api/get-current-user').success(function(data){ $rootscope.current_user = data; $rootscope.current_team = $rootscope.current_user.team; }); $http.get...

trac - Choosing a project managment tool -

i'm looking small scale open source project managment tool. i'm looking more treditional tool , not 1 designed scrum or agile. i've worked in past test director , hp quality center. happy qc. the main features i'm looking are managing versions. managing customer / technical demands. managing tasks (assignment + tracking). managing tests (nice have). i've looked around recommandations here in site , google , found trac (there no tutorial or screen shots available) , teambox (looks simple) , pivotal tracker (looks promising) , open atrium (wich lacks demo). i appreciate suggestions regarding apropriate tool tasks, , comments might have on of tools mentioned above. i use trac project-management also, , can recommend sufficient read needs above. native trac comes without project-management support. @ the plugin recommendation site of trac . imo best when add following plugins freshly installed trac-1.0: simplemultiprojectplugin timingan...

svm - How to use SVMhmm under MATLAB? -

recently using svmhmm package handle classification problem. found svmhmm package used under linux or windows (under cygwin). thinking use under matlab of windows system. know there svmstruct matlab interface package developed andrea vedaldi. can handel hmm problem? me this? many thanks. the web page ( http://svmlight.joachims.org/svm_struct.html ) svmhmm doesn't mention matlab interface. svmstruct won't able job if need svmhmm features. save data matlab text file , load svmhmm. contact author (see web page address) ask matlab interface.

How does Qt on Windows draw exactly? Does it call GDI internal to draw? -

i'm developer on windows , have experiences on winapi programs. far know, there 2 ways draw on windows, call gdi (includes wrapper of gdi gdi+) traditional drawing or call apis dx or opengl draw use gpu. other things qt are? qt calls gdi draw something? or has own way draw directly? want know theory in general. from looks of it, since qt 4.0 had changed use of gdi , replaced other internals might improve portability, if wish, qt open sourced, may @ code understand qtgui.dll internals.

kml gx track dynamic update from real time data -

i want coordinates every second , update track on google earth in kml file i know need network link update added coordiantes time , refresh every second couldnt find complete examples show , update part confusing me. wondering if some1 write out simple example? if want generate kml , update on regular interval create root kml such this: <?xml version="1.0" encoding="utf-8"?> <kml xmlns="http://www.opengis.net/kml/2.2"> <networklink> <name>networklink example</name> <link> <href>http://...</href> <refreshmode>oninterval</refreshmode> <refreshinterval>5</refreshinterval> </link> </networklink> </kml> if area of interest "small" or locallized may want add region networklink , viewrefreshmode element onregion value refresh when region active (e.g., within current view). <networklink> ...

android - How to read and display Xml in ListView and TextView -

this xml type <category name="android"> <question><![cdata[what android?]]></question> <answer><![cdata[android programming language.]]></answer> <question><![cdata[what android?]]></question> <answer><![cdata[android programming language.]]></answer> </category> <category name="c#"> </category> <category name="sql"> </category> i want show category of listitem , when click on item textview show question , in second textbox show questions answer?, on button click show next question , answer, how read , need hint..... thanks

xcode - iOS UICollectionView not scrolling when cell is touched -

i've created simple grid based uicollectionview i'm having trouble scrolling. if touch view rather cell within seems scroll correctly if touch 1 of cells , try scroll nothing happens. bit of issue, want grid of cells fill view, , when view filled there touch make scroll! guess easiest way describe i'm trying achieve table view 2 columns of cells rather one. i can't seem find in documentation talks issue , i've tried various combinations of "user interaction enabled" settings etc. one final thing, require cells respond single tap touch (basically toggle them on , off) don't want disable them responding touches.

c# - Emgu object detection using MatchShapes for connected components with holes -

i've been working on shape matching function, using emgu, detecting objects given template of object , target image in find it. target image can contain multiple instances of template. the function built works reasonably well. have 1 concern. if template has more 1 hole, function not give correct answer. here important part of code: private image<bgr, byte> drawcontours(image<gray, byte> image, contour<point> contours, bgr color, int thickness, int maxlevel) { image<bgr, byte> resultimage = new image<bgr, byte>(image.size); resultimage = image.convert<bgr, byte>(); cvinvoke.cvdrawcontours(resultimage, contours, color.mcvscalar, color.mcvscalar, maxlevel, thickness, line_type.cv_aa, new point(0, 0)); return resultimage; } private contour<point> getedgecontours(image<gray, byte> image, image<gray, byte> mask, int threshold) { cvinvoke.cvthreshold(image, image, 255, 255, thresh.cv_thresh_binary | thre...

python - Best way to use Jinja2 template in Javascript? -

i'm trying ajaxify functionality of page uses jinja2 , flask. problem want entire jinja2 template rendered javascript but, isn't possible of available libraries don't support features of jinja2. what's best way solve issue? there seems https://github.com/syrusakbary/jsjinja library now: jsjinja lets use jinja2 templates in javascript. compile jinja2 templates javascript no restrictions. not tried though.

javascript - Getting the input tag(s) and setting them as unchecked -

i want write java script function input tag(s) type "checkbox" td , mark them unchecked. following jsp code: <td id="uncheckedbydefault" align=center class=listtypeone> <% if (priv.getviewprivilege() == 1) { %> <input name="view" type="checkbox" value='<%= priv.getattributeid() %>' checked> <% } else { %> <input name="view" type="checkbox" value='<%= priv.getattributeid()%>'> <% } %> </td> now here td has id="uncheckedbydefault". want input tag(s) , set them unchecked. can tell how can that. in advance. try: inputs = document.getelementbyid('uncheckedbydefault').getelementsbytagname('input'); (index = 0; index < inputs.length; ++index) { // deal inputs[index] element. inputs[index].checked=false; }

How to validate admin config options for Magento module -

i trying create magento module. module has 2 config options in admin menu .i.e, "enabled" , "api_key". want check , throw , error "api_key" option if "enabled" options set 1. using backend module unable "enabled" option passed server when updating. getstoreconig returns value in database not current one. regards, vijay you need create observer on event admin_system_config_changed_section_{yoursection} , stated answer: https://magento.stackexchange.com/a/3014 (credit fabian blechschmidt )

twitter bootstrap - how to resize Text field and Dropdown in DivShot? -

with divshot, added form fields such text filed, or dropdown menu field. however, have no idea on how resize these components: text box short, while dropdown menu long. an example text field below have no idea how set size <input class="input-medium" type="text"> how can change size of this? thanks lot in divshot, can change size of input in 'inspector' section. lets select bootstrap defined inputs.. input-large, input-xlarge, etc.. you define custom css class , use specify width of input. assign custom (you can name anything) class input.. <input class="input-large custom" type="text"> here's example on bootply

Validating server side with asp.net and c# -

currently have website simple signup form in html, code: <div class="grid_6 push_3 block alpha"> <div class="grid_6 form_block alpha omega"> <label>שם משתמש</label> </div> <div class="grid_6 form_block alpha omega"> <input type="text" id="username" name="username" pattern="^\s{4,}$" required /> </div> <div class="grid_6 alpha omega form_block"> <label>סיסמא</label> </div> <div class="grid_6 form_block alpha omega"> <input type="password" id="password" name="password" pattern="^\s{6,}$" required title="סיסמא צריכה להכיל לפחות 6 תווים" /> </div> <div class="grid_6 alpha omega form_block"> <label...

c# - Accessing ASP.NET web application that only runs on a local machine -

so have 0 experience deploying software or putting live. situation this: i have developed dashboard web application on laptop. application uses microsoft sql database runs locally. when run it, it's localhost address. now, need able access web application other pcs within company's network. way can user testing. ways this? searched , things confuse me no end. i use: .net framework 4.5 visual studio ultimate 2012 iis7 thanks there few things you'll need make local application visible on network. i'm assuming want app running on http://foobar/myapp foobar name of machine here need do: add url reservation machine allow iis serve content on url http://foobar/myapp create inbound rule in windows firewall allow incoming connections on port 80 you can find exact commands need run on scott hanselman's excellent blog post . of course, he's focusing on getting ssl work iis express, has enough pointers going, too.

c# - UnitTestIsolationException: Throws Exception while running Shims test in Release/Debug mode -

i trying run unit test using microsoft shims, throws me exception in shims.context.create(); method. environment: vs 2012, win2k8 r2 namespace myshimsunittest { [testclass] public class myunittest { [testmethod] public void getcurrentyear() { using (microsoft.qualitytools.testing.fakes.shimscontext.create()) { // logic... } } } } detailed exception: result message: test method myshimsunittest.myunittest.getcurrentyear threw exception: microsoft.qualitytools.testing.fakes.unittestisolation.unittestisolationexception: unittestisolation instrumentation failed initialize. please restart visual studio , rerun test result stacktrace: @ microsoft.qualitytools.testing.fakes.unittestisolation.unittestisolationruntime.initializeunittestisolationinstrumentationprovider() @ microsoft.qualitytools.testing.fakes.shims.shimruntime.createcontext() @ microsoft.qualitytools.testin...

c++ - reading input from keyboard -

i required read keyboard(stdin), following text. pl note entered user keyboard in format only. #the total size of physical memory (units b, kb, mb, gb) 512mb 2 #the following memory allocations { abc = alloc(1kb); { y_ = alloc(128mb); x1= alloc(128mb); y_ = alloc(32mb); (i = 0; < 256; i++) abc[i] =alloc(512kb); x1 = alloc(32mb); x2 = alloc(32mb); x3 = alloc(32mb); x1.next = x2, x2.next = x3, x3.next = x1; } abc = alloc(256mb); } so let me break down. line beginning # sign considered comment , ignored. first 2 allocations physical memory size , number of generations. global bracket opened. , may followed line called abc = alloc(1kb); where abc object name, 1kb memory size allocated. x1.next = x2, here x1 points x2. for (i = 0; < 256; i++) abc[i] =alloc(512kb); the loop os entered in format , can have same line comma...

playframework - Internationalization for user defined input -

i'm trying build localization user defined input. example: user define categories soccer in several languages. the model entity have filed this: @manytomany @mapkeycolumn(name = "locale", insertable = false, updatable = false) public map<string, l18n> titles; i'd store localized strings this: @entity public class l18n { @id @constraints.required @formats.nonempty public integer id; public string key; public string locale; @column(columndefinition = "text") public string text; } we use yaml store testdata: category: - !!models.category ... titles: - !!models.l18n key: soccer l18n: - !!models.l18n key: soccer locale: de-ch text: fdfdfsee - !!models.l18n key: soccer locale: fr-ch ...

node.js - Mongoose date format -

currently having issue retrieving dates mongoose. schema: var activityschema = new schema({ activityname : string , acitivtyparticipant : string , activitytype : string , activitydate : { type: date, default: date.now } , activitypoint : number }); this defaults use "mm.dd.yyyy", data have in format "dd.mm.yyyy" defaults date.now. does know if there "format: "dd.mm.yyyy" function can put directly in schema? other ideas? (would not update data) thank replies as far know, mongoose doesn't have 'default format'. instead, saves date instances (i think) rfc 822 timestamps ( mon jan 02 2012 00:00:00 gmt+0100 (cet) ), , parses them database running new date(input) . that last action problem: > new date('01.02.2012') mon jan 02 2012 00:00:00 gmt+0100 (cet) as can see, javascript parses mm.dd.yyyy . don't know if that's solvable without having update database.

java - only one error: No Spring WebApplicationInitializer types detected on classpath -

may 21, 2013 3:44:07 pm org.apache.catalina.core.aprlifecyclelistener init info: loaded apr based apache tomcat native library 1.1.27 using apr version 1.4.6. may 21, 2013 3:44:07 pm org.apache.catalina.core.aprlifecyclelistener init info: apr capabilities: ipv6 [true], sendfile [true], accept filters [false], random [true]. may 21, 2013 3:44:08 pm org.apache.catalina.core.aprlifecyclelistener initializessl info: openssl initialized (openssl 1.0.1d 5 feb 2013) may 21, 2013 3:44:08 pm org.apache.coyote.abstractprotocol init info: initializing protocolhandler ["http-apr-8080"] may 21, 2013 3:44:08 pm org.apache.coyote.abstractprotocol init info: initializing protocolhandler ["ajp-apr-8009"] may 21, 2013 3:44:08 pm org.apache.catalina.startup.catalina load info: initialization processed in 1591 ms may 21, 2013 3:44:08 pm org.apache.catalina.core.standardservice startinternal info: starting service catalina may 21, 2013 3:44:08 pm org.apache.catalina.core.standarden...

regarding locking up file access in Gfortran -

in intel fortran write share ='denyrw' in open statement prevent file multiaccess. in gnu fortran statement seemed not working. what correct syntax deny reading/writing of file in fortran? share ifort specific specifier , not standard. if use this, don't expect honoured other compilers. action may 1 option, global file system. don't think there specifier such in fortran standard. you find fortran standards here so moral of story is: either stick standard or stick compiler

How do I get multiple storage file paths on Android? -

in phone have 2 storages, 1 of them sd card , other extsdcard . i can sdcard path by: environment.getexternalstoragedirectory() .tostring() how extsdcard file path? use other external sdcard: file storagedir= new file("/mnt/external_sd/") or file storagedir= new file("/mnt/extsdcard/") for more details see http://mono-for-android.1047100.n5.nabble.com/detect-sd-card-path-td5710218.html#a5710250 , this so use function list of ext cards... public static hashset<string> getexternalmounts() { final hashset<string> out = new hashset<string>(); string reg = "(?i).*vold.*(vfat|ntfs|exfat|fat32|ext3|ext4).*rw.*"; string s = ""; try { final process process = new processbuilder().command("mount") .redirecterrorstream(true).start(); process.waitfor(); final inputstream = process.getinputstream(); final byte[] buffer = new byte[1...