Posts by Rafael Rotiroti • 493 points
46 posts
-
1
votes2
answers262
viewsA: How to pass props to the state in React
You don’t necessarily need to declare a function to update a state. For example, a data entry can be updated as soon as there is any change using the onChange(): <input value={this.state.value}…
reactanswered Rafael Rotiroti 493 -
2
votes1
answer101
viewsA: How do I make appends on Mongoose models?
the ideal would be you reference as follows in your Model. Example: user: { type: mongoose.Schema.Types.ObjectId, //aqui é a referencia ao id ref: 'User' //Nome da "tabela" }, I think in your case…
-
0
votes1
answer162
viewsA: How to log in with firebase and consume data from a local Rest api made with Node?
You can already import firebase and authenticate right? Just protect your route with firebase authentication service. const auth = 'SEU_FIREBASE_SERVICE'; router.post('/', auth.FUNCAO_AUTH,…
-
1
votes2
answers123
viewsA: Doubt architecture deployment with Elasticsearch?
Depends a lot... I would not recommend using Elasticsearch as a primary database, because it is a document. Once the data is there, the data is transformed and stored in the Elasticsearch cluster…
-
1
votes1
answer228
viewsQ: What is the difference between the behavior of a static method, normal method and class method?
I’m studying python with OOP and sometimes I feel confused when using a certain method. class MeuObjeto(object): def __init__(self, objeto): self.objeto = objeto def metodo_normal(self): //sem…
-
0
votes1
answer54
viewsA: How do I change a line in a data file iterated in Python?
You can and should use the function iteritems(); Thus: for x, y in lista_de_linhas.iteritems(): Then just follow your logic. Python - Iteritems()…
pythonanswered Rafael Rotiroti 493 -
0
votes4
answers1515
viewsA: Take a field value by id and put it into a variable
You must assign the ID you want to pick up in some html string. For example: <p id="teste">Algum texto de exemplo</p>
-
-1
votes1
answer76
viewsA: How to put mat-chips inside a textarea
Try putting a event.stopPropagation(); in your Function adicionaConta($event)
-
1
votes4
answers5739
viewsA: How to separate the letters of a string that are inserted into a list and place them in an array?
I think I can help you that way using List: testes = ['teste','teste','teste','teste','teste'] testes_separados = [] for teste in testes: testes_separados.append(list(teste)) print(teste)…
-
1
votes2
answers391
viewsA: consumptionwebservice Rest returns: No 'Access-Control-Allow-Origin'
Recently I’ve been having the same problem and had to study a little CORS: Access-Control-Max-Age -> maximum time it gets curly in the browser. Access-Control-Allow-Origin -> Specifies who has…
-
2
votes1
answer1248
viewsA: Creating new environments (Nvironments) in Anaconda 3
If your question is related to why you have to create virtual environments for python projects (virtualenvs, venv, workon) I think I can summarize it as follows: In the case of Ubuntu, which uses…
-
0
votes2
answers102
viewsA: How to display the attributes of an Exception in Python?
It’s very simple, you can Print something or even return a JSON. try: return bla except Exception as ex: # print "Sua mensagem" # ou return algo See also the documentation: 2.7…
-
2
votes1
answer126
viewsA: Javascript and Angularjs - Good practices for capturing data from a logged-in user
There is a lot to take into account, as is the way you log in (you said you create a session, your back-end can be Asp.net or PHP) if it is Session created between the application and server or…
-
0
votes1
answer159
viewsA: Python - problem with PIP (or modules)
Wilson, the ideal would be for you to create a virtualEnv. It may be that some s.o software uses python and it does not allow you to manipulate the modules with Pip (pq it installs in general)…
-
0
votes2
answers277
viewsQ: Codeigniter-friendly URL with emphasis on SEO
Friends, I am developing a blog in CI. And thinking about the blog SEO, I would like the URL instead of being presented this way: https://meusite.com.br/blog/postagem/1 I would like it to be shown…
-
0
votes1
answer319
viewsQ: Buttons - ID - Carousel not working
I don’t know much about jQuery, but what might be going on? I just wish the arrows could work properly, don’t mind the style. <!DOCTYPE html> <html> <head> <meta…
-
0
votes1
answer43
viewsQ: Rationale: Select PHP with positions reversed in html
I would like to pull from the bank information like title, description and image. But this way exactly in the script below. Can someone help me with logic? <link rel="stylesheet"…
-
0
votes1
answer3653
viewsQ: Navbar Bootstrap 4 Collapse now automatic
I am copying EXACTLY any navbar template I found in the new bootstrap 4 documentation I am using in my projects. Only, it already comes "collapsado" let’s say so. Is there any javascript function…
-
0
votes3
answers332
viewsA: Receive Jquery and PHP response from second to second
I believe that in the function itself beforeSend(); You can create a loop stating the amount of records entered. (If I understood it that way).
-
2
votes2
answers5284
viewsQ: How to do Inner Join in mysql?
I have 2 tables in my database, Categories and Cars. The table categories has a PK Id_category and Name. Already Automobiles has a PK Id_automoveis and the other columns that make up this table…
-
0
votes0
answers87
viewsQ: Duplicate registry in mysql
I’m having trouble creating a table and entering some records so I can work with some queries. As much as I create a test table only with ID and name. When inserting by the same mysql tool it…
mysqlasked Rafael Rotiroti 493 -
1
votes3
answers367
viewsQ: MYSQL relationship between tables
I’m not very good with database relationship and am starting my studies. I wonder why developers shorten when calling tables or if this is the mandatory? SELECT p.*, c.`nome` AS categoria, u.`nome`…
mysqlasked Rafael Rotiroti 493 -
0
votes2
answers676
viewsQ: Repeat data from a row in the modal table
I receive from the website contact form the data and list them on a system backend. Currently all of them are displayed online (nome, assunto, e-mail, telefone, id , ação[excluir]), I would like it…
-
0
votes1
answer1958
viewsQ: How to make the automatic animated scroll effect?
This site I found https://cliquestudios.com/ has a super cool effect that I would like to do a similar on my site: When you scroll down, item 01 changes to 02. Consequently, the content changes. I…
-
0
votes2
answers142
viewsQ: Style sheets (js,css) in subdomain or in a folder within the application?
I’m having a question. I think someone’s been through it some day too. I always loaded my styles inside a folder in my application: Ex: http://meudominio.com.br/assets/css - ou js e etc Observing…
-
2
votes2
answers610
viewsQ: Good practices Codeigniter
I see several programmers calling all views to build a page in the example controller: $this->load->view('head',$var); $this->load->view('home'); $this->load->view('script');…
-
-4
votes3
answers1114
viewsA: Error on line 0 (zero)? How can this?
Something similar has happened to me, see if in the first line where you open the PHP tag there is no space: espaço aqui<?php ?> <?php ?> <-- deve ficar assim…
phpanswered Rafael Rotiroti 493 -
1
votes2
answers209
viewsA: Related tables: What is it? What is it? What is it for? What justifies its use?
Hello Vinicius, I haven’t heard of "related tables"... What I see a lot in Database are Related Tables. Each table has its PK (Primary key), and this Primary key can be a FK( Foreign key from…
-
1
votes2
answers1324
viewsQ: Parallax effect is not working on mobile
I’m developing a new website here from the company http://teste.softlove.us/ And everything is working (effects and sizes), I’m using Bootstrap and jQuery, except in mobile that in Home and About Us…
-
0
votes2
answers435
viewsA: PHP logout with Codeigniter
Only public function sair(){ $this->session->sess_destroy(); redirect('view aonde quer voltar'); }…
-
-1
votes2
answers186
viewsA: Make your website open only on mobile
I think it would not be "only on mobile devices" but responsive. Understanding your side, I believe you would like it to be used only on mobile devices and in case any desktop access is not…
-
1
votes2
answers498
viewsA: Fill a textbox with combobox element
I think if I understood the jQuery can meet you <html lang="pt-br"> <head> <meta charset="UTF-8"> <title>Title</title> <style> /*removendo o estilo do select*/…
-
0
votes1
answer238
viewsA: E-mail PHP+Codeigniter
Simple Mail Transfer Protocol (abbreviated SMTP. stands for "Simple Mail Transfer Protocol") is the standard protocol for sending emails over the Internet. You can post excerpt from your code so we…
-
0
votes2
answers635
viewsA: Bootstrap menu does not work, according to the code provided by the site
Use the CDN <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
-
0
votes0
answers259
viewsQ: Multiple Carousel on the same page
By inserting multiple Carousel , by clicking on any other Carousel, only the first changes. Someone can help me? <section> <div class="row"> <div class="col-lg-6"> <h3>Titulo…
-
4
votes1
answer1174
viewsQ: Problem with codeigniter (mysqli) BD connection
Guys, I made a registration form for newsletter. And when loading the database on autoload['libraries'], presents an error Call to Undefined Function mysqli_init() in…
-
0
votes3
answers87
viewsA: Modal jQuery or Bootstrap that receives email and name, automatically displayed when loading the page
<div id="#modal"> <div class="modal fade"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> <button type="button"…
-
0
votes3
answers87
viewsQ: Modal jQuery or Bootstrap that receives email and name, automatically displayed when loading the page
I tried the following code, but it’s not working <script type="text/javascript"> $(document).ready(function() { $('#myModal').modal('show'); }); </script> <script…
-
-1
votes2
answers1243
viewsQ: Pop up with jquery before closing the browser
People would like to do a pop up that appears before the person closes the browser tab equal to Shoptime: http://www.shoptime.com.br/ I don’t have much Javascript knowledge, much less jquery. Can…
-
1
votes1
answer84
viewsQ: Save visitors e-mail (Newsletter) with codeigniter
Good morning guys, I’m a beginner in PHP and codeigniter. I need a light, I even found what I need but not in codeigniter (Because my site is in mvc). This was found and worked on my localhost…
-
2
votes2
answers506
viewsQ: Curriculum attachment via e-mail in Codeigniter not working
Good afternoon, I am using this code to receive some data from alleged candidates who subscribe to the site. I would like the applicant to send the attached file. Views are ok.. and I think the…
-
-1
votes2
answers123
viewsA: Problem with responsive div with 1920px resolution
try it : #menuEmpresa { position: absolute; margin-top: -20px; background-color: #f5f5f5; **width: 100%;** min-height: 400px; If it doesn’t work answer me here that I have other tests. but probably…
-
0
votes1
answer51
viewsA: Parallax and Pin Elements
download the jquery library from version 1.11.1 and use the code below in css: #parallaxBar{ max-width: 100%; height:750px; background-color:#004c82; background: url('enderecolocaldoarq') no-repeat…
-
0
votes1
answer47
viewsA: Animation move from right to left direction
Try to define two sides, left and right as a variable. Then try to make the background follow this variable according to the speed and effect you want.. If that’s what I understand, you can follow…
-
1
votes1
answer147
viewsQ: Site does not pull local style settings
I use codeigniter in my application. The localhost works perfectly. I use a folder Assets outside the Application, where it contains all my files. the code I pull is this: <link href="<?php…
-
0
votes1
answer525
viewsQ: Friendly URL Code Igniter does not work
my htaccess inside the application folder is so: RewriteEngine on RewriteCond $1 !^(index.php|images|robots.txt) RewriteRule ^(.*)$ /index.php/$1 [L] Am I putting it in the right folder? Correct…