人│生佛魔见

文章 评论 浏览 28

人│生佛魔见 2025-02-21 00:44:12

我遇到了类似的麻烦。我有关于内容类型的错误,但是在Blask-Restx中。
我的结论是使用reqparse来定义所需的参数,还要获取此参数,另一种方式,您会遇到相同的错误。

我已经使用reqparse来定义file_uploader和api.payload,以获取其他数据

upload_parser = api.parser()
upload_parser.add_argument('file', location='files',
                           type=FileStorage, required=True)

hostauth_create_fields = api.model(
    'HostAuthCreate', {
        'name': fields.String(description="The name of the instance", required=True),
        'username': fields.String(description="Username to connect", required=True),
        'password': fields.String(description="Password to connect", required=False)
    }
)

@api.route('/api/hostauth')
class HostAuthView(Resource):
    @api.expect(upload_parser, hostauth_create_fields)
    def post(self):
        args = upload_parser.parse_args()
        args.get('file')
        api.payload.get('name') # This line will cause a error
        return {'name': args.get('name')}, 201

,但可以通过upload_parser来解析所有args:

upload_parser = api.parser()
upload_parser.add_argument('file', location='files',
                           type=FileStorage, required=True)
upload_parser.add_argument('name', type=str, required=True, location="form")
upload_parser.add_argument('username', type=str, required=True, location="form")
upload_parser.add_argument('password', type=str, location="form")

获取其他参数

args.get('name')

并且要 reqparse。因此,如果您的文件如args,则应选择reqparse。在其他路线中,您可以再次使用API​​.Model

I've faced with similar trouble. I've got error about content type, but in flask-restx.
My conclusion is to use reqparse to define required parameters, and also for getting this parameters, other way you'll get the same error.

I've used reqparse to define file_uploader, and api.payload, to get other data

upload_parser = api.parser()
upload_parser.add_argument('file', location='files',
                           type=FileStorage, required=True)

hostauth_create_fields = api.model(
    'HostAuthCreate', {
        'name': fields.String(description="The name of the instance", required=True),
        'username': fields.String(description="Username to connect", required=True),
        'password': fields.String(description="Password to connect", required=False)
    }
)

@api.route('/api/hostauth')
class HostAuthView(Resource):
    @api.expect(upload_parser, hostauth_create_fields)
    def post(self):
        args = upload_parser.parse_args()
        args.get('file')
        api.payload.get('name') # This line will cause a error
        return {'name': args.get('name')}, 201

But that's possible to parse all args via upload_parser:

upload_parser = api.parser()
upload_parser.add_argument('file', location='files',
                           type=FileStorage, required=True)
upload_parser.add_argument('name', type=str, required=True, location="form")
upload_parser.add_argument('username', type=str, required=True, location="form")
upload_parser.add_argument('password', type=str, location="form")

And to get other params, use:

args.get('name')

Possibly api.model rewrites header that responsible for accepted content type set by reqparse. So you should choose reqparse if you have files as args. In other routes you can use api.model again

烧瓶零错误:请求内容类型不是应用程序/json;。&quort;}

人│生佛魔见 2025-02-20 11:01:48

尝试:

=REGEXEXTRACT(QUERY(FLATTEN(IMPORTXML(A1, "//*")), 
 "where Col1 contains '"&CHAR(10)&"Creators'", ), 
 ".x22text.x22:.x22(.+).x22,.x22bold.x22")

try:

=REGEXEXTRACT(QUERY(FLATTEN(IMPORTXML(A1, "//*")), 
 "where Col1 contains '"&CHAR(10)&"Creators'", ), 
 ".x22text.x22:.x22(.+).x22,.x22bold.x22")

enter image description here

试图导入总YouTube频道视图时,电子表格中的importxml正在返回错误

人│生佛魔见 2025-02-20 09:31:03

这里可能有一些错误:

  1. 您是否从React导入USESTATE

导入React,{usestate}来自“ React”

  1. 您是使用setText设置值还是设置默认状态值?您的当前示例将文本的默认状态设置为''

  2. 您是否在渲染方法中返回文本?例如

