Phenomenon related to emergent properties?

I’m looking for a certain word that I am not able to properly define apart from emergent property, and perhaps there is a better alternative.

I am designing a software library, and have 2 decisions to make. Each decision has several alternatives each with it’s own drawbacks. In each decision I choose the seemingly best alternative. However, when I put the two decisions together in the final system, there is an flaw that emerges from the system.

This is like making locally optimal decisions that lead to a globally non-optimal outcome. Is there a known word for this?

View listing related nodes by taxonomy term

I have a content type representing a book. Each book as a genre (SciFi, Fantasy, Thriller …) and I would like to expose, on the page of a book some books sharing the same genre.

I created a view with a contextual filter on the taxonomy term, but I retrieved the current book so I added a contextual filter on tue current node id to exclude it.

Now I don’t retrieve anything from my view.

Each contextual filter on his own his working. If I just use the contextual filter on the content id, I retrieve the list of my books without the current book. If I just use the contextual filter on the taxonomy term, I retrieve the list of my book for that genre (including my current book).

How am I supposed to proceed to have both filter working together ?

Python static type checking and related libraries such as mypy. Do you or your team uses it?

Seeing function annotations and static type syntax introduced into Python3. I was curious to know how many developers using Python has found a need to use static typing style in their project.

If you have, how did it help you or your team?

Medium article giving a quick overview of static type checking in Python3.6 : https://medium.com/@ageitgey/learn-how-to-use-static-type-checking-in-python-3-6-in-10-minutes-12c86d72677b

Looking forward to hear your from you all!

Coding practices related to logic within function calls and conditional statements

