小编noo*_*ama的帖子

带有 Lahiri Ayanamsha 的瑞士星历恒星模式给出了错误的值

我正在尝试生成行星的经度。我使用瑞士星历 dll 来完成我所有的艰苦工作。然而,不幸的是,瑞士星历为恒星模式 Lahiri Ayanamsha 生成的值与我从其他吠陀软件或包括JuniorJyothsh在内的在线门户网站获得的值相去甚远(大约 25 分钟,尤其是月亮)

我已经下载了 .se1 文件(针对行星和月球),并且正在使用非常准确的瑞士星历模式。此外,我还设置了恒星模式、Lahiri Ayanmsha Flag、Topocentric Flag。我还设置了拓扑纬度和经度位置。

最让我困扰的是,包括 Jumior Jyothish 在内的所有其他在线吠陀本命图生成器的值似乎彼此匹配。我不确定我做错了什么。这是我的代码Swiss ephemeris 在 git 上的 .NET 中使用的链接,其中包含示例代码片段

[Test]
    public void ShouldGetAllPlanetValues()
    {
        var errorMessage = new StringBuilder(1000);
        var longitudeAndLatitude = new Double[6];
        var cusps = new Double[13];
        var ascentantAndMore = new Double[10];
        var julianDayNumbersInEtAndUt = new double[2];
        TimeZoneInfo indiaTimeZone = TimeZoneInfo.FindSystemTimeZoneById(IndiaStandardTimeZoneId);
        var ephemerisTablesPath = new StringBuilder(@"../../../EphemerisFiles/");

        swe_set_ephe_path(ephemerisTablesPath);
        var birthTimeInIndianZone = new DateTime(1989, 8, 21, 10, 29, 0);
        DateTime birthTimeInUtc …
Run Code Online (Sandbox Code Playgroud)

c# pyephem

3
推荐指数
1
解决办法
4821
查看次数

是这个例子中真正需要的装饰模式吗?

这是问题陈述

一家餐厅有4个比萨基地:

全麦披萨
木火比萨
奶酪填充披萨
薄皮披萨

有8个浇头:

番茄,洋葱,奶酪,Pepporoni,辣椒,大蒜,芝士,土豆,

计算比萨饼的价格给予比萨饼基础和0或更多的配料(假设每个基础和打顶有一些价格配置).

我的伪代码解决方案是:

    public class Pizza {
        public int getPrice(base, String... toppings){
            PizzaBaseMap.get(base) + toppingsMap.sum(t -> toppingsMap.get(t))
        }



    Hashmap<String, int> PizzaBaseMap= {
        whole_wheat : 1
        wood_fire : 2
        cheese_filled : 2
        thin_crust : 4
    }

    Hashmap<String, int> toppingsMap = {
        tomato : 1
        onion : 2
        cheese : 4
        pepporoni : 5
        capsicum : 2
        garlic : 2
        paneer : 4
        potato : 4
    }

    //client Code 

    int Price = new Pizza().getPrice("whole_wheat", ["tomato", …
Run Code Online (Sandbox Code Playgroud)

design-patterns

2
推荐指数
1
解决办法
106
查看次数

标签 统计

c# ×1

design-patterns ×1

pyephem ×1