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/25/14
1483 views
0 replies

Do doctors know what patients know?

For much of medical history, the physician has held all of the cards when it comes to information and knowledge. You would go to the doctor and more often than not have little information to accompany you, and little choice but to blindly follow whatever your doctor told you.

Highq Collaborate07/25/14
2262 views
0 replies

Talk to investors, raise funds, and research the market in a single secure space

Investment funds come in numerous shapes and sizes. Mutual, pension, hedge, ETF and the list goes on.

Adi Gaskell07/25/14
1901 views
0 replies

Using the crowd to improve GPS

Maps have been tapping into insights from the crowd for a little while now. Collaborate.org is one of the more adventurous attempts. The project, which was launched at the Future in Review conference last year aims to bring geospatial data to the masses via over 2 million different data layers that can be overlaid on top of maps.

Graeme Bodys07/25/14
1474 views
0 replies

Delighted to announce….

We are going to USA in August on a for a 2 week trip for business development and investment. We will be meeting customers, new prospects & some investor meetings with venture capital firms.

Paul Andrews07/25/14
254 views
0 replies

What Facebook's News Feed Changes Mean for Your Business

As more and more businesses start realising the potential for marketing on social media platforms like Facebook, the company itself has begun to make a few small tweaks and changes to how news is ranked and shared.

Mike Bushong07/25/14
4021 views
0 replies

What is 25 Gigabit Ethernet and why would you want it?

Just when you got used to ethernet speeds being a nice decimal based system where we simply add zeros every few years, someone threw in 40GbE a few years ago. And that’s ok, powers of two we can deal with, but 25?

Adi Gaskell07/24/14
1121 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
1378 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
1122 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
1191 views
0 replies

The Reimagining Work Podcast

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 nice. And hopefully, worth the read.

Paul Andrews07/23/14
634 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
1001 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
1164 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
1188 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
839 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
498 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
396 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
558 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.