text:
01.09.2013 Business
Jitney president to Sag Harbor board: Water taxi finished
By Julie Lane
COURTESY PHOTO | Peconic Bay Water Jitney that had a trial run between Greenport and Sag Harbor last summer is unlikely to return this summer.
Hampton Jitney president Geoff Lynch, a partner with Mattituck businessman Jim Ryan in last summer's Peconic Bay Water Jitney pilot program, reportedly told the Sag Harbor Village Board Tuesday night he doesn't expect the water taxi that ran between Greenport Village and Sag Harbor to float a second season.
It would take an infusion of money from the federal government for the partners to continue the service, Mr. Lynch reportedly told the Sag Harbor Village Board.
He said while the ferry service was a huge hit with riders last summer, financially it was "a bust."
It wasn't the first time that Mr. Lynch made the comments about the unlikelihood of resuming water taxi service next summer. In September, he told the East End Transportation Council he didn't envision a second season. Despite running five trips a day and carrying more than 15,000 passengers since it launched the passenger service in June, he said then, "It's not a moneymaker."
Barring investors showing an interest in underwriting the service, he said it wouldn't be running again. The East End Transportation Council has been charged with exploring mass transit alternatives for the region and has representatives from the five East End towns.
At the time, Mr. Ryan denied that the ferry service wouldn't resume in 2013. He was unavailable for comment today.
Greenport Village Board member Mary Bess Phillips said Mr. Lynch has asked to make a presentation to that group at either at its January 21 work session or January 28 regular meeting. But she had no information on the content of that presentation.
Julie Lane has been a reporter for Times Review Media Group since 2000 and has covered Shelter Island since 2011. She holds an undergraduate degree in journalism and political science from the University of Rhode Island and an MBA from Long Island University.
Email Julie Lane Email Created with Sketch. Email Julie Lane
Hampton Jitney
Former East End radio GM pleads guilty to fraud
A 58-year-old Sag Harbor woman pleaded guilty last Monday to defrauding her former employer out of more than $250,000...


New programs and changes in the current immigration policies make it crucial for an experienced attorney to represent you. You do not want an inexperienced attorney to attempt to obtain your lawful status.
The attorneys at Gillsville Law have extensive immigration law knowledge and decades of experience providing quality, competent and effective legal representation for those who wish to remain in the United States. Our firm gives clients resourceful and progressive solutions to complex and unique situations. We are dedicated and determined to represent every client's interests personally, effectively and efficiently. Your can be assured, your money will not be wasted.
Gillsville Law is fully dedicated to each client's case. We have the experience, passion and determination it takes to navigate even the most difficult immigration matters. Plus, our professional and ongoing relationship with Ibrahim and Rao means you are getting the most professional assistance you can receive. You can trust that we will work diligently to quickly and ethically handle your case. Contact us today to discuss your situation or to schedule an information session in your neighborhood.


Paper: Are you using it?
What app or software you use for photo editing?
Dropbox, a safe, long term solution?
How do you read to any article through your phone?
How to-do apps make money?
It's time to decide; Who won the 7th generation console war?
How many browsers do you have installed?


text:
using System;
using Newtonsoft.Json.Linq;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using MusicPlayer.Models;
using System.Security.Cryptography;
using System.Threading.Tasks;
using MusicPlayer.Data;
using MusicPlayer.Managers;

namespace MusicPlayer.Api
{
	public class FileSystemProvider : MusicProvider
	{
		public FileSystemProvider () : base(null)
		{
		}
		public override MediaProviderCapabilities[] Capabilities {
			get {
				return new[]{MediaProviderCapabilities.None};
			}
		}
		#region implemented abstract members of MusicProvider

		static HashSet<string> supportedExtensions = new HashSet<string> {
			".mp3",
			".mp4",
			".m4v",
			".oog",
			".aac",
			".m4a",
		};

		public override string Email
		{
			get
			{
				return "NA";
			}
		}

		static readonly string musicPath = System.Environment.GetFolderPath (Environment.SpecialFolder.MyMusic);

		public bool Disabled { get ; set; } = false;

