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
body | |
{ | |
background: url(TMMSCM.jpg) center bottom fixed; | |
background-repeat: no-repeat; | |
height: 100%; | |
width: 100%; | |
background-size: cover; | |
} |
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; | |
namespace LightSwitchApplication | |
{ | |
/// <summary> | |
/// Generic Equality comparer that can be used of linq | |
/// </summary> | |
/// <typeparam name="T"></typeparam> | |
public class EqualityComparer<T> : IEqualityComparer<T> |
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
partial void Tickets_Created() | |
{ | |
this.FindControl("ScreenLayout").ControlAvailable += Tickets_ControlAvailable; | |
} | |
void Tickets_ControlAvailable(object sender, Microsoft.LightSwitch.Presentation.ControlAvailableEventArgs e) | |
{ | |
var screenLayout = e.Control as System.Windows.Controls.Grid; | |
if (screenLayout == null) return; |
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
BEGIN TRAN | |
--This is a sample to delete a duplicate ticket | |
--Assuming the duplicates are just maximum count as 2 | |
--But if it, more than two run this check several times, because it gets only the MIN value | |
DELETE FROM dbo.TicketDetails | |
WHERE Id IN ( | |
SELECT | |
MIN(t.Id) as Id | |
FROM dbo.TicketDetails t |
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
partial void Plants_Changed(NotifyCollectionChangedEventArgs e) | |
{ | |
if (e.Action == NotifyCollectionChangedAction.Add) | |
{ | |
var addedItem = e.NewItems[0] as HaulerPlant; | |
if (addedItem == null) return; | |
addedItem.IsActive = true; | |
} |
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 [master] | |
GO | |
SET ANSI_NULLS ON | |
GO | |
SET QUOTED_IDENTIFIER ON | |
GO | |
-- ============================================= | |
-- Parameter1: databaseName, setting null backup all databases | |
-- Parameter2: backupType F=full, D=differential, L=log |
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
mongoimport --host localhost:3001 --db meteor --collection pickups --file pickup.json --drop |
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
{"_id":207285,"ticketNo":"48390","timeStamp":{"$date":"2017-07-30T23:06:55.000Z"},"details":[{"_id":"38714","producerId":"74","gradeTypeId":"3","weight":44075,"timeStamp":{"$date":"2017-07-30T23:06:55.000Z"},"temperature":41},{"_id":"38715","producerId":"66","gradeTypeId":"3","weight":16846,"timeStamp":{"$date":"2017-07-30T23:06:55.000Z"},"temperature":35}],"deliveries":[{"_id":"11656","weight":60921,"timeStamp":{"$date":"2017-07-30T23:06:55.000Z"},"plantId":279,"plantBtuId":259,"plantSiloId":259}]} | |
{"_id":207286,"ticketNo":"49502","timeStamp":{"$date":"2017-07-31T23:06:55.000Z"},"details":[{"_id":"38716","producerId":"54","gradeTypeId":"3","weight":9474,"timeStamp":{"$date":"2017-07-31T23:06:55.000Z"},"temperature":43},{"_id":"38717","producerId":"260","gradeTypeId":"3","weight":16606,"timeStamp":{"$date":"2017-07-31T23:06:55.000Z"},"temperature":40},{"_id":"38718","producerId":"260","gradeTypeId":"3","weight":8669,"timeStamp":{"$date":"2017-07-31T23:06:55.000Z"},"temperature":39},{"_id":"38719","producerId" |
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
SELECT | |
( | |
select | |
TicketMasters.Id as _id, | |
dbo.ParseText(TicketMasters.TicketNo) as ticketNo, | |
dbo.ParseDate(TicketMasters.StartTS) as 'timeStamp.$date', | |
TicketMasters.Remarks as remarks, | |
( | |
SELECT |
OlderNewer