Vendor does not match the system, eventually fails

Can someone explain why this happens? I eventually shutdown the device which is why is fails, but it takes forever and never finishes.

Pixel 2, oem unlocked, Sixrom v2.0.

usr@ubuntuhost:~$ fastboot flash vendor /home/usr/Downloads/rom/walleye-pq1a.190105.004-factory-78374c71/walleye-pq1a.190105.004/image-walleye-pq1a.190105.004/vendor.img target reported max download size of 536870912 bytes erasing ‘vendor_b’… OKAY [ 0.133s] sending ‘vendor_b’ (359600 KB)…

FAILED (data write failure (Protocol error)) finished. total time: 2345.269s

Counting fails and successes in dice pools in Anydice

I’m trying to figure out probabilities for a d6 dice pool mechanic where [5,6] are successes, and [1.2] are fails causing the player to lose that dice from the pool.

I’ve been using “output [count {1,2} in Nd6]” to get the probability of either result happening in N sized pool. But these are independent of each other – I want to figure out how many fails would happen during a success?

e.g. Pool 3d6, if there are at least two successes (27%) how many fails would there be? I assume a 33% chance of one fail, as there’s only one remaining dice if two are assumed as successes.

I feel like that would generally be true (e.g. 7d6 pool, 3 successes, ‘d just look at the probabilities of fails in 4d6). But it would be nice if I could combine them into a procedure in Anydice.

Any suggestions? Or am I way off with my understanding of probabilities?

Android x86 7.1 rc1 fails to load on restart

Background: Device is Toshiba WT8-A Partition is FAT32 EFI grub and Android x86, all Windows partitions have been deleted.

I have tried various installs from Marshmallow, Bliss and Nougat. All with varying successes. I can link to the files that I installed if requested.

Marshmallow had many failures (ie GPS, WiFi, rotation etc) but would boot. Bliss had the same failures but would boot. Nougat Android x86 had none of those failures but would not boot.

I can consider going back to Lollipop if need be. But firstly let me explain what is happening:

I can install fully, including the grub and I can load Nougat and everything runs smoothly. If I then reboot, an endless loop occurs and Android does not load.

I have looked at the command line and there is nothing to change. I tried a different EFI from a previous install and changed the targets, but I guess there is far more to change than just that, it did not work.

I reinstalled fully Nougat and instead of starting Android x86 I rebooted (as one of the options) and Android rebooted. I updated the apps Google wanted to update, rebooted and then the endless loop occurred again.

I can get to the point where it has detected Android and is trying to boot, but instead of booting, the tablet appears to switch off and start again.

Does anyone have any solutions? Troubleshooting guide or help?


Shell script fails to create a mysql backup

I want to create a shell script to automatically backup MySQL DB. I will later copy it to an s3 bucket.

I have created the following shell script:

#vim /home/ubuntu/backup/  #!/bin/bash ## Specify the name of the database that you want to backupbackup  # Database credentials USER="user1" PASSWORD="password" HOST="" DB_NAME="db1"  #Backup_Directory_Locations BACKUPROOT="/home/ubuntu/backup" TSTAMP=$  (date +"%d-%b-%Y-%H-%M-%S") S3BUCKET="s3://s3bucket" #LOG_FILE="/home/ubuntu/backup/log/dump.log"  mysqldump  -h <HOST>  -u <USER>  --database <DB_NAME>  -p"$  PASSWORD" > $  BACKUPROOT/$  DB_NAME-$  TSTAMP.sql 

Then from the command line, I run the script:

sudo bash -x ./ 

And it fails, telling me:

HOST: No such file or directory

enter image description here

copied folder break inheritance fails

