Posts by Neuber Oliveira • 2,485 points
106 posts
-
0
votes1
answer112
viewsA: Siim withJson() has some character limit to convert an array of objects to Json
Actually this is problem in formatting JSON, something left or missing. I use a website called Jsonlint that already points out where this error, then it is easy to solve.…
-
0
votes2
answers107
viewsA: Problems sending mail with mail()
One detail is that the function mail() returns a boolean for the execution of the function so to speak, and not if the email was actually sent. The function was executed correctly, so it comes true.…
-
1
votes1
answer198
viewsA: How to prevent a link redirect and still change the url?
Can do the pushState(stateObject, title, url) <script> $('li:contains(Registro Local)').click(function(event){ $('.active').removeClass('active'); $('li:contains(Registro…
-
1
votes1
answer57
viewsA: Save images to device without expiration
I did something similar, but for Ionic/angular as a directive, as I said I used the file plugin. I’ll leave the code more as a model of how I did it. angular.module('imagefusion', ['ionic',…
-
1
votes6
answers422
viewsA: How to "call" this correctly?
As @Pagotti said this makes reference to own class, what is probably happening is that the class JSONOAsyncTask is in the same class file where your onCreate() right? Since the this refers to the…
-
2
votes1
answer80
viewsA: How to use project done for localhost on Tablet?
If you are on the same network, for example, your machine and tablet connected on the same wifi, just by the browser or the app you made (if that’s the case) point to the machine’s IP with PHP, as…
phpanswered Neuber Oliveira 2,485 -
1
votes1
answer522
viewsA: Disable Submit button after validating empty field using jquery
The easiest way is to set the disabled $('botao_submit').attr('disabled', true); More information: $.attr() disabled Follow a more detailed example (more complicated way)…
jqueryanswered Neuber Oliveira 2,485 -
1
votes3
answers226
viewsA: Sum inputs checkbox and at the end subtract one
So I understand your difficulty is in making the total calculation of the sauces, so it follows the code, basically from the last part. var totalMolhos = 0; var gratisQtd = 1; var valorMolhoUnidade…
-
2
votes1
answer341
viewsQ: Firebase database query in ordered "relation"
Given the documentation I reached the following bank structure { "users":{ "5511995278831": { "name": "User 1", "email": "[email protected]", "about": "sdf sdf sdf", "sms_code": "10", "active": "1",…
-
2
votes2
answers948
viewsA: How can I open a modal after a Submit event
Apparently you’re using jQuery there is only use the Event.preventDefault() something like $('#meuform').on('submit', function(event){ event.preventDefault(); //abre a modal aqui }); That will stop…
-
8
votes4
answers7723
viewsA: Check for number in a string
Studies on regular expressions and take a look at preg_match() if( preg_match('/\d+/', $nome)>0 ){ echo 'Seu nome tem algum numero'; } This regex will detect if you have one or more numbers…
phpanswered Neuber Oliveira 2,485 -
0
votes1
answer20
viewsA: Wordpress - Backup/clone help
Here’s what I would do Clone/backup the database Create another database with cloned data Duplicate (copy and put) the entire WP installation to another folder ex /public_html/novo Alter in…
-
1
votes4
answers703
viewsA: Validate facebook profile URL
Basically using parse_url() and parse_str() of to make with ease. The ID or null if it is not the facebook url or cannot detect the id. function getFbId($url){ $fbId = null; $info = parse_url($url);…
-
1
votes3
answers379
viewsA: How to convert database timestamp to fill a datetime-local field?
Just to illustrate I think it would be something like: <input id="date" type="datetime-local" class="form-control" value="{{Carbon::createFromFormat('Y/m/d H:i:s',…
-
2
votes1
answer1290
viewsA: How to validate CNPJ
I believe that this implementation will work. This too fiddle It is possible to improve some parts, but I think it solves well already. function CNPJValidator(cnpj){ function getVerificationCode1(){…
javascriptanswered Neuber Oliveira 2,485 -
-1
votes2
answers3637
viewsA: Filter records by month and year in Laravel
And how is the date stored? Why should the same error also occur in the correct INSERT? How is the database modeling? The field date is of the DATE or VARCHAR type? I believe in two possibilities. 1…
-
0
votes2
answers843
viewsA: Insert into HTML and with Angularjs functions
I think we’re missing one $scope.$apply at the end of the function, without it will not pass in the $digest angular, and therefore ng-* are not recognized. Take a look at the section of $Digest()…
angularjsanswered Neuber Oliveira 2,485 -
1
votes3
answers289
viewsA: Select SELECT field with jquery
Add select ai to the list $.find("input[type='text'],input[type='url'],input[type='radio'], select")
-
5
votes2
answers1061
viewsA: Calculate the maturity date of the experience contract
Function strtotime() resolves $vencimento = strtotime("+45 day"); echo date("Y/m/d", $vencimento);
phpanswered Neuber Oliveira 2,485 -
1
votes1
answer299
viewsA: Problems with routes in the Laravel
Laravel assumes that the name of its primary key is id if it’s something else categoria_id you need to specify this in the model. class Categoria extends Model{ protected $fillable = ['NmCategoria',…
laravel-5answered Neuber Oliveira 2,485 -
2
votes1
answer78
viewsA: What’s wrong with my script?
First getElementsByClassName() literally take the element by class name. As you have no element with class detalhes then the function return is an empty array, so when you do el[0].classList you’re…
javascriptanswered Neuber Oliveira 2,485 -
4
votes1
answer1558
viewsA: Add Mysql + PHP fields
Groups the operation and gives an alias that resolves. SELECT (SUM(valor_boleto)-5000) AS total FROM boleto Ai la no php picks up the total like this: $soma = $row2['total'];…
-
1
votes1
answer53
viewsA: Form sending email and exiting session
Usually when using onepage layout the pages/sections are identified by the hashtag #, example, #pagina1 #pagina2, then in your URL that returns to the form adds the "link" of the section.…
-
2
votes2
answers412
viewsA: How to find out what is the first or last item of the Loop in Laravel?
The Laravel Slide is nothing more than a "cute" way of writing PHP in html without having to do a lot of <?php echo $nome ?> You can do what you need by the foreach index: @foreach($values as…
-
2
votes3
answers7852
viewsA: Align image to the right of the browser screen
A siple float: right resolve or with position: absolute; right: 0; Your biggest mistake there is the left:100%;, remember that the "anchor" image in css is in the upper left corner. The left:100%;…
-
5
votes6
answers7015
viewsA: How to get unique values in a Javascript array?
Quite simply, go through the array and place the items in a time array, and check whether or not the item exists in the time array. function array_unique(array){ var unique = []; for(var i in…
-
1
votes2
answers246
viewsA: pause page and resume after user confirmation
Just because JS is "inside" PHP does not mean confirm() will prevent the execution of PHP, even because, in general, when displaying the confirm() PHP has already run. Another detail is that the…
-
2
votes1
answer241
viewsA: How to make pictures change size without losing quality?
What’s happening in reality is that on a smaller screen, say 600px you’re explicitly saying that you want it at the size of 2050px, almost 4 times larger than the screen. A way out, but maybe not…
bootstrapanswered Neuber Oliveira 2,485 -
2
votes3
answers398
viewsA: Declare Css for multiple identifiers
I suggest you study some CSS. .item { background: #42bdc2; padding: 3px 0px; margin: 5px; color: #FFF; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; text-align: center; }…
-
2
votes3
answers205
viewsA: Doubt exercise paper stone and scissors
I suggest you study a little more, I think you need to "go back" a little and learn more about the fundamentals of programming (logic) and language, which is more or less where you will learn about…
javascriptanswered Neuber Oliveira 2,485 -
1
votes2
answers360
viewsA: Android, how to do security in JSON?
From what I understand you want: When mobile displays json, if it’s a desktop browser redirects to another URL, if it can be done that way echo $_SERVER['HTTP_USER_AGENT'] . "<hr />\n";…
-
2
votes2
answers535
viewsA: preg_match(...) for various text types
Nothing that a good studied on regular expressions don’t solve. Only the part of the accents that doesn’t include, but the rest is ok. [a-zA-Z]+(\d+((\.|,)\d+)?) [a-za-Z]+ Box with letters from a to…
-
3
votes1
answer1043
viewsA: Extract objects in Ionic
Your variable pis an array. Here in this code snippet DBLocal.db.transaction(function(res){ res.executeSql("INSERT INTO AD_BEBIDAS (nome_bebida_ad) VALUES(?);", [p.ad_bebida_titulo]); }); You’re…
-
2
votes2
answers499
viewsA: Div appears in her after 2 seconds with jQuery
What I tried to explain in the commentary is this. var loaded = false; window.setTimeout(function(){ if(loaded==false){ //exibe o loading aqui console.log('demorou para carregar');…
-
1
votes1
answer1309
viewsA: Count number of PDF pages with Javascript
I believe that solves it. I’m guessing that the for in $relatorio be to list the pages, each being $ra page. @foreach($relatorio as $i=>$r) @if( $i==count($relatorio)-1 && ($i % 2)==1)…
-
1
votes2
answers868
viewsA: Commit files are missing
GIT when you give the commit "stores" the state of your Workspace, what I imagine you did was create a branch, add several files, work on what you needed and commit right? When he returned to the…
-
0
votes2
answers781
viewsA: Calling Javascript inside Modal
Can give an ID to the div who will receive the content <div class="modal-body" id="conteudoModal"> And then after the form date var formData =…
-
2
votes1
answer80
viewsA: Error sending email form
Da a researched about Anonimas functions and php function scope. The problem is that the function Voce passes as parameter in the function Mail::send() the scope is different, and variable $request,…
-
2
votes1
answer93
viewsA: Show successful dragging component message with jQuery UI
To plugin api is always a good reference, in your case specifically in the event part. For this, depends a little bit on the context, has 3 events, stop(), update() and receive(). The stop() and…
-
0
votes2
answers524
viewsA: Post Ajax for Class PHP
An exit would be to check if the method is POST. //aqui verifica o metodo do envio, GET ou POST if($_SERVER['REQUEST_METHOD']=='POST'){ //verifica se o campo 'list_order' existe no $_POST…
-
1
votes1
answer249
viewsA: Feed Textarea with bank field
Since I only have to do the requisitioning every minute setTimeout, or setInterval. setTimeout() if(req.readyState == 4 && req.status == 200) { // Resposta retornada pelo busca.php var…
-
1
votes1
answer669
viewsA: Compare two arrays with PHP
I think that’s it, just need to give an adapted because here I am taking into account that one array can be larger than another, the way I did it can reverse the objects. $array1 = [1, 2, 3];…
-
1
votes1
answer338
viewsA: Dropdown menu language
Since I couldn’t make the tooltip work, I didn’t put style, but the basics you asked for I think this is it: //a estrutura e como esse objeto vai ser populado você decide como vai ser, aqui foi só…
-
0
votes1
answer171
viewsA: Redirect login screen (HTML5/PHP)
You can use the PHP header if($tipoUsuario=='admin'){ header('Location: url/do/admin.php'); }else if($tipoUsuario=='usuario'){ header('Location: url/do/usuario.php'); }else…
phpanswered Neuber Oliveira 2,485 -
2
votes1
answer360
viewsA: Full-Width Image Grid/Container with Semantic-UI
To do with the bootstrap. Now it’s just a matter of adjusting the sizes you need. .row .no-margin { margin: 0; padding: 0; } .row.cover-list { margin-right: 0; margin-left: 0; } <link…
-
5
votes1
answer449
viewsA: How do I make this panel with bootstrap grid system?
As you did not say whether it will be dynamic or not, the amount of blocks, I considered a fixed amount equal to the example. But I believe that the secret is to define a minimum size in the blocks,…
-
1
votes2
answers420
viewsA: Encrypt bank passwords in the conf file
I won’t say it’s not possible, but think about it this way. To access this file you need to have access to the server, if an unauthorized person is already inside your server, probably can access…
phpanswered Neuber Oliveira 2,485 -
1
votes2
answers925
viewsA: How do I make a countdown chronometer to a date?
That’s the least to start with, but I think it already helps. //aqui vai sempre ser a hora atual var startDate = new Date(); //como exemplo vou definir a data de fim com base na data atual var…
javascriptanswered Neuber Oliveira 2,485 -
2
votes1
answer337
viewsA: checks if the input value has changed with jQuery
I usually put in a variable "outside", and "inside" of the event I check it. var textoCliente = ''; $('input[name=cliente]').on('keyup', function(e) { var textoAtualizado = $(this).val(); if(…
jqueryanswered Neuber Oliveira 2,485 -
1
votes1
answer1134
viewsA: HTML Conflicts in two javascript files
It is giving an error that jquery was not initialized, and I saw that Voce is also using prototype.forms.js which is another library. 2 Options noConflict(); In jquery the default is to access it by…