« first day (1606 days earlier)      last day (2709 days later) » 

00:00
RELOAD! There are 4414 unanswered questions (90.7306% answered)
00:19
0
Q: CF/SQL Query using window functions performance enhancement

David BriertonI am very new to MS SQL Server and am trying to learn how to combine window functions within my SQL query. I have two tables that I have to tie together using assoc_id and associate so that I can set the names in alphabetical order for my reports. Can someone tell me if this is the most efficient...

0
Q: Code to fill PE import address table

DouglasI wrote a program to test AV engines against encryption. When it runs, it will compute some key, decrypt an executable it has in its data section and copy it to the locations where the executable expects to be. The program has to fill the imports for the payload to run properly. At first I was f...

00:32
This isn't code that needs optimizing, but a choice between two strategies that the asker is trying to understand better. I don't see why this would be off-topic here or better suited on codereview. — m69 43 secs ago
01:15
Please show a Minimal, Complete, and Verifiable example of the actual code. And you can move your question to codereview.stackexchange.com once you have one — cricket_007 10 secs ago
01:40
0
Q: Printing complex function results output using text formatting builder

CaribouI'm working on a benchmarking library. The code below is a textual serializer of a comnplex benchmark results structure (there will be more fields). Main feature is building up the desired output format using library defined operands. From end user point of view, it will look like this: // ......

 
1 hour later…
03:02
Sure, it's not on topic for this site though. Maybe try codereview.stackexchange.comEvan Trimboli 10 secs ago
 
