Wednesday, April 27, 2016

Android Receipt Apps: the top 3 out of the 15 I tried

Recently I had the need and urge to utilize an expense/receipt tracking app for Android that would offload my paper trail....out of the 10 to 15 that I tried only three really stood out based on my criteria which was
1) Simple and Clean interface
2) highly accurate OCR and
3) Export to CSV
.... I did not need was a rich expense tracking app for a wide range of categories or rich reporting so here's what I found ...here are my top three
1) HelloReceipts
These guys had the most accurate OCR I tested (batch of 10 varying receipts)this app even picked up dates and handwriten amounts, and tax & auto categorized! compared to the others the clean interface, basic export functionality, clean mobile and web interface and highly accurate OCR made this simple tool my go 2 expense tracking app ...great for any small biz or personal use! No frills just works
https://play.google.com/store/apps/details?id=com.intelliware.helloreceiptandroid
2) Receipt by Waze
This app was a close second very good OCR the only downfall was the high number of categories and the defaults were a little arduous to deal with that might be better for it growing company and someone who wants really detailed categorization of receipts
3) NumReceipts.
And third I pick this over the most popular receipt app expensify because of the unique Rich interface with a lot of visualisations including charts graphs and expense to income comparison allowing the user to compare expenses and income and for my testing the OCR was better than expensify
The rest...wasted around 1 week downloading and testing..again my criterion was very specific...
Expensify
Docufy
CamScanner
SmartReceipts
MoneyFlo
CashReceipts
ReceiptsBank
Concur
Zaim
Yeah that's how much time I spent save yourself some time and download one of those top three you won't be disappointed and they're free

Here is the UI, notice the date filled in AND Vendor!
Mobile App


Web App

Tuesday, April 12, 2016

T-Mobile LG G3 D851 Lollipop Upgrade killed my WIFI Calling

After a system update from lovely provider T-Mobile, WiFi Calling on the LG G3 Lollipop ceased to operate, after another update, a factory reset, multiple "tweaks" from probably 15 T Mobile support links I decided to do the only thing that had a consensus of working, DOWNGRADE to KitKat, and in essence tell T Mobile and tier useless warranty to go bang tar on the incredulous universe that they call "sucking money from useless idiots like myself who use their stock phones"

Here is how I moved on from the T Mobile Plantation:
1. Downgrade from Lollipop to KitKat D851:
and

2. After up and running try to disable OTA and System Updates to no avail, but downloaded this app:
in case Google Play breaks:

3. Now root this baby and get some freedom, added SuperU and some xPosed stuff albeit I dont have time to learn.


These 3 steps took less than 50 min, while looking around t-mobile support took 12 hours....U do the math....

Thanks to Max Lee @ youtube.com and  Doug @ androidexplained.com and the numerous sources of comments that had some or near none or ambiguously some related help in my path to a non-bricked android phone for once!

I now have WiFi Calling working once again.!

Chrome Consuming Massive IO on Win7/8

Im seeing this on ResourceMon/perfmon:
With this I did some searching and found that this has been a Chrome issue on windows fro quite some time, since 2011, and event up till now is still an issue, There are 2 work-around I found:

A. Remove Chrome log files:
1. go %AppData%\Google\Chrome\User Data\Default\Session Storage\
2. Delete all 
3. This is only a temporary fix that alleviates issue for small period of time. 

B. Disable Caching
1. Open CMD
2. Run  %pathtoyourbrowser% --profile-directory=Default --disable-cache --disk-cache-size=0 --disk-cache-dir="Z:\"
3. I will update with results.


For more info see: https://code.google.com/p/chromium/issues/detail?id=176727

and

https://code.google.com/p/chromium/issues/detail?id=401391





Awesome MSI installer cleanup tool

Got a c:\windows\installer folder that is out of control? Too big?
Try this tool, run by command line and BOOM, the orphaned installer files are GONE!

http://appnee.com/wicleanup/

Run this command:
WICleanupC -s


Other commands:

WICleanupC -r      Report unused file only.
WICleanupC -c      Change unused file name.
WICleanupC -d      Delete unused file.
WICleanupC -s      Delete unused file silently.


What is 239.255.255.250 network activity and how to stop it?

1. In Resource monitor we see this:

2. This IP was showing up in my resource monitor overt and over, it looks like a virus since the IP looks external, however come to find out its an MS PlugAndPlay discovery UDP protocol alternative., and is only needed if u use Messenger (like anyone uses that anymore), see here for detail from MS: KB Article 317843 on what it is and how to fix it

