Signup/Sign In

Answers

All questions must be answered. Here are the Answers given by this user in the Forum.

As you found and set in your config, apt-listchanges should not prompt if you set the frontend to none. You can also set the environment variable APT_LISTCHANGES_FRONTEND=none to achieve the same thing.

It sounds like what you really want to do is use the unattended-upgrades package. It handles everything for you: disabling apt-listchanges, setting the frontend to noninteractive, checking for and avoiding conffile prompts, etc. If nothing else, the contents of the Python script /usr/bin/unattended-upgrades
3 years ago
It can be very complicated to get good pdf output from convert. Try img2pdf instead. From the readme:

Lossless conversion of images to PDF without unnecessarily re-encoding JPEG and JPEG2000 files. Thus, no loss of quality and no unnecessary large output file.
3 years ago
Try using the -density option. The default resolution is 72 dots per inch. So try something like -density 300.
3 years ago
Wingdings is coming from the msttcorefonts package. Around at 2000 has the microsoft made its core fonts package free downloadable "in the interests of the cross platform compatibility". Later they changed their view, and it was made closed again, but the at this time opened font files are still being widely used. These fonts don't change so fast (f.e. the times font is more than 100 years old), as the other software components of the world.

What in your situation important is: wine is running (probably) on a linux, and thus it uses the wingdings from the msttcorefonts package, which is the wingdings font, which was released by the microsoft around before 10-15 years.

It is very improbable, that the microsoft changed anything in this font (encoding changes don't count, the truetype font format uses unicode), but if it happened, it were some difference between them.

If you have a legal copy of a current windows OS, you are probably allowed to copy its wingdings font to your wine (search for a wingdings.ttf or some like so).

I didn't closed out minor differences between the wingdings fonts of the wine and the windows, mainly because the extensions/new pictures were of course impossible to get to the wine wingdings font.
3 years ago
Custom Classes in Laravel 5, the Easy Way
This answer is applicable to general custom classes within Laravel. For a more Blade-specific answer.

Step 1: Create your Helpers (or other custom class) file and give it a matching namespace. Write your class and method:
***
namespace App\Helpers;

class Helper
{
public static function shout(string $string)
{
return strtoupper($string);
}
}***

Step 2: Create an alias:
***
'aliases' => [
...
'Helper' => App\Helpers\Helper::class,
...***

Step 3: Run **composer dump-autoload** in the project root
Step 4: Use it in your Blade template:
***

{!! Helper::shout('this is how to use autoloading correctly!!') !!}***

Extra Credit: Use this class anywhere in your Laravel app:
***
namespace App\Http\Controllers;

use Helper;

class SomeController extends Controller
{

public function __construct()
{
Helper::shout('now i\'m using my helper class in a controller!!');
}
...***
3 years ago
Run the following command:
***composer remove Vendor/Package Name***

That's all. There isn't any need to update Composer. The Vendor/Package Name is just a directory as installed before.
3 years ago
You can use subqueries in anonymous function like this:
*** $results = User::where('this', '=', 1)
->where('that', '=', 1)
->where(
function($query) {
return $query
->where('this_too', 'LIKE', '%fake%')
->orWhere('that_too', '=', 1);
})
->get();***
3 years ago
For non MAMP or XAMPP users on OSX (with homebrew installed):
***brew install homebrew/php/php56-mcrypt***

Cheers!
3 years ago
If you're using Laravel 5, the command would be;
***php artisan make:migration add_paid_to_users***

All of the commands for making things (controllers, models, migrations etc) have been moved under the **make:** command.

**php artisan migrate** is still the same though.
3 years ago
Every time you roll back you get the last batch of migration. use the command
***php artisan migrate:rollback --step=1***
3 years ago
After save, **$data->id** should be the last id inserted.
***$data->save();
$data->id;***

Can be used like this.
***return Response::json(array('success' => true, 'last_insert_id' => $data->id), 200);***

For updated laravel version try this
***return response()->json(array('success' => true, 'last_insert_id' => $data->id), 200);***
3 years ago
You need to use
***{!! $text !!}***
The string will auto escape when using **{{ $text }}**.
3 years ago