InputHint

Hi, I am building a bot where whenever the user is giving any input through speech, the bot will automatically open the microphone to go to the listening mode. Basically, I have to give expecting inputhint i know that. But i don't know whether it applies to all the dialog files as well when i am going from messagescontroller to some other files. Please help me
MessagesController.cs:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
using System.Web.Http;
using Microsoft.Bot.Builder.Dialogs;
using Microsoft.Bot.Connector;
using System.Web.Http.Description;
using System.Speech;
using Microsoft.Bot.Builder.History;
using Autofac;
using System.IO;
namespace POSBot
{
[BotAuthentication]
public class MessagesController : ApiController
{
///
/// POST: api/Messages
/// receive a message from a user and send replies
///
///
[ResponseType(typeof(void))]
public virtual async Task Post([FromBody] Activity activity)
{
// check if activity is of type message
if (activity.GetActivityType() == ActivityTypes.Message)
{
var connector = new ConnectorClient(new Uri(activity.ServiceUrl));
Activity isTypingReply = activity.CreateReply();
isTypingReply.Type = ActivityTypes.Typing;
await connector.Conversations.ReplyToActivityAsync(isTypingReply);
await Conversation.SendAsync(activity, () => new RootDialog());
}
else
{
await HandleSystemMessageAsync(activity);
}
return new HttpResponseMessage(System.Net.HttpStatusCode.Accepted);
}
    private async Task<Activity> HandleSystemMessageAsync(Activity message)
    {
        if (message.Type == ActivityTypes.DeleteUserData)
        {
            // Implement user deletion here
            // If we handle user deletion, return a real message
        }
        else if (message.Type == ActivityTypes.ConversationUpdate)
        {
            // Handle conversation state changes, like members being added and removed
            // Use Activity.MembersAdded and Activity.MembersRemoved and Activity.Action for info
            // Not available in all channels
            if (message.MembersAdded.Any(o => o.Id == message.Recipient.Id))
            {
                ConnectorClient client = new ConnectorClient(new Uri(message.ServiceUrl));
                var reply = message.CreateReply();
                reply.Text = "Hi, are you having a POS or EID issue.";
                reply.Speak = "Hi, are you having a P O S or E I D issue.";
                reply.InputHint = InputHints.ExpectingInput;
                await client.Conversations.ReplyToActivityAsync(reply);
            }
        }
        else if (message.Type == ActivityTypes.ContactRelationUpdate)
        {
            // Handle add/remove from contact lists
            // Activity.From + Activity.Action represent what happened
        }
        else if (message.Type == ActivityTypes.Typing)
        {
            // Handle knowing tha the user is typing
        }
        else if (message.Type == ActivityTypes.Ping)
        {
        }
        return null;
    }
}

}
RootDialog.cs
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Bot.Builder.Dialogs;
using Microsoft.Bot.Connector;
namespace POSBot
{
public class RootDialog : IDialog
{
public Task StartAsync(IDialogContext context)
{
context.Wait(MessageReceivedAsync);
return Task.CompletedTask;
}
    public async Task MessageReceivedAsync(IDialogContext context, IAwaitable<object> result)
    {
        var activity = await result as Activity;
        await context.Forward(new BasicLuisDialog(), ResumeAfterBasicLuisDialog, activity, CancellationToken.None);
    }

