Root: HKLM; Subkey: "SOFTWARE\Product\Backup"; ValueType: string; \
ValueName: "BackRegPath"; ValueData: "C:\XPTUBACKUP"; Flags: uninsdeletevalue
Root: HKLM; Subkey: "SOFTWARE\Product"; ValueType: string; \
ValueName: "InstalledPath"; ValueData: "{app}\"; Flags: uninsdeletevalue
Root: HKLM; Subkey: "SOFTWARE\Product\Backup"; ValueType: string; \
ValueName: "BackTimeFmt"; ValueData: "000000"; Flags: uninsdeletevalue
Inno Setup does not support that natively. But you can run reg export command to do the export.
[Run]
FileName: "reg"; \
Parameters: "export ""HKLM\SOFTWARE\Product"" ""C:\come\path\Product.reg"" /y"
Related
I have successfully linked the netlify cms backend to my react frontend, however now my main problem is figuring out how to display said data from its folder _posts to my react frontend.
MySite
| _posts
| blog
/2020-06-23-my-post.md
| public
config.yml
backend:
name: git-gateway
branch: master
media_folder: "public/images" # Media files will be stored in the repo under static/images/uploads
public_folder: "/images"
collections:
- name: "blog" # Used in routes, e.g., /admin/collections/blog
label: "Blog" # Used in the UI
folder: "_posts/blog" # The path to the folder where the documents are stored
create: true # Allow users to create new documents in this collection
slug: "{{year}}-{{month}}-{{day}}-{{slug}}" # Filename template, e.g., YYYY-MM-DD-title.md
fields: # The fields for each document, usually in front matter
- {label: "Layout", name: "layout", widget: "hidden", default: "blog"}
- {label: "Title", name: "title", widget: "string"}
- {label: "Publish Date", name: "date", widget: "datetime"}
- {label: "Featured Image", name: "thumbnail", widget: "image"}
- {label: "Rating (scale of 1-5)", name: "rating", widget: "number"}
- {label: "Body", name: "body", widget: "markdown"}
Assume you have set your static/admin/config.yml for blog post like below
backend:
name: github
repo: ozluy/destan-nakliyat-gatsby
branch: master
media_folder: static/assets
public_folder: /assets
site_url: https://destan-nakliyat.netlify.app
collections:
- name: post
label: Post
folder: post
create: true
fields:
- { name: path, label: Path }
- { name: date, label: Date, widget: datetime }
- { name: title, label: Title }
- { name: body, label: Body, widget: markdown }
with gatsby-source-filesystem plugin you can use set your plugin settings as below in gatsby-config.js like this:
plugins: [
...,
{
resolve: `gatsby-source-filesystem`,
options: {
name: `pages`,
path: `${__dirname}/post/`,
},
},
finally you can access saved post files through GraphQL as below:
{
allFile {
edges {
node {
extension
dir
modifiedTime
}
}
}
}
I'm using Gatsby.js + Netlify CMS for my personal blog.
Yesterday, I enabled Editorial Workflow on my blog by following this link, once it's done, whenever I clicked the Save button on "Writing in Blog Collection" page, it throws an error:
Failed to persist entry: TypeError: r.has is not a function
Here is the screenshot
Also, the Big Green Publish button disappeared as well.
To reproduce
Go to the Publish Mode on this page
Add the publish_mode: editorial_workflow into your /admin/config.yml
Deploy to the live website
Go to the admin page of your website
Click the New Blog button
type anything in the new article
click Save button
you will see the error message
Here is my Github Repository for my blog:
https://github.com/franva/askwinston
Applicable Versions:
Netlify CMS version: 2.9.6 # "netlify-cms-app": "^2.9.6",
netlify-cms-core 2.22.1
netlify-cms-app 2.11.31
Git provider: GitHub
OS: Windows 10
Browser version Firefox 76.0.1 (64-bit)
Node.JS version: v12.14.1
CMS configuration
backend:
name: git-gateway
branch: master
repo: franva/askwinston
commit_messages:
create: 'Create {{collection}} “{{slug}}”'
update: 'Update {{collection}} “{{slug}}”'
delete: 'Delete {{collection}} “{{slug}}”'
uploadMedia: '[skip ci] Upload “{{path}}”'
deleteMedia: '[skip ci] Delete “{{path}}”'
media_folder: static/img
public_folder: /img
publish_mode: editorial_workflow
local_backend: true
collections:
- name: "blog"
label: "Blog"
folder: "src/pages/blog"
create: true
slug: "{{year}}-{{month}}-{{day}}-{{slug}}"
fields:
- {label: "Template Key", name: "templateKey", widget: "hidden", default: "blog-post"}
- {label: "Title", name: "title", widget: "string"}
- {label: "Publish Date", name: "date", widget: "datetime"}
- {label: "Description", name: "description", widget: "text"}
- {label: "Featured Post", name: "featuredpost", widget: "boolean"}
- {label: "Featured Image", name: "featuredimage", widget: image}
- {label: "Body", name: "body", widget: "markdown"}
- {label: "Tags", name: "tags", widget: "list"}
- name: "pages"
label: "Pages"
files:
- file: "src/pages/index.md"
label: "Landing Page"
name: "index"
fields:
- {label: "Template Key", name: "templateKey", widget: "hidden", default: "index-page"}
- {label: Title, name: title, widget: string}
- {label: Image, name: image, widget: image}
- {label: Subheading, name: subheading, widget: string}
- {label: Mainpitch, name: mainpitch, widget: object, fields: [{label: Description, name: description, widget: text}]}
- {label: Intro, name: intro, widget: object, fields: [{label: Heading, name: heading, widget: string}, {label: Description, name: description, widget: text}, {label: Blurbs, name: blurbs, widget: list, fields: [{label: Image, name: image, widget: image}, {label: Text, name: text, widget: text}]}]}
- {label: Main, name: main, widget: object, fields: [{label: Heading, name: heading, widget: string}, {label: Description, name: description, widget: text}, {label: Image1, name: image1, widget: object, fields: [{label: Image, name: image, widget: image}, {label: Alt, name: alt, widget: string}]}, {label: Image2, name: image2, widget: object, fields: [{label: Image, name: image, widget: image}, {label: Alt, name: alt, widget: string}]}, {label: Image3, name: image3, widget: object, fields: [{label: Image, name: image, widget: image}, {label: Alt, name: alt, widget: string}]}]}
- file: "src/pages/about/index.md"
label: "About"
name: "about"
fields:
- {label: "Template Key", name: "templateKey", widget: "hidden", default: "about-page"}
- {label: "Title", name: "title", widget: "string"}
- {label: "Body", name: "body", widget: "markdown"}
I am new to both React and TypeScript and am trying to make a simple React Data Grid based on their simple example here: https://adazzle.github.io/react-data-grid/docs/quick-start
Here is what I have:
import React from 'react';
import ReactDataGrid from 'react-data-grid';
const columns = [
{ key: "id", name: "ID", editable: true },
{ key: "title", name: "Title", editable: true },
{ key: "complete", name: "Complete", editable: true }
];
const rows = [
{ id: 0, title: "Task 1", complete: 20 },
{ id: 1, title: "Task 2", complete: 40 },
{ id: 2, title: "Task 3", complete: 60 }
];
export const DataTable: React.FC = () => {
return (
<ReactDataGrid
columns={columns}
rowGetter={i => rows[i]}
rowsCount={rows.length}
/>
);
};
However I keep getting an error on the link where it sets the columns in the table. It says:
(JSX attribute) DataGridProps<{ [x: string]: {}; }, React.ReactText>.columns: (ColumnValue<{
[x: string]: {};
}, unknown, string> | ColumnValue<{
[x: string]: {};
}, unknown, number>)[]
Type '{ key: string; name: string; editable: boolean; }[]' is not assignable to type '(ColumnValue<{ id: number; title: string; complete: number; }, unknown, "id"> | ColumnValue<{ id: number; title: string; complete: number; }, unknown, "title"> | ColumnValue<{ id: number; title: string; complete: number; }, unknown, "complete">)[]'.
Type '{ key: string; name: string; editable: boolean; }' is not assignable to type 'ColumnValue<{ id: number; title: string; complete: number; }, unknown, "id"> | ColumnValue<{ id: number; title: string; complete: number; }, unknown, "title"> | ColumnValue<{ id: number; title: string; complete: number; }, unknown, "complete">'.
Type '{ key: string; name: string; editable: boolean; }' is not assignable to type 'ColumnValue<{ id: number; title: string; complete: number; }, unknown, "complete">'.
Types of property 'key' are incompatible.
Type 'string' is not assignable to type '"complete"'.ts(2322)
DataGrid.d.ts(6, 5): The expected type comes from property 'columns' which is declared here on type 'IntrinsicAttributes & DataGridProps<{ id: number; title: string; complete: number; }, "id" | "title" | "complete"> & { ref?: ((instance: DataGridHandle | null) => void) | RefObject<...> | null | undefined; }'
Can anyone help me parse this error? Do I need to explicitly set the type of the columns to the type that the react data grid is expecting?
I installed the react-data-grid types and the error went away:
npm install --save #types/react-data-grid
I have such a year
import React,{InputHTMLAttributes} from "react";
export interface faceTegInput extends InputHTMLAttributes<HTMLInputElement> {
readonly Tag: string;
readonly key: string;
}
export const inputSetSearch: faceTegInput = {
type: "text",
size: 50,
maxLength: 150,
placeholder: "Search for anything",
alt: "search",
spellCheck: false,
autoComplete: "off"
};
I get this error
Type '{ type: string; size: number; maxLength: number; placeholder: string; alt: string; spellCheck: false; autoComplete: string; }' is missing the following properties from type 'faceTegInput': Tag, key.
What is the reason I can not understand.?
You are not providing Tag and key in inputSetSearch. You should whether add them to the inputSetSearch or make them optional.
DEMO
After quite a bit of googling I still can't find examples of using ag-grid-react with typescript, though the ag-grid-react project appears to have typescript typing.
In my react app, I've installed ag-grid-react: npm i --save ag-grid ag-grid-react react-dom-factories
This code looks fine as a jsx file, but if I try to use it as a typescript tsx file I get compiler errors:
const columnDefs = [
{headerName: 'Make', field: 'make'},
{headerName: 'Model', field: 'model'},
{headerName: 'Price', field: 'price'}
];
const rowData = [
{make: 'Toyota', model: 'Celica', price: 35000},
{make: 'Ford', model: 'Mondeo', price: 32000},
{make: 'Porsche', model: 'Boxter', price: 72000}
]
class App extends Component {
constructor(props: any) {
super(props);
}
render() {
return (
<div
className="ag-theme-balham"
style={{ height: '200px', width: '600px' }}
>
<AgGridReact
columnDefs={columnDefs}
rowData={rowData}>
</AgGridReact>
</div>
);
}
}
export default App;
Compile error on the AgGridReact tag
Type '{ children: never[]; columnDefs: { headerName: string; field:
string; }[]; rowData: { make: string; model: string; price: number;
}[]; }' is not assignable to type 'IntrinsicAttributes &
IntrinsicClassAttributes<AgGridReact> & Readonly<AgGridReactProps> &
Readonly<{ children?: ReactNode; }>'. Property 'columnDefs' does not
exist on type 'IntrinsicAttributes &
IntrinsicClassAttributes<AgGridReact> & Readonly<AgGridReactProps> &
Readonly<{ children?: ReactNode; }>'.ts(2322)
Any guidance anyone can offer?
False alarm: I just needed to npm install ag-grid-community, not ag-grid