« first day (1530 days earlier)      last day (2781 days later) » 

00:00
RELOAD! There are 4129 unanswered questions (90.9384% answered)
00:23
1
Q: Optimizing variant on quick select to find k-th smallest index

Vandenmanin an MCMC procedure I am repeatedly (100,000+ times) running the following function to find the kth order statistic. I ran a profiler and noticed this function was most expensive. I am looking for a way to optimize this code for speed. The reason I think it can be done faster is because I do not...

00:37
0
Q: Pandas: Accessing a certain character in a string, column headers

zsad512I have the following code that I have developed to filter out characters from column headings in CSV files so that I can transform the files into an SQL database: # Fix the column headers for file in files: dict_[file].rename(columns = lambda x: x.replace(' ', '_'), inplace = True) for fil...

Yeah, there seems to be a site for (almost) everything, and it can be tough to put everything in the right place. If you're looking for a code review over there, it's probably best to delete your post here unless there's something specifically broken here you're asking for help on (in which case you should edit it instead to make it clearer). Thanks! — Peter Cooper Jr. 45 secs ago
01:26
tickString = defaultTickString += std::to_string(ticksSecond); If I saw that in a code review you'd be re-doing it (whether it is related to the bug or not) — John3136 34 secs ago
01:46
Sheesh, I can't stand when Windows decides to update itself without telling me.
0
Q: Multiple cycle detection in a 2D grid

helion3Preface I've spent some time recently looking into methods to detect complete "shapes" in a 2D grid. Cycle detection works well for this - you iterate valid points and if you reach a point you've already been to, a "cycle" exists. However, trouble arises when you have multiple, connected shapes...

0
Q: Java mergesort with generics

randnum-1The following is my implementation of mergesort with Java generics. I chose to use the iteration variables a_iter and b_iter to prevent modifying the lists while merging. Any suggestions for improvement? public static <T extends Comparable<T>> List<T> mergesort(List<T> list){ // base case ...

02:51
0
Q: Validating the difference in days between two dates

MaxI have some code that is used for validating a condition based on dates, which is always a bit tricky. Here is the code: package rules type valueInterval struct { min int max int } func (v valueInterval) containsClosed(x int) bool { return x >= v.min && x <= v.max } func permanent...

03:20
0
Q: Python discover random web servers and print the index page title

Ricky WilsonI wrote this little toy today that probes random web servers and prints out the title of their index page. I curious if this code is any good. im a bit rusty. get_titles.py #!/usr/bin/env python """ Probe random web server and print out the title of their index page. """ import os import sys ...

 
2 hours later…
05:12
Monking
05:28
-1
Q: Import CombinatoricsUtils class in java

ArnavI would like to use the combinatoricsIterator method on the CombinatoricsUtils class. The class is in the commons apache packages and the link can be found here: http://commons.apache.org/proper/commons-math/javadocs/api-3.6.1/index.html However, since this is for the Google foobar challenge, an...

05:40
Monking
0
Q: Object oriented way for persisting entities

CodeYogiI was reading about the repository pattern but it felt somewhat less object oriented to me so, I tried to write my code in more OOP way. For an use case I am experimenting with deleting an entity: function deleteHotel(req, res) { const hotelId = req.params.id; // Approach 1 return new Ho...

06:10
-1
Q: Whats the error in this code? How do i define and initialize a 2d array?

Razerblade0911Two methods are used to run the above code. One is executeThis which either updates the table or displays the output of the query. This works. The other method is runThis method which works only for queries and returns the resultset as a 2d array. Every time i try to print it, it prints null. I f...

0
Q: Non recursive Knights Tour Implementation in C using Warnsdoff's rule

w_jayJust trying to get used to writing programs in C so have written this program to find valid Knights Tours on a 8x8 board. I guess my queries are more focused on my use of the language and how I could or should do things better. A little about the code. It is a C implementation based on somethin...

@CaptainObvious broken
06:33
If you are asking us to help improve working code, then that's too broad for this site. We do have a code review sister site, but please do very carefully read their help center on how to post a good question there before you post. Include your full code as text if you want your question there not to be closed. — Martijn Pieters ♦ 40 secs ago
Monking
Your question is no clearer. You have no idea, so what do you want us to do? We can't just pitch more ideas, that's too broad. This may be on topic for Code Review, but again, read the help information I linked you to first before posting. — Martijn Pieters ♦ 37 secs ago
06:52
o/
@Zeta Hi
@SimonForsberg The user who put in the vote migrated it before you responded :-) Say it hadn't, is there anything we could do in such a situation?
Monking all
I have 2 if conditions like below
if(x1 == 1){
//dosomething
methodA();
}

if(x1 == 2){
//dosomething
methodA();
}
is there a way that I can improve this? I mean write in a nice and neat way
@JudeNiroshan what language ?
Java
I have used a swtch-case instead of 2 if conditions
use a Map ?
06:56
@MrGrj how can I use a map there?
IDK, I'm not into Java anymore. But I know I read that a while back
If there's no //dosomething, I'd say use a switch and fall through.
I see that even the methodA() paremeters have changed
I think the existing way is a good way
Thanks for trying to help me :)
maybe it helps :)
06:58
@MrGrj Thanks
@Mast I don't understand what you are asking. The question was never migrated.
@Mast and @SimonForsberg I had voted to migrate and after Mast asked here I retrected the vote.
That's still too broad. This is not the site for general 'improve my code for me' questions. That's what Code Review is for instead. — Martijn Pieters ♦ 11 secs ago
07:13
0
Q: Group items of array by n items

