Skip to content

Instantly share code, notes, and snippets.

@JamesGould123
JamesGould123 / gist:a72b3173e57216bf3a76
Created March 7, 2015 05:20
Error Message from config key
Failed to load package named 'compare-files' C:\Users\James\.atom\packages\compare-files\lib\compare-files-view.js:41
title : "",
^
SyntaxError: Unexpected token :
at exports.runInThisContext (vm.js:75:16)
at Module._compile (module.js:458:25)
at Object.loadFile [as .js] (C:\Users\James\AppData\Local\atom\app-0.186.0\resources\app\src\babel.js:162:21)
at Module.load (module.js:370:32)
at Function.Module._load (module.js:325:12)
at Module.require (module.js:380:17)
@JamesGould123
JamesGould123 / package.json
Created February 18, 2015 18:05
Object error
{
"name": "test-package",
"main": "./lib/test-package",
"version": "0.0.0",
"description": "A short description of your package",
"repository": "https://github.com/atom/test-package",
"license": "MIT",
"engines": {
"atom": ">=0.174.0 <2.0.0"
},
[NullReferenceException: Object reference not set to an instance of an object.]
MySql.Data.Entity.SqlGenerator.Visit(DbPropertyExpression expression) +18
MySql.Data.Entity.SqlGenerator.Visit(DbInExpression expression) +39
System.Data.Entity.Core.Common.CommandTrees.DbInExpression.Accept(DbExpressionVisitor`1 visitor) +64
MySql.Data.Entity.SqlGenerator.VisitBinaryExpression(DbExpression left, DbExpression right, String op) +82
MySql.Data.Entity.SqlGenerator.Visit(DbAndExpression expression) +49
System.Data.Entity.Core.Common.CommandTrees.DbAndExpression.Accept(DbExpressionVisitor`1 visitor) +64
MySql.Data.Entity.SelectGenerator.Visit(DbFilterExpression expression) +103
System.Data.Entity.Core.Common.CommandTrees.DbFilterExpression.Accept(DbExpressionVisitor`1 visitor) +64
MySql.Data.Entity.SqlGenerator.VisitInputExpression(DbExpression e, String name, TypeUsage type) +35
@JamesGould123
JamesGould123 / gist:2207bcec618cac8a3926
Created December 23, 2014 20:43
LINQ to Entities Contains bug p__linq__0
string queryStr = "AB7";
var viewModel5 = (from n in db.TableName
where n.TableCol.Contains("AB7")
select n.TableCol); //running ToList with this returns 35 results
//viewModel5 = {SELECT
//`Extent1`.`TableCol`
//FROM `TableName` AS `Extent1`
//WHERE `Extent1`.`TableCol` LIKE '%AB7%'}
@JamesGould123
JamesGould123 / gist:e3d7dd50132de72c3c38
Created December 23, 2014 20:42
LINQ to Entities Contains bug
string queryStr = "AB7";
var viewModel5 = (from n in db.TableName
where n.TableCol.Contains("AB7")
select n.TableCol); //running ToList with this returns 35 results
//viewModel5 = {SELECT
//`Extent1`.`TableCol`
//FROM `TableName` AS `Extent1`
//WHERE `Extent1`.`TableCol` LIKE '%AB7%'}
@JamesGould123
JamesGould123 / gist:8d61ee10b69d2eca429f
Created November 16, 2014 05:52
learnyounode - HTTP File Server notes
Because we need to create an HTTP server for this exercise rather than a generic
TCP server, we should use the http module from Node core. Like the net module,
http also has a method named http.createServer() but this one creates a server t
hat can talk HTTP.
http.createServer() takes a callback that is called once for each connection rec
eived by your server. The callback function has the signature:
function callback (request, response) { /* ... */ }