Most voted questions
150,413 questions
Sort by count of
-
5
votes2
answers1382
viewsRetrieve the first elements of an Integer list
I have a list ArrayList<Integer> list = new ArrayList<Integer>(); where I have over 40,000 records. I wonder if there’s a way to get only the first 10,000. I know you can make one for…
-
5
votes1
answer459
viewsWhat is a shared_ptr?
If possible, with an example of code, as this is missing in the reference to really understand when and how to use the shared_ptr.
-
5
votes1
answer782
viewsHow to load blob field image?
I have a binary image of a blob field and I can’t read it. In the database it looks like this: Yes, this is the text image shape. This is how image: I tried several things and the only thing that…
phpasked 8 years, 8 months ago Gabriel Rodrigues 15,969 -
5
votes2
answers761
views -
5
votes1
answer3721
viewsIs it possible to know the functions of a DLL without having its documentation?
It is possible to discover which functions are available in a DLL without having its documentation in hand so we can use, in Java, for example?
-
5
votes1
answer1284
viewsphp vs nodejs performance on websockets server
What I take for granted at the moment is that nodejs is more suitable to work with a constant pool of socket connections (websockets in this case) because being single-threaded each new connection…
-
5
votes3
answers394
viewsWhat does it mean to assign Math.Random() > 0.5 to a variable?
What does that mean Math.random() > 0.5; in a boolean? Here is an example: class Pro { public static void main(String[] args) { int numero = 10; boolean[] array = new boolean[numero]; for(int i=…
-
5
votes2
answers1283
viewsSELECT 3 different tables using DAPPER?
First I would like to say that I am a beginner in programming, and I am in developing my first project. Using ASP.NET MVC Technology. I need to make a query in 3 different tables: User, Parents and…
-
5
votes4
answers1125
viewsCreate external html pages
I know how to create external css pages. Which is quite useful. However, I don’t know if it’s possible to do the same for html without using frames. This is a link to an external style page <link…
-
5
votes2
answers4626
viewsHow to compare the content of two vectors?
public class VetorTurma { public static void main(String[] args) { int pontuacao = 0,nota,c; String nome; Scanner sc = new Scanner(System.in); double gabaritoVetor[] = new double[10]; double…
-
5
votes1
answer100
viewsDoubt exercise of xss
Guys wanted to understand the following logic of an xss challenge they were doing So because when I put <script>alert(1);</script> does not work but when I put…
-
5
votes1
answer307
viewsBlock old browsers
Is there any way to block browsers ancient? To be more direct: do not leave these browsers, such as IE 6 access my website? I did some research on internet and found no source on this subject.…
-
5
votes2
answers3496
viewsText that is written slowly, erases and writes another
I would like the script for a text that is written slowly. I found it easily here in Sopt, the link is this: Text That Is Typed Slowly? However, I would like an increment that I didn’t find. Next:…
-
5
votes2
answers744
viewsDeletion of related data - Entity Framework and C#
Hello, Using the same structure that I have been presenting here for some time, I come to ask for help now to delete the related data. Follows the entities.. public class Artista { public int…
-
5
votes2
answers4930
viewsWhat is the difference between Math.Random and java.util.Random?
What’s the difference in using the random without the import, right in the method. public class random { public static void main(String[] args) { int x = (int) (Math.random() * 10);…
-
5
votes1
answer1209
viewsIs there any way to access a cookie from a different domain?
Is there any way I can access a cookie from a different domain? For example: there is a cookie on facebook.com.br and I want to access cookie data within my site www.fulano.com.br .
-
5
votes1
answer235
viewsBug in code, function repeats calling when opening excel file
Further to this question: /a/112899/13237 Code: Function PrinciQualidade14(LNumber As Integer) As String If LNumber < 15 And LNumber > 0 Then InsertPictureInRange LNumber,…
-
5
votes3
answers603
viewsCreate/Use shortcodes in php
I wonder how I can create shortcodes in pure php (I will not use wordpress and your plugins). I don’t intend to use php functions for this purpose. I’d like to create a structure where I can name a…
-
5
votes2
answers1057
viewsAngular route link does not work on bootstrap
Person I’m having problem in the menu. The links made in Bootstrap are not bringing my angular routes. If I put the command in the navigation bar goes well. I’ve researched several things and…
-
5
votes1
answer8184
viewsIs there anything similar to WITH(NOLOCK) of SQL SERVER in ORACLE?
I recently discovered in SQL SERVER the option of not blocking tables for insertion while reading some data, and with this gain some performance in some specific situations. I searched, but I did…
-
5
votes1
answer855
viewsHow to filter with ng-repeat?
I have two <select>, i.e., a handmade picklist(multiselect). In the first <select>, I want to show only the customers brought by ng-repeat but containing the field…
angularjsasked 8 years, 8 months ago Leonardo Leonardo 283 -
5
votes1
answer462
viewsHow to block Image Hotlinks with warning?
A little while ago I saw a site that was displaying an image hosted on another site, at least trying.. What happens is that on the site that was linking the image of others started to appear a new…
htaccessasked 8 years, 8 months ago Junior Moreira 7,299 -
5
votes1
answer64
viewsInter-model operation
I don’t know very well the power of javascript, but I wanted to do the following: I have two models: Vacancy: { Name: "VagaExemplo", Description: "Descricao", Skills: { "56b68108869038280db291e6":…
javascriptasked 8 years, 8 months ago Lucas Fantacucci 435 -
5
votes1
answer73
viewsSerialization of exceptions
According to the msdn documentation, an exception should be serialized if it should be propagated outside the Assembler. In visual studio, I have a solution with some projects, among them a class…
-
5
votes2
answers12681
viewsHow to resolve accentuation problems when using the setlocale function?
I am trying to define the language of the program to Portuguese, using the setlocale(LC_ALL,"Portuguese"), however, much of the program was done on Ubuntu. When the other programmer sent me the…
-
5
votes3
answers2378
viewsHow to list files and subdirectories in Delphi?
I created a project in Pascal-Object and at a given time it should list all the files and subdirectories located in the Desktop tree, I found some examples on the WEB, but none was useful enough, as…
-
5
votes1
answer723
viewsHow to get an image of a Resource
I want to call an image with a button by Visual Basic 2010 Express, in the Visual Basic 2008, used that code: picMyimage.image = My.resource.onomedaimagen Until then it worked as wanted, but in…
visual-basic-6asked 8 years, 8 months ago Bruno Felix 67 -
5
votes1
answer1457
viewsMethod does not override method from its superclass
I’m new in Java and I’m learning app for Android and on my way, I ran into this mistake: Method does not override method from its superclass The word @Override is underlined in red, but I could not…
-
5
votes1
answer552
viewsCMD WINDOWS commands
I don’t know if you can ask questions about this subject, but I’m having difficulties to open the file continuously on Windows CMD. When I use Linux just do this: tail -f…
-
5
votes1
answer135
viewsShow hint only when the application starts for the first time
I have a desktop application that is a bit complicated, so I thought I’d help the user by generating images (Hints) to help on the way. But I know how boring this is, so I would like to know if it…
-
5
votes2
answers380
viewsHow to transpose the result of a search using SQL Server?
Or better saying how to make the columns of a search result SQL Server, become lines of the result, as follows in the images below: A search result using the clause select whichever: Make the result…
-
5
votes3
answers5080
viewsClear C buffer with fflush() or __fpurge()
Studying strings in C I came across the following phrase: "Clearing the buffer, for example, is not always desirable, and for more professional and secure programming it is not recommended to use…
-
5
votes1
answer90
viewsVisual Studio or Eclipse Code Review Rule
I wonder if there is any add-in for visual studio that ensures that while I am in development environment make some changes but when I generate the build of the project, this commented part is…
-
5
votes1
answer551
viewsList custom post type of various taxonomies
I used that code: <ul> <?php $args = array( 'post_type' => 'integrante', 'orderby' => 'title', 'order' => 'asc', 'lang' => 'pt', 'tax_query' => array( 'relation' => 'AND',…
-
5
votes1
answer84
viewsPrevent or remedy it?
Lately I’ve been too preoccupied with preventing code errors. Yet I was left with that doubt: It is better to check (prevent) or remedy (Ensure existence)? Let’s say you did : $var = array( 'name'…
-
5
votes3
answers186
viewsHow to include columns in a Dataframe in Julia?
I got the following DataFrame generic with 100 lines: using DataFrames df = DataFrame(X=LinRange(0.0,2π,100)); head(df) 6×1 DataFrame │ Row │ X │ │ │ Float64 │ ├─────┼───────────┤ │ 1 │ 0.0 │ │ 2 │…
-
5
votes1
answer905
viewsIs it possible to modify the HTML when writing an email in Gmail?
The intention is very simple, I want to make a <strike> (strikethrough) in the text of the email, p.ex.: tacked. I found the library Kartiktalwar/gmail.js: Gmail Javascript API, but it…
-
5
votes1
answer319
viewsWhy does the PSR2 standard require us to use 4 (four) spaces instead of tab?
According to one of the items specified by the standard PSR2 (to which most PHP libraries), we have: Codes MUST use 4 spaces for indentation, not tabs. I know the pattern exists, but I’d like to…
-
5
votes1
answer615
viewsWhat does the term "String... string" mean in java?
What the term means String... string in Java? And how to elaborate a method that returns a String... as an example: public String... getStrings(){ return String... s;) } I know it’s not like that,…
-
5
votes2
answers1246
viewsHow to add elements at the "x" position of an Std::vector
How to proceed to add an element at the position I specify in a std::vector? Not to delete what you already have, but to add in the middle. Here’s an example: Let’s assume that inside a std::vector…
-
5
votes1
answer3605
viewsSimple National Opting Query (by CNPJ) - C#
I am implementing in C# a Consultation of Company Opting for the National Simple Tax Regime through this link…
-
5
votes2
answers181
viewsWhy in PHP string can turn function?
In the example I have a function named funcao, which aims only to display the value of the parameter on the screen. By creating a string with the function name and call it as a function, it will be…
-
5
votes3
answers241
viewsCondition within a . each()
The problem is, I’m 9 li within a ul <ul> <li>Teste1</li> <li>Teste2</li> <li>Teste3</li> <li>Teste4</li> <li>Teste5</li>…
-
5
votes1
answer301
viewsSync Android x Web
I am developing an application that will work offline on android and sync with a version web. I have a API that will mediate this synchronization. Currently the version android has a timestamp to…
-
5
votes3
answers596
viewsRound a number to Top 4023.8599999999997€
I have 4023.8599999999997€ to round to 4023.86, tried: Math.round(sum1) but the result was :4024€ I also tried to Math.round(sum1,2) but it did not give. How to do this I’m using Javascript.…
javascriptasked 8 years, 9 months ago I-am Sam 459 -
5
votes3
answers3201
viewsGet class name of an object
I want to get the class name of an SVG element. I have the following example, but do not get its name: class_obj = document.getElementbyId("id").className; console.log(class_obj); jsfiddle example:…
-
5
votes1
answer859
viewsWord search in excel spreadsheet and return of the entire line containing that word in PYTHON
Hi, how are you? I am a beginner in Python and would like to run a script that given a spreadsheet in excel, the user could search a word inside this spreadsheet (input) and if the word was found to…
-
5
votes1
answer819
viewsCalculate import time of DUMP
I would like to know, if possible, how to approximate the import time of a Dump. It could be something considering the following items: GB DUMP size. Number of Tables. Number of Records and(or)…
-
5
votes1
answer4598
viewsGenerate Danfe from Nfe XML
I’m developing an application ASP.NET MVC with C# and need to transform XML from NF-e to Danfe in PDF, someone knows some component to it?
-
5
votes3
answers11090
viewsSQLSTATE[42S02]: Base table or view not found: 1146 Table
I’ve got this little problem in Laravel. The good old problem with the S that Laravel puts in the end. I have researched in innumerable foruns but the given solution does not work. SQLSTATE[42S02]:…