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
=> [#<User:0xfb4 | |
@_java_node=#<Java::OrgNeo4jKernelImplCore::NodeProxy:0x2821e44d>, | |
@_properties={"first_and_last"=>"Black Panther", "deleted_at"=>nil}, | |
@_properties_before_type_cast={}, | |
@_relationships={}>, | |
#<User:0xfc4 | |
@_java_node=#<Java::OrgNeo4jKernelImplCore::NodeProxy:0x2346c62b>, | |
@_properties={"first_and_last"=>"Bat Man", "deleted_at"=>nil}, | |
@_properties_before_type_cast={}, | |
@_relationships={}>] |
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
neo4j-sh (0)$ START n=node (4) MATCH (n)-[:`friends`]->(x) WHERE (NOT(n.blocked_friends)) OR (NOT(n.pending_inner)) RETURN x | |
==> SyntaxException: unknown function | |
==> "START n=node (4) MATCH (n)-[:`friends`]->(x) WHERE (NOT(n.blocked_friends)) OR (NOT(n.pending_inner)) RETURN x" | |
==> ^ | |
neo4j-sh (0)$ START n=node (4) MATCH (n)-[:`friends`]->(x) WHERE NOT(n.blocked_friends) OR NOT(n.pending_inner) RETURN x | |
==> SyntaxException: unknown function | |
==> "START n=node (4) MATCH (n)-[:`friends`]->(x) WHERE NOT(n.blocked_friends) OR NOT(n.pending_inner) RETURN x" | |
==> ^ | |
neo4j-sh (0)$ START n=node (4) MATCH (n)-[:`friends`]->(x) WHERE NOT(n.blocked_friends) RETURN x | |
==> SyntaxException: unknown function |
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 User < < ActiveRecord::Base | |
def self.find_by_vanity(vname) | |
#m = User.find vname | |
v = Vanity.find_by_name(vname) | |
m = v.try(:vanity) | |
#if we couldnt find by Vanity, lets try finding by regular id: | |
unless v and m | |
begin | |
m = User.find!(vname) |
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
def match | |
criteria_matched = params[:quantity] | |
case criteria_matched | |
when criteria_matched == 4 | |
results = Neo4j._query("START n=node(13626) MATCH(n)-[:_all]->(x) WHERE x.city == #{Resume.city} AND x.school == #{Resume.school} AND x.sport == #{Resume.sport} AND x.skill =~ /(?i-mx:.*#{Resume.skill}.*)/ RETURN x") | |
when criteria_matched == 5 | |
results = Neo4j._query("START n=node(13626) MATCH(n)-[:_all]->(x) WHERE x.city == #{Resume.city} AND x.school == #{Resume.school} AND x.sport == #{Resume.sport} AND x.skill =~ /(?i-mx:.*#{Resume.skill}.*)/ AND x.history == #{Resume.history} RETURN x") | |
when criteria_matched == 6 | |
results = Neo4j._query("START n=node(13626) MATCH(n)-[:_all]->(x) WHERE x.city == #{Resume.city} AND x.school == #{Resume.school} AND x.sport == #{Resume.sport} AND x.skill =~ /(?i-mx:.*#{Resume.skill}.*)/ AND x.history == #{Resume.history} AND x.pets == #{Resume.pets} RETURN 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
START n=node(#{self.id}) | |
MATCH | |
(n)-[:friends]->(y)-[:friends]->(z)<-[:`OfferJobResume#resumeuser`]-(t) | |
WHERE | |
(z-[:friends]->y-[:friends]->n) | |
AND NOT(n-[:friends]->z-[:friends]->n) | |
AND NOT(n-[:blocked_friends]->y-[:blocked_friends|friends]->z) | |
AND NOT(n-[:blocked_friends|friends]->y-[:blocked_friends]->z) | |
AND NOT(n-[:blocked_friends]->z) | |
AND NOT(has(z.deleted_at)) |
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
listingSkills = (/\w\S.*/).exec($('div#search-sidebar.contentBox.clearfix div.pa20 div.skills').text()) | |
words = ["the", "and", "but", "a", "an", "some", "or", "yet", "for", "so", "did"] | |
console.log(listingSkills) | |
listingSkills.split " " | |
console.log(listingSkills) | |
words.forEach (word) -> | |
listingSkills.replace /word/, "" |
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
listingSkills = $('div#search-sidebar.contentBox.clearfix div.pa20 div.skills').text().replace /[,\/.()""'']+ ?/g, " " | |
listingSkills = listingSkills.replace /\b(\s+|and|or|deflect|an|a|etc)\b/g, " " | |
listingSkills = listingSkills.replace /^\s+|\s+$/g, "" | |
listingSkills = listingSkills.split /\s+/g |
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
@users.sort! { |a,b| a.name.downcase <=> b.name.downcase } |
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
%li.search-business | |
= link_to '#', searches_path(:t => "1") do | |
%i.icon-star | |
Business |
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
START n=node(127) | |
MATCH | |
(n)-[:friends]->(y)-[:friends]->(z) | |
WHERE | |
(z<>n) | |
AND(z-[:friends]->y-[:friends]->n) | |
AND NOT(n-[:friends]->z-[:friends]->n) | |
AND NOT(n-[:blocked_friends]->y-[:blocked_friends|friends]->z) | |
AND NOT(n-[:blocked_friends|friends]->y-[:blocked_friends]->z) | |
AND NOT(n-[:blocked_friends]->z) |
OlderNewer