gradle tasks
gradle wrapper
gradlew build
gradlew run
jar tvf build/libs/gs-gradle-0.1.0.jar
HelloWorld.java
package hello;
import org.joda.time.LocalTime;
public class HelloWorld{
public static void main(String[] args){
LocalTime currentTime = new LocalTime();
System.out.println("The current local time is: " + currentTime);
Greeter greeter = new Greeter();
System.out.println(greeter.sayHello());
}
}
Greeter.java
package hello;
public class Greeter{
public String sayHello(){
return "Hello world!";
}
}
//build.gradle file starts
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'application'
mainClassName = 'hello.HelloWorld'
repositories{
mavenCentral()
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
dependencies {
compile "joda-time:joda-time:2.2"
}
jar{
baseName = 'gs-gradle'
version = '0.1.0'
}
task wrapper(type: Wrapper){
gradleVersion = '2.3'
}
//build.gradle file ends
Wednesday, November 4, 2015
Tuesday, November 3, 2015
Friday, October 16, 2015
Tuesday, October 13, 2015
Saturday, October 10, 2015
Wednesday, October 7, 2015
Monday, October 5, 2015
Tuesday, September 15, 2015
Tuesday, August 25, 2015
Tuesday, August 4, 2015
Enable Execution of Powershell Scripts inside Visual Studio
PS P:\>Set-ExecutionPolicy unrestricted
PS P:\>Set-ExecutionPolicy remotesigned
Note: clear all *.licx files
Note: clear all *.licx files
Tuesday, July 28, 2015
Tuesday, July 21, 2015
Compressed AJAX Data
String Extension Method Zip:
public static byte[] Zip(this string str)
{
var bytes = Encoding.ASCII.GetBytes(str);
using (var memorystreaminput = new MemoryStream(bytes))
using (var memorystreamoutput = new MemoryStream())
{
using (var gs = new GZipStream(memorystreamoutput, CompressionMode.Compress))
{
memorystreaminput.CopyTo(gs);
}
return memorystreamoutput.ToArray();
}
}
Repository Save:
var showsIQueryable = GetShowsIQueryable();
var serializer = new JavaScriptSerializer { MaxJsonLength = Int32.MaxValue };
var data = serializer.Serialize(showsIQueryable);
var compressedDataBlob = data.Zip();
//stores compressedDataBlob
Controller ActionResult Get:
var showsJsonText = _showService.CommandRepo.GetShowsCache();
Response.Headers.Remove("Content-Encoding");
Response.AppendHeader("Content-Encoding", "gzip");
return new FileContentResult(showsJsonText, "application/javascript");
JavaScript:
$.ajax({
type: "POST",
url: serverUrl,
dataType: 'json',
cache: false,
async: true,
data: JSON.stringify(model),
contentType: "application/json; charset=utf-8"
}).done(function (data) {
....
});
HTML:
<script type="text/javascript">
var shows = @Html.Raw(new JavaScriptSerializer().Serialize(Model.Shows)
</script>
public static byte[] Zip(this string str)
{
var bytes = Encoding.ASCII.GetBytes(str);
using (var memorystreaminput = new MemoryStream(bytes))
using (var memorystreamoutput = new MemoryStream())
{
using (var gs = new GZipStream(memorystreamoutput, CompressionMode.Compress))
{
memorystreaminput.CopyTo(gs);
}
return memorystreamoutput.ToArray();
}
}
Repository Save:
var showsIQueryable = GetShowsIQueryable();
var serializer = new JavaScriptSerializer { MaxJsonLength = Int32.MaxValue };
var data = serializer.Serialize(showsIQueryable);
var compressedDataBlob = data.Zip();
//stores compressedDataBlob
Controller ActionResult Get:
var showsJsonText = _showService.CommandRepo.GetShowsCache();
Response.Headers.Remove("Content-Encoding");
Response.AppendHeader("Content-Encoding", "gzip");
return new FileContentResult(showsJsonText, "application/javascript");
JavaScript:
$.ajax({
type: "POST",
url: serverUrl,
dataType: 'json',
cache: false,
async: true,
data: JSON.stringify(model),
contentType: "application/json; charset=utf-8"
}).done(function (data) {
....
});
HTML:
<script type="text/javascript">
var shows = @Html.Raw(new JavaScriptSerializer().Serialize(Model.Shows)
</script>
Thursday, July 16, 2015
Friday, July 10, 2015
Watching: Website Performance
Website Performance
Introduction
Make Performance a Priority
Why web performance?
Performance and user experience
How we get web performance
Focus on the critical path
The total cost of ownership
The Middle-End: YSlow
YSlow rules
Beyond the big 14
The Middle-End: Resources
Images
Minification
The Middle-End: Architecture & Communication
Understanding the middle-end
Introduction to architecture
Data validation
JSON, ajax, & Web sockets
The Front-End: Resource Loading
Preloading images
Lazy loading
Parallel loading
The Front-End: Abstractions & Animation
OO is slower
JavaScript animations
CSS transition vs. css animation
The Front-End: UI Thread, Garbage Collection & jsPerf
The single threaded browser
Threaded JavaScript
Dynamic memory allocation
Introduction jsPerf
JavaScript performance mythbusters
Tuesday, June 30, 2015
Sunday, June 28, 2015
Tuesday, June 23, 2015
Wednesday, June 17, 2015
Friday, May 29, 2015
Friday, May 15, 2015
Using scrum methods with Rational Team Concert Version 4
Using scrum methods with Rational Team Concert Version 4: Part 1. Set up the project, team area, and Product Backlog
Using scrum methods with Rational Team Concert Version 4: Part 2. Plan and manage sprints
Migrate Collaborative Lifecycle Management applications to a cluster: Part 3. Upgrade CLM applications to new versions
Get Ready to Sprint with Rational Team Concert
Search results page: http://www.ibm.com/developerworks/views/rational/libraryview.jsp?sort_by=&show_abstract=true&show_all=&search_flag=&contentarea_by=Rational&search_by=Rational+Team+Concert+Version+4&product_by=-1&topic_by=-1&industry_by=-1&type_by=All+Types&ibm-search=Search
How to write a great user story: https://help.rallydev.com/writing-great-user-story
Image link https://help.rallydev.com/sites/default/files/multimedia/user_story_callouts.png
Using scrum methods with Rational Team Concert Version 4: Part 2. Plan and manage sprints
Migrate Collaborative Lifecycle Management applications to a cluster: Part 3. Upgrade CLM applications to new versions
Get Ready to Sprint with Rational Team Concert
Search results page: http://www.ibm.com/developerworks/views/rational/libraryview.jsp?sort_by=&show_abstract=true&show_all=&search_flag=&contentarea_by=Rational&search_by=Rational+Team+Concert+Version+4&product_by=-1&topic_by=-1&industry_by=-1&type_by=All+Types&ibm-search=Search
How to write a great user story: https://help.rallydev.com/writing-great-user-story
Image link https://help.rallydev.com/sites/default/files/multimedia/user_story_callouts.png
Wednesday, May 13, 2015
Subscribe to:
Posts (Atom)



