Posts by Otto • 5,653 points
186 posts
-
0
votes1
answer178
viewsA: Direct to another external Wordpress page
If you want to create in the admin main menu just use something like this: add_action( 'admin_menu', 'my_admin_menu' ); function my_admin_menu() { add_menu_page( 'My Top Level Menu Example', 'Top…
-
13
votes1
answer58870
viewsA: How to know if a port is open or not on Linux
The simplest way to check this would be using the command: nmap -sT -O localhost As added by Milestone can be tested from an external point: telnet meudominio.com 443 (onde 443 é o número da sua…
-
0
votes2
answers52
viewsA: Captcha error with Magento: Call to a Member Function getBlockName
Try to clean the directories var/cache and var/session
-
0
votes1
answer41
viewsA: Google Adsense with Cakephp?
From what I was seeing in the documentation there is a problem: It may be necessary to wait up to 48 hours for Google are displayed and up to a week for Adsense to start working searches on their…
-
4
votes1
answer9332
viewsA: How to Do Ascending and Descending Listing in PHP Records
You will need to run your query again at the click by changing the field and the example sorting orientation: $strSQL = "SELECT * FROM TABELA ORDER BY id DESC"; $strSQL = "SELECT * FROM TABELA ORDER…
-
4
votes1
answer1394
views -
7
votes2
answers1819
viewsA: How to make a gif run only once?
Look Daniel I found something that can help you: https://github.com/krasimir/gifffer With it you can make the gif "touch" once. Include the gifffer.min.js on the page. <script…
-
3
votes2
answers1099
viewsA: replace id by name
You could make a Join in the product table to get the information or use the idea of the code below to make the conversion on the screen itself: $produtos = "SELECT * FROM produtos WHERE id=".…
-
3
votes1
answer61
viewsQ: How to be notified when there are grid changes - Angulasjs ui-grid
Is there any way to know if the grid has finished upgrading lines, or even finished loading them ? I tried to do it this way: $scope.gridApi.core.on.filterChanged($scope, function() {…
-
1
votes1
answer810
viewsA: Adding Admob to the Ionic?
Follow link with full integration example: https://blog.nraboy.com/2014/06/using-admob-ionicframework/ Example of integration: var admobApp = angular.module('myapp', ['ionic'])…
-
5
votes3
answers10288
viewsA: How to know which select option has been selected
Like something like that: var conceptName = $('#aioConceptName').find(":selected").text(); You could still do it direct in javascript: var box = document.getElementById('aioConceptName');…
-
1
votes1
answer33
viewsA: Put maximum lines in the wordpress summary
As far as I know by lines you could not do, but could be done by volume of characters as follows:: <?php $content = get_the_content('',FALSE,''); $content = apply_filters('the_content',…
-
3
votes1
answer2372
viewsA: Git/Github problem - large files
Friend really has some complicators, follows a text of another answer to a question similar to yours: Git has a great difficulty with large files (>50MB) and a great loss of resources with large…
-
0
votes1
answer495
viewsA: how to save a post in the variable on the same page
You can use this way: <?php if(isset($_POST['variavel'])){ $variavel = $_POST['variavel']; }
-
1
votes2
answers1151
viewsA: Hide the Webview address bar
Add this to disable the address bar: WebView.setWebViewClient(new WebViewClient());
-
2
votes2
answers2126
viewsA: how to select only 1 record of each id
Use a Group By Id Something like Select * from Tabela Group By Id
-
4
votes2
answers1465
viewsA: NCM codes to import into my system
I believe that this is not well within the scope of the site, but follows the link with what you need: https://github.com/aricaldeira/NCM/tree/master/tabelas…
-
5
votes3
answers8265
viewsA: Batch rename files using Windows Power Shell
Suppose you have a directory with corrupted file names. You just know that they are all files. png, but the extensions have been switched to random names. You would then like to rename everything to…
powershellanswered Otto 5,653 -
4
votes3
answers758
viewsA: Generate Single Check Serials
Calling the function without any parameter will generate a unique 13-character ID. I used this code and got the following results: <?php for ($i = 0; $i < 20; $i++) { echo uniqid() , '<br…
-
0
votes2
answers200
viewsA: Grab thumbnail of videos (Windows)
There seem to be some examples out there that are much better than what I was going to send you. Behold http://krishnabhargav.blogspot.com/2008/02/processing-videos-in-java.html. If you can find a…
-
1
votes1
answer294
viewsA: First value of Select2 is not shown when you use i18next
I managed to find a way: As Voce is working with dynamic content occurs the library can not handle correctly. after assembling the dynamic combo put these two guys down at the end, right after you…
-
5
votes1
answer1379
viewsA: Button "Like/Like"
Three files will be used: 1 - main.php, which will display the download link and the number of downloads 2 - download_file.php - This will increase the counter by 1, download the file and redirect…
-
1
votes1
answer1406
viewsA: Sublime opens file with EUC-JP encoding
In user Settings you could set these two parameters: "default_encoding": "UTF-8", "fallback_encoding": "UTF-8", I believe this can solve your problem.
-
1
votes0
answers118
viewsQ: Hibernate Soft Delete Spring Boot Behavior
I wonder if there is soft delete functionality in Hibernate, because today I am doing in a way that I consider gambiarra, something to type: @Entity @Where(clause="ativo=1") Controller: Rejeicao rej…
-
4
votes4
answers455
viewsA: Is it appropriate to create a`CSS Sprite` with disparate images?
WHAT IS? For those who do not know, this is a technique that is based on combining several images into one, in search to decrease the number of HTTP requests to the server. And this is just one of…
-
2
votes2
answers2187
viewsQ: Extend findAll with custom filters
I am trying to extend findAll from my JPA repository to make custom filters. I did some research and found some ideas of use with Predicates and the like but did not identify something that worked…
-
2
votes1
answer1112
views -
0
votes2
answers1767
viewsA: Mobile Cordova Geolocation
GPS geolocation of the device using Phonegap, Google Maps API and jQuery Mobile Phonegap’s Geolocation API provides information on device location, such as latitude and longitude, altitude, speed,…
-
2
votes1
answer1032
viewsA: PHP Artisan Make:Model Command Does Not Work
Would not be: php artisan model:make NomeModel You can also use the command: php artisan To list all commands. If you don’t have it you can use the extension Laravel 4 Generators that meets your…
-
2
votes1
answer30
viewsA: The Bitsnoop API is crashing WHILE
First of all the function should not be implemented inside while, remove that snippet out and place it before the while: function obterSeedLeech($hash) { $apiURL =…
-
2
votes1
answer2054
viewsA: Install Pagseguro/PHP in Laravel
The library Voce is trying to use is not proper for Windows. Open the Composer.json file and enter the following statement: "require": { "michael/laravelpagseguro": "dev-master" } After entering…
-
0
votes1
answer2528
viewsA: How to run a . php automatically, every day, at a certain time?
Just as you call your script in the Linux shell, you can use the PHP executable and call the script from your crontab. To run "my-script.php" every 1 hour do the following: # crontab -e 00 * * * *…
-
3
votes3
answers143
viewsA: Doubt with PHP and Apache
If you are using Ubuntu or derivative you could use the command below where you leave your Lamp 100% functional: sudo apt-get install lamp-server^
-
1
votes2
answers1832
views -
2
votes2
answers111
viewsA: Auto Publication Wordpress c#
You must use Wordpress' XML-RPC interface. There are many examples and articles about it that you can use (examine).…
-
1
votes1
answer172
viewsA: Redirect 404 pages to search
The easiest way to do it is to use the URL rewrite module of the user itself. Go to the backend admin -> Catalog -> Rewrite URL and add the desired routes.
-
0
votes1
answer1083
viewsA: Send email with signature using an image
Image can be added in html and hosted on the company website, facilitating its development thus <img src=\"ass-renata.png\"> you need to put the full image url…
-
1
votes1
answer75
viewsA: Unnecessary space in the sales module div
This is a very useful tip that many beginners fight to accomplish: enable the template hints in the Magento admin. To do this, just run the following SQL command in your database: INSERT INTO…
-
1
votes1
answer49
viewsA: Wordpress content page, how to edit
single.php is the page you are looking for
-
14
votes3
answers4829
viewsA: click a play button on the Youtube iframe
You can do it in a very simplified way using the parameter autoplay=1 in querystring: $('#image_id').click(function() { $(".frameVideo").attr('src', $(".frameVideo").attr('src') + '?autoplay=1');…
-
0
votes2
answers961
viewsA: Redirecionamento Magento
Fixing this problem is very simple - there are even two ways to solve it quickly. The first way, which I see as simpler, is to access the database of your application and directly modify the Urls in…
-
2
votes1
answer1104
viewsA: How to change a domain store?
1) First, reconfigure the connection of the application to the database. This was done by changing the values of the local.xml file you are in: app/etc/local.xml; 2) Then, as the installation points…
-
8
votes3
answers51011
viewsA: How to send email from localhost using PHP’s mail function?
The steps were taken and adapted from the original comment in PHP.net: 1 - Download sendmail.zip file from http://glob.com.au/sendmail/. If you use XAMPP, it is already included (skip step 2). 2 -…
-
0
votes4
answers127
viewsA: Redirecting in PHP
1) Find the header() , the statement that is causing the problem. The error must be equal to the above. 2) Search for all statements that could send the output to the user before this header…
-
0
votes2
answers834
viewsA: Getting data between 3 tables in Yii , cgridview
It would be something like this: $equipamentos = $model->Equipamento; foreach($equipamentos as $equipamento) { echo 'codigo_equipamento:'.$equipamento->id.'<br/>'; echo '<hr />'; }…
-
0
votes4
answers2562
viewsA: Definition of "margin-top" in percentage of a "div" works strangely
I tweaked your CSS a little bit: #content { width: 300px; height: 200px; position: absolute; top: 0; bottom: 0; left: 0; right: 0; margin: auto; background: red; } <div id="content">…
-
1
votes2
answers71
viewsA: Requesting to download the file in the middle of the run
Guys I figured out how to solve the issue. In Zend Server we have this configuration in XML his pattern: <Timeouts connectionTimeout="60" requestTimeout="120" /> I ended up trading for:…
-
0
votes2
answers1252
views -
0
votes2
answers71
viewsQ: Requesting to download the file in the middle of the run
I have a small problem, I have an execution in PHP that generates an average of 34 thousand Insert’s in Mysql, this is done via stored Procedure. But when I run the same execution is around 5…
-
5
votes1
answer89
viewsA: Processing of inserts in Mysql
To list the process of a bank just access it and do the query below. SHOW PROCESSLIST The list of active processes will be displayed.