This file contains hidden or 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
| const Transaction = require('loopback-datasource-juggler'); | |
| const update = async (ids, delta) => { | |
| const result = []; | |
| const tx = await models.MyModel.beginTransaction({ isolationLevel: Transaction.READ_COMMITTED }); | |
| try { | |
| for (const id of ids) { | |
| const entity = await updateById(id, delta, { transaction: tx }); | |
| result.push(entity); | |
| } |
This file contains hidden or 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
| #include <boost/thread.hpp> | |
| #include <iostream> | |
| using namespace std; | |
| void ThreadFunction() | |
| { | |
| int counter = 0; | |
| for(;;) |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <meta name="author" content="Galenic"> | |
| <script src="js/jquery-1.9.1.js"></script> | |
| <script src="js/knockout-2.1.0.js"></script> | |
| <script src="js/Chart.js"></script> | |
| <link rel="stylesheet" href="pure-min.css"> |
This file contains hidden or 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
| var groupedData = | |
| from s in db.Intraday | |
| where s.Date >= dateFrom && s.Date <= dateTo | |
| group s by new | |
| { | |
| Year = s.Date.Year, | |
| Month = baseUnit >= BaseUnit.Months ? s.Date.Month : 1, | |
| Day = baseUnit >= BaseUnit.Weeks ? s.Date.Day : 1, | |
| Hour = baseUnit >= BaseUnit.Hours ? s.Date.Hour : 0, | |
| Minute = baseUnit >= BaseUnit.Minutes ? s.Date.Minute : 0 |
This file contains hidden or 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
| using System; | |
| using System.Runtime.InteropServices; | |
| using System.ComponentModel; | |
| namespace GetLastUserInput | |
| { | |
| public class GetLastUserInput | |
| { | |
| private struct LASTINPUTINFO | |
| { |
This file contains hidden or 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/bash | |
| # store the current dir | |
| CUR_DIR=$(pwd) | |
| # Let the person running the script know what's going on. | |
| echo "\n\033[1mPulling in latest changes for all repositories...\033[0m\n" | |
| # Find all git repositories and update it to the master latest revision | |
| for i in $(find . -name ".git" | cut -c 3-); do |