Posts

c# - Entity Framework 6.1.3 and Oracle produces sql with Unicode on NonUnicode column -

Image
i'm using entity framework 6.1.3 oracle manageddataaccess 12.1.022 , oracle.manageddataaccess.entityframework 12.1.022 (nuget packages)(fig 1). project database first , imports model .edmx file running t4 code. fig 1. the database uses varchar2 columns , .edmx file recognizes them nonunicode. (fig 2 & 3) fig 2. fig 3. when running query, oracle error ora-12704: character set mismatch . query: var emp2 = db.employees .where(s => s.first_nm.toupper().startswith(term.toupper()) || s.last_nm.toupper().startswith(term.toupper())) .select(c => new { label = c.first_nm + " " + c.last_nm, value = c.first_nm + " " + c.last_nm }); using .totracestring() can see sql being sent is: select 1 "c1", ((((case when ("extent1"."first_nm" null) n'' /* unicode here null value */ else "extent1...

ios - .realm file automatically backed up by iCloud -

my app rejected because of size of content uploads icloud. file in app's documents folder default.realm database file. think file icloud uploading. how can prevent icloud upload database icloud? thanks. according app backup best practices section of ios app programming guide , <application_data>/library/caches or <application_data>/tmp not backup icloud. generally, can use <application_data>/library/caches directory save data won't backup icloud. to change file path of realm, can pass path parameter when creating realm instance, below: let realmpath = nssearchpathfordirectoriesindomains(.cachesdirectory, .userdomainmask, true)[0] as! string let realm = realm(path: realmpath.stringbyappendingpathcomponent("data.realm")) otherwise, can use nsurlisexcludedfrombackupkey file system property exclude files , directories backups (see technical q&a qa1719 ). if want use default path, there way exclude realm file backups. let ...

Laravel 5.1 Date_Format Validator Fails on Y-m-d Format -

i'm starting use request objects validate incoming post data, , i've seen examples of how others using date_format , can't seem dates pass though i'm using format passes when use php's date_parse_from_format: print_r(date_parse_from_format('y-m-d','2015-07-27')); output update : warning in date_parse_from_format, don't understand why reflects format. { "year": 2015, "month": 2, "day": 30, "hour": false, "minute": false, "second": false, "fraction": false, "warning_count": 1, "warnings": { "10": "the parsed date invalid" }, "error_count": 0, "errors": [], "is_localtime": false } validator public function rules() { return [ 'rental_id' => 'required|exists:rentals,id', 'start_at' => 're...

Android Camera 2 FocusArea -

in old camera api had camera.parameters's setfocusarea specify rect camera focus, in new camera2 api can specify focus distance. knows how specify rect camera focus? the desired effect implement focus on touch. found lot of answers here in stack overflow implement focus on touch in new camera api, no 1 lets me specify rect. you can set autofocus metering region in capturerequest control_af_regions key. there corresponding keys auto-exposure , auto-white balance regions well.

javascript - outerWidth() Returns a Different Value when Element is Hidden -

i trying make tweaks jquery ui multiselect widget . one issue i'm having main control little wide after refresh control. looking @ code, width set using: var width = this.element.outerwidth(); where this.element refers original <select> control, has been hidden jquery ui multiselect widget. playing around this, can see outerwidth() returns 424 when <select> element hidden, , returns 406 when visible. (note width() returns larger value when element hidden.) does know why or how width change depending on whether or not control visible? value returned when control visible appears correct value. edit: i have created jsfiddle demonstrate this. you can't width of display:none; element. you need hide position:absolute; , left:-999999px; . here css need. don't forget put position:relative on div wrapper. jsfiddle : http://jsfiddle.net/7xqk01oa/3/

angularjs - Angular Instagram endpoint embed issue -

i have sample angular app fetches content user through endpoint, without use of calling hashtags. can retrieve photos given hashtag example work, rather entire feed of user.this working content link sample: var endpoint = " https://api.instagram.com/v1/media/popular?client_id=642176ece1e7445e99244cec26f4de1f&callback=json_callback "; i registered new app, have client id , client secret, , i'm trying embed entire user feed page. while looking through https://instagram.com/developer/endpoints/ can't seem find link works client id , client secret. any appreciated. there never going "link" works client secret. client secret used back-end programming language using instagram sdk. if passed client secret through simple url or front-end programming language, wouldn't secret anymore ;). some example sdk's / libraries : node: https://github.com/totemstech/instagram-node python: https://github.com/instagram/python-instagram r...

osx - Setting Background Color of NSTableCellView in Swift -

after searching through , online, i'm struggling figure out concept thought relatively simple. essentially, have table in os x swift app, several columns, , populating data. trying discern how can set background color of each "row" (ideally alternating colors, i'll start 1 color). masterviewcontroller file so; import cocoa class masterviewcontroller: nsviewcontroller { var minions = [minion]() func setupsampleminion() { minions = minion.fetchminiondata() } override func viewdidload() { super.viewdidload() // view setup here. } } // mark: - nstableviewdatasource extension masterviewcontroller: nstableviewdatasource { func numberofrowsintableview(atableview: nstableview) -> int { return self.minions.count } func tableview(tableview: nstableview, viewfortablecolumn tablecolumn: nstablecolumn?, row: int) -> nsview? { // 1 var cellview: nstablecellview = tableview.makeviewwithidentifier(tablecolumn!.identifier, owner: self) as...