Most voted questions
150,413 questions
Sort by count of
-
5
votes3
answers6817
viewsRecover Mysql Table
I reinstalled WAMP and did not export the database (.sql), but I have the files ". ibd" and ". frm". After the installation, I created a blank database and copied to the folder all the files ". ibd"…
-
5
votes1
answer450
viewsHow should I organize my controllers using the SOLID methodology?
I am currently developing a project and noticed that my controllers are responsible for more than one activity. Thinking about it I remembered about the Hangout of the Laravel Brazil Community about…
-
5
votes4
answers661
viewsHow do I execute a method at the end of each method in my class C#
He had a father class and another daughter and would like to perform a certain method, as an event, always at the end of each call of the method of the daughter classes. How can I do?
-
5
votes2
answers579
viewsPull PHP information via AJAX with jQuery in json format
I have a code in jQuery that performs the creation of a calendar that you can leave reminders on the date. The code is as follows: var calendar = $('#calendar').fullCalendar({ slotDuration:…
-
5
votes2
answers221
viewsWhat is the reason for using Dbmigration in Codefirst?
What is the goal of using Dbmigration when developing a project using Codefirst? Using it is a good practice, or is something that does not cause major impacts on the implementation and/or…
-
5
votes1
answer1137
viewsFind ID in a delimiter-separated ID column in Mysql
I use a table called chat and inside it has a whole structure for my chat script and I’m trying to create chat in groups, so far so good. However, within the table chat has a column called…
-
5
votes0
answers75
viewsWhy should we prefer composition over inheritance?
Since the popularization of object orientation in the 90’s I hear that composition should be preferred before creating hierarchy of types. But perhaps the most important concept of object…
oop inheritance software-engineering composition liskov-principleasked 10 years, 4 months ago Maniero 444,682 -
5
votes2
answers1589
viewsGenerate single color for each result
then. i have a system of comments anonymously in a project of mine that in place of the avatar it puts the abbreviation of the person’s name, for example: Vinicius Eduardo -> VE and I want to…
-
5
votes1
answer58
viewsmulti column adjust content
I’m taking the results from a survey and displaying in a div using column Count width:800px; -webkit-column-count: 3;-moz-column-count: 3;column-count: 3; but I need the column to be closed at the…
-
5
votes2
answers343
viewsRegex in Javascript: grouping
As input by the user I am expecting pairs of numbers separated by commas: // se for um par só 1-2 // se for mais de um par 1-2,3-4,5-6 I expect something like this to come out: [ [1, 2], [3, 4], [5,…
-
5
votes1
answer24335
viewsField date fills with current date automatically
How do I configure mysql in phpmyadmin so that when I insert a record the field data_lancamento automatically fill in the current date without me having to pass the date by php, someone knows? I saw…
-
5
votes1
answer197
viewsWhat is the difference between Hotdeploy and Publish, Start and with
When I add Tomcat to the eclipse some options appear to me : Start be Publish. How these relate to the hotdeploy?…
-
5
votes2
answers592
viewsHow to convert a Std::string to a Qstring?
I’m trying to make a simple dialog box display my name. See the code. Pessoa *p = new Pessoa("Ronald Araújo", "[email protected]", 23); QMessageBox msg;…
-
5
votes1
answer13641
viewsHow to insert word break into textarea in text inserted via jquery/javascript?
I have a textarea and would like to list some items in it one on each line. I am already inserting the text normally in the textarea and separating the items in commas currently: nomUgs =…
-
5
votes1
answer761
viewsWhat is the best way to read an XML in PHP and insert it into the Database?
I am reading XML files of about 50M of information (a hundred thousand records, could be more), and I have two classes implemented XML reading one DOM and another SAX. I’m having a problem in terms…
-
5
votes2
answers1137
viewsStandards for user authorization/permission
There are other standards for user authorization/permission other than the Role-based access control standard implemented by Microsoft for technologies. NET?
-
5
votes1
answer128
viewsRead tokens in infinite loop
I have a code that reads tokens a text. I’m using Visual Studio 2013 in an extensibility project. When reading the text through scanner and collect the tokens, the program enters an infinite loop:…
-
5
votes1
answer761
viewsHow to implement an update LOG with ASP.NET MVC?
I would like ideas on how to implement a generic update LOG in DB (Entity Framework 6+) that allows me to discover information such as: System X user at date Y changed name and date of birth (from,…
-
5
votes1
answer3362
viewsHow to create an empty block?
How do I create an 800px high EMPTY+TRANSPARENT block per 1000px width? And because the code below doesn’t work for that? html <div class="block"></div> css .block { height: 800px;…
-
5
votes1
answer894
viewsHow to put Wordpress bilingual?
I had to put a website (template developed by me) under CMS Wordpress in two languages, but the plugin qTranslate not enabled in my version. Is there any way to do it without plugins? Or maybe a…
-
5
votes1
answer152
viewsCalculate the time a car was parked
I’m reading a file parque.txt which contains the time a car has been in a car park of the type "9h00 10h30", this in each line. I was trying to get those hours on every block of char, in this case…
casked 10 years, 4 months ago Miguel Freitas 53 -
5
votes3
answers34998
viewsTimer in Python
I’m trying to make a timer that, after 10 seconds, prints a string. I tried to use the time.sleep() and it didn’t work. Example: def tempo(): #passados 10 segundos print "olá"…
-
5
votes2
answers1035
viewsCrop image with JS
Can you use the JCrop or some other library to crop image, but I set a default size? That can just move the square over the image? I tried to use the JCrop but the user is the one who defines the…
-
5
votes1
answer5113
viewsHow to add HTML dynamic code snippets with Javascript/jQuery
Usually when we want to list data on front-end using the tags of back-end<%= %> or others. The stalemate I’ve come across now was: "How to do this in jQuery?". To explain better, I am…
-
5
votes2
answers5176
viewsHow do I put an external source in my app?
I’m trying to put a custom font in my app, but I’m having too many mistakes. I’ve tried using Pixlui, I’ve tried several different codes and always error, or the application runs, but crash (app…
-
5
votes1
answer1009
viewsPromises as function return in Node.js
I am using the Sequelize.js. framework to perform queries in the database, the result of the function find returns an object with 3 methods: success, error and complete Ex.:…
-
5
votes2
answers1450
viewsSend Model Razor with $Ajax Serialized Controller
I’m trying to send an object to controller, using ajax. The object goes to the controller with Json, but recognizes only the values of get, not post. $.ajax({ type: "POST", url:…
-
5
votes4
answers354
viewsQuery about parameters and function call
I created a Javascript function that when run creates a tag <script> in <head> that loads an external Javascript file. I want to make sure that after this tag is created, a second…
javascriptasked 10 years, 4 months ago José Neto 51 -
5
votes1
answer2843
viewsSublime problem to run python code
In giving CRTL+B in sublime 2, to run my code in python, appears this error message, someone knows what is? Decode error - output not utf-8] [cmd: [u'python', u'-u',…
python python-3.x sublime-text sublime-text-2 sublimereplasked 10 years, 4 months ago Leonardo Villela 53 -
5
votes2
answers188
viewsC# Difference between Beginaccept and Acceptasync
What is the difference between the two asynchronous forms? Which has better performance handling sockets and handling thousands of connection simultaneously? Example for Beginxxx:…
-
5
votes2
answers772
viewsHow to search for a device on an internal network using Javascript and/or Node js
I’m creating an application that uses Websocket to connect two devices to an internal network, but for that to be done, it is necessary for the user to enter the address of the Node js server in a…
-
5
votes2
answers683
viewsUse or not use CSS/JS within PHP?
Using CSS/JS inside PHP, is there a difference if used in an external file for example? Many pages have CSS/JS in and also externally, it would not be easier to put all together than to split one…
-
5
votes1
answer5102
viewsRelate two mysql tables to data from the same column?
I am creating a 2014 World Cup table. I created two tables. times (ID, nome, sigla, bandeira) jogos (ID, fase, local, time1_id, time2_id, data) I have a relatively simple problem, but I found no…
-
5
votes2
answers235
viewsColumns in percentage not aligned
I am using on my site 3 columns(sections) each with 33.33% width and with margin-left and right from 10px to 3. Only the last column is falling down. Because they are width in %, they should not fit…
-
5
votes3
answers1128
viewsEntity Framework - Update nested lists
I have the following schema in my Mysql BD: Models have a list of standard_images and each standard_images has a list of standard_regions. I must use Entity Framework 5.0.0. I have a model with 3…
-
5
votes3
answers5197
viewsDefinition of EJB
Forgive me for the general subject, but I have been researching for some time in various places and I have found nothing that would explain satisfactorily what an EJB is and what it is for. I am…
-
5
votes2
answers30811
viewsTable cell with fixed size
How to set the width of spine of two tables so that one does not have a cell bigger than the other? When I try to create, the cell of the second table always gets bigger than the cell of the first…
-
5
votes2
answers1023
viewsError creating a Mysql table
I created a table in Power Designer as shown below create table BANCO ( COD_BANCO integer not null auto_increment, NOME_BANCO varchar(50), AGENCIA_BANCO integer, CONTA_BANCO integer, GERENTE_BANCO…
-
5
votes1
answer354
viewsIs it possible to run a query (Insert) and only then check if it is duplicated?
I am reading an XML file and at the same time insert the entries in the BD. My code is like this: foreach($itens as $item) { ... if ( ! $stmt_insert_item->execute ( ) ) { if (…
-
5
votes1
answer5160
viewsPin a footer element to the footer
I am doing a job for the college where we were instructed to take advantage of the new semantic tags of HTML5 (Nav, Section, footer, etc). I’m having trouble fixing the footer at the bottom of the…
-
5
votes2
answers1306
viewsJquery Mask in dynamically created fields
I have a product values registration page, where I have an input field with value mask in R$. But since this field is created dynamically after a search in the comic book, the mask then works only…
-
5
votes1
answer338
viewsHow to check the existence of multiple values in a string with Javascript?
To find only a fixed value in a string I can use the Javascript function indexOf(), example: var string = "Oberyn se vinga"; string.indexOf('vinga') >= 0 //retorna true ou false But how would I…
javascriptasked 10 years, 4 months ago Kazzkiq 11,493 -
5
votes1
answer1636
viewsSend files and inputs with the same Ajax request
I have a code that works perfectly for sending files without refresh using PHP and jQuery and I have another code that works without refresh also but for inserting the data in DB. I can’t put the…
-
5
votes2
answers212
viewsComment system with video
When making a comment on Facebook, for example, and adding a link to the video from youtube, Vimeo and others, notice that the video is automatically embed. The same is true when we insert a link to…
phpasked 10 years, 4 months ago Filipe Moraes 8,737 -
5
votes5
answers1182
viewsHTML element does not become visible
I have the following HTML: <form action="cadastro/cadastrando.php" method="post"> <div class="elemf"> <label>Nome</label> <input id="nome" type="text" name="nome"…
-
5
votes1
answer1073
viewsIt is good practice to import modules into __init__.py
I noticed that in Django framework modules are imported into __init__.py for convenience. """ Django validation and HTML form handling. """ from django.forms.forms import * # NOQA That way it: from…
-
5
votes1
answer2113
viewsSelect elements in hierarchy with Javascript
I have a hierarchy as follows <li class="clear2 clearfix" id="field_id16"> <span class="row_title">Link: </span> <span class="row_data"> <div…
javascriptasked 10 years, 4 months ago waghcwb 1,915 -
5
votes1
answer1219
viewsWhat is service granularity?
What is service granularity in SOA? What is the difference between fine and coarse granularity?
-
5
votes2
answers2037
viewsHow to set print options via javascript?
Is it possible? I would like for example to remove the default margin and remove header and footer. Already open the print window with these settings.
-
5
votes1
answer754
viewsWhat makes the for and what makes the brackets in an array?
I asked for help on some forums in an old game programmed in java, I understood the logic, but did not know how to apply it (which commands to use, and how to use), and I saw the use of Arrays.…