social-networking

Calculation of betweenness in iGraph

≡放荡痞女 提交于 2019-12-08 08:57:28
I've seen some info suggesting that closeness in iGraph weighted graphs is calculated using the weights as costs, rather than strengths. I'm wondering if this is also true for betweenness. i.e, if I have two paths between vertices, one of them (a) with edge weights summing to 100 and the other (b) to 200, betweenness will interpret path a as the least costly path and include this edge weight value in the numerator of the betweenness calculation. If so, to obtain betweenness based on strength, I assume one would transform the weights to equal 1/weight? I've tried to test this with a three node

Modeling a Friend relationship in GAE

北战南征 提交于 2019-12-08 07:52:41
问题 I am working with GAE and have a user table. Now I want to model friend relationships between users. I am thinking of having 3 properties user1 , user2 and request_status , but the problem is in querying to find a particular user's friends. Since GAE does not allow OR filtering, I have to merge two queries. Clearly that is very inefficient. This is just one problem with my approach. If someone could suggest a solution that lets me keep track of all friend requests as well as the friendship,

How to limit the number of links an agent can make in a model?

你。 提交于 2019-12-08 07:06:20
问题 I'm setting up a model with a number of agents who are connected via links as follows: ask turtles [create-links-with turtles in-radius vision with [self != myself]] But I want to be able to limit the number of connections that an individual agent can make. I've tried a few things but to no avail. Hope you can help. 回答1: You can get a randomly selected subset of turtles to link to using the n-of primitive like this: ask turtles [create-links-with n-of 3 turtles in-radius vision with [self !=

Dominance-directed (tournament) graph metrics

眉间皱痕 提交于 2019-12-08 05:50:47
问题 I am interested in deriving dominance metrics (as in a dominance hierarchy) for nodes in a dominance directed graph, aka a tournament graph. I can use R and the package igraph to easily construct such graphs, e.g. library(igraph) create a data frame of edges the.froms <- c(1,1,1,2,2,3) the.tos <- c(2,3,4,3,4,4) the.set <- data.frame(the.froms, the.tos) set.graph <- graph.data.frame(the.set) plot(set.graph) This plotted graph shows that node 1 influences nodes 2, 3, and 4 (is dominant to them)

Calculation of betweenness in iGraph

梦想与她 提交于 2019-12-08 05:30:30
问题 I've seen some info suggesting that closeness in iGraph weighted graphs is calculated using the weights as costs, rather than strengths. I'm wondering if this is also true for betweenness. i.e, if I have two paths between vertices, one of them (a) with edge weights summing to 100 and the other (b) to 200, betweenness will interpret path a as the least costly path and include this edge weight value in the numerator of the betweenness calculation. If so, to obtain betweenness based on strength,

Social Networking Development - Where to start

[亡魂溺海] 提交于 2019-12-08 03:34:46
问题 I wish to have a yoga community site build based on a social networking infrastucture. I'm not a developer, but i want to get things rolling. Budget is a issue. What development platforms would you recommend? My objective is to identify one, then look for developers who have experience on this platform. My broad requirements are : users can register and provide info about what types of yoga there are interested in. users can interact with other geo local users. if a user is a yoga instructor,

How to plot relationships in R?

浪尽此生 提交于 2019-12-08 01:52:33
问题 The relationship is expressed as a matrix x like this: John Jack Mary Wendy John 0 2 1 1 Jack 2 0 1 0 Mary 1 1 0 1 Wendy 1 0 1 0 The entries refer to the number of connections they have. Could anyone show me how to plot it as a network in R? Thanks! 回答1: This is known as an adjacency matrix. There is some information in the R FAQ on plotting social networks expressed as matrices: Plotting social network data can be easily done with the igraph package in R. [...] In order for the igraph

user has many :users, or must I use another way for a friend based social network?

走远了吗. 提交于 2019-12-08 01:38:58
问题 I'm creating a little social network in Rails, where people can add eachother as a friend. I have created a model called 'user' , which contains, e-mail, strong md5 hash with salt of password etc. How do I create something like an option to add another user as a friend? Is it possible to have something like has_many_and_belongs_to :user in the user model? So a user has many users and belongs to many users. Or should I use another way, like adding a friendship model which has user1s_id:integer

Facebook insights for websites does not match on-site Facebook button counts

a 夏天 提交于 2019-12-08 00:57:48
问题 I use Facebook Insights for websites and Facebook buttons on my site. However, the data reported by the two do not match. It always seems to be the case that the count reported by the buttons is significantly higher than the count reported in Facebook Insights. For example, this page http://www.appmyworld.com/blog/top-5-iphone-and-ipad-apps-of-the-week-10412.html has a count of 52 for Facebook which is made up of 19 likes, 21 shares and 12 comments according to AddThis and confirmed by http:/

UIActivityViewController Background Color

安稳与你 提交于 2019-12-07 22:59:30
So I have a UIActivityViewController in my Application. How do I change the background color. And I also have a quick how to add Facebook and twitter to my UIActivityViewController . The Code: - (IBAction)Social:(id)sender { UIActivityViewController *social = [[UIActivityViewController alloc]initWithActivityItems:[NSArray arrayWithObjects:@"Travel+ Rocks",nil] applicationActivities:nil]; social.excludedActivityTypes = @[UIActivityTypeCopyToPasteboard,UIActivityTypeAssignToContact,UIActivityTypePostToWeibo,UIActivityTypePrint]; [self presentViewController:social animated:YES completion:nil];