		protected override async Task<bool> Sync ()
		{
			if (Disabled)
				return true;
			return await Task.Run (async () => {
				try {
					var start = DateTime.Now;
					//await Database.Main.ExecuteAsync ("update Track set Deleted = 0 where ServiceId = ?", Id);
					var files = GetFiles (musicPath,Settings.LastFilesystemSync).ToList ();
					if(!files.Any())
						return true;
					Console.WriteLine (files.Count ());

					Console.WriteLine ("Loading Filesystem took : {0}", (DateTime.Now - start).TotalMilliseconds);
					var lastTime = DateTime.Now;
					var items = files.Select (x => FromFilePath (x)).ToList ();
					Console.WriteLine ("Converting too FullTrackData took : {0}", (DateTime.Now - lastTime).TotalMilliseconds);
					lastTime = DateTime.Now;
					//items.BatchForeach(1000, (batch) => MusicProvider.ProcessTracks(batch.ToList()));
					await MusicProvider.ProcessTracks (items);
					Console.WriteLine ("ProcessTracks FullTrackData took : {0}", (DateTime.Now - lastTime).TotalMilliseconds);
					lastTime = DateTime.Now;
					await FinalizeProcessing (this.Id);
					Console.WriteLine ("FinalizeProcessing took : {0}", (DateTime.Now - lastTime).TotalMilliseconds);
					Console.WriteLine ("Parsing Filesystem took : {0}", (DateTime.Now - start).TotalMilliseconds);
					var lastUpdate = files.Max(x=> File.GetLastWriteTime(x));
					var lastCreate = files.Max(x=> File.GetCreationTime(x));
					Settings.LastFilesystemSync = lastUpdate > lastCreate ? lastUpdate: lastCreate;
					return true;
				} catch (Exception ex) {
					LogManager.Shared.Report (ex);
					return false;
				}

			});
		}
		DateTime lastDateTime;
		FullTrackData FromFilePath (string filePath)
		{
			string id = "";
			string Title = "";
			string Artist = "";
			string Album = "";
			string AlbumArtist = "";
			string Genre = "";
			int Year = 0;
			int Disc = 0;
			int TotalDiscs = 0;
			int Track = 0;
			int BeatsPerMinute = 0;
			double Duration = 0;
			int rating = 0;
			bool hasImage;
			try {
				using (var file = TagLib.File.Create (filePath)) {
					if (string.IsNullOrEmpty (file.Tag.MusicIpId)) {
						using (var md5 = MD5.Create ()) {
							using (var stream = System.IO.File.OpenRead (filePath)) {
								byte[] hash;
								hash = md5.ComputeHash (stream);

								id = BitConverter.ToString (hash).Replace ("-", "").ToLower ();
							}
						}
						file.Tag.MusicIpId = id;
						file.Save ();
					} else {
						id = file.Tag.MusicIpId;
					}

					TagLib.Tag Tag = file.GetTag(TagLib.TagTypes.Id3v2);
					var ratingTag = TagLib.Id3v2.PopularimeterFrame.Get((TagLib.Id3v2.Tag)Tag, "WindowsUser", true);
					//based on 0-5;
					//taglib sharp is 0-255;
					rating = ratingTag.Rating / 51;
					Title = file?.Tag?.Title ?? FullTrackData.GetTitleFromFileName (filePath);
					Artist = file.Tag.FirstPerformer ?? FullTrackData.GetArtistFromFileName (filePath);
					Album = file.Tag.Album ?? "";
					AlbumArtist = file.Tag.FirstAlbumArtist ?? "";
					Genre = file.Tag.FirstGenre ?? "";
					Year = (int)file.Tag.Year;
					Disc = (int)file.Tag.Disc;
					TotalDiscs = (int)file.Tag.DiscCount;
					Track = (int)file.Tag.Track;
					BeatsPerMinute = (int)file.Tag.BeatsPerMinute;
					Duration = file.Properties.Duration.TotalMilliseconds;
				}
			} catch (Exception ex) {
				Title = FullTrackData.GetTitleFromFileName (filePath);
				Artist = FullTrackData.GetArtistFromFileName (filePath);
			}
			return new FullTrackData (Title, Artist, AlbumArtist, Album, Genre) {
				Disc = Disc,
				Track = Track,
				Year = Year,
				Id = id,
				FileLocation = filePath,
				FileExtension = Path.GetExtension (filePath)?.Trim ('.'),
				MediaType = FromFile (filePath),
				Priority = 1,
				ServiceId = Id,
				ServiceType = ServiceType,
				Rating = rating,
			};
		}
		public override async Task<string> GetShareUrl (Song song)
		{
			return null;
		}

