外文分享

Google Slides API - How way change theme via API

丶灬走出姿态 提交于 2021-02-20 02:52:01
问题 (Sorry for my english) I have a problem when using Google Slides API. How can I choose a theme when create new presentation with Google Slides API? Thanks. 1. create a presentation function createPresentation($title) { $presentation = new Google_Service_Slides_Presentation(array( 'title' => $title )); $presentation = $this->slidesService->presentations->create($presentation); $presentationLastId = $presentation->presentationId; return $presentationLastId; } 2. append a slide protected

Why can not I upload the node_modules file into GitHub repository?

落爺英雄遲暮 提交于 2021-02-20 02:51:48
问题 I have a project I wrote using angular 6. I want to upload into GitHub the project but when i upload the project with GitHub Desktop, all files are uploaded except node_modules file. When i download the project from GitHub and i try to run, because of the node_modules file is not uploaded, the project is not working. So other people can not run the project too. if i can include the node_modules file in the GitHub Repository. it will run. So, Why the node_modules file does not upload into

Hugo version not updating to latest

寵の児 提交于 2021-02-20 02:51:31
问题 I am trying to work with the Hugo static site generator. Problem: Hugo is saying it is updated to the latest version but it is not. $ hugo version Hugo Static Site Generator v0.40.1 linux/amd64 BuildDate: 2018-04-25T17:16:11Z But the latest version is now v0.70.0 System: Windows Subsystem for Linux via the terminal in Visual Studio Code v1.45.0 Any help would be much appreciated thank you all. 回答1: If you've installed it via the apt package manager, you might be out of luck there, because the

PL/SQL procedure/function to show data from different tables dynamically alongwith the column names in first data row

╄→尐↘猪︶ㄣ 提交于 2021-02-20 02:51:14
问题 I have a requirement like below. There are 70 tables and I have to build 70 queries from those 70 different tables depending on some condition. Let us say the table names are TAB_1,TAB_2,TAB_3.....,TAB_70 .The number of columns and data type of the columns are different in each table. I will get user input and I have to pass that value to an Oracle PL/SQL function or procedure GET_RESULT() and get the output in tabular format(same as we get when we run a query). Also, I have to show the

SwiftUI: Switch .sheet on enum, does not work

做~自己de王妃 提交于 2021-02-20 02:51:10
问题 I have two Modal/Popover .sheet 's I would like to show based on which button is pressed by a user. I have setup an enum with the different choices and set a default choice. Expected behaviour: When the user selects any choice, the right sheet is displayed. When the user THEN selects the other choice, it also shows the correct sheet. Observed behaviour: In the example below, when the user first picks the second choice , the first sheet is shown and will continue to show until the user selects

The Component “XML Source” Was unable to process the XML data. ambiguous complextype definition. The Element '%' has multiple members named '%'

邮差的信 提交于 2021-02-20 02:51:10
问题 I am trying to load the XMl file using SSIS. I have My Sample XML and corresponding XSD. In my SSIS package XML Soruce, provided the Input XML File path and XSD path and when i am tryng to see the columns then i was getting the below error The Component "XML Source" Was unable to process the XML data. ambiguous complextype definition. The Element 'childusages' has multiple members named 'usages' And i tried validating the XML and corresponding XSD with .Net(C# or VB) and it passed the

How to Judge if a Color is Green?

二次信任 提交于 2021-02-20 02:50:50
问题 What is the formula for deciding if an rgb code is green? Here is an attempt: public boolean isGreen(Color color){ return (color.getGreen() > 0.8*(color.getBlue()) && color.getBlue() > color.getRed()); } That is, return true if the green value of rgb is considerably greater than the blue, and the blue is greater than the red. A test was conducted on its accuracy. Methods: A JavaFX program generated 132 orbs every 6 seconds, each with an rgba (alpha is irrelevant in this case) value of (Math

Clarify some things about IDisposable interface. Is instance (must be) equals null after calling Dispose?

笑着哭i 提交于 2021-02-20 02:50:14
问题 I have a class which implements IDisposable interface. using System; class A : IDisposable { public void Dispose() { Stop(); // some actions to stop internal threads this = null; } } Why can't I assign this = null in Dispose method ? I know 'this' is read-only. For example: A a = new A(); a.Run(); // ... a.Dispose(); // i want in this line a = null I thought IDisposable and Dispose method guarantee that instance of class A will be equals to null after calling Dispose(). But it's not true. 回答1

Solving UnauthorizedAccessException issue for listing files

[亡魂溺海] 提交于 2021-02-20 02:50:10
问题 Listing all files in a drive other than my system drive throws an UnauthorizedAccessException . How can I solve this problem? Is there a way to grant my application the access it needs? My code: Directory.GetFiles("S:\\", ...) 回答1: Here's a class that will work: public static class FileDirectorySearcher { public static IEnumerable<string> Search(string searchPath, string searchPattern) { IEnumerable<string> files = GetFileSystemEntries(searchPath, searchPattern); foreach (string file in files

Pass parameter to form action in HTML

不羁的心 提交于 2021-02-20 02:50:10
问题 I am trying to implement a simple file upload using the files here : http://www.sanwebe.com/2012/05/ajax-image-upload-and-resize-with-jquery-and-php I have it working and managed to change the styles etc via CSS and change the filenames etc etc. I now need to use this in an iframe and pass a variable for the filename. In my app I can use either localstorage,setItem('clientID',10) or add a parameter to the iframe url. www.xxx.com/uploads?clientID= 10. The plugin has an html file that then