Posts by byteman • 792 points
20 posts
-
0
votes1
answer75
viewsA: How do I take a specific part of a string in GOLANG
I believe a Web Scraper solves your problem. Try the go get github.com/anaskhan96/soup or access https://github.com/anaskhan96/soup package main import ( "fmt" "os" "github.com/anaskhan96/soup" )…
-
1
votes1
answer42
viewsA: Golang: Pass Nested Struct to Htmltemplate
There are two ways to solve this... By 'encoding/json' and 'interface{}' type ListValidation struct { Id int Nameplan string Escop string Data string } lv := ListValidation{ Id: 10, Nameplan:…
-
0
votes1
answer38
viewsA: Doubt about the type of permission when creating folder and file with. mkdir() and.openfile()
Let’s simplify using only the last 3 values {666}. you applied {for the user:6, for the group: 6, and for others:6} what each number means: 0 = no permission; 1 = only execute; 2 = only record; 3 =…
-
0
votes3
answers177
viewsA: How to initialize a constant with the value of time. Now() in Golang?
Because you want to count the time, I found it laborious your way, for my projects I use this method: package main import ( "fmt" "time" ) var end chan bool var tsecs chan string func init() { end =…
-
3
votes2
answers171
viewsA: Is there a way to execute a single command as an administrator (other than the entire program)?
It is possible yes to be admin, there is this gist of Jeremy Black To see the result of Command, add .CombinedOutput() at the end of exec.Command(args).CombineOutput() package main import ( "fmt"…
-
1
votes1
answer53
viewsA: Register authenticated users with Facebook in Firebase Database
as the documentation in Read and write data on android Have the instance: private DatabaseReference mDatabase; // ... mDatabase = FirebaseDatabase.getInstance().getReference(); the User class…
-
1
votes1
answer775
viewsA: How to change the color of the button that is pressed?
You can try using the function setBackgroundColor and insert a hexadecimal value of the colour. opt1.setBackgroundColor(0xFFFFA500); If you already know CSS, you can change the color by changing the…
-
2
votes1
answer14245
viewsQ: How to change the application version in android studio?
I’m about to launch an app and know that at some point I will make updates, but I did not find in the tool the location to change the app version, since it is different from Eclipse ADT, which was…
-
1
votes1
answer913
viewsA: Generate PDF from selector on current page with CSS
I believe you’re talking about CSS markup/properties, if you want me to recognize CSS properties, I recommend mPDF, but should use markups up to CSS 2.1 and this is a PHP library, ie should generate…
-
7
votes3
answers1758
viewsA: Do I need to insert an HTML tag with jQuery to encapsulate the code below?
I believe that this can solve: var pegatudo = $("<div/>",{id:"pegatudo"}); pegatudo.append('<div class="Ftitulo">'+item.titulo+'</div>'); pegatudo.append('<div…
-
4
votes8
answers67841
viewsA: How to export an HTML/PHP page to PDF
If you prefer one that recognizes CSS properties, I recommend the mPDF Resources: Accepts UTF-8 CSS support Supports JPEG, GIF, PNG, WMF and SVG images Watermark PHP Standalone Library Etc.... View…
-
2
votes4
answers917
viewsA: How to check for value in a PHP array?
On the line where: $nome = $_POST["nome"]; You can modify to: $nome = isset($_POST["nome"]) ? $_POST["nome"] : ''; This way will avoid the code error, but with or without POST request it will…
-
3
votes5
answers1927
viewsA: Why is multiplication faster than division?
Good people, the reason the division is slower, not in the language, but in the processor. Since a multiplication operation the processor will perform a binary sum, as an example in the decimal…
-
7
votes2
answers761
viewsQ: How to create and remove aliases in GIT
I would like to know the commands to create an alias, I learned that I can shorten my commands and make it faster and more productive, but I still don’t know how to do this. Does anyone know the…
-
0
votes2
answers4081
viewsA: How to create user validation with access levels in codeigniter?
What you need is a ACL - ACESS CONTROL LIST, there is a ready that is very good called Ion Auth. Visit the website Ion Auth Docs, and see its documentation, download and configure in your project.…
-
3
votes1
answer2629
viewsA: How to create new folder in an Android Studio project
the option to create folder is Directory see:
-
0
votes2
answers238
viewsA: Redirecting of HTTP requests
You Can Use This Rule: <IfModule mod_rewrite.c> RewriteEngine On #regra de redirecionamento de urls antigas redirectMatch 302 ^(.*)$ http://www.site.com.br/artigo/1/ </IfModule> You will…
-
3
votes4
answers17336
viewsA: How do I copy commits from one branch to another?
To perform step 2, first you must be on the master branch you can do this with git checkout master After that one should then create the task branch (step 2), making a copy of the master, taking…
-
0
votes2
answers898
viewsA: Time Comparison Problem with mysql
Your table structure is making the work difficult, the most correct and you work with whole dates and for calculations the best is to convert in seconds. see an example: <?php $agora =…
-
21
votes8
answers7407
viewsQ: What better way to work offline and synchronize data with server?
I am working on a project where it will be necessary for users to register offline and then submit their registration to the server as soon as the internet connection is available. My problem is…