    public async Task ResumeAfterBasicLuisDialog(IDialogContext context, IAwaitable<object> result)
    {
        context.Wait(MessageReceivedAsync);
    }
}

}
BasicLuisDialog.cs
using Microsoft.Bot.Builder.Dialogs;
using Microsoft.Bot.Builder.Luis;
using Microsoft.Bot.Builder.Luis.Models;
using Microsoft.Bot.Connector;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Threading.Tasks;
namespace POSBot
{
[Serializable]
public class BasicLuisDialog : LuisDialog
{
public int noneattempt = 0;
public int issueattempt = 0;
public int posattempt = 0;
public int eidattempt = 0;
public BasicLuisDialog() : base(new LuisService(new LuisModelAttribute(
ConfigurationManager.AppSettings["LuisAppId"],
ConfigurationManager.AppSettings["LuisAPIKey"],
domain: ConfigurationManager.AppSettings["LuisAPIHostName"])))
{
}
public List none = new List
{
"Sorry, I cannot understand your query",
"Sorry, I am unbale to handle that",
"Sorry, I am not trained for that",
"Sorry, I did not get you",
"Sorry, I did not follow"
};
public List issue = new List { "POS Open Fail", "Merge EID" };
public string myissue;
public string theissue;
[LuisIntent("None")]
public async Task NoneIntent(IDialogContext context, LuisResult result)
{
noneattempt++;
string mynone = new GlobalHandler().GetRandomString(none);
if (noneattempt >= 2)
{
await context.SayAsync(text: mynone+"...", speak: mynone);
await new TransferToAPerson().StartAsync(context);
}
else
{
await context.SayAsync(text: mynone+"...", speak: mynone);
context.Wait(this.MessageReceived);
}
}
[LuisIntent("Issue")]
public async Task IssueIntent(IDialogContext context, LuisResult result)
{
string prompt = "Okay, tell me what is your issue?";
string retryprompt = "Please try again";
var promptOptions = new PromptOptions(prompt: prompt, options: issue, retry: retryprompt, speak: prompt, retrySpeak: retryprompt, promptStyler: new PromptStyler());
PromptDialog.Choice(context, Issue, promptOptions);
}
public async Task Issue(IDialogContext context, IAwaitable result)
{
this.myissue = await result;
if (myissue.ToLower().Contains("pos") || myissue.ToLower().Contains("open") || myissue.ToLower().Contains("fail"))
{
await new POSOpenFail().StartAsync(context);
}
else if (myissue.ToLower().Contains("eid") || myissue.ToLower().Contains("merge") || myissue.ToLower().Contains("id"))
{
await new EIDMerge().StartAsync(context);
}
}
[LuisIntent("ReportOpenFailError")]
public async Task ReportOpenFailErrorIntent(IDialogContext context, LuisResult result)
{
List choices = new List { "Yes", "No" };
string prompt = "Are you calling for POS Open Fail?";
string retryprompt = "Please try again";
string promptspeak = "Are you calling for p o s open fail?";
var promptOptions = new PromptOptions(prompt: prompt, options: choices, retry: retryprompt, speak: promptspeak, retrySpeak: retryprompt, promptStyler: new PromptStyler());
PromptDialog.Choice(context, ConfirmPOS, promptOptions);
}
public async Task ConfirmPOS(IDialogContext context, IAwaitable result)
{
string confirm = await result;
if (confirm.ToLower() == "yes")
{
await new POSOpenFail().StartAsync(context);
}
else
{
posattempt++;
if (posattempt == 2)
{
await new TransferToAPerson().StartAsync(context);
}
else
{
await context.SayAsync(text: "Let's try again", speak: "Let's try again");
await POS(context);
}
}
}
public async Task POS(IDialogContext context)
{
List choices = new List { "Yes", "No" };
string prompt = "Are you calling for POS Open Fail?";
string retryprompt = "Please try again";
string promptspeak = "Are you calling for p o s open fail?";
var promptOptions = new PromptOptions(prompt: prompt, options: choices, retry: retryprompt, speak: promptspeak, retrySpeak: retryprompt, promptStyler: new PromptStyler());
PromptDialog.Choice(context, ConfirmPOS, promptOptions);
}
[LuisIntent("EIDMerge")]
public async Task EIDMergeIntent(IDialogContext context, LuisResult result)
{
List choices = new List { "Yes", "No" };
string prompt = "Are you calling for Merge EID";
string retryprompt = "Please try again";
string promptspeak = "Are you calling for merge e i d?";
var promptOptions = new PromptOptions(prompt: prompt, options: choices, retry: retryprompt, speak: promptspeak, retrySpeak: retryprompt, promptStyler: new PromptStyler());
PromptDialog.Choice(context, ConfirmEID, promptOptions);
}
public async Task ConfirmEID(IDialogContext context, IAwaitable result)
{
string confirm = await result;
if (confirm.ToLower() == "yes")
{
await new EIDMerge().StartAsync(context);
}
else
{
eidattempt++;
if (eidattempt == 2)
{
await new TransferToAPerson().StartAsync(context);
}
else
{
await context.SayAsync(text: "Let's try again", speak: "Let's try again");
await EID(context);
}
}
}
public async Task EID(IDialogContext context)
{
List choices = new List { "Yes", "No" };
string prompt = "Are you calling for Merge EID";
string retryprompt = "Please try again";
string promptspeak = "Are you calling for merge e i d?";
var promptOptions = new PromptOptions(prompt: prompt, options: choices, retry: retryprompt, speak: promptspeak, retrySpeak: retryprompt, promptStyler: new PromptStyler());
PromptDialog.Choice(context, ConfirmEID, promptOptions);
}
}
}
EIDMerge.cs
using Microsoft.Bot.Builder.Dialogs;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace POSBot
{
[Serializable]
public class EIDMerge : BasicLuisDialog, IDialog
{
static GlobalHandler.EID eid = new GlobalHandler.EID();
List assistance = eid.assistance;
List level = eid.level;
List support = eid.support;
List merge = eid.merge;
public async Task StartAsync(IDialogContext context)
{
List choices = new List { "Yes", "No" };
string prompt = new GlobalHandler().GetRandomString(merge);
string retryprompt = "Please try again";
var promptOptions = new PromptOptions(prompt: prompt, options: choices, retry: retryprompt, speak: prompt, retrySpeak: retryprompt, promptStyler: new PromptStyler());
PromptDialog.Choice(context, MergeConfirm, promptOptions);
}
public async Task MergeConfirm(IDialogContext context, IAwaitable result)
{
string confirm = await result;
if (confirm.ToLower() == "yes")
{
await new CreateLMSTicket().StartAsync(context);
}
else
{
await context.SayAsync(text: "A Person Merge needs to be completed.", speak: "A Person Merge needs to be completed.");
string help = "Do you need assistance with the Person Merge Process, information about what Person Merge is, or training and instructions for Global Account Manager?";
await context.SayAsync(text: help, speak: help);
string prompt = "Please select one option";
string retryprompt = "Please try again";
var promptOptions = new PromptOptions(prompt: prompt, options: assistance, retry: retryprompt, speak: prompt, retrySpeak: retryprompt, promptStyler: new PromptStyler());
PromptDialog.Choice(context, Assistance, promptOptions);
}
}
public async Task Assistance(IDialogContext context, IAwaitable result)
{
string assistance = await result;
if (assistance.ToLower().Contains("person merge assistance"))
{
string prompt = "Is the Person Merge needed for a store level employee or staff level employee?";
string retryprompt = "Please try again";
var promptOptions = new PromptOptions(prompt: prompt, options: level, retry: retryprompt, speak: prompt, retrySpeak: retryprompt, promptStyler: new PromptStyler());
PromptDialog.Choice(context, Level, promptOptions);
}
else if (assistance.ToLower().Contains("person merge information"))
{
await context.SayAsync(text: "A Person Merge is required whenever an employee who has training associated with a prior EID acquires a new EID.The Person Merge process transfers all learning transcripts to the new EID to ensure the employee's records include all past training. This allows employees to have one training transcript with their entire training history.", speak: "A Person Merge is required whenever an employee who has training associated with a prior E I D acquires a new E I D. The Person Merge process transfers all learning transcripts to the new E I D to ensure the employee's records include all past training. This allows employees to have one training transcript with their entire training history. A store was acquired by a new O/O and the new O/O created new e i ds for managers.");
await context.SayAsync(text: "An employee may require a Person Merge in a number of situations, including the following: • The employee has transferred to a new organization and a new EID was created for them • The employee left the company and came back and new EID was created for them • EIDs can be disabled manually when an employee leaves the company • EIDs are disabled automatically after 6 months of inactivity • The employee was promoted from crew trainer to manager • A store was acquired by a new O/ O and the new O/ O created new EIDs for managers", speak: "An employee may require a Person Merge in a number of situations, including the following. The employee has transferred to a new organization and a new e i d was created for them. The employee left the company and came back and new e i d was created for them. E i ds can be disabled manually when an employee leaves the company. E i ds are disabled automatically after 6 months of inactivity. The employee was promoted from crew trainer to manager. A store was acquired by a new O/O and the new O/O created new EIDs for managers.");
List choices = new List { "Yes", "No" };
string prompt = "Do you need assistance with a Person Merge now?";
string retryprompt = "Please try again";
var promptOptions = new PromptOptions(prompt: prompt, options: choices, retry: retryprompt, speak: prompt, retrySpeak: retryprompt, promptStyler: new PromptStyler());
PromptDialog.Choice(context, InfoResume, promptOptions);
}
else if (assistance.ToLower().Contains("global account manager"))
{
string gam = "For training, instructions, and additional information on Global Account Manager, please see the Global Account Manager Launch and Learn presentation on Access, or contact GAM Support at<EMAIL_ADDRESS>await context.SayAsync(text: gam, speak: gam);
await context.SayAsync(text: "Press this link to see the presentation: https://www.canva.com", speak: "Press this link to see the presentation");
await context.SayAsync(text: "Press this link to contact us: https://www.canva.com", speak: "Press this link to contact us");
var incidentNumber = "E" + new Random().Next(1000, 9999);
await new CloseContact().Start(context, incidentNumber);
}
}
public async Task InfoResume(IDialogContext context, IAwaitable result)
{
string confirm = await result;
        if (confirm.ToLower() == "yes")
        {
            await PersonAssist(context);
        }
        else
        {
            await context.SayAsync(text: "So you do not need assistance.", speak: "So you do not need assistance.");
            var incidentNumber = "E" + new Random().Next(1000, 9999);
            await new CloseContact().Start(context, incidentNumber);
        }
    }
    public async Task PersonAssist(IDialogContext context)
    {
        string prompt = "Is the Person Merge needed for a store level employee or staff level employee?";
        string retryprompt = "Please try again";
        var promptOptions = new PromptOptions<string>(prompt: prompt, options: level, retry: retryprompt, speak: prompt, retrySpeak: retryprompt, promptStyler: new PromptStyler());
        PromptDialog.Choice(context, Level, promptOptions);
    }
    public async Task Level(IDialogContext context, IAwaitable<string> result)
    {
        string level = await result;
        if (level.ToLower().Contains("staff"))
        {
            await context.SayAsync("Contact the Corporate help desk through service cafe or at<PHONE_NUMBER> to assist with the eid merge.", speak: "Contact the Corporate help desk through service cafe or at<PHONE_NUMBER> to assist with the e i d merge.");

            var incidentNumber = "E" + new Random().Next(1000, 9999);
            await new CloseContact().Start(context, incidentNumber);
        }
        else if (level.ToLower().Contains("store"))
        {
            await new CreateLMSTicket().StartAsync(context);
        }
    }
}

}
CreateLMSTicket.cs
using Microsoft.Bot.Builder.Dialogs;
using Microsoft.Bot.Connector;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace POSBot
{
[Serializable]
public class CreateLMSTicket : BasicLuisDialog, IDialog
{
static GlobalHandler.LMS lms = new GlobalHandler.LMS();
string f = lms.firstname;
string fr = lms.freceive;
string l = lms.lastname;
string lr = lms.lreceive;
string ph = lms.phonenumber;
string phr = lms.phreceive;
string str = lms.storenumber;
string strr = lms.strreceive;
string petxt = lms.previouseidtext;
string pespk = lms.previouseidspeak;
string petxtr = lms.ptxtreceive;
string pespkr = lms.pspkreceive;
string netxt = lms.neweidtext;
string nespk = lms.neweidspeak;
string netxtr = lms.ntxtreceive;
string nespkr = lms.nspkreceive;
string pos = lms.position;
string posr = lms.posreceive;
string complete = lms.fcom;
string pf = lms.pfirstname;
string pl = lms.plastname;
string pph = lms.pphone;
string pstr = lms.pstore;
string ppetxt = lms.ppetxt;
string ppespk = lms.ppespk;
string pnetxt = lms.pnetxt;
string pnespk = lms.pnespk;
string ppos = lms.ppos;
List choices = new List { "Yes", "No" };
public List option = new List { "Redo the form fill up", "Change any field", "Cancel the operation" };
public List details = new List { "First Name", "Last Name", "Phone Number", "Store Number", "Previous EID", "New EID", "Position", "No change" };
public string FirstName;
public string LastName;
public string PhoneNumber;
public string StoreNumber;
public string Store;
public string Previouseid;
public string PreviousEID;
public string Neweid;
public string NewEID;
public string Position;
public async Task StartAsync(IDialogContext context)
{
await context.SayAsync(text: "A ticket needs to be created to send to LMS.", speak: "A ticket needs to be created to send to LMS.");
await context.SayAsync(text: "Please provide all the required information on the screen.", speak: "Please provide all the required information on the screen.");
string prompt = "Do you want to Proceed?";
string retryprompt = "Please try again";
var promptOptions = new PromptOptions(prompt: prompt, options: choices, retry: retryprompt, speak: prompt, retrySpeak: retryprompt, promptStyler: new PromptStyler());
PromptDialog.Choice(context, Submission, promptOptions);
}
public async Task Submission(IDialogContext context, IAwaitable result)
{
string choice = await result;
if (choice.ToLower() == "yes")
{
await First(context);
}
else
{
await context.SayAsync(text: "You have cancelled the operation. You can again start a New conversation by asking me things like 'Error in POS Open', 'EID Merge', etc", speak: "You have cancelled the operation. You can again start a new conversation by asking me things like 'Error in P O S open', 'e i d merge', etc");
context.Wait(this.MessageReceived);
}
}
public async Task First(IDialogContext context)
{
await context.SayAsync(text: f, speak: f);
context.Wait(FirstNameReceived);
}
public async Task FirstNameReceived(IDialogContext context, IAwaitable activity)
{
var FN = await activity;
this.FirstName = FN.Text;
await context.SayAsync(text: fr + this.FirstName, speak: fr + this.FirstName);
await Last(context);
}
public async Task Last(IDialogContext context)
{
await context.SayAsync(text: l, speak: l);
context.Wait(LastNameReceived);
}
public async Task LastNameReceived(IDialogContext context, IAwaitable activity)
{
var LN = await activity;
this.LastName = LN.Text;
await context.SayAsync(text: lr + this.LastName, speak: lr + this.LastName);
await Phone(context);
}
public async Task Phone(IDialogContext context)
{
await context.SayAsync(text: ph, speak: ph);
context.Wait(PhoneNumberReceived);
}
public async Task PhoneNumberReceived(IDialogContext context, IAwaitable activity)
{
var PH = await activity;
int flag = 0;
foreach (var c in PH.Text.ToCharArray())
{
if (!char.IsNumber(c) && c!='-')
{
flag = 1;
break;
}
}
if (flag == 1)
{
await context.SayAsync(text: "Phone number cannot contain any characters. Try again...", speak: "Phone number cannot contain any character. Try again");
await Phone(context);
}
else
{
if (PH.Text.Replace("-","").Length!=10)
{
await context.SayAsync(text: "Phone number should be of length 10. Try again...", speak: "Phone number should be of length 10. Try again...");
await Phone(context);
}
else
{
this.PhoneNumber = PH.Text.Replace("-","");
await context.SayAsync(text: phr + this.PhoneNumber, speak: phr + this.PhoneNumber);
await context.SayAsync(text: str, speak: str);
context.Wait(StoreNumberReceived);
}
}
}
public async Task StoreNumberReceived(IDialogContext context, IAwaitable activity)
{
var SN = await activity;
this.StoreNumber = SN.Text.Replace(" ", string.Empty);
StringBuilder sb = new StringBuilder();
foreach (char c in this.StoreNumber.ToCharArray())
{
if (char.IsNumber(c))
sb.Append(" ").Append(c).Append(" ");
else
sb.Append(c);
}
this.Store = sb.ToString().Trim();
await context.SayAsync(text: strr+this.StoreNumber, speak: strr + this.Store);
await context.SayAsync(text: petxt, speak: pespk);
context.Wait(PeidReceived);
}
public async Task PeidReceived(IDialogContext context, IAwaitable activity)
{
var PE = await activity;
this.Previouseid = PE.Text.Replace(" ", string.Empty);
StringBuilder sb = new StringBuilder();
foreach (char c in this.Previouseid.ToCharArray())
{
if (char.IsNumber(c))
sb.Append(" ").Append(c).Append(" ");
else
sb.Append(c);
}
this.PreviousEID = sb.ToString().Trim();
await context.SayAsync(text: petxtr+this.Previouseid, speak: pespkr + this.PreviousEID);
await context.SayAsync(text: netxt, speak: nespk);
context.Wait(NeidReceived);
}
public async Task NeidReceived(IDialogContext context, IAwaitable activity)
{
var NE = await activity;
this.Neweid = NE.Text.Replace(" ", string.Empty);
StringBuilder sb = new StringBuilder();
foreach (char c in this.Neweid.ToCharArray())
{
if (char.IsNumber(c))
sb.Append(" ").Append(c).Append(" ");
else
sb.Append(c);
}
this.NewEID = sb.ToString().Trim();
await context.SayAsync(text: netxtr+this.Neweid, speak: nespkr + this.NewEID);
await context.SayAsync(text: pos, speak: pos);
context.Wait(PositionReceived);
}
public async Task PositionReceived(IDialogContext context, IAwaitable activity)
{
var POS = await activity;
this.Position = POS.Text;
await context.SayAsync(text: posr+this.Position, speak: posr + this.Position);
await context.SayAsync(text: complete, speak: complete);
await ShowDetails(context);
}
public async Task ShowDetails(IDialogContext context)
{
await context.SayAsync(text: "Your details are as follows:First Name: "+this.FirstName+"."+"Last Name: "+this.LastName+"."+"Phone Number: "+this.PhoneNumber+"."+"Store Number: "+this.StoreNumber+"."+"Previous EID: "+this.Previouseid+"."+"New EID: "+this.Neweid+"."+"Position: "+this.Position+".", speak: "Your details are as follows: First name: " + this.FirstName + ". Last name: " + this.LastName + ". Phone number: " + this.PhoneNumber + ". Store number: " + this.Store + ". Previous e i d: " + this.PreviousEID + ". New e i d: " + this.NewEID + ". Position: " + this.Position);
string prompt = "Do you want to Proceed?";
string retryprompt = "Please try again";
var promptOptions = new PromptOptions(prompt: prompt, options: choices, retry: retryprompt, speak: prompt, retrySpeak: retryprompt, promptStyler: new PromptStyler());
PromptDialog.Choice(context, SubmissionForm, promptOptions);
}
public async Task SubmissionForm(IDialogContext context, IAwaitable result)
{
string choice = await result;
if (choice.ToLower() == "yes")
{
await context.SayAsync(text: "Your message was registered.", speak: "Your message was registered.");
await context.SayAsync(text: "Once we resolve it, We will get back to you.", speak: "Once we resolve it, we will get back to you.");
            string prompt = "Do you want to Merge another employee?";
            string retryprompt = "Please try again";
            var promptOptions = new PromptOptions<string>(prompt: prompt, options: choices, retry: retryprompt, speak: prompt, retrySpeak: retryprompt, promptStyler: new PromptStyler());
            PromptDialog.Choice(context, Confirmed, promptOptions);
        }
        else
        {
            string prompt = "Please select one of the following options.";
            string retryprompt = "Please try again";
            var promptOptions = new PromptOptions<string>(prompt: prompt, options: option, retry: retryprompt, speak: prompt, retrySpeak: retryprompt, promptStyler: new PromptStyler());
            PromptDialog.Choice(context, SubmissionNotComplete, promptOptions);
        }
    }
    public async Task SubmissionNotComplete(IDialogContext context, IAwaitable<string> result)
    {
        string option = await result;
        if (option.ToLower().Contains("change"))
        {
            string prompt = "Okay, Tell me which field do you want to change?";
            string retryprompt = "Please Try again";
            var promptOptions = new PromptOptions<string>(prompt: prompt, options: details, retry: retryprompt, speak: prompt, retrySpeak: retryprompt, promptStyler: new PromptStyler());
            PromptDialog.Choice(context, Change, promptOptions);
        }
        else if (option.ToLower().Contains("cancel"))
        {
            await context.SayAsync(text: "You have cancelled the operation", speak: "You have cancelled the operation.");
            await context.SayAsync(text: "You can again start a new conversation by asking me things like 'POS Error', 'EID Merge', etc.", speak: "You can again start a new conversation by asking me things like 'P O S Error', 'E I D Merge', etc");
            context.Wait(this.MessageReceived);
        }
        else if (option.ToLower().Contains("redo"))
        {
            await context.SayAsync(text: "You requested to start the form fill up again", speak: "You requested to start the form fill up again.");
            await First(context);
        }
    }
    public async Task Change(IDialogContext context, IAwaitable<string> result)
    {
        string details = await result;
        if (details.ToLower() == "first name")
        {
            await context.SayAsync(pf + this.FirstName, speak: pf + this.FirstName);
            await FirstRepeat(context);
        }
        else if (details.ToLower() == "last name")
        {
            await context.SayAsync(pl+this.LastName, speak: pl + this.LastName);
            await LastRepeat(context);
        }
        else if (details.ToLower() == "phone number")
        {
            await context.SayAsync(pph+this.PhoneNumber, speak: pph + this.PhoneNumber);
            await PhoneRepeat(context);
        }
        else if (details.ToLower() == "store number")
        {
            await context.SayAsync(pstr+this.StoreNumber, speak: pstr + this.StoreNumber);
            await context.SayAsync(text: str, speak: str);
            context.Wait(StoreNumberRepeat);
        }
        else if (details.ToLower().Contains("previous"))
        {
            await context.SayAsync(ppetxt+this.Previouseid, speak: ppespk + this.Previouseid);
            await context.SayAsync(text: petxt, speak: pespk);
            context.Wait(PEIDRepeat);
        }
        else if (details.ToLower().Contains("new"))
        {
            await context.SayAsync(pnetxt+this.Neweid, speak: pnespk + this.Neweid);
            await context.SayAsync(text: netxt, speak: nespk);
            context.Wait(NEIDRepeat);
        }
        else if (details.ToLower() == "position")
        {
            await context.SayAsync(ppos+this.Position, speak: ppos+this.Position);
            await context.SayAsync(text: pos, speak: pos);
            context.Wait(PositionRepeat);
        }
        else
        {
            await ShowDetails(context);
        }
    }
    public async Task FirstRepeat(IDialogContext context)
    {
        await context.SayAsync(text: f, speak: f);
        context.Wait(FirstNameRepeat);
    }
    public async Task FirstNameRepeat(IDialogContext context, IAwaitable<IMessageActivity> activity)
    {
        string fname = this.FirstName;
        var fn = await activity;
        this.FirstName = fn.Text;
        await context.SayAsync(text: $"First name is changed form {fname} to {this.FirstName}.", speak: $"First name is changed form {fname} to {this.FirstName}.");
        string prompt = "Do you want to change any other fields?";
        string retryprompt = "Please try again";
        var promptOptions = new PromptOptions<string>(prompt: prompt, options: choices, retry: retryprompt, speak: prompt, retrySpeak: retryprompt, promptStyler: new PromptStyler());
        PromptDialog.Choice(context, ConfirmChange, promptOptions);
    }
    public async Task LastRepeat(IDialogContext context)
    {
        await context.SayAsync(text: l, speak: l);
        context.Wait(LastNameRepeat);
    }
    public async Task LastNameRepeat(IDialogContext context, IAwaitable<IMessageActivity> activity)
    {
        string lname = this.LastName;
        var ln = await activity;
        this.LastName = ln.Text;
        await context.SayAsync(text: $"Last name is changed from {lname} to {this.LastName}.", speak: $"Last name is changed from {lname} to {this.LastName}.");
        string prompt = "Do you want to change any other field?";
        string retryprompt = "Please try again";
        var promptOptions = new PromptOptions<string>(prompt: prompt, options: choices, retry: retryprompt, speak: prompt, retrySpeak: retryprompt, promptStyler: new PromptStyler());
        PromptDialog.Choice(context, ConfirmChange, promptOptions);
    }
    public async Task PhoneRepeat(IDialogContext context)
    {
        await context.SayAsync(text: ph, speak: ph);
        context.Wait(PhoneNumberRepeat);
    }
    public async Task PhoneNumberRepeat(IDialogContext context, IAwaitable<IMessageActivity> activity)
    {
        string phone = this.PhoneNumber;
        var ph = await activity;
        int flag = 0;
        foreach (var c in ph.Text.ToCharArray())
        {
            if (!char.IsNumber(c) && c != '-')
            {
                flag = 1;
                break;
            }
        }
        if (flag == 1)
        {
            await context.SayAsync(text: "Phone number cannot contain any characters. Try again...", speak: "Phone number cannot contain any character. Try again");
            await Phone(context);
        }
        else
        {
            if (ph.Text.Replace("-", "").Length != 10)
            {
                await context.SayAsync(text: "Phone number should be of length 10. Try again...", speak: "Phone number should be of length 10. Try again...");
                await Phone(context);
            }
            else
            {
                this.PhoneNumber = ph.Text.Replace("-","");
                await context.SayAsync(text: $"Phone number is changed from {phone} to {this.PhoneNumber}.", speak: $"Phone number is changed form {phone} to {this.PhoneNumber}.");
                string prompt = "Do you want to change any other field?";
                string retryprompt = "Please try again";
                var promptOptions = new PromptOptions<string>(prompt: prompt, options: choices, retry: retryprompt, speak: prompt, retrySpeak: retryprompt, promptStyler: new PromptStyler());
                PromptDialog.Choice(context, ConfirmChange, promptOptions);
            }
        }
    }
    public async Task StoreNumberRepeat(IDialogContext context, IAwaitable<IMessageActivity> activity)
    {
        string store = this.StoreNumber;
        var st = await activity;
        this.StoreNumber = st.Text.Replace(" ", string.Empty);
        StringBuilder sb = new StringBuilder();
        foreach (char c in this.StoreNumber.ToCharArray())
        {
            if (char.IsNumber(c))
                sb.Append(" ").Append(c).Append(" ");
            else
                sb.Append(c);
        }
        this.Store = sb.ToString().Trim();
        await context.SayAsync(text: $"Store number is changed form {store} to {this.StoreNumber}.", speak: $"Store number is changed form {store} to {this.Store}.");
        string prompt = "Do you want to change any other field?";
        string retryprompt = "Please try again";
        var promptOptions = new PromptOptions<string>(prompt: prompt, options: choices, retry: retryprompt, speak: prompt, retrySpeak: retryprompt, promptStyler: new PromptStyler());
        PromptDialog.Choice(context, ConfirmChange, promptOptions);
    }
    public async Task PEIDRepeat(IDialogContext context, IAwaitable<IMessageActivity> activity)
    {
        string peid = this.Previouseid;
        var pe = await activity;
        this.Previouseid = pe.Text.Replace(" ", string.Empty);
        StringBuilder sb = new StringBuilder();
        foreach (char c in this.Previouseid.ToCharArray())
        {
            if (char.IsNumber(c))
                sb.Append(" ").Append(c).Append(" ");
            else
                sb.Append(c);
        }
        this.PreviousEID = sb.ToString().Trim();
        await context.SayAsync(text: $"Previous EID is changed from {peid} to {this.Previouseid}.", speak: $"Previous e i d is changed from {peid} to {this.PreviousEID}");

        string prompt = "Do you want to change any other field?";
        string retryprompt = "Please try again";
        var promptOptions = new PromptOptions<string>(prompt: prompt, options: choices, retry: retryprompt, speak: prompt, retrySpeak: retryprompt, promptStyler: new PromptStyler());
        PromptDialog.Choice(context, ConfirmChange, promptOptions);
    }
    public async Task NEIDRepeat(IDialogContext context, IAwaitable<IMessageActivity> activity)
    {
        string neid = this.Neweid;
        var ne = await activity;

        this.Neweid = ne.Text.Replace(" ", string.Empty);
        StringBuilder sb = new StringBuilder();
        foreach (char c in this.Neweid.ToCharArray())
        {
            if (char.IsNumber(c))
                sb.Append(" ").Append(c).Append(" ");
            else
                sb.Append(c);
        }
        this.NewEID = sb.ToString().Trim();
        await context.SayAsync(text: $"New EID is changed from {neid} to {this.Neweid}.", speak: $"New e i d is changed from {neid} to {this.NewEID}");

        string prompt = "Do you want to change any other field?";
        string retryprompt = "Please try again";
        var promptOptions = new PromptOptions<string>(prompt: prompt, options: choices, retry: retryprompt, speak: prompt, retrySpeak: retryprompt, promptStyler: new PromptStyler());
        PromptDialog.Choice(context, ConfirmChange, promptOptions);
    }
    public async Task PositionRepeat(IDialogContext context, IAwaitable<IMessageActivity> activity)
    {
        string position = this.Position;
        var pos = await activity;
        this.Position = pos.Text;
        await context.SayAsync(text: $"Position is changed from {position} to {this.Position}.", speak: $"Position is changed form {position} to {this.Position}.");
        string prompt = "Do you want to change any other field?";
        string retryprompt = "Please try again";
        var promptOptions = new PromptOptions<string>(prompt: prompt, options: choices, retry: retryprompt, speak: prompt, retrySpeak: retryprompt, promptStyler: new PromptStyler());
        PromptDialog.Choice(context, ConfirmChange, promptOptions);
    }
    public async Task ConfirmChange(IDialogContext context, IAwaitable<string> result)
    {
        string confirm = await result;
        if (confirm.ToLower() == "yes")
        {
            string prompt = "Okay, what would you like to change?";
            string retryprompt = "Please try again";
            var promptOptions = new PromptOptions<string>(prompt: prompt, options: details, retry: retryprompt, speak: prompt, retrySpeak: retryprompt, promptStyler: new PromptStyler());
            PromptDialog.Choice(context, Change, promptOptions);
        }
        else
        {
            await ShowDetails(context);
        }
    }
    public async Task Confirmed(IDialogContext context, IAwaitable<string> result)
    {
        string confirm = await result;
        if (confirm.ToLower() == "yes")
        {

            await new CreateLMSTicket().StartAsync(context);
        }
        else
        {
            var ticketNumber = "L"+new Random().Next(1000,9999);
            await context.SayAsync(text: "A LMSTicket is provided to you and your message has been registered.", speak: "L M S Ticket is provided to you and your message has been registered.");

            await new CreateServiceRequest().Start(context, ticketNumber);

        }
    }
}

}
GlobalHandler.cs
using System;
using System.Collections.Generic;
namespace POSBot
{
[Serializable]
public class GlobalHandler
{
public string GetRandomString(List stringList)
{
Random random = new Random();
int idx = random.Next(0, 1000) % stringList.Count;
return stringList[idx];
}
public class Close
{
public List HelpMessage = new List
{
"Is there any additional help required?",
"Do you need any additional help?",
"Can I be of some more help?"
};
public List RestartMessage = new List
{
"Okay, tell me what can I do for you.",
"Please, tell me what can I do for you.",
"I request you to tell me what to do.",
"Tell me what else do you want."
};
}
public class Confirm
{
public List ready = new List { "Yes, I am ready", "No, I am not ready" };
public List proceed = new List { "Yes, I want to proceed", "No, I want to stop here" };
public List status = new List { "Yes, It was successful", "No, it was not successful" };
public List readyMessage = new List
{
"Are you ready?",
"Ready to do it?",
"Ready for this?"
};
public List proceedMessage = new List
{
"Do you want to proceed?",
"Proceed?",
"Want to proceed?",
"Proceed to next step?"
};
public string Step1 = "Step 1: Click on Manager Menu from POS screen.";
public string Step2 = "Step 2: Press Support Button.";
public string Step3 = "Step 3: Again press Support Button.";
public string Step4 = "Step 4: Enter Password(Last digit of Year, Last digit of Month, Last Digit of Date).";
public string Step5 = "Step 5: Press the Cashless Maintenance Button.";
public string Step6 = "Step 6: Press Open PED.";
public string Step7 = "Step 7: Reset the Cashless Device.";
public string Step8 = "Step 8: Select Manager Menu > Special Functions > Reset Cashless device.";
public string Step9 = "Step 9: Image will come up: Please be sure there are no cards inserted in the PED before continuing, then Press OK.";
public string Step10 = "Step 10: If successful the following message will come up: PED communication is working.";
}
public class EID
{
public List assistance = new List { "Person Merge Assistance", "Person Merge Information", "Global Account Manager" };
public List level = new List { "Staff level", "Store level" };
public List support = new List { "I want to see presentation", "I want to contact" };
public List merge = new List
{
"Has a person merge been completed?",
"Have you completed a person merge?",
"Is a person merge complete?"
};
}
public class LMS
{
public string firstname = "Enter your First Name:";
public string lastname = "Enter your Last Name:";
public string phonenumber = "Enter your Phone Number:";
public string storenumber = "Enter your store Number:";
public string previouseidtext = "Enter your Previous EID:";
public string previouseidspeak = "Enter your previous e i d:";
public string neweidtext = "Enter your New EID:";
public string neweidspeak = "Enter your new e i d:";
public string position = "Enter your position:";
public string freceive = "First name is received as: ";
public string lreceive = "Last name is received as: ";
public string phreceive = "Phone number is received as: ";
public string strreceive = "Store number is received as: ";
public string ptxtreceive = "Previous EID is received as: ";
public string pspkreceive = "Previous e i d is received as: ";
public string ntxtreceive = "New EID is received as: ";
public string nspkreceive = "New e i d is received as: ";
public string posreceive = "Position is received as: ";
public string fcom = "Form fill up completed.";
public string pfirstname = "Your last entered first name was: ";
public string plastname = "Your last entered last name was: ";
public string pphone = "Your last entered phone number was: ";
public string pstore = "Your last entered store number was: ";
public string ppetxt = "Your last entered Previous EID was: ";
public string ppespk = "Your last entered previous e i d was: ";
public string pnetxt = "Your last entered New EID was: ";
public string pnespk = "Your last entered new e i d was: ";
public string ppos = "Your last entered position was: ";
}
public class POS
{
public string Step1 = "Log into a register and confirm when you are ready for the next step.";
public string Step2 = "If you do not have a POS ID and password, please have a store manager log in.";
}
}
}
I want the input hint to work in the createlmsticket.cs file.. Please help me. Whenever the bot says Enter your first name, the microphone should automatically open.