返回< p> {text}</p>

  1. 您是否使用React V16.8或更高?如果没有的话,将不可用

There could be a few things wrong here:

  1. Are you importing useState from react?

import React, { useState } from "react"

  1. Are you setting value using setText or setting a default state value? Your current example sets default state for text as ''

  2. Are you returning text in the render method? E.g.

return <p>{text}</p>

  1. Are you using React v16.8 or greater? If not hooks will not be available

为什么usestate()在react js中不起作用?

人│生佛魔见 2025-02-20 02:35:36

培训师(insume_from_checkpoint =“ some/path/to/my_checkpoint.ckpt”)已被贬低。新方法为:self.trainer.fit(self.model,self.data_module,ckpt_path = self.ckpt_path)。它需要在具有预定的路径+名称的一定数量的时期后保存最佳/最后模型,然后从路径中检索以恢复训练。

我想知道此方法对于转移学习是否有效,即仅更改少数fc层用于其他任务。

Trainer(resume_from_checkpoint="some/path/to/my_checkpoint.ckpt") has been depreciated. New method is: self.trainer.fit(self.model, self.data_module, ckpt_path = self.ckpt_path). It requires to save best/last model after certain number of epochs with pre-defined path+name and then retrieve from path for resuming the training.

I am wondering if this method would be effective for transfer learning i.e. changing only few fc layer for some other task.

Pytorch Lighting简历训练来自上一个时期和重量

人│生佛魔见 2025-02-19 07:01:47

嗨,您可以尝试为其创建一个自定义小部件以进行自定义,如下所示,是上述实现的简单示例。

class CounterWidget extends StatefulWidget {
  final double width;
  final double height;
  final double spaceWidth;
  final Color controlColor;
  final Color valueColor;
  final Function(int count) callback;
  const CounterWidget({
    Key? key,
    required this.title,
    required this.callback,
    required this.controlColor,
    required this.valueColor,
    this.width = 50,
    this.height = 30,
    this.spaceWidth = 5,
  }) : super(key: key);

  final String title;

  @override
  State<CounterWidget> createState() => _CounterWidgetState();
}

class _CounterWidgetState extends State<CounterWidget> {
  int count = 0;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Row(
        children: [
          //Incrementor
          InkWell(
            onTap: () {
              setState(() {
                count++;
                //Callback method to expose the count to the higher hier archy.
                widget.callback(count);
              });
            },
            child: Container(
              decoration: BoxDecoration(
                color: widget.controlColor,
                borderRadius: BorderRadius.only(
                  topLeft: Radius.circular(widget.height / 0.1),
                  bottomLeft: Radius.circular(widget.height / 0.1),
                ),
              ),
              child: const Center(
                child: Icon(
                  Icons.add,
                  color: Colors.white,
                ),
              ),
              width: widget.width,
              height: widget.height,
            ),
          ),
          SizedBox(width: widget.spaceWidth),
          Container(
            color: widget.valueColor,
            width: widget.width,
            height: widget.height,
            child: Center(
              child: Text(
                count.toString(),
                style: const TextStyle(
                  color: Colors.white,
                  fontWeight: FontWeight.bold,
                  fontSize: 20,
                ),
              ),
            ),
          ),
          SizedBox(width: widget.spaceWidth),
          InkWell(
            onTap: () {
              if (count > 0) {
                setState(() {
                  count--;
                  widget.callback(count);
                });
              }
            },
            child: Container(
              width: widget.width,
              height: widget.height,
              decoration: BoxDecoration(
                color: widget.controlColor,
                borderRadius: BorderRadius.only(
                  topRight: Radius.circular(widget.height / 0.1),
                  bottomRight: Radius.circular(widget.height / 0.1),
                ),
              ),
              child: const Center(
                child: Icon(
                  Icons.remove,
                  color: Colors.white,
                ),
              ),
            ),
          ),
        ],
      ),
    );
  }
}


Hi you can try create a custom widget for it to make the customisation as you required below is the simple example for the mentioned implementation.

