Skip to content

Instantly share code, notes, and snippets.

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>xyz.lyqscmy</groupId>
<artifactId>leetcode</artifactId>
<version>0.0.1-SNAPSHOT</version>
<properties>
@lyqscmy
lyqscmy / server.go
Created January 18, 2019 03:33
http server
package main
import (
"io"
"log"
"net/http"
)
func main() {
// Hello world, the web server
impl XGBTree {
fn get_leaf_index(&self, feats: &FVec) -> usize {
let mut nid: usize = 0;
let mut node = &self.nodes[nid];
while !node.is_leaf() {
let split_index = node.split_index();
if feats.is_misssing(split_index) {
nid = node.cdefault();
} else {
let split_cond = node.split_cond();