Posts by Filipe Teixeira • 502 points
18 posts
-
12
votes2
answers213
viewsQ: Hexagon Grid - return neighbors
I am writing a simulator of a game called Iso-Path. It consists of a hexagonal grid, being itself formed of hexagons You can see what I’ve done on this link But I stopped in time to catch the…
-
6
votes1
answer301
viewsQ: Visual Studio 2017 Cordova compile apk
I’m trying to compile an apk made with HTML5 in Visual Studio 2017 but it just gives this message: 1>------ Compilação iniciada: Projeto: Relatorios, Configuração: Debug Android ------ Cordova…
-
12
votes3
answers414
viewsQ: Algorithm for distributing entries from an encyclopedia based on number of characters per day
I managed a list of entries from an encyclopedia and I want to find the best way to separate the entries so that I choose a number of days and I have a schedule of which entries to read per day.…
algorithmasked Filipe Teixeira 502 -
0
votes1
answer522
viewsA: Zebra pattern in libreoffice
Answer: =SE(A2=A1;D1;MOD(D1+1;2)) https://stackoverflow.com/questions/27020/alternating-coloring-groups-of-rows-in-excel…
-
0
votes1
answer522
viewsQ: Zebra pattern in libreoffice
In Libreoffice Calc, I want to separate in a list of artists and titles, the artists by means of a different color. That’s the result I wish: As you can see, I wish in column C a formula to indicate…
-
0
votes1
answer272
viewsA: Insert option in select Multiple dynamically
We can put a code that will add the values of input in the select by clicking on the magnifying glass, and then doing something with the content. The code looks like this: $("#vai").click(function()…
-
2
votes1
answer508
viewsA: Convert date MMMM-YYYY to dd/mm/yyyy datepicker bootstrap
In PHP, we can create a function called converterData, and in it return the month and year in the format you want. <?php $data = "setembro-2016"; function converterData($data) { $meses = Array(…
-
2
votes2
answers1892
viewsA: IF, ELIF AND ELSE
When you put sexo == H he understands that you are referring to the variable H. Put it in quotes like this: sexo == "H" or sexo == "h" Also the indentation is all wrong. The content of the function…
-
1
votes2
answers752
viewsA: Fill select Multiple with data stored in the database
Look at this code: var diasDaSemana = ["Segunda", "Quarta", "Quinta"];//Deverá ser carregada do banco de dados $.each(diasDaSemana, function(idx, val) { $('#dias_semana option[value=' + val +…
-
0
votes1
answer54
viewsA: Intel XDK and the audio plugin
It seems that the problem was not with my code but with the cell phone of a friend of mine who was in trouble. Both the audio HTML5 as the Intel XDK Media plugin have now worked. Using the Media…
intel-xdkanswered Filipe Teixeira 502 -
0
votes1
answer54
viewsQ: Intel XDK and the audio plugin
I’m having trouble playing an mp3 file in my Intel XDK app. I am using the Media plugin of Cordova, which is the most suitable to do this, but the problem is the following: I can’t play audios that…
intel-xdkasked Filipe Teixeira 502 -
2
votes1
answer57
viewsA: Statistics of battery battery life in python
I found the error. On Tasker I was writing defying instead of unloading. It took me a long time to find the error. Here goes the diff with a debug I made, in case anyone is interested in unrolling.…
pythonanswered Filipe Teixeira 502 -
3
votes1
answer57
viewsQ: Statistics of battery battery life in python
I have this battery usage data from my phone that I captured using Tasker: 97 - 1467514184514 tela desligada - 1467514366535 tela ligada - 1467514369196 96 - 1467514414616 95 - 1467514674523 94 -…
pythonasked Filipe Teixeira 502 -
1
votes1
answer159
viewsQ: How to capture the text of nested Ivs in an elegant way?
This post explains how to copy plain text to the clipboard using Zeroclipboard. But a reader brought a doubt: how to take the content of a <div> with several daughters within it? When we use…
-
9
votes1
answer234
viewsQ: What is the algorithm for distributing the paragraphs?
I am reading a specific portion of the Bible per week based on programming published on the website Jw.org. I made a javascript script that takes the paragraphs and verses of each chapter and shows…
-
0
votes1
answer3054
viewsA: Dynamically display jpg image in python Tkinter label
This snippet has solved: self.c.image = img # save reference self.c.configure(image=img) # configure the label
-
3
votes1
answer3054
viewsQ: Dynamically display jpg image in python Tkinter label
I am trying to display a chosen image of a Listbox on a Label. The following code works: import Tkinter as tk from PIL import ImageTk, Image window = tk.Tk() path = 'img\\2015722_univ_sqs_sm.jpg'…
-
2
votes1
answer396
viewsQ: Logic error in PHP when constructing if elseif Else
I have a simple email form with reCaptcha. To avoid the user sending the email and keep giving F5 and sending the same email several times, I did a redirect in a php script. But there is a logic…