class CounterWidget extends StatefulWidget {
  final double width;
  final double height;
  final double spaceWidth;
  final Color controlColor;
  final Color valueColor;
  final Function(int count) callback;
  const CounterWidget({
    Key? key,
    required this.title,
    required this.callback,
    required this.controlColor,
    required this.valueColor,
    this.width = 50,
    this.height = 30,
    this.spaceWidth = 5,
  }) : super(key: key);

  final String title;

  @override
  State<CounterWidget> createState() => _CounterWidgetState();
}

class _CounterWidgetState extends State<CounterWidget> {
  int count = 0;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Row(
        children: [
          //Incrementor
          InkWell(
            onTap: () {
              setState(() {
                count++;
                //Callback method to expose the count to the higher hier archy.
                widget.callback(count);
              });
            },
            child: Container(
              decoration: BoxDecoration(
                color: widget.controlColor,
                borderRadius: BorderRadius.only(
                  topLeft: Radius.circular(widget.height / 0.1),
                  bottomLeft: Radius.circular(widget.height / 0.1),
                ),
              ),
              child: const Center(
                child: Icon(
                  Icons.add,
                  color: Colors.white,
                ),
              ),
              width: widget.width,
              height: widget.height,
            ),
          ),
          SizedBox(width: widget.spaceWidth),
          Container(
            color: widget.valueColor,
            width: widget.width,
            height: widget.height,
            child: Center(
              child: Text(
                count.toString(),
                style: const TextStyle(
                  color: Colors.white,
                  fontWeight: FontWeight.bold,
                  fontSize: 20,
                ),
              ),
            ),
          ),
          SizedBox(width: widget.spaceWidth),
          InkWell(
            onTap: () {
              if (count > 0) {
                setState(() {
                  count--;
                  widget.callback(count);
                });
              }
            },
            child: Container(
              width: widget.width,
              height: widget.height,
              decoration: BoxDecoration(
                color: widget.controlColor,
                borderRadius: BorderRadius.only(
                  topRight: Radius.circular(widget.height / 0.1),
                  bottomRight: Radius.circular(widget.height / 0.1),
                ),
              ),
              child: const Center(
                child: Icon(
                  Icons.remove,
                  color: Colors.white,
                ),
              ),
            ),
          ),
        ],
      ),
    );
  }
}


Textfield选择荧光笔控件看起来太高

人│生佛魔见 2025-02-19 04:05:30

您可以使用redirect()url上设置的名称属性>类似:

if request.method == "POST":
     return redirect("index") # or -> return redirect("/")

但是,如果您使用app_name,则需要要说:

if request.method == "POST":
     return redirect("app_name:index")

我不确定返回语句是否在中(如果请求)。在这种情况下,转到同一页面很有意义,因为您希望用户留在同一页面上。我假设您已经有返回语句之外,如果request.method ==“ post”: block。为什么不单独将其用于这种观点呢?

You could use redirect() with the name attribute set on the url like:

if request.method == "POST":
     return redirect("index") # or -> return redirect("/")

However, if you're using an app_name, you would want to say:

if request.method == "POST":
     return redirect("app_name:index")

I'm not so sure if having a return statement within the if request.method == "POST": block; going to the same page makes much sense in this case since you would want the user to stay on the same page. I assume you already have a return statement outside of the if request.method == "POST": block. Why not just use that alone for this view?

发布后,将用户重定向到同一页面

人│生佛魔见 2025-02-18 13:47:27

这是因为查询选择器仅选择适合标准的第一个事件。考虑在HTML元素上添加ID并相应选择。

This is because that the query selector only selects the first occurence that fits the criteria. Consider adding IDs on the HTML elements and select them accordingly.

newbie addeventListener样式CSS更改ALL&lt; li&gt;

人│生佛魔见 2025-02-18 01:04:08

如果您只希望sidebar组件才能使用某些路线渲染,则是使用所谓的布局路由来渲染utlet> utlet组件的常见解决方案匹配时将内容路由到。

参见布局路由

例子:

import { Outlet } from 'react-router-dom';

