This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Date; | |
import com.siemens.directLine.edLink.database.JobInterface; | |
/* | |
* Created on Feb 18, 2013 | |
* | |
* TODO To change the template for this generated file go to | |
* Window - Preferences - Java - Code Style - Code Templates | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Ed's Blinker Sample | |
Turns on two LEDs for five seconds, then off for one second, repeatedly. | |
The led on pin 11 alternates between red and green indicating if the | |
circuit is switched on or off. | |
This is a hack of the default blink example from Arduino. | |
*/ | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby -wKU | |
require "csv" | |
begin | |
puts "Reordering the index.txt file" | |
# Read in the csv and set it up to be overwritten | |
csv = CSV.read( File.new( '../index.txt', 'r') , | |
{ :headers => true, :col_sep => ';' } ) | |
new = CSV.open( '../index.txt', 'w', { :col_sep => ';' } ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SET CONCAT_NULL_YIELDS_NULL OFF; | |
SELECT DISTINCT d.DocId, | |
gi8.GenIdxData + '->' + gi7.GenIdxData + '->' + gi6.GenIdxData + '->' + gi5.GenIdxData + '->' + gi4.GenIdxData + '->' + gi3.GenIdxData + '->' + gi2.GenIdxData + '->' + gi.GenIdxData AS folder_structure, | |
ot.OwnerTypeName AS doc_folder, | |
o.OwnerFolderDate AS folder_date, | |
o.OwnerCreateDTime AS folder_create_time, | |
gid.GenIdxDefDsplName AS label_name, | |
gi.GenIdxData AS label_value, | |
ot2.OwnerTypeName AS parent_folder2, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Recursion { | |
private String sentence; | |
public Recursion(String sentence) { | |
this.sentence = sentence; | |
} | |
public String getSentence() { | |
return sentence; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby -wKU | |
require 'faster_csv' | |
puts "Reading the Iron Mountain CSVs" | |
encounters = Hash.new | |
error_text = '' | |
enc_no = '' # Include information from a specific encounter | |
lines = 0 | |
Dir.glob( '*.csv' ).each do |file| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'nokogiri' | |
# Read the csv and check each file listed like so | |
doc = File.read 'file_name.xml' | |
check_marks = doc.xpath("/ClinicalDocument/StructuredBody/section/title[starts-with(text(), 'CHECK')]/../text/text()").collect(&:text) | |
add_to_report if check_marks.nil? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'fastercsv' | |
require 'fileutils' | |
require 'date' | |
docs = {} | |
rename = {} | |
FasterCSV.foreach( 'dupe_docs.txt', :headers => true, :col_sep => ';' ) do |row| | |
begin | |
fname = "#{row['OwnerFolderDate'].split(' ')[0]}_#{row['OwnerTypeName'].strip}_#{row['DocTypeName'].strip}_#{row['file_name']}" | |
folder = "#{DateTime.parse( row['OwnerFolderDate']).strftime('%Y')}-data" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby -wKU | |
input = File.new 'accounts.txt', 'r' | |
output = File.new 'additions.txt', 'w' | |
input.each_line do |line| | |
line = line.chomp.strip | |
enc = line.split '-' | |
output << " #{'%011d' % enc[0]}#{enc[1]}\n" unless line.nil? | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http = require("http") | |
uname = "uname" | |
pword = "pword" | |
options = | |
host: "server_name_or_ip" | |
port: 80 | |
path: "/path/to/page.aspx" | |
headers: |