Most voted questions
150,413 questions
Sort by count of
-
4
votes1
answer193
viewsHow to create snippets for __Construct?
I use Codeintel for PHP, but when I try to create the __construct I have to do everything manual. Someone knows how to develop the snippet to create the same or have a plugin own?…
sublime-textasked 9 years, 8 months ago Fernando 63 -
4
votes2
answers1301
viewsHow to format datetime in YYYY-MM-Ddthh:mm:ss.sTZD format in Django/Python?
I’m having a hard time in Django returning the datetime in the local Timezone. No Django configurei USE_TZ=True and TIME_ZONE = 'America/Sao_Paulo' By calling timezone.now(), returns the datetime…
-
4
votes2
answers21222
viewsSimple record editing with PHP+Mysql
Basically the three scripts should edit a record in the Database: php records.: <?php // Aqui você se conecta ao banco $mysqli = new mysqli('127.0.0.1', 'root', '', 'login'); // Executa uma…
-
4
votes1
answer251
viewsReturn multiple attributes using XPATH
How can I return multiple attributes using the xpath language? For example this xml: <utilizador> <nome>Rui</nome> <contacto>91xxxxxxx</contacto>…
-
4
votes2
answers4875
viewsCreate Editable Table
I would like to create a table where your cells can be edited but meet certain requirements. What I have is this: HTML <table class="table table-striped table-bordered" id="vendaTabela"…
-
4
votes1
answer885
viewsApply mask to dynamic fields generated after page onload
I am using a directive for Mask in monetary field, the work is performed on the screen the problem is when I insert a new item ng-repeat inserts new fields without the Mask, I reference the class…
-
4
votes1
answer82
views"stdin is not a terminal" when I run Envoy - Laravel 4.2
A month ago everything is working fine, until I went to deploy a project and... When you execute the command envoy run deploy, using the settings below... @servers([ 'mt' => '[email protected]'…
-
4
votes1
answer537
viewsHow to work with associative table with additional attributes in REST?
Imagine you have 3 entities: Student, Discipline and Alunodiscipline. The entity AlunoDisciplina , in addition to relating the Aluno with the Disciplina, also includes other information, such as the…
-
4
votes1
answer1026
viewsProblems with chat sockets with NO-IP host
Well, first of all, I’ve searched a lot of sites, including here, how to do this. I tested codes and modified but still, I kept getting errors. The problem is the sockets to make the connection. I…
-
4
votes2
answers755
viewsNormalization of Mysql tables
I’m creating a system for employee registration, but I’d like to start in a standard way; tb_funcionario (id_func, id_funcao, id_depto, nome_func, data_nasc, end_fun, dt_admissao, dt_demissao)…
-
4
votes1
answer36
viewsA constant eventListener, or almost that
I was always in doubt when to this, because I remember that I took my test with ajax, and every time I updated, I lost the registered event. Example: A list of names <script>…
-
4
votes1
answer89
views"ob_gzhandler" on the same server not always supported
On the same hosting server, some accounts support ob_gzhandler and send the compression page to the browser: /* Sending gz-encoded data to web browsers * that support compressed web pages */…
-
4
votes1
answer693
viewsWhat are the ways of data storage in the browser?
I need to store information in JSON format directly in the browser, I’ve heard of localStorage HTML5 however it has storage limits that I would like to extend if possible if there are no…
html5asked 9 years, 8 months ago Gabriel Henrique 375 -
4
votes1
answer65
viewsWhy can traits have methods called directly when they are static?
I just made a question about Traits and another question came to me. If the Traits are mechanisms that facilitate the import of methods, due to the limitations of an inheritance in PHP, because…
-
4
votes1
answer5879
viewsRecursive query
I need to mount a recursive query to solve a simple problem, but I’m having a little trouble. I have a table called TABELA1 with the following fields (ID, IDPAI, NOME) I will put here some examples…
-
4
votes2
answers3760
viewsCalculation of the multiple of 10 greater than or equal to a value
use module 10; Example: 7 4 8 9 3 1 0 7 2 <== Dados x x x x x x x x x 2 1 2 1 2 1 2 1 2 <== Peso = = = = = = = = = 14 4 16 9 6 1 0 7 4 <= Resultado 1+4=5 1+6=7 //resultado da multiplicação,…
c#asked 9 years, 8 months ago Fabrício Mendes 843 -
4
votes3
answers2928
viewsHow to replace in html string only in texts within (between) tags?
I created a search that marks the text that was found. OBS 1: The search is done in a string that is HTML. OBS 2: I check if there is text inside this HTML through the index. OBS 3: If you find one…
-
4
votes1
answer831
viewsCalling JS function inside modal
I have an event where a modal is displayed, in it I want to call a function validateEmail but I can’t. validateEmail: function(email) { var re =…
-
4
votes1
answer212
viewsHow to name the foreign key in the Entity framework
public class Lancamento { // Colunas e métodos omitidos [Column("IdContaBancaria")] public virtual ContaBancaria ContaBancaria { get; set; } } public class ContaBancaria { [Key] // PK…
c#asked 9 years, 8 months ago filipecampos 75 -
4
votes1
answer124
viewsIs it recommended to use prototype on native objects?
I think it’s great to have my own methods imported into the Javascript native objects. For example: String.prototype.hello = function(){ return this.toString() + ' hello'; } 'Say '.hello() // say…
-
4
votes1
answer372
viewsHow does Xcache really work?
How really the XCache works with PHP? It is necessary to use the functions of XCache to be able to use your "advantages"? For example: <?php echo xcache_inc('count'); ?> Or from the moment I…
-
4
votes4
answers4234
viewsConvert Mysql date (YYYY/mm/dd h:m:s) to dd/mm/yyyy
Check out my database: I’m using the following code: <?php $data = $noticia->data_cadastro; setlocale(LC_ALL, "pt_BR", "pt_BR.iso-8859-1", "pt_BR.utf-8", "portuguese");…
-
4
votes1
answer1817
viewsHow to check the status of Paypal transactions by URL
Is there any way to return information from a transaction via id transaction in Paypal? Example (API Pagseguro):…
-
4
votes4
answers20361
viewsAndroid Studio emulator with AMD processor
I’m trying to start developing apps for Android, but unfortunately I’m having some problems using the Android Studio emulator when it comes to testing the app. Basically while trying to run I get…
-
4
votes2
answers257
viewsParameter check on MVC
In the MVC Standard, the Model is responsible for the business layer, in it will be the business rules and validations. I have a question about the following. A method in the controller that takes…
-
4
votes2
answers1027
viewsStream video mms or rtsp:// on android
I’m looking for some lib to play video stream in the format mms://..., I’ve tried with Videoview but says it does not support this format(Windows media player), looking for apps (in google play)…
-
4
votes1
answer517
viewsInsert "Watermark" on video at time of upload
At the moment I upload simple videos with basic php. I don’t use very complex code, I’m only in the basics! And this basics is practically the following: $mp4 = $_FILES['mp4']; $mpname =…
phpasked 9 years, 8 months ago ivan veloso 2,900 -
4
votes2
answers10740
viewssimple array arrays for json_encode
I need to create a json document, with the following structure: [ { "Name": "Lacy", "Email": "[email protected]" }, { "Name": "Chancellor", "Email": "[email protected]" }] Currently,…
-
4
votes1
answer130
viewsHow do I save read-only data? Should I use Sqlite in this case?
I’m developing an app (a widget actually) that shows some sentences in home user. I have about 1000 sentences of approximately 150 characters, how will I store it? In this case the use of DB is…
-
4
votes2
answers201
viewsProcessing of data output from PHP database
In many cases we have data in the database that is not in the format we want them to be shown. As an example, let’s say I have a table called users and in this table a field called role which will…
-
4
votes1
answer245
viewsHow to create a page numerator?
I am developing a page "News" with several news, and it will be displayed only 9 news per page, above that, should go to page 2 and so on... how do I do this?…
-
4
votes1
answer208
viewsHow to send Email with HTML formatting to Windows Phone C#
Hello, Visual Studio 2012 has Emailcomposetask Object, but it does not have HTML formatting, I would like to know how to send emails via Windows Phone with HTML Formatting.
-
4
votes2
answers187
viewsJava PDF Report Error
I have a little java program for PDF reporting. The problem is that every time I send the PDF via Email, it opens the PDF on the screen. Where can I change, so it doesn’t open on the screen when…
-
4
votes1
answer2380
viewsDoubt the $group mongodb
I need to use the grouping operator $group of mongodb, but every explanation I find is very confusing. How this works and what is the benefit of using this operator?
-
4
votes0
answers58
viewsWhy do numbers(long, int) starting with 0 end up having other values?
I was doing some tests on a phone number formatter when I tried this entry for a long: 033222221111L, compiled normally (Yes, in the real world it would not make sense an entry like this, if it is a…
javaasked 9 years, 8 months ago Fernando Leal 9,770 -
4
votes4
answers869
viewsHow to install Wordpress Multisite?
I am using the option of multi-sites Wordpress, but is not working as expected. I have enabled and created the subdomains, but returns: Not Found The requested URL /index.php was not found on this…
-
4
votes2
answers304
viewsHow to store the Selecteditem value from Dropdownlist in the database?
I want to register a client and one of his attributes is sex Database: the sex attribute is a nvarchar ASP.NET: I am working with a listview to enter client data <asp:SqlDataSource ID="clientes"…
-
4
votes1
answer2519
viewsGet window width and height
I wanted to get the width and height of the window, so that if my page is viewed in different resolutions, the window will be positioned. Because, with different resolutions, the page either gets…
javascriptasked 9 years, 8 months ago akm 3,387 -
4
votes1
answer663
viewsProblems installing the Ionic Framework
I am beginner with the framework Ionic and I’m having a problem trying to do the installation. Recently I had to format my computer and now I am not able to install the framework again. When I run…
-
4
votes1
answer2752
viewsError write failed: No space left on device
By reinstalling the Apache and PHP server on my machine I am getting this error: Warning: Unknown(): write failed: No space left on device (28) in Unknown on line 0 And if I try to run any session…
phpasked 9 years, 8 months ago Guilherme Nascimento 98,651 -
4
votes1
answer5730
viewsVertical Sidebar Menu using Bootstrap 3.3.2
My problem is replicating something similar to this. I’m having big problems solving this: http://ironsummitmedia.github.io/startbootstrap-sb-admin/ The difference is: no words. When I do Hover over…
-
4
votes2
answers1341
viewsFormat echo time number with 'k', 'kk', and so on
In various places on the internet it is possible to view formatting of numbers like "150k", "1kk". Most people know that 150k corresponds to 150,000 and 1kk corresponds to 1,000,000. EXAMPLE: This…
phpasked 9 years, 8 months ago ivan veloso 2,900 -
4
votes1
answer332
viewsRepeating structure in R
I’m not getting a logic to do the following problem in repetition structure: I have an A vector with 1 element and another B with 30 elements. I wanted to subtract vector A from each element of B so…
-
4
votes1
answer66
viewsWhat are and how the following statements work in Web Forms pages: <% %>, <%# %> and <%: %>
I don’t know what they are or what to call them. Are they tags, statements? What are they? In practice, I noticed some characteristics. <% %> This statement accepts executable code, but…
-
4
votes1
answer6287
viewsUnexpected 'use' (T_USE) error when using autoload
I have the following folder and file structure: -api -v1 -libs -Slim -Facebook -autoload.php -index.php -login.php Inside the "index.php" I do the include of "login.php": require_once 'login.php';…
-
4
votes0
answers196
viewsHow to modularize an app made in Sammy.js with Require.js or "module Pattern"?
I have an app (mobile app) written in Sammy.js with 4 routes. Each route has 40 to 70 lines of code and one evento bindado. Write everything down in one callback from app is turning into a beautiful…
-
4
votes1
answer321
viewsView database information securely
What kind of encryption should I use to encrypt a CPF in the database and then display that same CPF (decrypted) to the client in a secure manner?
-
4
votes1
answer2601
viewsHow to take data from a Select Mysqli and send newsletter
I’m trying to send a newsletter after a search in my database, it’s the first time I’m using the Mysqli extension and I’m having some difficulty going through the second WHILE and I believe it’s not…
phpasked 9 years, 8 months ago adventistapr 5,498 -
4
votes4
answers6834
viewsFind character in string
How to find the position of a given character, where the string has many of these characters in the same string, for example: find the 3rd letter X in the string Y. some way to accomplish this?…
-
4
votes2
answers3180
viewsParse error: syntax error, Unexpected ''
I want to print the value on the screen after the PHP result. public function iniciar() { $msg = ''; $oneclick = null; # login... $this->login(); if ($this->logado()) { $oneclick =…