Posts by William Borba • 460 points
23 posts
-
0
votes2
answers688
viewsA: How to insert caption with quantity
could, the detail is in "plotOptions" with parameter "dataLabels". $(function () { $('#container').highcharts({ title: { text: 'Chart reflow is set to true' }, subtitle: { text: 'When resizing the…
-
1
votes2
answers161
viewsA: Result of a function in an array
You can’t really put methods or functions in properties in PHP, according to the documentation itself php.net As an alternative I thought to declare these guys with constants using the defines…
phpanswered William Borba 460 -
-1
votes6
answers261
viewsA: Parser Bbcode ignore what is inside [code]
This regex can solve the problem. <?php $string = 'texto texto la la la [code]<html><iframe><p>codigo html.</p></iframe></html>[/code] continuacao do texto e…
-
1
votes1
answer911
viewsA: PHP + POSTGRESQL (Begin, Commit, Rollback)
Hello, you can use PDO, see this example. Source php.net In some cases it is necessary to disable the auto commit of the databases (mysql/postgres), can be done using the constant…
-
2
votes1
answer149
viewsQ: Profiling php (debug + run time)
Someone uses php code Profiling, other than with zend studio? The problem of zend studio is the license... but it is very good this functionality, there is something open source that is not as…
-
1
votes1
answer1060
viewsA: List objects from a dictionary in Django - Creating Templates
wouldn’t be the idea? model py. class BookModel(models.Model): title=models.CharField() class User(models.Model): username=models.CharField() class Recommend(models.Model):…
djangoanswered William Borba 460 -
5
votes1
answer695
viewsA: Format date in PHP
here worked out. <?php setlocale(LC_ALL, "pt_BR", "pt_BR.iso-8859-1", "pt_BR.utf-8", "portuguese"); date_default_timezone_set("America/Sao_Paulo"); print strftime("%A, %d de %B de %Y"); ?>…
phpanswered William Borba 460 -
2
votes2
answers227
viewsA: Traverse Array within a string
hello, $produtoImpressao = $_SESSION['produtoImpressao']; $fp = fopen("arquivo.txt", "a"); $linha = "bla bla bla....Produtos: " $produtos = implode(", ",$produtoImpressao); $linha .= $produtos;…
-
6
votes5
answers45121
viewsA: How to use a PHP variable in javascript?
Javascript cannot update the value of the PHP variable, only php manipulates/creates JS. To do this update, you will need an ajax, right after you have changed the value of the variable with JS...if…
-
0
votes2
answers1524
viewsA: How to display two different database tables in php
Hello, another idea is to use UNION, but the tables should have the same structure and the same number of columns, example: SELECT * FROM table1 UNION ALL SELECT * FROM table2 or SELECT t1.id,…
-
1
votes1
answer144
viewsA: Multidestinatary and html email sending solution
Very simple, but perhaps your difficulty is in programming the solution, and not thinking about it ;) Problem 1: $mail->addAddress('[email protected]', 'Joe User'); Problem 2: $mail->Body =…
-
2
votes3
answers10379
viewsA: How to create web payment system using PHP
spoke of the paid and paid market, but forgot the Paypal and Traycheckout, I think it’s more business to outsource this issue with these payment gateways, sometimes on the websites of these…
-
2
votes1
answer2561
viewsA: Redirecting DNS to Amazon machine
after creating the Hosted zone, with your domain name, create entries of type CNAME and A, for the PUBLIC DNS and IP of your VM, example: NAME TYPE VALUE seudominio.com.br A 192.168.0.128…
-
-1
votes3
answers2056
viewsA: Delete text part with Python
I got it like this import re string = """ texto textinho outro texto <div dir 'ltr'><div><div> bla bla .... """ r = re.search("[<].*[>]",string) # retorna "<div dir…
pythonanswered William Borba 460 -
-1
votes3
answers2040
viewsA: PHP Table background color
I think you could make it more organized, think about PDO and bootstrap, I tried to save your script, but I think you’ll still need adjustments to fit your need. <?php /* ok, mais acho que talvez…
-
1
votes3
answers1168
viewsA: PHP as per path and filename in variables
why don’t you use scandir is much easier example: <?php /*remove as pastas ".." e "." que podem aparecer em sistemas linux*/ $scan_dir = array_diff(scandir(__DIR__),array("..",".")); foreach…
-
0
votes3
answers1242
viewsA: Transforming jQuery code into Javascript
think q if you download the development version of jquery and search what makes each function you can understand, even because jquery is done in pure js, it is just a huge library with various…
-
1
votes2
answers579
viewsA: Live video playback using websocket
ola a good idea would be to use the technology nodejs, it is very easy, I have tested it myself, but I have not created anything great, more it is possible to deliver content by websocket using…
-
0
votes4
answers16806
viewsA: Copy part of a string
look q easy in php, in my example the strings would be an input.txt file input file.txt Cliente em questão: protocolo20209092032932 Cliente em questão 2:: protocolo320930293232 Cliente em questão…
delphianswered William Borba 460 -
0
votes2
answers155
viewsA: How to check WHERE clause with apostrophe in a DELETE operation?
tries against slash before the bet \' makes a type of filter in the variable that contains the apostrophe and if you have insert a counter bar before, or checks if it has a function that escapes…
-
1
votes8
answers27292
viewsA: PHP does not send accents to Mysql database
guy I researched on the sourceforge forum related to that project and already had a ticket on that subject. look at this link http://sourceforge.net/p/ocomonphp/bugs/168/#1aa1 Edited I took a look…
phpanswered William Borba 460 -
0
votes2
answers1032
viewsA: How to store GPS coordinates in a PHP web application?
looks like a really cool project, I would use a faster database, type sqlite, the database could be on a server with I/O ssd drive high and then makes an api to insert and fetch records from that…
-
0
votes3
answers3361
viewsA: Configuration of . htaccess to access several PHP files within the same folder
to url http://www.meusite.com/categoria/produtos/556 try this RewriteEngine On RewriteRule ^(categoria/produtos/[0-9]+)$ produto.php?page=$1 or RewriteEngine On RewriteRule ^([a-z]+/[a-z]+/[0-9]+)$…