StefdelecI making a little code to group by n element a array. First part is simply here for demo purpose => generating an array let i = 0; let testArray = []; while (i < 100) { i++; testArray.push({ value: String.fromCharCode(i), id: i }) } // Here is the function const g...

In the one and only true way. The object-oriented version of 'Spaghetti code' is, of course, 'Lasagna code'. (Too many layers).
This could make for a decent Code Review question, if and only if you read the help centre first and make sure your question doesn't read like 'give me your code'. Code Review answers can consist of advice leaving the final implementation to yourself. — Mast 53 secs ago
oh,thank you.I want code review by advanced python... — Matsuda 12 secs ago
07:31
@Duga facepalm
07:48
0
Q: MD5 SSE2 my implementation is slow(

beatsspammy implementation works correctly, but it has low performance. As a laboratory work, I must write the algorithm myself and implement the brute force. The speed of this implementation is a hundred thousand times slower than analogues. Help me identify bottlenecks and optimize speed. // Md5CpuSSE2...

Post in the code review forum: codereview.stackexchange.comAbhijit Sarkar 1 min ago
This is code that doesn't compile and doesn't make sense (the value of length is 0 in this code, so the loop won't run). Don't post code that doesn't work in Code Review stack exchange. Also: ask your reviewer what s/he meant, and follow his or her directions. — RealSkeptic 48 secs ago
I'm voting to close this question as off-topic because it is about working code and belongs to codereview.stackexchange.comAndré Stannek 39 secs ago
@AndréStannek If this question is posted as-is on Code Review as well, it will get closed pretty quickly. Please read the help centre. — Mast 50 secs ago
Side note: you asked to review your code. Please understand that such requests are off-topic here. For working code, please turn to codereview.stackexchange.com - but read their policies carefully before posting content there. — GhostCat 52 secs ago
1
Q: Represent json file with a set of different data members to a C++ class

GeorgeLI want to parse a json file, where some elements are common each time while others are different based on a type. For example a message json: { "title": string, "body": string, "type": int (0 for email, 1 for sms, 2 for terminal) "typeProperties": { // Different based on...

Kaz
Kaz
08:14
Monking @all
@EBrown I don't know about the US, but here in the UK, after you've given the landlord a reasonable period to fix it, you can just go and pay for the repairs yourself and subtract it from your rent.
-1
Q: how can I optimize this chunk of code

user143190int[] arr = {4,6,2,2,6,6,1}; int length = arr.length; int res = 0; for (int i = 0; i < length; i++) for (int j = 0; j < length; j++) if(arr[i] == arr[j] res = Math.max(res, Math.abs(i-j)); return res; For my work, I have written this chunk of code but does not seem to b...

@CaptainObvious extreamly unclear
@CaptainObvious Came from SO, another user wrongfully directed here.
08:52
0
Q: Double event listener for single function

MployByWith your help in this question, I've got this code to show the pop-up, and than hide it when close button is clicked: <script> var applycouponPopupId = "popup-wrapper"; window.addEventListener("load", function() { document.getElementById(applycouponPopupId).classList.add("modal-...

0
Q: How to use all possible CPU cores of my PC

user143195I am using Support Vector Machine (SVM) algorithm to perform a classification. The satellite image I am using is really big (5GB) that's why I am trying to take advantage of multiprocessing tool to speed up the process. My problem is that my PC does not use all the available cores. I run the cod...

Monking
Even when the required query is provided, I think this could be off-topic here. Perhaps this belongs more on Code Review? — N. Wouda 52 secs ago
09:14
@Duga @Phrancis I thought we had a meta disallowing such questions, but I can't find it.
If this is working code, a question like this belongs on codereview. Be prepared your creative indentation style won't be received too well. — Felix Palmen 43 secs ago
Does the code work? If yes -> go to codereview.stackexchange.comGnqz 47 secs ago
@Mast Are you thinking of this? Where this and this agree. However this says normalization is off-topic.
@Peilonrayz This comes closest, but I thought we had something stronger as well.
I'd already found the others and concluded those are not it.
@Mast Yeah, I thought we had something a bit stronger too, but I skimmed past like 50 meta questions containing database, and couldn't find anything, :/
So I mostly thought my memory was playing up
:-)
10:04
0
Q: which way is better to check exists Item

work questionI have a service to Insert TagName , I dont want to insert duplicate tags I used this : public void Insert(string tagName) { tagName = tagName.Trim(); if (IsExists(tagName)) throw new ArgumentException("tagName is Exists"); Tag model = new Tag { Name=t...

10:25
possible answer invalidation by Johny on question by user143195: codereview.stackexchange.com/posts/169037/revisions
 
1 hour later…
11:33
0
Q: A simple lotto game in python

Sergo GumkadzeI have a simple task of creating a simple lotto game to practice python. I had some troubles with return of functions so i dropped few because of not understanding the scopes maybe. In my next version i want to try to make it fully in functions, and in the next version i want to do it in OOP pri...

@EBrown Expect more votes, the meta thread is mentioned in the post linked in the net neutrality banner.
12:03
0
Q: Implementation of many-to-many relation Tag Table

work questionI have belowe tables, for Map string[] Tags from ViewModel to Model I'm using Below codes : public class Tag:BaseEntity { public string Name { get; set; } public virtual ICollection<Blog.BlogPost> BlogPosts { get; set; } public virtual ICollection<News.NewsItem> NewsItems { get; se...

0
Q: Correct use of MVVM and MouseEvent Handling

fbueckleMy XAML looksl ike this: <UserControl x:Class="Dexel.Editor.Views.UI_Sketches.UiSketchCanvas" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmln...

0
Q: C++ Merge Sort Implementation - Pt2

Nick AFollowing the review of my old merge sort implementation here, it appears that the biggest improvement to make was to use iterators instead of copying the vectors. Having never used iterators before, I'd like a review of the new code following that review: template<typename T> void Merge(T, T, T...

If it is working fine and you want your code reviewed.. you can check out codereview.stackexchange.com . — suraj 59 secs ago
This question is more appropriate for the Code Review stack exchange siteEkaba Bisong 47 secs ago
I'm voting to close this question as off-topic because working code should be reviewed in Code Review stack exchange site — suraj 21 secs ago
Although I'm not sure the people over at codereview would be happy about this question either, @suraj — domdom 25 secs ago
@suraj This would be just as terrible at Code Review. — Mast 32 secs ago
12:20
0
Q: This piece of ABAP code should run through multiple tables and run a COUNT in all of them.

ErikThe code runs through multiple tables to perform a count for a given ID. the ID is given by the user and then the program would look through all of the tables to check how many records each table has, that also has that ID. This is then returned to the user in an ALV with the table ID, the table ...

12:31
@Mast I forgot that was happening today.
0
Q: BMI Calculator revised

Anson Khothis is a follow-up of the old BMI Calculator that I previously wrote. I read a majority of the feedbacks that you guys gave and I would like to thank you all for the kind comments. Here is the link. [BMI Revised version]. Please do another favor which is to screen through the codes below again. ...

If this is working code, see Code Review. If not, cut it down to a Minimal, Complete, and Verifiable example. — jonrsharpe 13 secs ago
You might try the Code Review SE site instead. Though definitely check their FAQ and see what's considered on-topic and well-formed there first. — David 16 secs ago
there is a codereview stack exchange, try there — Thijs Steel 47 secs ago
I'm voting to close this question as off-topic because it's not a specific programming question as defined in the help center. In some form it might fit over at codereview.stackexchange.com, but check their guidelines first and tailor the question appropriately. — T.J. Crowder 21 secs ago
12:47
0
Q: task based design for a stopwatch

globalturistThe following post is a follow up to: Stopwatch that uses the abstract factory design pattern The current code uses a task based design utilizing a mix of the observer and abstract factory designs that totally changes the original question being followed up, also i added code to show current loc...

-2
Q: how to make an object jump in unity (using csharp)?

user143210i m new in the developpement field and i m stuck at making anobject jump in my first game (it s 2D ) ,thank you ^^

@T.J.Crowder I wanted to flag as "on the wrong stacexchange network", but I don't have "codereview" in the list; How should I do to get it in the list? — Nathan 34 secs ago
13:00
@Nathan I'm afraid you don't. Making Code Review an official SO migration target has been discussed extensively for many years now, and the feeling has consistently been that we don't want one. Plus, there is a limit of 5 official migration targets in that list. — Kaz 19 secs ago
0
Q: Computing butterflies with better performance

A.nechiI have a code that computes butterflies and from a little profiling I found out that it's a little bit slow. So, it seemed that the better way to optimize its performance is vectorizing it using Intel SIMD Intrinsics. This the scalar version of the code that I want to optimize: float bfly0_re, ...

We might have a code-review tag, but if you actually clicked on the thing, you would have been told that we have a site for that--Code Review. Also, this is crazy. — Will 58 secs ago
@Duga I was writing it shouldn't go here either, post got removed mid sentence...
I think what you are looking for is a code review. There is a forum for that codereview.stackexchange.comPumkko 29 secs ago
@Pumkko Code Review will not accept this question. — Mast 16 secs ago
13:26
Tech.io went live today.
0
Q: Finding the maximum sum of a continuous subsequence in an array of integers

Egek92this no-brainer came up to me in a technical interview. I played it safe and wrote this. public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); System.out.println("enter size of the array: "); if (!in.hasNextInt()) { System.out....

13:47
0
Q: Online Game similar to BlackJack (21Online)

Grzegorz G.I made an project of online game similar to BlackJack (difference is in amount of points). This project was firstly an school project but I decided to custmize it. Goal of this project is to reprezent level of my skill in Java programming, which help me in looking for the Job. https://github.com...

13:59
Should post this to CodeReview, instead. — Usagi Miyamoto 22 secs ago
33
Q: FCC is using Stack Overflow icon to download a PDF on filings website

ahsteeleWhile preparing to file my own comment on FCC Docket 17-1078 Restoring Internet Freedom (whether ISPs should be treated as common carriers under Title II of the Communications Act of 1934) I noticed that the filings website makes use of the Stack Overflow icon from Font Awesome. The icon enables...

2
Q: Client Server Stocks application

Amit RazI was given task to build a client server application, using any technology I want. Here are the requirements To simplify the process the Server would have an in memory stock list and there would be a random data generator to update the stock data Each client will have his own stock list Each ...

0
Q: How to properly identify when to move enums, classes, and static methods into their own files

Brian GeI have this all in a single C# file: public enum ReportTypes { TherapySales, DocumentRequest, ByteSuccess } public enum ReportStatuses { Working, Completed, Missing } public class ReportContainer { public string Report { get; set; } public ReportStatuses Status ...

The programmer writing the website doesn't have a SO account? Never googled anything programming-related and landed on SO? SO is THE resource for devs of all stacks and skills worldwide... if this isn't a deliberate misuse of a trademarked, copyrighted logo (that's what "site design / logo © 2017 Stack Exchange Inc" stands for, right?) with crystal-clear terms of use... and nothing we can or should do? ...I don't get it. If the dev had used Coca-Cola's logo instead, there would already be a bunch of lawyers on the case... — Meta's Mug 20 mins ago
If your question is "how can these comments be improved?" then what you have here is a Code Review question, and a question that's either too broad or primarily opinion-based for SO. — Mat's Mug 45 secs ago
14:16
0
Q: Is the following code thread safe ?

tigrouI find the following piece of code from a blog : Interlocked.Exchange( ref myCollection, myCollection.Add( "Banana" ) ); This code is supposed to add an item to myCollection in a thread safe way. myCollection is an immutable collection. Everytime the collection is modified, a new insta...

These lint warnings don't make much sense to me. How are a, b, c invalid variable names?
@Phrancis they aren't unless I'm missing something
can you post all the relevant code ?
def is_pythagorean_triplet(triplet: List) -> bool:
    """
    Assert whether the input is a valid Pythagorean triplet, i.e.:
    - It contains 3 numbers: a, b, c
    - The numbers are strictly increasing: a < b < c
    - That they are Pythagorean: a^2 + b^2 == c^2
    """
    if len(triplet) != 3:
        return False
    a, b, c = triplet
    if not a < b and not b < c:
        return False
    if not (a ** 2) + (b ** 2) == c ** 2:
        return False
    return True
And this
if __name__ == "__main__":
    test_triplet = [3, 4, 5]
    if is_pythagorean_triplet(test_triplet):
        print("passed")
    else:
        print("failed")
Kaz
Kaz
Wow. I didn't realise quite how busy I've been recently. Just posted my 2nd question since the long break. The first one felt like it was just last week. Nope, nearly 2 months ago.
Also getting this odd warning from the linter
So I'm thinking maybe it's the linter being fussy
Kaz
Kaz
14:26
@Phrancis It is looking that way.
@Phrancis apparently some linters have opinions about variable names. It doesn't like 1-letter names. You can configure it to have different opinions
@Phrancis and here it might be because of the test_
And apparently I was right:
30
Q: Why does pylint object to single character variable names?

AmandaI'm still getting used to python conventions and using pylint to make my code more pythonic, but I'm puzzled by the fact that pylint doesn't like single character variable names. I have a few loops like this: for x in x_values: my_list.append(x) and when I run pylint, I'm getting Invalid na...

@Phrancis Constants should be UPPER_SNAKE_CASE, if it's not a constant don't bother.
Here's the Constants section in PEP8.
0
Q: Converting raw SQL queries into entity framework

RockStarI'm now learning about entity framework. Most of my sql queries are raw sql queries. I was advised to use entity framework instead and I want to convert every raw sql query that i have into entity framework. As of now, i am able to convert the regular select statement that we use like this: SELE...

0
Q: What is a typical Restful replacement pattern?

Kai HendryI wrote some Javascript code today to interface with a restful Rails app which I thought was rather awkward & took me far too long to write. getAll(id).then((existingPlaylists) => { for (var i = 0; i < newPlaylists.length; i++) { if (existingPlaylists[i] && existingPlaylists[i].id) { put(i...

1
Q: User Input - Date Range

KazDescription A new utility I built to ask users to input a date range (StartDate + EndDate). Function AskDateRange() that handles loading/unloading the form and passing back input. The userform itself, ufAskDateRange. Which validates that the user has entered text that looks like a date. Rev...

_1st, _2nd, _3rd = triplet # no more fuss!
14:36
@Phrancis yep :)
@Phrancis Huh, why are you making them private?
also the convention is 1st_, 2nd_, 3rd_
@MrGrj Oh yeah, you can't start variables with 1...
but that's usually used to avoid shadowing
oh
right
:(
that
14:38
Might be better to just use a, b, c
And turn the linter off there
first_, second_, third_
#NamingThings
IIRC PEP8 suggests not to use single letter variables. And disallows three. But it'd be easier to read with a, b and c...
14:40
That was my thought as well, since it's just math
If it were going to be like fifty lines, rather than two then it'd be a different story, but IMO ignore the linter, :)
I shall :D
I'm so tired :( I should watch a movie or smth...
@MrGrj You working at the new place now?
@Peilonrayz I haven't started yet. Monday will be the _1st day. I had those 21 days until my current employer finds a replacement
14:46
@MrGrj What've you been doing to make you so tired then?! ;P
@Peilonrayz answering people's questions on #python IRC channel :D
it's a great way to keep up with some problems that I might have ran into in the past + there are quite a lot of experienced core devs
@MrGrj That's cool, have there been tons then?
a, b, c = triplet #pylint: disable=invalid-name
if not a < b and not b < c:
    return False
if not (a ** 2) + (b ** 2) == c ** 2:
    return False
return True
Perfect.
@MrGrj That's good, you've definitely gotten better than you were a year ago, :)
@Phrancis Lovely, however, have you tried using one return?
As in, use positive conditions nested into each other and return True?
14:52
Yea, there're always people with many issues. Some of them quite interesting. And I just wish I'll become as I can in the near future. I still have a lot to grasp on.
As in no if just a return
I don't get it, what would that look like?
return a < b and b < c and (a ** 2) + (b ** 2) == c ** 2
IMO it's easier to read YMMV
YMMV?
@Phrancis Your mileage may vary
14:55
@MrGrj Sounds like SO, ;P I still have a lot to grasp onto, but I'm sure you'll catch up soon, :)
^^ that
@Peilonrayz Hopefully. I'll also have to start learning some frontend stuff (probably React or Vue). :(
@Phrancis I mean it as, you, or someone else, may find it harder to read, :) But I find it easier
@MrGrj **** JavaScript, get a transpiler or something. It'll ease the pain somewhat, :)
@Peilonrayz Yea, well, I don't wanna do frontend so much because I just hate spending half a day trying to center a damn div or get some css right :( It'll be a time-eater
I think it's more boredom than hate
15:01
Please ask your question over at the code review forumPhilipp Ploder 18 secs ago
CSS is both wonderful and horrible at the same time
@MrGrj I normally only have to do that when IE decided to ignore how everyone else applies CSS. Otherwise Flexboxes are nice and simple, :)
lol IE
@Peilonrayz Implementation is mostly grunt work. There's very little challenge or innovation in how one can implement a user interface, and there's only so many times one can put a checkbox on the screen before going slightly mental. And that's not even touching on spending hours aligning pixels "just so".
Speaking of old crappy tech, one of my teammates asked in team chat last night, "Do we support Windows XP?"
I was like, "No, even Microsoft don't support XP anymore"
15:03
even Rubberduck doesn't run on XP.
@MrGrj Do the LaTeX way of get it working, then get it nice
@RMunroe LMAO - and LMAO again after reading the hover comment
@VincentvanderWeele I have submitted my code on stackreview here : codereview.stackexchange.com/questions/168955/…. The question explains the goal of the project and why I need interface to solve my problem! — felix 58 secs ago
16:00
Monking
Monking
Monking
Monking
0
Q: Scraping current day Counter-Strike match results from a website

Lukasz SalitraAs a fan of competitive Counter-Strike, I like to keep up with who is currently winning and who is losing. There is a website that provides me with just that. I thought it would be cool if I could display the results in a way different than visiting the website. Here is an example result from th...

If it is already working, it would be better to put this on codereviewIcepickle 46 secs ago
I'd consider "code review" to be a part of development. — Daniel Mann 44 secs ago
16:20
1
Q: TCP client reconnection logic running on 30 machines

DoughySpoonsI am working on a service that is supposed to run on a large installation 24/7. Once the software is deployed, I will most likely not be able to make any changes anymore. This is my first time working on a network application so I want to make sure I am not making any obvious mistakes. 60 instan...

0
Q: improving models for listing startup

pythonBeginnerI am learning django and to hone my skill in django, I want to create some product. I am thinking of developing a web app which is about registering the startup companies. With learning I want to do a social work either. I come from a developing country and student/people with tech field does not...

0
Q: Complexity of this Prim's implementation

Hasan Iqbal AnikWhat is the time complexity of the following code? I'm implementing prim's algorithm with adjacency matrix representation of the graph and priority queue. from graph import adj_mtx, AP import heapq as hq lv, visited, h = float('inf'), {}, [] # O(n) def prims_mst(adj_matrix, src): hq.hea...

OMG, i don't know there is "codereview", my bad. — Mahar Dika 55 secs ago
Monking
Our entire phone system (internal and external) was offline for 3+ hours this morning...you can imagine my joy upon learning that.
Kaz
Kaz
16:36
@EBrown Sounds expensive.
1
A: Introducing: Channels - Q&A For Engineering Teams

Mat's MugCould it work for an OSS dev team? Say I manage an open-source project (cough), and I'd like to use SO Channels to "channel" contributors' knowledge base in SO-ish Q&A style, is that a use case? We currently use SE chat for that, and getting new contributors on board involves pulling some bookm...

0
Q: python tic tac toe lowcore/beginner

hi im vinzentat the moment I'm learning python. while taking the first steps i implemented a tic tac toe game and wanted to share it here, to get some feedback and continue learning. I'm happy about all hints and tips :) I'm looking for any improvements within my code: style, common mistakes, etc. def creat...

17:33
-1
Q: Java NIO/SSL Manage Client State

folgempleI am new to Java NIO and SSLEngine. I have inherited this code (Java 1.5) which accepts connections from another Java application and creates a client for each connection. This application is currently used for performance testing, where each client basically gets part of a binary file and send...

A lot do. Might get you in the door, but it's the quality of your code afterward that keeps you working at the job after a few code reviews. — user4581301 22 secs ago
18:02
0
Q: Are the below relationships correct?

ln7373I am developing an appointment booking system between doctors and patients. Now, the flow goes like this A doctor should be able to create its available time slots and the patients can see the available time slots of a particular doctor and can book the time slot. class Doctor < ApplicationRecor...

18:29
You really shouldn't use your own salts on password hashes and you really should use PHP's built-in functions to handle password security. Make sure you don't escape passwords or use any other cleansing mechanism on them before hashing. Doing so changes the password and causes unnecessary additional coding. — Jay Blanchard 16 secs ago
0
Q: Come around limitation of CSingleLock don't accept NULL

zadaneThe CSyncObject object in CSingleLock constructor can't be NULL but I want it to work with NULL because I need to use this nest. BOOL CADODatabase::Open(LPCTSTR lpstrConnection, LPCTSTR lpstrUserID, LPCTSTR lpstrPassword) { CString database = GetSourceDatabase( lpstrConnection, NULL ); ...

19:00
1
Q: Implementationof place Auto-complete service

ProHere are my three classes that work on that, so I am looking forward to your great reviews and ideas in order to improve/shorten my code. I am trying to implement Place Autocomplete service that is a web service that returns place predictions in response to an HTTP request. The request specifie...

19:30
0
Q: Scraping data unveiling a button from craigslist

SMth80I've written some code to parse the names and phone numbers from craigslist. It starts from the link in "m_url" then goes one layer deep to parse the name and then again another layer deep to parse the phone number. Note that it goes 2 layer deep only when it sees "show contact button" on that pa...

19:44
0
Q: Trying to loop one API through another. PHP

JonssonThis is the first part where i get the symbol. <?php $stocks = file_get_contents("https://www.gurufocus.com/api/public/user/.../exchange_stocks/NYSE"); $stocks = json_decode($stocks, true); $symbol = array_map(function($stocks){ return $stocks['symbol'];},$stocks); { print_r($symbol); ?>...

19:56
Welcome to Stack Overflow! Please take the tour, have a look around, and read through the help center, in particular How do I ask a good question? and What topics can I ask about here?. you might consider posting this to codereview.stackexchange.comTimothy Truckle 6 secs ago
I'm voting to close this question as off-topic because belongs to codereview.stackexchange.comTimothy Truckle 24 secs ago
20:12
@TimothyTruckle Thanks, I'll look into codereview. — Daniel Hamar 43 secs ago
0
Q: Caesar Cipher encrypt/decrypt tool

tkosamAt the moment I'm learning Python and I made this script to workout my skills. Since it is one of my first programs I would love some feedback and tips, like more organization, less lines of code or more optimization, anything I could improve. print "Do you want to encrypt or decrypt the messa...

20:29
0
Q: Optimize my route an android app

MinäI've recently taken an interest in android appliactions and I have been working on an app regarding the travelling salesman problem. My app is a kind of a trip optimizer which is meant for travelers, so that they can optionally choose a starting point and a destination/multiple destinations. Righ...

0
Q: Splitting up a list with datetimes

dan-klassonI have this ordered list of datetimes that comprises of 30 minute slots: availability = [ datetime.datetime(2010, 1, 1, 9, 0), datetime.datetime(2010, 1, 1, 9, 30), datetime.datetime(2010, 1, 1, 10, 0), datetime.datetime(2010, 1, 1, 10, 30), datetime.datetime(2010, 1, 1, 1...

@user8234030 Since the code seems to be working, SO is not the appropriate site for this question. If you're interested in opinions about better ways to write it, you could post at CodeReview.stackexchange.com. — Barmar 12 secs ago
21:01
@Tumnus Hard to say without the exact code. Codereview might be a better site for this queston. — chris85 20 secs ago
@Kaz Very much so. Been dealing with this all day.
21:38
0
Q: A recursive sort and filter for a nested object

ArrowI have a nested object which I need to filter and sort. I have a nested Object where some keys like app1 are nested inside another object. I need to be able to filter out objects with the status of True. I also need to be able to sort by date irrespective of how deep the object is nested. ...

21:54
@ftor By sheer coincidence, I found another of his posts on codereview. I flagged the post there with mentioning that the user is using multiple accounts. I guess I have to investigate more time in researching if a question is worth answering or not... — Icepickle 17 secs ago
22:14
0
Q: replace a text from emacs buffer to insert it vertically with emacs lisp script

papachanI just found this post with vim (https://stackoverflow.com/questions/704130/can-i-transpose-a-file-in-vim) and i just wanted to do the same thing with elisp by creating a little script to reordenate all the characters from a buffer text into a vertical position. As the post said, the original bu...

0
Q: Multi-user account cross posting on both stackoverflow and codereview

IcepickleI answered a question today on Stackoverflow from which one of the commenters mentioned that this user had posted his question already several times on stackoverflow during the past 24 hours, with several user accounts. The user account on SO has been deleted (I do not know why though), maybe it...

0
Q: A RESTful Web Service with Spring Boot

TTTI have been working on my first Web Service application, and i need your review on this class and i seek any improvement for it (especially replacing ModelAndView) class ModelAndView Holder for both Model and View in the web MVC framework. Note that these are entirely distinct. This class m...

0
Q: Pokemon console game

Evanthis is another finished app of mine. It's a traditional pokemon clone simulation but very basic. Could anyone take a look and let me know what I can improve? How would you rate my app overall? Suggestions, corrections, whatever, I'm open to any and all input. I plan on making this a unity game s...

22:48
0
Q: use unordered multimap with int as key and tuple as value pair

abhudya singhBasically ,I want hash table with link list which stores 3 int type variable so I am using unordered multimap with int and tuple .But its giving me compile time exceed error WHERE I AM DOING WRONG .And is there any other efficient way of doing this . #include <iostream> #include <iterator> #i...

23:11
this would probably be better for code review — snb 22 secs ago
@snb Do you mean https://codereview.stackexchange.com? — QuantumDot 37 secs ago
23:29
0
Q: The C++ analog of norm in C

qd2009I noticed that the C++ version of <complex> has norm. However, I am programming in C, and there is no cnorm. So I made one to define before my main function: #include <complex.h> double cnorm(double _Complex z) { return cpow(creal(z),2) + cpow(cimag(z),2); } How would you improve this d...


« first day (1530 days earlier)      last day (2781 days later) »