Posts

Showing posts from July, 2014

Automapper Example with Lists

            //List<spW3_SELECT_RLookup_Result> reps = db.spW3_SELECT_RLookup(1, myUserName).ToList();             //Mapper.CreateMap<spW3_SELECT_RepLookup_Result, RLookupResults>();             //TVM tVM = new TVM();             //tVM.RepLookup_results = Mapper.Map<List<spW3_SELECT_RLookup_Result>, List<RLookupResults>>(reps);             //tVM.sReps = new SelectedRs(); without Auto mapper             //way to do this without automapper             //var q = reps.Select(item => new RLookupResults()             //    {             //        rID = item.rID,             //        RNumberID = item.RNumberID,             //        rNumber = item.rNumber,             //        rName = item.rName,             //        Status = item.Status,             //        defSelect = item.defSelect             //    }).ToList();

Removing duplicates (Handy)

    --delete x from    select * from      (       select *,  rn=row_number() over (partition by amount, number order by id)       from [exTable]       --where exTable.number = '1019351'     ) x     where rn > 1;

FileZilla - Sftp

Image
Have to fix a job for someone that is out today that goes out to an ftp server and downloads files, but someone changed some settings over the weekend (awesome).  So using Filezilla to see if it actually grabbed the files. For sftp when connecting use port 22 and preface the ip with sftp://

Resizable IFrame Even In Dnn7

Iframe that resizes properly with content even in dnn7. Seems to work well with all the main browers and iphone and android. Not really sure what the reasoning behind IE always being special is.  Anyway  having the div with that px and the iframe with a slightly smaller percentage than 100% seems to do the trick of preventing the inner iframe from having another scrollbar.  IE also required the other div to have a height in px.  Iphone needs that webkit-overflow-scrolling:touch, thanks to SO posters. <div style="-webkit-overflow-scrolling:touch; overflow: auto; height:800px;min-height: 100%;"> <iframe src="yourpage" width="100%" height="97%"></iframe> </div>

DNN - Modular Popups Non-Responsive

Image
The popups are only an issue with Logins.  The popup comes up, but half of it is off the screen.  The way to remove popups is to go to Admin ->Site Settings -> Page Management -> User Availability -> uncheck"Enable Pop-ups" As you can see the setting is a bit buried.  But now all the popups are actual responsive pages (if you have a skin that is responsive anyway).

DNN links module Text wrap

To get the text to wrap in the title itself add a <BR/>.  This will force the text to wrap at a specific point.