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
package com.foo; | |
@Slf4j | |
@Service | |
public class SalesForceClient { | |
private final WebClient webClient; | |
public SalesForceService(@Qualifier("salesForceWebClient") WebClient webClient) { | |
this.webClient = webClient; |
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
int x = 0; | |
try { | |
x = Integer.parseInt(strVal); | |
} catch (NumberFormatException e) { | |
x = defaultVal; | |
} |
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
@staticmethod | |
def to_bool(val: any) -> bool: | |
return val in [True, 1, '1', 'True', 'T', 'true', 't', 'Yes' 'Y', 'yes', 'y'] |
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
commit 8d0f31224615e1dff506cf7d91cd1105be2a7be7 | |
Author: John Doe <jd@developer.com> | |
Date: Tue Dec 12 16:34:37 2017 -0500 | |
Issue873: adding user schema validation |
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
def update_item_status(self, incoming_data): | |
if 'id' not in incoming_data or 'status' not in incoming_data: | |
return | |
new_status = incoming_data['status'] | |
for item in self.items: | |
if item.id != incoming_data['id'] or item.status == new_status: | |
continue | |
item.status = new_status | |
print(f"item {item.id} set {new_status}") |
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
def update_item_status(self, incoming_data): | |
if 'id' in incoming_data: | |
if 'status' in incoming_data: | |
new_status = incoming_data['status'] | |
for item in self.items: | |
if item.id == incoming_data['id']: | |
if item.status != new_status: | |
print(f"item {item.id} set {new_status}") | |
item.status = new_status |
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
commit 8d0f31224615e1dff506cf7d91cd1105be2a7be7 | |
Merge: e8ba40df 71076e0d | |
Author: John Doe <jd@developer.com> | |
Date: Tue Dec 12 16:34:37 2017 -0500 | |
Merge branch 'master' of https://github.com/monospacesoftware/quickstart |
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
commit 8d0f31224615e1dff506cf7d91cd1105be2a7be7 | |
Author: John Doe <jd@developer.com> | |
Date: Tue Dec 12 16:34:37 2017 -0500 | |
Issue873 fix |
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 logging | |
class DataManager: | |
def __init__(self, endpoint): | |
self.logger = logging.getLogger(f"{__name__}.{self.__class__.__name__}") | |
self.endpoint = endpoint | |
def connect(self): | |
self.logger.info(f"Connecting to {self.endpoint}") |
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 logging | |
class DataManager: | |
def __init__(self, endpoint): | |
self.logger = logging.getLogger(__name__) | |
self.endpoint = endpoint | |
def connect(self): | |
self.logger.info("DataManager connecting") |
NewerOlder