« first day (1591 days earlier)      last day (712 days later) » 

12:00 AM
RELOAD! There are 4313 unanswered questions (90.8679% answered)
12:20 AM
possible answer invalidation by Jamal on question by Mayeul sgc: codereview.stackexchange.com/posts/156584/revisions
12:36 AM
Q: Print out count of each value in an array

Travispublic int getFrequencyOf(int num) { int check = num; for(int i=0;i<overloadList.length;i++) { counter=1; for(int j=i+1;j<=overloadList.length-1;j++) { if(overloadList[i]==overloadList[j] && overloadList[i]!='\0') ...

12:52 AM
Q: Training MLP classifier with TensorFlow on notMNIST dataset

Alexey PetrenkoI am new to TensorFlow and I would really appreciate if someone could look at my code to see whether things are done efficiently and suggest improvements. This code works okay and achieves around 91.5% accuracy on test data. The only real issue I have is a low GPU usage during training reported ...

1:42 AM
Q: PHP Login System with persisten login

nickI'm writing my first CMS (personal use) and I'm trying to make it the most secure I can. This is my project structure: . +-- css | +-- images | +-- style.css +-- includes | +-- config.php | +-- connection.php | +-- footer.php | +-- header.php | +-- session.php | +-- user.php +-- ...

2:16 AM
Q: Efficient way of splitting string to a key value pair and check for corner cases

JennHi guys i have a string "key={value}&key2={value2}&key3={value3}" and have to produce a key-value pair of the string by splitting & and =. Also i have to watch out for corner cases such that if a key isn't present do not add it to the hash map but if a value is missing the key can be added with a...

2:37 AM
This seems more like a question for codereview.stackexchange.comMark Thomas 49 secs ago
3:28 AM
Thanks Mark, didn't know that there was a codereview stack... — Sean Robenalt 43 secs ago
4:11 AM
Q: Permutation-stream based n-queens solution

rnsoFollowing is a very crisp solution for solving n-queens problem in Racket programming language. The method is to get all permutations (so that no 2 queens are in same line) and to check these for any of them being on diagonals: #lang racket ; FOLLOWING FN RETURNS TRUE IF QUEENS ARE ON DIAGONAL...

4:42 AM
Q: C++ STD Thread Pool

crtempI wanted to try implementing my own version of a C++ Thread Pool (I know there are lots of them..). I was hoping that someone could tell if I did it okay. Tasker.h: #pragma once #include <memory> #include <queue> #include <thread> #include <mutex> #include <shared_mutex> #include <condition_...

5:34 AM
Q: Updating the UI without leaking the context after an Android AsyncTask finishes

SuragchIn the past I always did AsyncTasks as private inner classes. The tutorials I found still recommend this (see here, here, here, and here). However, this has the potential to leak the context. Now Android Studio even warns about this and recommends making the class static. I followed this advice....

6:03 AM
Q: I made changes in the code to disable sign-out button but still it is not signing out at the desired time

vanshajh madan #This is logout code where i applied the logic # * the variables are correct as they are used in the code for future reference* private void logoutWebService(String systemId, String imei, String lat, String lng ) throws ParseException { SimpleDateFormat formatter1 = new SimpleDateFormat("h:mm...

6:37 AM
Q: Interactive console application

machine_1I am reading a book that has some difficult vocabulary and I, in order to understand the book thoroughly, decided to collect and lookup those words am not acquainted with, spend sometime learning them, and re-read the book. I have created an interactive console application specifically for this ...

6:59 AM
Code Review Stack Exchange would be probably better for this kind of questions. — Melebius 8 secs ago
7:22 AM
Sorry was busy; based on the nudge in the right direction: what i still had to do: get the Evaluations, through the call GET http://MYTFS:8080/tfs/TFSCOLLECTION/TFSPROJECT/_apis/policy/‌​Evaluations?artifact‌​Id=vstfs:///CodeRevi‌​ew/CodeReviewId/TFSP‌​ROJECTID%2FPULLREQUE‌​STID&api-version=2.0‌​-preview given you have ID for your builddefinition you look for item->configuration->settings->buildDefinitionId; this should only be for 1 iteam in the evaluations; with this ID you can call the patch. Where is the button to accept the answer? It seems I am blind — Klemens Altmanninger 47 secs ago
Q: Import of txt data to a Python class instance

Rodolphe LAMPEI have a dictionary of words of the following format (this is dico_en.txt): alleged alleged ə.ledʒd a-ə,ll-l,e-e,ge-dʒ,d-d SUFFIX_NONE NULL al.leged 7 5 2 6658 PREFIX_ASSIMILATE all LIST 6 6 allegedly allegedly ə.le.dʒid.li a-ə,ll-l,e-e,g-dʒ,e-i,d-d,l-l,y-i SUFFIX...

7:40 AM
Q: Using binning to more efficiently plot x, y graphs

MarkI have developed software which plots x, y points on a dot plot. A typical graph looks like: I started out with an array of arrays e.g. [[564, 768, 75486, 88496], [7365, 98, 761, 8].....] In the above example, each inner array contains 4 properties for each 'event' i.e. for event 1 the val...

Q: Did I just misuse OOP?

hungrykoalaI am learning Laravel ATM and I created a dynamic query of sorts using OOP. Just now I've come across this article: here In the comment section it stated that when creating a connection with the database it is better to use a static function instead. Revisiting my code after reading that comment ...

7:55 AM
Q: get the required student details

akhilimport java.util.Date; /** * A fix-sized array of students * array length should always be equal to the number of stored elements * after the element was removed the size of the array should be equal to the number of stored elements * after the element was added the size of the array should ...

Q: Is it a good practice to return union type in Python?

ig-melnykI have a function that makes some calculations and in general case returns an object with all required information, otherwise in throws an exception: def f(*args, **kwargs) -> Success: if everything_is_ok: return Success(data) raise Exception('..') The problem is now I need to proc...

8:21 AM
8:47 AM
Q: Sort data from a text file using quick sort

user8590504I have a text file containing the following data. ascon1 201707011 John 77.5 11.5 11.5 11.5 ascon1 201707012 Grld 70.0 11.5 11.5 11.5 ascon1 201707013 Josh 79.5 11.5 11.5 11.5 ascon1 201707014 Jess 67.5 11.5 11.5 11.5 ascon1 201707015 Jack 97.5 11.5 11.5 11.5 I need the data to look like th...

Q: How do I get people to "review my review"?

einpoklumI wrote a review yesterday for somebody's code. However, since it is out of my specific area of expertise, I would like someone else to give it the once-over, just to make sure I haven't misdirected the author of the code. What's a good way to get this to happen when my review has been accepted? ...

9:21 AM
Q: Python Index able dictionary

James SchinnerJust had a problem where I wanted to be able to have a data type that could be looked up with an index or key. It seemed like a useful thing, so I fleshed it out a little: I've tried to make the behavior as 'normal' as you would expect. It supports slicing with key and integers you can do a...

Q: C++ getting current timezone

OneirosMy goal is to precisely calculate the current timezone using C++ standard library, represented as the offset (in seconds) between it and GMT time. Example: Italy is GMT+1 so my expected output is -3600. This offset represents the difference between italian time (i.e. 12:00) and GMT time (i.e. 11...

9:37 AM
A general principle in API design which brings you quite far is to always look what PHP is doing, and then doing the exact opposite thing. — Philipp Jun 17 '14 at 16:21
This question is better suited for CodeReview. — Script47 46 secs ago
Then can moderator transfer this question to codereview? — mimi 26 secs ago
10:02 AM
I don't think I'll really ever use Haskell, but it's given me an appreciation for better ways to write code, especially around side effects and failures
@mimi the flag request was declined for the move to CodeReview. — Script47 23 secs ago
Does the code work? Then you should post on codereview.stackexchange.com instead. And please ask your question in the body of the question, and keep the title a short summary. Please read about how to ask good questions. — Some programmer dude 48 secs ago
Q: Update UI once all API calls are done

Adrien GI'm learning Swift at the moment but I would like to produce well-organised code. The goal of my little app is to display the weather of my current location. I use : the API of Darksky : https://darksky.net/dev for fetching the forecast data the Reverse Geocoding With CLGeocoder for fetching t...

10:25 AM
Q: Fast bitswap in assembly

JohanCan the following code to swap two bits be optimized? //ecx = bita, the index of the first bit to be swapped //edx = bitb, the index of the second bit to be swapped. //r8 = data, the int32 who's bits are to be swapped //code ;latency //comments mov eax,1 ;1 shl eax,cl ...

Q: Prevent recursive calls in WinForm event handlers

Micha WiedenmannChanging TextBox.Text within the TextBox.TextChanged event can trigger a recursive call to the same event handler. My class EventHelper is designed to separate the action performed in the event handler from the mechanism that prevents the recursive calls. The calls can be used as in: public stat...

Also, Lenses are really cool when dealing with nested data structures
  const committerLoginLens = R.lensPath([1, 'committer', 'login'])
  const isServiceAccount = R.test(/^svc.*/)
  const repositoriesSansServiceAccounts = R.reject(
    R.compose(isServiceAccount, committerLoginLens),
null-safe, deeply nested property accessors :D
10:43 AM
The R.compose is like (.) in Haskell in this case?
I wonder how that would look like in TS.
Not syntactically, but type-wise.
@Zeta yes, and it looks like a mess in TS.
And this is using TS.
TS just isn't 'smart' enough to infer any of these types, so you generally have to specify a lot of them. And there's no syntax as far as I am aware that would make it possible to type R.lensPath properly. You'd have to explicitly specify those types
If I were to type this I would generally put it in it's own function and explicitly type the function instead of trying to use the generic type signatures that ramda comes with
const rejectServiceAccounts: (RepositoryPair[]) => RepositoryPair[] = R.reject(R.compose(isServiceaccount, committerLoginLens))
Does TS even allow a type like type Lens s t a b = forall f. Functor f => (a -> f b) -> s -> f b?
I guess you can use some generics, but the f on the right-hand-side?
Yeah unfortunately you can't do that
I am not sure what the term is but there is no way to do <T, K>(whatever) => T<K>
Higher-kinded types, I think?
Q: Passing a function to threads

AndrasIs it reasonable to pass project instance (which has method I want to multithread) to thread instances? Any comments welcome, even on how to name files as I am new to splitting code into multiple files. main.py: from helpers import MyThreads, MyThread def MyProject(object): def __init__(s...

11:00 AM
@DanPantry Rank-2-types in this case.
I've seen you use this forall syntax a lot
I've never seen it used in Haskell
Is it optional?
Or does it have a different effect to just declaring f?
i.e, is a -> b -> a the same as forall a, b. a -> b -> a?
Q: "0l" in constructor

Tomasz WaszczykFollowing source code (constrcutor): public EventData() { totalNumber = 0l; events = new ArrayList<>(); } I have no idea for what: totalNumber = 0l; Is best a good practise?

mm, after reading, it seems no, that's not the case. a -> b -> c is equivalent to * -> * -> * whereas forall a, b, c. a -> b -> c is something else
11:34 AM
I would take a look in a while, you could try asking in codereview.stackexchange.com , you can find great help their — marvel308 34 secs ago
12:02 PM
Q: Logic/View in units converter application

Krystian KupiecI am working on unit converter application. I used revealing module pattern to handle the logic. Converter is working but there are few things that bother me: I tried to separate view from the logic but I am not sure it is done right. Should I add view implementation to my module? I thought abo...

Q: Word Mail Merging saving as individual files

Mátray MárkI've been working on making word's mail merge automatic in C# using Interop Services. It works, but for generating 47 files it takes 2-3 minutes, any way I can make it faster? using System; using System.Collections.Generic; using System.IO; using System.Runtime.InteropServices; namespace Vizsga...

Q: How to delete comma separator in this array case?

Francisco Sousa FigueiraSo, to start with I have: var tempArray = []; tempArray.push(get); In this case, the get variable grabs the html of a cloned div. What I've tried, but doesn't seem to affect the array at all: tempArray.join(' '); What I always get: tempArray[div , div] Fiddle: https://codepen.io/Bes7weB...

Q: Validation for a CQS system that throws an exception

Daniel LorenzI've been reading that exceptions should only be for something "exceptional" and not used to control the flow of a program. However, with a CQS implementation, this seems impossible unless I start hacking up the implementation to deal with it. I wanted to show how I implemented this to see if t...

Q: Republican Date Conversion Code

LachieJThis program converts a date given from the French Republican Calendar to the corresponding date in our standard Gregorian Calendar. Im looking for some improvements that I should start making in my code as well as some tips on how to write less lengthy code. For example, the RepubtoGregDate fu...

Greetings, Programs.
12:17 PM
Q: Word = smallWord1 + smallWord2

Carl FujinamiLook for all six letter words which are composed of two concatenated smaller words. Please give me feedback regarding good coding stands. * import java.io.File class KataExercise(val wordLength: Int) { fun concatenatedWords(): List<String> { val searchWords = dictionary ...

12:31 PM
maybe you can try here : codereview.stackexchange.comwillll 54 secs ago
@Donald.McLean Monking. How goes it?
Also TIL that applying functional patterns to a javascript isn't great if you aren't used to encapsulating things properly =.=
If it is working code and you need it reviewed check out codereview.stackexchange.com and read their help center to form a good question. — suraj 5 secs ago
For multiple files I expect a loop. There is only one file handled in your whole code. This would be a feast for code review by the way. flag1 = true; return flag1; Really? Or if (!flag1) return; That is also utterly useless. — oerkelens 15 secs ago
12:47 PM
Q: Recursive method overloads server CPU

Flexabust BergsonI have created a method to show a treeview of nested lists with radio buttons to select a category. I have a model called CategoryModel: public class CategoryModel { public int idCategory{ get; set; } public int idParentCategory{ get; set; } public List<CategoryModel> childCategories...

@DanPantry a -> b -> a is forall a b. a -> b -> a, yes (and there is only one reasonable implementation, const).
At least in type signatures.
@DanPantry You're mixing types and kinds there.
1:03 PM
@202_accepted why the username change ?
@Heslacher I was reading an API for work that required returning a HTTP 202 Accepted status code, and thought it was quite humorous, so decided to copy @200_success. ;)
This is not a programming problem. For code reviews, see codereview.stackexchange.comTheophile Dano 32 secs ago
2 days ago, by EBrown
@200_success I'm stealing your display name style.
@Heslacher ^^ :)
So I will take 404_notfound
1:06 PM
I think 406_not_acceptable would be funny, given the goal of CR. :)
possible answer invalidation by adel adeel on question by adel adeel: codereview.stackexchange.com/posts/175296/revisions
@202_accepted What about 204_No_content?
@MathiasEttinger That's reserved mostly for SO.
1:12 PM
I've got jokes today. Lmao
1:33 PM
If it works it belongs on code review: codereview.stackexchange.com If it does not work please explain where it goes wrong. — Scott Craner 19 secs ago
Q: public static vs static public

P BosmanIn swift, both of these are valid: public static let x: Int static public let y: Int Is it down to personal taste, or is there some best practice? Do other common languages impose a specific order?

Q: 2D Poisson-disk sampling in a specific square (not a unit square) with specific minimum distance

Lino DIs there any way I can modify the poisson-disk points generator finding here. I need to generate new poisson points using the coordinates of points in the textfile.txt to improve the distribution. Below is the c++ code of poisson-disk sampling in a unit square. poissonGenerator.h: #include <v...

@ScottCraner: May I beg to differ - there is an endemic problem with the code as written, that penalizes performance by multiple orders of magnitude; and I believe that Financial Analysts who encounter this problem will look to Stack Overflow rather than Code Review for help. — Pieter Geerkens 49 secs ago
@PieterGeerkens It does not matter where they will look. StackOverflow is for problematic code, while code review is for help in speeding up code that works. It is a matter of sniper vs shotgun. Stack Overflow is a sniper, specific problems. the betterment of code is too broad for this forum, by the standards set. Where as it is not for Code Review. That is why Code review insists that the code works. — Scott Craner 34 secs ago
@ScottCraner: Except the posters at Code Review are anal-retentive _____s who care far too much about code style, and never help with any other actual problem. As long as that situation exists, Code Review is useless for this type of performance. — Pieter Geerkens 11 secs ago
@202_accepted Still a success code.
1:48 PM
@akshayk07 code review is specifically for improving working code — Caleth 32 secs ago
Q: About Knapsack Brute Force

User117I tried solve the knapsack problem first time without view the solution. Here is the code: int knapsack(vector<int> v, vector<int> w, int m){ int q = 0; for(int i = 0; i < (int)v.size(); i++){ int k = 0; if((m - w[i] < 0) || (v[i] == -1)){ v[i] = -1; continue; } k...

2:03 PM
'Which one?' 'I dunno, it's your house. Just check each object.' 'Check it for *what*?' 'Whether it looks like it might have touched a paper towel at some point and then forgotten to let go.' '...' 'You can also Google to learn how to check which things are using which resources.' 'You know, I'll just leave the towel there and try again tomorrow.'
2:26 PM
Q: optimizing implementation of shortest path code

Anand Guys this a question i got part of foobar challenge You're awfullyclose to destroying the LAMBCHOP doomsday device and freeing Commander Lambda's bunny prisoners, but once they're free of the prison blocks, the bunnies are going to need to escape Lambda's space station via the escap...

Q: POST sanitizing and avoiding nested if blocks

user3628807When sanitizing the $_POST passed from the controller to the model, I need to sanitize the input and there are 2 options that I can think of. For the first one, I can nest the if blocks like this: if(!empty($username) && !empty($password) && !empty($csrf)) { if($query != nu...

2:37 PM
@CaptainObvious Rev 2 is still iffy, in my opinion.
Q: Python logging: show variable name without specifying it explicitly

ostrokachA lot of the Python code that I write looks something like this: import logging logger = logging.getLogger(__name__) def foo(arg1, arg2): logger.debug("arg1: %s", arg1) logger.debug("arg2: %s", arg2) # Do something complicated with `arg1` and `arg2` ... The logging statemen...

Q: Java orchestration calls from two CRUD endpoints

EugeneHere is my orchestration endpoint where I call customer endpoint and product endpoint. Product endpoint contains info about what customer have what product. I do not like how it look and smells as shit hope there is a better way to do it. Ple @RestController public class ApiController { pri...

@CaptainObvious Hmm, I don't think that's on-topic... But I want to answer it, cause I used to do that too.
3:14 PM
@RMunroe Windows Life.
Q: Count occurrences of date-time in large CSV

Joshua KiddMy input file is a CSV of varying size, up to around 10GB. The file has several fields, however I'm only interested in the third column, a date-time field. The date-times are in UTC timezone, and they are not ordered. Example of values in column: 2017-08-03T10:22:31.000Z 2017-08-03T10:22:32.000...

Q: Am I getting paranoid about "clean code" or I don't know what it is?

Alejandro ValesI am dealing constantly with the following code. The thing is that literally it makes no sense for me to have all the spacing and divisions in the if-else when the code is so small that can be a block by itself. When I read a line within line breaks I expect something difficult to understand o...

3:37 PM
Q: Is it bad to allow a function to return different types?

ProgrammerI have a function that validates data and returns a Boolean value if it's validated. Otherwise it will return a String with a message. Is this bad form? Or is it fine with what I'm trying to accomplish? Private Function validateForm() As Object If lvw.CheckedItems.Count = 0 Then Retu...

@CaptainObvious yes
possible answer invalidation by user1272 on question by user1272: codereview.stackexchange.com/posts/175134/revisions
3:52 PM
@Duga Question is closed, OP's allowed to make edits to make it on-topic
4:16 PM
@CaptainObvious Opinion-based, I think.
Q: Bash functions to modify PATH

PhiloEpistemeI am working on improving my bash environment. I have added the following function to my ~/.bashrc in order to facilitate modifying my PATH as well as removing duplicated from my PATH which may occur from sourcing ~/.bashrc again. # $1 the path to be added as an absolute path # $2 a boolean for ...

4:49 PM
What is "similar to WinForms"? For working code, use Code Review instead. — LarsTech 24 secs ago
5:07 PM
Q: Add currency fields to get a subtotal, then add other values but only if the relevant checkbox is checked

Jay F1I have some currency fields which need to be added together. However, some of them have a checkbox nearby. If this is ticked, the field is added to the subtotal, if not, nothing is added. I'm currently using the code below, which works, but doesn't seem very elegant or easy to maintain. I'm sur...

Q: Create quantile slices from dataframe columns

CodingNewbI have the following, working code: import pandas as pd hld_per = 12 # Holding period in months quantiles = 10 # Number of bins/buckets; Deciles, use 10; Quartiles, use 4; etc. permnos = pd.read_csv('Ranks.csv') my_headers = list(permnos.columns) total_cols = len(permnos.columns) pntls = p...

possible answer invalidation by Jay F1 on question by Jay F1: codereview.stackexchange.com/posts/175389/revisions
5:26 PM
Q: Uni- and bidirectional beam search in Java

coderoddeWhat Beam search is a best-first search algorithm that does not necessary find an optimal path, yet has smaller memory-footprint. In this program, I attempted to answer a question how does it compare to A* and whether bidirectional beam search provides any improvement over unidirectional variant...

@lo_pass, after you solve your issue, I encourage you to post this on codereview.stackexchange.com, your code need a several revision and you will learn a lot. — Daniel Sanchez 52 secs ago
Apparently, I've earned my 3rd Yearling badge on Code Review today =)
@Srnu If you have a solution that works, but you'd like it improved, post it on Code Review. This site is primarily for fixing broken code. Note though that Code Review requires that the code is working and complete. — Carcigenicate 17 secs ago
@DanielSanchez I'd be more careful with wording: "post this" should probably be "post regarding this code of yours". See also. — Andras Deak 17 secs ago
I think you would gain value from posting on Code Review instead of stack overflow. There are a lot of things that need to be addressed and their scope is more oriented for that site. — Erich 17 secs ago
5:41 PM
Q: Is this class non-blocking method thread safe?

PobeThe class (Reader) reads log files by chunks, each chunk represent an event. It processes events top to bottom until a given maximum is reach. In others words, it reads until it's full. For the Reader to start reading again it needs to empty its events list. To do so, another class needs to call...

5:59 PM
unfortunately solutions like this don't pass code review in my company: blog.bdoughan.com/2012/01/…. with an unbounded number of IBar implementations, an explicit switch on type is a maintenance burden at best & breeding ground of bugs in the average case. polymorphic dispatch should be used instead of instanceof checks, but it's not clear how to actually use that approach in this case. — robotic_pancreas 23 secs ago
possible answer invalidation by Jason McCarrell on question by Jason McCarrell: codereview.stackexchange.com/posts/175134/revisions
Duck protocol.
Any JS developer around ?
Q: Rest Web Service in Express

WilliamsHi I have made a rest web service using express framework. Below is my snippet of code. I have repeated code in below code. I am creating a currencyItem object in two blocks and push it into an array. I think it is not bad practice. Can anyone suggest me Is it OK? if not how I can improve it ? ...

6:16 PM
@Williams Oh, there's always somebody around and most of us have touched JS once or twice.
I asked question which Captain posted
I have repeated code in below code. I am creating a currencyItem object in two blocks and push it into an array.
@202_accepted Not too bad. Except for the bugs.
@Donald.McLean Bugs? I take it from the rapid weather change?
If your code provides a correct output, but you wish to optimise it, this is a question for codereview, not Stack Overflow — Fureeish 20 secs ago
@202_accepted No, in the software. Very annoying.
6:22 PM
I'm voting to close this question as off-topic because this is better suited for CodeReview SE! — Am_I_Helpful 14 secs ago
@Donald.McLean Uh oh. Was it me?
@202_accepted No. I'm the only developer on this project so, unfortunately, all bugs are my own fault.
Though it would help if the requirements in this case weren't a little odd.
Heh, I know that feeling. I feel for you man.
@Williams Don't worry, somebody will find your question.
Keep in mind getting a good answer on Code Review usually takes a couple of hours/days.
I have a table that is linked to two other tables by foreign keys. Except that I can't actually link to the other tables in my queries because the table has millions of rows and the queries would take waaaaaaaaaay too long.
6:25 PM
@Mast ah okay
@Donald.McLean How do you know? If there's one thing a RDBMS is good at its efficiently building relationships like that.
Q: Delete node from singly linked list with tail pointer in C

SMCI'm trying to implement a single linked list based on Linus' comments about double pointers. In my case I'm also using a tail pointer and I'm wondering if there's a better way to update the tail pointer which does not require the conditional below? I'm still new to C so any other critique is a...

@202_accepted Well, I tried implementing the naive way, and when the query timed out after more than ten minutes, I knew that I had a problem. There's no way in heck the users would put up with a refresh rate of more than a minute. As it is, they're going to be complaining it's too slow, but unfortunately there isn't anything more I can do.
Interesting, is there anything bizarre in the JOINs?
6:29 PM
Unfortunately, no. It's all very simple stuff.
Huh, must be ultra big data then.
No, I've worked with bigger. The telemetry data warehouse was bigger. Still not that big by modern standards of big data, but big enough to be an interesting challenge.
How much data are you returning to the user?
One page.
How many elements from the query is that?
6:34 PM
What makes it tricky is that the users need filtering and sorting on as many columns as possible, and the page size can be set in a range from 10 to 100 records.
What RDBMS are you using? Being NASA-related I'm guessing Postgre?
SQL Server
Oh wow. Have you looked at the execution plan for the query yet, to see what's slow?
@202_accepted I asked the DBA, and she said the problem was the table size.
Ah, that's unfortunate.
7:17 PM
Q: Yet Another multithreaded FIFO queue written in C++11

jnbrq -Canberk SönmezHere, I have written a simple FIFO multithreaded queue with following features (if I have implemented correctly): Thread safe Supports multiple container types (given that they provide some function) via template meta-programming queue size can be limited has several policies for enqueuing item...

It sounds like what you really want is a code review, so I suggest you to go ask your question at codereview.stackexchange.com . Bear in mind that people there will be able to help with python optimization and code inefficiencies, but the tuning of parameters such as number of epochs, bias vectors, and above all learning rate, will take someone with experience in the training of word embeddings (/ machine learning in general). For the latter, you should explain what your implementation does at a higher level. For instance, I'm not sure whether you use or reimplemented glove. — Nikana Reklawyks 33 secs ago
7:37 PM
thanks jon! can u provide an example of a template reference that would not be component relative? ie it work in jit but not aot? I'm not sure how someone would configure the template url in a different way then I did in the example I provided, but I'd like to know what to look for in case I'm doing a code review sometime — user8570495 36 secs ago
8:08 PM
Q: Struct Array Data Member being default static

user148632I have a struct with a double array member. The problem is that instances of this struct all seem to use the same array. This leads to all the structs being identical to the most recent struct that was initialized. struct myStruct { private: double x[2]; //rx,ry,rz,vx,vy,vz publ...

8:22 PM
Q: Where should I be login the user with a cookie in MVC project?

user3628807Upon visiting my website, I check if a cookie is set into the user's browser and proceed to logging him into his account. Currently I do the cookie check in my init.php file and I am asking where I should put it instead because I don't feel like this is the ideal place to be. Here is my init.php...

2 hours later…
10:20 PM
Q: Modern OpenGL shader wrapper v2

Dan GrownerThis is a fixed up version (following RAII principles) of my previous reviewal. I have moved the construction of the object entirely to the constructor to prevent any bad object states. The only thing I am slightly concerned about is if an exception is thrown, the destructor will not be called t...

Q: Player tracking system in my roguelike game

Mark RobuckI have been trying to make a roguelike for years. Ever since I was a kid I messed around with it. I have a working prototype now, but it takes forever to write the code for each and every place that you can walk in the game. Is there some way to make it easier? Like a variable inside a variable? ...

10:35 PM
Q: Gulp map over multidimensional array

SamI'm developing a more complex website which requires several stylesheets for the frontend and the backend that are loaded only if some specific conditions match. I'm developing in scss and compiling the files using gulp. In my gulpfile I then declare an array with all the frontend stylesheets a...

Q: Segment sorting

SteephenThis is a question from careercup.com. You are given an alphanumeric string. Complete the function sortSegments that will segment the string into substrings of consecutive letters or numbers and then sort the substrings. For example, the string "AZQF013452BAB" will result in "AFQZ012345ABB". The ...

11:09 PM
Are you asking for a [codereview.stackexchange.com/](code review)? If so, there's a [codereview.stackexchange.com/](site for that). — C-Pound Guru 39 secs ago
Q: efficient ways to store input data in text files for ease of reading by a simulation code

user_1_1_1Simulation take as input many parameters. Assume simulation is in scripting languages like python or Matlab. Example of such inputs is a mixture of double arrays/matrices and Boolean values like below:- alpha =-3 beta = true gamma = 1 cost1=ones(2,3) cost2=zeros(4,2) One simple way is just li...


« first day (1591 days earlier)      last day (712 days later) »