« first day (2796 days earlier)      last day (1519 days later) » 

00:00
RELOAD! There are 7236 unanswered questions (89.6460% answered)
00:12
1
Q: What prevents me from opening a text file in php using fopen()

HatI have written this chunk which always fails to open the file. I cannot figure out why <?php $file=‘/var/www/html/messages.txt’; $fp=fopen($file, ‘a+’) or die(“fopen failed); ?> The code always spits out “fopen failed” and I can’t figure out why. I’m hoping someone can help.

@CaptainObvious send the upvoter to my posts...
2
00:55
@altocumulus yes, I totally agree, as you can see in my question here. You can also see in that question's comments/answers that a lot of people don't mind precise definitions anymore. — Gerardo Furtado 57 secs ago
0
Q: Christmas tree made up only with HTML and CSS

Leo MessiI've created a Christmas tree using only HTML and CSS. It's pretty sure that the code can be written in a more efficient way. Also, the lights are turning on and off at the same time, is there a way to make them work independently? body { background-color: #9fd8ee; } .tree { display: fle...

01:41
You might want to consider asking on Code Review instead. — iota 39 secs ago
 
2 hours later…
03:38
Normally, working code is best reviewed on Code Review. You should not choose C and C++ and C# as languages. The code you show clearly isn't C — I think it is C#. Cross-tagging with C and C++ is bad enough; adding C# with either is worse. Strong recommendation: don't do it. Or explicitly ask for help with differences between two languages, noting that C and C++ are very different languages, albeit with a common ancestor. — Jonathan Leffler 58 secs ago
04:19
Did your code work in your test cases? Why do you suspect that find might not work? Stack Overflow is for specific questions, not open-ended code review. — JaMiT 1 min ago
04:55
Monking
06:23
Attention potential close-voters: questions about how to increase the performance of a specific piece of code, with clearly explained goals and constraints, are on-topic for Stack Overflow. While they might also be on-topic for Code Review, we do not migrate or close questions unless they are off-topic for the site where they are asked. — Cody Gray ♦ 18 secs ago
3
07:05
If you have working code and are looking for a review then your question may be appropriate for codereview.stackexchange.com. Be sure to read their requirements first for on-topic questions. "What can be improved" is generally too broad for a question here. — Retired Ninja 1 min ago
07:16
I’m voting to close this question because belongs to codereview.stackexchange.comAyxan Haqverdili 52 secs ago
07:50
Monking
0
Q: Creating a Table with Tkinter

Andrew StoneCurrently, I am using a code similar to the following example to create a table with tkinter using Python 3: Each cell is individually created as a ttk.Label and they're displayed using .grid(row, column) Some of my values get updated while the program is running with tk.StringVar().set() Each...

08:18
0
Q: Little chess game with python

JoeI am very sure my code does not follow PEP 8 nor uses any functions whatsoever. I'm here to learn how to improve it exactly by making each action a function. I am also open to other criticism or suggestions. import chess import chess.engine import time import stockfish engine = chess.engine.Sim...

08:44
0
Q: Let's win at Python Lucky Number

Grajdeanu AlexThe previous day, I helped someone build a really simple console "Lucky Number" game. It's really simple, the user has to choose a number, the program will also choose one, and if there's a match between the two, the user wins. To made the game a bit more visual, the numbers are initially blue an...

0
Q: Python code for simple Vending Machine simulation implementing OOP principles

jtsw1990I am recently learning OOP concepts and thought that implementing a simple workflow simulating a vending machine would help me put what I've learnt into practice. I am open to criticisms and feedback, and am mainly trying to get some comments regarding: Best practices for OOP File structure Data...

 
1 hour later…
10:10
@Jonathan Leffler Thanks for directing me to Code Review - I wasn't aware of that site. As for referencing three languages: I am well aware of the huge differences between them. I use all three of them regularly. I was suggesting that I accept answers written in any of these (note that I didn't reference Java, which is the most similar to C#). An apart from the function declaration, the code is literally portable to C and C++ apart from underscore separators - binary literals are supported with gcc. — MrUnbelievable92 23 secs ago
10:25
0
Q: Nested foreach loop returning modified list

Usman KhanIn this method, I was tasked to take in a list of TemplateMap and attach dynamic parameters and in a certain case, add further templates to the returned list. This functionality exists within a report rendering service and at this stage, I am constructing the templates to send into the rendering ...

10:35
possible answer invalidation by Kevin on question by Kevin: codereview.stackexchange.com/posts/253959/revisions
10:51
0
Q: Advent of code puzzle 10

SzuI'm solving puzzle 10 from advent of code. Code works and it solves given problem. I'm not a Python expert and I would be glad to see some suggestions how can I improve my code. Thanks in advance. from functools import reduce import math def makeFibo3(): fibo3 = [1, 1, 2] for fibIndex in...

0
Q: Different Serializers for Different Methods in Django REST Framework

creyDAs I am developing my first real API, I encountered that I wrote a lot of serialisers and I think there could be a possibility to merge them together. For example I have this 3 distinct serialisers for different methods: class PropertySerializer(serializers.ModelSerializer): class Meta: ...

11:17
0
Q: Basic Data class

Albin MSo, I have written this class. And it seems valid, https://onlinegdb.com/meN5a_I2I & https://onlinegdb.com/HybpyOO6P. But, it contains lots of faults apparently. #include <iostream> #include <cassert> using namespace std; class Data { private: char* local_data; int _size = 0; i...

11:43
0
Q: Vectorized numpy co-occurrence matrix generation

monQuestion Please advise how to vectorize the co occurrence matrix generation without using a loop. The current issue is also posted as numpy - how to combine multiple indices (replace multiple one-by-one matrix access with one access) and posting here as well to get and suggestions. Please also pr...

0
Q: Active Brownian Motion

CMTTI am attempting to write a Python code to simulate many particles in a confined box. These particles behave in such a way that they move in the box in straight lines with a slight angular noise (small changes in the direction of the particle path). They should interact by acknowledging the other ...

12:25
Monking
 
1 hour later…
13:26
0
Q: Python Redis client

MohitHi Great People of Dev Community, I am giving my first try to implement distributed cache client. Here i have created class for redis cache which is writing / reading json to/from cache. I am using it from 3 days it is working fine but i have fear i have add that kind of code to production what k...

This is an interesting problem. However, I think codereview.stackexchange.com would be better suited for this. — Lydia van Dyke 29 secs ago
possible answer invalidation by Usman Khan on question by Usman Khan: codereview.stackexchange.com/posts/254024/revisions
Was running some numbers this morning, if I sell my Accord (new car, that I barely drive now) I end up saving about $7,000 a year...that's a lot
@pacmaninbw You want to buy a 2018 Honda Accord with 15k miles? Lol
13:52
0
Q: Python beginner - Restaurant software project

Alejandro TrincheroThis is my project(beta) after studying for 3 weeks. It took me more or less 30 hours of writing and researching. I would appreciate a review based on my beginner level. I'm very proud of it, it was hard work for me. Learned... Files management, control if for while loops, integers and strings, l...

14:19
This is good material for codereview.stackexchange.comPitto 42 secs ago
@DerKommissar Ohio is a little far to buy a car since I live in Los Angeles.
I would immediately put 2000 miles on it to get it home.
14:49
@LydiavanDyke Yeah that is a good point, I have posted this problem there too but from past experience, they often prefer to see code that functions and needs optimising/improving/sped up rather than fixing problems that currently do not work. I am never sure whether to use the code review or Overflow so I have tried both. I appreciate your help though! — CMTT 49 secs ago
15:34
0
Q: Node.js html parser class

CrupengI have a simple class, called website which is able to get the html of a website (if the website html is not provided), the urls inside the website, the contents of the title, and description tag. As well as providing an array populated with the words, and objects representing the website image. ...

15:45
@pacmaninbw If there's only 15k on it, what's an extra 2k?
My car is nearing 200k.
Given, that's km, not miles, so divide by 1,6, but still.
125k miles
@Mast @DerKommissar And the car I have has 188K miles on it. Never driven on salted roads. It's fun to drive (Convertible). I would consider buying @DerKommissar's car if Covid-19 wasn't an issue (no good way to travel to Ohio right now).
A shipping company might ask half the value of the car to transport it, not sure what the rates are at your side of the pond.
Considering the market is a bit iffy, they might do it at cost to cut expenses.
16:19
Monking
Guys, from a development point of view do you prefer Fedora or Ubuntu and why?
I've been using CentOS, but it is heading towards EOL.
0
Q: implement generic load testing

Michael Hoffmanna part of my day job is load-testing of our infrastructure. i wanted a tool to quickly write a load scenario for some application ( db, http, .. ). I have tried to write something in haskell ( a fairly new language for me ). Would someone help me improve by reviewing the code? This is the main mo...

16:35
@pacmaninbw I tried setting up fedora once about 12 years ago but didn't really use it... I've been using ubuntu for the past few years at work for webservers - with nginx and apache- and also have installed ubuntu with the GUI on a desktop - had fun getting a USB wifi adapter working
I found a compaq/HP desktop circa 2012 on a dumpster and grabbed it with the intention of recycling it properly, then realized that with a HD it would be an acceptable machine if I ever needed to back up data so an IT guy at work gave me an excess 1 TB HD
for a time I tried using remote desktop from Ubuntu OS over VPN to my windows machine at work - it was okay though had some connection issues... then I brought my macbook home from the office
@pacmaninbw Wait what?
So my CR-V was FULL of computers (literally the back seat and trunk were stacked to the roof). Called this recycling company, "we'll pick whatever you have up for $25, no quantity limit." "Ok cool, when can you be here?" "11am tomorrow", dude was here at 11am today ON THE DOT. Took 400-500lbs of old computers and printers away, in 15 minutes. 10/10
Greetings, Programs.
I don't have that much dead stuff, but I'm not really a computer hobbyist, I mostly just use computers for stuff. I'm thinking about getting one of the new Mac Minis with Apple Silicon since my very old Mini that we had been using as a file server died.
This was stuff that had been collected at my dad's house for decades (some from him, my mom, me, my little brother who was about half of it). He'd been trying to get rid of it for years.
We actually have an electronics recycling service, though it is temporarily closed due to COVID.
16:51
@Lurch hmm... cross-post from ~4 hours might not be working....
But without something like that, and the fact that my wife is a rabid anti-hoarder, I can see how stuff would pile up for a modest sized family.
perhaps we could use a few more rabid anti-hoarders
though that would not be good for the companies that provide storage
@DerKommissar There are a couple of ways you could have made or saved money on that deal depending on the age of the computers. I know one guy here in Los Angeles that recycles his customers old computers, he donates them to schools (tax write off). Electronics recycle-rs will make more money so perhaps they should have taken it for free.
@DerKommissar CentOS 8 is scheduled for EOL December 2021, CentOS 7 is scheduled for EOL December 2024.
I was wrong about CentOS 7, it is June 2024
17:13
@LydiavanDyke Code Review is for working code only, when you supply a link to code review, please direct the user to How do I ask a good question?. — pacmaninbw 22 secs ago
My downloads have slowed to a crawl, I'm downloading ISO images for both Ubuntu and Fedora at the same time.
@SᴀᴍOnᴇᴌᴀ I wish I was less of a hoarder. My mother grew up during the great depression and never threw away anything. I picked up that habit.
@pacmaninbw I prefer Fedora and have used it for many years.
How is it for development?
@pacmaninbw I see that with my parents as well as my parents-in-law
to a certain extent...not so much with my father-in-law
Great! It's my main machine and 90% of what I do on it is C and C++ development.
17:17
;)
Do you ever use Eclipse CDT?
The Fedora distribution tends to have bleeding edge software, which is great for things like C++20
@pacmaninbw I have used Eclipse enough to know I loathe it.
@Edward any problems getting tool chain software?
What version of CMake is on Fedora now?
-1
Q: How do I avoid service calls based on a null check on field?

