Questions tagged [concept]

Concept programming is a programming paradigm focusing on how concepts that live in the programmer's head translate into representations that are found in the code space. This approach was introduced in 2001 by Christophe de Dinechin with the XL Programming Language.

Concept programming is a programming paradigm focusing on how concepts that live in the programmer's head translate into representations that are found in the code space. This approach was introduced in 2001 by Christophe de Dinechin with the XL Programming Language.

For more, see Wikipedia.

300 questions
3
votes
0 answers

A language that has function scoped, class life time variable

After asking this question, I just wondered is there any language that has this concept. Consider this piece of arbitrary code: class Foo { void bar() { static int i = 0; print(i++); } } Foo foo = new Foo(); foo.bar(); //…
isamert
  • 482
  • 4
  • 12
3
votes
5 answers

Casting enum to int in a template parameter

I have defined a custom enum for convenience over a particular class, and it is now getting in the way for getting it processed by more general processes. How should I perform this typecast? // A templated value holder: template struct…
iago-lito
  • 3,098
  • 3
  • 29
  • 54
3
votes
7 answers

Explaining a concept: Does showing code early make it clearer?

I guess this is a question that may interest many, so please discuss! :-) Now, imagine you want to show people you work with a concept for future development (like a new product or a new technology you want to introduce). Does it make sense to show…
Turing Complete
  • 929
  • 2
  • 12
  • 19
3
votes
0 answers

What is "deferred processing"? Is it possible to explain it in the context of how Android uses it?

I've been going through "Appinventor for Android" by Jason Tyler and I came across this: "Deferred processing means that a series of blocks are executed and then there is a time in the processing of the blocks where the device can receive…
Srichakradhar
  • 1,535
  • 1
  • 12
  • 24
3
votes
4 answers

iPad magazine app concept

What is the best way and technique to develop an iPad magazine-like appication? Is it possible to use HTML 5 and CSS, including swipe effects and stuff like that? What are other techniques?
tronic
  • 119
  • 1
  • 2
  • 4
3
votes
3 answers

Can Runtime polymorphism be called Inversion Of Control or otherwise

We know what Run time/Dynamic polymorphism is in OOP (principle #1). Inversion of Control simply means (by definition on wiki) Inversion Of Control (principle #2) How do you differentiate these two; can we say #1 is superset of #2. If not how do we…
Acewin
  • 1,657
  • 4
  • 17
  • 36
3
votes
5 answers

Why this happens in garbage collection injava

As I know when I run garbage collection using System.gc() method it will collect all the unused and undestroyed objects from the heap and clean it. So when I run the System.gc(); the memory of the JVM should be increased. but in the below code when…
maXfenda
  • 214
  • 3
  • 10
3
votes
3 answers

Are there parsers which parse while you type?

Context: When I learned about parsers, the process of compiling code (say, C++) was explained like this: Write code in a file and save it. Put the file in a compiler. The compiler first parses the code into an abstract syntax tree, then generates…
Joe Li
  • 33
  • 2
3
votes
3 answers

What is the difference between these two jQuery usage

Im a jquery starter so if its a wrong one forgive me :) I just want to know why placing the content at different positions made this script working, although to my best i think script to kept in head section of the document. Please explain the…
Trialcoder
  • 5,816
  • 9
  • 44
  • 66
3
votes
4 answers

Concept of Holding a reservation

I have a question and will be grateful if you can help me out with some ideas. In an online hotel or ticket booking reservation system, normally a user is allocated a specific time to complete their registration / payments etc and during that time…
Phantom007
  • 2,079
  • 4
  • 25
  • 37
3
votes
0 answers

how to make a robust image gallery like facebook

i am trying to make a image gallery like facebook one thing which troubling me a lot that how can i make image viewer robust as in facebook if a have hundreds of image in a gallery how can i increase gallery performance. Is there any magic…
2
votes
1 answer

Distinguish one and two-dimensional container using concepts

I want to distinguish one and two-dimensional containers using concepts. My first try was the following: template concept Container1D = requires(C c) { std::begin(c); std::end(c); c[0]; }; template concept…
wimalopaan
  • 4,838
  • 1
  • 21
  • 39
2
votes
1 answer

using concept to define same class with different concept

I want to create template class to get reference type and non-reference type template class with same class like below template requires (std::is_reference_v) struct RRR { T m_value{}; RRR(T init) :…
yi bruce
  • 71
  • 4
2
votes
0 answers

Friend class template with a requires-clause

The following C++20 code is accepted by both clang and GCC but rejected by the Sonar static analyzer with "requires clause differs in template redeclaration": template concept Underlying = /* expression omitted */; using Frac =…
Pavel Kirienko
  • 1,162
  • 1
  • 15
  • 31
2
votes
2 answers

How to specify "master" and "worker" nodes when using one machine to run Kubernetes?

I am using an Ubuntu 22.04 machine to run and test Kubernetes locally. I need some functionality like Docker-Desktop. I mean it seems both master and worker nodes/machines will be installed by Docker-Desktop on the same machine. But when I try to…
best_of_man
  • 643
  • 2
  • 15