Posts by David • 4,330 points
170 posts
-
2
votes2
answers22
viewsA: Doubts with PIVOT on Oracle
Could in the query have the concatenation, sum, etc... of the categories: select ..., 6||7 as catx, 8||9||10 as caty from ... And at your anchor make the reference. pivot( count(CAT) for CAT in (1…
-
0
votes1
answer29
viewsA: How can I analyze several distinct elements in excel using 3 logics for the same column?
tl;dr I believe that to formulate SES solve your problem. Simple syntax Generally, the syntax of the SES function is: =SES([Algo é verdadeiro1, Valor se verdadeiro1,Algo é verdadeiro2,Valor se…
-
0
votes2
answers33
viewsA: how to delete the. bat file I am using
Add the command below in its condition, delete the . bat itself being executed: del %0 Be careful, save the content before, otherwise you will end up losing.
-
0
votes2
answers358
viewsQ: How to remove a pod and delete everything related to it
I have some pods, and I noticed that I just erase the pod in itself not yet liberated necessary computational resources, because I have a cluster with little resource. Using the command: kubectl…
kubernetesasked David 4,330 -
0
votes1
answer277
viewsQ: How to remove single container created with Docker-Compose
I have a file Docker-Compose.yml with various image settings. To upload all I can use the docker-compose up -d and stop docker-compose down, if I only want to upload a configured service…
docker-composeasked David 4,330 -
1
votes0
answers55
viewsQ: What’s the difference between Export and Save
I need to save the changes I made to an image in the container, and I wanted to understand the difference: docker export <CONTAINER ID> > /home/export.tar docker image save [OPTIONS] IMAGE…
-
0
votes3
answers37
viewsA: Select To view two-year billing sum
On line 6 you don’t need the ; Since I don’t know the type of column datger, we can change where this: AND datger BETWEEN TO_DATE... for: AND TRUNC(TO_DATE(datger,'yyyy/mm/dd')) BETWEEN TO_DATE...…
-
1
votes1
answer491
viewsA: Mysql query using INNER JOIN with HAVING
The clause HAVING is used to restrict the results returned by the clause GROUP BY Then the course code was added, and the clause GROUP BY: select cur_codigo, count(cur_codigo) from curriculo CUR…
-
1
votes1
answer41
viewsQ: How to find Wrapped objects in the database
I have a database with several objects Wrapped, and I need a way to search and locate all objects that are encrypted, ie with the wrap, to subsequently have a treatment. What are Wrapped objects:…
-
1
votes1
answer91
viewsA: How to add values of others in a new column? Ora-00904
The context that this being referenced is still with the data, one way to solve this would be by creating sub queries, from A,B,C and D and then using to create column E. Something like: SELECT…
-
0
votes1
answer39
viewsA: Automatic loop of the copy command
Since we do not know the size of the input text, then we will have to make a Dynamic Array, and go through each character and add the Enter in the end. program teste; var vetor :Array of String; n,i…
-
6
votes1
answer36
viewsA: Save difference between arrays in a new array
Using a logic similar to yours we have: def diff(a, b): b = set(b) return [row for row in a if row not in b] print(diff(a,b)) But I think it’s simpler: gap = list(set(a)-set(b)) print(gap)…
-
0
votes0
answers54
viewsQ: Problem collecting website information
I am trying to collect the data number of people helps in SOPT, ie my impact, to put in an api later, but is not extracting the information. Spider: import scrapy class StackOverflow(scrapy.Spider):…
-
1
votes1
answer82
views -
1
votes1
answer49
viewsA: Color percentage with php
You can use the library Colorextractor: This class can be used to extract the most common colors used in images. You can open an image file in GIF, JPEG or PNG format. It then traverses the image…
-
8
votes2
answers600
viewsA: Print only the last two digits of a year
We convert to string, then take only the last two characters: data = new Date().getFullYear().toString().substr(-2); console.log(data);…
-
1
votes1
answer40
viewsA: Reuse of Clause AND (ORACLE)
You can make the direct call JOIN of status and of el_field_id: ... from el_field_option elfo LEFT join el_field_option elfop_1 on elfop_1.el_field_option_parent_id = elfo.el_field_option_id and…
-
1
votes1
answer296
viewsA: How to add a vertical line in Google Chart?
Be able to do it that way, using role annotation, and specifying the type line, of which we can place a line at a certain point in the graph, in your case, the last point. for this we need to add a…
-
1
votes1
answer2763
viewsA: How to recover script history from PL/SQL
I assume you’re talking about the history of commands recently executed in the PL/SQL application, famous CTRL+E. I don’t think it’s possible. There is a table in Oracle that you can consult the…
-
0
votes1
answer1691
viewsA: Convert LONG column to VARCHAR2 in ORACLE - problem related to LONG column value size relative to VARCHAR2
tl;dr I don’t think it’s possible. The question, basis is, why does it need to be varchar2? This type stores only 4000 bytes1, as long as the LONGat maximum 2GB, logically the conversion would lose…
-
1
votes0
answers179
viewsQ: What are Oracle queues (Queue)
I was working on an Oracle database import, and during the import noticed the existence of objects of type queue, I’m used to procedures,functions,view, etc. The one in question had never seen. I’d…
-
3
votes1
answer55
viewsA: Number conversion
Basically you can use the function format: FORMAT ( value, format [, culture ] ) Using your example: format (194728472.48274487, 'c', 'pt-br') Check out an example created on sqlfiddle, seeing its…
-
0
votes2
answers259
viewsA: Send e-mail with various attachments
I believe that the pAnexo be a stringList, otherwise, change. And then pass this way: vIdAttachmentFile.Create(vIdMessage.MessageParts, pAnexo[i]); Another thing, check the ContentType:…
-
0
votes1
answer41
viewsA: Check if a process is not running to then run it on Windows
Thinking about the solution of your problem, recommend running the application as windows service, this way you can configure to start automatically, and if your application comes to fall even with…
-
2
votes2
answers88
viewsA: VARCHAR FOR NUMBER
Regarding the integrity of the data, it would be more interesting to change the type of the column, to decimal, if you have difficulty doing so, ask a question. Now if you can’t change the column…
-
1
votes1
answer376
viewsA: How to break line inside python dictionaries?
The format being saved as an object python, if the goal is only to display on the screen in a more organized way, we can convert to json and thus display: import json #seu código…
-
0
votes0
answers36
viewsQ: Know the last schema that was changed synonym
I have an Oracle server that has several schema, for the purpose of explanation, understand the metaphor: There are schema classified as LETTERS, and schema classified as NUMERIC, and several times…
-
1
votes4
answers3251
viewsA: Select first name? - Select in bank
From what I understand, you want to show only the names of all the players right? Resulting in something like this: João,Gaby,João,Rodrigo,Maria,Mario If so, first of all, you need to standardize…
-
1
votes1
answer33
viewsQ: Perform schema import by changing Grant and synonym
In one environment I have 5 schemas that make grant and synonym among themselves, of which they are already working. Now I need to duplicate that default environment for the customer environment,…
-
0
votes2
answers1389
viewsA: How to avoid invalid date error in a sub-shipment
It may be that formatting date and time of your database is not in the same pattern as trying to compare. Check the date and time formatting with the command: select sysdate from dual. If different,…
-
2
votes2
answers555
viewsA: Delphi - How to assign data in a multidimensional array in a single command?
I found a reply in Soen concerning the question Pass the multidimensional array as a Parameter in Delphi Converting to your case would look something like: type TMatrix = array[1..3,1..3] of Ttime;…
-
1
votes2
answers487
viewsA: Filter array by first letter
I don’t know if it’s the best way, but we can do it with the ng-show, validating if the first letter of the mark is equal to the letter of the grouping displays, otherwise ignore. Look how it turned…
-
0
votes1
answer167
viewsA: Save last entered value in parameterized variable
The plugin Persistent Parameter that solves the problem. Just add parameter type like "Persistent String Parameter: Thus the value entered in the parameter will be removed from the previous build…
-
0
votes1
answer167
viewsQ: Save last entered value in parameterized variable
I have a parameterized job in Jenkins, in case the variable is the number of a version, or a patch. That every time I build a digit. Would like to save the last entered value in the variable, so…
-
1
votes2
answers145
viewsA: Display message on screen from an object
Robert, to get the expected result, you need to concatenate the object items and display in a alert, for example. Note that to be able to extract the object name, we need to indicate which object…
javascriptanswered David 4,330 -
1
votes1
answer407
viewsA: Page does not load SCSS file
In order to compile the . scss file for . css you need to have Ruby installed (this is one of the ways). 1.Check if you have already installed: ruby -v if it returns something like: ruby 2.0.0p247…
-
0
votes4
answers344
viewsA: Convert a Select with 2 option HTML to 2 Buttons
What I was able to do was this, solving my problem, even if it is not in the best way, why the 2 buttons were below the login, but okay. function addElement(parentTag, elementTag, html) { // Adds an…
-
1
votes1
answer210
viewsA: Start and end of a month/year last in parameter (Oracle)
Instead of seeing date and time of start and end, let’s consider in the survey only the month and year. For this we need to truncate the date not to bring the time, then we change the time frame…
-
2
votes1
answer5466
viewsQ: How to test connection to SQL Server database
I have an application that connects to SQL Server, but in a client terminal is returning a random error. I wonder if there is a way to test the connection of this terminal with the Sqlserver server,…
-
2
votes1
answer3295
viewsA: Changing the language of osticket
You will need to download language pack. Go to page http://osticket.com/download, then select the Language Packages tab, and below you will get a listing with several translation packages. Then just…
installationanswered David 4,330 -
3
votes1
answer114
viewsA: order by specific text
You could create a ranking column. From what I understand there are few records, so creating a classification column, you could give a numbering for each of the record of your listing, so in the…
-
1
votes1
answer29
viewsA: Erasing OBJECT_TYPE from Oracle
You can’t have one SYNONYM and one other TYPE by the same name. SYNONYM is a TYPE, as well as TABLE,PROCEDURE,FUNCTION, etc.. From what I understand, you’d have some options: Removes the SYNONYM.…
-
3
votes1
answer278
viewsA: Fieldbyname bold parameter
To bold part of the text using RichEdit (I don’t have the component RichText), we have to select the word we want to put in bold inside the text. For this we need to find it. So I created a function…
-
0
votes1
answer38
viewsA: Delete Rows from a table except a MYSQL amount
Delete LIMIT We can’t limit the number of rows, one way to do that, is to create a temporary table limiting the number of rows, and then we remove the original table and recreate it based on the…
-
2
votes2
answers65
viewsA: Javascript : How to make an Andom based on time?
Generated a random number of 2 digits and concatenated the formatted date, as its example, follows: var d = new Date(); var nAleatorio = (Math.random() * 89)+10 var nAleatorio = nAleatorio…
javascriptanswered David 4,330 -
1
votes1
answer1397
viewsA: User permission in Oracle tables
Accessing as DBA/SYS: SELECT * FROM dba_tab_privs dtp WHERE dtp.privilege = 'SELECT' AND dtp.GRANTEE = 'USER' -- Usuário para quem o acesso foi concedido
-
0
votes2
answers30
viewsA: Mysql Help to Return Unavailable Days for Scheduling
And if you restrict the query by making a subselect to filter only the days: SELECT day FROM holidays h WHERE h,day in (SELECT day FROM special_days WHERE will_work = FALSE);…
-
1
votes2
answers72
viewsA: Why is OR not good in a LEFT JOIN?
Use the OR with LEFT JOIN, lets the query slow, an alternative is to use the UNION. FROM LEFT JOIN administracao.cidade cid ON (cid.cid_cd_cidade = cec.cec_cd_cidade) UNION FROM LEFT JOIN…
-
2
votes3
answers1819
viewsQ: Create shortcut for complex commands in CMD
I use the command taskkill /f /im nome.exe to stop lawsuits, because the same for all processes with the same name. I’d like to raid that command for something like tk nome.exe. I tried to create an…
-
1
votes1
answer248
viewsA: Substitution of specific words
You can use the function str_replace, using arrays: $texto = "pedro foi ao mercado"; $de = array("mer", "foi"); $para = array("cobre", "casa"); $novafrase = str_replace($de, $para, $texto); echo…