using mocha/chai/sinon for node.js unit-tests? check out my utility: mocha-stirrer to easily reuse test components and mock require dependencies
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
/** | |
* Given a array of keys, filter those keys out of target object. | |
* If the key isn't in the object, that's okay. | |
* | |
* Example: | |
* filterFromObject(['a', 'b', 'c'], { 'a' : true, 'b' : true, 'c' : true, 'd' : true }) => {'d' : true} | |
* @param {array} keys_to_remove - Keys to remove from our object | |
* @param {object} target - Object to remove our keys from | |
*/ | |
export const filterFromObject = ( keys_to_remove, target ) => { |
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.Windows.Controls; | |
using System.Windows.Documents; | |
using System.Windows.Media; | |
... | |
FileInfo imgInfo = new FileInfo(path_to_img) | |
// Create rotate transform that will be applied to our image. | |
RotateTransform transform = new RotateTransform(90); // 90-degree rotation transform. | |
// Control type |
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.Windows.Controls; | |
using System.Windows.Documents; | |
using System.Windows.Media; | |
... | |
FileInfo imgInfo = new FileInfo(path_to_img) | |
// Create rotate transform that will be applied to our image. | |
RotateTransform transform = new RotateTransform(90); // 90-degree rotation transform. | |
// Control type |
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.Windows.Controls; | |
using System.Windows.Documents; | |
... | |
FileInfo imgInfo = new FileInfo(path_to_img) | |
// Control type | |
Image myImage = new Image(); | |
BitmapImage bitmapImg = new BitmapImage(); |