text:
Q: CrystalDecisions,.Shared.dll versioning issue ppI'm trying to deploy an app using Crystal reports, asp.net 3.5 developing in Vs2008.
On my dev boxes, I have CrystalDecisions.Shared 11.5.3300 and 11.5.3700.
the only reference I can add in is to verison 11.5.3300, but the only version deployed on my QA server is 11.5.3700.
I keep getting the following error:

System.IO.FileNotFoundException: Could not load file or assembly
  'CrystalDecisions.Shared, Version=11.5.3300.0, Culture=neutral,
  PublicKeyToken=692fbea5521e1304' or one of its dependencies. The
  system cannot find the file specified.

I tried changing the reference to the 11.5.3700 version, but Visual Studio will not do it.
I tried adding assembly references to the web.config pointing to 11.5.3700 but I still get the Error.
I tried adding a non reference specific asembly reference to the web.config still no joy.
Here are the CrystalDecisions dlls on the server that is throwing the error:
CrystalDecisions.CrystalReports.Design, Version=11.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.CrystalReports.Design, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.CrystalReports.Engine, Version=11.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.CrystalReports.Engine, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.CrystalReports.Engine.resources, Version=11.5.3700.0, Culture=zh-cht, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.CrystalReports.Engine.resources, Version=11.5.3700.0, Culture=zh-chs, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.CrystalReports.Engine.resources, Version=11.5.3700.0, Culture=sv, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.CrystalReports.Engine.resources, Version=11.5.3700.0, Culture=pt, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.CrystalReports.Engine.resources, Version=11.5.3700.0, Culture=nl, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.CrystalReports.Engine.resources, Version=11.5.3700.0, Culture=ko, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.CrystalReports.Engine.resources, Version=11.5.3700.0, Culture=ja, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.CrystalReports.Engine.resources, Version=11.5.3700.0, Culture=it, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.CrystalReports.Engine.resources, Version=11.5.3700.0, Culture=fr, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.CrystalReports.Engine.resources, Version=11.5.3700.0, Culture=es, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.CrystalReports.Engine.resources, Version=11.5.3700.0, Culture=en, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.CrystalReports.Engine.resources, Version=11.5.3700.0, Culture=de, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.CrystalReports.TemplateEngine, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
CrystalDecisions.Data.AdoDotNetInterop, Version=11.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.Data.AdoDotNetInterop, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.Enterprise, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
CrystalDecisions.Enterprise.Admin.Audit, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
CrystalDecisions.Enterprise.Admin.CachePageServer, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
CrystalDecisions.Enterprise.Admin.Cms, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
CrystalDecisions.Enterprise.Admin.EventServer, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
CrystalDecisions.Enterprise.Admin.FileServer, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
CrystalDecisions.Enterprise.Admin.JobServer, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
CrystalDecisions.Enterprise.Admin.ReportAppServer, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
CrystalDecisions.Enterprise.Admin.SingleSignOn, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
CrystalDecisions.Enterprise.Admin.Wcs, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
CrystalDecisions.Enterprise.Auth.secEnterprise, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
CrystalDecisions.Enterprise.Auth.secLDAP, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
CrystalDecisions.Enterprise.Auth.secWinAD, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
CrystalDecisions.Enterprise.Auth.secWindowsNT, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
CrystalDecisions.Enterprise.Desktop.Calendar, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
CrystalDecisions.Enterprise.Desktop.Connection, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
CrystalDecisions.Enterprise.Desktop.Event, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
CrystalDecisions.Enterprise.Desktop.Excel, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
CrystalDecisions.Enterprise.Desktop.FavoritesFolder, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
CrystalDecisions.Enterprise.Desktop.Folder, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
CrystalDecisions.Enterprise.Desktop.Hyperlink, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
CrystalDecisions.Enterprise.Desktop.LicenseKey, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
CrystalDecisions.Enterprise.Desktop.ObjectPackage, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
CrystalDecisions.Enterprise.Desktop.Pdf, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
CrystalDecisions.Enterprise.Desktop.Powerpoint, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
CrystalDecisions.Enterprise.Desktop.Program, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
CrystalDecisions.Enterprise.Desktop.Report, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
CrystalDecisions.Enterprise.Desktop.Report, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
CrystalDecisions.Enterprise.Desktop.Rtf, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
CrystalDecisions.Enterprise.Desktop.Server, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
CrystalDecisions.Enterprise.Desktop.ServerGroup, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
CrystalDecisions.Enterprise.Desktop.Shortcut, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
CrystalDecisions.Enterprise.Desktop.Txt, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
CrystalDecisions.Enterprise.Desktop.User, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
CrystalDecisions.Enterprise.Desktop.UserGroup, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
CrystalDecisions.Enterprise.Desktop.Word, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
CrystalDecisions.Enterprise.Dest.DiskUnmanaged, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
CrystalDecisions.Enterprise.Dest.Ftp, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
CrystalDecisions.Enterprise.Dest.Smtp, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
CrystalDecisions.Enterprise.Framework, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
CrystalDecisions.Enterprise.Framework, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
CrystalDecisions.Enterprise.InfoStore, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
CrystalDecisions.Enterprise.InfoStore, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
CrystalDecisions.Enterprise.Integration, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
CrystalDecisions.Enterprise.PluginManager, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
CrystalDecisions.Enterprise.PluginManager, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
CrystalDecisions.Enterprise.Shared, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
CrystalDecisions.Enterprise.Strings, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
CrystalDecisions.Enterprise.Strings.resources, Version=11.5.3300.0, Culture=zh-CHT, PublicKeyToken=692fbea5521e1304
CrystalDecisions.Enterprise.Strings.resources, Version=11.5.3300.0, Culture=zh-CHS, PublicKeyToken=692fbea5521e1304
CrystalDecisions.Enterprise.Strings.resources, Version=11.5.3300.0, Culture=sv, PublicKeyToken=692fbea5521e1304
CrystalDecisions.Enterprise.Strings.resources, Version=11.5.3300.0, Culture=pt, PublicKeyToken=692fbea5521e1304
CrystalDecisions.Enterprise.Strings.resources, Version=11.5.3300.0, Culture=nl, PublicKeyToken=692fbea5521e1304
CrystalDecisions.Enterprise.Strings.resources, Version=11.5.3300.0, Culture=ko, PublicKeyToken=692fbea5521e1304
CrystalDecisions.Enterprise.Strings.resources, Version=11.5.3300.0, Culture=ja, PublicKeyToken=692fbea5521e1304
CrystalDecisions.Enterprise.Strings.resources, Version=11.5.3300.0, Culture=it, PublicKeyToken=692fbea5521e1304
CrystalDecisions.Enterprise.Strings.resources, Version=11.5.3300.0, Culture=fr, PublicKeyToken=692fbea5521e1304
CrystalDecisions.Enterprise.Strings.resources, Version=11.5.3300.0, Culture=es, PublicKeyToken=692fbea5521e1304
CrystalDecisions.Enterprise.Strings.resources, Version=11.5.3300.0, Culture=de, PublicKeyToken=692fbea5521e1304
CrystalDecisions.Enterprise.Utils.UtcConverter, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
CrystalDecisions.Enterprise.Viewing.ReportSource, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
CrystalDecisions.Enterprise.Viewing.ReportSource, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
CrystalDecisions.Enterprise.Web, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
CrystalDecisions.KeyCode, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.ReportAppServer.ClientDoc, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
CrystalDecisions.ReportAppServer.ClientDoc, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.ReportAppServer.CommLayer, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
CrystalDecisions.ReportAppServer.CommLayer, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.ReportAppServer.CommonControls, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
CrystalDecisions.ReportAppServer.CommonControls, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.ReportAppServer.CommonObjectModel, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
CrystalDecisions.ReportAppServer.CommonObjectModel, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.ReportAppServer.Controllers, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
CrystalDecisions.ReportAppServer.Controllers, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.ReportAppServer.CubeDefModel, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
CrystalDecisions.ReportAppServer.DataDefModel, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
CrystalDecisions.ReportAppServer.DataDefModel, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.ReportAppServer.DataSetConversion, Version=11.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.ReportAppServer.DataSetConversion, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.ReportAppServer.ObjectFactory, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
CrystalDecisions.ReportAppServer.ObjectFactory, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.ReportAppServer.Prompting, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
CrystalDecisions.ReportAppServer.ReportDefModel, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
CrystalDecisions.ReportAppServer.ReportDefModel, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.ReportAppServer.XmlSerialize, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
CrystalDecisions.ReportAppServer.XmlSerialize, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.ReportSource, Version=11.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.ReportSource, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.ReportSource.resources, Version=11.5.3700.0, Culture=zh-cht, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.ReportSource.resources, Version=11.5.3700.0, Culture=zh-chs, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.ReportSource.resources, Version=11.5.3700.0, Culture=sv, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.ReportSource.resources, Version=11.5.3700.0, Culture=pt, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.ReportSource.resources, Version=11.5.3700.0, Culture=nl, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.ReportSource.resources, Version=11.5.3700.0, Culture=ko, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.ReportSource.resources, Version=11.5.3700.0, Culture=ja, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.ReportSource.resources, Version=11.5.3700.0, Culture=it, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.ReportSource.resources, Version=11.5.3700.0, Culture=fr, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.ReportSource.resources, Version=11.5.3700.0, Culture=es, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.ReportSource.resources, Version=11.5.3700.0, Culture=en, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.ReportSource.resources, Version=11.5.3700.0, Culture=de, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.Shared, Version=11.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.Shared, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.Shared.resources, Version=11.5.3700.0, Culture=zh-cht, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.Shared.resources, Version=11.5.3700.0, Culture=zh-chs, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.Shared.resources, Version=11.5.3700.0, Culture=sv, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.Shared.resources, Version=11.5.3700.0, Culture=pt, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.Shared.resources, Version=11.5.3700.0, Culture=nl, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.Shared.resources, Version=11.5.3700.0, Culture=ko, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.Shared.resources, Version=11.5.3700.0, Culture=ja, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.Shared.resources, Version=11.5.3700.0, Culture=it, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.Shared.resources, Version=11.5.3700.0, Culture=fr, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.Shared.resources, Version=11.5.3700.0, Culture=es, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.Shared.resources, Version=11.5.3700.0, Culture=en, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.Shared.resources, Version=11.5.3700.0, Culture=de, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.VSDesigner.Mobile.resources, Version=11.5.3700.0, Culture=zh-cht, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.VSDesigner.Mobile.resources, Version=11.5.3700.0, Culture=zh-chs, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.VSDesigner.Mobile.resources, Version=11.5.3700.0, Culture=sv, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.VSDesigner.Mobile.resources, Version=11.5.3700.0, Culture=pt, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.VSDesigner.Mobile.resources, Version=11.5.3700.0, Culture=nl, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.VSDesigner.Mobile.resources, Version=11.5.3700.0, Culture=ko, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.VSDesigner.Mobile.resources, Version=11.5.3700.0, Culture=ja, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.VSDesigner.Mobile.resources, Version=11.5.3700.0, Culture=it, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.VSDesigner.Mobile.resources, Version=11.5.3700.0, Culture=fr, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.VSDesigner.Mobile.resources, Version=11.5.3700.0, Culture=es, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.VSDesigner.Mobile.resources, Version=11.5.3700.0, Culture=en, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.VSDesigner.Mobile.resources, Version=11.5.3700.0, Culture=de, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.VSDesigner.resources, Version=11.5.3700.0, Culture=zh-cht, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.VSDesigner.resources, Version=11.5.3700.0, Culture=zh-chs, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.VSDesigner.resources, Version=11.5.3700.0, Culture=sv, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.VSDesigner.resources, Version=11.5.3700.0, Culture=pt, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.VSDesigner.resources, Version=11.5.3700.0, Culture=nl, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.VSDesigner.resources, Version=11.5.3700.0, Culture=ko, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.VSDesigner.resources, Version=11.5.3700.0, Culture=ja, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.VSDesigner.resources, Version=11.5.3700.0, Culture=it, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.VSDesigner.resources, Version=11.5.3700.0, Culture=fr, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.VSDesigner.resources, Version=11.5.3700.0, Culture=es, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.VSDesigner.resources, Version=11.5.3700.0, Culture=en, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.VSDesigner.resources, Version=11.5.3700.0, Culture=de, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.Web, Version=11.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.Web, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.Web.Mobile.MobileViewerSys.resources, Version=11.5.3700.0, Culture=zh-cht, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.Web.Mobile.MobileViewerSys.resources, Version=11.5.3700.0, Culture=zh-chs, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.Web.Mobile.MobileViewerSys.resources, Version=11.5.3700.0, Culture=sv, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.Web.Mobile.MobileViewerSys.resources, Version=11.5.3700.0, Culture=pt, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.Web.Mobile.MobileViewerSys.resources, Version=11.5.3700.0, Culture=nl, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.Web.Mobile.MobileViewerSys.resources, Version=11.5.3700.0, Culture=ko, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.Web.Mobile.MobileViewerSys.resources, Version=11.5.3700.0, Culture=ja, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.Web.Mobile.MobileViewerSys.resources, Version=11.5.3700.0, Culture=it, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.Web.Mobile.MobileViewerSys.resources, Version=11.5.3700.0, Culture=fr, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.Web.Mobile.MobileViewerSys.resources, Version=11.5.3700.0, Culture=es, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.Web.Mobile.MobileViewerSys.resources, Version=11.5.3700.0, Culture=en, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.Web.Mobile.MobileViewerSys.resources, Version=11.5.3700.0, Culture=de, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.Web.resources, Version=11.5.3700.0, Culture=zh-cht, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.Web.resources, Version=11.5.3700.0, Culture=zh-chs, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.Web.resources, Version=11.5.3700.0, Culture=sv, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.Web.resources, Version=11.5.3700.0, Culture=pt, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.Web.resources, Version=11.5.3700.0, Culture=nl, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.Web.resources, Version=11.5.3700.0, Culture=ko, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.Web.resources, Version=11.5.3700.0, Culture=ja, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.Web.resources, Version=11.5.3700.0, Culture=it, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.Web.resources, Version=11.5.3700.0, Culture=fr, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.Web.resources, Version=11.5.3700.0, Culture=es, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.Web.resources, Version=11.5.3700.0, Culture=en, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.Web.resources, Version=11.5.3700.0, Culture=de, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.Windows.Forms, Version=11.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.Windows.Forms, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.Windows.Forms.resources, Version=11.5.3700.0, Culture=zh-cht, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.Windows.Forms.resources, Version=11.5.3700.0, Culture=zh-chs, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.Windows.Forms.resources, Version=11.5.3700.0, Culture=sv, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.Windows.Forms.resources, Version=11.5.3700.0, Culture=pt, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.Windows.Forms.resources, Version=11.5.3700.0, Culture=nl, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.Windows.Forms.resources, Version=11.5.3700.0, Culture=ko, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.Windows.Forms.resources, Version=11.5.3700.0, Culture=ja, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.Windows.Forms.resources, Version=11.5.3700.0, Culture=it, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.Windows.Forms.resources, Version=11.5.3700.0, Culture=fr, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.Windows.Forms.resources, Version=11.5.3700.0, Culture=es, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.Windows.Forms.resources, Version=11.5.3700.0, Culture=en, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL
CrystalDecisions.Windows.Forms.resources, Version=11.5.3700.0, Culture=de, PublicKeyToken=692fbea5521e1304, process

