[awk] Print random lines of file
Note this might now work with all version of AWK. I’ve experienced some troubled passing parameter inside the AWK code in some version of solaris implementation. Code written bellow however… Read more »
Note this might now work with all version of AWK. I’ve experienced some troubled passing parameter inside the AWK code in some version of solaris implementation. Code written bellow however… Read more »
Recently I was writing some script when I bumped into a problem with this in javascript. I wanted execute function once the user select the file to be processed.
1 |
document.getElementById('files').addEventListener('change', Controller.OnNewFilesAdded, false); |
Use randomColor() function to get random CSS color
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
var CSS_COLORS = ["AliceBlue","AntiqueWhite","Aqua","Aquamarine","Azure","Beige","Bisque","Black", "BlanchedAlmond","Blue","BlueViolet","Brown","BurlyWood","CadetBlue","Chartreuse","Chocolate", "Coral","CornflowerBlue","Cornsilk","Crimson","Cyan","DarkBlue","DarkCyan","DarkGoldenRod", "DarkGray","DarkGrey","DarkGreen","DarkKhaki","DarkMagenta","DarkOliveGreen","Darkorange", "DarkOrchid","DarkRed","DarkSalmon","DarkSeaGreen","DarkSlateBlue","DarkSlateGray","DarkSlateGrey", "DarkTurquoise","DarkViolet","DeepPink","DeepSkyBlue","DimGray","DimGrey","DodgerBlue","FireBrick", "FloralWhite","ForestGreen","Fuchsia","Gainsboro","GhostWhite","Gold","GoldenRod","Gray","Grey", "Green","GreenYellow","HoneyDew","HotPink","IndianRed","Indigo","Ivory","Khaki","Lavender", "LavenderBlush","LawnGreen","LemonChiffon","LightBlue","LightCoral","LightCyan", "LightGoldenRodYellow","LightGray","LightGrey","LightGreen","LightPink","LightSalmon", "LightSeaGreen","LightSkyBlue","LightSlateGray","LightSlateGrey","LightSteelBlue","LightYellow", "Lime","LimeGreen","Linen","Magenta","Maroon","MediumAquaMarine","MediumBlue","MediumOrchid", "MediumPurple","MediumSeaGreen","MediumSlateBlue","MediumSpringGreen","MediumTurquoise", "MediumVioletRed","MidnightBlue","MintCream","MistyRose","Moccasin","NavajoWhite","Navy","OldLace", "Olive","OliveDrab","Orange","OrangeRed","Orchid","PaleGoldenRod","PaleGreen","PaleTurquoise", "PaleVioletRed","PapayaWhip","PeachPuff","Peru","Pink","Plum","PowderBlue","Purple","Red", "RosyBrown","RoyalBlue","SaddleBrown","Salmon","SandyBrown","SeaGreen","SeaShell","Sienna","Silver", "SkyBlue","SlateBlue","SlateGray","SlateGrey","Snow","SpringGreen","SteelBlue","Tan","Teal", "Thistle","Tomato","Turquoise","Violet","Wheat","White","WhiteSmoke","Yellow","YellowGreen"]; function randomColor(){ return CSS_COLORS[Math.floor(Math.random()*CSS_COLORS.length)]; } |
Looks like these ( displayed randomly ) %CODE1%
Goal This is short post for people who wants to quickly select data from .csv datafile. Maybe just certain columns, maybe just certain rows. I assume you know how to… Read more »