I recently started working as a programmer and I am currently going through some codes (in C#) written by my colleagues. I have noticed that they tend to include logic within function calls within some conditional statements. For example:

if (MoveSpace(currentPos, distance * time)) { doSomething } 

They would also include logic when determining array positions. For example:

Space currentSpace = array[a*b, x*y] 

Is this a good/bad practice? Would it be better if I create a new variable for these logic results and pass in the variable instead? Thank you.

An idea related to the conjecture of Bunyakovsky

Obviously a reducible polynomial $ f\in\mathbb Z[X]$ only can have a few primes $ p\in f(\mathbb Z)$ , if any. Irreducible polynomials with a fixed prime divisor can at most have one prime $ p\in f(\mathbb Z)$ . The Bunyakovsky conjecture suggests that for an irreducible polynomial $ p$ with positive leading coefficient and without fixed prime divisors, $ f(\mathbb Z)$ must contain infinitely many primes.

But looking at the question from the perspective of the subring of integer valued polynomials over $ \mathbb Q$ , $ \operatorname {int}(\mathbb Z)$ , the occurrence of composites and primes in $ f(\mathbb Z)$ should be related to the possibility of factoring $ f$ in $ \operatorname {int}(\mathbb Z)$ . If $ f$ have a fixed prime divisor the factoring is trivial, but what contradicts a non trivial factorization in $ \operatorname {int}(\mathbb Z)$ if f not have a fixed prime divisor?

Due to Pólya $ \operatorname {int}(\mathbb Z)$ is a free Abelian group where all elements $ f$ can be uniquely expressed as linear combinations of the (in this ring) irreducible polynomials

$ \displaystyle \left( \begin{matrix} X \ k \ \end{matrix}\right)= \frac{X(X-1)(X-2)\cdots(X-k+1)}{k!}$
where the coefficients can be calculated $ c_0=f(0)$ and $ \displaystyle c_k=f(k)-\sum_{i=0}^{k-1}c_i {k\choose i}$ .

My question is, does it exist non trivial linear combinations $ f,g\in\operatorname {int}(\mathbb Z)$ , as above, such that $ f\cdot g$ is an irreducible polynomial in $ \mathbb Z[X]$ ?

Is this Related to Tannakian Formalism?

I am wondering how I might be able to express the following phenomenon, which is essentially equivalent to Artin’s linear independence of characters, in Tannakian formalism. Any help would be much appreciated.

Let $ C$ be the category of finite étale $ k$ -algebras for a field $ k$ . Let $ K$ be the separable closure of $ k$ , and let $ G$ be the absolute Galois group of $ k$ , which is a profinite group.

From the fundamental theorem of Grothendieck’s Galois theory, there is an essentially surjective, fully faithful functor $ \Pi : C \rightarrow G \text{-set}$ into the category of finite continuous $ G$ -sets. On objects, this functor can be defined by sending a finite étale $ k$ -algebra $ A$ to the set $ [A, K]_k$ of $ k$ -algebra maps from $ A$ to $ K$ with $ G$ action given by sending $ \sigma \in G$ and $ \iota : A \rightarrow K$ to $ \sigma \circ \iota$ .

There is a functor $ T_{G \text{-set}} : G \text{-set} \rightarrow K \text{-vect}$ sending a $ G$ -set $ X$ to $ \oplus_{x \in X} K$ . There is a functor $ T_{k \text{-sep}} : k \text{-sep} \rightarrow K \text{-vect}$ sending a finite étale $ k$ -algebra $ A$ to $ \text{Hom}_k (A, K)$ ($ k$ -vector space maps).

$ T_{k \text{-sep}}$ and $ T_{G \text{-sep}}$ factor through the forgetful functor $ K[G] \text{-mod} \rightarrow K \text{-mod}$ , just like in the reconstruction theorem of Tannakian formalism (but keep in mind that this doesn’t meet the hypotheses of this theorem). We may view them as having target $ K[G]$ -mod then.

This seems similar to some sort of Tannakian formalism setup, but maybe it’s just coincidence. Anyways, this formality can be used to express Artin’s linear independence of characters, albeit it is not obvious at first sight that they are essentially the same thing.

Theorem: The following diagram of functors commutes up to natural isomorphism:

enter image description here

That is, $ T_{k \text{-sep}} : $ is naturally isomorphic to the composition $ T_{G \text{-set}} \circ \Pi$ sending a finite ètale $ k$ -algebra $ A$ to $ \oplus_{\iota \in [A, K]_k } $ , and this map is $ G$ -equivariant. More precisely, define a natural transformation $ \epsilon : \Pi \rightarrow T_{k \text{-sep}} \rightarrow T_{G \text{-set}}$ , where $ \epsilon_A$ sends a formal sum $ \sum_{\sigma : A \rightarrow K} c_{\sigma} \sigma$ in $ \oplus_{x \in X} K$ to the $ k$ -linear map $ A \rightarrow K$ in $ \text{Hom}_{k \text{-mod}} (A, K)$ sending $ a \in A$ to $ \sum_{\sigma : A \rightarrow K} c_{\sigma} \sigma (a)$ .

Proof: Take a finite étale $ k$ -algebra $ A$ . First we show that $ \epsilon_A$ is injective. For a contradiction, suppose $ \epsilon_A$ is not injective $ \sum_{\sigma \in X} a_{\sigma} \sigma$ in the kernel of $ \epsilon_A$ , such that the amount of nonzero $ a_{\sigma}$ is the least possible. Take $ \tau \in X$ , and take $ y \in A$ such that $ \tau(y) \neq \sigma(y)$ for some $ \sigma \in X$ with $ a_{\sigma} \neq 0$ . Then $ \sum_{i = 1} a_{\sigma} \sigma(y) \sigma (x) = \sum_{i = 1}^n a_{\sigma} \sigma (yx) = 0$ for each $ x \in A$ . And $ \sum_{i = 1}^n a_{\sigma} \tau(y) \sigma(x) = 0$ , so $ \sum_{i = 1}^n (a_{\sigma} \tau(y) – a_{\sigma} \sigma(y)) \sigma$ is contained in the kernel of $ \phi$ . Yet this element is nonzero, as $ \tau$ and $ y$ were chosen so that $ \tau(y) – \sigma(y) \neq 0$ for some $ \tau \in X$ , and $ a_{\sigma} \neq 0$ . So we have a nonzero element of the kernel of $ \epsilon_A$ with strictly fewer nonzero summands, a contradiction.

Now $ \epsilon_A$ is injective, and it has target and cotarget with the same $ K$ -dimension, using the fact that $ A$ is étale. So $ \epsilon_A$ is an isomorphism.

So, I am asking whether this is related to Tannakian formalism. I don’t see an abelian cotarget category anywhere, however.

BUYING: Health, seniors, nurses, babyboomers, age related illness, aging…

Always interested in buying websites, blogs, directories, domains that are related to aging. Including:

  • Health and illness of aging people
  • Care for aged parents and patients
  • Services for seniors (travel, real estate, elder law, etc)
  • Facilities for aging people (nursing homes, hospice, adult day care)
  • Baby boomers

Patterns for loading related objects in memory (without an ORM)

I am using ADO.NET to read a bunch of data from the database into in-memory objects.

This is my domain model:

// Question.cs public class Question {     public int ID { get; set; }     public string Title { get; set; }     public string Description { get; set; }     public IEnumerable<Tag> Tags { get; set; } }  // Tag.cs public class Tag  {     public int ID { get; set; }     public string Name { get; set; } } 

On retrieving the list of Questions, I would like to fetch the related tags for each question. I am able to do this as follows:

// QuestionRepository.cs  public IList<Question> FindAll() {     var questions = new List<Question>();      using (SqlConnection conn = DB.GetSqlConnection())     {         using (SqlCommand cmd = conn.CreateCommand())         {             cmd.CommandText = "select * from questions";              SqlDataReader reader = cmd.ExecuteReader();              while (reader.Read())             {                 Question question = new Question();                 // Populate the question object using reader                 question.Load(reader);                  questions.Add(question);             }             reader.Close();         }      }     return questions; }   // Question.cs public void Load(SqlDataReader reader) {     ID = int.Parse(reader["ID"].ToString());     Title = reader["Title"].ToString();     Description = reader["Description"].ToString();      // Use Tag Repository to find all the tags for a particular question     Tags = tagRepository.GetAllTagsForQuestionById(ID);  }      return questions; }  // TagRepository.cs public List<Tag> GetAllTagsForQuestionById(int id) {     List<Tag> tags = new List<Tag> ();     // Build sql query to retrive the tags     // Build the in-memory list of tags      return tags; } 

My question is, are there any best practices/patterns for fetching related objects from the database?

Most of the SO questions I came across for loading related data provide the solution for entity framework. There is no answer for this duplicate question.

Even though my code works, I would like to know other ways to do the same. The closest explanation I came across that’s targeting my particular problem was Martin Fowler’s Lazy Load pattern, which I believe, will result in following implementation:

public class Question {     private TagRepository tagRepo = new TagRepository();     private IList<Tag> tags;      public int ID { get; set; }     public string Title { get; set; }     public string Description { get; set; }     public IEnumerable<Tag> Tags {         get         {             if (tags == null)             {                 tags = tagRepo.GetAllTagsForQuestionById(ID);             }             return tags;         }     }   } 

Are there any other alternatives?

Get related items while looping in Django template

I am trying to access a related object (PaymentDetail if it exists) while looping through a _set list of objects (Registrations).

My models look like this:

models

class Registration(models.Model):     person = models.ForeignKey(Person, on_delete=models.PROTECT)     course_detail = models.ForeignKey(         CourseDetail,         on_delete=models.PROTECT     )     comments = models.CharField(max_length=200, blank=True, null=True)      def __str__(self):         return '%s' % (self.course_detail.course.name)      class PaymentDetail(models.Model):         payment = models.ForeignKey(Payment, on_delete=models.PROTECT)         registration = models.ForeignKey(             Registration,             on_delete=models.PROTECT) 

In my views I’m just getting a queryset of desired people and passing it to the template (these display fine).

view

def index(request, **kwargs):     people = Person.get_related_people(request.user.id).order_by('first_name')     return render(request, 'people_app/index.html', {         'people': people,     }) 

As I am looping through them in the template – I am displaying the associated Registrations for these people. While I’m looping through those registrations – I’m trying to see if there is a PaymentDetail associated with that Registration

In my template I’m looping through the registration_list like this:

template

{% for person in people %}     {% for registration in person.registration_set.all %}         {{ registration.id }}          {% if registration.paymentdetail_set|length > 0 %}             PAID         {% else %}             NO PAYMENT         {% endif %}     {% endfor %} {% endfor %} 

As you may imagine – this doesn’t work and always shows as NO PAYMENT even when the PaymentDetail exists.

RANKWINZ – Catapult Your Rankings with Niche Related links on Real Aged sites! for $125

We would like to present you our MANUAL Whitehat SEO Strategy! All our strategies we develop feature white hat approach only. We promote the idea that our clients should trust their search optimization &link-building efforts to a company that follow the search engine webmaster rules. OUR STRATEGY INCLUDE NEXT STEPS: 1) First we will make deep Keyword Research & prepare detailed report about keywords which you need focus your attention. 2) In the second step, we’ll Analyse your SEO Competitors and provide a full report with keywords, backlinks, positions & others factors. 3) Then we will Develop all Promo Materials which will need for your strategy. Our team of professional copywriters will create high-qulaity, human readable, unique, and keyword optimized articles. Our goal is to develop unique as well as eye-catching images that are necessary for creating the visual component of the project and that will make your potential audience recognize you instantly. 4) After that we will start Link Development (total 50 links with HIGH metrics). Here is our link development plan: – 10 Blog Platform Articles: We will submit created article it to High DA/TF aged sites which can help get strong dofflow links to your website. They will never get negatively affected by any Google update. Real sites will always have better ranking power than any alternative. – 5 Niche related blog comments: We will find a blog related to your niche and then will find a high PR page where we will post a permanent link to your website. – 5 Guest Posts On Editorial Sites: We will submit article in most popular Editorial Sites like WN.com, Playbuzz, Boredpanda etc…, which can help get brand awarenessand traffic to your website. – 10 Complete Niche Related Blogs: We will create complete blogs on most popular free hosting platforms. We scrupulously work on every article and its subject area, so that the backlinks you get are 100% resultative, natural and Penguin safe. – 10 High Authority Profiles: Using our special Gooogle-friendly seo technique, we will MANUALLY create High Trusted Backlinks in Using Some of the MOST TRUSTED (PR 9 Old) Websites in the World There will be a mix of no & do-follow, anchored & non-anchored links. – 5 Niche related forum topics: We will find a forum related to your niche and,then will create topic with a permanent link to your website. – 5 Social Media Blogs posts: We will submit article in most popular social media blog platforms and social network sites which can help get brand awareness and traffic to your website. 5) In the last step, we’ll take all links and make Drip Feed Pinging! And you will get full report about positions and all links which will be create. We take on the day-to-day with all SEO aspects, so you can get back to focusing on other important things about your project. From building out your placement strategy to managing and maintain your complex SEO campaigns. That’s what we do. Why are we better than any PBN based service? Real sites will never lose any authority. They will never get negatively affected by any Google update. Real sites will always have better ranking power than any alternative. Outsourcing any tools made exclusively for SEO might not hurt you now, but it definitely can hurt you in the future. Reckless, excessive backlinking can and will bring your investment in time. Relaying on someone to maintain the “natural” sites of the service with more than thousand PBN’s is just bad idea as that someone will always have sales and quantity in mind. The real question that needs to be asked, is why Rankwinz? Chat with us, and let’s first determine your goals. At a minimum, we will be able to point you in the right direction & assist you to make an informed purchase decision! OUR FEATURES: – Increased website authority with real authority sites – Top-ranked website based on keywords – Manually built backlinks with only high PR site, using unique content – Google Penguin and Panda safe work – 100% White Hat, manual work only – Totally Unique articles – Flawless Approval rate – Do-follow backlinks – Only a Natural mix of anchored and non-anchored high PR backlinks – Full reports with Logins We are SEO freelancers team you can count on! Our Links Replacement Guarantee: There will be 60 days replacement policy after order is completed for problem such as deleted links and metrics drop (which very rarely happen). Also, your links will be guaranteed to be live for 1 years. We will keep it live as long as possible! ————————————————————————————– FAQ: Is this WhiteHat? Sure, we try to source natural link opportunities. Keep in mind that Google does not consider guest posts to be white hat. Any “link scheme” meant to manipulate rankings is against webmaster guidelines i.e. not white hat. That’s link building. You won’t rank without it — just has to be done right. Do you create only dofollow or nofollow links? Most of the inks will be dofollow and few will be nofollow. A mix of dofollow and nofollow links are always good for your link profile. Will I get to the first page of Google? If your site has other factors in place, like quality content, user-friendly website, social activity, age, and your niche is not very competitive, its possible to get to the first page. *Applies only to Premium package. Will my traffic increase? If your site reaches page 1-2, then yes. Roughly 54% of all cases (those with low competition) rank on the first and second page of Google, so we can’t promise you 100% guarantee on this point. Still, we can absolutely promise that you will be much closer to the first page. Which niche do you accept? We accept all niches, Expect ADULT, Porn, Casino, Gambling, Movies Sites and any illegal activity. ————————————————————————————– Here is our calendar plan: ————————————————————————————– Here is some our results:

by: rankwinz
Created: —
Category: Link Building
Viewed: 187