« first day (1813 days earlier)      last day (2190 days later) » 

1:27 AM
monking
 
0
Q: Updating the icon of every JLabel in a JLabel ArrayList

heyI want to update every icon of a JLabel ArrayList, to its own individual icon based off of an outside ArrayList. The outside ArrayList is called _board_, and the JLabel ArrayList is called _tiles_. I want to update every icon to its corresponding item in _board_. How can I do that efficiently? I ...

-1
Q: TicTacToe Field: skip occupied squares

A.WennI've programmed a little python game (TicTacToe) using curses. (However, you don't need to know anything about curses to help) Instead of down-voting, please comment any suggestion on how to improve the question. The feature that already played positions are getting skipped when navigating thr...

 
@Malachi monking!
@CaptainObvious Of course it's slow, it's freaking Swing you silly coder
 
hey
I am trying to get Memer to work again...
 
Meme-wat?
 
a while back, Ismael, Quill and I worked on it so that it would hover over all the memes in chat
 
1:42 AM
Oh, I never tried that one
 
for some reason I can't get it to work
 
No errors or anything?
 
I fixed a couple....I am kind of distracted...lol
no errors from the script that I am running. there are a few from other places but they have to do with the Stack Scripts or something
 
2:20 AM
0
Q: Python example to save file with same name like `somefile(n).txt`

xtianMy little Python scriptie needs to save a file to the CWD, but sometimes the file already exists. I found this short and clever example to string concatenate a time signature to the name here on SE. But I wanted to make the file name look pretty, import os import fnmatch import re somefiles = ...

 
2:34 AM
something with the parseJSON
 
