If you accidentally mistype a commit message, you can change it using git commit --amend - m "new message"
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
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Data; | |
using System.Diagnostics; | |
using System.Linq; | |
using System.ServiceProcess; | |
using System.Text; | |
using System.Configuration; | |
using System.IO; |
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
using DocumentFormat.OpenXml.Packaging; | |
using OpenXmlPowerTools; | |
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Xml.Linq; | |
using System.Drawing.Imaging; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
using Microsoft.AspNetCore.Http; | |
using Newtonsoft.Json; | |
public static class SessionExtensions | |
{ | |
public static void Set<T>(this ISession session, string key, T value) | |
{ | |
session.SetString(key, JsonConvert.SerializeObject(value)); | |
} |
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
module.exports = function(){ | |
var client = './src/client/'; | |
var config = { | |
temp: './.tmp/', | |
sass : client + 'styles/style.scss' | |
}; | |
return config; | |
}; |
Comparing two images: The observed position vs the required position.
- Load your image and binarize it.
- Use cv2.findContours(thresh, 1, 2) to find the contour of interest object.
- Find the bounding rectangle using cv2.boundingRect(cnt) function.
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
-- Delete row #1 | |
DELETE FROM PhotoAlbum WHERE PhotoId = 1 | |
SELECT * FROM PhotoAlbum | |
-- Forcing garbage collection won't delete the file without a BACKUP if using FULL recovery model | |
EXEC sp_filestream_force_garbage_collection | |
-- Switch from FULL to SIMPLE recovery model | |
SELECT name, recovery_model_desc FROM sys.databases WHERE name = 'PhotoLibrary' | |
ALTER DATABASE PhotoLibrary SET RECOVERY SIMPLE |
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
// http://cdnjs.cloudflare.com/ajax/libs/q.js/0.9.6/q.js | |
function doSomethingAsync(item) { | |
return Q.promise(function(resolve) { | |
$("#results").append("<div>" + item + "</div>"); | |
setTimeout(resolve.bind(null, item), 3000); | |
}); | |
} | |
function doAsyncSeries(arr) { | |
return arr.reduce(function (promise, item) { |
Developers writing bots all face the same problems:
- Require I/O
- Lang and Dialog Skill
You can create a bot with any programming language by using the Bot Framework REST API. There are three REST APIs in the Bot Framework:.
- Bot Connector REST API : send and receive messages to channels configured in the Bot Framework Portal.
- Bot State REST API : enables your bot to store and retrieve state.
NewerOlder