This file contains 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
source /home/ali/.sdkman/bin/sdkman-init.fis |
This file contains 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 fish | |
# | |
# Copyright 2017 Marco Vermeulen | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 |
This file contains 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
cat sample.xml | perl -F'[>|<]' -E 'say join(",", @list) and @list = () if $F[1] =~ "/ITEM"; push(@list, $F[2]) if length($F[2]) |
This file contains 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 std.algorithm, std.stdio, std.string; | |
import std.regex; | |
import std.file; | |
import std.conv; | |
import std.typecons : Flag, Yes, No; | |
import std.mmfile; | |
import std.range: SortedRange; | |
import std.getopt; | |
import core.stdc.stdlib: exit; |
This file contains 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
ns st.core | |
(:gen-class)) | |
(def init-state {:matching-enabled false | |
:p-headers true | |
:headers [] | |
:values []}) | |
(defn print-line [obj] | |
(when (obj :p-headers) (println (clojure.string/join "," (obj :headers)))) |
This file contains 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
ITEM-TYPE | ORDER-ID | ITEM-CODE | TRANSACTION-DATE | CUSTOMER-LOCATION | ORDERED-BY | ORDER-DATE | |
---|---|---|---|---|---|---|---|
Car | 3190996 | 15 | 222 | USA | Customer2 | 20161207111400 |
This file contains 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
<ITEM> | |
<ITEM-CODE>15</ITEM-CODE> | |
<TRANSACTION-DATE>222</TRANSACTION-DATE> | |
<ITEM-TYPE>Car</ITEM-TYPE> | |
<ORDERED-BY>Customer2</ORDERED-BY> | |
<ORDER-DATE>20161207111400</ORDER-DATE> | |
<ORDER-ID>3190996</ORDER-ID> | |
<CUSTOMER-LOCATION>USA</CUSTOMER-LOCATION> | |
</ITEM> |
This file contains 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
#Copyright 2019 Ali Mousa | |
# | |
#Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: | |
# | |
#1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. | |
# | |
#2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. | |
# | |
#3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. | |
# |