I am asking for help to solve the problem renaming the strings in array that looks like this: ["a(1)","a(6)","a","a","a","a","a","a","a","a","a",
I need to keep the values of each input in an js object. This is my html code : <div class="produs_varianta"> <input type="text" class="product_name" value="Product One"> <input type="text"
I am trying to access json object in python and I am running through different errors this is the data value = '{"0":{"created":"05-16-13","counter":3},"1":{"created":"05-17-13","c
I am new in python and please excuse me if my question is a basic question or is not clear. I have a class in python and I want to set some attributes for my objects whenever I generate my objects from this class. I know, I must use __init__ method f
How can I convert a JavaScript object property and value into a string? example: { name: "mark", age: "20" status: "single" } expected output: name:mark AND age:20 AND status:singleThere are a number of ways to do this, all v
How can I access objects created in one method in other methods? I want to do this so that I don't have create the same object over and over again every time I create a new method, and want to use that object within it. This is the class I am working
I create a two pointer object of a class 'myclass' myclass *obj1,*obj2; can I compare these two objects using comparison operator and pointer expression i.e *obj1==*obj2 If yes, how does it happen? If not, why isn't his allowed?If yes, how does it ha
I am reading objects from a file using Serializable: public ArrayList<Object> deserialzePerson(String filename) { Object obj = null; ObjectInputStream ois; try { ois = new ObjectInputStream(new FileInputStream(filename)); for (int i = 0; i < 100;
in this example showing how to do it : Student[] stud1 = new Student[2]; Student[] stud2 = new Student[2]; Student[] stud3 = new Student[2]; boolean b; stud1[0]= new Student("Johnny","Bravo"); stud1[1]= new Student("Ace",&quo
Let see my Angularjs code: My function 'getequipselected' from my 'EmpApi' factory request data of my webservice and save it in response: EmpApi.getequipselected(idequip).success(function (response) { $scope.editequipamento = response; console.log(re
In a class, I want to define an empty object and use it anywhere we need it. This object needs to be immutable to avoid accidentally modification. If this object is defined as a public static final member of the class, the object could be changed if
I have one class, where some number of fields are located. public class Equipment { public String GlobalType; public String NameEquip; public String SerialNumEquip; public String EquipmentMark; public String IDequipment; public String StatusEquipment
My program is supposed to take words and definitions from the user and display them like flash cards. I've got all the words sorted out into classes and such and now all I need to do is make it so that when a button is pressed by my application, the
This is not actually a jQuery question, but jQuery does something I would like to be able to do with other objects. I notice that jQuery returns the number of elements using the .length property. However, the jQuery object is not actually an array, s
This question already has an answer here: What is the difference between string literals and String objects in JavaScript? 7 answers I'm reading about the difference between String literal and String objects. See What is the difference between string
I am creating multiple HTML elements. Elements have different properties. I would like to get the property name, and the its value using index. var elements = [ {"type":"div","className":"items","id":"
I have the below code <html> <head> <title>Hello!</title> </head> <body> <div class="div1"> <h1>This is a headline!</h1> <br> <img src="header-image.png"> </div> &
$.each(constructions, function(i,v) { if ($.inArray(v.name, map[ii].buildings) == -1) {//stuff} }; Where constructions is an array of objects, each with a unique name. map[ii].buildings is an array containing some of these objects. I want to iterate
I am working with a Point object that has an x and y component, Point(double x, double y). I want to write a function that changes the values of the x and y component without having a new Point p = ... For Example, this is my current version: public
In order to access a non-static members/variables of a class you need to first create an object in public static void main(String args[]) method. Does this mean that all the objects that are created are static? I need a clear explanation and also I n
The following code in java, when run on elipse, gives same output even if we replace superclass s=new sub(); with, sub s= new sub(); Note that we have overridden methods. Output is: changed supermethod in sub class num is sub class 5 Code: public cla
This question already has an answer here: How to use LINQ to select object with minimum or maximum property value 11 answers I have a class like this class car { public string carName { get; set; } public decimal price { get; set; }//Group id } I hav
So i'm making a snowboarding game with SDL, and I have a function in the obstacle class that checks for collision. When the obstacle calls this function, if the player collided with it I went to set the collidedObject of the player class to the objec
public class Ship { public static int[] size = {3, 2, 3, 5, 4}; public static String[] shipNames = {"Destroyer", "Cruiser", "Submarine", "Aircraft Carrier", "Battleship"}; public Ship(String shipNames[], i
I recently stated using pointers in a program and when I try the following, I am given this error. stored_points.push_back(new Point(anchor_y,anchor_x,last_direction)); error C2664: 'void std::vector<_Ty>::push_back(_Ty &&)' : cannot convert
here is my JavaScript code: var Model = { get: function(id) { return this.data[id]; }, data: {}, init: function() { var self = this; $.getJSON(urlToServer, function(data) { $.each(data, function(i, object) { self.data[object.id] = object; console.log
I am very used to Java where I can create an ArrayList to hold multiple objects, but I don't know how to do it in C++. I have 6 different objects: WebcamData UltrasonicData KinectData ImuData GpsData SickData I need to hold an instance of each in one
Having a problem trying to sort a JSON object. Basically, people can add products in any random order to our order form, but the order it shows in the summary needs to be how we want them to be positioned (not the order they select them), so thats wh
How can I get the list of elements and datatypes of an array of an object in c# with reflections? Scenario: I have a method with an array parameter in my web service (asmx). Using reflection I am reading the method parameters and loop through the pro
I have an array of objects in Ruby on Rails. I want to sort the array by an attribute of the object. Is it possible?I recommend using sort_by instead: objects.sort_by {|obj| obj.attribute} Especially if attribute may be calculated.