« first day (1360 days earlier)      last day (2956 days later) » 
00:00 - 23:0023:00 - 00:00

okay wtf, Duga?
Duga's gone quackers.
Are you a duck, @Duga?
0
Q: Any Way to Make This Function More Tail-recursive?

mellowmaroonI'm working on a small Racket trie library, and I'd like some help on one function. The goal is to output the hash-based trie as a list of lists, with each of the sublists being a possible path through the trie. This function does what I want: (define (trie->lists trie) (define (internal trie...

0
Q: How to write better angularfire2

Obasi Obeny OjMy aim is to prevent authenticated users from voting more thank once. I am using angularfire2. The following code below gives me the expected behavior. Here is code review , I was wondering the better way of doing this. I will post my entire service.ts @Injectable() export class StatusService {...

0
Q: How does the PS1 division approximation algorithm work?

vexeI'm working on a game with a software renderer to get the most accurate PS1 look. As I was doing research on how the PS1 graphics/rendering system worked, reason for the wobbly vertices etc, I came across some documentation regarding the way they did their divide. Here is the link to it: http://p...

@CaptainObvious Off-topic
00:30
@OldProgrammer This question is off-topic for Code Review and is on it's way to being closed - Code Review doesn't do 'code explanation' or 'why/how does this work.' — EBrown 7 secs ago
@CaptainObvious is that use of goto acceptable?
0
Q: How to make my variadic replacement for boost::mpl::map and boost::mpl::vector faster?

GrapschKnutschI got the idea from capsterx's answer to this question. As it turns out, it works fine, but it uses much more memory and compile time then the standard -- so much as to make it unusable for me. Of course it avoids all the hassles of the original: Having to deal with (and extend) the given limits ...

0
Q: Using the Eigen Library in Ecclipse

WolfyUpon downloading and getting the Eigen libary working for Ecclipse in my Windows 7 desktop. My code compiles correctly although Ecclipse says there are errors but it for some reason the code below still compliles correctly... #include <iostream> #include <Eigen/Dense> using Eigen::MatrixXd;...

@CaptainObvious That should be migrated to SO I think (seems on topic there anyways)
00:53
@CaptainObvious No, we aren't going to make your question on topic for you.
If you are too lazy to ask right, then you don't deserve an answer.
I left a comment on there
0
Q: Good practice for database connection

JheI have created a Database Connection class as this. class DatabaseConnection { public SqlConnection sqlconn { get; set; } public DatabaseConnection(string server, string db, string user, string pass) { sqlconn = new SqlConnection(@"Data Source=" + server + ";Initial Catalog="...

Everyone around the world giving and receiving answers to each other's @StackOverflow questions. Just yesterday.… https://twitter.com/i/web/status/822149402643070977
Very cool^
01:20
Monking
Monking
How are you @Phrancis ?
And for any Xbox One owner who wants to have a good multiplayer local game : Overcooked
Overcooked?
@Marc-Andre Not bad, how are you?
01:30
@Marc-Andre Interesting, I'll have to look into it.
@Phrancis Good! We were able to watch a movie at the cinema yesterday. SO and me watched Rogue One
@EBrown Yep tons of fun :) ! And you really need to cooperate
@Marc-Andre I still need to go see that movie. Did you enjoy it?
@Phrancis Yeah really, but I love almost every movie so. But the movie make a lot of sense in the universe (just my appreciation though). I really liked it :)
@Marc-Andre I watched that on New Years' Eve with a friend of mine.
In spite of all the criticism it garnered at the time, I think Disney's acquisition of the Star Wars franchise was a good thing.
01:38
There was a lot of warring between pro-Disney and anti-Disney factions, but ultimately I think it was a stellar addition to the Disney empire.
Well Force Awakens and Rogue One are good movies, let's see how everything else will develop. But if those movies are to set the norm for everything else, I think I will like it a lot
Some people...
I guess he really didn't want to do anything....
Thankfully no one will have to waste time on that one then.
0
Q: Design and code a program that will calculate the following:

Selene WithersDesign and code a program that will calculate the following: a markup amount (the amount you will increase the selling price (i.e., the cost to make a doll times the markup percentage) a selling amount (the selling price of the doll (i.e., the cost to make the doll plus the markup amount) the p...

01:43
Damn it, no one even noticed my puns.
stellar empire, anything else ?
@CaptainObvious #GimmeTheCodes
@Marc-Andre stellar (stars) empire (empire) factions (Empire vs Rebel factions), warring (star wars)
Puns are a lot funnier when you have to explain them ;)
@DanPantry I was not sure about factions.
01:46
@Phrancis lot less funnier, right?
Right, I should have included </sarcasm>
I just noticed phrased kind of weird on the on-topic page:
> However, if your question is not about a particular piece of code and instead is a generally applicable question about…

- Best practices in general (that is, it's okay to ask "Does this code follow common best practices?", but not "What is the best practice regarding X?")
- Tools, improving, or conducting code reviews
- How to add a feature to or solve a problem with your code
"Tools, improving, or conducting code reviews" doesn't seem grammatically correct
it is if you precede it with 'about....'
"code reviewing tools, or improving or conducting code reviews" seems like it would sound better, but I see what you mean
I have a question about a tool: insert political comment
lol
"Those are not bugs, they are alternative features."
02:01
What's with the whole thing going around now about "alternative" stuff?
0
Q: Best way to find the keys of map with the highest values (equality may occour)

AmnesticI am currently implementing a poker game. I have made all the logic for getting the rank of a hand, and I now have to determine the winner of a given hand. Due to this being poker, there may be multiple winners in a round. I therefore need to find the keys (players) that all have the best hand. C...

@SirPython Politics. I'll explain in the Nth
02:18
I'm voting to close this question as off-topic because "how to improve a working code"-questions are off-topic on StackOverflow and should instead be posted on Code Review SE — techraf 19 secs ago
codereview.stackexchange.com is better for this sort of question. — squint 58 secs ago
0
Q: .net Rss feed to datalist and an expression

Vertigo262I am trying to figure out the syntax to load a Rss feed into a datalist and also limit the amount of records displayed with an expression So out of all the listings, I just want the first few like you would do in SQL, Top 5 for example. This is what I tried, but it did not work with the expres...

0
Q: Constructing dictionary based on data returned from functions

MrBearCurrently i have the following code: def get_data(**kwargs): """ """ cursor = connect(**kwargs) return { "closing_date": closing_date(cursor), "competence": competence(cursor), "father_id": father_id(cursor), "fpas": [fpas(cursor, id) ...

@Duga is that even code?
02:53
0
Q: Short and Messy Polybius Square

IdempotenceI attempted to recreate the Polybius square, also called the Polybius checkerboard, which was used in Ancient Greece for cryptography. Since it is an uncommon cipher, it is nowhere on Code Review. Although the program technically works, it ended up very messy. #include <iostream> #include <algo...

03:37
just had a chicken diablo burger, and it was gorgeous
0
Q: lower case to upper case string - assembly

Nick GuidaI am having trouble writing a program that converts the lower case letters in the string to upper case. So far I have created my string it says "hello TA" and I need it to output as " HELLO TA". I understand that each element (or byte) of the string needs to be looked at, then converted, but am...

I've used a lot of VTC's today.
Damnit @Jamal I was editing that.
2
04:06
@DanPantry That sounds spectacular.
You're in USA right now @DanPantry?
@Phrancis Yeah have been for the past couple of days
@Phrancis Want to test the piss out of some stuff with me later?
Gotta fix the mobile views but that won't be overly difficult.
04:22
0
Q: Does this C inheritance implementation contain undefined behavior?

Sanchke Dellowarstruct parent { char a; char b; }; struct child { struct parent parent; int c; char d; }; struct grandchild { struct child child; long e; }; void print_parent_val(struct parent *p) { printf("%d\n", p->a); } int main (int argc, char **argv) { struct grandchi...

@EBrown Oooooooo i love trying to break things :D
Well I gotta get mobile and layout fixed first.
I broke it so bad.
@DanPantry whereabouts?
Was wondering how come you were here at this time lol
@DanPantry How do I CSS?
CSS hahah I feel for you
04:26
HOLY CRAP MY LAYOUT IS 100% SJKDLGSJLKDGFKJLSDFJKLSDFJKLSD
Wait I think I fixed it
Need a hand? ;)
Sorta
~50% SJKDLGSJLKDGFKJLSDFJKLSDFJKLSD at the moment
Close enough
I don't even know if this is safe to deploy
Screenshot?
It's not, the arrows don't yet work.
Damn like 50% of this layout doesn't work yet.
@Phrancis Top-secret, can't screenie atm.
:(
Needs more jQuery
04:28
I don't know WTF I'm doing.
@Phrancis @DanPantry was helping me with that earlier.
I mean at least the auto-hiding I wrote is awesome.
Deleted and hidden items are collapsed by default.
Eliminating some of the noise.
Nice
This thing looks sweet
You on Skype?
Yeah mobile though
Can you view screenshots on mobile>
05:01
@DanPantry say I wanted to get proficient with Javascript, other than learning about ES6 and vanilla JS, where do you think I should start?
0
Q: Leetcode 56: Merge Intervals

Jianmin ChenProblem statement Given a collection of intervals, merge all overlapping intervals. For example, Given \$[1,3],[2,6],[8,10],[15,18]\$, return \$[1,6],[8,10],[15,18]\$. My introduction of algorithm: I worked on the algorithm several times before, and then also studied a few of "merge interva...

05:13
@DanPantry Changed that script from using a class to using an attribute: data-can-collapse.
0
Q: how to encode url using base64 in laravel?

Ram SolankiI need like this . original URL: http://localhost/dashboard/api/test/ encode url : http://localhost/dashboard/YXBpL3Rlc3Qv

05:30
0
Q: Keep main content scrollable but not the body

asprinFor a template such as: I'm using the following approach Get the height of the viewport via javascript (Let's say 500px) Deduct the header and footer height from it (Let's say header and footer are 50px each. So the end result will be 400px) Apply the end result as height of the main content...

05:49
Monking
Hows'it? :)
Fine. Just a little bit cold outside. But thats not a problem since I am now in my warm and safe office ;-)
Heh, lucky. :P
06:09
-1
Q: What does these lines of code mean?

Tan Kin Mengimport java.awt.Color import javax.swing.Jframe import java.awt.Color; import javax.swing.JFrame; public class Pong extends JFrame { private final static int WIDTH = 700, HEIGHT = 450; private PongPanel panel; public Pong() { setSize(WIDTH, HEIGHT); setTitle("Pong"); setBack...

@CaptainObvious off topic. We don't explain code.
@Heslacher but we explain why we don't explain code :-)
Right
Jamal hammered it.
can someone explain to me what explain means? by using it too often I forgot what it meant and need an explanation ;-]
06:33
@t3chb0t If you need an explanation of code, you almost certainly didn't write it, or if you did, it's just that bad
The latter could justify a code review, but not the former.
Also ++ for sarcasm
@Phrancis sure, just making some fun ;-)
Good code with bad/no documentation is bad indeed
Hey it's time to cook
or to go to work
07:04
0
Q: how to create generic class structure

sameerI have a requirement where user selects a ReportType from a dropdown and hits download button.Based on his type chosen, the system should generate a report. Right now i have only report type that is QuoteReport. In future i will have other report types like PolicyReport,ClaimReport. Right now i h...

07:46
0
Q: Counting number of eights

SomeStudentSalutations, I was doing a few basic Java recursion problems to refresh my memory with recursion (honestly never had to use it in a long, LONG, time), along with using it as a useful way to prepare for any possible interviews for entry level positions. I came upon this problem on codingbat.com:...

08:20
0
Q: Hackerrank: Sherlock and anagram

Jianmin ChenProblem statement Given a string \$S\$, find the number of "unordered anagrammatic pairs" of substrings. Input Format First line contains \$T\$, the number of testcases. Each testcase consists of string \$S\$ in one line. Constraints 1 <= T <= 10 2 <= length(S) <= 1...

08:41
0
Q: Print all possible combinations of items in a 2d vector

Emmasky Chuks/******************************************************************************************************* Name: Emmanuel Obi Description: Pokemon Go Go is a program that enables users to access pokestop locations close to the user's current location, and also pokemons that could be found at ea...

09:07
this question is off topic on Stackoverflow, if you want a review of your code, use CodeReviewC̀…̀²R̀…̀²Ò…̀²Z̀…̀²È…̀²T̀…̀² 58 secs ago
@C̀…̀²R̀…̀²Ò…̀²Z̀…̀²È…̀²T̀…̀² You're not allowed to post other people's code to Code Review. As stated in the help center, "Am I an owner or maintainer of the code?". — Peilonrayz 1 min ago
09:30
Monking
monking @Vogel612
09:53
0
Q: Interface inheritance / segregation (or not) vs generic interface

user1323245I am working on an inventory system for a game. The Inventory contains Items. Some of these items can perform an action when they are clicked (HealthPotion adds health, ManaPotion adds mana etc). The items that can perform actions implements IAction. I want to be able to place these items, along ...

10:06
0
Q: Simplifing Multiple Calls - Batch file

SteveFestI've written a batch script but there are lots of call that should be removed. Does anyone have some ideas about simplifying my script? Here's it: :SPACE CALL :QUARTZ %1 %2 %3. " " CALL :QUARTZ %1 %2 %3.. " " CALL :QUARTZ %1 %2 %3... " ...

 
1 hour later…
11:28
0
Q: My first PHP class: is it the correct way of thinking or not?

brigomy first question here on Code Review is about my first working PHP class. Could be this code considered as a real class in the way of thinking or is it just procedural code put into a class? Would you improve it in any way? Do you have any suggestion to write it better? Thanks class txtFor...

11:40
0
Q: Is there a better way to adjust dates in an array based on a start date

DirnthelordI have a data structure like this which holds start/end dates. --------|-----------|------------ Item | start | end --------|-----------|------------ 1 |2017-05-12 | 2017-05-12 2 |2017-05-12 | 2017-05-13 3 |2017-05-13 | 2017-05-13 4 |2017-05-13 | 2017-05-14 5 ...

0
Q: Online Inventory as a simple ERP for small Business

Marcos StivalI am making some kind of online inventory with some basic ERP functions as make order, make invoice, generate PDF.... There are many features yet to be implemented but I want to know if what is actually done is correct or there are some error. The project is made principally with PHP and JS wi...

12:12
@Vogel612 I fixed your fix of the ASCII table layout
-1
Q: Increase game app downloads

user128986I just made an game app on unity. After releasing the app on google play i could not find it on search by its name but i can find it by the url (if this can help, the name is: Identity; and the url is: https://play.google.com/store/apps/details?id=com.JLois.Identity). I believe this is because th...

possible answer invalidation by Heslacher on question by Dirnthelord: codereview.stackexchange.com/posts/153380/revisions
@Duga thats ok
@CaptainObvious pretty sure this is spam ...
@Heslacher not quite sure ...
12:20
the above is your edit, the below mine ...
notice that on the right side for me the table is actually aligned and with your edit it isn*t...
also I wonder why Paparazzi called it a bad edit (while misspelling my name at that)...
0
Q: Normalized ecommerce data model

OrtundSo there's not much here to "normalize" the database (really only the OrderItems class and maybe the Table Meta class as well) but I'm relatively happy with it. My only concern is the repeated "Name" property in many of the tables but since it doesn't appear in all tables, it doesn't make sense ...

https://i.sstatic.net/oKLuA.png

for me it looks like this
@Vogel612 You're not using a fixed width font...
urk ... why didn't SE use a proper fixed-width font as backup??
ohmigawd ...
this is fugly, wtf
@Vogel612 fixed
12:29
arigato
no problemo
possible answer invalidation by Heslacher on question by Dirnthelord: codereview.stackexchange.com/posts/153380/revisions
okay wtf, why is monospace not a fixed-with font??
gotta love that chromium uses a non-fixed-width font as fixed-width font and ignores system available fonts ...
well fudging done ...
 
1 hour later…
13:49
Monking
0
Q: Prettier code for if with many conditions?

daddeHow can I write this more pretty? private void _detailSpread_OnCellFocusChange(object sender, CellFocusChangeEventArgs e) { if (e.SourceCol == _detailSpread.GetColNumber("article")) UpdateDimensionData(_detailSpread.GetColID(e.SourceCol), _detailSpread.Rows[e.SourceRow]); else if...

monking
@Duga That feature hasn't been working for so long and suddenly you decide it should start working again!?!?! Damn you, @Duga.
0
Q: BFS in a grid with wall breaking saldo in Java

coderoddeIn this problem, we are given a 2-dimentional grid, with each cell being walkable or holding a wall. Given an integer \$s \geq 0\$, find the shortest path from the source node to target node breaking no more than \$s\$ walls. Grid.java package net.coderodde.grid.router; import java.util.Object...

@RoboSanta is this query being run on SEDE Data or on @EBrown's API Extract DB?
@Malachi its SEDE
after thinking about it, I think that is for the best
sorry I was typing while not watching what I was Typing, someone was talking to me...lol
14:37
0
Q: Reading and multiplicating matrices in C

TaufiI have to program functions that allocate memory, read in, print out as well as multiplicate and add matrices. For example, after reading in matrices by standard input, i.e. keyboard, I always get garbage values. However, when I try to do the same in a separate .c-file it does not happen that way...

Yes, I know. But the goal of this question is to understand more about Vue, not for best practices, etc. Otherwise, I should be in Code Review with a completely diferent question, isn't it? @Gerfried — Tom Moore 41 secs ago
14:59
Monking.
15:37
5 pings? what did I do
oh it was @EBrown mostly okay
@EBrown (Y)
@EBrown pray to the CSS gods
@Phrancis Uh... as in proficient with libraries? Think of a problem you want to solve, then solve it using Node I guess
@Phrancis Santa monica again :)
0
Q: Poker Hand classifer part 3: Deck Object and 7 Card Hand

StevePart 1: Beginnings of a Poker hand classifier Part 2: Beginnings of a Poker hand classifier part 2 I'm a beginner programmer, working on learning c# and object orientation and have been working on a poker hand classifier for practice. I've expanded my class since last part and made some decision...

0
Q: Binary Search c#

George GraingerHere's my attempt at a binary search algorithm: int[] intArr = new int[11] { 0, 5, 13, 19, 22, 41, 55, 68, 72, 81, 98 }; int search = 55; bool found = false; while (!found) { // if the midpoint number of the array is less than that you are searching for if (intArr[(int)Math.R...

0
Q: how to refactor multiple for loops?

alaskaz1864Note: Please do not use any String functions. No sorting allowed. No additional arrays or data structures allowed. An array is said to be hollow if it contains 3 or more zeros in the middle that are preceded and followed by the same number of non-zero elements. Write a function named isHollow th...

0
Q: Splitting strings in Java

user840718I wrote a function which takes in input a list of strings that is splitted by comma. Then each generated string is trimmed. Example: INPUT: [[Cat, Dog, Snake]] OUTPUT: Cat Dog Snake In particular, I'm interested in removing parenthesis and commas. This is the code I wrote, but I think i...

I'm voting to close this question as off-topic because code review questions should be asked on CodeReview.SE, not Stack Overflow. — TylerH 27 secs ago
Maybe this question should be moved to codereview.stackexchange.com ? — Wim Deblauwe 7 secs ago
15:58
Monking !
If somebody gets bored, I'd really appreciate some help on my SO Question x_X
I agree + all the workarounds I found around the web are just too staggered and would not be accepted in any code review, thanks all and will be waiting for any future answers. — DudeOfLayers 21 secs ago
@WimDeblauwe How do i move to codereview.stackexchange.com ? — Sthita 39 secs ago
0
Q: What is the best/Optimal way to refactor multiple for loop?

user129002Here is my code which is going to through multiple for loops to get the matching product attribute. I have single product with attributes trying to find out the matching product with same attribute value from a list of Product. I am having a multiple for loop. Can anyone suggest a way to optimiz...

16:13
@Peilonrayz did you understand my problem ?
@Cajuu' I've read it like three times now, not really. What is it that you really want, the two inner loops to be a generator?
@Peilonrayz no. What I really like is that first for loop to also be changed at each iteration
So you have for abcd in ...: next(city in country)? (short hand, as I don't want to write it all out)
yea
you can pseudo-write it like that
In non-psudo do you want:
for a, b, c, d in some_function('some_file.txt'):
    g = (
        json_data[str(i)]["commune"][str(x)]
        for i in range(1, 16)
        for x in json_data[str(i)]["commune"]
    )
    print next(g)["code"].encode('utf-8')
16:21
@Peilonrayz that's returning the same value all the times
if you saw the json file on that SO Question, you'll see next to code the value: 58
so in the first country there are 4 cities with that code
so I should return 58 4 times, then from the second country, 57 seven times(as there are 7 cities)
@Cajuu' Oh move g out of the loop
@Peilonrayz it looks nice and it works as far as I tested. But I can think of a problem with that. I also need to access the x and i in that main for loop
Monking
Monking
Monking
16:34
Monking
C-C-COMBO BREAKER
@DanPantry Do pretty much all the common libraries center around the Node environment?
0
Q: UML diagram for browser how to refine

Badr khanI am developing a browser in java and for that purpose I made this UML diagram can you give me constructive feedback? Thank you

0
Q: slow regex for optional regex

user129004I have the following lines to parse from log file with 8,000 lines which takes about 5 minutes: text="2017-01-12 15:16:42,404 - RestLogger[10c059f7] - INFO - rest_server::log_request:102 - REST call: <POST /multi/ HTTP/1.1> with args {} and content {u'inv_initiators': {u'path': u'/v2/types/initi...

@CaptainObvious Is UML review on topic or no?
@ThomasWard we review code only so no
I'm afraid this question does not match what this site is about. Questions must involve real code that you own or maintain. Advice on code not yet written is off topic as well. See also the help center. — Heslacher 15 secs ago
16:45
Thanks @Peilonrayz. Never thought zip() would help so much in this situation
@Heslacher yep that's what I thought
@Cajuu' No problem :)
Often I think we don't need the help center or how to ask pages at all
@CaptainObvious That's some fugly regex
@Phrancis yes it is
17:00
@CaptainObvious more close votes please
TTGH
If your code works, I think it is best suited for Code Review. You would have to reformat it, thought, to provide a meaningful Title with the intent of your code and a description of what it does. — Victor Moraes 7 secs ago
0
Q: PHP Login and Registration system using BCrypt

Taylor SwiftI'm new to web development and this is my first website. I was wondering if my login and registration system is secure. I was also wondering how to handle viewing parts of a webpage when the user isn't logged in (ie. hide a section if the user isn't logged in). Sorry in advance if there's irrelev...

17:32
0
Q: getting SIGSEGV in following code

Snap Dragon#include <iostream> #include<set> #include<cstring> #include<list> #include<vector> #include<deque> #include<algorithm> #define N 110 using namespace std; class Person { public: int num; int pid; set<int> id; vector<Person> nbr; void addNbr(Person p) { (this->...

18:03
WHAT YOU WANT IN A DEVELOPER ARE THE SAME THINGS YOU WANT IN A MONK PASSIONATE SO THEY WORK FOR FOOD ABSTINENT SO THEIR EVENINGS ARE FREE
heh
Gotta love PHP_CEO!
Secondly, as your code is working, isn't it?, your question would probably a better fir for CodeReviewempiric just now
Ripe zombie; open question with answers, at least one answer having score 0, no answer having score > 0: Sorting a list by country name
18:23
54
Q: Can I talk to rubber duck at work?

kukisI have noticed I have had great success using another co-worker as a metaphorical rubber duck (sometimes intentionally, sometimes unintentionally). It improves my productivity vastly. However, I know that it probably distracts others when I am using them in that way. That's why I want to buy a l...

lol
0
Q: Make my jquery shorter?

tibewwwI'd like shorten my JQuery. I know this is possible using this element and child but I don't know how it works? I have an element being show and hidden on click basically. They all have the same ID, just a different classes. How is it possible to achieve this? This is what my html looks like: <...

18:43
This should be in CodeReviewThisaru Guruge 45 secs ago
@ThisaruGuruge it's not a code review i have already present a working code of O(N*N*Sum) now i want to improve it's time complexity which is an algorithmic problem — Narendra Modi 45 secs ago
That's what codereview is for. — Thisaru Guruge 16 secs ago
18:58
@CaptainObvious That's not how you use HTML class attributes...
posted on January 23, 2017 by CommitStrip

0
Q: is this interface correct and use of unique_ptr correct?

chedy najjarI present here a piece of code taken from a book about mastering Qt5. it's the use of unique_ptr in the way shown below which I found to be suspicious and unusual(IMO). class AlbumDao { public: AlbumDao(QSqlDatabase& database); void init() const; void addAlbum(Album& album) const...

@CommitStrip cough PDF cough
@CaptainObvious Not his code.
Also, monking!
@Phrancis HTML is like C in that regard. Just because it works doesn't mean you should do it.
@CommitStrip That IE 5 book though...
19:26
I'd suggest taking this to Code Review. — Filburt 39 secs ago
@Mast It might be of use one day
(Or maybe not)
@CaptainObvious SIGH
Step 1 of shortening jQuery: Drop jQuery. The End.
19:43
@skiwi If adding more JQuery is not the answer to your question, you're asking the wrong question.
possible answer invalidation by chedy najjar on question by chedy najjar: codereview.stackexchange.com/posts/153423/revisions
0
Q: Printing numbers from 1 to 100 without using loop or recursion

Tamoghna ChowdhuryPremise and Context As the unassuming title states, I am to write a program (in C, because where else could I do such borderline illegal (to sane programmers, not compilers!) stuff while retaining enough of my sanity? Certainly not assembly) to print the natural numbers from 1 to 100 in sequent...

@Duga taken care of
Is @CaptainObvious a bot?
@TamoghnaChowdhury IIRC not a bot a feed
19:55
@TamoghnaChowdhury He's a feed, @Duga and @RoboSanta are our local bots.
but I'm not a bot even though my name is b0t :-)
0
Q: Using sound to change an image

user129022How would I use a sound clip to change the opacity of an image. The idea would be as the sound increases or decreases so would the opacity of the image?

@Mast Right... it's far more sensical to use the id attributes for the purposes of JS/jQuery selectors, and classes for the CSS, rather than the other way around
@Phrancis Probably going to try to deploy that thing we talked about last night later tonight or tomorrow.
@CaptainObvious Closed. Second opinions?
I'm closing this question as off-topic because the premise of the question violates the "Do you want to write good code?" rule, as stated in the help center. — 200_success ♦ 1 min ago
20:09
-2
Q: Regex coding style letter in squared brackets or not?

AspergerThis might seem like a trivial question but, if I have a regex like this: [a]{2}[b]*[c]? is it better to write it like this? a{2}b*c? For one I believe the first is more readable but im not sure if this is good practice.

Good new answerer:
2
A: Splitting strings in Java

Erika BurdonI'm not sure how you got the original list-within-a-list input, but have you looked into Java Streams? Here's a tutorial that may help. It looks like you're taking in a LinkedList, turning it into a string to manually delete the [[ and ]], splitting on comma, then adding each item to a new list....

You say that you want "overall reviews of my code", but it seems like you are aware of how horrible it is, so what kind of answers is it that you are looking for exactly? — Simon Forsberg ♦ 17 secs ago
@200_success I fully agree with you and Simon on this one.
This question has an answer no one has voted on:
0
Q: Brainfuck Brute Force

nedla2004I am trying to brute force code Brainfuck code to get the desired output. For this, I need my code to be as fast as possible. I am fairly new to Java and making my code fast, in general, so don't assume that I have done something for a good reason. import java.util.regex.Pattern; public class Br...

(That sounds better than "Hey, look at my answer!", doesn't it?)
I'm voting to close this question as off-topic because it should be posted on codereview.stackexchange.comJean-François Fabre 30 secs ago
@SimonForsberg Sneaky sneaky.
20:15
this is not a code review... code is posted to show my approach you can suggest better ways to do the same thing which can have no relation to the posted code sir — juggernaut1996 34 secs ago
And remember people, you can vote vote on question too, it's because we have question that we can have answer.
> I am trying to brute force code Brainfuck code to get the desired output.
You're doing what? With what?
If this is working code that you think could be improved, then yes Code Review is the place for it. If not, please clarify the problem. — jonrsharpe 1 min ago
@Mast Yup. My point exactly.
@SimonForsberg Java doesn't have .flatten ?
20:18
@Marc-Andre No, but .flatMap
@Marc-Andre For what? How?
Well normally in Ruby you have : [1, 2, 3, [4 , 5]], you can do [1, 2, 3, [4 , 5]].flatten and it will return [1, 2, 3, 4, 5]. Isn't what the question is about ?
@Marc-Andre Nope. That doesn't seem to me like what it is about.
Ok because based on this :
> INPUT: [[Cat, Dog, Snake]]
> OUTPUT: Cat Dog Snake
I thought that was a perfect flatten thing and if he wants trim you can do it at the same time anyway, the answer seems like it cover the question perfectly so.
I think flatMap is your only bet for Java
Though after going a bit into FP I have noticed one major difference between FP and Java Streams
While Java Streams follow an FP approach, you always operate on every element consecutively (or parallel if you wish), however most other FP languages operate on a whole list at once
Not quite sure if that makes sense ^^
@Mast, @SimonForsberg, @200_success question has been grossly edited to make intentions clear. Please reconsider closure. codereview.stackexchange.com/questions/153426/…
20:30
@Marc-Andre but it seems like the input is a List<String> and he does .toString() on it
Is the edit already done?
@TamoghnaChowdhury I will look
@skiwi How can you "operate on a whole list at once"?
@SimonForsberg In practice it's still done sequentially, but it's totally abstract in as example Clojure in my opinion
I'll try to find a code example, but what I remember was that switching from Java Streams to Clojure's FP methods was not straight-forward at all when things got a little complicated
@TamoghnaChowdhury The question looks a bit hazy to me. What exactly are you trying to do? There's so many words and so little clarity.
Try to summarize it.
@TamoghnaChowdhury I'm sorry, in my opinion we are here to make code better, not to make teaching material better.
20:35
@SimonForsberg So the String's in it is also a List... looks quite bizare
@SimonForsberg I can appreciate that sentiment. However, if I may have 1 request granted, can you (or someone) lock the question instead of deleting it?
@Marc-Andre honestly don't know what everything is there. There's a reason why I down-voted
So it is a flatten case, just that he receive is input not in the format he need to work on it I guess
@TamoghnaChowdhury Why?
@TamoghnaChowdhury And speaking as a former teacher student, I really hope you will use this as teaching material for quite advanced students.
20:37
^^
@SimonForsberg Maybe it's just the conciseness that confuses me at times... Take (apply * list) vs list.stream().reduce(1, (x, y) -> x * y)
Beginners won't be able to follow or won't be able to pick the lesson from it.
@TamoghnaChowdhury I myself have no intentions of deleting it. It is already closed, but I don't see a reason for locking it. It will probably be auto-deleted in 30 or 60 days or so.
If your code is in working order as intended, try asking for improvements here: codereview.stackexchange.com Stack Overflow is suited for broken code in hopes of fixing it. — MooingRawr 27 secs ago
I'm voting to close this question as off-topic because it belongs on codereview.stackexchange.comScott Hunter 27 secs ago
@skiwi Doesn't apply * list need a starting value? What if there is only one value in the list? Or.... hrrm... it will use the first value as starting value, right?
20:39
The flattening case would probably be something like (flatten (map (partial flatten) list)) :this is untested
@SimonForsberg Yep, first value is starting value, otherwise... It just returns zero I guess?
And how is that working internally, @skiwi? Is it doing the whole partial flatten on the whole list first, and then the map of that, etc? Or is it doing all the operations element-wise?
@Mast and @SimonForsberg Yeah, I get your point. I'll keep it for the more promising ones who are bit more adventurous. However, for me learning some lessons hereabout reviewability of code at least was worth it.
@skiwi Hrrm.... please test it on an empty list. I would expect exception rather than 0.
@TamoghnaChowdhury Related:
14
Q: Seemingly arbitrary requirements

MorwennThis meta question is actually a follow-up of a discussion started on The 2nd Monitor about the following question: Checking if a number is divisible by 9. To put it bluntly, the objects of interest are the requirements in the question: I tried to develop a new way to check if a number is di...

didn't know about codereview, can post there for sure, although this code is essentially broken to the extent that it isn't nearly fast enough to perform what it needs to perform. — Canovice 29 secs ago
@RubberDuck OWW wants to schedule a phone interview. :)
20:45
@EBrown Congrats!
And best of luck.
OWW?
Did something hurt?
Ohio Willow Wood, I think.
A company in prosthetics.
got it. like i said didn't know about codereview, will post similar questions there next time — Canovice 53 secs ago
My guess is at Online World of Wrestling
Or possibly Oxford, Worcester and Wolverhampton Railway
My guess : Old Wide Web
20:48
I'm not sure about this wikipedia redirect though: https://en.wikipedia.org/wiki/Owww!
@Mast This
@SimonForsberg It first computes (map (partial flatten) list), which maps list to (flatten <element>) and then it computes (flatten <mapped_list>)
That (partial flatten) is a partial function that can flatten anything... sort of a lambda, I guess?
Ah, okay.
@SimonForsberg Actually, it returns one on an empty list
(apply * '(1 2 3)), or (apply * '())
@skiwi And (apply + '()) returns zero... interesting.
20:56
Actually needs to be (flatten (map flatten list)) for flattening
So each operator has a corresponding default value
I still don't fully understand when you need to pass a normal method vs a partial one..
@skiwi Makes much more sense.
@SimonForsberg I have thrown in some idiomatic code examples too, and otherwise edited the question. Can further interest in it be expected?
@skiwi I still don't fully understand what a partial method is
20:57
Ah right I think I understand it a bit again
> (map (partial apply *) '((4 5) (6) (8) (1 3 7)))
(20 6 8 21)
That maps every element of the list with (partial apply * <subelement>)
@TamoghnaChowdhury Still looks like you want us to review teaching material, not code.
Honestly, I'd recommend to not push it.
And now I got to go to bed. Gotta get up early tomorrow
@SimonForsberg, I won't (I just didn't want to leave the question sort-of unfinished); but I did push it hypothetically, what can I expect? (not that I'll push it).
Good Night everyone.
Jess Pardue on January 23, 2017
Welcome to the Stack Overflow podcast #99 recorded Thursday, January 19 at the Stack Overflow HQ in NYC. Today's podcast is brought to you by Reverse Polish notation.
0
Q: Calls one column of a dataframe, turns it into an array and plots it

AizzaacMy code calls 1 column of a dataframe, turns it into an array and plots it. I want to able to do this for all the columns without having to repeat the code many times. How can I do this? #Code to create fake data df = pd.DataFrame(np.random.rand(10,5), columns=list('abcde'), in...

0
Q: Checking whether number is in given range

MichaelIntroduction I want to check whether number is in given range. Function takes: long number that should be checked 2 longs threshold values byte range mode Range mode is represented as number of type byte that can be from 0 to 4 0 for 00 => exclusive check 3 for 11 => inclusive check 1 for ...

@EBrown cool man! Good luck.
21:20
I give all my variable names a lowercase character at the beginning to denote what kind of variable it is, i.e. i for integer or s for string. From there, I give it some name, like File or Counter or whatever. — ilarson007 4 mins ago
#DidntGetTheMemo
4
0
Q: Trouble accessing SQLite database for my android app

lefty_lucy_righty_tightyI'm having some code issues with my android app. I'm trying to get a few edit text boxes to create a term object in my database whenever I click the add button. I then want my ListView to reflect my update with the newly added object, but when I click the add button I'm getting an error I can't...

21:32
0
Q: Converting roman numerals to arabic numerals

J. DoeI went to go hand in my computer science lab today on the second day it was assignment. We have 10 days to complete this lab. My teacher stopped me, and said that there was no way I finished this quickly. She quickly went over my code, and said that the way I went with the prompt was inefficient....

21:50
@StackExchange Bootstrap a jetpack to it.
And please alias all of the fields in your query, we have no idea what table they came from. Your query would fail code review here for not doing that. — HLGEM 26 secs ago
0
Q: Reroute from one IP to another on windows

Carlos Scherer MtzThere is this customer that asked me to put the DB my software uses on a local machine instead of on the cloud like other customers. This was a long time ago, he is back at my hometown. He recently changed his ISP so the set IP I used on his windows machine stopped working and had to be changed,...

@CaptainObvious Maybe this belongs on Network Engineering.
22:17
@RubberDuck Thanks. :)
If you want help with multiprocessing in general just to learn however, you'll have to post your code that actually involves the parallel processing for us to be able to help you. If you aren't actually having any errors you might find more luck on Code ReviewAaron 13 secs ago
22:40
This should probably be migrated to Code Review — Amaury Larancuent 32 secs ago
@canfiese - this question can help you reduce the amount of work for python even more: unix.stackexchange.com/q/6979 That's not really interesting in terms of learning python lol, but sometimes thing end up like this. As someone said in comments, code review stackexchange will help you with refactoring and writing idiomatic python. — Vovanrock2002 32 secs ago
22:55
0
Q: How to filter with two attributes using Firebase?

MochiI have a game data structure in Firebase that looks like this.. I have a view controller in my app that loads up all the games for a specific team. I have the following code which works. DataService.ds.REF_GAMES.queryOrdered(byChild: "team1").queryEqual(toValue: teamKey).observeSingleE...

00:00 - 23:0023:00 - 00:00

« first day (1360 days earlier)      last day (2956 days later) »