3. To resolve:
  1. Start Registry Editor (Regedt32.exe).
  2. Locate and click the following key in the registry:
    HKEY_LOCAL_MACHINE\Software\Microsoft\DirectPlayNATHelp\DPNHUPnP
  3. On the Edit menu, click Add Value, and then add the following registry value:
    Value name: UPnPMode
    Data type: REG_DWORD
    Value data: 2
  4. Quit Registry Editor.
Boom no more 239.255.255.250 network activity,

MERGE into tables with FK Constraints: how to MERGE Workaround examples:

Updated with work-around examples for "

Unable to perform Slowly Changing Dimension updates on a dimension table with a foreign key"

-- MERGE into tables with FK Constraints: how to MERGE Workaround examples:
-- see below sql examples

/****************************************
-- Temp Table Example
*****************************************/

/****************************************
-- Drop Check Constraint Examples 

-- Code:

/****************************************
-- Temp Table Example
*****************************************/
declare @Extract_Datetime datetime, @Expire_Datetime datetime, @auditKey uniqueidentifier
Select @Extract_Datetime = getdate()
, @Expire_Datetime = CoReStage.dbo.udfGetExpireDatetimeDefault()
,@auditKey = '2583EA74-70EF-E211-AE25-00090FFE0001'

select* into #Material_Status from [Material_Status] where 1=0

INSERT INTO #Material_Status ([Material_Status_UID],[Code],[Description],[Effective_Datetime],[Expire_Datetime],[IsCurrent],[Audit_Key])
SELECT  Material_Status_UID,[Code],[Description], [Effective_Datetime], [Expire_Datetime], [IsCurrent], [Audit_Key]  
FROM
  (
   MERGE [Material_Status] as targ
   USING material_status AS src
   ON (targ.[Code] = src.[Code])
   --WHEN MATCHED and checksum(targ.[Description],targ.[code])  <> checksum(src.[Description],src.[code]) and targ.IsCurrent='1'THEN
   WHEN MATCHED and (targ.[Description] <> src.[Description] and targ.IsCurrent='1') THEN
    UPDATE SET targ.IsCurrent = '0',  targ.[Expire_Datetime] = @Extract_Datetime
   WHEN NOT MATCHED THEN
    /********** NEW ROW ***********/
    INSERT VALUES (newid(), src.[Code], src.[Description], @Extract_Datetime, @Expire_Datetime, '1', @auditKey)
   OUTPUT $action Action_Out, inserted.Material_Status_UID, src.[Code], src.[Description], @Extract_Datetime [Effective_Datetime] , @Expire_Datetime Expire_Datetime, '1' IsCurrent, @auditKey [Audit_Key]
  ) AS Changes
WHERE Changes.Action_Out = 'UPDATE';
   
select * from #Material_Status
insert into  [Material_Status] ([Code],[Description],[Effective_Datetime],[Expire_Datetime],[IsCurrent],[Audit_Key])
select [Code],[Description],[Effective_Datetime],[Expire_Datetime],[IsCurrent],[Audit_Key] from #Material_Status

drop table #Material_Status
select * from [Material_Status]
select * from material_status


/****************************************
-- Drop Check Constraint Examples 
*****************************************/

-- 1) Create tables 
USE [AdventureWorks2012]
GO
CREATE TABLE [dbo].[Supplier](
       [SupplierCode] CHAR(8) PRIMARY KEY,
       [SupplierName] [varchar](50) NULL,
       [Address] [varchar](50) NULL,
) ON [PRIMARY]
GO
INSERT INTO [dbo].[Supplier] ([SupplierCode], [SupplierName], [Address])
VALUES
('S0000001', 'ABC Company', 'USA'),
('S0000002', 'XYZ Corporation', 'USA')
GO
SELECT * FROM [dbo].[Supplier]
 

USE [AdventureWorks2012]
GO

CREATE TABLE [dbo].[DimSupplier](
       [SupplierId] [int] IDENTITY(1,1) NOT NULL,
       [SupplierCode] CHAR(8),
       [SupplierName] [varchar](50) NULL,
       [Address] [varchar](50) NULL,
       [EffectiveDate] [date] NULL,
       [ExpirationDate] [date] NULL,
       [CurrentFlag] [char](1) NULL,
       CONSTRAINT [PK_DimSupplier] PRIMARY KEY CLUSTERED ([SupplierId] ASC)
) ON [PRIMARY]
GO


CREATE TABLE [dbo].[DimSupplierAttributes](
[ID] [int] IDENTITY(1,1) NOT NULL,
[DimSupplierID] [int] NOT NULL,
 CONSTRAINT [PK_DimSupplierAttributes] PRIMARY KEY CLUSTERED 
(
[ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 70) ON [PRIMARY]
) ON [PRIMARY]

GO

ALTER TABLE [DimSupplierAttributes]  WITH CHECK ADD  CONSTRAINT [R_10355] FOREIGN KEY([DimSupplierID])
REFERENCES [DimSupplier] ([SupplierId])
GO


select * from [dbo].[DimSupplier]
select * from [dbo].[Supplier]

--2) Type 1 changes

