backend 相关问题

定义应用程序逻辑分隔中的组件。

如何真正学习编程

还有3个月我就要毕业了,现在正在实习。我的专业是计算机工程,但我总是感觉忘记了语法、概念和一切,就像我浪费了大学时间一样......

回答 1 投票 0

nest 无法解析 authService (jwtService) 的依赖关系

我不明白我收到了这个错误: [Nest] 1276 - 25/04/2024 19:39:31 错误 [ExceptionHandler] Nest 无法解析 AuthService(?、JwtService)的依赖项。请确保参数...

回答 1 投票 0

‘DeferredAttribute’对象没有属性

我是 django 新手.. 我不知道为什么会出现错误 它的 models.py 代码 类 PublishManager(models.Manager): def get_queryset(self): 返回 super().get_queryset().filter(status=P...

回答 1 投票 0

AXIOS put 请求不会将 JSON 参数传递给端点

我目前正在VUE中编程。 这是我使用 fastAPI 创建的用于添加位置的端点 为了从我的组件中添加位置,我在 VUE 组件中创建了一个名为 fetchNewLocat 的函数...

回答 1 投票 0

Magento 上传的图像显示以前上传的图像

我遇到了问题。当我尝试上传产品的图像时,当我将鼠标移到新上传的图像上时,新上传的图像将显示为之前上传的图像的一部分。 但是当我保存

回答 2 投票 0

AWS NodeJS Elastic Beanstalk COR 问题

我有一个 NodeJS 应用程序,在 index.js 中配置了 Cors 策略,如下所示...该应用程序托管在 AWS Elastic Beanstalk 中。虽然已经配置了 COR,但我面临的问题是

回答 1 投票 0

部署后无法从后端服务器获取数据

我使用 vite + React 创建了前端,使用 Node.js + Express 和 mongoDB 创建了后端。我的后端和前端都是使用 Render 托管的。银行端工作正常,因为我能够看到 json obj...

回答 1 投票 0

为什么在 Passport Oauth 2.0 身份验证中同时检查 req.isAuthenticated() 和 req.user?

为什么在 Passport Oauth 2.0 中同时检查 req.isAuthenticated() 和 req.user 进行身份验证?我相信仅 req.isAuthenticated() 就足以进行社交登录。我看到其他人同时使用这两种方法,但我没有

回答 1 投票 0

与后端进行原生反应

学习React Native后,我决定建立一个大项目。对于这个项目,我需要一个后端。我可以使用 Node.js、Express.js 和 MySQL 作为后端吗?我想保存注册用户的

回答 1 投票 0

当使用 Angular 创建新应用程序时....npm 安装是否需要互联网访问?

当我创建新的角度应用程序时,如果我使用互联网连接,npm 安装似乎运行得更快......我只是想知道这是否是巧合,以及是否有更快的创建方法

回答 1 投票 0

Varnish 坚持向不健康的后端发送请求

我正在解决 Varnish(版本 4)的问题,它只向单个后端主机发送流量,即使它不健康。 这是 VCL: vcl 4.0; 导入标准; 进口董事; 我...

回答 1 投票 0

如何在手机上访问本地主机

我正在构建一个 Web 应用程序,使用 Laravel 作为 API,使用 React 作为前端。我想在手机上测试该应用程序。我通常单独测试 React,它可以工作,但是来自

回答 2 投票 0

Google Gemini API 返回不准确的信息

我正在尝试使用 Google Gemini 的 API 来生成纽约市建筑物列表的响应。我已经构建了提示,给出有关构建信息的要点列表的格式...

回答 1 投票 0

AWS Amplify 或自定义后端

所以我决定要用于我想要构建的应用程序的后端。我需要的一些要求是存储图像、身份验证、地质数据。我已经计划在大部分时间使用 AWS...

回答 1 投票 0

主题:创建 Quarkus 项目时出现问题

我正在使用 Quarkus 框架,在尝试使用以下命令创建新项目时遇到问题:在此处输入图像描述: mvn io.quarkus:quarkus-maven-plu...

回答 1 投票 0

如何通过loopback4后端与Angular前端集成?

我是loopback4的新手,我正在致力于将loopback4后端与Angular前端集成。有没有关于如何执行此操作的适当文档? 我尝试在不同的论坛上搜索但没有找到...

回答 1 投票 0

使用 prisma 迁移到 sql 失败

当我在本地数据库和本地主机中使用时,迁移工作成功。 但是当我部署服务器数据库时。迁移失败 // 这是您的 Prisma 架构文件, // 了解更多信息...

回答 1 投票 0

Strapi 导入错误:“@strapi/permissions”不包含默认导出

我在使用 Strapi 时遇到导入错误。当尝试在我的项目中导入“@strapi/permissions”模块时,特别是在位于 ./Strapi Backends/

回答 1 投票 0

如何将带有连接的 linq 查询转换为方法语法?

我想将其更改为c#中的lambda查询 var innerJoinTasinmaz = 来自 _context.Tasinmaz 中的 tasin 在 tasin 上加入 _context.Mahalle 中的 mahalle。MahalleID 等于 mahalle。

回答 1 投票 0

减小/增大屏幕尺寸时可绘制窗口无法到达屏幕最右侧的问题

#酒吧 { 位置:固定; /* 固定位置以在滚动时保持在适当的位置 */ 顶部:0; 底部:0; 左:0; 宽度:3px; /* 条形的初始宽度 */ 背景色...</desc> <question vote="0"> <pre><code>&lt;html&gt; &lt;style&gt; #bar { position: fixed; /* Fixed position to stay in place on scroll */ top: 0; bottom: 0; left: 0; width: 3px; /* Initial width of the bar */ background-color: #f1f1f1; /* Background of the bar */ border-right: 1px solid #d3d3d3; /* Border of the bar */ z-index: 9; } #handle { width: 100px; /* Diameter of the handle circle */ height: 100px; /* Height of the handle circle */ background-color: #2196F3; border-radius: 50%; /* Make it round */ position: absolute; /* Absolute position within the bar div */ top: 50%; /* Center it vertically */ right: -3.125em; /* Align to the right of the bar */ transform: translateY(-50%); /* Adjust vertical position */ cursor: pointer; /* Change cursor to indicate it&#39;s draggable */ z-index: 10; clip-path: inset(0 0 0 50%); /* Clip left half of the circle */ background-image: url(&#39;https://i.gifer.com/2P5x.gif&#39;); background-repeat: no-repeat; background-size: 90% 100%; /* Width and height values */ background-position: calc(100% + 0.625em) center; /* Move the image to the right by 10 pixels from the edge */ } #handle.blue-bg { background-image: url(&#39;https://virtualisedreality.files.wordpress.com/2012/07/the-best-top-desktop-blue-wallpapers-blue-wallpaper-blue-background-hd-33.jpg&#39;); background-position-x: right; } &lt;/style&gt; &lt;body&gt; &lt;div id=&#34;bar&#34;&gt; &lt;!-- This is the draggable handle --&gt; &lt;div id=&#34;handle&#34;&gt;&lt;/div&gt; &lt;/div&gt; &lt;script&gt; // Make the handle draggable dragElement(document.getElementById(&#34;handle&#34;)); function dragElement(elmnt) { var startPosX = 0, currentPosX = 0; var maxBarWidth = window.innerWidth - (elmnt.offsetWidth / 16); // Tarayıcı penceresinin genişliğini kullanma , Set the maximum width for the bar. elmnt.onmousedown = dragMouseDown; function dragMouseDown(e) { e = e || window.event; e.preventDefault(); startPosX = e.clientX; document.onmouseup = closeDragElement; document.onmousemove = elementDrag; } function elementDrag(e) { e = e || window.event; e.preventDefault(); currentPosX = e.clientX - startPosX; startPosX = e.clientX; var bar = document.getElementById(&#34;bar&#34;); var newWidth = bar.clientWidth + currentPosX; //console.log(`newWidth = ${bar.clientWidth} + ${currentPosX} = ${newWidth}`) // Define the minimum width to keep the handle from entering the bar area var minBarWidth = 3; // This is the initial width of the bar // Restrict the width within the minimum and maximum bounds newWidth = Math.max(minBarWidth, Math.min(newWidth, maxBarWidth)); // Set the new width bar.style.width = newWidth + &#34;px&#34;; var handle = document.getElementById(&#34;handle&#34;); // Adding or removing the &#39;blue-bg&#39; class based on the handle&#39;s position if (newWidth &gt;= maxBarWidth) { handle.classList.add(&#39;blue-bg&#39;); } else { handle.classList.remove(&#39;blue-bg&#39;); } } function closeDragElement() { // stop moving when mouse button is released: document.onmouseup = null; document.onmousemove = null; } } &lt;/script&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>您好,当我缩小屏幕尺寸(比如90%、100%)时,向右拖动的窗口无法到达屏幕右下角。它可以到达屏幕的中间点等区域。 简而言之,如何确保在所有情况下,无论屏幕放大还是缩小,可绘制窗口都能到达屏幕的最右侧?这个问题有什么办法解决吗?</p> <p><em><strong>问题:</strong></em></p> <p><a href="https://i.stack.imgur.com/GUliM.png" target="_blank"><img src="https://cdn.txt58.com/i/AWkuc3RhY2suaW1ndXIuY29tL0dVbGlNLnBuZw==" alt=""/></a></p> <p><em><strong>即使放大或缩小,当您将手柄拉至最右侧时,在任何情况下都希望出现的视图:</strong></em></p> <p><a href="https://i.stack.imgur.com/SfkXN.png" target="_blank"><img src="https://cdn.txt58.com/i/AWkuc3RhY2suaW1ndXIuY29tL1Nma1hOLnBuZw==" alt=""/></a></p> </question> <answer tick="false" vote="0"> <p>这里的问题是,当您调整窗口大小时,您没有获得更新的窗口宽度。因此,要解决这个问题,就是在调整窗口大小时再次调用dragElement</p> <pre><code>// Make the handle draggable dragElement(document.getElementById(&#34;handle&#34;)); window.addEventListener(&#34;resize&#34;, function() { // call again the function if window is resize so it gets the updated window width dragElement(document.getElementById(&#34;handle&#34;)); }); </code></pre> </answer> </body></html>

回答 0 投票 0

© www.soinside.com 2019 - 2024. All rights reserved.