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 self.text_search text = '' | |
scope = self.scoped | |
if text.squish!.present? | |
conditions = [] | |
conditions << sanitize_sql_array(["surveys_large_clinic_individual_compensation_answers.physician_id ILIKE ?", "%#{text}%"]) | |
conditions << sanitize_sql_array(["surveys_large_clinic_individual_compensation_answers.specialty_name ILIKE ?", "%#{text}%"]) | |
conditions << sanitize_sql_array(["org_search.name ILIKE ?", "%#{text}%"]) | |
concat_string = "(surveys_large_clinic_individual_compensation_answers.organization_id || '-'" + | |
" || surveys_large_clinic_individual_compensation_answers.specialty_id || '-'" + |
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 class ChatRoom | |
{ | |
[Key] | |
public Guid ID { get; set; } | |
public virtual ICollection<Message> Messages { get; set; } | |
} | |
public static class ChatRoomExtensions | |
{ | |
public IQueryable<ChatRoom> WithMessagesFromUser(this IQueryable<ChatRoom> queryable, Guid userID) |
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 class ChatRoomService : Service<ChatRoom> | |
{ | |
public ChatRoomService(string connectionString) : base(connectionString) { } | |
public override DbSet<ChatRoom> Relation(ChatDbContext context) | |
{ | |
return context.ChatRooms; | |
} | |
} |
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 Item { | |
public int Id; | |
public ArrayList<int> TransactionIds; | |
} | |
class Node { | |
public ArrayList<Item> Items; | |
public ArrayList<Node> Children = new ArrayList<Node>(); | |
public Node(ArrayList<Item> items) { |
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
<html> | |
<head> | |
<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/knockout/knockout-3.3.0.js"></script> | |
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js"></script> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" integrity="sha512-dTfge/zgoMYpP7QbHy4gWMEGsbsdZeCXz7irItjcC3sPUFtf0kuFbDz/ixG7ArTxmDjLXDmezHubeNikyKGVyQ==" crossorigin="anonymous"> | |
</head> | |
<body> | |
<div id="foo" class="container"> | |
<div data-bind="foreach: bars"> | |
<div class="row"> |
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
<html> | |
<head> | |
<script src="./marked.js"></script> | |
<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/knockout/knockout-3.3.0.js"></script> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> | |
<link rel="stylesheet" href="./tomorrow-night-eighties.css"> | |
<script src="http://cdn.jsdelivr.net/highlight.js/8.9.1/highlight.min.js"></script> | |
<style> | |
#marked pre { | |
word-wrap: normal; |
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
import React from "react"; | |
import { initialize } from "apothecary"; | |
import { Bridge } from "react-apothecary"; | |
const store = initialize({ n: 1 }); | |
... | |
export default () => ( | |
<Bridge store={store}> |
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
import { initialize, split } from "apothecary"; | |
const store = initialize({ n: 1 }); | |
const increment = step => split(n => n + step, "n"); | |
const decrement = step => split(n => n - step, "n"); | |
... |
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
import { initialize, split } from "apothecary"; | |
import { tunnel, fromProps } from "react-apothecary"; | |
const store = initialize({ n: 1 }); | |
const increment = step => split(n => n + step, "n"); | |
const decrement = step => split(n => n - step, "n"); | |
... |
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
import { initialize, split } from "apothecary"; | |
import { tunnel, fromProps } from "react-apothecary"; | |
const store = initialize({ n: 1 }); | |
const increment = step => split(n => n + step, "n"); | |
const decrement = step => split(n => n - step, "n"); | |
... |
OlderNewer