Quantcast
Channel: alvinalexander.com - data
Browsing latest articles
Browse All 25 View Live

JList "add data" - how to add/edit JList data

I don't need to do add data to the JList in my current Java/Swing application, but out of curiosity I did some research to see what you would have to do if you wanted to add data to a JList, and here...

View Article



Handling spaces in Linux shell script input (and for loops)

Linux shell script FAQ: How can I deal with spaces (blank spaces) in my input data when I'm writing a shell script for loop or while loop?I was just working on a Linux shell script, and ran into the...

View Article

Scala - calling foreach on a Seq to populate sample data

I just saw the following Scala source code in a Play Framework 2 sample application, and it struck me as a nice example of how to call the foreach method on a Seq to populate some sample data:read more

View Article

How to populate sample data when a Play Framework application starts up

If you ever need an example of how to do something when a Play Framework application starts up, check out the Zentasks application in the Play distribution samples directory. You'll find the following...

View Article

Connecting to the NeuroSky ThinkGear API (in Scala)

If you want to connect to the NeuroSky ThinkGear API -- what they call the ThinkGear Socket Protocol -- this code shows you how to do it, at least in Scala. It consists of a few pieces of code I pulled...

View Article


A Sencha Touch 2 container/list with static data

There are probably simpler ways to do this, but for the moment, here’s a Sencha Touch 2 panel with a static list of data:read more

View Article

How to extract data from XML nodes in Scala

Problem: In a Scala application, you want to extract information from XML you receive, so you can use the data in your application.SolutionUse the methods of the ScalaElem and NodeSeq classes to...

View Article

Scala: Extracting data from an array of XML elements

Problem: Your XML data has an array of elements, and you need to extract the first element, second element, or more generally, the Nth element, using Scala.SolutionThe following simplified version of...

View Article


Image may be NSFW.
Clik here to view.

Software is amazing

It’s amazing what you can do with software. A “solution” with one set of data can become a denial of service attack against yourself with a larger set of data. (This graph shows the result of the...

View Article


Image may be NSFW.
Clik here to view.

Is the "War on Drugs" working?

This article shares the graph shown that says the “War on Drugs” isn’t working. That appears to be true, but unfortunately you can’t really know that it’s true because there is no control group. What I...

View Article

Android/Java: How to get your app's root data directory

If you ever need to get the root data directory of your Android application (app) from within your Java code, I can confirm that this approach works:File rootDataDir = getActivity().getFilesDir(); When...

View Article

Image may be NSFW.
Clik here to view.

Mindfulness infographic communicates data with shapes, colors, and font sizes

This infographic shows a lot of information about mindfulness and meditation by using shapes, colors, and font sizes. From Information is Beautiful.

View Article

How to populate static, predefined data in a Map/HashMap in Java

A great thing about Scala is that you can add data to a Map when you define it, but I don’t know how to do the same thing in Java, at least not easily. The closest thing I’ve been able to come up with...

View Article


Image may be NSFW.
Clik here to view.

How big is your data?

How big is your data? This slide comes from this Twitter page.read more

View Article

Image may be NSFW.
Clik here to view.

Always visualize data

I’m sure there must be other ways to mathematically see these differences, but I agree with the general concept that it can be easy to be misled by data. (Image from this Twitter page.)read more

View Article

Browsing latest articles
Browse All 25 View Live




Latest Images