« first day (2388 days earlier)      last day (27 days later) » 

12:00 AM
RELOAD! There are 6257 unanswered questions (90.0744% answered)
12:18 AM
Code optimization questions are better asked at Code ReviewJens 46 secs ago
Q: Speed performance of picking unique value from binary matrix file

KhaledI wrote this code to read a square matrix saved as binary file, that it can be int, uint, float etc... to pick a value from the matrix at given row y and given column x. Could this code be faster to pick this value, better than 20 seconds. The maximum row nd column number in matrix are 3601 for e...

12:40 AM
possible answer invalidation by holroy on question by Lolloxox31: codereview.stackexchange.com/posts/232516/revisions
1:03 AM
Q: Javascript map/filter/reduce over facebook messenger data

greg bI have some messenger group data parsed from JSON. I'm trying to get some statistics from it. Am I missing something obvious about the map/filter/reduce powers by doing a big for loop of filters? Would this pass code review for an internal analytics tool? people.forEach(function (person) { ...

possible answer invalidation by Jamal on question by T145: codereview.stackexchange.com/posts/232476/revisions
2:04 AM
Q: Unit Test BST Java

ganesh rI have written BST in java for practice. Need inputs. On, how to write better unit test cases. am sure the way I have written is not proper. package com.r.basics.tree; import org.junit.Before; import org.junit.Test; public class BinarySearchTreeTest{ private BinarySearchTree binarySearchTreeS...

2:17 AM
@EthanBierlein Nice. I've heard of that one. Latin and classics isn't likely to get you a good job, so having CS will at least pay the bills so you can do Latin/classics in your spare time :)
I'd love to end up being a small town shop keeper in something like footwear or hardware supplies, but I don't think I could ever leave programming permanently because I like it so much.
Maybe sometime we can meet somewhere again :)
I tossed around the idea of pursuing post-graduate studies in Latin/Ancient Greek for a little while; I'd then either (a) teach Latin at the high-school level or (b) try to pursue a doctorate and do teaching/research. The first option is tenable (and I know that teaching is something I'd enjoy), but the second, not particularly; last I checked, the average rate of admission for doctoral programs in the classics was well under 10%.
At this point I'm definitely more interested in establishing stability post-graduation; I figure that if I do end up having a desire to go back to school and pursue post-graduate education, I can do it in a more financially tenable place.
For what it's worth, too, I've been working on ways to combine linguistics, classical langauges, and computer science into something neat with computational linguistics (my school offers students the option to create unique interdisciplinary majors).
I'm not sure when I'm going to be back in town again, but I'd definitely be down to meet up! :)
That sounds cool. Who knows; with that combo, you might end up doing research on computer translation.
Study a bit of machine learning while you are at it, and you just might end up working for Google or something.
2:45 AM
Q: My version of tic-tac-toe in Python | TIC_TAC_TOE.PY

Mikey Akamihedef draw_board(board): display_board = '' for number in list(range(len(board))): if (number + 1) % 3 == 0: if number < 6: display_board += ' ' + str(board[number]) + ' \n—————————————————\n' else: display_board += ' ' + s...

What I want to accomplish with Latin is something similar to translation, albeit perhaps less complex in nature. I have this grand vision of a tool that would allow a user to search through corpora of Latin texts, not just by words or phrases (pretty much every existing corpus search tool these), but also by grammatical constructions, phrases with specific word orders, etc.; it'd be able to perform statistical analyses as well.
For example, "how often do ablative absolute constructions occur in [some text] as opposed to constructions employing temporal cum," "find subordinate clauses in the perfect tense employing an SOV word order," etc.
So, it would basically parse the text and figure out what was a noun, what was an object, what was a verb, etc?
If we had that, we could get an almost perfect translation tool, though.
It would work both ways :)
To that degree and beyond, essentially. Not just tokenization, lemmatization, etc., but also full-blown syntactical analysis beyond individual words and phrases.
If you ever solve that, you could get millions for it easily.
It'd be a LOT of work, though, and a deep understanding of languages, computers, and at least some system of AI.
And probably math to know the AI system.
Perhaps. Although given the rate at which natural language processing is advancing, I wouldn't be surprised if someone has already beaten me to the punch. I definitely understand the amount of work this would require; but that said, I've got four whole years (and a fairly significant head start), so who knows?
2:57 AM
Yep. Don't quit on it. Someone's going to do it sooner or later.
Not a chance; there's no way I'd pass on the opportunity to combine my three favorite areas of interest into one. :)
> If we had that, we could get an almost perfect translation tool, though.
Also, just a random side thought, having read this and having finally put some of my ideas to words: with such an analysis tool, one would essentially have a framework for true machine translation (albeit, one-way in nature, but highly useful nonetheless).
I think one of the last hurdles at that point would be how to deal with pragmatics.
Q: PostgreSQL Function with multiple joins to retrieve brief data

DimbreathI've designed a database schema to store multiple translations with the objective of it being easy to retrieve data and add more translations if ever needed in the future without needing to make any change at all. Here's a dbdiagram.io of the part of the database that's relevant to this post: ht...

Just saw your updated profile picture. You look like one of my colleagues.
Anyway, I've got to head to bed now. I work 7-3:30 as of last week, and I have to go to bed sharp at 9 to make up for it. It was great talking to you.
3:12 AM
Huh, interesting. I always get people telling me I look like someone they know; it's pretty funny. It was great catching up with you as well! :)
1 hour later…
4:20 AM
possible answer invalidation by T145 on question by T145: codereview.stackexchange.com/posts/232476/revisions
1 hour later…
5:30 AM
Q: Best practice to insure the connection and response from external API results

