Support
Quality
Security
License
Reuse
kandi has reviewed wave and discovered the below as its top functions. This is intended to give you an instant insight into wave implemented functionality, and help decide if they suit your requirements.
Convert ckeditor Data to html
<span v-html="this.courrier.Text"></span>
Radial Waves in Processing
float waveOffset = 2*(atan2(y - tiles/2, x - tiles/2));
float sin = sin((frameCount/20.0 + waveOffset));
-----------------------
void setup() {
size(600, 600);
}
void draw () {
background(255);
float tiles = 60;
float tileSize = width/tiles;
for (int x = 0; x < tiles; x++) {
for (int y = 0; y < tiles; y++) {
float waveOffset = atan2(y - tiles/2, x - tiles/2)*0.5;
float sin = sin((frameCount*0.05 + waveOffset));
float wave = map(sin, -1, 1, 0, tileSize);
fill(0);
noStroke();
pushMatrix();
translate(tileSize/2, tileSize/2);
ellipse(x*tileSize, y*tileSize, wave, wave);
popMatrix();
}
}
}
How can I make the C++ compiler support template for STL?
compilers:
- compiler:
spec: gcc@7.5.0
paths:
cc: /usr/bin/gcc-7
cxx: null
f77: /usr/bin/gfortran-7
fc: /usr/bin/gfortran-7
flags: {}
operating_system: ubuntu20.04
target: x86_64
modules: []
environment: {}
extra_rpaths: []
- compiler:
spec: gcc@9.3.0
paths:
cc: /usr/bin/gcc-9
cxx: /usr/bin/g++-9
f77: /usr/bin/gfortran-9
fc: /usr/bin/gfortran-9
flags: {}
operating_system: ubuntu20.04
target: x86_64
modules: []
environment: {}
extra_rpaths: []
Change version of gcc which does not support compiling C++ programs using the compilers.yaml file
spack compiler list
-- clang ubuntu20.04-x86_64 -------------------------------------
clang@10.0.0 clang@7.0.1
-- gcc ubuntu20.04-x86_64 ---------------------------------------
gcc@9.3.0 gcc@10.2.0
cd ~/.spack/linux
emacs compilers.yaml &
compilers:
- compiler:
spec: gcc@10.2.0
paths:
cc: /usr/bin/gcc-10
cxx: null
f77: /usr/bin/gfortran-10
fc: /usr/bin/gfortran-10
flags: {}
operating_system: ubuntu20.04
target: x86_64
modules: []
environment: {}
extra_rpaths: []
- compiler:
spec: gcc@9.3.0
paths:
cc: /usr/bin/gcc-9
cxx: null
f77: /usr/bin/gfortran-9
fc: /usr/bin/gfortran-9
flags: {}
operating_system: ubuntu20.04
target: x86_64
modules: []
environment: {}
extra_rpaths: []
-- clang ubuntu20.04-x86_64 -------------------------------------
clang@10.0.0 clang@7.0.1
-- gcc ubuntu20.04-x86_64 ---------------------------------------
gcc@9.3.0
spack install hpctoolkit
-----------------------
spack compiler list
-- clang ubuntu20.04-x86_64 -------------------------------------
clang@10.0.0 clang@7.0.1
-- gcc ubuntu20.04-x86_64 ---------------------------------------
gcc@9.3.0 gcc@10.2.0
cd ~/.spack/linux
emacs compilers.yaml &
compilers:
- compiler:
spec: gcc@10.2.0
paths:
cc: /usr/bin/gcc-10
cxx: null
f77: /usr/bin/gfortran-10
fc: /usr/bin/gfortran-10
flags: {}
operating_system: ubuntu20.04
target: x86_64
modules: []
environment: {}
extra_rpaths: []
- compiler:
spec: gcc@9.3.0
paths:
cc: /usr/bin/gcc-9
cxx: null
f77: /usr/bin/gfortran-9
fc: /usr/bin/gfortran-9
flags: {}
operating_system: ubuntu20.04
target: x86_64
modules: []
environment: {}
extra_rpaths: []
-- clang ubuntu20.04-x86_64 -------------------------------------
clang@10.0.0 clang@7.0.1
-- gcc ubuntu20.04-x86_64 ---------------------------------------
gcc@9.3.0
spack install hpctoolkit
-----------------------
spack compiler list
-- clang ubuntu20.04-x86_64 -------------------------------------
clang@10.0.0 clang@7.0.1
-- gcc ubuntu20.04-x86_64 ---------------------------------------
gcc@9.3.0 gcc@10.2.0
cd ~/.spack/linux
emacs compilers.yaml &
compilers:
- compiler:
spec: gcc@10.2.0
paths:
cc: /usr/bin/gcc-10
cxx: null
f77: /usr/bin/gfortran-10
fc: /usr/bin/gfortran-10
flags: {}
operating_system: ubuntu20.04
target: x86_64
modules: []
environment: {}
extra_rpaths: []
- compiler:
spec: gcc@9.3.0
paths:
cc: /usr/bin/gcc-9
cxx: null
f77: /usr/bin/gfortran-9
fc: /usr/bin/gfortran-9
flags: {}
operating_system: ubuntu20.04
target: x86_64
modules: []
environment: {}
extra_rpaths: []
-- clang ubuntu20.04-x86_64 -------------------------------------
clang@10.0.0 clang@7.0.1
-- gcc ubuntu20.04-x86_64 ---------------------------------------
gcc@9.3.0
spack install hpctoolkit
-----------------------
spack compiler list
-- clang ubuntu20.04-x86_64 -------------------------------------
clang@10.0.0 clang@7.0.1
-- gcc ubuntu20.04-x86_64 ---------------------------------------
gcc@9.3.0 gcc@10.2.0
cd ~/.spack/linux
emacs compilers.yaml &
compilers:
- compiler:
spec: gcc@10.2.0
paths:
cc: /usr/bin/gcc-10
cxx: null
f77: /usr/bin/gfortran-10
fc: /usr/bin/gfortran-10
flags: {}
operating_system: ubuntu20.04
target: x86_64
modules: []
environment: {}
extra_rpaths: []
- compiler:
spec: gcc@9.3.0
paths:
cc: /usr/bin/gcc-9
cxx: null
f77: /usr/bin/gfortran-9
fc: /usr/bin/gfortran-9
flags: {}
operating_system: ubuntu20.04
target: x86_64
modules: []
environment: {}
extra_rpaths: []
-- clang ubuntu20.04-x86_64 -------------------------------------
clang@10.0.0 clang@7.0.1
-- gcc ubuntu20.04-x86_64 ---------------------------------------
gcc@9.3.0
spack install hpctoolkit
-----------------------
spack compiler list
-- clang ubuntu20.04-x86_64 -------------------------------------
clang@10.0.0 clang@7.0.1
-- gcc ubuntu20.04-x86_64 ---------------------------------------
gcc@9.3.0 gcc@10.2.0
cd ~/.spack/linux
emacs compilers.yaml &
compilers:
- compiler:
spec: gcc@10.2.0
paths:
cc: /usr/bin/gcc-10
cxx: null
f77: /usr/bin/gfortran-10
fc: /usr/bin/gfortran-10
flags: {}
operating_system: ubuntu20.04
target: x86_64
modules: []
environment: {}
extra_rpaths: []
- compiler:
spec: gcc@9.3.0
paths:
cc: /usr/bin/gcc-9
cxx: null
f77: /usr/bin/gfortran-9
fc: /usr/bin/gfortran-9
flags: {}
operating_system: ubuntu20.04
target: x86_64
modules: []
environment: {}
extra_rpaths: []
-- clang ubuntu20.04-x86_64 -------------------------------------
clang@10.0.0 clang@7.0.1
-- gcc ubuntu20.04-x86_64 ---------------------------------------
gcc@9.3.0
spack install hpctoolkit
-----------------------
spack compiler list
-- clang ubuntu20.04-x86_64 -------------------------------------
clang@10.0.0 clang@7.0.1
-- gcc ubuntu20.04-x86_64 ---------------------------------------
gcc@9.3.0 gcc@10.2.0
cd ~/.spack/linux
emacs compilers.yaml &
compilers:
- compiler:
spec: gcc@10.2.0
paths:
cc: /usr/bin/gcc-10
cxx: null
f77: /usr/bin/gfortran-10
fc: /usr/bin/gfortran-10
flags: {}
operating_system: ubuntu20.04
target: x86_64
modules: []
environment: {}
extra_rpaths: []
- compiler:
spec: gcc@9.3.0
paths:
cc: /usr/bin/gcc-9
cxx: null
f77: /usr/bin/gfortran-9
fc: /usr/bin/gfortran-9
flags: {}
operating_system: ubuntu20.04
target: x86_64
modules: []
environment: {}
extra_rpaths: []
-- clang ubuntu20.04-x86_64 -------------------------------------
clang@10.0.0 clang@7.0.1
-- gcc ubuntu20.04-x86_64 ---------------------------------------
gcc@9.3.0
spack install hpctoolkit
F# interactive notebook not showing Plotly chart
#r "nuget: XPlot.Plotly"
#r "nuget: XPlot.Plotly.Interactive"
Generating and drawing sin wave using pygame
frequency = 5
amplitude = 50
overallY = 300
while True:
# [...]
no_pts = window.get_width()
for i in range(no_pts):
x = i/no_pts * 2 * math.pi
y = (amplitude * math.cos(x * frequency)) + overallY
if i > 0:
pygame.draw.aaline(window, (0, 0, 0), prev_pt, (i, y))
prev_pt = (i, y)
# [...]
React inlined SVG paths are not responding to css animations
import React from 'react';
import './style.css';
import Triangles from './svg/Triangles';
export default function App() {
return (
<div>
<Triangles />
</div>
);
}
import React from 'react';
export default function Triangles() {
return (
<div className="triangles">
<svg className="triangle one">
<path d="M150 0 L30 200 L270 200 Z" />
</svg>
<svg className="triangle two">
<path d="M120 0 L30 180 L200 200 Z" />
</svg>
<svg className="triangle three">
<path d="M10 0 L40 280 L190 170 Z" />
</svg>
</div>
);
}
/* Triangles */
.triangles {
position: relative;
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 50vh;
}
.triangle {
position: absolute;
fill: rgb(23, 233, 224);
fill-opacity: 0.4;
animation-name: spin;
animation-iteration-count: infinite;
animation-timing-function: linear;
}
.triangle.one {
height: 210px;
width: 300px;
animation-duration: 5000ms;
}
.triangle.two {
height: 150px;
width: 400px;
animation-duration: 9000ms;
}
.triangle.three {
height: 120px;
width: 300px;
animation-duration: 3000ms;
}
@keyframes spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
-----------------------
import React from 'react';
import './style.css';
import Triangles from './svg/Triangles';
export default function App() {
return (
<div>
<Triangles />
</div>
);
}
import React from 'react';
export default function Triangles() {
return (
<div className="triangles">
<svg className="triangle one">
<path d="M150 0 L30 200 L270 200 Z" />
</svg>
<svg className="triangle two">
<path d="M120 0 L30 180 L200 200 Z" />
</svg>
<svg className="triangle three">
<path d="M10 0 L40 280 L190 170 Z" />
</svg>
</div>
);
}
/* Triangles */
.triangles {
position: relative;
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 50vh;
}
.triangle {
position: absolute;
fill: rgb(23, 233, 224);
fill-opacity: 0.4;
animation-name: spin;
animation-iteration-count: infinite;
animation-timing-function: linear;
}
.triangle.one {
height: 210px;
width: 300px;
animation-duration: 5000ms;
}
.triangle.two {
height: 150px;
width: 400px;
animation-duration: 9000ms;
}
.triangle.three {
height: 120px;
width: 300px;
animation-duration: 3000ms;
}
@keyframes spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
-----------------------
import React from 'react';
import './style.css';
import Triangles from './svg/Triangles';
export default function App() {
return (
<div>
<Triangles />
</div>
);
}
import React from 'react';
export default function Triangles() {
return (
<div className="triangles">
<svg className="triangle one">
<path d="M150 0 L30 200 L270 200 Z" />
</svg>
<svg className="triangle two">
<path d="M120 0 L30 180 L200 200 Z" />
</svg>
<svg className="triangle three">
<path d="M10 0 L40 280 L190 170 Z" />
</svg>
</div>
);
}
/* Triangles */
.triangles {
position: relative;
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 50vh;
}
.triangle {
position: absolute;
fill: rgb(23, 233, 224);
fill-opacity: 0.4;
animation-name: spin;
animation-iteration-count: infinite;
animation-timing-function: linear;
}
.triangle.one {
height: 210px;
width: 300px;
animation-duration: 5000ms;
}
.triangle.two {
height: 150px;
width: 400px;
animation-duration: 9000ms;
}
.triangle.three {
height: 120px;
width: 300px;
animation-duration: 3000ms;
}
@keyframes spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
How to distort an array of images - Processing
//global variables, include speed1 and speed2
void loadImages() {
//as in grid code
}
void setup() {
//as in grid code...
}
void draw() {
//everything from grid code...
float distortion = map(mouseY, 0,500, 0, 10);
for (int i = 0; i < width; ++i) {
copy(i,0,1,height, //the rest...);
}
}
Matplotlib plot's title is missing for unknown reason in Python
pl.rcParams['animation.ffmpeg_path'] = r"PUT_YOUR_FULL_PATH_TO_FFMPEG_HERE\ffmpeg.exe"
Writer = animation.writers['ffmpeg']
anim.save('schrodinger_barrier.mp4', writer=Writer(fps=15, codec='libx264'))
-----------------------
pl.rcParams['animation.ffmpeg_path'] = r"PUT_YOUR_FULL_PATH_TO_FFMPEG_HERE\ffmpeg.exe"
Writer = animation.writers['ffmpeg']
anim.save('schrodinger_barrier.mp4', writer=Writer(fps=15, codec='libx264'))
WAVE file unexpected behaviour
0x00 0x65 // last byte of silence, 1st byte of actual beep: weird
0x65 0x05 // 1st and 2nd byte of beep: actual expected sample
public class WaveFileBuilder() {
byte[] audioBytes = null;
// ... other attributes, methods, constructor
public void addBytes(byte[] audioBytes) throws IOException {
// ... debug code above, handle empty
// THIS SHOULD CHECK audioBytes IS MULTIPLE OF blockSize
this.audioBytes = ArrayUtils.addAll(this.audioBytes, audioBytes);
// ... debug code below
}
public boolean saveFile(File outputFile) throws IOException {
// ... prepare headers
// concatenate header (BYTES) and contents
byte[] audioFileBytes = ArrayUtils.addAll(BYTES, audioBytes);
// ... write out bytes
try (FileOutputStream fos = new FileOutputStream(outputFile)) {
fos.write(audioFileBytes);
}
// ...
}
}
wavBuilder.addBytes(beep);
wavBuilder.addBytes(spaceBetweenDigits);
wavBuilder.addBytes(beep);
wavBuilder.addBytes(spaceBetweenDigits);
wavBuilder.addBytes(beep);
wavBuilder.addBytes(spaceBetweenDigits);
wavBuilder.addBytes(beep);
wavBuilder.addBytes(spaceBetweenDigits);
wavBuilder.addBytes(beep);
wavBuilder.addBytes(nextChar);
public class WaveFileBuilder() {
List<byte[]> chunks = new ArrayList<>();
// ... other attributes, methods, constructor
public void addBytes(byte[] audioBytes) throws IOException {
if ((audioBytes.length % blockAlign) != 0) {
throw new IllegalArgumentException("Trying to add a chunk that does not fit evenly; this would cause un-aligned blocks")
}
chunks.add(audioBytes);
}
public boolean saveFile(File outputFile) throws IOException {
// ... prepare headers
// ... write out bytes
try (FileOutputStream fos = new FileOutputStream(outputFile)) {
for (byte[] chunk : chunks) fos.write(chunk);
}
}
}
-----------------------
0x00 0x65 // last byte of silence, 1st byte of actual beep: weird
0x65 0x05 // 1st and 2nd byte of beep: actual expected sample
public class WaveFileBuilder() {
byte[] audioBytes = null;
// ... other attributes, methods, constructor
public void addBytes(byte[] audioBytes) throws IOException {
// ... debug code above, handle empty
// THIS SHOULD CHECK audioBytes IS MULTIPLE OF blockSize
this.audioBytes = ArrayUtils.addAll(this.audioBytes, audioBytes);
// ... debug code below
}
public boolean saveFile(File outputFile) throws IOException {
// ... prepare headers
// concatenate header (BYTES) and contents
byte[] audioFileBytes = ArrayUtils.addAll(BYTES, audioBytes);
// ... write out bytes
try (FileOutputStream fos = new FileOutputStream(outputFile)) {
fos.write(audioFileBytes);
}
// ...
}
}
wavBuilder.addBytes(beep);
wavBuilder.addBytes(spaceBetweenDigits);
wavBuilder.addBytes(beep);
wavBuilder.addBytes(spaceBetweenDigits);
wavBuilder.addBytes(beep);
wavBuilder.addBytes(spaceBetweenDigits);
wavBuilder.addBytes(beep);
wavBuilder.addBytes(spaceBetweenDigits);
wavBuilder.addBytes(beep);
wavBuilder.addBytes(nextChar);
public class WaveFileBuilder() {
List<byte[]> chunks = new ArrayList<>();
// ... other attributes, methods, constructor
public void addBytes(byte[] audioBytes) throws IOException {
if ((audioBytes.length % blockAlign) != 0) {
throw new IllegalArgumentException("Trying to add a chunk that does not fit evenly; this would cause un-aligned blocks")
}
chunks.add(audioBytes);
}
public boolean saveFile(File outputFile) throws IOException {
// ... prepare headers
// ... write out bytes
try (FileOutputStream fos = new FileOutputStream(outputFile)) {
for (byte[] chunk : chunks) fos.write(chunk);
}
}
}
-----------------------
0x00 0x65 // last byte of silence, 1st byte of actual beep: weird
0x65 0x05 // 1st and 2nd byte of beep: actual expected sample
public class WaveFileBuilder() {
byte[] audioBytes = null;
// ... other attributes, methods, constructor
public void addBytes(byte[] audioBytes) throws IOException {
// ... debug code above, handle empty
// THIS SHOULD CHECK audioBytes IS MULTIPLE OF blockSize
this.audioBytes = ArrayUtils.addAll(this.audioBytes, audioBytes);
// ... debug code below
}
public boolean saveFile(File outputFile) throws IOException {
// ... prepare headers
// concatenate header (BYTES) and contents
byte[] audioFileBytes = ArrayUtils.addAll(BYTES, audioBytes);
// ... write out bytes
try (FileOutputStream fos = new FileOutputStream(outputFile)) {
fos.write(audioFileBytes);
}
// ...
}
}
wavBuilder.addBytes(beep);
wavBuilder.addBytes(spaceBetweenDigits);
wavBuilder.addBytes(beep);
wavBuilder.addBytes(spaceBetweenDigits);
wavBuilder.addBytes(beep);
wavBuilder.addBytes(spaceBetweenDigits);
wavBuilder.addBytes(beep);
wavBuilder.addBytes(spaceBetweenDigits);
wavBuilder.addBytes(beep);
wavBuilder.addBytes(nextChar);
public class WaveFileBuilder() {
List<byte[]> chunks = new ArrayList<>();
// ... other attributes, methods, constructor
public void addBytes(byte[] audioBytes) throws IOException {
if ((audioBytes.length % blockAlign) != 0) {
throw new IllegalArgumentException("Trying to add a chunk that does not fit evenly; this would cause un-aligned blocks")
}
chunks.add(audioBytes);
}
public boolean saveFile(File outputFile) throws IOException {
// ... prepare headers
// ... write out bytes
try (FileOutputStream fos = new FileOutputStream(outputFile)) {
for (byte[] chunk : chunks) fos.write(chunk);
}
}
}
-----------------------
0x00 0x65 // last byte of silence, 1st byte of actual beep: weird
0x65 0x05 // 1st and 2nd byte of beep: actual expected sample
public class WaveFileBuilder() {
byte[] audioBytes = null;
// ... other attributes, methods, constructor
public void addBytes(byte[] audioBytes) throws IOException {
// ... debug code above, handle empty
// THIS SHOULD CHECK audioBytes IS MULTIPLE OF blockSize
this.audioBytes = ArrayUtils.addAll(this.audioBytes, audioBytes);
// ... debug code below
}
public boolean saveFile(File outputFile) throws IOException {
// ... prepare headers
// concatenate header (BYTES) and contents
byte[] audioFileBytes = ArrayUtils.addAll(BYTES, audioBytes);
// ... write out bytes
try (FileOutputStream fos = new FileOutputStream(outputFile)) {
fos.write(audioFileBytes);
}
// ...
}
}
wavBuilder.addBytes(beep);
wavBuilder.addBytes(spaceBetweenDigits);
wavBuilder.addBytes(beep);
wavBuilder.addBytes(spaceBetweenDigits);
wavBuilder.addBytes(beep);
wavBuilder.addBytes(spaceBetweenDigits);
wavBuilder.addBytes(beep);
wavBuilder.addBytes(spaceBetweenDigits);
wavBuilder.addBytes(beep);
wavBuilder.addBytes(nextChar);
public class WaveFileBuilder() {
List<byte[]> chunks = new ArrayList<>();
// ... other attributes, methods, constructor
public void addBytes(byte[] audioBytes) throws IOException {
if ((audioBytes.length % blockAlign) != 0) {
throw new IllegalArgumentException("Trying to add a chunk that does not fit evenly; this would cause un-aligned blocks")
}
chunks.add(audioBytes);
}
public boolean saveFile(File outputFile) throws IOException {
// ... prepare headers
// ... write out bytes
try (FileOutputStream fos = new FileOutputStream(outputFile)) {
for (byte[] chunk : chunks) fos.write(chunk);
}
}
}
-----------------------
0x00 0x65 // last byte of silence, 1st byte of actual beep: weird
0x65 0x05 // 1st and 2nd byte of beep: actual expected sample
public class WaveFileBuilder() {
byte[] audioBytes = null;
// ... other attributes, methods, constructor
public void addBytes(byte[] audioBytes) throws IOException {
// ... debug code above, handle empty
// THIS SHOULD CHECK audioBytes IS MULTIPLE OF blockSize
this.audioBytes = ArrayUtils.addAll(this.audioBytes, audioBytes);
// ... debug code below
}
public boolean saveFile(File outputFile) throws IOException {
// ... prepare headers
// concatenate header (BYTES) and contents
byte[] audioFileBytes = ArrayUtils.addAll(BYTES, audioBytes);
// ... write out bytes
try (FileOutputStream fos = new FileOutputStream(outputFile)) {
fos.write(audioFileBytes);
}
// ...
}
}
wavBuilder.addBytes(beep);
wavBuilder.addBytes(spaceBetweenDigits);
wavBuilder.addBytes(beep);
wavBuilder.addBytes(spaceBetweenDigits);
wavBuilder.addBytes(beep);
wavBuilder.addBytes(spaceBetweenDigits);
wavBuilder.addBytes(beep);
wavBuilder.addBytes(spaceBetweenDigits);
wavBuilder.addBytes(beep);
wavBuilder.addBytes(nextChar);
public class WaveFileBuilder() {
List<byte[]> chunks = new ArrayList<>();
// ... other attributes, methods, constructor
public void addBytes(byte[] audioBytes) throws IOException {
if ((audioBytes.length % blockAlign) != 0) {
throw new IllegalArgumentException("Trying to add a chunk that does not fit evenly; this would cause un-aligned blocks")
}
chunks.add(audioBytes);
}
public boolean saveFile(File outputFile) throws IOException {
// ... prepare headers
// ... write out bytes
try (FileOutputStream fos = new FileOutputStream(outputFile)) {
for (byte[] chunk : chunks) fos.write(chunk);
}
}
}
QUESTION
Convert ckeditor Data to html
Asked 2021-Jun-15 at 14:37I'm building a vue app where user input data that I store in mongo database. One of the form elements is a ckeditor. When the user inputs data everything works fine.
Now the problem is when I make an API call to get the ckeditor text that user did input, I receive plein string text that I can't convert to html element.
Here's my code
<script>
export default {
data() {
return {
courrierId: this.$route.params.detail,
courrier: '',
}
},
// i receive the full courrier object without a problem
async created() {
const courrier = await axios
.post(`${baseUrl}getCourrierDetails/${this.courrierId}`)
.then((response) => {
this.courrier = response.data[0]
console.log(response.data)
return response.data
})
.catch((error) => ({ error: JSON.stringify(error) }))
},
}
</script>
Here's the courrier object I do receive from the DB
What I want to do, is to display the data in the frontend. Everything works fine except for the Text. Here's the code
<div class="text-muted">
<h5 class="font-size-16 mb-3">Pour</h5>
<p class="mb-1">
Nom : <strong>{{ this.courrier.Nom }}</strong>
</p>
<p class="mb-1">
Prénom : <strong>{{ this.courrier.Prénom }}</strong>
</p>
<p class="mb-1">
Alger le : <strong>{{ this.courrier.Date }}</strong>
</p>
<p class="mb-1">
Age : <strong>{{ this.courrier.Age }}</strong>
</p>
</div>
<h5 class="text-center">
{{ this.courrier.Type }}
</h5>
{{ this.courrier.Text}} <!-- this is where the problem reside -->
<div class="d-print-none mt-4">
<div class="float-end">
<a href="javascript:window.print()" class="btn btn-success waves-effect waves-light mr-1">
<i class="fa fa-print"></i>
</a>
<a href="#" class="btn btn-primary w-md waves-effect waves-light">
Send
</a>
</div>
</div>
ANSWER
Answered 2021-Jun-15 at 14:37You can use the v-html
directive to output real HTML:
<span v-html="this.courrier.Text"></span>
But, It's really not safe. you should refer to vue's documentation at https://vuejs.org/v2/guide/syntax.html#Raw-HTML
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
No vulnerabilities reported
Save this library and start creating your kit
Save this library and start creating your kit