Posts by Lollipop • 4,918 points
260 posts
-
1
votes1
answer77
viewsQ: Get last child of a product category
Everybody, good afternoon, everybody. I need to get the last child of a category within a product loop: Categoria -categoria filho --categoria ultimo filho It always gives me the Father, ie…
-
1
votes1
answer535
viewsA: Edittext selected at start Activity
Create a Linearlayout "invisible" above Editext. Then the focus will go out of your Editext: <LinearLayout android:focusable="true" android:focusableInTouchMode="true" android:layout_width="0px"…
-
1
votes2
answers308
viewsA: Rewind image and return to function
You want to pass in a function the information of an image already allocated in your folder, on the server, that is, after the upload. You can check: readdir() And so get the list of your images:…
-
1
votes1
answer246
viewsA: Android: Exception when running Toast.makeText
Your mistake was indentation: public void onClick(View view){ (...) CharSequence text1 = "Please insert a number."; int id= view.getId(); (...) else if(id== R.id.buttonOK){…
-
2
votes3
answers8626
viewsA: Protect folder from direct access
I have a way that can be a viable alternative. Use: $_SESSION to validate access to index.php of dominio.com/uploads. However, before, you need to do this on . htacess, to avoid direct access to the…
-
8
votes2
answers3308
viewsQ: Block direct access to a directory and create condition to free access with . htacess
I have this for when: Request is not an existing file OR Request ends with . php RewriteCond %{REQUEST_FILENAME} !-f [OR] RewriteCond %{REQUEST_FILENAME} \.php$ RewriteRule ^(.*)$…
-
3
votes1
answer326
viewsQ: Authentication and external redirection to wordpress sites
I’m creating a simple login system that redirects a customer to their area. There will contain links to your projects, IE, when clicking, it will be redirected to your site. EXAMPLE: I have a folder…
-
3
votes3
answers2967
viewsQ: How to remove the last character from the last value of an array
Guys I got the following foreach: $items = ""; foreach ($_POST['termos'] as $item) { if(isset($item)){ $items = $items . $item . '+'; } } He returns to me: Array ( [0] => 1-valor+ [1] =>…
-
6
votes2
answers256
views -
0
votes1
answer143
viewsQ: Change part of all two-column records through a reference
Good evening, everyone! I am Noob in SQL and I intend to strive to learn more with your help. Details: Columns belong to the same table The part of the record to be removed is common in all Rows,…
-
2
votes1
answer1522
viewsA: Capture Quantity of Items in Cart Wordpress
To show in your template the total use this: <?php global $woocommerce; $numero = sprintf(_n('%d', $woocommerce->cart->cart_contents_count, 'woothemes')); echo $numero; ?>…
-
5
votes1
answer543
viewsA: Facebook login php Auth returning dialog/oauth? client_id in url
1 - Check if your APP, on facebook, is PUBLISHED. 2 - See if permissions are enabled: 3 - Generate a new Secret App and replace the previous one. 4 - Most importantly, see if the url, which is in…
-
1
votes1
answer124
views -
-1
votes1
answer558
viewsA: How do I translate to en-BR?
Try to do manually: {{ Form::selectMonth('month') }} Produce your options: <select name="month"> <option value="1">Janeiro</option> <option value="2">fevereiro</option>…
-
2
votes1
answer524
viewsA: The method that sends email works, but how to prevent the amount of incoming emails from becoming spam?
There is no guarantee that the e-mail will not end up in spam. It all depends on the software used on the server that will receive the email, amount of equal emails sent and several other factors.…
-
1
votes1
answer704
viewsA: Application displaying this error: Error Parsing data org.json.Jsonexception
You have to further specify your mistakes about what is said in try/catch: ... // try parse the string to a JSON object try { jObj = new JSONObject(json); } catch (JSONException e) { Log.e("JSON…
-
57
votes3
answers204336
viewsA: What is the difference between asynchronous and synchronous communication?
ASYNCHRONOUS DATA COMMUNICATION In Asynchronous Transmission, a special bit is inserted at the beginning and end of a character transmission and thus allows the receiver to understand what was…
-
1
votes1
answer439
viewsA: List of popular posts with facebook comments
Save number of comments on post meta-data so that you are able to use it for screening purposes later. http://codex.wordpress.org/Custom_Fields We should just get the commentary count back: SELECT…
-
8
votes1
answer6772
viewsA: How to post on a facebook page using PHP
Here is the code you need to share a link to Facebook using PHP. With small changes you can use this code to leave only one message (no link), or upload a photo to a Facebook album. Now about…
-
1
votes2
answers5338
viewsA: Android connection to Mysql
Below is a simple tutorial on how to create a simple web service. PHP will be responsible for performing CRUD and giving a response via json. Your java code will "point" to this file and get the…
-
4
votes2
answers4683
viewsA: AJAX post request with Angularjs
In Angularjs you can submit AJAX requests in several ways: AJAX calls via the $http service. JSONP calls via the $http service. REST type calls. Angularjs & JSONP Example of a JSONP call with…
-
0
votes3
answers440
viewsA: Why does Edittexts information disappear when I change Victoria?
My response is directed to information restoration with: @Override protected void onRestoreInstanceState(Bundle savedState) { super.onRestoreInstanceState(savedState); } ..... In the Edittext…
-
0
votes1
answer350
viewsA: Add error 404 friendly url
In php with the function curl_init(); $handle = curl_init($url); curl_setopt($handle, CURLOPT_RETURNTRANSFER, TRUE); /* Obtendo o arquivo que está conectado a $url. */ $response =…
-
2
votes1
answer249
viewsA: Javascript player disappears on mobile
Chrome Android: The top player does not work The player lists, in the body of the site, are disappearing when clicked on the player. Native Android Browser: The top player works The player lists, in…
javascriptanswered Lollipop 4,918 -
2
votes2
answers7699
viewsA: How to move one element to the position of the other with Jquery?
1 - EXAMPLE: MOVE TO ANY AXLE POSITION X And Y: <html> <head> <title>Overflow</title> <script language='JavaScript' type='text/JavaScript'> <!-- function reset1(){…
-
0
votes3
answers225
viewsA: E-mail being sent in duplicate to each contact
Change the appointment: $query_News = "SELECT * FROM newsletter WHERE status = 1 AND fora = 0 ORDER BY id ASC"; By a foreach and leave only this loop. EXAMPLE: foreach( $wpdb->get_results('SELECT…
-
0
votes2
answers3254
viewsA: Resizing image with canvas and Javascript
According to this documentation there is a kind of "fault", or rather, this is the canvas feature in obtaining jpeg: http://zapone.org/blaine/2015/01/03/save-html-canvas-drawing-as-jpg-error/ There…
-
1
votes1
answer150
viewsA: Shared Preferences does not store login using JSON
You’ll need something like this: SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this); String access_token = preferences.getString("username", null);…
-
2
votes2
answers108
viewsA: Remove post-type Wordpress articles
You need to add action for a function to be accepted by the wordpress core. Don’t forget to put in functions.php function post_remove () //criando a função post_remove para remover o menu item {…
-
2
votes1
answer1749
viewsA: Application icon does not appear
Try this on the mainfest.xml. Change image name to 'appicon': <application android:icon="@drawable/appicon" android:label="@string/app_name" android:name="com.droid.MEUAPP"> ... Or this, with…
-
2
votes3
answers11729
views -
1
votes2
answers1943
viewsA: Updating Listview when I come back from a screen
The problem happens because when you go to the next activity, EditaReceitaActivity.class, you are not destroying the previous activity, which is not recommended, if you do not want to consume more…
-
1
votes2
answers1801
viewsA: Avoid duplicate data by applying use log counter
The correct logic is to use one of these fields ID, IP, Data/Hora, Nome, Email e Estado/Cidade as a validator. You can use a kind of validation using the campo Email, for example, as a reference.…
-
2
votes1
answer2333
viewsA: Center map with more than 1 (one) marker
Instead of using two dots or more, use the LatLngBounds() to center the map. API- <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> -js…
-
1
votes1
answer1316
views -
1
votes1
answer327
viewsA: Play youtube videos in a Windows Phone app
You can use the Youtube class that is available in the Mytoolkit library for Windows Phone, take a look: https://github.com/RSuter/MyToolkit/wiki/YouTube Example to play a Youtube video using a…
-
4
votes1
answer90
viewsA: How to call CSS files using Kohana PHP 3.3
You can use URL::base: <?php echo URL::base(); ?> Example: <link src="<?=url::base()?>assets/css/layout.css" />…
-
2
votes1
answer842
viewsA: How to add a class to an HTML element with PHP?
My example, WORKS, makes an active menu item based on the current URL with jQuery: Jquery: <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>…
-
2
votes1
answer676
viewsA: Problem with HTML and MYSQL accentuation
Before importing the data into your Mysql database, set a standard collation. In Brazil Latin1 is the most used, so the standard CHARSET (character encoding) is Latin1 and the standard COLLATE…
-
0
votes3
answers1338
viewsA: How do Eclipse display the SDK and AVD Manager icon?
This is SDK icon in eclipse: If not enabled, do this ANY OF THESE STEPS: Windows -> Open Perspective->Other e Selecione "Java(Default)" e clique em OK. Window > Custom Perspective Command…
-
1
votes1
answer478
viewsQ: Error when finishing Activity through another class
Can anyone explain why the error occurs LISTADO NO FINAL DA PERGUNTA, terminating the application, when I try to finalize the application through another class: Classe1.class: ... ...…
-
1
votes3
answers563
viewsA: setOnItemLongClickListener is not working
You have to set setOnItemLongClickListener() in Listview: listView.setOnItemLongClickListener(new OnItemLongClickListener() { public boolean onItemLongClick(AdapterView<?> arg0, View arg1, int…
-
1
votes1
answer80
viewsA: Wordpress - Order by meta value num
orderby must be meta_value_num , or meta_value, not the key name. Example: $orderby= array( 'orderby' => array( 'meta_value_num' => 'ASC', 'valor_do_imovel' => 'ASC' ) SEE:…
-
0
votes1
answer2435
viewsA: How to list directory in a listview?
This is the minimum to get a list from a directory: private File file; private List<String> minhaLista; minhaLista = new ArrayList<String>(); String root_sd =…
-
1
votes4
answers15217
viewsA: View PHP date and time
To display: Date: YYYY-MM-DD and current time: <?php $date = date('Y-m-d H:i:s:u'); echo $date; ?>
-
2
votes1
answer192
viewsA: What’s the best way to add a dynamic banner to another site?
This is a suggestion: Openx - an open ad server to manage advertising on websites and the delivery of advertising campaigns to consumers. Today is practically the only open solution available that…
-
1
votes4
answers347
viewsA: Is there any way to detect if there are any asynchronous calls being run?
Count how many times you execute an AJAX request, and then count the number of times you’ve seen a call to the completed callback. Once the completed callback is equal to the number of times you’ve…
-
4
votes1
answer7881
viewsA: Data saving on Android
All Android devices have two types of file storage options - internal and external. Read this article and you will see that the best option will be according to the need of your app: Internal…
-
2
votes3
answers6396
viewsA: How to display an image on the screen
Your question was as much as complex and at the same time without goals for the goal:screen image on android. Well... Let’s get out of the critics and go for my answer. Suposição e lógica: Imagining…
-
0
votes1
answer255
views