This file contains hidden or 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.Linq; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| using MongoDB.Bson; | |
| using MongoDB.Driver; | |
| using MongoDbWrapper; | |
| namespace MongoDbExampleDataGenerator |
This file contains hidden or 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 async void DoLogic() | |
| { | |
| BsonDocument document; | |
| Console.WriteLine("This program will generate some data when option A is selected."); | |
| Console.WriteLine("Option B will find some data."); | |
| Console.WriteLine("Option C (any other input) will display data from database."); | |
| var input = Console.ReadLine(); |
This file contains hidden or 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 async Task<string> CreateDocument(string collectionName, BsonDocument document) | |
| { | |
| string message = "nothing has happened"; | |
| var collection = _mongoDatabase.GetCollection<BsonDocument>(collectionName); | |
| //insert collection | |
| await collection.InsertOneAsync(document); | |
| message = "updated data"; | |
| return message; | |
| } |
This file contains hidden or 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
| %Guassian_Elimination with jordan method | |
| %This is my code Jason Chalom 711985 | |
| %[r, c] = size(A); | |
| %A = [2 -1 2 1; 1 1 2 1; 2 1 5 3]; | |
| % a has both a matrix and b vector | |
| function [output] = Guassian_Elimination_Jordan (a, b) | |
| %do gauss first | |
| a= horzcat(a,b); | |
| [r,c] = size(a); |
This file contains hidden or 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
| @echo off | |
| echo A cleaning script for .NET MSBuild compiled folders - Jason Chalom 2015 | |
| echo This will delete all bin and obj folders | |
| echo Beware!! | |
| echo | |
| echo First MSBUILD CLEAN will be activated. | |
| echo Will use the location for VS 2013 MS Build Tools 32 bit X86 | |
| pause | |
| "C:\Program Files (x86)\MSBuild\12.0\Bin\msbuild.exe" /t:clean | |
| echo not implemented yet |
This file contains hidden or 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
| //from stackoverflow somewhere | |
| function jsonToHtmlList(json) { | |
| return objToHtmlList(JSON.parse(json)); | |
| } | |
| function objToHtmlList(obj) { | |
| if (obj instanceof Array) { | |
| var ol = document.createElement('ol'); | |
| for (var child in obj) { |
This file contains hidden or 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
| column.For(x => x.UserAchievementMappingGroup == null ? string.Empty : string.Format("<input type=\"button\" data-command=\"displayAchievementAditonalInfoModal\"/><span class=\"hide\">{0}</span>", x.AchievementTransaction.AdditionalInformation) | |
| ).Sortable(false).Named("Additional Information") | |
| .Encode(false).Attributes(@class => "additional-column").HeaderAttributes(@class => "additional-column"); |
This file contains hidden or 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
| //FROM: http://stackoverflow.com/questions/8324239/generating-html-from-arbitrarily-complex-json-object-in-javascript | |
| jQuery(function($) { | |
| display("Loading the JSON data"); | |
| $.ajax({ | |
| type: "GET", | |
| url: "/path/to/the/data", | |
| dataType: "JSON", | |
| success: function(data) { | |
| display("Got the data, rendering it."); |
This file contains hidden or 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
| var formatLargeNumbers = function (maxNumberToDisplay, maxPlaces, forcePlaces, forceLetter, forceToolTip) { | |
| $(document).ready(function () { | |
| applyFormatting(); | |
| }); | |
| function applyFormatting() { | |
| $(".large-number-format").each(function() { | |
| var number = $(this).html(); |
This file contains hidden or 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 * | |
| FROM db | |
| WHERE DateRequested >= DATEADD(day, DATEDIFF(day, 0, GETDATE()), 0); |