3:17 AM
now I only have one error in my console
> Uncaught ReferenceError: StackExchange is not defined
2
this isn't even our code....
> StackExchange.ready(function () {
 
3:33 AM
0
Q: Unity Tilemap RandomBrush with orientation and probabilities and fixes

Rakka Ragehttps://github.com/rakkarage/TestRandomBrush I added probabilities and random flip/rotate to the Unity Tilemap RandomBrush. O also fixed some problems like random tiles not being saved and rotate not working with flood fill. Thank you. using System; using System.Collections.Generic; using Syst...

 
The question belongs to codereview.stackexchange.combashrc 1 min ago
 
4:09 AM
0
Q: Turning a byte array into a C# object whose type is unknown at compile time

pushkinI'm trying to turn an array of bytes into a C# object. I only the know the type of the object at runtime. Right now, I'm using the JsonConvert.DeserializeObject<T> to do this, but the result is clunky, mostly because I don't know T at compile time. If I knew T at compile time, I could simply do...

 
Please post other question (" Is there any other recursive ways to implement this function?" ) in a separate post. It may be more appropriate here: codereview.stackexchange.comc0der 13 secs ago
 
4:25 AM
dude codereview is to show off your code, not to ask questions. I need this answered, don't be a jerk and vote to close it — Matt Bowlby 19 secs ago
 
 
2 hours later…
6:29 AM
Monking
 
6:54 AM
0
Q: header for command line python file

TensorFor command line only python script, Am debating with my colleague that putting into a python file, for command line python file, on top is bad practice or not if __name__ != '__main__': import sys sys.exit(0) Main advantage is we do not care to put all code into a function, and out na...

 
@NightOwl888 Please do not vote to close with a custom reason that it "would best be suited for Code Review". A site B's existence doesn't make a question off-topic on site A, see latex for example. If you don't think the question is on-topic on SO, use an appropriate close reason. For more information, see A guide to Code Review for Stack Overflow users. — Zeta 58 secs ago
@MattBowlby and yet you cross-posted this code to CR: codereview.stackexchange.com/questions/192602/…Zeta 25 secs ago
 
7:12 AM
-1
Q: Incompatible types: Event cannot be converted to java.util.ArrayList. Why is ArrayList and Event incompatible?

MVBTrying to create an event for a calendar using ArrayList. Each event will hold title start_time and end_time. Compile error: Incompatible types: Event cannot be converted to java.util.ArrayList. What is missing here? class Solution { public static void main(String[] args) { //eventlist to ho...

 
@CaptainObvious Good question, wrong StackExchange site.
 
7:52 AM
StackOverflow is for questions about fixing broken code. Code Review is for questions about improving working code. There is a clear distinction between the two and this question clearly fits into the latter. — NightOwl888 22 secs ago
 
8:36 AM
Monking
 
8:46 AM
-1
Q: XSS in file listing code

vakusI have user side code which lists all files which are submitted by the server from commander.php. Friend of mine found an XSS when using ' character on the website as a part of the filename. The code which lists the files and causes the XSS is: function listFiles(){ validatePath(); var r...

 
9:03 AM
-2
Q: YoutubeSnoop - Google api wrapper to fetch data from Youtube

markovcdhttps://github.com/markovcd/YoutubeSnoop The goal was to create easy to use Youtube Data API wrapper (https://developers.google.com/youtube/v3/). It uses only calls that don't require OAuth. It pulls info about vids, channels, playlists, comments etc. It has three "layers" of abstraction: 1. PO...

 
9:21 AM
@CaptainObvious code behind a link
 
0
Q: Sequence from A to B with a modifier

Johnny I'd like this code to be minimized/be made as compact as possible using any C++ techniques you know. Specifically, the repetition made for each switch statement, e.g.: for(double i=a; i<=b; i++) if(i==b) cout<<i OPERATOR numMod<<". "; else ...

 
9:58 AM
0
Q: Project Euler Problem 3 ( In Python)

Durian JaykinQuestion 3: Largest prime factor View Past Answers The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number 600851475143? Dear all, i am here to inquire about the math behind the code to solve this question. I have searched and high and low for the answer t...

 
10:15 AM
-3
Q: error no value given for one or more required parameters.' select from excelsheet

ahmed elbarbaryWhen i try to get data from excel sheet i get error no value given for one or more required parameters.' why this happen i work in visual studio 2010 with excel sheet 2013 my code in c# as following public DataTable ShowWrongExcelData() { string connectionString = string....

 
10:36 AM
This question sounds like a code review.. So the question should be on codereview.stackexchange.comRaymond Nijland 6 secs ago
 
10:58 AM
@CaptainObvious broken
 
11:20 AM
I would ask this on the code review site. — Boy With Silver Wings 30 secs ago
 
0
Q: FlightList application as part of a job interview

DvirskiI recently had an homework assignment as a part of a job interview, which I didn't pass. I wasn't sure I designed this tiny application correctly and I wanted to hear your opinions. I often find myself unsure of how to design React components (which should be smart, dumb, hold data, pass callback...

 
11:36 AM
Monking
 
I think at some point JavaScript development changed tremendously, and I somewhat missed that. Can anyone recommend a recent book on modern ES6/7/8 JavaScript?
 
0
Q: Take form data and fill that information to the relevant class.this code is working just fine

Nadeeshan Buddhika Jayakodi This is my supplier.php form include_once('../backend/Supplier.php'); include_once('../includes/sanitize.php'); $supplier = new Supplier(); $supplier->supplier_name = test_input($_POST['suppliername']); $supplier->supplier_email = test_input($_POST...

 
 
1 hour later…
12:45 PM
@Zeta I'm not sure there is one. On ES6, sure. But the rest is quite recent, possibly too recent to have a good book about it.
 
12:59 PM
0
Q: Logical error in simple find-primes code? (if there is any)

SabaHere is python code for printing prime numbers from one of my students. for sayi in range(2,1001): for i in range(2,sayi): if (sayi % i) == 0: break else: print(sayi) Code produces correct prime numbers. But I'm confused with the order of if-else structure ...

 
 
1 hour later…
2:22 PM
Why certain questions are posted in Twitter?
 
I suggest this question be closed because it is primarily opinion based codereview.stackexchange.com/questions/192541/…
 
0
Q: Generator coroutine class

Jive DadsonSubmitted for review ... A co-routine class called generator that co_yields values of a parameterized type. I am interested of course in whether it is bug-free. I would also like to know where noexcept would be proper and good. Finally, remarks about exception-handling would be welcome. At prese...

 
2:49 PM
So did my answer actually fix this? I am wondering if this is now ready to be a code review question if you have working code that needs improving (e.g. for speed).. — QHarr 38 secs ago
 
@Zeta I've gotten out of buying books. The information is always dated and there is a lot of information on the web.
 
0
Q: First HTML/CSS Project

Tyler MartinRecently I've started learning HTML and CSS. At least I've tried to! For my first project I wanted to do something easy, just to learn the ropes. It's a simple single page website with links. The purpose of it is to paste the address in my Instagram bio, so that I don't have to keep changing my b...

0
Q: Parsing oscilloscope binary data file with C++

LRDPRDXPreliminaries I have OWON oscilloscope that is able to record waveform in file in three formats: Text format .txt: the first lines are some general information such as peak-to-peak value, period, frequency etc. Remaining lines are waveform points that is space-separated values. Comma-separated...

 
@sineemore To make the question more public and seek more or better answers.
 
3:10 PM
@pacmaninbw Would've been a candidate for , though it's more of a 'should I follow the standard set by the company' question.
 
@Mast True. I don't think we should answer 'should I follow the standard set by the company' questions.
 
@pacmaninbw Agreed, that's a Workplace question. With a short answer.
Now I'm wondering what MISRA would say about the code provided, but I'm out of an automated checker.
 
@Mast What is MISRA?
 
MISRA C is a set of software development guidelines for the C programming language developed by MISRA (Motor Industry Software Reliability Association). Its aims are to facilitate code safety, security, portability and reliability in the context of embedded systems, specifically those systems programmed in ISO C / C90 / C99. There is also a set of guidelines for MISRA C++ not covered by this article. == History == Draft: 1997 First edition: 1998 (rules, required/advisory) Second edition: 2004 (rules, required/advisory) Third edition: 2012 (directives; rules, Decidable/Undecidable) MISRA compliance...
The way to do C in embedded country.
 
@Mast Thank you!
 
3:18 PM
If MISRA says no, don't do it. Regardless of what opinion you have about it, there have been way too many developers shooting at it so they probably have a good reason for doing it like this.
It's a safety-first thing.
Less stuff blowing up in your face.
Welcome to The 2nd Monitor @ning
 
@Mast Less stuff blowing up in your face is always a good thing, especially in automobiles!
 
@pacmaninbw And aeronautics, spacecraft, charging stations, power supplies, etc.
 
@Mast Thanks, I downloaded the document.
 
3:23 PM
@pacmaninbw You're welcome. That's just the overview of the 'why' with a general 'how' though. The rules themselves are elsewhere.
 
@Mast Do you have a link for the rules as well?
Or should I just go to wikipedia?
 
@pacmaninbw Available checkers are listed on the wiki, the rules themselves you'll have to buy or otherwise acquire. Official MISRA shop here.
Doesn't work for JavaScript I suppose.
 
@Mast I do my best to stay away from JavaScript, also HTML and CSS. I don't care how something looks, it needs to work correctly.
 
Yes, it did fixed it and it works, thank you very much. But to be honest, I would like to know why that Index doesn't work. I did another implementation before reading the info from the cells, doing cell transactions all the time and it was slow, so I posted my code on code review and I did what they told me, turn off events and automatic calcs, etc. Also they told me to load all the info to arrays because that way would be faster, and that's what I did, and with the fix you suggested it is as slow as my first implementation, so that bugs me a bit. — SebasXHP 51 secs ago
 
3:40 PM
-1
Q: Best way to Sort binary files-Rezume

Seliște ValeriaCan someone please help me do my homework? I need to choose the best sorting method for sequantial files, a sequential binary data file "on disk". Can you give me arguments? Why did you chose it in the first place? How can it be effective? Thank you verry much for your kindness.

 
4:37 PM
0
Q: Print the line function based on two Cartesian co-ordinates in standard form

AndyI had an interview a couple of days ago, and encounter the following problem. Although I did solve it, I want to know how can I improve my Python code to make it pythonic and enhance the readability or are there any edge cases I did not check. Any suggestions would be appreciated! Write a Pyt...

 
5:29 PM
-1
Q: Need to realise the Queue in C with dynamic structure

BillCipherOnDemandNeed To implement a dynamic structure containing information about Trust investors MMM Company: Each entry contains: surname of the depositor; the contract number; home address; amount of deposit; for what term a contract has been concluded. The program should provide: adding list items; D...

 
6:26 PM
-1
Q: Python-Class Instance & class variable

ManaFollowing code is not getting executed, giving the error: name 'Emp' is not defined. class Emp: raise_amt = 1.20 def __init__(self,name,age,pay): self.name = name self.age = age self.pay = pay self.email = name + '@hotmail.com' def apply_raise(self): self.pay = int(se...

0
Q: Simple note taking program in C

euthymiaI'm new to C, so looking for suggestions. This is similar to the program in the book Hacking: The Art of Exploitation. It is rewritten to fit my needs. There are two files, takenote and readnote. To write a note simply use takenote with your note as a command line argument: ./takenote "Buy eggs"...

 
7:20 PM
0
Q: Showing that an integer function's value and the EOF value are not the same

OmerI was doing Exercise 1.6 and 1.7 in 'The C Programming Language' by K&R. The questions state: "Verify that the experssion getchar() != EOF is 0 or 1" (Exercise 1.6) and "Write a program to print the value of EOF" (Exercise 1.7) Here is my attempt at trying to do both in one program: #include <...

 
 
1 hour later…
8:35 PM
0
Q: Python - BeautifulSoup to get the titles of videosthat appear in a youtube search

Lucasfrom bs4 import BeautifulSoup from urllib.request import urlopen as uReq def videoCrawler(): url = 'https://www.youtube.com/results?sp=QgIIAQ%253D%253D&search_query=Chit%C3%A3ozinho+e+Choror%C3%B3' codigoFonte = uReq(url) texto = codigoFonte.read() codigoFonte.close() soup = BeautifulSoup(tex...

 
9:08 PM
0
Q: Finding the majority element in a sequence of integers in O(n log n)

KaramanidI wrote this piece of code as solution to a problem set that required finding the majority element in a list using divide and conquer in O(n*logn). The majority element is defined as the element with number of repetitions more than half the length of the input list. The stated solution for that ...

 
9:26 PM
Generally, for working code ask your question on the Code Review Stack Exchange site. — dandan78 44 secs ago
 
9:36 PM
0
Q: Fisher’s Linear Discriminant implementation

Eslam AliI am learning python and machine learning so i implemented Fisherman algorithm for Linear Discriminant classification . I am looking for some general feedback on how I can improve the structure and efficiency of my code. and if there is better way to do this. Note : I knew there are build in...

 
9:49 PM
Isn't this question better for the codereview site? — progmatico 56 secs ago
 
10:32 PM
0
Q: Responsive CSS Grid Header - repetitive CSS

Zdeněkit is almost 10 years from my last HTML+CSS layout. A lot of has changed and I'm trying to grasp CSS grid. My page consists of header and body. Header itself is divided to: Logo | Title | Event Venue, content: Nav | Content | Side Bar. Unfortunately my Logo column and Nav column have different w...

 
11:12 PM
1
A: Writing my own DBMS: Storing databases

RidiculousRichardYour code appears technically functional, but doesn't actually appear be very useful in storing any data. It appears to have a suitable database file identification system It appears to have a serialisation layer It does not appear to have any kind of query layer stub It does not appear to have...

Is this an answer or not? I'm including towards no, but because of what rule?
 
No, because it doesn't review the code provided. It's just a list of features provided/missing and a (very large) section saying that the author wrote a proprietary version with a specific set of features.
Flagged as NAA.
 
In a way it does review the code, but it also doesn't
I was completely expecting an actual code review after the intro
 
Me too, but it doesn't.
It actually almost looks to me like the author is soliciting the Qer to contact them about their proprietary solution so they can sell it to them.
 
0
Q: ADO.NET Data Access Layer Design

gncI'm developing a NTier application base builder. First of all, I am generating a data access layer with ADO.NET. I don't like to use any ORM tools of because performance problems. I am using a custom (maybe) lightweight mapper. When repository initializing (look at CategoryRepository) I am gettin...

0
Q: Suppressing debug for JSON in FW/1

James A MohlerI am trying to suppress debug with doing a JSON request. Is this too early or too late in the request lifecycle? Is there a better variable to tap into? In application.cfc function before() { if (cgi.http_accept CONTAINS "application/json") { setting showdebugoutput="false"; ...

0
Q: AVLTree Insertion and Printing

73memedreamThe following code is an implementation of an AVLTree. I was assigned to implement the following functions. search(), insert(), showTreeBalance(), and Print() My problem right now does not concern showTreeBalance() or search() but instead, the other two functions. insert() and print() The pri...

 
11:28 PM
@Hosch250 Some kind of advertising indeed it seems like
 
11:45 PM
0
Q: Graph Implementation in Java using adjacency list

kal212I am building a Graph class to learn and eventually plan to add Dijkstra's algorithm to this implementation. What do you think of the overall approach? Any feedback on how to improve this? Vertex.java - contains all vertex information public class Vertex { int key; String name; pr...

 
@skiwi Do you have a Mac?
I'm trying to find an alternative font for my symbols on Mac, other than Segoe UI Symbol.
 

« first day (1813 days earlier)      last day (2190 days later) »