Govinda SakhareI have a bean that has around 10+ fields and it may grow till 30 odd fields. The bean is a contract between applications to share data over an HTTP call. Basically, a downstream application will set exactly one field and will make a rest call. class Person { private IdentificationData identif...

0
Q: Recieving an XSS Injection: <script>alert('xssvuln');</script>

CodeLoveGuyI would very much appreciate it if someone could review the php script below for any security risks. I have a live website using shared hosting. There's a page that accepts text submissions from users. The message is sent to a phpmyadmin database table; nothing is printed immediately to HTML. The...

@pacmaninbw Yes, sometimes, but that's where I use crosstool-ng.github.io
Checking CMake version... 3.18.4
I downloaded CentOS 7 last week, CMake is still at version 2.8.
17:23
@pacmaninbw CentOS is going EOL? What? I was just considering putting it on a new installation...
I have good experience with OpenSUSE.
I've never liked Ubuntu much. It's a whole lot of different things cobbled together but it never made much sense what direction it wanted to go. Perhaps that's better in recent versions though.
@Edward Thanks.
@Mast I posted the EOL schedule in the link. They are going to CentOS Stream, trying to move CentOS up stream rather than remaining at the tail end.
A friend of mine works for a company that relies on CentOS -- he is still trying to figure out what's netxt.
Burn it all and start over.
Apparently Fedora is customizable Red Hat, so it can't be that much different than CentOS, right?
17:27
Hopefully.
Actually, they're quite different in philosophy: CentOS was for stability; Fedora for bleeding edge
So they're trying to turn CentOS stream into a second Fedora?
Or at least put it more in the middle between bleeding and stable?
Frankly, it's not clear to me what RedHat is doing.
Red hat isn't exactly open source is it?
Fedora and CentOS are both open source.
> ... the point is that Fedora’s open source philosophy is among the strictest in the community and you might like that.
17:31
RHEL is, sorta. You can only see the code if you're a customer.
Under 9.
That's another good reason I use Fedora.
> 9. Emphasis on Open Source Software
So, I'd say it's pretty open.
Yea, I'm going to put Fedora on my list.
RHEL is different from Fedora
With this speed, I might have time for it somewhere next decade.
17:32
LOL
I'm really bad at completing hobby projects...
How is the kitchen going?
Finished-ish.
It's working at least.
Lockdowns make planning and executing the remaining points a bit harder.
Only some cosmetics remaining.
I have a project that's taking me forever, too. Engine rebuild.
Lockdown should make it easier to complete, but somehow I'm still busy with work.
0
Q: Regarding comon best practices in a text-based console game

Antoine SabourinI'm currently learning c# in hopes of making games on my own using Unity. I'm using the Udemy class by Denis Panjuta and followed 8 sections before making my first app by myself. The 8 sections include Datatypes and Variables, Functions and Methods, Making decisions, Loops, OOP, Arrays and List, ...

17:53
@Edward @Mast This is part of point 9 that I worry about, it isn't completely Linux > Even the Linux kernel features some closed binary bits so Fedora ships with the Linux-libre kernel as a kernel replacement.
A lot of people still go to work (including me) despite lockdown, but retail-wise most shops have closed their physical locations.
@pacmaninbw Would you notice the difference?
Probably not.
It's never been an issue for me.
You can still use all that if set-up manually, it just won't auto-install them for you.
But it does mean it could diverge.
17:55
From what?
From CentOS?
Possibly.
Linux.
Who's Linux?
Linux is a family.
The concern is that the Linux-libre kernel diverges from the main Linux kernel, if I understand you.
There's no one true Linux, one OS to rule them all.
Ok, the one ring has been destroyed, is it 3 rings, 7 rings or 9 rings?
18:00
A different kernel may have effect on your system calls, I'm not sure what the difference in that regard would be between the main kernel and the libre one.
I'd hope they keep that aligned a bit.
The difference are that proprietary, closed-source device drivers are excluded.
Which either need a manual download or free version, which may or may not work as good.
Or don't buy from companies that don't support Linux.
That's been my policy for over a decade.
@Edward What printers do you use?
HP LaserJet
18:02
If you have real tricky hardware it could mean there is no driver, but I heard Fedora is one of the most supported distributions in that regard thanks to the community. That's on that page I listed too.
@pacmaninbw There are more distributions than I would want to count.
@Mast That's true. I've made some minor contributions to Linux drivers over the years.
@Mast Tell that to the hobbits.
Where it gets tricky is on things like laptops that don't have good Linux support
The Dell I bought in September ships with either Windows 10 Pro or Ubuntu.
It is a workstation substitute laptop.
I don't really have had any proper issues with my laptops running linux yet
I initially ran Ubuntu, switched to Arch a few years back and am comfortably sitting there
I really prefer the continuous updating over "major release" things
a lot of the "geeks" at my Uni have started using NixOS now, not sure how big that's going to become
18:12
2 of my older laptops (1 still in use) are dual-boot Win/Ubuntu. Usually it just works, but drivers are always tricky, graphic cards a headache and don't even start about the file-locking problems dual-boots have...
I haven't used dual boot for more than 20 years. It's just not worth it and even harder with UEFI
If I ever finish rebuilding my home-office I'll have some room again for dedicated machines that run alternative OS'
I still have an ancient laptop that boots up into Windows 95. :)
And another one that boots into uC-OS
So far I'm not having a problem with running CentOS 7 in a VM. Going to experiment with Fedora and Ubuntu in other VMs.
Another thing you can try is a live version to see how it works on your actual hardware.
18:17
@Edward what do you use on Fedora to start up a VM, I have VMWare Workstation for Windows on my laptop?
I use GNOME Boxes. Nice and simple.
I keep a Win10 image there.
Although a lot of what I used to use a VM to do, I now run in podman or docker containers.
Like our new friend @Lurch
Did you ever chat with Dan Kegel, he is mentioned in the crosstool-NG?
What about an real time linux image?
I know Dan's name, but got involved with crosstool-NG after he was no longer maintaining it.
@Edward hehe I have a Compaq presario 1620 with win2k on it... it has a CD player that can function without the lid being open/machine booted :)
maybe I should put a different OS on it
I interviewed with him for a job in 2014.
18:26
@SᴀᴍOnᴇᴌᴀ You can do that, but be aware that most of the current Linux distros do not support the older machines. I have some 386 and 486 machines, for example that can't use current versions.
I have some 10 year old distros on CD I could use if I really wanted to
@pacmaninbw For real-time Linux these days, I use Zephyr but I don't yet have much experience with it.
I have to reboot, the Fedora ISO download locked up, probably when I started the Ubuntu download.
FYI, you may already know this, but a torrent download is often faster.
18:48
I have updated the code review, try and let me know. i am not able test with transforms because it requires visual studio. — turivishal 20 secs ago
@SᴀᴍOnᴇᴌᴀ CV retracted after OP response
19:02
0
Q: Create a simple hangman game using OOP and Javascript

