Image

Random Thoughts Blog

Convert SAS Datetime to [R] Datetime
3 years ago

Convert SAS Datetime to [R] Datetime

Suppose I import a bunch of SAS dates into R. How well does that work?

Not very. First is the import itself. If you use read.csv, R will try to …
Read More

PHP to Java Bridge Operations for docx Microsoft Word Generation
3 years ago

PHP to Java Bridge Operations for docx Microsoft Word Generation

So I decided to make this web application that a user could create a legal form in Microsoft Word (docx) format, and since my web site is in PHP, and …
Read More

Excel VBA to find and replace chart title strings
4 years ago

Excel VBA to find and replace chart title strings

Sub changeChartTitles()

Dim c As Chart

ws_count = ThisWorkbook.Worksheets.Count

For i = 1 To ws_count

Set ws = ThisWorkbook.worksheets(i)

For j = 1 to ws.ChartObjects(j).Chart

Set c= …
Read More

SAS Iterate through comma separated list
4 years ago

SAS Iterate through comma separated list

There is probably a better way to do this..if you know of one please tell me. This way looks pretty clunky to me:

%GLOBAL BP_DESC_VAR BP; /* MAKE LIST */ …
Read More

SAS Table Value into variable
4 years ago

SAS Table Value into variable

Here’s some macro code to put a list of values from a SAS table into a bunch of variables:

%LET CURRENT_TABLE_DATE = ‘APR2009’;

%GLOBAL CURRENT_TABLE_DATE;

%MACRO RUN_DATES;

PROC SQL;


Read More

SAS – Count Number of Words in a comma separated list
4 years ago

SAS – Count Number of Words in a comma separated list

I’ve seen a lot of ugly ways to count the number of words in a comma separated list, most of them involve an overly complicated macro. There is an easier …
Read More

Batch File Command to Get Installed Programs from Windows 7 Registry
5 years ago

Batch File Command to Get Installed Programs from Windows 7 Registry

Here’s a little batch file line to get your installed programs from your Windows 7 registry.

 

C:\Windows\System32\reg export HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall temp1.txt

This needs to be all on one line …
Read More

Excel VBA Macro to delete records with duplicate fields
5 years ago

Excel VBA Macro to delete records with duplicate fields

Every once in a while you need to go beyond the Excel feature that screens out duplicate records and single out records with a duplicate field, that contain data you …
Read More

A Flash to HTML5 Odyssey
5 years ago

A Flash to HTML5 Odyssey

For the last two days I’ve been looking at options for making a Flash website readable on mobile devices paying particular attention to iOS devices. We all know how much …
Read More

Solved: Hibernate MySql “too many connections” problem
5 years ago

Solved: Hibernate MySql “too many connections” problem

recently had a problem while using MySql with Hibernate in a Java app. Everyone and his dog had elaborate answers on this issue, including changing your connection pool settings, rewriting …
Read More

Top