parse query to see if friend info has changed - ios

I am using parse as a server for my iOS application. One major component of the application is when a user updates their information, I want this new information to be available to their friends. Right now the only way i can think of to do this is by running a query with the current friend information and seeing if this matches the friend information. However, I do want to run a query for all friends as this would take a while. Is there any quicker way to accomplish this.
As an example
starting information
User: Name: Favorite color: Friends:
Daniel345 Daniel Blue David
and then the user changes the information to be
User: Name: Favorite Color: Friends:
Daniel1345 Daniel Green David
how can i structure a query so that David's friend information will be update to show that Daniels new favorite color is green?

I recommend you do this query to know if a user have changed any value, not a specific one.
You can do the following:
1) When a user (user1) adds a friend(user2) to it's circles you add this friend's(user2) id into a table of all friends.
1.1) In that table you can add a column called "updated". It will represent if the data of that user(user1) is updated in the user(user1) app.
1.2) the table should look something like this (user(pointer),friend(pointer),updated(number))
2) When one of the user(user1) friends changes (Updates) it's data you can change a boolean value(updated) in the friends list.
2.1) You will need to do that to all the it's friends.
3) To fetch the all the friends that have changed their data just get all the friends that the 'updated' value equals to 1
Basically, every time a User fetches all it's friends that have changed their data you reset all the 'updated' values back to 0. If a user haven't fetched the data and a one friend changes it's data twice then nothing happens, the value remains 1 (Think of this value as a way of letting you know that you have an update in one/some of your friends)

Related

How to get the Twitter follower count of a user on a given date, or at the time of a tweet?

I have access to Twitter API for Academic Research, and I'd like to get the follower count on a given date of a user, or at the time of a tweet.
The doc mentions that "This fields parameter enables you to select which specific user fields will deliver in each returned Tweet.", so I assumed that by adding public_metrics to the users.field, the number of followers can be seen in each returned Tweet, however, in each returned Tweet, I can only see user_id. https://developer.twitter.com/en/docs/twitter-api/tweets/search/api-reference.
Is it even possible to achieve what I want with Twitter API for Academic Research? Is there any other approach to make it?
Thank you so much.
You cannot get the follower count on a specific date; it will always be the count at the time you make the API call.
You may need to add expansions to your API call in order to receive the values you are trying to pull out.

Zapier to Monday.com, is there a way to retrieve or save the numerical monday pulse ID to reference later?

So I have an asknicely.com board that we get customer survey responses from.
I have a Monday.com board where I track these responses and our follow ups for management.
I am using a zapier zap, that filters the responses, that works. BUT it currently puts all the data I want into a new pulse in the first column only. Someone has to move it all manually into each column (me) after it arrives.
I am trying to develop a new zap that creates the pulse then puts the data into the correct columns. I have a zapier structure like this.
When this happens … New Response in AskNicely
Do this … New Pulse on a Board in monday.com
Do this … Update column B in Monday.com
Do this … Update column C in Monday.com
... etc.
My issue is that in order to update a now existing pulse (3 onwards) I have to populate Pulse Id1 2 3 field which accepts only a number.
Here are my questions;
Can I get Zapier to "catch" the pulse ID upon creation so I can save and reference it later?
Or can I retrieve the numerical pulse ID by searching with the text field I first created the pulse with? pulses.getID().contains(someaskicelyTextField);
Or lastly, is there a better approach to this than the one Im using?
I have a java background and its frustrating using these visual widgets instead of working in the actual code to do the above. I am new to both products so if this has been asked before I apologize.
spencemw, you can get the pulseID when you configure the zap.
On the 'Update column value' step, on the item ID, reference the parameter from the previous step.
(Make sure to click the 'show all options')
#Roy Nevo answered. Here are the screen shots for finding the data I was looking for.

Firestore query with array of strings

I try to make social network (like instagram )
User have posts and followers etc
I want for home feed show posts just from users i follow.
User have array with ids of users he follow. So idea is to query from colloection “Posts” where id is equal to one of ids and sort them by timestamp and limit them.
I could make for loop for each in following array but this will be unusable for more than 100 following users.
Edit how I think it could be solved
Hello i dont know if im doing it right but here is my solution for social network like instagram or any other where one user follow other users and have feed from their posts ordered by date.
Each user have its own Collection Timeline where are posts references (postId, createdAt, createdBy) that user should see at his feed, when user start following other user it will put all his posts to feed. For display feed I just call on User timeline, sort it by date and request just 25 of them.
When user start the app I loop trough all followers and request their posts younger than lastTimeline timestamp from their posts collection if they have any I add them to timeline.
I would be happy for your opinion.
You can loop through all the followed user ID and then request the first 5 posts of each one.
Or use some kind of paging

Hyperlink from a count query to extract associated data in access

I have a Count query that uses multiple criteria to produce a result looking like:
count ID
1 "abc"
4 "bcd"
5 "def"
1 "cde"
This shows how many times the ID appears in a given database. The datasource is through an odbc connection that updates automatically. So the ID values change everytime it is opened. I would like to try to turn the unique ID or the associated count into a hyperlink that when clicked will return all information involved in the count (*note the database has much more information associated with the ID's than is counted, a date range of the previous three months is applied.) Can this be done simply?
Database format:
ID Instance Device DateBeg DateEnd
Thanks in advance,
LP
The short version -
This should be simple to do using a report (but could also be done using a form I will be explaining how to do a report for this version). You would just make a report that includes all of your fields then call the report on click. It is important to mention that you will need to view the query via a form to make this work.
A more detailed version -
The first step will be to make a form based on your query (you will not be able to do this directly from a query). To do this select your query then click on the create tab then click Multiple Items Form. Adjust as needed.
Then create a report that shows ALL of the records how you want it to display. (I will call it rpt_ViewDetails) (we will limit later)
When you are done adjusting click on the field that contains the "abc" etc. results (if this is a calculated field it will be more complicated.) I will call this field "Criteria" for the example. Go to the events tab on the property sheet (in design view). use the On Dbl Click event and go to code builder.
This is what the code would look like (place in between the private sub.... and the end sub lines of code):
DoCmd.OpenReport "frm_ViewDetails", acViewNormal, , "[Criteria] = " & Me.Critera
Let me know if you have any trouble with this, also let me know if the structure is different than I am assuming, I will need a more detailed report of what the query is doing if this is the case, what the structure of the database is etc.

Users/Friends with twitterizer that don't follow back

I am using twitterizer in an ASP.NET-project. I nned an example (code) how I can use twitterizer to show a list of followers (paged) for a special account that don't follow back.
The query is: Give me all users that I follow for e.g. 5 days but that didn't follow me back. The result should be displayed in a GridView with paging.
Thanks!
As I stated in the email, there is no way to filter friends or followers by date.
Your best bet to do this is to use TwitterFriendship.FriendsIds() and TwitterFriendship.FollowersIds(), then select the difference between the two. That will give you the list of followers that you don't follow. (Friends are users you follow.) In order to identify new friends/followers, you'll need to keep a list of the Ids, then consult that list at a later date to see the changes over time.
You could create a database (or list, etc) of users you followed and users who follow you. Update this as often you you need and add a time stamp for each new addition. Then you could query this database to create the list you want.

Resources