1 hour later…
04:09
@cricket_007 No! MCVEs do not make good Code Review questions. Code Review is not a place for discussing abstract best practices. Rather, Code Review requires code from a real project. See A guide to Code Review for Stack Overflow users. — 200_success 22 secs ago
04:31
This is better posted here: codereview.stackexchange.comHenry 53 secs ago
I'm voting to close this question as off-topic because it belongs on codereview.stackexchange.comAndreas 1 min ago
Monking
04:48
Your question is not very well defined (it's more of a code review). So I'm not sure what an answer would look like. I made this out of curiosity. Does this help you at all? — Paul Rooney 26 secs ago
05:14
0
Q: efficient django model for resume

milanI am trying to create a resume app from django. I have divided the entities for resume as Resume, Experience, Education, Qualification/Skills, Reference. I have modeled the following entities as below class Resume(models.Model): applicant = models.OneToOneField(User, on_delete=models.CASCAD...

You could also have a look at this it looks like you have landed in a similar situation — Prashanth Benny just now
06:19
Monking
possible answer invalidation by Shahin on question by Shahin: codereview.stackexchange.com/posts/176445/revisions
06:41
0
Q: R-sync with paramiko with single thread

Ravi KumarThis code is used for accessing the server and making the Linux command to run the python script. While I am trying to make it multithreaded, how could I make sure that the next thread starts when the previously running thread is completed. now it is working on a single thread. class ssh: ...

Apparently, you are passing by value a (large?) variant array of string, not a good choice IMHO speed wise. BTW questions about working code in need for optimization are best posted on Code Review. — Vincent G 19 secs ago
07:15
0
Q: Can this bash script be written in any other way? The if statement logic is rubbing me the wrong way

TheAuzzieJesusNew to bash, written the following .sh script. The script currently works, but I don't believe it is written in the best way possible. The script only assesses how to execute the aws ecr get-login command depending on the parameters and versions of the aws-cli and docker currently installed on ...

07:28
Thanks for the response, your example is exactly what I have right now! The issue that came about for writing this question with a simplified example is that one of that 10 message will be very long running (polling another service every minute), which ends up holding up the loop to get more messages to process. I did end up writing out a question on code review, which is off-topic but more insight can be gained from it: codereview.stackexchange.com/questions/176451/…Shawn Mclean 55 secs ago
08:20
If your code is basically doing what you want, then the question needs a specific problem description. Otherwise it is either off topic for being too broad or for belonging on a different site, i.e. codereview.stackexchange.comYunnosch 57 secs ago
08:43
Welcome to SO, this question is about performance and so would probably be better on codereview: codereview.stackexchange.comUser632716 31 secs ago
08:57
0
Q: how to implement multiple QueryStringBinder.scala class in my play project

cayajorayuThe case class in existing QueryStringBinder.scala already supports 22 parameters and I am unable to add new parameters required to be supported. As a workaround , I created another class NewQueryStringBinder.scala in order to support the additional parameters. So now both classes are using the b...

David Robinson on September 26, 2017

Software development is a global industry, and programmers everywhere rely on Stack Overflow to find solutions to their problems. But as we’ve analyzed before, different countries use different languages and technologies.

In this post we’ll take a look at German software developers, as seen by their Stack Overflow visits. We’ll see how the programming languages and technologies they use differ from the rest of the world, and how they differ within major cities in the country. All of these analyses are of 2017 year-to-date, from January to mid-September. …

Monking
09:13
0
Q: Simple static JSON - get only - API

meoThis API's aim is to return color-names for a bunch of hex colors. Its the first time I am writing an API. And while I write lots of frontend code I rarely touched node. I am interested in a general code review and also a API design review. I want to keep it as simple as possible: Someone with ...

> Germany is responsible for 4.53% of global Stack Overflow traffic, which makes it the 4th largest source of traffic around the world. It’s also responsible for asking 4.72% of questions and writing 6.23% of answers (which makes it also ranked 4th by those metrics).
If Germany answers significantly more than it asks, I wonder how many countries have it the other way.
09:27
0
Q: Best practice for showing large block of HTML in PHP if statement

DonRight now I'm echoing HTML code in both portions of an if/else statement. I'm wondering if this is the best practice. There is this topic at stackoverflow where a well-respected user describes something called "heredoc." However, I see some dispute in the comments with other respected authors. A...

09:42
@Mast it's also interesting that Germany has so much more active participation than traffic
@User632716 If performance-related posts are for codereview, why is there a tag performance on SO in the first place? — F. Privé 35 secs ago
You are totally right, nevertheless it gives a general way to increase speed without involving code review. It's indeed highly inelegant but — Damien Cormann 58 secs ago
10:47
0
Q: Multi-Rendering API Engine shader file management

LeonBI am developing a 3D engine that is designed to support the implementation of any given graphics API. I would like your feedback on how I'm planning to manage the shader files: I thought about creating a struct that contains 2 string variables, the directory and the file "name", something like t...

11:00
using python the problem resolved in the below link. codereview.stackexchange.com/questions/173268/…user8675398 46 secs ago
11:53
Greetings, Programs.
Kaz
Kaz
Monking
Monking.
Monking
@Mast *looks at question/answer ratio* Oh. I should write more questions.
0
Q: A recursive web-crawler created using vba

ShahinI had a desire to make a recursive web crawler in vba. As I don't have much knowledge on vba programming, so it took me a while to understand how the pattern might be. Finally, I've created one. The crawler I've created is doing just awesome. It starts from the first page of a torrent site then t...

12:21
@Vogel612 Yes, bonus points for Germany having a relatively low amount of leechers.
Although, to be fair, this is SO only. Might just be others are participating in other SE sites, like Code Review :-)
0
Q: Advises how to refactor website parser

user1376885I'm new in python but I have written the spider on Scrapy framework which parse some advertisement websites and proceed data further. The spider works as I expect but I would like to show you the piece of code of data proceeding that you can get me some tips, recommendations, critics where I can ...

12:37
Good morning. I have a question about the method I am doing a certain thing, but I dont think it fits code review or stackoverflow.

This is about VBA. To keep things simple. I have a sheet(1) with a list of fruits: APPLE, ORANGE, BANANA, GRAPES. On another sheet(2), I have a column with instructions that uses one of those fruits, like CUT THE BANANA INTO PIECES, PEEL THE APPLE, SLICE THE ORANGE. Keep in mind that each fruit could have more than one instruction. I need then to group them on yet another sheet(3). So, I get the fruit from sheet(1), copy it to sheet(3). Then I go to EVERY line
Is there any better way to do this?
0
Q: C# Tic-Tac-Toe Game

Wen QinBasically I am made a class that settles most of the back-end work of a tic-tac-toe game. I would like to have remarks about my general coding style and possible optimizations. using System; namespace TicTacToe_Game { public class Game { //The game's board itself. //If ...

@Lundin single line wanted in a code review. — talamaki 36 secs ago
@talamaki: Why not ask your code reviewer how they'd do it then? — John Zwinck 31 secs ago
@Moacir Eh, something with a merge and a pivot table comes to mind, but I have no clue how to pull that off.
Kaz
Kaz
@Moacir Did somebody say VBA ^^
4
@Mast What I mentioned is kinda oversimplifed, but I my two lists have around 20k lines
So it goes 20000 * 20000
Kaz
Kaz
12:52
@Moacir To check I understand you correctly, you have a list of things on sheet 1. You have a list of sentences on sheet2 which will contain one or more things. You want a list, on sheet 3, of instructions, grouped by the thing they refer to?
@Kaz exactly
they had me do ASP.NET, I had to add buttons to a page and create search functionality that would report back to the page.
Kaz
Kaz
@Moacir Give me 5 minutes and I'll write you some code.
My problem is the string is variable in such a way that I cant simply use mid to extract the value
So sometimes it will be at the start, sometimes at the middle
haven't done that in a while, it hurt a little bit. but it sounds like I got the second interview with more back end C# stuff and less front end stuff.
12:54
@Malachi Congrats!
@Kaz Thanks. I promise that even if your code works flawlessly, instead of just copy/pasting I will study and learn from it.
4
@Malachi Awesome! Good luck buddy!
Kaz
Kaz
@Moacir Can we assume that your things and instructions will be in a single column, starting in the top left of their respective worksheets?
@Kaz Yep
@Moacir ^^ That is the right attitude. :)
Kaz
Kaz
@Moacir With headers?
12:58
@Kaz There are some other conditions on the lines that I can use to validate if it will contain the string or not, so that is no needed
@Malachi Still hanging about? Have a C# question for you, because I want to make sure I don't skew this idea.
@Kaz For example, the line with a valid fruit on A will also have some kind of data on B, where on other rows b will be empty
The reason I want to change how I am doing this is because this 20kx20k example is taking around one hour to finish. It works, it returns what I want, but I am almost sure how I did can be done differently.
Fruit | Apple_Prop | Grape_Prop
------+------------+-------------
Apple | Color: Red |
Grape |            | Color: Green
@Moacir ^^^ Like that?
Its more like
Fruit                    |Color
RANDOMBABLING|
Apple                  | red
Grape                 | green
How did you format that all nicely?
Alright, just wanted to get a quick sample in here for us visual people. :)
@Moacir Draw it in notepad, then copy -> paste to this chatbox, then <kbd>CTRL</kbd> + <kbd>K</kbd>
Or click the "Fixed Font" button, but I see that you found that. :)
13:06
INSTRUCTION                  |Recipe
CUT THE APPLE                |Fruit salad
MIX THE GRAPES               |Fruit juice
REMEMBER TO WASH YOUR HANDS  |
Just like that. :)
This would be the sheet(2) data
So I can tell vba "You should look on this line, not on that other one"
And on sheet 3 it would be like
Origin  |Information
Sheet(1)|Apple
Sheet(2)|CUT THE APPLE
Sheet(1)|Grapes
Sheet(2)|MIX THE GRAPES
1
Q: Clean up string and move the noun before the comma

