Posts by wDrik • 1,406 points
98 posts
-
2
votes1
answer4196
viewsQ: How to save data in. txt file in Visualg?
People need to do a registration system in Portugol for a college job. However, I want the data to be saved for a possible query. There is the possibility to save data in a file . txt in Visualg? (I…
-
1
votes2
answers1380
viewsQ: How to find the nearest number with JAVASCRIPT
I have a input which receives a user-typed value and an array of 12 values.. I am traversing the array with a Foreach.. because I need to find the approximate value of the value entered in input.. I…
-
6
votes2
answers765
viewsQ: Help with jQuery. on calculation of plots!
Guys, I have a slightly complicated question for myself that I’m a beginner.. I’m developing a system where the user can select the amount of installments they want to split their purchase.. until…
-
0
votes1
answer57
viewsQ: How to do a URL validation with Angularjs
I am working on a project.. but I need to do a validation taking the current url.. Ex: If(url('/questions/ask')){ // Aqui vem minha lógica } How do I do this with Angularjs('I’m new at angular..') ?…
-
1
votes1
answer515
viewsQ: Problem with ng-checked Angularjs!
Person have an input from type="radio" when clicked calls a function and fills a select.. but this only happens when I click the input.. I need it to load automatically on the page loading, I have…
-
0
votes1
answer104
viewsQ: Hide validation message after form submission, Angularjs!
I have a form with validations on Angular but when I do send I give a delete $scope.msg to delete inputs, but when I do so, the validation files appear. How do I stop when sending the form, the…
-
2
votes2
answers796
viewsQ: How to put a json code in textarea html?
I am developing a page that displays snippets of code in JSON in a textarea, but I have seen on some sites that there is some kind of plugin for this type of display as in the "Errors / Exceptions"…
-
1
votes1
answer43
viewsA: Side Menu making call with Angular!
I’ve dealt with it this way: <li><span class="glyphicon glyphicon-ok"> </span> <a ng-click="vm.link = 'link1'"> Link 1 </a> </li> <li><span…
-
0
votes1
answer43
viewsQ: Side Menu making call with Angular!
Guys, I have a menu and I need that when I click on a link it appears a content, and when I click on another link it hides the previous content and displays the new selected content, I’m using…
-
1
votes1
answer34
viewsQ: How to link the Id’s of two API’s to ANGULAR?
Guys, I have a problem, and I’m kind of a layman with Angular.. I have 2 functions that consult two methods of a API.. need to compare the id's of the results and demonstrate only those that the id…
-
12
votes3
answers556
viewsQ: An image with display:None is loaded? Consume data?
I’m developing a layout responsive and would like to decrease the size of the images according to the resolution. I used the display: none but saw in the inspetor de elementos that it is being…
-
0
votes1
answer355
viewsQ: Show/hide div when selecting a select option
I need to make it so that when selecting a select option a select appears div. I’m using angular, how can I do that?
-
1
votes1
answer344
viewsQ: How to return the value of a select to an ng-repeat at the angle
I have a select that has 3 options 1,2 and 4, I need to choose one of these numbers a repeat div 1, 2 or 4 times according to the chosen select, as I do with Angular?
-
4
votes1
answer498
viewsA: How to return the result of a select with Prepared statement?
public function search($obj) { $connection = new Connection(); $this->db = $connection->conectar(); /* String SQL de buscar todos os registros */ $stringSQL = "SELECT * FROM fornecedor WHERE…
-
0
votes2
answers584
viewsA: image of banner stand on the right side
Use Flexbox to adjust your elements with incredible simplicity! .sua-classe-pai { display: flex; justify-content: flex-end; // flex-start é o padrão // center centraliza... } I recommend researching…
-
1
votes1
answer336
viewsQ: Number count according to jQuery page scroll!
I have a PROGRESS BAR that displays numbers from 0% up to 100%, I need that when the scroll is greater than 900px, start the counting of the numbers for example from 0% to 70% in the time of 2…
-
0
votes2
answers51
viewsQ: Problem with fadeOut from jQuery!
Guys, I’m having a little problem here and I’ve tried to solve it in a lot of ways but nothing... I am trying to make a PRELOADER that will appear before loading the page the problem is that even…
-
2
votes4
answers1877
viewsA: Export MYSQL information to JSON
You can work as follows using PHP: $query = "SELECT * FROM `table`"; $stmt->prepare($query); $stmt->execute(); $stmt->fetchAll(\PDO::FETCH_ASSOC); if($stmt){ echo…
-
1
votes1
answer306
viewsA: What’s the fastest way to organize your CSS files?
Man I particularly work this way: -assets -js -img -css main.css => css global, que será utilizado pela aplicação por completo variables.css => Aqui vem as variáveis, caso esteja utilizando…
-
0
votes1
answer87
viewsA: Problem with POST in Javascript + Ajax
Problem was solved as follows: //Add repositories on GitHub $('#add-repository').submit(function(e){ e.preventDefault(); var name = $("#name").val(); var description = $("#description").val(); var…
-
1
votes1
answer87
viewsQ: Problem with POST in Javascript + Ajax
Guys I’m doing a test, and I need to develop a sign-up screen using the Github API https://developer.github.com/v3/repos/#create ... Follows the code: //Add repositories on GitHub…
-
0
votes1
answer76
viewsQ: How to Recover Result from a Table in a Loop For
Personal I have a table in javascript, it is being structured by a loop for, however I need to calculate the result of it.. follows the code.. for(i = 1; i<=30; i++) { var maximo = 5; var a =…
javascriptasked wDrik 1,406 -
1
votes3
answers2243
viewsQ: Doubt random string with Javascript
Personal I need to return 2 random strings 'John' or 'Mary' to implement in the following table.. I already did a Google search, but I could only return the WHOLE numbers and not the strings.. Thank…
javascriptasked wDrik 1,406 -
0
votes2
answers6249
views -
1
votes1
answer441
viewsQ: Abstraction of the PHP PDO Connection class
Staff I have the following class for database connection... namespace App\Database; class Conn { public static function getDb() { return new \PDO('mysql:host=localhost;dbname=dkse','root','root'); }…
-
1
votes0
answers36
viewsQ: Doubt with Phpunit Unit Tests
Guys I’m starting with Phpunit, I’m implementing the first tests in my applications but I’m with the following doubt. All classes should actually be tested, or there are some exceptions, if yes…
-
3
votes5
answers12368
viewsA: Centralizing menu options in bootstrap 3
I believe that the best solution and also the simplest, would be to use the flex-box! #navbar { display: flex !important; justify-content: center !important; }
-
0
votes1
answer20
viewsA: Problem resetting $_POST
Solved with a simple $('#employee_id').val('');, Thanks!
-
1
votes1
answer20
viewsQ: Problem resetting $_POST
Staff with a problem in this code snippet, it evaluates if there is a variable $_POST['employee_id'] if it exists it will give an update, if it does not exist an Insert! until then everything is…
-
0
votes0
answers161
viewsQ: Problem namespace only works local
I’m having the following mistake: Fatal error: Class 'Kse\init\Bootstrap' not found in /home/dksec173/public_html/App/Route.php on line 8 In the development the namespace are working properly,…
-
1
votes2
answers2719
viewsA: Add and remove Jquery class
let filtersSize = jQuery('.filters__filter.tamanho') filtersSize.on('click', function() { filtersSize.find('.ul--0').slideToggle(150) // toggle active class filtersSize.toggleClass('active') }) Try…
-
1
votes1
answer851
viewsQ: Reload table without refresh with Ajax jQuery
I have a table that has the option to update records, but need that when changing a record it is changed dynamically in the table without the need for refresh.. already working the part of the…
-
1
votes2
answers799
viewsQ: Can I return 2 value in an Ajax?
I have the following script: ('#AjaxUpdateClient').submit(function(e){ var id = $(this).attr("id"); var form = $(this).serialize(); $.ajax({ type: "POST", url: "/updateClient", data: form, dataType:…
-
0
votes1
answer18
viewsQ: Doubt in update PHP method
I have the following method for updating public function update($params, $id) { $params_fields = "`".implode("`= ?, `", array_keys($params))."`= ?"; $query = "UPDATE `{$this->table}` SET…
-
0
votes1
answer441
viewsQ: List data with Ajax and PHP
I have the following table <?php foreach ($this->views->clients as $client): ?> <tr class="tr_<?= $client['id'];?>"> <td><?= $client['id']; ?></td>…
-
1
votes2
answers206
viewsA: Insert query does not work in PHP
sql= "INSERT INTO `books` (`ISBN`, `Authorsname`, `Title`, `edition`, `year`, `publisher`, `category`, `quantityinstock`, `price`) VALUES('{$ISBN}','{$Authorsname}','{$Title}', '{$edition}',…
-
1
votes1
answer42
viewsQ: (Select query) How to make it more dynamic?
I have the following method select in my CRUD class and use it throughout the application, but I need to make it more dynamic, for example I need to use an ORDER BY, also use other fields other than…
-
0
votes3
answers186
viewsA: Doubt validate . click() outside of Function() jQuery
First thank you to all who tried to help me, the problem was solved in the following way: $(function() { $(".delete").click(function(){ id = $(this).attr("id"); info = 'id=' + id;…
-
0
votes3
answers186
viewsQ: Doubt validate . click() outside of Function() jQuery
I need to validate if the button with class .pop-yes was clicked, but I need to validate this outside the event .click() so that the code line $(this).parent [...] be executed. The way it is here,…
-
0
votes3
answers3528
viewsA: How to take the space between two inline-block Divs?
it would be good for you to use some reset or create your own before you start styling your search pages about reset css.. Ex: * { margin: 0 auto; padding: 0; text-decoration: none; list-style:…
-
1
votes3
answers831
viewsQ: Customizing the Javascript confirm
Can you personalize the confirm() via CSS, or how to implement some modal in it? I tried to use Bootstrap but the JS code stops working: $(function() { $(".delete").click(function(){ var element =…
-
1
votes3
answers482
viewsA: Delete table>tr with Ajax and PHP
I managed to settle here as follows.. $(function() { $(".delete").click(function(){ var element = $(this); var id = element.attr("id"); var info = 'id=' + id; if(confirm("Deseja realmente Deletar…
-
5
votes2
answers14121
viewsA: SQL query for nonnull records only
Null is a result that does not return any value so it cannot be compared by operators as = or != , for this you must use IS NULL to find NULL and IS NOT NULL to find values that are not NULL. SELECT…
-
0
votes3
answers482
viewsQ: Delete table>tr with Ajax and PHP
Fala galera, I have a question here.. I want to be able to delete a row from the table with Ajax just by clicking on a button without having to load the screen.. I already searched and tried to do…
-
2
votes2
answers289
viewsQ: Select in another Mysql table
Any hint as to how I can select all clients of a particular user? I’m not really understanding the logic of how I should do the query.…
-
1
votes3
answers5861
viewsA: How to style an echo with CSS?
You can also use the . phtml extension in your file and work as if it were an html page just put between <?php ?> or <?= ?> the codes in php(back-end).
-
0
votes1
answer88
viewsQ: Action form not found Not Found!
I have a PHP project using MVC, right... it was created a form for entries that would be sent by jQuery Ajax, but at the time of setting the url to which the form would be sent it does not find the…
-
2
votes1
answer172
viewsQ: Image spacing with HTML5
When I put an image it automatically comes with a spacing above and below the image of approximately 5px, I wonder how to remove this spacing I tried to put border: 0px and margin: 0px and did not…