		static MediaType FromFile (string filePath)
		{
			try {
				#if __IOS__ || __OSX__
//				using (var asset = AVFoundation.AVAsset.FromUrl (Foundation.NSUrl.FromFilename (filePath))) {
//					var movie = asset.Tracks.Where (x => x.MediaType == AVFoundation.AVMediaType.Video).Any ();
//					return movie ? MediaType.Video : MediaType.Audio;
//				}

				#endif
			} catch (Exception ex) {
				Console.WriteLine (ex);
			}
			var extension = Path.GetExtension (filePath).Trim ('.');
			switch (extension) {
			case "m4v":
			case "mp4":
				return MediaType.Video;
			default:
				return MediaType.Audio;
			}
		}

		public override  Task<bool> Resync ()
		{
			Settings.LastFilesystemSync = null;
			return SyncDatabase();
		}

		static IEnumerable<string> GetFiles (string directory, DateTime? changedDate = null)
		{
			var date = changedDate ?? DateTime.MinValue;
			var files = Directory.EnumerateFiles(directory, "*.*", SearchOption.AllDirectories).Where(x => supportedExtensions.Any(e => x.EndsWith(e, StringComparison.InvariantCultureIgnoreCase)));

			var filterd = files.Where (x => File.GetCreationTime (x) > date || File.GetLastWriteTime (x) > date);
			return filterd;
		}

		public override async Task<Uri> GetPlaybackUri (MusicPlayer.Models.Track track)
		{
			string filePath = "";
			if (!string.IsNullOrEmpty(track.FileLocation) && File.Exists(track.FileLocation))
			{
				filePath = track.FileLocation;
			}

			filePath = Directory.EnumerateFiles(musicPath, track.FileName, SearchOption.AllDirectories).FirstOrDefault();

			var uri = new Uri(filePath).AbsoluteUri;
			return new Uri(uri);
		}

		public override async Task<MusicPlayer.Models.DownloadUrlData> GetDownloadUri (MusicPlayer.Models.Track track)
		{
			App.ShowNotImplmented();
			return null;
		}

		public override async Task<bool> LoadRadioStation (MusicPlayer.Models.RadioStation station, bool isContinuation)
		{
			App.ShowNotImplmented();
			return false;
		}

		public override async Task<MusicPlayer.Models.RadioStation> CreateRadioStation (string name, MusicPlayer.Models.RadioStationSeed seed)
		{
			App.ShowNotImplmented();
			return null;
		}

		public override async Task<MusicPlayer.Models.RadioStation> CreateRadioStation (string name, MusicPlayer.Models.Track track)
		{
			App.ShowNotImplmented();
			return null;
		}

		public override async Task<MusicPlayer.Models.RadioStation> CreateRadioStation (string name, MusicPlayer.Models.AlbumIds track)
		{
			App.ShowNotImplmented();
			return null;
		}

		public override async Task<MusicPlayer.Models.RadioStation> CreateRadioStation (string name, MusicPlayer.Models.ArtistIds track)
		{
			App.ShowNotImplmented();
			return null;
		}

		public override async Task<bool> DeleteRadioStation (MusicPlayer.Models.RadioStation station)
		{
			App.ShowNotImplmented();
			return false;
		}

		public override async Task<bool> DeletePlaylist (MusicPlayer.Models.Playlist playlist)
		{
			App.ShowNotImplmented();
			return false;
		}

		public override async Task<bool> DeletePlaylistSong (MusicPlayer.Models.PlaylistSong song)
		{
			App.ShowNotImplmented();
			return false;
		}

