Posts by Paulo Rodrigues • 6,280 points
201 posts
-
7
votes2
answers357
viewsA: How to access information from a. torrent file?
A file of torrent contains only metadata, which is information about the target file but no content information of this final file. It’s basically a dictionary of bencode, that as in this example,…
-
1
votes2
answers1986
viewsA: Access data from an Array that receives 2 Arrays
You have the answer in your own question. If there are two vectors within one, you first need to identify which of the two is your object. Of course it is important to check if the index really…
-
2
votes1
answer2673
viewsA: How to show multiple bookmarks in Google Map API v3?
Being his array coord one string, the section you set the position of each marker is incorrect, since the class constructor google.maps.LatLng there must be at least two arguments, which is latitude…
-
1
votes2
answers1640
viewsA: jQuery - Picking up content from a <link> tag
You can experience something like that too, following your same line of thinking of getting through the tag, being <link> the only one in the document as described in your question: $.ajax({…
-
3
votes2
answers1940
viewsA: Why don’t you open some websites?
The Google and other sites use X-Frame-Options, a way to prevent Clickjacking, which is a sort of click theft for the user to think that they are doing an action on a particular site, but actually…
-
1
votes1
answer85
viewsA: Record video with Avfoundation framework and save to iphone gallery
You will need a few steps using the UIImagePickerController: Frameworks Import the necessary frameworks in Linked Frameworks and Libraries: Assetslibrary.framework Mobilecoreservices.framework And…
-
3
votes1
answer10416
viewsA: Is it possible to list all the neighborhoods of a city?
I don’t know if we’ll end up repeating an argument that has already happened around here regarding Ceps, But what I think and have had experience with this neighborhood case is that it’s unlikely to…
google-mapsanswered Paulo Rodrigues 6,280 -
2
votes1
answer908
viewsA: Stylization of markers on Google Maps V3 routes
In the result Directionsservice, with the object response, you have what you need regarding the start and end points of the route: var leg = response.routes[0].legs[0]; And then customize the two…
google-mapsanswered Paulo Rodrigues 6,280 -
3
votes1
answer3550
viewsA: Create a route in Google Maps V3
First you need the service DirectionsService, this you can put together the variables that are at the top of your script: var directionsService = new google.maps.DirectionsService(); And then, at…
-
4
votes2
answers1536
viewsA: Changing date to be shown on datepicker
You may add minDate to define the minimum selection date, the beforeShowDay to enable the available days (you have already managed, but only to illustrate everything): $(function() { // Data atual,…
-
0
votes1
answer135
viewsA: How to pass data from an activity to a dialogFragment?
You can have in your own class dialog_SignUp a builder that receives these values: class dialog_SignUp:DialogFragment { private string firstName; private string email; private string password;…
-
6
votes1
answer886
viewsA: Function http_build_query
It’s nothing more than to transform your array in a format of querystring, ready to be passed to a URL. It will transform the sequence of value key and separate by a &. It simplifies the process…
-
2
votes4
answers10030
viewsA: Mysql error 1054 Unknown column
I believe the problem occurs because of the signal %, that can’t be there. Try using bindParam, thus: $letter = $consulta->letter . "%" $stmt = $conn->prepare('SELECT COUNT(*) FROM author…
-
5
votes2
answers635
viewsA: How to split a string with delimiter in PHP?
Using the function str_split() to create a array of his string separating each 8 characters and implode() to join using a delimiter, try something like this: $str =…
-
0
votes1
answer313
viewsA: Error when trying to open a new Activity
Well, you didn’t specify which error, but what seems to be happening is opening only the Homespanishactivity and never the other, since you are using the same method changeActivity. You can do as…
-
1
votes1
answer33
viewsA: add dimensional items to the array
Well, then just make the direct inclusion in array: $arr['A'] = 'B'; $arr['C'] = 'D';
phpanswered Paulo Rodrigues 6,280 -
2
votes1
answer2924
viewsA: move_uploaded_file does not work
As described in w3schools, whenever it is necessary to carry out file sending, use the attribute enctype if necessary, thus remaining: <form method="post" action="pegar.php" name="form"…
phpanswered Paulo Rodrigues 6,280 -
2
votes2
answers1312
viewsA: Use SQL LIKE to find a number followed by space
For a cleaner solution, you can use the function FIND_IN_SET to search for something in a list, with no need to change it: select nm_linha from linhas where find_in_set($cod_cidades,…
-
5
votes2
answers5350
viewsA: How do I send data to a form using Curl?
You can send a request using the library Curl this way: once defined a array of value key with its parameters: $fields = array('foo' => 'bar'); You perform the requisition for the $url: $ch =…
-
1
votes2
answers162
viewsA: Creating a link from one site to another in cakephp
Cannot use the structure routing array to reference external links. For this, you must inform all the URL in the second parameter, this being a string: echo $this->Html->link('Galeria',…
cakephpanswered Paulo Rodrigues 6,280 -
8
votes1
answer276
viewsA: How to convert a date to this format in PHP?
You can get a date in this format, from a record of your database MySQL, in this way: echo date("Y-m-d\TH:m:sP", strtotime($db_date)); Where the variable $db_date is the field you will get from your…
-
1
votes1
answer401
viewsA: Login facebook opening alone on android app
From what I understand of documentation, in the onCreate you create and perform all the records just as you have done, but the method logInWithReadPermissions is the call to the action that actually…
-
1
votes1
answer160
viewsA: Hide keyboard when choosing text in Autocomplete
To perform an action when selecting an item, the Listener AdapterView.OnItemClickListener. So you can try something like this: textView.setOnItemClickListener(new AdapterView.OnItemClickListener() {…
-
8
votes2
answers3677
viewsA: How to disable mouse scroll button?
You can try something like this: $('body').mousedown(function(e) { if (e.button == 1) return false; }); Note that older browsers may not work the same way. Try this code on Jsfiddle.…
-
1
votes1
answer807
viewsA: How to Share Image and Text
Try changing the MIME for: sendIntent.setType("*/*"); And add the text like this: sendIntent.putExtra(Intent.EXTRA_TEXT, "Lorem ipsum dolor...");…
androidanswered Paulo Rodrigues 6,280 -
1
votes1
answer74
viewsA: Input listing cakephp query result
It is necessary to inform the array $accommodating in the input related. And being several options, you need the property type and options: $this->Form->input('acomodacoes', array( 'class'…
cakephpanswered Paulo Rodrigues 6,280 -
3
votes1
answer1944
viewsA: Error 505 when installing Google Play App on Lollipop
In fact, you cannot have two applications that request the same signed permission. You can check in your Logcat the following error when trying to install the application, if you have opportunity to…
-
1
votes2
answers934
viewsA: Insert selected SPINNER item into SQLITE
Once you have the list of items from Spinner with this code snippet: List<Integer> constante = db.GetAllConstante(); Just use it to get which item is selected:…
-
1
votes1
answer284
viewsA: Actionbar does not show Icon
You can do it two ways: By file styles.xml: <style name="AppTheme" parent="Theme.AppCompat.Light"> <item name="actionBarStyle">@style/MyActionBar</item> </style> <style…
androidanswered Paulo Rodrigues 6,280 -
3
votes1
answer149
viewsA: How to leave space between images?
Just like these two views were created programmatically, you can also set the margin values like this: LinearLayout.LayoutParams llp = new LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT,…
-
1
votes1
answer175
viewsA: Condition inside foreach before saving model
If you do not want a particular field of your form not to be saved in the database, even if it is a string empty, you can treat this behavior on own Model. In his Model Cursonavigation just you…
cakephpanswered Paulo Rodrigues 6,280 -
2
votes1
answer391
viewsA: Get data from another Model
Straight from a Controller, you only have access to your Model correspondent. To gain access to Model related, which in this case is the Phone, you need to do so: $phone =…
-
2
votes1
answer487
viewsA: How to count the number of twitter followers via php?
Through the Twitter API It’s been a while since Twitter closed access to information and even limited requests to the developer community. You can check that in REST Apis of the version 1.1 (which…
-
1
votes2
answers2124
viewsA: How to save an Sqlite database table to a text file on Android?
I don’t know how exactly your database structure looks, but since you can already read this data, my suggestion goes from this point. First, you need write permission, which you should include in…
-
1
votes1
answer48
viewsA: Children/Parent cakephp
From what I understand, you need something like this in your Controller: $acomodacoes = $this->Navigation->find('list', array( 'conditions' => array( 'parent_id <>' => null, ),…
cakephpanswered Paulo Rodrigues 6,280 -
1
votes1
answer267
viewsA: Parsejson on Swift - login function
What happens is you’re making a asynchronous data communication, then the return of the method logarNoSistema happens soon after the call to the service is triggered, without expecting a return of…
-
0
votes2
answers53
viewsA: Form::Cakephp Helper
In the Controller, you might have something like that, assuming your action be the very one index(): public function index() { $semanas = array(); for ($i = 1; $i < 49; $i++) { $semanas[$i] = "$i…
cakephpanswered Paulo Rodrigues 6,280 -
1
votes1
answer993
viewsA: Access variables from another iOS Swift class
What happens is that by doing Main() you are creating a new instance of this class, then the variable value cod is the initial, which is 0. Ideally you pass this value through the ViewController…
-
2
votes1
answer38
viewsA: uitextfield - Position cursor during editing
You can do this through the code: [self.fieldValor setTextAlignment:NSTextAlignmentRight]; Or by Interface Builder, has this property:…
-
1
votes1
answer315
viewsA: Close Activity after result
You don’t necessarily need to change the class CaptureActivity, you can create a Activity your extending this, and as the change is only in this method, just overwrite it and implement as the…
-
3
votes2
answers315
viewsA: Can I put an image of the internet on an Imagebutton?
First you need to download this image because there is no direct way to inform a URL directly on the property src, for example. You can have a method like this, to download this and get a Drawable:…
-
4
votes1
answer614
viewsA: Activate the smartphone’s GPS
Currently unable to enable/disable GPS directly from the application, however, you can yes take the user to the device setting that does this. To this end, after making this check the GPS and find…
-
1
votes1
answer32
viewsA: Do not insert repeated Annotations into the map
Within this iteration for that you do, right after assigning the values of latitude and longitude, you can use something like block for this, thus making the comparison based on the distance between…
-
3
votes1
answer2178
viewsA: Custom marker on Google Maps
To include the map, as you should already be doing and as indicated in documentation, You really don’t need any keys for that. Therefore, to customize the markers is also not necessary a key, just…
-
1
votes1
answer35
viewsA: Session from the Config
In fact, you cannot set the properties dynamically straight in the configuration file Email. You need to make it a Controller, for example. By the method config(), you can both pass a string…
-
1
votes1
answer54
viewsA: How do I know which fireDate is in the next scheduled notification?
The class UIApplication owns the property scheduledLocalNotifications, which has a list of all scheduled notifications. You might have something like this: UIApplication *application =…
-
1
votes1
answer3482
viewsA: How to place a frame or space between Edittext’s?
On the margin, as I commented, you can use the parameter android:layout_margin in each of its EditTexts, for example: android:layout_margin="3dp" This includes margin in the four corners, but if you…
-
0
votes1
answer39
viewsA: Change Children id to another id
Note that this line below does not result in anything. empty($this->request->data['Navigation']['childs']) ? null : $this->request->data['Navigation']['childs']; To be honest, I don’t…
cakephpanswered Paulo Rodrigues 6,280 -
1
votes1
answer265
viewsA: Xcode function library (Objective-C)
In Objective-C we have two types: instance methods and class methods. With these methods, your header file (.h) looks something like this: @interface MyClass : NSObject - (void)instanceMethod; +…
-
0
votes1
answer71
viewsA: How to hide data in a table according to status
To compare dates, you need to do something like this: if (strtotime($dados['data']) <= strtotime('-30 days')) { echo 'mais de 30 dias'; } else { echo 'menos de 30 dias'; } Here’s an example on…