Posts by Guilherme • 2,717 points
43 posts
-
2
votes2
answers1315
viewsA: How to use Try, catch, Finally and Exception in php
The structure of try, catch finaly is quite simple. Within the try you put the code you risk generating exceptions. You can have one or more catch, if you want to create different treatments for…
-
2
votes1
answer339
viewsA: Latest posts wordpress blog on another site in PHP
As I mentioned, there are many ways to solve this using PHP Or even using components ready for Wordpres or other CMS’s As it was not specified if the target site was built using some CMS, follow an…
-
3
votes0
answers515
viewsQ: What should I worry about when creating a Partitioned Table in SQL Server?
I was suggested to partition the main table of my system to improve the performance of some queries. The dev who made the suggestion suggested using the information from ano registry registration to…
-
2
votes1
answer3518
viewsA: Push git "Everything up-to-date " Data is not actually sent
Make sure you are doing all the necessary steps I see you already have the repository properly configured, so if you have created new files, run a git add git add . to add all files from the…
-
1
votes1
answer1328
viewsA: Plugin to view pdf as magazine
Look for Flipbook plugins You will find from ready-made components, where you just pass the pdf, from libraries to mount your flipbook from HTML content I found this turn js. interesting and easy to…
-
0
votes1
answer181
viewsQ: Magento: Failed to load Resource - When language is set to pt_BR
After following the step by step installation of Magento, when trying to access both the frontend and the administrative panel, the site does not load the css, javascript and image files. After some…
-
0
votes1
answer181
viewsA: Magento: Failed to load Resource - When language is set to pt_BR
Magento, at the time of installation, has been set to the language pt_BR. And the command how it was executed 'sudo php bin/Magento setup:Static-content:deploy' generates the files for the default…
-
1
votes1
answer84
viewsQ: How to use a Joomla component with git
When I create a new component or module for Joomla, most of the development is done with the component/module already installed within the CMS structure - administrator - cache - components -…
-
2
votes2
answers525
views -
3
votes4
answers539
viewsA: Pick up word in the middle of a text
You can use regex and move on to the preg_match() the pattern used in string formation $input = '<a href="uploads/tutorial.pdf">tutorial.pdf</a>'; if (preg_match("/<a…
-
4
votes3
answers2663
viewsA: How to copy to clipboard without using flash?
This example found in stackoverflow international performs the copy to the clipboard using document.execCommand('copy') which is currently supported by the latest version of the major browsers.…
-
1
votes6
answers1754
viewsA: Hide dives after selecting another category
There are many ways to solve this. I used this function toggle_visibility(id) which receives the id of an html element, and toggles the state of the element display amid block and none and built the…
-
1
votes1
answer304
viewsA: Days of the week dynamically
You can make use of the function date() PHP to get the day of the week. echo date("l"); //exibe o nome do dia da semana, em inglês echo date("N"); //exibe a representação numérica do dia da semana…
-
1
votes5
answers59481
viewsA: Take content from within a Div and put in Input value
You can capture and change the value of a div using getElementById(). <script type="text/javascript"> function alteraDiv(){ var destino = document.getElementById("minhadiv"); destino.value =…
-
0
votes2
answers1700
viewsA: How to put images on the screen?
I believe that the only way will be using some API or Framework, where you would stop using the text terminal to run your applications and start running them in the environment prepared by the API.…
-
1
votes3
answers318
viewsA: Converting a datetime to text does not show the result
I had some problems saving dates on Datetime in the Doctrine, I resolved as follows: static function strToDatetime($strDate) { $strDate = str_replace('/', '-', $strDate); $datetime = new…
-
4
votes1
answer334
viewsA: Sqlserver English Error Messages - (Localdb) v11.0
I don’t know how to perform the server configuration, but when I need to know the meaning of an error message, I run the following select: select * from master.dbo.sysmessages where msglangid = 1046…
-
1
votes1
answer852
viewsA: enrol_manual_enrol_users, link user to course in Moodle via webservice
As I could not make this function of the webservice work, I decided to create the link directly via bank. For this I adapted the blog querys Moodlesql in the following functions (the implementation…
-
1
votes4
answers1172
viewsA: How to get values separated by "<BR>" in Mysql?
In the SELECT, you can concatenate to the column value a string that your application understands as line break (<br /> or \n). In mysql you can do this with CONCAT() SELECT CONCAT(a.nome,…
-
2
votes6
answers11304
viewsA: How to get distance given the coordinates using SQL?
If you can create a Function in your bank, it will depend on which bank you are using, you could do the calculations for it. In PLSQL would look like this create or replace FUNCTION…
-
0
votes1
answer852
viewsQ: enrol_manual_enrol_users, link user to course in Moodle via webservice
I need to create a link between a user and a course, I would like to do this using webservice. Moodle has native enrol_manual_enrol_users function for this purpose, which has as mandatory parameters…
-
3
votes1
answer354
viewsA: Different result between select, after applying SUM() and Grop By
When you define group by grupo You ask mysql to display your grouped results, that is, there will be only one return for each group type. And the SUM() sum the "duration" values of each of the items…
-
3
votes1
answer1829
viewsQ: Export Mysql database to Sqlite
I usually use a database in the applications I develop locally. With the mysql whenever I need to work clone the application to another machine, I need to generate a dump bank and import at local…
-
6
votes2
answers1688
views -
7
votes2
answers2432
viewsA: How to create a Date list with a specific day
You can use the Addmonths(), various languages have a method similar to that implemented. Follow the example using as a basis the current date, and incrementing two months to it: DateTime now =…
-
1
votes1
answer591
viewsA: Difficulty with installing the W3 Total Cache compressor YUI
If you are a Ubuntu server you could use apt-get itself to do the installation Ubuntu: sudo apt-get install yui-compressor In another reference I found, the jar file was copied to the folder…
-
0
votes4
answers289
viewsA: How do I send a "textbox" always to the right when it’s in focus?
Elements html have triggers that are fired through events. In the element of your form where the monetary value will be inserted, you can configure an action to be executed every time the contents…
-
1
votes1
answer207
viewsA: How do I get a list of all actions from all controllers, including plugins?
Try to use Configure::listObjects(); Here’s a example.
-
12
votes1
answer3924
viewsA: How do I start a skype call from a browser action?
Use the Skype URI Instead of the url you pass a command that will be understood by the browser as executing an instruction in an external application <a…
-
10
votes6
answers98339
viewsA: How do I undo the last commit in Git?
After fixing the files run a git add and then do: git commit --amend Actually this command will redo the last commit
-
5
votes3
answers799
viewsA: Floats module in PHP returns integers?
This operator only works with integers There’s a comment on that link lembando this. Note that the % operator (module) only works with integers (between -214748348 and 2147483647)... Try using…
-
6
votes2
answers3325
viewsA: What would be real cases of use of functional programming in the world . NET (F#)?
From what I understand of the language, its use would be something similar to Matlab. And it would be used where you need to perform complex mathematical calculations. On the very link you passed on…
-
3
votes2
answers1646
viewsQ: Error creating new user in Moodle via webservice
I have been trying to add a new user to Moodle using your webservice api I have already modified several times the parameters passed via post, tested using an array instead of an object, tested some…
-
17
votes3
answers14753
viewsA: How do I remove a folder from Git’s history?
It needs tests, but in this link the following command is mentioned to permanently remove files from history: git filter-branch --index-filter "git rm -rf --cached --ignore-unmatch nome_do_arquivo"…
-
1
votes2
answers364
viewsA: HTML zebra table with Ext JS
I imagine there are more elegant ways, using a table, or a grid, but in case you are generating the list through a for/foreach, you can for ($i=0;$row[$i];$i++){ if ($i % 2 != 0){//estou apenas…
-
28
votes4
answers15336
viewsQ: In Git, how do I edit the description of a commit already made?
In case you need to change the description of a commit, to make the description clearer, or to specify which Issue he is bound. I would like to know how to edit the message that accompanies the…
-
2
votes6
answers28585
viewsA: How to get Timestamp in Javascript?
You can use new Date().getTime();
-
4
votes2
answers29844
viewsQ: How to submit a POST request to a REST API in PHP?
I consider it quite simple to execute a GET request, normally I use: //$serverurl contem a url da api para a função desejada try { $cursos = file_get_contents($serverurl); } catch (Exception $e) { }…
-
3
votes1
answer2169
viewsA: Problems with slowness Delphi and Firedac
In that link, There was one person with the same problem. The solution found, apparently, was to exchange the OS version for a version of Windows for server (2008 and 2003). Perhaps what caused your…
-
2
votes3
answers716
viewsA: Django: How to group records using the YEAR from a Fielddate field?
In general, when I want to return something like this, I perform a select with GROUP BY in the field I need. Something like: SELECT ano FROM registros GROUP BY ano These resources for building…
-
60
votes7
answers8794
viewsQ: How to Convert Mysql Database?
In the development of a web portal, using the git we made the control of everything that was changed at code level in the approval environment and with the Jenkins We moved the site to the…
-
10
votes1
answer496
viewsQ: Integration between Alfresco and Liferay to use Alfresco as a document library
I have the need to create a public interface that allows access and download of files available in Alfresco Share. I’ve been trying to do this using the existing integration between Alfresco and…
-
8
votes5
answers2401
views