38 Topics

Member Avatar for
Member Avatar for BustACode

Note: In Python 2.7 use: `from __future__ import print_function` to use examples. In Python, by default, the key and value pairs in a dictionary are stored as hashes, therefore dictionaries do not retain the order in which values were added, and cannot be ordered. v_Dict ={} v_Dict["First"] = 99 v_Dict["Second"] …

Member Avatar for DragonMastur
1
463
Member Avatar for game4tress

I'm using linq on a array and I need to find the index of the linq result. Is this possible? how? My thanks in advanced. This is my code: Vector3[] vertices=mesh.vertices; var V3=(from cur in vertices where (cur.x==point.PointX) && (cur.y==point.PointY) select cur).FirstOrDefault();

Member Avatar for ddanbe
0
281
Member Avatar for techker

Hey guys is it posssible to read from file and add to collectionBase?For my litle project i need to use collection and read file but the app needs to save. it saves to file but i find it faster and easyer to read from collection and search,edit,delete... string[] lineOfContents = …

Member Avatar for techker
0
252
Member Avatar for iConqueror

I am doing a little home project to learn more about collections and FileIO. I have made a little racing app where the user enters the racers details all of which are strings, and these details are inserted into a List<T> list and then once the user clicks the 'save' …

Member Avatar for tinstaafl
0
324
Member Avatar for iConqueror

I have been learning about collections such as arrays and arraylists and lists and have come across the term "interface" a fair bit. I know that an IList is an "interface" but I dont understand what an interface is or does. 1. What is an interface in C#? 2. How …

Member Avatar for BMXDad
0
201
Member Avatar for iConqueror

I have been learning about the collections namespace in C# so have been doing some little self-made projects to learn. I have made a car race app where you enter in the name, car and place of the racer this is then stored in an array list. I can extract …

Member Avatar for ddanbe
0
2K
Member Avatar for ddanbe

It comes in handy of course that you can dynamically adjust the size of a List or Dictionary. But this time I want to use a Dictionary with sizes from 1 to 8. When I have e.g. size 3, it will stay that way. On the net I found a …

Member Avatar for ddanbe
0
184
Member Avatar for iConqueror

I have a few general questions about the Collections class in C#:" 1. Because all elements in an ArrayList are stored as objects do we need to cast them into their respective types before extracting? 2. Array lists are used if the size is adjusted accordinly to elements added and …

Member Avatar for tinstaafl
0
182
Member Avatar for iConqueror

If I have an array and an array list: int[] myArray = new int[2]; myArray[0] = 1; myArray[1] = 2; ArrayList myArrayList = new ArrayList(); myArrayList.Add("1st element"); myArrayList.AddRange(myArray); By calling the Addrange() method in myArrayList, does this add the contents of myArray to the second element of myArrayList? If so …

Member Avatar for iConqueror
0
204
Member Avatar for CoilFyzx

Hello I am using jxls quite fine. I'm sort of on my last lap with exporting my data to a file. However all I want to know is, how do I display my collection in the same row please? I've manage to do this downwards in the same column, but …

Member Avatar for CoilFyzx
0
283
Member Avatar for ram_7

Hi Team, i have done how to store values from database to Hashtable collection and then able to retrive the hastable data as per specific key from the hashtable. please help me how to do in c++ for the same. please let know which collection is used in c++ and …

Member Avatar for Ancient Dragon
0
101
Member Avatar for Start4me

I have a radio button and a listbox. After clicking on the radiobutton, a collection of items will be added into the listbox. I'm trying to go back to the collection I've started working on to edit a System.Collections.Specialized.StringCollection, but after running the program, the list of items has not …

Member Avatar for G_Waddell
0
346
Member Avatar for Start4me

I have a list box, with an item "Math". When I click on the Math item, I want a new collection of items to be added to the listbox after removing the current Math item, and make a back button to appear to return Math item back in case I …

Member Avatar for Start4me
0
244
Member Avatar for IndyItMan

Greetings all. In my MVC app I am trying to iterate through 2 collections, which are similar to a jagged array (a collection of modules, each containing a collection of components). Module and Component each have an Index attribute where the sort order is specified through an admin tool. The …

Member Avatar for IndyItMan
0
232
Member Avatar for murali2489

