Categories
Mastering Development

Make two different queries into one removing view

I need a single query from these two queries removing the The VIEW. Following is the query —–Query_1 Create View t as SELECT DISTINCT C.Branch_ID+”+ CAST(C.Wait_No AS NVARCHAR(20)) [WaitNumber], W.LASTNAME + ‘, ‘ + W.FIRSTNAME + ‘ ‘ + W.TITLE [Waiter], Customer_In_Time, Customer_Out_Time, Date, Table_No FROM Customers C LEFT JOIN Waitor_Resources WR ON C.Wait_No = […]

Categories
CMS Magento Mastering Development

Date field, force using english locale

I would like to add a date field with calendar that uses english language format. So the date should look like 01 february 2011. Problem is that my locale is italian. How to change format and force it to use english locale? Here’s my actual code $fieldset->addField(‘created_at’, ‘date’, array( ‘label’ => Mage::helper(‘review’)->__(‘Review Date’), ‘name’ => […]

Categories
Linux Mastering Development Ubuntu

In Ubuntu 20.04, I cannot get the displayed time on menu bar to show day, date and time including seconds [NOT a duplicate ;-)]

Sorry, as this was closed, but the duplicate it pointed to didn’t solve the issue, as recommended: I have recently updated my laptop from 17.10 to 20.04. One of the features I liked was that quite easily I was able to display on my menu bar the time with day, date, and time including seconds. […]

Categories
Linux Mastering Development Ubuntu

In Ubuntu 20.04, I cannot get the displayed time on menu bar to show day, date and time including seconds [duplicate]

I have recently updated my laptop from 17.10 to 20.04. One of the features I liked was that quite easily I was able to display on my menu bar the time with day, date, and time including seconds. I have tried to install GNOME Shell Extensions so I can install e.g. Clock Override. But(!), having […]

Categories
Mastering Development

Python MySQL Dynamic Insert – Column Name as Variable, Values as Variables

I am trying to create a function that populates a MySQL table. The function receives several variables as inputs: Symbol Var_Date Stat_Name Stat_Value The value of Stat_Name changes as the code runs, eg Enterprise_Value, Profit_Margin, EBITDA – these are the column names within the table. Stat_Value is the data that goes into the rows. This […]

Categories
Linux Mastering Development

using awk how can i make row so i need to have 14-0273 under ID so making different columns for different stuff

ID,Date,DateType,Age,Sex,Race,ResidenceCity,ResidenceCounty,ResidenceState,DeathCity,DeathCounty,Location,LocationifOther,DescriptionofInjury,InjuryPlace,InjuryCity,InjuryCounty,InjuryState,COD,OtherSignifican,Heroin,Cocaine,Fentanyl,FentanylAnalogue,Oxycodone,Oxymorphone,Ethanol,Hydrocodone,Benzodiazepine,Methadone,Amphet,Tramad,Morphine_NotHeroin,Hydromorphone,Other,OpiateNOS,AnyOpioid,MannerofDeath,DeathCityGeo,ResidenceCityGeo,InjuryCityGeo 14-0273,06/28/2014 12:00:00 AM,DateReported,,,,,,,,,,,substance,,,,,"Acute fent, hydrocod, benzodiazepine",,,,Y,,,,,Y,Y,,,,,,,,,Accident,"CT (41.575155, -72.738288)","

Categories
Mastering Development

How can I design a database for ordering food as a waiter

I have these tables: User (Username PK, password) Order (OrderId PK,date,nettotal,userid FK_User_Order) FoodItem(FoodID PK,Price) OrderDetails(DetailId PK,OrderId FK_Order_OrderDetails,FoodID FK_Food_OrderDetails,quantity,totalsum) OrderDetails have the details when a user is ordering food, with each row representing one of the items. Per example: If a user ordered 2 pizzas (Food Id=1) and 1 burger (FoodId=2) I would expect my OrderDetails […]

Categories
Mastering Development

Spark Scala dynamic comparing of all similar dataframe columns

I am trying to compare columns in a JOINed table / relation that have similar names as a result of the JOIN – which can be qualified with l. or r. I note the columns function for a DF is a little imho inconsistent. I am nearly there, but there is a bug. The code […]

Categories
Mastering Development

Share Id’s with other Users

I want the users on my website to be able to share their products with each other. So it is currently the case that each user can only see his own products (it’s divided by userId) but now I want it to be like this User A his product with User B or User C […]

Categories
Linux Mastering Development

Showing both date and time in a single column

I am extracting time series data from NetCDF using Climate data operator. It has the option to extract Date as well as time separately. I have used cdo -outputtab,date,time,value -remapnn,lon=-85.25_lat=31.57 -select,name=pr pr.sample.nc> out1.csv However, I have like to merge this date and time in a single column. [1]: https://i.stack.imgur.com/28CVP.png [![enter image description here][1]][1] Here is […]