public EltControl(CommonControl control) : base(control) { m_Name = control.getName(); m_Expression = control.getExpression(); m_Value = control.getValue(); }
/// <summary> /// Create a boosted field. Use ToString to create the value that would go in a query. /// </summary> /// <param name="field">The name of the field to search in.</param> /// <param name="boost">The boost value to apply to matches on this field.</param> /// <param name="delimeter">The value to place between the field and boost values.</param> public BoostedField(string field, Double? boost = null, string delimiter = _BOOST_DELIMITER_DEFAULT) { if (string.IsNullOrWhiteSpace(field)) throw new ArgumentNullException("field", "BoostedField must have a field."); Field = field; Boost = boost; _Delimeter = delimiter; }
public DriverMyTripLLSObj(string tid,string sAdd, string eAdd, string eTime, string rName, string mobile, double fare, Double? rate) { this.Tid = tid; this.SAdd = sAdd; this.EAdd = eAdd; this.ETime = eTime; this.RName = rName; this.Mobile = mobile; this.Fare = fare; this.Rate = rate; }
/// <summary> /// Creates a new range of double values. /// </summary> /// <param name="Min">The minimum value or lower bound.</param> /// <param name="Max">The maximum value or upper bound.</param> public DoubleMinMax(Double? Min, Double? Max) { #region Initial checks if (Min.HasValue && Max.HasValue && Min > Max) throw new ArgumentException("The minimum must not be larger than the maximum!"); #endregion _Min = Min; _Max = Max; }
/// <summary> /// Load formatter and other configurations /// </summary> /// <returns></returns> protected virtual void LoadParameters(){ //load string parameters. IDictionary<string,string> parameters = GetFormatterParametersData(); if(parameters == null)return; if( parameters.ContainsKey( DefaultValueTag ) ){ _defaultValue = double.Parse(parameters[DefaultValueTag]); } if ( parameters.ContainsKey( FormatStringTag ) ){ _formatString = parameters[FormatStringTag]; } }
public void init(int size,int[] bound) { int b = bound[1] - bound[0]; if(size == 1) { m_val = new Double(); m_val = (RNG.RandomNumber() * b) + bound[0]; } else { m_value = new Double[size]; for (int i = 0; i < size; i++) { //m_value[i] = new Double(); m_value[i] = (RNG.RandomNumber() * b) + bound[0]; } } }
/// <inheritdoc/> protected override bool CheckConvergence( IProgressChannel pch, int iter, FloatLabelCursor.Factory cursorFactory, DualsTableBase duals, IdToIdxLookup idToIdx, VBuffer <Float>[] weights, VBuffer <Float>[] bestWeights, Float[] biasUnreg, Float[] bestBiasUnreg, Float[] biasReg, Float[] bestBiasReg, long count, Double[] metrics, ref Double bestPrimalLoss, ref int bestIter) { Contracts.AssertValue(weights); Contracts.AssertValue(duals); int numClasses = weights.Length; Contracts.Assert(duals.Length >= numClasses * count); Contracts.AssertValueOrNull(idToIdx); Contracts.Assert(Utils.Size(weights) == numClasses); Contracts.Assert(Utils.Size(biasReg) == numClasses); Contracts.Assert(Utils.Size(biasUnreg) == numClasses); Contracts.Assert(Utils.Size(metrics) == 6); var reportedValues = new Double?[metrics.Length + 1]; reportedValues[metrics.Length] = iter; var lossSum = new CompensatedSum(); var dualLossSum = new CompensatedSum(); int numFeatures = weights[0].Length; using (var cursor = cursorFactory.Create()) { long row = 0; Func <UInt128, long, long> getIndexFromIdAndRow = GetIndexFromIdAndRowGetter(idToIdx, biasReg.Length); // Iterates through data to compute loss function. while (cursor.MoveNext()) { var instanceWeight = GetInstanceWeight(cursor); var features = cursor.Features; var label = (int)cursor.Label; var labelOutput = WDot(ref features, ref weights[label], biasReg[label] + biasUnreg[label]); Double subLoss = 0; Double subDualLoss = 0; long idx = getIndexFromIdAndRow(cursor.Id, row); long dualIndex = idx * numClasses; for (int iClass = 0; iClass < numClasses; iClass++) { if (iClass == label) { dualIndex++; continue; } var currentClassOutput = WDot(ref features, ref weights[iClass], biasReg[iClass] + biasUnreg[iClass]); subLoss += _loss.Loss(labelOutput - currentClassOutput, 1); Contracts.Assert(dualIndex == iClass + idx * numClasses); var dual = duals[dualIndex++]; subDualLoss += _loss.DualLoss(1, dual); } lossSum.Add(subLoss * instanceWeight); dualLossSum.Add(subDualLoss * instanceWeight); row++; } Host.Assert(idToIdx == null || row * numClasses == duals.Length); } Contracts.Assert(_args.L2Const.HasValue); Contracts.Assert(_args.L1Threshold.HasValue); Double l2Const = _args.L2Const.Value; Double l1Threshold = _args.L1Threshold.Value; Double weightsL1Norm = 0; Double weightsL2NormSquared = 0; Double biasRegularizationAdjustment = 0; for (int iClass = 0; iClass < numClasses; iClass++) { weightsL1Norm += VectorUtils.L1Norm(ref weights[iClass]) + Math.Abs(biasReg[iClass]); weightsL2NormSquared += VectorUtils.NormSquared(weights[iClass]) + biasReg[iClass] * biasReg[iClass]; biasRegularizationAdjustment += biasReg[iClass] * biasUnreg[iClass]; } Double l1Regularizer = _args.L1Threshold.Value * l2Const * weightsL1Norm; var l2Regularizer = l2Const * weightsL2NormSquared * 0.5; var newLoss = lossSum.Sum / count + l2Regularizer + l1Regularizer; var newDualLoss = dualLossSum.Sum / count - l2Regularizer - l2Const * biasRegularizationAdjustment; var dualityGap = newLoss - newDualLoss; metrics[(int)MetricKind.Loss] = newLoss; metrics[(int)MetricKind.DualLoss] = newDualLoss; metrics[(int)MetricKind.DualityGap] = dualityGap; metrics[(int)MetricKind.BiasUnreg] = biasUnreg[0]; metrics[(int)MetricKind.BiasReg] = biasReg[0]; metrics[(int)MetricKind.L1Sparsity] = _args.L1Threshold == 0 ? 1 : weights.Sum( weight => weight.Values.Count(w => w != 0)) / (numClasses * numFeatures); bool converged = dualityGap / newLoss < _args.ConvergenceTolerance; if (metrics[(int)MetricKind.Loss] < bestPrimalLoss) { for (int iClass = 0; iClass < numClasses; iClass++) { // Maintain a copy of weights and bias with best primal loss thus far. // This is some extra work and uses extra memory, but it seems worth doing it. // REVIEW: Sparsify bestWeights? weights[iClass].CopyTo(ref bestWeights[iClass]); bestBiasReg[iClass] = biasReg[iClass]; bestBiasUnreg[iClass] = biasUnreg[iClass]; } bestPrimalLoss = metrics[(int)MetricKind.Loss]; bestIter = iter; } for (int i = 0; i < metrics.Length; i++) { reportedValues[i] = metrics[i]; } if (pch != null) { pch.Checkpoint(reportedValues); } return(converged); }
[SqlFunction] public static Double?Degrees(Double?value) { return(value == null ? null : (Double?)(value * 180 / Math.PI)); }
/// <summary> /// Stops the controller's current animation. /// </summary> public void StopAnimation() { this.animation = null; this.defaultAnimation = null; this.playbackTime = null; this.timer = 0.0; this.frame = null; }
/// <summary> /// Sets the size of the tab. /// </summary> public void SetTabSize(Double tabSize) { _tabSize = new Double?(tabSize); }
/// <summary> /// Konstruktor XML failide jaoks /// </summary> /// <param name="item"></param> public FinData(XElement item) { foreach (var el in item.Elements("column")) { string attri = ""; try { attri = el.Attribute("name").Value; } catch (NullReferenceException) { } if (!attri.Equals("")) { switch (attri) { case "is_kuupaev": DateTime.TryParseExact(el.Value, "yyyy-MM-dd", new CultureInfo("en-US"), DateTimeStyles.None, out this.kuupaev); break; case "is_symbol": this.bs_symbol = el.Value; break; case "bs_cash_short_term_investments": this.bs_cash_short_term_investments = TryParseNullable(el.Value); break; case "bs_receivables": this.bs_receivables = TryParseNullable(el.Value); break; case "bs_inventory": this.bs_inventory = TryParseNullable(el.Value); break; case "bs_prepaid_expenses": this.bs_prepaid_expenses = TryParseNullable(el.Value); break; case "bs_other_current_assets": this.bs_other_current_assets = TryParseNullable(el.Value); break; case "bs_total_current_assets": this.bs_total_current_assets = TryParseNullable(el.Value); break; case "bs_gross_property_plant_equipment": this.bs_gross_property_plant_equipment = TryParseNullable(el.Value); break; case "bs_accumulated_depreciation": this.bs_accumulated_depreciation = TryParseNullable(el.Value); break; case "bs_net_property_plant_equipment": this.bs_net_property_plant_equipment = TryParseNullable(el.Value); break; case "bs_long_term_investments": this.bs_long_term_investments = TryParseNullable(el.Value); break; case "bs_goodwill_intangibles": this.bs_goodwill_intangibles = TryParseNullable(el.Value); break; case "bs_other_long_term_assets": this.bs_other_long_term_assets = TryParseNullable(el.Value); break; case "bs_total_long_term_assets": this.bs_total_long_term_assets = TryParseNullable(el.Value); break; case "bs_total_assets": this.bs_total_assets = TryParseNullable(el.Value); break; case "bs_liabilities": this.bs_liabilities = TryParseNullable(el.Value); break; case "bs_current_portion_of_long_term_debt": this.bs_current_portion_of_long_term_debt = TryParseNullable(el.Value); break; case "bs_accounts_payable": this.bs_accounts_payable = TryParseNullable(el.Value); break; case "bs_accrued_expenses": this.bs_accrued_expenses = TryParseNullable(el.Value); break; case "bs_deferred_revenues": this.bs_deferred_revenues = TryParseNullable(el.Value); break; case "bs_other_current_liabilities": this.bs_other_current_liabilities = TryParseNullable(el.Value); break; case "bs_total_current_liabilities": this.bs_total_current_liabilities = TryParseNullable(el.Value); break; case "bs_total_long_term_debt": this.bs_total_long_term_debt = TryParseNullable(el.Value); break; case "bs_shareholders_equity": this.bs_shareholders_equity = TryParseNullable(el.Value); break; case "bs_deferred_income_tax": this.bs_deferred_income_tax = TryParseNullable(el.Value); break; case "bs_minority_interest": this.bs_minority_interest = TryParseNullable(el.Value); break; case "bs_other_long_term_liabilities": this.bs_other_long_term_liabilities = TryParseNullable(el.Value); break; case "bs_total_long_term_liabilities": this.bs_total_long_term_liabilities = TryParseNullable(el.Value); break; case "bs_total_liabilities": this.bs_total_liabilities = TryParseNullable(el.Value); break; case "bs_common_shares_outstanding": this.bs_common_shares_outstanding = TryParseNullable(el.Value); break; case "bs_preferred_stock": this.bs_preferred_stock = TryParseNullable(el.Value); break; case "bs_common_stock_net": this.bs_common_stock_net = TryParseNullable(el.Value); break; case "bs_additional_paid_in_capital": this.bs_additional_paid_in_capital = TryParseNullable(el.Value); break; case "bs_retained_earnings": this.bs_retained_earnings = TryParseNullable(el.Value); break; case "bs_treasury_stock": this.bs_treasury_stock = TryParseNullable(el.Value); break; case "bs_other_shareholders_equity": this.bs_other_shareholders_equity = TryParseNullable(el.Value); break; case "bs_shareholders_equity1": this.bs_shareholders_equity1 = TryParseNullable(el.Value); break; case "bs_total_liabilities_shareholders_equity": this.bs_total_liabilities_shareholders_equity = TryParseNullable(el.Value); break; case "is_revenue": this.is_revenue = TryParseNullable(el.Value); break; case "is_cost_of_revenue": this.is_cost_of_revenue = TryParseNullable(el.Value); break; case "is_gross_profit": this.is_gross_profit = TryParseNullable(el.Value); break; case "is_rd_expense": this.is_rd_expense = TryParseNullable(el.Value); break; case "is_selling_general_admin_expense": this.is_selling_general_admin_expense = TryParseNullable(el.Value); break; case "is_depreciation_amortization": this.is_depreciation_amortization = TryParseNullable(el.Value); break; case "is_operating_interest_expense": this.is_operating_interest_expense = TryParseNullable(el.Value); break; case "is_other_operating_income_expense": this.is_other_operating_income_expense = TryParseNullable(el.Value); break; case "is_total_operating_expenses": this.is_total_operating_expenses = TryParseNullable(el.Value); break; case "is_operating_income": this.is_operating_income = TryParseNullable(el.Value); break; case "is_non_operating_income": this.is_non_operating_income = TryParseNullable(el.Value); break; case "is_pretax_income": this.is_pretax_income = TryParseNullable(el.Value); break; case "is_provision_for_income_taxes": this.is_provision_for_income_taxes = TryParseNullable(el.Value); break; case "is_income_after_tax": this.is_income_after_tax = TryParseNullable(el.Value); break; case "is_minority_interest": this.is_minority_interest = TryParseNullable(el.Value); break; case "is_minority_interest1": this.is_minority_interest1 = TryParseNullable(el.Value); break; case "is_equity_in_affiliates": this.is_equity_in_affiliates = TryParseNullable(el.Value); break; case "is_income_before_disc_operations": this.is_income_before_disc_operations = TryParseNullable(el.Value); break; case "is_investment_gains_losses": this.is_investment_gains_losses = TryParseNullable(el.Value); break; case "is_other_income_charges": this.is_other_income_charges = TryParseNullable(el.Value); break; case "is_income_from_disc_operations": this.is_income_from_disc_operations = TryParseNullable(el.Value); break; case "is_net_income": this.is_net_income = TryParseNullable(el.Value); break; case "is_earnings_per_share_data": this.is_earnings_per_share_data = TryParseNullable(el.Value); break; case "is_average_shares_diluted_eps": this.is_average_shares_diluted_eps = TryParseNullable(el.Value); break; case "is_average_shares_basic_eps": this.is_average_shares_basic_eps = TryParseNullable(el.Value); break; case "is_eps_basic": this.is_eps_basic = TryParseNullable(el.Value); break; case "is_eps_diluted": this.is_eps_diluted = TryParseNullable(el.Value); break; case "cfs_net_income": this.cfs_net_income = TryParseNullable(el.Value); break; case "cfs_depreciation_depletion_amortization": this.cfs_depreciation_depletion_amortization = TryParseNullable(el.Value); break; case "cfs_other_non_cash_items": this.cfs_other_non_cash_items = TryParseNullable(el.Value); break; case "cfs_total_non_cash_items": this.cfs_total_non_cash_items = TryParseNullable(el.Value); break; case "cfs_deferred_income_taxes": this.cfs_deferred_income_taxes = TryParseNullable(el.Value); break; case "cfs_total_changes_in_assets_liabilities": this.cfs_total_changes_in_assets_liabilities = TryParseNullable(el.Value); break; case "cfs_other_operating_activities": this.cfs_other_operating_activities = TryParseNullable(el.Value); break; case "cfs_net_cash_from_operating_activities": this.cfs_net_cash_from_operating_activities = TryParseNullable(el.Value); break; case "cfs_cash_flow_investing": this.cfs_cash_flow_investing = TryParseNullable(el.Value); break; case "cfs_capital_expenditures": this.cfs_capital_expenditures = TryParseNullable(el.Value); break; case "cfs_acquisitions_divestitures": this.cfs_acquisitions_divestitures = TryParseNullable(el.Value); break; case "cfs_investments": this.cfs_investments = TryParseNullable(el.Value); break; case "cfs_other_investing_activities": this.cfs_other_investing_activities = TryParseNullable(el.Value); break; case "cfs_cash_flow_financing": this.cfs_cash_flow_financing = TryParseNullable(el.Value); break; case "cfs_net_cash_from_investing_activities": this.cfs_net_cash_from_investing_activities = TryParseNullable(el.Value); break; case "cfs_debt_issued": this.cfs_debt_issued = TryParseNullable(el.Value); break; case "cfs_equity_issued": this.cfs_equity_issued = TryParseNullable(el.Value); break; case "cfs_dividends_paid": this.cfs_dividends_paid = TryParseNullable(el.Value); break; case "cfs_other_financing_activities": this.cfs_other_financing_activities = TryParseNullable(el.Value); break; case "cfs_net_cash_from_financing_activities": this.cfs_net_cash_from_financing_activities = TryParseNullable(el.Value); break; case "cfs_foreign_exchange_effects": this.cfs_foreign_exchange_effects = TryParseNullable(el.Value); break; case "cfs_net_change_in_cash_equivalents": this.cfs_net_change_in_cash_equivalents = TryParseNullable(el.Value); break; case "cfs_cash_beginning_of_period": this.cfs_cash_beginning_of_period = TryParseNullable(el.Value); break; case "cfs_cash_end_of_period": this.cfs_cash_end_of_period = TryParseNullable(el.Value); break; case "fr_accruals": this.fr_accruals = TryParseNullable(el.Value); break; case "fr_altman_z_score": this.fr_altman_z_score = TryParseNullable(el.Value); break; case "fr_asset_utilization": this.fr_asset_utilization = TryParseNullable(el.Value); break; case "fr_beneish_m_score": this.fr_beneish_m_score = TryParseNullable(el.Value); break; case "fr_beta": this.fr_beta = TryParseNullable(el.Value); break; case "fr_book_value": this.fr_book_value = TryParseNullable(el.Value); break; case "fr_book_value_per_share": this.fr_book_value_per_share = TryParseNullable(el.Value); break; case "fr_capital_expenditures": this.fr_capital_expenditures = TryParseNullable(el.Value); break; case "fr_cash_conversion_cycle": this.fr_cash_conversion_cycle = TryParseNullable(el.Value); break; case "fr_cash_div_payout_ratio_ttm": this.fr_cash_div_payout_ratio_ttm = TryParseNullable(el.Value); break; case "fr_cash_financing": this.fr_cash_financing = TryParseNullable(el.Value); break; case "fr_cash_financing_ttm": this.fr_cash_financing_ttm = TryParseNullable(el.Value); break; case "fr_cash_investing": this.fr_cash_investing = TryParseNullable(el.Value); break; case "fr_cash_investing_ttm": this.fr_cash_investing_ttm = TryParseNullable(el.Value); break; case "fr_cash_operations": this.fr_cash_operations = TryParseNullable(el.Value); break; case "fr_cash_operations_ttm": this.fr_cash_operations_ttm = TryParseNullable(el.Value); break; case "fr_cash_and_equivalents": this.fr_cash_and_equivalents = TryParseNullable(el.Value); break; case "fr_cash_and_st_investments": this.fr_cash_and_st_investments = TryParseNullable(el.Value); break; case "fr_current_ratio": this.fr_current_ratio = TryParseNullable(el.Value); break; case "fr_days_inventory_outstanding": this.fr_days_inventory_outstanding = TryParseNullable(el.Value); break; case "fr_days_payable_outstanding": this.fr_days_payable_outstanding = TryParseNullable(el.Value); break; case "fr_days_sales_outstanding": this.fr_days_sales_outstanding = TryParseNullable(el.Value); break; case "fr_debt_to_equity_ratio": this.fr_debt_to_equity_ratio = TryParseNullable(el.Value); break; case "fr_dividend": this.fr_dividend = TryParseNullable(el.Value); break; case "fr_dividend_yield": this.fr_dividend_yield = TryParseNullable(el.Value); break; case "fr_ebitda_margin_ttm": this.fr_ebitda_margin_ttm = TryParseNullable(el.Value); break; case "fr_ebitda_ttm": this.fr_ebitda_ttm = TryParseNullable(el.Value); break; case "fr_ev_ebit": this.fr_ev_ebit = TryParseNullable(el.Value); break; case "fr_ev_ebitda": this.fr_ev_ebitda = TryParseNullable(el.Value); break; case "fr_ev_free_cash_flow": this.fr_ev_free_cash_flow = TryParseNullable(el.Value); break; case "fr_ev_revenues": this.fr_ev_revenues = TryParseNullable(el.Value); break; case "fr_earnings_per_share": this.fr_earnings_per_share = TryParseNullable(el.Value); break; case "fr_earnings_per_share_growth": this.fr_earnings_per_share_growth = TryParseNullable(el.Value); break; case "fr_earnings_per_share_ttm": this.fr_earnings_per_share_ttm = TryParseNullable(el.Value); break; case "fr_earnings_yield": this.fr_earnings_yield = TryParseNullable(el.Value); break; case "fr_effective_tax_rate_ttm": this.fr_effective_tax_rate_ttm = TryParseNullable(el.Value); break; case "fr_enterprise_value": this.fr_enterprise_value = TryParseNullable(el.Value); break; case "fr_expenses": this.fr_expenses = TryParseNullable(el.Value); break; case "fr_expenses_ttm": this.fr_expenses_ttm = TryParseNullable(el.Value); break; case "fr_free_cash_flow": this.fr_free_cash_flow = TryParseNullable(el.Value); break; case "fr_free_cash_flow_ttm": this.fr_free_cash_flow_ttm = TryParseNullable(el.Value); break; case "fr_free_cash_flow_yield": this.fr_free_cash_flow_yield = TryParseNullable(el.Value); break; case "fr_fundamental_score": this.fr_fundamental_score = TryParseNullable(el.Value); break; case "fr_gross_profit_margin": this.fr_gross_profit_margin = TryParseNullable(el.Value); break; case "fr_gross_profit_ttm": this.fr_gross_profit_ttm = TryParseNullable(el.Value); break; case "fr_income_from_cont_ops": this.fr_income_from_cont_ops = TryParseNullable(el.Value); break; case "fr_interest_expense": this.fr_interest_expense = TryParseNullable(el.Value); break; case "fr_interest_income": this.fr_interest_income = TryParseNullable(el.Value); break; case "fr_inventories": this.fr_inventories = TryParseNullable(el.Value); break; case "fr_inventory_turnover": this.fr_inventory_turnover = TryParseNullable(el.Value); break; case "fr_kz_index": this.fr_kz_index = TryParseNullable(el.Value); break; case "fr_liabilities": this.fr_liabilities = TryParseNullable(el.Value); break; case "fr_long_term_debt": this.fr_long_term_debt = TryParseNullable(el.Value); break; case "fr_market_cap": this.fr_market_cap = TryParseNullable(el.Value); break; case "fr_net_income": this.fr_net_income = TryParseNullable(el.Value); break; case "fr_net_income_ttm": this.fr_net_income_ttm = TryParseNullable(el.Value); break; case "fr_net_pp_e": this.fr_net_pp_e = TryParseNullable(el.Value); break; case "fr_operating_earnings_yield": this.fr_operating_earnings_yield = TryParseNullable(el.Value); break; case "fr_operating_margin": this.fr_operating_margin = TryParseNullable(el.Value); break; case "fr_operating_margin_ttm": this.fr_operating_margin_ttm = TryParseNullable(el.Value); break; case "fr_operating_pe_ratio": this.fr_operating_pe_ratio = TryParseNullable(el.Value); break; case "fr_other_comprehensive_income": this.fr_other_comprehensive_income = TryParseNullable(el.Value); break; case "fr_pe_10": this.fr_pe_10 = TryParseNullable(el.Value); break; case "fr_pe_ratio": this.fr_pe_ratio = TryParseNullable(el.Value); break; case "fr_pe_value": this.fr_pe_value = TryParseNullable(el.Value); break; case "fr_peg_ratio": this.fr_peg_ratio = TryParseNullable(el.Value); break; case "fr_ps_value": this.fr_ps_value = TryParseNullable(el.Value); break; case "fr_payout_ratio_ttm": this.fr_payout_ratio_ttm = TryParseNullable(el.Value); break; case "fr_plowback_ratio": this.fr_plowback_ratio = TryParseNullable(el.Value); break; case "fr_price": this.fr_price = TryParseNullable(el.Value); break; case "fr_price_book_value": this.fr_price_book_value = TryParseNullable(el.Value); break; case "fr_price_sales_ratio": this.fr_price_sales_ratio = TryParseNullable(el.Value); break; case "fr_price_tangible_book_value": this.fr_price_tangible_book_value = TryParseNullable(el.Value); break; case "fr_profit_margin": this.fr_profit_margin = TryParseNullable(el.Value); break; case "fr_r_d_expense": this.fr_r_d_expense = TryParseNullable(el.Value); break; case "fr_receivables_turnover": this.fr_receivables_turnover = TryParseNullable(el.Value); break; case "fr_retained_earnings": this.fr_retained_earnings = TryParseNullable(el.Value); break; case "fr_retained_earnings_growth": this.fr_retained_earnings_growth = TryParseNullable(el.Value); break; case "fr_return_on_assets": this.fr_return_on_assets = TryParseNullable(el.Value); break; case "fr_return_on_equity": this.fr_return_on_equity = TryParseNullable(el.Value); break; case "fr_return_on_invested_capital": this.fr_return_on_invested_capital = TryParseNullable(el.Value); break; case "fr_revenue_growth": this.fr_revenue_growth = TryParseNullable(el.Value); break; case "fr_revenue_per_share_ttm": this.fr_revenue_per_share_ttm = TryParseNullable(el.Value); break; case "fr_revenues": this.fr_revenues = TryParseNullable(el.Value); break; case "fr_revenues_ttm": this.fr_revenues_ttm = TryParseNullable(el.Value); break; case "fr_sg_a_expense": this.fr_sg_a_expense = TryParseNullable(el.Value); break; case "fr_shareholders_equity": this.fr_shareholders_equity = TryParseNullable(el.Value); break; case "fr_shares_outstanding": this.fr_shares_outstanding = TryParseNullable(el.Value); break; case "fr_stock_buybacks": this.fr_stock_buybacks = TryParseNullable(el.Value); break; case "fr_tangible_book_value": this.fr_tangible_book_value = TryParseNullable(el.Value); break; case "fr_tangible_book_value_per_share": this.fr_tangible_book_value_per_share = TryParseNullable(el.Value); break; case "fr_tangible_common_equity_ratio": this.fr_tangible_common_equity_ratio = TryParseNullable(el.Value); break; case "fr_times_interest_earned_ttm": this.fr_times_interest_earned_ttm = TryParseNullable(el.Value); break; case "fr_total_assets": this.fr_total_assets = TryParseNullable(el.Value); break; case "fr_total_return_price": this.fr_total_return_price = TryParseNullable(el.Value); break; case "fr_valuation_historical_mult": this.fr_valuation_historical_mult = TryParseNullable(el.Value); break; case "fr_valuation_percentage": this.fr_valuation_percentage = TryParseNullable(el.Value); break; case "fr_value_score": this.fr_value_score = TryParseNullable(el.Value); break; case "fr_working_capital": this.fr_working_capital = TryParseNullable(el.Value); break; case "fr_standard_deviation": this.fr_standard_deviation = TryParseNullable(el.Value); break; case "fr_roic_growth_rate": this.fr_roic_growth_rate = TryParseNullable(el.Value); break; case "fr_quick_ratio": this.fr_quick_ratio = TryParseNullable(el.Value); break; case "fr_asset_coverage": this.fr_asset_coverage = TryParseNullable(el.Value); break; case "fr_dscr": this.fr_dscr = TryParseNullable(el.Value); break; case "fr_debt_EBITDA": this.fr_debt_EBITDA = TryParseNullable(el.Value); break; case "fr_eq_prc": this.fr_eq_prc = TryParseNullable(el.Value); break; case "fr_cash_flow_volatility": this.fr_cash_flow_volatility = TryParseNullable(el.Value); break; case "fr_turnover_ratio": this.fr_turnover_ratio = TryParseNullable(el.Value); break; case "fr_book_to_market": this.fr_book_to_market = TryParseNullable(el.Value); break; case "fr_earnings_to_price_ratio": this.fr_earnings_to_price_ratio = TryParseNullable(el.Value); break; case "fr_cash_flow_to_price_ratio": this.fr_cash_flow_to_price_ratio = TryParseNullable(el.Value); break; case "fr_sales_growth_ratio": this.fr_sales_growth_ratio = TryParseNullable(el.Value); break; case "fr_netIncomeTTM": this.fr_netIncomeTTM = TryParseNullable(el.Value); break; case "fr_dividendsPaidTTM": this.fr_dividendsPaidTTM = TryParseNullable(el.Value); break; case "fr_dividendTTM": this.fr_dividendTTM = TryParseNullable(el.Value); break; case "fr_sharesTTM": this.fr_sharesTTM = TryParseNullable(el.Value); break; case "fr_ebitTTM": this.fr_ebitTTM = TryParseNullable(el.Value); break; case "fr_incomeTaxesTTM": this.fr_incomeTaxesTTM = TryParseNullable(el.Value); break; case "fr_preTaxIncomeTTM": this.fr_preTaxIncomeTTM = TryParseNullable(el.Value); break; case "fr_contOpsEpsTTM": this.fr_contOpsEpsTTM = TryParseNullable(el.Value); break; case "fr_operatingProfitTTM": this.fr_operatingProfitTTM = TryParseNullable(el.Value); break; case "fr_bookValuePerShareTTM": this.fr_bookValuePerShareTTM = TryParseNullable(el.Value); break; case "fr_tangibleBookValuePerShareTTM": this.fr_tangibleBookValuePerShareTTM = TryParseNullable(el.Value); break; case "fr_costRevenueTTM": this.fr_costRevenueTTM = TryParseNullable(el.Value); break; case "fr_interestExpensesTTM": this.fr_interestExpensesTTM = TryParseNullable(el.Value); break; case "fr_debtTTM": this.fr_debtTTM = TryParseNullable(el.Value); break; case "fr_ebit": this.fr_ebit = TryParseNullable(el.Value); break; case "fr_ebitda": this.fr_ebitda = TryParseNullable(el.Value); break; case "fr_interestPrc": this.fr_interestPrc = TryParseNullable(el.Value); break; case "fr_avgPayables2": this.fr_avgPayables2 = TryParseNullable(el.Value); break; case "fr_avgReceivables2": this.fr_avgReceivables2 = TryParseNullable(el.Value); break; case "fr_avgInventory2": this.fr_avgInventory2 = TryParseNullable(el.Value); break; case "fr_avgAssets5": this.fr_avgAssets5 = TryParseNullable(el.Value); break; case "fr_avgInventory5": this.fr_avgInventory5 = TryParseNullable(el.Value); break; case "fr_avgReceivables5": this.fr_avgReceivables5 = TryParseNullable(el.Value); break; case "fr_avgPayables5": this.fr_avgPayables5 = TryParseNullable(el.Value); break; case "fr_avgEquity5": this.fr_avgEquity5 = TryParseNullable(el.Value); break; case "fr_avgInvestedCapital5": this.fr_avgInvestedCapital5 = TryParseNullable(el.Value); break; case "fr_stdCashFlowOperationsTTM": this.fr_stdCashFlowOperationsTTM = TryParseNullable(el.Value); break; case "fr_cashFlowOperationsTTM1": this.fr_cashFlowOperationsTTM1 = TryParseNullable(el.Value); break; case "fr_cashFlowOperationsTTM2": this.fr_cashFlowOperationsTTM2 = TryParseNullable(el.Value); break; case "fr_cashFlowOperationsTTM3": this.fr_cashFlowOperationsTTM3 = TryParseNullable(el.Value); break; case "fr_cashFlowOperationsTTM4": this.fr_cashFlowOperationsTTM4 = TryParseNullable(el.Value); break; case "fr_cashFlowOperationsTTM5": this.fr_cashFlowOperationsTTM5 = TryParseNullable(el.Value); break; case "fr_avgEps10yTTM": this.fr_avgEps10yTTM = TryParseNullable(el.Value); break; case "fr_eps4ago": this.fr_eps4ago = TryParseNullable(el.Value); break; case "fr_retainedEarnings4ago": this.fr_retainedEarnings4ago = TryParseNullable(el.Value); break; case "fr_revenue4ago": this.fr_revenue4ago = TryParseNullable(el.Value); break; } // switch } // if attri.equals(""); } // foreach }
/// <summary> /// Sets the UpperThreshold property /// </summary> /// <param name="upperThreshold">The upper limit for the metric. If all datapoints in the last BreachDuration seconds exceed the upper threshold /// or fall below the lower threshold, the trigger activates.</param> /// <returns>this instance</returns> public CreateOrUpdateScalingTriggerRequest WithUpperThreshold(Double upperThreshold) { this.upperThresholdField = upperThreshold; return this; }
/// <summary> /// Sets the Minimum property /// </summary> /// <param name="minimum">Minimum of samples for the datapoint.</param> /// <returns>this instance</returns> public Datapoint WithMinimum(Double minimum) { this.minimumField = minimum; return this; }
//private static object ConvertToT<T>(object Source) //{ // object theRet = Source; // if (Source is string) // { // return (Source as string).ConvertToTargetType(typeof(T), Source); // } // return theRet; //} /// <summary> /// 将值转换成指定类型的值. /// </summary> /// <param name="Source">源</param> /// <param name="type">指定类型</param> /// <param name="DefaultValue">没转换成功返回的值</param> /// <returns>指定类型的值,转换不成功返回default值.</returns> public static object ConvertToTargetType(this string Source, Type type, object DefaultValue) { if (type == typeof(string)) { return(Source); } if (type == typeof(Boolean)) { Boolean theRet = Boolean.Parse(Source); return(theRet); } if (type == typeof(byte)) { Byte theRet = Byte.Parse(Source); return(theRet); } if (type == typeof(Char)) { Char theRet = Char.Parse(Source); return(theRet); } if (type == typeof(DateTime)) { DateTime theRet = DateTime.Parse(Source); return(theRet); } if (type == typeof(Decimal)) { Decimal theRet = Decimal.Parse(Source); return(theRet); } if (type == typeof(Double)) { Double theRet = Double.Parse(Source); return(theRet); } if (type == typeof(Int16)) { Int16 theRet = Int16.Parse(Source); return(theRet); } if (type == typeof(Int32)) { Int32 theRet = Int32.Parse(Source); return(theRet); } if (type == typeof(SByte)) { SByte theRet = SByte.Parse(Source); return(theRet); } if (type == typeof(int)) { int theRet = int.Parse(Source); return(theRet); } if (type == typeof(Single)) { Single theRet = Single.Parse(Source); return(theRet); } if (type == typeof(String)) { String theRet = Source; return(theRet); } if (type == typeof(UInt16)) { UInt16 theRet = UInt16.Parse(Source); return(theRet); } if (type == typeof(UInt32)) { UInt32 theRet = UInt32.Parse(Source); return(theRet); } if (type == typeof(UInt64)) { UInt64 theRet = UInt64.Parse(Source); return(theRet); } //可空基本类型处理. if (type == typeof(Boolean?)) { Boolean?theRet = (Source != null && Source != "" && Source != string.Empty) ? (Boolean?)bool.Parse(Source) : null; return(theRet); } if (type == typeof(byte?)) { Byte?theRet = (Source != null && Source != "" && Source != string.Empty) ? (Byte?)Byte.Parse(Source) : null; return(theRet); } if (type == typeof(Char?)) { Char?theRet = (Source != null && Source != "" && Source != string.Empty) ? (Char?)Char.Parse(Source) : null; return(theRet); } if (type == typeof(DateTime?)) { DateTime?theRet = (Source != null && Source != "" && Source != string.Empty) ? (DateTime?)DateTime.Parse(Source) : null; return(theRet); } if (type == typeof(Decimal?)) { Decimal?theRet = (Source != null && Source != "" && Source != string.Empty) ? (Decimal?)Decimal.Parse(Source) : null; return(theRet); } if (type == typeof(Double?)) { Double?theRet = (Source != null && Source != "" && Source != string.Empty) ? (Double?)Double.Parse(Source) : null; return(theRet); } if (type == typeof(Int16?)) { Int16?theRet = (Source != null && Source != "" && Source != string.Empty) ? (Int16?)Int16.Parse(Source) : null; return(theRet); } if (type == typeof(Int32?)) { Int32?theRet = (Source != null && Source != "" && Source != string.Empty) ? (Int32?)Int32.Parse(Source) : null; return(theRet); } if (type == typeof(Int64?)) { Int64?theRet = (Source != null && Source != "" && Source != string.Empty) ? (Int64?)Int64.Parse(Source) : null; return(theRet); } if (type == typeof(SByte?)) { SByte?theRet = (Source != null && Source != "" && Source != string.Empty) ? (SByte?)SByte.Parse(Source) : null; return(theRet); } if (type == typeof(int?)) { int?theRet = (Source != null && Source != "" && Source != string.Empty) ? (int?)int.Parse(Source) : null; return(theRet); } if (type == typeof(Single?)) { Single?theRet = (Source != null && Source != "" && Source != string.Empty) ? (Single?)Single.Parse(Source) : null; return(theRet); } if (type == typeof(UInt16?)) { UInt16?theRet = (Source != null && Source != "" && Source != string.Empty) ? (UInt16?)UInt16.Parse(Source) : null; return(theRet); } if (type == typeof(UInt32?)) { UInt32?theRet = (Source != null && Source != "" && Source != string.Empty) ? (UInt32?)UInt32.Parse(Source) : null; return(theRet); } if (type == typeof(UInt64?)) { UInt64?theRet = (Source != null && Source != "" && Source != string.Empty) ? (UInt64?)UInt64.Parse(Source) : null; return(theRet); } return(DefaultValue); }
[SqlFunction] public static Double?Round(Double?value) { return(Round(value, 0)); }
public static Double?Power(Double?x, Double?y) { return(x == null || y == null ? null : (Double?)Math.Pow(x.Value, y.Value)); }
[SqlFunction] public static Double?Log10(Double?value) { return(value == null ? null : (Double?)Math.Log10(value.Value)); }
[SqlFunction] public static Double?Floor(Double?value) { return(value == null ? null : (Double?)Math.Floor(value.Value)); }
[SqlFunction] public static Double?Exp(Double?value) { return(value == null ? null : (Double?)Math.Exp(value.Value)); }
/// <summary> /// </summary> /// <param name="Query">Bing search query Sample Values : xbox</param> /// <param name="Options">Specifies options for this request for all Sources. Valid values are: DisableLocationDetection, EnableHighlighting. Sample Values : EnableHighlighting</param> /// <param name="WebSearchOptions">Specify options for a request to the Web SourceType. Valid values are: DisableHostCollapsing, DisableQueryAlterations. Sample Values : DisableQueryAlterations</param> /// <param name="Market">Market. Note: Not all Sources support all markets. Sample Values : en-US</param> /// <param name="Adult">Adult setting is used for filtering sexually explicit content Sample Values : Moderate</param> /// <param name="Latitude">Latitude Sample Values : 47.603450</param> /// <param name="Longitude">Longitude Sample Values : -122.329696</param> /// <param name="WebFileType">File extensions to return Sample Values : XLS</param> public DataServiceQuery <WebResult> Web(String Query, String Options, String WebSearchOptions, String Market, String Adult, Double?Latitude, Double?Longitude, String WebFileType) { if ((Query == null)) { throw new System.ArgumentNullException("Query", "Query value cannot be null"); } DataServiceQuery <WebResult> query; query = base.CreateQuery <WebResult>("Web"); if ((Query != null)) { query = query.AddQueryOption("Query", string.Concat("\'", System.Uri.EscapeDataString(Query), "\'")); } if ((Options != null)) { query = query.AddQueryOption("Options", string.Concat("\'", System.Uri.EscapeDataString(Options), "\'")); } if ((WebSearchOptions != null)) { query = query.AddQueryOption("WebSearchOptions", string.Concat("\'", System.Uri.EscapeDataString(WebSearchOptions), "\'")); } if ((Market != null)) { query = query.AddQueryOption("Market", string.Concat("\'", System.Uri.EscapeDataString(Market), "\'")); } if ((Adult != null)) { query = query.AddQueryOption("Adult", string.Concat("\'", System.Uri.EscapeDataString(Adult), "\'")); } if (((Latitude != null) && (Latitude.HasValue == true))) { query = query.AddQueryOption("Latitude", Latitude.Value); } if (((Longitude != null) && (Longitude.HasValue == true))) { query = query.AddQueryOption("Longitude", Longitude.Value); } if ((WebFileType != null)) { query = query.AddQueryOption("WebFileType", string.Concat("\'", System.Uri.EscapeDataString(WebFileType), "\'")); } return(query); }
/// <summary> /// Sets the Average property /// </summary> /// <param name="average">Average of samples for the datapoint.</param> /// <returns>this instance</returns> public Datapoint WithAverage(Double average) { this.averageField = average; return this; }
public void ScaleBy(Double xScale, Double yScale, Double? zScale) { this.x *= xScale; this.y *= yScale; this.z *= zScale; }
/// <summary> /// Sets the Sum property /// </summary> /// <param name="sum">Sum of samples for the datapoint.</param> /// <returns>this instance</returns> public Datapoint WithSum(Double sum) { this.sumField = sum; return this; }
public RunResult(ParameterSet parameterSet, Double metricValue, bool isMetricMaximizing) { _parameterSet = parameterSet; _metricValue = metricValue; _isMetricMaximizing = isMetricMaximizing; }
private double getDistanciaMedrano() { if (!_distanciaMedrano.HasValue) { _distanciaMedrano = Direccion.Distance(Helpers.MEDRANO); } return _distanciaMedrano.Value; }
/// <summary> /// </summary> /// <param name="Query">Bing search query Sample Values : xbox</param> /// <param name="Options">Specifies options for this request for all Sources. Valid values are: DisableLocationDetection, EnableHighlighting. Sample Values : EnableHighlighting</param> /// <param name="Market">Market. Note: Not all Sources support all markets. Sample Values : en-US</param> /// <param name="Adult">Adult setting is used for filtering sexually explicit content Sample Values : Moderate</param> /// <param name="Latitude">Latitude Sample Values : 47.603450</param> /// <param name="Longitude">Longitude Sample Values : -122.329696</param> /// <param name="NewsLocationOverride">Overrides Bing location detection. This parameter is only applicable in en-US market. Sample Values : US.WA</param> /// <param name="NewsCategory">The category of news for which to provide results Sample Values : rt_Business</param> /// <param name="NewsSortBy">The sort order of results returned Sample Values : Date</param> public DataServiceQuery <NewsResult> News(String Query, String Options, String Market, String Adult, Double?Latitude, Double?Longitude, String NewsLocationOverride, String NewsCategory, String NewsSortBy) { if ((Query == null)) { throw new System.ArgumentNullException("Query", "Query value cannot be null"); } DataServiceQuery <NewsResult> query; query = base.CreateQuery <NewsResult>("News"); if ((Query != null)) { query = query.AddQueryOption("Query", string.Concat("\'", System.Uri.EscapeDataString(Query), "\'")); } if ((Options != null)) { query = query.AddQueryOption("Options", string.Concat("\'", System.Uri.EscapeDataString(Options), "\'")); } if ((Market != null)) { query = query.AddQueryOption("Market", string.Concat("\'", System.Uri.EscapeDataString(Market), "\'")); } if ((Adult != null)) { query = query.AddQueryOption("Adult", string.Concat("\'", System.Uri.EscapeDataString(Adult), "\'")); } if (((Latitude != null) && (Latitude.HasValue == true))) { query = query.AddQueryOption("Latitude", Latitude.Value); } if (((Longitude != null) && (Longitude.HasValue == true))) { query = query.AddQueryOption("Longitude", Longitude.Value); } if ((NewsLocationOverride != null)) { query = query.AddQueryOption("NewsLocationOverride", string.Concat("\'", System.Uri.EscapeDataString(NewsLocationOverride), "\'")); } if ((NewsCategory != null)) { query = query.AddQueryOption("NewsCategory", string.Concat("\'", System.Uri.EscapeDataString(NewsCategory), "\'")); } if ((NewsSortBy != null)) { query = query.AddQueryOption("NewsSortBy", string.Concat("\'", System.Uri.EscapeDataString(NewsSortBy), "\'")); } return(query); }
protected override void EstablishContext() { base.EstablishContext(); RawValue = new Random().Next(); EngValue = Converter.RawToEng(RawValue); }
public Double?EchoNullableDouble(Double?arg0) { return(arg0); }
/// <summary> /// Sets the UpperThreshold property /// </summary> /// <param name="upperThreshold">The upper limit of the metric used. The trigger fires if all datapoints in the last /// BreachDuration seconds exceed the upper threshold or fall below the lower threshold.</param> /// <returns>this instance</returns> public Trigger WithUpperThreshold(Double upperThreshold) { this.upperThresholdField = upperThreshold; return this; }
public static ITarifarioConceptoFacturableTope GetTarifarioTope(Int32?TarifarioConceptoFacturableTopeID, Int32?TarifarioConceptoFacturableID, Int32?Tope, Double?Valor, Boolean?Baja, Boolean RegistroNuevo) { return((ITarifarioConceptoFacturableTope) new TarifarioConceptoFacturableTope() { TarifarioConceptoFacturableTopeID = TarifarioConceptoFacturableTopeID, TarifarioConceptoFacturableID = TarifarioConceptoFacturableID, Tope = Tope, Valor = Valor, Baja = Baja, RegistroNuevo = RegistroNuevo }); }
public PowerGaugeGeometry(PowerGauge g) { UseStandardSize = g.UseStandardSize; Scale1LeftMarks = g.Scale1LeftMarks; Scale1RightMarks = g.Scale1RightMarks; Scale1MajorMarks = g.Scale1MajorMarks; Scale1RightMinorMarks = g.Scale1RightMinorMarks; Scale1LeftMinorMarks = g.Scale1LeftMinorMarks; Scale1Centre = g.Scale1Centre; Scale1Factor = g.Scale1Factor; Scale1Max = g.Scale1Max; Scale1Min = g.Scale1Min; if (UseStandardSize) LoadStandardSize(); else if (g.geometry != null) { LeftMultiple = g.geometry.LeftMultiple; RightMultiple = g.geometry.RightMultiple; } else { LeftMultiple = Scale1Multiplier; RightMultiple = LeftMultiple; } Validate(); }
public NumericParamArguments() { NumSteps = 100; StepSize = null; LogBase = false; }
public UInt64 GetTotalRecordsCount(string tableName, string columnName, string searchParamS, Double?searchParamN) { return(Channel.GetTotalRecordsCount(tableName, columnName, searchParamS, searchParamN)); }
private void Leer() { Excel.Application xlApp; Excel.Workbook xlWorkBook; Excel.Worksheet xlWorkSheet; Excel.Range range; string str = ""; int rCnt = 0; int cCnt = 0; int rw = 0; int cl = 0; string Ruta = txt_Ruta.Text; // string Ruta = "C:\\SISTEMA\\LISTA.xlsx"; // string Ruta = "D:\\AG\\LISTA.xlsx"; xlApp = new Excel.Application(); xlWorkBook = xlApp.Workbooks.Open(Ruta, 0, true, 5, "", "", true, Microsoft.Office.Interop.Excel.XlPlatform.xlWindows, "\t", false, false, 0, true, 1, 0); xlWorkSheet = (Excel.Worksheet)xlWorkBook.Worksheets.get_Item(1); range = xlWorkSheet.UsedRange; rw = range.Rows.Count; cl = range.Columns.Count; string Codigo = ""; Int32? Id = 0; int Stock = 0; Double PrecioVenta = 0; string Nombre = ""; string Tipo = ""; Int32 CodTipo = 0; cTipo objTipo = new cTipo(); cJoya joya = new Clases.cJoya(); Double? Costo = null; cArticulo Articulo = new Clases.cArticulo(); for (rCnt = 2; rCnt <= rw; rCnt++) { for (cCnt = 1; cCnt <= cl; cCnt++) { txtProceso.Text = rCnt.ToString(); switch (cCnt) { case 1: if ((range.Cells[rCnt, cCnt] as Excel.Range).Value2 != null) { Id = (Int32)(range.Cells[rCnt, cCnt] as Excel.Range).Value2; } break; case 2: if ((range.Cells[rCnt, cCnt] as Excel.Range).Value2 != null) { Nombre = (string)(range.Cells[rCnt, cCnt] as Excel.Range).Value2; } else { Nombre = null; } break; case 3: Tipo = (string)(range.Cells[rCnt, cCnt] as Excel.Range).Value2; // string[] vec = tip.Split(); // Tipo = vec[0]; break; case 5: if ((range.Cells[rCnt, cCnt] as Excel.Range).Value2 != null) { //Codigo Codigo = (string)(range.Cells[rCnt, cCnt] as Excel.Range).Value2; // string[] vec = Cod.Split(); ; //Codigo = vec[0]; } break; case 6: if ((range.Cells[rCnt, cCnt] as Excel.Range).Value2 != null) { Stock = (Int32)(range.Cells[rCnt, cCnt] as Excel.Range).Value2; } else { Stock = 0; } break; case 9: if ((range.Cells[rCnt, cCnt] as Excel.Range).Value2 != null) { PrecioVenta = (Double)(range.Cells[rCnt, cCnt] as Excel.Range).Value2; } else { PrecioVenta = 0; } break; } } Nombre = Nombre.Replace("'", ""); CodTipo = objTipo.GetCodxNombre(Tipo); if (CodTipo == -1) { if (Tipo != "") { CodTipo = objTipo.Insertar(Tipo); } } if (joya.Existexid(Convert.ToInt32(Id)) == false) { joya.Insertar(Nombre, CodTipo, Convert.ToInt32(Id), Stock, PrecioVenta, Codigo); } } string msj = "Filas recorridos " + rCnt.ToString(); MessageBox.Show(msj); xlWorkBook.Close(true, null, null); xlApp.Quit(); // Marshal.ReleaseComObject(xlWorkSheet); // Marshal.ReleaseComObject(xlWorkBook); // Marshal.ReleaseComObject(xlApp); }
/// <summary> /// </summary> /// <param name="Sources">Bing search sources Sample Values : web+image+video+news+spell</param> /// <param name="Query">Bing search query Sample Values : xbox</param> /// <param name="Options">Specifies options for this request for all Sources. Valid values are: DisableLocationDetection, EnableHighlighting. Sample Values : EnableHighlighting</param> /// <param name="WebSearchOptions">Specify options for a request to the Web SourceType. Valid values are: DisableHostCollapsing, DisableQueryAlterations. Sample Values : DisableQueryAlterations</param> /// <param name="Market">Market. Note: Not all Sources support all markets. Sample Values : en-US</param> /// <param name="Adult">Adult setting is used for filtering sexually explicit content Sample Values : Moderate</param> /// <param name="Latitude">Latitude Sample Values : 47.603450</param> /// <param name="Longitude">Longitude Sample Values : -122.329696</param> /// <param name="WebFileType">File extensions to return Sample Values : XLS</param> /// <param name="ImageFilters">Array of strings that filter the response the API sends based on size, aspect, color, style, face or any combination thereof. Valid values are: Size:Small, Size:Medium, Size:Large, Size:Width:[Width], Size:Height:[Height], Aspect:Square, Aspect:Wide, Aspect:Tall, Color:Color, Color:Monochrome, Style:Photo, Style:Graphics, Face:Face, Face:Portrait, Face:Other. Sample Values : Size:Small+Aspect:Square</param> /// <param name="VideoFilters">Array of strings that filter the response the API sends based on size, aspect, color, style, face or any combination thereof. Valid values are: Duration:Short, Duration:Medium, Duration:Long, Aspect:Standard, Aspect:Widescreen, Resolution:Low, Resolution:Medium, Resolution:High. Sample Values : Duration:Short+Resolution:High</param> /// <param name="VideoSortBy">The sort order of results returned Sample Values : Date</param> /// <param name="NewsLocationOverride">Overrides Bing location detection. This parameter is only applicable in en-US market. Sample Values : US.WA</param> /// <param name="NewsCategory">The category of news for which to provide results Sample Values : rt_Business</param> /// <param name="NewsSortBy">The sort order of results returned Sample Values : Date</param> public DataServiceQuery <ExpandableSearchResult> Composite(String Sources, String Query, String Options, String WebSearchOptions, String Market, String Adult, Double?Latitude, Double?Longitude, String WebFileType, String ImageFilters, String VideoFilters, String VideoSortBy, String NewsLocationOverride, String NewsCategory, String NewsSortBy) { if ((Sources == null)) { throw new System.ArgumentNullException("Sources", "Sources value cannot be null"); } if ((Query == null)) { throw new System.ArgumentNullException("Query", "Query value cannot be null"); } DataServiceQuery <ExpandableSearchResult> query; query = base.CreateQuery <ExpandableSearchResult>("Composite"); if ((Sources != null)) { query = query.AddQueryOption("Sources", string.Concat("\'", System.Uri.EscapeDataString(Sources), "\'")); } if ((Query != null)) { query = query.AddQueryOption("Query", string.Concat("\'", System.Uri.EscapeDataString(Query), "\'")); } if ((Options != null)) { query = query.AddQueryOption("Options", string.Concat("\'", System.Uri.EscapeDataString(Options), "\'")); } if ((WebSearchOptions != null)) { query = query.AddQueryOption("WebSearchOptions", string.Concat("\'", System.Uri.EscapeDataString(WebSearchOptions), "\'")); } if ((Market != null)) { query = query.AddQueryOption("Market", string.Concat("\'", System.Uri.EscapeDataString(Market), "\'")); } if ((Adult != null)) { query = query.AddQueryOption("Adult", string.Concat("\'", System.Uri.EscapeDataString(Adult), "\'")); } if (((Latitude != null) && (Latitude.HasValue == true))) { query = query.AddQueryOption("Latitude", Latitude.Value); } if (((Longitude != null) && (Longitude.HasValue == true))) { query = query.AddQueryOption("Longitude", Longitude.Value); } if ((WebFileType != null)) { query = query.AddQueryOption("WebFileType", string.Concat("\'", System.Uri.EscapeDataString(WebFileType), "\'")); } if ((ImageFilters != null)) { query = query.AddQueryOption("ImageFilters", string.Concat("\'", System.Uri.EscapeDataString(ImageFilters), "\'")); } if ((VideoFilters != null)) { query = query.AddQueryOption("VideoFilters", string.Concat("\'", System.Uri.EscapeDataString(VideoFilters), "\'")); } if ((VideoSortBy != null)) { query = query.AddQueryOption("VideoSortBy", string.Concat("\'", System.Uri.EscapeDataString(VideoSortBy), "\'")); } if ((NewsLocationOverride != null)) { query = query.AddQueryOption("NewsLocationOverride", string.Concat("\'", System.Uri.EscapeDataString(NewsLocationOverride), "\'")); } if ((NewsCategory != null)) { query = query.AddQueryOption("NewsCategory", string.Concat("\'", System.Uri.EscapeDataString(NewsCategory), "\'")); } if ((NewsSortBy != null)) { query = query.AddQueryOption("NewsSortBy", string.Concat("\'", System.Uri.EscapeDataString(NewsSortBy), "\'")); } return(query); }
/** * Test a value against a simple (< > <= >= = starts-with) condition string. * * @param value The value to Check. * @param condition The condition to check for. * @return Whether the condition holds. * @If comparison operator and operands don't match. */ private static bool testNormalCondition(ValueEval value, ValueEval condition) { if (condition is StringEval) { String conditionString = ((StringEval)condition).StringValue; if (conditionString.StartsWith("<")) { // It's a </<= condition. String number = conditionString.Substring(1); if (number.StartsWith("=")) { number = number.Substring(1); return(testNumericCondition(value, Operator.smallerEqualThan, number)); } else { return(testNumericCondition(value, Operator.smallerThan, number)); } } else if (conditionString.StartsWith(">")) { // It's a >/>= condition. String number = conditionString.Substring(1); if (number.StartsWith("=")) { number = number.Substring(1); return(testNumericCondition(value, Operator.largerEqualThan, number)); } else { return(testNumericCondition(value, Operator.largerThan, number)); } } else if (conditionString.StartsWith("=")) { // It's a = condition. String stringOrNumber = conditionString.Substring(1); if (string.IsNullOrEmpty(stringOrNumber)) { return(value is BlankEval); } // Distinguish between string and number. bool itsANumber = false; try { int.Parse(stringOrNumber); itsANumber = true; } catch (FormatException) { // It's not an int. try { Double.Parse(stringOrNumber); itsANumber = true; } catch (FormatException) { // It's a string. itsANumber = false; } } if (itsANumber) { return(testNumericCondition(value, Operator.equal, stringOrNumber)); } else { // It's a string. String valueString = value is BlankEval ? "" : OperandResolver.CoerceValueToString(value); return(stringOrNumber.Equals(valueString)); } } else { // It's a text starts-with condition. if (string.IsNullOrEmpty(conditionString)) { return(value is StringEval); } else { String valueString = value is BlankEval ? "" : OperandResolver.CoerceValueToString(value); return(valueString.StartsWith(conditionString)); } } } else if (condition is NumericValueEval) { double conditionNumber = ((NumericValueEval)condition).NumberValue; Double?valueNumber = GetNumberFromValueEval(value); if (valueNumber == null) { return(false); } return(conditionNumber == valueNumber); } else if (condition is ErrorEval) { if (value is ErrorEval) { return(((ErrorEval)condition).ErrorCode == ((ErrorEval)value).ErrorCode); } else { return(false); } } else { return(false); } }
/// <summary> /// Sets the PercentOff property /// </summary> /// <param name="percentOff">PercentOff property</param> /// <returns>this instance</returns> public PromotionBenefit WithPercentOff(Double percentOff) { this.percentOffField = percentOff; return this; }
/// <summary> /// Convenience constructor for public facing API. /// </summary> /// <param name="env">Host Environment.</param> /// <param name="input">Input <see cref="IDataView"/>. This is the output from previous transform or loader.</param> /// <param name="column">Name of the input column.</param> /// <param name="minimum">Minimum value (0 to 1 for key types).</param> /// <param name="maximum">Maximum value (0 to 1 for key types).</param> public RangeFilter(IHostEnvironment env, IDataView input, string column, Double?minimum = null, Double?maximum = null) : this(env, new Arguments() { Column = column, Min = minimum, Max = maximum }, input) { }
/// <summary> /// Sets the Maximum property /// </summary> /// <param name="maximum">Maximum of the samples used for the datapoint.</param> /// <returns>this instance</returns> public Datapoint WithMaximum(Double maximum) { this.maximumField = maximum; return this; }
public override Boolean OnTouchMove(Point point) { var start = startPoint.Value; if ((start - point).Length < this.drawingCanvas.StrokeThickness) { return(true); } var dc = this.RenderOpen(); endPoint = point; var x = Math.Abs(point.X - start.X) / Dpi.Cm2Wpf; var y = Math.Abs(point.Y - start.Y) / Dpi.Cm2Wpf; var len = Math.Sqrt(x * x + y * y); var text = (len * 10).ToString("0.00") + "mm"; formattedText = new FormattedText( text, System.Globalization.CultureInfo.InvariantCulture, FlowDirection.LeftToRight, typeface, this.fontSize, pen.Brush); center = new Point((start.X + point.X) / 2, (start.Y + point.Y) / 2); var width = text.Length * fontSize / 2; // 文字宽度 textPoint = new Point(center.X - width / 2, center.Y - fontSize * 1.2 - pen.Thickness); // 文字左上角,1.2倍行高 Double?k = null; // 斜率 if (start.X == point.X) { angle = start.Y > point.Y ? 90 : -90; } else { k = (point.Y - start.Y) / (point.X - start.X); angle = Math.Atan(k.Value) / Math.PI * 180; } dc.PushTransform(new RotateTransform(angle, center.X, center.Y)); dc.DrawText(formattedText, textPoint); dc.Pop(); var tangentK = k.HasValue ? (-1 / k) : null; var tangentLen = pen.Thickness + fontSize * 1.2; if (tangentK.HasValue) { var offsetX1 = Math.Sqrt(tangentLen * tangentLen / (1 + tangentK.Value * tangentK.Value)) * (angle > 0 ? 1 : -1); tangent1.X = offsetX1 + start.X; tangent1.Y = start.Y + offsetX1 * tangentK.Value; tangent2.X = offsetX1 + point.X; tangent2.Y = point.Y + offsetX1 * tangentK.Value; } else { tangent1.X = start.X + (angle == 90 ? tangentLen : -tangentLen); tangent1.Y = start.Y; tangent2.X = point.X + (angle == 90 ? tangentLen : -tangentLen); tangent2.Y = point.Y; } var figure = pathGeometry.Figures[0]; figure.StartPoint = tangent1; figure.Segments.Clear(); var line = new LineSegment(start, true) { IsSmoothJoin = true }; figure.Segments.Add(line); line = new LineSegment(point, true) { IsSmoothJoin = true }; figure.Segments.Add(line); line = new LineSegment(tangent2, true) { IsSmoothJoin = true }; figure.Segments.Add(line); dc.DrawGeometry(null, pen, geometry); dc.Close(); return(true); }
/// <summary> /// Sets the Samples property /// </summary> /// <param name="samples">The number of Measurements that contributed to the aggregate value of this datapoint.</param> /// <returns>this instance</returns> public Datapoint WithSamples(Double samples) { this.samplesField = samples; return this; }
public Coord(Double?latitude, Double?longitude) : this(latitude.ValueOnNull(0d), longitude.ValueOnNull(0d)) { _latitude = (Single)latitude.ValueOnNull(0d); _longitude = (Single)longitude.ValueOnNull(0d); }
/// <summary> /// Sets the LowerThreshold property /// </summary> /// <param name="lowerThreshold">The lower limit for the metric. If all datapoints in the last BreachDuration seconds exceed the upper /// threshold or fall below the lower threshold, the trigger activates.</param> /// <returns>this instance</returns> public CreateOrUpdateScalingTriggerRequest WithLowerThreshold(Double lowerThreshold) { this.lowerThresholdField = lowerThreshold; return this; }
public ActionResult DocumentSort(Int32 id, Double?sort) { entities.Document.Find(id).Sort = sort; entities.SaveChanges(); return(Json(new { message = "操作完成" })); }
private double getDistanciaCampus() { if (! _distanciaCampus.HasValue) { _distanciaCampus = Direccion.Distance(Helpers.CAMPUS); } return _distanciaCampus.Value; }
public virtual void SetNullableDouble(object o, Double?value) { SetValue(o, value); }
public void CopyValues(FinData fd) { if (fd.BsCashShortTermInvestments != null) { this.bs_cash_short_term_investments = fd.BsCashShortTermInvestments; } if (fd.BsReceivables != null) { this.bs_receivables = fd.BsReceivables; } if (fd.BsInventory != null) { this.bs_inventory = fd.BsInventory; } if (fd.BsPrepaidExpenses != null) { this.bs_prepaid_expenses = fd.BsPrepaidExpenses; } if (fd.BsOtherCurrentAssets != null) { this.bs_other_current_assets = fd.BsOtherCurrentAssets; } if (fd.BsTotalCurrentAssets != null) { this.bs_total_current_assets = fd.BsTotalCurrentAssets; } if (fd.BsGrossPropertyPlantEquipment != null) { this.bs_gross_property_plant_equipment = fd.BsGrossPropertyPlantEquipment; } if (fd.BsAccumulatedDepreciation != null) { this.bs_accumulated_depreciation = fd.BsAccumulatedDepreciation; } if (fd.BsNetPropertyPlantEquipment != null) { this.bs_net_property_plant_equipment = fd.BsNetPropertyPlantEquipment; } if (fd.BsLongTermInvestments != null) { this.bs_long_term_investments = fd.BsLongTermInvestments; } if (fd.BsGoodwillIntangibles != null) { this.bs_goodwill_intangibles = fd.BsGoodwillIntangibles; } if (fd.BsOtherLongTermAssets != null) { this.bs_other_long_term_assets = fd.BsOtherLongTermAssets; } if (fd.BsTotalLongTermAssets != null) { this.bs_total_long_term_assets = fd.BsTotalLongTermAssets; } if (fd.BsTotalAssets != null) { this.bs_total_assets = fd.BsTotalAssets; } if (fd.BsLiabilities != null) { this.bs_liabilities = fd.BsLiabilities; } if (fd.BsCurrentPortionOfLongTermDebt != null) { this.bs_current_portion_of_long_term_debt = fd.BsCurrentPortionOfLongTermDebt; } if (fd.BsAccountsPayable != null) { this.bs_accounts_payable = fd.BsAccountsPayable; } if (fd.BsAccruedExpenses != null) { this.bs_accrued_expenses = fd.BsAccruedExpenses; } if (fd.BsDeferredRevenues != null) { this.bs_deferred_revenues = fd.BsDeferredRevenues; } if (fd.BsOtherCurrentLiabilities != null) { this.bs_other_current_liabilities = fd.BsOtherCurrentLiabilities; } if (fd.BsTotalCurrentLiabilities != null) { this.bs_total_current_liabilities = fd.BsTotalCurrentLiabilities; } if (fd.BsTotalLongTermDebt != null) { this.bs_total_long_term_debt = fd.BsTotalLongTermDebt; } if (fd.BsShareholdersEquity != null) { this.bs_shareholders_equity = fd.BsShareholdersEquity; } if (fd.BsDeferredIncomeTax != null) { this.bs_deferred_income_tax = fd.BsDeferredIncomeTax; } if (fd.BsMinorityInterest != null) { this.bs_minority_interest = fd.BsMinorityInterest; } if (fd.BsOtherLongTermLiabilities != null) { this.bs_other_long_term_liabilities = fd.BsOtherLongTermLiabilities; } if (fd.BsTotalLongTermLiabilities != null) { this.bs_total_long_term_liabilities = fd.BsTotalLongTermLiabilities; } if (fd.BsTotalLiabilities != null) { this.bs_total_liabilities = fd.BsTotalLiabilities; } if (fd.BsCommonSharesOutstanding != null) { this.bs_common_shares_outstanding = fd.BsCommonSharesOutstanding; } if (fd.BsPreferredStock != null) { this.bs_preferred_stock = fd.BsPreferredStock; } if (fd.BsCommonStockNet != null) { this.bs_common_stock_net = fd.BsCommonStockNet; } if (fd.BsAdditionalPaidInCapital != null) { this.bs_additional_paid_in_capital = fd.BsAdditionalPaidInCapital; } if (fd.BsRetainedEarnings != null) { this.bs_retained_earnings = fd.BsRetainedEarnings; } if (fd.BsTreasuryStock != null) { this.bs_treasury_stock = fd.BsTreasuryStock; } if (fd.BsOtherShareholdersEquity != null) { this.bs_other_shareholders_equity = fd.BsOtherShareholdersEquity; } if (fd.BsShareholdersEquity1 != null) { this.bs_shareholders_equity1 = fd.BsShareholdersEquity1; } if (fd.BsTotalLiabilitiesShareholdersEquity != null) { this.bs_total_liabilities_shareholders_equity = fd.BsTotalLiabilitiesShareholdersEquity; } if (fd.IsRevenue != null) { this.is_revenue = fd.IsRevenue; } if (fd.IsCostOfRevenue != null) { this.is_cost_of_revenue = fd.IsCostOfRevenue; } if (fd.IsGrossProfit != null) { this.is_gross_profit = fd.IsGrossProfit; } if (fd.IsRdExpense != null) { this.is_rd_expense = fd.IsRdExpense; } if (fd.IsSellingGeneralAdminExpense != null) { this.is_selling_general_admin_expense = fd.IsSellingGeneralAdminExpense; } if (fd.IsDepreciationAmortization != null) { this.is_depreciation_amortization = fd.IsDepreciationAmortization; } if (fd.IsOperatingInterestExpense != null) { this.is_operating_interest_expense = fd.IsOperatingInterestExpense; } if (fd.IsOtherOperatingIncomeExpense != null) { this.is_other_operating_income_expense = fd.IsOtherOperatingIncomeExpense; } if (fd.IsTotalOperatingExpenses != null) { this.is_total_operating_expenses = fd.IsTotalOperatingExpenses; } if (fd.IsOperatingIncome != null) { this.is_operating_income = fd.IsOperatingIncome; } if (fd.IsNonOperatingIncome != null) { this.is_non_operating_income = fd.IsNonOperatingIncome; } if (fd.IsPretaxIncome != null) { this.is_pretax_income = fd.IsPretaxIncome; } if (fd.IsProvisionForIncomeTaxes != null) { this.is_provision_for_income_taxes = fd.IsProvisionForIncomeTaxes; } if (fd.IsIncomeAfterTax != null) { this.is_income_after_tax = fd.IsIncomeAfterTax; } if (fd.IsMinorityInterest != null) { this.is_minority_interest = fd.IsMinorityInterest; } if (fd.IsMinorityInterest1 != null) { this.is_minority_interest1 = fd.IsMinorityInterest1; } if (fd.IsEquityInAffiliates != null) { this.is_equity_in_affiliates = fd.IsEquityInAffiliates; } if (fd.IsIncomeBeforeDiscOperations != null) { this.is_income_before_disc_operations = fd.IsIncomeBeforeDiscOperations; } if (fd.IsInvestmentGainsLosses != null) { this.is_investment_gains_losses = fd.IsInvestmentGainsLosses; } if (fd.IsOtherIncomeCharges != null) { this.is_other_income_charges = fd.IsOtherIncomeCharges; } if (fd.IsIncomeFromDiscOperations != null) { this.is_income_from_disc_operations = fd.IsIncomeFromDiscOperations; } if (fd.IsNetIncome != null) { this.is_net_income = fd.IsNetIncome; } if (fd.IsEarningsPerShareData != null) { this.is_earnings_per_share_data = fd.IsEarningsPerShareData; } if (fd.IsAverageSharesDilutedEps != null) { this.is_average_shares_diluted_eps = fd.IsAverageSharesDilutedEps; } if (fd.IsAverageSharesBasicEps != null) { this.is_average_shares_basic_eps = fd.IsAverageSharesBasicEps; } if (fd.IsEpsBasic != null) { this.is_eps_basic = fd.IsEpsBasic; } if (fd.IsEpsDiluted != null) { this.is_eps_diluted = fd.IsEpsDiluted; } if (fd.CfsNetIncome != null) { this.cfs_net_income = fd.CfsNetIncome; } if (fd.CfsDepreciationDepletionAmortization != null) { this.cfs_depreciation_depletion_amortization = fd.CfsDepreciationDepletionAmortization; } if (fd.CfsOtherNonCashItems != null) { this.cfs_other_non_cash_items = fd.CfsOtherNonCashItems; } if (fd.CfsTotalNonCashItems != null) { this.cfs_total_non_cash_items = fd.CfsTotalNonCashItems; } if (fd.CfsDeferredIncomeTaxes != null) { this.cfs_deferred_income_taxes = fd.CfsDeferredIncomeTaxes; } if (fd.CfsTotalChangesInAssetsLiabilities != null) { this.cfs_total_changes_in_assets_liabilities = fd.CfsTotalChangesInAssetsLiabilities; } if (fd.CfsOtherOperatingActivities != null) { this.cfs_other_operating_activities = fd.CfsOtherOperatingActivities; } if (fd.CfsNetCashFromOperatingActivities != null) { this.cfs_net_cash_from_operating_activities = fd.CfsNetCashFromOperatingActivities; } if (fd.CfsCashFlowInvesting != null) { this.cfs_cash_flow_investing = fd.CfsCashFlowInvesting; } if (fd.CfsCapitalExpenditures != null) { this.cfs_capital_expenditures = fd.CfsCapitalExpenditures; } if (fd.CfsAcquisitionsDivestitures != null) { this.cfs_acquisitions_divestitures = fd.CfsAcquisitionsDivestitures; } if (fd.CfsInvestments != null) { this.cfs_investments = fd.CfsInvestments; } if (fd.CfsOtherInvestingActivities != null) { this.cfs_other_investing_activities = fd.CfsOtherInvestingActivities; } if (fd.CfsCashFlowFinancing != null) { this.cfs_cash_flow_financing = fd.CfsCashFlowFinancing; } if (fd.CfsNetCashFromInvestingActivities != null) { this.cfs_net_cash_from_investing_activities = fd.CfsNetCashFromInvestingActivities; } if (fd.CfsDebtIssued != null) { this.cfs_debt_issued = fd.CfsDebtIssued; } if (fd.CfsEquityIssued != null) { this.cfs_equity_issued = fd.CfsEquityIssued; } if (fd.CfsDividendsPaid != null) { this.cfs_dividends_paid = fd.CfsDividendsPaid; } if (fd.CfsOtherFinancingActivities != null) { this.cfs_other_financing_activities = fd.CfsOtherFinancingActivities; } if (fd.CfsNetCashFromFinancingActivities != null) { this.cfs_net_cash_from_financing_activities = fd.CfsNetCashFromFinancingActivities; } if (fd.CfsForeignExchangeEffects != null) { this.cfs_foreign_exchange_effects = fd.CfsForeignExchangeEffects; } if (fd.CfsNetChangeInCashEquivalents != null) { this.cfs_net_change_in_cash_equivalents = fd.CfsNetChangeInCashEquivalents; } if (fd.CfsCashBeginningOfPeriod != null) { this.cfs_cash_beginning_of_period = fd.CfsCashBeginningOfPeriod; } if (fd.CfsCashEndOfPeriod != null) { this.cfs_cash_end_of_period = fd.CfsCashEndOfPeriod; } if (fd.FrAccruals != null) { this.fr_accruals = fd.FrAccruals; } if (fd.FrAltmanZScore != null) { this.fr_altman_z_score = fd.FrAltmanZScore; } if (fd.FrAssetUtilization != null) { this.fr_asset_utilization = fd.FrAssetUtilization; } if (fd.FrBeneishMScore != null) { this.fr_beneish_m_score = fd.FrBeneishMScore; } if (fd.FrBeta != null) { this.fr_beta = fd.FrBeta; } if (fd.FrBookValue != null) { this.fr_book_value = fd.FrBookValue; } if (fd.FrBookValuePerShare != null) { this.fr_book_value_per_share = fd.FrBookValuePerShare; } if (fd.FrCapitalExpenditures != null) { this.fr_capital_expenditures = fd.FrCapitalExpenditures; } if (fd.FrCashConversionCycle != null) { this.fr_cash_conversion_cycle = fd.FrCashConversionCycle; } if (fd.FrCashDivPayoutRatioTtm != null) { this.fr_cash_div_payout_ratio_ttm = fd.FrCashDivPayoutRatioTtm; } if (fd.FrCashFinancing != null) { this.fr_cash_financing = fd.FrCashFinancing; } if (fd.FrCashFinancingTtm != null) { this.fr_cash_financing_ttm = fd.FrCashFinancingTtm; } if (fd.FrCashInvesting != null) { this.fr_cash_investing = fd.FrCashInvesting; } if (fd.FrCashInvestingTtm != null) { this.fr_cash_investing_ttm = fd.FrCashInvestingTtm; } if (fd.FrCashOperations != null) { this.fr_cash_operations = fd.FrCashOperations; } if (fd.FrCashOperationsTtm != null) { this.fr_cash_operations_ttm = fd.FrCashOperationsTtm; } if (fd.FrCashAndEquivalents != null) { this.fr_cash_and_equivalents = fd.FrCashAndEquivalents; } if (fd.FrCashAndStInvestments != null) { this.fr_cash_and_st_investments = fd.FrCashAndStInvestments; } if (fd.FrCurrentRatio != null) { this.fr_current_ratio = fd.FrCurrentRatio; } if (fd.FrDaysInventoryOutstanding != null) { this.fr_days_inventory_outstanding = fd.FrDaysInventoryOutstanding; } if (fd.FrDaysPayableOutstanding != null) { this.fr_days_payable_outstanding = fd.FrDaysPayableOutstanding; } if (fd.FrDaysSalesOutstanding != null) { this.fr_days_sales_outstanding = fd.FrDaysSalesOutstanding; } if (fd.FrDebtToEquityRatio != null) { this.fr_debt_to_equity_ratio = fd.FrDebtToEquityRatio; } if (fd.FrDividend != null) { this.fr_dividend = fd.FrDividend; } if (fd.FrDividendYield != null) { this.fr_dividend_yield = fd.FrDividendYield; } if (fd.FrEbitdaMarginTtm != null) { this.fr_ebitda_margin_ttm = fd.FrEbitdaMarginTtm; } if (fd.FrEbitdaTtm != null) { this.fr_ebitda_ttm = fd.FrEbitdaTtm; } if (fd.FrEvEbit != null) { this.fr_ev_ebit = fd.FrEvEbit; } if (fd.FrEvEbitda != null) { this.fr_ev_ebitda = fd.FrEvEbitda; } if (fd.FrEvFreeCashFlow != null) { this.fr_ev_free_cash_flow = fd.FrEvFreeCashFlow; } if (fd.FrEvRevenues != null) { this.fr_ev_revenues = fd.FrEvRevenues; } if (fd.FrEarningsPerShare != null) { this.fr_earnings_per_share = fd.FrEarningsPerShare; } if (fd.FrEarningsPerShareGrowth != null) { this.fr_earnings_per_share_growth = fd.FrEarningsPerShareGrowth; } if (fd.FrEarningsPerShareTtm != null) { this.fr_earnings_per_share_ttm = fd.FrEarningsPerShareTtm; } if (fd.FrEarningsYield != null) { this.fr_earnings_yield = fd.FrEarningsYield; } if (fd.FrEffectiveTaxRateTtm != null) { this.fr_effective_tax_rate_ttm = fd.FrEffectiveTaxRateTtm; } if (fd.FrEnterpriseValue != null) { this.fr_enterprise_value = fd.FrEnterpriseValue; } if (fd.FrExpenses != null) { this.fr_expenses = fd.FrExpenses; } if (fd.FrExpensesTtm != null) { this.fr_expenses_ttm = fd.FrExpensesTtm; } if (fd.FrFreeCashFlow != null) { this.fr_free_cash_flow = fd.FrFreeCashFlow; } if (fd.FrFreeCashFlowTtm != null) { this.fr_free_cash_flow_ttm = fd.FrFreeCashFlowTtm; } if (fd.FrFreeCashFlowYield != null) { this.fr_free_cash_flow_yield = fd.FrFreeCashFlowYield; } if (fd.FrFundamentalScore != null) { this.fr_fundamental_score = fd.FrFundamentalScore; } if (fd.FrGrossProfitMargin != null) { this.fr_gross_profit_margin = fd.FrGrossProfitMargin; } if (fd.FrGrossProfitTtm != null) { this.fr_gross_profit_ttm = fd.FrGrossProfitTtm; } if (fd.FrIncomeFromContOps != null) { this.fr_income_from_cont_ops = fd.FrIncomeFromContOps; } if (fd.FrInterestExpense != null) { this.fr_interest_expense = fd.FrInterestExpense; } if (fd.FrInterestIncome != null) { this.fr_interest_income = fd.FrInterestIncome; } if (fd.FrInventories != null) { this.fr_inventories = fd.FrInventories; } if (fd.FrInventoryTurnover != null) { this.fr_inventory_turnover = fd.FrInventoryTurnover; } if (fd.FrKzIndex != null) { this.fr_kz_index = fd.FrKzIndex; } if (fd.FrLiabilities != null) { this.fr_liabilities = fd.FrLiabilities; } if (fd.FrLongTermDebt != null) { this.fr_long_term_debt = fd.FrLongTermDebt; } if (fd.FrMarketCap != null) { this.fr_market_cap = fd.FrMarketCap; } if (fd.FrNetIncome != null) { this.fr_net_income = fd.FrNetIncome; } if (fd.FrNetIncomeTtm != null) { this.fr_net_income_ttm = fd.FrNetIncomeTtm; } if (fd.FrNetPpE != null) { this.fr_net_pp_e = fd.FrNetPpE; } if (fd.FrOperatingEarningsYield != null) { this.fr_operating_earnings_yield = fd.FrOperatingEarningsYield; } if (fd.FrOperatingMargin != null) { this.fr_operating_margin = fd.FrOperatingMargin; } if (fd.FrOperatingMarginTtm != null) { this.fr_operating_margin_ttm = fd.FrOperatingMarginTtm; } if (fd.FrOperatingPeRatio != null) { this.fr_operating_pe_ratio = fd.FrOperatingPeRatio; } if (fd.FrOtherComprehensiveIncome != null) { this.fr_other_comprehensive_income = fd.FrOtherComprehensiveIncome; } if (fd.FrPe10 != null) { this.fr_pe_10 = fd.FrPe10; } if (fd.FrPeRatio != null) { this.fr_pe_ratio = fd.FrPeRatio; } if (fd.FrPeValue != null) { this.fr_pe_value = fd.FrPeValue; } if (fd.FrPegRatio != null) { this.fr_peg_ratio = fd.FrPegRatio; } if (fd.FrPsValue != null) { this.fr_ps_value = fd.FrPsValue; } if (fd.FrPayoutRatioTtm != null) { this.fr_payout_ratio_ttm = fd.FrPayoutRatioTtm; } if (fd.FrPlowbackRatio != null) { this.fr_plowback_ratio = fd.FrPlowbackRatio; } if (fd.FrPrice != null) { this.fr_price = fd.FrPrice; } if (fd.FrAdjPrice != null) { this.fr_adjprice = fd.FrAdjPrice; } if (fd.FrPriceBookValue != null) { this.fr_price_book_value = fd.FrPriceBookValue; } if (fd.FrPriceSalesRatio != null) { this.fr_price_sales_ratio = fd.FrPriceSalesRatio; } if (fd.FrPriceTangibleBookValue != null) { this.fr_price_tangible_book_value = fd.FrPriceTangibleBookValue; } if (fd.FrProfitMargin != null) { this.fr_profit_margin = fd.FrProfitMargin; } if (fd.FrRDExpense != null) { this.fr_r_d_expense = fd.FrRDExpense; } if (fd.FrReceivablesTurnover != null) { this.fr_receivables_turnover = fd.FrReceivablesTurnover; } if (fd.FrRetainedEarnings != null) { this.fr_retained_earnings = fd.FrRetainedEarnings; } if (fd.FrRetainedEarningsGrowth != null) { this.fr_retained_earnings_growth = fd.FrRetainedEarningsGrowth; } if (fd.FrReturnOnAssets != null) { this.fr_return_on_assets = fd.FrReturnOnAssets; } if (fd.FrReturnOnEquity != null) { this.fr_return_on_equity = fd.FrReturnOnEquity; } if (fd.FrReturnOnInvestedCapital != null) { this.fr_return_on_invested_capital = fd.FrReturnOnInvestedCapital; } if (fd.FrRevenueGrowth != null) { this.fr_revenue_growth = fd.FrRevenueGrowth; } if (fd.FrRevenuePerShareTtm != null) { this.fr_revenue_per_share_ttm = fd.FrRevenuePerShareTtm; } if (fd.FrRevenues != null) { this.fr_revenues = fd.FrRevenues; } if (fd.FrRevenuesTtm != null) { this.fr_revenues_ttm = fd.FrRevenuesTtm; } if (fd.FrSgAExpense != null) { this.fr_sg_a_expense = fd.FrSgAExpense; } if (fd.FrShareholdersEquity != null) { this.fr_shareholders_equity = fd.FrShareholdersEquity; } if (fd.FrSharesOutstanding != null) { this.fr_shares_outstanding = fd.FrSharesOutstanding; } if (fd.FrStockBuybacks != null) { this.fr_stock_buybacks = fd.FrStockBuybacks; } if (fd.FrTangibleBookValue != null) { this.fr_tangible_book_value = fd.FrTangibleBookValue; } if (fd.FrTangibleBookValuePerShare != null) { this.fr_tangible_book_value_per_share = fd.FrTangibleBookValuePerShare; } if (fd.FrTangibleCommonEquityRatio != null) { this.fr_tangible_common_equity_ratio = fd.FrTangibleCommonEquityRatio; } if (fd.FrTimesInterestEarnedTtm != null) { this.fr_times_interest_earned_ttm = fd.FrTimesInterestEarnedTtm; } if (fd.FrTotalAssets != null) { this.fr_total_assets = fd.FrTotalAssets; } if (fd.FrTotalReturnPrice != null) { this.fr_total_return_price = fd.FrTotalReturnPrice; } if (fd.FrValuationHistoricalMult != null) { this.fr_valuation_historical_mult = fd.FrValuationHistoricalMult; } if (fd.FrWorkingCapital != null) { this.fr_working_capital = fd.FrWorkingCapital; } if (fd.FrStandardDeviation != null) { this.fr_standard_deviation = fd.FrStandardDeviation; } if (fd.FrRoicGrowthRate != null) { this.fr_roic_growth_rate = fd.FrRoicGrowthRate; } if (fd.FrQuickRatio != null) { this.fr_quick_ratio = fd.FrQuickRatio; } if (fd.FrAssetCoverage != null) { this.fr_asset_coverage = fd.FrAssetCoverage; } if (fd.FrDscr != null) { this.fr_dscr = fd.FrDscr; } if (fd.FrDebtEbitda != null) { this.fr_debt_EBITDA = fd.FrDebtEbitda; } if (fd.FrEqPrc != null) { this.fr_eq_prc = fd.FrEqPrc; } if (fd.FrCashFlowVolatility != null) { this.fr_cash_flow_volatility = fd.FrCashFlowVolatility; } if (fd.FrTurnoverRatio != null) { this.fr_turnover_ratio = fd.FrTurnoverRatio; } if (fd.FrBookToMarket != null) { this.fr_book_to_market = fd.FrBookToMarket; } if (fd.FrEarningsToPriceRatio != null) { this.fr_earnings_to_price_ratio = fd.FrEarningsToPriceRatio; } if (fd.FrCashFlowToPriceRatio != null) { this.fr_cash_flow_to_price_ratio = fd.FrCashFlowToPriceRatio; } if (fd.FrSalesGrowthRatio != null) { this.fr_sales_growth_ratio = fd.FrSalesGrowthRatio; } if (fd.FrNetIncomeTtm != null) { this.fr_netIncomeTTM = fd.FrNetIncomeTtm; } if (fd.FrDividendsPaidTtm != null) { this.fr_dividendsPaidTTM = fd.FrDividendsPaidTtm; } if (fd.FrDividendTtm != null) { this.fr_dividendTTM = fd.FrDividendTtm; } if (fd.FrSharesTtm != null) { this.fr_sharesTTM = fd.FrSharesTtm; } if (fd.FrEbitTtm != null) { this.fr_ebitTTM = fd.FrEbitTtm; } if (fd.FrIncomeTaxesTtm != null) { this.fr_incomeTaxesTTM = fd.FrIncomeTaxesTtm; } if (fd.FrPreTaxIncomeTtm != null) { this.fr_preTaxIncomeTTM = fd.FrPreTaxIncomeTtm; } if (fd.FrDebtTtm != null) { this.fr_debtTTM = fd.FrDebtTtm; } if (fd.FrEbit != null) { this.fr_ebit = fd.FrEbit; } if (fd.FrEbitda != null) { this.fr_ebitda = fd.FrEbitda; } if (fd.FrEps4Ago != null) { this.fr_eps4ago = fd.FrEps4Ago; } if (fd.FrRetainedEarnings4Ago != null) { this.fr_retainedEarnings4ago = fd.FrRetainedEarnings4Ago; } if (fd.FrRevenue4Ago != null) { this.fr_revenue4ago = fd.FrRevenue4Ago; } }
public void Set(Double?b) { checkType(VType.nDouble); _ndouble = b; }
protected override void EstablishContext() { base.EstablishContext(); RawValue = 33; EngValue = Converter.RawToEng(RawValue); }
public void Set(Wrapper w) { if ((_tcode & VType.Numeric) != VType.Numeric) { if (w._tcode != _tcode) { throw new VariantException(w._tcode, _tcode); } switch (_tcode) { case VType.Boolean: _boolean = w._boolean; break; case VType.nBoolean: _nboolean = w._nboolean; break; case VType.Char: _char = w._char; break; case VType.nChar: _nchar = w._nchar; break; case VType.DateTime: _datetime = w._datetime; break; case VType.nDateTime: _ndatetime = w._ndatetime; break; case VType.String: _string = w._string; break; } } else { //bool done = false; Decimal vv; bool castok = w.TryCast(out vv); switch (_tcode) { case VType.Byte: _byte = (Byte)vv; break; case VType.nByte: if (castok) { _nbyte = (Byte?)vv; } else { _nbyte = null; } break; case VType.SByte: _sbyte = (SByte)vv; break; case VType.nSByte: if (castok) { _nsbyte = (SByte?)vv; } else { _nsbyte = null; } break; case VType.Int64: _int64 = (Int64)vv; break; case VType.nInt64: if (castok) { _nint64 = (Int64?)vv; } else { _nint64 = null; } break; case VType.Double: _double = (Double)vv; break; case VType.nDouble: if (castok) { _ndouble = (Double?)vv; } else { _ndouble = null; } break; case VType.Decimal: _decimal = vv; break; case VType.nDecimal: if (castok) { _ndecimal = (Decimal?)vv; } else { _ndecimal = null; } break; } } //} set }
protected override void EstablishContext() { base.EstablishContext(); EngValue = Converter.RawToEng(null); }
public override void SetNullableDouble(object obj, Double?value) { Setter(obj, value); }
/// <summary> /// Sets the LowerThreshold property /// </summary> /// <param name="lowerThreshold">The lower limit for the metric. The trigger fires if all /// datapoints in the last BreachDuration seconds exceed the upper threshold /// or fall below the lower threshold.</param> /// <returns>this instance</returns> public Trigger WithLowerThreshold(Double lowerThreshold) { this.lowerThresholdField = lowerThreshold; return this; }
public static String Formatar(this Double?number, String formato = FormatoMoeda) { return(number.HasValue ? number.Value.Formatar(formato) : String.Empty); }
/// <summary> /// Plays the specified animation. /// </summary> /// <param name="animation">The <see cref="SpriteAnimation"/> to play.</param> public void PlayAnimation(SpriteAnimation animation) { this.animation = animation; this.defaultAnimation = null; this.playbackTime = null; ResetAnimation(); }
UpdateForMerge() { // NOTE: Only DateTime is modified. The rest are nulled if nullable or remain unchanged. StringField = null; BoolFieldNullNot = null; IntFieldNullNot = null; Int64FieldNullNot = null; DoubleFieldNullNot = null; DateTimeField = new DateTime(2012, 1, 1); DateTimeFieldNullNot = null; GuidFieldNullNot = null; BinaryField = null; // intrinsic morphs + Nullable ByteFieldNull = null; ByteFieldNullNot = null; SByteFieldNullNot = null; Int16FieldNullNot = null; UInt16FieldNullNot = null; UInt32FieldNullNot = null; UInt64FieldNullNot = null; CharFieldNullNot = null; // Enums - 8 ByteEnumFieldNullNot = null; SByteEnumFieldNullNot = null; Int16EnumFieldNullNot = null; UInt16EnumFieldNullNot = null; Int32EnumFieldNullNot = null; UInt32EnumFieldNullNot = null; Int64EnumFieldNullNot = null; UInt64EnumFieldNullNot = null; //Object // Create a derived generic object type to validate correct de-serialization var employeeInfo = EmployeeInfo <int> .CreateNew(); employeeInfo.Dummy = 102; PersonInfo = employeeInfo; }
/// <summary> /// Plays a fire-and-forget animation. The animation will play once (regardless of its repeat mode), /// then the controller will return to the specified default animation. /// </summary> /// <param name="animation">The animation to play.</param> /// <param name="defaultAnimation">The <see cref="SpriteAnimation"/> to play once the fire-and-forget animation has completed.</param> /// <param name="playbackTime">The desired playback time in milliseconds, or <see langword="null"/> to use the standard playback time.</param> public void FireAndForget(SpriteAnimation animation, SpriteAnimation defaultAnimation, Double? playbackTime = null) { this.animation = animation; this.defaultAnimation = defaultAnimation; this.playbackTime = playbackTime; ResetAnimation(); }
Populate( int stringSize, int binarySize) { PartitionKey = typeof(AllDataExplicit).Name; RowKey = Guid.NewGuid().ToString(); // Fields + Nullable. 8 + 8 + 6 = 22 StringField = DataGenerator.GetStringSizeFixed(stringSize); StringFieldNull = null; BoolField = DataGenerator.Rnd.Next(2) == 1; BoolFieldNull = null; BoolFieldNullNot = DataGenerator.Rnd.Next(2) == 1; IntField = DataGenerator.Rnd.Next(Int32.MaxValue); IntFieldNull = null; IntFieldNullNot = DataGenerator.Rnd.Next(int.MaxValue); Int64Field = (Int64)(DataGenerator.Rnd.Next(Int32.MaxValue) * DataGenerator.Rnd.Next(Int32.MaxValue)); Int64FieldNull = null; Int64FieldNullNot = (Int64)(DataGenerator.Rnd.Next(Int32.MaxValue) * DataGenerator.Rnd.Next(Int32.MaxValue)); DoubleField = DataGenerator.Rnd.NextDouble() * Double.MaxValue; DoubleFieldNull = null; DoubleFieldNullNot = DataGenerator.Rnd.NextDouble() * Double.MaxValue; DateTimeField = DateTime.UtcNow; DateTimeFieldNull = null; DateTimeFieldNullNot = DateTime.UtcNow; GuidField = Guid.NewGuid(); GuidFieldNull = null; GuidFieldNullNot = Guid.NewGuid(); BinaryField = DataGenerator.GetBytesSizeFixed(binarySize); BinaryFieldNull = null; // intrinsic morphs + Nullable. 7 * 4 = 28 ByteFieldMin = Byte.MinValue; ByteFieldMax = Byte.MaxValue; ByteFieldNull = null; ByteFieldNullNot = (byte)DataGenerator.Rnd.Next(byte.MaxValue); SByteFieldMin = SByte.MinValue; SByteFieldMax = SByte.MaxValue; SByteFieldNull = null; SByteFieldNullNot = (sbyte)DataGenerator.Rnd.Next(sbyte.MaxValue); Int16FieldMin = Int16.MinValue; Int16FieldMax = Int16.MaxValue; Int16FieldNull = null; Int16FieldNullNot = (Int16)DataGenerator.Rnd.Next(Int16.MaxValue); UInt16FieldMin = UInt16.MinValue; UInt16FieldMax = UInt16.MaxValue; UInt16FieldNull = null; UInt16FieldNullNot = (UInt16)DataGenerator.Rnd.Next(UInt16.MaxValue); UInt32FieldMin = UInt32.MinValue; UInt32FieldMax = UInt32.MaxValue; UInt32FieldNull = null; UInt32FieldNullNot = (UInt32)DataGenerator.Rnd.Next(UInt16.MaxValue); UInt64FieldMin = UInt64.MinValue; UInt64FieldMax = UInt64.MaxValue; UInt64FieldNull = null; UInt64FieldNullNot = (UInt64)(DataGenerator.Rnd.Next(Int32.MaxValue) * DataGenerator.Rnd.Next(Int32.MaxValue)); CharFieldMin = Char.MinValue; CharFieldMax = Char.MaxValue; CharFieldNull = null; CharFieldNullNot = (Char)DataGenerator.Rnd.Next(Char.MaxValue); // Enums - 8 ByteEnumField = ByteEnum.Value2; ByteEnumFieldNull = null; ByteEnumFieldNullNot = ByteEnum.Value1; SByteEnumField = SByteEnum.Value2; SByteEnumFieldNull = null; SByteEnumFieldNullNot = SByteEnum.Value1; Int16EnumField = Int16Enum.Value2; Int16EnumFieldNull = null; Int16EnumFieldNullNot = Int16Enum.Value1; UInt16EnumField = UInt16Enum.Value2; UInt16EnumFieldNull = null; UInt16EnumFieldNullNot = UInt16Enum.Value1; Int32EnumField = Int32Enum.Value2; Int32EnumFieldNull = null; Int32EnumFieldNullNot = Int32Enum.Value1; UInt32EnumField = UInt32Enum.Value2; UInt32EnumFieldNull = null; UInt32EnumFieldNullNot = UInt32Enum.Value1; Int64EnumField = Int64Enum.Value2; Int64EnumFieldNull = null; Int64EnumFieldNullNot = Int64Enum.Value1; UInt64EnumField = UInt64Enum.Value2; UInt64EnumFieldNull = null; UInt64EnumFieldNullNot = UInt64Enum.Value1; // Object // Create a derived generic object type to validate correct de-serialization var employeeInfo = EmployeeInfo <int> .CreateNew(); employeeInfo.Dummy = 101; PersonInfo = employeeInfo; }
public static String FormatarMoeda(this Double?number) { return(number.HasValue ? number.Value.ToString("C", Cultura) : String.Empty); }
public void SetData(Teamspeak3Group info, Boolean reset) { String sValue; Int32 iValue; UInt32 uiValue; UInt64 ulValue; Double dValue; if (reset) { Ip = null; UniqueId = null; PhoneticName = null; WelcomeMessage = null; Platform = null; Version = null; MinimumClientVersion = null; Password = null; FilePath = null; HostMessage = null; HostBannerUrl = null; HostBannerGfxUrl = null; HostButtonToolTip = null; HostButtonUrl = null; HostButtonGfxUrl = null; IconId = null; HostMessageMode = null; HostBannerMode = null; EncryptionMode = null; HostBannerGfxInterval = null; DefaultServerGroup = null; DefaultChannelGroup = null; DefaultChannelAdminGroup = null; ComplainAutoBanCount = null; ComplainAutoBanTime = null; ComplainRemoveTime = null; MinClientsNeededBeforeForcedSilence = null; AntifloodPointsTickReduce = null; AntifloodPointsNeededCommandBlock = null; AntifloodPointsNeededIpBlock = null; LogClient = null; LogQuery = null; LogChannel = null; LogPermissions = null; LogServer = null; LogFiletransfer = null; ReservedSlots = null; RequestsForPrivilegeKey = null; MinimumSecurityLevel = null; FiletransferBandwidthSent = null; FiletransferBandwidthReceived = null; FiletransferBytesSentTotal = null; FiletransferBytesReceivedTotal = null; SpeechPacketsSent = null; SpeechPacketsReceived = null; SpeechBytesSent = null; SpeechBytesReceived = null; KeepalivePacketsSent = null; KeepalivePacketsReceived = null; KeepaliveBytesSent = null; KeepaliveBytesReceived = null; ControlPacketsSent = null; ControlPacketsReceived = null; ControlBytesSent = null; ControlBytesReceived = null; PacketsSentTotal = null; PacketsReceivedTotal = null; BytesSentTotal = null; BytesReceivedTotal = null; BandwidthSentLastSecond = null; BandwidthReceivedLastSecond = null; BandwidthSentLastMinute = null; BandwidthReceivedLastMinute = null; CreationTime = null; ChannelsOnline = null; TotalClientConnections = null; TotalQueryClientConnections = null; MaxDownloadBandwidth = null; MaxUploadBandwidth = null; DownloadQuota = null; UploadQuota = null; BytesDownloadedMonth = null; BytesUploadedMonth = null; BytesDownloadedTotal = null; BytesUploadedTotal = null; Ping = null; TotalSpeechPacketloss = null; TotalKeepalivePacketloss = null; TotalControlPacketloss = null; TotalPacketlossAll = null; PrioritySpeakerDimmModificator = null; IsPassworded = null; IsWebListEnabled = null; } if ((sValue = info[KEY_IP]) != null) Ip = sValue; if ((sValue = info[KEY_UNIQUE_ID]) != null) UniqueId = sValue; if ((sValue = info[KEY_NAME_PHONETIC]) != null) PhoneticName = sValue; if ((sValue = info[KEY_WELCOME_MESSAGE]) != null) WelcomeMessage = sValue; if ((sValue = info[KEY_SERVER_PLATFORM]) != null) Platform = sValue; if ((sValue = info[KEY_SERVER_VERSION]) != null) Version = sValue; if ((sValue = info[KEY_MIN_CLIENT_VERSION]) != null) MinimumClientVersion = sValue; if ((sValue = info[KEY_PASSWORD]) != null) Password = sValue; if ((sValue = info[KEY_FILE_BASE]) != null) FilePath = sValue; if ((sValue = info[KEY_HOSTMESSAGE]) != null) HostMessage = sValue; if ((sValue = info[KEY_HOSTBANNER_URL]) != null) HostBannerUrl = sValue; if ((sValue = info[KEY_HOSTBANNER_GFX_URL]) != null) HostBannerGfxUrl = sValue; if ((sValue = info[KEY_HOSTBUTTON_TOOLTIP]) != null) HostButtonToolTip = sValue; if ((sValue = info[KEY_HOSTBANNER_URL]) != null) HostButtonUrl = sValue; if ((sValue = info[KEY_HOSTBUTTON_GFX_URL]) != null) HostButtonGfxUrl = sValue; if ((sValue = info[KEY_ICON_ID]) != null && Int32.TryParse(sValue, out iValue)) IconId = iValue; if ((sValue = info[KEY_HOSTMESSAGE_MODE]) != null && Int32.TryParse(sValue, out iValue)) HostMessageMode = iValue; if ((sValue = info[KEY_HOSTBANNER_MODE]) != null && Int32.TryParse(sValue, out iValue)) HostBannerMode = iValue; if ((sValue = info[KEY_ENCRYPTION_MODE]) != null && Int32.TryParse(sValue, out iValue)) EncryptionMode = iValue; if ((sValue = info[KEY_HOSTBANNER_GFX_INTERVAL]) != null && Int32.TryParse(sValue, out iValue)) HostBannerGfxInterval = iValue; if ((sValue = info[KEY_DEFAULT_SERVER_GROUP]) != null && Int32.TryParse(sValue, out iValue)) DefaultServerGroup = iValue; if ((sValue = info[KEY_DEFAULT_CHANNEL_GROUP]) != null && Int32.TryParse(sValue, out iValue)) DefaultChannelGroup = iValue; if ((sValue = info[KEY_DEFAULT_CHANNEL_ADMIN_GROUP]) != null && Int32.TryParse(sValue, out iValue)) DefaultChannelAdminGroup = iValue; if ((sValue = info[KEY_COMPLAIN_AUTOBAN_COUNT]) != null && Int32.TryParse(sValue, out iValue)) ComplainAutoBanCount = iValue; if ((sValue = info[KEY_COMPLAIN_AUTOBAN_TIME]) != null && Int32.TryParse(sValue, out iValue)) ComplainAutoBanTime = iValue; if ((sValue = info[KEY_COMPLAIN_REMOVE_TIME]) != null && Int32.TryParse(sValue, out iValue)) ComplainRemoveTime = iValue; if ((sValue = info[KEY_CLIENTS_NEEDED_BEFORE_FORCED_SILENCE]) != null && Int32.TryParse(sValue, out iValue)) MinClientsNeededBeforeForcedSilence = iValue; if ((sValue = info[KEY_ANTIFLOOD_POINTS_TICK_REDUCE]) != null && Int32.TryParse(sValue, out iValue)) AntifloodPointsTickReduce = iValue; if ((sValue = info[KEY_ANTIFLOOD_POINTS_NEEDED_COMMAND_BLOCK]) != null && Int32.TryParse(sValue, out iValue)) AntifloodPointsNeededCommandBlock = iValue; if ((sValue = info[KEY_ANTIFLOOD_POINTS_NEEDED_IP_BLOCK]) != null && Int32.TryParse(sValue, out iValue)) AntifloodPointsNeededIpBlock = iValue; if ((sValue = info[KEY_LOG_CLIENT]) != null && Int32.TryParse(sValue, out iValue)) LogClient = iValue; if ((sValue = info[KEY_LOG_QUERY]) != null && Int32.TryParse(sValue, out iValue)) LogQuery = iValue; if ((sValue = info[KEY_LOG_CHANNEL]) != null && Int32.TryParse(sValue, out iValue)) LogChannel = iValue; if ((sValue = info[KEY_LOG_PERMISSIONS]) != null && Int32.TryParse(sValue, out iValue)) LogPermissions = iValue; if ((sValue = info[KEY_LOG_SERVER]) != null && Int32.TryParse(sValue, out iValue)) LogServer = iValue; if ((sValue = info[KEY_LOG_FILETRANSFER]) != null && Int32.TryParse(sValue, out iValue)) LogFiletransfer = iValue; if ((sValue = info[KEY_RESERVED_SLOTS]) != null && Int32.TryParse(sValue, out iValue)) ReservedSlots = iValue; if ((sValue = info[KEY_ASK_FOR_PRIVILEGEKEY]) != null && Int32.TryParse(sValue, out iValue)) RequestsForPrivilegeKey = iValue; if ((sValue = info[KEY_NEEDED_IDENTITY_SECURITY_LEVEL]) != null && Int32.TryParse(sValue, out iValue)) MinimumSecurityLevel = iValue; if ((sValue = info[KEY_FILETRANSFER_BANDWIDTH_SENT]) != null && Int32.TryParse(sValue, out iValue)) FiletransferBandwidthSent = iValue; if ((sValue = info[KEY_FILETRANSFER_BANDWIDTH_RECEIVED]) != null && Int32.TryParse(sValue, out iValue)) FiletransferBandwidthReceived = iValue; if ((sValue = info[KEY_FILETRANSFER_BYTES_SENT_TOTAL]) != null && Int32.TryParse(sValue, out iValue)) FiletransferBytesSentTotal = iValue; if ((sValue = info[KEY_FILETRANSFER_BYTES_RECEIVED_TOTAL]) != null && Int32.TryParse(sValue, out iValue)) FiletransferBytesReceivedTotal = iValue; if ((sValue = info[KEY_PACKETS_SENT_SPEECH]) != null && Int32.TryParse(sValue, out iValue)) SpeechPacketsSent = iValue; if ((sValue = info[KEY_PACKETS_RECEIVED_SPEECH]) != null && Int32.TryParse(sValue, out iValue)) SpeechPacketsReceived = iValue; if ((sValue = info[KEY_BYTES_SENT_SPEECH]) != null && Int32.TryParse(sValue, out iValue)) SpeechBytesSent = iValue; if ((sValue = info[KEY_BYTES_RECEIVED_SPEECH]) != null && Int32.TryParse(sValue, out iValue)) SpeechBytesReceived = iValue; if ((sValue = info[KEY_PACKETS_SENT_KEEPALIVE]) != null && Int32.TryParse(sValue, out iValue)) KeepalivePacketsSent = iValue; if ((sValue = info[KEY_PACKETS_RECEIVED_KEEPALIVE]) != null && Int32.TryParse(sValue, out iValue)) KeepalivePacketsReceived = iValue; if ((sValue = info[KEY_BYTES_SENT_KEEPALIVE]) != null && Int32.TryParse(sValue, out iValue)) KeepaliveBytesSent = iValue; if ((sValue = info[KEY_BYTES_RECEIVED_KEEPALIVE]) != null && Int32.TryParse(sValue, out iValue)) KeepaliveBytesReceived = iValue; if ((sValue = info[KEY_PACKETS_SENT_CONTROL]) != null && Int32.TryParse(sValue, out iValue)) ControlPacketsSent = iValue; if ((sValue = info[KEY_PACKETS_RECEIVED_CONTROL]) != null && Int32.TryParse(sValue, out iValue)) ControlPacketsReceived = iValue; if ((sValue = info[KEY_BYTES_SENT_CONTROL]) != null && Int32.TryParse(sValue, out iValue)) ControlBytesSent = iValue; if ((sValue = info[KEY_BYTES_RECEIVED_CONTROL]) != null && Int32.TryParse(sValue, out iValue)) ControlBytesReceived = iValue; if ((sValue = info[KEY_PACKETS_SENT_TOTAL]) != null && Int32.TryParse(sValue, out iValue)) PacketsSentTotal = iValue; if ((sValue = info[KEY_PACKETS_RECEIVED_TOTAL]) != null && Int32.TryParse(sValue, out iValue)) PacketsReceivedTotal = iValue; if ((sValue = info[KEY_BYTES_SENT_TOTAL]) != null && Int32.TryParse(sValue, out iValue)) BytesSentTotal = iValue; if ((sValue = info[KEY_BYTES_RECEIVED_TOTAL]) != null && Int32.TryParse(sValue, out iValue)) BytesReceivedTotal = iValue; if ((sValue = info[KEY_BANDWIDTH_SENT_LAST_SECOND_TOTAL]) != null && Int32.TryParse(sValue, out iValue)) BandwidthSentLastSecond = iValue; if ((sValue = info[KEY_BANDWIDTH_RECEIVED_LAST_SECOND_TOTAL]) != null && Int32.TryParse(sValue, out iValue)) BandwidthReceivedLastSecond = iValue; if ((sValue = info[KEY_BANDWIDTH_SENT_LAST_MINUTE_TOTAL]) != null && Int32.TryParse(sValue, out iValue)) BandwidthSentLastMinute = iValue; if ((sValue = info[KEY_BANDWIDTH_RECEIVED_LAST_MINUTE_TOTAL]) != null && Int32.TryParse(sValue, out iValue)) BandwidthReceivedLastMinute = iValue; if ((sValue = info[KEY_CREATION_TIME]) != null && UInt32.TryParse(sValue, out uiValue)) CreationTime = uiValue; if ((sValue = info[KEY_CHANNELS_ONLINE]) != null && UInt32.TryParse(sValue, out uiValue)) ChannelsOnline = uiValue; if ((sValue = info[KEY_CLIENT_CONNECTIONS]) != null && UInt32.TryParse(sValue, out uiValue)) TotalClientConnections = uiValue; if ((sValue = info[KEY_QUERY_CLIENT_CONNECTIONS]) != null && UInt32.TryParse(sValue, out uiValue)) TotalQueryClientConnections = uiValue; if ((sValue = info[KEY_MAX_DOWNLOAD_TOTAL_BANDWIDTH]) != null && UInt64.TryParse(sValue, out ulValue)) MaxDownloadBandwidth = ulValue; if ((sValue = info[KEY_MAX_UPLOAD_TOTAL_BANDWIDTH]) != null && UInt64.TryParse(sValue, out ulValue)) MaxUploadBandwidth = ulValue; if ((sValue = info[KEY_DOWNLOAD_QUOTA]) != null && UInt64.TryParse(sValue, out ulValue)) DownloadQuota = ulValue; if ((sValue = info[KEY_UPLOAD_QUOTA]) != null && UInt64.TryParse(sValue, out ulValue)) UploadQuota = ulValue; if ((sValue = info[KEY_MONTH_BYTES_DOWNLOADED]) != null && UInt64.TryParse(sValue, out ulValue)) BytesDownloadedMonth = ulValue; if ((sValue = info[KEY_MONTH_BYTES_UPLOADED]) != null && UInt64.TryParse(sValue, out ulValue)) BytesUploadedMonth = ulValue; if ((sValue = info[KEY_TOTAL_BYTES_DOWNLOADED]) != null && UInt64.TryParse(sValue, out ulValue)) BytesDownloadedTotal = ulValue; if ((sValue = info[KEY_TOTAL_BYTES_UPLOADED]) != null && UInt64.TryParse(sValue, out ulValue)) BytesUploadedTotal = ulValue; if ((sValue = info[KEY_TOTAL_PING]) != null && Double.TryParse(sValue, out dValue)) Ping = dValue; if ((sValue = info[KEY_TOTAL_PACKETLOSS_SPEECH]) != null && Double.TryParse(sValue, out dValue)) TotalSpeechPacketloss = dValue; if ((sValue = info[KEY_TOTAL_PACKETLOSS_KEEPALIVE]) != null && Double.TryParse(sValue, out dValue)) TotalKeepalivePacketloss = dValue; if ((sValue = info[KEY_TOTAL_PACKETLOSS_CONTROL]) != null && Double.TryParse(sValue, out dValue)) TotalControlPacketloss = dValue; if ((sValue = info[KEY_TOTAL_PACKATLOSS_TOTAL]) != null && Double.TryParse(sValue, out dValue)) TotalPacketlossAll = dValue; if ((sValue = info[KEY_PRIORITY_SPEAKER_DIMM_MODIFICATOR]) != null && Double.TryParse(sValue, out dValue)) PrioritySpeakerDimmModificator = dValue; if ((sValue = info[KEY_FLAG_PASSWORD]) != null) IsPassworded = (sValue == "1"); if ((sValue = info[KEY_WEBLIST_ENABLED]) != null) IsWebListEnabled = (sValue == "1"); }