When i copy the folder with in same document library and trying to break inheritance it fails. below is the code for the same. Can any one help on the same

    Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\ISAPI\Microsoft.SharePoint.Client.Runtime.dll"     Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\ISAPI\Microsoft.SharePoint.Client.dll"      Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\ISAPI\Microsoft.SharePoint.Client.Taxonomy.dll"  Function Copy-SPOFolder([String]$  SiteURL, [String]$  SourceFolderURL, [String]$  TargetFolderURL) { $  Host.Runspace.ThreadOptions = “ReuseThread”     Try{         #Copy the Folder         $  MoveCopyOpt = New-Object Microsoft.SharePoint.Client.MoveCopyOptions         [Microsoft.SharePoint.Client.MoveCopyUtil]::CopyFolder($  ctx, $  SourceFolderURL, $  TargetFolderURL, $  MoveCopyOpt)         $  ctx.ExecuteQuery()         Write-host -f Green "Folder Copied Successfully!" }     Catch {     write-host -f Red "Error Copying the Folder!" $  _.Exception.Message     } } function Connect-SPO() { param ([Parameter(Mandatory=$  true,Position=1)][string]$  Username,[Parameter(Mandatory=$  true,Position=2)][string]$  Url,[Parameter(Mandatory=$  true,Position=3)]$  AdminPassword) $  global:ctx=New-Object Microsoft.SharePoint.Client.ClientContext($  Url) $  ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($  Username, $  AdminPassword) $  ctx.Load($  ctx.Web) $  ctx.ExecuteQuery() } #Function to Get Folder Permissions Function Get-SPOFolderPermission([String]$  SiteURL, [String]$  FolderRelativeURL) { $  Host.Runspace.ThreadOptions = “ReuseThread”     Try{           #Get the Folder         $  Folder = $  ctx.Web.GetFolderByServerRelativeUrl($  FolderRelativeURL)         $  ctx.Load($  Folder)         $  ctx.ExecuteQuery()          #Get permissions assigned to the Folder         $  RoleAssignments = $  Folder.ListItemAllFields.RoleAssignments         $  ctx.Load($  RoleAssignments)         $  ctx.ExecuteQuery()          #Loop through each permission assigned and extract details         $  PermissionCollection = @()         Foreach($  RoleAssignment in $  RoleAssignments)         {             $  ctx.Load($  RoleAssignment.Member)             $  ctx.executeQuery()              #Get the User Type             $  PermissionType = $  RoleAssignment.Member.PrincipalType              #Get the Permission Levels assigned             $  ctx.Load($  RoleAssignment.RoleDefinitionBindings)             $  ctx.ExecuteQuery()             $  PermissionLevels = ($  RoleAssignment.RoleDefinitionBindings | Select -ExpandProperty Name) -join ","              #Get the User/Group Name             $  Name = $  RoleAssignment.Member.Title # $  RoleAssignment.Member.LoginName              #Add the Data to Object             $  Permissions = New-Object PSObject             $  Permissions | Add-Member NoteProperty Name($  Name)             $  Permissions | Add-Member NoteProperty Type($  PermissionType)             $  Permissions | Add-Member NoteProperty PermissionLevels($  PermissionLevels)             $  PermissionCollection += $  Permissions         }         Return $  PermissionCollection     }     Catch {     write-host -f Red "Error Getting Folder Permissions!" $  _.Exception.Message     } }     #variables      $  admin="username"     $  pass= ConvertTo-SecureString "PassWord" -AsPlainText -Force     $  SiteURL=""     $  LibraryName="FolderTest";     $  SrcFolderName="RootLibrary"     $  NewFolderName="RootLibrary5"     $  global:ctx     Try {             Connect-SPO -Username $  admin -Url $  site -AdminPassword $  pass             $  Library=$  ctx.Web.Lists.GetByTitle($  LibraryName);             $  Folders = $  Library.RootFolder.Folders             $  ctx.Load($  Library);             $  ctx.Load($  Folders)             $  ctx.ExecuteQuery()                #Get existing folder names             $  FolderNames = $  Folders | Select -ExpandProperty Name              if($  FolderNames -contains $  NewFolderName)             {                 write-host "Folder Exists Already!" -ForegroundColor Yellow             }              else{                         $  SourceFolderURL= $  SiteURL + $  LibraryName +"/" + $  SrcFolderName                        $  TargetFolderURL= $  SiteURL + $  LibraryName +"/" + $  NewFolderName                          Copy-SPOFolder $  SiteURL $  SourceFolderURL $  TargetFolderURL                         $  ctx.Load($  Library);                         $  ctx.Load($  Folders)                         $  ctx.ExecuteQuery()                         $  FolderNames = $  Folders | Select -ExpandProperty Name              if($  FolderNames -contains $  NewFolderName)             {             $  FolderRelativeURL= "/sites/hgs_demo/"+ $  LibraryName +"/" + $  NewFolderName                # write-host "Folder Exists Already!" -ForegroundColor Yellow                $  cFolder = $  ctx.Web.GetFolderByServerRelativeUrl($  FolderRelativeURL)                $  ctx.Load($  cFolder)                $  cx.ExecuteQuery()          #Break Permission inheritence - Remove all existing list permissions & keep Item level permissions         $  Folder.ListItemAllFields.BreakRoleInheritance($  False,$  True)         $  ctx.ExecuteQuery()         Write-host -f Yellow "Folder's Permission inheritance broken..."         Get-SPOFolderPermission $  SiteURL $  FolderRelativeURL                       }}}      Catch {             write-host -f Red "Error Granting permission to  Folder!" $  _.Exception.Message           } 

