Visual Studio (IDE)
WPA (performance analyzer)
WinDbg (debugger)
IDA Pro (disassembler)
dotPeek (decompiler for .NET)
WinMerge (diff tool)
HxD or 010 editor (hex editor)
Speedcrunch (calculator)
Firefox (browser)
Rohitab API monitor (API call monitoring)
SOS (a WinDbg extension for .NET)...
Phalcon uses db service by default to obtain connection to databases.
Assuming you have an conguration file with database field set up, you can include or autoload following code to obtain connection with database for your project:
$di->set('db', function () use ($config) {
$dbconf = $conf...
<?php
//Create a new SQLite3 object from a database file on the server.
$database = new SQLite3('mysqlitedb.db');
//Query the database with SQL
$results = $database->query('SELECT bar FROM foo');
//Iterate through all of the results, var_dumping them onto the page
while ($row = $resu...
In addition to using LIMIT SQL statements you can also use the SQLite3 function querySingle to retrieve a single row, or the first column.
<?php
$database = new SQLite3('mysqlitedb.db');
//Without the optional second parameter set to true, this query would return just
//the first column of ...
Using core debugger
Node.js provides a build in non graphical debugging utility. To start the build in the debugger, start the application with this command:
node debug filename.js
Consider the following simple Node.js application contained in the debugDemo.js
'use strict';
function addTwoN...
A basic Nightwatch installation for Meteor will have the following directories and files installed.
/myapp
/myapp/.meteor/nightwatch.json
/client/main.html
/client/main.js
/client/main.css
/tests
/tests/nightwatch
/tests/nightwatch/assertions
/tests/nightwatch/commands
/tests/nightwatch/da...
Helpers should extend from Mage_Core_Helper_Abstract:
# File: app/code/local/Vendor/Package/Helper/Data.php
class Vendor_Package_Helper_Data extends Mage_Core_Helper_Abstract
{
public function multiply($a, $b)
{
return $a * $b;
}
}
To be able to access is via Mage::hel...
Use the annotation -- @FixMethodOrder(MethodSorters.DEFAULT). This runs all tests within the class in a deterministic and somewhat predictable order. The implementation hashes the method names and compares them. In the scenario of a tie, it sorts by lexicographical order.
Code Segment Below Taken f...
Use the annotation @FixMethodOrder with the method sorter MethodSorters.NAME_ASCENDING. This will run all tests within the class in a deterministic and predictable order. The implementation compares the method names and in the case of a tie, it compares the methods' toString().
Code Segment Below T...
[root@localhost ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
d87bf9607836 8251da35e7a7 "/bin/bash" About a minute ago Up 31 seconds vol3
[r...
[root@localhost ~]# docker run -it --volumes-from vol3 8251da35e7a7 /bin/bash
root@ef2f5cc545be:/# ls
bin boot data dev etc home lib lib64 media mnt opt proc root run sbin srv sys tmp usr var
root@ef2f5cc545be:/# ls /data
abc1 abc10 abc2 abc3 abc4 abc5 abc6 abc7...
//create a component that will be injected
trait TimeUtil {
lazy val timeUtil = new TimeUtilImpl()
class TimeUtilImpl{
def now() = new DateTime()
}
}
//main controller is depended on time util
trait MainController {
_ : TimeUtil => //inject time util into main...