Isak La FleurI would like to know how I could improve the regex part of this script? I now chain 4 replace methods which is not optimal. Any ideas of other improvement I'm happy to receive. const strings = [ "ACTUATOR-BRK", "FLANG-SPLIT", "O-RING", "BOLT,M6X25MM HF", "BOLT,M6-1.0", "SCREW.CA...

What I do now is kinda of what I explained before. For each fruit, copy it to sheet 3, then check EVERY instruction and on match copy on sheet3.
You're doing this in VBA?
13:12
Yep
My data is on excel
(Dont know if this matters)
So you want to pull all Sheet1 things, then pull related rows from Sheet2, and move both to Sheet3?
Copy instead of move, but yes
(I'm only loosely following along, @Kaz is probably already done.)
2
I was thinking about some kind of error handling with collections, but I guess that would make less sense that it is now
One thing at a time.
13:14
Well I don't use VBA (I would write this in C#/F# using an outside library), but I wonder if you cannot filter out the second sheet first, then group it to the first sheet?
Its hard for me to filter because the string is variable. It has nothing that I can use as a mark to extract the value I want
Kaz
Kaz
@Moacir This is not click-and-go ready, but take a look, understand what's going on, adjust based on your workbook, and you should be good.
2
Public Sub GroupThethings()

    Dim thingPage As Worksheet
    Set thingPage = ThisWorkbook.Worksheets("Sheet name") '/ Or, look up how to use sheet codenames. They are highly recommended.

    Dim summaryPage As Worksheet
    Set summaryPage = ThisWorkbook.Worksheets("Sheet name")

    Dim thingList As Scripting.Dictionary '/ You may need to set a reference to "microsoft Scripting Runtime" in Tools -> References.
    Set thingList = New Dictionary

    Const TARGET_COLUMN As Long = 1 '/ be explicit about what we're assuming, that the data is in the first column, and it starts in row 1
@Moacir Right, I was misunderstanding the data, you have no relationship from B -> A, only A -> B.
Yes
@Kaz Thank you. I will study this code and report later. It may take a while.
@202_accepted Thanks for your help too
Thanks for everyone's help haha
@Moacir Don't thank me, I don't know anything about what's going on, just trying to offer some questions that might help clarify it. ;)
13:18
Everyone lost some time with this. I thank you for that :)
2
And, of-course, when you get it working and have it modified to your liking, you can always post it on Code Review to make it even shinier.
3
Kaz
Kaz
That code is also begging for some refactoring.
Speaking of shiny, this answer made me laugh: "I don't know F# at all, but I really like the code."
It's nice when you write code so good that people unfamiliar with the language say "damn that looks good."
3
(And both the answers are good answers, even though they're polar opposites.)
@202_accepted I gotta take off right now... sorry you have my email?
@Malachi Nah, but it wasn't important. I was going to see what C# you would write for this (small) problem, because I wrote a solution and I wanted to compare it. :)
13:29
I will catch you later, and check it out.
14:01
0
Q: Node.js pg-pool db connection acquisition, use and release

Marco GalassiI am trying to use pg-pool to connect to my DB and perform queries using a connection pool. Here is how I do it, but to be sure I'm not doing it wrong, or to see if there is a better way, please review and critique my code. var Pool = require('pg-pool'); var aggregation_pool = new Pool({ // ...

Kaz
Kaz
@Moacir And if you have any questions, feel free to ping me.
14:16
0
Q: Removing the word "NULL" from a single column in Excel using VBA

MikeI am using VBA in Excel to remove the word NULL from cells. I have the following code: Sub RemoveNull() Dim c, count, r Application.ScreenUpdating = False count = 0 r = ActiveCell.row c = ActiveCell.Column c = GetLetterFromNumber(c) For x = 1 To Range(c & Rows.count...

sc is your scanner input stream. you will create memory leaks by leaving this open. this seems to be more of a code review question — andrewdleach 6 secs ago
14:29
Code Review for making working code better — HyperNeutrino 6 secs ago
0
Q: Opening Multiple Excel Applications, removing 0's and saving them in a new directory

jDave1984I am coding a simple GUI to use with system-generated Excel files. The formatting for all of these files is all the same, however they all have multiple rows that have nothing but zeros in them, so this program is designed to open the Excel file, remove the zeros, reformat and then save them in a...

14:46
0
Q: refactor procedural java program into atomic methods

s.matthew.englishThis code reads in an input file that looks like this: 7f00000000000000000000000000000000000000000000000000000000000000027f00000000000000000000000000000000000000000000000000000000000000027f00000000000000000000000000000000000000000000000000000000000000020101 7f00000000000000000000000000000000000...

14:58
Re-Monking.
0
Q: Does resolving getters to a variable save memory space

SiddPWhat difference does the below bring in terms of memory in considering the below in large scale consider if I make multiple getters. // Scenario 1 : By not using temp var. if(student.getId() != null){ student1.setId(student.getId()) } //Scenario 2 : Using a temp var id String id = student.ge...

15:38
This probably belongs on the Code Review SEWilliam Perron 39 secs ago
I'm voting to close this question as off-topic because it belongs on Code Review. — Darren Bartrup-Cook 20 secs ago
15:51
1
Q: Validating credit card numbers - Haskell

DouglasI'm learning Haskell and doing the exercises from http://www.seas.upenn.edu/~cis194/spring13/lectures.html. This is my code to validate credit cards as described on http://www.seas.upenn.edu/~cis194/spring13/hw/01-intro.pdf. I know very little about it and welcome any advice on how to improve. ...

I got this from a SO mod:
In the future, please ask questions centered around reviewing and improving your already working code on Code Review. — Shepmaster 52 secs ago
> It would be fine for Code Review, but it does not appear to be off-topic here, and that's the only reason why we would migrate a question someplace else.
@Shepmaster Odd, if it's on-topic here, it's usually off-topic for SO.
Afar from that, he's right.
Don't migrate if it isn't off-topic.
When would something be off-topic for SO, but on-topic here?
15:58
@Shepmaster Just about never, but do you have a link?
3
Q: Rust book: Implementing Cacher

itmuckelI am reading the rust book (second edition) and currently I'm reading through the section on closures. At the end of this section there is an exercise to extend the Cacher implementation given before. I gave it a try: use std::cmp::Eq; use std::hash::Hash; use std::clone::Clone; struct Cacher<...

You can see the bot pasted my comment a few lines up too ;-)
@Shepmaster Ah, that's a specific question.
Specific questions are perfectly valid for SO.
Well, it's like this. If he wants that specific part improved, he should be on SO. If he wants improvements in general, go to CR.
@Mast I guess I disagree; OP asks for feedback on 1. "calls to clone() 2. "a way to have it conciser" 3. "idiomatic Rust"
Usually, when they ask questions like that, they provide a MCVE. MCVE is for SO, never for CR.
@Shepmaster Yes, but for a specific part: What really bugs me is that cacher.value(...) has 5(!) calls to clone() in it.
He has already identified the issue. He's already in the process of reviewing it himself.
@Mast so you think if I edited out the other parts, the SO question would still be valid?
i.e. made it very clearly specific
16:03
@Shepmaster Well, if you edited out that line it would no longer be valid for SO. I can't comment on the reverse.
I mean, If I changed it to "how do I remove clone calls from ..."
then it wouldn't be on-topic for CR (because it's too specific), but still cool for SO
@Shepmaster Likely.
@Mast Done. Thank you for being a wonderful sounding board.
Momomonking
@Shepmaster Quack.
16:08
I also have a bit of a reusable decision tree to help clean up those types of questions in the future.
I disagree; rubberducking would have required me to have provided all the answers to my own questions — clearly not the case here ^_^
138
A: A guide to Code Review for Stack Overflow users