Have you tested the code? Meanwhile I'll be reproducing the issue and get back to you shortly.

Okay friends, this issue has been resolved already. Thank you anyway. I just had to use the 'options' in the context.SayAsync() to incorporate inputhint. I mean:
await context.SayAsync(text: ... , speak: ... , options: new MessageOptions() { InputHint = InputHints.expectingInput});

Thanks for the update.


Can't delete domains

It seams like that you can't delete domains

Fixed here 3de0b0956cfd9801869fa879186cd07b4643a4fd

Fixed here 3de0b0956cfd9801869fa879186cd07b4643a4fd


Use fixed seed for test_from_json_struct_decimal

Part of https://github.com/NVIDIA/spark-rapids/issues/10349

build


fix segmetation load bug

This PR tends to fix segmentation pretrained model loading error.

For https://github.com/sony/nnabla/issues/1043


support processing a single file

Other than charts, a project or organization has many other templating needs. E.g. we are trying to install monitoring solutions and needs templates for that.
If helm allows a single file to be processed, it will become useful outside of charts and allow a single unified tool for all templating needs.

hey @vinayagg - You can put your monitoring solution in a helm chart if you'd like. See this Prometheus chart as an example: https://github.com/kubernetes/charts/tree/master/stable/prometheus
If you're not looking to use helm charts, then you might want to look into Sprig. Sprig is a library of template functions for Go templating. That might be helpful if you need templating functionality but don't need or want to use the chart packaging format.
Is that what you're looking for? If not, please help me understand a little better what you're asking. Thank you.

