Skip to content

Instantly share code, notes, and snippets.

View nrchandan's full-sized avatar

Chandan Kumar nrchandan

  • ThoughtWorks India Pvt. Ltd.
  • Hyderabad, India
View GitHub Profile
# https://example.com/products
{
"products": [{
# product1
}, {
# product2
}
...
],
"nextPageRequestPath": "/products?page=2"
public class Orchestrator {
public Orchestrator(ProductClient productClient) {
...
}
public static void main(String[] args) {
Iterator<List<Product>> productsIterator = productClient.fetchAllProducts();
while (productsIterator.hasNext()) {
List<Product> products = iterator.next();
products.stream()
public class ProductClient {
public ProductClient(Configuration config, RestTemplate restTemplate) {
...
}
public Iterator<List<Product>> fetchAllProducts() {
return new ResponseIterator();
}
private class ResponseIterator implements Iterator<List<Product>> {
# Type queries into this side of the screen, and you will
# see intelligent typeaheads aware of the current GraphQL type schema,
# live syntax, and validation errors highlighted within the text.
# We'll get you started with a simple query showing your username!
query {
viewer {
name
login
contributionsCollection(from: "2020-09-01T00:00:00.000Z") {
{
"name": "Multiplication Tables",
"version": "1.0",
"description": "Handy multiplication tables for school learning",
"permissions": ["storage"],
"background": {
"scripts": ["background.js"],
"persistent": false
},
"browser_action": {
$acl = Get-Acl C:\ProgramData\ssh\administrators_authorized_keys
$acl.SetAccessRuleProtection($true, $false)
$administratorsRule = New-Object system.security.accesscontrol.filesystemaccessrule("Administrators","FullControl","Allow")
$systemRule = New-Object system.security.accesscontrol.filesystemaccessrule("SYSTEM","FullControl","Allow")
$acl.SetAccessRule($administratorsRule)
$acl.SetAccessRule($systemRule)
$acl | Set-Acl
image: node:13.10
stage_job:
stage: deploy
only:
- develop
cache:
paths:
- node_modules
before_script:
var options = {
nodes: {
shape: "dot",
scaling: {
customScalingFunction: function(min, max, total, value) {
return value / total;
},
min: 5,
max: 150
}
def largest_num(nums):
"""
Form the largest number by joining the given list of numbers.
>>> largest_num([0])
0
>>> largest_num([1, 2, 0])
210
>>> largest_num([1, 10, 100])
110100
import "ITokenLedger.sol";
import "ProposalsLibrary.sol";
import "SecurityLibrary.sol";
import "DataVerifiable.sol";
contract Organisation is DataVerifiable
{
ITokenLedger public tokenLedger;
using ProposalsLibrary for address;
using SecurityLibrary for address;