It's trying to load 11.5.3300.0, which is not there. only 10.5.3700 and 11.5.3700 are there.
Does anyone have any idea how i can get the versions to work?

A: "...or one of its dependencies" may be your first clue.  Did you copy the assemblies using gacutil or did you create an installer package as outlined on the BusinessObjects/SAP/whoever owns Crystal this week's website?  CrystalDecisions.Shared has a lot of dependencies and requires a lot of other assemblies to operate...
Can you look in c:\windows\assembly and provide a run-down on what you have in the CrystalDecisions namespace?

A: I had the exact same problem.  I don't know the cause of the problem, but this is what seemed to make it go away:

*

*Started: All Programs > BusinessObjects XI Release 2 > Crystal Reports > Crystal Reports XI Release 2

*This triggered the loading of some MSI installer repair tool

*MSI then requested a path to the file: CrystalReports.msi

*MSI installer then exited

*Crystal Reports XI Release 2 finished starting

*Exited Crystal Reports XI Release 2

*The problem was now gone.

A: Follow these steps:

*

*install compatible version of sap crystal reports for VS10

*remove your old assemblies

*go to project and add reference of all ddl files of crystal report

*clen class library....build it then clean solution build it..now run your project properly

if any query contact me on
ubhal.bhushan@gmail.com

A: I faced similar problem with CrystalDecisions.Shared.ConnectionInfo when I converted my Crystal report 9.0 application to Crystal report 13.0, so to resolve this problem I just imported "CrystalReportsDataDefModelLib" and it worked fine.
I think I just faced this problem because SAP has optimized and moved some functionality to other DLL so the existing is not working. But the older ones are also present in the new DLL reference we just have to find it.


text:
Q: Mamp Apache problems - El Capitan Upgrade I was running MAMP PRO 2.2 on Mavericks without a problem.
BUT THEN I upgraded  OS to El Capitan
Now when I connect to MAMP I get this message

Start Apache failed Apache wasn't able to start. Please check log for
  more information.

I tried  trouble testing Apache by running apachectl configtest
and got the below

httpd: Syntax error on line 58 of /private/etc/apache2/httpd.conf:
  Cannot load libexec/apache2/mod_authn_default.so into server:
  dlopen(/usr/libexec/apache2/mod_authn_default.so, 10): image not found

Can anyone help with this problem
Thanks

A: Looks like your MAMP PRO is outdated. Upgrade to MAMP PRO 3.5, runs fine in 10.11.
Peter

redpajama_set_name: RedPajamaStackExchange


text:
Q: How to use OneHotEncoder and LabelEncoder together?
I have dataset composed by:

*

*binary data (example: 'yes', 'no'),

*multiple nominal data (example: 'father', 'mother', 'other'),

*binary numerical data (0,1),

*multiple numerical data (example: 1,2,3,4,5).

Target: define a function to encode the columns with the nominal data.
How would I like it? Encode in the same function some columns with OneHotEncoder() and other columns as LabelEncoder().
In the specific, I want only the nominal (feature_1:'father', 'mother','other'; feature_2: 'home', school 'reputation', 'course' preference or 'other')  data encoded as OneHot and the rest of the features label encoded.
I did this code but it use only LabelEncoder; I would like to implement it with OneHotEncoder (only for nominal data) if  possible.
def encoder(df):
    le = LabelEncoder()
    for c in df.columns:
        if df.dtypes[c] == object:
          df[c] = le.fit_transform(df[c].astype(str))

    return df
encoder(stud)

stud.head()

A: You can use select_dtypes method in pandas along with Column transformer.
cate_cols = df.select_dtypes(include=["category"]).columns.tolist()
bin_cols = df.select_dtypes(include=["str", "int"]).columns.tolist()
encoders = make_column_transformer(
    (OneHotEncoder(handle_unknown='ignore'), cate_cols),
    (OrdinalEncoder(handle_unknown='use_encoded_value', unknown_value=np.nan), bin_cols),
    remainder='passthrough')


text:
Q: Looking for a manga where the female MC is summoned with another, trains with knights for a few weeks, and is sent away I would be grateful if anyone can tell me the title.
It was a summoning with another girl, where the other girl wants to send her away. She ends up getting some survival skills with one of the knight groups, before getting sent to a house in the middle of a demon forest. She gets injured on her way to the house, and the old/previous demon king finds her and helps her to the house.
I remember she cooks food for the wild animals/beasts. Also the wader of the knights, and one of the mages come and visit her often. I think it was a transport scroll.
She becomes an adventurer and the king who sent her to die in the forest tries to recruit her. She uses wolf familiars as adventuring buddies.