const SidebarLayout = () => (
  <>
    <Sidebar />
    <Outlet />
  </>
);

export default SidebarLayout;

...

import SidebarLayout from '../path/to/SidebarLayout';

...

<AuthContextProvider>
  <Router>
    <Routes>
      <Route path='/' element={<Signin />} />
      <Route path='/signup' element={ <Signup /> } />
      ... other routes without sidebar

      <Route element={<SidebarLayout />}>
        <Route
          path='/about-us'
          element={
            <ProtectedRoute>
              <Account />
            </ProtectedRoute>
          }
        />
        ... other routes with sidebar
      </Route>
    </Routes>
  </Router>
</AuthContextProvider>

If you only want the Sidebar component to render with certain routes it is a common solution to use what is called a Layout Route to render an Outlet component for nested routes to render their routed content into when matched.

See Layout Routes.

Example:

import { Outlet } from 'react-router-dom';

const SidebarLayout = () => (
  <>
    <Sidebar />
    <Outlet />
  </>
);

export default SidebarLayout;

...

import SidebarLayout from '../path/to/SidebarLayout';

...

<AuthContextProvider>
  <Router>
    <Routes>
      <Route path='/' element={<Signin />} />
      <Route path='/signup' element={ <Signup /> } />
      ... other routes without sidebar

      <Route element={<SidebarLayout />}>
        <Route
          path='/about-us'
          element={
            <ProtectedRoute>
              <Account />
            </ProtectedRoute>
          }
        />
        ... other routes with sidebar
      </Route>
    </Routes>
  </Router>
</AuthContextProvider>

难以导航到其他页面

人│生佛魔见 2025-02-17 12:02:55

但是,当我在给定行15中删除关键字“列表”时,它效果很好。它背后的原因是什么?

tl; dr:排序接受迭代,枚举已经是一个可观的

长答案:

时,定义list

list=pickle.load(open(r'C:\Users\nikso\OneDrive\Desktop\mlproject\movies_dict.pkl','rb'),buffers=None)

当您覆盖python的内置 - 在列表中类型。 Python可以让您在不发出任何警告的情况下执行此操作,但结果是,在您的脚本中,list现在代表一个字典对象。结果是,当您调用list(枚举(SIM))以后, 您将字典对象视为callable ,这不是。

解决方案?尽可能避免覆盖Python内置。

import streamlit as st
import pickle
import numpy as np
import pandas as pd


similarity=pickle.load(open(r'C:\Users\nikso\OneDrive\Desktop\mlproject\similarity.pkl','rb'),buffers=None)
movies_dict=pickle.load(open(r'C:\Users\nikso\OneDrive\Desktop\mlproject\movies_dict.pkl','rb'),buffers=None)
movies=pd.DataFrame.from_dict(movies_dict)


def recomm(movie):
  mov_index=movies[movies['title']==movie].index[0]
  sim=similarity[mov_index]
  movlist=sorted(list(enumerate(sim)),reverse=True,key=lambda x:x[1])[1:6]
  
  rec_movie=[]
  for i in movlist:
    # print(i[0])
    rec_movie.append(movies.iloc[i[0]]['title'])
  return rec_movie

st.title('Movie Recommender System')

selected_movie_name = st.selectbox(
     'How would you like to be contacted?',
     movies['title'].values)

if st.button('Recommend'):
     recom=recomm(selected_movie_name)
     # recom=np.array(recom)
     for i in recom:
        st.write(i)

要回答特别为什么在第15行上删除“列表”似乎解决了问题,但是:排序接受迭代,枚举已经是一个迭代。所有list在第15行上进行的所有正在收集枚举的结果,然后将它们传递到排序中。但是,基本原因为什么删除list修复的内容是因为您已经覆盖了Python的内置,您可能想避免这样做。

But when I removed the keyword 'list' in the given line 15 it worked fine. What can be the reason behind it?

TL;DR: sorted accepts iterables, and enumerate is already an iterable

Long answer:

When you define list as

list=pickle.load(open(r'C:\Users\nikso\OneDrive\Desktop\mlproject\movies_dict.pkl','rb'),buffers=None)

