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 Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
SageDataObject190.SDOEngine oSDO = new SageDataObject190.SDOEngine(); | |
SageDataObject190.WorkSpace oWS; | |
SageDataObject190.SalesRecord oSalesRecord; | |
//SageDataObject190.SopRecord oSopRecord; | |
SageDataObject190.SopItem oSopItem; | |
//SageDataObject190.SopItem oSopItem_Write; | |
SageDataObject190.SopPost oSopPost; | |
SageDataObject190.StockRecord oStockRecord; | |
//oWS = (SageDataObject190.WorkSpace)oSDO.Workspaces.Add("Example"); |
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 (var i = 0; i < divs.length; i++) { | |
divs[i].style.color = "black" | |
.style.border = thickness + 'px solid blue' | |
.style.backgroundColor = "white"; | |
} | |
for(var i = 0; i < 1000; i++){ |
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; | |
public delegate void FoundString(string found); | |
public class WhatDoIDo | |
{ | |
private ILogger _logger = new Logger(); | |
private readonly List<object> _objects = new List<object>(); | |
public event FoundString Found; |
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
4a. select * from employee where age > 40; | |
4b. select top 1 * from employee order by age desc; | |
4c .select top 1 lastname,count(*) as count from employee group by lastname order by count desc; | |
4d. select lastname,count(*) as count from employee where count > 10 group by lastname HAVING COUNT(lastname) > 10 order by count desc; | |
5. SELECT employee.lastname +', '+employee.forename as 'employee_name' ,department.deptdesc AS 'department' | |
FROM department INNER JOIN |
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 bool IsAnagram(string WordA, string WordB) | |
{ | |
return WordA.OrderBy(x => x).SequenceEqual(WordB.OrderBy(x => x)); | |
} |
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.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace BrightSolid | |
{ | |
class Program | |
{ |
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 DISTINCT `spree_products`.* FROM `spree_products` INNER JOIN `spree_variants` ON | |
`spree_variants`.`product_id` = `spree_products`.`id` AND `spree_variants`.deleted_at IS NULL AND | |
`spree_variants`.is_master = 1 INNER JOIN `spree_products_taxons` ON | |
`spree_products_taxons`.`product_id` = `spree_products`.`id` INNER JOIN `spree_taxons` ON | |
`spree_taxons`.`id` = `spree_products_taxons`.`taxon_id` INNER JOIN `spree_product_properties` ON | |
`spree_product_properties`.`product_id` = `spree_products`.`id` WHERE `spree_products`.`deleted_at` IS | |
NULL AND `spree_taxons`.`id` IN (307170557) AND (available_on <= '2012-09-15 08:27:25') AND ( | |
spree_variants.price >= 500.00 AND spree_products.id IN (SELECT spree_product_properties.product_id | |
FROM spree_product_properties where spree_product_properties.property_id = 33113319 AND | |
spree_product_properties.value = 'Acer' OR spree_product_properties.value = 'HP' ) AND |
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
module Spree | |
Spree::Taxon.class_eval do | |
include ::Spree::ProductFilters # for detailed defs of filters | |
def get_attributes(taxon) | |
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
class Spree::Admin::AmazonProduct < ActiveRecord::Base | |
attr_accessible :Description, :FileName, :Title, :template | |
@queue = :amazon_products | |
def self.perform(id,filename,site) | |
puts "#{Time.now}" | |
start_time = Time.now | |
puts "loading products..." |
NewerOlder