text:
package net.floodlightcontroller.qoedrivenadjustment;

import net.floodlightcontroller.core.FloodlightContext;
import net.floodlightcontroller.core.IFloodlightProviderService;
import net.floodlightcontroller.core.IOFSwitch;
import net.floodlightcontroller.core.internal.IOFSwitchService;
import net.floodlightcontroller.core.module.FloodlightModuleContext;
import net.floodlightcontroller.core.module.FloodlightModuleException;
import net.floodlightcontroller.core.module.IFloodlightModule;
import net.floodlightcontroller.core.module.IFloodlightService;
import net.floodlightcontroller.core.types.NodePortTuple;
import net.floodlightcontroller.core.util.AppCookie;
import net.floodlightcontroller.devicemanager.IDevice;
import net.floodlightcontroller.devicemanager.IDeviceService;
import net.floodlightcontroller.devicemanager.SwitchPort;
import net.floodlightcontroller.linkdiscovery.Link;
import net.floodlightcontroller.packet.*;
import net.floodlightcontroller.routing.IRoutingService;
import net.floodlightcontroller.routing.Path;
import net.floodlightcontroller.routing.PathId;
import net.floodlightcontroller.sflowcollector.ISflowCollectionService;
import net.floodlightcontroller.sflowcollector.InterfaceStatistics;
import net.floodlightcontroller.statistics.IStatisticsService;
import net.floodlightcontroller.statistics.SwitchPortBandwidth;
import net.floodlightcontroller.threadpool.IThreadPoolService;
import net.floodlightcontroller.topology.ITopologyService;
import net.floodlightcontroller.util.OFMessageUtils;
import org.projectfloodlight.openflow.protocol.*;
import org.projectfloodlight.openflow.protocol.action.OFAction;
import org.projectfloodlight.openflow.protocol.action.OFActionEnqueue;
import org.projectfloodlight.openflow.protocol.action.OFActionSetQueue;
import org.projectfloodlight.openflow.protocol.match.Match;
import org.projectfloodlight.openflow.protocol.match.MatchField;
import org.projectfloodlight.openflow.types.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.*;
import java.util.concurrent.TimeUnit;

public class QoEdrivenAdjustment extends QoEdrivenAdjBase implements IFloodlightModule {
	private static final Logger log = LoggerFactory.getLogger(QoEdrivenAdjustment.class);
//	private static volatile boolean waitingRerange

	private ITopologyService topologyService;

	private static boolean isEnabled = false;

	private Random rand = new Random(47);
	private Set<IPv4Address> unsatClient;
	private static FlowRegistry flowRegistry;
	private static DatapathId serverAp = DatapathId.of("00:00:00:00:00:00:00:02");  //视频服务器所连的交换机dpid
	private static final String ENABLED_STR = "enable";
	private static final long FLOWSET_BITS = 52;
    private static final long FLOWSET_MAX = (long) (Math.pow(2, FLOWSET_BITS) - 1);

    private static final IPv4Address server = IPv4Address.of("192.168.56.12");  //视频服务器ip
    private static final TransportPort serverPort = TransportPort.of(3000);     //视频服务器端口
    private static final int CAPACITY = 10_000_000;
	private static final int VIDEO_BANDWIDTH = 2500_000;

	protected void doForwardFlow(IOFSwitch sw, OFPacketIn pi, FloodlightContext cntx) {
        OFPort srcPort = OFMessageUtils.getInPort(pi);
        DatapathId srcSw = sw.getId();
        IDevice dstDevice = IDeviceService.fcStore.get(cntx, IDeviceService.CONTEXT_DST_DEVICE);
        IDevice srcDevice = IDeviceService.fcStore.get(cntx, IDeviceService.CONTEXT_SRC_DEVICE);

        if (dstDevice == null) {
            log.debug("Destination device unknown. Flooding packet");
            doFlood(sw, pi,cntx);
            return;
        }

        if (srcDevice == null) {
            log.error("No device entry found for source device. Is the device manager running? If so, report bug.");
            return;
        }

        /* Some physical switches partially support or do not support ARP flows */
        if (FLOOD_ALL_ARP_PACKETS &&
                IFloodlightProviderService.bcStore.get(cntx, IFloodlightProviderService.CONTEXT_PI_PAYLOAD).getEtherType()
                == EthType.ARP) {
            log.debug("ARP flows disabled in Forwarding. Flooding ARP packet");
            doFlood(sw, pi, cntx);
            return;
        }

        /* This packet-in is from a switch in the path before its flow was installed along the path */
        if (!topologyService.isEdge(srcSw, srcPort)) {
            log.debug("Packet destination is known, but packet was not received on an edge port (rx on {}/{}). Flooding packet", srcSw, srcPort);
            doFlood(sw, pi, cntx);
            return;
        }

        /*
         * Search for the true attachment point. The true AP is
         * not an endpoint of a link. It is a switch port w/o an
         * associated link. Note this does not necessarily hold
         * true for devices that 'live' between OpenFlow islands.
         *
         * TODO Account for the case where a device is actually
         * attached between islands (possibly on a non-OF switch
         * in between two OpenFlow switches).
         */
        SwitchPort dstAp = null;
        for (SwitchPort ap : dstDevice.getAttachmentPoints()) {
			if (topologyService.isEdge(ap.getNodeId(), ap.getPortId())) {
				dstAp = ap;
				break;
			}
		}

        /*
         * This should only happen (perhaps) when the controller is
         * actively learning a new topology and hasn't discovered
         * all links yet, or a switch was in standalone mode and the
         * packet in question was captured in flight on the dst point
         * of a link.
         */
        if (dstAp == null) {
            log.debug("Could not locate edge attachment point for destination device {}. Flooding packet");
            doFlood(sw, pi, cntx);
            return;
        }
		DatapathId dstSw = dstAp.getNodeId();
        OFPort dstPort = dstAp.getPortId();

        /* Validate that the source and destination are not on the same switch port */
        if (sw.getId().equals(dstAp.getNodeId()) && srcPort.equals(dstAp.getPortId())) {
        	if(srcSw.equals(DatapathId.of("00:00:00:00:00:00:00:01")) && srcPort.equals(OFPort.of(7)))
        		return;
        	log.info(srcSw.toString() + " vs " + DatapathId.of("00:00:00:00:00:00:00:02").toString() + "  "
        			+ srcPort.toString() + " vs " + OFPort.of(7).toString() );
            log.info("Both source and destination are on the same switch/port {}/{}. Dropping packet", sw.toString(), srcPort);
            return;
        }

        //flag[0]:该流是否需要记录,只有tcp和udp流要被记录
        //flag[1]:该流是否是视频服务器到客户端的流
        boolean[] flag = new boolean[2];

        IPv4Address[] clientIp = new IPv4Address[1];
        Match m = createMatchFromPacket(sw, srcPort, pi, cntx, flag, clientIp);

        if(flag[1] && flowRegistry.containsMatch(m))
            return;
//        System.err.println(m);

        long user_fields = flowRegistry.generateFlowId(log);
        U64 cookie = AppCookie.makeCookie(QDA_APP_ID, user_fields);

		List<NodePortTuple> nptList = new ArrayList<>();
		NodePortTuple npt = new NodePortTuple(srcSw, srcPort);
		nptList.add(npt);
		List<NodePortTuple> woAp = null;
		if(!srcSw.equals(dstSw)) {
			List<Path> paths = routingEngineService.getPathsFast(srcSw, dstSw);
			int num = paths.size();
			if(num > 0)
			    woAp = paths.get(rand.nextInt(paths.size())).getPath();
			else
			    System.err.println("unreachable");
			nptList.addAll(woAp);
		}
		npt = new NodePortTuple(dstSw, dstPort);
		nptList.add(npt);

		PathId pathId = new PathId(srcSw, dstSw);
		Path path = new Path(pathId, nptList);

        if (!path.getPath().isEmpty()) {
            if (log.isDebugEnabled()) {
                log.debug("pushRoute inPort={} route={} " +"destination={}:{}",
                        new Object[] { srcPort, path,dstAp.getNodeId(),  dstPort});
                log.debug("Creating flow rules on the route, match rule: {}", m);
            }

            pushRoute(path, m, pi, sw.getId(), cookie, flag, OFFlowModCommand.ADD);

            //This is done after we push the path as it is blocking.
            if(woAp == null || !flag[0])
            	return;

            flowRegistry.register(cookie, m, path, woAp, flag[1] ? 0 : 1, clientIp);

            if(flag[1])
                System.err.println("vip registry " + cookie + " : " + m);
        }
    }

