How to analyze what set of ten numbers is repeated? (LOTTO) - regex

How to analyze what set of ten numbers is repeated?
Each set has 20 different numbers. From 1 to 80.
How to do it in EmEditor text editor?
Example:
03,04,05,09,12,15,20,24,26,28,31,33,35,37,43,48,64,70,72,75
06,05,07,10,12,15,21,24,30,28,31,39,35,37,43,49,64,70,72,76
CSV File:
https://www25.zippyshare.com/v/0gLFugWf/file.html

This uses the Bookmark Duplicates dialog to bookmark all duplicates.
Change the User-defined CSV format to use the ";" delimiter. If you don't see the CSV toolbar, go to View | Toolbars | CSV/Sort toolbar. Go to Customize CSV for User-defined format and change Delimiter to ";". Press OK, then click on User-defined separated to go to view the file as a table.
Go to Delete/Bookmark Duplicate Lines (Advanced).
Change the settings like in the screenshot. I'm only looking for duplicates in the lotto numbers. Press the Bookmark button.
At this point, the duplicate entries are bookmarked. The status bar at the bottom shows the number of duplicates. You can navigate the bookmarks with F2 and shift+F2.

Related

How to replace a column value using PowerQuery editor

I'm relatively new to Power Query. I'm looking for the best way to replace a column's value as below.
The column has date values in a mixed format such as below.
09/16/2022
09/20/2022
09/26/2022
09/30/2022
10-01-2022
10-03-2022
10-05-2022
I'm looking to standardize and make the format generic as below.
09-16-2022
09-20-2022
09-26-2022
09-30-2022
10-01-2022
10-03-2022
10-05-2022
It seems one of the ways to implement this is to use Advanced Editor and build M queries to implement the replacement, functions like Table.TransformColumns and Text.Replace.
'can't figure out the exact code to be used with this or if there is a better way.
Looking for suggestions. Thanks.
If you're a beginner, let the UI write this code for you. Highlight the column by clicking the column header, go to Transform on the ribbon and click Replace Values. Replace "-" with "/" and click OK.
Finally right click the column header again, click Change Type and then select Date.
In M code you could use:
Table.TransformColumns(#"Previous Step",{{"Column Name", each Text.Replace(_,"/","-")}})
As an example:
let
//create sample table
Source = Table.FromColumns(
{{"09/16/2022",
"09/20/2022",
"09/26/2022",
"09/30/2022",
"10-01-2022",
"10-03-2022",
"10-05-2022"}},
type table[dates=text]),
//replace "/" with "-"
Normalize = Table.TransformColumns(Source,{{"dates", each Text.Replace(_,"/","-"), type text}})
in
Normalize
Source
Results
Notes:
Original data is dates as text strings
Final data is also dates as text strings
To convert the strings to dates, you could use, instead, something like: Table.TransformColumns(Source,{{"dates", each Date.From(_, "en-US"), type date}}) but the separator would be in accord with your Windows Regional date settings.

How do I disable the hyperlink in Power BI Text Boxes?

If I add a Measure to a Text Box that simply calls the TODAY() function, the date becomes a hyperlink on the Report Tab.
How do I disable this hyperlink? I simply want to show today's date.
The steps that I used to add a Measure to the text box are below.
In the Data Page, create a Measure named Report Date = TODAY().
On the Visuals Page, click Text box in the Insert group of the Home tab of the ribbon bar.
Click + Value
In the text box labeled How would you calculate this value, type Report Date.
Click Save.
The text box now shows todays date. However, it is also a hyperlink with nowhere to go.
The only alternative is a Card or a Table.
I was able to produce a nice business card by using a calculated column like:
CardText = [clientdescription] & UNICHAR(10) & [ServiceContactName] & UNICHAR(10) & [ServiceAddress1] & UNICHAR(10) & [ServiceCity] & ", " & [ServiceState] & " " & [ServiceZipCode]
and set the Text box to CardText.
The UNICHAR(10) function embeds a line break in the CardText string.
This is nice because you can left-align the text (which you cannot do with a Card Visual).
This also updates when aligned with a Slicer.
However, the Text box shows the CardText as a hyperlink. There is no hyperlink address, and therefore, nothing to remove.
A text box that simply allows us to set text, alignment and all font properties (color, weight, font, size, italics, underline, bold, etc.) would be a godsend.
When the report is published, there will be no hyperlink behaviour on the date in the text box. The hyperlink behaviour is only present in Power BI desktop. Clicking on the hyperlink will open up the settings for the value, so you can edit them.
And you can totally control the font, size, color, etc of that text. Just select the date as it shows in the text box and use the formatting tools. Like with Constantia font in 16 pt and pink.
If you don't want the hyperlink behaviour, consider using the measure in the Title of the text box instead of the body. You can also add the measure to the title of any other visual. To do that, you first need a measure that returns text, since the Title of a visual cannot show dates.
ReportDateText = format(TODAY(),"dddd, dd MMM YYYY")
Now you can edit the title property of a visual.
Turn the title on
Click the formula button to open the dialog
Select the measure with the text version of the date
The result shows in the visual's title.

How get display value of checkbox in a checkbox group?

I am using APEX 21.1. I have a checkbox group whose list of values is retrieved using a query...
select disease, id from history;
The query returns many checkboxes. I have another textarea item. I need to get the display value for any checkbox whenever it's checked and set item HISTORY to that value. How to do so?
Describing a how-to would be so much easier if you had provided some example page item names and example data. So, lets call your checkbox group P10_CHECKBOX and your textarea P10_TEXT.
Usually, your checkbox group will save the item ids as a colon seperated list, like this: 3:4:5
To display the corresponding display values, make a dynamic action on change on your item P10_CHECKBOX.
Then, use an action of type Execute PL/SQL Code to fetch the display values of your items.
The code could look like this:
select listagg(disease,chr(10)) within group (order by disease) into :P10_TEXT
from history h
join table(apex_string.split_numbers(:P10_CHECKBOX,':')) t on (h.id = t.column_value);
apex_string.split_numbers will convert your colon list into an actual "table" with the column column_value you can use in the join clause. listagg will do the actual concatenation and will work up to a couple thousand characters. chr(10) is an ordinary line break and will have your items be shown line by line, but any other seperator will do.
Last step is to set up P10_CHECKBOX in your Items to submit and P10_TEXT in your Items to return.
Now, whenever you click a checkbox, the textarea will be updated immediately.

Popup LOV with multiple values on Interactive Grid displays APEX 19.2

I'm using Oracle Apex 19.2 and I have an editable interactive grid with a POP LOV.
Multiple Values is checked
Display As is set to Modal Dialog
My List of Values is a SQL Query:
select name as d, id as r from table_x
I have two issues and I don't think I found a good question on SO that solves it:
Although the modal shows the human readable names to select from, once a record is Saved AND there's more than one value selected, the cell is displayed as ID1:ID2:ID3.... instead of NAME1:NAME2:NAME3...
IF the "name" is a string and not a number AND multiple values are selected THEN an "ORA-01722: invalid number" occurs
Note that in both cases, as long as only 1 value is selected there is no issues with saving.
I understand the storing the field with colons however I'm talking about the visible grid for the user. It should not show the user colon separated IDs after save but show the user list of users for example.
For example, here's a list of room numbers (100, 101...) and they correspond to IDs (3, 7 , 4)
I would suspect after I save, the table still shows 100, 101, .. NOT the IDs to the user.
Any thoughts anyone?

Column as link in APEX 5 IR region

I have APEX 5 app and want to create Interactive Report region with pl/sql source. What I want is to have some columns as link to another page. But, when I put in select, for example, select d_01, ..., '' || d_26 || '' d_26 I get column d_26 as text a href="f? ..., but not value as link.
What am I doing wrong?
You will have to unescape special characters of the column. Change Columns > Security > Escape special characters property of link column to No
Also, you can do this in a declarative way by changing Column Type from Plain Text to Link and then linking it to the desired page.