« first day (1695 days earlier)      last day (2315 days later) » 

12:00 AM
RELOAD! There are 4850 unanswered questions (90.2628% answered)
 
1
Q: File editing class

Turtle321I was making this file editing class (writing to a file, reading a file etc.) in Python and was just looking for any feedback. Note: I've been thinking about removing the file_name property and requiring file name on each method call. import os class EditFile: """ format: <object_name

 
12:20 AM
possible answer invalidation by Jamal on question by Jon H: codereview.stackexchange.com/posts/26303/revisions
 
 
1 hour later…
1:28 AM
1
Q: Find total of non-attacked positions in a chess board - UVA 10284

Emanuel HuberThe input is until EOF, give in the FEN notation. The output should be the count of non-attacked positions. My code pass in all test cases in uDebug, but it don't pass on the hidden cases. All the problem description can be read here. #include <bits/stdc++.h> using namespace std; ...

 
1:57 AM
0
Q: Managing socket pool per datacenter and making sure there is no thread safety issues?

davidI have a list of sockets per datacenter (in general, I have around three datacenter and each datacenter having 20 sockets so total I have around 60 sockets). Now I have 10 business threads which wants to send data on a socket and I need to make sure each thread works on different socket so I crea...

 
2:18 AM
SO is not the place for questions about code that already works. Try Code Review. — jmcilhinney 17 secs ago
 
2:43 AM
0
Q: Encryption algorithm for an app

Algorithm_CreatorI have created an encryption algorithm for this app I am currently in the process of developing. I was wondering if my code looks "sharp", concise, and most importantly, succinct. I was also wondering if it is secure. I know that 99% of the time, encryption algorithms that are invented are not ...

 
2:57 AM
0
Q: Expect all values in an array to be greater than 30

alecxeI've given an array of elements and need to check that every single text is a number greater than 30. Sample input data: <ul class="data-list"> <li class="data-item">40</li> <li class="data-item">31</li> <li class="data-item">32</li> <li class="data-item">101</li> </ul> Current...

 
 
1 hour later…
4:20 AM
0
Q: Symbolic derivative in Swift

Jon HarropI just wrote my first Swift program! It is a little computer algebra test that computes the nth derivative of the symbolic expression \$x^x\$. I chose this example because I'm keen to see how ARC will cope with the density of pointers in the heap. Seeing as I'm completely new to this language I'...

 
 
1 hour later…
5:30 AM
possible answer invalidation by Ricky Wilson on question by Ricky Wilson: codereview.stackexchange.com/posts/183513/revisions
 
6:04 AM
0
Q: Extending Python list functionalities

tuliansI am extending the functionalities of a Python list and I would like to include a method to normalize a vector to the [0, 1] range, by using element-wise operations. I came out with this solution, but find that using two classes does not seem clean. The main motivation for using two classes is th...

 
6:38 AM
-1
Q: Reverse Traversal of Linked list

DanishIf I am having the billion/trillion records in single linked list , What is the best approach to retrieve the data from the list in reverse order.

 
7:33 AM
it is correct but inefficient - sounds like a question for code review, not Stack Overflow. — Eran 59 secs ago
 
 
1 hour later…
8:38 AM
Working code that needs optimizing is off topic for S0. It may be a candidate for Code Review. If accepted there then delete from here. — QHarr 30 secs ago
 
9:04 AM
0
Q: Wrapping the iOS triple buffering procedure in a generic swift class

J.DoeIn the Metal sample code and best practices guides it is advised to use a triple buffering technique to avoid access conflicts between the cpu and the gpu. The required code to do so requires knowledge of data alignment which can be tricky to understand and involves some extra fields. I wanted ...

 
9:44 AM
Monking
 
10:08 AM
0
Q: Parsing log file to JSON using java

ankita shuklaHi I have a below log file which i need to convert to json format using java. I have used basic string operations in my code, but it is not efficient. Please suggest me how to proceed with. JSON Format: Exception Identifier: java.io.IOException: com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 S...

 
10:41 AM
0
Q: Tic Tac Toe game - object oriented java