    protected Match createMatchFromPacket(IOFSwitch sw, OFPort inPort, OFPacketIn pi, FloodlightContext cntx, boolean[] flag, IPv4Address[] clinetIp) {
        // The packet in match will only contain the port number.
        // We need to add in specifics for the hosts we're routing between.
        Ethernet eth = IFloodlightProviderService.bcStore.get(cntx, IFloodlightProviderService.CONTEXT_PI_PAYLOAD);
        VlanVid vlan = null;
        if (pi.getVersion().compareTo(OFVersion.OF_11) > 0 && /* 1.0 and 1.1 do not have a match */
                pi.getMatch().get(MatchField.VLAN_VID) != null) {
            vlan = pi.getMatch().get(MatchField.VLAN_VID).getVlanVid(); /* VLAN may have been popped by switch */
        }
        if (vlan == null) {
            vlan = VlanVid.ofVlan(eth.getVlanID()); /* VLAN might still be in packet */
        }

        MacAddress srcMac = eth.getSourceMACAddress();
        MacAddress dstMac = eth.getDestinationMACAddress();

        Match.Builder mb = sw.getOFFactory().buildMatch();
        if (FLOWMOD_DEFAULT_MATCH_IN_PORT) {
            mb.setExact(MatchField.IN_PORT, inPort);
        }

        if (FLOWMOD_DEFAULT_MATCH_MAC) {
            if (FLOWMOD_DEFAULT_MATCH_MAC_SRC) {
                mb.setExact(MatchField.ETH_SRC, srcMac);
            }
            if (FLOWMOD_DEFAULT_MATCH_MAC_DST) {
                mb.setExact(MatchField.ETH_DST, dstMac);
            }
        }

        if (FLOWMOD_DEFAULT_MATCH_VLAN) {
            if (!vlan.equals(VlanVid.ZERO)) {
                mb.setExact(MatchField.VLAN_VID, OFVlanVidMatch.ofVlanVid(vlan));
            }
        }

        // TODO Detect switch type and match to create hardware-implemented flow
        if (eth.getEtherType() == EthType.IPv4) { /* shallow check for equality is okay for EthType */
            IPv4 ip = (IPv4) eth.getPayload();
            IPv4Address srcIp = ip.getSourceAddress();
            IPv4Address dstIp = ip.getDestinationAddress();

            if (FLOWMOD_DEFAULT_MATCH_IP) {
                mb.setExact(MatchField.ETH_TYPE, EthType.IPv4);
                if (FLOWMOD_DEFAULT_MATCH_IP_SRC) {
                    mb.setExact(MatchField.IPV4_SRC, srcIp);
                }
                if (FLOWMOD_DEFAULT_MATCH_IP_DST) {
                    mb.setExact(MatchField.IPV4_DST, dstIp);
                }
            }

            if (FLOWMOD_DEFAULT_MATCH_TRANSPORT) {
                /*
                 * Take care of the ethertype if not included earlier,
                 * since it's a prerequisite for transport ports.
                 */

                if (!FLOWMOD_DEFAULT_MATCH_IP) {
                    mb.setExact(MatchField.ETH_TYPE, EthType.IPv4);
                }

                //只有tcp和udp流记录为背景流,其他如arp等会很快就离开网络
                if (ip.getProtocol().equals(IpProtocol.TCP)) {
					flag[0] = true;
                    TCP tcp = (TCP) ip.getPayload();
                    mb.setExact(MatchField.IP_PROTO, IpProtocol.TCP);

                    //视频服务器到客户端的流标记为vip流,并记下客户端ip用于接收到来自客户端对QoE的抱怨后,找到对应的vip流记录
                    if(srcIp.equals(server) && tcp.getSourcePort().equals(serverPort)){
                    	flag[1] =true;
                    	mb.setExact(MatchField.TCP_SRC, tcp.getSourcePort());
                        clinetIp[0] = dstIp;
                    } else{
                    	if (FLOWMOD_DEFAULT_MATCH_TRANSPORT_SRC)
                    		mb.setExact(MatchField.TCP_SRC, tcp.getSourcePort());
                    	if (FLOWMOD_DEFAULT_MATCH_TRANSPORT_DST)
                    		mb.setExact(MatchField.TCP_DST, tcp.getDestinationPort());
                    }
                    /*
                    if(
                    sw.getSwitchDescription().getHardwareDescription().toLowerCase().contains("open vswitch") && (
                    Integer.parseInt(sw.getSwitchDescription().getSoftwareDescription().toLowerCase().split("\\.")[0]) > 2  || (
                    Integer.parseInt(sw.getSwitchDescription().getSoftwareDescription().toLowerCase().split("\\.")[0]) == 2 &&
                    Integer.parseInt(sw.getSwitchDescription().getSoftwareDescription().toLowerCase().split("\\.")[1]) >= 1 ))
                    ){
	                    if(FLOWMOD_DEFAULT_MATCH_TCP_FLAG){
	                        mb.setExact(MatchField.OVS_TCP_FLAGS, U16.of(tcp.getFlags()));
	                    }
                    }
                    */
                } else if (ip.getProtocol().equals(IpProtocol.UDP)) {
                	flag[0] = true;
                    UDP udp = (UDP) ip.getPayload();
                    mb.setExact(MatchField.IP_PROTO, IpProtocol.UDP);
                    if (FLOWMOD_DEFAULT_MATCH_TRANSPORT_SRC) {
                        mb.setExact(MatchField.UDP_SRC, udp.getSourcePort());
                    }
                    if (FLOWMOD_DEFAULT_MATCH_TRANSPORT_DST) {
                        mb.setExact(MatchField.UDP_DST, udp.getDestinationPort());
                    }
                }
            }
        } else if (eth.getEtherType() == EthType.ARP) { /* shallow check for equality is okay for EthType */
            mb.setExact(MatchField.ETH_TYPE, EthType.ARP);
        } else if (eth.getEtherType() == EthType.IPv6) {
            IPv6 ip = (IPv6) eth.getPayload();
            IPv6Address srcIp = ip.getSourceAddress();
            IPv6Address dstIp = ip.getDestinationAddress();

            if (FLOWMOD_DEFAULT_MATCH_IP) {
                mb.setExact(MatchField.ETH_TYPE, EthType.IPv6);
                if (FLOWMOD_DEFAULT_MATCH_IP_SRC) {
                    mb.setExact(MatchField.IPV6_SRC, srcIp);
                }
                if (FLOWMOD_DEFAULT_MATCH_IP_DST) {
                    mb.setExact(MatchField.IPV6_DST, dstIp);
                }
            }

            if (FLOWMOD_DEFAULT_MATCH_TRANSPORT) {
                /*
                 * Take care of the ethertype if not included earlier,
                 * since it's a prerequisite for transport ports.
                 */
                if (!FLOWMOD_DEFAULT_MATCH_IP) {
                    mb.setExact(MatchField.ETH_TYPE, EthType.IPv6);
                }

                if (ip.getNextHeader().equals(IpProtocol.TCP)) {
                    TCP tcp = (TCP) ip.getPayload();
                    mb.setExact(MatchField.IP_PROTO, IpProtocol.TCP);
                    if (FLOWMOD_DEFAULT_MATCH_TRANSPORT_SRC) {
                        mb.setExact(MatchField.TCP_SRC, tcp.getSourcePort());
                    }
                    if (FLOWMOD_DEFAULT_MATCH_TRANSPORT_DST) {
                        mb.setExact(MatchField.TCP_DST, tcp.getDestinationPort());
                    }
                    if(
                    sw.getSwitchDescription().getHardwareDescription().toLowerCase().contains("open vswitch") && (
                    Integer.parseInt(sw.getSwitchDescription().getSoftwareDescription().toLowerCase().split("\\.")[0]) > 2  || (
                    Integer.parseInt(sw.getSwitchDescription().getSoftwareDescription().toLowerCase().split("\\.")[0]) == 2 &&
                    Integer.parseInt(sw.getSwitchDescription().getSoftwareDescription().toLowerCase().split("\\.")[1]) >= 1 ))
                    ){
	                    if(FLOWMOD_DEFAULT_MATCH_TCP_FLAG){
	                        mb.setExact(MatchField.OVS_TCP_FLAGS, U16.of(tcp.getFlags()));
	                    }
                    }
                } else if (ip.getNextHeader().equals(IpProtocol.UDP)) {
                    UDP udp = (UDP) ip.getPayload();
                    mb.setExact(MatchField.IP_PROTO, IpProtocol.UDP);
                    if (FLOWMOD_DEFAULT_MATCH_TRANSPORT_SRC) {
                        mb.setExact(MatchField.UDP_SRC, udp.getSourcePort());
                    }
                    if (FLOWMOD_DEFAULT_MATCH_TRANSPORT_DST) {
                        mb.setExact(MatchField.UDP_DST, udp.getDestinationPort());
                    }
                }
            }
        }
        return mb.build();
    }

	protected void doFlood(IOFSwitch sw, OFPacketIn pi, FloodlightContext cntx) {
        OFPort inPort = OFMessageUtils.getInPort(pi);
        OFPacketOut.Builder pob = sw.getOFFactory().buildPacketOut();
        List<OFAction> actions = new ArrayList<OFAction>();
        Set<OFPort> broadcastPorts = this.topologyService.getSwitchBroadcastPorts(sw.getId());

        if (broadcastPorts.isEmpty()) {
            log.debug("No broadcast ports found. Using FLOOD output action");
            broadcastPorts = Collections.singleton(OFPort.FLOOD);
        }

        for (OFPort p : broadcastPorts) {
            if (p.equals(inPort)) continue;
            actions.add(sw.getOFFactory().actions().output(p, Integer.MAX_VALUE));
        }
        pob.setActions(actions);

        // set buffer-id, in-port and packet-data based on packet-in
        pob.setBufferId(OFBufferId.NO_BUFFER);
        OFMessageUtils.setInPort(pob, inPort);
        pob.setData(pi.getData());

        if (log.isTraceEnabled()) {
            log.trace("Writing flood PacketOut switch={} packet-in={} packet-out={}",
                    new Object[] {sw, pi, pob.build()});
        }
        messageDamper.write(sw, pob.build());

        return;
    }

	@Override
	public Command processPacketInMessage(IOFSwitch sw, OFPacketIn pi,
                                          FloodlightContext cntx) {
		Ethernet eth = IFloodlightProviderService.bcStore.get(cntx, IFloodlightProviderService.CONTEXT_PI_PAYLOAD);
		if (eth.isBroadcast() || eth.isMulticast())
	            doFlood(sw, pi, cntx);
	    else
	    	doForwardFlow(sw, pi, cntx);
		return Command.CONTINUE;
	}

	@Override
	public Command processFlowRemovedMessage(IOFSwitch sw, OFFlowRemoved flowRemovedMessage) {
		U64 cookie = flowRemovedMessage.getCookie();
		if(AppCookie.extractApp(cookie) != QDA_APP_ID){
			return Command.CONTINUE;
		}

//		log.info("{} flow entry removed {}", sw, flowRemovedMessage);

		//流表删除理由为DELETE,是重路由时主动删除的,重路由后即完成对流记录的更新
        OFFlowRemovedReason removedReason = flowRemovedMessage.getReason();
		if(removedReason.equals(OFFlowRemovedReason.DELETE))
			return Command.CONTINUE;

        //正常离开网络的流,包括普通流和vip流
		flowRegistry.removeExpiredFlow(cookie, removedReason);

		return Command.CONTINUE;
	}

	@Override
	public Collection<Class<? extends IFloodlightService>> getModuleServices() {
		return null;
	}

	@Override
	public Map<Class<? extends IFloodlightService>, IFloodlightService> getServiceImpls() {
		return null;
	}

	@Override
	public Collection<Class<? extends IFloodlightService>> getModuleDependencies() {
		Collection<Class<? extends IFloodlightService>> l =
				new ArrayList<Class<? extends IFloodlightService>>();
		l.add(IThreadPoolService.class);
		l.add(ITopologyService.class);
		l.add(ISflowCollectionService.class);
		l.add(IStatisticsService.class);
		return l;
	}

	@Override
	public void init(FloodlightModuleContext context) throws FloodlightModuleException {
		super.init();
		this.topologyService = context.getServiceImpl(ITopologyService.class);
		this.floodlightProviderService = context.getServiceImpl(IFloodlightProviderService.class);
        this.deviceManagerService = context.getServiceImpl(IDeviceService.class);
        this.routingEngineService = context.getServiceImpl(IRoutingService.class);
        this.switchService = context.getServiceImpl(IOFSwitchService.class);
		this.sflowCollectionService = context.getServiceImpl(ISflowCollectionService.class);
		this.statisticsService = context.getServiceImpl(IStatisticsService.class);
		this.threadPoolService = context.getServiceImpl(IThreadPoolService.class);

		flowRegistry = FlowRegistry.getInstance();
		unsatClient = Collections.synchronizedSet(new HashSet<>());

		Map<String, String> config = context.getConfigParams(this);
		if (config.containsKey(ENABLED_STR)) {
			try {
				isEnabled = Boolean.parseBoolean(config.get(ENABLED_STR).trim());
			} catch (Exception e) {
				log.error("Could not parse '{}'. Using default of {}", ENABLED_STR, isEnabled);
			}
		}
		log.info("QoE-driven Adjustment {}", isEnabled ? "enabled" : "disabled");

	}

	@Override
	public void startUp(FloodlightModuleContext context) throws FloodlightModuleException {
		if(isEnabled){
			super.startUp();
			new Thread(new ComplainCollector(unsatClient)).start();
			threadPoolService.getScheduledExecutor().scheduleAtFixedRate(new Adjustment(),10,5, TimeUnit.SECONDS);
//            threadPoolService.getScheduledExecutor().scheduleAtFixedRate(new DumpStatistics(),10,5, TimeUnit.SECONDS);

		}

	}

    private class DumpStatistics implements Runnable{

        @Override
        public void run() {
            Map<NodePortTuple, SwitchPortBandwidth> map = statisticsService.getBandwidthConsumption();
            Map<NodePortTuple,InterfaceStatistics> map2 = sflowCollectionService.getStatisticsMap();

            System.out.println("dump statistics collected by SflowCollecter");
            for(Map.Entry<NodePortTuple, InterfaceStatistics> entry : map2.entrySet())
                System.out.println(entry.getKey() + " : " + entry.getValue().getIfOutOctets()*8);

        }
    }

    public static volatile int tag = 0;

