Is there a Timetable Calendar with Holidays which i can download or generate? - download

I am searching for a complete Timetable Dimension.
What should be included?
Days
Month
Week
Holidays(for several countries)
I searched a long time, and I think the difficult thing are the holidays.
What is my goal?
I want to use it for Stock Price Prediction.
If anybdody knows where to download a Timetable/Calendar or someone can show me a Code (Code language not relevant, because i use KNIME as universal tool) it would save me a lot of work.
Thank you!

As a base, you may want to use a KNIME node to generate a calendar table: https://hub.knime.com/knime/extensions/org.knime.features.base/latest/org.knime.time.node.create.createdatetime.CreateDateTimeNodeFactory
For the CW number, there is also KNIME workflow available related to this node.
Finally, Python might be your best friend for the holidays: https://github.com/dr-prodigy/python-holidays

Related

Database schema for rewarding users for their activities

I would like to provide users with points when they do a certain thing. For example:
adding article
adding question
answering question
liking article
etc.
Some of them can have conditions like there are only points for first 3 articles a day, but I think I will handle this directly in my code base.
The problem is what would be a good database design to handle this? I think of 3 tables.
user_activities - in this table I will store event types (I use
laravel so it would probably be the event class name) and points for
specific event.
activity_user - pivot table between user_activities and users.
and of course users table
It is very simple so I am worrying that there are some conditions I haven't thought of, and it would come and bite me in the future.
I think you'll need a forth table that is simply "activities" that is simply a list of the kinds of activities to track. This will have an ID column, and then in your user_activities table include an 'activity_id' to link to that. You'll no doubt have unique information for each kind, for example an activities table may have columns like
ID : unique ID per laravel
ACTIVITY_CODE : short code to use as part of application/business logic
ACTIVITY_NAME : longer name that is for display name like "answered a question"
EVENT : what does the user have to do to trigger the activity award
POINT_VALUE: how many points for this event
etc
If you think that points may change in the future (eg. to encourage certain user activities) then you'll want to track the actual point awarded at the time in the user activities table, or some way to track what the points were at any one time.
While I'm suggesting fourth table, what you really need is more carefully worded list of features to be implemented before doing any design work. My example of allowing for points awarded to change over time is such a feature that you don't mention but you'll need to design for if this feature is needed.
Well I have found this https://laracasts.com/lessons/build-an-activity-feed-in-laravel as very good solution. Hope it helps someone :)

should Composition.author have Patient as possible value

Composition.author has two possible values Resource(Practitioner|Device). What if this composition is created by patient, should composition allow Patient as possible author? I am thinking about case where patient will like to report his blood pressure on a daily basis to FHIR server..
Thanks. Actually, this is something I am supposed to have done already. I'll make the change shortly

design of car booking application using elasticsearch

I need some help in designing car booking application.
There is a document with information about car (title, model, brand, info, etc.)
Problems I'm stuck with are:
How to store available booking days? (I suppose I could use nested
free date range objects in array)
How to store price per day (it's possible to have individual price
per day)?
Booking days and prices could change often. So the third question is: "how to update them cleverly (partially), so I shouldn't read the document, and then store it". I'm looking at script solution using
update api (http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/docs-update.html), but it looks ugly. Maybe there are other approaches?
Thanks,
Alex
with the introduction of the range datatypes, there is no need to use a real nested object, if you meant that.
That might also help you with storing the prices, but that could just be any object I suppose (it depends if you want to search for that as well).
Update API was made for exactly that use-case, that you do not need to get the whole document, so that shounds like a plan.

Change Magento product price using a cron job

The price of my product changes over time, so I want to set up a cron job to do so.
Can I just create a quick php script that updates the database?
If so: where are these prices?
If not: what's the best way to do this?
There are good tutorials about this around. This one might be useful as start: http://www.magentocommerce.com/wiki/1_-_installation_and_configuration/how_to_setup_a_cron_job.
Your easiest option is probably to set up a import dataflow and call that on a cron job.
Spend a few days on one of these two monster threads to get the general idea:
http://www.magentocommerce.com/boards/viewthread/8542
http://www.magentocommerce.com/boards/viewthread/35865
If you want to update product prices in Magento in easier & faster way by using csv file with just two fields: sku & new price then you can follow this great article:
http://www.blog.magepsycho.com/updating-product-prices-in-magento-in-easier-faster-way/
This saves you a lot of your time and hence $$$
Happy E-Commerce!!

Best way to implement users location that allows me to see what users live roughly in the same area

A key part of my current project is users having the ability to see what other users live near to them. What is the best way to implement this?
I would just ask for country, state and city but because this will be international I can't have a fixed drop down list of states/administrative regions for each country, so if users spell the name of their state differently this will hinder my ability to detect that users live in the same state.
Say for example we have an the Swiss canton "St. Gallen". Some user will spell that as "Saint Gallen", others as "St Gallen" and so on. Which is obviously problematic.
Could I just ask for the zip code and use that? I've found some zipcode tools online but I'm suspecting they don't work very well. Has anyone used them?
Thanks for your asnwers.
Shouldn't you base your query on geographical data rather than administration one? I mean instead of comparing cities/zip codes just find people within, let's say, 5 km from current user location. And if you let every user to choose his/her location on the map, this will be as simple as choosing it from a series of drop-down lists or entering a ZIP code. Also there is an emerging geolocation HTML feature.
Querying such an information is different story thou. You'll probably gonna have to use GIS capabilities of your database: MySQL, PostgreSQL, Oracle and others.

Resources