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
@Override | |
public Object[] explode( E e ) { | |
List<Field> fields = Arrays.asList(entityType.getDeclaredFields()); | |
Object[] parts = new Object[fields.size()]; | |
for (int i = 0; i < parts.length; i++) { | |
try { | |
Field field = fields.get(i); | |
field.setAccessible(true); | |
parts[i] = field.get(e); |
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
{-# LANGUAGE TemplateHaskell #-} | |
{-# LANGUAGE ViewPatterns #-} | |
{-# LANGUAGE LambdaCase #-} | |
import Control.Monad.State | |
import Control.Monad.Extra | |
import Control.Lens | |
import Text.Read (readMaybe) | |
import Data.Char | |
import Data.Maybe |
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
data Column v = Column String | |
data Table columnRow = Table {name :: String, columns :: Record columnRow} | |
data Select tableColumns selectedColumns = Select | |
(Record tableColumns -> Record selectedColumns) | |
(Table tableColumns) | |
data ToStr = ToStr |
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
fun loadData() { | |
// this is the url where we want to get our data | |
// Note: 10.0.2.2 is for the Android -emulator, it redirects to your computers localhost! | |
val JSON_URL = "https://jsonplaceholder.typicode.com/todos/" | |
// Request a string response from the provided URL. | |
val stringRequest: StringRequest = object : StringRequest( | |
Request.Method.GET, JSON_URL, | |
Response.Listener { response -> |