« first day (2022 days earlier)      last day (1999 days later) » 

12:00 AM
RELOAD! There are 5834 unanswered questions (89.6740% answered)
 
0
Q: Filter a table from a form

anatp_123Below I have a view and a controller. In my view I have a form, by default I'm showing the top 100 records in the table after I submit the form I'm searching the table for specific parameters. Is this the best way to filter the table? FYI: This is my first app in asp.net C#. View: <form id="...

0
Q: I want help to write python script for rearranging items in a list and split list to Source and target lists as shown in body

Arunkumar GI have made one sample list like result = [('A','B', 'IP1'), ('B', 'C', 'IP2'),('A', 'C', 'IP3'), ('B', 'A', 'IP4'), ('C','B','IP')], Now i want to split list as: Source_list = [('A','B', 'IP1'), ('B', 'C', 'IP2'),('A', 'C', 'IP3')] target_list = [('B', 'A', 'IP4'), ('C','B','IP')] Here wh...

 
1:06 AM
0
Q: Am I using an unnecessary amount of lines to fetch images from firebase?

Alexander The GreatI have the bellow code and I was curisue if I have unnesssasary code. It seems like a very long function just to fetch from firebase. Bellow is teh function: func fetchAllUserFristImage() { var databaseN = Database.database().reference() databaseN.child("Posts").observe(.childAdded,...

 
1:21 AM
0
Q: Fully Constrained Least Squares (FCLS) Linear Spectral Mixture Analysis Method optimization

qiangqiang sunI have written a code using Python for Fully Constrained Least Squares (FCLS) Linear Spectral Mixture Analysis, which could be applied for unmixing multispectral image successfully. However, the operation efficiency is very low, taking about 2 hours for each MODIS image (Rows:1620,Columns:3024,B...

 
1:36 AM
0
Q: Red-black tree in C

Niklas RosencrantzI would like to verify that the code fulfills the specification of a red-black tree or receive suggestions for improvements. I don't know how to test it in other ways than interactively, maybe I can write a test function which creates a large rb tree but how do I verify that it is good? #include <...

 
 
1 hour later…
2:51 AM
1
Q: Generic Unit of Work implementation

TagorI am implementing the unit of work pattern to be used in the logic layer of my application. The goal is to abstract away the tasks of managing transactions / connections. My implementation relies on generic repositories that exists during the life time of the unit of work class. UnitOfWork ...

 
3:07 AM
Measuring > guessing? Some optimizations (or obviously slow code) can be seen in code review, but adding timing code (even wrapping CLIs with date;<command>;date) is better. — benc 39 secs ago
 
 
2 hours later…
5:02 AM
Monking
 
5:14 AM
0
Q: Requesting tag [arcpy] be created?

PolyGeoThere are not a lot of questions involving the popular GIS/geospatial library ArcPy from Esri (just 14 at the moment) but could someone with the create tags privilege create one for it, please? If such questions are tagged arcpy then it may entice ArcPy specialists from the GIS Stack Exchange to...

 
5:37 AM
0
Q: Find CISC prerequisites

Tyler WeaverBelow I have some code written in prolog as a brief example. The goal of the program is to take a Computer and Information Science (CISC) course number and return any CISC prerequisites (prereqs). I would like to know if this code followed common practices in prolog. %CISC Courses cisc(100). c...

 
5:50 AM
The only way I know to achieve that is code reviews. — Elliott Frisch 51 secs ago
 
6:00 AM
@Feeds
5
Q: Can you set a new feeds user to take charge of more than one feed?

Grace NoteOn The Bridge, we have... a fair number of Feeds. Some of them serve similar purposes - we have a few devoted towards Gaming questions, some devoted towards general Stack Exchange material, and some devoted towards game questions on other SE sites. In something of a reorganization effort, our ne...

maybe you can get replaced by @CaptainObvious
 
@ElliottFrisch, is right. Code Review is the only way. — Kiran Malvi 8 secs ago
If its working code, consider codereview.stackexchange.comchux 34 secs ago
 
6:37 AM
0
Q: Is this a proper implementation of RNN in Pytorch?

Jibin Mathewclass RNN(nn.Module): def __init__(self, input_dim, embedding_dim, hidden_dim, output_dim): super().__init__() self.embedding = nn.Embedding.from_pretrained(weights) self.rnn = nn.RNN(embedding_dim, hidden_dim) self.fc = nn.Linear(hidden_dim, output_dim) ...

 
7:37 AM
0
Q: A Game Called Bocce Played on the Castesian System

ChubakBidpaaYou may know Bocce, so you should know that I've tweaked the rules a little. Three types of balls are thrown, a red type, a blue type, and single black ball called the jack. These are all on the Cartesian coordinate system. The coordinates of the jack are given, and also distances of an equal am...

 
7:52 AM
0
Q: Need to filter javascript Object

Gokul Saravananvar obj =[]; obj["emp-1"] = { "name": "gogul", "age" : 10 , "dept" : "development" }; obj["emp-2"] = { "name": "gopal", "age" : 15, "dept" : "testing" }; obj["emp-3"] = { "name": "gowtham", "age" : 20, "dept" : "development" }; obj["emp-4"] = { "name": "prakash", "age" : 25, "dept" : "designing" ...

0
Q: Checking if a sequence of integers are almost ascending order in Java

Poream3387The question below is from Code Fight, an algorithm practicing website. Given a sequence of integers as an array, we have to determine whether it is possible to obtain a strictly increasing sequence by removing no more than one element from the array. Example For sequence = [1, ...

 
@Feeds request for explaining the code.
 
 
1 hour later…
9:06 AM
0
Q: make a code for me pls

shasha thugsuse array and loops allow a user to enter any number of dubel values up to 20. the user should enter 99999 to quit entering numers.display an error message if the user quit without entering any numbers; otherwise,display each entered vale and its distance from the average. save the file as dist...

 
@Feeds nope
 
9:26 AM
The question might fit for codereview.stackexchange.combummi 1 min ago
 
9:42 AM
-1
A: Magic 8 ball code

Pifftingwagwan piffting, whats ur bbm pin? ;)

Free flags
 
0
Q: Scraping certain fields from a webpage using multiprocessing

robots.txtI've written a script in python using multiprocessing module to scrape certain fields from a webpage. As I'm very new to write any script using multiprocessing, I've barely any Idea as to whether I did everything in the right way. It works errorlessly though. Here goes the full script: import ...

 
10:30 AM
possible answer invalidation by Dirk Boer on question by Dirk Boer: codereview.stackexchange.com/posts/207708/revisions
 
11:00 AM
@Duga rolled back
 
jeez the comment threads there are sprawling
 
CodeReview is the site you want. — Script47 9 secs ago
 
11:51 AM
0
Q: Graph implementation in C++ using adjacency list

Mitko Donchevthere is my final code for implementing a Graph in C++ using adjacency list and Object-oriented. I got some help from StackOverflow and it was really helpful, but now I would ask about some advice for improving and a possible way of implementing two functions: isPath( v, w ) for finding if two no...

 
Followed through. Just a thought: maybe SO should introduce PRs and Code Reviews for answers (and questions!) — Peter B 39 secs ago
Might I suggest looking at codereview.stackexchange.com ? — Thijser 47 secs ago
If the code is working and you need a review of it (to make it simpler or for performance) then please post on codereview.stackexchange.com instead. Please read about valid questions there first though. — Some programmer dude 43 secs ago
 
12:21 PM
0
Q: OOP and connecting to multiple databases using PDO

Jordan TurnerI'm just starting to learn OOP and I've setup a class to handle the database connections and wanted to check if I'm going about this the right way. My website is already using PDO for prepared statements but it's procedural code otherwise. The site connects to multiple databases and one of the ...

0
Q: Simple array operation using a Queue

MichaelQuestion We are given an array (indexed from 1) of N elements on which we make M queries: add(Left, Right, X) - all the elements between the position Left and Right (1<=Left<=Right<=N) are raising their values with X. After all the operations are completed, print the array. example Array: 1 ...

 
12:36 PM
0
Q: Android - Accelerometer fall detection algorithm

Cam MoreiraI'm trying to build an app for fall detection using the accelerometer of a smartphone as a school project (so I still have a lot of things to improve). I was doing some research and I found this article with some calculations, so I'm trying to turn those into some code. I asked a friend for som...

 
1:06 PM
-1
Q: Java Program assignment

Do GCan anyone here help me with this assignment? i am completely new to Java Programming and programming in general. Using the Netbeans IDE, write a java based console application that determines the type of triangle based on the length of its sides. Thanks

 
1:17 PM
Use of magic numbers is an anti-pattern -- this code would not pass even a rudimentary code review. | Changing the second parameter of imread from the default cv2.IMREAD_COLOR to cv2.IMREAD_GRAYSCALE would have no effect on the returned data type. It's always a numpy array (except when loading fails, then it returns None). The only thing it would change is what (potential) conversions are done after the image has been loaded from file -- in this case it would always return a single channel image, as opposed to always returning a 3 channel image. — Dan Mašek 25 secs ago
 
1:50 PM
0
Q: A function that generates arrays of video thumbnails using canvas

Vera PerroneI have just finished my first version of a function that returns an array of video screenshots created with canvas. What I am looking for are ways to improve this speed by as much as possible. I want to almost be able to instantly display the results. Yes, this should be a backend thing, no I can...

 
2:35 PM
0
Q: Binary search tree in C++ and display, serach and delete functions

Mitko DonchevI feel ready to show you my work on creating BST in C++ using double linked list and 3 more functions for manipulating the tree. There is also one more function checking if the Tree is real or not. Declaring the Node: #include <iostream> #include <string> #include <vector> #include <fstream> ...

 
2:50 PM
0
Q: JIT-based programming language

Krzysztof SzewczykI'm working on JIT-based programming language using DynASM (before I was generating instructions directly). Review of the code would be really appreciated - It's my first time fiddling with DynASM. Code was written to be tight and readable. You can find github repository here. Code consists mostl...

 
3:00 PM
posted on November 16, 2018 by CommitStrip

2
 
0
Q: Comparing iterative deepening search algorithms in Java

coderoddeIntroduction I have these three iterative deepening search algorithms. The main "research" attempt was to find out a bidirectional version of iterative deepening search, and it turned out to be superior compared to three other algorithms. The code I would like to get reviewed is as follows: pac...

 
3:39 PM
@CommitStrip Don't think you can properly develop COBOL on a Mac though.
Truly terrible questions today.
 
3:58 PM
 
1
Q: A simple connect four game variant in C

gubenI'm a first year student and this is the first exercise that will count into my grade. I had to code a connect four variant, where instead of forming a line of 4 identical pawns, a player needs to build a palindrome (palindrom in Polish) of 5 pawns on a 8x8 board. You play by choosing a column...

 
4:20 PM
0
Q: Raising lots of exceptions: Bad style?

0112This is a simple implementation of a knapsack written in ruby. I've included all the relevant code here, but my question is concerning the contents setter .contents= ## item.rb class Item attr_accessor :weight def initialize(weight:, data: nil) @weight = weight @data = data end...

 
Greetings, Programs.
 
Greetings, User
 
4:37 PM
@Donald.McLean Programs reciprocate the greeting
 
@SᴀᴍOnᴇᴌᴀ Only if they're programmed to do so. Are you?
 
@Mast you mean, am I programmed to reciprocate a greeting?
if so, I guess I am
 
Monking
 
You're a guessing program now? Interesting.
 
I just want to find pizza
 
5:05 PM
0
Q: C# String Encoder

whiteshoozQuestion: Take an input string and output the "encoded" string by using the following rules: [1] vowels are replaced with number: a->1, e->2, etc [2] consonants are replaced with previous letter b->a, c->b, etc [3] y goes to space [4] space goes to y [5] numbers are reversed [6] oth...

0
Q: Generating randomisations for an experimental design Python

Becky WI am learning python for work and am trying to generate a matrix containing an experimental set up. The design requires a number of individuals (n) to see a number of options (k) in a random(ish) order. The number of times each option follows the others needs to be the same - so 1 will be seen af...

 
5:20 PM
0
Q: Speed up computation on lists of lists in R (scalability issues)

stats134711My goal is to take a source list of vectors and apply a mapping to each vector. The mapping creates a list of lists. When the vector size in each list element is large (~20000), and the number of elements in the source list is large (~5000), my program does not seem to be efficient. How can I opt...

 
@Feeds I found a Github URL link and brought it forth, bringing attention that the code needs to be embedded by commenting
 
5:39 PM
SO is a terrible unit test framework. If you want a code review, take it to the appropriate SE site. — jdv 52 secs ago
I suggest you take a look at codereview.stackexchange.com for reviews of working code. Make sure to check their help centre on how to format your question first. — Blorgbeard 39 secs ago
@GSerg - Yeah, that's one issue - the returned Material really isn't a constant - there's nothing to prevent the caller from grabbing a reference to it. Ideally I'd combine this with one of the solutions from this QA to make the return value immutable, but that's a bit above and beyond. — Comintern 21 secs ago
 
6:11 PM
> You can specify the commonly known execution environments, for example J2SE-1.5 (!), JavaSE-1.6, JavaSE-1.7, JavaSE-1.8, JavaSE-9, or OSGi/Minimum-1.2.
spot the error..
~heavy sigh
 
yes.
these morons broke the naming convention
well there is some point to doing it, namely that Java 9 has it's own module system
the problem is that it breaks tycho dealing with packages that I'm not even using
which is straight up bollocks
 
that, combined with this,
3 hours ago, by Mast
Truly terrible questions today.
means its a great day!
 
yeap. chocolate and tea, gaming later
 
6:32 PM
This is attracting enough interest that it would be nice to see the final product posted as a question on Code Review if you're up for it. — Comintern just now
 
6:43 PM
so it seems that bouncy-castle is using an ages-old version of the bnd tool to bundle their artifacts as OSGI bundles
which results in an incorrect specification of a deprecated header in an unused package that results in my build failing
T.T
 
0
Q: Bubble Sort Using Goto

TheMachoMuchachoI am aware of Dijkstra's paper on why goto is harmful; but I thought it would still be fun to make a bubble sort using goto. So I did. I thought I'd share the code here. Cheers! void bubbleSort(int arr[], int size){ int counter = 0; BottomUp: //This starts from the lowest array index and goe...

 
7:37 PM
@Feeds is that bidirectional?
 
8:00 PM
Hi! Since your code works and you're looking for a specific improvement, I'd consider posting this to Code Review, but take care to check their How to Ask as it differs from here. — msanford 30 secs ago
 
8:15 PM
I think this question is better suited for https://codereview.stackexchange.com/. You might want to copy-paste it to that stackexchange site then close it here. — Mathieu CAROFF 59 secs ago
 
0
Q: Creating and listing an array from separate functions

Mister TuskI was asked to define a function array_print() that takes in two arguments: int *ptr represents a pointer to an array of integers int array represents the size of the array and that lists the elements of an array without returning any values; A function array_create() that takes one argument:...

-1
Q: How to pass items from listbox1 in form1 to listbox2 in form2 in C#

ReemIn form1 I have more than one textbox and two buttons one that displays the entered inputs of textbox in listbox1 and one that moves to form2. In form2 I have one button and one listbox that is called listbox2. I want to know how to pass the items from listbox1 in form1 to listbox2 in form2 when...

 
Does the code work as it is? Can you show a working example? Are you asking how to change it up to make it "better". If so this question is off topic for Stack Overlow and is more appropriate for codereview.stackexchange.comTaplar 43 secs ago
@user7331530 You could after you post it to Code Review, yes. You'll get very detailed answers there, of a different, probably more useful format than here. — msanford 21 secs ago
@Taplar Yes, the code works, but it's part of Uploadcare. Sharing the whole code is a bit cumbersome. Yes, this is asking to improve this code. Thanks for the suggestion about Codereview. — bart 24 secs ago
 
@Duga what are they signing us up for??
 
8:34 PM
0
Q: How to turn nested jQuery Promises into flat code structure using .done() and .then()

bartBelow's code using jQuery promises in combination with callbacks does the following: Saves Group UUID to server using storeGroupOnServer() Creates a DOM element for the group using createGroupDomNode() Creates child elements for each image, using createNewChildDomNode() How can this be writte...

0
Q: Traffic Light Controller in VHDL on Bays3 Board

Beril BayramI am trying to implement a traffic light controller. There will be 3 roads and every road will have a traffic light controller. I am using the clock which is already in the basy3 board. It is 100MHz. I tried to wait 5 seconds on green and when it is turning to yellow, it will take 1 second so I c...

 
@Feeds borked
@Feeds sounds like a rewrite request...
 
8:49 PM
0
Q: Document distance in JavaScript

user7331530I am looking for the fastest way to find document distance. How can I improve this? Split each document into words. replaceAll() is faster than replace() String.prototype.replaceAll = function(search, replacement) { return this.replace(new RegExp(search, 'g'), replacement); }; Creating wo...

0
Q: Really easy synchronised access to an IEnumerable without boilerplate code

ygoeOften when reading data from a sequence (IEnumerable<T>) in multi-threaded code, a consistent snapshot needs to be taken inside a lock before using it in a longer operation. I'd like to simplify that by creating an API that does it within the enumerator implementation. So in the manner of LINQ e...

0
Q: Define a function that sets all pixels that lie in a given color range in the picture to a new color and returns the image

VictoriaThis is what I have so far but it's not perfect... Any input would be very helpful! def picture_reset_pixels(filename, from_color, to_color, target_color): img = Image.open(filename) pixels = list(img.getdata()) red_list=[] for i in pixels: R= i[0] G=i[1] ...

 
@SᴀᴍOnᴇᴌᴀ weapons-grade facepalm
Also, the code must be working to the best of your knowledge, but that doesn't sound like it is the case, given: "this code has a logic error I guess because when I connected basys3 to breadboard to see the output, in most state, always yellow led is lighted up with the green or red led but it supposes to be lighted up alone." — Sᴀᴍ Onᴇᴌᴀ 18 mins ago
I explained the logic error when I said yellow led is light up with green and red led. Yellow led should be the only led which needs to be light up while the lights are changing. — Beril Bayram 6 mins ago
 
9:12 PM
Just a quick code review: Rather than passing now() as a parameter, just have the database do it. Remove the addParam() and replace :actiondt with sysdate(). The primary difference will be that now() will return the time from the CF server and sysdate will be the time of the db server. If db time is ok, then using sysdate will use much less resources and won't have a potential for blocking. — Shawn 11 secs ago
 
9:41 PM
I'm voting to close this question as off-topic because it belongs on CodeReview.SE — Paul 23 secs ago
 
10:09 PM
@Paul Feel free to recommend the OP post on CR but in the future, please don't use Code Review as a reason to close a question. Evaluate the request and use a reason like too broad, primarily opinion-based, etc. Then you can mention to the OP that it can be posted on Code Review if it is on-topic. Please see the section What you should not do in this answer to A guide to Code Review for Stack Overflow usersSᴀᴍ Onᴇᴌᴀ 24 secs ago
 
@Duga flagged
 
0
Q: My first JS program - Tic Tac Toe game

John McI just completed some beginner web-dev courses (cs:50 and such) and wanted to try my skills. The CSS centering - ugh I just gave up on that, I wanted to make it responsive and the letters centered perfectly, but whatever... So overall, how is this coded? is there a better way to code this? ...

 
10:49 PM
0
Q: Prime number finder,finds 6 more primes than it should

Δημήτρης ΣπανάκηςI'm new to programming and i cant seem to find the mistake that makes my program find 6 more primes than it should.The correct answer for the given range is 904533. In addition,suggested run time is around 5 seconds while mine is around 8. Hope someone could help me, thank you in advance. #def...

0
Q: Registration form without database in c#

ReemI want to create a form for student registration but I don't have a database to store the data.Is there any way to store the information about each registered student so I can display them ?

 
Please check "Which site?" for general issues and "Code Review or not?"Prune 36 secs ago
@Prune My understanding was that questions about improving performance are a bit of a grey area as to whether they go in SO or Code Review. — mypetlion 29 secs ago
 
11:34 PM
0
Q: How to point on value from csv file and compare it to values from MySQL DB table?

Jihene SassiI have MySQL DB table my_dictionary, containing soundex_code,word, translation Also, I have a csv file containing sentences separated by ','. Each sentence contains a set of words separated by ' '. I would like to read each word from the csv file and compare it with values of the column soundex...

 
Did I miss the chat-fest?
darn west come timezone...
 

« first day (2022 days earlier)      last day (1999 days later) »