Posts by Allan Kehl • 448 points
19 posts
-
3
votes3
answers1500
viewsA: When to use blank lines in a Python program?
Indenting is the indentation of the text in relation to its margin, that is, if before writing an instruction, we use 4 spacing from the left margin to the instruction itself, we can say that the…
-
2
votes1
answer519
viewsA: What is the correct way to save an IP in the database?
There are functions to use in IPV4. For Ipv4 addresses, you may want to store them as a int unsigned and use the functions INET_ATON() and INET_NTOA() to return the IP address of its numeric value…
-
0
votes2
answers3524
viewsA: system login Laravel with permission levels
public function up() { Schema::create('user', function (Blueprint $table) { $table->increments('id'); $table->string('name'); $table->string('email')->unique();…
-
1
votes1
answer1985
viewsA: Problem using $_SESSION in PHP 7.1.10
There is a bug related to the xampp version, i.e., x86 or x64 bits. "I have a system with x64 bit windows and I installed a xampp with php7, but it was x86. This was a reason for that error, apache…
-
2
votes3
answers143
viewsA: Hide an image when a web page is loaded on a mobile device
Good afternoon, use js to hide the image. Example: $('#id').hide(); /* Usa id ou uma classe */ Or CSS: .class ou #id { visibility:hidden; }; jQuery who checks if it is mobile if(…
-
2
votes1
answer1389
viewsA: How to send sms using javascript or angular or Node.js
I know it using Firebase and Zapier. var sendSMSText = function (recipient) { var smsQueue = new Firebase('https://.firebaseio.com/sms/' + recipient.phone); smsQueue.set({ name: recipient.name,…
-
1
votes4
answers3636
viewsA: Input date to disable the next 7 days from the current date
Read this topic: http://fabrica.ms.senac.br/2013/06/jquery-um-simples-tutorial-para-iniciantes/ Just paste at the bottom of the page the code below: <script type="text/javascript"> $(…
-
1
votes1
answer885
viewsA: Bootstrap Datepicker in mm/yyyy format set maximum date
The maximum becomes today. $( "#mesVigencia" ).datepicker({ maxDate: "+0m +0w" }); Or $( "#mesVigencia" ).datepicker( "option", "maxDate", "+0m +0w" ); UPDATE Tries to define as var. var date2 = new…
-
2
votes4
answers788
viewsA: Using HTML5 default value
Important The disabled is a disabled item, is not editable, and is not sent when sending forms. The best thing would be to use the readonly which is a reading element is just not editable, but is…
-
1
votes2
answers1032
viewsA: How to find the second smallest value of a python array without using built-in functions?
def segMenor(numeros): m1, m2 = float('inf'), float('inf') for x in numeros: if x <= m1: m1, m2 = x, m1 elif x < m2: m2 = x return m2 print…
-
4
votes3
answers870
viewsA: F11 mode in browser
Just use js to load the page to click the button. function toggleFullScreen(elem) { // ## The below if statement seems to work better ## if ((document.fullScreenElement &&…
-
1
votes3
answers5033
viewsA: Find Strings in Text Files in PHP
<?php $linhas= file("C:\\Documents and Settings\\myfile.txt"); foreach($linhas as $linha) { echo($linha); /* Aqui compara a string */ } ?> Or if you know the line in which the word is $arq =…
-
1
votes1
answer472
viewsA: Autocomplete in ENTER key instead of TAB in sublime text
Open Keybindings - User and add: Key bindings is a JSON and is in the file . sublime-keymap http://sublimetext.info/docs/en/reference/key_bindings.html [ { "keys": ["enter"], "command":…
-
3
votes2
answers188
viewsA: Installation phpmyadmin
/* UPDATE */ Goes in Apache config (httpd.conf) and below Alias /home/mysql "${path}/phpmyadmin add that line: Alias /mysql "${path}/phpmyadmin" /* ANCIENT */ Try these commands: sudo -H gedit…
-
1
votes2
answers1228
viewsA: htaccess rule for adding https
I know two methods: Important: Do not force use of HTTPS if your site does not have SSL certificate. RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI}…
htaccessanswered Allan Kehl 448 -
0
votes1
answer367
viewsA: Bootstrap menu dropdown items does not work
Good afternoon, the bootstrap itself makes the dropdown. Test with that code: <nav class="navbar navbar-default"> <div class="container-fluid"> <!-- Brand and toggle get grouped for…
-
-1
votes1
answer110
viewsA: Update/Sync Project in Codeigniter
Good afternoon, what you can do is use $_GET to create a URL and when accessing update what you need, this can be done at index(). Example: url = http://localhost/articles?update=1 if…
-
0
votes1
answer2070
viewsA: How do you insert images into an XML file?
XML is practically a text-based format, which means you won’t be able to "see the image" in your XML document. You can turn the image into Base64 and embed the string in XML. UPDATE First, you turn…
-
0
votes1
answer417
viewsA: How to change the site URL.com.br/index.php to site.com.br/ through . htaccess?
Hello, try to test this code: RewriteCond %{THE_REQUEST} ^.*/index\.php RewriteRule ^(.*)index.php$ /$1 [R=301,L] If it doesn’t work, it means that you are not allowed to edit htaccess. Ai have to…