Most voted questions
150,413 questions
Sort by count of
-
8
votes2
answers13586
viewsHow to install the PDO_PGSQL driver in Ubuntu?
I have already installed PHP 7, Apache 2 and Postgresql 9.5. I’ve already enabled the extension on php.ini but it doesn’t work. In Windows just enable this extension on php.ini that already works…
-
8
votes2
answers427
viewsProblems with str_pad function and accentuation
Guys I’m using the function str_pad to take a string and fill it with 10 characters 0. It is working perfectly, see the example: echo str_pad("dda", 10, "0", STR_PAD_LEFT); She writes 0000000dda.…
phpasked 8 years, 1 month ago Hugo Borges 5,294 -
8
votes2
answers190
viewsWhat is Listviewanimations and how to use it?
I wanted to understand what the ListViewAnimations is (a component, a Framework?) and how it works.
-
8
votes1
answer110
viewsHow to find out the rendered size of a curve in Html5 canvas 2d?
I need to figure out the rendered size of a curve on canvas 2d context.bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y); with this code, for example // pontos de controle var cp1x = 200, cp1y = 150, cp2x…
-
8
votes4
answers187
viewsHow to not lose the "this" of the current object
I had already made one similar question, however this time I am with a problem a little more complex : ObjectTest1 = (function(){ var init = function(){ this.callback = null; } init.prototype = {…
javascriptasked 8 years, 1 month ago Guilherme Lautert 15,097 -
8
votes0
answers101
viewsContent ID and Usage Policies with Youtube API
I’m trying to upload my videos on Youtube, with Usage Policy and Content Id Matching enabled. My project is on. NET with the Youtube API v3 library, but the library only allows the implementation…
-
8
votes4
answers2279
viewsResponsive image
How to do the effect below little by little, according to the screen resolution. *Without using clip, because otherwise would be many media queries, and on this site, the effect seems a smooth…
-
8
votes1
answer719
viewsWhat is the difference between "=" and "<" in the "Scope" options of a customised directive?
In Angularjs, I was creating a directive. I realized that by using the sign = to capture a certain controller scope value, when I changed this value, the parent controller value was also being…
-
8
votes4
answers635
viewsWhy can objects other than the same class access private fields from each other?
Today while I was taking a course in Udacity (Intro to Java Programming) I thought about this in the exercise Update the class Person (lesson 3 29/45). In object-oriented modeling we have the…
-
8
votes5
answers426
viewsExplodes with name indexes (associative)
How can I make a explode in a variable where I can then access it through nominal index, and nay for numerical index? Follow the example to be clearer: <?php // Aqui acesso pelo índice $user =…
-
8
votes1
answer1309
viewsCount number of PDF pages with Javascript
I am generating a PDF file with reports generated through PHP. In the PDF file are generated a number x of reports and each report has a number y of pages. I need to know if this y number is even or…
-
8
votes2
answers22304
viewsHow to hide command output in CMD?
I have a file .bat and in it is the command: chcp 65001 Which results in output on CMD: Página de código ativa: 65001 But I want this message, displayed after the command is executed, to be hidden…
-
8
votes5
answers14934
viewsSort Datatable Datetime Field
Hello. I have the following datatable: success: function (data) { $('#table-controle').html(data); $('#table-controle').DataTable({ "language": { "url":…
-
8
votes1
answer2380
viewsLeave program done in Swing with Windows appearance
I am developing application with Java Swing, but the screens are not looking windows window. Example of screen. I wanted to look like Windows even, with the title bar with minimize, maximize and…
-
8
votes1
answer479
viewsSocket "cutting" bytes into two packets
I am developing a Socket communication of my program with the server. This server is responsible for bridging between my program and the users that are connected to it, that is, the user when…
-
8
votes1
answer324
viewsCSS reset is always the same?
Is CSS Reset always the same, or are there others who maintain the same pattern but have more specific features? It is a rule that all CSS Reset be equal, that is, if I create mine with what is…
-
8
votes5
answers1240
viewsHow to split a string into specific Javascript sizes?
I need to share a string in specific Javascript size. I know it’s possible to use the Join to transform a string in a array letter: 'hello'.split('') However, I need a way where I can determine the…
-
8
votes1
answer396
viewsProposal from the Clojure?
Recently I heard about this programming language, Clojure, it uses only functions, is not typed, and appears to be quite complex, this is an example of a function that takes a parameter and does the…
characteristic-language functional-programming clojureasked 8 years, 2 months ago Felipe Paetzold 4,527 -
8
votes1
answer148
viewsAccess null pointer is not generating error
Testing the code below, I noticed a strange behavior. It’s working when it shouldn’t. The correct in my view was to give a segmentation failure and abort, but it seems that the compiler is doing…
-
8
votes3
answers1491
viewsIs it good practice to use composite keys as the primary key?
I don’t have much knowledge in database structuring. I have been trying to improve myself and I am seeking best practices on how to create and structure tables. Currently I usually create link…
-
8
votes2
answers5104
viewsGood CSS practices for responsive Height. Is it armengue or not?
I made this code that leaves the height responsive, it adjusts according to the size of the viewport. (Rotate the snippet and resize the screen). whereas the html and the body have a height: 100%, I…
-
8
votes1
answer805
viewsController returning partial view in a modal
I have a button on my screen that held call to a method on my controller (Ajax) that returns a partialView by default. $("#btn-Visualizar-Rotina").click(function() { var codUnimetPcp =…
-
8
votes1
answer4275
viewsLogin to facebook com python
I would like, for educational reason, to login to facebook with a python script. I tried with lib requests import requests s = requests.Session() post_url =…
-
8
votes3
answers15821
viewsREGEX - find expressions that DO NOT contain specific words
We are using REGEX to normalize pharmaceutical data from a string field and we need to distinguish very similar strings from an exception command. For example, in a very simple way, we have the…
-
8
votes1
answer1466
viewsDifference between GCC Clang
The systems based on Unix (a large majority), usually use the GCC, to compile the files in C, but I also possessed the Clang for the same purpose. There is difference when compiling some project…
-
8
votes1
answer416
viewsCordova + Crosswalk
I created a normal Cordova project: cordova create myApp com.myapp myApp then I entered the project folder cd myApp added the platform: cordova platform add android and added the crosswalk plugin…
-
8
votes2
answers577
viewsWhat is the purpose of unsafe command?
I saw the use of the command unsafe, in this code in the declaration of this method: public unsafe static int GetSquareStack(int value) {...} Within the method there seems to be pointer manipulation…
-
8
votes1
answer150
viewsWhat it means to infix on Haskell
What is and what this infixr 3 is for &&? infixr 3 && (&&) :: Bool -> Bool -> Bool True && True = True _ && _ = False
-
8
votes1
answer2268
viewsIn R, using the plotly package, can I plot the map of Brazil and its states?
I really like the package plotly to make interactive graphics. But at the time of making maps, I have not found so far a way to make the map of Brazil and its states... For example, I removed this…
-
8
votes2
answers154
viewsCreate a vertical Label or Input
I need to create a LABEL or Input so that the typed text is Vertical, as follows: M E U T E X T O Would that be possible in any way? This is required for printing banners in this format.…
-
8
votes1
answer15301
views@media print css
Maybe these questions can be labeled "idiot", but believe me, I really need to ask this here because I have not found anywhere on the Internet and who can help me I will be very grateful... Is there…
-
8
votes3
answers200
viewsSpeed difference between Plink and Openssh
I have a setup with some Mercurial repositories. For security and standardization reasons, https access to Mercurial repositories was recently disabled, which forced all developers to use ssh. In…
-
8
votes1
answer583
viewsUse "Fieldbyname" or the associated variable?
When I have a ClientDataset, one MemoryTable or a Query, what’s the difference if I take the value of a field using FieldByName() or the variable associated with the field? In the example below, I…
-
8
votes2
answers1864
viewsSerialize Object to JSON
How do I convert an object to JSON? I even found some codes on the internet that even worked, but my object has some fields that are other objects and so the conversion did not reach the last level.…
-
8
votes1
answer101
viewsPros and cons of securing an interface contract through a subclass
This article presents an interface IList<T> containing the methods Add(T item) and Count(). The contract of that interface expects that when an item is added, the method Count() reflects the…
-
8
votes3
answers15292
viewsVARCHAR2 field boundary size in Oracle
I got a column with the guy VARCHAR2 (4000 CHAR) and I’m testing the field boundary size VARCHAR2 in the Oracle. I thought there was a limit to 4000 bytes in the field, even if specifying the value…
-
8
votes2
answers217
viewsDoubt Semantic Html5
What’s right for sidebar? <div> <aside></aside> <aside></aside> </div> <aside> <section></section> <section></section>…
-
8
votes3
answers10028
viewsHow to display input type range value
Well, I have the following code: <input type="range" name="vol" min="0" max="100"> I would like to know how to show next, the value in real time that is selected, ie the user dragged with the…
-
8
votes1
answer147
viewsGCC compiler command to display #ifdef
What compiler command do I use to display this line at runtime? #ifdef DEBUG double tInicio_=clock() ; #endif
-
8
votes2
answers5108
viewsWhat is the difference between Logical Implication and Logical Equivalence?
I am studying mathematical logic and programming logic, and I would like to know the difference between Logical Implication and Logical Equivalence?
-
8
votes1
answer37813
viewsWhat is the difference between Tautology, Contradictions and Contingencies?
Anyone who studies Mathematics or develops algorithms should know that Mathematical Logic is essential for several areas of knowledge, eg: in computing (programming), so I would like to know, what…
-
8
votes1
answer528
viewsORDER BY only day without hour
In Mysql I have a column timestamp calling for dia_cadastro (2016-06-21 11:27:32), in consultation I want to give a ORDER BY only on the day, and disregard the time. That is, if they have products…
-
8
votes1
answer159
viewsHow does logic work to figure out the size of the image?
In PHP and other programming languages, it is possible, through some special functions, to discover the image size. For example: list($width, $height) = getimagesize('images/icon.png'); I was…
-
8
votes2
answers271
views -
8
votes1
answer3777
viewsWhen should I use Modelstate.Isvalid?
When should I use the ModelState.isValid? Is it only in the insertion of data? And in the case of update and delete? We need?
-
8
votes1
answer91
viewsType Int8 on Swift does not store maximum integer 255
Doing some pranks on the Playground, With Swift 2.2 we can declare constant let testeIntOitoBits: Int8 = 127 //maximo - deveria ser 255 let testeIntOitoBits2: UInt8 = 255 Why can’t I store 255 in…
-
8
votes2
answers321
viewsAre static classes shared by threads?
Static classes, methods and properties are shared between threads of the application? That is, if I modify the static property foo in ThreadA, and then modify the same static property foo in…
-
8
votes3
answers330
viewsDoubt game two players, half screen upside down
I am creating a program to practice what I have learned so far and learn more, but I have reached a halt. The doubt is as follows: I’m creating a question and answer game for two players, each one…
-
8
votes0
answers263
viewsDevelopment that shows different types of calculations
I need help to assemble a page, program or application that does the following topics of mathematical fundamentals and shows the calculations that the program did. Transposition of Object Rotation…
-
8
votes2
answers563
viewsPrompt Expression<Func<T, bool>> via parameter using object that is in a foreach
I have a model called Entity, this model has links (1 - N) with three other models. public class Entity { // Outras propriedades removidas para brevidade public virtual List<SpecificInfo>…