you're overriding Python's built-in list type. Python lets you do this without issuing any warnings, but the result is that, in your script, list now represents a dictionary object. The result of this is that when you call list(enumerate(sim)) later on, you're treating your dictionary object as a callable, which it is not.

The solution? Avoid overriding Python built-ins whenever you can.

import streamlit as st
import pickle
import numpy as np
import pandas as pd


similarity=pickle.load(open(r'C:\Users\nikso\OneDrive\Desktop\mlproject\similarity.pkl','rb'),buffers=None)
movies_dict=pickle.load(open(r'C:\Users\nikso\OneDrive\Desktop\mlproject\movies_dict.pkl','rb'),buffers=None)
movies=pd.DataFrame.from_dict(movies_dict)


def recomm(movie):
  mov_index=movies[movies['title']==movie].index[0]
  sim=similarity[mov_index]
  movlist=sorted(list(enumerate(sim)),reverse=True,key=lambda x:x[1])[1:6]
  
  rec_movie=[]
  for i in movlist:
    # print(i[0])
    rec_movie.append(movies.iloc[i[0]]['title'])
  return rec_movie

st.title('Movie Recommender System')

selected_movie_name = st.selectbox(
     'How would you like to be contacted?',
     movies['title'].values)

if st.button('Recommend'):
     recom=recomm(selected_movie_name)
     # recom=np.array(recom)
     for i in recom:
        st.write(i)

To answer specifically why removing "list" on line 15 seemed to fix the issue, though: sorted accepts iterables, and enumerate is already an iterable. All list is doing on line 15 is gathering the results of enumerate before passing them into sorted. But the fundamental reason why removing list fixed things is because you're overriding Python's built-in, which you probably want to avoid doing.

错误:尝试在ML中部署模型时,我会得到 - &#x27; dict&#x27;对象不可呼应

人│生佛魔见 2025-02-17 00:40:15

我不确定您的确切问题是什么...在硒的较新版本中,驱动程序路径被贬低。尝试安装WebDriver_Manager,并在下面使用它。

from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.support.ui import Select
from webdriver_manager.chrome import ChromeDriverManager #install webdriver_manager
from selenium.webdriver.common.by import By

driver = webdriver.Chrome(ChromeDriverManager().install())
driver.maximize_window()
driver.get('website')

I'm not sure what your exact issue is... In the newer versions of Selenium the driver path is depreciated. Try installing webdriver_manager and using this below.

from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.support.ui import Select
from webdriver_manager.chrome import ChromeDriverManager #install webdriver_manager
from selenium.webdriver.common.by import By

driver = webdriver.Chrome(ChromeDriverManager().install())
driver.maximize_window()
driver.get('website')

您好,如何解决此驱动程序Python错误?

人│生佛魔见 2025-02-16 11:30:30

我刚刚在此页面上打开了Firefox的Inspector面板,并在控制台中评估了以下内容:

document.evaluate("substring(//div[@itemprop='text']/p[1], 39, 2)", document).stringValue

结果是字符串“ 16”。因此,我认为我们可以说它绝对可以起作用。

I just opened Firefox's inspector panel on this very page and evaluated the following in the console:

document.evaluate("substring(//div[@itemprop='text']/p[1], 39, 2)", document).stringValue

The result was the string "16". So I think we can say that it should definitely work.

XPath子弦在Firefox Web检查员/控制台中是否有效?

人│生佛魔见 2025-02-15 22:50:45

我找到了答案。

这是构建/install/Library名录目录,

SOURCE_DIR   "${CMAKE_BINARY_DIR}/install/cgal_dependencies"

这是C:/Program Files(x86)/sortDemo/startDemo/install/LibraryName目录,

 SOURCE_DIR   ${CMAKE_INSTALL_PREFIX}/install/cgal_dependencies" 

其某些原因是默认位置为c:/program文件(x86)而不是c:/program files

I found the answer.

This is the build/install/libraryname directory

SOURCE_DIR   "${CMAKE_BINARY_DIR}/install/cgal_dependencies"

