Databricks command says databricks-cli isn’t configured when run from Python (with os.system()) but works fine when pasted into command line

My Python code constructs a string in the form
myCmd = 'databricks fs cp dbfs:/mnt/extracts/dsp/{}/full.xml "{}"'.format(extractId, file_path)

This results in a string like this: databricks fs cp dbfs://mt/extracts/dsp/123/full.xml c:\filepath\full.xml

When I attempt to run this string using os.system(myCmd) I’m given the following warning (either within the Python console, or in the cmd window):
Error: InvalidConfigurationError: You haven't configured the CLI yet! Please configure by entering `C:\Users\xxxx\AppData\Local\Continuum\anaconda3\Scripts\databricks configure

But when i copy and paste the constructed myCmd to the command prompt the databricks copy works fine.

Cannot use ps2 keyboard during booting and in grub but works fine after os is loaded

A few days ago I installed and updated UBUNTU to it latest version during that period my keyboard worked fine in bios. And now I can’t boot to windows due to keyboard not working in grub. I tried removing CMOS battery but no difference. Also tried usb keyboard but same result. Pls help. AND THANKS IN ADVANCE.

When I use “echo” in vendor methods – products not showing, but work fine without it

I got the next code:

public function getProductCollection() {     if (isset($  this->_productCollections[$  this->getCurrentCategory()->getId()])) {         $  collection = $  this->_productCollections[$  this->getCurrentCategory()->getId()];     } else {         $  collection = $  this->collectionProvider->getCollection($  this->getCurrentCategory());         $  this->prepareProductCollection($  collection);         $  this->_productCollections[$  this->getCurrentCategory()->getId()] = $  collection;     }     echo "Collection count".$  collection->count();     return $  collection; } 

When I tried to echo collection count – it always equals 0, but when I delete this string – everything is okay count equals 16. How?

SharePoint Sites “page not displayed” in Server working fine in workstation

We recently applied Windows Server service pack in our QA farm. After-reboot i no longer can browse nay sites from Server themselves, but when i hit that web URL from my workstation they work fine.

Where do i start with this issue:

Troubleshooting steps i performed:

checked services: Working as expected.

Application pool: Started

IIS Sites: Started

Virtual Directory: Contains all files

Disable loopback check: set to 1

checked httperr files under windows\system32\logfiles: Connection looks good.

SharePoint Log is throwing :

Forced due to logging gap, cached @ 11/17/2014 10:44:40.17, Original Level: Verbose] SQL connection time: 0.0516825462454027 for Data Source=SQL;Initial Catalog=SharePoint_AdminContent_d0f8c674-b1ef-4990-b002-21688ce9517d;Integrated Security=True;Enlist=False;Pooling=True;Min Pool Size=0;Max Pool Size=100;Connect Timeout=15;Application Name=SharePoint[w3wp][14][SharePoint_AdminContent_d0f8c674-b1ef-4990-b002-21688ce9517d]

Checked with SQl team, no issues in logs and all db’s are healthy

Service Account Lockout status: Unlocked

Service account permission in db: Looks good.

Ran a Fiddler on the server, got following response.

fiddler.network.https> Failed to secure existing connection for cadmininternal.xyz.com. Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. InnerException: System.Net.Sockets.SocketException (0x80004005): An existing connection was forcibly closed by the remote host 

at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)

Is there anything i can do?

If I overstay in Thailand for just 1 day and pay the 500 Baht fine, do I still get some “Overstay” stamp on my passport?

I am currently in Thailand on an extended tourist visa for 90 days. When my visa duration ends I should exit Thailand to issue a student visa and then come back to Thailand.

Due to a mistake at the immigration office (29 days extension instead 30 days extension) my visa expires 1 day before my flight out which was already booked before extending the visa at the immigration office where the extending mistake was made.

Possible solutions:

  • Pay a 1 day 500 baht fine for overstaying 1 day.
  • Contact Thai Air Asia to early my ticket just by 1 day or cancel it and re-booking (which would raise the price a bit)
  • Going back, sometime in the coming two months, to the quite far immigration office to get a new extension stamp (it might mess my already messy-stampy passport but maybe the stamp will be on the same page and it won’t); only going there back and forth is about 300 Baht and will take several hours in traffic jams.

Assuming I choose to pay 500 fine in the end, I fear of an overstay stamp,
am I supposed to get an “overstay” stamp for one day?

virt-manager does not show vnc machines but virt-viewer is working fine

virt-manager (1.32) stops to show the guest screens but virt-viewer is working fine.

When I issue a virt-viewer command, I got the guest screeen:

virt-viewer –connect=qemu+ssh://supervisor@192.168.0.21/system Linux22

But when I call from virt-manager, the guest screen is blank and do not accept keyboard commands either.

How can I fix virt-manager or get debug info?

Ubuntu 18.04lts boot up locks-up, then boots fine

