Questions tagged [line]

The quickest route from point A to point B. Alternatively, a sequence of characters displayed on a screen.

How can I use JavaScript or CSS to identify the specific line on which certain words appear in the client's browser?

Imagine I have the following HTML structure: <div> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco labor ...

Creating a line of functions pool in Javascript with a delay feature

Recently, I created a code snippet that simulates a function line. It involves calling functions such as fn1, delay, fn2, delay, and so on. The idea is to call a function, remove it from the line, have a short sleep, and repeat. However, I've encount ...

Decrease the gap between the <hr> and <div> elements

I currently have multiple div tags with hr tags in between, resulting in automatic spacing. I am looking to decrease this space. Please view the image link provided below for reference. [I am aiming to minimize the gap indicated by the arrow] Additionally ...

Locating the source of a JSON parsing error

Currently, I am in the process of developing a web application that enables users to upload data in JSON format. The method I am using to read local JSON files is as follows: function loadJSON(url, callback) { // set MIME type to avoid XML parsing in Fi ...

Echarts: scatter plots linked with a line to the axis (resembling the PACF diagram)

I am currently working with echarts (js). Is there a method to link the dot of the scatter plot with the 0 value on the y-axis? I want it to resemble a pacf plot, similar to this example: The desired outcome should look something like this: https://i.sta ...

Utilizing either jQuery or Angular, implement a function that adds line breaks after every x characters within

Is there a way to automatically insert a line break every 10 characters in my code? Here is what I have tried so far: Here is the HTML: <div ng-app=""> <textarea id="chat" ng-model="msg"></textarea> <span class="msg" ng-bind="msg" ...

Why does my element appear to be a different color than expected?

I've developed a sleek wind map (check out for reference). Using a weighted interpolation every 10ms, I generate uVector and vVector data to calculate wind speed. Based on this speed, each point is assigned a specific color as outlined below. if (weightW ...

Remove all content before a specified line when cleaning text using regular expressions

I have a file that contains the famous play, The Tragedy of Macbeth. My goal is to clean up this file by removing everything before the line The Tragedie of Macbeth and saving the rest in a file called removed_intro_file. Here's what I've attempted so far ...

After being redrawn, the line on the canvas vanishes

After updating the angle value, the line is quickly redrawn correctly but then disappears. It seems like the input value may be getting refreshed and set to undefined again. How can I ensure that the line retains the correct angle? <script language=" ...

Present data extracted from MySQL

Currently, my code retrieves data from a MySQL table and displays it on the page in a single line. However, I want to present this information in separate blocks. Is there a way to split the line and create distinct blocks of information that can be plac ...

You can choose to make the <br> tag optional for the final line

I'm looking to change the color of the line following /r to red, but only that specific line. Here's what I have so far (note that is replaced with <br> earlier): $str = preg_replace("//r(.*)<br>/", '<font color="red">$1</font> ...

Generate a line graph that displays distinct colors for each row group and varying line styles for columns

I am working with the dataframe df provided below. How can I modify it so that each run is represented by a different color on its own line? Additionally, I want the values from column "Val_B" to be displayed as dashed lines, and the values from column "Va ...