Is using the Magic Mouse 2 & original Magic Mouse on the same Mac unsupported in High Sierra?

I recently upgraded my mid 2011 Mac Mini to macOS High Sierra. I purchased the Magic Mouse 2 about a year ago, but really loathe the charging port on the bottom (unbelievably stupid design, but I digress). As such, I kept my old (original) Magic Mouse handy for when I needed to charge the MM2. I never had problems with this use case in OS X El Cap.

However, today when I tried to use the old Magic Mouse, macOS absolutely freaked out and neither of the bluetooth mice could connect. I had to use a generic Logitech USB mouse to “forget” both of MM (old and new), then I could reconnect the new MM after it charged.

So my question: is the original Magic Mouse unsupported in macOS High Sierra? Or perhaps I simply can no longer use the MM1 and MM2 interchangeably?

Update: Perhaps forgetting and re-pairing the mice was all that was needed..? Issue looks to be resolved now and I am able to use either mouse. This was just a leftover quirk from the OS upgrade I can only assume…?

Why does trying to POST a node from Android result in “HTTP/1.1 415 Unsupported Media Type”?

I used the following code to post some data to my site. I tested the site with Postman using the same data and it works properly, but when running the following code on Android Studio, response.getStatusLine() returns HTTP/1.1 415 Unsupported Media Type.

       HttpClient httpClient = new DefaultHttpClient();        HttpPost httpPost = new HttpPost("http://www.example.com/entity/node");        HttpResponse response = null;        String responseBody = "";          try{            JSONObject json = new JSONObject();            JSONObject c0 = new JSONObject();            JSONObject c00 = new JSONObject();            JSONObject c1 = new JSONObject();            JSONObject c2 = new JSONObject();              json.put("_links",c0);            json.put("title",c1);            json.put("type",c2);             c0.put("type",c00);            c00.put("href","http://www.example.com/rest/type/node/article");            c1.put("value", "test string");            c2.put("target_id", "article");              String base64EncodedCredentials = "Basic " + Base64.encodeToString(                    ("user"+ ":" + "pass").getBytes(),                    Base64.NO_WRAP);              StringEntity se = new StringEntity(json.toString());               se.setContentType(new BasicHeader(HTTP.CONTENT_TYPE, "application/json"));             httpPost.setHeader(HTTP.CONTENT_TYPE, "application/json");            httpPost.setHeader("Authorization", base64EncodedCredentials);             httpPost.setEntity(se);             // Execute HTTP Post Request            response = httpClient.execute(httpPost);             String jsonResponse = EntityUtils.toString(response.getEntity());            JSONObject jsonObj = new JSONObject(jsonResponse);             if (response.getStatusLine().getStatusCode() == 200) {                Log.v("response ok", "ok response :/");            } else {                Log.v("response not ok", "Something went wrong :/");            }        catch (Exception e){            Log.v("Error posting:",e.getMessage());        } 

I tested each of these lines separately and together, but none of them work.

    se.setContentType(new BasicHeader(HTTP.CONTENT_TYPE,"application/json"));             httpPost.setHeader(HTTP.CONTENT_TYPE, "application/json"); 

Why does it return HTTP/1.1 415 Unsupported Media Type?

Unsupported operand types in View.php on line 49

I updated my Drupal installation on my local machine, and everything went fine. When I synced my live version, things stopped working. Trying to restore my website using a GoDaddy backup didn’t help, restoring the database broke the site completely, so now all I get is the dreaded “The website encountered an unexpected error. Please try again later.”

The PHP error log shows the following error anytime someone tries to load the front page:

[24-Mar-2019 11:24:03 America/Vancouver] Error: Unsupported operand types in /home/[home_dir]/public_html/core/modules/views/src/Element/View.php on line 49#0 [internal function]: Drupal\views\Element\View::preRenderViewElement(Array) #1 /home/[home_dir]/public_html/core/lib/Drupal/Core/Render/Renderer.php(378): call_user_func(Array, Array) #2 /home/[home_dir]/public_html/core/lib/Drupal/Core/Render/Renderer.php(195): Drupal\Core\Render\Renderer->doRender(Array, false) #3 /home/[home_dir]/public_html/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(226): Drupal\Core\Render\Renderer->render(Array, false) #4 /home/[home_dir]/public_html/core/lib/Drupal/Core/Render/Renderer.php(582): Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() #5 /home/[home_dir]/public_html/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(227): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure)) #6 /home/[home_dir]/public_html/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(117): Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\CurrentRouteMatch)) #7 /home/[home_dir]/public_html/core/lib/Drupal/Core/EventSubscriber/MainContentViewSubscriber.php(90): Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\CurrentRouteMatch)) #8 [internal function]: Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object(Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent), 'kernel.view', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher)) #9 /home/[home_dir]/public_html/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): call_user_func(Array, Object(Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent), 'kernel.view', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher)) #10 /home/[home_dir]/public_html/vendor/symfony/http-kernel/HttpKernel.php(156): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object(Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent)) #11 /home/[home_dir]/public_html/vendor/symfony/http-kernel/HttpKernel.php(68): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1) #12 /home/[home_dir]/public_html/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #13 /home/[home_dir]/public_html/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #14 /home/[home_dir]/public_html/core/modules/page_cache/src/StackMiddleware/PageCache.php(184): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #15 /home/[home_dir]/public_html/core/modules/page_cache/src/StackMiddleware/PageCache.php(121): Drupal\page_cache\StackMiddleware\PageCache->fetch(Object(Symfony\Component\HttpFoundation\Request), 1, true) #16 /home/[home_dir]/public_html/core/modules/page_cache/src/StackMiddleware/PageCache.php(75): Drupal\page_cache\StackMiddleware\PageCache->lookup(Object(Symfony\Component\HttpFoundation\Request), 1, true) #17 /home/[home_dir]/public_html/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #18 /home/[home_dir]/public_html/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(52): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #19 /home/[home_dir]/public_html/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #20 /home/[home_dir]/public_html/core/lib/Drupal/Core/DrupalKernel.php(693): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #21 /home/[home_dir]/public_html/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request)) #22 {main} 

Line 49 in View.php is just the following:

$ element += $ view->element;

This is valid PHP code and is part of Drupal core, so I don’t think it can be the actual issue. My guess is that the Drupal code assumes something elsewhere is valid, maybe like some info pulled from the database, when it is in fact not valid. But I don’t know how the Drupal backend works, so I’m at a loss.

Both my local version and the server version are running PHP 7.1 or higher and MySQL 5.6.37 or higher.

proxy в php curl – ошибки: Unsupported proxy scheme for или Failed to connect to : Bad access

Если я закомментирую строку CURLOPT_PROXY то ошибка Unsupported proxy scheme for, а если раскомментирую то Failed to connect to : Bad access… Запуск из командной строки… А вот из браузера все работает… Прокси тоже прописан

      $  curl = curl_init ($  url);        curl_setopt ($  curl, CURLOPT_PROXY, "proxy.domian.com:8080");        curl_setopt ($  curl, CURLOPT_REFERER, $  url);       curl_setopt ($  curl, CURLOPT_RETURNTRANSFER, true);       curl_setopt ($  curl, CURLOPT_FOLLOWLOCATION, true);       curl_setopt ($  curl, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36");       curl_setopt ($  curl, CURLOPT_COOKIEJAR, $  this->auth_cookie);       curl_setopt ($  curl, CURLOPT_POST, true);       curl_setopt ($  curl, CURLOPT_POSTFIELDS, $  post);        $  result = curl_exec ($  curl);       print_r (curl_error ($  curl));       curl_close ($  curl); 

TypeError: unsupported operand type(s) for -: ‘int’ and ‘tuple’ – Subtração de dois elementos do vetor [pendente]

Olá, estou tentando subtrair dois elementos de duas listas diferentes, de acordo com as interações mas sempre está mostrando esse erro:

TypeError: unsupported operand type(s) for -: ‘int’ and ‘tuple’

Aqui está meu código:

 for i in range(0, Tam):      dist.append(sqrt(pow(R[i+1] - Rf[i], 2) + pow(G[i+1] - Gf[i], 2))) 

copying files from pc to android denied with error message unsupported file type

so I bought an android phone (moto g6 plus with android 8) and I want to restore some files which I backed up from my older phone (moto g 1st gen).

I connect the phone to my PC (Windows) via a USB cable and enable in the phone: Use USB to: Transfer Files. I can send .mp3 files. I cannot send (paste) a .vcf file (my contacts) and I cannot .png images (screenshots). The message I get is:

The ... file type is not supported in this device. If it is a media file you may be able to use Windows Media Player to convert the file to a playable type prior to transfer. Do you wish to skip this file for now ? 

And I get a skip/skip all/cancel options only.

But I can get any file type from the phone and into my pc which is weird.

Am I doing something wrong ? How can I fix this ? (preferably without having to install another app).

Thank you in advance.

Safari 12 doesn’t play icecast audio stream – “Unsupported plug-in”

I have a virtual machine (VMWARE) with macOs Mojave 10.14 installed. And I tried to open the following icecast link in Safari 12:

It’s a radio stream. However, Safari doesn’t play it. I see only the message: “Unsupported plug-in”. But as far as I know it should be played via Html5 audio element, it’s mime type is audio/mpeg, and no plug-in is required for it.

The same result I have in a virtual machine for VirtualBox.

However, the problem is that a colleague, who have a mac, tried to open the link, and it works for him well.

Thus, I wonder what may be the problem and how can it be fixed?

My dad updates his phone’s software and now SD card is shown as unsupported

My dad has a HTC A9 and he updated to android 7.0 today. He always ignored the updates until now. So after the update the SD card started showing a unsupported. We have many photos and video there that we don’t want to loose. Is there a way we can fix it. The phone was just updated nothing more. The apps were still there. I tried connecting the SD card to my PC but it can not be read. Thank you!