Using 18.04LTS, and last month when it updated and needed to reboot to ‘finish’, it locked-up upon reboot and has been doing this ever since – I go to boot up, it gets to the blank screen where the mouse pointer shows up, and then the pointer freezes, the light for HD access goes out, and nothing is responsive – dead…. So, hold down the power button, reboot, and it goes to the purple page with the count down and list, defaults, and boots up fine… thankfully there’s my VISTA64 laptop that works without all this linux grief, that I now have to depend on for daily work – and which btw works flawlessly (but no ‘updates’ to it to mess it up – too old for microslop) ~ sure wish linux did as well. Think I’ll have to wipe drive and restore backup image to fix unless someone knows what is bugging this thing… maybe then just cut off updates all together as they just seem to cause problems so who needs them ~ so much for LTS?

Win 10 +Ubuntu dual Boot – Live USB cannot see my SSD volumes but Win10 works fine

I am look for some advice/ help on this perplexing issue that has been hounding me for days now.

I am not sure if this is Ubuntu Issue or Lenovo issue.

I have X1 Carbon 6th Gen. It came with 512 SSD with windows 10. I split SSD into 2 parts, and installed ubuntu 18.04 into the second one. Grub is my boot manager

Everything was working fine. One day, Ubuntu crashes. On subsequent boot, it takes me to initramfs prompt, saying that I need to run fsck manually on /dev/nvme0n5. Once I run that, it says that it cannot re-mount nvme0n5 – no such file or directory exists. It happens every single time.

I googled a bit. I was told I need to run fsck on nvme0n5 outside of system using Live USB. I created Ubuntu Live USB using Rufus with Gpt and UEFI. When I boot in, I was not able to see nvme0n5 using $ fdisk -l. Moreover, I can’t see any partition except USB on Gparted

Since then I have tried:

Live USB with/ without Secure Boot option

  • Disabling Bitlocker Some people suggested changing SSD config to AHCI
  • from Raid. I cannot see any such option in my BIOS utility. In fact,
  • I hardly see any information on SSD in boot Disable UEFI only boot to
  • Legacy, Both options in BIOS
  • Run ubuntu in recovery option – it always gets stuck on purple screen with inital ramdisk … even with nomodeset options.

In all of this, Win 10 works perfectly fine. I thought about re-installing Ubuntu. However, all online guides suggest I do it via Live USB, and I can’t find my SSD volume when I try to install via Live USB option.

Any advice/ help would be a lifesaver!

code works fine any good suggestions to optimize and better code

The following code works fine. on clck ajax calls a method and return the query result. which i am displaying in view. the problem is i read many articles everyone is doing HTML code in controller when getting data with ajax and show in view as same i did. any good suggestions to avoid HTML code in controller make controller view and script separate

Controller:

public function ajax(Request $  request){   // $  data = $  request->all();  $  data['products'] = Product::select('products.id', 'products.name', 'products.banner')->get();  foreach ($  data['products'] as $  product){     echo $  product->name; }    // dd($  data); // if($  request->ajax()){ //     return "AJAX"; // } // return "HTTP";  // $  data['products'] = Product::select('products.id', 'products.name', 'products.banner')->get(); // return $  data; 

}

Script

 <script type="text/javascript">      // $  .ajaxSetup({ headers: { 'csrftoken' : '{{ csrf_token() }}' } });         $  (document).ready(function(){          // Load more data         $  ('.load-more').click(function(){             var row = Number($  ('#row').val());             var allcount = Number($  ('#all').val());             var rowperpage = 3;             // row = row + rowperpage;             row = row + 3;              if(row <= allcount){                 $  ("#row").val(row);                  $  .ajax({                 url: "{{ route('ajax') }}",                 type: 'post',                 datatype: 'JSON',                 headers: {                     'X-CSRF-Token': $  ('meta[name="csrf-token"]').attr('content')                 },                 data: {row:row},                 // error: function(XMLHttpRequest, textStatus, errorThrown) {                 //     alert('hi');                 // }                  success: function(response){                  // Setting little delay while displaying new content                 setTimeout(function() {                     // appending posts after last post with class="post"                     $  (".post:last").after(response).show().fadeIn("slow");                      var rowno = row + 3;                      // checking row value is greater than allcount or not                     if(rowno > allcount){                          // Change the text and background                         $  ('.load-more').text("show less");                         $  ('.load-more').css("background","darkorchid");                     }else{                         $  (".load-more").text("Load more");                     }                 }, 2000);                   }   });              }else{         $  ('.load-more').text("Loading...");          // Setting little delay while removing contents         setTimeout(function() {              // When row is greater than allcount then remove all class='post' element after 3 element             $  ('.post:nth-child(3)').nextAll('.post').remove().fadeIn("slow");              // Reset the value of row             $  ("#row").val(0);              // Change the text and background             $  ('.load-more').text("Load more");             $  ('.load-more').css("background","#15a9ce");          }, 2000);       }          });          }); </script> 

view

    @foreach($  leedManufacturers as $  leedsManufacturer)                     {{-- @foreach($  leedManufacturers as $  leedsManufacturer)  --}}                         <div class="post" id="post{{$  leedsManufacturer['id']}}">                             <label class=" my-checkbox gry2" id="manufacturer">{{str_limit($  leedsManufacturer['name'], 300)}}                                     <input type="checkbox">                                     <span class="checkmark"></span>                             </label>                         </div>                         {{-- for load more script --}}                     {{-- <input type="hidden" id="row" value="0"> --}}                      {{-- <input type="hidden" id="all" value="{{$  total_manufacturers}}"> --}}                     @endforeach