searchforsolutions

Just another WordPress.com site

Solution – Eclipse / Springsource ToolSuite consumes large number of CPU cycles or hangs when starting Tomcat


  • Delete all the breakpoints that you may have set for debugging. I think it has some recursive call through the code to figure out the breakpoints. If the line has changed i guess it goes for a toss.
  • Disable all the validators
  • Close unrealted projects

Web application framework benchmarks


A very good benchmark for all the frameworks out in the market.

http://www.techempower.com/blog/2013/03/28/framework-benchmarks/

http://www.techempower.com/blog/2013/04/05/frameworks-round-2/

 

So JVM did not perform that bad. So much for all the noise about other frameworks.  JAVA is the king!

JQuery Gotchas!


  • Always name you form elements apart from id. JQuery will not serialize when you call form element e.g. $(“form”).serialize().
  • Instead of alerts for modern browsers one can use console.log($(“#myform”).serialize()); ,which can be viewed in the console.

 

 

Will keep this updated!

Fix broken chm ( compiled HTML file ) files


I’ve had a bunch of docs in *.chm format.
Looked like they were broken on Win 8.

Just figured out that due to some security enhancements the links & authority of the files weer broken.

To enable it:
1. Select the file
2. Right-click select properties
3. Watch out for the Unblock button.
4. Click on it and close the dialog by clicking on the button OK.
5. Launch the file and voila! It works!

An Kickass acquisition!


With Dell trying to go private by raising $22-25 billion has been talk of a lot of news feeds.
Microsoft has also jumped in to the fray with some news source quoting that they want to “invest” about $3 billion.

MS-Dell have long been into partnership for as long as Dell has existed to sell MS Windows on all its systems.
All OEM who sell desktops/tablets/PC pay a huge revenue as licensing fees to MS.

MS has also jumped into fray of building its own hardware(Surface).
Now imagine this MS has $66 billion in cash reserves.
Dell is going private with $22 billion.

Once private Delll may want to shelve off the PC divsion.
HP wanted/wants to shelve off the PC division.

HP is no. 1 in PC market & Dell is no. 3.

Now if MS buys out both the org say for about $30 billion it would be giant behemoth overnight!

It can break off ties with all other OEM’s and be the whole and sole in the market just like Apple but much bigger!
No one can ship it bundled with their devices.

The margins for MS would be huge, which no OEM can beat!

Dependency injection without frameworks in JDK 7

JSF framework for Web 2.0


Just stumbled across an JSF framework.

http://www.primefaces.org/

The demo portal looks quite promising

http://www.primefaces.org/showcase-labs/ui/home.jsf

I’m more comfortable with server-side user interface designing using component technologies.So this may not be suitable for high traffic websites but an awesome choice for enterprise applications

Togglable Tabs in Twitter Bootstrap


This is mostly my notes 🙂

Make sure the href element value(e.g. #idvalue ) of nav-tabs & the tab-pane id value are the same(e.g. idvalue).

If the tab element has href value #t1

<a href=”#t1″ data-toggle=”tab”>Section1</a>

then tab-pane id should be t1

<div class=”tab-pane active” id=”t1″>
<p>I’m in Section 1.</p>
</div>

Its not implied or easily visible in the documentation.

I’m a Java/C# developer, started to learn UI recently so its not obvious to me 🙂

Reference :

  1. http://twitter.github.com/bootstrap/javascript.html#tabs
  2. http://twitter.github.com/bootstrap/components.html#navs

Tip : Exception designing


  • Use checked exceptions for recoverable conditions and runtime exceptions for programming errors:Runtime exceptions should be used only to indicate programming errors, such as precondition violations.
  • Use exceptions only for exceptional conditions:That is, do not use exceptions for control flow.
  • Avoid unnecessary use of checked exceptions: In other words, don’t use checked exceptions for conditions from which the caller could not possibly recover, or for which the only foreseeable response would be for the program to exit.
  • Throw exceptions appropriate to the abstraction:In other words, exceptions thrown by a method should be defined at an abstraction level consistent with what the method does, not necessarily with the low-level details of how it is implemented.

C# : Working with .cab (cabinet) files


.NET does not have any classes for creating cabinet files out-of-box, so today I had to look what else is available out there. There are a couple of solutions I found for creating a .cab file from the .NET code. The one that actually worked for me was a library developed by Microsoft(!) as part of their Windows Installer XML (WiX) toolset. This toolset is distributed with a bunch of dlls as part of its SDK. The library that allows to create cabinet files is called Microsoft.Deployment.Compression.Cab and located under <WIX_Installation_Folder>\SDK.

In your project you need to add a reference to the Microsoft.Deployment.Compression.Cab.dll and to Microsoft.Deployment.Compression.dll (located under the same folder and has some base classes for types defined in the Microsoft.Deployment.Compression.Cab).

After doing this you can add files to a cabinet file from .NET with just a couple of line of code:

using Microsoft.Deployment.Compression.Cab;

//create a instance of Microsoft.Deployment.Compression.Cab.CabInfo
//which provides file-based operations on the cabinet file
CabInfo cab = new CabInfo(@”C:\Cabinet1.cab”);

//create a list with files and add them to a cab file
List<string> filesToArchive = new List<string>() { @”C:\file1″, @”C:\file2″ };
cab.PackFiles(null, filesToArchive, null);

//add a folder (including subdirectories) to another cab file with a maximum compression level
cab = new CabInfo(@”C:\Cabinet2.cab”);
cab.Pack(@”C:\folder”, true, Microsoft.Deployment.Compression.CompressionLevel.Max, null);

//unpack a cab file into C:\Unpacked folder
cab.Unpack(@”C:\Unpacked”);

The library has an MSDN style help file located under <WIX_Installation_Folder>\doc\DTFAPI.chm.

Another dll that also comes with WiX toolset SDK is Microsoft.Deployment.Compression.Zip.dll that provides similar functionality for packing and unpacking zip files.

Ref: http://wix.sourceforge.net/