Skip to content

Instantly share code, notes, and snippets.

View natalia-chikina's full-sized avatar

Natalia Chikina natalia-chikina

  • Dataart
  • Amsterdam, The Netherlands
View GitHub Profile
package com.bam.device
import java.util.concurrent.TimeUnit
import akka.actor._
import com.bam.commons.{Common, DeviceStatsCommon}
import com.bam.data.DeviceMacAddress
import com.bam.data.tag.SensorSerial
import com.bam.device.bloh.BlohConfig
import com.bam.device.bloh.client.netty.NettyAsyncUplink.UplinkMessages
import com.bam.device.bloh.client.netty.{NettyAsyncDownlink, NettyAsyncUplink}
CREATE TABLE IF NOT EXISTS streamingInventoryEvents(
locationType text,
locationId int,
cacheTime timestamp,
itemNumber text,
tag text,
time timestamp,
scanType int,
pieceTag text,
repId int,
CREATE TABLE IF NOT EXISTS streamingInventoryEvents(
locationType text,
locationId int,
cacheTime timestamp,
tag text,
time timestamp,
scanType int,
pieceTag text,
repId int,
ip text,
- name: Configure iptables for Master
user: root
hosts: "{{spark_master_group_name}}"
sudo: yes
vars_files:
- ../vars/network-vars.yml
- ../vars/spark-vars.yml
tasks:
- name: Add rule to firewall for all ports
iptables: chain=INPUT in_interface=eth1 source={{hostvars[item][ip_interface]['ipv4']['address']}} jump=ACCEPT
int _atoi(const _TCHAR *str)
{
int num = 0;
size_t i = 0;
while(str[i] == ' ' || str[i] == '\r' || str[i] == '\n' || str[i] == '\t')
{
i++;
}
int minus = str[i]=='-' ? -1 : 1;
if(str[i]=='-' || str[i]=='+')