    private class Adjustment implements Runnable{
        @Override
        public void run() {
            Map<NodePortTuple,InterfaceStatistics> map = sflowCollectionService.getStatisticsMap();

            System.out.println("dump statistics collected by SflowCollecter");
            for(Map.Entry<NodePortTuple, InterfaceStatistics> entry : map.entrySet())
                System.out.println(entry.getKey() + " : " + entry.getValue().getIfOutOctets()*8);

            if(unsatClient.isEmpty())
                return;

            System.err.println("adjust");

            Map<DatapathId, Set<Link>> dpidToLinks = topologyService.getAllLinks();
            int n = dpidToLinks.keySet().size();
            if(n == 0){
                log.info("empty topo ---- unreliable topology module");
                return;
            }

            Set<Link> links = new HashSet<>();
            for(Set<Link> set : dpidToLinks.values())
                links.addAll(set);

            Map<NodePortTuple,InterfaceStatistics> statisticsMap = sflowCollectionService.getStatisticsMap();
//            Map<NodePortTuple, SwitchPortBandwidth> statisticsMap = statisticsService.getBandwidthConsumption();

            if(statisticsMap == null || statisticsMap.size() == 0)
                System.err.println("SflowCollector/StatisticsCollector doesn't open");

            Map<Link, Integer> linkIdle = new HashMap<>();  //链路剩余带宽
            Map<Link, Integer> linkBg = new HashMap<>();    //背景流占用的带宽(限速的上限)
            Map<Link, Integer> linkConsume = new HashMap<>(); //链路已占用带宽

            for(Link link : links){
                NodePortTuple npt = new NodePortTuple(link.getSrc(),link.getSrcPort());
                int outRate = 0;
                if(statisticsMap.containsKey(npt)){
//                    outRate = (int)statisticsMap.get(npt).getBitsPerSecondTx().getValue();
                    outRate = (int)statisticsMap.get(npt).getIfOutOctets().doubleValue() * 8 ;
//                    System.out.println(link + " --- " + outRate);
                    linkConsume.put(link, outRate);
                }

                linkIdle.put(link, CAPACITY - outRate);

                int cnt = flowRegistry.getNumOfVip(link);

                if(cnt > 1 || cnt < 0){
                    System.err.println(tag + "_cnt = " + cnt);
                    System.err.println(link);
                    Set<U64> ckis= flowRegistry.linkToFlow.get(link)[0];
                    for(U64 cki : ckis)
                        System.err.println(cki + " ---- " + flowRegistry.flowMatch.get(cki));
                    System.err.println();

                }

                linkBg.put(link, outRate - VIDEO_BANDWIDTH * cnt);
            }

            int flowSrc = (int)serverAp.getLong();

            List<Integer> flowDst = new ArrayList<>();

            for(IPv4Address ip : unsatClient){
                System.out.println("complain from " + ip);
                U64 cookie = flowRegistry.getCookie(ip);
                if(cookie == null){
                    System.err.println("can't get client cookie");
                    return;
                }

                int dst = flowRegistry.getClientAp(cookie);
                if(dst == -1){
                    System.err.println("can't locate client.");
                    return;
                }
                else
                    flowDst.add(dst);
            }

            System.err.println(flowSrc + " -> " + flowDst);

            int threshold = 0;
            List<List<Link>> flowPath = new ArrayList<>();
            Map<Link, Integer> linkLimit = new HashMap<>();
            boolean success = MaxFlowSolver.rearrangeFlow(links, n, linkIdle, linkBg, flowSrc, flowDst, VIDEO_BANDWIDTH, threshold, flowPath, linkLimit);

            for(Link link : linkIdle.keySet()){
                System.err.print(tag + "_(");
                System.err.print(link.getSrc().getLong() + ", " + link.getSrcPort() + ") - "
                        + "(" + link.getDst().getLong() + ", " + link.getDstPort() + ") "
                        + ", idle = " + linkIdle.get(link) + ", consume = " + linkConsume.get(link)  + ", bg = " + linkBg.get(link) + "\n");
            }

            System.err.println(tag + "_" + success);
            System.err.println(tag + "_flowPath: " + flowPath);
            System.err.println(tag++ + "_linkLimit: " + linkLimit);

            if(flowPath.size() == 0){
                System.err.println("no available path");
                return;
            }

            int i = 0;
            for(IPv4Address ip : unsatClient){
                U64 cookie = flowRegistry.getCookie(ip);
                List<NodePortTuple> oldPath = flowRegistry.getOldPath(cookie);

                NodePortTuple first = oldPath.get(0), last = oldPath.get(oldPath.size()-1);

                List<Link> linkList = flowPath.get(i++);
                if(linkList.size()==0){
                    System.err.println("infeasible ---- " + ip);
                    continue;
                }

                List<NodePortTuple> nptList = new ArrayList<>();
                nptList.add(first);
                if(linkList.size() > 0){
                    Link link = linkList.get(0);
                    nptList.add(new NodePortTuple(link.getSrc(),link.getSrcPort()));
                }

                for(int j = 0; j < linkList.size(); j++){
                    Link link = linkList.get(j);
                    nptList.add(new NodePortTuple(link.getDst(), link.getDstPort()));
                }

                nptList.add(last);

                PathId pathId = new PathId(first.getNodeId(),last.getNodeId());
                Path path = new Path(pathId, nptList);

                boolean[] flag = new boolean[2];
                flag[0] = true;
                flag[1] = true;

//                long user_fields = flowRegistry.generateFlowId(log);
//                U64 cookie = AppCookie.makeCookie(QDA_APP_ID, user_fields);

                boolean routePushed = pushRoute(path, flowRegistry.getMatch(cookie), null, null, cookie, flag  , OFFlowModCommand.ADD);

                if(routePushed) removeFlow(oldPath, cookie);

                flowRegistry.update(cookie, oldPath, linkList, path);

            }

            for(Map.Entry<Link, Integer> entry : linkLimit.entrySet()){
//                pushFlowMod(entry.getKey(), 1000000);
                if(entry.getValue() != 0) {
                    pushFlowMod(entry.getKey(), entry.getValue());
                    System.out.println(entry.getKey() + " limited to " + entry.getValue());

                }
            }
            unsatClient.clear();
            System.err.println("done");
        }

        private void pushFlowMod(Link l, Integer limit){
            Set<Match> matches = flowRegistry.getBgMatch(l);

            long queueId = getCorrespondingQueueId(l, limit);
            IOFSwitch sw = switchService.getSwitch(l.getSrc());
            OFFactory myfactory = sw.getOFFactory();
            OFFlowMod.Builder fmb = myfactory.buildFlowAdd();
            OFFlowMod.Builder rmt = myfactory.buildFlowDelete();

            ArrayList<OFAction> actions = new ArrayList<OFAction>();

            /* For OpenFlow 1.0 */
            if (myfactory.getVersion().compareTo(OFVersion.OF_10) == 0) {
                OFActionEnqueue enqueue = myfactory.actions().buildEnqueue()
                        .setPort(l.getSrcPort()) /* Must specify port number */
                        .setQueueId(queueId)
                        .build();
                actions.add(enqueue);
            } else { /* For OpenFlow 1.1+ */
                OFActionSetQueue setQueue = myfactory.actions().buildSetQueue()
                        .setQueueId(queueId)
                        .build();
                actions.add(setQueue);
            }

            System.err.println("1");
            for(Match match : matches){
                //删除相应Match的流表(通过match得到的TableId匹配)

                System.err.println("1.1");
                System.err.println(match);
                if(match == null) System.err.println("match == null");
                sw.write(rmt.setTableId(getMatchTableId(match)).build());
                System.err.println("2");
                //下发相应Match的流表
                sw.write(fmb.setBufferId(OFBufferId.NO_BUFFER)
                        .setActions(actions)
                        .setIdleTimeout(30)
                        .setHardTimeout(30)
                        .setMatch(match)
                        .setTableId(getMatchTableId(match))
                        .setOutPort(l.getSrcPort())
                        .setPriority(32676).build());
            }
            System.err.println("3");

        }

        private TableId getMatchTableId(Match m){
            //table id max 255
            IPv4Address srcIp = m.get(MatchField.IPV4_SRC);
            IPv4Address dstIp = m.get(MatchField.IPV4_DST);
            TransportPort dstPort =  m.get(MatchField.TCP_DST);
            TransportPort srcPort = m.get(MatchField.TCP_SRC);
            int big = 314159;
            int hash = Math.abs(srcIp.getInt()) % big + Math.abs(dstIp.getInt()) % big +
                    ((dstPort == null) ? 97 : dstPort.getPort())
                    + ((srcPort == null) ? 31 : srcPort.getPort());
            int tmp = hash % 256;
            System.err.println(tmp);
            return TableId.of(tmp);
        }

        /*
        of10 queueid是与端口号有关的,每个端口都可以有自己的端口号
        of13 queueid是全局唯一的,所以setQueue操作只需要制定端口号
         = ofportNum * interval + bps2Id
         */
        private long getCorrespondingQueueId(Link l, Integer limit){
            OFPort opt = l.getSrcPort();
            final int INTERVAL = 40;
            int bps2Id = (limit % 1000000 == 0) ? (limit / 1000000) : (limit / 1000000 + 1);
            int ans = opt.getPortNumber() * INTERVAL + bps2Id;
            return ans;
        }
    }

}


The Bed & Breakfast Venice Santo Stefano enjoys an excellent position in the heart of the city, between Rialto Bridge, Accademia Bridge and st. Mark's Square, in the San Marco Sestriere. It is one of the most prestigious districts of Venice, half way the Palazzo Grassi Museum and the fabulous Accademia Gallery that preserves masterpieces by Venetian artists from 14th century until 18th century.
In a few minutes' walk you will reach the marvellous Campo Morosini/Santo Stefano, hosting traditional markets, the famous Saint Mark's with the homonym Basilica, the Palazzo Ducale and less known campi and calli preserving a wealth of masterpieces.


text:
Q: performing mathematical functions across a data_frame I have the following df. I would like to group by ID and do Fy=(Fyb+Fya)/2 for every column that ends with charts. If any of the two values is NA, an NA output would do.
DATA
df <- structure(list(ID = c("51-07519", "51-07519", "51-07522", "51-07522",
"51-07525", "51-07525"), name = c("Fya", "Fyb", "Fya", "Fyb",
"Fya", "Fyb"), serology_charts = c("0", "0", "0", "0", NA, NA
), antibodies_charts = c(NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_), bioarray_charts = c(NA,
NA, "0", "0", NA, NA), others_charts = c(NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_)), row.names = c(NA,
-6L), class = c("tbl_df", "tbl", "data.frame"))

  ID       name  serology_charts antibodies_charts bioarray_charts others_charts
  <chr>    <chr> <chr>           <chr>             <chr>           <chr>
1 51-07519 Fya   0               NA                NA              NA
2 51-07519 Fyb   0               NA                NA              NA
3 51-07522 Fya   0               NA                0               NA
4 51-07522 Fyb   0               NA                0               NA
5 51-07525 Fya   NA              NA                NA              NA
6 51-07525 Fyb   NA              NA                NA              NA

DESIRED OUTPUT

   ID       name  serology_charts antibodies_charts bioarray_charts others_charts
  <chr>    <chr> <chr>           <chr>             <chr>           <chr>
1 51-07519 Fy   0               NA                NA              NA
2 51-07522 Fy   0               NA                0               NA
3 51-07525 Fy   NA              NA                NA              NA

A: We can first convert the column types with type.convert, then do a group_by summarise_at (and if needed convert the columns back to character - not clear why the columns are character)
library(dplyr)
df %>%
   type.convert(as.is = TRUE) %>%
   group_by(ID) %>%
   summarise_at(vars(ends_with('charts')),
         ~ if(any(is.na(.))) NA_real_ else sum(., na.rm = TRUE)) %>%
   mutate(name = 'Fy') %>%
   mutate_at(vars(ends_with('charts')), as.character) %>%
   select(names(df))
# A tibble: 3 x 6
#  ID       name  serology_charts antibodies_charts bioarray_charts others_charts
#  <chr>    <chr> <chr>           <chr>             <chr>           <chr>
#1 51-07519 Fy    0               <NA>              <NA>            <NA>
#2 51-07522 Fy    0               <NA>              0               <NA>
#3 51-07525 Fy    <NA>            <NA>              <NA>            <NA>