mustI've written my first project which is Tic Tac Toe. Everything is working correctly. I'm here to get some advices about my code. I want to be this code as object oriented as it can be. I divided every method into new class to keep it clear. The only thing which make my eyes cry is "static" boar...

 
11:11 AM
Your mindset seems to be pretty on-point. There are minor issues such as using typedef instead of using and unnecessarily copying an std::function, but you got the gist of it. Might be worth posting on codereview.stackexchange.com once it does what you want. — nwp 13 secs ago
 
-1
Q: Can someone help me fix the error I encountered code below?

JOP BegginerPlease help I have a problem with the code below it says : Exception in thread "main" java.lang.NullPointerException import java.util.ArrayList; import java.util.Scanner; public class AddressBookTest { ArrayList<AddressBook> ABEntry = new ArrayList<>(100); public static void main(String[] ar...

 
11:50 AM
possible answer invalidation by Alex on question by Alex: codereview.stackexchange.com/posts/183511/revisions
 
12:01 PM
0
Q: Bidirectional hash map in Java

coderoddeI have this bidirectional hash map that allows not just accessing values via keys, but also accessing keys via values. You can find a figure explaining the data structure in this post: Bidirectional bijective hash map in C. This is my code: BidirectionalHashMap.java package net.coderodde.util;...

 
possible answer invalidation by Alex on question by Alex: codereview.stackexchange.com/posts/183511/revisions
 
The world doesn't sleep, it seems
monking
 
12:19 PM
monking
@Vogel612, did you have pthreads class in your university?
I'll be getting one next semester, where I cannot use C++, only C
 
The pthread library?
 
It's fun to work with. Although RAII in C++ makes it a lot more sane to work with.
 
I asked if I can wrap things, but professor told no
though she would get hospitalized if she would see my variadic template magic, lol
I wanted to bypass everything and straight implement std::packaged_task, so I would get nice interface
 
Have fun looking into the dark, endless void*.
 
12:27 PM
@Zeta, it also doesn't have atomics, right?
@Zeta that's why I wanted to use variadic templates :) though I have llvm's asan, so hopefully it will get me through
 
C11 has atomics.
 
@Zeta I cannot use that either, lol
cats seem to like keyboards and stepping on them
one of them is nearby, and it tried like 11 times already
 
Well... That sounds like you'll work with GCC 4.3, right?
Or 4.6.
 
@Zeta she told that I can install any version of ubuntu, so I went straight up to 17.10
 
Err... You don't want to install Ubuntu 17.10 at the moment.
 
12:30 PM
gcc 7.2 onboard!
@Zeta I'm using Kubuntu 17.10 for 2 months and it seems stable
not as stable as 16.4.3 though
 
I believe she also told that I cannot use cmake nor make
 
@Incomputable no. never even heard of it
@Incomputable that's horrible
 
@Incomputable Use qmake.
 
I'm bummed out because they use Visual Studio 2015 (or lower) for the exercises I need to do...
 
12:33 PM
@Zeta she said command line only, lol
 
no CMake, no make, no chance of running the code on my Laptop...
 
@Vogel612 2015 can be retargeted, so if they don't require testing on their computers, you can use built-in tools for cmake and retarget it to newer compiler
although intellisense will be mad
 
ya no. I can't retarget to a platform kit over 140, because it's going to blow up the OpenGL setup IIUC
 
@Incomputable Use find . -type f -name '*.c' -exec gcc -c {} -o {}.o -Wall -Wextra -pedantic \; && find . -type f -name '*.o' | xargs gcc -o executable
 
@Vogel612 dealing with C++ build systems is terrible experience
@Zeta thanks, I'll save that line
 
12:36 PM
I have no idea whether it works, though. That's just bash memory.
 
@Zeta that is fancy, doesn't account for header-files and include-paths though.
 
And it will recompile your complete tree on every invocation.
 
also at least on arch you'll want -lstdc++ for the linker
 
@Vogel612 I've never encountered that one
 
@Vogel612 Err, why? stdc++ shouldn't be necessary for a pure C project, right?
 
12:37 PM
oh right ...
 
when writing C I feel like I can use only one word to describe everything
 
I was still on C++ ...
 
@Vogel612 sorry for not making it clear, we were talking about my course
and that word is void*.
 
Either way, here's something more fancy: alias find=my_make, where my_make ignores the rest of the line and simply calls make if --posix is mentioned on the command line.
It just has to look like everything is on the command line, right? :D
 
may be I could write a file with something like # !/usr/bin/make?
@Zeta yes, but she will want to build it on her machine
 
12:41 PM
@Incomputable Then use the oldest-trick-in-the-book. Write a main.c that includes the other sources (not headers, sources).
It's nasty as hell, but at least it's easy to compile.
 
@Zeta +1 infinity to compilation time and -1 infinity to productivity? xD
 
@Incomputable What's the worst you'll have to write there? Probably reader/writer implementations, queues, maybe a small server.
As long as she doesn't use a 2009ish laptop like I do at the moment it should be fine.
 
@Zeta small server is the final project. I don't think they'll even care about code quality, so I can write some script that will assemble things together
I could also run obfuscator over the code, just to get it more funny
so it would output something like this, but still working
 
12:57 PM
did bitcoin start finally falling now?
 
8% down. Either way, I'm afk.
 
@Vogel612 so it's "temporarily declining", I guess
 
16k to 12k in the last 10 days
hmm ... I'm not sure it's going to get back up quite so soon ...
 
@Vogel612 I hope so. I want new graphics card for reasonable price
 
1:01 PM
when people were starting to cash out at 16k, quite a few providers were struggling heavily under the load
@Incomputable yes, exactly
the first thing I thought when I checked just now: "Oh cool, maybe I can buy a graphics card at actual value now"
 
people in the place I live say "there's a special place in hell for every bitcoin miner", lol. So much hate.
hopefully AMD will get some cash to finally compete with nvidia
the lab I work in got some titan V's. So bad that they don't have enough PCI-E lanes for it due to other gpu
 
1:19 PM
Monking
@Vogel612 I doubt it'll restore within a few days though :( Going to buy a new PC with a hefty graphics card this week
 
are there any interesting games coming out in 2018? (action, rpg) I don't remember any, except the new game from fromsoft
 
There's probably some coming out :o
But not really up-to-date with it anymore
 
"detroit: become a human" looks interesting, though I'm afraid it is one of those games that don't fulfill their promises
metro exodus, wow. I didn't know another metro is coming out
 
1:54 PM
I still have Factorio and 400 unplayed games on Steam, as well as the Zelda Master mode. I think I don't need to worry about games to come…
 
@Zeta I reached lvl ~300 in dark souls 3, and got bored from kicking midir on every run. My stipend is enough for good meals and cinema once or twice a month, and that's it
finding a job which is not abusive to it's employees is extremely hard in Kazakhstan
perhaps it is so in every Asian country
 
@Incomputable Do you have a Steam wish list?
 
@Zeta no, I haven't really explored steam client
 
how do we feel about Edits that show improvements? --> codereview.stackexchange.com/q/183511/18427 I haven't had coffee yet... literally, just woke up
 
@Incomputable Did you play Volgarr the Viking already? Old school 2d jump 'n slay (Ghouls and Ghost like), easy to learn, not so easy to master, you might enjoy it if you've liked Dark Souls, although it's much shorter.
 
2:11 PM
@Malachi I believe it needs a rollback, since it affects the points mentioned in the answer. I'm not C# expert, but I can see that the code no longer has 6 nested loops
 
@Malachi Should have answered the question instead to provide their own improvements.
@Incomputable Wait a second.
 
2:36 PM
@Zeta alternative: Salt and Sanctuary. Basically DS in 2D
 
@Vogel612 Yeah, but I don't have a S&S key leftover :/
 
3:29 PM
@Zeta, the game is amazing. Though that flower at the very edge looks like trolling
 
3:58 PM
Delete the question and post it to Code Review. It's off-topic here. — JJJ 6 secs ago
 
4:11 PM
Hi Mark, this is not code review or code complete service. You should to write question that can helps other users, not just to you. Learn about How to create a Minimal, Complete, and Verifiable exampledanihp 58 secs ago
 
0
Q: Static file server with rust and hyper

TravisThis seems to be working fine, but it performs (testing with wrk) pretty poorly compared to what I've come up in other languages. Shouldn't Rust excel in serving static files? How can I make this faster? Are there any other potential problems here? . extern crate hyper; extern crate futures;...

 
4:46 PM
This question might be better suited to the sister site Code Review Stack Exchange. — Bobulous 51 secs ago
 
5:09 PM
@Incomputable S&S? Or Volgarr? Volgarr is filled with "Oh, COME ON!" moments.
 
@Zeta, both. Though S&S seems to be true dark souls
 
Dead Cells is amazing, too, in case you're looking for a rogue-lite experience. But I think I'll play Hollow Knight next. Or finally finish Shovel Knight.
 
in Volgarr I one can spam X and S
I never really played indie or 2d games, thanks for showing that great 2d games exist too
it's a shame that they don't get serious advertising campaign
 
I usually get them through bundles.
 
@Zeta I'll probably start saving a little for them, thanks for the info
 
5:20 PM
@Incomputable Have a look at "Ori and the Blind Forest". Amazing soundtrack and art. Semi-indie only, as they've got heavily supported by Microsoft later on, but still amazing.
@Incomputable If you're looking for specific games, check isthereanydeal.com.
Or, if you want to save money, just buy Factorio and never stop playing. /cc @rolfl.
 
@Zeta that one looks too dangerous to start playing
looks somewhat like cities skylines
 
@Zeta Haven't seen him for along time... coincidence?
 
Get in the habit of always including a field list with all INSERT statements. Not including a field list will get your code kicked out of every code review I've ever participated in, becaue when (not "if") a field is added to the VENDOR table your statement will immediately break. — Bob Jarvis 29 secs ago
 
6:12 PM
@Zeta I hear excellent things about that game.
 
6:28 PM
0
Q: C Binary Search Tree API Removal

arkdevelopmentThis was a school assignment. The course is now over, however, I was not able to get the removal of my binary search tree api working and was wondering if someone could take a look at it. void removeFromTree(Tree *theTree, TreeDataPtr data) { TreeNode *tempNode = createTreeNode(data); Tr...

 
6:49 PM
@skiwi Has not been that long.
 
@rolfl O hey there
Playing Santa this year? :o
 
OH HAI. K THX BYE
Yeah, being of somewhat Norwegian descent I do the whole Chistmas Eve thing, and then also being half-english, I do the christmas day thing too... so I do both ;)
Got 20 people for a sit-down turkey dinner on fancy china for dinner tonight.
 
I bet your kids like it! :)
 
Hey, at this time of year I am one of the kids. I even got myself some christmas presents.
 
Oh wow that's not a small feat
Cool :)
We don't do christmas presents here, though we do the food part
 
