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.io.Serializable; | |
| /** | |
| * A pair utility class | |
| * | |
| * @author AnuvratSingh | |
| * @param <L> The left component type | |
| * @param <R> The right component type | |
| */ | |
| public class Pair<L, R> implements Serializable, Comparable<Pair<L, R>>, Cloneable { |
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
| <?xml version="1.0" encoding="UTF-8" ?> | |
| <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="pba" xmlns="pba"> | |
| <xs:element name="plgen"> | |
| <xs:complexType> | |
| <xs:sequence> | |
| <xs:element ref="playlist" maxOccurs="unbounded" /> | |
| </xs:sequence> | |
| </xs:complexType> | |
| </xs:element> |
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 Plgen implements java.io.Serializable { | |
| /** | |
| * Field _playlistList. | |
| */ | |
| private java.util.List<Playlist> _playlistList; | |
| /* | |
| * Methods of this class | |
| */ |
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 Playlist implements java.io.Serializable { | |
| /** | |
| * Field _extensionType. | |
| */ | |
| private ExtensionType _extensionType; | |
| /* | |
| * Methods of this class | |
| */ |
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 enum ExtensionType implements java.io.Serializable { | |
| /** | |
| * Constant M3U | |
| */ | |
| M3U("m3u"), | |
| /** | |
| * Constant SF | |
| */ | |
| SF("sf"); |
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <castor:mapping> | |
| <castor:class name="test.Plgen"> | |
| <castor:map-to xml="plgen" /> | |
| <castor:field name="playlist" type="test.Playlist" collection="arraylist"> | |
| <castor:bind-xml name="playlist" /> | |
| </castor:field> | |
| </castor:class> | |
| <castor:class name="test.Playlist"> |
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
| find . -name .svn -print0 | xargs -0 rm -rf |
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
| while(<>) { | |
| chomp; | |
| # Input fields full_name, <more data> | |
| my ($full_name, @other_cols) = split(/\t/); | |
| my($first_name, $last_name) = _parse_name($full_name); | |
| print join("\t", $first_name, $last_name, @other_cols) . "\n"; | |
| } |
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
| select | |
| transform(full_name, address, email_id) | |
| using 's3://<>/parse_name.pl' | |
| as (first_name, last_name, address, email_id) | |
| from names_table; |
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
| from ( | |
| select | |
| transform(full_name, address, email_id) | |
| using 's3://<>/parse_name.pl' | |
| as (first_name, last_name, address, email_id) | |
| from names_table | |
| ) t | |
| select t.first_name, t.last_name, t.address, t.email_id | |
| where t.last_name like 'Singh'; |
OlderNewer