If we need to pass a different function based on the value in 'name'
df %>%
    type.convert(as.is = TRUE) %>%
    group_by(ID) %>%
     summarise_at(vars(ends_with('charts')),
         ~ if(any(is.na(.))) NA_real_ else
            (.[name == "Fyb"]+1)*(.[name == "Fya"])/2)

redpajama_set_name: RedPajamaStackExchange


text:
La Copa do Nordeste 2017 fue la decimocuarta (14º) edición del torneo que reúne equipos de la región nordeste del país. Al igual que la Copa Verde, es un torneo organizado por la Confederación Brasileña de Fútbol y, debido a la modificación de los criterios de clasificación para torneos internacionales, no asegura un cupo a la Copa Sudamericana pero el campeón entrará directamente a los octavos de final de la Copa de Brasil.

Para esta edición, y manteniendo la regla del año anterior, se le dieron dos cupos a equipos de los estados Maranhão y Piauí, los cuales clasificaron a partir de los campeonatos estatales, respectivamente.

Sistema de juego

Los 20 equipos se dividen en 5 grupos de 4 equipos cada uno. Los equipos juegan partidos de ida y vuelta entre ellos, llegando a seis partidos como máximo en esta primera fase.

Los primeros mejores equipos de cada grupo clasificarán directamente a cuartos de final mientras que los tres mejores segundos también clasificarán a la segunda fase.

Luego, se ubican dos equipos y se juegan partidos de ida y vuelta para llegar a la semifinal. Los dos equipos ganadores de las semifinales clasificarán a la final para definir al campeón del torneo.

Criterios de desempate

En caso de que haya equipos empatados en puntos en la tabla de mejores segundos, los criterios de desempate son:

 Mayor número de partidos ganados.
 Mejor diferencia de gol.
 Mayor número de goles a favor.
 Sorteo.

En caso de que haya equipos empatados en puntos en la tabla de cada grupo, los criterios de desempate son:

 Mayor número de partidos ganados.
 Mejor diferencia de gol.
 Mayor número de goles a favor.
 Resultado del partido jugado entre los equipos.
 Menor número de tarjetas rojas recibidas.
 Menor número de tarjetas amarillas recibidas.
 Sorteo.

Equipos participantes

La distribución de los cupos es:

  Bahía: 3 cupos.
  Pernambuco: 3 cupos.
  Alagoas: 2 cupos.
  Ceará: 2 cupos.
  Maranhão: 2 cupos.
  Paraíba: 2 cupos.
  Piauí: 2 cupos.
  Río Grande del Norte: 2 cupos.
  Sergipe: 2 cupos.

De esta manera, los equipos clasificados son:

Fase de grupos

 Los grupos fueron definidos en sorteo previo el 4 de octubre de 2016.

 La hora de cada encuentro corresponde al huso horario que rige a Brasil (UTC-4 en Amazonas, Mato Grosso, Mato Grosso del Sur, Rondonia y Roraima; UTC-3 en Brasilia, regiones sur, sudeste y nordeste; UTC-2 en algunas islas ubicadas en Pernambuco, Río Grande del Norte, etc.).

 Toda la organización de los juegos se encuentra en la página de la CBF.

Grupo A

Grupo B

Grupo C

Grupo D

Grupo E

Tabla de mejores segundos

Fase final

En esta fase, los 8 clasificados de la fase de grupos se enfrentan entre ellos en partidos de ida y vuelta para definir el clasificado a la siguiente fase. Se juegan cuartos de final, semifinales y final.

 Nota: En cada llave, el equipo ubicado en la primera línea es el que ejerce la localía en el partido de vuelta.

Final

Véase también
 Campeonato Brasileño de Fútbol Serie A 2017
 Campeonato Brasileño de Fútbol Serie B 2017
 Campeonato Brasileño de Fútbol Serie C 2017
 Campeonato Brasileño de Fútbol Serie D 2017
 Copa de Brasil 2017
 Copa Verde 2017

Referencias

2017
Fútbol en 2017
Deporte en Brasil en 2017

redpajama_set_name: RedPajamaWikipedia


text:
TØNSBERG, MHI's Massive RO/RO Vessel, Awarded "Ship of the Year 2011":High Transport Efficiency and Environmental Compatibility Recognized
TØNSBERG, MHI's Massive RO/RO Vessel, Awarded "Ship of the Year 2011":
High Transport Efficiency and Environmental Compatibility Recognized
Tokyo, June 12, 2012 - TØNSBERG, the world's largest roll-on/roll-off (RO/RO) ship*, built by Mitsubishi Heavy Industries, Ltd. (MHI), has been awarded the "Ship of the Year 2011" by the Japan Society of Naval Architects and Ocean Engineers (JASNAOE). Every year JASNAOE selects what it considers to be the most technologically, artistically and socially superior ships and marine structures built that year, and the TØNSBERG was chosen for its highly evaluated transport efficiency and environmental compatibility. The award ceremony is slated to take place on July 25.
The TØNSBERG is the first in a series of four ships ordered by the Wilh. Wilhelmsen group and Wallenius group: the former a Norway-based group of maritime industrial firms having global scope, and the latter a Swedish shipping group. The ship was completed in March 2011 at MHI's Nagasaki Shipyard & Machinery Works and delivered to the Wilh. Wilhelmsen group. The 74,622 gross tonnage ship measures 265 meters (m) in length overall (LOA), 32.26m in breadth and 33.22m in height (ship bottom to upper deck).
The TØNSBERG features capability to transport high and heavy (H&H) cargo such as large-size construction machinery and machine tools, plant components, railway cars and pleasure boats. To enable flexible loading of such cargo, three of the ship's nine decks are electrically hoistable. To reduce environmental burdens and save energy, the ship is equipped with a ballast water treatment system, waste heat recovery system, electronically controlled engine, etc.
The Ship of the Year awards were established in 1990, hosted by JASNAOE and sponsored by the Japanese Ministry of Land, Infrastructure, Transport and Tourism, to promote construction of superior ships and marine structures and induce greater sea-mindedness among the general public. Award contenders apply in one of six categories: large passenger ships; small passenger ships; large cargo ships; small cargo ships; fishing and work vessels; and special vessels, marine structures and marine equipment. Earlier, MHI received JASNAOE's first "Ship of the Year" for the CRYSTAL HARMONY (present name: ASUKA II), the cruise ship built in 1990. The award given to the TØNSBERG marks the 6th won by MHI from JASNAOE.
Taking renewed encouragement from this latest award, MHI will now make further efforts in the development and construction of high value-added vessels demonstrating strong international competitiveness in many aspects, including energy savings and environmental compatibility. At the same time, the company will also expand its shipbuilding and ocean development activities by strengthening its engineering business in providing related technologies to other companies in Japan and other countries.
*Note: A roll-on/roll-off ship is a vessel designed to carry wheeled cargo such as automobiles, truck trailers, etc. that permits direct driving of such vehicles on and off the ship on their own wheels. This feature enables swift loading of such cargo even at ports not equipped with cranes and other conventional hoisting devices. RO/RO ships today constitute the mainstream of Japan's cargo transport fleet.
RO/RO ships
MHI Graph No.167
Mitsubishi Heavy Industries (MHI) Group is one of the world's leading industrial groups, spanning energy, smart infrastructure, industrial machinery, aerospace and defense. MHI Group combines cutting-edge technology with deep experience to deliver innovative, integrated solutions that help to realize a carbon neutral world, improve the quality of life and ensure a safer world. For more information, please visit www.mhi.com or follow our insights and stories on spectra.mhi.com.

redpajama_set_name: RedPajamaCommonCrawl


Many potential sellers ask me if they should list their home in the winter or wait until the spring. There are many things to consider such as the location of the home, inventory and demand and whether the home is occupied during the winter. If not, who is removing snow and preparing the home for showings?
You might think that it would be harder to sell your home in the winter than summer, but there are several real advantages to putting your home on the market in the cooler months.
There are fewer homes on the market in winter – therefore less competition – and the buyers who are looking in the winter months are often motivated to purchase. The summer selling season can sometimes be frenzied, and in the winter sellers can take a little more time to consider offers.
Not to worry, the reasons that lead people to make a new home purchase, such as a new job, a growing family and downsizing, happen all year round.
If you are a seller who wants to take advantage of the decreased competition in winter months but don't want to move during the winter, there may be the option of a post-closing rental agreement, where the seller can lease back the home until the spring thaw. However a purchaser must check with his or her lender, if the home loan interest rate is based on a primary residence, there is a time limit on a post-occupancy agreement.
Exterior landscape is a bit of a challenge, and first impressions are so important. Cutting back shrubs, trimming trees and raking up leaves will keep a tidy presentation.
Make sure walkways are cleared and ice-free before every showing. Although the holiday season can be a hectic time to show and sell your house, there are distinct advantages to staging and showing your home at this time of year; you have a chance to show your home at its very best adorned with warmth and cheer.
A few exterior holiday lights or decorations show pride in ownership and seasonal spirit, but don't overdo it. Find a tasteful balance.
Inside the home, protect your floors by putting down a mat for snowy boots or buy some shoe covers from the hardware store. If you have a fireplace you may want to have it on. Make sure your thermometer is set at a comfortable temperature and if it is winterized, put notes in the bathrooms stating so.
According to the multiple listings data, during winter 2013-'14, December through February, La Plata County recorded 135 residential sales with the median days on market of 117.
In spring 2014, from March to May, there were 256 closings with 102 median days on market (which were most likely put under contract during the winter months).
La Plata County had 1,040 residential closed postings in Multiple Listing Service year to date, so that would be about 25 percent of the homes sold for the year closed post winter.


text:
Log Cabin Condemns Texas Court Ruling Against Church
District Court Ruling Against Gay Parent is "Appalling and Unconstitutional"
(WASHINGTON, DC) – The nation's largest gay Republican organization condemned a ruling by a Texas district court which declared a predominantly gay Christian denomination, the Metropolitan Community Church, is not an acceptable church for a child to attend services and Sunday school. The ruling came in the midst of a custody decision as part of a divorce between a lesbian mother and her husband.
In his opinion, Judge Keith Nelson of the 78th Judicial District of Texas wrote: "The primary issue is where the child would attend Sunday school and church... the intent was for mainline churches to be utilized in the religious training of the daughter. This would include the Catholic Church, and church in the Protestant faith such as Presbyterian, Methodist, Baptist, Christian, Episcopalian, which are considered to be the standard religious institutions in the Protestant field. The Metropolitan Community Church does not fall within this category."
"This ruling is an appaling and unconstitutional overreach of the government, and a clear violation of the separation of church and state," said Rich Tafel, executive director of Log Cabin Republicans. "Clearly, the far right's obsession with attacking gay people continues to produce incidents like this across the country. It is another example of how the far right has a big government agenda of their own, despite their claims of being supporters of limited government. This state-sanctioned attack on the MCC must be reversed, and all people of faith should join together in demanding that it be overturned. If it is allowed to stand, who will be next?"
"It is time for anti-gay organizations like the Christian Coalition, the Family Research Council and the Traditional Values Coalition, all of whom have claimed that they are only concerned with religious freedom, to immediately join in condemning this ruling and demanding it be reversed," Tafel said. "If they don't join in defending the MCC, then they can't avoid the charge of blatant hypocrisy."