user6248190I had a task to create a simple hangman game using oop with Javascript. It had to render the puzzle and remaining guesses to the DOM but didn't require any css. This is what I created. This is my index.html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport"...

0
Q: Find the largest element in a sorted array with in creasing consecutive differences, smaller than x, in O( log(logmax_value)

Maria PapadopoulouI want to find the largest element in a sorted array, where the differences between the consecutive elements of the array are increasing, that is smaller than x. For example: [1, 3, 10, 17, 50, 1000] is a valid input , because the consecutive differences (2,7,7,33,950) are in increasing order. [...

@Edward You run everything from the same device or is Lurch deployed on a different device than your 'everyday' machine?
At the momen, Lurch is running on the same main machine in container.
So you're running Fedora on the host, with a couple of containers, including the one running Lurch.
Correct. And also downloading a large file in the background, participating in this chat, writing some software, and listening to a streaming radio station.
Well, yes, but those are applications running on the host I'd assume? Not in containers?
19:10
Let me check...
Actually, I forgot that I had another container running, but it wasn't doing anything useful at the moment, so I shut it down.
So, yes, only Duga (Lurch) is currently running in a container on this machine.
Yea, I think I'm going to strip everything useful from my still-running laptop and turn that into a 100% Fedora box to experiment with.
If only the power usage of it would be a bit lower, I could use it as server...
Try out a live image first to make sure the hardware is compatible.
What are you currently running on the laptop -- Windows?
Win10, a 4th generation i7.
You can make it nice and easy then, by creating the media from there:
There's not much special hardware on it, it's already a dual-boot Ubuntu which works.
What does that do?
It's the Fedora Media Writer.
It will automagically download the latest Fedora and put it on a USB stick (or MicroSD card).
Ok, so, Rufus with less steps.
Yes. Then you can try it out without having to install it. Just boot the USB and make sure everything works.
If you like it, you can install from that image.
(And the internet)
So, Media Writer is the new name for Live-USB?
19:22
Not exactly, but the intent is somewhat similar.
Fair enough, I'll give that a shot tomorrow.
Windows VMs are getting cumbersome.
There's only 1 good reason I still use Windows and that's because some applications simply don't accept a different environment.
One of those applications I run in a VM because it hogs resources like no other if I put it on host, but all other VMs can move elsewhere.
The OP does not currently have a working solution so the OP should not yet consider posting a question on CodeReview -- it would be downvoted and closed. — mickmackusa 1 min ago
Anyway, I'm glad you got Lurch running :-)
If this code works, shouldn't it be in code review? — Chris H. 1 min ago
@Mast Yes, me too. I learned a good bit in the process.
19:52
@pacmaninbw Eventually 9 will drop, or 8 will be extended, right?
My understanding is that there will be no CentOS 9.
2
Q: A binary 3D model format for a game

LeocatI've recently started working on my own game engine and I have been thinking about creating my own model format. Since text usually takes a long time to load and process I decided to make a binary file. After a little work, I already had the basic concept: The concept The header: The header of t...

What the heck
Oh yeah I read about that
Stream is the "new thing"
But it's upstream from RHEL so I'm not certain I'm happy about that
iPhones and Windows skipped 9, why can't others?
Or Oracle Linux...
19:56
> "When they were naming vitamins they must have thought there were going to be way more vitamins than there ended up being. OK let's name these: Vitamin A, Vitamin B... Ok, man, slow down, we've got a lot to cover here. B2, B3, B4, B5, B6, B12. Then they got to E and they were like 'We're pretty much done. We've got all those damn B's. This is embarrassing. Let's just skip to K and get the hell out of here." - Demetri Martin
Yeah I'm kinda bummed about the CentOS stuff because I liked the RHEL platform, just didn't want the cost of RHEL itself.
Probably gonna go back to Debian for all my server stuff
Or Oracle Linux. I'm not a fan of Oracle, but it's probably the closest match to CentOS.
@SᴀᴍOnᴇᴌᴀ Or there's Vitamin X
20:13
You might get more of a response on cs.stackexchange.com or codereview.stackexchange.com, since this kind of question might be more appropriate for those sites. — Random Davis 35 secs ago
Apparently there are such things as Fedora Server, Ubuntu Server and ClearOS (I have my doubts about the last one) too.
The only differences between Fedora Workstation (which I am running) and Fedora Server are the default-installed packages.
0
Q: Simple file-renaming program in python

user8758206I’m learning python and have built a very simple program that just renames files. It makes all letters lowercase and replaces spaces and %20-instances with underscores and then copies them into a ‘Finished’ folder. I’m looking for better methods and approaches of writing and structuring my code. ...

20:41
@Edward @DerKommissar That is also my understanding.
0
Q: Generic QuickSort with Performance Optimised Swap for small types

Oliver SchönrockOverview A "from scratch" generic quicksort implemented in C, which allows predicate (returning bool, like C++ rather than int like C), and any type via void*. Using memcpy for the swap() implementation was the general solution. But this was about twice as slow as declared types for small types (...

21:17
0
Q: Any faster way to index through this list with outfor and while loops? (python)

Mclovin6000000I'm trying to find a way to get rid of this while loop because its costly in time. what I'm doing here is indexing the list (data) to then find the highest value in between [x:x+9] and then adding that to another array (result) and then adding 1 to x to index through the entire list. Is this a s...

21:30
possible answer invalidation by ChipsAhoy on question by ChipsAhoy: codereview.stackexchange.com/posts/253956/revisions
@Lurch This guy is not catching on.
21:43
-1
Q: whenever i try to get the scraped data into the database it raises the error 'mysql error already closed'

faith import pymysql class DatabaseManager(): """ This class manages access and CRUD operations to a MySQL database """ def __init__(self, host, port, name, user, password): """The constructor Args: host (str): server host of the database port (int): server port...

22:08
0
Q: Using autocorrelation to measure frequency

PoCiToI'm learning something about DSP. I wrote simple program in Java that reads WAV PCM file and I'm wondering how to use the output of autocorrelation to get signal frequency? Before autocorrelation I'm using zero crossing, so the aucorrelation is used on binary signal. As far as I know, the autocor...

0
Q: Avoid the object/array check and treat the return value the same way with JavaScript spread operator?

gremoI'm trying to implement a function (a template-helper function) which provides a simple merge-like functionality for both arrays and objects. The two functions are basically looks identical: const mergeArrays = (first, ...rest) => rest.reduce((acc, curr) => ([ ...acc, ...curr]), first); const ...

22:59
0
Q: Does this code adhere to Open-Closed Design Principle

theProgrammerI am developing a chess engine and I would love feedback on my design approach to this problem. My focus is following the SOLID Principle, most especially the open-closed principle I have a abstract class called Piece which is meant to be derived to create concrete pieces such as Pawn, Queen ecte...

23:50
0
Q: Transfer learning CNNs for image classification in TensorFlow

A TThis code works, and I'm pretty sure it's mathematically/algorithmically correct: model = tf.keras.applications.MobileNet(include_top=False,input_shape=INPUT_SHAPE) model.trainable = False model = tf.keras.Sequential([ model, tf.keras.layers.Flatten(), tf.keras.layers.Dense( 1, "


« first day (2796 days earlier)      last day (1519 days later) »