This article aims to be a portal to installation and configuration of Cassandra. It is self-contained in the first place. It also provides links to the original articles.
Warning: This article is still under written.
| def count_primes(num): | |
| list = [True for i in range(num+1)] | |
| p = 2 | |
| while p*p <= num: | |
| if list[p] == True: | |
| for i in range(p*p, num+1, p): | |
| list[i] = False | |
| p += 1 | |
| return list.count(True) - 2 |
| import latambuses.* | |
| import org.quartz.JobExecutionContext | |
| import groovyx.gpars.GParsPool | |
| import groovy.time.TimeCategory | |
| import cl.pullman.websales.to.CiudadTO | |
| import cl.pullman.websales.to.EmpresaTO | |
| import cl.pullman.websales.to.ServicioTO | |
| import cl.pullman.websales.to.TarifaTO |
| List results = criteria.listDistinct () { | |
| createAlias('samples','s',CriteriaSpecification.LEFT_JOIN) | |
| createAlias('s.sampleRequests', 'sr', CriteriaSpecification.LEFT_JOIN) | |
| or { | |
| isNull('s.id') | |
| sizeEq('s.sampleRequests', 0) | |
| //Needs to be any samples available, not all samples available. | |
| // In other words check all items in the collection and if they all meet | |
| // the condition then exclude |
| import {bindable, inject,bindingMode, customElement} from 'aurelia-framework'; | |
| // Import JSPM modules we installed earlier | |
| import $ from 'jquery'; | |
| import 'select2'; | |
| @customElement('form-select') // Define the name of our custom element | |
| @inject(Element) // Inject the instance of this element | |
| export class CustomSelect { |
| commands: | |
| 00_download_jdk7: | |
| command: wget --no-cookies --no-check-certificate --header "Cookie:gpw_e24=xxx" "http://download.oracle.com/otn-pub/java/jdk/7u25-b15/jdk-7u25-linux-x64.rpm" -O /etc/tomcat7/jdk7-oracle.rpm | |
| test: test ! -f /etc/tomcat7/oracle-jdk7-installed.txt | |
| 01_install_oracle_jdk7: | |
| command: yum -y install jdk7-oracle.rpm | |
| cwd: /etc/tomcat7 | |
| test: test ! -f /etc/tomcat7/oracle-jdk7-installed.txt |
| import org.jboss.netty.bootstrap.ServerBootstrap | |
| import org.jboss.netty.buffer.ChannelBuffers | |
| import org.jboss.netty.channel.ChannelHandlerContext | |
| import org.jboss.netty.channel.ChannelPipeline | |
| import org.jboss.netty.channel.ChannelPipelineFactory | |
| import org.jboss.netty.channel.Channels | |
| import org.jboss.netty.channel.MessageEvent | |
| import org.jboss.netty.channel.SimpleChannelUpstreamHandler | |
| import org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory | |
| import org.jboss.netty.handler.codec.http.DefaultHttpResponse |
| import java.util.ArrayList | |
| def flatten | |
| flatten = { list -> | |
| switch(list){ | |
| case list.size() == 0: | |
| return | |
| break | |
| case {list.head() instanceof Integer && list.size() == 1}: | |
| result = list |