首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • 来自专栏希里安

    Gin路由之routes group

    使用gin框架开发的时候,为了设计符合restful的接口,就得想办法使用一些比较规范容易使用的路由,今天就来介绍一下为了管理相同url的routes group。 getting) r.PUT("/xxxput") //监听端口默认为8080 r.Run(":8888") } 开发定义路由的时候,肯定避免不了很多部分重复的路由,gin提供了routes

    43910编辑于 2023-10-30
  • 来自专栏SnailTyan

    Bus Routes

    Version 1 class Solution: def numBusesToDestination(self, routes: List[List[int]], source: int, target for cand in candidates: indices = [] for index, route in enumerate(routes : List[List[int]], source: int, target: int) -> int: # stat = {} # for route in routes # stat[stop] = stat.get(stop, 0) + 1 stat = collections.Counter([x for route in routes for x in route]) transfers = [] for route in routes: temp = []

    41620发布于 2021-07-08
  • 来自专栏大数据

    React 路由守卫 Guarded Routes

    在现代 Web 应用中,路由守卫(Guarded Routes)是一种常见的模式,用于在用户访问特定路由之前进行权限检查或其他逻辑验证。

    98210编辑于 2024-12-13
  • 来自专栏云计算linux

    Duplicate named routes definition: { name: “XXX“, path: “XXX“ }

    上述错误原因在于 name: '数据字典',这里和之前的定义name重复了。 定义重复命名的路由。

    33410编辑于 2024-12-13
  • 来自专栏子曰五溪

    你不可避免的 Flutter Routes

    { return new MaterialApp( title: 'Welcome to Flutter', home: new AVUpdate(), routes

    94620发布于 2019-06-24
  • 来自专栏A周立SpringCloud

    Spring Cloud Edgware新特性之四:Zuul routes端点功能增强

    我们知道,Zuul有一个非常实用的 /routes 端点。 访问 $ZUUL_URL/routes 即可查看当前Zuul的路由规则,从而在很多情况下能够帮助我们定位Zuul的问题——当Zuul没有按照我们的计划去转发请求时, /routes 就会很有用,可通过该端点查看 TIPS:使用 routes 端点的前提: Zuul Server需要有Spring Boot Actuator的依赖,否则访问 /routes 端点将会返回404;。 我们可通过 /routes?format=detail 来查看更多详情。 使用 /routes?format=detail 可进一步简化我们的调试与排错。

    72080发布于 2018-04-02
  • 来自专栏Zaqdt_ACM

    51nod 1649 齐头并进(Codeforces 601A The Two Routes) (最短路)

    题目链接(Codeforces):http://codeforces.com/problemset/problem/601/A

    43020发布于 2019-01-10
  • 来自专栏技术进阶

    针对hyperf框架改造----路由(routes)多文件多目录多前缀支持

    '/routes'; $dirs = scandir($path); foreach ($dirs as $dir) { if ($dir ! } } } } } } PHP Copy 第三步 加载路由 在config目录下的routes.php php declare(strict_types=1); reloadRoute(); PHP Copy 第三步 添加routers目录 在项目根(/)目录新增routes,达到效果例如: routes

    2K30编辑于 2021-12-24
  • 来自专栏阿策小和尚

    【技术创作101训练营】Flutter Routes 路由应用与封装小结

    ---- 演讲文稿 开场: 大家好,非常感谢各位在百忙之中抽时间来听我们的技术分享;和尚今天分享的内容是【Flutter Routes 路由应用与封装小结】;       (Page 2)和尚准备从如下几点进行介绍 Flutter Navigator 路由简介: (Page 4)和尚首先介绍一下 Navigator 和 Route 的关系;如这个图所示,直观的表现为多个 Page 页面及其元素称为 Routes Intent;Navigator 是一个内部类,在 WidgetsApp / MaterialApp / CupertinoApp 中是默认插入的,可以直接使用;       (Page 5)Page Routes routes 为路由表映射,当我们使用静态方式进行路由更新时,首先需要在 routes 中进行绑定;一般 root 页面通常用 / 表示,其他的页面再根据业务模块进行文件层级区分;使用过 若初始化指定的是正常可用路由时以 initialRoute 指定路由为准;否则以 home 为准; 4. onGenerateRoute onGenerateRoute 为重要的构造函数,在使用未在 routes

    1.6K102发布于 2021-01-18
  • 来自专栏编程微刊

    import {BrowseRouter,Routes,Route} from react-router-dom 里面的BrowseRouter是什么?

    在React Router库中,BrowserRouter是一种用于在React应用程序中实现路由功能的组件。它是React Router提供的一种路由器组件之一。

    84620编辑于 2023-11-14
  • 来自专栏福大大架构师每日一题

    给你一个数组 routes ,表示一系列公交线路,其中每个 routes 表示一条公交线路

    给你一个数组 routes ,表示一系列公交线路,其中每个 routes[i] 表示一条公交线路,第 i 辆公交车将会在上面循环行驶。 例如,路线 routes[0] = [1, 5, 7] 表示第 0 辆公交车会一直按序列 1 -> 5 -> 7 -> 1 -> 5 -> 7 -> 1 -> ... 这样的车站路线行驶。 return 0 } n := len(routes) // key : 车站 // value : list -> 该车站拥有哪些线路! { if _, ok := map0[routes[i][j]]; ! ok { map0[routes[i][j]] = make([]int, 0) } map0[routes[i][j]]

    35820编辑于 2021-12-09
  • 来自专栏编程微刊

    import {BrowserRouter,Routes,Route,Navigate} from react-router-dom 这个Navigate是什么作用

    以下是一个示例,展示了如何使用 Navigate 进行编程式导航: import React from 'react'; import { BrowserRouter, Routes, Route, Navigate onClick={handleButtonClick}>Go to About</button>

<Routes <Route path="/" element={<Home />} /> <Route path="/about" element={<About />} /> </Routes 注意在使用 Navigate 组件时,必须在 Routes 组件的子组件中使用,以确保它能够正确地触发导航。

44250编辑于 2023-11-11
  • 来自专栏福大大架构师每日一题

    给你一个数组 routes ,表示一系列

    给你一个数组 routes ,表示一系列公交线路,其中每个 routesi 表示一条公交线路,第 i 辆公交车将会在上面循环行驶。 例如,路线 routes0 = 1, 5, 7 表示第 0 辆公交车会一直按序列 1 -> 5 -> 7 -> 1 -> 5 -> 7 -> 1 -> ... 这样的车站路线行驶。 return 0 } n := len(routes) // key : 车站 // value : list -> 该车站拥有哪些线路! { if _, ok := map0[routes[i][j]]; ! ok { map0[routes[i][j]] = make([]int, 0) } map0[routes[i][j]]

    23210编辑于 2021-12-04
  • 来自专栏前端大白专栏

    Error: Cannot match any routes. URL Segment: public 困扰一个下午的问题

    Error: Cannot match any routes.

    2.2K60发布于 2018-06-15
  • 来自专栏waki

    一眼能看出来是Auth::routes()是自动添加一批路由,那是怎么工作的呢?

    14410编辑于 2021-12-08
  • 来自专栏Web 技术

    TypeScript 的魔法技能:satisfies

    : Routes } type Routes = Record<string, Route> const routes = { AUTH: { path: "/auth", }, } : Routes } type Routes = Record<string, Route> const routes: Routes = { AUTH: { path: "/auth", : Routes } type Routes = Record<string, Route> const routes = { AUTH: { path: "/auth", }, } : Routes } type Routes = Record<string, Route> const routes = { AUTH: { path: "/auth", }, } satisfies Routes 有了这个,我们会得到了我们想要的所有正确的类型检查: routes.AUTH.path // ✅ routes.AUTH.children // ❌ routes.auth

    95710编辑于 2023-10-07
  • 来自专栏开源部署

    路由(Route)

    #id:自定义路由ID spring.cloud.gateway.routes[2].id=after_route #uri:目标服务地址 spring.cloud.gateway.routes[2] #id:自定义路由ID spring.cloud.gateway.routes[1].id=before_route #uri:目标服务地址 spring.cloud.gateway.routes[1 #id:自定义路由ID spring.cloud.gateway.routes[3].id=between_route #uri:目标服务地址 spring.cloud.gateway.routes[ #id:自定义路由ID spring.cloud.gateway.routes[4].id=cookie_route #uri:目标服务地址 spring.cloud.gateway.routes[4] #id:自定义路由ID spring.cloud.gateway.routes[5].id=header_route #uri:目标服务地址 spring.cloud.gateway.routes[5]

    1.7K30编辑于 2022-09-15
  • 来自专栏数据魔术师

    模拟退火算法解决带时间窗的车辆路径规划问题

    ]); // 更新i节点移入的路径j: routes[j].SubT = 0; UpdateSubT(routes[j]); score = Calculation [bestRoute].SubT = 0; UpdateSubT(routes[bestRoute]); routes[customers[rand].Path_Number].SubT = 0 Cus后所组成的路径距离 routes[r].Dis = routes[r].Dis - Graph[routes[r].seq.get(position - 1).Number][routes // 更新在路径r中去除节点Cus后所组成的路径的距离 routes[r].Dis = routes[r].Dis - Graph[routes[r].seq.get(position - 1).Number][routes[r].seq.get(position).Number] - Graph[routes[r].seq.get(position).Number][routes

    2.5K52发布于 2021-09-02
  • 来自专栏胖头鱼学前端

    像vue-router一样配置node路由?爽

    /routes') module.exports = (app) => { app.use(routes()) } 写到这里你可能心里有个疑问? /routes/tasks.js') 可以直接指定文件导出的内容 (const routes = require('.. 参数适配 assert(Array.isArray(routes) || typeof routes === 'string', 'routes must be an Array or a String === 'string') { routes = routes.replace('.js', '') if (fs.existsSync(`${routes}.js`) || fs.existsSync (routes)) { // 处理传入的是文件 if (fs.existsSync(`${routes}.js`)) { routes = require(routes)

    63630编辑于 2022-07-25
  • 来自专栏前端资源

    Umi动态修改路由跳转redirect配置

    在 app.tsx 中增加下面代码: export function patchRoutes({ routes }: { routes: IRoute[] }) {   let pagesRoutes  = routes[0].routes;   const serverRoutes = buildRoutes(serviceRoutes);   serverRoutes.map((route: any [0] = {       ...pagesRoutes[0],       path: '/',       redirect: pagesRoutes[1].routes[0].path,      };   }   routes[0].routes = pagesRoutes; } 其中 buildRoutes 是用来组织路由的: function buildRoutes(routes: any)  {   return (routes || []).map((route: any) => {     if (route.children && route.children.length > 0)

    3.7K20编辑于 2022-02-23
  • 领券