有人知道是否可以在带有SI前缀的MS Excel中显示数字?
我想要
... 1 n,1μ,1 m,1,1 k,1M,1 G,......
而不是科学的格式
... 1E-09,1E-06,1E-03,1,1E + 03,1E + 06.1E + 09,......
也许添加像V(伏特),F(法拉德)等单位.
我会很完美,如果单元格仍然包含数字而不是字符串,那么它可以很容易地改为另一种格式(回到科学或其他)
我目前正在做一个11ty项目并且非常喜欢它。但是我在部署输出时遇到了链接问题。我想将它部署到不同服务器上的 2 个不同位置。其中一个位置位于根目录中,另一个位于子文件夹中。
输出中是否可以有相对链接?
我已经尝试过pathPrefix,但要么我没有正确使用它,要么它没有给我我正在寻找的结果。
.eleventy.js:
module.exports = eleventyConfig => {
...
// Include our static assets
eleventyConfig.addPassthroughCopy("images")
return {
pathPrefix: "/subfolder/",
templateFormats: ["md", "njk"],
markdownTemplateEngine: 'njk',
htmlTemplateEngine: 'njk',
passthroughFileCopy: true,
dir: {
input: 'site',
output: 'dist',
includes: 'includes',
data: 'globals',
}
}
}
Run Code Online (Sandbox Code Playgroud)
当我运行时eleventy --config=eleventy.config.js --serve,会生成一个名为 的附加文件夹_eleventy_redirect,其中包括一个index.html文件:
<!doctype html>
<meta http-equiv="refresh" content="0; url=/subfolder/">
<title>Browsersync pathPrefix Redirect</title>
<a href="/subfolder/">Go to /subfolder/</a>
Run Code Online (Sandbox Code Playgroud)
当我运行eleventy --config=eleventy.config.js(没有--serve)时,该文件夹不存在。但是,无论哪种方式,所有链接都是绝对链接(例如,主页是 …
我在终端中使用 git 并且牢记我需要的大部分命令。因此,我想取消输出中的“帮助提示”,即括号中的所有文本以(use "git ...)开头,以使输出不那么冗长。
我知道标志--short和--porcelain,但是恕我直言,快速浏览时输出的可读性较差。
有没有办法保留输出的默认格式但没有帮助文本?
例子:
git status
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
Changes not staged for commit:
modified: file1.txt
modified: file2.txt
Untracked files:
untracked_file.txt
no changes added to commit
Run Code Online (Sandbox Code Playgroud)
... 代替 ...
git status
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
(use "git push" to publish your local commits)
Changes not staged for commit:
(use "git add ..." to …Run Code Online (Sandbox Code Playgroud) 我使用 Markdown 来记录我的笔记和待办事项列表(例如在 boostnote 中),并且我使用下面的代码来为待办事项做复选框
- [ ] unchecked item
- [x] checked item
Run Code Online (Sandbox Code Playgroud)
有没有办法将项目标记为未检查但不相关/失败?
例如,目标没有实现,但不再需要了。
只是不检查可能意味着它只是被忘记了,检查它意味着它已经完成,而删除它看起来就像从未考虑过它。
目前我使用这个解决方案
- [ ] ~~failed item~~
Run Code Online (Sandbox Code Playgroud)
但有点麻烦,因为它需要在项目前后添加字符。并且该项目的状态在原始/代码视图中不太明显。
有这样的事吗?这会使该项目交叉或变灰。我什么也没找到。
- [-] failed item
Run Code Online (Sandbox Code Playgroud) 我正在尝试使用 Google OAuth 进行身份验证,通过supabase设置一个网站。
通过遵循本教程并查阅文档,设置起来相当简单、方便,并且工作得非常好。
但不幸的是,Google 登录页面显示“登录以继续abcdefghijklmnopqrstuvwxyz.supabase.co ”,对于不知道什么是 supabase 的用户来说,这看起来有点粗略,而且随机字符使其看起来更糟糕。并且没有明显迹象表明这实际上是用户来自并打算登录的网站。
SUPABASE 存储库上已经存在问题,因此似乎正在解决(允许在托管 SUPABASE 控制台中配置 OAuth2 重定向域 #142并使用 Google 登录显示“继续访问 Supabase.co”#1798)。
但是,我想知道是否有另一种方法可以使用 Google OAuth 与 supabase 集成,直到有合适的解决方案为止?
更新
supabase github 页面上还有两个关于此问题的问题:
javascript authentication google-authentication oauth-2.0 supabase
我正在尝试使用FEniCS用 Python 求解偏微分方程。我安装了它anaconda并conda-forge使用它,我激活了fenicsproject环境
source activate fenicsproject
Run Code Online (Sandbox Code Playgroud)
我在jupyter(有效)中运行我的脚本,但通常使用 VS Code 来编写更复杂的代码更方便。当我在(内置)终端中运行用 VS Code 编写的脚本时,只要我fenicsproject启用了环境,它们就会运行而不会出错。
但是在编辑器中我得到了很多这样的错误
[pylint] Unable to import '...' [E0401]'
[pylint] Undefined variable '...' [E0602]
我怎样才能摆脱编辑器中的那些错误,让真正的错误脱颖而出。什么会更好,使其成为自动完成和建议工作,如包fenics,mshr等等。
我最近从 ubuntu 切换到 Manjaro。在 ubuntu 上,我使用了Tilix并将其设为我的默认终端模拟器。
我这样做了:
sudo update-alternatives --config x-terminal-emulator
Run Code Online (Sandbox Code Playgroud)
有没有办法用 Manjaro/Arch 设置默认的终端模拟器?
编辑: 我正在使用 Manjaro Gnome
我在 Linux (Manjaro Gnome) 上使用深色主题的 Inkscape(0.92,通过 pacman 安装)。
在 Inkscape 中很难看到图标(灰色对灰色),因此我想更改图标主题。我认为我应该能够通过替换 来做到这一点icons.svg,但不幸的是,如果我替换 中的文件,我看不到任何变化/usr/share/inkscape/icons/。
在 Inkscape 中的“首选项”->“系统”下有一个设置“图标主题”。但它只是一个带有位置的文本框,无法更改。
文本框内容如下所示:
/home/username/.icons
/home/username/.local/share/icons
/home/username/.local/share/flatpak/exports/share/icons
/var/lib/flatpak/exports/share/icons
/usr/local/share/icons
/usr/share/icons
/home/username/.local/share/flatpak/exports/share/pixmaps
/var/lib/flatpak/exports/share/pixmaps
/usr/local/share/pixmaps
/usr/share/pixmaps
/home/username/.local/share/inkscape/icons
/home/username/.local/share/flatpak/exports/share/inkscape/icons
/var/lib/flatpak/exports/share/inkscape/icons
/usr/local/share/inkscape/icons
/usr/share/inkscape/icons
/home/username/.config/inkscape/icons
/usr/share/inkscape/icons
/usr/share/icons
Run Code Online (Sandbox Code Playgroud)
我检查了图标文件的所有位置,并尝试将icons.svg文件添加到某些位置,重新启动 Inkscape 后没有任何变化。
还有其他方法可以更改图标吗?或者我怎样才能找到我的 Inkscape 安装从哪里获取图标表单?
这个问题似乎与这篇关于 Ubuntu 的文章类似。
在 JavaScript 中将字符串拆分为数组有很多好的(和坏的)方法。
\n例如,在 ES6 中,仅使用扩展运算符:
\nlet str = "example 1";\nlet arr = [...str];\nconsole.log(arr); \n// [\'e\', \'x\', \'a\', \'m\', \'p\', \'l\', \'e\', \' \', \'1\']\nRun Code Online (Sandbox Code Playgroud)\n当包含表情符号时,其中很多仍然有效
\nlet str = "example 2 ";\nlet arr = [...str];\nconsole.log(arr); \n// [\'e\', \'x\', \'a\', \'m\', \'p\', \'l\', \'e\', \' \', \'2\', \' \', \'\']\nRun Code Online (Sandbox Code Playgroud)\n但是,如果字符串中存在复合表情符号,到目前为止我发现的所有解决方案(例如1、2 )都会失败
\nlet str = "example 3 \xe2\x80\x8d\xe2\x99\x80\xef\xb8\x8f \xe2\x80\x8d\xe2\x80\x8d\xe2\x80\x8d";\nlet arr = [...str];\nconsole.log(arr); \n// [\'e\', \'x\', \'a\', \'m\', \'p\', \'l\', \'e\', \' \', …Run Code Online (Sandbox Code Playgroud) 我知道有几个类似的主题,但我阅读并尝试了大多数但仍然无法弄清楚如何做到这一点.
我在Joomla 2.5中编写了一个组件,它到目前为止一直有效.我有不同的视图,我可以使用controller.php加载视图.其中一个视图显示了我的数据库中的表格(有关团队的数据).
现在我想要另一个相同视图的布局,它将数据库表显示为一个表单,以便更改内容.
这是文件结构:
views/
- teams/
- - tmpl/
- - - default.php
- - - modify.php
- - view.html.php
这不在view.html.php文件中:
...
// Overwriting JView display method
function display($tpl = null) {
...
$this->setLayout('modify');
echo $this->getLayout();
// Display the view
parent::display($tpl);
}
Run Code Online (Sandbox Code Playgroud)
我尝试了setLayout,$ tpl = ...,default_modify.php等的不同组合,但我总是得到默认布局或者像'找不到布局修改'这样的错误
我用.../index.php?option = com_test&task = updateTeams加载网站
controller.php看起来像这样:
function updateTeams(){
$model = $this->getModel('teams');
$view = $this->getView('teams','html');
$view->setModel($model);
$view->display();
}
Run Code Online (Sandbox Code Playgroud) 我正在使用带有 gulp 的节点来运行一些构建任务。直到几天前,这一切正常。现在(我假设在升级/更新之后,不确定是哪个特定的。我相信这是节点从 14.4 到 14.5 的更新)我不断收到此警告
[DEP0097] DeprecationWarning: Using a domain property in MakeCallback is deprecated. Use the async_context variant of MakeCallback or the AsyncResource class instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
Run Code Online (Sandbox Code Playgroud)
我不知道如何--trace-deprecation与 gulp一起使用,所以我找不到触发它的原因。
我的实际gulpfile更长,注释掉部分,更改pipeline为.pipe,更新节点和依赖项,使用async/await,以及其他一些小的更改并没有让我更接近缩小问题的范围。
因此,我在下面设置了这个最小的工作示例:
clean_fake) 不会触发警告gulp clean并gulp styles导致警告显示[DEP0097] DeprecationWarning: Using a domain property in MakeCallback is deprecated. Use the async_context …Run Code Online (Sandbox Code Playgroud) 我开始使用 Svelte(Kit),到目前为止我真的很喜欢它。然而,我遇到了一个无法解决的问题。
我正在尝试动态显示图像,并且希望有一个备用图像,以防正常图像不存在。
对于普通的 HTML/JS,我会使用这个源:
<img src="imagefound.gif" onerror="this.onerror=null;this.src='imagenotfound.gif';" />
Run Code Online (Sandbox Code Playgroud)
我试图在我的 Svelte 项目中实现它,但它要么不起作用(例如 A),要么有时起作用(短暂或直到我刷新(例如 B))。
这是我的代码(A):
<script>
let profileImg = person.profile;
const missingProfile = () => {
console.log('image does not exist');
profileImg = '../default.png';
};
</script>
...
<img
src={profileImg}
on:error={missingProfile}
alt={person.name}
/>
Run Code Online (Sandbox Code Playgroud)
或者只是硬编码版本 (B)
<img
src="imagefound.gif"
onerror="console.log('image not found');this.onerror=null;this.src='./person.png';"
/>
Run Code Online (Sandbox Code Playgroud)
有这个问题,但我相信答案就是我正在做的事情。使用 SvelteKit 与使用 Svelte 有什么区别吗?
看起来 Svelte 甚至没有设置src,<img />如果带有图像 url 的原始变量是undefined(在我的示例中person.profile)。在这种情况下,接受的答案将不起作用。
我编辑了这一行以防止出现这种情况:
let profileImg = person.profile === undefined …Run Code Online (Sandbox Code Playgroud) javascript ×4
anaconda ×1
arrays ×1
conda ×1
eleventy ×1
emoji ×1
excel ×1
excel-2007 ×1
format ×1
git ×1
gulp ×1
icons ×1
inkscape ×1
joomla ×1
joomla2.5 ×1
linux ×1
manjaro ×1
markdown ×1
node.js ×1
oauth-2.0 ×1
php ×1
pylint ×1
python ×1
static-site ×1
string ×1
supabase ×1
svelte ×1
sveltekit ×1
templates ×1
terminal ×1