durron597What distinguishes Code Review from Stack Overflow? Different communities have different rules to address different needs. A quick summary: $$ \begin{array}{l|l} \textrm{Code Review} & \textrm{Stack Overflow} \\ \hline \text{Open-ended questions} & \text{Questions with a specific goal} \\ \tex...

36
A: How to get the best value out of Code Review - Asking Questions

rolflBefore you ask your question... Understand the community Code Review is a collection of users with different experience levels in different technologies. These users each have different time commitments and availability. Understand that you are requesting a review, and you cannot demand one. C...

I'm familiar with the first one; guess I should have re-read through it
@Shepmaster TBH, that looks like a fine CR question. I have also seen questions with the butchered 'specific question' on here too, as we assume they want it all reviewed.
@Peilonrayz Yea, we have a nag for accepting those on the border as long as OP doesn't complain we also give him advice he never asked about.
@Mast Yeah, we seem to be handling them well so far, :)
16:32
0
Q: Priority queue in Erlang

Ufuk HacıoğullarıI'm new to Erlang and I'm trying to port my Project Euler solutions in C# to Erlang. I have a priority queue implementation with unit tests. I'm wondering if I'm missing something(I probably do) if I was writing serious Erlang code. priority_queue.hrl -record(heap_node, { item :: any(), child...

