« first day (1724 days earlier)      last day (2299 days later) » 

12:00 AM
RELOAD! There are 4927 unanswered questions (90.2393% answered)
 
12:16 AM
0
Q: Given a Singly Linked-List python

NinjaGGiven a Singly Linked-List, implement a method to delete the node that contains the same data as the input data. Example: delete(1->2->3->4,3) ==> 1->2->4 class SinglyLinkedList: #constructor def __init__(self): self.head = None #method for setting the head of the Linked Li...

 
possible answer invalidation by Digika on question by Digika: codereview.stackexchange.com/posts/185563/revisions
 
12:37 AM
This CodeReview Handling lazy-loading webpages using vba may help you. You need to find the class name of the posts. — PatricK 7 secs ago
 
12:49 AM
0
Q: Why does django cache sometimes return NoneType

JoshHi this is doing my head in. Sometimes functions I have in python (django) return a number and sometimes a nonetype (irrespective of cache period). It prints the cache in the method but the function still seems to return nonetype. Often the cache will not show in a print function but also do not ...

0
Q: Sleep mode is not working correctly

SergeyKernel version: 4.14.3-1-ARCH Sheath: XFCE Boot loader: refind I'm looking required minimum paging file size: sudo nano /sys/power/image_size I have it: 13418831872 = 13.45 GB. I take a little with margin. I create swap file of size 15gb: sudo dd if = /dev/zero of = /home/sergey/swapfile bs =...

 
 
2 hours later…
2:33 AM
0
Q: Nested Else if Statements Beginner Programming

linI am a beginner c++ programmer and I would like some review with my code. The objective of my code is to check the requirements of a person to see if they are fit for blood donation. I am supposed to check (Name, Gender, Age, Weight, Height) of a person to see if they are eligible for donating ...

 
2:59 AM
This should possible be on codereview.stackexchange.com or security.stackexchange.com as it isn't really on topic for this site. — Dijkgraaf just now
 
3:11 AM
Have a look at codereview.stackexchange.com (read their help center); if your code currently works, then your question may be on topic there. — Erwin Bolwidt 33 secs ago
 
3:52 AM
Probably just conflicting edits and not a bug with the site. Once you get a fully working example, you can ask for suggestions to improve your code on Code Review. — Code-Apprentice 40 secs ago
 
0
Q: Three functions within Java 1.8

meallhourI am having 3 functions with my JAVA code. I see there is some sort of duplicate code used in 3 functions. Kindly review the code and provide feedback. I am using JPA repositories to save the data into DB. From the main class I am calling 3 functions as below: classobj.func1(repStr); String ar...

 
4:14 AM
0
Q: JavaScript ES5 - To Do List with extra functionality - Refactoring

Aurelian SpodarecI have made a somewhat GMAIL like list. It's in ES5, I just used const and let just because I'm learning about those, other than that, all is ES5. How can I improve this code? I'm specifically interested in the main 'party-list', code, because I use a for loop to add event listeners. I mean...

 
4:27 AM
You may want to post this first on codereview.stackexchange.com first. In its current state it won't run and even if you fix that it's still very hard to read. — Bailey Parker 41 secs ago
 
4:55 AM
possible answer invalidation by Jamal on question by Dexter Thorn: codereview.stackexchange.com/posts/185630/revisions
 
5:17 AM
0
Q: Populating a structure

user158590I'm solving K&R exercise 1-13: Write a program to print a histogram of the lengths of words in its input. It is easy to draw the histogram with the bars horizontal; a vertical orientation is more challenging. Although the exercise itself is pretty simple, I've decided to apply a more "...

 
Monking
 
5:45 AM
Monking
I was going to post a good answer on a recent Clojure question, but then realized while rewriting the code that I can't get it to work correctly -_-
And one case fires an IndexOutOfBoundsException for some reason, but other almost identical cases don't
 
1
Q: Python code that sorts books

Ash ChiaI am currently a student just starting to learn python and I need help improving my code for a school assignment. I've already written the code for the program, just need suggestions on how to improve it or make it better. Uncle Joe started the Greenville Secondhand Bookstore in 2000. As ye...

0
Q: Entity Framework with two databases (with UoW, Repository and Service Layer)

