Most voted questions
150,413 questions
Sort by count of
-
11
votes1
answer1604
viewsHow to concatenate an SQL command into a Mysql Stored Procedure?
In the following show, we have an example already running in PHP. The scenario of the question is the assembly of a "navigation link" based on a data structure. $node = '006002009'; // Esta…
-
11
votes2
answers4415
viewsWhat is "granularity level" and how to identify it?
In the book Design Standards - Reusable object-oriented software solutions by Erich Gamma, in the first chapter introduction we have the following text: "Designing object-oriented software is…
-
11
votes1
answer259
viewsSecurity in Domain driven design
On a DDD architecture, what layer does security (access control) implement? What would the structure look like?
dddasked 9 years, 7 months ago Rodrigo De Freitas Oliveira 109 -
11
votes2
answers811
viewsHTML5 form validation
I am making a validation form using HTML5 and its own tags to validate the fields. I am using the PATTERN, that limits the character type. But it doesn’t work... Fields are not being locked. "Code",…
-
11
votes2
answers277
viewsHow do I use the jsondiffpatch library?
I’m having doubts about how to manipulate the data with the library jsondiffpatch The array original: [ {"id":1004,"idproduto":3,"forma":"Alface","preco":1,"quantidade":1},…
-
11
votes1
answer172
viewsDifficulties with selecting items in a Qtreeview
Setting: I have an application that manages a list of images of human faces with prototypical emotional expressions. I created a class inherited from QAbstractListModel to provide the model (model)…
-
11
votes2
answers791
viewsWhat are the advantages and disadvantages of declaring constants as an array?
I found way too this new Feature of PHP 5.6. It is now possible to define a array for the value of a constant. Look how cool: const BR_DATES = [ 1 => 'Janeiro', 2 => 'Fevereiro', 3 =>…
-
11
votes2
answers437
viewsIs declaring a class named after a reserved word a good idea?
Generally, when we define names for class and functions, there is a concern when colliding with the palavras-chaves of language. The curious thing is that I noticed that in PHP it is allowed to…
-
11
votes1
answer2038
viewsPlace text side by side
I don’t know if it’s possible, but I wonder if I can put a text divided into two columns?
-
11
votes2
answers1824
viewsIs there a difference between strtr and str_replace?
I was analyzing the way functions behave strtr and str_replace And I noticed that, at first glance, they both seem to do exactly the same thing. Example: $translators = [ 'da hora' => 'bacana',…
-
11
votes3
answers828
viewsHow do I generate a hash in the client-side?
I’m researching ways to create a login system with a secure encryption that doesn’t weigh down the server. Taking as an example that answer I am searching for a way to make client-side encryption,…
-
11
votes1
answer10368
viewsHow to use facebook API?
I have a PHP application, in which I need to log into Facebook and count the number of Ikes in a given post or page. I would like to know how to incorporate this into my application. I’ve heard that…
-
11
votes1
answer786
viewsBuild a "3D" building with HTML, CSS and JS
How can I play the image below using HTML, CSS and JS (maybe images)? The "floor" numbers are unpredictable and each "floor" should be "clickable", a <a href="#"></a>, or something like…
-
11
votes2
answers992
viewsVoice link between two points
I would like to study about, read how it is done and all possible details about making voice calls between two points A and B Similar works these links between users like Viber, Whatsapp, facebook…
-
11
votes3
answers483
viewsIs it Unviable to use Domain-Driven Design working alone?
I have studied a lot about DDD and I am with this doubt that has been bothering me since I started reading about "Strategic design". I work with programming since 2009 and most of the time I have…
-
11
votes3
answers15464
viewsFor increment in Python
I learned that in the Python, to make a loop with for, from 1 to 10, we use the range. Sort of like this: for i in range(1, 10): print(i) Generally, in other languages, when we require a simple…
-
11
votes1
answer4164
viewsGet source code from Google Chrome extension page
You can create an extension for Chrome that takes either the source code of the page or the entire text (Ctrl + To, Ctrl + C), to submit this to an external website (for data mining) and return the…
-
11
votes4
answers634
viewsJPA List<Map mapping.. >
I have the following problem and I would like some advice on the best approach: Let’s assume you have a system that manages a school and would like to have the option for the system administrator in…
-
11
votes1
answer58531
viewsRemove accents from a php string
I’m having problems with the accents in my code and I wanted to remove the accents when they did the research, Ex: Search: Hello | Hello. When doing a Music search on the site it returns the url…
-
11
votes1
answer360
viewsHow to get information from a . CPL?
I wanted to make a program that would display all the items on the control panel. For this I need to consult some registry keys, but there are programs that still use cpl files to store the…
-
11
votes2
answers262
viewsHow to parse syntactically malformed HTML?
As part of a procedure, I need to extract the contents of a table present on a page. I’m using Curl to get the raw HTML data and the Simple HTML DOM Parser to parse and process HTML. <?php //…
-
11
votes2
answers930
viewsError "invalid input '.. 'in utf8towcs" with "read.csv"
I have a database on . csv that gathers posts from both Facebook and Twitter. For the reading of the bank in R, the code I have used is bancodedados <- read.csv("nomedobanco.csv", sep=";",…
-
11
votes2
answers2240
viewsHow does C99 work in relation to C90 for declaring variables in the middle of the code?
At C90 and C89 we have to loop for must have its variable declared earlier at the beginning of the function scope, example: void main (void) { int i; for(i = 0; i < 10; i++) { /* Qualquer coisa…
-
11
votes3
answers1593
viewsFunction as parameter in jQuery functions
I always used some functions without really understanding what was happening and where such parameters came from. I speak of the following: Example 1: $("#link").on("click", function(event){…
-
11
votes1
answer573
viewsDispersion graph with marginal histograms
I wonder if there is a way to make a chart similar to this in the R: It is possible to make a dispersion Plot and to the side or below, as it presents the image, place the histogram representing the…
-
11
votes2
answers1232
viewsUsing Java together with C
I am working on a micro controller project. My source is all in C however I would like to interact with this program using Java. Would that be possible? For example: The C program executes…
-
11
votes2
answers210
viewsHow to detect USB connection via application?
It is possible to detect a USB connection in my Android application and how to do this? I have a sync menu that is performed via USB and FTP, however I want to make the USB option accessible only…
-
11
votes2
answers2109
viewsHow to advertise server IP on the network?
I am developing an application composed of a server NodeJS which shall provide data in JSON for customers, in case an application for Android, all running on internal network. I have already managed…
-
11
votes3
answers546
viewsSimulate placeholder in IE8
I was reading the documentation here and it seems that the attribute placeholder does not work in IE8. Would have some way to simulate the placeholder that you use? Example of HTML not working in…
-
11
votes1
answer1783
views -
11
votes1
answer800
viewsBuild complex Lambda Expression
I’m trying to build a Lambda Expression that’s a little complex and I’m having difficulties. The goal is this expression: items = items.Where(x => sValues.Any(y => x.Contract_Rates.Select(z…
-
11
votes1
answer603
viewsVariable within a class pointer
I have several header files with GUI management functions that I’ve done to create windows, similar to those libraries like GTK, QT and others, and I’m turning them into library, but I’m having a…
-
11
votes4
answers15696
viewsHow to extract digits from a Python string and add them together?
I need to decompose one string in Python, separating letter and numbers, and summing these numbers. For example: string = "96h11k" Of that string need to extract the numbers 9, 6, 1, 1 and add them:…
-
11
votes5
answers22737
viewsHow to turn the output of a command into a variable in CMD?
Hello, since I started researching about these commands of CMD, this doubt about how to turn the output of a command into a variable has been the one that took me the most time. I saw a lot of codes…
-
11
votes3
answers238
viewsPrevent an action from being intercepted by the Interceptor Handle
I implemented a class to intercept some urls and check if I have a logged-in user in the session, if yes access url, otherwise I am automatically "played" to the login screen. It happens that on a…
-
11
votes4
answers584
viewsHow to verify the efficiency of these 2 functions in C++?
How to determine the best choice between these two functions for implementation? 1: int X(int x){ if(x<=0) return 0; return(x + X(x-1)); } 2: int Y(int x){ int soma=0; for(int i=0;i<=x;++i)…
-
11
votes2
answers11484
viewsHow to make a dynamic form?
I implemented a script that dynamically adds fields to a form, in this case a form to add products and their amount. The code is here: http://jsfiddle.net/3Lzcn7dc/ I find this code very…
-
11
votes3
answers10308
viewsHow to calculate direct treasure custody fee
Consider the following investment: Capital inicial (C) = 1000,00 reais Juros (J) = 12% ao ano Período (n) = 8 anos Taxa de Custódia (TC) = 3% ao ano The custody fee (TC) is a fee charged annually on…
-
11
votes3
answers31819
viewsRandom number range in C
In a certain program, I need to generate a random value greater than 1000 (with a limit set by me to up to 5000 (maybe it’s still too high)). This unique code refers to a type of registration to be…
-
11
votes1
answer4766
viewsWhat’s the difference in Refresh, Update, Repaint, Invalidate and Application.Processmessages methods?
What is the difference between the methods: Refresh, tcontrol; Update, tcontrol; Repaint, also deTControl; and, Invalidate, also of Tcontrol; Beyond the Application.Processmessages?…
delphiasked 10 years ago user8052 -
11
votes10
answers360
viewsOrganization of CSS
Is there a pattern for organizing CSS? For example: .teste{font-family:"arial";font-size:18px;color:white} or .teste{ font-family:"arial"; font-size:18px; color:white } Which is the most…
-
11
votes3
answers3977
views -
11
votes12
answers5446
viewsHow to remove accent in upload with php?
Part of the file is working. The problem is that when I send a file with accent. Example: send a file with the name ação-íaaa.jpg it looks like this on the server ação-Ãaaa.jpg. So I wanted to…
-
11
votes3
answers9405
viewsHow to convert a Mysql connection to Mysqli?
I decided to listen to some users to make the conversion but I need your help because I have done a lot of research and nothing works. The first file is: <?php…
-
11
votes1
answer266
viewsHow to create Needles chart in R?
I am trying to make a chart of Needles suggested in the Matter of Non-parametric Methods in the study of Histograms. I found a command called rug(), but it seems that the idea is not that.…
-
11
votes1
answer28571
viewsEnable . htaccess in Ubuntu
I’m using the Ubuntu system on my PC and my apache doesn’t seem to recognize htaccess, none, because I created one. htaccess to my project only that it does not interpret what is in the content. The…
-
11
votes4
answers317
viewsWhy are maps "faster" than arrays?
I have always read and heard that maps are much faster than search arrays. Until I decided to see how much and did a jsperf: http://jsperf.com/maps-vs-arrays/ What I’d like to do is understand which…
-
11
votes2
answers7980
viewsWhat’s that "Mr-only" Bootstrap Twitter thing for?
Studying the documentation I was left with doubts: for what really serves the class sr-only of bootstrap?…
-
11
votes6
answers57963
viewsHow to convert UTF-8 characters in PHP
In my web application, I am using a Mysql database that has the table EditableContent. This table has the field content, who’s kind text and has as input format utf8-bin. In the database the…
-
11
votes3
answers14892
viewsfunction $.Ajax() return value?
that is the code: var res = VerFileRepetidoBancoAjax( "teste" ); console.log("res="+res); function VerFileRepetidoBancoAjax( str ){ $.ajax({ url: "caminho.", type: "get", dataType:"json", data:…