This is the C:/Program Files (x86)/sortdemo/install/libraryname directory

 SOURCE_DIR   ${CMAKE_INSTALL_PREFIX}/install/cgal_dependencies" 

For some reason the default locations is C:/Program Files (x86) not C:/Program Files

即使我设置-dcmake_install_prefix:path = $ {cmake_install_prefix},CMAKE始终安装到默认目录

人│生佛魔见 2025-02-14 22:07:25

您可以使用 chartjs-plugin-zoom 为此。

import zoomPlugin from 'chartjs-plugin-zoom';
import { Chart as ChartJS} from 'chart.js';
ChartJS.register(zoomPlugin);

注册Zoom插件后,修改Options对象。

  const options = {
    responsive: true,
    plugins: {
      title: {
        display: true,
      },
      zoom: {
        pan: {
            enabled: true,
            mode: 'x'
        },
        zoom: {
            pinch: {
                enabled: true       // Enable pinch zooming
            },
            wheel: {
                enabled: true       // Enable wheel zooming
            },
            mode: 'x',
        }
    }
    },
  };

You can use chartjs-plugin-zoom for this.

import zoomPlugin from 'chartjs-plugin-zoom';
import { Chart as ChartJS} from 'chart.js';
ChartJS.register(zoomPlugin);

After registering zoom plugin, modify the options object.

  const options = {
    responsive: true,
    plugins: {
      title: {
        display: true,
      },
      zoom: {
        pan: {
            enabled: true,
            mode: 'x'
        },
        zoom: {
            pinch: {
                enabled: true       // Enable pinch zooming
            },
            wheel: {
                enabled: true       // Enable wheel zooming
            },
            mode: 'x',
        }
    }
    },
  };

如何在React-Chartsjs-2中滚动X轴

人│生佛魔见 2025-02-14 21:27:55

您应该修改ul上面的flex说明

flex flex-col lg:flex-row
  • lg size:flexbox将排
  • lg size:flexbox将为列

注意您应该知道从左到右的班级名称顺序。

<html lang="en">

    <head>
      <link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/tailwind.min.css" />

    </head>

    <body class="bg-gray-400 font-sans leading-normal tracking-normal">

      <nav class="flex items-center justify-between flex-wrap bg-gray-800 p-6 fixed w-full z-10 top-0">
        <div class="flex items-center flex-shrink-0 text-white mr-6">
          <a class="text-white no-underline hover:text-white hover:no-underline" href="#">
            <span class="text-2xl pl-2">Brand</span>
          </a>
        </div>

        <div class="block lg:hidden">
          <button id="nav-toggle" class="flex items-center px-3 py-2 border rounded text-gray-500 border-gray-600 hover:text-white hover:border-white">
            <svg class="fill-current h-3 w-3" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
              <path d="M0 3h20v2H0V3zm0 6h20v2H0V9zm0 6h20v2H0v-2z" />
            </svg>
          </button>
        </div>

        <div class="w-full flex-grow lg:flex lg:items-center lg:w-auto hidden lg:block pt-6 lg:pt-0" id="nav-content">
          <ul class="list-reset flex flex-col lg:flex-row justify-center flex-1 items-center">
            <div class="dropdown dropdown-hover">
              <a href="#" class="mx-2 text-white text-2xl justify-center">One</a>
            </div>
            <p class="mx-2 text-white text-2xl">•</p>
            <div class="dropdown dropdown-hover">
              <a href="#" class="mx-2 text-white text-2xl">Two</a>
            </div>
          </ul>
        </div>
      </nav>
      <script>
        //Javascript to toggle the menu
        document.getElementById('nav-toggle').onclick = function() {
          document.getElementById("nav-content").classList.toggle("hidden");
        }
      </script>
    </body>

    </html>

You should modify ul class names with flex directions

flex flex-col lg:flex-row
  • Above lg size: flexbox will be rows
  • Below lg size: flexbox will be columns

Note that you should be aware of the class name order from left to right.

