Issue I have 2 arrays and I’d like to group them into one array: $arrayA = Array ( [0] => 08:00am [1] => 10:00am [2] => 12:00pm [3] => 02:00pm [4] => 04:00pm [5] => 06:00pm [6] => 08:00pm [7]
Continue readingTag: arrays
How to create following type of json that will usefull in type ahead with angular js
Issue I have successfully implement type ahead using angular js using this codepen. Now my data is dynamic so I want to create my own json that should looks something like following: $scope.states = [ { name: "ABCD", id: "AB"
Continue readingAngularJS and Typeahead : Accessing an array within an array based on a selected value
Issue I am new in the area concerning AngularJS and would like help figuring this out: In my controller I have the following list/object: $scope.languageModel = { brands: [{ id: 1, name: ‘ALGS’ }, { id: 2, name: ‘BLVT’ }],
Continue readingAngularJS and Typeahead : Accessing an array within an array based on a selected value
Issue I am new in the area concerning AngularJS and would like help figuring this out: In my controller I have the following list/object: $scope.languageModel = { brands: [{ id: 1, name: ‘ALGS’ }, { id: 2, name: ‘BLVT’ }],
Continue readingHow to convert base 64 to byte Array?
Issue How to convert base64 to byte Array in angular. I am trying it but it doesn’t work. // file upload handleUpload(event) { if (event.target.files[0]) { this.file = event.target.files[0].name; } const file = event.target.files[0]; const reader = new FileReader(); reader.readAsDataURL(file);
Continue readingSplitting a large matrix
Issue I’m using Julia to ingest a large two dimensional data array (data) of size 1000 x 32768; I need to break up the array into smaller square arrays along both dimensions. For instance, I would like to break data
Continue readingAcessing element of an array which is a element in a matrix
Issue Currently I am working on a project where I have to transform a Matlab code into a Python code. Now I am stuck on small problem which might be a big problem. For example I have a Matrix and
Continue readingRemove unselected value from dropdown array – ngx-select-dropdown
Issue context: Angular applications using the ngx-select-dropdown. A user can select multiple values, these values get sorted into "buckets" and sent to the api. Issue: I am unable to remove a selected item from the end array – this.filterState. I
Continue readingRegEx to match stuff between parentheses
Issue I’m having a tough time getting this to work. I have a string like: something/([0-9])/([a-z]) And I need regex or a method of getting each match between the parentheses and return an array of matches like: [ [0-9], [a-z]
Continue readingSort 2D array by average value of each line
Issue I have complex task to differently sort two dimensional array manually. So far I get done those tasks: User needs to input row size from 10 – 20, Generate 2D array where row size is user input and column
Continue readingHow to add a currency symbol to my array?
Issue Goal: Display my list of commission pay with a £ symbol. Explanation of what the problem is: When it comes to displaying the result it does not print the whole result instead it just prints the £ symbol. What
Continue readingSort multidimensional array by column value within a column
Issue I have an array in PHP and I need to sort by a nested array inside of the array… Here is my array: Array ( [0] => Array ( [project_id] => 1 [earnest_money_due] => Array ( [value] => 1000.00,
Continue readingSort multidimensional array by column value within a column
Issue I have an array in PHP and I need to sort by a nested array inside of the array… Here is my array: Array ( [0] => Array ( [project_id] => 1 [earnest_money_due] => Array ( [value] => 1000.00,
Continue readingMapping a string Array to an Object using ValueInjecter
Issue I’m looking for suggestions on how I might solve the following problem using ValueInjecter. NOTE: Before anyone jumps in and a) tells me I’m doing it wrong or b) tells me I shouldn’t be using ValueInjecter – please don’t.
Continue readingHow to clone a multidimensional array in java?
Issue Edit 2: Below is a code snippet based on DuffyMo’s response that illustrates how to get around the limitations of cloning for multidimensional arrays using System.arraycopy. import java.util.Arrays; public class Randar { public static int[][] arrayMaster = {{6,1}, {10,1},
Continue readingCopying Array Dimensions
Issue I have a method, aModify(), that takes two object references, a1 and a2, and two String values, dim1, and dim2. public static Object aModify(Object a1, String dim1, Object a2, String dim2); a1 and a2 will be passed in as
Continue readingClone Div When Randomly Chosen More Than Once from Array
Issue I’m displaying a certain number of divs randomly. However, I want to allow repeating of divs, so I assume I’ll need to clone divs that are chosen more than once. I have everything except for the cloning part down,
Continue readingTypeScript: Modifying copy of list of dictionary without mutation
Issue I have gone through several of the answers and I gather that this might be a logical error but I am not able to figure a way to achieve this. I have to list of dictionaries in typescript/javascript. One
Continue readingWhat does List[:][:] really do in Python?
Issue I tried to make a copy of a 2 dimensional array using the splicing operator. Intuitivelly, it feels like if I do this: L = [[5, 6], [7, 8]] M = L[:][:] then M would be a cloned copy
Continue readingWhat does List[:][:] really do in Python?
Issue I tried to make a copy of a 2 dimensional array using the splicing operator. Intuitivelly, it feels like if I do this: L = [[5, 6], [7, 8]] M = L[:][:] then M would be a cloned copy
Continue readingIs there a way to clone an array which is nested inside another array in an object
Issue I have an obj that looks like this. let obj= { title:"my form", endTIme:"2/20/22", mainList:[ { type:"multiple", checked:false, multiple:[ { optionCheck: false, optionAnswer:"" } ] } ] } I also have a button that every time I click, I
Continue readingReference Error inside ngOnInit
Issue I am receiving an error on in my console that says ERROR ReferenceError: sortedArr is not defined after I have defined it and sorted it. Here is my app.component.ts file: import { Component } from ‘@angular/core’; import { HttpClient,
Continue readingpushed Array undefined on ngAfterViewinit
Issue i have pushed some values on an Array on Angular ngOnInit and data became unusable on ngAfterViewInit, It shows the particular value as Undefined randomNUMber = []; ngOnInit() { this.apiServices.getLineChart(this.coinId).subscribe(resc => { for (let i =0 ; i <
Continue readingWhy won't this array property populate
Issue I have two multidimensional arrays that have some shared data. The elements are not in the same order between the two arrays, nor do the property names match in every instance. However, the fields to compare will always have
Continue readingCreating an array from a text file in Bash
Issue A script takes a URL, parses it for the required fields, and redirects its output to be saved in a file, file.txt. The output is saved on a new line each time a field has been found. file.txt A
Continue readingDrawing a bar chart by passing values from a json array through angularjs
Issue I have a JSON array as follows { “id”: “00000005”, “Name”: “Test5”, “hours”: 7.5, “day”: 1 }, { “id”: “00000005”, “Name”: “Test5”, “hours”: 2, “day”: 2 }, { “id”: “00000005”, “Name”: “Test5”, “hours”: 3, “day”: 3 }, { “id”:
Continue readingStrongloop Loopback: where filter with two arrays
Issue I want to add a where filter in strongloop / loopback which compares two different arrays. I have the following model: “properties”: { … “audience”: { “type”: [ “string” ], … } I want to create a where clause
Continue readingFilters not working on array from resource
Issue I have a filter that is not returning anything when it is run on an array from a factory. But when I copy paste the array directly into the filter, it works fine. There must be a simple solution,
Continue readingAngular resource with response type text/plain always makes an array of strings
Issue I made resource that receive records count from rest service as text plain. Angular makes an array of each chars from answer. For example if rest answers 20, angular will make array [2,0]. Can I fix it without transforming
Continue readingExpected response to contain an array but got an GET
Issue I researched this question everywhere but no solution is working for me. like this: Error: [$resource:badcfg] Error in resource configuration. Expected response to contain an array but got an object? I am still getting the error of bad configuration.
Continue readingpushing multiple arrays into one is forming a 2 dimensional array
Issue Following code is returning the length of allRows[] as 3, because it has 3 arrays in it. I am trying to build one final array allRows. getRows() { return this.element.all(by.css(“.xyz”)).getText(); } getTotalRows() { const allRows = []; for (let
Continue readingexpected ndim = 4 found ndim = 5 and other errors – Keras – GTSRB dataset
Issue I’m trying to make a CNN model based on the GTSRB dataset (link given below), but I’m faced with the following error: When I set the input_shape = input_shape=(3, IMG_SIZE, IMG_SIZE), I get this error: ValueError: Error when checking
Continue readingAngular ngFor – get a property in ts
Issue I need some help here please… Im making a chat app with angular and material, and i need to show the user nickname only one time before the next user messages enter in action (like whatsapp or similar), something
Continue readingC# – Have an index array full of strings that I want to print as strings instead of chars
Issue Can someone help me print out a string instead of a char via string interpolation when your strings are indexed in an array? As seen the printed in the if statement – {text[3]} etc. static void Main(string[] args) {
Continue readingTaking a string, reversing the letter in each word while leaving the word in its original position
Issue I am trying to take a sentence, and reverse the positions of the letters in each word. Below is my code that does not work: def test(sentence) array = [] array << sentence.split array.collect {|word| word.reverse} end My problem
Continue readingHow to iteratively interpolate elements of an array into a string in Ruby?
Issue I’m trying to do something like this: my_array = [1,2,3] puts "Count numbers" + my_array.each {|n| " #{n}"} What I would like to see is "Count numbers 1 2 3". But because .each returns the array, and not what
Continue readingJavaScript function that takes a multidimensional array, flattens it, then returns array values as string in choice order
Issue Having trouble with a certain objective where I have to create a function that takes a multidimensional array and returns a flat array with sentence string values using values from the given multidimensional array. I’m having a hard time
Continue readingPrint formatted strings with variables while synchronously iterating multiple arrays
Issue It is known that array_combine is used only for two arrays. For example $name = array(‘John’,’Brian’,’Raj’); $salary = array(‘500′,’1000′,’2000’); $details = array_combine($name, $salary); foreach($details AS $name => $salary){ echo $name."’s salary is ".$salary."<br/>"; } Let add 2 arrays in
Continue readingAngular 5 build form array from JSON result
Issue I am having the following issue with Angular form arrays, I was wondering if someone could help me out as I am quite new with Angular? Apologies I cannot provide a plunker due to the complexity of the project
Continue readingAngular js – ng-class="" with simple condition won't work
Issue Hi, i’m trying to add a class to an element via ng-class. As you can see, the code is very simple but it doesn’t add the class: app.run(function($rootScope, $location,$http,ngDialog,array_helper){ var update = function() { /*CONFIG PARAMS*/ $rootScope.config = {};
Continue readingapplying class in ng-repeat if contained in another array
Issue I am querying for a collection of IDs from Parse.com and showing them in my $scope as an array. I would like to apply a class to the items in my $scope that match any one of these IDs,
Continue readingHow do I make an ngClass reactive to array membership in Angular?
Issue I’m trying to make a list class reactive to whether that list member’s ID is in an array. I could handle that with a function in the controller, but that doesn’t automatically update the class if the array changes.
Continue readingArray of objects set to 'active' in Angular
Issue I have a listing of items utilizing ng-repeat Object var items = [{“name”: “item1”}, {“name”: “item2″}… ]; HTML <div ng-repeat=”item in items” ng-click=”addItemToCollection(item)”> {{item.stuff}} </div> addItemToCollection simply takes which one was selected and adds or splices it into a
Continue readingCompare two arrays and using ng-style to mark equal entries in the arrays
Issue I have a list which shows a query of words from a db, from there i can click on one word and it gets pushed to another list which i can save than. With this i can create different
Continue readingC# Collection Initializer not honored in an object initializer
Issue Why isn’t a collection initializer honored in an object initializer? public class Foo { public string[] Bar { get; set; } public Foo() { } } class Program { static void Main(string[] args) { var foo = new Foo()
Continue readingHow to override ToString() in [] array?
Issue Say, if I need to override ToString method in a custom List, I’d do this: public class WebUILanguage2 : List<WebUILanguage> { public override string ToString() { return “Overridden message”; } } but what if I want to override this?
Continue readingangular-ui-tree, populate the tree from data from DATABASE
Issue I am using the angular-ui-tree library to display the folder structure. I am storing the node objects in a MongoDB database. Each node object looks like this { “node_name” : “Folder 1”, “node_path” : “AAABBB”, “node_id” : 103, “node_parent_path”
Continue readingFile.ReadAllBytes doesn't read the PNG image pixels properly
Issue I am trying to read the bytes of a .png image using File.ReadAllBytes(string) method without success. My images are of size 2464x2056x3 (15.197.952 bytes), but this method returns an array of about 12.000.000 bytes. I tried with a white
Continue readingCodeIgniter: Passing database array data to a template file
Issue In my application I am trying to populate a sidebar menu list with rows from a database table. More specifically, I try to retrieve team name where the coach has the same user_id as the user that is logged
Continue readingGet Array value by string of keys
Issue I’m building a template engine for my next project, which is going great. It replaces {tag} with a corresponding value. I want {tag[0][key]} to be replaced as well. All I need to know is how to get the value,
Continue readingAccessing array index with Rivets.js
Issue I am wondering why accessing an index of an array bound in rivets.js works with the . operator and not the standard access way with []. For example let’s say we bind var binding = {name: “binding”, arr: [0,1,2]}
Continue readingMustache templating – Using array values as object keys
Issue I have an array of values and object of key-value pairs: var array = [“first”, “second”]; var object = { “first”:”firstvalue”, “second”:”secondValue” }; I would like to iterate through array and base on the value, pick the value from
Continue readingReturn array of objects from Handlebars Helper
Issue I’m trying to write a helper that will return an array of objects that can then be looped through. Here’s what I have now: Handlebars.registerHelper(‘testHelper’, () => { return [ { slug: ‘Test’, title: ‘This is it!’ }, {
Continue readingconditional on last item in array using handlebars.js template
Issue I am leveraging handlebars.js for my templating engine and am looking to make a conditional segment display only if it is the last item in array contained in the templates configuration object. { columns: [{<obj>},{<obj>},{<obj>},{<obj>},{<obj>}] } I’ve already pulled
Continue readinghow can i search name by array data display by button or href link angular 1.6.X
Issue i want to make dynamic code strong text // angular.bootstrap(document.getElementById(‘app’), [‘app’]); var app=angular.module(“App”,[]); app.controller(“AppCtrl”,function($scope){ $scope.adults = [ { “Name”: “pro1”, “categories”: [ ‘cat1’ ] }, { “Name”: “pro2”, “categories”: [ ‘cat2’ ] }, { “Name”: “pro3”, “categories”: [ ‘cat3′,’cat1’
Continue readingCameraX implementation with ZXing 1D barcode reader, ImageProxy is rotated 90 degrees from the target and can't find a way to rotate it
Issue I am trying to use CameraX with ZXing library to identify barcodes, I am using ImageAnalyzer to get ImageProxy and feed its byte array to the PlanarYUVLuminanceSource to handle it by ZXing. My target rotation is 0 and the
Continue readingTrying to output a custom powershell object where I can align each line of two different variables containing Category:Description
Issue I’m trying to do an network access control audit by grabbing a user’s AD groups, their descriptions and then output them in a way shown by this example: [User] @[1]Groups : @[1]GroupDescription @[2]… @[3]… Below is what I have
Continue readingHow to search json for a string and output a parent value using jq?
Issue Trying to pull a value out with jq, but didn’t seem as easy as i originally thought. I have a variable of CAR="baga6e~tlwdcmli__QmbHKa~G65fMXzh.car". How can i use this variable to return the parent "piece_cid" ? Example: Using a bash
Continue readingPowershell: Add objects to an array of objects
Issue I have this script where I want to add an object to an array called $Target in every foreach. foreach ($Machine in $Machines) { $TargetProperties = @{Name=$Machine} $TargetObject = New-Object PSObject –Property $TargetProperties $Target= @() $Target = $TargetObject }
Continue readingIF + AND Statements
Issue I have a ‘Current Result’ in the form of a data frame in Python (depicting in Excel as an illustration). I’d like to add a column that classifies whether a row is a ‘PRIME’ or an ‘ALT’ designation. The
Continue readingBest Practice : Print an array in a bash script
Issue I ran shellcheck on my script and ran into an error on a very simple aspect – echo “List of fields deleted: ${deleted[@]}” ^———–^ SC2145: Argument mixes string and array. Use * or separate argument. I am trying to
Continue readingInitialized in a function and is not initialized in main
Issue I am trying to allocate memory in a function and I am not sure what I am doing wrong. I want this: int main() { int* test= 0; initialize(test, 10); int test2 = test[2]; delete[] test; } void initialize(int*
Continue readingCoffeeScript Adding object to an array
Issue I have the following code: class Number number = null constructor: (num) -> number = num getNumber: -> number class Sequence numbers = [] constructor: -> addNumber: (n) -> numbers.push new Number n displaySequence: -> for number in numbers
Continue readingPowershell scoping change?
Issue I’ve been having an issue with updating a global variable in a function. I found the following article, which looked promising: Variable scoping in PowerShell However, I discovered that nothing he posted matched the output I saw. Here’s his
Continue readingHow to make an array accessible under different functions in Javascript?
Issue Im using React Table to fetch data from an API and populating it in the table. I make an API call and get the data. Once I have the data, I extract a field which contains the email ids
Continue readingeloquent javascript exercise 4.2 reversing an Array
Issue In the following code I do not understand why reverseArrayOne does not return the reversed array as compared to reverseArrayTwo. In essence I believe I’m assigning the reversedArray to Array in both cases. link to question http://eloquentjavascript.net/04_data.html#c_F3JsLaIs+m function reverseArray(array)
Continue readingWhy do changes to an array 'B' in JavaScript spread to an array 'A' (which was used to define 'B' but thereafter never directly modified)?
Issue I created a constant named ‘alphabet’ and assigned it to an array containing the first 5 letters of the alphabet. I then wanted to have a function that would add a number to each character in the array, to
Continue readingsimple multiple selection ng-selected with array not working
Issue This is my category list $scope.categories= [{“category_id”:”1″,”category_name”:”sports”},{“category_id”:”2″,”category_name”:”casual”},{“category_id” :”3″,”category_name”:”formal”},{“category_id”:”4″,”category_name”:”party wear”},{“category_id”:”5″,”category_name” :”winter”},{“category_id”:”9″,”category_name”:”summer”}] The product can have multiple categories. $scope.product_categories=[{“category_id”:”3″},{“category_id”:”4″},{“category_id”:”5″}] I have these two array first array categories holds all the category. and second array holds the category which that product has.
Continue readingRESTAngular: GET request – objects array
Issue I’m trying to make a simple get request for hours, but it just not working. I have a service which responsible of the array , when I defined the array I call service that I built for the restAngular
Continue readingAttribute Error: 'List' object has no attribute 'shape' . Error while trying to train the model with multiple features( multiple arrays)
Issue I have two arrays "train_vol" and "train_time" with shape (164,6790) and one array "train_cap" with shape(164,1). I want to train the model like this… inputs–> train_vol and train_time output–> train_cap …..validation inputs –> val_vol,val_time and validation output –> val_cap….shape
Continue readingHow to slice a list into 2 parts based on percentage?
Issue I need to split my array into two parts the first one needs to have the first 90% and the next one should have the rest. But I get a corrected result for only the second array. ex: from
Continue readingCountNonDivisible – Codility training task
Issue I’m traning on codility now. Some tasks I can solve by myself, but with some tasks have problems. Difficulty of this task is <**>. It’s medium, but I stalled. Problem: You are given a non-empty zero-indexed array A consisting
Continue readingIs it possible to store AngularJS functions in arrays and put the functions in ng-click?
Issue I was trying to make a few buttons using Array. The buttons displayed, but the function from the array is not working. var module = angular.module(‘app’,[]); module.controller(‘Ctrl’,[‘$scope’, function ($scope){ $scope.data = [ {link: “myNav.pushPage(‘page1′)”, btn:’Page 1’}, {link: “myNav.pushPage(‘page2’)”, btn:’Page
Continue readingI am having an booking application in which i have to disable the already booked date in date range picker
Issue date range in html form <div class="form-group " id="input-dates"> <input class="form-control date-range-picker" id="dateRange" type="text" name="dates" placeholder="<?php echo get_phrase(‘when’); ?>.." autocomplete="off" required> <i class="icon_calendar"></i> </div> I have to pass the date range which are coming from mysql database to date
Continue readingType ModalBackdropComponent is part of the declarations of 2 modules: MyModule and AppModule
Issue Environment: Angular 2 RC5, ng2-bootstrap.. Upgrading from RC4 to RC5 Error: Uncaught EXCEPTION: Error in http://localhost:4200/app/forgot-username/forgot-username.component.html:39:60 ORIGINAL EXCEPTION: Type ModalBackdropComponent is part of the declarations of 2 modules: Myodule and AppModule! ORIGINAL STACKTRACE: Error: Type ModalBackdropComponent is part of
Continue readingHow to do nested loops inside template view in angular2+
Issue I need to view different array indexes and their values inside my template. I have this object: vegetables = [ {name: ‘Carrot’, type: ‘vegetable’}, {name: ‘Onion’, type: ‘vegetable’}, {name: ‘Potato’, type: ‘vegetable’}, {name: ‘Capsicum’, type: ‘vegetable’}], [ {name: ‘Carrotas’,
Continue readingDrawing a bar chart by passing values from a json array through angularjs
Issue I have a JSON array as follows { “id”: “00000005”, “Name”: “Test5”, “hours”: 7.5, “day”: 1 }, { “id”: “00000005”, “Name”: “Test5”, “hours”: 2, “day”: 2 }, { “id”: “00000005”, “Name”: “Test5”, “hours”: 3, “day”: 3 }, { “id”:
Continue readingDrawing a bar chart by passing values from a json array through angularjs
Issue I have a JSON array as follows { “id”: “00000005”, “Name”: “Test5”, “hours”: 7.5, “day”: 1 }, { “id”: “00000005”, “Name”: “Test5”, “hours”: 2, “day”: 2 }, { “id”: “00000005”, “Name”: “Test5”, “hours”: 3, “day”: 3 }, { “id”:
Continue readingDrawing a bar chart by passing values from a json array through angularjs
Issue I have a JSON array as follows { “id”: “00000005”, “Name”: “Test5”, “hours”: 7.5, “day”: 1 }, { “id”: “00000005”, “Name”: “Test5”, “hours”: 2, “day”: 2 }, { “id”: “00000005”, “Name”: “Test5”, “hours”: 3, “day”: 3 }, { “id”:
Continue readinginverting image in Python with OpenCV
Issue I want to load a color image, convert it to grayscale, and then invert the data in the file. What I need: to iterate over the array in OpenCV and change every single value with this formula (it might
Continue readingnumpy with python: convert 3d array to 2d
Issue Say that I have a color image, and naturally this will be represented by a 3-dimensional array in python, say of shape (n x m x 3) and call it img. I want a new 2-d array, call it
Continue readingHow do you reindex an array in PHP but with indexes starting from 1?
Issue I have the following array, which I would like to reindex so the keys are reversed (ideally starting at 1): Current array (edit: the array actually looks like this): Array ( [2] => Object ( [title] => Section [linked]
Continue readingWriting a simple quiz, how to access the choices that are defined in a variable
Issue Probably something very basic but I’m trying to write a simple JS quiz, and I have an array for the questions, choices and answers all in one: const questions = [ { question: "What is JavaScript?", choices: ["An interesting
Continue readingFind index position in list based on more than one partial string and using operator in python
Issue Suppose you have a list mylist mylist = ["aa123", "bb2322", "aa354", "cc332", "ab334", "333aa"] how to find an index for element that have both ‘aa’ and ‘3’? I expect the value returned to 0 "aa123", 2 "aa354", 4 "ab334"
Continue readingIndex numpy arrays with a list of numbers
Issue I want to index a numpy array based on specific numbers, e.g., I have the following np array, b = np.array([[1, 2, 3, 2, 1, 3],[2, 1, 3, 5, 4, 1]]) And I want to change to zero the
Continue readingFunction to filter non digit characters in a string
Issue So I’m currently trying to create a function to filter out non digit characters but I can only use strlen. For example, "a4n55" -> "455" I’ve attempted it and I feel like I’m close. The printf’s are just for
Continue readingWhy does indexing in an array break type safety in TypeScript?
Issue The whole point of adding static types to JavaScript is to provide some guarantees about type safety. I noticed that array indexing seems to break type safety without using any dirty tricks like as any or the not null
Continue readingPrint respective index value from two arrays in " Javascript " and in " PHP "
Issue Print respective index value from two arrays in ” Javascript ” and in “PHP” var a = [ x , y , z] var b = [ p, q, r] then => values [x, p] , [ y, q]
Continue readingPHP Issue accessing array of objects by index – not working but seems like it should
Issue The short version is that I have an array of objects which was decoded from a JSON response from a web service and despite my best efforts, I can’t access the objects in that array by index. I’m specifically
Continue readingWhat is the difference between the C++ array operator and *(array + index) if any?
Issue I frequently use code like the following to index items out of arrays just to remind myself that the array value is a pointer to the first element of the array. int array[] = {0,1,2,3,4,5}; *(array + 2) =
Continue readingGenerate array with with range of integers
Issue I have two values: [3:6] I was trying to play something around in Golang but I can’t manage to find a good method to create an array according to those values. This what I would like to achieve: [3,4,5,6]
Continue readingHow do I check against the first 7 elements of the list in order to print some text?
Issue From an array, I am trying to use an if statement with 3 conditions – if the chosen word from the ‘wordlist’ list has not yet been guessed correctly and over 7 attempts have been made, I wish to
Continue readingEfficiency of Arrays vs Ranges in Ruby
Issue While working on something recently, I started to think about the efficiency of Arrays and Ranges in Ruby. I started to try and research this but could find very little information on it or even how I could test
Continue reading(excel) How to return an array from a sum of ranges?
Issue I’m setting up a morphological table that will have to go through potentially a couple hundred items, so it’s desirable for this process to not be done by hand. Here’s a small summary of the situation: fin eng op
Continue readingRoutine that tests if a point is within a range
Issue Can anyone help me ? for C# I need to implement a routine that tests if a point is within a range ( array ), C# in the figure below the ranges are [1-3],[6-9], [11-15] i would like to
Continue readingVBA Find if an array (made up of range) contains a specific value
Issue I’m trying to write a code which takes a specific predefined, hardcoded value and a range made up of values from 3rd to last column with value (just one row) and sees if my array contains that specific item.
Continue readingHow can I iterate subranges in a "cyclic array"?
Issue I’m trying to write the following Perl subroutine. Given are an array a of length n, an index i in the array (0<=i<n an upstream window length u and a downstream window length d. I want to iterate over
Continue readingHow can I iterate subranges in a "cyclic array"?
Issue I’m trying to write the following Perl subroutine. Given are an array a of length n, an index i in the array (0<=i<n an upstream window length u and a downstream window length d. I want to iterate over
Continue readingHow to import range as array, from Excel into Word document
Issue I’m working on a VBA Word Macro to create a document with personalized headers. I have a spreadsheet with the text to be inserted in the Headers (every row shall be inserted on an individual page). To do so,
Continue readingCopy Multiple Non-Adjacent Columns To Array
Issue I’m trying to copy multiple non-adjacent (non-contiguous) excel columns to an array but it’s not working. Below is what I’ve tried… Public Function Test() Dim sh As Worksheet: Set sh = Application.Sheets(“MyWorksheet”) Dim lr As Long: lr = sh.Cells(sh.Rows.Count,
Continue reading