Skip to content

Instantly share code, notes, and snippets.

View evonsdesigns's full-sized avatar
🌞

Joseph Evans evonsdesigns

🌞
View GitHub Profile
@evonsdesigns
evonsdesigns / test.json
Created April 19, 2018 19:54
fieldrates
{
"@type":"Job",
"notes":"Test Job for R2 Demo in TCI",
"cropYear":"2018",
"status":"COMPLETED",
"createdDate":"2018-04-02T08:59:44.957Z",
"startedDate":"2018-04-02T12:29:57.000Z",
"lastModifiedDate":"2018-04-02T12:30:55.000Z",
"type":"SEED",
"workPlan":{

The following example shows how by disable the USE_TRANSIENT_ANNOTATION feature, you can include @Transient pojo fields in your serialized json responses.

Application.java

@SpringBootApplication
public class Application {

    ...

    @Bean

Run these fun commands in the console:

  • parseFloat('100000.618033988757')

  • 10000000000000000 === 10000000000000001

  • .2 + .1

  • 5508402744232713000 + 10

.replace(/\.?0+$/, '')
@evonsdesigns
evonsdesigns / Java Interview Questions
Created January 6, 2017 22:20
Java Interview Questions
1. What is the difference between '==' and .equals()?
2. Is java pass-by-value or pass-by-reference?
3. What is the difference between checked and unchecked exceptions?
4. What is an abstract class and when would you use it?
@evonsdesigns
evonsdesigns / Add _blank to all links on page.js
Created May 29, 2014 03:31
Add target="_blank" to all links on page
@evonsdesigns
evonsdesigns / Javascript Create Random GUID.html
Created May 20, 2014 18:55
Javascript Create Random GUID
<button type="button" class="btn btn-default btn-xs" onclick="guid()" title="generate a random guid">Generate Random Guid</button>
<br/>
<textarea id="guidtxt" cols="60"></textarea>
<script>
function guid() {
var guid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {var r = Math.random()*16|0,v=c=='x'?r:r&0x3|0x8;return v.toString(16);});
$("#guidtxt").val(guid);
$("#guidtxt").select();
}
</script>
@evonsdesigns
evonsdesigns / HTML Encode Decode Textarea Javascript.js
Last active August 29, 2015 14:01
HTML Encode Decode Textarea Javascript
<button type="button" class="btn btn-default btn-xs" onclick="htmlEncode()" title="encode">HTML encode</button>
<button type="button" class="btn btn-default btn-xs" onclick="htmlDecode()" title="encode">HTML decode</button>
<br/>
<textarea id="encodedecode" cols="80" rows="10"></textarea>
<script>
function htmlEncode(){
var encoded = $("#encodedecode").val().replace(/&/g, '&amp;')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;')
.replace(/"/g, '&quot;')
@evonsdesigns
evonsdesigns / Threadsafe calls to controls in C# Winforms using parameters.cs
Last active August 29, 2015 13:57
Threadsafe calls to controls in C# Winforms using parameters
delegate void updateDateTimePickerCallback(int t);
private void updateDateTimePicker(int t)
{
if (dateTimePicker1.InvokeRequired)
{
updateDateTimePickerCallback s = new updateDateTimePickerCallback(updateDateTimePicker);
this.Invoke(s, new object[] { t });
}
else