You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
PolyglotNotebooksStudy/Docs/多语言笔记.1.0.常见问题.ipynb

181 lines
3.1 KiB
Plaintext

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

{
"cells": [
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"多语言笔记常见问题\n",
"================"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"参考:[官方文档](https://github.com/dotnet/interactive/blob/main/docs/FAQ.md)\n",
"+ 定义和概念\n",
"+ 使用多语言笔记本\n",
"+ 故障与排除"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"## 定义和概念"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"### 什么是笔记本?"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"### 什么是Jupyter Notebook"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"### 什么是JupyterLab"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"### 什么是前端?"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"## 使用多语言笔记本"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"## 故障与排除"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"dotnet_interactive": {
"language": "csharp"
},
"polyglot_notebook": {
"kernelName": "csharp"
}
},
"outputs": [],
"source": [
"var names = new string[]{\"张三\",\"李四\",\"王五\"};"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"dotnet_interactive": {
"language": "csharp"
},
"polyglot_notebook": {
"kernelName": "csharp"
}
},
"outputs": [
{
"data": {
"text/plain": [
"hello from JavaScript!"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"using Microsoft.DotNet.Interactive;\n",
"using Microsoft.DotNet.Interactive.Commands;\n",
"\n",
"var javascriptCode = \"console.log('hello from JavaScript!')\";\n",
"\n",
"await Kernel.Root.SendAsync(new SubmitCode(javascriptCode, \"javascript\"));"
]
}
],
"metadata": {
"kernelspec": {
"display_name": ".NET (C#)",
"language": "C#",
"name": ".net-csharp"
},
"language_info": {
"name": "polyglot-notebook"
},
"polyglot_notebook": {
"kernelInfo": {
"defaultKernelName": "csharp",
"items": [
{
"aliases": [],
"name": ".NET"
},
{
"aliases": [
"C#",
"c#"
],
"languageName": "C#",
"name": "csharp"
},
{
"aliases": [
"js"
],
"languageName": "JavaScript",
"name": "javascript"
},
{
"aliases": [],
"languageName": "KQL",
"name": "kql"
},
{
"aliases": [
"frontend"
],
"name": "vscode"
},
{
"aliases": [],
"name": "webview"
}
]
}
}
},
"nbformat": 4,
"nbformat_minor": 2
}