DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
  • submit to reddit
Hearsay Social10/04/14
776 views
0 replies

Change, cooperation, and the transforming customer experience

Last week’s LIMRA 2014 European Annual Meeting was my first insurance conference, so I didn’t quite know what to expect. As it turns out, when you bring together a diverse group of people from Europe, Asia and Africa–and add a bit of Paris magic–you come out with some impressive results.

Adi Gaskell10/04/14
552 views
0 replies

NHS England launch their 4th Challenge competition

Challenge style innovation contests are not a new thing, with the first said to be the Longitude Prize established in 1714 to try and find an accurate means of navigating at sea.

Shany Dembak10/04/14
430 views
0 replies

4 Ways to Convert Website Traffic

Building traffic to your website is vital, but it’s not the most important thing to your business. You could see thousands of visitors to your site every day, but if they’re not converting from visitor to client, then you see no benefits at all.

Adi Gaskell10/03/14
467 views
0 replies

How the crowd can improve water quality

Earlier this year I wrote about a new product called uMed. The device, which costs just $25, aims to offer a range of chemical and biochemical tests using a number of commercially available test strips and electrodes.

Christopher Taylor10/03/14
431 views
0 replies

The missing part of the Internet of Things conversation

The Internet of Things (IoT) promises all new ways to use sensor and machine data to create efficiency, new features and foster business model competition.

Adi Gaskell10/03/14
404 views
0 replies

Research reveals the role mediators play in government social media comms

There have been a few studies this year that have looked at the way misinformation spreads through our social networks. Central to many of the findings emerging from these studies has been the role of key influencers in shaping opinion.

Christopher Taylor10/03/14
829 views
0 replies

Internet of Things (IoT) is Industrial Revolution meeting Internet Revolution

I had the pleasure today to hear Richard Soley, Chairman and CEO at Object Management Group, talk at the Interop Internet of Things Summit in New York.

Adi Gaskell10/03/14
386 views
0 replies

Why breaks are so important at work

Stress is widely believed to be a huge drain on our workplaces. A Towers Watson survey recently found for instance that stress levels directly correlate with low levels of employee engagement.

Paul Andrews10/02/14
317 views
0 replies

Trash Your Paper Resume — Social Media Made it Obsolete

There's 6 blood-chilling serpents crawling up your arm, attached to a severed head dripping crimson drops onto the cold marble floor.

Rob Allen10/02/14
1647 views
0 replies

Setting Up Mailcatcher as a Service in Debian/Ubuntu

I've recently been changing joind.in's Vagrant system to use Debian and one issue I came across was getting Mailcatcher to start on boot and integrate property with the service command.

Rogier Noort10/02/14
457 views
0 replies

Social Business as an Extreme Sport

Many years ago I heard a story of a certain Ricardo Semler. The story went that within his company there were no executives, employers could come and go when as they pleased and they could determine their own salary.

Adi Gaskell10/02/14
597 views
0 replies

The fusion of MOOCs, gaming and citizen science

I have long believed that MOOCs offer a tremendous platform for doing social good. We’ve seen with various gamified citizen science projects for instance, that there are a huge number of people willing to pull together and contribute their own bit to various projects, whether it’s enhancing our understanding of neuroscience or the way proteins operation.

Mark Morrell10/02/14
304 views
0 replies

Do you worry about the content you can’t find?

Do you worry about the content you can’t find? If you can’t find the information, how can you possibly manage it? Can you afford to take that risk?

Adi Gaskell10/02/14
302 views
0 replies

What you get when you buy likes on Facebook

I’ve written a lot over the past few years about the growing popularity of astroturfing, which is the purchasing of various fake things to boost your social media metrics.

//Saving a Raster Image to TIFF with Deflate/Adobe Deflate Compression

// [C# Code Sample]

string sourceFilePath = myDir + "sample.bmp";
string destinationFilePath = myDir + "output.tiff";

//Create an instance of TiffOptions and set its various properties
TiffOptions options = new TiffOptions();
options.BitsPerSample = new ushort[] { 8, 8, 8 };
options.Photometric = TiffPhotometrics.Rgb;
options.Xresolution = new TiffRational(72);
options.Yresolution = new TiffRational(72);
options.ResolutionUnit = TiffResolutionUnits.Inch;
options.PlanarConfiguration = TiffPlanarConfigs.Contiguous;

//Set the Compression to AdobeDeflate
options.Compression = TiffCompressions.AdobeDeflate;
//Or Deflate
//options.Compression = TiffCompressions.Deflate;

//Load an existing image in an instance of RasterImage
using (RasterImage image = (RasterImage)Image.Load(sourceFilePath))
{
    //Create a new TiffImage from the RasterImage
    using (TiffImage tiffImage = new TiffImage(new TiffFrame(image)))
    {
        //Save the resultant image while passing the instance of TiffOptions
        tiffImage.Save(destinationFilePath, options);
    }
}

//[VB.NET Code Sample]

Dim sourceFilePath As String = myDir & "sample.bmp"
Dim destinationFilePath As String = myDir & "output.tiff"

