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
Adi Gaskell07/24/14
0 replies

The sharing economy comes to car insurance

Car insurance does come across as one of the more obvious applications of the sharing economy model that has taken so many industries by storm.

Jive Community07/24/14
0 replies

9 signs you could be jobless in 2015

Businesses; jobs and the workplaces are changing faster than ever before. Skills which were considered 'hot' until yesterday are no longer considered even special today.

Adi Gaskell07/24/14
0 replies

Is the idea of human props taking the sharing economy too far?

The sharing economy has undoubtedly been a tremendous boon for the efficient utilization of our resources. Whether it’s our homes or our cars, a plethora of businesses have sprung up that have offered us the potential to rent out our unused, or under-used, things to others.

Rogier Noort07/24/14
0 replies

The Reimagining Work Podcast

Finally. I love podcasts. Or rather, I love producing stuff, creating stuff. What often lacks is a purpose, a goal, a topic. Writing blogposts is one of the channels where I can explore some creativity, use my brain and puny talents to produce something...

Paul Andrews07/23/14
0 replies

Why Your Staff Should Be Allowed to Work from Home

As a business owner, you probably hear about telecommuting and having employees work from home fairly often. Your initial thought may be that allowing employees to work from home would be counterproductive and nothing but a hassle.

//[C# Code Sample]

Dictionary<string, Symbology> collection = new Dictionary<string, Symbology>();
collection.Add("ONE123", Symbology.Code39Standard);
collection.Add("Process Collection", Symbology.DataMatrix);
collection.Add("Dictionary Collection", Symbology.QR);
collection.Add("X06712AT", Symbology.Code128);
collection.Add("979026000043", Symbology.EAN13);
collection.Add("Aztec BarCode", Symbology.Aztec);

List<Bitmap> images = new List<Bitmap>();

foreach (KeyValuePair<string, Symbology> pair in collection)
using (BarCodeBuilder builder = new BarCodeBuilder())
    builder.CodeText = pair.Key;
    builder.SymbologyType = pair.Value;

int maxWidth = int.MinValue;
int sumHeight = 0;
foreach (Bitmap bmp in images)
    sumHeight += bmp.Height;
    if (maxWidth < bmp.Width)
        maxWidth = bmp.Width;

const int offset = 10;
Bitmap resultBitmap = new Bitmap(maxWidth + offset * 2, sumHeight + offset * images.Count);
using (Graphics g = Graphics.FromImage(resultBitmap))

    int yPosition = offset;
    for (int i = 0; i < images.Count; ++i)
        Bitmap currentBitmap = images[i];
        g.DrawImage(currentBitmap, offset, yPosition);
        yPosition += currentBitmap.Height + offset;

resultBitmap.Save("barcode.png", ImageFormat.Png);

//[VB.NET Code Sample]

Dim collection As New Dictionary(Of String, Symbology)()
collection.Add("ONE123", Symbology.Code39Standard)
collection.Add("Process Collection", Symbology.DataMatrix)
collection.Add("Dictionary Collection", Symbology.QR)
collection.Add("X06712AT", Symbology.Code128)
collection.Add("979026000043", Symbology.EAN13)
collection.Add("Aztec BarCode", Symbology.Aztec)

Dim images As New List(Of Bitmap)()

For Each pair As KeyValuePair(Of String, Symbology) In collection
    Using builder As New BarCodeBuilder()
	builder.CodeText = pair.Key
	builder.SymbologyType = pair.Value
    End Using

Dim maxWidth As Integer = Integer.MinValue
Dim sumHeight As Integer = 0
For Each bmp As Bitmap In images
    sumHeight += bmp.Height
    If maxWidth < bmp.Width Then
	maxWidth = bmp.Width
    End If

