Posts by jose_castro_arnaud • 165 points
6 posts
-
0
votes1
answer68
viewsA: Largest palindrome product - Ruby
The double loop for does folded work: n1 * N2 == N2 * n1. Use the outside index in the inside loop to prevent repetition. (100..999).each do |n1| (n1..999).each do |n2| mul = n1 * n2 if mul <= n…
-
-2
votes3
answers210
viewsA: Function contrary to TRIM
You can use the || operator (string concatenation): select 'Hello' || ' ' || 'World'; returns Hello World.
-
0
votes2
answers8240
viewsA: Double quote character removal "
After the split, for each field: if the first character is double quote, remove it; then, if the last character is double quote, remove it. Do a quote() function for this, just to avoid code…
-
1
votes3
answers9191
viewsA: What is a Software Artifact?
When a software is created or maintained, several documents are created in the process. For example: Use cases, to detail user interaction with software; Data models, to describe how the data that…
-
1
votes1
answer50
viewsA: Doubt about SQL in PHP
In PHP, the . (dot) operator concatenates strings, and in strings can be bounded with double or single quotes. In Mysql, strings are always delimited by single quotes. In the snippets shown, the PHP…
-
4
votes2
answers2656
viewsA: What is a compiler?
A compiler is a program that receives source code, written in a programming language, and returns a program in another language, usually an executable, in machine language, to be executed later. A…
compilationanswered jose_castro_arnaud 165