« first day (3074 days earlier)      last day (1239 days later) » 

00:02
REFRESH! There are 7871 unanswered questions (89.2671 answered)
 
2 hours later…
01:44
this question has a better place here : codereview.stackexchange.com , although i don't think the community would downvote this — Samridh Tuladhar 30 secs ago
 
3 hours later…
05:09
0
Q: How do I simplify this code that adds string representation of class members to a List?

RicardoI have a bunch of code that adds the string representation of members in a class to a List. using System.Collections.Generic; using System.Linq.Expressions; ... //Note: AuthModel is a custom class containing Id, Name, UserName, email, etc... var someProperties = new List<string>(); someProperties...

 
2 hours later…
06:46
0
Q: pointer jumping on a GPU using Aparapi

morgwaiRead about openCL and Aparapi yesterday for the first time, so this is my first trial. Please let me know if I use Aparapi correctly and if something can be improved. I've tested the code on my integrated intel GPU (maxWorkWorkGroupSize=256, maxComputeUnits=48) with random arrays of size up to 8M...

 
1 hour later…
08:12
I've made a slightly modified version of your function: =LAMBDA(accumulator,LAMBDA([next_val], IF(ISOMITTED(next_val), accumulator, ARRAYBUILDER(ARRAYJOIN(accumulator,next_val))))) where ARRAYJOIN is defined here as a function which flattens its inputs and puts one on the end of the other, works very similar to yours. Called as ARRAYBUILDER(2)(A1:A5)() note the () on the end to invoke the builder — Greedo 55 secs ago
 
3 hours later…
11:21
can you please put in an example? or share this in codereview.stackexchange.comSamridh Tuladhar 10 secs ago
11:40
0
Q: API change broke subclass

Benjy KesslerI had a class in Python: class Foo: def bar(): baz() def baz(): print 'baz' I added an argument to bar and baz and I didn't want to break anything so I made the new argument optional: class Foo: def bar(x=None): baz(x) def baz(x=None): print x or 'baz' I thought this s...

12:05
0
Q: pointer jumping on a GPU using Aparapi

morgwaiRead about openCL and Aparapi yesterday for the first time, so this is my first trial. I've tested the code on my integrated intel GPU (maxWorkWorkGroupSize=256, maxComputeUnits=48) with random arrays of size up to 8M elements and it works correctly, but not faster than sequential adding on cpu: ...

0
Q: Am I using JS Promises correctly here?

RaVeNI'm new to using JS for anything other than DOM manipulation, so I'm not sure if the following code is taking full advantage of the Async concept in JS. This is an example of a function I'm writing in my Discord.js bot project.. the function checks for new RSS feed items from a given URL and then...

12:29
0
Q: Timer for event throttling

IrdisI have following problem. I want to write a class that handles events and passes it through but reduce its number if there recently was an event. Basically it is debounce. However there is a slight change that if we don't receive events for a while and the latest event was skipped we want to emit...

0
Q: Ruby on Rails - Optimizing a query for a huge database

RubioliMy application is an insight/statistic application that contains a lot of data. I don't need to do any joins as everything is in one table, and still, when the results are even about 100k-300k, it takes a lot of time to load. The server side is fine as it has 4CPUs and 8 memory and they are intel...

12:54
0
Q: Schema design for user profile and transaction

9yearsI'm creating a schema design for a user profile and transactions. I am very new in data modeling and currently this is my design. The schema has multiple deposit table because the application I'm working on will use different payment gateways for money transfer and their transaction details is di...

13:18
0
Q: Polymorphism and containers

Johan du ToitConsidering the following code, what is the best and up-to-date way to maintain a container(vector) of derived classes? #include <iostream> #include <string> #include <vector> class Animal { public: virtual std::string getSound() = 0; }; class Horse : public Animal { public: virtual st...

14:10
Since you already have working code and are asking how to improve it, this question really belongs on codereview.stackexchange.comJmb 55 secs ago
14:39
Hi Kirkor_911 and welcome to SO. I think that codereview.stackexchange might be a better platform to ask a feedback related question. SO is meant as a catalogue of problems and fixes regarding code issues. The being said, using loops is always a good way to fix repeating code. — Emiel Zuurbier 24 secs ago
@Mast @Peilonrayz @SᴀᴍOnᴇᴌᴀ This doesn't seem like a code review to me, but I could be wrong.
@EmielZuurbier Please be careful when recommending Code Review. The question would be off-topic on Code Review, as the code in the question doesn't look like real code. — Peilonrayz 32 secs ago
14:55
@pacmaninbw IMO the answer is grey. I think the answer is fine, but I think one can interpret the rules as off-topic.
The wording of the answer sure doesn't help, I think we should be able to all agree on that
0
Q: Temperature conversion with user input

selfmasteringim trying to create a program that converts temperature for a used, and asks the user for both temperature and the type of conversion (c or f), plus an option for a retry if the user didn't select c or f. At the end I want the program to ask the user if they want a new conversion, or exit. here i...

15:11
@Peilonrayz Thanks.
15:49
Monking
16:11
0
Q: Location of function overloads in C++

ReneI have functions to print the contents of many types: void toString( const std::string& str) results in e.g. "hello world" void toString( const std::vector< int>& vec) results in e.g. 1, 2, 3, 4 Now I also provide this function for types provided by my library, and also use this func...

16:23
@pacmaninbw In essence it's a simplification, but it's worded like a comment instead of an answer.
It's not a big review, but it's a review. It's basically saying "you're doing this one way, but it can be done simpler using builtins".
 
2 hours later…
18:14
0
Q: Can this python code for printing a certain pattern shape be improved?

Anonyimport math num_rows = int(input()) if num_rows % 2 != 0: upper_mid = math.ceil(num_rows/2) lower_mid = num_rows//2 #prints upper normal triangle for row in range(0, upper_mid): for col in range(upper_mid-1, row, -1): print(end=" ") ...

18:38
0
Q: Passing the values from fetched data to a method

kokoI'm trying to make an application that gets all the planets from SWAPI and then displays them as boxes on the page. I have _load() method, which fetches the data, and _render() method, which is supposed to render the boxes. The _render() has name, terrain, population parameters. Here is part of m...

Code review is done on Code ReviewForceBru just now
19:03
Is it ok to have multiple React contexts? Sure. Does your code have any specific issue or are you asking for more of a code review? — Drew Reese 28 secs ago
19:55
0
Q: program that takes string and outputs number of scrabble words and the score for each scrabble word

user250045I wrote a program that takes a string as standard input and checks if the words in the string are in the scrabble dictionary, then checks each letter of the words and gives back the the score of the words based off of what they would be worth in scrabble. The program is supposed to be written usi...

 
2 hours later…
21:35
codereview.stackexchange.com may be a better place to solicit feedback for improvements of your generic decorator. (I did not downvote.) — Eljay 58 secs ago
22:22
0
Q: VBA class managing loading DLL libraries

PChemGuyVBA class managing loading DLL libraries I am playing with a custom-built SQLite library intending to access it from VBA via the C-language API. I keep the library within the project folder, so I load it via the LoadLibrary API. To make the load/unload process more robust, I created this class th...


« first day (3074 days earlier)      last day (1239 days later) »