primitive Questions

6

Solved

I'm learning how to use OCMock to test my iPhone's project and I have this scenario: a HeightMap class with a getHeightAtX:andY: method, and a Render class using HeightMap. I'm trying to unit test ...
Horizontal asked 12/6, 2011 at 23:2

5

Solved

Why do generics in Java work with classes but not with primitive types? For example, this works fine: List<Integer> foo = new ArrayList<Integer>(); but this is not allowed: List&lt...
Cypsela asked 27/4, 2010 at 13:24

2

Solved

According to the ES5.1 spec, the program "use strict;" "foo".bar = 42; causes a String object to be created, assigns to a property on it, and then throws the object away, result...
Nonparticipation asked 5/4, 2018 at 22:46

2

Solved

I've been reading up on Google Protocol Buffers recently, which allows for a variety of scalar value types to be used in messages. According to their documentation, there's three types of variable...
Caruncle asked 19/4, 2009 at 19:12

6

Solved

There are related questions, such as How can I pass in 2 parameters to a AsyncTask class? , but I ran into the difficulty of trying in vain to pass multiple primitives as parameters to an AsyncTask...
Churchwoman asked 22/8, 2012 at 9:4

6

Solved

In the Android API http://developer.android.com/guide/topics/data/data-storage.html#pref It says: Shared Preference allows you to save and retrieve persistent key-value pairs of primitive dat...
Scissure asked 23/1, 2013 at 6:8

6

On this site they say there are 10 LISP primitives. The primitives are: atom, quote, eq, car, cdr, cons, cond, lambda, label, apply. http://hyperpolyglot.wikidot.com/lisp#ten-primitives Stevey ...
Fatherland asked 14/8, 2010 at 7:12

1

Solved

I've been reading through The Rust Programming Language, but I've been unable to find a clear answer on what the best practice is for type annotation, specifically with primitive types. For exampl...
Maraschino asked 2/8, 2017 at 12:55

1

Solved

By default, for "type": "boolean" in JSON spec, Swagger will generate a Boolean (object, non-primitive, nullable) field in model. Is there a way to make Swagger generate boolean (primitive, non-nul...
Eadith asked 7/7, 2017 at 12:1

1

Solved

I'm trying to convert 2D list to a 2D int array. However, it seems I can only collect objects, not primitives. When I do: data.stream().map(l -> l.stream().toArray(int[]::new)).toArray(int[][]...
Ineluctable asked 1/6, 2017 at 1:42

4

Solved

I'm receiving this error using the following javascript code: function tempTest(evt) { alert(evt.currentTarget.id); ct = document.getElementById(evt.currentTarget.id); rslt = document.getElemen...
Plasmodium asked 12/7, 2011 at 15:59

2

I am very new to Java having always issue with data types. So what are the default values for all data types in Java?
Stonyhearted asked 24/5, 2017 at 6:54

6

Solved

So this works: int i; Object a = (Object) i; int[] t; Object b = (Object) t; String[] s; Object[] t = (Object[]) s; But this does not: int[] t; Object[] z = (Object[]) t; All in all I get the...
Mainland asked 31/10, 2012 at 9:26

3

Solved

I searched it all over the web, but all the answers just consisted of the difference. I know the difference, but I don't understand the difference in their applications. For example, suppose we h...
Backwoods asked 5/4, 2017 at 9:7

1

Solved

Primitives are at it again, breaking rules, I learned before. Well not technically primitive but composed of them. I learned that whenever there's no method more specific than rest, compile time e...
Wheel asked 23/3, 2017 at 13:41

10

Solved

I've read a bunch of tutorials involving XNA (and it's various versions) and I still am a little confused on drawing primitives. Everything seems to be really convoluted. Can someone show me, usin...
Diviner asked 6/11, 2008 at 20:32

1

Solved

I have a SimpleIntegerProperty which should be able to store null. However, this is not possible, as written in the JavaDoc of IntegerProperty: Note: setting or binding this property to a null ...
Linguini asked 10/2, 2017 at 13:40

5

Solved

I did some profiling on my application and one of the results turned out that about 18% of memory on the heap is used by objects of type Double. It turns out these objects are the values in Maps, w...
Defroster asked 18/1, 2017 at 17:57

2

Solved

I'm reading the advanced R introduction by Hadley Wickham, where he states that [ (and +, -, {, etc) are functions, so that [ can be used in this manner > x <- list(1:3, 4:9, 10:12) > sap...
Dumbbell asked 9/1, 2017 at 13:3

9

Solved

I wanted to make sure about something in Java: If I have a Character or an Integer or a Long and those sort of things, should I use equals or is == sufficient? I know that with strings there are n...
Grope asked 9/4, 2009 at 20:32

3

Solved

If I have the following code: function MyClass() { this.data = { // lots of data }; } var myClassInstace = new MyClass(); var myobj = { num:123, str:"hello", theClass:myClassInstance }; ...
Middlebuster asked 6/11, 2016 at 17:29

2

Solved

Why can I do this: short a = 5; But not this: void setNum(short a); setNum(5); It throws: Possible lossy conversion from int to short I understand that 5 is an integer literal and you h...
Arthritis asked 6/10, 2016 at 1:57

1

Solved

Why is this legal TypeScript? var x: number = 5 var y: Object = x Surely a number is not an Object. One might suspect that x is implicitly coerced (auto-boxed) to an object, but no: if (!(y ins...
Topsail asked 18/9, 2016 at 20:30

3

Solved

I was going through the code behind some of the basic types in Rust, e.g. the pleasantly simple implementation of Option<T> or the weird macro magic behind tuple and I was able to find all of...
Evenfall asked 5/9, 2016 at 18:7

4

Solved

I'm trying to determine the type of a field on an object. I don't know the type of the object when it is passed to me but I need to find fields which are longs. It is easy enough to distinguish the...
Baucis asked 11/12, 2009 at 23:43

© 2022 - 2024 — McMap. All rights reserved.