public async Task Command(string type = null, string channel = null) { User user = await DatabaseQueries.GetOrCreateUserAsync(Context.User.Id); if (type == null && channel == null) { ExpType curChatType = user.ExpChatNotificationType; ExpType curDmType = user.ExpDmNotificationType; string userPref = $"{Context.User.Mention}, here are your current EXP level-up notification preferences:\n\n" + $"Chat reply: `{curChatType.Humanize(LetterCasing.Title)}`\n" + $"DM: `{curDmType.Humanize(LetterCasing.Title)}`"; await SendBasicSuccessEmbedAsync(userPref); return; } ExpType expType = GetExpType(type); ExpChannel expChannel = GetChannelPref(channel); switch (expChannel) { case ExpChannel.CHAT: user.ExpChatNotificationTypeNum = (int)expType; break; case ExpChannel.DM: user.ExpDmNotificationTypeNum = (int)expType; break; case ExpChannel.BOTH: user.ExpChatNotificationTypeNum = (int)expType; user.ExpDmNotificationTypeNum = (int)expType; break; case ExpChannel.DISABLED: user.ExpChatNotificationTypeNum = (int)ExpType.NONE; user.ExpDmNotificationTypeNum = (int)ExpType.NONE; break; default: throw new ArgumentOutOfRangeException(); } await DatabaseQueries.UpdateAsync(user); await Context.Channel.SendBasicSuccessEmbedAsync($"Successfully updated your " + $"EXP notification preferences.\n" + $"New configuration:\n\n" + $"Chat reply: `{user.ExpChatNotificationType.Humanize(LetterCasing.Title)}`\n" + $"DM: `{user.ExpDmNotificationType.Humanize(LetterCasing.Title)}`"); }
public override void DrawLowerPropertyBox() { EditorGUI.BeginChangeCheck(); expType = (ExpType)EditorGUI.EnumPopup(lowerRect, expType); if (EditorGUI.EndChangeCheck()) { OnUpdateNode(); } }
public override void DeserializeSpecialData(string key, string value) { switch (key) { case "et": expType = (ExpType)int.Parse(value); break; } }
private void SetError(ExpType reason) { mState = ExpState.Error; UnsignedDecString = String.Empty; SingedDecString = String.Empty; HexString = String.Empty; BinString = String.Empty; ByteArrayString = reason.ToString(); ExpOutputChanged?.Invoke(this, mState); }
public ExpDefinition() { ID = Guid.NewGuid().ToString(); Name = "New Exp Definition"; MaxLevel = 25; XpForFirstLevel = 100; XpForLastLevel = 100000; Constant = 100; ExpType = ExpType.Logarithmic; ExpUse = ExpUse.PlayerLevelling; IsDefault = false; }
public int GetExpPoint(ExpType type) { switch (type) { case ExpType.HIT: return(HitExp); case ExpType.REFLECT: return(ReflectExp); case ExpType.WALL: return(WallExp); case ExpType.MISS_SHOT: return(MissShot); case ExpType.EARTH_DMG: return(EarthDamage); } return(0); }
public static float GetExp(this ExpType expType) { switch (expType) { case ExpType.Cast: return(1); case ExpType.Hit: return(10); case ExpType.Kill: return(50); default: return(0); } }
ExpType parseTypeExp() { //report("parseTypeExp"); ExpType typeExp = new ExpType(); while (tape.Current.Kind != TokenKind.EOF) { if (tape.Current.IsTypeName()) { typeExp.TypeTokens.Add(tape.Current); tape.MoveNext(); if (tape.Pre.WKind == WordKind.GenericClassName) { break; } } else { break; } } return(typeExp); }
public AddExperiencesPage(ExpType exptype) { InitializeComponent(); Media = new ObservableCollection <MediaFile>() { }; if (exptype == ExpType.Food) { NameLabel.Text = "Food Name"; AddressLabel.Text = "Address of the Hotel"; AvgLabel.IsVisible = false; TimeEntry.Text = "It's a food ! Take your time.. !!!"; TimeEntry.IsVisible = false; } //#if DEBUG // url = "https://us-central1-e0-rasvada.cloudfunctions.net/PageExpEnter"; //#endif url = "https://us-central1-e0-trouvailler.cloudfunctions.net/PageExpEnter"; //_multiMediaPickerService = experience2 = new Experience() { Seasons = new List <string>() { }, //Images = new List<string>() { } expType = exptype }; _multiMediaPickerService.OnMediaPicked += (s, a) => { Device.BeginInvokeOnMainThread(() => { Media.Add(a); }); }; }
public Regexp(ExpType type) { Type = type; }
public override int GetHashCode() { return(SubPeril.GetHashCode() ^ ExpType.GetHashCode() ^ contractGraph.GetHashCode()); }
public override int GetHashCode() { return(SubPeril.GetHashCode() ^ ExpType.GetHashCode() ^ (int)RITCharacterisiticID ^ RITE.GetHashCode()); }
public ParsedExpression(string expression) { if (string.IsNullOrEmpty(expression)) throw new ArgumentNullException(expression); expression = expression.Trim(); _expression = expression; switch (expression.ToUpper()) { case "[S]": // сумма голосов _expType = ExpType.VotesSum; break; case "[M]": // количество мандатов _expType = ExpType.MandateCount; break; case "[P]": // против всех _expType = ExpType.AgainstVotesCount; break; default: if (expression[0] == '{') { ParseRestrictions(); _expType = ExpType.RestrictedCount; } else { throw new Exception("Неопределен тип выражения " + expression); } break; } }
private static double GetExperience(int lvl, ExpType type) => lvl == 1 ? 0 : (75 * lvl * lvl * lvl - 125 * lvl * lvl + 900 * lvl) / (type == ExpType.Level ? 2 : 20);
// Use this for initialization private void Awake() { expType = Tool.exptype; }
public override void SetDefaultValues(AppearanceDefaultValues data) { effectDuration = data.defaults.horizontalExpandDuration; type = data.defaults.horizontalExpandStart; }
private static int GetLevel(double exp, ExpType type) => exp == 0 ? 1 : (int)Math.Ceiling(Cubic.RealRoots((type == ExpType.Level ? -2 : -20) * exp / 75, 900 / 75, -125 / 75).Item1);
public ExpReward(ExpType type, ulong value) { Type = type; Value = value; }
public static void TestPackageExecuter(ExpType type, string fileName, ExpSubType subtype) { if ((type & ExpType.NonPipelinedBlockInverse) == ExpType.NonPipelinedBlockInverse || (type & ExpType.All) == ExpType.All) SaveToCSVFile(Perform(MeasurementPackages.ParallelNonPipelined.BlockInverse()), fileName + "ParallelNonPipelined.BlockInverse.csv"); if ((type & ExpType.Parallel) == ExpType.Parallel || (type & ExpType.All) == ExpType.All) { // parallel measurements if ((subtype & ExpSubType.BlockInverse) == ExpSubType.BlockInverse || (subtype & ExpSubType.All) == ExpSubType.All) SaveToCSVFile(Perform(MeasurementPackages.Parallel.BlockInverse()), fileName + "Parallel.BlockInverse.csv"); if ((subtype & ExpSubType.Inverse) == ExpSubType.Inverse || (subtype & ExpSubType.All) == ExpSubType.All) SaveToCSVFile(Perform(MeasurementPackages.Parallel.Inverse()), fileName + "Parallel.Inverse.csv"); if ((subtype & ExpSubType.LUFactorize) == ExpSubType.LUFactorize || (subtype & ExpSubType.All) == ExpSubType.All) SaveToCSVFile(Perform(MeasurementPackages.Parallel.LUFactorize()), fileName + "Parallel.LUFactorize.csv"); if ((subtype & ExpSubType.MinusPlusPlus) == ExpSubType.MinusPlusPlus || (subtype & ExpSubType.All) == ExpSubType.All) SaveToCSVFile(Perform(MeasurementPackages.Parallel.MinusPlusPlus()), fileName + "Parallel.MinusPlusPlus.csv"); if ((subtype & ExpSubType.Multiply) == ExpSubType.Multiply || (subtype & ExpSubType.All) == ExpSubType.All) SaveToCSVFile(Perform(MeasurementPackages.Parallel.Multiply()), fileName + "Parallel.Multiply.csv"); if ((subtype & ExpSubType.MinusMatrixInverseMatrixMultiply) == ExpSubType.MinusMatrixInverseMatrixMultiply || (subtype & ExpSubType.All) == ExpSubType.All) SaveToCSVFile(Perform(MeasurementPackages.Parallel.MinusMatrixInverseMatrixMultiply()), fileName + "Parallel.MinusMatrixInverseMatrixMultiply.csv"); if ((subtype & ExpSubType.PlusMultiply) == ExpSubType.PlusMultiply || (subtype & ExpSubType.All) == ExpSubType.All) SaveToCSVFile(Perform(MeasurementPackages.Parallel.PlusMultiply()), fileName + "Parallel.PlusMultiply.csv"); } if ((type & ExpType.SingleThreaded) == ExpType.SingleThreaded || (type & ExpType.All) == ExpType.All) { // SingleThreaded measurements if ((subtype & ExpSubType.BlockInverse) == ExpSubType.BlockInverse || (subtype & ExpSubType.All) == ExpSubType.All) SaveToCSVFile(Perform(MeasurementPackages.SingleThreaded.BlockInverse()), fileName + "SingleThreaded.BlockInverse.csv"); if ((subtype & ExpSubType.Inverse) == ExpSubType.Inverse || (subtype & ExpSubType.All) == ExpSubType.All) SaveToCSVFile(Perform(MeasurementPackages.SingleThreaded.Inverse()), fileName + "SingleThreaded.Inverse.csv"); if ((subtype & ExpSubType.LUFactorize) == ExpSubType.LUFactorize || (subtype & ExpSubType.All) == ExpSubType.All) SaveToCSVFile(Perform(MeasurementPackages.SingleThreaded.LUFactorize()), fileName + "SingleThreaded.LUFactorize.csv"); if ((subtype & ExpSubType.MinusPlusPlus) == ExpSubType.MinusPlusPlus || (subtype & ExpSubType.All) == ExpSubType.All) SaveToCSVFile(Perform(MeasurementPackages.SingleThreaded.MinusPlusPlus()), fileName + "SingleThreaded.MinusPlusPlus.csv"); if ((subtype & ExpSubType.Multiply) == ExpSubType.Multiply || (subtype & ExpSubType.All) == ExpSubType.All) SaveToCSVFile(Perform(MeasurementPackages.SingleThreaded.Multiply()), fileName + "SingleThreaded.Multiply.csv"); if ((subtype & ExpSubType.MinusMatrixInverseMatrixMultiply) == ExpSubType.MinusMatrixInverseMatrixMultiply || (subtype & ExpSubType.All) == ExpSubType.All) SaveToCSVFile(Perform(MeasurementPackages.SingleThreaded.MinusMatrixInverseMatrixMultiply()), fileName + "SingleThreaded.MinusMatrixInverseMatrixMultiply.csv"); if ((subtype & ExpSubType.PlusMultiply) == ExpSubType.PlusMultiply || (subtype & ExpSubType.All) == ExpSubType.All) SaveToCSVFile(Perform(MeasurementPackages.SingleThreaded.PlusMultiply()), fileName + "SingleThreaded.PlusMultiply.csv"); } if ((type & ExpType.SingleThreadedTiled) == ExpType.SingleThreadedTiled || (type & ExpType.All) == ExpType.All) { // SingleThreadedTiled measurements if ((subtype & ExpSubType.BlockInverse) == ExpSubType.BlockInverse || (subtype & ExpSubType.All) == ExpSubType.All) SaveToCSVFile(Perform(MeasurementPackages.SingleThreadedTiled.BlockInverse()), fileName + "SingleThreadedTiled.BlockInverse.csv"); if ((subtype & ExpSubType.Inverse) == ExpSubType.Inverse || (subtype & ExpSubType.All) == ExpSubType.All) SaveToCSVFile(Perform(MeasurementPackages.SingleThreadedTiled.Inverse()), fileName + "SingleThreadedTiled.Inverse.csv"); if ((subtype & ExpSubType.LUFactorize) == ExpSubType.LUFactorize || (subtype & ExpSubType.All) == ExpSubType.All) SaveToCSVFile(Perform(MeasurementPackages.SingleThreadedTiled.LUFactorize()), fileName + "SingleThreadedTiled.LUFactorize.csv"); if ((subtype & ExpSubType.MinusPlusPlus) == ExpSubType.MinusPlusPlus || (subtype & ExpSubType.All) == ExpSubType.All) SaveToCSVFile(Perform(MeasurementPackages.SingleThreadedTiled.MinusPlusPlus()), fileName + "SingleThreadedTiled.MinusPlusPlus.csv"); if ((subtype & ExpSubType.Multiply) == ExpSubType.Multiply || (subtype & ExpSubType.All) == ExpSubType.All) SaveToCSVFile(Perform(MeasurementPackages.SingleThreadedTiled.Multiply()), fileName + "SingleThreadedTiled.Multiply.csv"); if ((subtype & ExpSubType.MinusMatrixInverseMatrixMultiply) == ExpSubType.MinusMatrixInverseMatrixMultiply || (subtype & ExpSubType.All) == ExpSubType.All) SaveToCSVFile(Perform(MeasurementPackages.SingleThreadedTiled.MinusMatrixInverseMatrixMultiply()), fileName + "SingleThreadedTiled.MinusMatrixInverseMatrixMultiply.csv"); if ((subtype & ExpSubType.PlusMultiply) == ExpSubType.PlusMultiply || (subtype & ExpSubType.All) == ExpSubType.All) SaveToCSVFile(Perform(MeasurementPackages.SingleThreadedTiled.PlusMultiply()), fileName + "SingleThreadedTiled.PlusMultiply.csv"); } }