text:
Q: How to combine Pandas dataframe according to unique column I have two CSV files. One is called 'master_registry.csv' and another one is 'master_reference.csv'.  Both of these CSV files have a column called 'Master_Id'. I have filtered some values including 'Master_Id' from the 'master_registery.csv' and created new data frame called 'df' and also I have filtered some values including 'Master_Id' from 'master_reference.csv' and created a new data frame called 'df2'. So both of these data frames have 'Master_Id' column. Now I want to create new data frame by combining both 'df' and 'df2' data frames. Can anyone help me do this?
    # reading CSV from the directory
    master_registry = pd.read_csv('application/master_registry.csv')
    master_reference = pd.read_csv('application/master_registry.csv')

    # filtering some selected columns form the csv
    df = master_registry .filter(items=['Master_ID', 'Provider First Name', 'Provider Last Name (Legal Name)', 'Provider Credential Text', 'Provider Gender Code','Provider License Number State Code_1',
                    'Provider Business Practice Location Address City Name'])

    df2 = master_reference .filter(items=['Master_ID', 'Client_Reference_ID'])

A: It seems to me that you want to merge the two data frames by 'Master ID'. You can have a look at this link.
I think this should solve your problem: pd.merge(df, df2, on='Master_ID')

A: Use the join method. Usage below -
df.set_index('Master_ID').join(df2.set_index('Master_ID'))


text:
Q: Key press getting lost in menu loop I want to build a menu form that acts similar to ribbon keytips - you can

*

*press and hold Alt, then press and release e. g. d, then release Alt to trigger an action or

*press and release Alt, then press and release d to trigger the same action

I took inspiration at Hidden Main Menu in a delphi program automatically shown using Alt key and came up with the following demo:
unit Unit1;

interface

uses
  Windows,
  Messages,
  SysUtils,
  Variants,
  Classes,
  Graphics,
  Controls,
  Forms,
  Dialogs,
  ImgList,
  StdCtrls;

type
  TForm1 = class(TForm)
    Label1: TLabel;
    procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
  strict private
    FShowKeyTips: Boolean;

    procedure UpdateKeyTipState(AShowKeyTips: Boolean);
    procedure WMExitMenuLoop(var Message: TMessage); message WM_EXITMENULOOP;
  public
    constructor Create(AOwner: TComponent); override;
    destructor Destroy; override;
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

uses
  ShellAPI,
  Menus;

{ TForm1 }

constructor TForm1.Create(AOwner: TComponent);
begin
  inherited Create(AOwner);
  Label1.Caption := 'Dummy';
end;

destructor TForm1.Destroy;
begin
  inherited Destroy;
end;

procedure TForm1.WMExitMenuLoop(var Message: TMessage);
begin
  UpdateKeyTipState(False);
end;