Cant install apk, remove apk and install apk again, it fails

I have an issue that Im a bit curios about. When I do the following with an unsigned APK it wont install. Use case:

  1. Download APK
  2. Open APK
  3. Allow unknown sources in google play protect
  4. Open app
  5. Uninstall app
  6. Open the same APK
  7. Allow unknown sources

Expected: app installs successfully Actual: installation of the app starts, runs for a few seconds and then it stops it with the message “cannot install app”.

Does anybody know why this happens? What is the check that forbids this use case?

Thank you in advance!

If the Dock fails to relaunch after killing it, is there any way to force it to relaunch?

Every now and then I encounter an issue or bug in macOS that requires me to kill the Dock process. (For example, oftentimes some of my keyboard shortcuts for switching spaces stop working and the only way to fix it is to restart the Dock.)

However, sometimes when I kill the Dock it will fail to automatically relaunch, leaving my system in an unusable state. Aside from something like rebooting or logging out of my user account and logging back in again, is there anyway I can force the Dock process to launch again?

Passing String.as_str to & fails to compile with type mismatch error

The second map statement in this code fails to compile.

fn main() {     let hello = Some("hello");     let _switcheroo =; //ok       let hello = Some("hello".to_string());     let _switcheroo =; //not ok  } 

The error is:

error[E0631]: type mismatch in function arguments  --> src/   | 6 |     let _switcheroo =;   |                             ^^^   |                             |   |                             expected signature of `fn(std::string::String) -> _`   |                             found signature of `for<'r> fn(&'r std::string::String) -> _`  error: aborting due to previous error 

I would expect an error about borrowing some moved data.

What is this error trying to say?

By the way, this compiles:

let hello = Some("hello".to_string()); let _switcheroo = hello.as_ref().map(String::as_str); //ok 

Update fails with undefined function system_rebuild_module_data in but the function is defined in system.module

When I run drush updb on my Drupal 8.3.1 site, I get:

PHP Fatal error: Call to undefined function system_rebuild_module_data() in /var/www/mysite/web/core/includes/ on line 46

system_rebuild_module_data() is defined in web/core/modules/system.module on line 1102.

So I’m guessing this is not a bug in Drupal 8.3.1 given that it has been released; rather it must be something to do with my setup. Perhaps the PHP class autoloader or equivalent isn’t working properly such that the function in system.module is not being made visible to

Can you advise what the root cause might be and how I could overcome this fatal error stopping me running drush updb?

This is my composer.json file.

{   "name": "my-site",   "description": "My Site Website",   "type": "project",   "authors": [     {       "name": "",       "role": ""     }   ],   "repositories": [     {       "type": "composer",       "url": ""     },     {       "type": "composer",       "url": ""     }   ],   "config": {     "preferred-install": "source",     "discard-changes": true   },   "require": {     "composer/installers": "^1.0.20",     "cweagans/composer-patches": "~1.0",     "drupal/core": "8.3.1",     "drush/drush": "8.1.2",     "drupal/migrate_tools": "2.0.0-beta1",     "drupal/migrate_upgrade": "2.0.0-beta1",     "drupal/admin_toolbar": "1.19.0",     "drupal/coder": "8.2.5",     "drupal/libraries": "3.x-dev",     "drupal/pathauto": " 1.0.0",     "drupal/honeypot": "1.24.0",     "drupal/metatag": "1.0.0",     "drupal/mollom": "1.1.0",     "drupal/smtp": "1.0.0-beta2",     "drupal/token": "1.0.0",     "drupal/simple_sitemap": "2.9.0",     "drupal/google_analytics": "2.1.0",     "wkse/google_tag": "8.0.2",     "drupal/video_embed_media": "1.5.0",     "drupal/video_embed_field": "1.5.0",     "drupal/masquerade": "2.0.0-beta1",     "drupal/paragraphs": "1.1.0",     "drupal/slick": "1.0.0-rc3",     "drupal/blazy":"1.0.0-rc1",     "drupal/slick_extras": "1.0.0-beta2",     "drupal/slick_media": "1.0.0-rc1",     "drupal/responsive_menu": "2.4.0",     "drupal/addtoany": "1.8.0",     "drupal/videojs": "1.0.0",     "drupal/redis": "1.0.0-beta1",     "drupal/views_infinite_scroll": "1.3.0",     "drupal/twig_tweak": "1.7.0",     "drupal/maxlength": "1.0.0-beta1",     "drupal/entity": "1.0.0-alpha4",     "drupal/migrate_plus": "3.0.0-beta1",     "drupal/focal_point": "1.0.0-beta4",     "drupal/crop": "1.2.0",     "mollom/client":"dev-psr4",     "drupal/ctools": "3.0.0",     "drupal/superfish": "1.0.0-rc6",     "drupal/devel": "1.0.0-rc2"   },   "require-dev": {     "behat/mink": "~1.6",     "behat/mink-goutte-driver": "~1.2",     "jcalderonzumba/gastonjs": "^1.1@dev",     "jcalderonzumba/mink-phantomjs-driver": "~0.3.1",     "mikey179/vfsStream": "~1.2",     "phpunit/phpunit": "~4.8",     "symfony/css-selector": "2.7.*"   },   "conflict": {     "drupal/drupal": "*"   },   "prefer-stable": true,    "scripts": {     "post-install-cmd": "sh ./scripts/composer/"   },   "extra": {     "installer-paths": {       "web/core": ["type:drupal-core"],       "web/modules/contrib/{$  name}": ["type:drupal-module"],       "web/profiles/contrib/{$  name}": ["type:drupal-profile"],       "web/themes/contrib/{$  name}": ["type:drupal-theme"],       "drush/contrib/{$  name}": ["type:drupal-drush"]     },     "patches": {       "drupal/core": {         "Contextual links broken because of JS error": "web/modules/patches/core-js-fix-contextual.patch",         "Fix quick edit contextual link not available and throwing js error": "web/modules/patches/drupalbehaviorerror.patch"       }     }   } } 

This is the full stack trace that was outputted with the error at the terminal. I have included my Composer, Drush and PHP versions in the output.

[07:56 PM]-[vagrant@redisvmadded]-[/var/www/]-[git mysite_security_updates_apr2017]  $   drush updb The following module is missing from the file system: minimal                                                                                                                                   [warning] PHP Fatal error:  Call to undefined function system_rebuild_module_data() in /var/www/ on line 46 PHP Stack trace: PHP   1. {main}() /var/www/ PHP   2. drush_main() /var/www/ PHP   3. Drush\Boot\BaseBoot->bootstrap_and_dispatch() /var/www/ PHP   4. drush_dispatch() /var/www/ PHP   5. call_user_func_array:{/var/www/}() /var/www/ PHP   6. drush_command() /var/www/ PHP   7. _drush_invoke_hooks() /var/www/ PHP   8. call_user_func_array:{/var/www/}() /var/www/ PHP   9. drush_core_updatedb() /var/www/ PHP  10. update_main() /var/www/ PHP  11. update_fix_compatibility() /var/www/ PHP  12. update_check_incompatibility() /var/www/  Fatal error: Call to undefined function system_rebuild_module_data() in /var/www/ on line 46  Call Stack:     0.0001     224136   1. {main}() /var/www/     0.0018     390448   2. drush_main() /var/www/     0.2686    9406544   3. Drush\Boot\BaseBoot->bootstrap_and_dispatch() /var/www/     0.8071    8732656   4. drush_dispatch() /var/www/     0.9030   11534768   5. call_user_func_array:{/var/www/}() /var/www/     0.9030   11535120   6. drush_command() /var/www/     0.9032   11540088   7. _drush_invoke_hooks() /var/www/     0.9069   11583864   8. call_user_func_array:{/var/www/}() /var/www/     0.9069   11584144   9. drush_core_updatedb() /var/www/     0.9109   11771208  10. update_main() /var/www/     1.9984   26727888  11. update_fix_compatibility() /var/www/     2.0147   26930512  12. update_check_incompatibility() /var/www/  Drush command terminated abnormally due to an unrecoverable error.                                                                                                                                                [error] Error: Call to undefined function system_rebuild_module_data() in /var/www/, line 46  [07:56 PM]-[vagrant@redisvmadded]-[/var/www/]-[git mysite_security_updates_apr2017]  $   drush --version  Drush Version   :  8.1.2    [08:13 PM]-[vagrant@redisvmadded]-[/var/www/]-[git mysite_security_updates_apr2017]  $   composer --version Composer version 1.4.1 2017-03-10 09:29:45  [09:48 PM]-[vagrant@redisvmadded]-[/var/www/]-[git mysite_security_updates_apr2017]  $      [09:48 PM]-[vagrant@redisvmadded]-[/var/www/]-[git ou82_security_updates_apr2017]  $   php -v PHP (cli)  Copyright (c) 1997-2016 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies     with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies with Xdebug v2.5.1, Copyright (c) 2002-2017, by Derick Rethans 

I’m running the site locally inside a Vagrant/ provisioned VM running Ubuntu 14.04 LTS 64bit on top of a Mac OS X Sierra 10.12.4 host.