External monitor has black screen when clamshell close but works when open

This used to work fine. Here are the steps that broke it I installed RDM and tried to set the resolution to a Retina display with the clamshell of the MacBook Pro closed. This resulted in a black screen, but a recognized monitor. I can see the display go to sleep and moving the mouse turns it back on, but only to black. Sometimes it will show the mouse but it is on a black screen.

With the clamshell open, the monitor acts normally, so it seems like there is a profile for the external as an extended display and also as a solo display.

I safe booted, PRAM reset, deleted the ByHost file from preferences.

I know a wipe and restore will fix this but I am hoping I can avoid that. Has anyone experienced similar?

Mid 2012 Retina MacBook Pro running 10.14.5.

How do I get the password hint of an encrypted external disk?

I have this USB disk that was encrypted months ago. Now, I am trying to open the disk and I forgot the password.

I am not getting the password hint, even after typing the wrong password dozens of times.

This password is on Keychain but the drive is not receiving it from there. Keychain is not letting me open the entry containing the password, telling me this

The provided password did not unlock this keychain, or access has been limited to a particular user account.

How do I get the password hint for that external drive?

Get the cart contents from an external script, using bootstrap.php and ObjectManager?

Running Magento 2.3.1.

I’m having trouble understanding how to get the customer’s checkout/cart session data from an external PHP script.

The script is hosted and run on the same domain as the Magento store, and it’s located in Magento’s root directory. I’m running it from the same browser. All caches are disabled.

I have 3 items in my Magento cart, but when I run the script, it does not find any items:

<?php  require("app/bootstrap.php"); $  bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $  _SERVER); $  obj = $  bootstrap->getObjectManager();  // Set the state (not sure if this is neccessary) $  state = $  obj->get('Magento\Framework\App\State')->setAreaCode('frontend');  // Get cart items $  quote      = $  obj->get('Magento\Checkout\Model\Session')->getQuote(); $  quoteItems = $  quote->getAllVisibleItems();  echo "Found " . count($  quoteItems) . " cart items";  // Expected output: // Found 3 cart items  // Actual output: // Found 0 cart items 

P.S. Please do not comment that ObjectManager should not be used directly. It is not helpful, and this is for a one-off script on an internal development environment only.

Pagination in external api consume custom module

I created a custom module in order to consume an external api call in my drupal project following this question. The module is working fine, but I need to have a pagination in the received results which will pass as a variable in the api call:


How is possible to achieve that? In case I receive all the data from the api is it possible to “separate” them somehow with pagination operation?

Thanks in advance

macOS Mojave doesn’t mount external DVD drive

No DVD appears on my desktop. Disk Utility lists it but fails to mount it.

$   diskutil list ... /dev/disk2 (external, physical):    #:                       TYPE NAME                    SIZE       IDENTIFIER    0:                            FREE_SOLO              *4.6 GB     disk2  $   diskutil mount readOnly disk2 Volume on disk2 failed to mount; if it has a partitioning scheme, use "diskutil mountDisk" If the volume is damaged, try the "readOnly" option 

Custom search function with result from external url

I need to create a page in Drupal 8 where there is a text field and a search button. When the user has entered a word to search and hit the search button a list with a search result should be displayed.

The search should go against this endpoint: http://systembevakningsagenten.se/api/json/1.0/searchProduct.json?query=[SEARCHWORD] Where [SEARCHWORD] is replaced with for example Stockholm and results are shown.

If more than 5 results are shown a pager should show up.

Have search the internet for tips or solutions, but couldn’t find anything.. Is there anyone who has a clue that can point me in the right direction?

External Content Type: Cannot logon with credentials obtained from Secure Store Provider

Trying to set up a new External Content Type that connects to a SQL database using a service account.

I have verified that the service account can actually connect to the DB because I used SQL Management Studio to log in to the external DB as the service account, and that worked.

Set up a secure store target application – the service account in question is in both the administrators group and the members group for the target application, and is the account used to “set credentials”. (Went in and re-entered the credentials a second time to make sure I hadn’t typo’d the password.)

When in Designer trying to create a new connection for the external CT, I get prompted once for username/password, I enter the service account and password, I then get prompted a second time, I enter the service account and password again, and then I get the error

Message from External System: ‘Cannot logon with credentials obtained from Secure Store Provider.’.

What’s going on? The service account has access to the external DB, proved by connecting using SQL Management Studio. The service account should have plenty of access to the secure store target application item because it is both a member and an admin for that item.

Any ideas why this isn’t working, or where I could look next to try and troubleshoot this further?

Disconnecting external monitor does not apply laptop screen settings

I have an really annoying problem with Ubuntu 18.04. My laptop has a 4k 15″ display. As this makes everything super small, I prefer scaling it down to 1080×1920 when using it. At work I have a dual monitor setup, both connected to a small dock/adapter which I connect to my machine with thunderbolt 3. In my Nvidia X server settings I have configured the dual screens to be next to each other and the laptop screen turned off. Now to the problem.

Whenever I disconnect these displays, my laptop screen turns back on with full 4k resolution. If I go into Nvidia X Server I can change it to 1080 again. But then the next time I connect to my dual monitors again, the setup is all wrong and I have to spend 5 minutes for rebooting and reconfiguring everything correctly again.

Is there a proper way to fix this? Is there a way to change display configurations automatically or maybe with a hotkey or something?

I’m using all the latest updates and Nvidia driver 430.

How to configure Xcode external build system to build and clean using standard short-cuts?

[Xcode 10.1, MacOS 10.14.1]

I have a project that uses bmake (could be any make though) and the Makefile provides a number of targets. I would like to use Xcode to build host and clean the build folder, but I’m having trouble working out how configure Xcode to allow me to this.

From the command line, I would build using bmake host and clean using bmake clean. The reason I’m using Xcode for this is because I like to use an IDE for debugging.

In Project -> Info (External Build Tool Configuration), I have:

Build Tool  :  /usr/local/bin/bmake Arguments   :  host Directory   :  None     <- I'm using the current path 

With these settings, Product -> Build builds my target, but Product -> Clean Build Folder does nothing even though Xcode reports that the clean succeeded.

In order to actually do a clean, I either need to define another target with the Arguments field set to clean and then switch between targets when building/cleaning, or, use a single target and change the argument field depending on whether I’m building or cleaning. (A really clumsy way of going about it.)

If I leave Arguments with it’s default value $ (ACTION) all targets get built (except clean), and cleaning does nothing useful.

I’ve read https://stackoverflow.com/questions/15652316/setup-xcode-for-using-external-compiler but that question does not address this problem.

Is there a better way of doing this?