Posts by Leonardo Cesar Teixeira • 440 points
16 posts
-
1
votes1
answer221
viewsA: preg_match regular expression to pick text between tag
The expression would look like this: <a href="\/logout" role="menuitem">[\s]+<i class="icon-key"><\/i> ([a-zA-Z]+)[\s]+<\/a>
preg-matchanswered Leonardo Cesar Teixeira 440 -
1
votes1
answer735
viewsA: Back button on webview
If you are not finishing the main activity by starting the subscriber’s central activity, you can simply end this second activity to return to the first. Example: Override public void…
-
1
votes1
answer107
viewsA: How do I work with LONG "data" inserted in an editText?
First, you must use the method gettext to take the values of the fields Edittext and make the conversion to Long: l01 = Long.parseLong(et01.getText().toString()); l02 =…
-
1
votes1
answer118
viewsA: Silex can’t find the routes
What’s happening is that your route is / and you’re accessing /Silex/ in the snow. You have at least three solutions to solve this problem. Solution 1 Since you are using the Apache server, you can…
-
1
votes1
answer117
viewsA: How to take a json link and use it in php
The structure JSON is being passed by querystring, then you need to use the variable $_GET to catch her. Example: <?php $valor = json_decode($_GET['conteudo']); echo "<pre>";…
-
2
votes1
answer758
viewsA: $_POST take the <form name="this name"...>
You can use a field of the type Hidden to identify which form is being submitted. In HTML: <form name="frmCadastro" method="post" action="../_controllers/ccontatos.php"> <input…
-
2
votes3
answers664
viewsA: Request within a defined time interval
You can use the feature Alarm Android and set how much in how long it should be called. First you need to create a broadcast receiver which will be called when the alarm is executed: public class…
-
2
votes2
answers333
viewsA: How to insert link on button
Using Swift 3 the code would look like this: @IBAction func urlDisplay(_ sender: AnyObject) { let url = URL(string: "http://www.quatenus.co.ao/")! if UIApplication.shared.canOpenURL(url) {…
-
0
votes2
answers414
viewsA: Get the user’s location
First you need to add the Cllocationmanagerdelegate in your class Viewcontroller: class ViewController: UIViewController, CLLocationManagerDelegate { Then implement the didUpdateLocations method:…
-
1
votes3
answers1761
viewsA: How to convert a String to Date on Swift
You can use the class Nsdateformatter to make this conversion. Example: let dateString = "2016-08-14T20:38:27.031-03:00" let dateFormatter = NSDateFormatter() dateFormatter.dateFormat =…
-
2
votes2
answers514
viewsA: How to pass the value of a variable through a button to another class in Swift
If you are using Segues, just overwrite the method prepare in his Viewcontroller login. For example, assuming the next Viewcontroller be called Nextviewcontroller and the ID of your Follow is…
-
1
votes1
answer1233
viewsA: Document root Apache 2 cannot find routes from the Apache
I believe the problem is occurring because you have not enabled the option of override in its configuration. Try to leave the Virtual Host like this: <VirtualHost *:80> ServerName site.com.br…
-
0
votes1
answer32
viewsA: Difference between these 2 urls.
If you are using the Apache WEB server, probably the option Multiviews is active, in which case it is possible to ignore the file extension and Apache itself will determine which is the most…
-
3
votes2
answers320
viewsA: Can I update the GIT version without losing my repositories?
You can update the version of GIT without any problem, because the data of each repository is stored inside the directory of each of them, this data is stored in the hidden directory .git.…
-
1
votes1
answer269
viewsA: How to keep the user authenticated?
On Swift you can use Nsuserdefaults to persist this data. To save user and password use: SWIFT 2 let userDefaults = NSUserDefaults.standardUserDefaults() userDefaults.setObject("joaosilva", forKey:…
-
0
votes2
answers846
viewsA: Duplicate values in php
Try using the following query: $res = $mysqli->query('SELECT * FROM brinquedo WHERE ano = ' . $ano1 . ' GROUP BY nome'); I recommend creating an index in the column name to improve the…