<html lang="en">

    <head>
      <link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/tailwind.min.css" />

    </head>

    <body class="bg-gray-400 font-sans leading-normal tracking-normal">

      <nav class="flex items-center justify-between flex-wrap bg-gray-800 p-6 fixed w-full z-10 top-0">
        <div class="flex items-center flex-shrink-0 text-white mr-6">
          <a class="text-white no-underline hover:text-white hover:no-underline" href="#">
            <span class="text-2xl pl-2">Brand</span>
          </a>
        </div>

        <div class="block lg:hidden">
          <button id="nav-toggle" class="flex items-center px-3 py-2 border rounded text-gray-500 border-gray-600 hover:text-white hover:border-white">
            <svg class="fill-current h-3 w-3" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
              <path d="M0 3h20v2H0V3zm0 6h20v2H0V9zm0 6h20v2H0v-2z" />
            </svg>
          </button>
        </div>

        <div class="w-full flex-grow lg:flex lg:items-center lg:w-auto hidden lg:block pt-6 lg:pt-0" id="nav-content">
          <ul class="list-reset flex flex-col lg:flex-row justify-center flex-1 items-center">
            <div class="dropdown dropdown-hover">
              <a href="#" class="mx-2 text-white text-2xl justify-center">One</a>
            </div>
            <p class="mx-2 text-white text-2xl">•</p>
            <div class="dropdown dropdown-hover">
              <a href="#" class="mx-2 text-white text-2xl">Two</a>
            </div>
          </ul>
        </div>
      </nav>
      <script>
        //Javascript to toggle the menu
        document.getElementById('nav-toggle').onclick = function() {
          document.getElementById("nav-content").classList.toggle("hidden");
        }
      </script>
    </body>

    </html>

在tailwindcss响应式布局中垂直居中列表

人│生佛魔见 2025-02-14 17:44:52

编辑:在评论中讨论之后,标签之一不是本地,git fet -tags解决此问题。

您确定并不意味着v1.0.11..b1.0.12带有两个点(..),而不是三个(... )。

同样是b1.0.12当您表示v1.0.12时错字。我怀疑这是因为错误报告未知修订

.....的含义可以在git帮助Rev-Parse中找到。这是片段;

..(两个点)范围符号

^r1 r2集操作经常出现,以至于有一个速记。当您有两个提交R1和R2(根据上面指定修订中的语法命名),您可以要求从R2中索要可从R2到达的提交,而不包括可从R1到R1 R1 R2的r2,并且可以写为R1。 .r2。

…(三点)对称差异符号

类似的符号r1 ... r2称为R1和R2的对称差异,定义为R1 R2 - 不$(GIT MERGE-BASE - ALL R1 R2)。这是一组从R1(左侧)或R2(右侧)达到的提交,但不能从这两者中达到。

EDIT: After discussion in comments one of the tags wasn't local, git fetch --tags resolves this.

Are you sure you don't mean v1.0.11..b1.0.12 with two dots (..) rather than three (...).

Also is b1.0.12 a typo when you meant v1.0.12. I suspect this because error reports unknown revision.

The meaning of .. and ... can be found in git help rev-parse. Here's a snippet;

The .. (two-dot) Range Notation

The ^r1 r2 set operation appears so often that there is a shorthand for it. When you have two commits r1 and r2 (named according to the syntax explained in SPECIFYING REVISIONS above), you can ask for commits that are reachable from r2 excluding those that are reachable from r1 by ^r1 r2 and it can be written as r1..r2.

The …​ (three-dot) Symmetric Difference Notation

A similar notation r1...r2 is called symmetric difference of r1 and r2 and is defined as r1 r2 --not $(git merge-base --all r1 r2). It is the set of commits that are reachable from either one of r1 (left side) or r2 (right side) but not from both.

在两个标签之间获取提交历史记录的错误 - 使用&#x27; - &#x27;分开路径与修订

更多

推荐作者

櫻之舞

文章 0 评论 0

弥枳

文章 0 评论 0

m2429

文章 0 评论 0

野却迷人

文章 0 评论 0

我怀念的。

文章 0 评论 0

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文