wi-wissen / instahub Goto Github PK
View Code? Open in Web Editor NEWsocial network for educational purposes only
social network for educational purposes only
It would be great to have a dockerized version to install the tool on a server.
Maybe the following snippet can be used for first steps in this direction - if desired.
FROM debian:buster
RUN apt-get update && apt-get upgrade -y
RUN apt-get install -y composer php php-xml
WORKDIR /
RUN git clone git://github.com/wi-wissen/instahub.git
RUN apt-get install -y php-xml
WORKDIR /instahub
RUN composer install
Hi,
my students suggested a third gender "diverse" along with male and female in the registration form. I think they would be really happy and astonished to see this happening as I introduced them to github this week :) I know time is precious though.
The ad queries currently need to have a Case
statement in order to be evaluated correctly [Src](https://github.com/wi-wissen/InstaHub/blob/master/app/Models/Ad.php#L52.
However, this seems redundant as we do want to return boolean values.
So instead of SELECT CASE WHEN gender = 'female' THEN true ELSE false END FROM ...
, we should simply write SELECT gender = 'female' FROM ...
.
A tag feed like https://myHub.instahub.org/tag/berge
is always sorted by "Neueste Photos".
Trying to sort by selecting "Beste Photos" invariably leads to a 404-page as it is linked to https://myHub.instahub.org/tag/tag/berge?sort=best
. The same happens when selecting "Neueste Photos" with ?sort=latest
in the URL.
Removing the doubled /tag
in the URL seems to fix the problem at first glance. However, this leads back to square one because the sorting is always by "Neueste Photos".
PS: many thanks for this great platform for experimenting and learning!
When creating a hub, a pre-generated name is put into a read-only input field. This input field can, however, be manipulated on the client and the server then allows for a hub to created with a custom name.
E-Mail Address instead of E-Mail Addresse in German translation on password reset.
I will try to submit an pull request for this later.
One question is this an project by a German speaking person? I have found an issue after logging in.
Greetings from Bavaria in Germany.
When creating or editing an ad campaign, the input for the SQL-Query is often too small to display the complete query.
I am thinking about replacing the <input type=text...
by a <textarea ...
What are your thoughts?
This happens on the profile page (https://xxx.instahub.org/yyy). It could be fixed by setting a fixed aspect-ratio.
Hallo,
beim Nutzen der Suchen gibt es ein Problem mit der Datumssuche. Wird z.B. beim Geburtsdatum ein Wert eingetragen werden im SQL-Statement keine Anführungszeichen eingefügt.
Wird am Anfang manuell ein Anführungszeichen eingefügt werden in der SQL Anfrage zwei öffnende und ein schließendes Anführungsziechen eingefügt.
I installed evrything like described in https://github.com/wi-wissen/instahub
But when running php artisan migrate I get:
Illuminate\Database\QueryException : could not find driver (SQL: select * from information_schema.tables where table_schema = instahub and table_name = migrations
What can I do?
I used InstaHub to repeat SQL queries in my class. I realized that the current DB schema is missing columns on which students can perform aggregate functions like SUM
and AVG
as well as simple mathematical calculations. I extended the ads
entity for that reason and added four columns:
customer
: the person that created the advertisement and paid for it.price_per_click
: the amount of money that is substracted from the budget when a user clicks on the adbudget
: the money / budget that is remaining for this adclicks
: how often users clicked on this adThis allows users to group by either the customer or the ad type to get some statistical data about the ads, e.g. the average price or the cumulative number of clicks on ads or the budget by type or customer. Additionally, the students can perform simple mathematical queries which e.g. return the original budget of an ad....
SELECT customer, SUM(clicks) as 'number of clicks' FROM ads GROUP BY customer;
SELECT type, AVG(price_per_click) as 'average price per click' FROM ads GROUP BY type;
SELECT name, (budget + price_per_click * clicks) as 'money paid' FROM ads;
I added those columns and filled them manually. If you are interested in the extended ad scheme, I can work on integrating those columns (migrations, editors, etc.).
Additionally, the algorithm that decides which ads are shown can be modified to inclide the condition ad.budget - ad.price_per_click >= 0
I wanted to ask, where you got the images and theire rights?
login into any student's hub
goto sql
select users.id, username, photos.id, description from users, photos
id username description
1 admin #eibrot #ei #brot
...
There is only one column id which is the id from photos.
should be:
users.id username photos.id description
The correct function is essentially for teaching joins through an approach that derives joins from the Cartesian product of the tables.
workaround:
alias the ids:
select users.id u_id, username, photos.id, p_id, description from users, photos
u_id username p_id description
204 admin 1 #eibrot #ei #brot
...
(Don't use alias user_id since it is foreign key in table photos)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.