« first day (1563 days earlier)      last day (2749 days later) » 

00:00
RELOAD! There are 4253 unanswered questions (90.8508% answered)
00:19
I wonder if you should ask this on say Code Review SE? — MickyD just now
00:29
This should be posted on Code Review since it works and it is a request for ways to improve the code — saeleko 38 secs ago
0
Q: Largest divisible subset optimization

user3769323So this is my solution to the following leetcode problem: https://leetcode.com/problems/largest-divisible-subset/description/ What ways could I optimize this code? I think the run time is O(n^2), is that correct? def largest_divisible_subset(nums) return nums if nums.length < 2 nums.sort! max_re...

01:15
0
Q: Refactoring similar providers in a google guice module (JavaFX)

guicyThe code of my Guice Module looks like this: public class FXMLModule extends AbstractModule { private final Locale locale = Locale.getDefault(); private final ResourceBundle messages = ResourceBundle.getBundle("i18n.messages", locale); @Override protected void configure() { ...

Two things. 1. if the code works and you want to improve it, try here: codereview.stackexchange.com. Read through the Help Page's Asking section to make sure you meet their requirements before posting. 2. Asking about the prune function and not including the prune function in the question text is a very bad way to pose a question. All essential information must be in the question, not linked. Links rot and if the question depends on the links, it becomes useless once the links are gone. — user4581301 49 secs ago
Tested for imdb tag and copy() worked fine. It's some logic bug I think. For example if tag already exists in db then it wouldn't check for cover/poster file (that migh have been deleted). I also suggest posting this code in codereview, because there are lots of issues there bothon design and performance level. — shudder 26 secs ago
02:04
This is cool: youtu.be/L8cCvAITGWM
02:17
0
Q: Python: Parse through text and extract dates in uniform format

jss367I wrote a script to parse through text and extract all the dates. I would like it to be able to find as many different ways of writing text in dates as possible while containing as few false negatives as possible. I know this is something many people already do, so I may be re-inventing the wheel...

02:35
0
Q: Finding remainder of stepping by multiple beyond a limit

PhrogzSummary: Looking for more elegant version of Math.ceil(a/b)*b - a. I'm writing code (QML Canvas) that draws a timeline, with tick marks every n pixels. // Stepping across the width of the window, drawing tick marks for (var x=0; x<windowWidth; x+=n) drawTickAndLabelAt(x); The timeline can be...

03:18
0
Q: Improving Sudoku pruning

dattaI've got a, what I consider, partially working program to solve Sudoku puzzles through backtracking and pruning; however as more and more puzzles are given with prefilled values other than 0, the run time of the program has me wondering if the pruning implementation is not correct. Here is my fu...

 
2 hours later…
05:14
-1
Q: Interview project to redesign a website for a property

tyl-erI'm applying for a UI/UX position at a company that makes software for landlords, apartments, property managers, etc. After the interview the hiring manager gave me a project to work on. These are the instructions: As an exercise I would like for you to create an updated look and feel of this...

Monking
2
Q: Markov country name generator

DLoscI wrote a country name generator in Python 3.5. My goal was to get randomized names that would look as much like real-world names as possible. Each name needed to have a noun and an adjective form (e.g., Italy and Italian). I started with a list of real countries, regions, and cities, which I st...

So, all the type safety of sprintf combined with all the extensibility of sprintf? Anyway, Code Review may be a better fit — n.m. 1 min ago
06:00
0
Q: Apache POI and cyclomatic complexity of code

Akshay LokurI have an Excel file, which I am reading using Apache POI APIs; which gives me control over cells/columns in my Excel. I have around 17 columns in my Excel and these are with different datatypes. I want to populate a model object from these column values. So, I came up with something like below ...

06:17
-1
Q: Websites programming code's

MadhumithaDear sir, Kindly post the (travel agency) coding's for customers name only view in website page and we have to view the customers details in backyard when we entered our personal I'd. Very much eager to waiting for your ans! Thanking you

This looks more like a request for code review than an actual question - try codereview.stackexchange.comAndrew Williamson 33 secs ago
@CaptainObvious no code no glory
@CaptainObvious @Heslacher I'm this close to flagging it as abusive.
Monking all
07:20
0
Q: Opening file in Python

spicyramenTrying to improve my function, as will be used by most of my code. I'm handling most common exception (IOError) and handling when data has no values. READ_MODE = 'r' def _ReadCsv(filename): """Read CSV file from remote path. Args: filename(str): filename to read. Returns: The co...

Monking
07:48
Thanks for that, I am going to put it on codereview soon. I'm still new to oop — Benwhittaker25 38 secs ago
possible answer invalidation by nectar_moon on question by nectar_moon: codereview.stackexchange.com/posts/172880/revisions
@Duga rolled back
I'm voting to close this question as off-topic because belongs to codereview.stackexchange.comJean-François Fabre 34 secs ago
Take a look at CodeReview. This question would better fit there. — CodingNinja 28 secs ago
08:24
0
Q: How to avoid duplicate code due to the impossibility of using use multiple inheritance.

Hugo L.MI'm working on a Spring - Hibernate App, and I have a question about how to correctly avoid duplicate code and using Hibernate, due to the impossibility of using use multiple inheritance (I usually work with Python so this is not a "problem"). My UML: http://i.imgur.com/9GD1sjV.png My class, P...

08:36
@Duga RBA, possibly incoming.
Cross-posted hereVogel612 17 secs ago
0
Q: Recursively replace string placeholders with parameterized phrases

DIFI've written a python script to replace certain placeholders in a text with defined phrases. Some of the phrases might contain placeholders themselves, so the script needs to recursively replace them. Additionally the placeholders might allow parameters that need to be inserted at certain positio...

08:54
Monking
0
Q: Php bad glob pattern

utdevI am getting images using this glob pattern, but the code looks really bad. First I get all images which have the name screenshot + a number from 0-9 in an array, after that I get all screenshort + a number from 10-99 and so on. I want to improve this code. $dirScreenshotsOne[] = glob($v...

09:09
0
Q: Fetching data from a website using "POST" request

ToptoI've written some code in vba for the purpose of making twofold "POST" requests to get to the destination page and harvest name and address from there. There are two types of structures within which the desired results lie. One type of structure holds name and address in a single "th" storage an...

09:28
0
Q: I need a way to simplify my python code using programming techniques

Nisan AbeywickramaThis is a simple calculator I created using my Python basic knowledge. I would like to know any coding techniques to simplify and enhance the code to make it efficient. i also would like to know some advanced techniques. Also, please specify where I can reduce and avoid DRY. import math import c...

@CaptainObvious What a title
He means well though.
@CaptainObvious @Peilonrayz If you're looking for something easy to review, have at it.
0
Q: Do I need jquery in this Angular code?

BMillsI'm new to angular coming from a jquery background and I have a situation I've solved but only by including jquery into an angular function. Something Just doesn't feel right doing this and I was hoping someone could tell me if there's a better way. (This is all code I have inherited and have a...

0
Q: Shorten Pyhton code into more functions

BecomebastiHello i need to short this code but i dont know how to. can you help me out? def play(): quiz = difficulty_level(user_level) print quiz print "Du hast 5 Versuche für jede Spalte! Auf geht's!" answers_list = relate_answer(user_level) blanks_index = 0 answers_index = 0 number_of_guesses = 5 gue...

09:48
@Mast Yeah, I can't think of something that great. Maybe something like: {'bodmas': [('add', op.add, 2), ...]}, but IDK...
@Peilonrayz Keep it simple, he's probably a beginner.
@Mast Yeah, I'm not great with user input, so I'll leave this one, ): Or base it of one of Mathias' old answers, cause they're great
10:05
possible answer invalidation by Egek92 on question by Egek92: codereview.stackexchange.com/posts/172849/revisions
0
Q: Gentoo ebuild for CUPS to support Kyocera 1x2x MFP printers

firegurafikuLet me be the first one to post a Gentoo ebuild for review, as suggested by this meta post answer and comments. See also the corresponding issue on Gentoo Bugzilla. The ebuild installs proprietary PPDs and Cups filter for Kyocera 1x2x MPF printers, it works on my machine. (Unfortinately, I can o...

10:38
OP reposted this question on Code Review. Probably, we should close it here and redirect people there. — default locale 48 secs ago
0
Q: This Clears and the Desktop, and undoes the clear

Mick BurtonThis is a program that clears the desktop and also un does the clear. How does the code look? Could i Make it look better? import wx import os import shutil import time class Window(wx.Frame): def __init__(self, parent, id): self.Desktop = "C:/Users/Name/Desktop/" and "C:/Users/P...

11:01
@Hosch250 not a zombie.
1
A: Wordpress RSS Parser

TheQuickBrownFox The Rss helper functions are inside the parse function, even though they don't use any of the state inside that scope. Consider moving these up to the module level, even though they are not used anywhere else. By doing this the main function is shorter and easier to follow. You could also make t...

11:17
This might be more suited for Code ReviewFernAndr 22 secs ago
Monking
11:40
possible answer invalidation by David Michaeli on question by David Michaeli: codereview.stackexchange.com/posts/172310/revisions
11:59
@Peilonrayz Nothing wrong with providing a couple of links to exemplary, existing answers as support to a new answer.
Greetings, Programs.
Please read Minimal, Complete, and Verifiable example. This is not a code review board where you drop parts of your code so that other people figure the bugs that you do not even describe in your posting. — GhostCat 33 secs ago
0
Q: Incremental and scheduled backup using xcopy command in batch

HackooI created this batch script for incremental and scheduled backup using xcopy command in batch. The first execution of this script is to configure the paths of the source and the destination. And saves them in a .cfg file and then makes a full copy for the first time . It creates a scheduled tas...

Your question is off topic for SO. Try codereview.stackexchange.com and include your code within the question itself. — DarthJDG 54 secs ago
12:37
@GergelyTomcsányi BTW. If you want to have a thorough review of working code your question might be better placed at SE Code Review. — user0042 5 secs ago
1
Q: Formatted output of a structure

jdoeI've implemented a to_string function that takes a player_t instance and format it into a string. Code: #include <stdio.h> #include <string.h> typedef struct player { int id; float points; char display_name[256]; } player_t; #define MAX_OUTPUT_SIZE sizeof(int) + sizeof(float) + 256 voi...

12:57
0
Q: error display not showing php

yesganeshValidation error message not showing for php codes included inside the html. For instance, if a password is less than 6 chars. If I enter, for example: abc as password it should display error message but its not showing the error message. But I have included the php script in the html block. i...

@CaptainObvious bork
13:15
If you have code that works but you want advice on how to improve it or find a more efficient way, try codereview.stackexchange.combcsb1001 23 secs ago
1
Q: SQL Query generator, round 2

Jarko Dubbeldam This is the second round of reviews. The first round can be found in this question. This is a project I have been working on. This is one of my first experiences with Python and OOP as a whole. I have written a GUI that handles the inputs for these classes, but I will ask for a separate revi...

1
Q: Inheriting from std::auto_ptr to support deletion of allocated arrays in C++98/C++03

Gergely TomcsányiI know that std::auto_ptr is not a perfect class for automatic memory management because it doesn't support the deletion of arrays. However, I decided to create a better templated class (called owner_ptr) which supports this by inheriting from std::auto_ptr. It seems to be dangerous, but I think ...

13:29
Monking
possible answer invalidation by Icepickle on question by David Michaeli: codereview.stackexchange.com/posts/172310/revisions
Thanks. I was hoping for an "advanced" gitflow workflow which already includes feature pull request code reviews — Thypari 8 secs ago
13:45
0
Q: Better way of updating x rows based on y data

Code WarriorI am fully aware that this code is not the best way of doing things, but today has been one of those days where I would have put my left show on my right hand and my right glove on my ear. Looking at the execution plan, for what little data I am copying I am using 11% cost for each data item ...

0
Q: Page Object Model class structure in Selenium (2)

bediI am automating a webform, and this is what I've coded so far. So far this is my code, but I don't like this code much. This is because in each particular page I have to assign a Bot class. When I want to use a method from the Bot class I have to put 'bot.', to use a method from the instance. Wh...

13:59
0
Q: A minimal CLI password storage and retrieval manager

SimonIts primary function is to retrieve+copy a PW to your clipboard. It'll also add, update, delete key/value(accountName/password) pairs from a JSON formatted dictionary(separate .txt file). It's obviously insecure (passwords written in plain text). But I am less interested in security/hashing mecha...

1
Q: Representing a long if-else tree in a concise manner

Luigi CorteseI've asked this question in "softwareengineering", but someone told me this is probably the right place. Long story short, I've inherited a Java piece of code made of methods like this one: @Override public Action decide() { if (equalz(in.a, "LOC")) {//10 if(( //20 ...

14:30
-1
Q: Counting sort in C++

coderPlease review my code. Help me to use better code and functions. I am learning Standard Template Library and help me to use more of it. #include <bits/stdc++.h> void counting_sort(std::vector<int>& a,std::vector<int>& b,int k){ std::vector<int>c(k+1); for(int i=0;i<=k;i++) c[i]=0; int s = a.s...

Mixing the locks and atomic operations makes this harder to reason about. It looks correct at first glance, but it's tricky to get right, and easy to break in the future. Have you benchmarked this to verify that a simple mutex around a map isn't performant enough? You're definitely not going to get orders-of-magnitude better performance than with a simple mutex, so unless your program spends most of its time refcounting, you're unlikely to see a difference. Without a clear problem statement, I agree with above that this is better suited for CodeReview. — JimB 54 secs ago
15:00
-1
Q: Loading Images in Snake Game

CoderKliptoI am tinkering with other people's code to help myself learn more about Java and I am running into a problem. I TOOK this code from github and am trying to load the images into the game but they aren't being drawn. Here is the code to the Board class. package snake; import java.awt.Color; imp...

How can I improve my code? suggests that this question might be a better fit on Code ReviewJohn Coleman 43 secs ago
Monking!
15:38
Maybe this is better suited to codereview? — Daniel Shillcock 17 secs ago
15:50
possible answer invalidation by Vaishal Patel on question by Vaishal Patel: codereview.stackexchange.com/posts/171848/revisions
possible answer invalidation by Jake on question by Jake: codereview.stackexchange.com/posts/172507/revisions
16:00
@Duga rolled back
@Duga seems ok
16:16
Monking!
0
Q: Sorting an array of strings using pointers (followup)

AstroblemeThis is a follow-up to this post. Things I've changed: The number of strings is checked. I'm using pointers now. I'll use fgets in more mission critical situations. For a lab assignment, the scanf approach will suffice I hope. #include <stdio.h> #include <stdlib.h> #include <string.h> #defi...

possible answer invalidation by spicyramen on question by spicyramen: codereview.stackexchange.com/posts/172936/revisions
> every function has one and only one parameter, even those with multiple parameters
Wat
@Mast Yeah, in F# even a multi-parameter function only actually has one parameter, it actually composes several sub-functions.
For example, take let add a b = a + b, simple right? It has two parameters, correct?
@EBrown Is that comparable to just smashing everything into a list and consider that list one argument?
16:30
@Mast Not at all.
Ah, instead it will split the function.
@Mast Sorta, but even more than that.
@EBrown What does F# make of that then?
When you write let add a b = a + b, F# rewrites that into a sub-function with a pre-applied.
let add a b =
    let subadd = (+)a
    subAdd b
@CaptainObvious Second opinions on this closure?
0
Q: Representing a long if-else tree in a concise manner

Luigi CorteseI've asked this question in "softwareengineering", but someone told me this is probably the right place. Long story short, I've inherited a Java piece of code made of methods like this one: @Override public Action decide() { if (equalz(in.a, "LOC")) {//10 if(( //20 ...

16:37
@200_success I'm OK with it in either state, it's somewhat gray.
Did I miss a lot in the past year?
Was busy in passing high school and getting into Uni.
@EBrown So it strings a lot of functions right after each other.
That actually makes sense in FP.
a.add(b).multiply(c).minus(d)
@Mast Yes. My example is somewhat incorrect, because it will not let add have two parameters even, so it will "bake in" parameters until it's down to one.
One argument per function.
@Mast Yep. It's really good stuff. :)
16:51
So, the code above works, yes? It's just slow/could be improved? This may be better over at CodeReviewBruceWayne 13 secs ago
Technically this code is not under review yet, and this was just the easiest way to ask the question, "how do you access the derived class type from a base class shared function without explicitly providing it" with a realistic code sample. So I don't know if that makes a difference as to where this question belongs. The real answer is that I haven't used codereview.stackexchange.com before, and I suspect it has far fewer people looking at it than stackoverflow does. I'm surprised that code review even warranted its own site. — BlueMonkMN just now
17:07
1
Q: Speed up Excel Macro b/n copy and paste external files

Oliver BirdI posted on the Stack Overflow. They recommended me to post on here So the whole scope of this Excel file is to copy and paste from other 27 external files to the current Excel file one by one. to show what I mean, following are the code examples and a stimulated capture picture. Macros(line # ...

0
Q: Updating Excel sheet is taking long time

Ahmed AbdelhameedBasically, I'm trying to update an excel sheet using a DataTable (The columns structure between the two are not the same) with respect to the following rules: Whenever an item is matched (by the product code), update a few column values. Whenever an item is missing in the DataTable, mark it as ...

1
Q: Rails 5.1: trigger controller action with async AJAX

matissI have this working piece of JS, which basically listens to drop-down select change and then AJAX should trigger and call particular controller Index action via URL: $('#my_list').change(function() { var itemId; itemId = $("#my_list option:selected").val(); $.ajax({ url: '/asset/' + it...

Monking @all
@Mast What kind of physics?
17:22
@Astrobleme You missed a whole lot of code to be reviewed, for sure :)
2
> In my file, I have 27 subs like this. It's longer than this example. My real macro has 179 lines as the total. In this example, it only has 51 lines.
I'm not fluent enough with VBA to tell if the code is reviewable as-is, or if it's too example-ish. Any opinions?
0
Q: Project Euler 19 (count Sundays in the 20th Century) with a while loop

EJoshuaSI'm working on Project Euler problem 19, which reads as follows: You are given the following information, but you may prefer to do some research for yourself. 1 Jan 1900 was a Monday. Thirty days has September, April, June and November. All the rest have thirty-one, S...

1
Q: Directory JTree Performance

DanThe purpose of this short program is to: Detect all accessible local drives and USB drives List all the accessible directories for each drive which do not require administrator privileges or are hidden by the system Display all the data in a friendly UI that is simple to use and nice to look at...

0
Q: Finding Palindromes

MoonKnightI have the following interface public interface IPalindromeEngine { Palindrome GetLongestPalindrome(string sequence); Task<Palindrome> GetLongestPalindromeAsync(string sequence); List<Palindrome> GetLongestPalindromes(string sequence, int n, bool uniqueOnly); Task<List<Palindrome

0
Q: This is the code for a groupme bot I made, any advice?

DesultoryThis is my seconds serious project using php, I made a groupme bot before but the only php was to write the post data to a file and run a bash script that did all of the work. I want to know if I did anything in this that is considered bad practice (I most likely did) and if anything I did cause...

17:38
@CaptainObvious Demonstrably broken.
Anyone here who's personally worked on Assembly?
@Astrobleme Once...
@skiwi Do you know the path of least resistance for setting up a development environment for any flavour of assembly?
I'm basically curious.
22 hours ago, by Mast
I was calculating values for a heater and all of a sudden my Excel looked like this:
I'm building our own temperature chamber.
Well, it's prototype at least.
@Astrobleme Hmm actually, I didn't write Assembly, I wrote a compiler that wrote Assembly
17:45
Since I have no clue what I'm doing, it might take a while.
In the meantime, I get to burn stuff.
3
@Mast Cool.
@skiwi And how did you run that assembly code?
@Astrobleme Just install a Dosbox and use whatever comes with it.
Actually the whole project could of help, I don't have much knowledge ready right now though
Okay. Will check it out.
I think Dosbox came natively with NASM compiler and linker.
Been a while.
17:57
@Mast So heat transfer?
@syb0rg The set-up required for a multi-unit heating installation, given a maximum current per unit.
The units are basically large resistors capable of dissipating a lot of heat.
Sounds like a fairly advanced heat transfer problem
Nah, it's bloody simple.
Something doesn't have to be elaborate to get the job done.
Usually, climate chambers are bloody expensive. That's because they have to cover 4 quadrants: high temperature (think desert and higher), low temperature (freezing), low relative humidity and high relative humidity.
Ours doesn't have to do that. It only cares about getting a chamber at the specified, high temperature.
Say 40 to 90 degrees Celsius.
So it's a bloody resistor dissipating heat (think light-bulb, but even less light), a couple of fans and a bunch of heat sensors.
So you control the current via your program and this will affect the current to the actual heater?
@Mast Forced convection is the way to go, tho you have to be careful on how you set up your heat sensors
I'm curious to know how you test each component.
18:06
@syb0rg The end user will only have to set a target temperature. Degrees per minute is optional. The software will attempt to get as close as possible with the least overshoot.
So it's really more of a measurements/controls problem than a heat transfer problem
@syb0rg Just use enough sensors, they're relatively cheap.
@syb0rg Yup.
@Mast Newton's law of heat transfer.
Newton's law of cooling states that the rate of heat loss of a body is directly proportional to the difference in the temperatures between the body and its surroundings provided the temperature difference is small and the nature of radiating surface remains same. As such, it is equivalent to a statement that the heat transfer coefficient, which mediates between heat losses and temperature differences, is a constant. This condition is generally true in thermal conduction (where it is guaranteed by Fourier's law), but it is often only approximately true in conditions of convective heat transfer,...
@Astrobleme Peer verification.
@Mast lol
18:07
@Mast Right, but you have to worry about conduction in addition to the natural convection
If you don't insulate your sensors properly, they aren't going to read the right values
@Mast I'd recommend looking at PID controllers, if you haven't already: en.wikipedia.org/wiki/PID_controller
That's how most cheap controllers are made to achieve critical damping
Code review would be a better choice. — Carl Norum 58 secs ago
@syb0rg Stick em to a plate of metal so they aren't as prone to wind.
@syb0rg I'm aware of them, my solution is going to be even simpler. PID strives for an accuracy not required by this system
-1
Q: Hi, I'm doing a summer assessmentI was wondering how I could write the whole code to a text file so I can retrieve the results later

Toni HandleyI'm trying to write the whole thing to a text file, I think I have to be able to store the results to be able to open them later I've tried the code at the bottom in various different places in the code but it doesn't work. score = 0 name=input("What is your name? ") print("Welcome "+name +" to...

0
Q: Implementation of Counting Sort using C++

coderPlease review my code. If any improvement needed please point out. I have used std::map. Is there any better alternative? #include <bits/stdc++.h> class count_sort { std::map<int, int> m; std::map<int, int>::iterator it; public: void counting_sort(std::vector<int>& a){ for(int i=0; i<...

0
Q: Pausing and resuming a concurrent database update queue

kmecppI have a class DatabaseQueue which asynchronously runs SQLite updates that it takes from a LinkedBlockingQueue. I implemented a pausing mechanism for this class which should ideally stop the execution of the queue as soon as possible and then wait for it to be unpaused before executing more quer...

@Mast Don't you want them prone to wind? To measure the temp of the air from the heater?
Then a few sensors to measure ambient temp
@syb0rg One of them, yes. But the ambient ones are stuck to metal.
I can get 8 units on a controller, plenty.
18:13
@Mast Whichever those are will likely measure the temp of whatever the metal is on, most metals can be treated as isothermal in the heat transfer process
The metal will simply serve as a heat capacitor.
Am I really in the right room ? :) :P
@Marc-Andre Would you prefer us complaining about the verbosity of Java?
;-)
All that talk about temperature make me want to do some physics and that's not a good thing :P
Nothing wrong with the hunger for exothermic reactions.
18:16
@Mast Ahaha not at all :) ! It's just impressive how almost none of what you're talking make sens to me :P
But it's interesting :)
@Mast But metals typically don't have high heat capacitance
@syb0rg No, which is why they're ideal for sticking sensors to.
You want something that doesn't heat up instantaneously, but doesn't take multiple minutes to reach ambient temperature either.
@Mast Ideally I suppose you would have multiple layers. The sensor on top of the metal sheet on top of an insulation layer
But that setup is more critical for measuring temperature changes relative to radiation only
Which isn't the concern here I don't think
No, but you're absolutely right.
What kind of temperature sensors are you using? Type K thermocouples are what I've used in the past, accurate and very cheap: en.wikipedia.org/wiki/Thermocouple#Type_K
18:22
We got J-type and K-type, but I usually stick to K if possible.
Both can be handled by the software, not even sure if it supports others.
So, no, I don't have to translate the characteristic myself luckily :P
0
Q: Naive, bubble, insert and quick sort in C

ema-peI've created a program that shows the time needed to sort a random array of integers. An example is: user@computer:~/projects/sortc$ ./sortc 50000 Naive sort: 4.501963s Bubble sort: 5.769375s Insert sort: 1.969153s Quick sort: 2.161162s I implemented in C the common sort algo...

The current design is a TC-08 with 8 K-type thermocouples, 2.5 kWh worth of resistors a the bottom and 2 fans which don't have a definitive location yet. Resistors are currently simply turned on or turned off, but eventually an IGBT will PWM the supply towards the resistors.
All controlled in Python, of-course.
@Mast Nice, how much space are you willing to allocate for the heater?
If it doesn't take up too much space, you could add some fins to the resistors that the fans would blow over, drastically increasing your heat transfer coefficient
@syb0rg At the moment, quite a lot. Half a square meter or so.
Ideally your fans would blow across the resistors, I'm fairly certain that maximizes the heat transfer coefficient but I'll go and check if there's a better angle
18:33
@syb0rg They're coil wired resistors, so sticking electrically conductive fins to it will change their value.
@Mast You could make the fins out of diamond lol... conduct heat very well and resist current flow
lol
That would imply there's a budget for this project.
Not sure if talking real-life or Factorio...
Did I mention I'm basically building this thing with spare parts?
@skiwi Who needs Factorio if you can build this kind of stuff for real.
@syb0rg Nah, that's probably as ideal as it gets. You'll want at least one somewhere not even close to the resistors to keep your air from going stale though.
Circulation is kind-of important, so single-direction airflow is usually not optimal.
Otherwise all your heat will transfer very quickly, but to all the wrong places.
@Mast How powerful are these fans?
18:38
@syb0rg Slightly stronger than what the average tower desktop stocks I guess.
@Mast What do you mean by wrong places?
@syb0rg Hot pockets, leading to uneven distribution.
That would occur most where we have natural convection taking place, yes
They can be reduced by proper placement, but afar from simulating the whole thing (which I haven't done in years so it would take way too long) it's going to be a lot of trial and error.
Which, of-course, will get messed up anyway depending on the shape of the object you put in it.
So multiple fans on multiple speeds may be required.
A fan profile per shape, or something.
If you used the smaller fans to blow the heat from the resistors into the bulk air, and then had a ceiling fan or something that would likely work best
18:44
In general, yes.
The heat will want to rise anyway, the bottom fan will simply speed up the transfer and the top fan will crash the otherwise straight airflow to cause a more even dissipation.
It's like putting two fire hoses against each other.
But the moment you start putting objects in, which are usually placed in the middle, a single top fan may not cut it.
The power of the hose will no longer be in the centre, because the heat already moved around the object.
If there are any mechanical engineers reading this, I'm sorry for butchering it all up.
But the analogy is close enough.
I don't have a master in any of this, I just make my tests work.
It isn't rocket science after all.
You could direct the airflow from the heater down to the floor, which will force distribution of the heated air which will then rise due to natural convection... but you'll likely not have this in the center of a room limiting this approach's efficiency
@Mast I am a MechE lol
lol
@syb0rg You don't happen to know a couple of great resources about convection profiles for beginners, do you?
A single strategically placed fan can make all the difference.
In the end it doesn't matter that much as long as it gets the job done, but hey, we're all a bunch of perfectionists here, right?
@Mast This is the best resource I've learned from: youtube.com/…
I recommend watching on 2x speed, that's how I watched it when cramming for my classes quizzes
19:03
@syb0rg No slip boundary conditions? This is going to be fun.
19:26
User edited a post, making a future post duplicate of original. Currently, this is an exact duplicate of this
@Justin One of them is already closed, so in that regard there's no problem.
It's still an awful question though.
But isn't it better to improve the previous question rather than post a new one?
@Justin Yes, but since that's no longer an option, flinging the closed one into oblivion is easier.
New one might need to be closed as well though, it's awful.
@Mast Why is it awful?
@Mast You'll likely want to encourage turbulence, the heat transfer coefficient will be greater due to the increased amount of mixing that occurs
But this has a trade-off in that air stream velocity dissipates more quickly
You likely won't have much of a choice anyhoo, airflow is almost always laminar
19:39
If your code is working but you want some recommendations or suggestions then I'd suggest you to post this question on Code ReviewMibac 20 secs ago
*never... sorry head was half paying attention to other things
@syb0rg Yea, I'll have to find a set-up that has the both of best worlds in that regard.
@Mibac The key is if the code is working; it seems like this may not be quite at the stage of being able to post it on Code Review because there aren't any test cases that clearly show whether it's working as intended or not. I think that the first steps here are to clarify the requirements and come up with some test cases so that you know for sure whether it's broken code that needs fixing (Stack Overflow) or working code that needs improving (Code Review). — EJoshuaS 25 secs ago
> Please review my code. If any improvement needed please point out. I have used std::map. Is there any better alternative?
It's a bit minimal, don't you think?
20:05
@Mast Yeah, but I was under the impression that minimal questions are still valid. There's kind of a default implied question for questions on this site. I think it would be better with more text explaining the question, but it is still reviewable...
@Justin Barely. I haven't voted to close this one, but I can understand why others might.
He's re-inventing the wheel, but why? Sorts of all kinds have been done to death.
20:21
It seems as if codereview.stackexchange.com might be a better fit for this question? — larsks 13 secs ago
20:59
I'm voting to close this question as off-topic because you have a fully working code, and want help improving it. This is what Code Review is for. Be sure to read through their help centre though to phrase your post accordingly. — Adriaan 6 secs ago
0
Q: Checking for null in private function

Igor  KovalevToday I provided some code for review like this : public class SomeUtil{ public class PrepareDocument(Document document){ if(document!=null){ document = addSpecialField(document); } private Document addSpecialField(Document document){ // do something w...

21:20
0
Q: How to speed up while loop inside of parfor loop in Matlab?

user2806363I'm running an while loop inside of parfor loop in Matlab. I would like to speed up my while loop. I was wondering whether someone cab help me by that. Here is my while loop: beta= 0.5; %t=S{num_iter}; t=1; m =size(y,1); W_pre=Weights{num_iter}; Delta_x=Gradient{num_iter+1}; W= W_pre - t * Del...

21:39
0
Q: How should multiple parsers for keywords in strings be structured?

BlandCorporationI'm writing some code that parses strings, often using simple keywords. On parsing, the code performs various actions, such a printing a response, running functions etc. and it keeps track of whether it was able to respond. I am actually using multiple parsers and have illustrated this in the co...

22:10
possible answer invalidation by Igor Kovalev on question by Igor Kovalev: codereview.stackexchange.com/posts/173021/revisions
 
1 hour later…
23:20
0
Q: Weak pointers to vector elements idea

piotrekI want to store some objects in linear memory, but sometimes I want to use these objects in some place for some time, but in the meantime object can be deleted, so I want to use weak_ptr's. This is my idea how to handle this, what you think ? Class which have vector of my object. world3d.h clas...

0
Q: Multiplayer Peer-To-Peer position interpolation

user146638I have coded this movement interpolation for Unity3d using Photon. OnPhotonSerializeView gets called at the tickrate. Any kind of criticism/improvement suggestions are welcome. I tried to make the code as plain as possible because I don't see this as something that should be over-engineered be...

23:34
0
Q: Ruby Binary search tree inorder traversal for sorting transformed array

user3769323Solution to a leetcode problem: https://leetcode.com/problems/sort-transformed-array/description/ All unit tests are passing, I believe the time complexity of an inorder traversal is O(n), as you visit each node of the binary search tree once. I think the Space complexity is also O(n) to store t...

23:59
0
Q: Using mutable keyword to implement an owner-pointer class (C++03)

Gergely TomcsányiFor a couple of days, I have been trying to implement an own templated class called owner_ptr (for my little project) whose instances has ownership over a dynamically allocated object (or array). I want this template to support the deletion of dynamically allocated arrays too and also make it pos...


« first day (1563 days earlier)      last day (2749 days later) »