The FixDataTable example sorts hundreds of records correctly. The problem reported in the question can not be duplicated. A more appropriate place to ask for more help would be StackExchange CODE REVIEW — Roberto26 secs ago
This would be a good fit for Code Review, as has been suggested, since the code works correctly and you do not have a specific programming problem/question and are instead looking for improvements. — Phrancis57 secs ago
I'm voting to close this question as off-topic because it contains working code and the OP is seeking a review of it. Such questions should be on codereview.stackexchange.com. — Daniel Jour12 secs ago
I am learning Radix sort and learning by experiment and various forms of implementations, I post one of the code I am looking at,
My question is, what is the value of globalPtr? Especially lost by statement next[bucketTail[value]] = globalPtr, why we cannot just use bucketTail[value] = next[buck...
I have a data stored in .mat files, each .mat contains a cell array of vectors of length ~70. I'm trying to read these .mat files in to Python with h5py, but reading just 1000 cells takes about 7 seconds, and I have in total about 10^8 cells to read...
Is there any way I could simplify this pro...
I want to limit the request rate in a spray/akka-http route. I'm not an expert with both scala and spray/akka but learning. So I came up with the following custom directive:
trait RequestRateLimiter[T] {
def check(ctx: RequestContext, realIp: Option[RemoteAddress], proxiedIp: Option[Remote...
Working on Z algorithm and post the link and code I am referring to, I tested the code works, but I think there are cases when Z algorithm is sub-optimal, for example, I think it is possible there is another l2, where value z[i-l2] is larger than z[i-l], which could even skip more elements to com...
@Phrancis It prints which index it is evaluating every 1000 indexes.
very useful at times actually.
Although his range is from 0 to 1000... hmm
Nothing personal, @Phrancis, but I have to downvote there. There are more important matters to consider in that code. I think that statement will not affect much but I did ask for clarification in a comment on your answer.
So I am having trouble implementing the method which adds to my linked list. Conceptually I am having a hard time figuring out how to add new nodes. So for this assignment, my professor wanted us to create a cursor as a nested class instead of just a field of the LinkedList itself. That being ...
Please note that I've migrated the "review" aspects of your question to Code Review. In order to solve the Python 2/3 rounding problem, please ask that as a separate question on Stack Overflow. — Matt ♦30 secs ago
public class Tictactoe {
public static boolean playerTurn=true;
Scanner sc = new Scanner(System.in);
public String[][] board;
public static boolean gameOver=false;
public static void main(String[] args) {
System.out.println("Welcome to tic tac toe!");
System.out.println("This computer w...
> First off is this spaghetti code? My teacher is saying that it is but he says everything is spaghetti code so I really cant tell anymore at this point.
Don't include the absolute path to symtarget.txt when calling os.Symlink; only use it when writing to the file:
package main
import (
"io/ioutil"
"os"
"path/filepath"
)
func main() {
path := "/tmp/rolfl/symexample"
target := "symtarget.txt"
os.MkdirAll(path, 0755)
...
I'm building a django application, and in this application, you will be able to upload a track, and optionally an image to go with it.
So my question is, is this a good way of handling the uploads? I have directories like so:
-users
-- foo
--- tracks
---- trackfoo.mp3
--- art
---- trackfoo.png
...
This is one of my first times writing Python. I'm most curious about style and whether while 1: x,y = socket.accept() is an acceptable way to wait for new connections.
#!/usr/bin/pythonw
import socket
import os
class Server:
def __init__(self, directory, host="", port=8123):
print("...
I'm voting to close this question as off-topic because it is a request for a code review. — Raedwald59 secs ago
I see at least 5 review points to consider. Suggest posting at codereview.stackexchange.com — chux23 secs ago
Now that you have it working. You should probably get the full code reviewed at codereview.stackexchange.com I am sure there are some more subtleties we can look into. — Loki Astari27 secs ago
Here is a simple Phase Locked Loop, which is a circuit used in radio communications for synchronisation between transmitter and receiver.
The loop works by calculating the (phase) difference between the input signal, and a reference oscillator, and then adjusting the reference until the phase d...
She asked me why use primary keys.... I was like....uhh I almost said, because it is a primary key. I think she meant like on a join or something. I answered all the other guys questions pretty well I think
I have a few custom components, some bigger ones and some smaller ones. I'd like to know if the structure is correct. As in: Is the code to do x in the right places.
For starters I'd just like to show a very small one, take your feedback and adjust my other components accordingly.
It can be fo...
You should join on whatever makes most sense, and joining on primary key isn't usually what makes most sense... Usually you join on a foreign key... But if it is a particularly common query, whatever the join is on should have an index (I think they're called indexes... Been a bit)
Some of it is a matter of semantics... But we don't have primary keys for join efficiency (those are foreign keys). We have primary keys for row uniqueness.
If you are asked an odd question during an interview, you should explain it is an odd question, explain why you feel that way, and tell them what you can about what they asked about.
Sometimes, intentionally odd questions are asked for the sake of determining something both about your technical ability and your personality (do you challenge things that don't seem right?)
(Which, in an interview, depends first on whether you identify something odd in the first place)
I can't say whether or not that was the case here, but something to keep in mind.
@Hosch250 It's impossible to know. It's doubtful that Malachi could produce an exact quote, and even if he could, it's coming from someone who isn't speaking their first language.
Without the opportunity to ask the interviewer about the intent (which can be clarified during the interview), it's impossible to know. But... anything other than that question probably doesn't make tons of sense.
Four-year colleges aren't doing the best of jobs preparing people for careers in the tech field... so for a question in a college class to be identical to one in an actual interview... call me jaded, but I'd call it mostly a coincidence.