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
1002 views
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
1253 views
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
1010 views
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
1055 views
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
526 views
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;
    images.Add(builder.GenerateBarCodeImage());
}

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))
{
    g.Clear(Color.White);

    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
	images.Add(builder.GenerateBarCodeImage())
    End Using
Next

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
Next

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

    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
    Next
End Using

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

Adi Gaskell07/23/14
886 views
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
1034 views
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
1061 views
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
713 views
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
DATE_SUB(NOW(), INTERVAL 25 HOUR)
 
-- Select all users that were updated in the last 24 hours.
SELECT * FROM users
WHERE users.updated > DATE_SUB(NOW(), INTERVAL 24 HOUR);
 
-- Select all users that were updated in the last 7 days.
SELECT * FROM users
WHERE users.updated > DATE_SUB(NOW(), INTERVAL 7 DAY);
Adi Gaskell07/22/14
361 views
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
286 views
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
392 views
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
182 views
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
201 views
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
1955 views
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
1690 views
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
545 views
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
207 views
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?