Accidentally Deleted '.exe' file association in Nullsoft script?
How to repair a broken .EXE file association
8.4 - Use entity browser in a module block from in same way as I would in a custom block I am having trouble adding an image picker to a block form defined in a custom module.  If I create a custom block type I can define an image field as entity_reference and in the block's form view tell it to use entity_browser and media_entity_browser.  This provides me with an picker with which I can select my image:    I am trying to recreate this in a block provided by my custom module, without much success  // /src/Plugin/Block/MyCustomBlock.php  function blockForm($form, FormStateInterface $form_state)  {     ...      $form['image'] = [       '#type' =&gt; 'entity_browser',       '#entity_browser' =&gt; 'media_entity_browser',       '#title' =&gt; $this-&gt;t('Image'),       '#default_value' =&gt; $this-&gt;configuration['image'] ?? null,       '#weight' =&gt; '0',     ];      ... }   This gives me the following.  Note the lack of the bounding box, title and option to edit remove items:     Exporting the configuration files for the working form view gets me this:  // core.entity_form_display.block_content.lead_block.default.yml      ...  field_image:     weight: 1     settings:       entity_browser: media_entity_browser       field_widget_display: rendered_entity       field_widget_edit: true       field_widget_remove: true       selection_mode: selection_append       field_widget_display_settings:         view_mode: default       open: false     third_party_settings: {  }     type: entity_browser_entity_reference     region: content   ...   But if I try and use 'type' =&gt; 'entity_browser_entity_reference' in my blockForm function the field disappears altogether.  Looking into various core files I can see that entity_browser is a @FormElement and entity_browser_entity_reference is a @FieldWidget but I don't really understand the difference.  As you might guess I am fairly new to Drupal and I feel like I am missing something fundamental.  I (think I) understand that custom block types are actually nodes internally and that they are subject to different rules to blocks which I define in my custom modules, but I don't fully grasp what the differences here are.  Is is it possible to use the entity browser in my custom module block form in the same way as it is used in the form which I build through the admin's custom block type builder?  Thank you. Smart guides aren't smart TL:DR Smart guides aren't accurate - even though the snap, (end up causing more problems in the long run) is there a way to fix it?  Maybe there are some settings that I'm missing (need to be changed)    I use my smart guides all the time (and am overall pleased with them). I do have my issues with it, as explained here:  A lot of times, when I'm trying to make a bunch of triangles like this:    Done by making a triangle, cloning, flipping, rotating etc. Repeat until full  (Perfect) Snapping using Smart Guides    Ends up looking likebetween the triangles (Outline Mode)    Now I personally (with a strong attention to detail) will notice that there is something off after making just 1 or 2 triangles (Even before outline mode... strokes look oh so slightly thicker/off)   And then I check in outline mode... and sure enough:    Notice the line spaces (and this is in outline mode, so if I didn't notice it before, now it's sitting right in front of my nose)  The way I (seemingly) "fixed" the first image was by adding in a thick stroke outline so that masks out the difference, however, in a lot of my cases I don't want to have a stroke at all (and then you really notice the problems). I have installed Ubuntu subsystem on Windows 10 (after enabling feature in settings), but where is the Ubuntu file system root directory located in the drive? Ubuntu GNOME 17.04: wi-fi not working -- mac address keeps changing? My Panda USB wi-fi adapter works just fine on 16.10, but when I try to connect to my wi-fi router in 17.04, GNOME network manager reports "Connection failed." I did some tinkering, and noticed that my MAC address for my wifi adapter, according to GNOME, is DIFFERENT every time I make it forget my wifi settings and try to reconnect. Any leads on a possible fix or work-around?   I'm running Ubuntu GNOME 17.04, kernel 4.10.0-19-generic, GNOME 3.24.0. How to get image size (height & width) using JavaScript? Connect to a MySQL server over SSH in PHP I have my database on remote Linux machine, and I want to connect using SSH and PHP functions (I am currently using ssh2 library for that). I tried using mysql_connect, but it gives me can't access (although I have granted permission) when I tried using this function:  $connection = ssh2_connect('SERVER IP', 22);  ssh2_auth_password($connection, 'username', 'password');  $tunnel = ssh2_tunnel($connection, 'DESTINATION IP', 3307);  $db = mysqli_connect('127.0.0.1', 'DB_USERNAME', 'DB_PASSWORD',                           'dbname', 3307, $tunnel)     or die ('Fail: '.mysql_error());   I got error "mysqli_connect() expects parameter 6 to be string, resource given". How can I resolve this? I am used to see timestamp everywhere by it's color. The recent timestamps are a little bit reddish everywhere. E.g. in Meta Stack Overflow:  Last edit:        Last seen:        But in Meta Stack Exchange they have same color everywhere even for recent time:  Last edit:        Last seen:         Please make it something like this: Adding holes simultaneously within mesh I looked at similar questions and wanted to post a more specific one.  If I wanted one of my accounts on the network to no longer be associated to my global account, could an administrator do it manually? I mean, even if they could, would they?  It's a matter of professionalism. I don't want one of my accounts on the network to be visible from my other accounts. I just want that to be under a separate email that's not one of the OpenIDs associated with my global account.  I realize this would have been easier to do when I joined that site, but it's too late now, and only now have I realized that I don't really want that account showing up.  So can it be done by an administrator? I don't want to wait weeks and weeks for a response by using the contact form (funny, I've waited two with this post)... Is the set of all unitary matrices in $M_2(\mathbb{C})$ is compact? I can show that as determinant map is continuous so unitary matrices are closed but how to show they are bounded?   Please help. How can I improve viewport performance when using Dyntopo? I'm doing a Blendercookie course on how to sculpt a Scifi weapon with dyntopo. The fact is that when some piece reach a certain level of compleiity (about 1.1 million tris) the systems starts to lags too much and is so frustrating.  I've tried the several options:   Disable double sided lighting Enable VBO    I've so also reduced the topology of hidden faces. But that´s how far I've reached.  I'm using a late Imac Intel I5 Nvidia GPU GTX 680mx  any tips out there? Prove $aba^{-1}b^{-1}\in{N}$ for all $a,b$ I am trying to prove the above with the conditions that N is normal to G and $G/N$ is abelian.  So then for $Na,Nb\in{G/N}, NaNb=NbNa$.  But $NaNb=Nab=Nba$, so then we know $ab=ba$, so G is abelian.  So if $ab\in{G}, N=abN(ab)^{-1}=abN(ba)^{-1}=baNa^{-1}b^{-1}....$ and i'm getting lost... GPG can't check signature Naming threads and thread-pools of ExecutorService The question is:     Show that there are an infinite number of pairs $(m,n): m, n \in \mathbb{Z}^{+}$, such that: $$\frac{m+1}{n}+\frac{n+1}{m} \in \mathbb{Z}^{+}$$   I started off approaching this problem by examining the fact that whenever the expression was a positive integer, the following must be true:  $$\frac{m+1}{n}+\frac{n+1}{m} - \left\lfloor\frac{m+1}{n}+\frac{n+1}{m}\right\rfloor = 0$$  However, I was unable to do much more with this expression, so I abandoned it and started the problem again from a different angle.  Next I re-arranged the expression to state that:  $$\frac{m^2+m+n^2+n}{mn} \in \mathbb{Z}^{+} \implies \frac{m(m+1) + n(n+1)}{mn} \in \mathbb{Z}^{+}$$  And therefore:  $$mn \mid (m(m+1) + n(n+1))$$  However, I'm unsure how to demonstrate there are infinitely many occurances of $(m, n)$ for which this is true. So I'd appreciate any help.   Thanks in advance How do I do a case-insensitive string comparison? How can I do case insensitive string comparison in Python?  I would like to encapsulate comparison of a regular strings to a repository string using in a very simple and Pythonic way. I also would like to have ability to look up values in a dict hashed by strings using regular python strings. Closest points on two line segments I am looking for a general formulation to find the closest points on two line segments. What I was thinking about is to define our lines as:  $$ P1 + s  (P2-P1)$$  $$ Q1 + t  (Q2-Q1)$$  Where $P1 , P2, Q1$ and $Q2$ are the beginning and the end points on each segment.  Now we should go through an optimization problem as: $\min f(s,t)$ such that $0&lt;s&lt;1$ and $0&lt;t&lt;1$.  Where $f(s,t)$ is the point-to-point distance function.  Is there any straight forward solution? How can I restart a Windows 7 computer without screen or mouse? I've recently had problems with my work computer not recognizing either of its attached screens.  I've also had problems with my home computer "locking" the mouse to one app, and no longer acknowledging clicks on, say, the start menu.  In both cases the computer is still running, and I can close apps and so forth with the keyboard.  Restarting usually addresses the problem.  What's the simplest way to restart a Windows 7 computer by the keyboard alone?  Something consistent across all versions would be super.  In Win XP, I believe it was Ctrl-Alt-Delete; pause; Alt-R for Restart; Enter to select.  But on 7 Ctrl-Alt-Delete no longer brings up the same menu.  I'd use Ctrl-Alt-Esc for the Task Manager, but it no longer has a Restart menu (at least on Win 7 Home). Why is the "user was removed" message so vague? How can I make a script that opens terminal windows and executes commands in them? I have three scripts I need to run when I start up my Ubuntu machine, they start services I use in my development environment.  To do that, I manually open three terminals and type in the commands.  Is there any way to create a script that will open three terminals and execute one command in each of these? (Each command should be in a separate terminal window so I can see their output).