Android REST Controller with Simple Cache Control Headers using Retrofit 1.9.0 + OkHttp 2.2.0
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.0; | |
contract BankOwned { | |
address public bankAddress; | |
constructor() { | |
bankAddress = msg.sender; | |
} |
pragma solidity ^0.4.11; | |
/** | |
* Math operations with safety checks | |
*/ | |
library SafeMath { | |
function mul(uint a, uint b) internal returns (uint) { | |
uint c = a * b; | |
assert(a == 0 || c / a == b); | |
return c; |
pragma solidity ^0.4.11; | |
/** | |
* Math operations with safety checks | |
*/ | |
library SafeMath { | |
function mul(uint a, uint b) internal returns (uint) { | |
uint c = a * b; | |
assert(a == 0 || c / a == b); | |
return c; |
const WS = require('ws') | |
const _ = require('lodash') | |
const async = require('async') | |
const fs = require('fs') | |
const moment = require('moment') | |
const pair = process.argv[2] | |
const conf = { | |
wshost: "wss://api.bitfinex.com/ws/2" |
<?xml version="1.0" encoding="utf-8"?><!-- | |
~ Copyright (C) 2015 The Android Open Source Project | |
~ | |
~ Licensed under the Apache License, Version 2.0 (the "License"); | |
~ you may not use this file except in compliance with the License. | |
~ You may obtain a copy of the License at | |
~ | |
~ http://www.apache.org/licenses/LICENSE-2.0 | |
~ | |
~ Unless required by applicable law or agreed to in writing, software |
''' | |
BEGIN GPL LICENSE BLOCK | |
This program is free software; you can redistribute it and/or | |
modify it under the terms of the GNU General Public License | |
as published by the Free Software Foundation; either version 2 | |
of the License, or (at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
#How to Construct Yourself UI in KeystoneJS
KeystoneJS provide Admin UI with one set of route controllers and view templates(list&item) for all of the models.But usually,you will need some custome views other than Admin UI to display models. Although the KeystoneJS documention don't tell us much about how to contruct custome view,we can learn this from the source code in skeleton project generated by yo keystone
,or you can just check out the keystone demo project's source code.We will walk through the blog feature's implementation in this demo application to demonstrate how to construct custome UI in KeystoneJS application.
As KeystoneJS documention described in Routes & Views section,there is a routes/index.js
file, where we bind application's URL patterns to the controllers that load and process data, and render the appropriate template.You can find following code in it:
app.get('/blog/:catego