Const  offset As Integer = 10
Dim resultBitmap As New Bitmap(maxWidth + offset * 2, sumHeight + offset * images.Count)
Using g As Graphics = Graphics.FromImage(resultBitmap)

    Dim yPosition As Integer = offset
    For i As Integer = 0 To images.Count - 1
  	Dim currentBitmap As Bitmap = images(i)
	g.DrawImage(currentBitmap, offset, yPosition)
	yPosition += currentBitmap.Height + offset
End Using

resultBitmap.Save("barcode.png", ImageFormat.Png)

Adi Gaskell07/23/14
0 replies

Measuring your open innovation

Open innovation has been around for over a decade now, and it’s easy to fall into the trap of believing that the metrics involved in it are rather straight forward. I mean there is often a very clear output that comes from the process, so you can easily subtract the costs from the benefits to get an ROI, right?

Mark Morrell07/23/14
0 replies

Who has the best intranet team?

What is the purpose of your intranet team? How many people should you have in your intranet team?

Adi Gaskell07/23/14
0 replies

The importance of breaks to your productivity

Use of social media in the workplace is becoming something of a tired debate, but a post I made recently highlights how it is one that still needs to be had. It highlighted how executives still regarded social media usage at work as something of a time waster, although they themselves tended to use it far more than their employees.

Christopher Taylor07/23/14
0 replies

How can you be successful without first defining success?

We’re way beyond the point where the world debates whether customer loyalty marketing works, which makes it a good example of a broader theme.

-- Relative time with interval
-- Select all users that were updated in the last 24 hours.
WHERE users.updated > DATE_SUB(NOW(), INTERVAL 24 HOUR);
-- Select all users that were updated in the last 7 days.
WHERE users.updated > DATE_SUB(NOW(), INTERVAL 7 DAY);
Adi Gaskell07/22/14
0 replies

How adaptable is your talent?

A number of surveys and studies in recent times have highlighted the importance of managing complexity to success in the modern world, whether as an individual or an organization.

Highq Collaborate07/22/14
0 replies

Real estate portfolio management

The iSheets real estate portfolio management solution is a platform where you can host all of the information about your properties (or a client’s properties) in one place.

Adi Gaskell07/21/14
0 replies

How do you spot the trends in your industry?

Back in 2012 the annual IBM survey of CEOs from around the world revealed that managing complexity was the biggest concern executives had. It revealed how CEOs are looking to better connect and collaborate – inside and outside the organization – to meet the staggering complexity of the challenges their organizations are facing.

Interact Intran...07/21/14
0 replies

Amazing speaker line-up announced for Interaction Intranet Conference 2014

Interaction Intranet Conference #IIC14 is once again shaping up to be the best intranet conference in the UK and something you definitely don’t want to miss out on if your role involves looking after your company’s intranet.

Adi Gaskell07/21/14
0 replies

When digital tools get in the way of innovation

There is a sense in much of the social business movement that the various digital tools and enterprise social networks that vendors sell are the panacea for great collaboration. Indeed, there is almost a perception that collaboration can’t occur unless you’re using these tools.

Adi Gaskell07/21/14
0 replies

Companies still chasing the digital dream

A recent survey published by McKinsey found that companies from around the world are re-investing in digital projects again. What’s more, much of this growth in investment is coming directly from the top, with the report revealing how CEOs are often the ones driving the digitization projects.

Interact Intran...07/21/14
0 replies

Animated intranet launch videos to excite and delight

Using video to promote the launch or relaunch of a new intranet is a great way to gain exposure and engage employees.

Adi Gaskell07/21/14
0 replies

Shuddle aims to crowdsource the school run

That the sharing economy has blossomed in recent years is hard to dispute, with a growing number of industries being disrupted by a sharing economy entrant into a marketplace. The growth in the sharing economy as a whole has encouraged a number of niche players to emerge that are targeting sub-sets of markets that there more established peers have gone after.

Interact Intran...07/21/14
0 replies

Top 5 intranet features you can't live without

Is your intranet being used frequently amongst your employees? Have you managed to get your least technology savvy employees on board and embracing your intranet in their everyday activity?