createmap.sh我的文件夹中有这个脚本public/scripts。我需要在主部署上运行它,yaml 文件中的代码是
name: create-map
on: push
run: .public/script.sh
runs-on: ubuntu-latest
shell: bash
Run Code Online (Sandbox Code Playgroud)
这是一个简单的脚本,应该创建一个站点地图并 ping google
# yarn sitemap
$ cd public
$ rm -rf sitemap
$ mkdir sitemap
$ cd ..
$ cd scripts
$ node ./sitemap-posts.js
$ node ./compress-map.js
$ node ./create-one-map.js
$ curl http://google.com/ping?sitemap=https://website.com/sitemap.xml
Run Code Online (Sandbox Code Playgroud)
我的文件夹结构是rootdirectory/scripts和rootdirectory/public
当我部署时,脚本未运行,我不知道问题出在哪里
我需要验证用户提供其姓名和电话号码的表格。我有一个正则表达式,可以确保名称仅包含字母,没有其他内容,对于数字输入,我还需要确保字段中只有数字。我的代码看起来像
validator: (value) => value.isEmpty
? 'Enter Your Name'
: RegExp(
'!@#<>?":_``~;[]\|=-+)(*&^%1234567890')
? 'Enter a Valid Name'
: null,
Run Code Online (Sandbox Code Playgroud)
如果输入任何特殊字符或数字,我能得到一个以这种方式验证名称的正则表达式吗?它表示错误,这意味着只有字母是有效的,而如果输入字母或任何特殊字符,则它可以以一种方式验证数字的正则表达式变成错误,意味着仅数字输入有效
我刚刚设置了我的应用程序并集成了应用程序检查,代码如下所示
import { initializeApp, getApps } from "firebase/app";
import { getAuth, } from "firebase/auth";
import { getAnalytics } from "firebase/analytics";
import { getFirestore } from "firebase/firestore";
let app;
if (!getApps().length) {
app = initializeApp({
apiKey: process.env.NEXT_PUBLIC_API_KEY,
authDomain: process.env.NEXT_PUBLIC_AUTH_DOMAIN,
projectId: process.env.NEXT_PUBLIC_PROJECT_ID,
storageBucket: process.env.NEXT_PUBLIC_STORAGE_BUCKET,
databaseURL: process.env.NEXT_PUBLIC_DATABASE_URL,
messagingSenderId: process.env.NEXT_PUBLIC_MESSAGING_ID,
appId: process.env.NEXT_PUBLIC_APP_ID,
});
}
async function initialize() {
const { initializeApp } = require("firebase/app");
const { initializeAppCheck, ReCaptchaV3Provider } = require("firebase/app-check");
const app = initializeApp({
apiKey: process.env.NEXT_PUBLIC_API_KEY,
authDomain: process.env.NEXT_PUBLIC_AUTH_DOMAIN,
projectId: process.env.NEXT_PUBLIC_PROJECT_ID,
storageBucket: process.env.NEXT_PUBLIC_STORAGE_BUCKET,
databaseURL: …Run Code Online (Sandbox Code Playgroud) 我有一个在线播放音频的音乐应用程序。唯一的问题是每次我退出应用程序时它都会被杀死,这对用户不利。即使在退出后,他们也需要它在后台继续运行。我怎样才能做到这一点?
当我将其与Firebase集成后尝试构建默认的flutter应用程序时出现此错误
我已将googleservices.json放在正确的位置。现在它说它正在不存在的位置搜索它。喜欢
src\debug\nullnull\google- services.json
Run Code Online (Sandbox Code Playgroud)
该文件夹甚至不存在,我已经查看过并且不存在。
Launching lib\main.dart on Phone in debug mode...
Configuration 'compile' in project ':app' is deprecated. Use
'implementation' instead.
registerResGeneratingTask is deprecated, use
registerGeneratedFolders(FileCollection)
registerResGeneratingTask is deprecated, use
registerGeneratedFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugGoogleServices'.
> File google-services.json is missing. The Google Services Plugin cannot
function without it.
Searched Location:
C:\Users\rober\Documents\VS\APPNAME\android\app\src\nullnull\debug\google-
services.json
C:\Users\rober\Documents\VS\APPNAME\android\app\src\debug\nullnull\google-
services.json
C:\Users\rober\Documents\VS\APPNAME\android\app\src\nullnull\google-
services.json
C:\Users\rober\Documents\VS\APPNAME\android\app\src\debug\google-
services.json
C:\Users\rober\Documents\VS\APPNAME\android\app\src\nullnullDebug\google-
services.json
C:\Users\rober\Documents\VS\APPNAME\android\app\google-services.json
* Try: …Run Code Online (Sandbox Code Playgroud) 我有一张有三个容器的卡。前两个包含文本,最后一个包含文本旁边的TextFormField。所以我要排成一排,将两者保持在一起。唯一的事情是,当我添加TextFormField小部件时,它没有出现并且控制台抛出错误
??? EXCEPTION CAUGHT BY RENDERING LIBRARY
??????????????????????????????????????????????????????????
I/flutter (14101): The following assertion was thrown during
performLayout():
I/flutter (14101): BoxConstraints forces an infinite width.
I/flutter (14101): These invalid constraints were provided to
RenderRepaintBoundary's layout() function by the
I/flutter (14101): following function, which probably computed the invalid
constraints in question:
I/flutter (14101): _RenderDecoration._layout.layoutLineBox
(package:flutter/src/material/input_decorator.dart:750:11)
I/flutter (14101): The offending constraints were:
I/flutter (14101): BoxConstraints(w=Infinity, 0.0<=h<=100.0)
I/flutter (14101): Another exception was thrown: RenderBox was not laid out:
RenderPadding#150b0 relayoutBoundary=up3 NEEDS-PAINT
I/flutter (14101): Another …Run Code Online (Sandbox Code Playgroud) 我在我的 nextjs 应用程序中有这个贝宝集成。当我加载页面时,一切都加载良好,但是当我从页面导航并返回时。它抛出一个错误
unhandled_error: zoid destroyed all components?
Run Code Online (Sandbox Code Playgroud)
Paypal 根本不提供有关此错误的任何其他信息。
我的代码只是一个普通的组件
componentDidMount() {
paypal
.Buttons({
createOrder: (data, actions)=> {
return actions.order.create({
purchase_units: [{
amount: {
currency_code: "USD",
value: amount,
},
}],
});
},
onCancel: function(data){
//console.log(data)
},
onError: function(err){
console.log(err)
}
})
.render("#paypal");
}
<div id="paypal" className=""></div>
Run Code Online (Sandbox Code Playgroud)
我究竟做错了什么
我有这个应用程序,它有一个 sliverlist 和一个 sliverAppbar。我需要获取 sliverlist 中每个项目的当前滚动位置onscroll,并确定它是否越过 sliverAppbar 并使用该项目的标题更新 sliverappbar。假设从 Item1 开始,一旦它穿过 SliverAppBar,这意味着我正在查看 Item1 内容,当 Item2 穿过 SliverAppBar 时,用标题更新 SliverAppBarItem2意味着用户正在查看Item2内容
我正在尝试使用 a 来实现这一点,NotificationListener<ScrollEndNotification>但我被困在第二个NotificationListener上,它应该在这一行向父级顶部发出通知,ScrollEndNotification(metrics: , context:context).dispatch(context);它会抛出一个错误,我应该提供一个metrics我不知道要提供什么的参数。
SliverList(
delegate: SliverChildBuilderDelegate(
(BuildContext context, int index) {
ScrollEndNotification(metrics: , context:context).dispatch(context);
return AutoScrollTag(
key: ValueKey(index),
controller: controller,
index: index,
child: Padding(
padding: const EdgeInsets.only(
top: 30.0, left: 20.0, right: 20.0),
child: Container(
color: Colors.red,
//height: 120.0
//height: A varying height
),),},); ),
Run Code Online (Sandbox Code Playgroud)
完整的代码是
Widget …Run Code Online (Sandbox Code Playgroud) 我有一个TextFormField应该接收数字的。在输入第一个数字时,它应该跳到第二个TextFormField然后到第三个 TextFormField。每个TextFormField都有FocusNode我只是不知道如何使用它的属性。我有这个
TextFormField( //First Field
autofocus: true,
focusNode: FocusNode(),
decoration: InputDecoration(
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(4.0)
),
),
style: TextStyle(
color: Colors.orange,
fontSize: 15.0,
),
keyboardType:
TextInputType.number,
maxLength: 1,
),
// second Field
TextFormField(),
//third Field
Run Code Online (Sandbox Code Playgroud) Tailwind css 中的默认下划线颜色是黑色。例如,如何将此颜色更改为浅绿色。他们列出了一种更改基本样式中默认链接下划线颜色的方法,如下所示
@tailwind base;
a {
color: theme('colors.blue');
text-decoration: underline;
}
@tailwind components;
@tailwind utilities;
Run Code Online (Sandbox Code Playgroud)
如何更改span标签的默认正常下划线颜色
flutter ×5
dart ×3
firebase ×2
android ×1
bash ×1
flutter-test ×1
javascript ×1
next.js ×1
paypal ×1
reactjs ×1
regex ×1
tailwind-css ×1