Posts by ayelsew • 818 points
52 posts
-
0
votes1
answer32
viewsQ: How to put typing in the return of Object.Keys being the types the Keys of the Object or the interface?
I got the following Interface interface UserState { id: string; isDeleted: boolean; deletedAt: null | string; name: string; email: string; picture: string; } Object const state: UserState = { id:…
-
1
votes0
answers30
viewsQ: Why is the method developer executed before the class is instantiated?
I was investigating about using decorators on nodejs express routers, and found the following turorial How to make REST API’s using Node.js, Express.js & Typescript Decorators Analyzing the…
-
0
votes1
answer204
viewsQ: Sequelize error: [...]. belongsToMany([...]) requires through option, pass either a string or a model
I’m importing models using the autoloader (index.js) of the sequelize. An Accesslevel model has a relationship with the Menu model (N: N), through the Accesslevelhasmenu model. What should happen?…
-
1
votes0
answers125
viewsQ: Loader HTML error in Electron-webpack
I’m looking for a solution to run; Electron and React following an MVC structure. I found the Electron-webpack module that apparently extends over standard webpack. Following the documentation I set…
-
2
votes1
answer167
viewsQ: How to calculate the distance of devices over WI-FI using force and signal frequency?
How can I calculate the distance of a device by wifi, using the strength of the signal of the same? I’m using tshark (wireshark) to perform this 802.11 scan, capturing only Prob requests (the moment…
-
-1
votes2
answers86
viewsA: Combining CSS selections with parent child and sibling elements
The CSS "Cascading Style Sheets", as the name already says, cascades where the child inherits values from his ancestor. So a relative element cannot have altered properties in relation to its heir.…
-
0
votes2
answers218
viewsQ: How to pick up ping time with the https node module
How can I perform the ping calculation between client and server using the http/https Node module. NOTE: I use this module specifically because the purpose of the script is to generate log…
-
0
votes1
answer80
viewsQ: Connect microphone to Analyser to get hertz with javascript
How do I connect the audio input from the microphone to the Audiocontext API’s Analyser to get the frequency in Hertz? Javascript: let display = document.getElementById("display"); let ctx = new…
-
3
votes1
answer27
viewsQ: How to specify the search engines to update an HTML document?
According to MDN using the tag <time></time> attribute-ridden datetime <time datetime="yyy-mm-dd hh:mm:ss"></time>, allows search engines to know the document’s creation…
-
0
votes0
answers284
viewsQ: How to center in X and Y axis the alternative text of the img tag?
How can I set up CSS to always make alternative text middle-centered in the tag <img/> in Google Chrome browser? In firefox apply only display: flex or inline-flex with align-items: center and…
-
0
votes1
answer5078
viewsQ: Pass information between components without Reactjs hierarchy
How to pass information between components in React as props or status. In this situation I have a button and a menu. The menu should open every time the button is clicked. Knob import React, {…
-
0
votes1
answer318
viewsA: Insert data into answer server Node.js
You can. the method res.send is used to send text in the body of the reply to the client. This text can be JSON, XML... To render pages using the method res.render expressjs example:…
-
0
votes2
answers623
viewsQ: Regular expression for dynamic URL
I have an html file with urls in this URL pattern: https://www.olympikus.com.br/tenis-olympikus-flower-415-feminino-cinza-D22-1131-010 The standard is protocolo://dominio/strig-dinâmica-000-0000-000…
-
0
votes1
answer25
views -
0
votes4
answers2194
viewsA: Subtract one hour from Current time
I believe that this is not the appropriate way to do this, but I created this function for such action: <?php function menosUmaHora($string) { $hora = explode(':', $string);//Cria uma array com 3…
-
1
votes1
answer598
viewsQ: declare variable passing constant inside the object
I need to call the root directory of my project, only the root independent of where the script is. Researching I found the $_SERVER['DOCUMENT_ROOT'] and as good practice I want to pass this to a…
-
1
votes1
answer86
viewsQ: Jquery event does not run after click
I am creating an image gallery with Jquery and PHP. All functions (upload, load, load more) work normal except the one that should delete the image. The event should occur when the…
-
0
votes1
answer46
viewsQ: Where is the error?
I’ve reviewed this query several times but I don’t find the error. "SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to…
-
0
votes1
answer1241
viewsQ: How to upload images with Tinymce
How do I select the local image of the computer and upload it to my server which should return the image URL in Tinymce and generate the tag <img> with the src containing the image URL on the…
-
16
votes11
answers38715
viewsQ: How to check if the variable string value is number?
I am developing a program where the user type a data, then I have to check if the value is number to proceed with the operation, but if he type a non-numeric value he is alerted about the invalid…
-
1
votes1
answer61
viewsQ: Why does the server require open ports on an access modem but the client does not?
I had this question about how much I was thinking of creating a chat for direct communication between two computers whether local or remote. This will be my first study project where I apply network…
-
0
votes1
answer33
viewsQ: Class incompatible with the interface
I am trying to modify some methods of the class in the subclass but I get the following error: Fatal error: Declaration of Filme::create($name, $year, $poster, $description, $genre, $trailer,…
-
0
votes1
answer219
viewsQ: A subclass or daughter class inherits the interface of its mother class as well?
Following the pillar of encapsulation proposed in POO I arose the following doubt, when it is declared a daughter class, besides inheriting attributes and methods she also inherits the interface of…
-
1
votes1
answer1025
viewsQ: Is there an IDE for developing GTK graphical interface?
I want to develop programs with Linux interface. My question is the following: Is there an IDE to develop a GTK GUI in the same style as Microsoft’s Visual Studio? The style I refer to is the "drag…
-
1
votes2
answers130
viewsQ: Why the program is terminated before the scanf
I have the following code: #include <stdio.h> #include <stdlib.h> #include <math.h> int main() { float a, b, c, delt, c0, c1, c2; char s; int op = 1; printf("Welcome.\n\n"); while…
-
2
votes1
answer529
viewsQ: How to pass a parameter/variable on the initialization of a PHP class?
How do I initialize a PHP class while passing a parameter. Same as PDO that is initialized by passing parameters as data for the database connection. In my case I just want to pass an ID on startup.…
-
1
votes1
answer1207
viewsQ: Mysql error 2002 connection refused
I hosted a website on 007gb.with and I’m trying to access my remote database but I get the message "Mensagem do erro: SQLSTATE[HY000] [2002] Connection refused Code: 2002 Fatal error: Call to a…
-
-3
votes2
answers107
viewsA: Javascript stops working and only returns with empty cache?
The logical solution is the cache you made on the first load as you might already know. This explains why an update in the code does not run first. I press about 5 or 6 times the F5 to occur the…
javascriptanswered ayelsew 818 -
0
votes2
answers300
viewsQ: Typeerror: b is Undefined jquery.min.js:3:6371
I’m trying to create a function that given the type of posting returns the findings that are in the database using jQuery-min-3.1.1.js, PHP and JSON for information exchange. But I get the following…
-
1
votes1
answer770
viewsA: Store HTML code in the database?
Use htmlentities() to encode this character and then the tags will look like this: </img> this coding is: <img/>, That’s just saving it in the comic book. At the time of…
-
1
votes1
answer131
viewsQ: Variable does not have its value after done or fail in ajax
I created a function to return true or false when ajax. At the beginning of the function I declared a "r" variable to receive true if it succeeds or false in case of failure, but the variable does…
-
1
votes2
answers1599
viewsA: Update Mysql data with Ajax
Simple Jquery/AJAX $("#btn-destaque").click(function () { //Quando o botão destaque for pressionado var idAnun = null; //Aqui você dá um jeito de passar a id do anuncio a receber o destaque $.ajax({…
-
2
votes1
answer647
viewsQ: Check if the contents of the div loaded
It is possible to know if the content within the div charged with jquery? Equal to body. I want to make a visual effect of the kind where an image of loading and only after the posting inside the…
-
3
votes1
answer1810
viewsQ: How to confirm the PDO UPDATE
Do you have a PDO function that allows you to check if UPDATE successfully competed? Same as the method 'lestInsertId()' is used to verify if a new ID has been generated in an auto incremented table…
-
0
votes1
answer1414
viewsQ: Upload does not reach PHP via AJAX with . serialize()
I’m implementing a posting system on my future website where it requires uploading images. But when making the request with AJAX the PHP script returns an error stating that the name "img-post" of…
-
1
votes1
answer171
viewsQ: What constant to declare in PDO::PARAM_ to insert date (yyyy-mm-dd h::m:s) in mysql?
I need to pass a date to the database. I will use the PDO class, but I have the following question. When creating "bindValue()" what kind of constant should I declare in PDO::PARAM_ ?
-
0
votes1
answer144
viewsQ: Upload files and inputs of any type submitted with ajax
Guys I need help for the first time I’m not managing to put something into practice. I need to get a form that contains <textarea> and inputs like text,number and crucially the file type are…
-
5
votes2
answers583
viewsQ: Script js does not interrupt form Ubmit
Guys I’m having a problem with an algorithm in jquery, that of uploading files with ajax without updating the page. I don’t know why when I put the return false; at the beginning of the algorithm…
-
0
votes2
answers2638
viewsA: Update Div HTML PHP Javascript
Utilizes the setInterval() to load the file with time interval. Html: <div id="rg"> Texto desatualizado! </div> Jquery: <script> setInterval(function () { $.ajax({ method: "GET",…
-
3
votes1
answer150
viewsQ: Mysql query with PDO does not return data
I have the following problem. I have developed a PHP class for a site I am creating and in one of these functions I am having problems with PDO. In giving the command SELECT I use the rowCount()…
-
1
votes0
answers107
views -
1
votes2
answers1126
viewsA: Password encryption on MD5?
MD5 it is a loop encoding encryption. After encoded it cannot be reversed. I saw somewhere that this algorithm has a certain vulnerability because it is possible to do calculations that can hit the…
-
1
votes1
answer394
viewsQ: How to overlap a div in the footer of another div
How to overwrite a div in the footer of another div equal to the content calls of Wikihow. Looking at the CSS code I realized it is applied position: absolute for the div2 positioned at the…
-
2
votes0
answers124
viewsQ: Function Pow() returns INF
Galera is the following to tried makes power followed by modulation -> mod, but the function Pow() returns "INF" and the other functions like bcpow and bcpowmod return as non-existent functions…
-
2
votes2
answers455
viewsA: How to delete the first ten records from a table when reaching a certain number of Rows?
DELETE FROM filmes_rec ORDER BY nome_da_tabela ASC LIMIT 0, 10 in "table name" put the name of the table that will be using in an organizational way, for example the column that contains the date of…
-
0
votes1
answer74
viewsA: I click on Ubmit to send email and he plays me on page 404.php
Your form is missing the attribute action="" within it is defined the path to which the information will be sent. ex: form method="POST" action="/function.php" Good and it looks like your…
-
0
votes0
answers20
viewsQ: Groups of 3 decimals returns only 2 when using uppercase carectere
Galera is the following trying to encode a message with RSA, and for that precise convert the characters to decimals and group them in 3 in an array to then do the calculations. But I am going…
-
1
votes1
answer378
viewsQ: Is it possible to take the name of a variable and use it as a string?
Is it possible to take the name of a variable and use it as a string ? Situation: I have a form full of inputs when sending them step by step with their name and value, but I also need to update…
-
0
votes1
answer778
viewsQ: Why do; Warning array_push() expects Parameter 1 to be array, integer Given in /var/www/html/serie/editor_temporada/Make.php on line 83?
Can someone help me? Why this passage array_push($valorDeLinks[$i], $getValueLinks); Return me a Warning? array_push() expects Parameter 1 to be array, integer Given in…
-
0
votes2
answers140
viewsQ: Does anyone know of a function that considers special characters like "://" in php without being strpos()?
Does anyone know of a function that considers special characters like "://" in php without being strpos()? It does not look for a common character together with a special character. Ex: <?php…