heterogeneous Questions
8
Solved
I saw this nice graphic which classifies which STL container would suit based on different requirements of data such as:
-- Fixed Size Vs Variable size
-- Data of same tyme Vs different type
-- ...
Appellant asked 18/10, 2011 at 9:15
2
Kubernetes allows to specify the cpu limit and/or request for a POD.
Limits and requests for CPU resources are measured in cpu units. One cpu, in Kubernetes, is equivalent to:
1 AWS vCPU
1 GCP Co...
Josettejosey asked 14/8, 2018 at 17:25
3
I have checked over the whole web and couldn't find a solution that seems to work for me..
I have recreated my stored procedure, making sure to have these lines as first lines:
SET ANSI_NULLS ON
...
Casualty asked 24/4, 2012 at 14:45
3
Solved
When using the Scala standard lib, I can do somthing like this:
scala> val scalaList = List(1,2,3)
scalaList: List[Int] = List(1, 2, 3)
scala> scalaList.foldLeft(0)((acc,n)=>acc+n)
res0:...
Kippie asked 29/10, 2014 at 15:47
4
I'm trying to implement a class that's followed in memory by an array of some arbitrary type:
template<class T>
class Buf
{
size_t n;
int refs;
explicit Buf(size_t n) : n(n) { }
// other...
Fiume asked 4/8, 2014 at 0:42
1
Solved
I am trying to create heterogeneous arrays that contain variables of different types, for example, [ 1.0, 7, "hi" ]. I tried to include class(*) or type(*) in the array constructor (please see the ...
Chatterer asked 10/11, 2015 at 1:7
2
Solved
I've run into a situation that I'm sure is not that uncommon. I have two arrays of objects that conform to a protocol and I want to check if they are the equal.
What I'd really like to do is this:...
Astrophotography asked 15/10, 2015 at 11:15
5
Solved
I have a number of unrelated types that all support the same operations through overloaded free functions (ad hoc polymorphism):
struct A {};
void use(int x) { std::cout << "int = " <<...
Ranjiv asked 17/9, 2013 at 18:5
1
Solved
Suppose I have some classes foo < handle, and bar < foo, baz < foo, and maybe qux < foo. There are a couple ways I can store an array of these objects:
As a cell array: A = {foo bar b...
Coif asked 9/12, 2014 at 17:49
1
Solved
It is easy to filter HList in shapeless by type:
val hlist = 1 :: 2 :: "3" :: true :: false :: HNil
hlist.filter[Int]
But how can I make my custom type filter? I want smth like that: for example...
Laborer asked 10/11, 2013 at 18:49
1
Solved
How can I pass some HList as an argument? So I can make in a such way:
def HFunc[F, S, T](hlist: F :: S :: T :: HNil) {
// here is some code
}
HFunc(HList(1, true, "String")) // it works perfect...
Hegemony asked 28/10, 2013 at 12:7
1
Solved
Where can I find simple examples of usage for Data.HList? From what I read in the wiki, this tool is a "better" solution for heterogeneous lists than existential types, and I don't understand why.
...
Crites asked 18/7, 2013 at 21:23
3
Solved
Let a module to abstract Area operations (bad definition)
class Area someShapeType where
area :: someShapeType -> Float
-- module utilities
sumAreas :: Area someShapeType => [someShapeType...
Signature asked 2/12, 2012 at 18:43
2
Solved
I'm trying to encode a list of items which have types restricted to be instances of some type class:
{-# LANGUAGE RankNTypes, TypeSynonymInstances, LiberalTypeSynonyms #-}
module Test where
class...
Coom asked 8/6, 2011 at 20:41
2
Solved
It seems to me that adding the property svn:ignore on files like .classpath would be a good idea. I use both Windows (work, ugh) and Linux development environments and every time I sync with the re...
Topazolite asked 17/3, 2011 at 19:34
4
Solved
I need to store a series of data-points in the form of (name, value), where the value could take different types.
I am trying to use a class template for each data-point. Then for each data-point...
Formenti asked 9/7, 2010 at 11:15
1
© 2022 - 2024 — McMap. All rights reserved.