Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

7 Day Weather Forcast

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 7 Day Weather Forcast

    Just threw this function together, it only returns pointers. I would like to attach a GUI to it, but I'm not the greatest at those. Any suggestions/code for a GUI would be useful.

    James

    The return format is:
    Code:
    c=weather_7day("21921")
    ?c
    = AllocationFactor = "0.006463"
    +Day.
    FipsCode = "24"
    Latitude = "39.6264343"
    Longitude = "75.84584"
    PlaceName = "ELKTON"
    StateCode = "MD"
    ?c.Day
    = +A.
    +B.
    +C.
    +D.
    +E.
    +F.
    +G.
    
    ?c.Day.A
    = MaxtemperatureC = "4"
    MaxTemperatureF = "40"
    MintemperatureC = "3"
    MinTemperatureF = "37"
    Name = "Wednesday, January 30, 2008"
    
    ...
    
    ?c.Day.G
    = MaxtemperatureC = "11"
    MaxTemperatureF = "51"
    MintemperatureC = "1"
    MinTemperatureF = "34"
    Name = "Tuesday, February 05, 2008"
    WeatherImage = "http://forecast.weather.gov/images/wtf/shra40.jpg"
    The code for the function is:
    Code:
    'Date Created: 29-Jan-2008 05:48:54 PM
    'Last Updated: 30-Jan-2008 12:05:38 AM
    'Created By  : Mr. GreenJeans
    'Updated By  : Mr. GreenJeans
    FUNCTION weather_7day AS A (zip_code AS C)
        if zip_code =null_value() then
            end 
        end if
        dim p as P
        dim i as N
        dim f as C
        dim Forcast as P
        Dim Forcast.Day as P
        Dim Day as P
        Dim Day.A as P
        Dim Day.B as P
        Dim Day.C as P
        Dim Day.D as P
        Dim Day.E as P
        Dim Day.F as P
        Dim Day.G as P
        url = "www.webservicex.net/WeatherForecast.asmx/GetWeatherByZipCode"
        body = "ZipCode="+zip_code
        p = http_post(url,body)
        f = p.body
        Forcast.Latitude = extract_string(f,"<Latitude>","</Latitude>",1)
          Forcast.Longitude= extract_string(f,"<Longitude>","</Longitude>",1)
          Forcast.AllocationFactor = extract_string(f,"<AllocationFactor>","</AllocationFactor>",1)
          Forcast.FipsCode = extract_string(f,"<FipsCode>","</FipsCode>",1)
          Forcast.PlaceName = extract_string(f,"<PlaceName>","</PlaceName>",1)
          Forcast.StateCode = extract_string(f,"<StateCode>","</StateCode>",1)
        
        
        Day.A.Name = extract_string(f,"<Day>","</Day>",1)
        'Day.A.WeatherImage     = extract_string(f,"<WeatherImage>","</WeatherImage>",2)
        Day.A.MaxTemperatureF = extract_string(f,"<MaxTemperatureF>","</MaxTemperatureF>",1)
        Day.A.MinTemperatureF = extract_string(f,"<MinTemperatureF>","</MinTemperatureF>",1)
        Day.A.MaxtemperatureC = extract_string(f,"<MaxTemperatureC>","</MaxTemperatureC>",1)
        Day.A.MintemperatureC = extract_string(f,"<MinTemperatureC>","</MinTemperatureC>",1)
        Day.B.Name = extract_string(f,"<Day>","</Day>",2)
        Day.B.WeatherImage     = extract_string(f,"<WeatherImage>","</WeatherImage>",2)
        Day.B.MaxTemperatureF = extract_string(f,"<MaxTemperatureF>","</MaxTemperatureF>",2)
        Day.B.MinTemperatureF = extract_string(f,"<MinTemperatureF>","</MinTemperatureF>",2)
        Day.B.MaxtemperatureC = extract_string(f,"<MaxTemperatureC>","</MaxTemperatureC>",2)
        Day.B.MintemperatureC = extract_string(f,"<MinTemperatureC>","</MinTemperatureC>",2)
        Day.C.Name = extract_string(f,"<Day>","</Day>",3)
        Day.C.WeatherImage     = extract_string(f,"<WeatherImage>","</WeatherImage>",3)
        Day.C.MaxTemperatureF = extract_string(f,"<MaxTemperatureF>","</MaxTemperatureF>",3)
        Day.C.MinTemperatureF = extract_string(f,"<MinTemperatureF>","</MinTemperatureF>",3)
        Day.C.MaxtemperatureC = extract_string(f,"<MaxTemperatureC>","</MaxTemperatureC>",3)
        Day.C.MintemperatureC = extract_string(f,"<MinTemperatureC>","</MinTemperatureC>",3)
        Day.D.Name = extract_string(f,"<Day>","</Day>",4)
        Day.D.WeatherImage     = extract_string(f,"<WeatherImage>","</WeatherImage>",4)
        Day.D.MaxTemperatureF = extract_string(f,"<MaxTemperatureF>","</MaxTemperatureF>",4)
        Day.D.MinTemperatureF = extract_string(f,"<MinTemperatureF>","</MinTemperatureF>",4)
        Day.D.MaxtemperatureC = extract_string(f,"<MaxTemperatureC>","</MaxTemperatureC>",4)
        Day.D.MintemperatureC = extract_string(f,"<MinTemperatureC>","</MinTemperatureC>",4)
        Day.E.Name = extract_string(f,"<Day>","</Day>",5)
        Day.E.WeatherImage     = extract_string(f,"<WeatherImage>","</WeatherImage>",5)
        Day.E.MaxTemperatureF = extract_string(f,"<MaxTemperatureF>","</MaxTemperatureF>",5)
        Day.E.MinTemperatureF = extract_string(f,"<MinTemperatureF>","</MinTemperatureF>",5)
        Day.E.MaxtemperatureC = extract_string(f,"<MaxTemperatureC>","</MaxTemperatureC>",5)
        Day.E.MintemperatureC = extract_string(f,"<MinTemperatureC>","</MinTemperatureC>",5)
        Day.F.Name = extract_string(f,"<Day>","</Day>",6)
        Day.F.WeatherImage     = extract_string(f,"<WeatherImage>","</WeatherImage>",6)
        Day.F.MaxTemperatureF = extract_string(f,"<MaxTemperatureF>","</MaxTemperatureF>",6)
        Day.F.MinTemperatureF = extract_string(f,"<MinTemperatureF>","</MinTemperatureF>",6)
        Day.F.MaxtemperatureC = extract_string(f,"<MaxTemperatureC>","</MaxTemperatureC>",6)
        Day.F.MintemperatureC = extract_string(f,"<MinTemperatureC>","</MinTemperatureC>",6)
        Day.G.Name = extract_string(f,"<Day>","</Day>",7)
        Day.G.WeatherImage     = extract_string(f,"<WeatherImage>","</WeatherImage>",7)
        Day.G.MaxTemperatureF = extract_string(f,"<MaxTemperatureF>","</MaxTemperatureF>",7)
        Day.G.MinTemperatureF = extract_string(f,"<MinTemperatureF>","</MinTemperatureF>",7)
        Day.G.MaxtemperatureC = extract_string(f,"<MaxTemperatureC>","</MaxTemperatureC>",7)
        Day.G.MintemperatureC = extract_string(f,"<MinTemperatureC>","</MinTemperatureC>",7)
        
        forcast.day = day
        
    
        weather_7day = Forcast
    END FUNCTION

  • #2
    Re: 7 Day Weather Forcast

    If the question is where do you want to put the data? Then there are several possibilities: Memo field, variable, static text object (to view on a form), report (-->PDF), possibly more. So it may come down to - what do you want to see and where do you want to see it?
    Peter
    AlphaBase Solutions, LLC

    Peter@AlphaBaseSolutions.com
    https://www.alphabasesolutions.com


    Comment


    • #3
      Re: 7 Day Weather Forcast

      Yes i agree, There are several possibilities. This is why I decided to leave the output as a Pointer. This way it could be used for any application. Inserting it as a text or Xdialouge would be possible....but at the same time on a daily report would be just as easy.

      James

      Comment


      • #4
        Re: 7 Day Weather Forcast

        HI Mr GreenJeans ,

        I found today this function.Yes it's 10 years old. But I like to try it.
        And , it does't work. Probably because of some changes on "WeatherForecast" site.
        Do you know how to meke it work today.
        Dragan Milosavljevic
        ITPartner

        dragan.milosavljevic@itpartner.rs
        http://www.itpartner.rs

        Comment


        • #5
          Re: 7 Day Weather Forcast

          The url

          "www.webservicex.net/WeatherForecast.asmx/GetWeatherByZipCode"

          returns 404 not found so it is unlikely to be "fixable".
          There can be only one.

          Comment


          • #6
            Re: 7 Day Weather Forcast

            I haven't tried this yet, but check out this site. Looks like it might be easy code to add.

            https://www.findlocalweather.com/fre...r_website.html
            Mike Reed
            Phoenix, AZ

            Comment

            Working...
            X