How can I succesfully create a correctly linked pdf from a complex Google Docs

I have a similar problem as TL;DR, reported here:

Can’t download/export a large Google Docs document as PDF (what are the limits on Google Drive?). (n.d.). Retrieved 12 May 2019, from Web Applications Stack Exchange website: Can't download/export a large Google Docs document as PDF (what are the limits on Google Drive?)

My document has these features:

Pages 195 Words 30825 Characters 187142

The crucial features: many formula, images, tables, some linked to Gsheets, hyperlinks within and beyond the document.

The suggested solutions in the TL;DR discussion of using PRINT to PDF do not work for me. Reason: the hyperlinks mostly fail to be enabled as hyperlinks.

I switched from Chrome to Firefox. For about two weeks I was able to continue to add to my GDOC, then generate my pdf.

But now today, I can no longer generate the pdf from Download AS pdf or even PRINT AS pdf.

The browser seems to take a long time, then I guess it times out.

As suggested in TL;DR, I have disabled Hardware Accelearation in both Chrome and Firefox, again no help.

I am reluctantly planning to break up my file, loosing the advantages of the automatical internal links to headings, subheadings, Table of Contents etc.

I have the page published from GDOCS where it is linked on a product website. That giant html page all works very well.

See for instance:

https://docs.google.com/document/d/1MiHZCaj4Bgejv-GVnV9aN2QIN6N0Eiic0CGubRuoPVE/edit#heading=h.1r6lg2pt5ctn

Any other solutions or suggestions please?

How to correctly set “reply to” address

I have both mail system and mime mails modules installed on Drupal 8 to do emails from website to users.

  • Mail system: https://www.drupal.org/project/mailsystem
  • Mime mail: https://www.drupal.org/project/mimemail

I have a custom forward module that contains a custom form that users should use to forward an article to an email address they provide, I am using the extra modules to be able to style and use HTML module.

I got the settings to mail system as follows, I am using the mime mail module as the Formatter to enable HTML emails and the default PHP mailer as the sender.

Mail System module default settings.

Note: I tried first to use mime mail as the Formatter AND Sender but this actually did not work for some reason, it couldn’t send emails.


This way of using both modules enabled me to use HTML emails and I thought it was working until I found out that it is not working for all email services, for example, it does not work for Gmail (Which is a pretty big deal) Due to this error I found in Drupal’s recent log message.

Error sending email (from "MYWEBSITE" <MYEMAIL> to MYTEST@gmail.com with reply-to not set). 

Testing Receivers Emails:

  • Outlook: Working.
  • Gmail: Not working gives the above error.
  • Goddady Hosted Email service (Company’s Mail): Working.
  • Yahoo: Not working no error.

How to use the flocking algorithm correctly especially the immediate movement of the Boids/Entities?

