Questions related to improving application performance.
-2
votes
0answers
26 views
Unauthorized access to my computer [closed]
Mac oxs : If someone is accessing my computer thru root user in Terminal is there a way to document it? Malicious activities, cyber theft, changing program names, etc. etc.
I have tried EVERYWHERE - ...
5
votes
2answers
42 views
In Java, how to operate the sublists efficiently?
In my Java program, I need to operate on the sublists a of ArrayList or LinkedList often, like removing a sublist, comparing two sublists.
For ArrayList or LinkedList, I didn't find any good APIs to ...
3
votes
1answer
89 views
Need an algorithm to optimize grouping python dictionaries in hierarchical form
Previously I asked a question on how to group dictionaries in a list in a hierarchical structure.
Initially I wanted to group a list of dictionaries that looks like the following, using multiple ...
6
votes
3answers
264 views
PHP ideal way to check function returns true
Which of the following way of checking whether a function returns TRUE or FALSE is best, in terms of efficiency and code readability?
I was told by a friend that Method B is a good practice, but I ...
4
votes
1answer
71 views
Partitioning Array
Problem: Given a randomly ordered array of n-elements, partition the
elements into two subsets such that elements <=x are in one subset and
elements > x are in the other subset.
one way to do this ...
4
votes
1answer
100 views
I'd like a general review on this script that scrubs data from a csv file
Really, what I would like to know is: "What does this script tell you about how I need to improve as a programmer?" I'm somewhat new to both Python and programming, so feel free to minimize your ...
1
vote
1answer
37 views
Is there a performance difference using AS keyword in SQL?
I'm working on a project in which the previous programmer seems to have loved using the AS keyword in the SELECT part of queries. I really don't like how it's written but if there is no performance ...
4
votes
1answer
82 views
Better way to loop through deeply nested objects?
I'm a bit novice/moderate at JS. To my surprise I managed to put this together and it does work for what I intended.
The objective is to convert an object into a format that is more conducive to ...
3
votes
2answers
26 views
Speeding up for-loop over a list
I have two lists with ca. 4000 elements where each each element have two columns. These are being fed into a function. Besides the function they are being fed into, is it possible to speed it up ...
5
votes
2answers
119 views
How can I make this command line utility better?
I have been developing a capitalizer in Python. This is actually a script that an end user will type at their terminal/command prompt. I have made this script to:
Taking the first argument as a file ...
6
votes
1answer
177 views
A queue that switches from FIFO mode to priority mode
I implemented a queue capable of operating both in the FIFO mode and in the priority mode: when the priority mode is enabled, the elements are taken in order of decreasing priority; when the priority ...
5
votes
1answer
98 views
Depth-first search algorithm in clojure
Context
As an exercise for myself (I'm learning clojure). I wanted to implement the Depth-first search algorithm.
How I did it
Using recursion
(def graph
{:s {:a 3 :d 4}
:a {:s 3 :d 5 :b 4}
...
4
votes
1answer
153 views
Comparing multiple fields from two tables, looking for matches, updating 2nd table
In my never ending quest to improve my coding skills I am requesting peer input on the following code logic. I am asking because I'm -NOT- an expert, but would like to be one day. Source material and ...
2
votes
1answer
51 views
filter a collection in a PagedCollectionView
I have scenario wherein I have to filter a collection in a PagedCollectionView.
The filter criteria are Name and status which are check boxes with Enabled and Disabled labels
If Enabled is checked it ...
1
vote
1answer
54 views
Mysql left joins last row
I am making a query in mysql to import users in our marketing system and need for this a lot of data like for example :
Date of last order
Date of last cheque created
...
This are all left joins ...