Redmine Wiki text is large - wiki

I am trying to use the Redmine wiki and I am having a hard time figuring out how to make the text not look so big. Here is a sample of the markup I am doing. Any suggestions on how to make the text not looks so big.
h1. Best Practices
==General==
* Detailed Names
==Python==
* Tabs Only (No space Indent)
* CapWord for classes
* lower_case_with_underscores for functions and variables
* UPPER_CASE_WITH_UNDERSCORES for Constants

After the heading h1 must be at least 1 empty line:
h1. Best Practices
==General==
* Detailed Names
==Python==
* Tabs Only (No space Indent)
* CapWord for classes
* lower_case_with_underscores for functions and variables
* UPPER_CASE_WITH_UNDERSCORES for Constants

Related

Django: How to store mathematical expressions in mysql and then use them

I am using Django and want users to be able to store mathematical expressions like the following in a mysql database following the BODMAS rule:
(A / B) * C + D / (E - D) + J^2
Then I want to be able to use these expressions later on in my views. Much like MS Excel.
I could build some models that stores as their objects, the variables and operators and build a function to implement BODMAS but it sounds like a lot of complication for a simple task.
Is there a simpler, shorter way to do both these steps?
There are lot of ways you can do this. You can save it as plain text, create separate table for each expression and use those when you're doing any sort of mathematical calculations.
What I did a few months back is save the entire expressions as rich text.
So I saved it like this:
Expression 1: (A / B) * C + D / (E - D) + J^2
Expression 2: (A / B) * C + D * (E + D) + J^2
Etc etc
My project was pretty simple which required me to save entire expressions in one line for quiz purposes.
You can use tinymce as rich text editor.
Another way is to save it as LaTeX. Look here for more details:
How to store mathematical expressions/explanations into database
MathJax for client side equation rendering

Skip-Gram implementation in tensorflow/models - Subsampling of Frequent Words

I have some experiments in mind related to skipgram model. So I have started to study and modify the optimized implementation in tensorflow/models repository in tutorials/embedding/word2vec_kernels.cc. Suddenly I came above the part where corpus subsampling is done.
According to Tomáš Mikolov paper (https://arxiv.org/abs/1310.4546, eq.5), the word should be kept with probability
where t denotes threshold parameter (according to paper chosen as 10^-5), and f(w) frequency of the word w,
but the code in word2vec_kernels.cc is following:
float keep_prob = (std::sqrt(word_freq / (subsample_ * corpus_size_)) + 1) *
(subsample_ * corpus_size_) / word_freq;
which can be transformed into previously presented notation as
What is the motivation behind this change? Is it just to model 'some kind of relation' to corpus size into this formula? Or is it some transformation of the original formula? Was it chosen empirically?
Edit: link to the mentioned file on github
https://github.com/tensorflow/models/blob/master/tutorials/embedding/word2vec_kernels.cc
Okay so I guess that without corpus_size, the graph looks somewhat the same as the original formula. Corpus size adds a relation to the corpus size to the formula and also "it works with the large numbers", so we can compute discard/keep probability without normalizing word frequency to proper distribution.

Doxygen - Can you add your own header in method description?

Hello and thank you for reading.
I want to ask whether it is possible to add your own header in description of a method. I can not find any answer anywhere.
Lets say:
/**
* #brief Adds a Character to a container. That monster will be updated and drawn. The monster is not added if monster with samee ID exists
* #param m Character to add
* #return false if the character was not added.
*/
bool AddZombie(Zombie * m);
Now this will in doxygen create a field with bold headers saying "Parameters" and "Returns".
What I want, however, is to add a paragraph for a complexity. The following code does not do what I want, however
/**
* #brief Adds a Character to a container. That monster will be updated and drawn. The monster is not added if monster with samee ID exists
* #param m Character to add
* #return false if the character was not added.
* #complexity The complexity is O(n)
*/
bool AddZombie(Zombie * m);
Now is there any way to do this?
When I am asking here, please allow me to ask one small little question:
Would it be possible to make a list of all complexities of methods, maybe sorted? Meaning not by coding html, by only using doxygen.
This might seem like a stupid question to people who know alot about doxygen, but, allthough I red documentation and the website, I still sometimes learn something new and hidden I did not know.
Thank you all for any response.
Have a nice day, and thank you for your time

How can i find the relevance of a page?

Say I have some features of a person and then i perform google search.
A list of results display I want to mine those results and check how the contents of those results are relevant to that particular person.
If you need to perform a Google search, the relevancy is best computed using
relevancy = cos(x) * (sqrt(x) + atan2(x,y)) * sin(0)
This is the universal formula for relevancy. You can apply it to people or to questions on SO.

Two entities with 2 join table in doctrine 2

I am working on courts projects. where 2 parties are involved. One party who filed the case against second party. each party may have more than 1 advocate for represent his case. and one advocate has more than 1 case. This situation is the many to many relationship. i designed this structure, this is the rough example.
How can i define such relationship in doctrine 2. I tried this
Advocate:
/**
* #ORM\ManyToMany(targetEntity="CaseLaw\CaseLaw\Entity\CaseLaw", mappedBy="caseLawFirstPartyAdvocates")
**/
private $caseLaw;
CaseLaw
/**
* #ORM\ManyToMany(targetEntity="CaseLaw\Advocates\Entity\Advocates", inversedBy="caseLaw")
* #ORM\JoinTable(name="case_law_first_party_advocates",
* joinColumns={#ORM\JoinColumn(name="case_law_id", referencedColumnName="case_law_id")},
* inverseJoinColumns={#ORM\JoinColumn(name="advocate_id", referencedColumnName="advocate_id")})
**/
private $caseLawFirstPartyAdvocates;
/**
* #ORM\ManyToMany(targetEntity = "Advocates", inversedBy="caseLaw")
* #ORM\JoinTable(name="case_law_first_party_advocates",
* joinColumns={#ORM\JoinColumn(name="case_law_id", referencedColumnName="case_law_id")},
* inverseJoinColumns={#ORM\JoinColumn(name="advocate_id", referencedColumnName="advocate_id")})
**/
private $caseLawSecondPartyAdovcates;
The Problem is, Value of MappedBy attribute is caseLawFirstPartyAdvocates, where i can specify second attribute caseLawsecondPartyAdvocates ?. how can i define annotation of this kink of situation ?
I don't have a direct answer to your question, but I'm going to recommend that you try http://www.orm-designer.com to help you figure it out. It's not free, but the developer is very active with updates, and us very responsive to suggestions and to support questions.