How do I create a 'Message of the Day' in iPhone app? - iphone

Is it possible to pull from some sort of feed to display a different quote in a Text Field each day? I have a list of 365 quotes that I would like to display in the app each day.

make a json file with all your messages, parse them, iterate over them and display one per day.
shouldn't be too hard!

Related

Thousand Separator not coming in my facebook payments Description

If my product is to sell "100000 coins for 1$" how can i display 100000 coins with comma separator like 100,000 Coins on facebook payments native popup
When we are creating html data using meta tags for product creation to facebook, we are sending a property called og:title. Whatever we send in this title tag will appear as description. So, we have to format number into currency format and send that in title to make it appear the way we want.

Is there a way to create an output form based on Google Sheets data?

What I want to make
Is this possible?
I'd like to create an output form that reads data from a Google Sheets spreadsheet. In the form, users would enter a few values (entering their name and some ID number, for example) and view the corresponding information in the connected spreadsheet but not any other information in the sheet. Something like an output form in Microsoft Access. I'm hoping there's a way to accomplish this in Google Sheets using existing tools and maybe some scripting.
More generally, though, any way to create this type of 'limited visibility' on a per-user basis for Google Sheets data would be useful. (The 'protect sheet' function in the menu doesn't accomplish this; see below.)
For reference, my specific use case at the moment is as a teacher and wanting a way for students to see specific information related to them from my student information spreadsheet but while not revealing other students' information. I would have a simple form where they enter a name and maybe some personalized code that I give them so they can see their attendance record or something else. For my purposes, I don't need the form to be extremely secure as none of the information is all that sensitive (although more secure is better), but I don't want to be just putting all the information there in front of them by giving them access to the entire sheet.
What I've tried so far
I made a new spreadsheet file with two sheets; one sheet was visible to function as a form, and the second sheet was not visible (which I accomplished via the 'protect' menu option). I used importrange() to read in the relevant data from my primary spreadsheet to the new spreadsheet's non-visible sheet. On the visible sheet, students entered their name from a drop-down and entered their student ID as validation. If the student's name and ID matched, the first sheet did a vlookup() to read in information from the protected sheet and some information from their student record.
Here's what I made, in case my description doesn't make sense: https://drive.google.com/open?id=1cHO2jzMh1mkXvlLh-M4eYqN7v11t95-GnfWqL5IwQ14&authuser=0
This had two problems, one small and one big.
The small problem was that every student could see the "form" sheet at the same time. If two students opened the spreadsheet at the same time they would see any information that the other student had entered. I handled this by writing a simple script to automatically reset the "form's" input cells after 20 seconds. Also, any time the form was opened by a new person, the "form's" output cells were erased. So, obviously not a brilliant solution, but for my purposes, this was mostly good enough.
The big problem was that Google's own preview viewer (built into Google Drive and the like) ignores protected ranges and sheets and displays the entire contents a spreadsheet. (Normally, protected sheets are not visible at all and don't appear in the list of sheets at the bottom of the screen unless the viewer has access to them.)
In my case this meant included the protected one that shouldn't have been visible at all, rendered as if it were a print preview, meaning the students were actually able to view all of the other students' data in one big table.
Are you familiar with Web Apps?
An Apps Script Web App allows you among others to output selected Google Document contents into a browser.
Hereby, you can use the method Session.getActiveUser() to obtain the email of the user and dynamically adjust the data the user is going to obtain in function of his email (BTW, you can also use Session.getActiveUser() in the spreadsheet, to detect the user automatically instead of asking him for his name).
Simple example workflow:
Replace in column A student names through student emails (the Gmail addresses with which the users authenticate their sessions and access Google Sheets)
Bind to the spreadsheet a script with a content similar to the following:
function doGet(){
var ss=SpreadsheetApp.getActive().getSheetByName('Data');
var range=ss.getDataRange();
var values=range.getValues();
var user=Session.getActiveUser();
var output="";
for(var i=1;i<ss.getLastRow();i++){
if(values[i][0]==user){
for(var j=1;j<ss.getLastColumn();j++){
output+=(values[i][j])+" ";
}
}
}
return ContentService.createTextOutput(JSON.stringify(output));
}
Make sure that you have a doGet() function and a return statement.
After running the script once manually to trigger authorization flow, deploy it as a Web App - executing it as User accessing the web app and giving access to Anyone (unless desired otherwise).
Copy the URL of your WebApp and forward it to your student.
When the student open the URL in their browser - they will obtain their results - provided their email is listed in the sheet.
Please note that the code provided is a simple sample, that retrieves
all data and outputs it as a string. Feel free to modify the script
e.g. retrieving only columns of interest and outputting the data as a
html table, rather than a simple string.

Prefill Google Forms spreadsheed with results from other sheet

I've tried figuring this out but without success until now, I want to create a new Google Forms spreadsheet, and already fill it with some data.
The reason I want this is because at this moment I have one spreadsheet with info from 2015, 2016,2017 and I want to split it to each quarter to view the responses, including the nice charts.

tumblr get list users by hashtag

I can't find the way to look for users on tumblr with a specific hashtag.
Example with hashtag "garden". How can you get a list with all users who used this hashtag? And if possible within a certain timeframe?
I guess it's easy but I can't find it.
kind regards
You can't just fetch all users who have used a tag, but you can iterate through posts that have that tag. Use the /v2/tagged route in the Tumblr API.
GET /v2/tagged?tag=garden
Parse the response as json and fetch each response[i].blog_name to construct a list of blog names that have used the tag.
You can then fetch the next page by using the response[i].timestamp field of the last post in the array. Just pass it as a before query parameter in your next request.
GET /v2/tagged?tag=garden&before=1480712397
If you'd like to limit to a specific timeframe, you can just start with the most recent date in before, and proceed until you hit a post with a timestamp past your oldest date.

Fill document from a google spreadsheet

I have a web form that populates a Google spreadsheet.
My question is can I populate a document with some or all of the information from a given row ?
Example: I created a webpage for a small business that they can input all the details from a sale. That populates a google spreadsheet. Now I need to create a nice looking receipt (document) that includes the information from some of the fields in a particular row of that google spreadsheet to print out and give to the costumer for them to sign
I coded a simple java script library todo the same thing after hours of search. (Wish I started it right away) Gsheet2json
Upto now it can get data from the spreadsheet as objects array or arrays of array and you can use any template you want to publish it(of cause using your own java script + html).