social-networking

Database design: Best table structure for capturing the User/Friend relationship?

六月ゝ 毕业季﹏ 提交于 2019-11-28 03:06:42
I'm trying to design a data model that denotes one user being the friend of another user. This is what i've come up with so far, but it seems clunky, is there a better solution? User ===== Id Name etc... UserFriend =========== UserId FriendId IsMutual IsBlocked UserRelationship ==== RelatingUserID RelatedUserID Type[friend, block, etc] Agree that mutuality doesn't belong as a column; breaks normalization. To go one record per two users and avoid consuming extra memory that the proposed methods suggest (twice as much as needed, since there are two records for each user), you can do the

NetLogo Efficient way to create fixed number of links

萝らか妹 提交于 2019-11-28 01:28:20
I have about 5000 agents (people) in my model. I want to give them an arbitrary number of friends and have reciprocal but random pairing. So if person A chooses person B then person B also chooses person A. My code works fine, but is fairly slow. I will likely want to increase both the number of friends and the number of people in the future. Any quicker suggestions? ask people [ let new-links friends - count my-links if new-links > 0 [ let candidates other people with [ count my-links < friends ] create-links-with n-of min (list new-links count candidates) candidates [ hide-link ] ] ] Note

Android: How to send message programmatically by using WhatsApp, WeChat?

99封情书 提交于 2019-11-27 12:08:34
How to use messaging in android application by using WhatsApp and WeChat ? Actually requirement is to send sms using WhatsApp and WeChat (Free sms). Subhalaxmi I got the Solution.. Here I am posting the answer so that it may help other people who may have same doubt.. For Share through any application... public void sendAppMsg(View view) { Intent intent = new Intent(Intent.ACTION_SEND); intent.setType("text/plain"); String text = " message you want to share.."; // change with required application package intent.setPackage("PACKAGE NAME OF THE APPLICATION"); if (intent != null) { intent

Intelligent MySQL GROUP BY for Activity Streams

孤人 提交于 2019-11-27 11:44:15
问题 I'm building an activity stream for our site, and have made some decent headway with something that works pretty well. It's powered by two tables: stream : id - Unique Stream Item ID user_id - ID of the user who created the stream item object_type - Type of object (currently 'seller' or 'product') object_id - Internal ID of the object (currently either the seller ID or the product ID) action_name - The action taken against the object (currently either 'buy' or 'heart') stream_date - Timestamp

PHP framework for Social Networking [closed]

戏子无情 提交于 2019-11-27 10:35:22
问题 I'm an intermediate PHP developer with no experience building a large scale web application in this language (though I have in others, mainly Rails)...say I wanted to build a social networking site using PHP and MYSQL (preferably) with all the web 2.0 trimmings. Where should I start? What sort of frameworks should I be looking at? Any up to date modern books that would outline something like this? Really anything for building a modern web app in PHP. 回答1: Ryan, there is a php framework called

Best Ruby on Rails social networking framework [closed]

爷,独闯天下 提交于 2019-11-27 10:14:52
I'm planning on creating a social networking + MP3 lecture downloading / browsing / commenting / discovery website using Ruby on Rails. Partially for fun and also as a means to learn some Ruby on Rails. I'm looking for a social networking framework that I can use as a basis for my site. I don't want to re-invent the wheel. Searching the web I found three such frameworks. Which of these three would you recommend using and why? http://portal.insoshi.com/ http://www.communityengine.org/ http://lovdbyless.com/ It depends what your priorities are. If you really want to learn RoR, do it all from

What are the best Java social networking frameworks? [closed]

一个人想着一个人 提交于 2019-11-27 09:30:27
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 8 years ago . I would like to create a private customized social networking for my company employees and partners so that they can collaborate,

How to clear Facebook Sharer cache?

我只是一个虾纸丫 提交于 2019-11-27 06:01:27
We used the link: http://www.facebook.com/sharer.php?u=[shared URL] ...to share a particular page. However, Facebook Sharer uses the cached version of the images and the title. Is there a way to quickly clear the Facebook cache or how long do we have to wait until the data gets updated? I placed <link rel='image_src' href='[preview image]' /> in between the tags. catandmouse I found a solution to my problem. You could go to this site: https://developers.facebook.com/tools/debug ...then put in the URL of the page you want to share, and click "debug". It will automatically extract all the info

How to create an edge list from a matrix in R?

て烟熏妆下的殇ゞ 提交于 2019-11-27 02:53:36
问题 The relationship is expressed as a matrix x like this: A B C D A 0 2 1 1 B 2 0 1 0 C 1 1 0 1 D 1 0 1 0 The entries refer to the number of connections they have. Could anyone show me how to write it as an edge list? I would prefer to write it as an edge list: A B A B A C A D B C But would this edge list allow me to create a network plot? 回答1: Using the igraph package: x <- matrix(c(0,2,1,1,2,0,1,0,1,1,0,1,1,0,1,0), 4, 4) rownames(x) <- colnames(x) <- LETTERS[1:4] library(igraph) g <- graph

How to implement “share button” in Swift

☆樱花仙子☆ 提交于 2019-11-27 01:06:26
问题 This the some peace of code for twitter ... I want to know how to get the share action view like we get in ios stack photos app... @IBAction func twitterButton(sender: AnyObject) { let image: UIImage = UIImage(named: "LaunchScreenImage.png")! let twitterControl = SLComposeViewController(forServiceType: SLServiceTypeTwitter) twitterControl.setInitialText("") twitterControl.addImage(image) let completionHandler = {(result:SLComposeViewControllerResult) -> () in twitterControl