This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Serializable] | |
/// <summary> Book Class </summary> | |
internal class Book | |
{ | |
/// <summary> Book Name </summary> | |
public string Name { get; set; } | |
/// <summary> Book ID </summary> | |
public int Id { get; set; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config(['$routeProvider', function($routeProvider) { | |
$routeProvider.when('/view1', {templateUrl: 'partials/partial1.html', controller: 'MyCtrl1'}); | |
$routeProvider.when('/view2', {templateUrl: 'partials/partial2.html', controller: 'MyCtrl2'}); | |
$routeProvider.otherwise({redirectTo: '/view1'}); | |
}]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ul class="menu"> | |
<li><a href="#/view1">view1</a></li> | |
<li><a href="#/view2">view2</a></li> | |
</ul> | |
<div ng-view></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config(['$stateProvider', '$urlRouterProvider', function($stateProvider, $urlRouterProvider) { | |
// | |
// For any unmatched url, redirect to | |
$urlRouterProvider.otherwise("/main"); | |
// | |
// Now set up the states | |
$stateProvider | |
.state('main', { | |
url: "/main", | |
templateUrl: "partials/main.html" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div ui-view></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ul class="menu"> | |
<li><a ui-sref="main.view1">view1</a></li> | |
<li><a ui-sref="main.view2">view2</a></li> | |
</ul> | |
<div ui-view></div> | |
<div>Angular seed app: v<span app-version></span></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
QSqlDatabase db = QSqlDatabase::addDatabase("QPSQL"); | |
db.setHostName("127.0.0.1"); | |
db.setDatabaseName("FirstDB"); | |
db.setUserName("demo"); | |
db.setPassword("password"); | |
bool ok = db.open(); | |
if (ok) | |
{ | |
QSqlQuery query("SELECT \"SID\", \"Account\", \"CreateDate\", \"LoginTimes\" FROM \"Account\""); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
while true | |
do | |
inotifywait -e modify -r . | |
qmake -project | |
qmake | |
make | |
done |