Posts by Marcelo Batista • 1,617 points
57 posts
-
0
votes2
answers51
viewsA: Align Divs, with or without Bootstrap
All I see is Justify-content-start if it’s just bootstrap <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"/> <div class="container">…
-
1
votes1
answer782
viewsA: Fetch function in Javascript returns Undefined
What is happening in your code and what you are logging in before you even have the Promise result. var url = "https://api.github.com/users/random-user"; function makeRequest(url) { fetch(url)…
-
1
votes2
answers915
viewsA: Error "Property 'REDUX_DEVTOOLS_EXTENSION_COMPOSE' does not exist on type 'Window & typeof globalThis'."?
My solution to the problem was : const composeEnhancers = typeof window === 'object' && (window as any).__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ? (window as…
-
0
votes2
answers915
viewsQ: Error "Property 'REDUX_DEVTOOLS_EXTENSION_COMPOSE' does not exist on type 'Window & typeof globalThis'."?
When configuring Redux Devtools I get the following Typescript error: Property 'REDUX_DEVTOOLS_EXTENSION_COMPOSE' does not exist on type 'Window & typeof globalThis'. store ts. import {…
-
3
votes1
answer72
viewsA: Convert millions of STRING to INT - Javascript
In this example, I first did the formatting by removing the stitches, then did the conversion. var numeroFormatado = `123.456.789`.replace(/\./g, ``) numero = parseInt(numeroFormatado)…
-
0
votes6
answers30079
viewsA: How to insert HTML with Javascript?
An unconventional way would be to inherit the innerHtml property from the Htmlelements interface. For example: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8">…
-
0
votes1
answer44
viewsQ: Failure to push
When you push on my machine I received the following error : hint: Updates Were Rejected because the remote contains work that you do hint: not have locally. This is usually caused by Another…
gitasked Marcelo Batista 1,617 -
1
votes1
answer106
viewsA: Create a Github/ git repository
Apparently his branch has nothing, so you should add something to your stage. So with the commands below you can add items to your Github. with the command: git add . or can specify with the file…
-
0
votes1
answer38
viewsA: How do break the children aligned with flexbox?
You can combine the flex-Direction and fle-wrap properties to get the result you want. <!DOCTYPE html> <html lang="pt-br"> <head> <title>flexbox</title> <meta…
-
10
votes1
answer4230
viewsQ: What is the difference between export and export default?
What is the difference between using the reserved word export and export default. For example: export class Helper { } export default class Helper { }…
-
1
votes1
answer337
viewsQ: What does this character mean in package.json dependencies?
What does this character mean in the version of the package json dependencies ? What is the utility ? What will change in my project with this ? { "name": "", "description": "", "version": "1.2.3",…
node.jsasked Marcelo Batista 1,617 -
0
votes2
answers57
viewsA: Why are div "social network" leaving the div when I use float
Apparently your problem is in defining the properties of the main box. #topo { background-color: #000000; margin: auto; } .menu { display: flex; justify-content: space-between; padding: 1rem;…
-
0
votes2
answers72
viewsA: How can I define an element over another element?
You can use the z-index property, below I added a link about the property: dev-media: css z-index <!DOCTYPE html> <html> <head> <style> div { background-color: red; position:…
-
0
votes2
answers735
viewsA: Accessing a property of an object array within another object array
You can also extract the properties by combining array.from and destructing. For example: const users = [ { name: 'John' , active: false }, { name: 'Mary' , active: true }, ]; const userNames =…
-
3
votes2
answers144
viewsA: Where is the error in the leap year code?
I know it was not mentioned, however Voce can also validate whether a year is leap or not with the days check of the month. For example: function calculaAno(){ const getAno =…
-
2
votes1
answer214
viewsQ: Resize image in c#
I would like to know how to resize images in c#. I will receive images in both JPG, JPEG, GIF and PNG. using System; using System.Collections.Generic; using System.ComponentModel; using System.Data;…
c#asked Marcelo Batista 1,617 -
4
votes1
answer1332
viewsQ: What _: and _
What does _: and _. mean in the definition of functions as in the example below. constructor(){ router.events.subscribe((_:NavigationEnd) => this.currentUrl = _.url); } I have many doubts about.…
-
0
votes1
answer846
viewsQ: Change color only of the clicked element (Angularjs)
I need to change the color only of the element that was clicked, in case change the background color of the DIV, I have an ng-repeat, but when clicking on the div, all the others have the background…
angularjsasked Marcelo Batista 1,617 -
3
votes3
answers5520
viewsA: How to install Jquery in Angular?
jQuery at Angular CLI Install the package through: npm install jquery — save later on your . /angular-cli.json. “scripts”: [ “../node_modules/jquery/dist/jquery.min.js” ], you can also do the same…
-
3
votes3
answers1030
viewsA: HTML / CSS - input date height width
You can add the style tag directly to your html tag for example : <input type="date" name="date" id="date" style="width:500px;height:500px;"> But it is not recommended and if I am not mistaken…
-
4
votes1
answer355
viewsA: Create angular design without using angular-cli
You can use this example angular Seed to implement the settings, however the most sensible and assess if really worth all this effort (or if it is just out of curiosity), and if it is a small…
angularanswered Marcelo Batista 1,617 -
0
votes1
answer4391
viewsA: Angular5 - Error: Local Workspace file ('angular.json') could not be found
Upgrade to the next version of the CLI angle npm uninstall -g @angular/cli npm cache verify npm install -g @angular/cli@next and recreate the project with ng new project , because it seems an error…
-
10
votes9
answers15601
viewsA: 'nodemon' is not recognized
npm install -g nodemon npm install --save-dev nodemon npm config get prefix set PATH=%PATH%;C:\Users\"Aqui seu usuario"\AppData\Roaming\npm; I found this solution this site…
-
4
votes9
answers15601
viewsQ: 'nodemon' is not recognized
After nodemon installation I get the following error : 'nodemon' is not recognized as an internal command or external, a operable program or a batch file. The following commands have been passed:…
-
14
votes3
answers919
viewsQ: How to make a pure css spinner?
It is possible to make a spinner with pure CSS, without Javascript ? <div class="main spinner"> O que é Lorem Ipsum? Lorem Ipsum é simplesmente uma simulação de texto da indústria tipográfica…
-
0
votes5
answers6090
viewsA: Autofocus: position the cursor at the end of the value
var input = document.querySelector('input'); input.addEventListener('click', function() { this.value = this.value; }); .myinput { padding: 5px; margin:5px; } form{ margin:10px; } .mysubmit {…
htmlanswered Marcelo Batista 1,617 -
0
votes3
answers818
viewsA: Validate Select jqueryValidate with Materializecss
Add the Materialize instance,as recommended in the documentation: Documentation of the Materialize. $(document).ready(function() { $('select').material_select(); }); *{ background:#f1f1f1; }…
-
0
votes1
answer716
viewsQ: Error message : Cannot read Property 'thisCompilation' of Undefined
I’m using Angular for a project and Visual Studio Code when running the command ng serve, return the following error to me: NG Live Development Server is Listening on localhost:4200, open your…
-
0
votes1
answer142
viewsQ: Include Sass in angular 5
What better way to set up SASS at angular 5, and there is some specific implementation to organize it in the project.
-
1
votes1
answer1103
viewsQ: Has some difference between ng-if and *ngIf
What’s the difference between ng-if and *ngIf in Angular 5? The two implementations work normally at Angular 5?
angularasked Marcelo Batista 1,617 -
2
votes2
answers32
viewsA: A doubt regarding the toggle button
Voce can use Collapse bootstrap, and a script to modify the Divs closure, for example <div id="accordion" role="tablist"> <div class="card"> <div class="card-header" role="tab"…
-
10
votes4
answers9952
viewsQ: Error: Another git process seems to be running in this Repository
I have a repository with several files, including html, javascript, css among others, and today I had this error, I’ve researched quite a lot more no solutions so far surtiu effect. Another git…
-
6
votes1
answer281
viewsQ: What is the difference between Prototype and an Object?
I use new to create objects in javascript and for what I noticed very superficially there is not a big difference between the instance with new and using the prototype. What’s the difference and…
javascriptasked Marcelo Batista 1,617 -
0
votes2
answers558
viewsA: Keep only one panel open on the Accordion Bootstrap3
I had the same problem, and if I understand your question correctly I think this code can help var active = true; $(document).on("click", ".accordion ","show.bs.collapse", function () { if (active)…
-
0
votes1
answer101
viewsA: reuse jquery clones in another div
set a new variable for the clone using its properties elsewhere var taskDefaultClone = $atividadeDefaultask.clone(true); var taskSubDefault = taskDefaultClone.clone(true);…
-
-1
votes1
answer101
viewsQ: reuse jquery clones in another div
I have a section of Html which is cloned and completed through jquery, however need to use the same cloned structure in another place keeping and clear the first cloned site, in case it would be two…
-
0
votes1
answer1669
viewsQ: It is possible to edit the html 5 input date style
I use this calendar <input type="date"> I researched it but so far I found nothing about its formatting css. I wanted to know if it is possible to use it and how can I do it. If there are…
html5asked Marcelo Batista 1,617 -
0
votes1
answer977
viewsQ: replace text with another
My doubt and the following, I have a Button and I want to exchange your text for the text of li (tag text <a>) subsequent. At first I made a script that did not work, my intention in short, is…
-
-1
votes1
answer574
viewsQ: error in full Legend
I have a complete calendar and when I change the language to Portuguese, it returns me this error. Uncaught Typeerror: Cannot read Property 'defineLocale' of Undefined $('#calendar').fullCalendar({…
-
2
votes2
answers68
viewsA: Iterator should return a String
import csv def carregar_acessos(): X = [] Y = [] arquivo = open('acesso.csv', 'rb') leitor = csv.reader(arquivo) next(leitor) for…
-
1
votes0
answers78
viewsQ: remove element from Full Legend
I have a full Legend that allows me to use the events in other elements outside the calendar, however I would like the default events that comes in the calendar as for example the Prev, next and…
-
0
votes3
answers447
viewsA: Problem in the use of malloc and realloc
here an example using columns and rows map. c #include <stdio.h> #include <stdlib.h> #include "fogefoge.h" char** mapa; int linhas; int colunas; void liberamapa(){ for (int i = 0; i <…
-
4
votes1
answer5406
viewsQ: What’s the difference between cshtml and html
Is there any difference between CSHTML and HTML, mainly in security, performance and application? There is some loss when using HTML on a project ASP MVC, and what are the benefits of using the…
-
0
votes3
answers1153
viewsA: Next() in CSV Reader with Python 3
import csv def carregar_acessos(): X = [] Y = [] arquivo = open('acesso.csv', 'rb') leitor = csv.reader(arquivo) next(leitor) for…
-
0
votes2
answers1156
viewsA: slideToggle(); open and close by clicking on the same link, if you click on another just change content of the div
$( "ul > li" ).click(function() { $(".product-info").slideToggle('slow') }) div.product-info{ background-color:red; padding:1rem; margin:1rem; color:#fff; font-weight:bold; text-align:center;…
-
1
votes2
answers153
viewsQ: Hide everything but the clicked element
I have a script that toggle in a DIV,when the icon and clicked the div make the toggle, the other DIVS were closed, initially I used the accordian of Jquery, however it was not useful, because the…
jqueryasked Marcelo Batista 1,617 -
1
votes1
answer136
viewsA: disable the white space at the end of the lines (non-space)
Uses the file name in the command: eslint ./src/main.js --fix
-
4
votes2
answers52
viewsQ: Keep the initial class of the element
I have a script that does the toggle in the icon, interspersed when the element is clicked, my intention is when the second or the others icons were clicked, the elements remained with the class…
-
0
votes1
answer565
viewsQ: change color only of clicked element
I need to change the color only of the element that was clicked, in case change the background color of the div - the same and cloned several times creating more div in html depending on how much is…
jqueryasked Marcelo Batista 1,617 -
0
votes1
answer136
viewsQ: disable the white space at the end of the lines (non-space)
I have this mistake in a project Vue js, I know it’s about Eslint I checked the tutorial on the website on how to remove error with command --fix, however it did not take effect, if anyone knows, I…