Most voted questions
150,413 questions
Sort by count of
-
4
votes1
answer1818
viewsFloating Point Error
Follows the code of total price that is giving floating point error`: //Pr. Total sgItens.Cells[5,l] := FormatFloat('###,###,###,##0.00',StrToFloat(copy(lTemp, 210, 14))); cont:=…
-
4
votes1
answer391
viewsWhat is the weight of a subquery for the query?
During the development of some queries in the database, I come across the situation of the need to perform a new query, but another solution in some cases may be the subquery. So what is the best…
-
4
votes2
answers6646
viewsSubtraction of dates and return the number of years, months and days
Through two input='text' I set the starting date and the final date. By Javascript I want to subtract the final date by the initial one and return the number of years, months and days. I’m using the…
-
4
votes1
answer280
viewsC# Union/Order by with LINQ and Performance
Imagine the following situation there are 3 classes class A, class B, class C, class A has many classes B and many classes C. class B has many classes C. clsse C has a data datetime field. public…
-
4
votes4
answers2880
viewsIs it possible to reference a column that is not a primary key in another table?
For example, I want to reference the id_2 of Table 1 in Table 2, I know I can do with primary keys but with other columns I do not know if it is possible. Table 1: id (primary key of Table 1), id_2,…
-
4
votes1
answer107
viewsDebug Java in Eclipse, excluding classes/packages
My application uses JSF/Hibernate, and a number of other add-ons (jar). When I have to thresh, a page, he stops at breakpoint and after a few Steps (debug) it falls inside the jar of the JSF. You…
-
4
votes1
answer1034
viewsUpdate edmx from the bank
I did an update model from database on my edmx. Well, the field I had added in the table appears in the diagram, but in the entity’s Cs, it continues with the old fields. What do I do, add in hand?…
-
4
votes1
answer210
viewsRuby on Rails boot time
In Ruby on Rails, using the Minitest library, the test run time is fast. But the boot time before each rake test (...) is pretty annoying. Is there any way to make it faster? Updating I tried to…
-
4
votes2
answers156
viewsIs it possible to have more than one CSS rule for an "img" in a "div"?
How to apply two (or more) CSS rules to elements img from within a div? I use the Tinymce editor and when I send an image for posting or messages (pms) I have to set in a specific measure for each…
-
4
votes1
answer2652
viewsWeb Api Client in Windows Forms
I am making a client using Web Api. My site has the server function of the Web Api. I found this reference from Microsoft…
-
4
votes3
answers228
viewsHow to do repeating background with sprites?
I was creating a button with background: made with a sprite, but it gets all wrong, I want it to look like this: Only he’s all fucked up, like this: My CSS: .botao {…
-
4
votes2
answers621
viewsHow do I access the indexes of a vector returned by a java method?
I have a method called vetorVoos which returns a vector of the type NodeVoo and I want to access the indexes of this vector through the method in another class. This is the method: public NodeVoo[]…
-
4
votes1
answer740
viewsHow to link when clicking a div
I forgot how to make links with jQuery that run when clicking on a div. The link I needed was with target Blank. I found it from here but I didn’t understand the code and I couldn’t use it.…
-
4
votes2
answers259
viewsRegular expression error in PHP
Could anyone tell me why this regular error expression in PHP? /:[^\/\\]*/ She’s being used this way: return '/' . preg_replace('/:[^\/\\]*/', '([^\/]*)', $value) . '/'; I am trying to "break" one…
-
4
votes1
answer204
viewsConvert objects: from literal syntax to prototype types
Given a type defined in javascript, for example: var Point = (function () { function Point(x, y) { this.x = x; this.y = y; } Point.prototype.dist = function () { return Math.sqrt(this.x * this.y +…
-
4
votes2
answers156
viewsWhy do I have to assign the value of the prepare method to a variable and only then instantiate execute? in Pdo
Ex: $stmt = $db->prepare("SELECT * FROM BD"); $stmt->execute(); Why doesn’t it work if I instantiate the execute method from the same instance? since the value has already been passed to the…
-
4
votes2
answers3023
viewsQuery in Mysql to return scheduled records for the next 30 days
I have a table called AGENDA, where I have the fields, ID, Location, Date. Do the insertion and selection inside the database already managed to do correctly. But I can’t select the date in…
-
4
votes1
answer185
viewsWhy doesn’t the "Landscape" position resize the Longlistselector?
Why when I put the phone in the Landscape position, the LongListSelectordoes not resize? Follow the image: Follows my XAML <Grid x:Name="ContentPanel" Grid.Row="1" HorizontalAlignment="Center"…
-
4
votes1
answer1716
viewsHow to separate text words from a comma column?
There is a ready function in Firebird 2.5 that is the inverse of the list function? When you make a select list(campo,',') from tabela is returned all field values in a single line separated by…
-
4
votes1
answer145
viewsHow to change the type of the persisted class in a legacy model using the Entityframework
I have the following class scheme with inheritance, as an example: public class Veiculo { public int Id { set; get; } public string Descricao { set; get; } } public class Moto : Veiculo { } public…
-
4
votes1
answer135
viewsLoop does not run on Xcode
I’m trying to run a loop in the Xcode, but it doesn’t work. On the console gets: Type the loop number: 5 Nothing else happens in the terminal. 0,1,2,3,4,5 does not appear. In short, it stands still…
-
4
votes1
answer551
viewsHow to smooth the transition between pages on windows phone?
How I improve the transition page from page on Windows Phone? Because every time I change pages, it changes like "out of nowhere", it doesn’t appear smooth, like a normal transition. Has effects…
-
4
votes2
answers2318
viewsExclude character in a given position?
How do I delete a certain character in a certain shell position? I’ve tried with sed, but I can’t get into position either, just the pattern. ",45123","B23142DHAS675" What I wanted was to erase the…
-
4
votes2
answers896
viewsAlternatives for payment of credit card goods or services on iOS
I would like to implement a payment method on iOS for sale of real world products/services, as it works in e-commerce. As seen in Types of payment prohibited on IOS it is possible to carry out this…
-
4
votes3
answers15493
viewsHow to add the results of an array brought from the PHP database?
I’m doing this, but what’s being added up is the number of lines and not the field values "something". <?php $searc= mysql_query ("SELECT algo FROM lugar") or die (mysql_error()); while ($rows =…
-
4
votes2
answers5206
viewsFile supposedly being used cannot be deleted
I have a software that records error logs of itself inside a "logs" folder. Each log file is created with the current day date, so it is unique to the current day. Example: 30-04-2014.log. I use…
-
4
votes1
answer2392
viewsGenerate private certificate APK using Eclipse Android
When I click "Run" in the eclipse it generates the APK, sends and installs on Android, but it installs using a Debug certificate, I’m using Google Games Services and it only works if the APK is with…
-
4
votes1
answer813
viewsHow to make a Chained List in Assembly?
I have a college job and I need to make a chained list at Assembly, would like to know how to do the loop to insert all items in the list and keep them connected. The list must contain the data of a…
-
4
votes1
answer90
viewsXML duplicating the reading of the results
I have a XML: <paises> <pais> <nome-pais>África do Sul</nome-pais> <consulados> <consulado> <nome-consulado>Consulado da República da África do…
-
4
votes1
answer178
viewsHow do I make an event when I click an Item?
I wanted to know if there is a way, when clicking on an item, to perform an event/function, knowing that each item has its function. I’m using Longlistselector Código XAML <phone:LongListSelector…
-
4
votes2
answers2008
viewsHow to pre-process a text for the application in the Weka classification algorithms in Java?
I am doing my TCC where the idea, roughly, part of the collection of tweets and a training of an algorithm machine Learning to classify this data. How I would pre-process this tweet, and the idea…
-
4
votes1
answer1064
viewsUnit tests on Android
How to test unit on Android? How far I searched is only possible to use the framework Robotium. There is another way to test unit on Android?…
-
4
votes3
answers5051
viewsInclude link in a container
I have a container in my code and I need it to be clickable, with href, let’s assume that by clicking it directs to "Google.com". How can I do this? <div class="project-2 v-center">…
-
4
votes1
answer2089
viewsEdge effect of a Jbutton component
How do I create a smooth transition(Fade Effect) from the edge of a Jbutton by hovering the mouse? My code is like this: @Override public void mouseEntered(MouseEvent e) { Object temp =…
-
4
votes1
answer4835
viewsHow to make a pie chart (pie) with database?
I have the table in my database called votes, I have id, name and votes (number of votes), I wanted to plot these values being, name and value in a pie chart or whatever the percentage of votes has…
-
4
votes2
answers1311
viewsHow to get position of a sub-list within another list?
I have a list of bytes and I need to check if it contains a sub-list of bytes in a specific order. How can I do this check by getting the position of the sub-list in a simple way, using the…
-
4
votes2
answers2986
viewsSelect a table that simulates a tree
I have a table that simulates a tree. For example: DECLARE @t TABLE(id int,parentId int,name varchar(max)); insert @t select 1, 0 ,'Category1' insert @t select 2, 0, 'Category2' insert @t select 3,…
sql-serverasked 10 years, 6 months ago amws 63 -
4
votes1
answer235
viewsGrab the latest message from a conversation (GROUP BY)
I have the following query: SELECT cp_mensagem.mensagem, cp_mensagem.dh_envio, cp_projeto.id as id_projeto, cp_projeto.nome as nome_projeto, cp_pessoa.id as id_freelancer, cp_pessoa.nome as…
-
4
votes1
answer1105
viewsRun function when clicking on "textarea"
How to perform a function when a <textarea> is clicked?
javascriptasked 10 years, 6 months ago user3081 667 -
4
votes1
answer491
viewsHow to create a Managed Thread in C++ similar to the example in C#
In C# I use the following code to create Managed Thread: Thread thread = new Thread(new ThreadStart(minhaFuncao)); In C++ i made: using namespace System::Threading; . . Thread^ thread = gcnew…
-
4
votes1
answer232
viewsHow to make the p:Poll component not interfere with the modal in Primefaces 3.5
I have a page that has a table in the center, this table is updated every 30 seconds using the component p:poll <p:poll interval="30" update=":centro" /> The problem is that I have a menu that…
-
4
votes2
answers117
viewsDoubt object orientation + java ORM
I am wanting to store the data of my program via ORM and am separating cute each object. My User object, for example, has its basic attributes and is also composed of other objects such as Address,…
-
4
votes1
answer1536
viewsIs it possible to create a remote server with Mongodb? How?
My question, to be clear, is to create a server with mongodb in a cloud hosting (for example) and access it through another server. Example: I have a mobile app. I hosted my mongoDB in a cloud…
-
4
votes1
answer966
viewsHow to implement the six degree separation theory algorithm?
What is? Theory that in the world it takes no more than six bonds of friendship for any two people to be connected. Question: I’ve been trying for some time to implement this algorithm, but I can’t…
-
4
votes3
answers8766
viewsRead a few lines from a file
I have a file with about 3 million lines. I have to read line by line and process some modifications, and after these modifications in line store the result in a list to then write to another file.…
pythonasked 10 years, 6 months ago Cristiano Pires 119 -
4
votes1
answer38900
viewsGet the value of the selected item in a Classic Sp Combobox
I have two combobox, I need to get the id of one to load the other from the item that was selected in the combobox1,how could I do this through a javascript function. <select id="cb_catinsumo"…
-
4
votes2
answers255
viewsHow is it different to declare a variable with and without "@" in Ruby?
What is the difference between these two possibilities? //com @ @post = Post.find(params[:id]) //sem @ post = Post.find(params[:id]) Normally in controllers is used with @, but in office each views…
-
4
votes1
answer596
views -
4
votes1
answer171
viewsShould Android support libraries be compiled together in APK?
I’m developing an application for Android, and it uses two libraries that Google provides. To appcompat-v7 is used to have action bar on devices with version 2.3 or less, as this has only been added…
-
4
votes1
answer752
viewsAssociate a file with an application made on Lazarus on Linux
I developed an application on Lazarus on the linux platform for printing reports, now I need to click on the file with any extension, ex arquivo.gsa , open my application Lazarus on linux. In…