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
import Ember from 'ember'; | |
import { observer } from '@ember/object'; | |
export default Ember.Component.extend({ | |
obsCallCount: 0, | |
prop1: null, | |
prop2: null, | |
prop1Observer: observer('prop1', 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
class RtsModbusSerialClient(ModbusSerialClient): | |
def _send(self, request): | |
''' Sends data on the underlying socket | |
:param request: The encoded request to send | |
:return: The number of bytes written | |
''' | |
if not self.socket: | |
raise ConnectionException(self.__str__()) |
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
public static class DateTimeExtensionMethods | |
{ | |
public static int GetMonthsDiff(this DateTime fromDate, DateTime toDate) | |
{ | |
if (fromDate > toDate) | |
{ | |
var aux = fromDate; | |
fromDate = toDate; | |
toDate = aux; | |
} |