Zombie down. Although I'm not sure whether that question was really on-topic.
Questions about optimizing working code should be asked at Code ReviewFilburt 30 secs ago
16:51
This seems like it belongs on Code Review rather than here. — John Coleman 37 secs ago
@Zeta Your latest Haskell one? Wouldn't know why not.
@JohnColeman I think it's on-topic on both sites. It's a specific question ("how can I speed up this code? it takes over a day") as well as a request for a code review. — Zeta 42 secs ago
@Mast It's missing the definition of Parser (probably from Parsec), as well as LispVal, so the code is not complete. Still enough to write a review, since everything required is available, but it is not compilable.
@Zeta Whether or not it's still on-topic has been a long debate with no clear answer. Even the moderators don't always agree on that point with each other IIRC.
16:58
Large projects for example can't include everything, so they often post only key elements with a link to the rest. The question itself is not compilable in those cases. Those are usually allowed. Those without links to the rest shouldn't be IMO, but as said, long debate without clear answer.
@Vogel612 Did you know there's a spelling mistake in your profile? "The nth Monitor" is with a capital N ;-)
No I wasn't aware...
@Kaz You said if I had questions I could ping you. I have lots of them.
Kaz
Kaz
@Moacir Awesome.
Do you think it would be better to create a new chatroom for this?
possible answer invalidation by Tom on question by Tom: codereview.stackexchange.com/posts/176333/revisions
I can remove this post and move it over to Code Review, if necessary. — Josh 6 secs ago
17:11
@Moacir worst case there's The Nth Monitor
brb editing my profile...
If you're going to do a tutorial or have an extended discussion on a post, please start a new room.
Kaz
Kaz
@200_success Will do :(
This question is a bit open-ended in that there are many different approaches that you could use and no one is clearly the best. If you make an attempt to write this code, we can then help you out if you have any bugs. You can also ask for a design review at codereview.stackexchange.com. — templatetypedef 19 secs ago
0
Q: Optimizing a critical path where array operations are done in Python instead of Numpy

tsornI have a program, where the get_free function below has the most major computational cost by far, and I was wondering if there was a faster way to do it. Any feedback, regarding code quality in general or for optimizing performance is greatly appreciated. Thanks import numpy as np import timeit...

17:36
0
Q: Speed up Simulation Study in R

JoshThe generic version of what I am trying to do is to conduct a simulation study where I manipulate a few variables to see how that impacts a result. I'm having some speed issues with R. The latest simulation worked with a few iterations (10 per experiment). However, when I moved to a large-scale v...

17:48
2
Q: .net to the core

Mat's MugAn entity-framework-core tag was recently created. Tag asp.net-core was created some 8 months ago. I can see a pattern here: do we really want a -core version of every single .net-related technology tag? Any ideas? Reasons to keep them around?

18:06
this might be better suited to the code review stack exchange: codereview.stackexchange.comYoungJohn 5 secs ago
18:31
if your code is actually working, then this question would be better suited for codereview.stackexchange.comJeff Puckett 26 secs ago
18:45
@YoungJohn is there a way to move it, I did not know codereview existed. — user1302439 35 secs ago
This is an interesting question, but as written it's a bit too open-ended for Stack Overflow. We typically look for questions with specific, factual answers. If you've made an effort to code something up and run into problems, please feel free to post questions here about your code. Alternatively, if you have something that works, visit codereview.stackexchange.com and ask someone to look over it! — templatetypedef 41 secs ago
This would probably be better for codereview.stackexchange.com. — user2357112 29 secs ago
Questions about improving working code belong on Code Review, not StackOverflow. — Charles Duffy 48 secs ago
19:04
@Feeds @202_accepted I suspect you have a valuable opinion on the matter, care to write an answer? I have next to no experience with the tech involved or I would've written one myself.
@Mast I like the answer Mat posted.
Oh, ok.
@202_accepted Fair enough :-)
Actually, it might be appropriate to keep them as specific tags.
@202_accepted So, you'll be writing an answer after all?
@Mast Yeah, already part of the way through it lol
19:11
:-)
0
Q: Basic Java Calculator

