Printing several student's data in several pages in laravel - laravel

I am working on a Laravel application where I have $students variable with lots of students with their details. A Student's data may need 1 or more pages. I have to print them by one click in several pages with separate pages. How to do this?
There are lots of students, and taking too long to load when trying to print from browser using ctrl+p. Most importantly the next students data in not starting from a new page.

Related

(facebook like app) show post algorithm design

I making a mobile app similar to facebook as a college project. Problem I am facing is say if I have 25 users and 24 users posted something on the site of which user1 made the first post. Now say the 25th user logs in after two days. Initially I was showing the feeds in FIFO order. But if I keep using FIFO, 25th user wont be able to see the last post unless he has undergone all the previous posts first. Same situation in LIFO. If we scale up the app, the problem statement would be huge as there would be some feeds which will never be seen. So how do I tackle this?
I thought of distributing users into groups and show the feeds within the groups first, and then to the neighbouring group and so on.
PS: I am using meteorjs for building the app.
So I have distributed the users into groups. I have attached a tag with every feed saying user from which group posted it.
Now I sort the feeds according to date-time at which they were created. Then I group them according to their user groups. Then I sort the feeds according to the no.of views (sorting within the group only).
Now I keep the sorted data as a list. To show the feeds to the user, I am trying to use trees. Say a user belonging to group 4 logs in. So I would use the group 4 data as node and create a binary tree. Then I would show all the feeds in the head first, then do a bfs traversal to show the feeds on the leaves.
Is there any other better method to make sure that every feed is seen atleast once by any user
So what I could think of is that you can divide the users into groups firstly. Then show the feeds from the same group. But show only new feeds here. Then show the feeds from neighbouring groups and move on. Then show the old feeds in the same manner.

Load testing a complex workflow

I want to load test a website. The website is used mainly to submit picture albums and has two main worflows:
One workflow for user registration:
Create a new account
Enter username, password, email address
Agree to the terms
Upload an avatar picture
Another workflow to submit albums:
Login
Create a new album with name, location, etc.
Upload a picture
Tag picture
Repeat from 3 (0 to n times)
Submit
These workflows take quite some time to execute (submitting a new album takes up to 5 minute). If I want to generate 1 album submission per second, I would have 5 * 60 = 300 threads running.
Also there is constraint on the data:
A user cannot have two albums with the same name
A picture cannot be uploaded twice or by two different users
I am wondering how other websites with similar workflows have been load tested and what is the recommended approach.
Test Data is very important for any performance testing, the Test data used could within the application has to be unique or duplicate could work.
In your application it has to be Unique, so I recommend you need to create test data separately for each scenario with the sufficient number of records available to complete each transaction, without any interdependence.
For albums names, you can create the unique name to append the data & time within your script, for example - TData_0605_1205
Similarly, you need to build a good amount of Image repository that can last for 300 * total load test time(mins), the naming convention for these images can be incremental, say TImage1, TImage2, TImage3............TImagen , within your script, write a logic to pick the images in sequential fashion with incremental of 1, this number you can get from the thread count/iteration count depending on how you script your framework.
Hope this helps.
​​Thanks,
Bhaskar
Technical Head
Thought Frameworks Inc
C: +1-619-630-5034

Avoid query each time the page is loaded

I work on an educational website in which we show dynamic filters. What does this mean? We now have several course categories that will increase in number in the following weeks.
Right now categories are a string field in each course. I'm planning to model this and create a Categories table. Having done this, it would be pretty easy to load the filters based on the categories we have on the database. However, I see the problem that each time the website is loaded, the query will be made.
I thought of caching these categories but I'm guessing is not the best solution.
Any idea on how can I avoid these queries each time but get this information from the database?

Oracle Apex - Using Multiple tabs with the same session state

I am currently providing support to an existing Oracle Apex 4.2.5 application. One of the pages (Page 1003) contains a process that submits information from the Page 1003 page items (e.g. P1003_ITEM1) to our database tables. The contents of these page items are associated with a primary key (Assessment ID) in the database table to which the page items are submitted. Of a few dozen or so page item variables, the primary key is one of only three variables that are passed in through the URL. The URL is as follows:
https://[DOMAIN]/f?p=[APPLICATION ID]:[PAGE NUMBER]:[SESSION ID]:SELECT:NO:1003:P1003_ENTITY_ID,P1003_ASSESSMENT_ID,P1003_PARENT_ID:353767,700177,5716
We have encountered an issue that occurs when our users load Page 1003 in multiple tabs in their browser for different Assessment#'s. Every time a new Page 1003 is loaded in a new tab, the session variables from the previous tab are overwritten. Regardless of which tab the user submits first, the only variables submitted to the database are the ones from the last tab that was loaded by the user. I've seen a few examples online of how to handle similar issues with other programming languages, but I'd like to know if there is an APEX specific solution that I might have overlooked that can handle this situation.
We'd prefer to pass as few variables as possible in to the page through the URL. In fact, some variable are calculated after the page loads and cannot be passed in through the URL.

Ideas about designing a database based web app

I'm creating a web app for my client as a part of my schools final project.
It's a web app where users fill forms (surveys) and after forms are submitted,
values are saved in the database.
There are three types of users: admins, moderators and viewers. Admin's can see the
overview of filled forms, moderators will fill these forms and they also can make edits
to them and get the overview of the forms they've filled. We haven't discussed about the rights of viewers
at this point.
I'm using CodeIgniter as a framework of my project since it comes pretty handy when it comes to database
manipulation and forms. What would be the best way to implement this kind of situation? There are apprx.
4-5 forms (surveys) each moderator will fill. After they've filled them, they only can make edits to that particular form.
So one user can fill each form only once.
I've designed that each of the forms needs one table. So if there is a form (survey) about IT equipment, I will create
a table for IT equipment. User's id number will be saved in to the last column in the table, usually called "user_ID" where I can
make queries based on users and check if user is already filled the particular form.
What about controllers and models? I've thought I could only make one model for inserting and editing the form.
However, is it pretty much the only way to create a controller or method foreach form since there are different types
of form fields to validate based on the form user is actually filling. I've already created a controller for inserting and updating
the IT equipment form and both of these methods are pretty big when it comes to the amount of code, over 200 lines per method.
So that would be a total amount of 2000 lines of code just for inserting and editing all the forms.
What'd you do and how you'd implement this if dealing with similiar kind of project?
Thanks in advance for all the ideas and point of views!
You should take a look into this:
http://cibonfire.com/
It's a really good addon for codeigniter, that allows you to data oriented development.

Resources