Olson CloudWorks 🚀

: All Posts

git pull or git merge between master and development branches

git pull or git merge between master and development branches

I have my master branch and a develop branch for working on a few changes I need to merge changes from master into develop but will eventually merge everything

Read more →

How can I access static class variables within methods

How can I access static class variables within methods

If I have the following code class Fooobject bar 1 def bahself printbar f Foo fbah It complains NameError global name bar is not defined How can I access

Read more →

How can I mock the JavaScript window object using Jest

How can I mock the JavaScript window object using Jest

I need to test a function which opens a new tab in the browser openStatementsReportcontactIds windowopenaurlcontactIds I would like to mock windows open

Read more →

How can I specify the base for Mathlog in JavaScript

How can I specify the base for Mathlog in JavaScript

I need a log function for JavaScript but it needs to be base 10 I cant see any listing for this so Im assuming its not possible Are there any math wizards out

Read more →

How can I unit test Arduino code

How can I unit test Arduino code

Id like to be able to unit test my Arduino code Ideally I would be able to run any tests without having to upload the code to the Arduino What tools or

Read more →

How do I dispatchsync dispatchasync dispatchafter etc in Swift 3 Swift 4 and beyond

How do I dispatchsync dispatchasync dispatchafter etc in Swift 3 Swift 4 and beyond

I have lots of code in Swift 2x or even 1x projects that looks like this Move to a background thread to do some long running work

Read more →

How do I get a UTC Timestamp in JavaScript

How do I get a UTC Timestamp in JavaScript

While writing a web application it makes sense to store server side all datetimes in the DB as UTC timestamps I was astonished when I noticed that you couldnt

Read more →

How do I get the AMPM value from a DateTime

How do I get the AMPM value from a DateTime

The code in question is below public static string ChangePersianDateDateTime dateTime SystemGlobalizationGregorianCalendar PC new

Read more →

How do you create a Swift Date object

How do you create a Swift Date object

How do you create a date object from a date in swift xcode eg in javascript you would do var day new

Read more →