MERGE INTO [dbo].[DimSupplier] Dest
USING [dbo].[Supplier] Src
     ON (Dest.[SupplierCode] = Src.[SupplierCode])
WHEN MATCHED AND (Dest.[Address] != Src.[Address])
THEN UPDATE
  SET Dest.[Address] = Src.[Address];

select * from [dbo].[DimSupplier]



--3) Type 2 changes (creates error)

-- This inserts another record to the dimension for SCD Type changes
INSERT INTO [dbo].[DimSupplier] ([SupplierCode], [SupplierName], [Address], [EffectiveDate], [ExpirationDate], [CurrentFlag])
SELECT [SupplierCode], [SupplierName], [Address], [EffectiveDate], [ExpirationDate], [CurrentFlag]
FROM
(
       MERGE [dbo].[DimSupplier] TT
       USING [dbo].[Supplier] ST
              ON (TT.[SupplierCode] = ST.[SupplierCode])
       -- This inserts new records in the dimension table
       WHEN NOT MATCHED THEN
              INSERT ([SupplierCode], [SupplierName], [Address], [EffectiveDate],   [ExpirationDate], [CurrentFlag])
              VALUES ([SupplierCode], [SupplierName], [Address], '01/01/1900', NULL, 'Y')
       -- This marks the older record to be outdated for SCD Type 2
       WHEN MATCHED AND TT.[CurrentFlag] = 'Y' AND (ISNULL(TT.[SupplierName], '') != ISNULL(ST.[SupplierName], '')) THEN
              UPDATE SET TT.[CurrentFlag] = 'N', TT.[ExpirationDate] = GETDATE() - 1
              OUTPUT $Action Action_Taken, ST.[SupplierCode], ST.[SupplierName], 
              ST.[Address], GETDATE() AS [EffectiveDate], NULL AS [ExpirationDate], 'Y' AS [CurrentFlag]
)
AS MERGE_OUT
WHERE MERGE_OUT.Action_Taken = 'UPDATE';
GO
SELECT * FROM [dbo].[DimSupplier]

-- type 2 change
USE [AdventureWorks2012]
GO
UPDATE [dbo].[Supplier]
SET [SupplierName] = 'ABC Company LtdZ.'
WHERE [SupplierCode] = 'S0000001'
GO
SELECT * FROM [dbo].[Supplier]
GO
SELECT * FROM [dbo].[DimSupplier]

-- exec type 2 merge above
SELECT * FROM [dbo].[Supplier]
GO
SELECT * FROM [dbo].[DimSupplier]


--4) Type 2 changes (fix error with NOCHECK CONSTRAINT)
-- MERGE with Drop FK on all Child tables
ALTER TABLE [dbo].[DimSupplierAttributes] NOCHECK CONSTRAINT ALL
GO


INSERT INTO [dbo].[DimSupplier] ([SupplierCode], [SupplierName], [Address], [EffectiveDate], [ExpirationDate], [CurrentFlag])
SELECT [SupplierCode], [SupplierName], [Address], [EffectiveDate], [ExpirationDate], [CurrentFlag]
FROM
(
       MERGE [dbo].[DimSupplier] TT
       USING [dbo].[Supplier] ST
              ON (TT.[SupplierCode] = ST.[SupplierCode])
       -- This inserts new records in the dimension table
       WHEN NOT MATCHED THEN
              INSERT ([SupplierCode], [SupplierName], [Address], [EffectiveDate],   [ExpirationDate], [CurrentFlag])
              VALUES ([SupplierCode], [SupplierName], [Address], '01/01/1900', NULL, 'Y')
       -- This marks the older record to be outdated for SCD Type 2
       WHEN MATCHED AND TT.[CurrentFlag] = 'Y' AND (ISNULL(TT.[SupplierName], '') != ISNULL(ST.[SupplierName], '')) THEN
              UPDATE SET TT.[CurrentFlag] = 'N', TT.[ExpirationDate] = GETDATE() - 1
              OUTPUT $Action Action_Taken, ST.[SupplierCode], ST.[SupplierName], 
              ST.[Address], GETDATE() AS [EffectiveDate], NULL AS [ExpirationDate], 'Y' AS [CurrentFlag]
)
AS MERGE_OUT
WHERE MERGE_OUT.Action_Taken = 'UPDATE';
GO
SELECT * FROM [dbo].[DimSupplier]

ALTER TABLE [dbo].[DimSupplierAttributes] WITH NOCHECK CHECK CONSTRAINT ALL
GO