php – How to extract base64 image from text in laravel?

How to extract base64 image from text. I tried to use simple html dom library but couldn’t extract it from text. I need to extract each base64 and convert it to an image then save it to public folder.


  $post = AppPost::find(45);
    $dom = HtmlDomParser::str_get_html( $post->content );
    foreach ($dom->find('data:image') as $element) {
<p style="text-align:right"> Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to ma</p>


cakephp – I’m Beginner I need to update my data inlcude some input field text and have 5 file type image in php

this is my database where my all the data is stored

Whenever i want to update my either single data or either single or multiple pictures from existing record only that part would be updated other data would not be changed
this is my update form

Here is my code updatecode


// var_dump($_POST);

$var1 = rand(1111,9999);  // generate random number in $var1 variable
$var2 = rand(1111,9999);  // generate random number in $var2 variable

$var3 = $var1.$var2;  // concatenate $var1 and $var2 in $var3
$var3 = md5($var3);   // convert $var3 using md5 function and generate 32 characters hex number



$fnm1 = $_FILES("image1")("name");    // get the image name in $fnm variable
$dst1 = "./all_images/".$var3.$fnm1;  // storing image path into the {all_images} folder with 32 characters hex number and file name
$dst_db1 = "all_images/".$var3.$fnm1; // storing image path into the database with 32 characters hex number and file name

$fnm2 = $_FILES("image2")("name");    // get the image name in $fnm variable
$dst2 = "./all_images/".$var3.$fnm2;  // storing image path into the {all_images} folder with 32 characters hex number and file name
$dst_db2 = "all_images/".$var3.$fnm2; // storing image path into the database with 32 characters hex number and file name

$fnm3 = $_FILES("image3")("name");    // get the image name in $fnm variable
$dst3 = "./all_images/".$var3.$fnm3;  // storing image path into the {all_images} folder with 32 characters hex number and file name
$dst_db3= "all_images/".$var3.$fnm3; // storing image path into the database with 32 characters hex number and file name

$fnm4 = $_FILES("image4")("name");    // get the image name in $fnm variable
$dst4 = "./all_images/".$var3.$fnm4;  // storing image path into the {all_images} folder with 32 characters hex number and file name
$dst_db4 = "all_images/".$var3.$fnm4; // storing image path into the database with 32 characters hex number and file name

$fnm5 = $_FILES("image5")("name");    // get the image name in $fnm variable
$dst5 = "./all_images/".$var3.$fnm5;  // storing image path into the {all_images} folder with 32 characters hex number and file name
$dst_db5 = "all_images/".$var3.$fnm5; // storing image path into the database with 32 characters hex number and file name

move_uploaded_file($_FILES("image1")("tmp_name"),$dst1);  // move image into the {all_images} folder with 32 characters hex number and image name






$query=mysqli_query($con,"update tbltest1 set id='$id' ,p_name='$p_name' , address_desc='$address_desc', image1='$dst_db1', image2='$dst_db2', image3='$dst_db3', image4='$dst_db4', image5='$dst_db5',rooms='$rooms',bathrooms='$bathrooms',bedrooms='$bedrooms',parking='$parking',area='$area', price='$price', region='$region'
,add_content='$add_content',property_type='$property_type',added_on='$added_on',userid='$userid', statusid='$statusid'
where id='$id'");

2013 – Convert a column from text to choice(checkbox)

I need to upload (edit: currently trying via import spreadsheet) a table from excel where one of the columns needs to be a multiple choice selection field.

By adding a “;” separator into the excel column and then uploading it SP then converting the text column to a checkbox choice column SP seems to automatically know which values are the selected ones.

The only problem is that this does not work for filtering. When I click on the column to filter by and select a value the list will return 0 items.

Going into quick edit mode and opening the choices for that column on that item will then update the list so that when I filter by one of the selected values that item will appear.

I am looking for a quicker way of updating the columns so that I do not need to touch each row individually.

column data example:







Chrome keeps opening text files instead of using Text Editor

So I have a YAML file, and it keeps opening in chrome unless I use open with other application > Text Editor, and even Open with Text Editor doesn’t work.

pdf – Does it affect print quality if a font in a .psd file is “missing” when received from a designer but you are NOT editing the text layer?

The designer did not supply the font and it is not available to me. I’m aware that if I edit a text layer in Photoshop with a missing font, I risk making the text blurry. However, if I’m NOT editing it, I believe Photoshop preserves the original font, so it should be ok (and will save considerable time looking for fonts on future projects).

I’m placing the .psd into an InDesign file (with other text/elements) and then exporting a printer-ready PDF. InDesign and the printer’s preflight show no errors (they can’t see that fonts are missing in the linked .psd file), but I’m wondering if the type will print any less crisply. I suspect that it won’t appear any differently than fonts that ARE present/linked in the .psd file.

I am not flattening layers (in Photoshop or in exporting the PDF from InDesign, except for transparencies) or rasterizing text or converting text to shapes (in Photoshop). My guess is that if these steps are required for the sharpest printing quality, it would be required for ALL text, not just for the missing font. And perhaps that step isn’t necessary/noticeable to the naked eye on printing.

microsoft excel – How do I keep the cell blank when the formula outputs nothing, so that the text from the previous adjacent cell can overflow in it?

I have a basic Excel IF function that shows a computation result if the condition is TRUE.
What I am trying to figure out how is, in case the condition is FALSE, how to keep the cell blank so that text from the previous, adjacent cell can freely overflow into it.

The formula is not on every row, for the simplicity of this question let’s say it is on every other. So I will enter my formula into the top-most cell and drag it down all the way across the list. The IF function takes care of actually showing the computation result only in the cells I want it to show (i.e. in every other row, in this case).

However, on the rows where it is supposed to do nothing (and keep the overflowing text from the adjacent cell visible), it still overrides the overflowing text with its (empty) output. Even if I set it to output "", it will print an empty string and hide whatever text there was overflowing from the adjacent cell.

How do I actually tell the function to treat the cell as empty for all the practical purposes, even though there will be an invisible function in the background?

Here it is in pictures.

The basic structure:

The basic structure

What it does:

What it does

What I want it to do:

What I want it to do

I know of a workaround – drag down the current formula, then set a filter, select blanks and delete them. But I am looking for a simpler, more “proper”, one-step solution, that can be executed right in the formula itself.

Neither wrapping the text in column A, nor making column A wider are acceptable, because the document will be printed out on a paper, so the formatting needs to be retained as is.
(This is not my document, I was asked to automate the computation, so the formatting is not up to me, it just needs to stay like this.)

Adding custom hover text using json to a SharePoint list column

I have a SharePoint list which has a Title column and a Description. The Description column is a multi-line text field.

I would like to not display the Description column and instead show the relevant Description when moving the cursor over the Title field.

I’ve found JSON code to display a card or image when hovering over a field but I’m not sure how to do something similar with just a string of text.

I’m guessing it’s fairly easy for someone who knows what they are doing!

text – ¿Cómo unir varios txt en uno añadiendo un prefijo en cada línea usando python?

Tengo varios txt, cada uno de ellos, una única línea.
Quiero unirlos todos en uno, siendo cada uno de ellos una línea, y añadiendo al principio de cada línea:

> texto0tXt(contenido txt0)   
> texto1tXt(contenido txt1)
>         (...)

Para ello he creado el siguiente código en python:

import glob

outfilename = '/home/.../completo.txt'
    read_files = glob.glob('/home/.../todos/*txt')
    with open(outfilename, "wb") as outfile:
        #for i in range(3):
        for f in read_files:
            with open(f, "rb") as infile:

No consigo hacer el .write de manera que me devuelva el texto con el formato que necesito.
Lo he intentado usando for i in range(len(file)) y cosas por el estilo, pero en ninguna de ellas consigo el resultado indicado.

keyboard – Change Function of Command+Delete when Editing text in Catalina

In Catalina, when editing text hitting command+delete appears to delete the entire line, and option+delete will delete a single word. I would basically like to swap these, making command delete simply delete a single word, while option delete will remove the line. I would also like to maintain the individual function of these keys, for instance remapping:

command+delete -> option+delete would be okay

however remapping
command->delete would not be okay.

ms office – How to import text to columns and import numbers to text in macOS Numbers?

Windows Excel allows me to paste a body of text and in the bottom right corner of the pasted content, a menu prompt will pop up that can initiate the “Text Import Wizard” to import delimited text into columns (text separated by commas or spaces, for example). In Numbers, such an option doesn’t exist that I know of.

Second, how can I import text (including numbers) as text? With windows I can do both of these functions with the Text Import Wizard and with Numbers I can’t do either.

The only solution I’ve found to the first problem is to download a custom workflow that I found in this Apple Community thread:

And a less elegant solution is also discussed here but it’s much more clunky: How can I do text-to-columns in Numbers?

Regardless, I still haven’t found a way to import numbers as text.