Most voted questions
150,413 questions
Sort by count of
-
4
votes2
answers606
viewsView Listview with available networks
I’m trying to popular a ListView with List returned by method getScanResults() class WifiManager. However, I would not like to have to go through this list, after all, all the information I need is…
-
4
votes4
answers491
viewsHow to get the name of the property to which a lambda expression refers?
I have a lambda expression being translated into an expression tree (Expression Tree) as follows: Expression<Func<object>> expr = () => x.NomeDaPropriedade; How do I get the name of…
-
4
votes2
answers747
viewsEF6 Code First Relation between entities
I am trying to create a Condominium data model in ASP.NET with SQL Server. I stumbled on the creation of the interface proprietario(1) with the fracao(many). The error returned is: The INSERT…
-
4
votes2
answers1593
viewsChecking empty column with CASE in Mysql
I’m having a hard time making a query in a customer table. I need to find two columns (nomeCli and nomeFantasiaCli) and turn them into one: Nome. In short, when the client’s name is not filled in…
-
4
votes10
answers29077
viewsScroll through an Array and check if any element is empty
Is there a native PHP function to traverse a array and check if any element of this array is empty null? Observe the code below: if(isset($_POST['btnCriaModelo'])){ $instArray =…
-
4
votes1
answer2094
viewsHow do I set up Netbeans to work with Phpunit in a virtualized environment?
I use Netbeans 7.4 for programming on my Mac. And to not have to install PHP and Phpunit, I would like to run Phpunit installed on a virtual machine that has an entire integration environment…
-
4
votes2
answers7390
viewsHow to save JSON file with Node.js
I want to make a website to test some things. The site is running on my home server done with Wamp. I was told that I could make a small database using JSON files. I have a JSON file in the website…
-
4
votes3
answers3146
viewsError when performing a database query
I’m using Zend and have the following function: public function getChamado($id) { try { $cols = array( 'id', 'titulo', 'descricao', 'fk_status', 'fk_local', 'fk_tipo', 'created', 'modified',…
-
4
votes2
answers4076
viewsView saved PDF file in a Mysql database
I have a field in a table where I place the PDF file. The type of this field is BLOB. I wanted to know how to display this file on a PHP page, without having to create a directory. I just want the…
-
4
votes2
answers2443
viewsT-SQL with case sensitive like
Is it possible to make a query in SQL Server 2008 with sensitive like? Actually, I’m looking in a column with a list of acronyms, which represent system flags, which differentiate uppercase and…
-
4
votes4
answers1341
viewsAn algorithm for finding repeated files?
I need to make a program that finds repeated files on my computer, so that the user decides what action to take with these files (e.g.: delete the copies). For now, I only care about a binary file…
-
4
votes2
answers334
viewsLoop to perform calculation in C Pagerank
Using the starting notes 0.15 for all and then add note as explained in the article http://cmup.fc.up.pt/cmup/mecs/googlePR.pdf If we consider pages 1, 2 and 3 to be: 1: link1 2: link2 3: link3…
-
4
votes5
answers6040
viewsWhat tool to use to convert a visually developed UML to code?
I need an Eclipse tool/plugin that allows me to develop diagrams of classes, activities and sequence in UML and that manages the code. I usually use Eclipse with Omondo plugin, but it seems to be…
-
4
votes2
answers546
viewsRuby Bematech integration (or similar)
Has anyone ever done a Ruby integration with a Bematech printer or other such ? What Gems or ways to print on a tax printer ?
-
4
votes3
answers1877
views -
4
votes2
answers6542
viewsCurrency mask problem in input
I have a problem with the coin mask with Angularjs. I found this thread in Stackoverflow in English. The mask works beauty by typing in input and arrives right in the controller, but when I send…
-
4
votes3
answers2416
viewsUse or not use bar at the end of a URL?
Whenever I will create a new website and think about the .htaccess me hit that question: force or not force the use of bar at the end of the URL. For example: http://meusite.com would be…
-
4
votes3
answers273
viewsHow to implement Std::to_string for floating point?
This question may seem more like a request, but I’ve been researching it for 2 months and I don’t know how to solve it. I need to implement the std::to_string in C++ (headless) in a way that accepts…
-
4
votes2
answers246
viewsSwitch TAB indentation to spaces in Vim
I have a project where some files are indented with tab and others with 4 spaces. Is there any way in Vim to reindentate all files for 4 spaces?
-
4
votes2
answers1204
viewsFixed column of a Jtable in a Jscrollpane
How do I leave a fixed Jtable column (no scroll) inside a Jscrollpane? I want to leave the first column of a fixed table, the scroll bar will only scroll from the second column onwards, the first…
-
4
votes1
answer668
viewsPick up mouse position on virtual machines
I’m having a problem getting the mouse position in a virtual machine. I have a macro program on a virtual machine that performs a series of loop actions, but it can happen from the catch action and…
-
4
votes2
answers299
viewsDebug associated events via jQuery
When I want to debug an event associated with an element via jQuery, I can currently do it in the following ways: in Chrome, you can enable the debugger specifically for certain types of events.…
-
4
votes2
answers564
viewsjqGrid does not call the blockUI method without using window.setTimeOut when ajax request fails
I’m using jqGrid 4.54 in my project and I want to put a message blocking the whole screen with the plugin blockUI when my AJAX request encounters some server error like 500 error. I know that the…
-
4
votes3
answers731
viewsProblem with function call in Cakephp
I have this in the Passage.php model: <?php class Passagem extends AppModel { public $name = 'Passagem'; }?> And this in Passagenscontroller.php: <?php class PassagensController extends…
-
4
votes1
answer523
viewsApply CSS property "content" without resorting to style sheet
I have a web-site that is available in several languages, and not having to redo the whole structure of an image slider, there is a small text that is currently being applied through the selector…
-
4
votes2
answers1746
viewsLarge figure disturbs the positioning of other
In a Latex report I’m writing, I’m trying to insert a large figure at the beginning of the chapter. It’s a page-sized flowchart: \begin{figure}[!htb] \centering…
-
4
votes3
answers4238
viewsHow to find the internal IP?
I’m looking for a solution to know the ip engine. The idea is that through a website, when the user accesses it, know which the ip inside of him, and then looking for everyone else ip's, and find…
-
4
votes2
answers1232
viewsDifferences when instantiating a class
Using the PHP when instantiating an object I do it as follows: $obj = NEW my_class_exemplo; but always the netbeans auto complete gives me the option to put parentheses like this: $obj = NEW…
-
4
votes2
answers379
viewsTomcat only reads Log4j.properties when restarted
Until recently I made file changes log4j.properties (ex: change the level of the Testemb class) and simply redeploy the application. Now, the changes only take effect when I restart Tomcat. I wonder…
-
4
votes1
answer429
viewsAdd "thead" to a table created with createelement
I have the following code, which creates a table, using createElement(): var context = document.createElement('table'); var row; context.className = 'table'; row = context.insertRow();…
-
4
votes1
answer109
viewsIncorrect form method generated by Cakephp 2.4
My problem occurs with the following code: <?php echo $this->Form->create( 'Page', array( 'url' => array( 'controller' => 'pages', 'action' => 'delete',…
-
4
votes1
answer260
viewsError compiling php 5.3.28 using php-build
I am trying to install PHP 5.3.28 using 'php-build' in Linux Mint 16 (Ubuntu) but it does not compile. I’m using the following command: php-build -i Development 5.3.28 ~/local/php/5.3.28 After…
-
4
votes2
answers2870
viewsShould I adopt the naming standard of my framework or team legacy?
Here in the company, everyone follows a pattern in the projects: All tables should be named in the singular. Examples: "user", "event", "category". And also: The main Primary key is named like this:…
databaseasked 10 years, 10 months ago Calebe Oliveira 4,527 -
4
votes1
answer1360
viewsPeriod filtering in data type inputs
I have a system where I own a <input type="date"> and need to filter it, to bring on the calendar only the dates of 3 months ago and the current month I was using the attributes min and max…
-
4
votes1
answer58
viewsHow to update the value of a column by substituting in all rows of the table?
I have a table i18n in the database whose column constant contains all values with prefix lang: Description of the table…
-
4
votes2
answers2405
viewsPaging inside modal window in bootstrap
I have a modal window in bootstrap, and inside it a pagination, it happens that every time I click on some pagination link, the modal closes. Does anyone know how I keep the modal open? jQuery:…
-
4
votes3
answers1374
viewsShould I use routes or controllers in Laravel 4?
I’m a beginner in Laravel and I have doubts about the use of controllers, I read several examples/ tutorials and see the vast majority use the routes for example for a form request, to display…
-
4
votes3
answers1778
viewsHow to select rows from table A that are referenced in a column of table B?
I am trying to execute a database query to collect all rows in table A referenced in a column of table B: Query I am running -- Consulta a recolher da tabela A as linhas com ID referenciado na…
-
4
votes3
answers249
viewsHow can I manipulate a PSD file to get the position of the layers?
I am working on a project where we have a file . psd (Photoshop) called "sprites" that contains all the icons of the site. I would like to get the positions of each layer to automatically generate a…
-
4
votes1
answer265
viewsHow do I calculate the size of the tag source in a tag cloud?
I have a cloud of tags and want to change the font size of each tag as you use them. I need to have a minimum size and a maximum size. What would be the formula to calculate tag size?…
-
4
votes1
answer1798
viewsHow to make paging in Codeigniter using AJAX?
I’m having trouble finding a way to paginate using AJAX. I’m used to doing it the traditional way and directly with the server using Codeigniter as framework application. However, this time I need…
-
4
votes4
answers1488
viewsHow to close a dropdown if the user clicks another page location?
What is the best method to hide a div, that is fulfilling the role of dropdown, when the user clicks on another page location? At first, I value solutions cross-browser and without the use of…
-
4
votes2
answers670
viewsWhat is the equivalent of Usercontrol in ASP.NET MVC?
In Web Forms we have UserControl. These controls have a code-Behind and a layout. They can be used in different projects/solutions without depending on other things. I want to create a control that…
-
4
votes3
answers157
viewsRefactoring function to collect constants with a certain prefix
I have a function that aims to locate and group in a matrix the constants that are declared corresponding to a certain prefix: Function: function get_constantsByPrefix($prefix) { foreach…
-
4
votes2
answers3535
viewsDisplaying authenticated user data in the view
I have a problem that I believe is quite simple... I need to display the username logged in to my views... how do I do that? this is one of the views @extends('layouts.template') @section('body')…
-
4
votes2
answers830
viewsWhat is the most efficient way to calculate the Hashcode of an object in Javascript?
I’m currently using Object.prototype.GetHashCode = function () { var s = this instanceof Object ? JSON.stringify(this) : this.toString(); var hash = 0; if (s.length === 0) return hash; for (var i =…
-
4
votes2
answers29844
viewsHow 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) { }…
-
4
votes1
answer164
viewsHow to add a class to multiple cached elements at once?
In jQuery, we can add CSS classes to multiple elements, but with the element already cached in a variable, as we can perform the same operation? Example: // adicionar classe a ambos os elementos…
-
4
votes2
answers313
viewsDatabase on does not reflect changes in the same Activity
I am trying to update the database in my application. Trying to simulate a possible error in production intentionally I give a DROP in a table, and soon after I do a SELECT in the same table and…
-
4
votes1
answer1407
viewsHow to return via PHP several JSON messages, each of which is fired at different times?
I am building a system and at a certain stage it saves 3 sets of information filled in the form by the system operator: Set 1: student information; Set 2: student guarantor information; Set 3:…