I'm on the ferry and can make preliminary status. It was another wonderful morning. After Western Jutland conditions, we may call it quiet. A light breeze from the north. We sit outside in the garden and enjoy the sun and the breakfast. Yet another "hotel overnight". Just a lot better than a real hotel. Where the part through Denmark really was just something to get over with, I now feel that I really made profit of it. It was also nice to have the camping equipment tested.
At 8.35 am - 5 min after the schedule, I roll down the gravel road heading towards Brugsen in Tornby, where I will shop for the ferry ride. Almost 2 days at sea, and I have two lunches included. So I buy at least 2 meals.
In a roundabout there are two roads that lead to the harbor, I ask an elderly man if he is local. He is considering it, apparently, but finds out that he is. But where the ferry to Iceland is, he can not say. "They're always changing things!" Yes, thank you, I know that. The future have apparently also come to Hirtshals.
We agree that it's probably the road to the right I shall choose, and further on it finally says "Smyril Line" with an arrow, and a trip around a couple of miles before I can overtake the cars on the inside - even until check-in. Cyclists have at least SOME advantages.
There are two other cyclists - an older German couple - besides me. And then a lot of motorcycles. It recalls the ferry to Hokkaido in Japan. There you were no real motorcyclist before you had been driving up the north island. It now seems to be the same in Europe.
I assume that all of us up on deck 4 are going all the way to Iceland and that they to the Faroe Islands are down on deck 3. I tried the small gears on my way up the ramp. I have arrived early, because the ferry is working on Faroese time, so we won't sail until 12.30 and not 11.30.
Of the hundreds of cars involved, there were everything from ordinary Toyotas to expedition cars I have never seen before.
Here in the afternoon - far out on the ocean - my phone suddenly give a sound. In the middle of the ocean? It turns out to be Norway. I can start using it without extra costs, my phone company tells me. And as I get up on the top deck where you can get outside, I really see Norway's coastline in the distance.
I think I'm in control of everything I need to know. My couchette is on deck 2, which is deep down. Judged from the number of sleeping bags, we are only 3 or 4 out of the 9 berths.
On the lowest deck there is pool and gym. The pool is approx. 6 x 4 m, so it is mostly for children. I have not seen the gym. I have had ample exercise in the last 3 days. On deck 5 is "The Diner" where I have to eat the 2 meals I have bought in advance. The first lunch I have eaten - it was not exciting. On top - deck 7 and 8 - You can go outside. All the way up the front, it blows violently. I could not keep the camera still when I tried to take a photo of the coast with my strongest zoom.
I have not got the camera cord up from the car deck so you must wait for that photo.


text:
ArtistesNouvellesExpositionsÀ proposContactEnFr
ArtistesNouvellesExpositionsÀ proposContact
Catherine Ikam
Catherine Ikam "Jeanne", 2018
Since 1980 Catherine Ikam has been working on the concept of identity in the electronic age, and in particular on the themes of identity and appearance, the living and the artificial, the Human and the model. She is one of the pioneering Européan artists in the field of new technologies. In 1980 she created for the Museum National d'Art Moderne, Centre Georges Pompidou (Paris ) installation on the theme of identity-based on various problematic instances of self-representation: in Fragments of an Archetype and Identité III she introduces fragmentation in video installations (cf Nam June Paik, Videocryptography).
Catherine Ikam has been a Research Fellow at the Massachusett's Institute of Technology, author and producer of tv programs for the French public Television, co-author of Valis, a video opera produced by the IRCAM and the Museum d'Art Moderne for the 10th Anniversary of the Centre Georges Pompidou in 2000. She was awarded the Arcimboldo prize for digital art and her work is widely shown both in France and abroad. She was the guest artist at the Banff Centre for the Arts (Canada) and taught at the French Studio National des Arts Contemporains (Le Fresnoy), where she produced "Digital Diaries".
Galerie LeRoyer | info@galerieleroyer.com | 514.287.1351


text:
HOC 2020: 14 properties to look out for in Klang Valley
Stephanie Yap
The HOC 2020 campaign is ending soon on the 31st of Dec 2021. Before it leaves the market for good, let's take a look at some of the most desirable HOC projects that are available in Klang Valley.
© ferli | 123rf
The global pandemic has distorted life as we know it. Things that we used to be able to do out in the open are now prohibited and dreams that we used to have would have to be shelved, at least until the Covid-19 virus is eradicated for good. And one of the dreams that all Malaysians have is to own property.
Thanks to the outbreak, many people are now putting this dream on hold due to financial reasons. In fact, according to a report done by iProperty.com.my H1 2020 Portal Demand Analytics, we see a -2.5% dip in H1 2020. This has since improved further to -1.3% by the end of 2020.
What is the meaning of HOC?
To help stimulate the real estate market, Prime Minister Tan Sri Muhyiddin Yassin announced that the government will bring back the highly raved upon Home Ownership Campaign (HOC). The campaign originally ended in December 2019. THE HOC 2020 campaign is parked under the economic recovery plan (PENJANA) and will now end on the 31st of December, 2021.
The HOC is a joint initiative by the Ministry of Housing and Local Government (KPKT) and the Real Estate and Housing Developers' Association (REHDA) Malaysia to help first-time homebuyers in Malaysia to buy a house, while at the same time stimulate the sale of unsold properties in the country.
SEE WHAT OTHERS ARE READING:
🤔 Want to learn more about stamp duty calculation in Malaysia? Click here to find out
🏠 Here's your complete guide to buying a house in Malaysia.
Here are some of the HOC campaign Malaysia benefits homeowners can enjoy:
Full stamp duty exemption on the Memorandum of Transfer (MOT) and Sale and Purchase Agreement (SPA) for houses between RM300,001 and RM1million.
10% discount on property price.
The stamp duty exemptions are applicable for the purchase of residential unit/s for Sale & Purchase Agreements executed between 1 June 2020 to 31 December 2021.
What are the requirements to apply for the Home Ownership Campaign 2020?
Buyers must be Malaysian citizens.
The property must be for residential use only and cannot be converted for commercial activities.
HOC 2020 projects in Klang Valley
Thanks to HOC Malaysia, homebuyers can finally realise their dream of owning a home without costing an arm and a leg. Here is the list of HOC 2020 projects registered under RDHA Malaysia that are available in Klang Valley.
Allevia Mont'Kiara – Mont Kiara
© UEM
Allevia Mont'Kiara by UEM Sunrise is a low-density condominium with only 4 units per floor. To promote spacious living, the built-up size from each unit ranges from 1,703 sq ft to 2,634 sq ft with 4 to 6 bedrooms. On top of that, residents can also enjoy top-notch facilities like a private lounge, a rooftop gym and a sky-cycling studio. This high-rise residential condo is located in the affluent Mont Kiara neighbourhood and is within walking distance to Mont Kiara CBD and international schools.
Developer: UEM
Built-up: 1703 sq ft – 2634 sq ft
Year of completion: 2021
Cerrado Suites – Bangi
© Mah Sing Group
Located in the township of Southville City, the serviced residence at Cerrado boasts convenience, comfort and luxury living in the suburb. Comprising two towers with a total of 813 units, Cerrado offers five different layouts, measuring from 656 sq ft to 825 sq ft to cater to a variety of demands. On top of that, each unit comes partially furnished so its residents can save cost on renovation. Aimed to bring the suburban lifestyle to its residents, Cerrado is equipped with top-notch facilities like an Olympic-length pool, an aqua gym and an oasis garden.
Developer: Mah Sing Group
Type: Serviced Residence
Built-up: 656 sq ft to 825 sq ft
d'Brightton – Titiwangsa
© GSD Land
Set on 7.66 acres of land, d'Brightton at Titiwangsa is a low-density condominium (only 766 units available) with a built-up size ranging from 1,044 sq ft to 2,400 sq ft. There are over 49 facilities spanning across six levels, including an Olympic-size pool, aqua yoga facilities, urban camping facilities, an outdoor fitness area, a co-working space and more. In addition to that, the condo is also centrally located – only 3km away from KLCC.
Developer: GSD Land
Built-up: 1,044 sq ft to 2,400 sq ft
Hampton Residences – Bandar Seri Coalfields, Sungai Buloh
© KLK Land
Hampton Residence is a residential enclave in Bandar Seri Coalfields and it comprises a total of 497 units of superlink, semi-D and bungalow homes in the award-winning township. Each freehold unit is built on an elevated ground and have a big land size ranging from 2,215 sq ft to 3,299 sq ft. Safety here will also not be an issue as it is a guarded community. Additionally, Hampton Residence is easily accessible via various road networks, connecting its residents to other neighbourhoods.
Developer: KLK Land
Type: Superlink, Semi-D and Bungalow
Built-up: 2,215 sq ft – 3,299 sq ft
Ixora 2 – Bandar Seri Coalfields, Sungai Buloh
A part of a 1,000-acre master plan township in Bandar Seri Coalfields, the double-storey terrace houses with a built-up size of 2,266 sq ft in Ixora 2 makes the perfect home for growing families. Surrounded by lush greenery, each unit comes with a practical yet comforting design to welcome its residents home after a long day. Some other key features include low density, guarded community and they're built next to a 50-acre Central Park.
Type: Terrace House
Built-up: 2,266 sq ft
Kita Mekar – Dengkil
Situated on the edge of the Greater Klang Valley, this up-and-coming development of Kita Mekar @ Cybersouth is sitted on 633 acres of Malay reserved land and will comprise of terrace houses, townhouses, apartments, shops and commercial lots when completed. Designed for family living, the Kota Mekar township has an array of facilities and amenities like an amphitheatre, a picnic area, a futsal court, a badminton court, a playground and more. Located near Cyberjaya and Putrajaya, residents here can also enjoy a host of amenities from both neighbourhoods.
Developer: LBS Bina Group
Type: Terrace house, townhouse and apartment
M Adora – Wangsa Maju
Nestled between Wangsa Maju and KL City Centre is a low-density condominium project that comes with easy access to DUKE Highway, MRR2 Highway and LRT stations. There is also a shuttle service provided for its residents to the Sri Rampai station. In terms of facilities, M Adora has a total of 35 exclusive features, such as a cantilevered, glass-walled gymnasium, an Olympic length horizon pool, a sky bridge, a multi-tier security system, an automated waste collection system and storage space.
Built-up: 850 sq ft to 1,200 sq ft
M Arisa – Sentul
Mah Sing Group's up-and-coming project, M Arisa is located right in the heart of Sentul. Aiming to bring the great outdoors in, the freehold serviced residence is designed to look like an urban forest with lots of green features in the building. What's more, there's even a multi-level sky garden at different levels of the building. The 55-level high tower also features 40 types of facilities, including a 50m-length swimming pool, a sunset deck, a co-working space, a meandering stream and more – most of these are located on the main facility podium, which is on level 10.
Built-up: 550 sq ft – 1,234 sq ft
M Oscar – Kuchai Lama
M Oscar at Kuchai Lama is a freehold serviced residence that is built 100m above sea level. There are over 35 facilities on the facility podium, which sits on the 7th floor. Some of the facilities available include a gourmet kitchen, a blooming garden, a tai chi path, a 50m Olympic length pool, a sunken sun lounger and a co-working space for those who are working from home. M Oscar's location is also one of the most sought-after features as it'll be located only 800m away from MRT2 and there will be a shutter service provided for its residents.
Quinn – Wangsa Maju
© MCL Land
Located right next to the Sri Rampai LRT station and just 6 stops from the Golden Triangle, Quinn's residents can also enjoy living in close proximity to Wangsa Walk Mall. There's even a covered link bridge that connects from the apartment suite to the shopping complex. The low-density residence features a total of 361 units with four different types of layouts, ranging from 1 to 4 bedrooms. There are three dedicated levels of facilities. Some of its key facilities include a private lobby lounge, pavilions, an infinity pool, a sky gym and co-working space.
Developer: MCL Land (Quinn) Sdn Bhd
Type: Apartment Suite
Topaz (Phase 4E) @ Taman Putra Prima – Puchong
© Plenitude Permai
Located at Taman Putra Prima Puchong, Topaz comprises 136 units of two to three-storey terrace houses across 9.84 acres of freehold land. Each unit is designed for spacious living with generously-sized bedrooms, a living hall, a dining area and an 11-foot ceiling. In terms of location, the township is located near three key geographical areas, namely Kota Kemuning, Bandar Puteri Puchong and Cyberjaya.
Developer: Plenitude Permai
Tropicana Gardens – Edelweiss, Tropicana Indah
© Tropicana Corporation Berhad
Located just a stone's throw away from Tropicana Gardens Mall, Edelweiss is part of Tropicana Gardens' mixed development that comprises serviced residences, a 5-level shopping mall, offices and direct MRT access all within a 17-acre of an integrated master plan. One amazing thing about living here is that Edelweiss allows its residents to be creative with its unit design as they can plan it however they like. Aside from that, residents can enjoy a wide range of facilities like a basketball half-court, a leisure pool, a yoga deck, a viewing terrace, a multi-purpose room and a jogging path. Not to mention, there's also a 200m walkway that connects Edelweiss to Tropicana Gardens Mall and the Surian MRT station.
Developer: Tropicana Corporation Berhad
Tuai Residence – Setia Alam
© Suntrack Development Sdn Bhd
Consisting of only 330 units, Tuai Residence is a low-density condominium that's sized from 1,109 sq ft to 1,927 sq ft, making it the perfect home for multi-generational living. Not just that, the freehold condo is also constructed to be child and elderly-friendly to enable accessibility to all ages, sizes and abilities. Some key features include ramps, minimum floor drop, 900mm clear doorways, wheelchair-friendly panels and lever-type door locksets.
Developer: Suntrack Development Sdn Bhd
Vista Sentul Residences – Sentul
© Platinum Victory
Vista Sentul Residences is a freehold suites apartment that's located in a prominent shopping location with easy access to the KTM, LRT, MRT and the Duta-Ulu Kelang Expressway. Residents of Vista Sentul Residences can also enjoy a whole host of communal facilities like the gym, a convenience store, an AV room, a game room, a yoga studio, a BBQ terrace, a swimming pool, a pool deck and an outdoor fitness area.
Developer: Platinum Victory
Type: Suites Apartment
TOP ARTICLES JUST FOR YOU:
🤔 Is it better to rent or to buy a house in Malaysia?
🚪 Find out the step-by-step process of applying for a home loan in Malaysia
👐 What is stamp duty in Malaysia. Check out our guide.
Get the latest property news, home solution tips, interior design ideas and property guides.
By subscribing, you consent to receive direct marketing from iProperty.com Malaysia Sdn Bhd (iProperty), its group of companies and partners. You also accept iProperty's Terms of Use and Privacy Policy including its collection, use, disclosure, processing, storage and handling of your personal information.
You're subscribed!
You will receive an email from us soon with some great tips and tricks to help you on your property journey.