6:53 PM
It's no surprise that this is my Xmas gift to myself: factorio.com/store
5
 
^^
 
7:23 PM
@RubberDuck If you like using free time for other things...don't lol
4
 
7:36 PM
This question might be better fit for codereview.stackexchange.comFatih Akici 39 secs ago
 
8:14 PM
This type of question is on-topic here (although it's also on-topic at codereview). For Cython questions people usually have a better chance of getting a decent answer here than on codereview so we usually don't recommend moving it. — DavidW just now
 
9:00 PM
This would be better on-topic in CodeReview. Anyhow, you got three files to download, so three download commands are needed. The script is quite simple and easy to read, so shortening it might be of little benefit. Why would you like to shorten it? — vonPryz 50 secs ago
 
@rolfl Ha! I already ordered one three
 
I got one for my son as well, only 2 for me.
 
Don't forget to vote for Factorio on Steam Awards on Thursday.
But maybe I've already said that
 
9:42 PM
@SimonForsberg You should automate the reminder.
 
@Zeta Yeah, I don't have any automatic reminder functionality in @Duga yet
 
@202_accepted I fear the day Dwarf Fortress will get multiplayer. Or a slightly easier user interface.
 
10:03 PM
0
Q: Optimizing my Powershell code, could i do away with repeating the same commands

MariyahI'm very new to powershell. This is my bat file. It works fine. I just would like to know how to shorten my code. I get the feeling that I do not need to fully repeat the commands powershell -Command "(New-Object Net.WebClient).DownloadFile('z:\monthlypayments.txt', 'monthend.txt') ; (New-Objec...

 
 
2 hours later…
11:50 PM
0
Q: Dynamic shell command to create single PDF file

archivI need a dynamic shell command with multiple paths to create a single PDF file with FreePDF join (Unfortunately I can't use another program). My code creates first multiple single PDF files in the TmpPath and create than a single PDF file with the code below. After that the TmpFiles will be remo...

 

« first day (1695 days earlier)      last day (2315 days later) »