Posts

Featured post

What is the default typeface of the app bar text in Android? -

Image
the typeface of text default app bar isn't of typefaces available default -- compared of them visually app bar text , none of them matched. style i'm comparing theme.appcompat.light.darkactionbar . idea how text default text in app bar? here's i'm talking about: *text on left default app bar text , text on right default android text (sans-serif), bold -- of few typefaces available default, closest default app bar text *sans-serif not bold thin seems roboto medium 20sp according this info.

python - subprocess.Popen and relative directories -

i writing script open notepad.exe using subprocess.popen() import subprocess command = '%windir%\system32\\notepad.exe' process = subprocess.popen(command) output = process.communicate() print(output[0]) this throws filenotfounderror is possible change/add above code make work relative paths? did try run script c:\windows> after moving there, again failed. set shell=true, failed well. writing similar script using os.popen() works ok relative paths, regardless directory script run from, far understand popen not way forward.. early steps in world of programming/python. input appreciated. use os.path.expandvars expand %windir% : command = os.path.expandvars('%windir%\\system32\\notepad.exe') the result path can passed subprocess.popen . subprocess.popen not expand environment variables such %windir% . shell might should not depend on shell=true that.

java - order dependency (topological sort) with input of string -

https://leetcode.com/problems/course-schedule-ii/ question similar 1 instead, has input of string instead of numbers. following classes , sample test case , signatures. wondering how deal input of string import java.util.*; class order{ string order = ""; public order(string string){ this.order = string; } } class orderdependency{ order cur; order pre; public orderdependency(order o1, order o2){ cur = o1; pre = o2; } } public class order_dependency { public static list<order> getorderlist(list<orderdependency> orderdependencies){ ***code starts here*** } public static void main(string[] args) { order o1 = new order("a"); order o2 = new order("b"); order o3 = new order("c"); order o4 = new order("d"); orderdependency od1 = new orderdependency(o1, o2); orderdependency od2 = new orderdependency(o2, o3); ...

bash - Java Runtime exec() not working -

i try execute shell command via java this if (program.isplatformlinux()) { exec = "/bin/bash -c xdg-open \"" + file.getabsolutepath() + "\""; exec2 = "xdg-open \"" + file.getabsolutepath() + "\""; system.out.println(exec); } else { //other code } runtime.getruntime().exec(exec); runtime.getruntime().exec(exec2); but nothing happens @ all. when execute code prints /bin/bash -c xdg-open "/home/user/desktop/file.txt" in console, not open file. have tried call bash first , xdg-open -command, there not change. what's problem here , how can solve this? edit: output of calling looks this: xdg-open "/home/user/desktop/files/einf in a- und b/allg fil/ref.txt" xdg-open: unexpected argument 'in' but seeems strange me - why command seperatet before in entire path set in quotation marks? please note don't need xdg-open this. can use java platform-agnosti...

javascript - Error While minifying app stylesheet -

i problem when run meteor build project. i checked github issue may need comment out line behavior: url(#default#vml); but don't know file line in? while minifying app stylesheet: path.js:8:11: path must string. received null @ assertpath (path.js:8:11) @ object.posix.relative (path.js:496:3) @ pathrelative (packages/minifier-css.js:449:30) @ packages/minifier-css.js:408:31 @ array.foreach (native) @ function._.each._.foreach (packages/underscore.js:139:11) @ packages/minifier-css.js:365:7 @ array.foreach (native) @ function._.each._.foreach (packages/underscore.js:139:11) @ rewriterules (packages/minifier-css.js:342:5) @ object.csstools.rewritecssurls (packages/minifier-css.js:328:5) @ packages/minifier-css.js:298:16 @ array.foreach (native) @ function._.each._.foreach (packages/underscore.js:139:11) @ object.csstools.mergecssasts (packages/minifier-css.js:275:7) @ mergecss (packages/minifier-postcss/plugin/minify-css....

Change Attachment Icon on Data Entry Form in Access 2016 -

so have data entry form "new employees" on access 2016. want include attachment employees image. in property sheet - have 3 options display data field attachment. display as: 1. image/icon 2. icon or 3. paper clip. first 2 options display blank box (you can click on dialog box click attachment). image/icon , icon options yes both functionally work both seem, inefficient. other option, paper clip, literally paperclip image , (0) functionally works (even better 1. 2. directly goes attachment dialog box) attachment dialog box when open it, visually unappealing. i want button when click on it, attachment dialog box opens , saves field value in place indicate. open other ideas. please advise.

swift - how can I use constraints on a group of elements in storyboard in ios? -

Image
in uistoryboard have following situation: a uiviewcontroller 2 elements - button , label. text on each component fetched localized.strings, has different length each time user chooses different language. in code have: mybutton.settitle("textonbutton".localized(), for: .normal) mybutton.sizetofit() txtlabel.text = "txt".localized() how should attach constraints 2 elements - when grouped - in center? example: this not in middle: this in middle: if 1 element, attach constraint midx , that's all, situation when there 2 elements? can - somehow - attach constraints group of elements? you can achieve of called stack view . in storyboard select both labels , click following button: in hierarchy notice both labels got wrapped inside stack view . have add horizontally in container and vertically in container constraints stack view. can add spacing between 2 labels in attribute inspector when stack view selected. result: