Tested with Apache Spark 2.1.0, Python 2.7.13 and Java 1.8.0_112
For older versions of Spark and ipython, please, see also previous version of text.
// Show rendered HTML | |
const wrapper = shallow(<App />) | |
console.log(wrapper.debug()) | |
// Disable lifecycle methods of react within tests | |
const wrapper = mount(<App />, { disableLifecycleMethods: true }) | |
// Assert number of occurrences | |
expect(wrapper.find('p').length).toBe(1) |
Tested with Apache Spark 2.1.0, Python 2.7.13 and Java 1.8.0_112
For older versions of Spark and ipython, please, see also previous version of text.
import Foundation | |
let notified = dispatch_semaphore_create(0) | |
let group = dispatch_group_create() | |
let queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0) | |
for n in 0..<20 { | |
dispatch_group_async(group, queue) { | |
let timeInterval = Double(arc4random_uniform(1000)) * 0.01 |
//Group 4 will be executed last after 1-3 are done executing | |
//Multi Threadin in Swift Group Dispatch Example | |
//Global Dispatch Queue | |
let dispatchGroup = dispatch_group_create() | |
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), { | |
git fetch --all | |
git reset --hard origin/master | |
git pull origin master |
# Step 1: Set priveleges | |
$ sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -configure -allowAccessFor -allUsers -privs -all | |
Starting... | |
Setting allow all users to YES. | |
Setting all users privileges to 1073742079. | |
Done. | |
# Step 2: Allow VNC clients |