PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0
Showing posts with label social-networking. Show all posts
Showing posts with label social-networking. Show all posts

Sunday, June 26, 2022

[FIXED] How to find Global Clustering Coefficient of graph?

 June 26, 2022     graph, graph-theory, social-networking, web-analytics     No comments   

Issue

I start learning network analysis & its metrics calculation from last week. Don't have enough knowledge. Can anyone check this ?

The formula of finding the global clustering co-efficient is,

C = (3 * Number of Triangles) / (Number of connected triples of vertices)

I calculate the global clustering co-efficient as,

Number of Triangles = 2 
(as there are 2 directly connected triangles in the graph i-e Node4->Node5->Node6 and Node1->Node3->Node4)

Number of connected triples of vertices = 4 
(as Node1, Node2, Node3 & Node6 have three vertices connected)

 C = (3 * 2) / 4 = 1.5

I don't know I do it correctly or not. Can anyone check this ? or correct me If I am wrong

enter image description here


Solution

The denominator must count all triples with 2 or 3 edges. So, the the given graph we have the following triples:
5-4-6
6-5-4, 6-4-2, 6-5-2
4-6-1, 4-5-1, 4-6-3, 4-5-3, 4-1-3, 4-6-5
1-4-3, 1-3-2, 1-4-2
3-4-1, 3-1-7, 3-4-7
7-3-2
2-7-1, 2-1-6, 2-7-6
This gives a total of 20 triples, so the gcc is 2*3/20 = 0.3.

This algorithm is implemented in python's networkx package. The code for this example is:

import networkx as nx
g = nx.Graph()
g.add_edges_from([(5,6), (5,4), (4,6), (4,1), (4,3), (3,1), (3,7), (7,2), (1,2), (6,2)])
print(nx.transitivity(g))


Answered By - Jorge M. Londoño P.
Answer Checked By - Cary Denson (PHPFixing Admin)
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg

Thursday, December 30, 2021

[FIXED] How to remove "Powered by HumHub" from HumHub CMS footer?

 December 30, 2021     php, social-networking, yii     No comments   

Issue

I am using Humhub CMS for new social networking website. I already installed and everything is going smoothly.

However, during login / registration, there a "Powered by HumHub" link in footer. I was trying to remove that but couldn't find any way to rid it out. Humhub is developed by Yii framework.

Is there any way to remove that?


Solution

Of course you can change that, but I am not familiar with humhub license model.

Check the terms at humhub license.

After that you can edit the footer at following locations:

  • protected/modules_core/user/views/auth/_layout.php
  • protected/modules_core/installer/views/_layout.php
  • protected/modules_core/admin/views/about/index.php
  • protected/vendors/yii/cli/views/webapp/protected/views/layouts/main.php
  • protected/vendors/yii/gii/views/layouts/main.php
  • protected/views/mail/template.php

You can check the Github Page yourself.

If you already have installed, try a "search in files" with your favourite text editor.



Answered By - R13e
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Older Posts Home

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
All Comments
Atom
All Comments

Copyright © PHPFixing