This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 建仓决策树页面 v1.0 | |
| // 基于交易形态指南的完整决策树系统 | |
| // 使用 React Flow 实现决策树可视化 | |
| 'use client'; | |
| import { useCallback } from 'react'; | |
| import { | |
| ReactFlow, | |
| Node, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Server } from "@modelcontextprotocol/sdk/server/index.js"; | |
| import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"; | |
| import axios from "axios"; | |
| import dotenv from "dotenv"; | |
| import {ForecastDay, isValidForecastArgs, OpenWeatherResponse, WeatherData} from "./types/weather.js"; | |
| import { | |
| CallToolRequestSchema, | |
| ErrorCode, | |
| ListResourcesRequestSchema, ListToolsRequestSchema, | |
| McpError, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import yahooFinance from 'yahoo-finance2'; | |
| async function analyzeStock(symbol, period) { | |
| try { | |
| const today = new Date(); | |
| const startDate = new Date(); | |
| startDate.setMonth(today.getMonth() - period); | |
| const queryOptions = { | |
| period1: startDate.toISOString(), // 使用 toISOString() 获取正确的日期字符串 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react' | |
| import PropTypes from 'prop-types' | |
| import { graphql } from 'gatsby' | |
| import styled from '@emotion/styled' | |
| import { Layout, Listing, Wrapper, Title, SEO, Header } from '../components' | |
| import website from '../../config/website' | |
| const Hero = styled.header` | |
| padding-top: 1rem; | |
| padding-bottom: 4rem; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class OptionTest { | |
| private List<Option<String>> names = null; | |
| @Before | |
| public void setup() { | |
| names = new ArrayList<Option<String>>(); | |
| names.add(new Some<String>("Dean")); | |
| names.add(new None<String>()); | |
| names.add(new Some<String>("Wampler")); | |
| } | |
| @Test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public final class None<T> extends Option<T> { | |
| public static class NoneHasNoValue extends RuntimeException {} | |
| public None() {} | |
| public boolean hasValue() { return false; } | |
| public T get() { throw new NoneHasNoValue(); } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public final class Some<T> extends Option<T> { | |
| private final T value; | |
| public Some(T value) { this.value = value; } | |
| public boolean hasValue() { return true; } | |
| public T get() { return value; } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class ListModule { | |
| public static interface List<T> { | |
| public abstract T head(); | |
| public abstract List<T> tail(); | |
| public abstract boolean isEmpty(); | |
| public List<T> filter(Function1<T, Boolean> f); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Anotation for fields need to check | |
| @Retention(RetentionPolicy.RUNTIME) | |
| @Target(ElementType.FIELD) | |
| public @interface ModifiableField { | |
| } | |
| public abstract class PersistedObject { | |
| public static final long UNSET_PRIMARY_KEY = 0L; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {"lastUpload":"2019-09-22T20:45:43.031Z","extensionVersion":"v3.2.9"} |
NewerOlder