Issue Sub CopyInsertRow() ActiveCell.Offset(1, 0).EntireRow.Insert ActiveCell.EntireRow.Copy ActiveCell.Offset(1, 0).EntireRow ActiveCell.Offset(1, 0).EntireRow.Font.Bold = False Cells(ActiveCell.Offset(1, 0).Row, 6).ClearContents Cells(ActiveCell.Offset(1, 0).Row, 4).ClearContents Cells(ActiveCell.Offset(1, 0).Row, 2).ClearContents Cells(ActiveCell.Offset(1, 0).Row, 3).HorizontalAlignment = xlRight End Sub This macro is to insert a new row, and then copy down
Continue readingTag: optimization
[SOLVED] Better way to detect XML?
Issue Currently, I have the following c# code to extract a value out of text. If its XML, I want the value within it – otherwise, if its not XML, it can just return the text itself. String data =
Continue reading[SOLVED] Java call multiple selected methods in a loop
Issue I’m looking for some help in optimizing my code and write it using less number of lines. I have a Class say A which has few methods defined like below: Class A{ public void doSomethingA(){ } public void doSomethingB(){
Continue reading[SOLVED] Optimization of numpy array iteration
Issue I’m trying to optimize the performance of my python program and I think I have identified this piece of code as bottleneck: for i in range(len(green_list)): rgb_list = [] for j in range(len(green_list[i])): rgb_list.append(‘%02x%02x%02x’ % (red_list[i][j], green_list[i][j], blue_list[i][j])) write_file(str(i),
Continue reading[SOLVED] Need to loop in VBA choosing different sets of data until I add to the sum of X
Issue thanks for reading and helping out. I have a series of data in Excel (280,000 lines) with random values (each line represents the total ticket of consumptions made in a supermarket branch) I need to to select tickets from
Continue reading[SOLVED] Optimize loops for/if in R
Issue I have had trouble executing this command due to the extended time related. df has 758k rows x <- data.table(df$variable1) # day of week (1-7 integer) from case 1 y <- data.table(df$variable2) # day of week (1-7 integer) from
Continue reading[SOLVED] Gurobi Python Programming_ solve an optimization problem n times with a contraint that varies for a constant (eps)
Issue Can you help me understand why if I compute this code, I always get the same solution (n times) instead of having different solution for each value of eps? from gurobipy import GRB from gurobipy import Model import math
Continue reading[SOLVED] How to handle CR and LF in the proper way in Java (android)
Issue So I have noticed that the bytes CR (13) and LF (10) are not fully being respected in Java. When there is a CR byte it doesn’t just return the carriage but it also creates a new line. Which
Continue reading[SOLVED] Memory leakage issue in python list
Issue The identities list contains a big array of approximately 57000 images. Now, I am creating a negative list with the help of itertools.product(). This stores the whole list in memory which is very costly and my system hanged after
Continue reading[SOLVED] How to iterate over a list in chunks
Issue I have a Python script which takes as input a list of integers, which I need to work with four integers at a time. Unfortunately, I don’t have control of the input, or I’d have it passed in as
Continue reading