Most voted questions
150,413 questions
Sort by count of
-
7
votes3
answers1335
viewsHow to use an object to add to an attribute?
When I do the code below you get this error: Object of class Client could not be converted to string in ... animal.class.php In this part does not allow me to pass an object to be used in the…
-
7
votes2
answers17330
viewsHow to make basic live stream with HTML5 video API and PHP?
I would like to know the basics about how to create (make) a live stream system...I have a blog script in php where I created a system of users and even a system of friendships but I would like to…
-
7
votes2
answers56744
viewsRun apps in Android Studio through mobile by USB
Does anyone know how I can set up Android Studio to run apps on the connected USB on mobile? I’m currently using Genymotion and I was wondering if there are any compatibility issues. I tried to…
androidasked 9 years, 10 months ago Luiz Henrique Ugliano 651 -
7
votes1
answer5620
viewsHow to make an expandable Listview?
I want to make a ListView only that customized, clicking on it will open a tab below to show more information and the next item of ListView will automatically descend a little to the open tab,…
-
7
votes2
answers6186
viewsFunction equivalent to "DISTINCT ON" in Oracle BD?
In Postgres, you can make distinct apply to only 1 select field using the DISTINC ON, how can I reproduce this function in an Oracle database? Follow an example query: SELECT DISTINCT ON (CITY)…
-
7
votes3
answers400
viewsProblems with regular expressions (friendly url)
I’m having trouble reading the code of a particular product from a friendly URL. With the regular expression I put, it is accepting all the characters that are in front of the product code, ie…
-
7
votes2
answers24802
viewsClick on the Enter key
Could someone help me put the button click on the key Enter using Javascript or Jquery?
-
7
votes4
answers6464
viewsInsertion of a dot every 5 characters
I have the following string: "AAAAABBBBBCCCCC" There is a script that puts a dot "." every 5 characters? In case this script would return: "AAAAA.BBBBB.CCCCC."
phpasked 9 years, 10 months ago Nickolas Carlos 632 -
7
votes1
answer4382
viewsSplit the app screen into two layouts
I’m looking to split the screen of the phone in half. I have two LinearLayout the same size, but it seems that the only way to do this, is to put the size on the property…
-
7
votes3
answers14141
viewsFix first row table
I need to fix the first line of my table always at the top of the page. I have read several questions about this same problem, but I could not solve... My code: <table border="2px"> <tr…
-
7
votes2
answers1398
viewsReturning a list using select new with LINQ
I can do it: var filial = (from f in base.EntityContext.vw_filial select f).ToList<vw_filial>(); But I want to do something like this: var filial = (from f in base.EntityContext.vw_filial…
-
7
votes1
answer700
viewsWhat’s it for, and when to use Friend?
Code example: Friend Const Public Frind
-
7
votes2
answers841
viewsWhat is the practical applicability of the super word in Ruby?
There are several explanations on the Internet about it. But I still can’t understand what the practical applicability of the word is super in ruby. Okay, I know it’s meant to call the method with…
rubyasked 9 years, 10 months ago Pedro Vinícius 1,870 -
7
votes1
answer657
viewsSave files from a Datagridview
I would like to know how to get all the content that was passed to a Datagridview and save it in an Excel file. So far I have it: private void btnDiretorio_Click(object sender, EventArgs e) {…
-
7
votes4
answers8045
viewsCreate button with icon next to
I’m trying to create a button with icon on the side, I’m using icons of the bootstrap framework, I’m breaking my head to do it, I know the bootstrap has a component that does it, but it’s in another…
-
7
votes2
answers2322
viewsHow to save/recover image in memory on android?
Hi, I have a Array of Bytes which is a image, from it, how can I save in the external memory and if there is no save in the internal memory android? and then how can I be recovering this image? I…
-
7
votes3
answers1181
viewsPassing vector to functions
How do I pass a vector to a function? Something that, on the Moon, would be like this: vector = {"V", "e", "t", "o", "r"} function getVector(vector, pos) return vector[pos] end…
-
7
votes2
answers623
viewsScript to find and replace words in multiple files
I need to make a command that finds and replaces a directory path by another path, in several HTML files, example of part of the HTML file: <DIV STYLE="margin-top:6pt;margin-left:36pt;" ><…
-
7
votes2
answers863
viewsHow to include a indent when using the tab key in a textarea?
I have a <textarea> which will act as a small source editor. I wish that, by pressing the Tab, include a indent in the text instead of focusing on the next element, which is the default…
-
7
votes2
answers167
viewsProblem with the magic method __call
I’m trying to use the magic method __call and the function call_user_func_array to recover the method name to be able to upload a file. I am doing it as follows //Classe que importa os objetos $obj…
-
7
votes1
answer135
viewsUse of Waitall in C#
I have the following problem: A program generates two types of A and B threads through clicks on their respective buttons. The two types cannot run at the same time. If I have 10 A threads, B can…
-
7
votes1
answer982
viewsSave space, SVG, Base64 or regular images?
I created this question to clarify doubts that I ended up developing over the months in relation to images and space. While accessing websites, either on my mobile phone or my normal computer, I…
-
7
votes3
answers254
viewsWhy validate even with a default value
When I’m preparing something, however simple it may be, the question always arises: I must trust the mine code? This puzzle is usually associated with the fact that "tomorrow" may not be me…
php exception validation software-engineering encoding-styleasked 9 years, 10 months ago Zuul 35,190 -
7
votes4
answers714
viewsTrying to condense conditional with three possibilities
The problem is to present a result flexing to the plural if necessary, or "no": Let ni>=0 (number of items): switch(true){ case $ni==0: $html = ' (nenhum)'; break; case $ni==1: $html = ' (1…
-
7
votes1
answer1275
viewsHow to save formatted text to database
I’m using Tinymce to edit texts on my website. However, I am doubtful to save the formatted text in the database and then display it the way the user typed it. (paragraphs, font color, etc.). Is…
-
7
votes2
answers2804
viewsGenerate Ireport / Jasper Report containing 2 pages (with 3 columns each) on the same sheet in landscape mode
I’m making a report for a client and I’m not getting it assembled according to your need. What it needs is to generate a PDF of A4 sheet in landscape mode, containing each sheet two pages (odd and…
-
7
votes4
answers4198
viewsHow to save and upload data from a . txt to a gridview?
It’s been two days since I’ve been looking for help for my problem, but everything I think doesn’t fit. I’m doing a simple program, as if it were an agenda, where I put all the records of my store.…
-
7
votes1
answer252
viewsGenerate database backup
In my project, I have a database that has a lot of record. So I wanted SQL Server to make a backup per day or per week. But I think the per day is better. But how can I do this script to be…
-
7
votes2
answers342
viewsTimepicker fields disappear when you select many dates
I’m creating an app with dynamic calendar creation. My application uses: Bootstrap 3 jQuery 1.11.0 jQuery-ui 1.10.3 jQuery Timepicker Addon 1.5.0 I create a calendar on the page (jQuery UI…
-
7
votes1
answer1564
viewsHow to browse a Tobjectlist property via Rtti?
my class has a Tobjectlist property: TBaseModelo = class(TInterfacedPersistent) public property ListaCamposValidacao: TObjectList<TCampoValidacao> read FListaCamposValidacao write…
-
7
votes3
answers1170
viewsHow do I count the amount of products per category?
I have the table tbl_produtos id_product product name cat_product I have the table tbl_categorias id_categoria category name How would I count the amount of products for a certain category, for…
-
7
votes2
answers5339
viewsRemove empty positions from an array
I’m passing a array via GET for PHP and then send it to the client side (Javascript). When I receive it it looks like this: m_prod = [5,,,,,,,,6,,,,,,]; In other words, it is including a space in…
-
7
votes3
answers3171
viewsRead txt file for Select
I want to use a select, with the data inside a file .txt, created by me. Use a PHP function. Inside the file (select.txt) have: teste1 teste2 teste3 And the select <select name=select >…
-
7
votes2
answers963
viewsHow to get the public IP of a connected user via socket?
I need to get the IP address of a user who will remotely connect to my program, and list it, the program itself is a chat where only the server will store the IP address of the users. Client…
-
7
votes1
answer767
viewsChange of char variable content
I’m having trouble working with files and handling char. CODE char *fileTipoDespesaDefault; char *fileTipoPagamentoDefault; FILE *fileTipoDespesa; FILE *fileTipoPagamento; /** * tipos : 1 =>…
-
7
votes4
answers10036
viewsApply color to font in element clicked only with CSS
I have the following HTML: <div class="trabalheSubEsqTitulo">Fale Conosco</div> When I click on the div trabalheSubEsqTitulo, I want him to apply color:red, however, I only want this…
cssasked 9 years, 11 months ago Felipe Viero Goulart 3,693 -
7
votes1
answer11539
viewsHow to Create Dropdownlist in ASP.NET MVC 4
You could help me create a DropDownList on MVC4? I have the class ProjetoFuncionario which is an associative class of Projeto and Funcionario. I must create a class for Dropdown? I’m having a hard…
-
7
votes2
answers3368
viewsMultiple variable declaration in Javascript
It has become quite common to declare variables in multiple lines in Javascript. Especially when they are initialized later: var var1 = null, var2 = null, var3 = 0; The "normal" would be like this:…
-
7
votes4
answers4670
viewsSelect string at random
I need a way to randomly create a string between some options. Let’s say I have the strings "A" "B" and "C", it would be possible for Java to choose randomly?
-
7
votes1
answer579
viewsHow to guarantee unique access to each user?
How can I ensure that when a user is online, they no longer allow connections with the user login and password, taking into account that if the session expires, you can again allow connections from…
-
7
votes1
answer1900
viewsInternationalization, L10n and I18N
According to the W3, with regard to L10n and I18N, I have separated the explanation below that will serve as a basis to illustrate my doubts. L10n [ source ] Generally regarded only as a synonym for…
-
7
votes2
answers4994
viewsHow to work with Regex on name validation?
I have tried in many ways to develop a Regular Expression that validates: maximum size of 60 characters can’t be a number cannot have accents, cedilla and punctuation the first letter of the name…
regexasked 9 years, 11 months ago Nycolas Merino 103 -
7
votes2
answers160
viewsWhat happens when we run PHP scripts with long tasks?
I’m running a script PHP who is responsible for downloading 55'000 images on one server and downloading these files into a folder on another server. It should take statistics per minute about 1.40…
-
7
votes2
answers3969
viewsMy App does not appear on Google Play on tablets
I developed an application, after I published it on Google Play, I stopped by mobile and installed correctly. However, when access by tablet, the application does not appear listed, if access by PC,…
-
7
votes3
answers15498
viewsC# dynamic COMBOBOX (SQL BD table data)
I need to load a combobox with the data from an SQL DEPARTMENT table (with code and description/ the description is displayed in the combobox but what is caught is the code) I used a datasource (the…
-
7
votes1
answer125
viewsLoop with array + string
I’m trying to do something like: a = {move1="oi", move2="oi2"} for x=1, #a do print(a.move..x) end I can’t explain it very well, but what I’m trying to do is this: print(a.move..x) getting…
-
7
votes1
answer61
viewsWhat is the difference between $('id') and $('#id') in Mootools?
For those who, like me, are used to jQuery, the existence of two functions to select elements in Mootools seems a little confusing. Whereas I have some element like <div…
mootoolsasked 9 years, 11 months ago bfavaretto 64,705 -
7
votes2
answers1017
viewsPrevent DROP TABLE
I would like to prevent deletions on a table in Sqlite. CREATE TRIGGER nao_deletar_tabela BEFORE DELETE ON tabela BEGIN SELECT RAISE(IGNORE); END; It worked! Whenever one runs DELETE, nothing…
-
7
votes2
answers417
viewsLimit incoming emails from the same domain
There are SPAM source verification policies that are based on the amount of emails that a given domain is sending per hour. Such policies may be internal, such as those applied by Google, or…
-
7
votes2
answers511
viewsFilters or Sort, which should be the first when creating an index in the database
Given, for example, the following Query: SELECT ClienteId, Nome, DataNascimento, Cidade, Estado, DataCadastro FROM Cliente WHERE Estado = :Estado AND Cidade = :Cidade ORDER BY DataCadastro,…