Posts by Alan PS • 2,511 points
151 posts
-
3
votes1
answer347
viewsQ: PHP - Pushing an array within another array
I’m trying to make a array within another and include more data in the array from within, how do I do it ? Follow the attempt code, it’s to generate a json: $data = array( "login1" => "login1",…
-
0
votes3
answers541
viewsQ: Bash - Save errors in a variable
I’m running a bash script that saves error messages in a file. txt log, need to save the error messages in a variable now, follow example: LOG="/home/control/log.txt" exec 2>>$LOG tar -zcf…
-
4
votes3
answers1458
viewsQ: Javascript - Line break in file . txt
How to identify a line break in a txt using javascript ? Example: Essa é a linha 1 Essa é a linha 2 Essa é a linha 3 The file has these 3 lines and I want to put them in an array separated by the…
-
4
votes1
answer167
viewsQ: Jquery - Scrollbar
I’m developing a scroll bar in JQuery for an element, a div, I need the bar to be the right size to scroll, I’m posting the code with the error to see if you help me: Codepen It gets the bar of a…
-
0
votes1
answer1723
viewsQ: CSS - Align image set in the center of a div
I need to align a random image set in the center of a div, follow example code: HTML <div class="divAlign"> <img src="teste.jpg"> <img src="teste2.jpg"> <img…
-
1
votes3
answers5944
viewsA: CSS - Align image inside table with inline css
I settled with a align="middle" out of css right in html: <table> <tbody> <tr> <td style="width: 55px; padding-left: 30px;"> <img src="[LOGO]" style="width: 55px;"…
-
3
votes3
answers5944
viewsQ: CSS - Align image inside table with inline css
I need to align an image to the text of the other cell in the table. css is inline. Follow the code: <table> <tbody> <tr> <td style="display: inline-block; width: 50px;…
-
0
votes1
answer65
viewsQ: Moodle - Where is the task view information?
I am trying to change a plugin and I need to find out where the database stores information of tasks preview in Moodle, the plugin is the bar Progress and need it urgent...
-
2
votes1
answer111
viewsA: Moodle - How to disassemble Locks
I managed to disassemble the login area, to print the default block is like this: <?php echo $OUTPUT->login_info(); ?> To disassemble it in several blocks there are a few ways, example:…
-
3
votes1
answer111
viewsQ: Moodle - How to disassemble Locks
How to use blocks to get layout elements? Example: <?php echo $OUTPUT->blocks('course_summary', 'cssCourse'); ?> I want to use the block with the course_summary id, only it does not appear…
-
0
votes0
answers183
viewsQ: Password Bitnami Moodle
I’m trying to access the Phpmyadmin in the Moodle of Bitnami and I can’t get in, I just installed it and I don’t know the password to root, waiting for answers... I tried to leave no password and…
-
0
votes1
answer1624
viewsQ: Moodle - Creating Themes
Hi, I’m creating a theme for Moodle and I can’t install it or do tests, the theme has only 3 files and the . css is blank, just for testing... config.php file (is at the root of the theme that has…
-
1
votes2
answers1225
viewsQ: Login System - PHP and Jquery
Hi, I’m making a login system and I’m having doubts in his security, it is very simple and does Ajax by Jquery a PHP page with Mysql, the code is this: HTML: <form id="loginForm" name="loginForm"…
-
0
votes1
answer709
viewsQ: Slim Framework - DELETE and Framework Function
I’m having problems with slim DELETE, it shows a 404 error, follow the code: <?php require '../Slim/Slim.php'; \Slim\Slim::registerAutoloader(); $app = new \Slim\Slim();…
-
0
votes3
answers355
viewsQ: Gmail displaying source host on recipient when using PHP mail()
Hi, I need to send automated emails as requested by the user. I have the function that makes this sending but in the server the sender stays this way in gmail: contact site.com for…
-
3
votes2
answers1413
viewsQ: Calculate the size of the div
I’m working on a simple "Divs slider" script! There’s only one problem, when you start moving left and right it cuts a piece of Divs, I need it to move exactly in a way that it doesn’t cut the Divs…
-
4
votes1
answer657
viewsQ: How to determine the direction of the touchmove
How in javascript/jquery to know which direction is the touchmove ? Example: var ts; $(document).bind('touchstart', function(e) { ts = e.originalEvent.touches[0].clientY; });…
-
0
votes1
answer64
viewsQ: ignore the cursor position on the scroll bar
How to ignore the cursor position on the scroll bar ? Jsfiddle var margem = 0; function criarBarraDeRolagem(){ if ($( document ).height() < $( window ).height()) { return; } var tamanho = $(…
-
0
votes2
answers284
viewsQ: Scrollbar - Calculate Motion Field
How to calculate the scrollbar div motion field in this case: JSFIDDLE var margem = 0; function criarBarraDeRolagem(){ if ($( document ).height() < $( window ).height()) { return; } var tamanho =…
-
4
votes3
answers95
viewsQ: How to use this!
I need each button when clicked yellow and the others back to normal...: $( "#botoes" ).each(function() { $(this).click(function() { $(".botaoativo").removeClass('botaoativo');…
-
1
votes3
answers9448
viewsQ: Add and remove class
I have a simple scheme to get to class .ativo and remove it and add the class .block then find the id #banner1 and adds the class .ativo and removes the class .block Only it’s not working, look…
-
3
votes1
answer181
viewsQ: Audio player slows down and hangs after playing about ten songs
I’m making a music player in jQuery/Javascript/HTML5 and it’s going well, but when it starts to run the songs +or- in the 13th track starts to slow down the page and gives a "latch" and it’s…
-
17
votes3
answers72012
viewsQ: Global variable in Javascript
How to make a global variable in Javascript? I need the variable that was declared in one function to work in another function. Example: Jsfiddle $("#div3").click(function() { var fill = "a"; });…
-
3
votes3
answers1080
viewsQ: Audio API to calculate the duration of multiple songs
I’m working on a player audio and need to know how to calculate the duration of various MP3’s that are selected on the user’s machine by a input of the kind file? EDIT: Follows my current code and…
-
2
votes3
answers801
viewsA: How to change a <a> link according to a <select>?
You can do it like this: $(".select-ciclos").heapbox({ 'onChange':function(value,src){ var mostrador = $(src).closest('.pricing-column').find('.trans'); var val = value; mostrador.animate({ opacity:…
-
10
votes2
answers161
viewsQ: Height property of jQuery and Javascript, what’s the difference?
What’s the difference between $(window).height() from jQuery to the screen.height javascript ? Using them I perceive different results... And what’s similar to screen.height in jQuery ?…
-
0
votes2
answers543
viewsA: On-demand content problems (Infinite scroll)
After the reply of @Papa Charlie I had a necessary idea to work on my system: <script> var i = 0; var b = 1; var itens = 10; $(window).scroll(function() { if( $(window).scrollTop() >=…
-
2
votes2
answers543
viewsQ: On-demand content problems (Infinite scroll)
I am trying to make the content increase check the user descends the scroll bar, but my code stopped here.. <script> $(document).ready(function() { var limit = 5; var offset = 0; var altura =…
-
1
votes2
answers2318
viewsA: How to make a mysql query from an array coming from html?
Try this: <form id="enviar" method="POST"> <?php if(isset($_POST)){ $cores = $_POST['cor']; echo '<pre>'; print_r($cores); $carros = mysql_query("SELECT * FROM carros WHERE cor LIKE…
-
1
votes1
answer681
viewsQ: How to compare 2 potentials
I need to compare 2 potentials that are not formatted.. Example: 2,2 = 2² 3,3 = 3³ if (2² > 3³) the numbers arrive in an array, it comes like this [2,2,3,3], I need to separate them in pairs and…
javascriptasked Alan PS 2,511 -
7
votes2
answers10050
viewsQ: How to use power notation in HTML?
How to format 2 numbers in power? Example: 2, 2 = 2² 3, 2 = 3² 5, 3 = 5³ 6, 2 = 6²
-
4
votes2
answers955
viewsQ: Merge array by replacing equal results
How to merge an array by replacing the equal numbers ? Example: array1 = [1, 2, 3]; array2 = [2, 4, 5]; array3 would be [1, 2, 3, 4, 5]; instead of [1, 2, 2, 3, 4, 5]; How to merge an array by…
javascriptasked Alan PS 2,511 -
9
votes4
answers2358
viewsQ: How to count how many times a value appears in a table
How to count how many times a value appears in a table ? Example: <table id="table"> <tr> <td> 2 </td> </tr> <tr> <td> 6 </td> </tr> <tr>…
-
4
votes4
answers1844
viewsQ: Factoring in Javascript
How to factor numbers in this way ? 26 | 2 13 | 3 1 | Follow my code still incomplete: JSFIDDLE…
javascriptasked Alan PS 2,511 -
5
votes2
answers1101
viewsQ: How to know if the calculation generated an integer?
How to know if the calculation generated an integer ? example: if (10 / 2 = NUMERO INTEIRO) {}
javascriptasked Alan PS 2,511 -
3
votes1
answer61
views -
0
votes1
answer61
views -
2
votes3
answers1008
viewsQ: Solution for <select> with many options
What is the best solution to do the <select> leave such result selected in a <select> with many options ? I use IF in this situation with few options, but it becomes unviable for a very…
-
4
votes2
answers114
viewsQ: Do not register in the time range if it already exists
How not to register events in the time zone that is already registered ? Example: I have an event in BD starting at 18:00 and ending at 22:00, I need that if the user tries to register a new event…
-
3
votes2
answers431
viewsQ: Alert by email such a day
Hi need some way to alert by email the person when arriving on such day by email using php...example: day September 1st send such email to the person such... how to do this with php ? I thought of…
-
4
votes2
answers756
viewsQ: setInterval 5 seconds locking browser
I am developing applications using jQuery/Ajax and it has to refresh page 5 in 5 seconds, it works. But if I start using the application the browser starts crashing because of the code, how to fix…
-
2
votes2
answers497
viewsQ: Query mysql does not work with variable - PHP
The mysql query works with normal variable, but not with jquery post variable, example: DOESN’T WORK $agenda=$_POST['agenda']; $query = mysql_query("SELECT * FROM `compromiso` WHERE login LIKE…
-
-1
votes2
answers171
viewsA: Calculation of days of one month
Based on a template they posted I created this simple calendar: <?php $month = 8; $year = 2014; $days_in_month = date('t',mktime(0,0,0,$month,1,$year)); for($list_day = 1; $list_day <=…
-
-1
votes2
answers171
viewsQ: Calculation of days of one month
I’m setting up a schedule and I’m going to do a calendar. I need to know how many days are there in the month and also what day of the week is the first of each month. How to do this with PHP?…
-
4
votes1
answer695
viewsQ: Format date in PHP
I need to show date in PHP in the following format: "Sunday, December 9, 2014" ? It’s got to be Bible time! If possible in Portuguese as well! EDIT: <?php setlocale( LC_ALL, 'pt_BR',…
-
3
votes1
answer58
viewsQ: Error with Cap in Safari!
I’m having trouble with Safari 5.1, css width: Calc(100% - 350px); it doesn’t work properly in safari, follow the code and jsfiddle: JSFIDDLE <div id="menu"></div> <div…
-
1
votes3
answers729
viewsA: Login and password submit!
I was able to change the Submit to a click on the Submit button in the form...: <script> $(document).ready(function() { $("#entrar").click(function() { var login = $("#login").val(); var senha…
-
2
votes3
answers729
viewsQ: Login and password submit!
I have a simple form to login users with login and password... I’m not getting to give Submit via Jquery, look at the code: <div id="opcoes2"> <div id="fazerlogin2"> <form…
-
0
votes2
answers89
viewsA: Each or next from a Mysql query
Managed using each and find!!! Code: $(".membro").change(function () { $('.tabl').each(function() { var proximoMembro = $(this).find( ".membro" ).val(); $.post("membros.php", { mes: $(".mes").val(),…
-
1
votes2
answers89
viewsQ: Each or next from a Mysql query
How to post the next item in a multi-item Mysql query? When to change $( ".membro" ).change(function() { ) send the next data $("membro") to the archive membros.php, via $.post. Jsfiddle JS:…