> debian:package-bin
[error] Not a valid key: debian (similar: clean)
[error] debian:package-bin
[error]
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
| for(var i=1; i < 21; i++) { | |
| var message = ""; | |
| if(i % 3 === 0) { | |
| message += "Fizz"; | |
| } | |
| if( i % 5 === 0) { | |
| message += "Buzz"; | |
| } | |
| if(!message) { | |
| message = i; |
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
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <math.h> | |
| int main() { | |
| while(true) { | |
| float x = 0.01, z, p = 1; | |
| int c, n = 10, i = 1; |
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
| package com.github.omnomnom | |
| import java.util.concurrent.Semaphore | |
| import concurrent.Lock | |
| object SleepingBarber extends App { | |
| val NCustomers = 12 | |
| val NChairs = 5 | |
| val CutTime = 10 | |
| val VisitInterval = 5 |
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
| private def upsert(filename: String, extension: String, is: InputStream) { | |
| gridfs.findOne(filename) match { | |
| case Some(_) => println(filename + " is already in database") | |
| case None => | |
| gridfs(is) { | |
| file => | |
| file.filename = filename | |
| file.contentType = "image/" + extension | |
| } | |
| } |
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
| #include "stdafx.h" | |
| #include <iostream> | |
| #include <fstream> | |
| #include <string> | |
| using namespace std; | |
| void readFromFile() { | |
| string line; | |
| ifstream myfile ("tolstoy.txt"); |
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
| CREATE OR REPLACE TRIGGER UPD_INF AFTER | |
| UPDATE OF SALARY ON hr.employees FOR EACH ROW | |
| DECLARE | |
| dif NUMBER; | |
| str VARCHAR2(3000); | |
| e hr.employees%ROWTYPE; | |
| BEGIN | |
| dif := TRUNC((TRUNC(sysdate) - TRUNC(e.hire_date))/365,0); | |
| e := :old; | |
| str := 'Номер сотрудника:' || e.employee_id || |
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
| // project/Build.scala | |
| import sbt._ | |
| import Keys._ | |
| import AndroidKeys._ | |
| object General { | |
| val settings = Defaults.defaultSettings ++ Seq( | |
| scalaVersion := "2.9.2" | |
| ) |
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
| /** | |
| * dirwatcher.scala | |
| * | |
| * Uses the Java 7 WatchEvent filesystem API from within Scala. | |
| * Adapted from: | |
| * http://download.oracle.com/javase/tutorial/essential/io/examples/WatchDir.java | |
| * | |
| * @author Chris Eberle <[email protected]> | |
| * @version 0.1 | |
| */ |
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
| implicit val bdStringView = StringView.of[BigDecimal] as { _.toString } | |
| def makeStringValue[T](implicit sv: StringView[T]) = new StringValue { | |
| def getString(value: AnyRef) = sv(value.asInstanceOf[T]) | |
| } | |
| bdStringValue = makeStringValue[BigDecimal] | |
| strStringValue = makeStringValue[String] | |
| qtyStringValue = makeStringValue[Long](StringView.of[Long] as { _.toString } |