Posts

android - Why text is not bold when passing the style through custom view attributes? -

suppose have .xml style: <style name="materialpreviewdetailstextsmall"> <item name="android:layout_marginleft">@dimen/material_margin</item> <item name="android:textcolor">@color/material_preview_backgroud</item> <item name="android:textsize">@dimen/material_normal_smal_text</item> <item name="android:textstyle">bold</item> </style> i pass custom view through attributes: <pl.valueadd.ledoc.view.viewpreviewrow ... app:view_title="@string/equipment_overview_id_label" app:view_title_style="@style/materialpreviewdetailstextsmall"/> inside custom view obtain styled attributes , apply textview : public class viewpreviewrow extends relativelayout { textview tvtitle; public viewpreviewrow(context context, attributeset attrs) { super(context, attrs); init...

For Node.js applications, when to use port 3000 vs 8080? -

i have been reading on tutorials, , although of them use port 3000 node applications... of them use port 8080 instead. wondering recommended practice, , under circumstances should use other. guidelines? there isn't official node.js end, in, there aren't official remarks pertaining this. you'd find many people who'd confused using port 80 , 443 http , https respectively standard. standard standard pc , these details revealed in document released in 1994 support of t.b. lee. for general network usage try not use ports bellow 1024 otherwise you'd have have root access on network server run process. other guy said, use unused port , you'll fine above 1024 or else you'd need root access. i'd suggest use reverse proxy engine make things more easier , suitable. preferably nginx, they'd have multiple instances of server which'll utilize server properly. although isn't necessary make use of reverse proxy because things work without ...

javascript - Angular Js ui.bootstrap tabs customization -

i using angular js ui.bootstrap in project , want add tabs using ui bootstrap. using ui.bootstrap directive tabs. there no ul li content inside angular ui bootstrap tag. <uib-tabset active="active"> <uib-tab index="0" heading="static title 1">static content 1</uib-tab> <uib-tab index="0" heading="static title 2">static content 2</uib-tab> <uib-tab index="0" heading="static title 3">static content 3</uib-tab> </uib-tabset> i want add span tag inside tag in tabs. output want. <li ng-class="{active: active, disabled: disabled}" index="0" heading="static title 1" class="ng-isolate-scope active"> <a href="" ng-click="select()" uib-tab-heading-transclude="" class="ng-binding"> <span class="badge">5</span>static title 1 </a>...

c++ - CUDA Compute Capability Backwards Compatibility -

i working cuda code compiled compute capability 5.2. machine happens have compute capability 5.2 gpu (geforce gtx 970). however, question is: code compiled compute capability 5.2 still run on machine compute capability low 3? (assuming code never violates limitations of lower compute capability shared memory differences, etc.) the 1 word answer no. as general rule, can run code compiled lower compute capabilities on higher compute capability hardware, not other way around. if compile compute 5.2, should run on future hardware, not on older hardware.

javascript - Where should i store my JSON Web Token for a 'non-singlepage' frontend application -

i've built simple rest api hapijs using jwt auth method. want build pure es6 frontend, not have spa (there more 1 .html file). my question: best way store jwt after login. local storage, cookie ? if store in cookie, you'll vulnerable csrf attack, because browser automatically send token each request. see more information on these type of attacks: https://en.wikipedia.org/wiki/cross-site_request_forgery i recommend storing in localstorage , sending token via head of requests. note : browser doesn't automatically you! example: x-access-token: bearer -jwt goes here-

php - How to check auth user in laravel subdomain? -

i have project it's backend built in laravel 5.2 , frontend built in php. please check folder structure below it's in localhost. backend : http://crm.test.dev root folder, laravel5.2 -> public ->index.php frontend: http://test.dev url point laravel5.2 -> public -> frontend -> index.php my purpose is, if user(admin) logged in backend( http://crm.test.dev ) , not signed out. same user accessing frontend( http://test.dev ") @ time need show alert logged in backend( http://crm.test.dev ). frontend->index.php require __dir__.'/../../bootstrap/autoload.php'; $app = require_once __dir__.'/../../bootstrap/app.php'; $kernel = $app->make(illuminate\contracts\http\kernel::class); $response = $kernel->handle( $request = illuminate\http\request::capture() ); $isauthorized = auth::check(); $user = auth::user(); echo $user; actually issue config -> session.php {'domain' => null,} . update...

android - Apply matrix from one bitmap to another bitmap with different dimension but with same preview result -

Image
i creating simple preview application display different bitmap dimension. i want copy first bitmap matrix , use second bitmap larger dimension. i want preview of second image of first one. how apply matrix second image when applied on second image higher resolution, preview same first image. searching week didn't find luck put here. hope can you.