'Create an instance of TiffOptions and set its various properties
Dim options As New TiffOptions()
options.BitsPerSample = New UShort() { 8, 8, 8 }
options.Photometric = TiffPhotometrics.Rgb
options.Xresolution = New TiffRational(72)
options.Yresolution = New TiffRational(72)
options.ResolutionUnit = TiffResolutionUnits.Inch
options.PlanarConfiguration = TiffPlanarConfigs.Contiguous

'Set the Compression to AdobeDeflate
options.Compression = TiffCompressions.AdobeDeflate
'Or Deflate
'options.Compression = TiffCompressions.Deflate;

'Load an existing image in an instance of RasterImage
Using image As RasterImage = CType(Image.Load(sourceFilePath), RasterImage)
	'Create a new TiffImage from the RasterImage
	Using tiffImage As New TiffImage(New TiffFrame(image))
		'Save the resultant image while passing the instance of TiffOptions
		tiffImage.Save(destinationFilePath, options)
	End Using
End Using

//Creating TIFF Image with Deflate/Adobe Deflate Compression

//[C# Code Sample]

string destinationFilePath = myDir + "output.tiff";

//Create an instance of TiffOptions and set its various properties
TiffOptions options = new TiffOptions();
options.BitsPerSample = new ushort[] { 8, 8, 8 };
options.Photometric = TiffPhotometrics.Rgb;
options.Xresolution = new TiffRational(72);
options.Yresolution = new TiffRational(72);
options.ResolutionUnit = TiffResolutionUnits.Inch;
options.PlanarConfiguration = TiffPlanarConfigs.Contiguous;

//Set the Compression to AdobeDeflate
options.Compression = TiffCompressions.AdobeDeflate;
//Or Deflate
//options.Compression = TiffCompressions.Deflate;

//Create a new TiffImage with specific size and TiffOptions settings
using (TiffImage tiffImage = new TiffImage(new TiffFrame(options, 100, 100)))
{
    //Loop over the pixels to set the color to red
    for (int i = 0; i < 100; i++)
    {
        tiffImage.ActiveFrame.SetPixel(i, i, Color.Red);
    }
    //Save resultant image
    tiffImage.Save(destinationFilePath);
}

//[VB.NET Code Sample]

Dim destinationFilePath As String = myDir & "output.tiff"

'Create an instance of TiffOptions and set its various properties
Dim options As New TiffOptions()
options.BitsPerSample = New UShort() { 8, 8, 8 }
options.Photometric = TiffPhotometrics.Rgb
options.Xresolution = New TiffRational(72)
options.Yresolution = New TiffRational(72)
options.ResolutionUnit = TiffResolutionUnits.Inch
options.PlanarConfiguration = TiffPlanarConfigs.Contiguous

'Set the Compression to AdobeDeflate
options.Compression = TiffCompressions.AdobeDeflate
'Or Deflate
'options.Compression = TiffCompressions.Deflate;

'Create a new TiffImage with specific size and TiffOptions settings
Using tiffImage As New TiffImage(New TiffFrame(options, 100, 100))
	'Loop over the pixels to set the color to red
	For i As Integer = 0 To 99
		tiffImage.ActiveFrame.SetPixel(i, i, Color.Red)
	Next i
	'Save resultant image
	tiffImage.Save(destinationFilePath)
End Using

//Loading TIFF with Deflate/Adobe Deflate Compression

//[C# Code Sample]

string filePath = "TIFF-Compression-Deflate.tif";

using (TiffImage tiffImage = (TiffImage)Image.Load(filePath))
{
   // do processing
}

//[VB.NET Code Sample]

Dim filePath As String = "TIFF-Compression-Deflate.tif"

Using tiffImage As TiffImage = CType(Image.Load(filePath), TiffImage)
   ' do processing
End Using
Alex Curylo10/01/14
698 views
0 replies

Apple-Paying The Piper

Haven’t seen very much discussion of Apple Pay yet, but we’re kinda suspecting here it might turn out to be more of a Big Deal than most people are expecting right now.

Jorge Ramon10/01/14
1692 views
0 replies

Mobile UI Patterns - A Flowchart for User Registration, Login and Logout

In this mobile UI patterns article we will build a flowchart depicting the screens needed to handle user registration, login and logout in a mobile application.

Adi Gaskell10/01/14
721 views
0 replies

Why leadership should be a collaborative exercise

In social business circles, there is a strong disposition towards inclusivity in decision making. The notion is that when you involve people in decisions that effect them, then it is much more likely that they will be on board with any changes that are required.

Hearsay Social10/01/14
309 views
0 replies

Introducing Hearsay Social On the Air

As part of our ongoing commitment to serve the financial services community, we are excited to announce the launch of the “Hearsay Social On the Air” podcast.

Adi Gaskell10/01/14
273 views
0 replies

Is it intelligence or personality that matters?

It probably goes without saying that most organizations strive to attract the most talented people, whether it’s through direct employment, or more recently via open innovation challenges. It doesn’t always work out however.