Posts

uiactivityviewcontroller - How to export Apple's new RAW photo format .dng in iOS 10? -

i'm having trouble exporting apple's new raw photo format .dng. uiactivityviewcontroller exports photo jpeg, defeats purpose. any appreciated. here's how fixed issue. -(void)activityaction{ phasset *asset = self.assetsfetchresults[(int)self.image_number]; phimagerequestoptions *options = [[phimagerequestoptions alloc] init]; options.synchronous = no; options.version = phimagerequestoptionsversioncurrent; options.deliverymode = phimagerequestoptionsdeliverymodeopportunistic; options.resizemode = phimagerequestoptionsresizemodenone; options.networkaccessallowed = no;//has yes download cloud , progress show /*options.progresshandler = ^(double progress,nserror *error,bool* stop, nsdictionary* dict) { nslog(@"progress %lf",progress); //never gets called };*/ [[phimagemanager defaultmanager] requestimagedataforasset:asset options:options resulthandler:^(nsdata *imagedata, nsstring *datauti, uiimageorientation imageorientation, nsdictionary *i...

html - How to fix the alignment/position of a image label (for checkboxes/radio buttons)? -

code taken 2 different sources, append dont have 10 rep post them. first attempt . notice horribly placed radio buttons. second attempt . donot know source, direct google result. notice difference between top , bottom padding/alignment. i tried using [li] element didnt work. adding img{display: block;} css gives unexpected results. "fills" whole element image, , left part of image hidden behind green part. i self-professed css/html noob, can understand things , simple things placement/alignment still mystery me. i'd know how code works. planning add green border "selected" "button" , change minor visual stuff. i'd know how center "tick" , implement "tick" mark locally/globally , not rely on content:'\2714'; . help me understand happening here, , how can fix (and apply knowledge in future). edit : updated 2nd attempt, looking quite good, imho. if alignment fixes.... sigh . ok, sound silly.....

html - How to set the width of a div equal to the width of its sibling img -

i have html code this: <div class="card"> <div class="card-content"> <img src="somesource.png" width=480px height=320px> <footer> text here makes width of footer greater width of sibling img tag. </footer> </div> </div> i want footer have same width of sibling img no matter width of image. widths of images different depending upon images contained want footer have same width of image. have tried following: .card { display: inline-block; } .card-content { display: flex; flex-direction: column; } but widens img if footer wider image. not want. want width of footer dependent on width of image , not other way round. please me. suggestions in advance. try this $(document).ready(function(){ var x = $(".card-content > img").width(); var y = $(".card-content > footer").width(); y = x; if(y == x) { $...

hadoop - Total number of replicated files after copying hdfs file into hive table -

suppose if load file in hdfs hive table total replicas of file. in hdfs file replicated 3 times , copying hive table results in additional replicas sums 6 replicas or not?? in hdfs, number of replicas based on replication factor set. in case, since replication factor 3, there 3 copies. when sqoop import hdfs hive(into internal table) , data copied 1 location on hdfs table in hive. replication of hive data again happens based on replication factor. in total end 3(hdfs) + 1(hive copy)*3 => 3copies on hdfs , 3 copies of data stored hive (this not 6 copies, hive doesn't store data in same file format). or if load data inpath internal table old copy lost , newer hive copy exists. end hive table(and replicated copies). in case, 3 hive table copies (as rep set 3). or if create external table, no new copy created. meta of data created hive. end hdfs copies + hive meta storage copies . in case, 3 copies in hdfs + 3 copies of meta data stored on hive. ...

android - how i retrive the data in edit text from shared preference? -

hi can tell me hod saved data in edit text after saving , mean when save text want text appear in edit text time thanks. here code: public class mainactivity extends appcompatactivity { private toolbar toolbar; private edittext inputname; private textinputlayout inputlayoutname; private button btnsave; public static final string mypreferences = "myprefs" ; public static final string message = "namekey"; sharedpreferences sharedpreferences; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); toolbar = (toolbar) findviewbyid(r.id.toolbar); setsupportactionbar(toolbar); inputlayoutname = (textinputlayout) findviewbyid(r.id.input_layout_name); inputname = (edittext) findviewbyid(r.id.input_message); btnsave = (button) findviewbyid(r.id.btn_save); inputname.addtextchangedlisten...

ios - MVVM and RxSwift for Search Screen -

in purpose of education mvvm , rxswift want build simple search screen, have table view , search bar. when user types search bar show have in table. sounds pretty simple, can't find tutorial suits me. i have written code in view controller, can't understand have observe search text changes , call database method, filter items search text. some code, have. my viewcontroller import foundation import uikit import rxswift import rxcocoa class placesearchviewcontroller: uiviewcontroller { //mark: - @iboutlet weak var searchbar: uisearchbar! @iboutlet weak var tableview: uitableview! //mark: - dependencies private var viewmodel: placesearchviewmodel! private let disposebag = disposebag() //mark: - lifecycle override func viewdidload() { super.viewdidload() viewmodel = placesearchviewmodel() addbindstoviewmodel(viewmodel) } //mark: - rx private func addbindstoviewmodel(viewmodel: placesearchview...

Is there a variable to set so that "make" command searches for makefiles -

is there variable set, make command searches makefiles in other directories rather searching makefiles in current working directory? update : scenario this, in our project have script defines & sets of environment variables. make given in root folder (to build) doesn't have makefile. hence, don't think "-c" or other make options can in this. found, after investigation, makefile in internal folders , being invoked. so, question there environmental varibles makes "make" command search makefiles in specified directories (by environment variable). the short answer no, it's not possible have make search makefiles in different directory 1 started in (or switched due -c option, gnu make) default. you have 2 options: 1 use -f option above. the other set makefiles variable list of makefiles want read in before invoke make . note must actual files want read in, not directory contains them. downside of default target never taken these m...