How to cleanly write SQL get functions in PHP with params?

I’m working on a PHP application where we have helper functions to run our SQL queries on our MariaDB database. The queries are formatted as strings and then we call a helper function select, update, etc. I have a getUsers function that originally took no parameters and returned a list of all of the users in the application. Now, if I want a list of users of a certain type, is it better that I create an entirely new function getUsersOfType, or should I add a parameter to the function getUsers(type = true) and conditionally query based on that? Which way follows SOLID principles the best while keeping the code slim?

sierra – How do I cleanly remove old Juniper Pulse installation from Mac OSX?

The Console application on the Mac is continuously throwing log messages presumably because fragments of a previous install are still in place. I have tried Goggling around for a solution and using grep to search through plist files for obvious strings. No luck so far.

Getting recurring error messages per the below:

May 26 19:12:53 MacBook-Pro com.apple.xpc.launchd(1) (net.juniper.AccessService(73727)): Service could not initialize: Unable to set current working directory. error = 2: No such file or directory, path = /Applications/Junos Pulse.app/Contents/Plugins/JUNS: 16G2136: xpcproxy + 11215 (1386)(C3C8A771-3847-30E4-BE12-7941C4A2924D): 0x2
May 26 19:12:53 MacBook-Pro com.apple.xpc.launchd(1) (net.juniper.AccessService): Service only ran for 0 seconds. Pushing respawn out by 10 seconds.

Interaction design: ideas on how to display auto-complete suggestions and validation messages cleanly

I am currently working on a task for a company I am applying for. I need to have a text input with a submit button that shows suggestions as the user types, but it also needs to show validation messages based on what the user types. I am looking for suggestions on a clean way how to display this.

Here is my current design:

enter the image description here

If unclear, the text box is on the left with the suggestions below, the submit button is in the middle, and the validation message is on the right. You could put the validation message below the suggestions, but it might seem a little crowded. Any other suggestion? It's not terrible as it is, but I find it a bit awkward. Thank you!

Are there tools to rename a custom module that is already cleanly enabled?

I want to change the name of a custom module to a more meaningful name, but I'm afraid to do it manually since the name is extended through the files. . The module is already enabled. I want to know if there are drush commands or drupal console commands. Even the IDE tools would be great.

code organization: how can I cleanly handle deeply nested namespaces in C ++?

The first language I really learned was Java. In it, it is very syntactically easy to nest classes in an essentially arbitrarily complex hierarchy of packages, which keeps the code organized. It is easy because the syntactic disorder of a deeply nested hierarchy is perfectly placed at the top of the file with import and package declarations, and then the classes are referenced only by their main name and nothing else in the body of the code.

In C ++, this is not the case. There is no package declaration for a file, however, it is preferred to keep the name of the namespace visible in all references to the content of that namespace. This is fine only for slightly nested namespaces (e.g. std::chrono), but it becomes very cumbersome very quickly if you try to nest Java-style packages (e.g. game_name::server::world::actor::messages::ChatMessage) Of course, one can add using namespace statements in addition to #include, but this is a form of code duplication and it feels messy. It is also a horrible idea for the header code (which is often not trivial, as in the case of templates).

In C ++, how can I allow the powerful organization that encounters deeply nested namespaces, but without introducing a non-trivial syntactic disorder?

The best idea I have for this is to keep most of my entire program code in a few simple namespaces (e.g. game Y game::detail), but this creates a completely new problem in which there are two separate hierarchies: one for namespaces and one for the file system.

Mac in High Sierra will not turn off cleanly: black screen with mouse

Similar to the "Mac Book Pro Sierra does not turn off, it remains inactive with a black screen and a mouse".

Apple logo> Shut down leads to a black screen with the mouse cursor. It stays like this for hours.

He realized this problem because he would not install Mojave (he will not install the 10.13.6 update either). It looks like I'm stuck in 10.13.3.

I tried the detailed mode, but I got the same black screen with no text in the closing (I saw a lot of black screen with text in the beginning).

I receive a little more information when I turn off the Terminal:

$ sudo shutdown -r now
...
shutdown: / is busy updating; waiting for the lock

It stays like this for hours. I used the Activity Monitor to kill some random applications (starting with launchd) and it turns off. I reduced it to kill kextd to complete the closure.

I have tried to restart PRAM.
I have tried to restart SMC.
I have tried to delete all of the login elements (in Users and Groups).