Categories
Database Development

Add Total Row To PIVOT Query

I want to add a TOTAL monthly row to my query, below is my DDL, how can I have an additional row, under the last employeename that is labeled TOTAL and it shows the SUM() of the sales for ALL employees for that month? Create Table #empSales ( employeename varchar(100) ,saleamt decimal(10,2) ,saleMonth varchar(100) ) […]

Categories
Mastering Development

Caught in an endless loop with my C program

In my C program, I have a function (datecheck), to check for valid date entries, but I’m caught in an endless loop. What can I put in there to get out? I’ve tried return and break commands in "if loops", but they haven’t worked. It is using struct datee get_date and struct datee, and month. […]

Categories
Apple User Help

How do I set the finder view to only list files and folder by name and not group by date modified?

I’m using Mojave. I like to have all folders displayed in list view and sorted by name. I set the finder view options to sort by name, unchecked "Use relative dates" and clicked "Use as Defaults". But if I go to upload a file, the finder groups files and folders by date modifed (today, yesterday, […]

Categories
Mastering Development

ChartJS Bar Issue – Showing “zeros” and not center bars

Im having some trouble with ChartJs and hope you can help. I would like to create a Bar Chart where: Zero Lables that only contains dataset with zeros are not showing If only one data value in a chart it is cen I have added the code example here at codepen: Link to ChartJs CodePen […]

Categories
User Help

How to use XLOOKUP with an dynamic row count?

At the result cell C2 =XLOOKUP(B2:B10, {“Jan”,”Feb”,”Mar”,”Apr”,”May”,”Jun”,”Jul”,”Aug”,”Sep”,”Oct”,”Nov”,”Dec”}, {1,2,3,4,5,6,7,8,9,10,11,12}) The first column A is all text. I want to convert to the month number. Assuming the number of rows of the table might change (say to 100), then the lookup range B10 might need to be B100 instead of the initial B10. How to do it? […]

Categories
Mastering Development

Datepicker with AlpineJS

I have been working with some of the code samples for AlpineJS. At first the code would only do the year 2020, and would not move past December 2020. I have managed to get the code to go past 2020 now, however the dates do not update in the calendar view and I cant see […]

Categories
Mastering Development

Line chart legend border style using react-chartjs-2

Is it possible to make the legend box of dashed line in line chart to have no dashed border? I read about generateLegend() and legendCallback but I can’t understand how it works in react-chartjs-2 together with React functional component. Also, I’m not sure if they can be used to change the border style of legend. […]

Categories
Mastering Development

How to call a class formular from a tabulation (ttk.Notebook)?

I have two python files: entrepreneur.py and main.py. The first one have a class with a tkinter form (input general information about the person). The second file is a main file that have many tabs (tkinter Notebook). I want to call the class from the first file to be in the 1st tab, but when […]

Categories
Mastering Development

How to split the spark dataframe into 2 using ratio given in terms of months and the unix epoch column?

I wanted to split the spark dataframe into 2 using ratio given in terms of months and the unix epoch column- sample dataframe is as below- unixepoch ——— 1539754800 1539754800 1539931200 1539927600 1539927600 1539931200 1539931200 1539931200 1539927600 1540014000 1540014000 1540190400 1540190400 1540190400 1540190400 1540190400 1540190400 1540190400 1540190400 1540190400 1540190400 1540190400 1540190400 1540190400 strategy of splitting- […]

Categories
Mastering Development

creating generic enum wrapper for validations

disclaimer: not very strong with generics. enum WeekDays { SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY; } enum Months { JANUARY, FEBRAURY, MARCH, APRIL, MAY, JUNE, JULY, AUGUST, SEPTEMBER, OCTOBER, NOVEMBER, DECEMBER; } enum Directions { East, West, North, South, Up, Down } Lets say i have above enums and there is a service which […]