android quiz application implementation - android-file

iam currently working on an android general quiz application,the application has three categories of questions physics,chemistry and maths.
These topics are also further divided into several sub topics(displayed in a listview), like physics is again divided into topics like geophysics,astrophysics, solid state physics etc.
Each topics gives questions related to that topic.
On clicking on any topic gets you to a screen which has a grid view with question numbers and questions you have answered in dark blue colour and not answered in light blue colour.On clicking the grid element you can directly move on to the specified question.The question has answers as multiple choices.The user need to choose any of it and it will indicate whether it is right or wrong.(and also mark that question as attended).
But iam having doubts on certain areas of code:
1) How to save the questions,options...?(if it has to be done by using files please provide me some sample codes thankyou)
2) Sometimes the questions and options show up some images how to handle this..?(this only happens in some cases so that all the other times the image has to be set null)
3) How can I access questions ,options from the file in which it has been saved.(I need also display the images if any present .
Please do reply

Related

React Generating pdfs on components

I want to be able to generate a pdf of the page. It needs to satisfy a few requirements
It must maintain the same styling (What is displayed on page must be what is displayed on pdf)
The pdf that is displayed/generated must be in letter size format (8.5in x 11in)
I've looked at a few libraries, but have not found one that meets these conditions
react-pdf - This allows you to state a paper size such as "A4" and it does meet condition 1. But it has limitations in that it forces you to use their basic components. You cannot put div and I imagine any other things generated by other libraries.
react-to-pdf - This will let me place my own components inside the pdf and it seems to let you choose paper size. However, it does not meet condition 1, and things may get cut off.
If anyone can chime in, I would greatly appreciate it. Thanks!

Is there a way to change what Pepper says in Autonomous Life?

I would like to change what Pepper the robot says when it is in "default mode", i.e. without having any application launched; thus enabling it to answer some questions the manufacturer didn't include, or to change its answer.
I have already tried —to no avail— looking for a solution on Aldebaran's documentation, google researches proved fruitless too.
The kind of questions that the robot can be asked are here: http://doc.aldebaran.com/2-5/family/pepper_user_guide/basic_channel_conversation_pep.html it doesn't say how to change the content though.
I'm basically expecting the robot to be able to deliver some information without needing to get into application; I'm aware that there are collaborative speeches but this isn't what I am looking for.
Option 1:
You can find the dialoges from Pepper at:
/data/home/nao/.local/share/PackageManager/apps/dialog_*
e.g.
/data/home/nao/.local/share/PackageManager/apps/dialog_goodbye/dlg_goodbye/dlg_goodbye_enu.top
You could edit or extend those.
Option 2:
You could copy the content, edit them as you like and merge it into your own dialog.
But you would have to "get into application".
If you just want to add something to the default dialoges. Then you could activate your own custom topic in default mode.
Given your topic file is named myTopic.top and is placed in /data/home/nao/:
import naoqi
from naoqi import ALProxy
ald = ALProxy("ALDialog", "pepper.local", 9559)
myTopic = ald.loadTopic("/data/home/nao/myTopic.top")
ald.activateTopic(myTopic)
ald.getLoadedTopics("English")
Then your custom topic should be listed among the other topics activated in defaut mode.
Option 3:
Make your own application with your own dialog and just activate all the other topics too.

How would I go about encoding a video from an array of images like a time-lapse?

So I have been trying to do this for ages with no luck, ive found some solutions on git hub but these arent working for me, basically I have an array of UIImage which I want to be converted into a 10 second long video when the user presses a button, this video will then be saved to the users camera roll, does anyone have any code to deal with this in swift?
EDIT: The question which this has been marked as a duplicate from is answered in objective c, not swift

How can I find out similar texts / strings given a string?

In sites like Quora or Stack Overflow, on a particular question, they are able to show questions that are possibly related. A quick look at them would reveal that they are merely looking for questions with similar text content. Is there any standard technique to find out such similar texts from a DB table where all texts are stored?
For example if you go to this question -
How to remove Application icon from Action Bar in Android?
it shows the following question as related -
Remove application icon and title from Honeycomb action bar .
If I have column questionText, where the questions texts are stored, in a table questions, how will I find out such related strings?
You'll need to extract keyword tokens from your documents and them find correlation between them. You can use a FOSS tool like Apache Lucene to do that for you.
They can rely on tags also.

Quiz modules doubts in drupal

I had installed Quiz module in Drupal. In that case,If I choose Match the following quiz the first question gets four answer option, but the remaining questions also gets the four options.
What i need: I want to display like first question should get four options,second question should get three option,like wise the last question should get one option.Can anybody guide me how to display it?

Resources