		public override async Task<bool> MoveSong (MusicPlayer.Models.PlaylistSong song, string previousId, string nextId, int index)
		{
			App.ShowNotImplmented();
			return false;
		}

		public override async Task<bool> AddToPlaylist (System.Collections.Generic.List<MusicPlayer.Models.Track> songs, MusicPlayer.Models.Playlist playlist)
		{
			App.ShowNotImplmented();
			return false;
		}

		public override async Task<bool> AddToPlaylist (System.Collections.Generic.List<MusicPlayer.Models.Track> songs, string playlistName)
		{
			App.ShowNotImplmented();
			return false;
		}

		public override async Task<bool> SetRating (MusicPlayer.Models.Track track, int rating)
		{
			using (TagLib.File file = TagLib.File.Create(track.FileLocation))
			{
				TagLib.Tag Tag = file.GetTag(TagLib.TagTypes.Id3v2);
				TagLib.Id3v2.Tag.DefaultVersion = 3;
				TagLib.Id3v2.Tag.ForceDefaultVersion = true;
				var frame = TagLib.Id3v2.PopularimeterFrame.Get((TagLib.Id3v2.Tag)Tag, "WindowsUser", true);
				//based on 0-5;
				//taglib sharp is 0-255;
				frame.Rating = (byte)(rating * 51);
				file.Save();
			}
			return true;
		}

		public override async Task<System.Collections.Generic.List<MusicPlayer.Models.Song>> GetAlbumDetails (string id)
		{
			App.ShowNotImplmented();
			return null;
		}

		public override async Task<SearchResults> GetArtistDetails (string id)
		{
			App.ShowNotImplmented();
			return null;
		}

		public override async Task<System.Collections.Generic.List<MusicPlayer.Models.OnlinePlaylistEntry>> GetPlaylistEntries (MusicPlayer.Models.OnlinePlaylist playlist)
		{
			App.ShowNotImplmented();
			return null;
		}

		public override async Task<bool> RecordPlayack (MusicPlayer.Models.Scrobbling.PlaybackEndedEvent data)
		{
			return true;
		}

		public override async Task<SearchResults> Search (string query)
		{
			App.ShowNotImplmented();
			return null;
		}

		public override async Task<bool> AddToLibrary (MusicPlayer.Models.OnlinePlaylist playlist)
		{
			App.ShowNotImplmented();
			return false;
		}

		public override async Task<bool> AddToLibrary (MusicPlayer.Models.RadioStation station)
		{
			App.ShowNotImplmented();
			return false;
		}

		public override async Task<bool> AddToLibrary (MusicPlayer.Models.OnlineSong song)
		{
			App.ShowNotImplmented();
			return false;
		}

		public override async Task<bool> AddToLibrary (MusicPlayer.Models.OnlineAlbum album)
		{
			App.ShowNotImplmented();
			return false;
		}

		public override async Task<bool> AddToLibrary (MusicPlayer.Models.Track track)
		{
			App.ShowNotImplmented();
			return false;
		}

		public override ServiceType ServiceType {
			get {
				return ServiceType.FileSystem;
			}
		}

		public override bool RequiresAuthentication {
			get {
				return false;
			}
		}

		public override string Id {
			get {
				return "filesystem";
			}
		}

		#endregion
	}
}

redpajama_set_name: RedPajamaGithub


We will be reading and reviewing books that have a significant impact on the financial futures of so many people. The book that we have selected for our initial Book Club Meeting is "The Richest Man In Babylon."
The Richest Man in Babylon is a book by George Samuel Clason that dispenses financial advice through a collection of parables set in ancient Babylon. Through their experiences in business and managing household finance, the characters in the parables learn simple lessons in financial wisdom. Originally a series of separate informational pamphlets distributed by banks and insurance companies, the pamphlets were bound together and published in book form in 1926.
We will discuss this book chapter by chapter with a full open discussion following.
Each person who joins the Book Club will receive a audio copy of the book to use as a follow along and as a way to keep abreast of the topics.
5.1 If you desire to help thy friend, do so in a way that will not bring thy friend's burdens upon thyself.
Just a curiosity and a willingness to share your thoughts!
We will provide the reading materials via internet and online presentations.