Use our KALDEWEI Product Configurator to customise a bath, whirl bath or an enamelled shower surface to meet your own requirements and select from different sizes, models, colours and special features. Be it bath, shower or whirl bath - the Configurator takes you step by step to your custom bath or shower, with all the extras you need. Once your personal configuration is complete, you can print out or email the information on your customised KALDEWEI product. If you want to experience KALDEWEI products live, check here for bathroom showrooms near you.


text:
Q: Sonarqube-7.9.1 HeapDumpOnOutOfMemoryError I installed sonarqube-7.9.1 on my Ubuntu 18.04 machine. JAVA 11 is installed and Mysql used as database.
Some important rows from sonar.properties are as follows
sonar.web.javaOpts=-Xmx1024m -Xms1024m -XX:+HeapDumpOnOutOfMemoryError
sonar.web.host=127.0.0.1
sonar.ce.javaOpts=-Xmx1024m -Xms1024m -XX:+HeapDumpOnOutOfMemoryError

Sonarqube log file shows following lines
Launching a JVM...
Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
  Copyright 1999-2006 Tanuki Software, Inc.  All Rights Reserved.

2019.10.17 12:36:49 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/sonarqube-7.9.1/temp
2019.10.17 12:36:49 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
2019.10.17 12:36:49 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/opt/sonarqube/sonarqube-7.9.1/elasticsearch]: /opt/sonarqube/sonarqube-7.9.1/elasticsearch/bin/elasticsearch
2019.10.17 12:36:49 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
2019.10.17 12:36:49 INFO  app[][o.e.p.PluginsService] no modules loaded
2019.10.17 12:36:49 INFO  app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
2019.10.17 12:37:01 INFO  app[][o.s.a.SchedulerImpl] Process[es] is up
2019.10.17 12:37:01 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[[key='web', ipcIndex=2, logFilenamePrefix=web]] from [/opt/sonarqube/sonarqube-7.9.1]: /usr/lib/jvm/java-11-openjdk-amd64/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/opt/sonarqube/sonarqube-7.9.1/temp --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED -Xmx1024m -Xms1024m -XX:+HeapDumpOnOutOfMemoryError -Dhttp.nonProxyHosts=localhost|127.*|[::1] -cp ./lib/common/*:/opt/sonarqube/sonarqube-7.9.1/lib/jdbc/mysql/mysql-connector-java-5.1.46.jar org.sonar.server.app.WebServer /opt/sonarqube/sonarqube-7.9.1/temp/sq-process4977560398960418438properties
2019.10.17 12:37:04 INFO  app[][o.s.a.SchedulerImpl] Process[web] is stopped
2019.10.17 12:37:05 WARN  app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 143
2019.10.17 12:37:05 INFO  app[][o.s.a.SchedulerImpl] Process[es] is stopped
2019.10.17 12:37:05 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped
<-- Wrapper Stopped

A: I was also getting the same issue of starting Sonarqube-7.9.1 with OpenJDK-11 because of the port conflicts. I tried changing port numbers and issue got resolved. Try replacing below lines in sonar.properties:
sonar.web.port=9004
sonar.search.port=9005
we can replace below lines also,already given in this question at the start [For me it worked without replacing below lines]:
sonar.web.javaOpts=-Xmx1024m -Xms1024m -XX:+HeapDumpOnOutOfMemoryError
sonar.ce.javaOpts=-Xmx1024m -Xms1024m -XX:+HeapDumpOnOutOfMemoryError

A: I believe SonarQube is not starting for any reason related to memory but rather from the fact that you attempt to connect to MySQL Database and this DB is not supported anymore (see "Release 7.9 LTS Upgrade Notes" at https://docs.sonarqube.org/latest/setup/upgrade-notes/).
Have a look at web.log (see "Checking the logs" at https://docs.sonarqube.org/latest/setup/troubleshooting/) to confirm it, you will find a clear message there.


text:
#include <linux/coresight.h>
#include <linux/coresight-pmu.h>
#include <linux/cpumask.h>
#include <linux/device.h>
#include <linux/list.h>
#include <linux/mm.h>
#include <linux/init.h>
#include <linux/perf_event.h>
#include <linux/slab.h>
#include <linux/types.h>
#include <linux/workqueue.h>

#include "coresight-priv.h"

static struct pmu etm_pmu;
static bool etm_perf_up;

/**
 * struct etm_event_data - Coresight specifics associated to an event
 * @work:		Handle to free allocated memory outside IRQ context.
 * @mask:		Hold the CPU(s) this event was set for.
 * @snk_config:		The sink configuration.
 * @path:		An array of path, each slot for one CPU.
 */
struct etm_event_data {
	struct work_struct work;
	cpumask_t mask;
	void *snk_config;
	struct list_head **path;
};

static DEFINE_PER_CPU(struct perf_output_handle, ctx_handle);
static DEFINE_PER_CPU(struct coresight_device *, csdev_src);

/* ETMv3.5/PTM's ETMCR is 'config' */
PMU_FORMAT_ATTR(cycacc,		"config:" __stringify(ETM_OPT_CYCACC));
PMU_FORMAT_ATTR(timestamp,	"config:" __stringify(ETM_OPT_TS));

static struct attribute *etm_config_formats_attr[] = {
	&format_attr_cycacc.attr,
	&format_attr_timestamp.attr,
	NULL,
};

static struct attribute_group etm_pmu_format_group = {
	.name   = "format",
	.attrs  = etm_config_formats_attr,
};

static const struct attribute_group *etm_pmu_attr_groups[] = {
	&etm_pmu_format_group,
	NULL,
};

static void etm_event_read(struct perf_event *event) {}

static int etm_event_init(struct perf_event *event)
{
	if (event->attr.type != etm_pmu.type)
		return -ENOENT;

	return 0;
}

static void free_event_data(struct work_struct *work)
{
	int cpu;
	cpumask_t *mask;
	struct etm_event_data *event_data;
	struct coresight_device *sink;

	event_data = container_of(work, struct etm_event_data, work);
	mask = &event_data->mask;
	/*
	 * First deal with the sink configuration.  See comment in
	 * etm_setup_aux() about why we take the first available path.
	 */
	if (event_data->snk_config) {
		cpu = cpumask_first(mask);
		sink = coresight_get_sink(event_data->path[cpu]);
		if (sink_ops(sink)->free_buffer)
			sink_ops(sink)->free_buffer(event_data->snk_config);
	}

	for_each_cpu(cpu, mask) {
		if (event_data->path[cpu])
			coresight_release_path(event_data->path[cpu]);
	}

	kfree(event_data->path);
	kfree(event_data);
}

static void *alloc_event_data(int cpu)
{
	int size;
	cpumask_t *mask;
	struct etm_event_data *event_data;

	/* First get memory for the session's data */
	event_data = kzalloc(sizeof(struct etm_event_data), GFP_KERNEL);
	if (!event_data)
		return NULL;

	/* Make sure nothing disappears under us */
	get_online_cpus();
	size = num_online_cpus();

	mask = &event_data->mask;
	if (cpu != -1)
		cpumask_set_cpu(cpu, mask);
	else
		cpumask_copy(mask, cpu_online_mask);
	put_online_cpus();

	/*
	 * Each CPU has a single path between source and destination.  As such
	 * allocate an array using CPU numbers as indexes.  That way a path
	 * for any CPU can easily be accessed at any given time.  We proceed
	 * the same way for sessions involving a single CPU.  The cost of
	 * unused memory when dealing with single CPU trace scenarios is small
	 * compared to the cost of searching through an optimized array.
	 */
	event_data->path = kcalloc(size,
				   sizeof(struct list_head *), GFP_KERNEL);
	if (!event_data->path) {
		kfree(event_data);
		return NULL;
	}

	return event_data;
}

static void etm_free_aux(void *data)
{
	struct etm_event_data *event_data = data;

	schedule_work(&event_data->work);
}

static void *etm_setup_aux(int event_cpu, void **pages,
			   int nr_pages, bool overwrite)
{
	int cpu;
	cpumask_t *mask;
	struct coresight_device *sink;
	struct etm_event_data *event_data = NULL;

	event_data = alloc_event_data(event_cpu);
	if (!event_data)
		return NULL;

	INIT_WORK(&event_data->work, free_event_data);

	mask = &event_data->mask;

	/* Setup the path for each CPU in a trace session */
	for_each_cpu(cpu, mask) {
		struct coresight_device *csdev;

		csdev = per_cpu(csdev_src, cpu);
		if (!csdev)
			goto err;

		/*
		 * Building a path doesn't enable it, it simply builds a
		 * list of devices from source to sink that can be
		 * referenced later when the path is actually needed.
		 */
		event_data->path[cpu] = coresight_build_path(csdev);
		if (!event_data->path[cpu])
			goto err;
	}

	/*
	 * In theory nothing prevent tracers in a trace session from being
	 * associated with different sinks, nor having a sink per tracer.  But
	 * until we have HW with this kind of topology and a way to convey
	 * sink assignement from the perf cmd line we need to assume tracers
	 * in a trace session are using the same sink.  Therefore pick the sink
	 * found at the end of the first available path.
	 */
	cpu = cpumask_first(mask);
	/* Grab the sink at the end of the path */
	sink = coresight_get_sink(event_data->path[cpu]);
	if (!sink)
		goto err;

	if (!sink_ops(sink)->alloc_buffer)
		goto err;

	/* Get the AUX specific data from the sink buffer */
	event_data->snk_config =
			sink_ops(sink)->alloc_buffer(sink, cpu, pages,
						     nr_pages, overwrite);
	if (!event_data->snk_config)
		goto err;

out:
	return event_data;

err:
	etm_free_aux(event_data);
	event_data = NULL;
	goto out;
}

