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
/** | |
* Campaign Templates collection. | |
*/ | |
CampaignTemplates = new Meteor.Collection('campaign_templates'); | |
var CategorySchema = new SimpleSchema({ | |
"name": { type: String }, | |
"code": { type: String }, | |
"type": { type: String }, | |
"values": { type: [String] } |
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
Feature: Search campaigns | |
Background: | |
Given user is logged in | |
* all campaigns are removed | |
* campaigns exists: | |
| Title | Approved | | |
| Presidential Campaign | true | | |
| Campaign 1 | true | | |
| Campaign Summer | false | |
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
Feature: Search campaigns | |
Background: | |
Given user is logged in | |
* all campaigns are removed | |
* campaigns exists: | |
| Name | Enabled | | |
| Presidential Campaign | true | | |
| Campaign 1 | true | | |
| Campaign Summer | false | |
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
Feature: Display Headlines | |
# Related tickets: HAT-189 | |
Scenario Outline: Show list of categories in headline | |
Given user is logged in | |
* all campaigns are unapproved | |
* approved campaign exists with details: | |
| Title | Campaign 1 | | |
| Start Date | 01/01/2015 | | |
| End Date | 12/31/2015 | |
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 a.* from ( | |
select ac.contact_id, a.* from civicrm_activity a | |
join civicrm_activity_contact ac on ac.activity_id=a.id and ac.record_type_id = 3 | |
join civicrm_option_value v on v.value=a.activity_type_id and v.option_group_id = 2 and v.name like '%225 Download Packet%' | |
join civicrm_contact c on c.id = ac.contact_id | |
where c.is_deleted = 0 | |
) as a | |
LEFT JOIN | |
( | |
select ac.contact_id from civicrm_activity 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
case class ERCForestConf(nbTrees: Int = 8, treeConf: ERCTreeConf = ERCTreeConf()) | |
case class ERCForest(trees: IndexedSeq[ERCTree]) { | |
def assignIndexSeq(pt: Seq[Seq[Float]]): Seq[Int] = { | |
trees.map(_.query(pt)).flatten | |
} | |
def numClusters = trees.map(_.leavesSize).sum | |
} |
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
int ans, i; | |
for (i = 1; i < 6; i++) { | |
ans = i % 2; | |
if (ans == 1) | |
System.out.print(i + 1) | |
} | |
int x = 7 + 3 * 6 / 2 - 1; | |
System.out.println(x); | |
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
import sbt._ | |
import Keys._ | |
import play.Project._ | |
object ApplicationBuild extends Build { | |
val appName = "SubProjectExample" | |
val appVersion = "1.0-SNAPSHOT" | |
val core = Project("core", file("core")) |
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
def sentenceAnagrams(sentence: Sentence): List[Sentence] = { | |
def subSentence(occ: Occurrences): List[Sentence] = { | |
if (occ.isEmpty) List(List()) | |
else | |
for { | |
x <- combinations(occ) | |
y <- dictionaryByOccurrences(x) | |
z <- subSentence(subtract(occ, x)) | |
} yield y :: z |
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
/** | |
* This program shows how to store tabular data in a 2D array. | |
* | |
* @version 1.40 2004-02-10 | |
* @author Cay Horstmann | |
*/ | |
public class CompoundInterest { | |
public static void main(String[] args) { | |
final double STARTRATE = 10; | |
final int NRATES = 6; |
NewerOlder