links – Creating Hyperlinks of Google Drive Items in Alphabetic Order

The original post that I got the google script editor code from was here:
Get share link of multiple files in Google Drive to put in spreadsheet
It works perfectly fine, but what I want to do is show the actual google drive link in the excel file (not the name of the file that has a hyperlink attached to it. I managed to do this by deleting #”‘ + f.getName() + ‘”# from the code, but the problem is, because they are no longer listed by file name (e.g. LG1, LG11, LG5), but by drive links (e.g.http….), the links can’t be sorted with the sort feature on sheets. Does anyone know how I can deal with this?

I will post the code below so

function myFunction() {
  var ss=SpreadsheetApp.getActiveSpreadsheet();
  var s=ss.getActiveSheet();
  var c=s.getActiveCell();
  var fldr=DriveApp.getFolderById("12e4JsJ6CXHEMaFIl1Eqmuik2ZZ1u7vEx");
  var files=fldr.getFiles();
  var names=(),f,str;
  while (files.hasNext()) {
    f=files.next();
    str='=hyperlink("' + f.getUrl() + '")';
    names.push((str));
  }
  s.getRange(c.getRow(),c.getColumn(),names.length).setFormulas(names);
}

PS: The reason I am trying to do this is because VLOOKUP doesn’t seem to work properly in excel when you try lookup cells with hyperlinks attached as it just takes the placeholder string (e.g. LG1) and gives you that without the hyperlink (e.g. http…) that was attached to it.
Another potential solution would be knowing how to sort the initial folder in the first place to my liking (haven’t managed to get that to work though)

textures – Crash when creating RenderTargetViews for Cubemap

I want to create a cubemap and I want to render to it and later sample from it for reflections.
However, It crashes when I try to create the faces for the cubemap.
Here is my code:

RenderTargetCube::RenderTargetCube(ID3D11Device* device, int resolution, DXGI_FORMAT format) {

    D3D11_TEXTURE2D_DESC desc = {};
    desc.Width = resolution;
    desc.Height = resolution;
    desc.MipLevels = 1;
    desc.ArraySize = 6;
    desc.Format = format;
    desc.SampleDesc.Count = 1;
    desc.SampleDesc.Quality = 0;
    desc.Usage = D3D11_USAGE_DEFAULT;
    desc.BindFlags = D3D11_BIND_RENDER_TARGET | D3D11_BIND_SHADER_RESOURCE;
    desc.CPUAccessFlags = 0;
    desc.MiscFlags = D3D11_RESOURCE_MISC_TEXTURECUBE;

    HRESULT res = device->CreateTexture2D(&desc, NULL, &Texture);
    throwIfFailed(res);

    D3D11_RENDER_TARGET_VIEW_DESC viewDesc = {};
    viewDesc.Format = desc.Format;
    viewDesc.Texture2DArray.ArraySize = 6;
    viewDesc.ViewDimension = D3D11_RTV_DIMENSION_TEXTURE2DARRAY;
    for (int i = 0; i < 6; i++) {
        viewDesc.Texture2DArray.FirstArraySlice = D3D11CalcSubresource(0, i, 1);
        res = device->CreateRenderTargetView(Texture.Get(), &viewDesc, RenderTargetView(i).GetAddressOf()); // crash here
        throwIfFailed(res);

    }

and here is the message I receive:

D3D11 ERROR: ID3D11Device::CreateRenderTargetView: The Dimensions of the View are invalid due to at least one of the following conditions. MipSlice (value = 0) must be between 0 and MipLevels-1 of the Texture Resource, 0, inclusively. FirstArraySlice (value = 1) must be between 0 and ArraySize-1 of the Texture Resource, 5, inclusively. With the current FirstArraySlice, ArraySize (value = 6) must be between 1 and 5, inclusively, or -1 to default to all slices from FirstArraySlice, in order that the View fit on the Texture. ( STATE_CREATION ERROR #137: CREATERENDERTARGETVIEW_INVALIDDIMENSIONS)

I dont quite understand the error message, especially the last part about ArraySize, why does it want it to be between 1 and 5 and not 0 to 5?

Creating a graph out of a string list ? Julia language

This is my first post here, I hope I’m going to do it right 🙂

Here’s my problem, I have a list of string:

(” ‘DataManager’ “, ” ‘LauncherFrame’ “, ” ‘DataManager’ “, ” ‘DataManager’ “, ” ‘DataManager’ “, ” ‘DataManager’ “, ” ‘DataManager’ “, ” ‘DataManager’ “, ” ‘DataManager’ “, ” ‘DataManager’ “, ” ‘ToolBox’ “, ” ‘ToolBox’ “, ” ‘ToolBox’ “, ” ‘ToolBox’ “, ” ‘ToolBox’ “, ” ‘MonoWellInterpretationView’ “, ” ‘MonoWellInterpretationView’ “, ” ‘MonoWellInterpretationView’ “, ” ‘MonoWellInterpretationView’ “, ” ‘MonoWellInterpretationView’ “, ” ‘MonoWellInterpretationView’ “, ” ‘MonoWellInterpretationView’ “, ” ‘MonoWellInterpretationView’ “, ” ‘MonoWellInterpretationView’ “, ” ‘MonoWellInterpretationView’ “, ” ‘MonoWellInterpretationView’ “, ” ‘ToolBox’ “, ” ‘DataManager’ “, ” ‘DataManager’ “, ” ‘DataManager’ “, ” ‘DataManager’ “)

This list corresponds to the names of all the windows opened during a log(session ?) on the software I am working on. The order of the names is important since it corresponds to the sequences between the windows for example the window “DataManager” was opened first then “LauncherFrame” and then again DataManager etc …

I’m trying to make a directed graph with this list where the nodes are the different types of windows and the edges are the possible transitions from one window to another (for example here there would be an arrow from DataManager to LauncherFrame etc…).
Here’s what I have done so far :

frame = countmap(WindowsType)

Dict{Any,Int64}(” ‘MonoWellInterpretationView’ ” => 11,” ‘DataManager’ ” => 13,” ‘LauncherFrame’ ” => 1,” ‘ToolBox’ ” => 6)

FrameLabel=
for i in keys(frame)
FrameLabel = (FrameLabel;i)
end

A = (0 0 2 3
0 0 0 0
1 3 0 0
0 0 3 0)

  G = DiGraph(A)
  # save to png
draw(PNG(“graph.png”, 100, 100),gplot(G, nodelabel=FrameLabel))

Graph Test

As you can see I managed to create a graph with arrows and with a node for each type of window, the problem is the matrix A of the edges. How could I “automate” it without having to create it “by hand” for each string list that I will have? How could I create this matrix A (for edges) directly from my list of string with inside the transitions between the windows and their frequency for each type of transitions?

I hope I have been clear and not asked a stupid question !

Thank you in advance for your answers,

Have a good day, Valentine
PS : Sorry if my english is bad :sweat_smile:

networking – Creating a virtual network adapter on Windows to implement VPN

I would like to implement a custom VPN client on Windows 10 and therefore I am looking for examples how to create a virtual network adapter where I can grab all IP packets for a dedicated subnet.

I was also taking a look at OpenVPN and SoftEther but it looks like that the source code is no longer supported with Visual Studio 2019.

Creating Banners (YouTube/Websites) (Photoshop) and other Website Graphics | Forum Promotion

Just to add on, I can create favicons for websites and banners too (not the gif ones like in my signature though). I can discuss this type of stuff in PMs.
While I’m not completely limited to just YouTube graphics, I can modify them to fit the needs of a website too. Please contact me further for this type of stuff…

 

Creating YouTube Banners (Photoshop) | Forum Promotion

I’ve basically gone back to creating YouTube banners. It’s a hobby that I used to do in the past (when I was very interested in Photoshop) and I have downloaded it again. I am creating free templates for those who want it to boost their channel art a bit on their channel. All you need to download the template is to be a registered member on my forums page. I have showcased it on my YouTube channel which you can find here. I have also included a preview of the template here:

YouTube Banner Template Image.png

I aim to create more of these free templates in the future and showcase them on my YouTube channel and put them on my website for download.
I also create cheap banners for those who would be interested in them for their YouTube channels.
Feedback would be really good and help me plan further on what to do next and would be much appreciated. Thank you :)

magento2 – Magento 2 : Marketplace Type Error occurred when creating object error

I have uploaded the extension in the marketplace, but it’s failed in
the enterprise edition. There is no issue in the community version.

I have tried to resolve by clearing var/generation folder and running di:compile command but it not working.

Error

Review Results:

Test environments Used: 
Magento 2.3.5 Enterprise Edition (PHP 7.3.17)
Magento ver. 2.2.11 Enterprise Edition (PHP 7.2.30)

Report:-

(2020-06-23 09:46:37) report.CRITICAL: Type Error occurred when
creating object:
MyvendorGiftCardModelResourceModelTemplatesCollectionInterceptor,
Argument 5 passed to
MyvendorGiftCardModelResourceModelTemplatesCollectionInterceptor::__construct()
must implement interface MagentoFrameworkDBAdapterAdapterInterface
or be null, string given, called in
/var/www/html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php
on line 121 () () (2020-06-23 09:46:37) report.CRITICAL: Type Error
occurred when creating object:
MyvendorGiftCardModelResourceModelTemplatesCollectionInterceptor
() ()

MyvendorGiftCardModelResourceModelTemplatesCollection.php

<?php
    
    namespace MyvendorGiftCardModelResourceModelTemplates;
    
    /**
     * Templates model collection
     */
    class Collection extends MagentoFrameworkModelResourceModelDbCollectionAbstractCollection
    {
        
        /**
         * init constructor
         */
        protected function _construct()
        {
            $this->_init(
                MyvendorGiftCardModelTemplates::class,
                MyvendorGiftCardModelResourceModelTemplates::class
            );
        }
    }

If Anyone has any ideas, please let me know.

Creating an engine using python

I want to create a game engine and later use it to create games in 8 bit style. I know I don’t need to do this but I want to do it anyway. I got heavily inspired by The Cherno.
I’m just starting and following The Cherno’s game engine series, he uses Visual Studio and C++ and talks about all the necessary steps to prepare everything with creating the engine.

So I want to know what I have to do in order to create an environment to create my engine

And to make things harder, I want to use VIM as my IDE as much as possible. Watching The Cherno’s series i realize I have to make an executable so I search how this is done and found a number of ways that do that (py2exe,py2app```,pyinstaller“`) but apparently some of them are not compatible with python 3.5+ or are not in development any more.

python – Creating names from URLs

I am creating a NAME column in a DataFrame and set its value based on substrings contained in another column.

Is there a more efficient way to do this?

import pandas as pd
df = pd.DataFrame((('www.pandas.org','low'), ('www.python.org','high')),
     columns=('URL','speed'))
print(df.head())


df('Name') = df('URL')  #is this an intellingent thing to do?
print(df.head())

#set Name based on substring in URL
df.loc(df('Name').str.contains("pandas", na=False), 'Name') = "PANDAS"
df.loc(df('Name').str.contains("python|pitone", na=False), 'Name') = "PYTHON"
print(df.head())