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 re | |
pattern = re.compile(r',(?=(?:[^"]*"[^"]*")*[^"]*$)') | |
with open("./test.csv", "r") as csv_file: | |
for line in csv_file.readlines(): | |
split_line = re.split(pattern, line) | |
print("%s | %s | %s" % (split_line[0], split_line[1], split_line[2],)) |
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
call gradle test | |
IF NOT ERRORLEVEL 1 ( | |
Echo "Test passes-> committing" | |
call git add --all | |
call git commit -m"Baby Steps" | |
) ELSE ( | |
Echo "Test failed-> resetting" | |
call git reset --hard | |
) |
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 static java.math.BigDecimal.ROUND_HALF_UP; //this is the "normal rounding technique: if more than 5 round up, else round down | |
import java.math.BigDecimal; //Because jave does not have BigDecimals in env like Groovy | |
BigDecimal ten = new BigDecimal("10") | |
BigDecimal four = new BigDecimal("4") | |
int numberOfDecimals = 2 | |
ten.divide(four,numberOfDecimals,ROUND_HALF_UP) |
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
@Grab('log4j:log4j:1.2.17') | |
import org.apache.log4j.* | |
import groovy.util.logging.* | |
log = Logger.getLogger(this.class) | |
log.level=Level.DEBUG | |
log.debug("="*100) | |
file = new File('props.groovy') | |
log.debug("File ${file}: ${file.exists()}") |
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://www.astraownersclub.com/vb/showthread.php/590351-Complete-list-of-Astra-H-Zafira-B-diesel-fault-codes | |
Complete list of Astra H / Zafira B diesel fault codes | |
*****Could a Mod Please make this a Sticky in this section (Diesel engines) Thanks. ******** | |
Find below a list of Astra H Diesel fault codes by engine code. | |
Firstly either do the pedal test or use a diagnostic scanner to retrieve the code. | |
To do the pedal test, use the following instructions |
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.awt.event.WindowAdapter | |
import java.awt.event.WindowEvent | |
import java.awt.BorderLayout as BL | |
import groovy.swing.SwingBuilder | |
import java.awt.Color | |
import java.awt.Desktop | |
import javax.swing.WindowConstants as WC | |
import javax.swing.BorderFactory as BF | |
import javax.swing.JOptionPane | |
import javax.swing.JFrame |
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
' ----------------------------------------------------------------------------- | |
' License: let's say I put the thing in the thing so called "public domain"... | | |
' It is like a stone, can be used for the next silliness | | |
' or can be used to build your home, | | |
' but software is more a kind of metaphysical thing I'm not responsible of.... | | |
' ----------------------------------------------------------------------------- | |
' NOTE: remember that for createobject created objects we've a utility for method and property inspection called OLE/COM object viewer, with MSDEV package, -> Open All Objects Explorer -> Open The Object [f.e: DAO.DBEngine.36] -> Click on _interface (f.e: _DBEngine) -> Click on View Type Info -> Open Methods explorer, for example, and enjoy... | |
' minor issue: WScript bug: seems not possible to pass a escaped " to argument in double quotes: "a \" b" is not readed correctly using wscript.arguments. Even when \" is the correct way to es |
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
@Grapes( | |
@Grab(group='uk.co.caprica', module='vlcj', version='3.0.1') | |
) | |
//JNA resolvers: vlcj uses this | |
import com.sun.jna.Platform | |
import com.sun.jna.NativeLibrary | |
//swing things are made of theese... | |
import java.awt.BorderLayout as BL |
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
// Apply the java plugin to add support for Java,groovy,and application | |
apply plugin: 'java' | |
apply plugin: 'groovy' | |
apply plugin: 'application' | |
project.group = "io.endeios" | |
project.version = "1.0.0" | |
mainClassName = "io.endeios.Run" |
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
(function(){ | |
var root = this; | |
//NOTE! \ must be the first one! o you double all slashes | |
var slashable = ['\\',':','?','@','&','=','+','$'] | |
var addSlashes = function(str){ | |
var max = slashable.length; | |
for(var i =0; i< max; i++){ |
NewerOlder