« first day (2051 days earlier)      last day (1982 days later) » 

12:00 AM
RELOAD! There are 5849 unanswered questions (89.7350% answered)
 
0
Q: Generic Min Heap Implementation in Java

Hamidur RahmanThere is a Min-Heap implementation in Java. BubbleUp() and BubbleDown() could have been coded using recursion but I prefer without recursion. Would there be a major difference if had used recursion? package heap; import interfaces.queue.PriorityQueue; import java.util.Arrays; import java...

 
12:20 AM
0
Q: Faster merge with less auxiliary space?

lernerIn Algorithms fourth edition by Robert Sedgewick and Kevin Wayne, the exercise 2.2.10 states that: Implement a version of merge() that copies the second half of a[] to aux[] in decreasing order and then does the merge back to a[]. This change al- lows you to remove the code to test that ...

 
 
2 hours later…
2:07 AM
0
Q: Method ordering for Requirements API

GiliOver the past couple of years I've quietly developed a library for enforcing API contracts. The project is hosted at https://bitbucket.org/cowwoc/requirements/ Users write requireThat(name, "name").isNotNull().size().isLessThan(5) and get back: java.lang.NullPointerException: name may not be nu...

 
2:37 AM
0
Q: Naïve Prime Factorization in Clojure

CarcigenicateI saw a question about prime factorization on Stack Overflow and realized I had never attempted it before. This was what I ended up with after some playing around and tweaking. I'd like improvements on anything here. I know I could use a sieve instead of the naive method (I may switch later), ...

 
If your code works, consider a code inspection at Code Review. — Thomas Matthews 9 secs ago
 
2:55 AM
Code Review is a better place to ask for stylistic questions like this. — Barmar 5 secs ago
 
 
1 hour later…
4:12 AM
0
Q: Warped Audio Sample

Andrew GallaschI was asked this question and got no feedback, so I'd like to ask you for any feedback on my solution, Thanks! Think of an audio sample as a rubber-band that you want to pin to a musical time ruler. The pins are called Warp Markers. A Warp Marker locks a specific point in the sample (in sample t...

 
 
2 hours later…
6:14 AM
0
Q: Native operation call failed.java.lang.UnsatisfiedLinkError: Test.Sample.Jni_sample.Jni_sample(DDDII)V [ERROR]

