Failing with simple CalendarApp script - calendar

Complete rookie here. Trying to implement a script that reads dates from Sheet and create events in Calendar. Starting from the very basics, but failing even to get the below going. When running the script not errors are given but the event is not written in Calendar.
Code below. Any thoughts?
function niccal() {
var event = CalendarApp.getCalendarById("5jl5pm0c2k4i9iuhu5m9dkr37c#group.calendar.google.com").createAllDayEvent('Apollo', new Date('July 20, 2022'));
}

Related

Salesforce developer console - APEX runner

I am trying to run code in the developer console. From the "execute anonymous window". How do i access the case written in the console from the child window.
it shows the attached error when trying to execute
I am still getting the same error. screenshot below. Please let me know if the screenshots are visible otherwise i will upload somewhere else.
"Test" is a name of a built-in apex class used when writing unit tests. It's bad idea to name your own classes like the standard ones, it can lead to "fun" scenarios like "integer account = 5; sobject a = new account();"
https://developer.salesforce.com/docs/atlas.en-us.234.0.apexref.meta/apexref/apex_methods_system_test.htm
Make new class with similar body, delete that one and try your code again.
And since your method is static, you can do MyClass.myTest(), you don't need "new"

DHTMLXGantt with ReactJS setting work_time

I am trying to use DHTMLXGantt on my reactJs project, and I have gone through their tutorial when setting it up. Now I want to modify it to only consider the working hours by adding gantt.config.work_time = true which seems pretty straightforward.
However, when I add it, it still doesn't display only the work time (08hr - 17hr), rather shows hours from 00hr - 23hr on the gantt as below:
Would really appreciate if anyone has tried a similar thing and got it working. Thanks a lot.
Enabling worktime won't automatically change the time scale,
you'll need to hide columns using gantt.ignore_time function
gantt.ignore_time = function(date){
if(!gantt.isWorkTime(date))
return true;
};

Korean Equties: Saving Tick Data using Win32com.Dispatch.WithEvents. Is this possible? [Python]

Hello, I am currently using a Korean API feed that requires win32com.Dispatch.WithEvent method to subscribe to their tick data feed. (Win32com method was the sample they gave me).
This code works well when printing (time and price) of the tick data on the console. However, I want to save the timestamp and tickdata into a List and/or to a MySQL database.
Is there an alternative to implementing the aforementioned code without the use of Win32come.Dispatch.Withevent method?
Thank you so much in advance.

Export individual cell in IPython/Jupyter notebook

I am able to export the entire notebook as HTML, but I would like to export just a single cell, together with its output.
Is there some way of doing this?
One way to do this is to use a custom preprocessor.
I explain how to do this briefly in response to Simple way to choose which cells to run in ipython notebook during run all.
To summarize: you can extend nbconvert.preprocessors.ExecutePreprocessor to create a preprocessor that checks cell metadata to determine whether that cell should be executed and/or output.
I use Jupyter Notebooks for report generation all the time, so I wrote a collection of custom processors to extend nbconvert behavior:
meta-language to determine what cells get executed and included in the final report (if/else logic on entire notebook sections)
executing code in markdown cells
removing code cells from output.
taking input arguments from the command line
I haven't had time to wrap these in an distributable extension, but you can see the code here: https://gist.github.com/brazilbean/3ebb31324f6dad212817b3663c7a0219.
Please feel free to use/modify/do-great-things with these examples. :)

drag and drop Outlook attachment from Outlook in to a WPF datagrid

I saw this code ealier about drag and dropping attachment files (http://www.codeproject.com/Articles/28209/Outlook-Drag-and-Drop-in-C) from Outlook into Windows Form and it works fine in windows Forms, but I can't seem to make it work with WPF.
I tried to simply change System.windows.form.IDataObject to System.Windows.IDataObject but it doesn't work (as I should have guessed).
I also simply tried to get the content of the e.Data FileContents but always get errors (which seems to be the case to everyone when I check on the web).
Did anyone ever did drag and dropping attachment from Outlook to WPF ? I am at a complete loss.
Edit : I am not trying to get file from a Windows Explorer windows ( I do but I know how to). It's really the whole getting attachment from Outlook directly that doesn't work . I am fully aware too that I could simple take the file from outlook into a temp folder and then drop it into my program, but I would like to avoid this unncessary step if possible.
so in the end I was able to find out a link where someone did exactly that :
https://gist.github.com/MattyBoy4444/521547
For those who wonders. Here is what I did exactly.
Create a new project in C# (my code is in VB) and add the code to it
Reference the new project in my main project to be able to use it
In my drop Event, check whether or not I had the "FileGroupDescriptorW" object in the drop data and called the method if I do to retrieve the files.
Here is the complete code
If obj.GetDataPresent("FileGroupDescriptorW") Then 'Outlook
Dim oOutLookObj As New Helpers.OutlookDataObject(e.Data)
Dim StrFiles() As String = oOutLookObj.GetData("FileGroupDescriptorW")
Dim contentStream() As System.IO.MemoryStream = oOutLookObj.GetData("FileContents")
' Do intended work...
End if
The names of the files are in StrFiles and the content are found in the streams. Both have the same array size and are order correctly.

Resources