I would like to combine topData and bottomData into completeData.  var topData = {     "auth": "1vmPoG22V3qqf43mPeMc",     "property" : "ATL-D406",       "status" : 1,     "user" : "test001@aaa.com",     "name" : "Abraham Denson" }  var bottomData = {     "agent" : "pusher@agent.com",     "agency" : "Thai Tims Agency",     "agentCommission" : 1000,     "arrival" : "arrive 12pm at condo",     "departure" : "leaving room at 6pm", }  var completeData = topData.concat(bottomData)   Since these are not arrays, concat wont work here.  Can this be done without making foreach loops?
614
I need to be able to merge two (very simple) JavaScript objects at runtime.  For example I'd like to:  var obj1 = { food: 'pizza', car: 'ford' } var obj2 = { animal: 'dog' }  obj1.merge(obj2);  //obj1 now has three properties: food, car, and animal   Does anyone have a script for this or know of a built in way to do this?  I do not need recursion, and I do not need to merge functions, just methods on flat objects.
25380
I want to combine two structures with differing fields names.  For example, starting with:  A.field1 = 1; A.field2 = 'a';  B.field3 = 2; B.field4 = 'b';   I would like to have:  C.field1 = 1; C.field2 = 'a'; C.field3 = 2; C.field4 = 'b';   Is there a more efficient way than using "fieldnames" and a for loop?  EDIT: Let's assume that in the case of field name conflicts we give preference to A.
45334
I need to combine two fields in an attribute table.  I want to do this using the field calculator.  What is the proper script to write to combine a field called "name" and "type", so that it produces one field with "name type"?  I'm using ArcGIS Desktop 10.0.
26027
How do I append an object (such as a string or number) to an array in JavaScript?
14769
I need to concatenate two String arrays in Java.  void f(String[] first, String[] second) {     String[] both = ??? }   What is the easiest way to do this?
109364
I have a method which takes params object[] such as:  void Foo(params object[] items) {     Console.WriteLine(items[0]); }   When I pass two object arrays to this method, it works fine:  Foo(new object[]{ (object)"1", (object)"2" }, new object[]{ (object)"3", (object)"4" } ); // Output: System.Object[]   But when I pass a single object[], it does not take my object[] as the first param, instead it takes its all elements like I wanted to pass them one by one:  Foo(new object[]{ (object)"1", (object)"2" }); // Output: 1, expected: System.Object[]   How do I pass a single object[] as a first argument to a params array?
23579
It's probably beginner question but I'm going through documentation for longer time already and I can't find any solution. I thought I could use implode for each dimension and then put those strings back together with str_split to make new simple array. However I never know if the join pattern isn't also in values and so after doing str_split my original values could break.  Is there something like combine($array1, $array2) for arrays inside of multi-dimensional array?
38485
is handy, but is there a similar function in the .NET framework for ?  I'm looking for syntax like this:  Url.Combine("http://MyUrl.com/", "/Images/Image.jpg")   which would return:  "http://MyUrl.com/Images/Image.jpg"
12246
I have two arrays in PHP. The first array ($author_array) is comprised of user_ids in a particular order, like so: (8, 1, 6)  The second array ($user_results) is comprised of an array of objects like so:  Array (     [0] =&gt; stdClass Object         (             [ID] =&gt; 1             [user_login] =&gt; user1         )     [1] =&gt; stdClass Object         (             [ID] =&gt; 6             [user_login] =&gt; user6         )     [2] =&gt; stdClass Object         (             [ID] =&gt; 8             [user_login] =&gt; user8         ) )   I'd like to "sort" the second array so it's in this order, which matches the order of the values in the first array of (8, 1, 6). So it'd look like this:  Array (     [0] =&gt; stdClass Object         (             [ID] =&gt; 8             [user_login] =&gt; user8         )     [1] =&gt; stdClass Object         (             [ID] =&gt; 1             [user_login] =&gt; user1         )     [2] =&gt; stdClass Object         (             [ID] =&gt; 6             [user_login] =&gt; user6         ) )   I'm weak on data structures. How could I do this? :-)  Thanks in advance for your help!  -Bob
26241
I have the following string array:  var sa = new string[] {"yabba","dabba","doo"};   I can convert it to "yabba, dabba, doo" it using string.Join() but what is the super-cool LINQ way of doing it?  The Join extension method seems promising but for a novice like me very confusing.
75432
I use this node setup to combine my two normal maps.   I adapted this method from here.    It works perfectly to just combine the maps. But now i need individual contol over the strength each of them.   Is there a way to do this ?
2769
I need to store additional information in a .blend file, that occurs only once per file. So, attaching it to, for example, bpy.types.Scene doesn't help.  Since bpy.data is an instance of bpy.types.BlendData, I tried attaching properties to bpy.types.BlendData. This failed:  &gt;&gt;&gt; bpy.types.BlendData.testProp = bpy.props.StringProperty() &gt;&gt;&gt; bpy.data.testProp (&lt;built-in function StringProperty&gt;, {})   Here, bpy.data.testProp is not a string, but some tuple, So it looks like registering properties on bpy.types.BlendData is not supported, like it is for bpy.types.Object:  &gt;&gt;&gt; bpy.types.Object.testProp = bpy.props.StringProperty() &gt;&gt;&gt; bpy.data.objects['Camera'].testProp ''   Is it somehow possible to attach properties to bpy.types.BlendData?  Are there other ways to register global data in a .blend file?
6996
How to add new item in existing string array in C#.net?  I need to preserve the existing data.
45310
Is there a built in function in .NET 2.0 that will take two arrays and merge them into one array?  The arrays are both of the same type. I'm getting these arrays from a widely used function within my code base and can't modify the function to return the data in a different format.  I'm looking to avoid writing my own function to accomplish this if possible.
66669
You can have data in wide format or in long format. This is quite an important thing, as the useable methods are different, depending on the format. I know you have to work with melt() and cast() from the reshape package, but there seems some things that I don't get.  Can someone give me a short overview how you do this?
91152
I have a small requirement where in i need to remove the duplicate values from the array that i am getting.  Overview In the below code, what i am trying to do is to get top 1000 employee names(Should Cost Modeler People Picker Field) through REST API from List A and appending those values in LIST B Drop down. But as i get all the names through REST API there are many duplicate values in the array.   What i would like to do is to remove the duplicate values and then append the values to drop down.  //Get the employee names  function getAllEmployeeNames(){ var results; $.ajax({     url: _spPageContextInfo.siteAbsoluteUrl + "/_api/web/lists/getbytitle('Should Cost Projects')/items?$select=Should_x0020_Cost_x0020_Modeler/Title&amp;$expand=Should_x0020_Cost_x0020_Modeler/Id&amp;$top=500",     type: "GET",     async:false,     headers: {         "Accept": "application/json;odata=verbose",     },     success: function (data) {         if(data.d.results.length&gt;0){             results=data.d.results;         }     },     error: function (data) {     //alert("Error");     } }); return results;   }   // To Append the Employee Name to drop down on form load.  var employeeName=$("input[title^='Employee Name']").val(); $("input[title^='Employee Name']").hide(); $("input[title^='Employee Name']").after("&lt;select id='EmployeeField' class='ms-RadioText'&gt;&lt;option value=''&gt;&lt;/option&gt;&lt;/select&gt;"); $("input[title^='Project Name']").hide(); $("input[title^='Project Name']").after("&lt;select id='ProjectField' class='ms-RadioText'&gt;&lt;option value=''&gt;&lt;/option&gt;&lt;/select&gt;"); var allEmployeeNames=getAllEmployeeNames(); console.log(allEmployeeNames);       $.each(allEmployeeNames,function(i,employee){     $.each(employee.Should_x0020_Cost_x0020_Modeler.results,function(j,item){         if(employeeName==item.Title){             $("#EmployeeField").append("&lt;option selected='selected' value='"+item.Title+"'&gt;"+item.Title+"&lt;/option&gt;");         }else{             if(item.Title!=undefined){                 $("#EmployeeField").append("&lt;option value='"+item.Title+"'&gt;"+item.Title+"&lt;/option&gt;");             }                    }        });          });   // the code that i am using to remove duplicates but it is not working.  $(allEmployeeNames).each(function() {     $(this).siblings('[value="'+ $(this).val() +'"]').remove(); });     Please help me solve this problem.  Thanks
70797
I was shocked to find out today that C# does not support dynamic sized arrays. How then does a  developer used to using  deal with this in C#?  At the beginning of the function I am not sure of the upper bound of the array. This depends on the rows returned from the database.