procedure TForm1.FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
const
  MAPVK_VK_TO_CHAR = 2;

  // Adapted from dxBar.pas:
  function IsTextCharForKeyTip(AKey: Word): Boolean;
  var
    ARes: UINT;
  begin
    ARes := MapVirtualKey(AKey, MAPVK_VK_TO_CHAR);
    Result := ((ARes and $FFFF0000) = 0) and (Char(ARes) <> ' ') and (Char(ARes) in [#32..#255]);
  end;

var
  hk: string;
  CheckKeyTips: Boolean;
begin
  if (Key = VK_MENU) or (Key = VK_F10) then
  begin
    UpdateKeyTipState(True);
    Exit;
  end;

  if FShowKeyTips then
    CheckKeyTips := True
  else
    CheckKeyTips := Shift = [ssAlt];
  if CheckKeyTips and IsTextCharForKeyTip(Key) then
  begin
    hk := Char(Key); // TODO: Handle analogouos to TdxBarItemLink.IsAccel?
    if SameText(hk, 'd') then
    begin
      Caption := Caption + '+';
      Key := 0;
      Exit;
    end;
  end;
end;

procedure TForm1.UpdateKeyTipState(AShowKeyTips: Boolean);
begin
  if FShowKeyTips = AShowKeyTips then
    Exit;

  FShowKeyTips := AShowKeyTips;
  if AShowKeyTips then
    Label1.Caption := 'Dummy (d)'
  else
    Label1.Caption := 'Dummy';
end;

end.

(Create a standard VCL app, add Label1 to Form1 and replace the contents of Unit1.pas with the above.)
The first bullet point works (adds a + to the form caption), however I can't make the second one work. I can't find where the d gets handled. I tried WM_(SYS)KEYDOWN, CM_DIALOGCHAR and more to no avail.
Any ideas?

A: As documented the Alt key, when pressed and released alone, "toggles in and out of menu bar mode". This is true even if your form does not have a window menu, the system menu is sufficient for the system to put the window into a modal menu loop. In this mode a non-accelerator will generate a WM_MENUCHAR message:

Sent when a menu is active and the user presses a key that does not
  correspond to any mnemonic or accelerator key.

This is the message that you're looking for, read the character from the User field. And you don't have to track the Alt key, since the window being in a modal menu loop means the Alt key has been pressed once. Otherwise a key down message is generated instead of a menu character message.
Note that if your form does not have a system menu (in BorderIcons uncheck biSystemMenu) and a window menu, a regular WM_KEYDOWN will be sent which you're already handling.


text:
Q: Am I free to move / choose a custom file location for scripts installed by Nuget packages and still get them updated? In addition to controlling solution packages folder  and away from it, do I have the right to move files of a VS2013 solution package like jQuery and jQuery UI to a different folder than solution1/Scripts and get them updated later? can I chose a custom location while install or at any stage?

A: Yes. Nugent just makes installing a little easier.. You'll just need to change your links to your scripts folder to wherever you saved them to.
How to install packages in a different location from the default "Packages" folder?
This can be done by setting the "repositoryPath" settings in nuget.config.
More Details and step by step Here


text:
Q: put the hand in onclick Event I have this code in a HTMl table
<tr id="${item.deviceId}" class="odd" onclick="window.location.href='<c:url value='/devices/app-${item.applicationId}' />'">

But I don't see the cursor when I put the mouse over the table

A: Try style="cursor:pointer";
<tr id="${item.deviceId}" style="cursor:pointer" class="odd" onclick="window.location.href='<c:url value='/devices/app-${item.applicationId}' />'">

A: If I understand you, in CSS you can add this to an element to force the hand pointer icon:
cursor: pointer;

A: Add cursor: pointer property for odd class
example:
.add{
  cursor: pointer;
}

A: add "cursor: pointer" in line style or you can mention it in css and use it.


text:
Q: Calculate E(Xt), Var(Xt), and Cov(ts,Xs)
I am new to studying B.M., and I am having trouble understanding how the calculations below were derived. I'm not sure about the Var, Cov, but my guess for deriving the answer for E(Xt) requires you to take into consideration the fact that sigma and mu  are constants. I understand the basic properties of B.M., but I am having a hard time understanding how to properly apply them.

A: First off, this is not BM but GBM (geometric Brownian Motion).  Google that and you will find a lot.
The way I think of it is to break it into multiplied terms.  Then,
$$X_t=e^{\mu t}e^{(-\frac{\sigma^2}{2})t)}e^{\sigma B_t}
$$
First, imagine $\sigma=0$.  Then, as usual for compounding, the first term makes sense, because a sum compounding continuously for t years at rate $\mu$ would be $X_0e^{\mu t}$
The problem is the solution to the SDE has that unfortunate $e^{\sigma B_t} $term multiplying the result.  Since $e^q$ for any real $q$ is always positive, it imparts an upward bias on the no-volatility result.  And, that amount is $e^{\frac{\sigma^2}{2}}$.
So, by having $\mu-\frac{\sigma^2}{2}$ as what you plug in for drift, terms 2 and 3 in the multiplicative form of the solution exactly cancel each other out in terms of the expected value.  Compare this to arithmetic Brownian Motion, where the result with drift is $X_t=X_0+\mu t+N(0, \sigma^2\sqrt t$), and the stochastic term introduces only the uncertainty/variance, and does not impact the expected value (since $E[N(0,\sigma^2)]=0$)
It's a bit hard to think about $e^X$, where $X$ is a random variable, but perfectly OK.  For one thing you could just expand it using the standard expansion for $e^X= 1 + \frac{X^1}{1!}+\frac{X^2}{2!}+\frac{X^3}{3!}+...$.  But if you Google "lognormal distribution" you will see a lovely graphic about what $E^X$looks like if X is a normal random variable, and why a GBM with drift $\mu$ and variance $\sigma^2$ has an expected value of $e^{(\mu+\frac{\sigma^2}{2})t}$, so plugging in the $\frac{-\sigma^2}{2}$ offsets the $e^{B_t}$ term properly. It also shows how to get the higher order moments quite simply.


text:
Q: Resize UICollectionView Height I'm trying to resize a UICollectionView height by setting it to 0 when the view controller is loaded, then increasing its size with an animation when a button is pressed. I've tried a few different things but it doesn't change in size at all. Here's all the different things I've tried to change its height to 0:
CGRect bounds = [self.collectionView bounds];
[self.collectionView setBounds:CGRectMake(bounds.origin.x,
                                          bounds.origin.y,
                                          bounds.size.width,
                                          bounds.size.height - 100)];

....
CGRect frame = [self.collectionView frame];
[self.collectionView setFrame:CGRectMake(frame.origin.x,
                               frame.origin.y,
                               frame.size.width,
                               frame.size.height - 100)];

....
CGRect frame = self.collectionView.frame;
frame.size.height -= 100;
self.collectionView.frame = frame;

....
 self.collectionView.clipsToBounds = YES;
 self.collectionView.autoresizingMask = UIViewAutoresizingFlexibleHeight;

A: If you are using Interface Builder for UICollectionView initialisation, switch off "Use Autolayout" from the File Inspector in the xib file where the your CollectionView is created. Then you can change the height with setFrame or setBounds methods.

A: You can avoid disabling Autolayout by creating an outlet for the height constraint and then adjusting the constraint's constant in code.
Outlet
@IBOutlet weak var collectionViewVerticalConstraint: NSLayoutConstraint!

Adjustment
collectionViewVerticalConstraint.constant = 0


text:
Q: Java - Print Contents of an Object I am trying to print the contents of a of my object Fraction(), but it keeps giving me a lot of errors and referring me back to where my print statements start. I have a toString() method that I created, but that does not seem to work either. Here is my class and tester class:
 package fraction;

    public class Fraction
    {
        /**
         * The numerator and denominator.
         */
        private int top;
        private int bottom;

        /**
         *  Creates the fraction 0/1
         */
        public Fraction()
        {
            top = 0;
            bottom = 1;
        }

        /**
         * Creates the fraction n/1
         * @param n an integer
         */
        public Fraction(int n)
        {
            top = n;
            bottom = 1;
        }

        /**
         * Creates a fraction with the specified numerator and denominator
         * @param n the numerator
         * @param d the denominator
         */
        public Fraction(int n, int d)
        {
            top = n;
            bottom = d;

            if (bottom == 0) {
                throw new IllegalArgumentException();
            }
        }

        /**
         * Computes the sum of this fraction and the specified fraction
         * @param f a fraction
         * @return the fraction obtained by adding this fraction from the specified fraction
         */
        public Fraction add(Fraction f)
        {
            return new Fraction(this.numerator() * f.denominator() + f.numerator() * this.denominator());
        }

        /**
         * Compares this fraction and the specified fraction
         * @param f a fraction
         * @return 0 when this fraction is equal to the specified fraction; 1 when this fraction is greater than the specified
         * fraction; -1 otherwise
         */
        public int compareTo(Fraction f)
        {
            if (top > f.numerator())
                return 1;
            else if (top < f.numerator())
                return -1;
            else if (bottom > f.denominator())
                return 1;
            else if (bottom < f.denominator())
                return -1;
            else
                return 0;
        }

        /**
         * Gives the denominator of this fraction
         * @return the denominator of this fraction
         */
        public int denominator()
        {
            return bottom;
        }

        /**
         * Gives the quotient of this fraction and the specified fraction
         * @param f a fraction
         * @return the fraction obtained by dividing this fraction by the specified fraction
         * @throws IllegalArgumentException when the numerator equals 0
         */
        public Fraction divide(Fraction f)
        {
            if (f.numerator() == 0) {
                throw new IllegalArgumentException();
            }
            else
            {
                return new Fraction(this.numerator() * f.numerator(), this.denominator() * f.denominator());
            }
        }

        /**
         * Determines whether this fraction is equal to the specified fraction
         * @param f a fraction
         * @return true when this fraction is equal to the specified fraction; otherwise, false
         */
        public boolean equals(Fraction f)
        {
            return top == f.numerator() && bottom == f.denominator();
        }

        /**
         * Computes the greatest common divisor of the specified numbers
         * @param num1 an integer
         * @param num2 an integer
         * @return the greatest common divisor of the specified parameters
         */
        private int gcd(int num1, int num2)
        {
            if (num2 == 0) {
                return num1;
            }
            else
            {
                return gcd(num2, num1%num2);
            }
        }

        /**
         * Calculates the product of this fraction and the specified fraction
         * @param f a fraction
         * @return the product of this fraction and the specified fraction
         */
        public Fraction multiply(Fraction f)
        {
            return new Fraction(this.numerator() * f.numerator(), this.denominator() * f.denominator());
        }

        /**
         * Simplifies this fraction by expressing its numerator and denominator in standard form:
         * the denominator is positive and the numerator and denominator are relative primes
         */
        public void normalize()
        {
            int gcd = gcd(top,bottom);
            top /= gcd;
            bottom /= gcd;
        }

        /**
         * Gives the numerator of this fraction
         * @return the numerator of this fraction
         */
        public int numerator()
        {
            return top;
        }

        /**
         * Computes the reciprocal of this fraction
         * @return the reciprocal of this fraction
         * @throws IllegalArgumentException when the numerator is equal to 0
         */
        public Fraction reciprocal()
        {
            if (top == 0) {
                throw new IllegalArgumentException();
            }

            int temp;
            temp = numerator();
            top = denominator();
            bottom = temp;
            return new Fraction(top, bottom);
        }

        /**
         * Modifies this fraction
         * @param n the new numerator of this fraction
         * @param d the new denominator of this fraction
         * @throws IllegalArgumentException when the denominator equals 0
         */
        public void setFraction(int n, int d)
        {
            if (d == 0) {
                throw new IllegalArgumentException();
            }

            top = n;
            bottom = d;
        }

        /**
         * Computes the difference of this fraction and the specified fraction
         * @param f a fraction
         * @return the fraction obtained by subtracting this fraction from the specified fraction
         */
        public Fraction subtract(Fraction f)
        {
            return new Fraction(this.numerator() * f.denominator() - f.numerator() * this.denominator(), this.denominator() * f.denominator());
        }

        /**
         * Gives a string representing this fraction in in-line notation, numerator/denominator
         * @return a string representing this fraction in in-line notation, numerator/denominator
         */
        @Override public String toString()
        {
            return String.format("%d/%d",top,bottom);
        }
    }

package fraction;

import java.util.Scanner;

public class FractionTester
{
    public static void main(String[] args)
    {
        Scanner in = new Scanner(System.in);

        System.out.print("Enter the numerator and denominator of f1 > ");
        int n1 = in.nextInt(), d1 = in.nextInt();
        System.out.print("Enter the numerator and denominator of f2 > ");
        int n2 = in.nextInt(), d2 = in.nextInt();
        System.out.print("Enter the numerator and denominator of f3 > ");
        int n3 = in.nextInt(), d3 = in.nextInt();
        System.out.print("Enter the numerator and denominator of f4 > ");
        int n4 = in.nextInt(), d4 = in.nextInt();
        System.out.println();

        Fraction f1 = new Fraction(n1, d1);
        Fraction f2 = new Fraction(n2, d2);
        Fraction f3 = new Fraction(n3, d3);
        Fraction f4 = new Fraction(n4, d4);

        System.out.printf("f1 = %d", f1);
        System.out.printf("f2 = %d", f2);
        System.out.printf("f3 = %d", f3);
        System.out.printf("f4 = %d", f4);

        if (f1.compareTo(f2) == 0) {
            System.out.println("f1 = f2");
        }
        else if (f1.compareTo(f2) < 0) {
            System.out.println("f1 < f2");
        }
        else {
            System.out.println("f1 > f2");
        }

        if (f3.compareTo(f4) == 0) {
            System.out.println("f1 = f2");
        }
        else if (f3.compareTo(f4) < 0) {
            System.out.println("f1 < f2");
        }
        else {
            System.out.println("f1 > f2");
        }
        System.out.println();

    }
}

I am trying to print the contents of the objects f1, f2, f3, and f4. It says my error is on the first print statement (System.out.printf("f1 = %d", f1);).

A: Your fraction is not a number (%d) but an Object of which the toString() method should be called. Change %d to %s and it will work, i.e.
System.out.printf("f1 = %s", f1);

A: That's not how toString() works, change:
System.out.printf("f1 = %d", f1)

to:
System.out.println("f1 = "+ f1)

When you print an object its toString() will be called, which will return a String, while you where trying to print %d (a digit).


text:
Q: Dropping 50VAC to 10VAC-20VAC I am installing a Ring door bell.  At the old intercom I have 50VAC currently (NO other source).  According to the manufacturer I need between 8VAC and 24VAC.  My question is what resistance (resisters) would I need to reduce the voltage?
The input is 50vac, I can NOT get a source of 120vac. Could I go with a regulator that has a steady 12vac output instead?  Just not sure it can take the 50VAC input. I am located in California.
Thanks!!!

A: Using resistors in this way doesn't usually work very well. It is a reasonable approach only if the input voltage is constant, the required current is fairly low, and the required current is constant. I would suggest that you look for a transformer instead, one that has a primary-to-secondary ratio of 2:1 or 3:1

A: You don't need a resistor. You need a transformer. Either reducing existing 50V to required voltage, or (preferably) replacing it altogether for direct reduction of mains voltage. You should be able to reuse existing power wires for Ring doorbell.
BTW, I could not find any Ring models requiring 5~24V. They only have 8~24V or 16~24V, so check your specifications carefully before buying the transformer. Ideally, use simple wall adapter sold by amazon. It would be cheaper and safer than tinkering with your own wiring.
Read this for explanation why resistor is a bad idea.

The input is 50vac, I can not get a source of 120vac

Those 50VAC coming from somewhere. You should be able to locate existing transformer. See here for how it looks and how it could be installed.
You can replace it with similar transformer for new voltage output, like this one for example, but this could be dangerous as it involves connection to mains voltage. If you are not confident in your skills, you can disconnect two wires from it (safe if you do not short those screws on top) and use the wall adapter like the one I linked above to send power along those wires.

UPDATE:
To avoid misunderstanding, here is what I mean:

simulate this circuit – Schematic created using CircuitLab
As you can see, your existing 50V transformer has ratio about 2.4:1 (if you divide primary by secondary voltage, 120V / 50V = 2.4). To reduce those 50V down to 10V you need another transformer with 5:1 ratio (50V / 10V = 5).
The transformer on Ring website is 7.5:1 (120V / 16V = 7.5). You need 5:1 ~ 3:1 transformer. For example 24V mains transformer has a ratio 120V / 24V = 5 and 40V transformer has a ratio 120V / 40V = 3. Here are some suitable 24V transformers: one, two, three.
WARNING: the above only works if you indeed have 50VAC power
The reason for this warning is that I do not know of intercoms working on 50VAC. As far as I know they usually work on 12, 30 or 48 VDC. The doorbells usually work on 8, 16 or 24 VAC (this is what Ring doorbells are designed to work with).
It would be very helpful if you can confirm that your intercom voltage is indeed 50VAC and specify Intercom model and Ring model you have.
It would also be helpful if you explain what you are going to do with your existing intercom. If you replacing it with Ring devices then you certainly can use existing wiring with new wall adapter or mains transformer, regardless of what voltage intercom was using.

A: As has been stated, a resistor is a bad idea. Instead, get a 120 volt (I'm assuming you're in the US, with 120 volt power) to 24 volt transformer. It's output will be about (50/120) x 24, or 10 volts. This is comfortably between your 5 and 24 limits, and they are cheap.


text:
Q: It is possible attach a file to a list item with anonymous authentication? Is there any way to attach a file to a list item using anonymous authentication?
Or attach the file to the item using JS, keeping anonymous authentication?


text:
Q: Apache Hadoop is not doing it's combining & reducing work in my program that it should do I'm a starter in Apache Hadoop and tried Word Counting program from Apache and it worked fine. But now I would like to make my own outdoor temperature program that calculates daily averages. Average calculation is not working as I expected; no combining & averaging of data is made.
To be more specific here is a part of my sample2.txt input file:
25022016 00:00:00 -10.3
25022016 00:01:00 -10.3
25022016 00:02:00 -10.3
25022016 00:03:00 -10.3
...
25022016 00:59:00 -11.2

and the output that I would like to have should be:
25022016 7.9

which is the average of all temperature observations of that date. So I have 60 observations and want one average. In the future I'd like to process more observations during more days with the same program. 1. column is date (text), 2. time and third one is temperature. Temperature calculations are done in float data type of Java in the code.
What happens now is that the output is:
25022016    -10.3
25022016    -10.3
25022016    -10.3
25022016    -10.3
...
25022016    -11.2

so the average is counted of each one observation (from one number is calculated the average of one number). I'd like the average (one number) from 60 observations!
So my input and output files are above. My Java code (I run it on Windows 7 -> VirtualBox -> Ubuntu 64-bit) is following:

package hadoop;

import java.io.IOException;
import java.util.StringTokenizer;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.IntWritable;
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.FloatWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Job;
import org.apache.hadoop.mapreduce.Mapper;
import org.apache.hadoop.mapreduce.Reducer;
import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;
import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;
import org.apache.hadoop.util.GenericOptionsParser;

import org.apache.commons.cli.Options;

public class ProcessUnits2
{
    public static class E_EMapper extends
    Mapper<Object, Text, Text, FloatWritable>
    {
        private FloatWritable temperature = new FloatWritable();
        private Text date = new Text();

        public void map(Object key, Text value,
        Context context) throws IOException, InterruptedException
        {
            StringTokenizer dateTimeTemperatures = new StringTokenizer(value.toString());

            while(dateTimeTemperatures.hasMoreTokens()) {
                date.set(dateTimeTemperatures.nextToken());

                while(dateTimeTemperatures.hasMoreTokens()) {
                    dateTimeTemperatures.nextToken();
                    temperature.set(Float.parseFloat(dateTimeTemperatures.nextToken()));

                    context.write(date, temperature);
                }
            }
        }
    }

    public static class E_EReduce extends Reducer<Text,Text,Text,FloatWritable>
    {
        private FloatWritable result = new FloatWritable();

        public void reduce( Text key, Iterable<FloatWritable> values, Context context
        ) throws IOException, InterruptedException
        {
            float sumTemperatures=0, averageTemperature;
            int countTemperatures=0;

            for (FloatWritable val : values) {
                sumTemperatures += val.get();
                countTemperatures++;
            }

            averageTemperature = sumTemperatures / countTemperatures;

            result.set(averageTemperature);
            context.write(key, result);

        }
    }

    public static void main(String args[])throws Exception
    {
        Configuration conf = new Configuration();
        String[] otherArgs = new GenericOptionsParser(conf, args).getRemainingArgs();

        if (otherArgs.length < 2) {
            System.err.println("Usage: wordcount <in> [<in>...] <out>");
            System.exit(2);
        }
        Job job = Job.getInstance(conf, "VuorokaudenKeskilampotila");
        job.setJarByClass(ProcessUnits2.class);

        job.setMapperClass(E_EMapper.class);
        job.setCombinerClass(E_EReduce.class);
        job.setReducerClass(E_EReduce.class);
        job.setOutputKeyClass(Text.class);
        job.setOutputValueClass(FloatWritable.class);
        for (int i = 0; i < otherArgs.length - 1; ++i) {
            FileInputFormat.addInputPath(job, new Path(otherArgs[i]));
        }
        FileOutputFormat.setOutputPath(job,
        new Path(otherArgs[otherArgs.length - 1]));
        job.setNumReduceTasks(0);

        System.exit(job.waitForCompletion(true) ? 0 : 1);
    }
}
---------------------------------------------------

Hadoop version is 2.7.2 and Ubuntu 14.04 LTS. I run hadoop in standalone mode (most basic setting).
Here are the commands I use to build the program (if it helps?):
rm -rf output2
javac -Xdiags:verbose -classpath hadoop-core-1.2.1.jar:/usr/local/hadoop/share/hadoop/common/lib/commons-cli-1.2.jar -d units2 ProcessUnits2.java
jar -cvf units2.jar -C units2/ .
hadoop jar units2.jar   hadoop.ProcessUnits2 input2 output2
cat output2/part-m-00000

As a beginner I'm confused and to my mind hadoop is not doing here any combining & reducing (= averaging) work in it's default settings which should be it's most ultimate purpose. I admit that I picked code from here and there (examples) because nothing worked and I'm sure it is only a little step to solution but I cannot guess what it is. I could easily do this with for example C++ without any map reducing -framework at all but the thing is that I want the basic operation working so I could continue to more complicated examples and in the end production use and real distributed mapping-combining-reducing.
I'd be very gratefull of any kind of help. I'm stuck in this now (many many hours ...). If you need any extra data to help in finding solution I'll send them.

A: You're not implementing the reducer correctly. It should be:
public static class E_EReduce extends Reducer<Text, FloatWritable, Text, FloatWritable>
{
    @Override
    public void reduce( Text key, Iterable<FloatWritable> values, Context context) throws IOException, InterruptedException
    {

Never forget @Override, otherwise the compiler won't catch the error.

A: Now I notice what was the problem:
line:
job.setNumReduceTasks(0);

said no reducers. I changed it to job.setNumReduceTasks(1); and even removed it totally and now the program runs. Why it was there ? => because in a trouble you try everything possible and don't have time to read documents.
Thank you all folks that participated. I go on studying this system.


text:
Q: ScrollView cuts off the top and leaves space at the bottom When I launch the emulator and enter the screen which uses this code it shows most of the text information but cuts off the top of the screen (cant scroll up) but leaves a bit of space at the bottom.
Here is the code;
    <ScrollView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:visibility="visible"
    android:fillViewport="true"
    android:id="@+id/backgroundImage" >

 <LinearLayout
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical"
    android:layout_gravity="center"
    android:padding="10dip" >

     <ImageView
        android:id="@+id/earthSymbolImageView"
        android:layout_width="25dp"
        android:layout_height="25dp"
        android:src="@drawable/earthsymbol" />

     <TextView
        android:id="@+id/earth_content1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/earth_title"
        android:gravity="center"
        android:textColor="#FFFFFF"
        android:textSize="20sp" />

    <TextView
        android:id="@+id/earth_content2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/earth_text"
        android:textColor="#FFFFFF" />

    <Button
        android:id="@+id/backButton"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="@string/back" />

     </LinearLayout>
    </ScrollView>

Does anyone know why would this be happening?

A: This is being caused because of the layout_gravity in your LinearLayout. Since your LinearLayout is inside a ScrollView you are probably just trying to center horizontally (centering vertically inside a ScrollView doesn't make since). Specifying your LinearLayout to center horizontally like this should do the trick:
<LinearLayout
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical"
    android:layout_gravity="center_horizontal"
    android:padding="10dip" >

A: Remove layout_gravity from Linear/Relative layout inside Horizontalscroll view, it'll work .

A: I had a the same problem with aHorizontalScrollViewnested inside aScrollView.I had theHorizontalScrollViewgravity set tocenterwhich was causing the problem. Just removing it fixed the issue.
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

<HorizontalScrollView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center">

    <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content">

        <TextView
                android:layout_width="1000dp"
                android:layout_height="1000dp"
                android:gravity="center"
                android:layout_gravity="center"
                android:text="New Text"/>
    </LinearLayout>
</HorizontalScrollView>

A: Its quite simple - you just need to move layout_gravity from LinearLayout into your parent container ScrollView:
<ScrollView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:visibility="visible"
    android:fillViewport="true"
    android:id="@+id/backgroundImage"
    android:layout_gravity="center" >

 <LinearLayout
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical"
    android:padding="10dip" >

A: The best answer I have found and tested that fixes this problem is the one that @hadi gave in this question:
no gravity for scrollview. how to make content inside scrollview as center
Resuming the answer:

*

*Put your ScrollView inside a RelativeLayout.

*In the ScrollView, set the following:

*

*android:layout_height="wrap_content"

*android:layout_centerVertical="true"

*Put your vertical LinearLayout inside the ScrollView.

The code would be:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <ScrollView
        android:id="@+id/scrollView"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_centerVertical="true">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical">

            ...

        </LinearLayout>
    </ScrollView>
</RelativeLayout>

A: In my case the problem was requestFocus of EditText.
In your case their is no EditText so the problem is something other. For those who are having problem of scrollview cuts top edges, Try to remove all requestFocus from all EditText.

A:
You must add marginBottom in LinearLayout

<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:visibility="visible"
android:fillViewport="true"
android:id="@+id/backgroundImage" >

 <LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_gravity="center"
android:padding="10dip"
android:layout_marginBottom="96dp" >

 <ImageView
    android:id="@+id/earthSymbolImageView"
    android:layout_width="25dp"
    android:layout_height="25dp"
    android:src="@drawable/earthsymbol" />

 <TextView
    android:id="@+id/earth_content1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="@string/earth_title"
    android:gravity="center"
    android:textColor="#FFFFFF"
    android:textSize="20sp" />

<TextView
    android:id="@+id/earth_content2"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="@string/earth_text"
    android:textColor="#FFFFFF" />

<Button
    android:id="@+id/backButton"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:text="@string/back" />

 </LinearLayout>
</ScrollView>

A: If you want the TextViews to be scrollable, why don't you put ScrollView around this 2 elements?
 <LinearLayout
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical"
    android:layout_gravity="center"
    android:padding="10dip" >

    <ScrollView>
     <ImageView
        android:id="@+id/earthSymbolImageView"
        android:layout_width="25dp"
        android:layout_height="25dp"
        android:src="@drawable/earthsymbol" />

     <TextView
        android:id="@+id/earth_content1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/earth_title"
        android:gravity="center"
        android:textColor="#FFFFFF"
        android:textSize="20sp" />

    <TextView
        android:id="@+id/earth_content2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/earth_text"
        android:textColor="#FFFFFF" />

     </ScrollView>

    <Button
        android:id="@+id/backButton"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="@string/back" />

     </LinearLayout>


text:
Q: How to enable HttpOnly cookies on ASP.NET Core 2.1 Web site I have created a standard ASP.NET Core MVC website with Core 2.1 in Visual Studio using File->New Project.
In the Startup.cs is the boilerplate code
 public void ConfigureServices(IServiceCollection services)
    {
        services.Configure<CookiePolicyOptions>(options =>
        {
            // This lambda determines whether user consent for non-essential cookies is needed for a given request.
            options.CheckConsentNeeded = context => true;
            options.MinimumSameSitePolicy = SameSiteMode.None;
        });

        services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
    }

    // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
    public void Configure(IApplicationBuilder app, IHostingEnvironment env)
    {
        if (env.IsDevelopment())
        {
            app.UseDeveloperExceptionPage();
        }
        else
        {
            app.UseExceptionHandler("/Home/Error");
            app.UseHsts();
        }

        app.UseHttpsRedirection();
        app.UseStaticFiles();
        app.UseCookiePolicy();

        app.UseMvc(routes =>
        {
            routes.MapRoute(
                name: "default",
                template: "{controller=Home}/{action=Index}/{id?}");
        });
    }

When I browse the site there is a single .AspNet.Consent cookie when I accept the cookiepolicy. It is marked by default secure but not httponly.
How to I enable HttpOnly on ALL cookies?
Thanks.

A: Have you tried this?
services.ConfigureApplicationCookie(options =>
{
    // Cookie settings
    options.Cookie.HttpOnly = true;
    options.ExpireTimeSpan = TimeSpan.FromMinutes(10);

});

A: The consent cookie is not HttpOnly because it is set client side via JavaScript. You can find the code in the _CookieConsentPartial.cshtml:
<script>
    (function () {
        var button = document.querySelector("#cookieConsent button[data-cookie-string]");
        button.addEventListener("click", function (event) {
            document.cookie = button.dataset.cookieString;
        }, false);
    })();
</script>

If you need an HttpOnly cookie you should implement the consent logic yourself in middleware or a controller and use a regular form with a POST-request for example.

A: When setting a cookie manually (e.g. against an HTTPContext), there is an easy CookieOptions object that you can use to set HttpOnly to true. It ends up looking a bit like this :
HttpContext.Response.Cookies.Append(
"CookieKey",
"CookieValue",
new CookieOptions
{
    HttpOnly = true
});

Microsoft have a middleware that uses cookies for Authentication. If you were to use it in your app, you add it in the Configure method of your startup.cs.
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
    app.UseMvc();
    app.UseCookieAuthentication();
}

If you are using CookieAuthentication in this way, HttpOnly cookies will be used by default. For more details,refer to here

A: It looks as though you can do this in Startup.cs using the IApplicationBuilder.UseCookePolicy:
    public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
    {
       ...

        app.UseCookiePolicy(
            new CookiePolicyOptions
            {
                Secure = Microsoft.AspNetCore.Http.CookieSecurePolicy.Always,
                HttpOnly = Microsoft.AspNetCore.CookiePolicy.HttpOnlyPolicy.Always
            });
}

https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.builder.cookiepolicyoptions.httponly?view=aspnetcore-2.1


text:
Q: Reemplazar valores NaN por una cadena He probado con fillna() y para reemplazarlos por ceros si me ha servido pero no se como reemplazarlo por un texto. Por ejemplo para cambiar los NaN por 'None'
inmuebles.garage_cond.fillna('None')

inmuebles[inmuebles['garage_cond'].isna()]

Pero siguen los NaN

A: Lo que está ocurriendo es que realmente no estás modificando dicho objeto. Tienes dos opciones (realmente seguro que hay más, son las que se me han ocurrido:

*

*inmuebles.garage_cond = inmuebles.garage_cond.fillna('None')

*inmuebles.garage_cond.fillna('None', inplace = True)
En esta segunda, el argumento inplace = True es el que hace que la función modifique el objeto.


text:
Q: django app JavaScript getElementById not working I am trying to POST some data to Django App but every variable is working fine except one..
This is my form:

        Found a coupon for {{ storeData.0.storeName }}?
        Enter the details below to share with other users

        <form>

        Coupon code :
        <input type="text" id="coupon_Code" maxlength="100"  />

        Discount :
        <textarea rows="2" cols="19" minlength="15" id="coupon_Discount"></textarea>

        <button type="button" style="margin:0;padding:0;" onclick="javascript:submitCoupon();">Submit Coupon</button>

        </form>

My JavaScript is:

Out of three variable couponCode and couponDiscount is working but not store_Name...
I have tried changing variable name,id  but nothing is working
Whenever i am trying to alert store_Name i am getting undefined ....
And also console is displaying no error...

A:

    <form>

        Found a coupon for {{  storeData.0.storeName }}?
        Enter the details below to share with other users

       Coupon code :
       <input type="text" id="coupon_Code" maxlength="100"  />

       Discount :
       <textarea rows="2" cols="19" minlength="15" id="coupon_Discount"></textarea>

          <button type="button" style="margin:0;padding:0;" onclick="javascript:submitCoupon();">Submit Coupon</button>

   </form>

Store_Name's span used in the form then its run properly


text:
Q: Does Handler.sendMessageDelayed() work when phone goes to sleep? I am developing an android application and I want to reduce the power consumption. The method I believe is to put the phone into sleep mode whenever the user activity stops for a certain threshold period. I have three questions regarding this.

*

*If I release the wakeLock and no other application is holding the wakeLock after how much time would the phone go to sleep?

*I have multiple HandlerThreads running where I use sendMessageDelayed() function. Would these messages get delivered even after the phone goes to sleep mode?

*Does putting the phone into aeroplane mode save more power rather than just putting the phone to sleep. if yes, then why is it because the only difference in those two modes is the use of cellular network.

A:
If I release the wakeLock and no other application is holding the
  wakeLock after how much time would the phone go to sleep?

There really is no definitive answer, but, from personal experience, I'd say it is likely that it will happen within 30 seconds to 1 minute.

I have multiple HandlerThreads running where I use
  sendMessageDelayed() function. Would these messages get delivered even
  after the phone goes to sleep mode?

I really wouldn't count on it because I've never seen anything that says it will wake up the device to send said Message. You can always test it, but I wouldn't trust it to work because the documentation does not claim that it will.

Does putting the phone into aeroplane mode save more power rather than
  just putting the phone to sleep. if yes, then why is it because the
  only difference in those two modes is the use of cellular network.

If you put it into sleep mode AND airplane mode, then you will save more battery than JUST sleep mode.
The reason for that is that even with the CPU pretty much asleep, the phone must keep a constant connection with the cellular network in order to know if you get a text or phone call. To do this, it must use the battery to constantly keep the antenna turned on. If you put it into airplane mode, it would basically turn the antenna off, and then the phone would not be using battery for that function.


text:
Q: jackson @JsonInclude(Include.NON_EMPTY) annotation not working for empty String I am using @JsonInclude(Include.NON_EMPTY)  at class level for a POJO with String fields. Usually the JSON response will not have String fields with null or empty values.
Documentation for @JsonInclude(Include.NON_EMPTY) states *For Java {@link java.lang.String}s, length() is called,
         *   and return value of 0 indicates empty String (note that String.isEmpty()
         *   was added in Java 1.6 and as such can not be used by Jackson*
But, in some cases the String fields with empty Strings are getting displayed. Is this a known issue?
Update : I m using Jackson 2.6.5. I dont see the above stated issue in my local environment, but only in QA. Unable to reproduce in local.
Exmaple Code :
@JsonInclude(Include.NON_EMPTY)
public class Domaion1 extends Domain {

    private static final long serialVersionUID = -7006824854691527605L;

    @JsonProperty("count")
    private String productCount;}


text:
Q: PHPMailer don't send e-mail I'm trying to send mail over PHPMailer. Since 10 days PHPMailer don't send e-mail and throw an exception:
{
    "code": "ERROR",
    "message": "SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting"
}

This is below my code: It was working
$mail = new PHPMailer(true);

        try {
            // Server settings
            $mail->isSMTP();
            $mail->Host       = 'localhost';
            $mail->SMTPAuth   = false;
            $mail->Port       = 25;
            // Recipients
            $mail->setFrom($this->mailAddress, $this->mailName);
            $mail->addAddress($email);
            // Content
            $mail->isHTML(true);
            $mail->Subject = 'Réinitialisation du mot de passe';
            $mail->CharSet = 'UTF-8';
            $mail->Encoding = 'base64';
            $mail->Body    = 'test';
        } catch (Exception $e) {
            echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}";
        }

        return $mail->send();

I tried to upgrade PHPMailer to 6.1.7. I thought that PHPMailer had a security issues according to packagist.
Can someone help me to fix this error

A: Check this post
SMTP connect() failed PHPmailer - PHP


text:
Q: How to show all employees absent dates only in MS Access 2010 query? I want to have a query which shows me records of only those employees that were absent on various dates.
I have two queries in MS Access 2010. One is qAllDatesAllEmp which has all monthly dates for all employees. Second is qDailyWorkEmp which shows date-wise the working of employees. Now, say Emp1 had only one missing date of 5-Jan-2019; emp2 had 15-Jan-2019 missing and so on, the result should show me only these missing dates with employee names. What i have tried so far is that I have joined the date field from qAllDatesAllEmp to the date field in qDailyWorkEmp with join arrow pointing from qAllDatesAllEmp to qDailyWorkEmp. I also added the date field from qDailyWorkEmp to the query grid below but removed the check mark. When I run this query, it gives blank result. I would really welcome the experts' help on how to get the desired output below.
My Sample Data:
Query1: qAllDatesAllEmp contains {WorkDate; empID; empName; CityBased}
Query2: qDailyWorkEmp   contains {DailyDate; empID; empName; CityBased}

The SQL for this is as follows:
SELECT qDailyWorkEmp.empID, qDailyWorkEmp.empName, qDailyWorkEmp.CityBased
FROM qAllDatesAllEmp LEFT JOIN
     qDailyWorkEmp
     ON qAllDatesAllEmp.WorkDate = qDailyWorkEmp.DailyDate
WHERE (((qDailyWorkEmp.DailyDate) Is Null));

My desired output:
    empID; EmpName; MissingDate

    001;    ABC;       5-Jan-2019

    007;    LMN;      15-Jan-2019

...and so on

A: From what I can gather from your question, it seems like you are on the right track with your left join query, however, since your qAllDatesAllEmp query contains the master data, you should output the data from this query for records for which the corresponding values are null in your qDailyWorkEmp query.

You also appear to have a typo in your query on this line:
qAllDatesAllEmp.WhatDate = qDailyWorkEmp.DailyDate

As you have stated in your question that the query qAllDatesAllEmp contains the fields:
Query1: qAllDatesAllEmp contains {WorkDate; empID; empName; CityBased}

WhatDate is not one of these fields.

You will also need to join the empID field in both queries, so that you are comparing the date field on a per-employee basis, as opposed to comparing each date with the dates for all employees - hence your join criteria should be:
qAllDatesAllEmp LEFT JOIN qDailyWorkEmp ON
qAllDatesAllEmp.WorkDate = qDailyWorkEmp.DailyDate AND
qAllDatesAllEmp.empID = qDailyWorkEmp.empID

With the information provided, I might suggest the following:
SELECT
    qAllDatesAllEmp.empID,
    qAllDatesAllEmp.empName,
    qAllDatesAllEmp.CityBased
    qAllDatesAllEmp.WorkDate as MissingDate
FROM
    qAllDatesAllEmp LEFT JOIN qDailyWorkEmp ON
    qAllDatesAllEmp.WorkDate = qDailyWorkEmp.DailyDate AND
    qAllDatesAllEmp.empID = qDailyWorkEmp.empID
WHERE
    qDailyWorkEmp.DailyDate IS NULL


text:
Q: Mobile media query, resolution and ppi simulator? Are there any sorts of desktop tools or browser plugins that are able to simulate various mobile and tablet devices in order to properly test responsive designs? And I'm not just talking about changing the browser window size. Other items would need to be simulated as well:

*

*device-width

*min-device-width

*max-device-width

*orientation (landscape/portrait)

*-webkit-min-device-pixel-ratio

*resolution

*ppi

A: I typically try Opera Mobile Emulator. It's fairly accurate, and will imitate high DPI displays, etc, and will handle most the media queries just fine. Just pick your display characteristics, or a device to emulate, and it will attempt to render in that manner.


text:
Q: Omitting article In the following sentence, do I need a "the" before assembly, and if yes, why?

In a specific environment, workpieces are transported to the next position at
a fixed rate, even if assembly is not yet complete.

A: The article is optional in the cited context
Note that if you don't have the article, "assembly" here can only refer to the process of assembling.
But if you do include the article, it's entirely a matter of interpretation whether "the assembly" refers to that process, OR to the assembled product itself.

A: I think there is a typographical mistake in pieces, and I have corrected it.
assembly refers to the work on the pieces, and hence we need a determiner.  The possessive pronoun their could be more appropriate than the definite article the, which is also fine.
Also, the comma before even is not needed.

In a specific environment, pieces are transported to the next position at a fixed rate even if their assembly is not yet complete.


text:
Q: Calling a method at a specific interval rate in C++ This is really annoying me as I have done it before, about a year ago and I cannot for the life of me remember what library it was.
Basically, the problem is that I want to be able to call a method a certain number of times or for a certain period of time at a specified interval.
One example would be I would like to call a method "x" starting from now, 10 times, once every 0.5 seconds. Alternatively, call method "x" starting from now, 10 times, until 5 seconds have passed.
Now I thought I used a boost library for this functionality but I can't seem to find it now and feeling a bit annoyed. Unfortunately I can't look at the code again as I'm not in possession of it any more.
Alternatively, I could have dreamt this all up and it could have been proprietary code. Assuming there is nothing out there that does what I would like, what is currently the best way of producing this behaviour? It would need to be high-resolution, up to a millisecond.
It doesn't matter if it blocks the thread that it is executed from or not.
Thanks!

A: Maybe you are talking about boost::asio. It is a mainly used for networking, but it can be used for scheduling timers.
It can be used in conjunction with boost::threads.

A: A combination of boost::this_thread::sleep and time duration found in boost::datetime?

A: It's probably bad practice to answer your own question but I wanted to add something more to what Nikko suggested as I have no implemented the functionality with the two suggested libraries. Someone might find this useful at some point.
void SleepingExampleTest::sleepInterval(int frequency, int cycles, boost::function<void()> method) {
    boost::posix_time::time_duration interval(boost::posix_time::microseconds(1000000 / frequency));
    boost::posix_time::ptime timer = boost::posix_time::microsec_clock::local_time() + interval;

    boost::this_thread::sleep(timer - boost::posix_time::microsec_clock::local_time());

    while(cycles--) {
        method();

        timer = timer + interval;
        boost::this_thread::sleep(timer - boost::posix_time::microsec_clock::local_time());
    }
}

Hopefully people can understand this simple example that I have knocked up. Using a bound function just to allow flexibility.
Appears to work with about 50 microsecond accuracy on my machine. Before taking into account the skew of the time it takes to execute the method being called the accuracy was a couple of hundred microseconds, so definitely worth it.


text:
Q: Which preposition one should use before which or whom if the verb/adjective that usually carries the preposition is unknown?
Reference:
•> I washed dishes from morning to night for which unexciting work I
was paid £3 an hour.
More:

What is your suggestion as for how to think of which preposition is more appropriate to use before "which/whom"? There are two sentences I want to merge with, united becomes one sentence. The second one becomes an identifying/a non-identifying clause which describes the main clause.
What I do, usually, I write the sentences down first or just think about them in my head, and I determine the preposition that comes after the verb/adjective in the second sentence.
So, for example, the sentence before the number 1 (see above), there is a verb "paid" and I can think of the preposition "for", because -> (pay + for + something), then I can assure myself that the correct preposition is for and put it before which. 2  steps basically.
Is there the easiest way to do this, especially for the sentences that has similar construction to number 3 and 5? In that case, I can't determine the correct prepositions because, in my view, it's unkown, meaning I don't know where I should match the preposition with. Someone told me that this is something I should learn by heart, but I believe there must be a way to learn the pattern. Hope you can help me. Thanks. Since, I have the answer key, it's not necessary to directly give me the answers. I only need to know how I should think to choose the correct prepositions.

A: I think doing it in two steps is a good idea.
It might help if you construct an intermediate sentence using "that".
...morning to night. For that work...
...midnight. By that time...
...closed. In that case...
...to Calais. After that...
...extremely fast. At that point...
...Ambassador to Uraguay. In that post...
Then replace "that" with "which", and see if it works.


text:
Q: Modifiying all data in a column using Python I have the following column in a CSV file (please note some rows may consist of random amount of activities):
Activities
[{'id':18, 'name': 'Football'}, {'id': 35, 'name': 'Rugby'}, {'id': 10736, 'name': 'Hockey'}]
[{'id':16, 'name': 'Chess'}, {'id': 98, 'name': 'Fencing'}]
[{'id':35, 'name': 'Rugby'}, {'id': 47, 'name': 'Marathon'}, {'id': 99, 'name': 'Baseball'}]

I have imported the CSV into a Pandas DataFrame:
 df = pd.read_csv('activites.csv')

I want to modify the column so it will be like this:
Activities
Football|Rugby|Hockey
Chess|Fencing
Rugby|Marathon|Baseball

I appreciate any suggestions.

A: Convert values to dictionaries and then extract Name with join by | for output string:
import ast

f = lambda x: '|'.join(y['name'] for y in ast.literal_eval(x))
df['Activities'] = df['Activities'].apply(f)
print (df)
                Activities
0    Football|Rugby|Hockey
1            Chess|Fencing
2  Rugby|Marathon|Baseball


text:
Q: Comic where someone's shadow is cut away This recent question stirred a vague memory.
I'm sure it is a different work to the one in the linked thread.  It was a comic, not prose.
Basically, I have an image of someone cutting away someone's shadow with a big pair of scissors, then rolling up the shadow and putting it in his pocket.
I think it must have been somewhere between 1990-2000 that I read it.
I'm pretty sure it was a short story. Single issue, or just a few pages. Or a minor subplot if it was in a longer story.
It may have been in 2000AD, or Neil Gaiman's Sandman. But I can't swear to it.

A: The Sandman, Brief Lives, chapter 3 (issue 44) has something similar. In it, the alder man (a sort of laponic shaman) realizes that he is about to die if he remains human. So he transforms into a bear then claws and eats part of his own shadow, to sever it from himself.

Then his shadow walk in his shape, in an attempt to fool death.

In one of the later issues, Fates use scissors to cut a thread of life.

A: This was an element in a storyline in Grant Morrison's Doom Patrol.


text:
Q: ¿Cómo obtener una variable de HTML a partir de un script a PHP? De este código HTML ¿cómo extraigo la variable winningSegment.text para convertirla en $variable de php?
Enjemplo: $variable = winningSegment.text;
Misma pregunta mismo objetivo hecha de diferente manera
Osea ¿como saco esa winningSegment.text variable de la etiqueta para poder usarla en una variable de php?
Enjemplo: $variable = winningSegment.text;
He logrado hacer que envie pero SIN ERROR al cambiar la linea ("premi" : winningSegment.text por 'premi' : "MiPremio") ¿como le hago para que me funcione con "premi" : winningSegment.text? en vez de 'premi' : "MiPremio"
IMPOTANTE Todo esta en un solo archivo mi archivo.JS
        var objRuleta;
         var winningSegment;
         var distnaciaX = 150;
         var distnaciaY = 60;
         var ctx ;
         function Mensaje() {
             winningSegment = objRuleta.getIndicatedSegment();
             SonidoFinal();
             swal({
                 title: "Has ganado: " + winningSegment.text,
                 // imageUrl: "img/Muerte.png",
                 // showCancelButton: true,
                 confirmButtonColor: "#e74c3c",
                 confirmButtonText: "Ok,Reiniciar"
                 // cancelButtonText: "Quitar elemento",
                 // closeOnConfirm: true,
                 // closeOnCancel: true
             },
      function (isConfirm) {
          if (isConfirm) {

          } else {

              $('#ListaElementos').val($('#ListaElementos').val().replace(winningSegment.text,""));
              leerElementos();

          }
          objRuleta.stopAnimation(false);
          objRuleta.rotationAngle = 0;
          objRuleta.draw();
          DibujarTriangulo();
          bigButton.disabled = false;
      });

      }

         function DibujarTriangulo() {
             distnaciaX = 150;
             distnaciaY = 2;
             ctx = objRuleta.ctx;
             ctx.strokeStyle = 'navy';
             ctx.fillStyle = '#HGFGGH';
             ctx.lineWidth = 2;
             ctx.beginPath();
             ctx.moveTo(distnaciaX + 170, distnaciaY + 5);
             ctx.lineTo(distnaciaX + 230, distnaciaY + 5);
             ctx.lineTo(distnaciaX + 200, distnaciaY + 40);
             ctx.lineTo(distnaciaX + 171, distnaciaY + 5);
             ctx.stroke();
             ctx.fill();
         }

         function DibujarRuleta(ArregloElementos) {

               objRuleta = new Winwheel({
                 'canvasId': 'Ruleta',
                 'numSegments': ArregloElementos.length,
                 'outerRadius': 340,
                 'innerRadius': 1,
                 'segments':ArregloElementos,
                 'animation':
                 {
                     'type': 'spinToStop',
                     'duration':2,
                     'spins': 15,
                     'callbackFinished': 'Mensaje()',
                     'callbackAfter': 'DibujarTriangulo()'

                 },

             });

               DibujarTriangulo();
      }
        function leerElementos() {
                  txtListaElementos=$('#ListaElementos').val().trim();
                  var Elementos = txtListaElementos.split('\n');
                  var ElementosRuleta= [];
              Elementos.forEach(function (Elemento) {
                      if(Elemento){
                      ElementosRuleta.push({ 'fillStyle': "#" + ((1 << 24) * Math.random() | 0).toString(16), 'text': Elemento });
                  }
                  });
                  DibujarRuleta(ElementosRuleta);
         }
         leerElementos();
          var audio = new Audio('alarma.mp3');  // Create audio object and load desired file.
        function SonidoFinal()
            {
                audio.pause();
                audio.currentTime = 0;
                audio.play();
            }
//bloque inicia ajax
function insertar_premio(){
    var envias = document.getElementById('bigButton').value;
    // var entera = winningSegment.text;
    var parametrs = {
        'premi' : "MiPremio"
    };
    $.ajax({
        data: parametrs,
        url: './insert.php',
        type: 'POST',
        success: function(response){
            $('#datos').html(response);
        }
    });
}

Aqui quiero ponerlo asi
function insertar_premio(){
    var envias = document.getElementById('bigButton').value;
    // var entera = winningSegment.text;
    var parametrs = {
        'premi' : winningSegment.text
    };
    $.ajax({
        data: parametrs,
        url: './insert.php',
        type: 'POST',
        success: function(response){
            $('#datos').html(response);
        }
    });
}

El problema es que al ponerlo lo que es la ruleta se desactiva la opcion de girar por lo tanto el script mismo deja de funcionar y se inabilita.

A: No lo puedes hacerlo directamente en un solo archivo, pero puedes usar AJAX, te mostrare como:
En tu html, al comienzo del script, defines la siguiente función:
// Creamos la función ajax, la cual recibirá como parámetros el objeto a enviar (data), la url del archivo PHP (url) y la función que recibirá los datos (callback)
function ajax(data, url, callback) {
    // creamos un XMLHttpRequest
    const xhr = new XMLHttpRequest();
    // creamos la función onreadystatechange de la xhr, la cual se ejecutará cuando avancé la petición
    xhr.onreadystatechange = function () {
        if (xhr.readyState == 4 && xhr.status) {
            // ejecutamos la función, pasándole como parámetro el texto de respuesta
            callback(xhr.responseText)
        }
    }
    // Creamos un json con el objeto que queremos enviar
    const json = JSON.stringify(data)
    // Establecemos el método con el que queremos hacer la petición, la url y, como es asíncrona, el tercer parámetro será true
    xhr.open("POST", url, true)
    // Ponemos las cabeceras de la petición como si fuera un formulario, necesario si se utiliza POST
    xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
    // Enviamos la petición con el json del objeto
    xhr.send(`json=${json}`)
}

creas un nuevo archivo miArchivo.php Este debe ser un otro archivo:
<?php
// defines una variable variable con la información del json
$data = json_decode($_POST["json")
// aquí puedes usar la info del json
?>

y cuando quieras enviar el objeto usas esto:
ajax(winningSegment, "miArchivo.php", (data) => {
    // aquí se usa cualquier dato que imprimas en miArchivo.php
})


text:
Q: Evaluating $\sum_{k=0}^n\frac{1}{k+1}\binom{2k}{k}\binom{n}{k}$ While I was solving a problem I got stuck here
$$a_n=\sum_{k=0}^{n}\frac{1}{(k+1)}\cdot\binom{2k}{k}\cdot\binom{n}{k}.$$
I tried to solve this but my progess is nil.
I will be glad if someone could provide me a handy solution.
Thanks

A: Too long for a comment.
If you look at the $OEIS$ link given by  Robert Z in his comment, you should notice a very simple and interesting asymptotics provided by Vaclav Kotesovec a few years ago;
$$a_n=a_n=\sum_{k=0}^{n}\frac{\binom{2k}{k}\binom{n}{k}}{(k+1)} \sim \frac{5^{n+\frac{3}{2}}}{8 \sqrt{\pi } n^{3/2}}$$ What is  nice is that, as soon as $n\geq 94$, the relative error is smaller than $1$% and, for  $n\geq 937$, this error becomes smaller than $0.1$%.
In the same sprite as in this post, it is possible to empirically improve the results using $$a_n \sim \frac{5^{n+\frac{3}{2}}}{8 \sqrt{\pi } n^{3/2}}e^{-\frac 1n}$$ which leads to a relative error smaller than $1$% as soon as $n\geq 12$ and smaller than $0.1$% as soon as $n\geq 72$.
For sure, adding more terms in the correction term improves the results.


text:
Q: Preventing oscilloscope magic smoke by inverter vs isolation transformer? Good idea or not? There was another question that said that an isolation transformer had to be used to prevent possible damage to an oscilloscope, and I suggested this as a solution, but never got an answer.  This makes sense to me, that the problem occurs because of an unintentional short-circuit through the house wiring. Therefore, if you use a car-battery and an inverter, that should be good enough, right?  Or is there something else I am not thinking of, or don't understand?

A: I agree with DKNguyen's answer.
You have the option of using an oscilloscope designed for working on live circuits.

Figure 1. A Fluke scopemeter is designed to be used safely with its ground on live voltages.
Note that Fluke use a power supply with a high voltage rating between its power supply primary and secondary, a DC jack whose barrel can't be touched when it's in contact with the internal jack socket and an optical link for the RS-232 output.

A: The problem is you touch your oscilloscope a lot when you're working with it. Things like buttons and knobs with metal and circuitry right behind them and are not designed to isolate high voltages; BNC jacks on the scope without probes plugged into them ; Exposed BNC connectors on the probes plugged into the scope; Ground clips on probes, including those probes not currently connected to the circuit. They all float up to the high-voltage circuit if just one probe on your scope is connected.
It's a lot easier and intuitive to be more careful around your high voltage circuit than your oscilloscope controls, so you isolate and float your work and connect that to the oscilloscope, so your oscilloscope can stay safely grounded.
So what's the point of isolating and floating your oscilloscope? Just isolate and float your device under test. Why so willing to power your oscilloscope through a transformer but so unwilling to just do that for your circuit under test instead?