MarshallI have two databases: one for a warehouse, second for the office (The db design is out of the scope of this question). There are MANY cross-database funtions. One of those functions is IsPurchaseOrderClosed. I need data from TWO databases to determine this. I was trying to build a DAL using Unit...

 
6:14 AM
Sql is very good at sorting data. The query might end up getting a bit complex, maybe not (I'm not at my computer right now so I can't take a careful look. If you mock up an sqlfiddle demo with some relevsnt sample data and post your code to CodeReview and ask if it can be accomplished with pure sql, you may get a response. (Of course always try, yourself, before asking for help and be very precise about the expected output.) — mickmackusa 31 secs ago
I'm voting to close this question as off-topic because this question belongs on CodeReview. — zx485 30 secs ago
 
6:55 AM
-1
Q: Am i using concurrent.futures executor.map() correctly

CharlieOver here is a function to read data of from a list and write it to a file: import os import concurrent.futures def writeFile(myList): with concurrent.futures.ProcessPoolExecutor() as executor: save_dir = "./reports" for item in myList: cname = "".join(item[2]) fname = ...

 
7:10 AM
0
Q: Safe strcpy Replacement

owenthewizardI'm a novice C programmer and would like some feedback on this function: void strcpy_s(char *dest, const char *src) { strncpy(dest, "\0", sizeof(char)); strncat(dest, src, strlen(src) * sizeof(char)); } Did I overlook anything obvious? Is this really a safe replacement for strcpy?

 
 
7:45 AM
0
Q: Rust: Find max values of all subarrays of specific length

GinghamTausThis is one of the coding questions that I subscribe to and I wanted to solve it in rust. I am n00b programmer. I would really appreciate your feedback for improving this code and writing idiomatic rust. *Given an array of integers and a number k, where 1 <= k <= length of the array, comput...

 
Monking
 
8:30 AM
0
Q: Alternative way for checking an anagram pair

hexmanI'm writing a program to check whether a pair of Strings (entered by the user) are anagrams or not. I've already did with the standard way to sort both of the strings using Arrays.sort() but I also thought of an alternative version not requiring any sorting and ended up with this: import java.ut...

 
8:55 AM
possible answer invalidation by gwyn on question by gwyn: codereview.stackexchange.com/posts/185645/revisions
 
@Duga rolled back
 
0
Q: My code cross-checks data sent from clients and sends back related information to all connected clients. It is not sending data to all the clients.

Jodh SinghI am trying to send data from server to to all the connected clients but data is being delivered only to a few clients who joined later in the chat. I am sending encoded code from client which after cross-referencing is sent back to all the connected clients with related information but is only ...

 
9:19 AM
Given the code is working, it really belongs on codereview.stackexchange.com. For your question here, could you provide a Minimal, Complete, and Verifiable example? — Ole V.V. 15 secs ago
 
1
Q: Transforming lists of products to boolean vectors

Adel RedjimiTask Inputs Lists of products stored in a CSV file, where each line represents the shopping list of a single client: Outputs A CSV file: Header: products names sorted by number of appearances in the input file. For each line k we output boolean vectors where each of its elements indicates...

0
Q: Blood donor calculator with nested statements

linI have made a program to determine compatibility for blood donating in the categories of gender, age, height, and weight. Let me know what you think of my code. #include <iostream> #include <string> #include <climits> using namespace std; int main() { string donorName; string donorGender; int d...

 
10:01 AM
Maybe post on code review ? — IMCoins 42 secs ago
 
10:13 AM
Monking
 
0
Q: Collect n events from eventemmiter

kharandziukTo simplify my code I use the code below which gives me the ability to collect the next few events and resolve them as a promise: const collectEvents = (eventEmmiter, eventName, count=1) => { return new Promise((resolve) => { const result = [] const listener = (msg) => { result.p...

 
10:28 AM
0
Q: bank account program for new users

vivekfavorite 5 I am learning Python and in particular learning about classes. Since I'm self teaching, I'd appreciate any feedback and constructive criticism. I have a couple specific questions: In Python you can have multiple functions and classes in a single file (module), but is it considered ba...

 
10:41 AM
Welcome @JulienRousé
 
0
Q: Handling an array of Promises where we care about the outcome of each

JaredeGiven some data (a job) like, which is from listening in on a RabbitMQ queue: let data = { "format_oid":["35474527960032","2595837960032"], "name": "abc123-def456-gug010", }; Where we want to loop over the format_oid (one or many) and get more information about them. We have a Job handl...

 
@julien The reason I invited you here is because of some of your recent edits.
Questions which violate the rules of this site too severely to be repaired should be closed and left alone, not edited.
The edits are pointless, the questions will be removed.
If you have any questions, feel free to ask them.
In this chat room, there are always regulars around, even if you don't see them.
 
@Mas
@Mast Sorry it took time to replies, I had to understand why I had an invitation from *stackexchange* tothis chat, then understand you talked to me.

My apologies for editing content that should be removed. If I understood correctly, I should have flagged the post/ downvoted it and move?

Thanks for pointing this out.

Not related to what was said just before, this chat is a bit confusing at first.
 
11:32 AM
0
Q: Script requester for workplace

Dylan LoganMy program allows employee's to request python scripts from me and the development team. It allows the user to enter fields and a specific developer to complete the task. Then once they click on the request button it compiles all the fields and sends them in an email to the specified developer. (...

 
11:47 AM
-1
Q: I can't take the value of an array in a for loop

NikolasI just want in every iterate of the loop to take different value of the array in order to read different csv file. I am attaching you the code. $Fund_names = array ("NIK", "KAN"); $N_o_F = sizeof ($Fund_names); for ($i = 1; $i <= $N_o_F ; $i++) { /** START*/ $outFile = '//NIK/Attribution/"$F...

0
Q: calculator.java

Andreiimport java.awt.*; public class calc extends Frame { Button[] b = new Button[25]; Pan tf = new Pan(1); Font f = new Font("TimesRoman", Font.BOLD, 14); double n = 0; int op; boolean flag = false; Toolkit tool; public static void main(String[] args) { new calc(); } public calc() { setTi...

 
12:04 PM
0
Q: Android RecyclerView Adapter: Passing normal clicks and menu clicks over the same activity

Florian WaltherI am unsure about my approach here. As you can see, I want to send normal clicks and 2 different menu item clicks back to the underlying activity over an interface. Now I wonder if it is bad practice to send it over the same interface. I coulnd't find an answer online. Also any suggestions about ...

 
12:15 PM
possible answer invalidation by Raimund Krämer on question by Andrei: codereview.stackexchange.com/posts/185679/revisions
 
12:39 PM
@JulienRousé no worries.
for whatever it's worth: you can edit recently posted messages of yourself by pressing "arrow-up". If you do that a small pen appears on the left, like here
 
Do you actually need to build and return a list of lists? The pattern in itertools is to return an iterator of tuples, and evaluate lazily. Anyway, if this is working code that you think could be improved, maybe see Code Review. — jonrsharpe 29 secs ago
This should probably be on Code Review, not SO. — internet_user 1 min ago
 
0
Q: Link/Bookmark app Javascript Backend (Node js)

John Paul PenalozaThis is the backend "api" in socket io for my links/bookmarks app. Error handling in this and verifying a path to the link seems pretty verbose. I want to improve this. Also other general improves are always welcome. const User = require('../models/user') const utils = require('../utils') var li...

 
@200_success (Sorry, I was away for the weekend) The question got more feedback over the weekend. And now has, IMO, a clear +7/-2 consensus for it. I'm unsure what thresholds you're using, but it's enough that it would have passed a tag synonym request - which is what I'm pretty much requesting.
 
1:07 PM
Greetings, Programs.
 
Greetings, User
 
1:35 PM
possible answer invalidation by slowy on question by Andrei: codereview.stackexchange.com/posts/185679/revisions
 
1:53 PM
I'm voting to close this question as off-topic because it belongs on Codereview — Darren Sweeney 57 secs ago
you probably want to post this in code review. — Funk Forty Niner 30 secs ago
 
I haven't been in here for a while. I have some additional time now since I'm currently on furlough.
 
oh sheesh, you're in the army now?
 
IRS
 
does that stand for "International Revenue Service"?
 
Internal Revenue Service
 
1:55 PM
curse my glance-reading
 
lol
Nothing international about the IRS.
 
so you're affected by the "government shutdown" and the budget debate?
I never understood why that's so huge an issue in america ...
 
Yep, since I'm considered non-essential. I process tax return transcripts for mortgage companies, which also means that those seeking to buy a home have to wait now.
 
possible answer invalidation by Raimund Krämer on question by Andrei: codereview.stackexchange.com/posts/185679/revisions
 
@Vogel612 AFAIK it's the result of one of their laws which boils down to "No budget, no spending". So if the parties involved keep screwing each other by not having a budget, thousands of employees are sent home.
What I never understood though, such leave must be unpaid or the effect would be negligible. Which basically means everyone "non-essential" working for the government are on 0-hour contract basis or something. I can't understand how such a country hasn't crumpled yet.
So my understanding must be flawed.
 
2:06 PM
I watched an explanation video from CGP Grey about it... apparently it boils down to giving congress a stupid amount of leverage over the president ...
where congress can say: Ya know, you don't get this budget...
also you don't get to run the gov without gettng a budget
wait you expect us to give you a budget? nah
in unrelated news, somehow I may have problems with my current work project that I can't solve :/
and I'm pretty sure that it's not my fault...
 
@Vogel612 Yea, bloody politics gets odd there at times. Didn't understand how much congress, senate, white house and others depended on each other till I'd seen The West Wing :-)
@Vogel612 Doesn't have to be your fault to be your problem in the end.
 
true that ....
 
Software problem or Workplace problem?
 
Software...
Trying to legally vet dependencies for projects
for that we kinda need to know what we depend on...
and if that weren't annoying enough, the whole thing needs to be somewhat retraceable, so I need to know which projects request which dependencies...
now we have a multi-module maven project. Those projects must be brought together by an "aggregator project"
and that aggregator project doesn't have dependencies, yet magically shows up as the requesting project for about every single one of them
thanks
...
 
Sounds like you got a dependency-tree problem.
Either projects are relying upon parts they shouldn't even use, or your overview got screwed.
 
2:18 PM
nope, I just shouldn't use the groupId instead of the artifactId when creating the POJO that holds dependency information
because someone thought it'd be a good idea to have:
 
I'm voting to close this question as off-topic because it belongs to Code Review given that it is about working code — Camilo Terevinto 21 secs ago
 
com.acme.project:com.acme.project:3.0.0-SNAPSHOT
com.acme.project:com.acme.project.component1:3.0.0-SNAPSHOT
and that's why I didn't notice that mishap at first :/
 
@CamiloTerevinto Heck no, Code Review doesn't want anything to do with this question. — Mast 26 secs ago
@Mast This fits exactly the help page of Code Review: "If you are looking for feedback on a specific working piece of code from your project in the following areas… Best practices and design pattern usage" — Camilo Terevinto 14 secs ago
 
now the only thing remaining is to get the library I'm using to stop polluting my logs
 
@Vogel612 Yuck
 
2:22 PM
Please take a look at A guide to Code Review for Stack Overflow users and Code Review's help center before making such recommendations again @CamiloTerevinto — Mast 49 secs ago
 
So, naming problem?
 
nah. just a "typo" in a place that didn't occur to me to be the culprit because of yucky project naming conventions...
 
So, a naming problem hidden in conventions?
 
if you want an incorrect method call to be named "naming problem" then yes
 
Ah, so it was an incorrect call obfuscated by lousy naming, not the other way around.
 
2:26 PM
0
Q: Inline commenting and functions breakout in Python

MiroWe have several disagreements on best practices of code design in Python (which are not explicitly covered by PEP / Google style. The use of inline comments Some people prefer to write code without any inline comments (except highly complex blocks <1%) saying that the code should be self-exp...

0
Q: How to refactor\apply pattern correctly?

Vitaly MosinI have several constructors with shared interface. They surves to construct complex xml based on some value. Here example: public class UnitXmlConstructor : IEntityXmlConstructor { private readonly IHandbooksService _handbooksService; public UnitXmlConstructor(IHandbooksService handbooks...

 
Julia Silge on January 22, 2018

The 2018 Stack Overflow Developer Survey is open right now, and we on the Data Team are eagerly awaiting this year’s data so we can uncover new insights about the worldwide developer community. Every year, we learn interesting things, whether that’s about student developers’ attitudes toward industries or fictional representations of coders. I work remotely, along with the majority of the technical employees here at Stack Overflow, so before we have new survey data to explore, let’s take one more dive into the 2017 data to see what we can learn about developers who work remotely. …

 
@CamiloTerevinto and Mast: I can move this to Code Review if I need to. I looked but didn't see it when I first posted this. It is a specific question though, but the code does work. My fear is more or less am I creating future problems with this approach and try to learn from this. — bjhuffine 28 secs ago
 
2:42 PM
Educating Stack Overflow: an exercise in repetition.
 
both the users and the company :/
 
True ^^
@Feeds Using a scale from blue-ish green to green-ish blue. Somebody should get fired...
 
that's not generally true, but ya, that color interpolation is a bit of a problem ...
 
2:58 PM
0
Q: PhP PASSWORD HASHING USING SALT PASSWORD HASHING TECHNIC

OtompoPlease i need help i have a voting system which allow me to add user as admin. in the process of adding the user i use a salt password hashing technic and is work perfectly that is when i what to add a user. The problem is that the user can not login and i have try but no way for me. The codes pa...

0
Q: HackerRank - Almost Sorted

WooWapDaBugI've written the following algorithm to solve (this HackerRank problem)[https://www.hackerrank.com/challenges/almost-sorted/problem] using stl algorithms. Problem statement Given an array with n elements, can you sort this array in ascending order using only one of the following operations...

 
why not comment that this is hard for people with triptochromia or what it was again?
@Mast hmm ... it holds up pretty well in this color-blindness simulator
 
@Vogel612 Odd, I'm not colorblind and even I have problems with the colours used. It isn't that I can't see the distinction, it's just so bloody hard I need to compare neighbouring countries to make a decent estimate of the actual percentage.
> Your Browser does not support the required Features.
Bloody useless message...
Firefox is here to stay. If you don't support Firefox, go home.
 
that's like the large german free e-mail providers that say "chromium is not a modern browser, would you like to be redirected to the simplified inbox?"
of course chrome is a modern browser that doesn't get that bullshit
 
3:13 PM
Right.
 
argh...
wow ....
of course there's a library that has it's own damn Logger implementation ....
 
@quartata Thanks, I don't think it's relevant for @Duga at the moment, it sort of feels like just another layer that doesn't really provide much. If others use it though it'd be interesting to hear what they think of it
 
3:29 PM
 
3:42 PM
If your C++ code works correctly, you may want to post to Code Review for a code inspection. Add to your post that you are looking for speed optimizations and identify the bottleneck area of code. — Thomas Matthews 1 min ago
 
For starters you're storing A.length but not using len anywhere, and you are iterating over the array much more than the expected worst-case complexity, O(N). Think of a way you can iterate your array once. That being said, this kind of question probably belongs on code review. — chazsolo 37 secs ago
 
0
Q: Mutable default argument usage

x42ovI have a function that returns chromedriver instance and logs browser information only once in a session: def init_chromedriver(some_args, _l=[]): driver = webdriver.Chrome(...) if not _l: _l.append(None) logger = logging.getLogger('driver') for k, v in driver.cap...

0
Q: Swift/iOS: Subclassing UILabel and setting properties

Eivind LindbråtenI'm writing this subclass to add an icon to a UILabel. It works, but I'm wondering if this is the best/cleanest way to do it. Do you see any improvements? Should maybe text and image properties be set using a init() method? import UIKit class IconLabel: UILabel { override var text: String?...

0
Q: Return an object but with one property different

Liz ParodyIn the following code I want to return all the same keys and values except the property color. If the name is default, return the color: '#1F2532', if it's different than default, it will call a function that gives me random colors color: pickColor([]). But I think there is a better way to write ...

 
3:59 PM
I'm voting to close this question as off-topic because it belongs on codereview.stackexchange.com (not SoftwareRecs) — Wonko the Sane 56 secs ago
 
4:09 PM
0
Q: diff of the two array -Javascript

shaisthato find the diff between the given two arrays and print them function remove(array, element) { var index = array.indexOf(element); if (index !== -1) { array.splice(index, 1); } } function diffArray(arr1, arr2) { var newArr=[]; // Same, same; but different for(i=0;i<=a...

 
holy crap it's a royal pain to rip out misconfigured logging from a maven-library
aaand it's not even maven's fault... it's Plexus' fault
holy carp that DI framework is a royal pain
 
4:25 PM
loggers are not just registered
no loggers are special
you can use setLoggerManager to set the thing that creates loggers
but it's of no effect to bind LoggerManager to what you'd have set
because they're not that special, you know?
 
lol
Which wouldn't have been that bad had it been properly documented.
But I can smell from here the docs weren't so clear about it.
 
which docs?
the only thing you can find about that mess of DI framework is a tutorial from ages ago, that's outdated
a sparse amount of SO questions
 
Ouch.
 
and possibly some sources if you're lucky
 
2
Q: Novel solution to "substring with concatenation of all words"?

IgidThis is a Leetcode problem. You are given a string, s, and a list of words, words, that are all of the same length. Find all starting indices of substring(s) in s that is a concatenation of each word in words exactly once and without any intervening characters. A couple of sample inputs/out...

 
4:39 PM
@hooked As hadley mention, the question has a correct technical answer. I've tweaked the question to make this clearer. It certainly doesn't belong in codereview. — csgillespie 36 secs ago
 
0
Q: calculate co-occurrences of some words in documents dataset

Tony WangIt's a function to calculate the co-occurrences of some words in a news dataset, such as Techcrunch, Wired. The words list could be locations, products or people names. Words list example: ["New York","Los Angeles","Chicago"] Return result: {"Chicago": {"New York" : 1, "Los Angeles": 2}} The...

 
4:54 PM
Questions about coding style and organization are more appropriate for CodeReview.SE, although this might be too minimal for their liking. — Barmar 42 secs ago
 
@CaptainObvious Bearing in mind this already was re-posted after being on SO, is this a better fit for Software engineering?
 
@SamOnela Perhaps, but it's likely a duplicate of already existing questions if the question got split up.
 
@Mast hmm
 
5:11 PM
So when you repost your question where it belongs in Code Review, make sure you provide a Minimal, Complete, and Verifiable example. — K.Dᴀᴠɪs 10 secs ago
 
Should [this post] be tagged as ? ... given this comment
 
@Duga Blasphemy.
 
Monking
 
@K.Dᴀᴠɪs Absolutely not. MCVE are required at Stack Overflow, they are illegal at Code Review. Please take a look at their help center. — Mast 29 secs ago
 
0
Q: Print all permutations from a given list of strings such that each set of strings is completely unique

Latika Agarwal Problem : Given a list of strings, some of which may be anagrams amongst themselves, print the permutations which can be so constructed so that each permutation has set of strings which is completely unique. input : “asda”, “daas”, “dand”, “nadd” output : {“asda”, “dand”}, {“daas”, “dand”...

 
5:32 PM
0
Q: Caesar-shift encryption

ShuiI know there are plenty of Caesar Cypher reviews on here, but I especially wanted to see how other programmers felt about my use of the cmd module and the efficiency of my functions. Though this program in its current state is fully functional, I feel the design may be gridlocked and lacking fle...

 
5:44 PM
I would suggest codereview SO site for questions like this — depperm 9 secs ago
 
0
Q: ASP.NET Response.Filter: move javascript to bottom

ar099968I am attempting to create response filter in order to modify the html being produced by another web application, for move all java-scripts at the bottom of the page. As shown below I created a ResponseFilter derived from Stream. On Write, the content is cached to another MemoryStream. On Flush, ...

 
6:04 PM
0
Q: Creating a File instance via Javascript fails in Firefox v21.0

JustinI'm working on a Javascript function to create a text file from some dynamic data, and upload it to a server. Using the File interface, I was able to dynamically create a file successfully when tested from my personal laptop. Laptop specifications below: Computer/OS: MacBook Pro 10.11.6 (El Ca...

 
I'm voting to close this question as off-topic because this question belongs on codereview.stackexchange.comMgetz 47 secs ago
If this is working code it should be at codereview instead. — drescherjm 13 secs ago
 
6:22 PM
@melpomene: You do if you want to pass code review ;) — Lightness Races in Orbit 53 secs ago
 
1
Q: String to long double conversion using FBLD

OrientI always wanted to try fbld x87 instruction to aid to convert string to floating point value. I sure a chance to face this instruction in disassembly of all the code written for last decades (Linux kernel, math soft etc) is as close to 0 as possible. No one another instruction is as of no use as...

 
6:37 PM
I'm voting to close this question as off-topic because it is asking for an improvement to working code. ask on Code ReviewDaniel A. White 25 secs ago
 
0
Q: A portable parallel loop construct in C89 - follow-up

coderoddeThis is a follow-up question to A portable parallel loop construct in C89. I have incorporated all the good points made by vnp. Now my code looks like this: parallel_for.h #ifndef PARALLEL_FOR_H #define PARALLEL_FOR_H #include <stdlib.h> #define ERROR_FORP_SUCCESS 0 #define ERROR_FORP_NO_ARGS...

0
Q: JavaScript/Angular 1 - Mulptiple complex ng-if conditions properties

Mouad EnnaciriI have 4 ng-if who are related with the same conditions properties <a ng-if="action.state && !action.params && !action.href && !action.callback" ui-sref="{{ action.state }}"> {{ action.label }} </a> <a ng-if="action.state && action.params && !action.href && !action.callback" ng-click=...

 
7:15 PM
0
Q: Building a string from multiple inputs with some variations

BattlFrogUsing c#. I am accepting a form from the user with a bunch of inputs and I am constructing a string from those inputs. I am trimming each input and 2 of the inputs (GID & Clone) are not required fields so I'm doing null checks before building the string to avoid null object errors. I wrote thi...

 
possible answer invalidation by user1950349 on question by user1950349: codereview.stackexchange.com/posts/185526/revisions
 
7:32 PM
0
Q: C++ and SDL2: Snake implementation

atmostmediocreI've created a simple "Snake" game in C++, to practice using OOP and SDL2 (this is the first time I've used a graphics library) and it works fine. The problem is, I do more C than C++ and I'm not happy with the object-orientedness (if that's even a word) of my code. For example, I really hate my...

 
8:06 PM
-1
Q: Is it okay to return so many promises in both components?

Ivan ParedesIs it okay to return so many promises in both components?. I have deferred in the services and in the controller. the code is well established or should do in the service simply a return with everything. What other things do you propose to improve the code? controller: function mostrarResultad...

 
8:23 PM
If this is working code, it would be better suited to codereview.stackexchange.comJRLambert 32 secs ago
 
9:07 PM
This is probably a better fit for Code Review than on Stack Overflow. — William Perron 26 secs ago
 
9:46 PM
0
Q: AOC 2017 DAY4 PART2 in C++

wheelsmanxI was wondering if some of you could make fun of my code for me? I was wondering if you guys could give me some kind of direction on where I can make improvements in my code. Source.cpp #include <vector> #include <string> #include "Header.h" using namespace std; //By: JH //Date: 1/22/2018...

 
10:01 PM
This might be better posted in codereview.stackexchange.com — Matthew S 18 secs ago
 
10:18 PM
0
Q: i18n: Lookup ISO Alpha-2, Alpha-3 country codes with Javascript (ES6)

Aaron GoldsmithIn my application, a country code may be passed from the client as a URL query string or in a header. If there is no country in the url or headers, then it will default to the United States. The application uses both Alpha-2 and Alpha-3 codes, and there are special cases for Canada and Great Br...

 
10:49 PM
0
Q: A java IRC bot created for twitch

HamBone41801This is my Main class, all it does is start the bot object. package com.k35trel.twitchbot; public class Main { private static final String HOST = "xxxxx"; private static final int PORT = xxxxx; private static final String PASS = "oauth:xxxxx"; private static final String IDENT ...

 
11:04 PM
If your code works, and you are asking others to review it, Code Review may be the best place for the question. Do read their help center for what's on topic and not. — Mike McCaughan 42 secs ago
 
-1
Q: moving average of temperature

RachaelUsing main method, write a program to find the average hourly temperature for each day of the week for the first 31 days in the year given that a user will enter hourly temperature data for your program. Show a formatted output of your result.

 
11:24 PM
0
Q: I've Made a Booking Form Which Uploads Info to a Database

SimmsRyan97How do I make it so other users can't book a date between two dates someone has booked already? Here is my form: <h2>Booking Info</h2> <label>Number of Guests *</label> <input name="guests" type="number" min="1" max="8" required> <label>Arrival Date *</label> <input name="ar...

 
11:43 PM
0
Q: Counting the number of 1 bits in a sorted bit array

grayQuantI wrote a function in python to count the number of 1-bits in a sorted bit array. I'm basically using binary search but the code seems unnecessarily long and awkward. I did test it for several different cases and got the correct output but am looking to write a cleaner code if possible. def coun...

 
11:58 PM
This question has a better chance of being answered at the AI SE site. I don't see much point in showing your current code, you need a working algorithm. Also you didn't describe why your current approach didn't work. On a side note, I see a bunch of other issues with the code, you could take it to take to the code review site. — DPM 28 secs ago
 

« first day (1724 days earlier)      last day (2299 days later) »