Hi @michelleN
Let me try to explain.
When we deploy a project using helm, we also need to setup monitoring external to kubernetes - e.g. uptime robot, new relic cloud, app dynamics cloud, netuitive cloud etc.
To do that automatically, we need to process a template but do not need to install it on k8s (we can use curl to invoke third party api.
Sure, I could put that in a helm chart but that feels like a bad practice.
I can use sprig as well, but it means, now I have to install/maintain sprig + go binary + go scripts to process templates.
Overall, it is doable without helm, but it will mean more complexity and partial duplication of what helm already does.
I see this functionality (or a variation of it) should hopefully need minimal changes to helm but it enables helm to be a much more general purpose tool that can do lot more than what it does today.
Hence my feature request.

You might want to take a look into the helm-template plugin as that seems very to your use case. It runs a local chart through the template engine without actually installing it and displays the manifests on stdout.

even helm --debug --dry-run can do that, but that does not work.
It processes whole chart, so now each setting or monitor or anything needs
to be in its own chart instead of just a file. some non k8s stuff may need
its own directory structure but it wont work with this approach. As you can
see this gets messy very quickly.

closing as out of scope for helm. A plugin or another project would be better suited for this sort of work.

Hi is there any updates after 3 years?


Add shadowdom, add data-button-color and data-anon, reset dialog cach…

…e on param change:

creating the styles and dialog in a shadowdom now to avoid mixing styles with the parent page
we needed to customize the button colors
added data-anon=true to make sure it doesn't try to access window.nostr - with nostr-login it causes another modal to open which is quite confusing

switching to using shadow dom would be a breaking change. i know some people are overriding the styles and upgrading to this latest version would break things for them. can you think of a way to make using the shadow dom opt in? maybe adding a data attribute to the script tag?

let's forget about making the shadow dom opt in. it's probably better that's the default. i'll just bump the version to v1.0.0.
let me test out your PR a bit today. if i don't find any issues, i'll merge and deploy it today.


[$1000] task name does not updated in LHN

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Action Performed:

go to any chat
click on + icon
select Assign task option
type title and click on Next button
click on confirm task
Go to task thread
change task title
go back to previous chat and check the LHN

Expected Result:
task name should be update in LHN
Actual Result:
task name updates but not in LHN
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
Platforms:

Which of our officially supported platforms is this issue occurring on?

[ ] Android / native
[ ] Android / Chrome
[ ] iOS / native
[ ] iOS / Safari
[x] MacOS / Chrome / Safari
[ ] MacOS / Desktop

Version Number: 1.3.26-3
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
https://github.com/Expensify/App/assets/43996225/5a5463d3-cffb-4020-be04-f54b2cb27400
https://github.com/Expensify/App/assets/43996225/e3aa2a85-6a44-4b75-aadb-8f6cf774cd45
Expensify/Expensify Issue URL:
Issue reported by: @gadhiyamanan
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1686128527516329
View all open jobs on GitHub
Upwork Automation - Do Not Edit

Upwork Job URL: https://www.upwork.com/jobs/~0159a021714aafe0fa
Upwork Job ID:<PHONE_NUMBER>668803584
Last Price Increase: 2023-06-20

Reviewing

I reproduced this:

I don't see any duplicate reports. Sending it through.

Hey @abdulrahuman5196 - we have an early bird proposal here: https://github.com/Expensify/App/issues/20613#issuecomment-1587935077

bump @abdulrahuman5196

@greg-schroeder We had older discussion related to LHN subtitles and its consistency, I will create a slack for it to discuss in the slack channel. That information would be useful here as well.

Ah, awesome, I'd love to follow that

Will create a slack thread today night. Got similar issue - https://github.com/Expensify/App/issues/20633

thanks @abdulrahuman5196

Thread discussion still ongoing

Update from slack. Its seems for now we can handle the LHN reports on the issue basis. So reviewing the proposals currently

@dukenv0307 From proposal here https://github.com/Expensify/App/issues/20613#issuecomment-1587935077
Could you add information on where you would make the change? What change would that be?
The proposal has very high level of information

We also need to update BE with this implementation.

And why do you think we need BE implementation?

@dukenv0307, I am not sure if backend is setting the lastmessageText, we are actually setting it as part of optimistic report at multiple places in frontend

@dukenv0307 I am not saying that is the fix. I am saying that now in create task flow we are setting lastMessageText as optimistic data and during API call and it is working currently. Correct me if wrong. So shouldn't the same be enough, we make editTaskAndNavigate to update lastMessageText as well.
Asked the above since i am still not sure on the question And why do you think we need BE implementation?
Or is it like we are setting correct lastMessageText in frontend and backend is return wrong data?
Or you are trying  to say even if we set  lastMessageText in frontend if its not done now, even then BE will return wrong data?

@abdulrahuman5196 is @dukenv0307's update on a good track?

Hi, @greg-schroeder , sorry for the delay. Yes, @dukenv0307  is on the right track.

Or is it like we are setting correct lastMessageText in frontend and backend is return wrong data?
@abdulrahuman5196 Yes. I've tested the logic to update lastMessageText in optimistic data.It works well and display correctly in LHN. But after going back to main report, openReport is called and it displays wrong like this video.

@Gonals This might require backend changes as well, could you kindly confirm? Even if we set correct data as lastMessageText during edit task flow, backend returns wrong information.
I don't think we should start on frontend fix before confirming on backend.

Hmm. It does seem like we'll need some backend changes to make sure this works correctly.
@greg-schroeder, I think we should swap this to internal (or partially internal), but I probably don't have the bandwidth to get it fixed in the next few days.

Hi, @Gonals @greg-schroeder Yes. I think partially internal should be fine IMO, if others are fine.
@dukenv0307 Could do the frontend changes based on their proposal here https://github.com/Expensify/App/issues/20613#issuecomment-1587935077 since they already spend effort on the proposal and confirmation. I think the proposal needs some polishes but should be fine on high level IMO and we can update the proposal once backend changes are complete and the Frontend expectation is set.

Okay - so sounds like the proposed flow would be:

Set to Internal
Let @Gonals work on the backend changes when he can prioritize next week
Once backend is complete, allow @dukenv0307 to polish proposal for frontend changes
Get approval from @abdulrahuman5196 and @Gonals
Proceed with frontend changes per normal process

Last update is where we stand ☝

@Gonals do you have thoughts on the timeline for this one?

Honestly, I am swamped right now. I don't see myself having time for this in the foreseeable future, as whatever time I have left after chores will have to go to W4 development. I'll post this tomorrow on Slack to see if someone has the bandwidth to take it

@thienlnam or I could probably take over in the next day or two!

That would be awesome! @Beamanator, @thienlnam, who wants it? 😁

Coming in late, but I don't really know if we want to fix this. This bug only really occurs when the created task reportAction was the last message in the chat and then you update the title name. This is mostly an edge case but would require us to update the EditTask flow to find all cases where the task reportAction was created and then update them all. Same applies to when we decide to cancel the task.
Imagine the case where you create a task in a room
Change the assignee like 10 times
Edit the task title
All of those chats now have an outdated task title in the LHN
We could fix this, but I don't know if it is worth adding all that logic for

I think that's fair, but I'm more of the opinion that it would be an easy front-end optimistic fix, and not necessary to find alllll those chat reports in the backend to update all clients 🤷

I think that's fair, but I'm more of the opinion that it would be an easy front-end optimistic fix, and not necessary to find alllll those chat reports in the backend to update all clients 🤷

That would only update it for the user changing the task name and not anyone else that sees it in the LHN which is maybe fine?

Yes exactly - maaaybe, yes? Maybe we can post in slack to see if more people have stronger opinions that this actually needs to get fixed

Hmm - this doesn't seem that worth it to me? The BE fix seems better but way more intensive imo

Yeah. I agree it could end up a complex change in backend.
But we are already providing pusher event to user to update report action items in case of task change which is a similar requirement to what we have now. Then wouldn't we able to reuse the same to update lastMessageText as well?
Note: I don't know how backend is implemented but just providing some thought which could be wrong from backend perspective as well.

@Beamanator @thienlnam where do we think we go with this? Maybe it's a close 🤔

But we are already providing pusher event to user to update report action items in case of task change which is a similar requirement to what we have now. Then wouldn't we able to reuse the same to update lastMessageText as well?

It's a good instinct - this is true but the thing is because you can change the assignee as many times as you want, we're pushing the update separately to many different reports that have different participants each time.
Actually, another idea is we could use the reportAction data to show what the completed task was in the FE so we don't have to make any BE modifications.
In any case though, this seems minor enough I don't know if we need to spend any more time on it

All right, in that case, I'm going to close per Jack's comment above.


Try AI for illustration generation

Try ChatGPT to generate illustrations for quiz categories
https://beta.openai.com/docs/guides/images/introduction

openai is not what we wont at this moment, it generates images using ai and quality is poor.
unsplash.com has limitation 50 request in one hour. also search result is not setistaiting
now researching https://www.flickr.com/ api

https://openai.com/dall-e-2/
try also this, it is free and good as I know


Update docs

Hey guys, just wanted to contribute a bit to the documentation for simple queries.
Atm the docs look quite empty with those to-do comments 😁
Also made some changes so the examples look uniform and actually relate to each other.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.d.podpryatov seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.

@DmitryPodpryatov thank you for this contribution! We do have a great need for documentation.
Could you please run sbt docs/generateReadme ? Readme has some parts auto-generated and can be changed only from build.sbt.


fix xr hyperlink

noticed an issue with the xr hyperlink so I thought I would fix it

I've seen a pull request has already been merged fixing the issue so I'll just close this


feat: build macOS arm64 packages

Towards https://github.com/actions/setup-python/issues/547
This will allow to upload releases for macOS arm64 runners (self-hosted are already supported).
Given python installers >= 3.11 are using universal2 pkg installer, the same installer can be run on arm64, it's a matter of changing the destination in the tool cache.
The universal2 installer can be used on arm64 for python 3.8, 3.9 & 3.10 but the tests would need to be updated in this case.

c.f. https://github.com/mayeut/python-versions/actions/runs/3669651395 for a build of 3.11.1
c.f. https://github.com/mayeut/python-versions/actions/runs/3669676557 for a build of 3.10.9 showing tests would need to be updated

Tests have been updated to allow building 3.8, 3.9 & 3.10 versions.
Workflow runs can be seen there: https://github.com/mayeut/python-versions/actions/workflows/build-python-packages.yml


No license

As the title says, there is no license in the repository. Since law (and copyright law) is already a mess, and just based on the few stories I heard about Nintendo, it'd be probably better to have one.
Libnx seems to have one that's reasonable, but I don't have proper knowledge of the homebrew scene, so there might be way better licenses:
https://github.com/switchbrew/libnx?tab=ISC-1-ov-file

It's intended to retain the MIT license (with credit to our team) as stated in the file headers.


Plant api

I added api routes with POST, PUT, GET, DELETE methods for plant collection. I built upon upon the changes made on tidy branch.

closing to try and fix the conflict


Doctor of Philosophy -> PhD

Rename the PhD flavour of Doctor of Philosophy to PhD

There are two entries with the name "Doctor of Philosphy". This has to be handled in client applications and can cause ambiguous select entries when displayed to users.
Given this qualification is commonly referred to as 'PhD' it seems reasonable to use that as the name to solve this problem.

Hmm, I think we should avoid this, as I think in Apply we use the abbreviation within the user interface, so this would end up saying:

( ) PhD (PhD)

(without some additional code to detect if the abbreviation == name)
Perhaps we could add a new disambiguation_name key which has disambiguation_name: "Doctor of Philosophy (PhD)"?
(Other reference lists in future may well have 2 items with the same name, such as schools or university names, so we'll need to be able to cope with this somehow)

@frankieroberto I think regardless our autocomplete code should check if the name includes the abbreviation.
Note: there's a bug in dfe-autocomplete related to two items with the same name - raised here. Even with this fixed though, as we enhance from a select that shows the name, we'd have two items in the select with the same name. We could choose to use the name and abbreviation in the select though...

@frankieroberto I think regardless our autocomplete code should check if the name includes the abbreviation.
Note: there's a bug in dfe-autocomplete related to two items with the same name - raised here. Even with this fixed though, as we enhance from a select that shows the name, we'd have two items in the select with the same name. We could choose to use the name and abbreviation in the select though...

Yeah, I think in the autocomplete you'd ideally include the abbreviation as a disambiguator (and just generally to help people find the right thing), and then would set the right hidden ID depending on which one was selected.
In this case, I'm still not 100% if the difference between DPhil and PhD is meaningful? Maybe they should be merged...? 🤷

I don't think we really need to add another field to disambiguate with as you could use any of the others if you're going to check another field. It's everybody handling that complexity that I'm after avoiding. Given 'PhD' is the common name it doesn't seem to me that controversial of a change (with a simple update to the auto-complete to not show the abbreviation if it == the name). If it is controversial then we could set the name of the option to include the abbreviation in the HTML as Ed suggested for non-JS.

In this case, I'm still not 100% if the difference between DPhil and PhD is meaningful? Maybe they should be merged...? 🤷

Me neither but there are two entries in HESA so to do that we'd need to support multiple hesa_itt_code or get them to merge them too.

Updated to amend the DPhil flavour as discussed elsewhere. This is likely the less common of the two. Slight downside of this is it's more complicated to avoid appending the abbreviation in the autocompletes resulting in "Doctor of Philosophy (DPhil) (DPhil)" which is annoying (but at least clearer to the user than the current 'duplicate')

@gpeng we've got an established pattern of including comments as attributes on the object itself - see here for an example.


Annotation transparency bar is slow with many annotation elements

This is very likely related to issue #533 . In fact, I believe that the factor most likely responsible for slow show-up of the context menu is the fading of all annotations except the one being selected. I didn't monitor network carefully to confirm this, since it's too slow, but this is my hunch.

@Temporary handing for developers -> Do NOT include a 'fillColor', except for the MOST NECESSARY annotations to be filled. Filled annotations need to be converted to traingles and rendered on the GPU, which is slow. If you have to include a fill, set opacity to 1 sinze if it's transparent, it has a bigger load on the GPU.


Bash without bash_profile settings?

Hi! What should I do to enable terminal to read .bash_profile settings on :Toggle* command? Now it opens a bare shell process, without my preferences.

if you want your .bash_profile loaded every time doing :let &shell='/bin/bash -l' should do the trick, although I haven't tested if that breaks other things, like some plugins. What you need is a login shell (see man bash, under "INVOCATION" section)
I would suggest you to move the things you need every time to .bashrc


Fix #96 - fix example API call in README.md

Also adds intelliJ local environment files to .gitignore
Signed-off-by: Dominik Guhr<EMAIL_ADDRESS>

I have read the CLA Document and I hereby sign the CLA


literal_unroll doesn't seem to handle a list - yields unknown problem.

Reporting a bug

[X] I have tried using the latest released version of Numba (most recent is
visible in the change log (https://github.com/numba/numba/blob/master/CHANGE_LOG).
[X] I have included below a minimal working reproducer (if you are unsure how
to write one see http://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports).

With a constant list, I attempted to use literal_unroll, but got an 'unknown problem.' This looks pretty daggone close to the samples, not sure where it goes wrong.

import numba as nb
from numba import cuda, literal_unroll
import numpy as np

ret = np.ndarray(5)
ret[:] = 0

magic_numbers = list(range(5))

@cuda.jit
def f(result):
    for i in literal_unroll(magic_numbers):
        result[0] += i

f[1,1](ret)
print(ret)

Thanks for the report. I think the first problem here is due to an error message that could do with some improvement:
Failed in literal_unroll_subpipeline mode pipeline (step: switch const list for tuples)
Invalid use of literal_unroll, argument should be a tuple or a list of constant values. Failure reason: found unknown problem

File "issue6344.py", line 11:
def f(result):
    for i in literal_unroll(magic_numbers):
    ^

what it needs to convey is that a list from globals cannot be lowered as a constant, this is caught further on in the compilation pipeline:
from numba import njit
magic_numbers = list(range(5))
@njit
def f(result):
    magic_numbers

gives:
The use of a reflected list(int64)<iv=None> type, assigned to variable 'magic_numbers' in globals, is not supported as globals are considered compile-time constants and there is no known way to compile a reflected list(int64)<iv=None> type as a constant.

I think that the second problem, having made the global valid for use in literal_unroll by converting it into a tuple, is that the CUDA target has no idea what to do with the literal_unroll function.
e.g.
import numba as nb
from numba import cuda, literal_unroll
import numpy as np

ret = np.ndarray(5)
ret[:] = 0

magic_numbers = tuple(list(range(5)))

def f(result):
    for i in literal_unroll(magic_numbers):
        result[0] += i

cpu_version = nb.njit(f)
cpu_version (ret)
print("CPU ok")

cuda_version = cuda.jit(f)
cuda_version[1,1](ret)
print(ret)

gives
$ python issue6344.py
CPU ok
numba.core.errors.LoweringError: Failed in nopython mode pipeline (step: nopython mode backend)
No definition for lowering <built-in method impl of _dynfunc._Closure object at 0x7f1c8429a0c0>(UniTuple(int64 x 5),) -> UniTuple(int64 x 5)

If you don't mind adding a dependency, the pragma package can do this sort of thing before numba gets involved. It's a bit easier to sanity check because it's python -> python. Your example would look like this
@pragma.unroll
def f(result):
    for i in magic_numbers:
        result[0] += i

import inspect
print(inspect.getsource(f))

def f(result):
    result[0] += 0
    result[0] += 1
    result[0] += 2
    result[0] += 3
    result[0] += 4

Disclaimer: I am a developer on pragma

If you don't mind adding a dependency, the pragma package can do this sort of thing before numba gets involved. It's a bit easier to sanity check because it's python -> python. Your example would look like this
@pragma.unroll
def f(result):
    for i in magic_numbers:
        result[0] += i

import inspect
print(inspect.getsource(f))

def f(result):
    result[0] += 0
    result[0] += 1
    result[0] += 2
    result[0] += 3
    result[0] += 4

Disclaimer: I am a developer on pragma

@atait that sure does look interesting.

@atait that sure does look interesting.

@atait Thanks for highlighting https://pypragma.readthedocs.io/en/latest/, this does indeed look interesting. If you have an AST, which I guess is the case the majority of the time, then such transforms are likely more readily achieved on it than through Numba IR manipulation. It's nice that you've ensured it works with/enhances Numba too :)
Also... literal_unroll will currently version based on the literal types:
from numba import njit, literal_unroll
import numpy as np

magic_numbers = (1, 2, 3, 4)

@njit
def f(result):
    for i in literal_unroll(magic_numbers):
        result[0] += i

x = np.zeros((1,))
f(x)

However in the process of versioning the loop bodies it generates branches so its a bit more like:
magic_numbers = (1, 2, 3, 4)
def f(result):
   for i in range(4):
       if i == 0:
           const = 1
           result[0] += const
       elif i == 1:
           const = 2
           result[0] += const
       .... etc

thankfully LLVM works it all out and produces:
        .text
        .file   "<string>"
        .section        .rodata.cst8,"aM",@progbits,8
        .p2align        3
.LCPI0_0:
        .quad<PHONE_NUMBER>800017408
.LCPI0_1:
        .quad<PHONE_NUMBER>427387904
.LCPI0_2:
        .quad<PHONE_NUMBER>241073152
.LCPI0_3:
        .quad<PHONE_NUMBER>054758400
        .text
        .globl  _ZN8__main__5f$241E5ArrayIdLi1E1C7mutable7alignedE
        .p2align        4, 0x90
        .type   _ZN8__main__5f$241E5ArrayIdLi1E1C7mutable7alignedE,@function
_ZN8__main__5f$241E5ArrayIdLi1E1C7mutable7alignedE:
        movq    8(%rsp), %rax
        movsd   (%rax), %xmm0
        movabsq $.LCPI0_0, %rcx
        addsd   (%rcx), %xmm0
        movabsq $.LCPI0_1, %rcx
        addsd   (%rcx), %xmm0
        movabsq $.LCPI0_2, %rcx
        addsd   (%rcx), %xmm0
        movabsq $.LCPI0_3, %rcx
        addsd   (%rcx), %xmm0
        movsd   %xmm0, (%rax)
        movq    $0, (%rdi)
        xorl    %eax, %eax
        retq

i.e. it's just accumulating some consts (1, 2, 3, 4) from LCP.
I suggest we move further discussion on this to https://numba.discourse.group/ as it's a more suitable format for long form discussion :) Other Numba users may also be interested in https://pypragma.readthedocs.io/en/latest/, and there's a showcase category https://numba.discourse.group/c/numba/showcase/11 if you wanted to demo things.

@atait Thanks for highlighting https://pypragma.readthedocs.io/en/latest/, this does indeed look interesting. If you have an AST, which I guess is the case the majority of the time, then such transforms are likely more readily achieved on it than through Numba IR manipulation. It's nice that you've ensured it works with/enhances Numba too :)
Also... literal_unroll will currently version based on the literal types:
from numba import njit, literal_unroll
import numpy as np

magic_numbers = (1, 2, 3, 4)

@njit
def f(result):
    for i in literal_unroll(magic_numbers):
        result[0] += i

x = np.zeros((1,))
f(x)

However in the process of versioning the loop bodies it generates branches so its a bit more like:
magic_numbers = (1, 2, 3, 4)
def f(result):
   for i in range(4):
       if i == 0:
           const = 1
           result[0] += const
       elif i == 1:
           const = 2
           result[0] += const
       .... etc

thankfully LLVM works it all out and produces:
        .text
        .file   "<string>"
        .section        .rodata.cst8,"aM",@progbits,8
        .p2align        3
.LCPI0_0:
        .quad<PHONE_NUMBER>800017408
.LCPI0_1:
        .quad<PHONE_NUMBER>427387904
.LCPI0_2:
        .quad<PHONE_NUMBER>241073152
.LCPI0_3:
        .quad<PHONE_NUMBER>054758400
        .text
        .globl  _ZN8__main__5f$241E5ArrayIdLi1E1C7mutable7alignedE
        .p2align        4, 0x90
        .type   _ZN8__main__5f$241E5ArrayIdLi1E1C7mutable7alignedE,@function
_ZN8__main__5f$241E5ArrayIdLi1E1C7mutable7alignedE:
        movq    8(%rsp), %rax
        movsd   (%rax), %xmm0
        movabsq $.LCPI0_0, %rcx
        addsd   (%rcx), %xmm0
        movabsq $.LCPI0_1, %rcx
        addsd   (%rcx), %xmm0
        movabsq $.LCPI0_2, %rcx
        addsd   (%rcx), %xmm0
        movabsq $.LCPI0_3, %rcx
        addsd   (%rcx), %xmm0
        movsd   %xmm0, (%rax)
        movq    $0, (%rdi)
        xorl    %eax, %eax
        retq

i.e. it's just accumulating some consts (1, 2, 3, 4) from LCP.
I suggest we move further discussion on this to https://numba.discourse.group/ as it's a more suitable format for long form discussion :) Other Numba users may also be interested in https://pypragma.readthedocs.io/en/latest/, and there's a showcase category https://numba.discourse.group/c/numba/showcase/11 if you wanted to demo things.


Update the code sample for C# hello world, by using top level program and remove unnecessary boilerplate

Which will make it much more beginner friendly.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 8cc2e9c2-f333-f6a1-064e-790d950b684c
Version Independent ID: 25a4c9b9-2808-e296-df03-5837000dcbad
Content: Create a .NET console application using Visual Studio Code - .NET
Content Source: docs/core/tutorials/with-visual-studio-code.md
Product: dotnet-fundamentals
GitHub Login: @tdykstra
Microsoft Alias: tdykstra

Thanks for the suggestion. The current project template doesn't use top-level statements, but we expect to have one that does in .NET 6.

The use of top-level statements in the new-project template has turned out to be controversial, with a lot of negative feedback in places like issue https://github.com/dotnet/docs/issues/26313 . We updated these tutorials for .NET 6 to start with the new template but then show how to proceed by using non-top-level-statements code.

While I appreciate the effort to make C# more beginner-friendly, hiding huge chunks of the language will confuse beginners more than showing them a class container. They might wonder, "where does String[] args come from? How do I return an error code? Why does everything work differently in here than in my other class files?"
The template change makes Program.cs work inconsistently from every other class file, and from standard C# convention. Inconsistency is the best way to confuse beginners. This should be revised.
(P.S. Not sure if this is the official place for comments regarding this change; the official doc page leads to a semi-unrelated GitHub issue for feedback. Apologies if this is in the wrong spot.)


Better S3 memory and data explanation

I was really excited about the S3 usage here.  But how the data is used from s3 is unclear.  What memory requirements are needed for the lambda?  Does the whole data set get pulled in to memory when a lambda is cold booted?  Is there caching?  How would indexes work with this s3 example?
My hope is that Lance is doing some magic on top of s3 data structures that enables fast lookups without pulling ALL the data into memory.  And that Lance enables ANN or KNN indexes on top of that s3 data.
Really excited by this project!

Would be interested in writing a nodejs GCS wrapper too, if I can understand the core structure better.

Thanks! Currently it's just a direct S3 call at the file access level (in the rust core). GCS should already supported as well.
We're considering different caching options. Feedback is more than welcome!

Right now, S3 and local SSD share the same caching strategy.  For IVF_PQ cache, it caches PQ sub-vectors (PQ code and codebook) in an LRU cache in memory, for diskann (on-going work), it caches the search BFS path in the graph.
We are evaluating the algorithms to cache raw vectors using attached SSD partition on Lambda/EC2 now.

So if I'm understanding, it does pull data into the local lambda with some sort of "boot fetch" to s3. Which means incremental updates to data or the index would reduce the value of a cache (some what).  And incremental updates to the s3 would automatically get pushed to s3 for storage and pickup via the next serverless call.


[BUG] The App Crashes On The Bookmarks Tab.

Describe the bug
As elaborated in the title. The same thing happens when I try to create a backup of my tweets.
To Reproduce
Steps to reproduce the behavior:

Go to 'Bookmarks' or 'The Backup Settings'
Click on either one of the ones mentioned above.
See error

Screenshots
I tried to catch a crash report with a few secondary apps but it was not successful. It just goes to the app drawer.
Device
Motorola one hyper running Android 11
Thanks in advance.

I think this issue could be fixed in the v2.16 series. There was a bug with the icon for groups being null, which was able to brick Fritter. I'm not 100% sure that it'll solve this issue, but I'm hopeful.
That release also has some improvements to error handling so even if the error still exists, it shouldn't close the app.
Once you're able to update, please report back if you have success or not!

So as I said on the other one, I updated it to 2.16.0 but the problem keeps persisting. Maybe it's because somw of my saved tweets are from suspended accounts? Or maybe cuz the app data is too big now? It's at 120 mb now but This problem existed when it was way lower than that.
I'll keep you posted.

Updated to 2.16.3 and it still happens. Also I remember reading a comment on the playstore regarding the same issue but it happened on another tab (The main feed, I think)
So it cant be exclusive to the saved section. Would you mind digging a little deeper? Thanks.

Bump. Don't mean to be a pain but i just discovered that this is still an issue in the latest release. Since the last time, Ive uninstalled the f droid version and Installed the github release. Also it seems like certain tweets from certain accounts wont be saved. And some will lose their "saved" status upon restarting the app. Im guessing this is due to some overload? Like maybe there are just too many saved tweets? Keep up the good work and thanks in advance.


Feature Request: Extend the API

Wonder if there are plans to extend the API? It is very limited and I wonder if there are plans for the future?

see also #822


refactor(FMP-364, DepositFlow): extract view model into provider

TODO:

[x] setup initial provider
[x] deprecate initialState usage
[x] add initializer props to provider
[x] update storybook to include new initializer props

Current dependencies on/for this PR:

main

PR #52

PR #53

PR #54

PR #55   👈

This comment was auto-generated by Graphite.

⏳ This pull request is set to merge as part of a Graphite merge job
Stack job ID: VExqmqIMSxeFRAdKggnq.
See details on graphite.dev


Manipulate "args" in before callback

As of now, it's not possible to manipulate the args in the before callback due to the arguments being passed with a splat *args.
However, there are use cases where it would be very useful to do so, most notably when using before callbacks on setter methods. Here's a very simple setter in a gem of mine:
class Runway
  def remarks=(value)
    @remarks = value&.to_s
  end
end

Unfortunately, I'm dealing with very flaky data sources here which is why I have to deal with less than 1% of the data "manually". The least intrusive way to do so are setter callbacks which kick in when nilis about to be assigned:
Runway.before :remarks= do |value, method, object|
  if value.nil?
    value = "data read from a fixture"
  end
end

This does not work, but I see two ways to make it work:

The callback receives the args without splatting which is a breaking API change. On the other hand, it should be a step towards supporting keyword arguments (haven't tried this though).
Use throw to signal the return value of the callback should be used as arguments for method (similar to Rails' throw :abort). This is a non-breaking API change and would look something like this:

Runway.before :remarks= do |value, method, object|
  if value.nil?
    throw(:args, "data read from a fixture")
  end
end

Would you consider to merge such a feature?

Rather than drilling open after_do, I've implemented a barebone callback in my gem doing just the bits I need there:
module MyGem
  module Callback
    def before(method, &block)
      aliased_method = :"__#{method}"
      alias_method aliased_method, method
      private aliased_method
      define_method method do |*args|
        updated_args = block.call(self, method, args)
        updated_args ||= args
        send(aliased_method, *updated_args)
      end
    end
  end
end

Hi there,
thanks for the report. I'll reopen this to keep it in mind for the future. I haven't worked on after_do in a long time but might have some time coming up next year to consider this.
Thanks for providing a usage example. my first instinct was to say "nope" (as it's also not exactly what AOP usually does) but seems like an interesting enough use case that if it was easily supportable I'd happily consider it.
So, thanks :+1: