Questions tagged [inclusion]

89 questions
0
votes
1 answer

Two files include each other in c++ problem

I'm doing some contribution to an open source library, but I'm having trouble modifying other people's code. Previously the library had a file called IntervalT.h and a file called Curves.h with the implementation in the file Curves.tcc, and…
Shang Wang
  • 24,909
  • 20
  • 73
  • 94
0
votes
2 answers

A better way to properly implement string 'in' array

suppose you have an array with a number of strings in ActionScript3 and you want to test if a test string is "in" that array. "in" only works against the index with Arrays in AS3 (which is totally retardo if you ask me), though it does work with…
Tom Auger
  • 19,421
  • 22
  • 81
  • 104
0
votes
1 answer

How can I apply my form to multiple templates in django

I am creating a blog site where users can post articles on the home page which can then also be commented on using a form. These posts can also be viewed elsewhere on the site, under search results and on user profiles for example. What I am trying…
sgt_pepper85
  • 421
  • 4
  • 14
0
votes
0 answers

Parsing in Python between 'in', '==' and 'is'

I would like to understand how parsing in Python works. More specifically, how can these three statements give three different results : 0 in [0] is True # returns False (0 in [0]) is True # returns True 0 in ([0] is True) # raises…
Kokli
  • 155
  • 7
0
votes
4 answers

How do I embed an open-source project in a django project for GAE?

I am a python newbie. Can anybody tell me how I will be embed an open-source project in my django project for GAE? Let's say I would like to embed Python markdown. Can anybody show me a direction? Can I just copy and paste my source into my django…
Winston Chen
  • 6,799
  • 12
  • 52
  • 81
0
votes
0 answers

Eclipse CDT Consistently Producing Three Inclusion Related Errors

Every time I make a new project in Eclipse Oxygen CDT, I'm always plagued by three main errors: "Type 'std::string' could not be resolved" (or similar inclusion problems), "Launch failed. Binaries not found," and "Launch failed. Program file does…
0
votes
2 answers

Programming a manual square root function?

For my class I'm programming a square root function using inclusion. No, I may not use any other method... This is my code so far, with the program nearly working. It works for perfect square roots and some other values (like 11 or 5) but it gets…
Marc
  • 133
  • 7
0
votes
1 answer

Rails validation: Get rid of the invalid value message for nil when using an inclusion validator while still preventing nil from being saved

Given validation on a field such as the following:validates :entity_type, inclusion: { in: %w(1 2), message: "is invalid" } The error messages that will be returned if the user enters nil for the field are “can’t be blank”, ” is invalid” How can…
gbright
  • 57
  • 6
0
votes
1 answer

Is there any way to match multiple date ranges for inclusion in other multiple ranges in postgresql

For example I have in database allowed ranges - (08:00-12:00), (12:00-15:00) and requested range I want to test - (09:00-14:00). Is there any way to understand that my test range is included in allowed range in database. It can be splited in even…
sl_bug
  • 5,066
  • 5
  • 21
  • 22
0
votes
2 answers

PL/SQL : given two numeric ranges, how to detect an inclusion or an intersection?

I have two numeric ranges [1, 100] and [50, 200] : 1 100 50 200 This is an intersection Another case : with the ranges [40, 100] and [10, 200] 40 100 10 200 This is an inclusion How can I write an SQL query (or a PL:SQL…
devio
  • 1,147
  • 5
  • 15
  • 41
0
votes
1 answer

How do I register a "dynamic" inclusion tag within Django?

How do I use Django's "inclusion tags" to pull a dynamic template based on an argument provided to a View? I'm creating a "Download" page for content on my website. Many different pieces of content can be downloaded, and I want to use just one View…
Sam
  • 1,952
  • 1
  • 18
  • 31
0
votes
0 answers

How to have Rails 5 inclusion validation accept either a word or it's plural

I have been teaching myself Rails for a while and am making a cat based website based off of Hartl's tutorial for practice. I want all user's to have to include either the word "cat" or "cats" in their posts. To do this I thought it would be easiest…
0
votes
1 answer

Eclipse CDT, cstdint and cinttypes types headers not found

I have a very simple eclipse C++ project with the following three files: header.h #ifndef HEADER_H_ #define HEADER_H_ #include #include #include #include #include #include void…
user8469759
  • 2,522
  • 6
  • 26
  • 50
0
votes
3 answers

Repeated Initialization of struct in Header

I'm developing a library of objects and functions and have a header file, here named super.hpp, that contains some initialization tasks. super.hpp #ifndef H_INIT #define H_INIT #include #include static bool isInit =…
AndrewCox
  • 1,044
  • 7
  • 14
0
votes
1 answer

visual studio c++ forms multiple inclusion

I know there is a lot of posts about this topic, but still I can't get it to work. I created a new project that called "nis". This is "nis.cpp": // nis.cpp : main project file. #include "stdafx.h" #include "Form1.h" using namespace…