I got the flocking algorithm working but when i try to click on Isometric Tile the boids move but still Keep on moving. I figured out a Minimum distance to stop but they dont. Another Problem is how can i move the boids tilewise on my isogrid just like in astar, where i Always check the next node in the path and if the unit reached it (using if(x

Well, in the beginning i tried to move ALL marked Units (e.g. like AoE) with AStar, but when it Comes to 30,100, or even 150 Units the fps = 0. So i use Google to figure out what i will have needed herefore. The flocking algorithm seemed to be Right. I have now one Agent i calculate the path for once, Maybe i Need to say here that i safe all marked unit in a List and all unmarked Units in a List. In the marked list i take Unit with the smallest path to the “Goal”-Tile as a winner = the Agent and move him tile wise. So now i try to let the others walk similiar to him. How can i achieve that?

ipcMain listener not registering correctly

Am having some troubles with ipc messages between the main and renderer processes in an electron app.

The ipcRenderer is sending the message correctly (I can see it from devtron) but the ipcMain is not listening to anything

code in main.js

const {ipcMain} = require("electron"); ... function createWindow() { ...   ipcMain.on("mainWindow-minimize", (event, arg)    => {     console.log("On minimize from main");     mainWindow.minimize();   }); ... }  

code in renderer.jsx

import React from "react" impor {ipcRenderer} from "electron" ... export default class App Extends React.Component {   constructor(props) {     super(props);     this.headerOnClick = this.headerOnClick.bind(this);   }    headerOnClick(message, event) {     console.log("button clicked");     ipcRenderer.send(message)   }   render() {     return (       <button onClick={() => this.headerOnClick("mainWindow-minimize", event)} />     )   } } 

Nevergrad not assessing bounds correctly

I’m using Nevergrad by Facebook in Python and am observing some strange behaviour relating to bounds.

Let’s find the minimum of a standard simple function:

def ackley( x, a=20, b=0.2, c=2*pi ):     x = np.asarray_chkfinite(x)  # ValueError if any NaN or Inf     n = len(x)     s1 = sum( x**2 )     s2 = sum( cos( c * x ))     return -a*exp( -b*sqrt( s1 / n )) - exp( s2 / n ) + a + exp(1) 

I’d like to use Nevergrad to optimise this. The true minimum value is at

minimum = np.zeros(n) 

which gives a calculated value of

4.440892098500626e-16. 

I’m using Nevergrad as follows:

from nevergrad import instrumentation as inst from nevergrad.optimization import optimizerlib  n = 5  # Define the variable ranges... instrum = inst.Instrumentation(*[inst.var.Array(1).asfloat().bounded(-10, 10) for _ in range(5)])  # Optimise the function... optimizer = optimizerlib.TwoPointsDE(instrumentation=instrum, budget=10000) recommendation = optimizer.optimize(lambda *args: ackley(np.array(args))) print(recommendation) 

This rightly returns:

>>> Candidate(args=(-1.4223567512956928e-11, 1.161667735276156e-11, 1.5909965473446878e-11, 3.142964723880178e-11, 2.1667036390793597e-12), kwargs={}) 

I.e., roughly zero. However, if I change the bounds to [-10, k], with k<0 I get:

k=-2 >>> Candidate(args=(-2.97922395034131, -2.979223956777669, -2.9792239575180597, -2.979223949490683, -2.979223956813635), kwargs={})  k=-4 >>> Candidate(args=(-4.986180458441733, -4.9861804545723105, -4.986180452383419, -4.986180455508544, -4.986180459693069), kwargs={}) 

…the minimum value is always claimed to be k-1*np.ones(n), however in all cases it should be at k*np.ones(n).

My question is: what’s going on here? Why is Nevergrad getting these answers so consistently wrong? Have I done something wrong with the bounds? I can’t see any documentation on the bounds so it’s largely guess work here. Any help would be appreciated!

Thanks!

Unable to correctly set access request settings

I have this CSOM in my PowerShell script:

$  Ctx = New-Object Microsoft.SharePoint.Client.ClientContext($  url) $  SPOCredentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($  userName,$  password) $  Ctx.Credentials = $  SPOCredentials  $  web = $  ctx.web $  ctx.Load($  web) $  web.RequestAccessEmail = "" $  web.MembersCanShare = $  true; $  web.AssociatedMemberGroup.AllowMembersEditMembership = $  false; $  web.Update() $  Ctx.ExecuteQuery() 

However, despite executing without errors and successfully disabling access requests, I end up with allowing site members to be added and sharing of files and folders disabled. It should be the opposite, as below.

Can anyone help please?

Thanks

Access Request settings

Is my function written correctly in parallel programming?

So I have got homework from my university to do a task in recursion and another one to do the same task with recursion and in parallel programing.

I have writen something and it looks like it is working (comparing it to the recursion task), but I want to ask if I wrote it correctly or is this not even parallel? I don’t understand parallel programming, so I don’t know how to do it correctly, please help.

Recursive:

static int F1 (int k, int n)        {            int sum = 0;            int[] sum2 = new int[100];            int max = 0;            int min = int.MaxValue;             if (n == 0) return 0;            else if (k == 1)            {                for (int i = 0; i < n; i++)                    sum += p[i];                return sum;            }            else            {                for (int l = 1; l < n; l++)                {                    for (int i = l; i < n; i++)                        sum2[l] += p[i];                     max = Math.Max(sum2[l], F1(k - 1, n - 1));                    if (max < min) min = max;                }                return min;            }         } 

Parallel:

public static int F1Par(int k, int n)         {             int sum = 0;             int[] sum2 = new int[100];             int max = 0;             int min = int.MaxValue;              int countCPU = 1;             Task<int>[] tasks = new Task<int>[countCPU];              for (var j = 0; j < countCPU; j++)                 tasks[j] = Task.Factory.StartNew(                     (object b) =>                     {                         if (n == 0) return 0;                         else if (k == 1)                         {                             for (int i = 0; i < n; i++)                                 sum += p[i];                             return sum;                         }                         else                         {                             for (int l = 1; l < n; l++)                             {                                 for (int i = l; i < n; i++)                                     sum2[l] += p[i];                                  max = Math.Max(sum2[l], F1(k - 1, n - 1));                                 if (max < min) min = max;                             }                             return min;                         }                      },j);             int total = 0;             for (var i = 0; i < countCPU; i++) total += tasks[i].Result;             return total;        }  

SVG image not rendering correctly in some screens

We are seeing a weird issue in rendering an SVG image in Chrome in Acer machine with AMD processor. We have an SVG image and it shows up properly in most of the laptop screens.enter image description here

In Acer (with AMD processor), the SVG file is rendered with green patches on top of the image as attached.

Has anyone faced this kind of issue? Any pointers or solutions are highly appreciated.

How to correctly install nvidia graphic driver on ubuntu 18.04 or 16.04

I have been struggling to install the correct driver for my GTX 1080ti on my ubuntu. I have tried to install from various method (GUI or terminal) and many driver version from 390 to 430 but it seems that after reboot, the display is always a mess (ubuntu booting logo and folder gets bigger, one of my monitor get black screen, screen is lagging, and constant warning “encounter problem”) and when I check the system details it change from NV132 to pipeline something which isn’t GTX 1080ti. Would anyone help me with this? I already reinstall ubuntu countless times already. Forgot to mention I dual boot with windows 10 on this machine

Meta tags don’t work correctly in Yii2.0

I’ve troubling about my site’s routing. All of my SEO meta elements are implemented via Metadata’s section of my CMS. One of the most important entry, named by Page routing, does work correctly. I’m going to create Meta tags for a specific page. Once I put the desired link as input in the entry “page routing” to implement those Meta tags, it does not work. For example, consider the following hierarchy to show the exact issue.

Home -> Course -> Course 1 -> topic 1 , topic 2 , … ->

When I choose, say topic 1, and want to create Metas for it, the final Tags are implemented are the ones for Course section! In other words, the internal links of the Course section of my site do not accept Tags.

I’m new to programming and couldn’t find who solve this problem.

some section of my Layout is as follows:

<link rel="canonical" href="https://physexams.com/<?=Yii::$  app- >controller->id."/". Yii::$  app->controller->action->id?>" />  <link rel="publisher" href="<?=$  metadata->publisher?>" />  <title><?= Html::encode($  metadata->title) ?></title>  <meta charset="<?= Yii::$  app->charset ?>">  <meta name="description" content="<?=$  metadata->meta_description?>"/>  

and part of Controller and its action is:

class CoursesController extends Controller {      /**      * @inheritdoc      */     public function actions()     {         return [             'error' => [                 'class' => 'yii\web\ErrorAction',             ],             'captcha' => [                 'class' => 'yii\captcha\CaptchaAction',                 'fixedVerifyCode' => YII_ENV_TEST ? 'testme' : null,             ],         ];     }      /**      * Displays homepage.      *      * @return mixed      */     public function actionIndex( $  id = 0   )     {         $  coursesP = [] ;         if ( $  id != 0 )         {             $  coursesP = Courses::find()->where(['id'=> $  id , 'itsok' => "yes"])->with('lessons')->one();              if ( empty($  coursesP) )             {                 $  this->redirect(Url::to(['courses']));             }else {                  $  courses = Lessons::find()->where(['course_id' => $  coursesP->id, 'itsok' => "yes"])->all();             }         }         else {              $  courses = Courses::find()->where(['itsok' => "yes"])->with('lessons')->all();          }          return $  this->render('index' , [             'courses' => $  courses ,             'id' => $  id ,             'parent' => $  coursesP         ]);     }     public function actionInternal( $  id  = 0 )     {            if ( $  id == NULL)         {             return $  this->redirect(Url::to(['courses/index']));         }          $  lesson = Lessons::find()->where(['itsok' => 'yes' , 'id' => $  id])->with(['course' , 'lessonElements'])->one();         $  otherLessons = Lessons::find()->where(['course_id' => $  lesson->course_id  , 'itsok' => 'yes'])->all();          if ( empty( $  lesson->id) )         {             return $  this->redirect(Url::to(['courses/index']));         }          return $  this->render('internal' , [             'lesson' => $  lesson ,              'otherLessons' => $  otherLessons          ]);     }  } 

The UrlManager config file is

<?php  $  params = array_merge(     require(__DIR__ . '/../../common/config/params.php'),     require(__DIR__ . '/../../common/config/params-local.php'),     require(__DIR__ . '/params.php'),     require(__DIR__ . '/params-local.php') );   use \yii\web\Request; $  baseUrl = str_replace('/frontend/web', '', (new Request)->getBaseUrl());    return [     'id' => 'app-frontend',     'basePath' => dirname(__DIR__),     'bootstrap' => ['log', 'thumbnail'],     'controllerNamespace' => 'frontend\controllers',     //'defaultRoute' => '/site/index',      'components' => [         'request' => [             'baseUrl' => $  baseUrl,         ],         'urlManager' => [             'baseUrl' => $  baseUrl,             'class' => 'yii\web\UrlManager',              'enablePrettyUrl' => true,             'showScriptName' => false,             'enableStrictParsing' => false,             'rules' => [                 'home' => 'site/index' ,                 '/' => 'site/index',                  'frontend/web' => 'site/index',                 'index' => 'site/index',                 'site' => 'site/index',                 'site/login' => 'site/login' ,                 'site/contact' => 'site/contact' ,                 'site/about' => 'site/about' ,                 'site/faq' => 'site/faq' ,                 'profile/logout' => 'profile/logout',                 'profile' => 'profile/index',                 'lesson/<lesson:\w+>/<id:\d+>' => 'courses/internal',                 'lesson' => 'courses/internal',                  'course/<cat:\w+>/<id:\d+>' => 'courses/index',                 'courses' => 'courses/index',                  'exam/<cat:\w+>/<id:\d+>' => 'exam/internal',                 'exam' => 'exam/index',                  'ticket' => 'ticket/index',                    'flashcard/<cat:\w+>/<id:\d+>' => 'blog/internal',                 'blog/<cat:\w+>/<id:\d+>' => 'blog/cat',                 'blog' => 'blog/index',                  '<controller:\w+>/<action:\w+>/<id:\d+>' => '<controller>/<action>',               ],             ],         'user' => [             'identityClass' => 'common\models\User',             'enableAutoLogin' => true,         ],         'log' => [             'traceLevel' => YII_DEBUG ? 3 : 0,             'targets' => [                 [                     'class' => 'yii\log\FileTarget',                     'levels' => ['error', 'warning'],                 ],             ],         ],         'errorHandler' => [             'errorAction' => 'site/error',         ],          'thumbnail' => [             'class' => 'himiklab\thumbnail\EasyThumbnail',             'cacheAlias' => 'assets/gallery_thumbnails',         ],         'assetManager' => [             'class' => 'yii\web\AssetManager',             'bundles' => [                         'yii\web\JqueryAsset' => [                             'js' => [                                 'jquery.min.js'                             ]                         ],                          'yii\bootstrap\BootstrapAsset' => [                             'css' => [                                'css/bootstrap.min.css',                             ]                         ],              ],         ],     ],     'params' => $  params, ];  

I want the Routing element works for every link which I put exactly in the Metadata section of my CMS