static void etm_event_start(struct perf_event *event, int flags)
{
	int cpu = smp_processor_id();
	struct etm_event_data *event_data;
	struct perf_output_handle *handle = this_cpu_ptr(&ctx_handle);
	struct coresight_device *sink, *csdev = per_cpu(csdev_src, cpu);

	if (!csdev)
		goto fail;

	/*
	 * Deal with the ring buffer API and get a handle on the
	 * session's information.
	 */
	event_data = perf_aux_output_begin(handle, event);
	if (!event_data)
		goto fail;

	/* We need a sink, no need to continue without one */
	sink = coresight_get_sink(event_data->path[cpu]);
	if (WARN_ON_ONCE(!sink || !sink_ops(sink)->set_buffer))
		goto fail_end_stop;

	/* Configure the sink */
	if (sink_ops(sink)->set_buffer(sink, handle,
				       event_data->snk_config))
		goto fail_end_stop;

	/* Nothing will happen without a path */
	if (coresight_enable_path(event_data->path[cpu], CS_MODE_PERF))
		goto fail_end_stop;

	/* Tell the perf core the event is alive */
	event->hw.state = 0;

	/* Finally enable the tracer */
	if (source_ops(csdev)->enable(csdev, &event->attr, CS_MODE_PERF))
		goto fail_end_stop;

out:
	return;

fail_end_stop:
	perf_aux_output_end(handle, 0, true);
fail:
	event->hw.state = PERF_HES_STOPPED;
	goto out;
}

static void etm_event_stop(struct perf_event *event, int mode)
{
	bool lost;
	int cpu = smp_processor_id();
	unsigned long size;
	struct coresight_device *sink, *csdev = per_cpu(csdev_src, cpu);
	struct perf_output_handle *handle = this_cpu_ptr(&ctx_handle);
	struct etm_event_data *event_data = perf_get_aux(handle);

	if (event->hw.state == PERF_HES_STOPPED)
		return;

	if (!csdev)
		return;

	sink = coresight_get_sink(event_data->path[cpu]);
	if (!sink)
		return;

	/* stop tracer */
	source_ops(csdev)->disable(csdev);

	/* tell the core */
	event->hw.state = PERF_HES_STOPPED;

	if (mode & PERF_EF_UPDATE) {
		if (WARN_ON_ONCE(handle->event != event))
			return;

		/* update trace information */
		if (!sink_ops(sink)->update_buffer)
			return;

		sink_ops(sink)->update_buffer(sink, handle,
					      event_data->snk_config);

		if (!sink_ops(sink)->reset_buffer)
			return;

		size = sink_ops(sink)->reset_buffer(sink, handle,
						    event_data->snk_config,
						    &lost);

		perf_aux_output_end(handle, size, lost);
	}

	/* Disabling the path make its elements available to other sessions */
	coresight_disable_path(event_data->path[cpu]);
}

static int etm_event_add(struct perf_event *event, int mode)
{
	int ret = 0;
	struct hw_perf_event *hwc = &event->hw;

	if (mode & PERF_EF_START) {
		etm_event_start(event, 0);
		if (hwc->state & PERF_HES_STOPPED)
			ret = -EINVAL;
	} else {
		hwc->state = PERF_HES_STOPPED;
	}

	return ret;
}

static void etm_event_del(struct perf_event *event, int mode)
{
	etm_event_stop(event, PERF_EF_UPDATE);
}

int etm_perf_symlink(struct coresight_device *csdev, bool link)
{
	char entry[sizeof("cpu9999999")];
	int ret = 0, cpu = source_ops(csdev)->cpu_id(csdev);
	struct device *pmu_dev = etm_pmu.dev;
	struct device *cs_dev = &csdev->dev;

	sprintf(entry, "cpu%d", cpu);

	if (!etm_perf_up)
		return -EPROBE_DEFER;

	if (link) {
		ret = sysfs_create_link(&pmu_dev->kobj, &cs_dev->kobj, entry);
		if (ret)
			return ret;
		per_cpu(csdev_src, cpu) = csdev;
	} else {
		sysfs_remove_link(&pmu_dev->kobj, entry);
		per_cpu(csdev_src, cpu) = NULL;
	}

	return 0;
}

static int __init etm_perf_init(void)
{
	int ret;

	etm_pmu.capabilities	= PERF_PMU_CAP_EXCLUSIVE;

	etm_pmu.attr_groups	= etm_pmu_attr_groups;
	etm_pmu.task_ctx_nr	= perf_sw_context;
	etm_pmu.read		= etm_event_read;
	etm_pmu.event_init	= etm_event_init;
	etm_pmu.setup_aux	= etm_setup_aux;
	etm_pmu.free_aux	= etm_free_aux;
	etm_pmu.start		= etm_event_start;
	etm_pmu.stop		= etm_event_stop;
	etm_pmu.add		= etm_event_add;
	etm_pmu.del		= etm_event_del;

	ret = perf_pmu_register(&etm_pmu, CORESIGHT_ETM_PMU_NAME, -1);
	if (ret == 0)
		etm_perf_up = true;

	return ret;
}
device_initcall(etm_perf_init);

redpajama_set_name: RedPajamaGithub


A desiring person can download their MAT Exam Admit Card for both computers based and paper based examination from the given link: http://apps.aima.in/matadmitcard.aspx. The Admit card mention the candidate's name, form no, roll no, test date, test time and test venue address. In computerized test, claimant have to strictly follow the date and time allotted.
Note: Admit card will not be mailed to any person.
Download the result of MAT Exam and keep it for further rounds of admission procedure.
In the situation of misplacing of the score card, you can request a duplicate copy by sending a written request to AIMA.


We hope you can find what you need here. We always effort to show a picture with HD resolution or at least with perfect images. Merveilleux Ensemble Chambre A Coucher Complete Compl Te Contemporaine Ch Ne Clair Vanina Lignemeuble Com can be beneficial inspiration for those who seek an image according specific categories; you can find it in this site. Finally all pictures we have been displayed in this site will inspire you all..


Following the amendment to the Economic Competition Law, the Israeli Competition Authority, on February 3, 2019, published for a public hearing a draft guidance paper on how to determine the existence of significant market power.
On January 10, 2019, an amendment to the Economic Competition Law came into force dealing with the definition of a monopoly. According to the previous version of the Law, a corporation was considered a monopolist if it controlled more than half the supply or purchase of a product or service. According to the amendment, a monopolist will now also include anyone who has significant economic market power. In light of this amendment, the need arose to clarify how the Authority believes that the existence of significant market power should be determined.
The guidance paper gives a list of characteristics relevant to examining significant market power, including market share, the number and standing of competitors in the same sector, volatility of market share, the degree of differentiation between products in the sector, the importance of the product for retailers, and the existence of barriers to transfer for customers.


Tens of thousands of scam mobile phone calls are sweeping across Ireland in an "unprecedented" surge.
The calls, often with international prefixes such as +212, +231, +235 or +269, are designed to trick people into phoning back at premium rates.
While many of the calls come with prefixes from countries such as Liberia (+231) or the Comoros Islands (+269), some members of the public have reported calls using the Austrian prefix of +43.
People are advised to neither answer the call or ring back because it will cost them money.
The scam is known as a 'wangiri' call because the mobile phone typically rings just once or twice.
Do not answer these numbers or call them back, Three do block some reported numbers and other networks are working on a system.
Please share this with your friends and tell those who may be more vulnerable.


My laboratory is interested in the anti-viral innate immune response and how it is activated and deactivated during infection as well as subverted by pathogens. We have a special interest in and pay particular attention to emerging fields such as the ubiquitin system and nucleic acid sensing.
We believe that our ability to therapeutically manipulate host defensive mechanisms depends on a comprehensive understanding of how these mechanisms operate and respond to pathogen infection.
We use large DNA viruses like poxviruses and herpesviruses as experimental models and take an integrated approach to study virus-host interactions at the genetic, biochemical, immunological, and pathological level.
We aim to decipher the complex and intertwined relationship between viruses and the host immune system, with the aim of exploiting this knowledge for the development of compounds blocking viral propagation (antivirals) or enhancing / taming our immune system (immunomodulators) as well as for a better design of vaccines.


text:
Anime-Gataris Series Review: A Guide In How To Have An Idea But Not A Story
Posted on March 3, 2018 February 17, 2018 by Karandi
Minoa keeps dreaming about an anime she saw as a kid but doesn't know which one. one day in the classroom a classmate overhears her talking about the anime with a friend and seeks her out. Turns out she's a major anime fan. Soon the girls have found other like minded students and started an anime club but things aren't going to be smooth sailing.
While reading that overview you probably had the sense that you had seen that show before. Probably more than once. Anime-Gataris is another one of those self-aware kind of parody type shows except that it doesn't really commit to the idea of parody or satire and instead indulges itself by endless references within the industry and later in the series even becoming self-referential. That doesn't automatically mean we should sound some kind of alarm as there is still a lot of potential in such a series. Early episode of Anime-Gataris did in fact work quite well.
No, where this story fell apart is that it forgot it was supposed to be a story and not a series of loosely connected set ups. Just metaphorically winking at your audience as you skate right over increasingly thin ice with your story isn't enough to really let you get away with the kind of abysmal story this show ends up producing. And while there are some early attempts at foreshadowing the ending we ultimately get, there are entire chunks and episodes that do not feed in to the overall narrative in any meaningful way and are merely there for the sake of squeezing in one more reference or trope.
Maybe people who just like gag comedy will still get something from this. There is enough of a plot that if you aren't too concerned about it making sense you could just kind of go along with their nonsense. However, then the show will have to contend with the fact that other than the first couple of episodes where the characters have rapid fire conversations making some interesting points and the references serving some kind of purpose (or at least taking a small dig at the show they were referencing), by the mid-season these had become far less frequent and had lost any bite they may have had and by the end they merely became filler to drag out a conflict that had so little weight there was no reason to care.
That isn't to say there aren't some very funny moments in this series. Early episodes are quite amusing if you happen to like the kind of humour they are selling and should you have experienced enough anime to be able to negotiate your way through the layered references in some scenes. Yet repeated gags and fairly flat delivery make even the comedy elements of the show pretty dull by the end.
Maybe breaking the fourth wall entirely in the final episodes seemed like an extraordinarily amusing idea in a planning meeting but the actual delivery is rather like the show is looking at its audience and pointing at itself demanding that we acknowledge how clever it is. The end result is pretty ordinary.
Where the show fares a bit better are the characters with Minoa being generic but entertaining as our pink-haired leading lady. New to the anime community, her enthusiasm and passion are a joy to watch at times and while there's nothing particularly exceptional about her or any of the cast, they all kind of serve their assigned roles well enough and the early season has some great moments shared between members of the anime club.
Despite all of that, I can't actually bring myself to dislike this show. At least half the series (the first episodes and then elements of the mid-season) was pretty entertaining and I did appreciate the sheer number of anime they managed to reference during the run time. However, I also can't bring myself to recommend the show given the entire series is just a downward spiral from the spark of a good idea down to a derivative and self-indulgent mess.
Episode Reviews:
Episode 1: A Pleasant Surprise
Episode 2: The References Just Keep Coming
Episode 3: No Chance of Dropping At Episode 3
Episode 4: There Was Supposed to Be A Ka-Boom
Episode 5: Not Even This Show Managed To Make Waiting In Line Interesting
Episode 6: I Lost Count, But This Was Fun
Episode 7: They're Going To Shut Down The Club, Again?
Episode 8: It's a Swing and a Miss
Episode 9: There's a Fine Line and This Just Jumped Right Over It
Episode 10: It's the Power of Friendship/Teamwork/Plot Convenience
Episode 11: Let's Make Random Happen
Episode 12: Death By Narrator, Nonsense, and No Direction
If you enjoyed this post and would like to see
more great content on this blog, consider becoming a patron for as little as $1 a month.
Another way you can support the content here is by buying a copy of 'Thoughts on Anime 2017' as an ebook. It contains a selection of reviews, features and top 5 lists from 2017 and while the content is available free on the site, this is a great way to give a one off show of support for the blog. It is available for $3.99.
Finally, you can use the affiliate link to shop at Play-Asia.com if
you are interested in anime, soundtracks, figures or games. Should you use the link and make a purchase, I will receive a small percentage of the purchase price.
Posted in Series Review, UncategorizedTagged anime, anime club, Anime-Gataris, comedy, high school, Minoa, review, series10 Comments
← Fullmetal Alchemist Live Action Movie Review: Bringing Equivalent Exchange to Life
Inquiring Minds Want To Know #7 →
10 thoughts on "Anime-Gataris Series Review: A Guide In How To Have An Idea But Not A Story"
ospreyshire says:
Interesting review. I've been looking at other meta comedy series involving anime after watching Otaku no Video.
This one starts great and has an interesting ending but the mid-season is a bit less balanced. Still, there is some fun to be had here.
Gotcha. I could say the same about other anime series giving me the same feeling. Good to know there are still some redeemable qualities in Anime-Gataris.
Pingback: In Case You Missed It – 100WordAnime
DerekL says:
Yah… Could have been so much better had they committed to one plot. The starter (school club sendup) wasn't bad, but that went badly wrong as they kept upping the ante.
It really was that need to keep pushing the envelope that tipped them right over the edge. They should have committed to a story and stuck to it.
We're experiencing the age of meta humor. Laugh as we laugh at ourselves. At least we're not like those guys who are too straightforward with their messaging. We've got D E P T H ~
As long as that depth is an abyss, sure.
There is definitely a lot of this 'meta' humour going around and that's fine and all as long as it is still attached to a decent story. Unfortunately, here it didn't appear to be by the end.
Cactus Matt says:
I enjoyed this show's enthusiasm but the ending was just way too overblown, I wouldn't say it ruined the show because I do still like the characters but it wasn't the same after that.
The show was definitely enthusiastic and for the first half that was great. However, it just pushed too far toward the end of the series and for me I kind of found it more bemusing than entertaining by the end.


