Posts

camera - Permission to take photo OR get image from library not shown in iOS9 (Xcode 7beta, Swift2) -

Image
the code below shows example access image lib. no matter call code (view) not see permission dialog phone popping , therefore cannot allow app access either camera or library. also, privacy settings not show app either. thoughts? i'm going nuts. let imgpicker = uiimagepickercontroller() imgpicker.sourcetype = uiimagepickercontrollersourcetype.photolibrary imgpicker.modalpresentationstyle = uimodalpresentationstyle.popover self.presentviewcontroller(imgpicker, animated: true, completion: nil) another way tried if uiimagepickercontroller.issourcetypeavailable(uiimagepickercontrollersourcetype.camera) { let imagepicker:uiimagepickercontroller = self.imagepickercontroller imagepicker.allowsediting = true imagepicker.sourcetype = uiimagepickercontrollersourcetype.camera imagepicker.cameracapturemode = uiimagepickercontrollercameracapture...

javascript - Angular Typeahead: click on suggestion and instantly make a post? -

i working on project , i'm using siyfion's angular typeahead . have typeahead searching users. when username found in suggestions dropdown should able click on name or press enter directly make post instead of needing press button post. work need "catch" click- or return-event on 1 of user names. below find html , js , made plunker makes things more clear. does know how can catch click , return events? tips welcome! <body ng-controller="mainctrl"> <input class='typeahead' type="text" sf-typeahead options="exampleoptions" datasets="numbersdataset" ng-model="selectedname"> <input type="button" value="post user server" type="text" ng-click="postusertoserver(selectedname.id)"> </body> here js code: var app = angular.module('plunker', ['siyfion.sftypeahead']); app.controller('mainctrl', function($scope) { ...

Git checkout to discard changes -

i trying discard local changes , seems after type $ git checkout -- . .. changes seem still there... if try: $ git checkout head . .. works, changes discarded! why happening? ideas? hint: changes seem relevant line endings, no real content edited (that why needed discard after all) update : use git 1.9.5 windows. local changes unstaged, uncommited, under workingtree after upgraded git version 2.11.1.windows.1 this stopped happening (maybe earlier version - bettween 1.9.5 , 2.11.1 - had solved issue)

html - Image not staying inside div when window is large -

i have image needs in particular location, made div in place need , added img tag inside it, although img tag inside div tag image goes bottom right corner of page. not happen when browser window small. css: #teamimg { width:10%; height:50px; background-color:blue; overflow: auto; float:left; } html: <div id="teamimg"> <img src="images/picture.png" alt="image" height="18" width="20" class="itemimg" style="float:left"> </div> set overflow:hidden on #teamimg rule, can put image background-image background-size:cover; . :)

gnupg - How is the process of signing and verifying a release and why apache says that the signature file signed by a public key? -

i have started learning gpg , bit confused infos have found. gnupg documentation says that a signature created using private key of signer but @ apache's site , say: the signature file digest of original file signed public key ... and on same site, in section , following: a digital signature created original document using private key . now suppose process of signing involves signing hash of release using private key of holder , not public 1 apache says in second link have posted, or wrong? otherwise, how ever able decrypt hash of release signed public key if he/she doesn't have private key of holder? then, explain in processes of signing , verifying signature consist , passages, e.g. software release apache maven ? tl;dr : there mistake in documentation, understanding of signatures right. the signature file digest of original file signed public [sic, should private] key... signing document performed calculating hash sum of docum...

multithreading - C# static constructor initialization thread safety while filling ConcurrentDictionary -

i'm calling var person = persondb.pdict["395096"]; can explain me why code blocks: static class persondb { internal static readonly concurrentdictionary<string, person> pdict; static persondb() { pdict = new concurrentdictionary<string, person>(); var headers = file.readlines(findpath.datasetperson).first().split(';'); file.readlines(findpath.datasetperson).asparallel().skip(1).select(s => s.split(';')).forall(fa => pdict.tryadd(fa[0], new person() { = enumerable.range(0, fa.length).todictionary(t => headers[t], d => fa[d]) }) ); } } sealed class person { public dictionary<string, string> all; } while part not block: static class persondb { internal static readonly concurrentdictionary<string, person> pdict; static persondb() { pdict = new concurrentdictionary<string, person>(); var headers = file.readlines(f...

jquery - How to change a seleclist options from another selectlist? -

i have 2 seleclists. want filter second selectlist options first select list. here code: $(document).ready(function() { $('#sehir').change(function() { var sehir = $(this).find('option:selected').text(); var options = $('#ilce').filter('[label=' + sehir + ']'); $('#ilce').html(options); }); }); and first selectlist: <select name="sehirid" id="sehir" class="form-control"> <option value="1">option 1</option> <option value="2">option 2</option> <option value="3">option 3</option> </select> second selectlist: <select name="ilceid" id="ilce" class="form-control"> <optgroup label="option 1"> <option parent="option 1" value="1">option 1</option> <option parent="option 1...