MehrdadEPI have this code in python (using django firmware) that connects to an external API and update some values in that service. Each step depends on the previous step (for step 2 to work step 1 must return True and so forth that include a valid connection to the API). How can I insure that all of the...

6:01 AM
Is it ok to ask a game engine parser code here?
It's proprietary
Also there are little to no comments
Since I was writing it for myself originally However I think of adding some explanation of how I've dealt with streams and data readers for example
yes, that's a way, but curly in brace inside a lambda? that's creating its own lexical scope. In our code review, we discourage using lambda where a curly brace needs to be used. — Moshiour 10 secs ago
I'm going to install updates see y soon
6:42 AM
im back so what do you think should I post this
2 hours later…
8:34 AM
Q: Working with Arrays in Swift

michael.zechIt's an exercise from a Swift-course I'm currently taking. You are given an array of integers. Make an additional array named computedNumbers. computedNumbers should multiply each element in the numbers array by the next following element. The last element shall be multiplied by the fi...

2 hours later…
10:56 AM
Q: Bellman-Ford Implementation in Scala/Java

Victor SI think the part to get shortest path from the cost table got pretty messy. Also can use some tips on how to avoid the extra work checking all edges from source to dest after getting the cost table, or have a better optimized implementation in general. DirectedGraph.scala case class Vertex(id: ...

11:17 AM
Q: Unwanted space chars and can't understand why (Python3)

idankorbeginner here. Learning Python through a book called "Breaking Ciphers with Python". As a part of a simple encryption program, I wrote this (this is only the beginning): import pyperclip fg = lambda text, color: "\33[38;5;" + str(color) + "m" + text + "\33[0m" bg = lambda text, color: "\33[48;5...

11:37 AM
Q: Hunchentoot first steps - good ways of pulling out parenscript from an easy-handler

mwalIn the following hunchentoot easy-handler definition: (define-easy-handler (new-game :uri "/new-game") () (standard-page (:title "Add a new game" :script (ps (defvar add-form nil) (defun validate-game-name (evt) ...

1 hour later…
12:58 PM
I'm voting to close this question as off-topic because your code works and you want help optimizing it. Such questions should be posted on codereview.stackexchange. — Max Vollmer 25 secs ago
2 hours later…
2:59 PM
Just post this on codereview.stackexchange.com instead, as you're just answering your own questions... — Wim ten Brink 53 secs ago
3:14 PM
This might be better suited to "code review" StackExchange — user1781290 44 secs ago
Q: How can I optimize this? Is there any alternative way to this

Aditya VartakI am trying to remove all occurences of the words i collect in the list Exclude from every text note. This is my approach. import operator,re exclude=[] for i in range(len(freq_select)): if freq_select[i][1]<=25: exclude.append(freq_select[i][0]) def remove_nonfrequent(note): print(r...

2 hours later…
5:04 PM
Q: A new type of builder pattern?

MironThe fact is that I wanted to apply the builder pattern. But this could not be achieved, since I could not create an instance of the class with an empty constructor - this is dangerous. The goal is to make the parameter list a little shorter and more meaningful. As a result, I created a new class,...

5:44 PM
Q: Python's .split() implemented in C

DewamuvalI'm a C beginner and I just made Python's split() function in said language. The only part missing is passing the delimiters as a parameter, instead of only using spaces/tabs. But it would be fairly easy by modifying isDelimiter and it's not important. I documented it well enough to not need muc...

1 hour later…
6:46 PM
Q: Unable to Understand a Coding Program

AkshatFind HCF and LCM possibility length pairs from any single number Example: If you pass 4 its output should be like {0, 1}, {1, 0}, {1, 1}, {1,2}, {2, 1}, {2, 3}, {1, 4} Find out length of pairs . Someone help me in telling that what program wants to compute, I couldn't understand the question.

2 hours later…
8:20 PM
@MohamedTaher We need to know what tools you're using, and modifications which have been made to it, to help you out. I'm guessing when you did the cherry pick you kept the same Change-Id in the commit message. That can confuse earlier versions of Gerrit. What version of Gerrit are you using? — Schwern 15 secs ago
1 hour later…
9:26 PM
I'm voting to close this question as off-topic because it seems like a code review request which can be satisfied on other Stack Exchange sitesMartin 38 secs ago
Q: Reduce repetition in these Redux CRUD actions

RobinMy React application manages some entities. I'm using Redux (with redux-thunk) to manage the application state. I've created a RESTClient based on Axios: export class RESTClient<E extends { id: number }> extends Client { protected path: string; public constructor(path: string, token?: string...

Well then Codereview is the place to go then ... — Jonas Wilms 36 secs ago
10:32 PM
Q: OpenCV calculate center of mass for a single contour

JamesonI was recently going through some OpenCV code that finds the center of mass in a contour and realized there is potential room for optimisation. What I noticed looking back through my code is when I calculate the mass I'm using contours.size() which makes me believe that I'm calculating the momen...

1 hour later…
11:34 PM
Q: Should I avoid using interactive mode?

StudentHaskell newbie here. I use ghci to implement a baby quicksort algorithm [1] as follows: Prelude> quicksort (firstx:xs) = quicksort[x|x<-xs, x<firstx] ++ [firstx] ++ quicksort[x|x<-xs, not(x<firstx)] Prelude> quicksort [] = [] The command quicksort [1,2,3] then gives an error: *** Exceptio...


« first day (2388 days earlier)      last day (27 days later) »