Hi Team, Im reading Collections. It is mentioned that while intialising priority queue, it uses natural ordering by default. But my output is not like that. Below is my code and output. public class BackedCollections { public static void main(String[] args) { PriorityQueue<Integer> pq = new PriorityQueue<Integer>(); pq.offer(3); pq.offer(1); pq.offer(5); …

Member Avatar for murali2489
0
3K
Member Avatar for BenWard

Hi, I've got a class in PHP with an array of objects in it. I need to loop through these objects and call 2 methods on them but I'm not sure of the best approach. When dealing with arrays, if you use foreach, you can't seem to update the actual …

Member Avatar for BenWard
0
232
Member Avatar for vegaseat

This short snippet shows you how to preprocess a text to remove punctuation marks, then do a word frequency count using Counter() from the Python module collections. Finally, two sorts are applied to display words with matching frequency in alphabetical order.

2
653
Member Avatar for Krokcy

Hey! Im doing a project, where i have to manage a bunch of different appliences. I´ve made a custom generic collection class that has a few different search methods. Now the collection class has to hold all of the different appliances (so they all inherits from the same superclass: Appliance). …

Member Avatar for Ketsuekiame
0
253
Member Avatar for Basteon

Hello! I am making a custom control, simmilar to TreeView, in WinForms C#. And I was wondering how is the Nodes collection made. The one with Roots and Childs. I tried using a simple collection but it doesn't give the functionallity I need. [Screenshot](http://i.imgur.com/QAaW6.png, "Screenshot of the TreeView's nodes collection …

Member Avatar for Momerath
0
206
Member Avatar for anisha.silva

hi how do i do this problem how do i put this in to an array p.assign(p1, A); p.assign(p1, B); p.assign(p2, _A); p.assign(p2, _B); so that it display as p1 A B p2 _A _B because everytim i call the assign method the array index are going to be 0,0 …

Member Avatar for anisha.silva
0
147
Member Avatar for crownedzero

Working with polymorphism collections, list, arraylists etc. I have a sorted collection that I would like to split based on one of the objects properties. All records > 0 to one; all less than to another. I'm trying to think of the best way to implement this. I'm thinking Comparable/Comparator …

Member Avatar for Taywin
0
214
Member Avatar for rahul.ch

import java.util.*; class SampleA { } class SampleB extends SampleA{ } class SampleC extends SampleA{ } class VectorDemo { public static void main(String r[]) { Vector<SampleA> v = new Vector<SampleA>(); v.add(new SampleB()); v.add(new SampleC()); SampleC rect = v.get(2); } } The output says "Incompatible types. Found SampleA, required SampleC. SampleC …

Member Avatar for rahul.ch
0
221
Member Avatar for raviaaaa

HI Could yu please tell me how to get previous values from current iteration in the below example : public void parseDtoCollection(Collection dtos) contains list of dtos in private AssetClassVersion createNewAssetClassVersion(AssetDTO dto) method i am iterating but i want to get to get previous itearation values in current iteration if …

Member Avatar for JamesCherrill
0
359
Member Avatar for guru_iyer

I am new to VB programming. I recently copied a code from internet, which gives me an error of Object Reference Not Set To Instance Of Object, NULL POINTER EXCEPTION. I couldn't understand where the problem lies..!! Help.. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click …

Member Avatar for Reverend Jim
0
192
Member Avatar for thedonedeal

I currently have the following bits of code: [CODE=VB.NET]Public Class MainFrm Private _storage As New List(Of StopwatchStorage) Public TotalParticipants As Integer Private participantLbl As Label Public participantName As TextBox Private participantClock As Label Private participantContinuation As New Stopwatch Public ParticipantStop As Button Private participantContinue As Button Private participantTimer As Timer …

Member Avatar for thines01
0
156
Member Avatar for boris90

Hi, this is my first post here, and I really need some help with my homework. I'm a newbie to Java programming, and I have this assignment: [I]Write an application which reads data from a file about certain items (one row - one item, stored are the integer valued code, …

Member Avatar for DavidKroukamp
0
274
Member Avatar for anuran

iam building a training set for spam filtering using java,training set data is given as words in text files in one folder,but im unable to debug whats going wrong in java collections [CODE]/* *folder part 1 conatins various text files having name format * **spmsg***.txt and ***legit***.txt e.g 11927legit569.txt ,106127spmsgc26 …

Member Avatar for anuran
0
169
Member Avatar for kardsen

I have a routine that is supposed to grab all email addresses within a certain group. The email address list can be well over 1000 emails. When emailing it out though I can only send around 150 emails at a time. So what I i've done is executed a query …

Member Avatar for kardsen
0
131
Member Avatar for aligajani

I want to inquire what is the major difference between the usage of ArrayList and Array in the Java programming language. I would appreciate good responses and would be enthralled to continue the discussion further upon interest. Regards, Ali

Member Avatar for dheeraj208
0
186
Member Avatar for tgiller

Hello I have a problem with my vba collection object. When I run the code below I get the "out of stack space (error 28)" message. It seems to me that my collection shouldnt take up so much memory as the each object in it is just a set of …

0
99

The End.