Monday, May 7, 2018

json editor - reorder

https://github.com/josdejong/jsoneditor/

https://jsoneditoronline.org/

https://codebeautify.org

Java - How to get all the field names from JSON Schema

public void getKey(String response) {
List<String> keyList = new ArrayList<String>();
try {
JSONObject jsonObject = new JSONObject(response);
JSONObject schema = jsonObject.getJSONObject("schema");
JSONObject properties = schema.getJSONObject("properties");
Iterator iterator = properties.keys();
while (iterator.hasNext()) {
String key = iterator.next().toString();
keyList
.add(key);
}
String[] arr = (String[]) keyList.toArray(new String[keyList.size()]);
} catch (JSONException e) {
e
.printStackTrace();
}
}

Replace newline character in notepad ++

Then select Search → Replace from the menu, or hit Ctrl-H. The Replace dialog will show up. Therein make sure that you fill out the following values; Find what: \\n (yes, two back-slashes), Replace with: \n (yes, just one back-slash), and the most important, make sure you select the Extended (\n, \r, \t, \0, \x, …) radio button.

Sunday, May 6, 2018

Handlebar

{{def 'fifteenYear' (math birthYear '+' 15)}}
{{#ifb (or
(and
(compare (math fifteenYear '%' 4) '==' 0)
(compare (math fifteenYear '%' 100) '!=' 0)
)
(compare (math fifteenYear '%' 400) '==' 0)
)
}}
Your fifteenth anniversary was in a leap year!
{{else}}
Your fifteenth anniversary was in a non-leap year!
{{/ifb}}


https://github.com/beryx/handlebars-java-helpers


birthYear: 1997
http://handlebars-java-helpers.beryx.org/releases/latest/



Tuesday, May 1, 2018

RSql Queries

 's0==a0;s1==a1;s2==a2'                         | and(eq('s0','a0'), eq('s1','a1'), eq('s2','a2'))
         
 's0==a0,s1=out=(a10,a11),s2==a2'         | or(eq('s0','a0'), out('s1','a10', 'a11'), eq('s2','a2'))
         
 's0==a0,s1==a1;s2==a2,s3==a3'            | or(eq('s0','a0'), and(eq('s1','a1'), eq('s2','a2')), eq('s3','a3'))


 '(s0==a0,s1==a1);s2==a2'                 | and(or(eq('s0','a0'), eq('s1','a1')), eq('s2','a2'))
           
'(s0==a0,s1=out=(a10,a11));s2==a2,s3==a3'| or(and(or(eq('s0','a0'), out('s1','a10', 'a11')), eq('s2','a2')), eq('s3','a3'))

        
 '((s0==a0,s1==a1);s2==a2,s3==a3);s4==a4' | and(or(and(or(eq('s0','a0'), eq('s1','a1')), eq('s2','a2')), eq('s3','a3')), eq('s4','a4'))

          
'(s0==a0)'                               | eq('s0', 'a0')
 
      
 '((s0==a0));s1==a1'                      | and(eq('s0', 'a0'), eq('s1','a1'))

உப்பு மாங்காய்

சுருக்குப்பை கிழவி. சுருக்கங்கள் சூழ் கிழவி. பார்க்கும் போதெல்லாம் கூடையுடனே குடியிருப்பாள். கூடை நிறைய குட்டி குட்டி மாங்காய்கள். வெட்டிக்க...