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
.spinner { | |
display: inline-block; | |
width: 30px; | |
height: 30px; | |
background-size: 100%; | |
background-repeat: no-repeat; | |
background-image:url(data:image/gif;base64,R0lGODlhgACAAKIAAP///93d3bu7u5mZmQAA/wAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQFBQAEACwCAAIAfAB8AAAD/0i63P4wygYqmDjrzbtflvWNZGliYXiubKuloivPLlzReD7al+7/Eh5wSFQIi8hHYBkwHUmD6CD5YTJLz49USuVYraRsZ7vtar7XnQ1Kjpoz6LRHvGlz35O4nEPP2O94EnpNc2sef1OBGIOFMId/inB6jSmPdpGScR19EoiYmZobnBCIiZ95k6KGGp6ni4wvqxilrqBfqo6skLW2YBmjDa28r6Eosp27w8Rov8ekycqoqUHODrTRvXsQwArC2NLF29UM19/LtxO5yJd4Au4CK7DUNxPebG4e7+8n8iv2WmQ66BtoYpo/dvfacBjIkITBE9DGlMvAsOIIZjIUAixliv9ixYZVtLUos5GjwI8gzc3iCGghypQqrbFsme8lwZgLZtIcYfNmTJ34WPTUZw5oRxdD9w0z6iOpO15MgTh1BTTJUKos39jE+o/KS64IFVmsFfYT0aU7capdy7at27dw48qdS7eu3bt480I02vUbX2F/JxYNDImw4GiGE/P9qbhxVpWOI/eFKtlNZbWXuzlmG1mv58+gQ4seTbq06dOoU6vGQZJy0FNlMcV+czhQ7SQmYd8eMhPs5BxVdfcGEtV3buDBXQ+fURxx8oM6MT9P+Fh6dOrH2zavc13u9JXVJb520Vp8dvC76wXMuN5Sepm/1WtkEZHDefnzR9Qvsd9+/wi8+en3X0ntYVcSdAE+UN4zs7ln24CaLagghIxBaGF8kFGoIYV+Ybghh841GIyI5ICIFoklJsigihmimJOLEbL |
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
[Desktop Entry] | |
Type=Application | |
Name=omxplayer | |
Exec=lxterminal --command "omxplayer -o hdmi %f" | |
Categories=Other; | |
NoDisplay=true | |
MimeType=video/mp4 | |
Terminal=false |
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
// apt-get install scite mono-complete sqlite3 | |
// mcs program.cs -r:System.Data -r:Mono.Data.Sqlite | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Data; |
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
// use with spinner CSS | |
var showBusyModal = function () { | |
$.blockUI({ | |
message: '<div class="spinner"></div><br />Please wait...', | |
css: { | |
border: 'none', | |
padding: '15px', | |
backgroundColor: '#000', | |
'-webkit-border-radius': '10px', |
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
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace SplitFlatFile { | |
class Program { | |
static void Main(string[] args) { |
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 static DateTime UnixTimeStampToDateTime(int unixTimeStamp) | |
{ | |
// Unix timestamp is seconds past epoch | |
System.DateTime dtDateTime = new DateTime(1970, 1, 1, 0, 0, 0, 0, System.DateTimeKind.Utc); | |
dtDateTime = dtDateTime.AddSeconds(unixTimeStamp).ToLocalTime(); | |
return dtDateTime; | |
} |
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
protected static bool MakeRequest(string uri, string method, out string message, string body = "", string accept = "application/json") | |
{ | |
bool success = false; | |
message = ""; | |
var body_data = Encoding.ASCII.GetBytes(body); | |
string req = uri; | |
var webRequest = (HttpWebRequest)WebRequest.Create(req); | |
webRequest.Method = method; |
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 Dictionary<string, string> properties; | |
properties = c.Properties.ToDictionary(entry => entry.Key, entry => entry.Value); // shallow clone |
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
/* | |
CREATE PROCEDURE [dbo].[ADD_ACTIVITY_LOG] | |
-- Add the parameters for the stored procedure here | |
@activityDate datetime, | |
@activityDesc nvarchar(100), | |
@activityDetail nvarchar(MAX) | |
AS | |
BEGIN | |
-- SET NOCOUNT ON added to prevent extra result sets from | |
-- interfering with SELECT statements. |
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 static string XmlToString(XmlDocument xmlDoc) | |
{ | |
using (var stringWriter = new StringWriter()) | |
{ | |
using (var xmlTextWriter = XmlWriter.Create(stringWriter)) | |
{ | |
xmlDoc.WriteTo(xmlTextWriter); | |
xmlTextWriter.Flush(); | |
return stringWriter.GetStringBuilder().ToString(); | |
} |
OlderNewer