Tom JoseI am using a java program to call .so file. Now I am getting an error (DDDII)V and i have no idea what might that be.. I am a complete noob.. Any help would be appreciated. Here is the lines that try to load the .so file void func(a,b,c,d,e){ System.loadLibrary("Jni_sample"); Jni_sample(a,b,c,d,...

 
6:44 AM
0
Q: Prototype GameManager for game written in Unity, C#

ProfessorOpticsI am self taught, so consistently seeking ways to code better, and more efficiently. If anyone has the time, please advise me on what can be done better with explanations as to why the old method is considered inefficient, and why the new method proves to be better. Also, where I can implement mo...

 
7:30 AM
-1
Q: Introductory Python Hangman Game

senpi314I'm currently taking a beginners' computer science class for school and we were assigned to create a Hangman game in Python. I've found that after I input a secret word, the program only counts the first letter correctly (also keep in mind, since this is a beginners' class, we were not required t...

 
7:45 AM
0
Q: Simple c sharp calculator optimalization

NoobStudentim doing simple calc for my school. Code looks okay, not sure if there is something to improve, but probably there is always something to improve. Last think i would like to add, is, that when user does input that is not stated, like case 3, or inside cases user inputs for example letters, instea...

 
8:16 AM
-1
Q: Better coding practice: Declaring a variable or directly use it?

maxomaxThis is code List<Data> listOfData = DAO.getInstance().findbyId(Id); listOfDataBos = BoHelper.wrapList(listOfData); Here we are creating a reference and then passing it to the wrapper function. Is there any harm in creating extra reference here provided that the reference is not used anywhere...

 
9:02 AM
codereview.stackexchange.com is probably better for this type of question — Robin Green 59 secs ago
 
 
1 hour later…
10:18 AM
-1
Q: Finding the ranges for a give set of random integers

Bad_CoderI found one problem of calculating the ranges of random integers. for example: for the input of 7,1 the range should be (1,1) and (7,7) input 1,7,2 ---> output (1,2) (7,7) input 1,7,2,3 ---> output (1,3) (7,7) input 1,7,2,3,4 ---> output (1,4)(7,7) input 1,7,2,3,4,9 ---> output (1,4)(7,7)(9,9) ...

 
10:33 AM
1
Q: This technique for functional programming, and testing functional programming, in javascript

dwjohnstonI've been playing around with functional programming and testing with jest recently. An issue I've run into, is that it's hard to mock ES6 module exports directly. See this Stack Overflow question for more details. The solution I've come up with is to inject the dependency functions into the ...

 
 
2 hours later…
12:50 PM
-2
Q: A controlled ageing system in Python

JumpJehovahI'm an absolute beginner to python, this is my first go at coding, so forgive me if i'm being an idiot. I decided to have a go at making my own life simulator similar to BitLife, available on the app store. I ran into a problem with the ageing system, the goal is that each time the user presses...

 
1:18 PM
Monking
 
2:08 PM
0
Q: Optimizing the code for segregating even & odd numbers in linked list

HanoiProblem->Given a Linked List of integers, write a function to modify the linked list such that all even numbers appear before all the odd numbers in the modified linked list. Also, keep the order of even and odd numbers same. My Approach:get pointer to the last node of list. And then traverse th...

 
2:26 PM
M<onking
 
2:54 PM
This is the wrong Stack Exchange site for this question. You're better suited posting this at codereview.stackexchange.comArcher 55 secs ago
 
@skiwi M>onking
 
This is too broad for SO. You'll have to think on your own and when you find a working solution, maybe post on code review stack exchange, so others can give yoz hints for a better style. This is a typical problem many people have as a student; asking for "cooking recipes". There is none, you have to understand what you are dealing with and think what kind of structure would help you to code more clean — user8408080 26 secs ago
 
0
Q: From the below javascript code snippet which one is considered to be most appropriate?

Rajesh KRScenario 1: try{ elements.personWrapper.getElement('span[name=personClass]').set('innerHTML', ''); } catch(TypeError) { elements.personWrapper.getElement('input[name=personClass]').set('innerHTML', ''); ...

 
3:59 PM
Monking.
 
 
1 hour later…
5:03 PM
@Maku if you want ask for a code review, go to codereview.stackexchange.commichasaucer 39 secs ago
 
5:21 PM
Certainly not. Event handlers can be programmatically assigned to controls in Access. See this question on Code Review or this answer for sample approaches — Erik von Asmuth 42 secs ago
I think this question should be placed in Code Review - Stack Exchange. — Sometowngeek 48 secs ago
 
Monking, I guess :)
 
I've spent the last four hours to resurrect a broken Win10 installation on a N2850-based Notebook (Medion 99263). I don't think it's salvageable. :|
 
@Zeta Salvage the files, not the OS.
After salvage, nuke disk and start over.
 
@Mast Would love to do that, but part of the installation is something called "Datev", and the notebook's owner cannot reinstall it at the moment, IIUC.
Also, it's not my notebook. Otherwise I would have nuked it four hours ago and then restored from an image.
Window's "Please wait" screen will haunt my nightmares.
Funny enough, Datev would work in this broken state, but the wireless drivers don't, so one cannot access the actual data. And of course, sfc /scannow says everything is OK, even though explorer.exe doesn't work.
 
@Zeta Well, that's why you create disk images. To prevent things like that from screwing you over when it goes wrong.
Not everything can economically be fixed afterwards without.
 
5:36 PM
4 mins ago, by Zeta
Also, it's not my notebook. Otherwise I would have nuked it four hours ago and then restored from an image.
Speaking of: if I actually manage to fix this, the owner will get a mandatory backup schedule.
 
@Zeta I know. What I'm trying to say is there's a good chance you won't be able to fix it. Not your fault, but some things just can't be unbroken.
 
Ah, that's true, unfortunately. I already told them that it's unlikely to fix the problem.
 
5:55 PM
@Zeta they store their operational data locally without backups?
on a laptop?
 
Yes. No. Somewhat?
As far as I know, they have installed a program called "Datev", but that's not actually installed. I've tried it, and apparently it opens IE11 and uses a dongle for authentication. Probably some weird ActiveX or similar technology (hopefully not). So all the Datev data is online. However, they said that the Datev installation was a PITA, and the guy who installed it is currently on vacation, and they really need that application.
 
Datev offers remote support
It's not strictly ActiveX, actually.
the Dongle contains a secured public and private key to authenticate against datev online
AIUI it internally uses some newer browser API. It's not bound to IE in itself
 
@Vogel612 Good to know, the overall problem is still the Win10, though.
 
The installation is apparently a pain, but again: Datev offers remote support.
 
Their tax advisor installed the program on the laptop, so I can't tell.
 
6:06 PM
Don't they have another laptop?
I know that DATEV is a windows only thing.
 
@Vogel612 Heh. MacBook.
 
ugh. Datev is always a pain
 
So I can either reinstall Win10 on the N2850 low-power-oh-my-god-it-feels-like-2006-please-help-me notebook, try to work some wonders with a VM on the MacBook (but my friend is currently away, I'm alone in the apartment and don't have the credentials for the MB), or just buy a refurbished T540, install Win10 LTSB, configure sane backups and updates, and then have the Datev guy reinstall the app.
 
that seems like a pretty comprehensive overview of your situation :)
 
I'm currently exploring option 1. 36% of the installation done. It should take about two hours to finally finish.
Nvm. The progress bar does its usual thing.
Back to site business: apart from the "questions must contain code", was there any other recent news?
 
6:27 PM
1
Q: Assigning projects in order of priority

SitoLet's assume we have the following situation: Multiple project topics exist, each corresponding to a natural number n, students can sign in and choose two projects and give them either priority_1 or priority_2, The name and the time when they sign in is tracked as well. With all of the infor...

 
not that I'd know.
 
6:54 PM
Heh. Apparently, when you "check for updates", you automatically become an update "seeker" and thus enable "testing of[..] the non-security fixes that will be included in the next Update Tuesday release".
 
0
Q: Closing of questions citing "off-topic" as reason where user-defined code and standardized code is clearly equivalent

guest271314See From the below javascript code snippet which one is considered to be most appropriate? [on hold] Scenario 1: try { elements.personWrapper.getElement('span[name=personClass]').set('innerHTML',''); } catch(TypeError) { elements.personWrapper.getElement('input[name=personClass]').set('...

 
7:13 PM
0
Q: A better way to organize my test functions

l7ll7I'm writing a software application of a few thousand lines of code (in Python), and in order to keep the whole thing together, slowly but certainly the need for unit tests (and later, other types of tests...) has arisen. My problem is how to organize the many testing functions that I've written ...

 
@Feeds Left an answer, suspect it won't be satisfactory for OP.
@Feeds @Vogel612 Are there any removed comments on the original question explaining why it got closed? I remember closing it because it lacked on multiple fronts, but I also recall there being comments on it.
 
7:32 PM
bruglesco left a simple comment
 
@Mast That's about the question where OP tried to replace all code, right?
By the way, option 1 worked. Win10 is up and running again, so time to create a system image.
 
@Vogel612 Thanks.
Honestly, I'm not sure if we're dealing with a troll here, so I'm backing out. I'm citing the help center and he's still not convinced why people voted to close. I was one of them FFS. I'm telling exactly why it should be closed.
Phrancis told him something similar in different wording, so the coin should've dropped by now you'd think.
 
Phrancis?? you mean bruglesco?
@Mast that user has 16 answers. I venture they're not a troll, just not quite getting the scope of code review...
~sigh
 
7:52 PM
@Vogel612 Huh? You're right. Bloody winterbash. Throwing off my avatar recognition...
 
argh. that person argumenting post hoc ergo propter hoc with a dose of strawman is rather infuriating
"it's on topic because I wrote an answer"
 
Yes, they think otherwise. It would not be the first instance of a majority in of any "community" is factually wrong. Again, proof of the incorrectness of such opinion is the answer posted by this user. — guest271314 47 secs ago
 
yea... "my opinion is fact"
there's so much wrong with the line of argumentation that user is following ...
it's not even trolling, they're just playing the wrong game without being aware of it
 
Let's set aside for a moment that if the majority of the community has an opinion on something we usually make it official policy, rendering his entire comment moot, but there's plenty of answers providing him with factual information on why it doesn't fit the scope. To the letter.
It's not that hard. We have rules, the question violates them, we close the question. Done.
 
I think their set of premises does not include the help-center...
 
7:57 PM
Sometimes there are grey-area questions getting closed. This is not one of them.
@Vogel612 Reminds me of a quote from Adam Savage.
> I reject your reality and substitute my own.
 
yea... something like that
 
What is allowed to be posted on this site? Oh, it's in the rules? Ignore the rules.
 
I'm soooo tempted to just make that answer vanish, but that'd be rather very obvious mod-abuse
damn having a conscience
 
lol
Being responsible sucks at times.
Rally an angry mob?
 
I believe you have chosen the wrong site. There is another site called Code reviewDharman 30 secs ago
 
8:03 PM
@Mast meh. being responsible means I'd have to clean up and keep the angry mob in check
huh.... there's no "flag for reopen" functionality...
 
@Dharman A request for simplification isn't a good request for review, but okay. Should this question be posted on Code Review, user is advised to read their help center first and provide the necessary context. What are we looking at, how is it called and why does it exist in the first place. — Mast 16 secs ago
 
@Vogel612 You're a mod. Think about it.
Who's going to handle your flag?
 
flag to close bumps posts into the CVQ
I'd thought there was a "flag to reopen", which bumps into the reopen queue, but apparently that's a 3k privilege only
 
It is.
 
0
Q: Python: login system

KrishnaThe end result of this is to allow a user to log in and/or register themselves for a dice game. please post some suggestions for improvement. import pickle logged_in = False with open('users.pickle', 'rb') as a_file: users = pickle.load(a_file) login_or_signup = input('do you want to logi...

 
8:29 PM
-1
Q: Homework in c++

ابو محمد(Guess the Number) Write a program in c++ that plays the game of “guess the number” as follows: Your program should include a function (generateNum) that chooses the number to be guessed by selecting an integer at random in the range 1 to 1000. Every time when the user entered a number, the progr...

 
8:53 PM
Regarding A and B, you might have better luck at codereview.stackexchange.com, please edit the question to only contain C — Omer 50 secs ago
 
0
Q: Please check this code for me :D

Morgan waltonThis code is for a currency symbol converter, The first part checks if there is a cookie named currency and if not creates it and sets 2 variables (variables used because of course php could not read the cookie unless it was reloaded after it was set. The second section is to check the existing c...

 
9:14 PM
With RVO enabled, it may be better to use an std::string instead of a char array in the first place. Though whether or not i'd bother saying that on a code review depends on whether or not you have guarantees of rvo being enabled with whichever compilers you're using, and whether or not there's good support for copy elision. — George 11 secs ago
This might be more a more appropriate question over at codereview.stackexchange.com. — Andy 12 secs ago
 
10:15 PM
This belongs on the code review site. — Thorbjørn Ravn Andersen 56 secs ago
 
0
Q: interactive multipe choice code

KoshVorlonThis isn't so much, HOW do I make it work, as this code works, rather how could I make it better. The way this code works is it guides a person to the correct answer by getting "Yes", "No" or "I don't know" ( in some cases from the person). It's inded to run in HTML5/javascript. (Kind of like an ...

 
10:47 PM
0
Q: Powerset of collection in clojure

dimidSimilar to this question, here's is another implementation. Assuming the input is already a set. (defn powerset [set] (reduce (fn [xs x] (concat xs (map #(cons x %) xs))) [()] set))

 
11:02 PM
0
Q: Given 4 vertices representing a quadrilateral, divide it into N parts

pookieI am attempting to, given two dimensions (width and height) which represent a quadrilateral, partition that quad in to N parts where each part is as proportionally similar to the other as possible. For example, imagine a sheet of paper. It consists of 4 points A, B, C, D. Now consider that the s...

 
11:32 PM
0
Q: GetSQLValueString usage with Mysqli

gcgmailTrying to migrate Mysql to Mysqli for php7 compatibility and having an issue with GetSQLValueString $page = "-1"; if (isset($_GET['ID'])) { $page = $_GET['ID']; echo $page; } else { header('Location:http://www.???.co.uk'); exit(); } $connect = mysqli_connect($...

 

« first day (2051 days earlier)      last day (1982 days later) »