text:
Tabla Classes
Consulting & PD
JohnChurchville.com
Cosmic Convergence
John Churchville
C.A.R.Ma Quartet's Debut Album! John Churchville - Tabla Drumset and Percussion , Brennan Andes - Electric and Upright Bass, Dan Ripke - Electric Guitar, Peter Madcat Ruth, Harmonica, Vocals, Ukulele, Kalimba
Produced and Engineered by John Churchville Mastered by Ryan Staples Cover Art by Peter Madcat Ruth
Georgie Buck 3:41
New Sixteen 4:33
Appalachian Sun 4:02
Watching the World Roll By 4:52
Jason WIsely 4:29
Menelaus 7:16
Takin My Time 6:43
Lucky 13 4:18
Takadi 5:34
Kuwento Misik - John engineered, produced and played on the debut album "Lua Nova" for Kuwento Misik. Music from around the globe.
John recorded tabla on the title track of the Grammy Award winning album Home by Billy Strings. Produced by Glenn Brown.
View on Bandcamp
An amazing album resulting from 10 days in the studio together with John's longtime friends from his hometown of Marquette, MI. Michael Waite's "Let it Go".
Michael Waite
Buy album
Dragonfly 4:33
Make it Right 3:14
Erica's Song 2:46
Mean Ol' Dog 3:25
Ice Cream 3:08
Cold Black Water 5:39
Arizona Bill 6:59
Spread the Love Around 5:44
New Love, Old Love 3:49
Black Television 3:15
Ski Dance 2:55
If I'm Not Strong Enough 3:38
Bedtime Prayer 1:40
Wake Up 4:11
Maple Ridge 5:38
Joty Drums
Pandit Samar Saha, Muruga Booker, John Churchville
This album is the result of one amazing day at Sage Ct. Studio in Ann Arbor, MI. Pandit Samar Saha was on a North American tour and made a stop in Michigan. John Churchville, a student of Pdt. Saha, had been doing some recording with the legendary Nada drummer Muruga Booker and was able to bring these two masters together for one magical day.
The music on this album is the result of the purest form of improvisation. There was no pre-conceived notions of what was to happen. The musicians just came in, tuned up, and went for it.
A year passed and the tracks were enhanced with drones, Ektar, Saaz, Electric Mandolin and Bass, but at the fore front of the entire album is the Tabla and Nada drumming by true masters of their craft.
Dadra Bliss 6:26
Keherewa Trance 7:29
Nadananda 4:23
Tabla Conga 5:12
Gateway 4:54
Sun Day Saaz 5:50
Juglebandi 9:16
Joty Drums 16:51
ClariNadaTabla
Muruga Booker, Perry Robinson, John Churchville
Recorded live at Sage Ct. Studio in Ann Arbor, MI. on the 27th of December, 2012; Muruga's 70th birthday!
The musicians sat together in the same room. All the tracks were completely improvised and no edits have been made.
Mysterious Wave 6:44
Trance Boogie 15:13
Esonix 6:59
Creating the Universe 14:20
Sumkali
Chalo is a Hindi word meaning "Let's go!". For this second album we took a much different approach to the recording process. We started by doing a lot of improvising with 1, 2 and 3 instruments at a time and then building the pieces like a puzzle, using the best parts of the improv. We also made sure to include some more traditional recordings to
Chalo is a Hindi word meaning "Let's go!". For this second album we took a much different approach to the recording process. We started by doing a lot of improvising with 1, 2 and 3 instruments at a time and then building the pieces like a puzzle, using the best parts of the improv. We also made sure to include some more traditional recordings to round things off. In all the process lasted an entire year and we are very happy with the result. Hope you enjoy listening to it as much as we did making it!
Pushto 4:02
Bhatiyali 5:41
Sarvesham 6:34
Summer Theme 9:46
Malkauns 5:01
Boom Box 0:49
Ala Tala 4:01
Khane Ke Sangeet 4:24
Chalo 2:16
Prem 3:04
Sundara 2:58
Eastern Flame (feat. Jonita Gandhi and Parthiv Gohil)
The Dave Sharp Secret Seven
©2022 Sangeet USA LLC


Sterling silver earring adorned with motifs. Inspired from Fulani tribes displaying their bridal wealth.
An 18kt Gold and Sterling silver button earrings engraved with love words sung by the legend Umm Kulthum.
Classic Button earrings adorned with gold calligraphy.


Macau's first VIP slots room is proving a dud less than one month after it opened.
Macau's SJM Holdings-licensed Jimei Casino welcomed the special administrative region's first ever junket-run VIP slots room last month but – in the immortal words of Spinal Tap manager Ian Faith – its appeal is already becoming more selective.
On a recent visit, a Bloomberg Business reporter found that the slots room had taken all of one week to scrap its original membership fee of HKD 100k (US $12,850). Despite this lowered hurdle – and pitchmen announcing that the machines allow HKD 1 spins – the room's operator Zhang Zheng was the only one observed actually playing the machines.
Unlike North American casinos, slots have always been something of an afterthought in Macau. Slots earned total revenue of MOP 11.75b ($1.47b) in Macau last year, down from MOP 14.4b in 2014, while VIP and mass market baccarat accounted for a combined MOP 204b.
Putting a positive spin on Macau's much-publicized woes, Zhang noted that traditional VIP baccarat rooms "can barely make a profit these days" and thus he was confident his slots room would do all right "because it faces less competition." Zhang insisted that Macau's slots have "die-hard fans" and he hoped his room would attract some big spenders during the upcoming Lunar New Year festivities.
Seasonal events like the Lunar New Year and Golden Week celebrations are becoming more important for Macau operators' bottom lines as the emphasis shifts from VIP to mass. Bank of America Merrill Lynch analyst Billy Ng noted that VIPs have a lot more free time on their hands and can visit Macau on a whim, while most mass market gamblers must wait for holiday periods to plan their trips.
Mass market gamblers were always a more profitable segment than the VIP business, as the latter group requires casinos to lay on the perks and share proceeds with junket operators. However, CLSA analyst Aaron Fischer estimated it takes five mass market gamblers to generate the revenue of one VIP, so this Lunar New Year better bring a bumper crop of the great unwashed.


Disha Patani took baby steps in the industry with a girl next door image. She is one of the youngest actress to have already made waves be it her debut film or glamorous off-screen appearances. Her recent movie 'Baaghi 2' was one of the super hit movie of 2018. Recently she did a photo shoot for a leading magazine, while the cover, which she graced with elan, was for all to see, the behind the scenes pictures, which were hidden from view from now, have now surfaced. The actress shared a few of the shots on her Instagram account and we can't help but gawk at them.


text:
yaourt -S git

cd /tmp
git clone git@github.com:muff1nman/arch_install.git

cd arch_install

sudo cp configs/customizepkg/vim /etc/customizepkg.d/vim

yaourt -S vim

cd ~
git clone --recursive git@github.com:muff1nman/rcs.git
cd ~/rcs
chmod +x link.sh
./link.sh


The 2nd Annual Mathematical Olympiad was well received with 13 schools confirming their participation. The event is supported by DISTED's academic partners, Toyohashi University of Technology (TUT) Japan, and the Malaysian Association of Science and Technology Innovation (ASTI).
In attendance was Dr Jerry Koay, DISTED's Director of Academic Affairs. The event was also graced by external judges namely Dr Mohamed Yunus Mohamed Yasin, President of ASTI, Associate Professor Dr Pang Boey LIM, Director of Global Education, TUT-Penang, and Professor Takaaki Takashima, Director of Institute for Global Network Innovation in Technology Education (IGNITE).
A total of 55 students competed for the individual championship while 17 teams consisting of 4 in a team competed for the group championship.
The winner of the individual category will be awarded with RM10,000 worth of DISTED scholarship; while the team category winner will be awarded with a RM20,000 DISTED scholarship. These scholarships may be utilised to enrol into any of the programmes offered by DISTED.
Congratulations to Wong Jer Ren from SMJK Chung Ling Butterworth who emerged as the individual championship while Team SMJK Chung Ling crowned as team championship.
Congratulations to the winners of individual category. (L) Dr Loo, Mr Teoh, 1st runner up, Tan Chin Peng from SMJK Chung Ling, Champion Wong Jer Ren from SMJK Chung Ling Butterworth, 2nd runner up Lee Kuan Liang from SMJK Chung Ling Butterworth, Dr Yunus and Dr Koay.
Congratulations to the winning teams of team category. (L) Dr Loo, 1st runner up, team SMJK Chung Ling Butterworth, Professor Takaaki Takashim, Associate Professor Dr Pang Boey LIM, Chanpion team from SMJK Chung Ling, 2nd runner up, team Han Chiang High School and Dr Koay.
A big thank you for your support and participation. See you again next year.


I was an online film critic for Screenpicks and Filmmatic.com, collectively a period of three years. Three of my features are currently for sale by Pinaki Ghosh of The Screenplay Writers. Many others have been considered at reputable companies such as Smart Entertainment, Voltage Pictures, Farah Films, and Varient. My love for literature since an early age has largely inspired my goals as a screenwriter today, and I look forward to collaborating with others who live and breathe cinema the way I do.