Posts

xml - Android: Vector Triangle with background Image -

im trying set image within boundaries of triangle - set vector. with ease created vectortriangle im looking solution cut image same size , mould it. first approach did "shape-coords" (pathdata) of triangle. these thought "cut" image , place behind vector. seems dead end. theres no way mould image of pathdata. i know techniques shapes (circles, rects(bitmaps)) none of them helpful vectors. is there idea realize that? didnt see yet? example image (center triangle) you can add image in background , put triangle src of imageview. point noted triangle should transparent in center result make background visible.

compiler errors - Angular 2 - Ahead-of-time compilation Issue -

when try compile project ngc, throws below error: error encountered resolving symbol values statically. function calls not supported. consider replacing function or lambda reference exported function, resolving symbol sharedmodule in my app.module.ts below @ngmodule({ declarations: [appcomponent], imports: [ browsermodule, httpmodule, mdtoolbarmodule, mdsidenavmodule, routing, sharedmodule, projectmodule, consumerappmodule, usermodule, changepasswordmodule ], bootstrap: [appcomponent], providers: [httpservice, loginservice, loaderservice, { provide: locationstrategy, useclass: hashlocationstrategy }, userrole], }) export class appmodule { }` , shared.module.ts below `@ngmodule({ imports: [ commonmodule, formsmodule, mdbuttonmodule.forroot(), mdtoolbarmodule.forroot(), mdsidenavmodule.forroot(), mdinputmodule.forroot(), ...

centos7 - Centos 7 GNOME license accepted using commad line -

i'm trying install gnome desktop minimal centos 7 using ansible. after installing packages, reboot process stops , requires configuration languages, time zone, license , other preferences. so there way can set these configurations command line of minimal before rebooting system? files need edit before starting gui avoid doing these settings manually? thanks. this centos 7 bug #0007177. @ this sed substitution eula.py fix it. though in setup still wanted q&a @ next bootup wrt user account creation.

codeigniter - Adding characters to $config[permitted_uri_chars] -

i think need add several characters $config[permitted_uri_chars] don't know 1 causing issue , how place character. when access page: an error encountered uri submitted has disallowed characters. this address: http://localhost/ci_bootstrap/index.php/home/edit_user/1'%7d and $config: $config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-'; can noob? thank you. you did not allow ' in $config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-'; have include it: $config['permitted_uri_chars'] = "a-z 0-9~%.:_'\-";

html - Using & Filtering Data with PHP -

i'm coding simple website , i'm working on user system. coded login & register , want show saved data specific user. example: id when log-in, want receive data saved in db on own id. don't have idea how , appreciate every little help. i'm able show user id because it's saved in sessions, no other data. everything got @ moment, script shows me whole db. <?php $db = new pdo( 'mysql:host=localhost;dbname=betaddicted', 'root', '' ); $sql = "select * users"; $query = $db->prepare( $sql ); $query->execute(); $results = $query->fetchall( pdo::fetch_assoc ); foreach( $results $row ){ print_r( $row ); } thanks guys! <?php $db = new pdo( 'mysql:host=localhost;dbname=betaddicted', 'root', '' ); $sql = "select * users id = ?"; $query = $db->prepare( $sql ); $query->bindvalue(1,$_session['id']); $query->execute(); $results = $query->fetchall( pdo::f...

algorithm - Dynamic Programming for coin change -

a given amount x should changed in coin system c = {c1, c2, … ck} such each coin ci has given weight wi. calculate total weight of possible changes. 2 changes different if contain same coins in different order. how can give dynamic programming recursion above problem? know recursion minimum coin change problem (i.e. c(x)=min{c(x-c)+1 x>0}). confusion total weight of possible changes.thanks. looks naive approach "store answer in array" works. let's c[i] represents coin value , w[i] represents coin weight, n number of coins. recursion part looks this: long sum = 0; (int = 0; < n; ++i) if (c[i] <= x) sum += w[i] + total_change_weight(x-c[i]); sample program without input, output , c/w initialization follows: #define n 10 #define max_value 101 long c[n]; long w[n]; long totals[max_value]; long total_change_weight(long x) { if (x == 0) return 0; if (totals[x] >= 0) return totals[x]; long sum = ...

ios - CALayer doesn't shrink downwards with anchorPoint and setAffineTransform -

Image
i want draw real-time graph (x axis: time, y axis: speed using corelocation) auto-scale in animation. can't control transform of layer. ... view.layer.anchorpoint = cgpointmake(0.5, 0.5) ... plotshapelayer.setaffinetransform (cgaffinetransformmakescale(1.0, 0.5)) ... i want shrink downwards😩 ... view.layer.anchorpoint = cgpointmake(0.0, 0.0) ... plotshapelayer.setaffinetransform (cgaffinetransformmakescale(1.0, 0.5)) ... the graph goes away...😩 ... view.layer.anchorpoint = cgpointmake(0.0, 1.0) ... plotshapelayer.setaffinetransform (cgaffinetransformmakescale(1.0, 0.5)) ... the graph go away...but graph appeared: could me? overall code below: class plotviewcontroller: uiviewcontroller { var shapelayers: [cashapelayer] = [] var pitchy: cgfloat = 12.0 var ymax: float = 0.0 ... ...