What is the difference between memoization and dynamic programming?

Relevant article on Programming.Guide: Dynamic programming vs memoization vs tabulation What is difference between memoization and dynamic programming? Memoization is a term describing an optimization technique where you cache previously computed results, and return the cached result when the same computation is needed again. Dynamic programming is a technique for solving problems of recursive nature, iteratively and is … Read more

spring @sqlgroup with multiple datasource

From the Transaction management for @Sql section of the Spring Reference Manual: If the algorithms used by SqlScriptsTestExecutionListener to detect a DataSource and PlatformTransactionManager and infer the transaction semantics do not suit your needs, you may specify explicit names via the dataSource and transactionManager attributes of @SqlConfig. For example: Regards, Sam (author of the Spring TestContext Framework)

PHP &$string – What does this mean?

You are assigning that array value by reference. passing argument through reference (&$) and by $ is that when you pass argument through reference you work on original variable, means if you change it inside your function it’s going to be changed outside of it as well, if you pass argument as a copy, function … Read more

PHP password_hash(), password_verify()

Here is what I use for password_hash and password_verify. Try it out as written, you can then start adding in the rest of your code once successful. Modify table and column name(s) to suit. N.B.: This is a basic insertion method. I suggest you use prepared statements instead. Sidenote: The password column needs to be long enough to accomodate the hash VARCHAR(255). … Read more

Git push won’t do anything (everything up-to-date)

git push doesn’t push all of your local branches: how would it know which remote branches to push them to? It only pushes local branches which have been configured to push to a particular remote branch. On my version of Git (1.6.5.3), when I run git remote show origin it actually prints out which branches are configured for … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)