Posts

mysql - Why shouldn't I use mysql_* functions in PHP? -

what technical reasons why 1 shouldn't use mysql_* functions? (e.g. mysql_query() , mysql_connect() or mysql_real_escape_string() )? why should use else if work on site? if don't work on site, why errors like warning: mysql_connect(): no such file or directory ? the mysql extension: is not under active development is officially deprecated of php 5.5 (released june 2013). has been removed entirely of php 7.0 (released december 2015) this means of 31 dec 2018 not exist in supported version of php. gets security updates. lacks oo interface doesn't support: non-blocking, asynchronous queries prepared statements or parameterized queries stored procedures multiple statements transactions the "new" password authentication method (on default in mysql 5.6; required in 5.7) all of functionality in mysql 5.1 since deprecated, using makes code less future proof. lack of support prepared statements particularly important provide...

android - Build APK - ERROR - app:transformClassesWithDexForDebug -

i watched many threads here , still didnt find working solution. when want build apk, main error: error:execution failed task ':app:transformclasseswithdexfordebug'. com.android.build.api.transform.transformexception: com.android.ide.common.process.processexception: java.util.concurrent.executionexception: com.android.ide.common.process.processexception: error while executing java process main class com.android.dx.command.main arguments {--dex --num-threads=4 --multi-dex --main-dex-list c:\users\ratik\desktop\buildbox\volunteer\studio\app\build\intermediates\multi-dex\debug\maindexlist.txt --output c:\users\ratik\desktop\buildbox\volunteer\studio\app\build\intermediates\transforms\dex\debug\folders\1000\1f\main c:\users\ratik\desktop\buildbox\volunteer\studio\app\build\intermediates\transforms\jarmerging\debug\jars\1\1f\combined.jar} there few more errors, apear sometimes, of them: error: @ com.android.dx.cf.direct.classpathopener.proce...

angular - Injecting into existing constructor -

i'm having difficulties trying inject service in angular. i'm trying create service extending class existing constructor, follows: @injectable() export class authhttpservice extends authhttp { constructor(options: authconfig, http: http, defopts?: requestoptions) { super(options, http, defopts); } } my issue is: need inject service , can't seem put argument in constructor (can't put required argument after optional 1 , if put optional ? doesn't work). i've tried injector.get , works reasonably injects different instance of service other components , breaking app (i rely on service properties show information). any solution? thanks! to inject service, add constructor before optional parameter. fine. @injectable() export class authhttpservice extends authhttp { constructor(options: authconfig, http: http, otherservice: otherservice, defopts?: requestoptions) { super(options, http...

android - How to call a method of another class from onAuthenticationSucceeded method? -

i have used fingerprint login in android app. if authentication success,it call onauthenticationsucceeded method. after success authentication of fingerprint want verify username within onauthenticationsucceeded. couldn't call method(for verifying username) of class within onauthenticationsucceeded method. app seems stopped. how acheive it? please me. thank you this in fingerprinthandler.java public void onauthenticationsucceeded(fingerprintmanager.authenticationresult result{ login log=new login(); log.unamecheck(); } this method in login.java public void unamecheck(){ string uname=edit_username.gettext().tostring(); string storedpassword=mydb.getsingleentry(uname); if(storedpassword!=0){ toast.maketext(login.this,"login successfull",toast.length_long).show(); intent intent =new intent("michel.maan.login1"); startactivity(intent); } else{ toast.maketext(login.this,"login failed",toast.length_long).show(); } } ...

windows - Can't run Karma tests on TeamCity -

can't run tests karma on teamcity. locally works ok. os windows karma.config.js: frameworks: ['jasmine'], browsers: ['chrome'], reporters: ['coverage', 'progress'], plugins: [ 'karma-chrome-launcher', 'karma-jasmine', 'karma-teamcity-reporter', 'karma-coverage' ] in team city (command line): npm install karma-cli@1.0.0 karma start ./app/tests/karma.conf.js --reporters teamcity --single-run karma run result: [12:22:32]step 1: run tests (command line) (3s) [12:22:32]starting: d:\temp\agenttmp\custom_script7407887356682451667.cmd [12:22:32]in directory: d:\p4\c653be47039b7ced [12:22:35]karma-cli@1.0.0 node_modules\karma-cli [12:22:35]└── resolve@1.3.2 (path-parse@1.0.5) [12:22:35]process exited code 0 no tests running

javascript - The 3 different equals -

what difference between = , == , , === ? i think using 1 equal sign declare variable while 2 equal signs comparison condition , lastly 3 equal signs comparing values of declared variables. you have = assignment operator , == 'equal' comparison operator , === 'identical' comparison operator . $a = $b assign sets $a equal $b. $a == $b equal true if $a equal $b. $a === $b identical true if $a equal $b, , of same type. (introduced in php 4) for more info on need == , === , , situations use each, @ the docs .

scala - Case class value not found -

why accessing case class king in "figures match" informs me case class not found? "not found: value king" class field { val size: int = stdin.readint() var matrix: list[list[boolean]] = list.fill(size, size)(true) val figures: list[list[figure]] = list() def inrange(figures: list[list[figure]]) = { figures match { case king() => field.foreach(matrix) { if (matrix == true) { if (math.abs(m1-m2) <= 1 || math.abs(n1-n2) <= 1) matrix = false } } } } abstract class figure { case class rook() case class knight() case class bishop() case class queen() case class king() } king inside abstract class figure , not visible outside it. i guess, trying below trait figure case class rook() extends figure case class knight() extends figure case class bishop() extends figure case class queen() ex...