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
// For returning objects | |
public class PagedResult<T> { | |
public List<T> Items { get; set; } | |
public long CurrentPage { get; set; } | |
public long ItemsPerPage { get; set; } | |
public long TotalItems { get; set; } | |
public long TotalPages { get; set; } | |
public string Text { get; set; } | |
public int ItemsDisplayed { get; set; } |
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
# remove specific file from git cache | |
git rm --cached filename | |
# remove all files from git cache | |
git rm -r --cached . | |
git add . | |
git commit -m ".gitignore is now working" |
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
-- Steps to update sh404 to perform 301 redirects on Joomla from the database | |
-- 1. Search for your current url | |
select * from {owner}.{prefix}sh404sef_urls | |
where oldurl like '%{your old url}%' | |
order by oldurl | |
-- 2. Update the newurl to the new page you want | |
index.php?option=com_content&Itemid={menu item id}&id={article id}&lang=en&view=article | |
update {owner}.{prefix}sh404sef_urls |
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
CONVERT(CAST(CONVERT(latin1_field USING latin1) AS BINARY) USING utf8) | |
-- more : http://jonisalonen.com/2012/fixing-doubly-utf-8-encoded-text-in-mysql/ |
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
public class PagedResult<T> { | |
public List<T> Items { get; set; } | |
public long CurrentPage { get; set; } | |
public long ItemsPerPage { get; set; } | |
public long TotalItems { get; set; } | |
public long TotalPages { get; set; } | |
public string Text { get; set; } | |
} |
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
(function () { | |
function Task(data) { | |
this.title = ko.observable(data.title); | |
this.isDone = ko.observable(data.isDone); | |
} | |
function TaskListViewModel() { | |
// Data | |
var self = this; | |
self.tasks = ko.observableArray([]); |
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
$(window).bind('beforeunload', function() { | |
var prompt = true; //if you dont return anything, the page will continue as normal | |
if (prompt) | |
return 'You have unsaved changes'; | |
}); |
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
//taken from: http://stackoverflow.com/questions/13475674/updating-a-contact-with-ews | |
Contact updateContact = Contact.Bind(service, itemId); | |
updateContact.GivenName = customContact.Name; | |
updateContact.Surname = customContact.Surname; | |
EmailAddress emailAddress; | |
bool emailAddressFound; | |
emailAddressFound = updateContact.EmailAddresses.TryGetValue(EmailAddressKey.EmailAddress1, out emailAddress); |
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
<!-- requires DNN 7.2 or higher --> | |
<%@ Register TagPrefix="dnn" TagName="JavaScriptLibraryInclude" Src="~/admin/Skins/JavaScriptLibraryInclude.ascx" %> | |
<%@ Register TagPrefix="dnn" Namespace="DotNetNuke.Web.Client.ClientResourceManagement" Assembly="DotNetNuke.Web.Client" %> | |
<asp:Panel ID="ScopeWrapper" runat="server"> | |
<!-- things to bind here --> | |
</asp:Panel> | |
<dnn:JavaScriptLibraryInclude runat="server" Name="knockout" version="3.1.0" /> | |
<dnn:JavaScriptLibraryInclude runat="server" Name="knockout.mapping" version="2.4.1" /> |
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
git config --global url."https://".insteadOf git:// | |
git config --global --unset url."https://".insteadOf |
OlderNewer