Posts by Patrick Lobo • 41 points
10 posts
-
0
votes2
answers1365
viewsA: Array permutation
I decided as follows: private function get_permutations(array $arr = array(), $max_length = NULL){ if(count($arr) == 1 || ($max_length !== NULL && $max_length <= 1)){ return…
-
0
votes2
answers1365
viewsQ: Array permutation
Ladies and gentlemen, I would like to draw up an anagram of the possible combinations. Ex: "123456" would generate: 1234 2341 6531 5431 1243 1342 or 12 43 56 23 14 16, whether or not repeated, and…
-
0
votes0
answers360
viewsQ: barcode in android printer Bluetooh
I can print anything but the barcode I currently use: byte[] cmd = new byte[3]; cmd[0] = 0x1b; cmd[1] = 0x21; cmd[2] &= 0xEF; out.write(cmd); out.write("Mensagem de teste \n".getBytes()); The…
-
1
votes2
answers1198
viewsQ: Pass object between views
How could I pass a JSON object between views: angular.module('app') .controller('MeuControle', function($scope) { $scope.listaPessoas = [ { nome: "Patrick", idade: 19 }, { nome: "Joao", idade: 17 },…
-
-1
votes1
answer1223
viewsA: Mysql - Insert multiple products in one order
Vanderson, suppose this is your table compras with the following columns: id, total_pedido, data, id_cliente You’d have to have a table pedido_detalhes which had the following columns: idproduto,…
mysqlanswered Patrick Lobo 41 -
1
votes0
answers617
viewsQ: Print Bluetooth Ionic Printer
Someone actually managed to print to bluetooth printer using Ionic, Ordova, phonegap some method that was not native? My project was written in Ionic, soon arose this need :(
-
0
votes1
answer5418
viewsA: Read serial port data with PHP
solved with the code: $port = fopen('COM5', 'r+b'); sleep(1); echo fgets($port); fclose($port);
-
0
votes1
answer5418
viewsQ: Read serial port data with PHP
my situation is as follows: I have several scales connected to the server, each scale connects through a serial port, currently I am using the COM5 port (I have tried with other larger and smaller…
-
1
votes1
answer783
viewsQ: Call ion-view in function
I’m starting in Ionic and Angularjs, already googlei enough and found nothing about this simple doubt. I can navigate well between the ion-view "Page1" and "Page2" using buttons: <ion-view…
-
0
votes2
answers832
viewsQ: Example of Picker View in Swift
Dear friends, how to popular an Uipickerview object with the simple array? example: var titulos = ["texto1", "texto2", "texto3", "texto4"] how to set this array to a Uipickerview?…