Connection error after attempting to upload or move a file with FileZilla

I’ve started using Putty and FileZilla on my windows 10 notebook to access a cluster server.

I was able to log in yesterday and had success moving, downloading and uploading some small files, but it suddenly aborted the connection after a tried to download a pbs file. So when tried to log in FileZilla with a SFTP connection it gives me a “Connection timed out after 20 seconds of inactivity” and with Putty it just gives me a black screen and then a Network error.

Today I could log in normally and then it happened again when a tried to upload a .fastq file.

I checked my Firewall and tried changing the timed out connection to 30 seconds, but it did not work.

I really need this to analyse some metagenomic data. Thank you!

How to get url of file after uploading to document library?

How do you return the URL of a file after it has been uploaded to a document library, using the default upload page? Returning the text from the “inputFile” textbox from the upload.aspx page would also work, but I can’t figure out how to do that because it’s loaded inside a modal dialog.

function uploadPicture(){ var currentUserDispName ='myname'; var options = {     url: '/test/_layouts/15/Upload.aspx?List=6c7bc1b3%2D1b7f%2D466b%2Da0f5%2Dac15dc334ff7& RootFolder=/test/mydocs/' +      currentUserDispName + "&IsDlg=1",     width: 450,     height: 230,     title: 'Upload a Picture',     dialogReturnValueCallback: function(result, returnValue) {      if (result == SP.UI.DialogResult.OK) {           //get File URL     }      else {                          //else    }     }; SP.SOD.execute('sp.ui.dialog.js', 'SP.UI.ModalDialog.showModalDialog', options);} 

Ubuntu 18.04.2 LTS problems after automatic suspend, vast file of errors on screen no functions

Hi to all I am new here and a novice Ubuntu user having escaped the clutches of Microsoft at last! I am getting a fairly regular issue with my system if left for a few hours after going into automatic suspend. I either have no functions available via keyboard or mouse or otherwise get a screen full of process information which I am unable to copy. Any help or suggestions gratefully received! N.B. I am really pleased with the setup other than this glitch, only way I can think of sharing the screen is to take picture and try to post it but it is not ideal as there are pages of info. Many thanks in advance.

How to redirect users after password reset from first time user

I am using hook function in my module to redirect users accordingly as below.

function mymodule_user_login($  account) {  if (!$  account->getLastAccessedTime()) {   // The user has never logged in before.    return;  }  $  response = new RedirectResponse('MyModuleFormUrl');  $  response->send(); } 

First time users coming from their corresponding emails are getting redirected to change password page able to set new password and existing users are redirected to form page after successful login. But the problem is how to redirect users after successfully setting their password to my module form. From the code above I thought it should happen automatically but it isn’t. Can anyone suggest some ideas.

Edit to the Question: So as suggested below I tried both the ways but still after the new user clicks save button on password reset page(setting his new password), he is not getting redirected to mymodule form page. Below are the codes I tried.

Method 1:

    function MyModule_form_alter(&$  form, &$  form_state, $  form_id){     if($  _SESSION['first_time_login']==TRUE)     {        $  _SESSION['first_time_login']==FALSE;        $  form_state->setRedirect('url');     } 

Method 2:

    function mymodule_user_form_alter(&$  form,      \Drupal\Core\Form\FormStateInterface $  form_state, $  form_id)     {        foreach (array_keys($  form['actions']) as $  action) {         if (isset($  form['actions'][$  action]['#type']) && $  form['actions']          [$  action]['#type'] === 'submit') {         $  form['actions'][$  action]['#submit'][] = 'mymodule_form_submit';          }        }     }      function mymodule_form_submit(array $  form, FormStateInterface       $  form_state){          $  form_state['redirect'] = 'url';      } 

Final function which worked for me:

    function MyModule_form_alter(&$  form, &$  form_state, $  form_id){       if($  form_id == 'user_form')       {         foreach (array_keys($  form['actions']) as $  action) {            if (isset($  form['actions'][$  action]['#type']) && $  form['actions']             [$  action]['#type'] === 'submit')            {             $  form['actions'][$  action]['#submit'][] =                 '_MyModule_user_profile_submit';            }        }      }        function _MyModule_user_profile_submit($  form, &$  form_state)       {            $  response = new RedirectResponse('url');            $  response->send();       }      

Can I use my Chinese passport to enter China after I acquired another citizenship?

I’ve recently changed my citizenship from Chinese to Canadian and I’m planning a short visit to China soon.

Is it possible to enter China with my existing Chinese passport (not expired yet) and then return to Canada with my new Canadian passport.

This becomes complicated since China does not recognize dual-citizenship. So do I need to get a China visa? Any input would be appreciated!

Black Screen after booting from USB to Install

This is my first try on the Ubuntu. The original laptop is running : Asus A43S Intel i5 Windows 10 (free upgrade from window 7 during the window 10 introduction period) 4Gb RAM Nvidia GT-520M

Created the bootable USB using Universal-USB-Installer-, with the BIOS ubuntu-18.04.2-desktop-amd64 Booted into BIOS using F2 button, selected to boot from USB (UEFI enabled) Popped up the selection page, Try Ubuntu without installing, install Ubuntu etc. Tried both option, the results are the same. Right after selection the screen goes black (but the background was lit and the fan started running a little faster) This remains the same for over an hour without any progress. Is my machine too old to run Ubuntu? Any idea how do i fix this?

Magento2 Checkout page Not Working After Installing New theme

Highly appreciate any help I have installed Porto thee to my existing magento store that was built in Luma Theme

I successfully installed Porto Theme and it’s modules but my checkout page not working after installing theme even when i click on add to cart button of any product it shows product added in cart . also cart page work fine. but when i click checkout button it go to blank page. Please advice thanks alot in advance.

WordPress verry slow after increasing memory_limit

I am running the newest WordPress version on Ubuntu 18.06 with php7.3-fpm and nginx.

It was running fast and fine, but today I needed to increase the max_upload_size to 32M, that was the point the problems began.

Before it loaded in under 2 Seconds, now its loading for over 30 seconds.

There are now errors in the nginx or php logs.


Refresh parent page after calendar event creation

I have created a new page with a default calendar webpart.

Below is what I’m doing.

  1. Click New Event and the popup gets opened
  2. Fill-in the event details
  3. Click Save and the event gets saved
  4. Calendar gets reloaded asynchronously and my new get details are shown

Though the calendar gets reloaded automatically when an event is created, I would like to reload the entire screen once the event is created, as it requires due to my other customization.

I tried creating some script with some timeout to reload the screen, in the save button as below, but it doesn’t get fired.

$  ("input[id$  =SaveItem]").click(function(){      setTimeout(function(){ parent.window.location.reload(); }, 3000); }); 

I tried another approach which executes the same kind of script when the modal dialog of “newForm.aspx” form is closed. I tried the below, but it doesn’t work either.

$  ('.ms-dlgContent').on('hidden', function(){     alert('test'); });  document.getElementsByClassName('ms-dlgContent')[0].addEventListener('hide', function (event) {      alert('Test 1');  });  document.getElementsByClassName('ms-dlgContent')[0].addEventListener('hidden', function (event) {      alert('Test 2');     }); 

Is there any way I can reload my screen once the modal dialog is closed or an event is created?

I also tried to use the SP.UI.ModalDialog class, but I couldn’t find much.