Impulse.javaI was wondering, how could I get my output to say "Your sum is __"? I'm new to Java and I wrote this for the class, but I want to clean it up a little bit. import java.util.*; import java.util.Scanner; public class Jcalc { public static void main(String[] args) { System.out.printl...

0
Q: Getting data from a server and saving data to a server

chinoSo Im making a raffle game so when you press b you get a random name with all the information of the winner, I get the data from a SQL local server and I want to make a list of the winners so save the string data. Here is my php to get data: <?php $servidor = 'localhost'; $user = 'root';...

19:28
1
A: .net to the core

202_acceptedI'm going to defend these tags, because after thinking about it, I think they do provide value. First and foremost: .net-core is not universal. Just because something works in .net does not mean it works in .net-core, and vice-versa. These tags are two completely separate frameworks, so I agree ...

I did not know this, did anyone else know this? html5rocks.com/en/tutorials/webcomponents/customelements
19:44
@SimonForsberg That's pretty cool
@202_accepted I just looked at the HTML structure of lichess.org/TZM8y5ur1Zky and it uses <piece> and <square> tags for the game board which I did not know was possible. But that article claims that custom elements must have a hyphen, which these obviously do not. So not sure how this works...
14 mins ago, by Simon Forsberg
I did not know this, did anyone else know this? https://www.html5rocks.com/en/tutorials/webcomponents/customelements/
Posted it in 2nd Monitor as well
@SimonForsberg This is The 2nd...lol
@202_accepted So that's why it didn't say the chat room...
in Cardshifter and other projects, 15 mins ago, by Simon Forsberg
I did not know this, did anyone else know this? https://www.html5rocks.com/en/tutorials/webcomponents/customelements/
One mystery solved at least, but still don't understand these <piece> and <square> tags...
Speaking of mysteries...
at work today I tried connecting to one of our many subsystems, but I just couldn't. It worked for everyone else but not for me. I thought I was IP-blocked. It turns out that I had ip-blocked them with iptables.
I had configured iptables a while ago to block the traffic to simulate a firewall problem, when I restored it I added an ACCEPT rule instead of removing the DENY rule, and the DENY rule took priority.
I'm voting to close this question as off-topic because this belongs on the code review site. — TnTinMn 36 secs ago
@SimonForsberg Should depend on the order.
I.e. first rule matched = result.
(Which is why the deny-all rule is usually the last.)
19:54
@202_accepted DENY was first and ACCEPT second apparently.
0
Q: 'Snakes and Ladders' game

