Questions tagged [initializing]

115 questions
3
votes
4 answers

How to make my Java destop application show an image before it starts?

I'm using NetBeans IDE 6.8 (Mac Version). which tool of their GUI builder will assist me in doing this? What I want is is to show the user an image while my application is loading for couple of seconds before I show him the application. How can I do…
M. A. Kishawy
  • 5,001
  • 11
  • 47
  • 72
3
votes
1 answer

initializing virtualenvwrapper on Mac (10.6.8) for Django

I want to use Django and create virtual environments. I don't quite understand the initializing steps documentation on the virtualenvwrapper website. I've installed virtualenvwrapper in …
2
votes
5 answers

initializing ArrayList<>() in methods or constructor

import java.util.ArrayList; public class Team { private String name; private ArrayList team; public Team(String name) { this.name = name; //how come i have to initialize it here in the constructor to see…
Y Sang
  • 23
  • 1
  • 1
  • 4
2
votes
1 answer

Array instance variable must be initialized in ctor(), must have array elements a[] passed from main

I look everywhere and cannot find an answer or a hint to my problem. I'm sure it has probably something to do with arrays being passed by reference and me having to possibly copy the elements and pass them to my instance variable, but I just can't…
TJ178
  • 45
  • 6
2
votes
1 answer

Big multidimensional vector initializaton C++

I am trying to load simulation results from a file into a vector. The code works well for small and medium amount of data. When I try do load big files I get an exception. The array that makes my program crash is about 17000*7*3000 elements. I've…
wavelet
  • 41
  • 4
2
votes
1 answer

Quoted initializer for unsigned char array in C

This seems to work in GCC and Visual C without comment: static const **unsigned** char foo[] = "bar"; This is a salt being used in a unit test. There are other ways to do it, but this is simplest and involves the least casting down the line. Will…
2
votes
1 answer

Class variables not initializing

I have a really bizarre problem that seems like some sort of compiler error, but I also feel like that's really unlikely. I have two nested classes that both have class variables. One of them (SpriteList) works perfectly fine and initializes all of…
Unlocked
  • 648
  • 6
  • 19
2
votes
1 answer

NSTextView doesn't initialize when I call readFromData:(NSData *)data ofType:(NSString*)string

I have a refreshDisplay: method that calls the setString: method of an NSTextView. I can save, and load, but when I load even though my program loads the data, it does not display it on the NSTextView as it should. I did a check and that NSTextView…
2
votes
2 answers

Initializing an array

I am doing the following for initializing an array in c++ int a; cin>>a; float b[a]; This works and compiles in my computer. IS this correct? I thought that we can only do this if a was a const int.
Karthik
  • 69
  • 6
2
votes
0 answers

grails initializing bean null pointer exception

I'm using grails 2.3.1 and I have two services. ServiceA implements InitializingBean, SomeInterface { def grailsApplication List someList @Override void afterPropertiesSet() throws Exception { // initialization of someList…
2
votes
2 answers

javascript initialize object property

This is going to be stupid, but... I for the life of me can't figure out how to initialize all the methods of an object. For instance var obj = { prop1: function() { ... }, prop2: function() { ... } //etc } Can't figure out how to initialize them…
Knight Yoshi
  • 924
  • 3
  • 11
  • 32
2
votes
1 answer

Unused variables from superclass

class ABC { private int[] variable; public int[] getVariable() { return variable; } public ABC() { variable = new int[123456]; } } class DEF extends ABC { public int[] getVariable() { return new…
Krzysztof Stanisławek
  • 1,267
  • 4
  • 13
  • 27
2
votes
1 answer

Initializing Direct3D vectors

I am using this to initialize Directx vectors. LPD3DXVECTOR3 sat_map[] = { { -1.5f, 0.0f, 1.5f}, { 1.5f, -1.5f, 1.5f}, }; Even when I try without doing an array, I always get the same error: error C2440: 'initializing' : cannot convert…
user1675016
  • 156
  • 5
1
vote
2 answers

Initializing an object inside a block

I'm trying to initialize a dict variable but I don't understand why one way works, while the other does not. In case 1 everything is alright and I can use dict later. In case 2 it will be released very soon (It will becomes a zombie) and If I try to…
majakthecoder
  • 177
  • 3
  • 14
1
vote
1 answer

How to Initialize a database from a header file or c type file

I'm working on an assignment of creating a "cat" database using a struct to record the name, gender, weight etc. of cats using C. I have made a few header files below: Cat.h #pragma once #include const int MAX_CAT_NAME = 50; enum…