Posts

Android M write to SD Card - Permission Denied -

Image
i'm trying copy file within application sd card, error eacces (permission denied) . os android m , have allowed runtime storage permissions (checked in app info). have set uses-permission in androidmanifest.xml <application>...</application> <uses-permission android:name="android.permission.read_external_storage" /> <uses-permission android:name="android.permission.write_external_storage" /> doesn't work if copy sd card source: data/user/0/com.example.myapp/cache/somefile.txt destination: /storage/1032-2568/somefolder/ error: java.io.filenotfoundexception: /storage/1032-2568/somefolder/somefile.txt: open failed: eacces (permission denied) works if copy internal storage source: data/user/0/com.example.myapp/cache/somefile.txt destination: /storage/emulated/0/somefolder/ code copy file source destination /* * below parameters have tried * * inputpath - data/user/0/com.example.myapp/cache or data/user/0/com.example.m...

Merging/Combining an image and text file side by side -

Image
is there way combine 2 different files (text, image) side side? output image or pdf file etc...? have found methods similar image files , system automated using bash script. looking similar thing. have frames video file , respective sensors data in other text file. need combine image info along sensor data in 1 file. output image, pdf etc... image file having naming sequence 0001.png with imagemagick installed on linux distros , available macos , windows: start picture.jpg and text file called description.txt these funky cogs found on internet place. newlines ok, , text gets smaller more add. then this: # width , height of picture read w h < <(convert picture.jpg -format '%w %h' info:-) # put text on grey background , append right of image convert -background lightgray -size ${w}x${h} -gravity center label:@description.txt picture.jpg +swap +append result.jpg there many other possibilities , techniques: geom=$(convert -format %g picture...

python - Django using more than 1 package for admin site -

Image
i using 2 django packages: admin sortable (for changing order of models) , django import export (for importing csv directly models). the problem if add 2 packages model admin e.g. class categoryadmin(sortableadmin, importexportmodeladmin): they override each other. the buttons either show admin sortable or django import export. there anyway can integrate both of them together? alternatively, there package can swap out can achieve same functions (1. change order of models , 2. import csv directly models)

javascript - Array.from returns empty array -

Image
i trying filter children of div element. i direct access parent div via angular viewchild , if print children console.log(this.myparentdiv.nativeelement.children); i following output in chrome: i need convert array able filter divs. if convert console.log(array.from(this.myparentdiv.nativeelement.children)); it returns empty array. any idea why returns empty?

Dataload in Google BigQuery via java client -

i have written bigquery standard sql udf doing complex calculations , generation 45000 rows in 2 second. have requirement call udf java client , load data bigquery. please let me know fastest way bigquery load java client of 45000 rows.

html - Displaying an alert box of error message using CSS -

am creating login form on website whereby having trouble creating alert box @ top of form should display error messages after server-side validation , sanitization of user input.the problem when page loads, displays alert-box, while want display when displaying error messages. please assist? html part <!doctype html> <html> <head> <title>login form</title> <link href="style.css" rel="stylesheet" type="text/css"> </head> <body> <div class="form"> <span class="info"> <?php echo $fnameerr; $lnameerr; $emailerr; ?> </span> <br> <ul class="tab-group"> <li class="tab active"><a href="#signup">sign up</a></li> <li class="tab"><a href="login.php">log in</a></li> </ul> <di...

objective c - CGColor to RGBA -

i have nsstring output in consolle: 2017-03-28 14:34:47.794794+0200 test[2647:240896] nscustomcolorspace srgb iec61966-2.1 colorspace 1 0 0 1 how convert in rgba value and/or nscolor in simple way nsstring? for (int = 0; < [arraycolors count]; i++) { nsstring *aaa = (nsstring*) [arraycolors objectatindex:i]; } i tried uicolor rgba values following: cgfloat r_fontcolor, g_fontcolor, b_fontcolor, a_fontcolor; [getlabel.textcolor getred:&r_fontcolor green:&g_fontcolor blue:&b_fontcolor alpha:&a_fontcolor]; hope works covert nscolor rgba values also.