AJ123I made this game of snakes and ladders for school, and it has to have: Multiple players Player Names Random Dice roll Snakes and ladders (obviously!) Subroutines It is currently 124 lines, and is very repetitive. I need it to be at most 75 lines. '''Take it in turns to roll the di...

1
Q: Python PEMDAS calculator

VikatonThe goal of this calculator is to evaluate an expression with PEMDAS in mind (no parenthesis yet, adding soon). Although the program works, I want to make it as efficient as possible with the approach I used to attack the mathematical expression. So the way I decided to approach the problem is t...

@SimonForsberg Yeah, I can see that having the undesired effect.
Now if I just understood how they did that <piece> and <square> in HTML...
20:08
0
Q: Mediator pattern with objects that self-manage

void.pointerI have an object called UpdateManager that is used to collectively provide update ticks to objects it knows about. Think of this in a game context, where objects need regular update invocations to perform behavior within a scene based on time. An object that wishes to be attached to UpdateManage...

0
Q: Swift: Convert an array of NSManagedObject to an array of Entity

user1107173I need to take an turn array of NSManagedObjects into a an array of it's entity [anEntity]. func convertObjectsToAnEntity(managedObjects: [NSManagedObject]) -> [anEntity] { var anEntityObjects: [anEntity] = [] for obj in managedObjects { if obj.entity == anEntity { anEn...

> two billion one-hundred-fourty-seven million four-hundred-eighty-three thousand six-hundred-fourty-seven
Does that look right?
Shouldn't it have some "and"'s on it?
No, technically and only applies when listing the decimal portion.
two billion and one-hundred-fourty-seven million and four-hundred-eighty-three thousand and six-hundred-fourty-seven
Oh, ok then
I.e. 3.14 = three and fourteen tenths.
20:12
That's just a bigger number than I'll ever use
@Moacir It's the max value of an int32 ;)
I'm an accountant, so usually we just round most of that
Like "Two billion one hundred forty million"
or fifty in this case
The IRS doesn't like my rounding scheme. ;)
20:31
0
Q: The code allows the user to create a new log-on (python based)

LucianObjective - The user is required to create username which is unique. If the user has entered a username and the username already exists, the user must enter another username. A dictionary must be used to check if the username already exists therefore, requiring the user to enter a new username. ...

21:12
@202_accepted That's one of the differences between UK/Commonwealth English and US English, :) We'd also say 3.14 is "three point one four".
 
1 hour later…
22:21
0
Q: Finding nodes around a given node in a grid

cRAYonhereHi as part of my assignment I am working on a code. Even though I have completed the assignment, the direction() is just irking me. I feel like there is a better way to do it, ideally gaining on execution time or at least aesthetically !! [The stub for my assignment contained code from my profes...

23:11
@202_accepted You mean "three and fourteen hundredths"? Or do they do silly math in Ohio too?
The Indiana Pi Bill is the popular name for bill #246 of the 1897 sitting of the Indiana General Assembly, one of the most notorious attempts to establish mathematical truth by legislative fiat. Despite its name, the main result claimed by the bill is a method to square the circle, rather than to establish a certain value for the mathematical constant π, the ratio of the circumference of a circle to its diameter. The bill, written by amateur mathematician Edward J. Goodwin, does imply various incorrect values of π, such as 3.2. The bill never became law, due to the intervention of Professor C....
@200_success Hah, you caught me. Today has been a long day. Lol
@200_success I went to Uni in Indiana...so that really hits home lol
@Moacir Most rulesets I've seen only hyphenate twenty-one through ninety-nine.
5
Q: How to write out numbers in compliance with British usage?

ktm5124This question regards the numbers from 1 to 999. We can ignore commas, hyphens, and spaces. What I'm interested in is when and where to use the word "and". There are a few interesting cases: 1) 20 < n < 100 Is it "twenty and one", or "twenty one"? 2) 100 < n < 120 Is it "one hundred and elev...

Also, 40 is "forty".
@202_accepted You'd actually be less wrong with three and two-tenths.
I did indeed mean 14 hundredths. I'm way too tired today.
23:39
0
Q: Better QOpenGLWidget by delaying GL code to initializeGL with lambda functions

SnowfishWhen I am writing OpenGL applications with the QOpenGLWidget class, deciding what code goes into the initializeGL function has always been tricky. One example is when I have a setter that requires an initialized OpenGL context, I have to make sure the OpenGL context is initialized before calling ...

0
Q: C Beginner - FizzBuzz / Basic strings / Header implementation

J LewisThis is a pretty simple FizzBuzz variant. I'm more interested in my use of C (this is my first bit of C code) than I am in my actual FizzBuzz implementation, although I'm always open to suggestions. In particular I'm pretty certain that my string manipulations are horrific, but I don't really kn...

23:55
0
Q: Make the code more "robust"

PhilipThis code works. using it to have a site show either "Open" or "Closed" depending one what time it is. I'm just looking for input/how to make this code more robust? I'm a junior developer and I want to show this to my boss but one of the Senior Developers said to make it more robust/reusable be...

0
Q: Simple command line parser/dispatcher in Rust

John StritI've written a very simple command line parser/dispatcher library. This is an extension of a previous review, in which I've refactored, found here. Basically, a user can add functions to a Cmdr struct, then invoke them using a &str. I've made the library generic so that a user can define their ow...


« first day (1606 days earlier)      last day (2709 days later) »