« first day (1022 days earlier)      last day (3291 days later) » 
00:00 - 18:0018:00 - 00:00

00:00
RELOAD! There are 1879 unanswered questions (94.0606% answered)
SO is primary to help people fixing programming problems. If you need a code review or an option, please pass your question over to codereview.stackexchange.com, — Stephen Reindl 47 secs ago
00:38
0
Q: Optimize KnockoutJs Pagination Computed Function

Sean ThorburnI have written a function that builds an array of paging options for rendering on the view. I have modelled it after DataTables for jQuery, a live example with lots of data is available here: http://www.companieshousedata.co.uk/a/490 Is there a better way to write this? The function also retur...

0
Q: Seconds -> Days, Hours, Minutes, and Seconds

AustinBThis is just a simple function to convert seconds to days, hours, minutes and seconds for a larger app I'm going to be building. I'm just looking for thoughts on it. import math def convert_seconds(x): # Day's days = x / 86400 fraction, whole = math.modf(days) days = int(whole...

woo, 100 bronze badgeees
2
0
Q: Adding items in a list

JimmyKooganI wrote a function that adds items in a list, but my professor says to try and write it in a simpler way because he says I take too many steps. Is there any other way to write this? def additems(self, item): """Add <item> to this PriorityQueue. @type self: PriorityQueue @type item: ...

@Pimgd congrats!
public static String randomString(int i)
{
    Random ran = new Random(i);
    StringBuilder sb = new StringBuilder();
    while (true)
    {
        int k = ran.nextInt(27);
        if (k == 0)
            break;

        sb.append((char)('`' + k));
    }

    return sb.toString();
}
trivia: what does this code output?
winner of the weirdest way to print "hello world" — osdamv Mar 4 '13 at 19:51
that's right
01:09
@Mat'sMug what the fk
that's weird indeed
oh lol, I skipped the important part
System.out.println(randomString(-229985452) + " " + randomString(-147909649));
@nhgrif Sorry, I left because my headache was so bad. It is one page.
0
Q: Implementing a Queue using a Linked List

Kenny Ferrante public class LinkedList { private class Node { private final T data; private Node next; public Node(T data){ this.data = data; } public void displayNode(){ System.out.println(data + " "); } } private Node first; private Node last; ...

01:27
user image
6
@rolfl nice!
Monking all. ;-)
monking!!
0
Q: MS-DOS style OS

J. BridgesThis is a very basic text-based operating system I've been working on. I started working with python a few weeks ago and this project only a few days ago, so there are probably better ways I can do things, but I was wondering what people think of it. NOTE: I know that the edit function doesn't w...

01:32
Got some new toys in the lab today: ark.intel.com/products/92674/…
Wonder whether I can saturate the connections.... challenge accepted!
lol, get it to 85 degrees!
I should cross-link the ports, run them in full duplex. Maybe set up my own LHC....
I wonder, if I have a port sending 100GBit/s to another port, and have that other port sending 100GBit/s back to the first, is it 400GBit/s total, or just 200?
I know nothing of networking. AFAICT that would still be 100GBit/s
hmm wait
uh, 200?
depends if the 100GBit/s is in or out or combined
If I had two cards, each card would be processing 400GBit/s (100 out on each port, and 100 in on each port) - with 2 ports, that's 400 Gbps..... but, with 1 card, cross-linked, is it processing the same amount of data?
my instinct says it's half the rate
01:41
The optics are full-duplex - you can be sending and receiving at the same time, at full speed.
@rolfl Wouldn't it be an infinite loop with the two ports continuously relaying the data back and forth?
9 mins ago, by rolfl
Wonder whether I can saturate the connections.... challenge accepted!
I think that's the idea :)
Why would you do that?
@Hosch250 - now, imagine a few thousand of those in a room, where one of them is on, say, a file server, and the others are on compute nodes.... that file-server node will be punished.
01:43
0
Q: Applying MVC design pattern to a Java SWING application

NxSAs the title says, for the last couple of hours, I've been trying to implement MVC design pattern into a project I've worked for a couple of days now. It took more time than expected and since the project is pretty big right now I will supply only a couple of classes where the my attempt to imple...

0
Q: Count the number of checks each method had to perform before fully sorting the array

USC23So I'm writing a program that compares Bubble, Selection, Merge, and Quick Sort. All 4 methods are given a randomized array of 1000 elements and I count to see how many times it takes a method to perform to fully sort the array. My question revolves around the placement of my counts. I know I ...

Part of my job is figuring out at what point things start breaking. The truth is, though, that it's hard to make those networks the limit, and not the system processing the data.
which is half of the point..... where the network is no longer a constraint.
So then the point becomes the processors need to speed up?
So the processor companies can say the limit is because of the network company?
On the other hand, I will also have a lot of these: en.wikipedia.org/wiki/3D_XPoint
The problem is that the processor no longer really needs to be too involved in the data transfers anymore.... so, the math becomes hard to do.
The "traditional" view of storage and network being the slow parts of the system are no longer true. So, it changes the way algorithms should be done.
Dinnertime
@rolfl did that poor server insult your family personally or something? lol
02:03
0
Q: Anchor Text String Transformation in Swift

Aaron BragerI need to convert a string using these rules: Downcase the string Replace spaces, a blacklist of "invalid" chars, and non-ascii letters (like é) with - Replace repeated hyphens (ie --) with one hyphen (-) For example, Is my résumé good enough? should convert to is-my-r-sum-good-enough-. This...

02:23
@JeroenVannevel you here?
maybe
how much you got in yo wallet?
lol
got any idea for this issue? I'm out of ideas.
how does Roslyn deal with precompiler directives?
0
Q: PHP and if statement (code improving)

HeuHeuthis is my first question on StackExchange. How can I improve this if statement?? if (is_string($callback) && substr_count($callback, '@') == 1 && file_exists(CONTROLLER_PATH . '/' . explode('@', $callback)[0] . '.php')) { $this->_callback = explode('@', $callback); ...

Compiler directives are evaluated prior to constructing the syntax tree
for example:
Notice how the 'LocalDeclarationStatement' comprises like 5 lines
that's because the preceding lines are considered trivia that's attached to it
first it evaluates the source code based on the given compilation settings and determines what is applicable and what isn't
and then the tree is constructed based on that
crap
so wait, if you have 2 branches that declare the same variable, and refactor/rename it, it's only going to rename one of the two?
02:29
euh
let me check
can't say I work often with directives
me neither
But yeah, I would assume it renames just one
but you confirmed my greatest fear
I need to get ahold of the VBE's precompiler constant values, and they're nowhere in the VBIDE API
yeah, renames just the one
cool
thanks for confirming :)
02:31
no problem
Looks like you have a fun fight ahead
yeah... for some values of "fun"
People who chastise themselves have fun too
Well, if I only do a follow-up contact to the places that I'm seriously interested in working at, there are only about 5. I guess that isn't too bad.
03:16
Evening all.
Evening, @DJanssens.
03:35
0
Q: About Window in XAML

Hosch250I just redid Rubberduck's About window in XAML: I do not like my XAML very much. The way I place the StackPanel for the white pane over two rows, only to provide a margin to keep the copyright text out of it seems very hackish. Just as bad is the way I put the Hyperlink elements in a textbox...

> I bet you my house, wife and dog that you won't have a clue what that button does next week just by looking at this code.
12
A: Secure Encryption Algorithm

RobHI know that Hosch250 has already covered naming but I think it's worth letting you in on a secret... Most programmers would prefer "stupid" code that is well written, with good naming and consistent formatting to "clever" code with ridiculous names. I don't want to bash you too hard but button3...

I hope he didn't tell his wife that.
2
03:58
0
Q: increase clarity of output by assigning unique ID to individual thread

dzjustinliI'm new to Java and is trying to learn the concept of High level concurrency. I saw the code below at Java tutorial Oracle. However, when I ran the code, the output did not indicate which thread did it came from. So my question is, how can I output the thread ID (i.e. somehow assign a unique ID t...

04:09
-1
Q: RTE-4 challenge:recognizing contradictory sentence

Deepanjali SanthiramI am involved in Recognition of textual entailment.The challenge involves finding contradictory sentence. For eg: The boy is running in the park The boy is lying in the park I have tried to find all possible contradictory verbs of a given sentence.I have tried wordnet antonyms.But they fail t...

 
1 hour later…
05:25
0
Q: Emacs init file

Saurav;;(server-start) (setq shell-file-name "bash") (defalias 'yes-or-no-p 'y-or-n-p) (setq x-select-enable-clipboard t) (add-hook 'c-mode-hook #'electric-spacing-mode) (add-hook 'c++-mode-hook #'electric-spacing-mode) (add-to-list 'load-path "~/.emacs.d/elpa/highlight-current-line-20051013.1056/") ...

Monking
Monking
@CaptainObvious The Lisp formatter is really broken
05:55
I think the traffic has slow downed in the chat room a little lately... Can't remember seeing the "1 hour later..." so very often
But then again, I'm a rather new user, and was quite active before new year, and especially in the Winter Bash there was a lot of activity.
With that being said, it's TTGTB. See ya later, and keep up the good work!
06:48
0
Q: Uncaught TypeError: fn is not a function in chart.js

Henry OkonkwoThis is my first time usingchart.js to make line chat and it work on my localhost but when i uploaded it to a remote host i found out that the line chart was not showing so i inspected element and found this error in the console. please what could be the problem. Uncaught TypeError: fn is not a ...

 
1 hour later…
08:06
That's new ;)
I should be sleeping
instead I'm working on getting this to work:
if anyone has a clue:
0
Q: Binding the source of a CollectionViewSource grouping in a tabbed control

Mat's MugI'm trying to design a WPF tabbed control to display search results; the ViewModels are structured like this: SearchResultWindowViewModel ObservableCollection<SearchResultsViewModel> Tabs ObservableCollection<SearchResultItem> SearchResults So my SearchView.xaml has a SearchResultWindow...

the bindings work, until I try to regroup the results
TTGTB
Monking!
09:38
0
Q: PHP Configuration class

Adam TaylorCreated this little config class, any room for improvements? Think I have done an alright job but would like to know if any improovements could be made? <?php defined("SECURE") or exit('Please define SECURE keyword to continue.'); class config { private $configValues; private $configFile...

10:24
0
Q: JAVA - Modbus 1 connection for multiple methods

user98249I have made a connection method which returns TCPMasterConnection. public Class Connect{ String ipAddress; int port; TCPMasterConnection tcpCon; public TCPMasterConnection OverTCP(String ipAddress, int port) { this.ipAddress = ipAddress; this.port = port; TCPMasterCo...

10:49
Monking @SimonForsberg
Monking @Simon
So, what's happening here these days?
Just kidding. Not much. I once again find myself struggling for motivation to write code for open source, even though I know I should.
My github looks very empty. It makes me sad.
I'm thinking about getting a javascript certification though
@DanPantry Then fill it up :)
> I once again find myself struggling for motivation to write code for open source
I can never seem to just sit down and write code, especially as I don't know what to write or what problems to solve.
10:55
> w3 schools
@DanPantry same ;-;
I can't even find the motivation to write code to solve the problem for not having motivation.
@DanPantry Hmm... w3schools certification? They don't seem like the most authorative...
w3schools aren't that authoritative... but they are a recognised name in web development (albeit for all the wrong reasons for the most part of history)
certification > no certification
if I can find a mozilla certification though I'd definitely take it. MDN is the shit.
10:56
@DanPantry or you could get MSFT certs
I'd recommend checking if there are other JS certificates available.
I'm planning to get involved on a project with some people on a different SE site, but you just gotta find a decent project that takes up a lot of time
like how there's the three major projects here
@SimonForsberg yes yes, I know. I've read it. I've read lots of motivational articles. @janos got me an extra book for secret santa that I wasn't expecting that specifically addresses it (which was great, btw)
@Quill Don't tell me it's PPCG....
australian code golf: regular code golf, but with more tumbleweed
10:57
@SimonForsberg No, it's not. Although writing a golfing language sounds like an interesting challenge
I'm learning a golfing language at the moment
@DanPantry and knives
GGDAY MATE HelloWorld()
  CRIKEY "Hello, World!"
  HAVE A PINT 3
GGDAY MATE

HelloWorld()

> 'Hello, world!'
> 3
@DanPantry I have found myself using that flowchart many times, and especially I'm trying to estimate my values for expectancy, value, impulsiveness and delay (set a value between 0 and 1 for them)
@SimonForsberg I'll add it to my bookmarks bar and give it another read, I suppose.
There are a couple of good ideas I have. They're just very big.
One is a dating site specifically for gamers, although I struggle to envision how that would work out. Another is a sort-of replacement/supplement for ticketmaster now that the LoL 2016 world championship venue has been announced.
I couldn't buy a ticket for that competition last year because within 2 minutes all 20000 tickets had sold out.
And then been resold on stubhub for 3x the price.
I've learned a lot in the past year, I just don't have a lot to show for it, which bugs me.
I'd like to do some kind of Github challenge where I have a long Github streak, but, again - no project/ideas = no streak.
Thanks for another project idea @DanPantry
@DanPantry You really ought to start a blog
I did start a blog.
I decided I'd write to it.... later
(You can see how that ended up)
I think I just need to be strict on myself and put myself on a schedule.
Example: Write one blog post every Friday about something you did that week.
11:07
I was going to do a weekly post along the lines of What I learnt and What I did
@Quill Not everyone is a blogger. There are other ways to show off your skills.
@SimonForsberg which I don't take advantage of.
I would like to be able to sit down and write a blog, like I would also liek to be able to sit down and write code about anything like some people (like tj from npm, you @SimonForsberg, most of Cardshifter...)
@SimonForsberg You're right, but I've heard Dan's rants, and he could do blogs if he wanted
What rants are you talking about? :P
I'm thinking about making a PoS framework
11:14
Point of sale?
Make it a good one that doesn't take so long to move between steps because my god the one at the local Tesco makes me click "Next" on the "no I don't want any bags" screen at least twice before it moves onto the payment screen...
..Oh, those rants
Where's the link to the badge thing you created, by the way?
I use Firefox Dev Edition now
@DanPantry it's under What? on here
I never fixed my blog or profile pages after the domain switch
I need to fix that
@DanPantry Nice, blue logo, isn't it?
Yes, but it is still Firefox. It just told me off for trying to run it more than once
lol
Hi @mariosangiorgio
[badge:fanatic]
@DanPantry The only thing I have to show off on Cardshifter is the fact that it has 24 github stars. (Nothing compared to @Mat'sMug and @RubberDuck) Cardshifter doesn't have so much to show off by itself.
11:19
Excellent, it works
@SimonForsberg It exists. That's something.
@DanPantry for some values of works
@DanPantry True, it exists, but is far from finished.
@SimonForsberg One thing I like about OSS is that it is never finished. :)
@SimonForsberg it's coming along though, isn't it? Once the HTML client is good, I'm sure you'll draw more traction
in Cardshifter TCG, Feb 15 at 16:39, by bazola
its amazing how much polish that you can put into a game and still feel like you need to add more
11:21
@DanPantry s/OSS/more or less all projects/
@SimonForsberg Well, that's true. My in-work project will never be finished as long as I work there. This is something my manager doesn't seem to quite understand
But there's always something to improve, or change
@Quill What mainly concerns me is that there is no progress on it anymore. No one is working on the HTML-Client, no one is working on the game itself.
I think there's some decision paralysis as to what to do with the HTML Client.
Yeah, I don't even know how to work on it
@SirPython and a few others have expressed interest in rewriting the HTML client in React, now that they have an idea of the overall "shape" they want it to form
11:23
I've opened the repo like 10 times trying to help, but I can't even understand where to start
2
@DanPantry Maybe. Issue 88 is still the one that I am mostly interested in getting fixed.
I really like how easy github's url scheme is
@Quill That is a common problem with many projects today. (Especially those that I am involved in, it seems...)
i didn't know the scheme, just guessed it
Documentation and tests are a good way towards solving that, @Quill
As well as a roadmap and milestones
Unfortunately, a lot of people (myself included) much prefer to hack away on code than do the admin side of things.
2
@SimonForsberg Duga's pretty amazing though, isn't she?
11:24
That's why a company run solely by programmers would never work.. you need normal non-tech people to bring them back to reality :P
I was considering writing a Node version of her recently actually
@DanPantry *cough* SE *cough*
@Quill SE has non-technical people, I'm sure
Not originally. They just had a great idea, and the skills to follow through
Well, yeah, start-ups don't tend to have it. Its' when projects start growing (Cardshifter) and you look to adopt new people that you get pains
I think @Phrancis and @SirPython don't want to start all over again in React after doing Angular
But it probably needs to be done
There's what, four, maybe five of us to work on the HTML-client once it starts back up again
11:30
@Quill @Duga's awesome.
With regards to that issue I think it would be a lot simpler (for some values of simple!) if you could have an authoritative server that knows about all the acceptable templates. This would make security much easier as you can more or less trust anything on your server. This makes the whole issue going from "how do we approach this from a techncial stand point" (not hard once security is out of the way) to "how do we get users to 'register' these bundles"
hello @RubberDuck
@SimonForsberg word to the wise. Don't re-write it. Ship it
Hello btw!
@DanPantry I have always thought that the HTML-client can host the templates for some official mods. If users wants to make their own mod though, that I don't know exactly what to do about...
@RubberDuck play.cardshifter.com - done!
Speaking of OSS, here's one for debs that prefer MVC/MVVM github.com/ckuhn203/Rubberduck.Winforms
Oh snap! Look at that!
@RubberDuck that's actually pretty fucking awesome...
Our legacy software uses WPF
we're trying to get our old devs to use MVC
That will be super helpful
If you can get that on NuGet it would be even better
@SimonForsberg Are the menu links supposed to be broken?
11:45
@DanPantry I think so. Ask @Phrancis, he's mostly responsible for such content :)
@DanPantry Remember what you said about routing and # links?
Yeah... that
Its beta. Needs stabilized a bit before I use it at work @DanPantry, but it should be a nice bridge from nasty winforms into model/domain driven design.
And apparently has 29 downloads since last week... Heh.
@Quill # links are not inherently bad, it's just on more modern browsers you tend to use history api instead
@RubberDuck awesome, I'll show it to the guys on Monday
Annnnd I've found the reason I disliked Firefox.
If one tab dies, it all dies.
I'll see if I can't get IValidatableObject support done by then.
@DanPantry Theme?
11:59
@Quill Menu bar, window style, etc.
It matches my atom theme too. I really do like the Numix theme a lot..
Atom is great, I installed Vim commands on Atom the other day and it just became perfection
I don't like Atom that much. It creating a DOM element for every line makes it pretty bad on slower computers. And the Vim commands felt buggy to me, especially as you need a seperate package for vim ex
But its package support for ES6 is better than Sublime's.
The concept of the packages and pane splitting hooked me and the vim commands kept me
I may just switch to actual Vim soon though, idk
vim on its own is great and powerful and I'd definitely recommend learning the commands
12:04
But... I personally don't use it on its own much. The commands are awesome and its why I have it in Sublime etc. Vim requires a lot of set up to work with JS. I don't need that when I can just use Atom which is built for purpose.
hey
Hey @skiwi
12:19
0
Q: C++ handy Array

Jonatan KłoskoI have spent some time on coding Array class based on those from other languages. I would like to know what do you think about it. Here it is. There are also test, that may serve as examples. Here's one sample (assuming we have Person class with public attribute name, and getAge method): Array<P...

@Quill @SimonForsberg jsdoc is pretty cool.
I was just playing around with it to address the documentation issue we were discussing earlier
Full code here
0
Q: Getting Duplicate data in database table after executing the code

user1328007Hi I am getting duplicate data in database table after executing the code.I am not able to find the reason. Please help me out $total_posts = array(); ini_set('display_errors', true); try { $stmt = $db->prepare("INSERT INTO timeline_row_wise (`fbname`, `token`, `message_id`, `mes...

12:36
would programmers.stackexchange.com/questions/310615/… be a decent candidate for migration here?
@Ixrec definitely seems more CR worthy than programmers, but I'd get a second opinion
0
Q: Rewrite a javascript function in a better way

user35$data = [ {"Price": "150", "DATE": "January", "ExpenseType": "Food"}, {"Price": "3000", "DATE": "January", "ExpenseType": "House Rent"}, {"Price": "130", "DATE": "February", "ExpenseType": "Beverage"}, {"Price": "90", "DATE": "February", "ExpenseType": "Food"}, ...

0
Q: OPP Sign In/Out procedure in PHP

GeorgeGkasPreface As a self-taught student of Web-Development and Web Technologies, I created a simple sign in/out form in PHP, just for practice purposes and some fun! I read the O'reilly's book about PHP and I found one sentence there ( I really don't remember where it was though): A novice web dev...

@DanPantry Looks a lot like Javadoc
@Ixrec Not a good migration candidate, but a good suggestion to repost after you've read the Help Center
ok, thanks
12:52
0
Q: Custom Caching Memory Allocator in C

Coder3000Over the weekend I built a fairly simple allocator. struct FreeOnes { //data structure holding the pointers to free blocks int len; void** array; int capacity; }; void append(struct FreeOnes* f, void* what){ //add a free block to FreeOnes if (f->len < f->capacity){ f->ar...

0
Q: "ACM ICPC Team" challenge on Hackerrank

Wintro ACM ICPC Team You are given a list of NN people who are attending ACM-ICPC World Finals. Each of them are either well versed in a topic or they are not. Find out the maximum number of topics a 2-person team can know. And also find out how many teams can know that maximum number of ...

how exactly did I get +23 on an answer that is +1/-1 and accepted? 0.o link
I downvoted one answer which was deleted, so I should have ended up with +25 if anything
@DanPantry Upvote +10, Accepted +15, Downvote -2 = 10+15-2 = 23.
Oh, right. I thought downvotes were -10 for some reason
@DanPantry You downvoted = -1, answer deleted = +1 = +/- 0.
derp. I should vote more
2
that way I'd learn these things
Thanks @SimonForsberg
13:00
@DanPantry I wish they were about -4 or something at least.
13:23
0
Q: Use of ignored in Java exception handling

Mike B.In my code, there is a chain of functions call where the deepest function may throw an exception. I catch and handle it according to the business logic. The problem is that all other functions in the call chain are dependent on this function, thus, if the deepest function returns null all others ...

@CaptainObvious u wat?
13:57
0
Q: Replace word with another word excluding the word contains substring of the given word

Dhakshapublic class ArithmeticOperation { int value1,value2,result,a,b,c; void add() // code to add { this.a = 78; this.b = 89; this.c = a + b; System.out.println("sum of two numbers is "+c); }

0
Q: Can anyone confirm if this is the correct way to implement PageObjects using TestNg in selenium

user2214872I am trying to implement page objects with Page factory using TestNg and selenium. Please advice improvements in it. Classes: LoginPageObjects extends LoginPageLocators{ private WebDriver driver; public LoginPageObjects(WebDriver driver) this.driver=driver; public HomePageObjects loginFunctio...

0
Q: Exposing Iterators while Trully Hiding Their Implementation

D. JurcauWhile implementing classes composed of various collections, I've found that it's pretty hard to completely hide the type of collection used, while still allowing C++ style operations on iterators. For example, the following two classes allow the client to easily iterate through the collection, b...

14:40
0
Q: DAL basic implementation using Entity framework 6 and Autofac

S. PeterWould like to ask for a code review for my DAL. I use Entity framework 6 and Autofac for dependency injection. All comments will be appreciated. Thanks! public interface IBaseEntityObject { public int Id {get; set;} } public abstract class BaseEntityObject : IBaseEntit...

An answer about unit testing:
0
A: Anchor Text String Transformation in Swift

nhgrifYou've made very strange decisions as to what belongs in extensions of existing types and what does not. By my measure, the only correct decision was to include isAscii as a property of the Character type, however, your implementation is incorrect. Your isAscii only returns true for 62 of the 1...

@Quill I'm actually quite excited to start writing it in React.
@SirPython you'll be even more excited given soething I just discovered in React 0.14.
What did you find?
class NavigationBar extends Component {
  render() {
    return <Navbar>
      <Navbar.Header>
        <Navbar.Brand>{this.props.title}</Navbar.Brand>
      </Navbar.Header/>
   </Navbar>
  }
}
The above can be reduced to this..
({title}) => <Navbar>
  <Navbar.Header>
    <Navbar.Brand>{title}</Navbar.Brand>
  </Navbar.Header>
</Navbar>
That makes it a pure component, which (in theory) can have some cool optimisations performed on it
And React can disguish between the first and second, meaning that at some point Facebook might make it so entire trees of the second form don't re-render unless their props have changed - because they're stateless
also it's just a lot less boilerplate, which is an added bonus
See here for info
14:53
That's interesting. I've actually seen (and used) the second way before, but I didn't realize that there were any benefits other than that you didn't have to write an entire class.
Well, there might not be just yet, but the point is that there can be
Because when you use the second type you can tell that "hey, this just takes an input and renders an output - no side effects".
Oh, I see! Because they are stateless, they almost enforce good practices in using container components, right?
That's another benefit, yep.
Because they have no state they are referentially transparent.. and nearly every component in your app will be a presentational one aka stateless, so it just makes building an app less cumbersome.
Why am I using Angular in work again...? :P
And react-redux makes creating container components really easy with connect.
:)
React is just awesome.
15:00
^ Exactly why I can't wait to write Cardshifter in React.
15:26
1
Q: Square root calculation in Scheme (SICP Exercise 1.7)

leanczI have done exercise 1.7 in SICP (calculate square root precision when change in guesses is under a certain value), but I am calling the change-in-precision function twice in each iteration, which disturbs me. I wonder if there is a better way to implement this. (define (average . ns) (/ (apply ...

-1
Q: Colors compare with "==" in Java

Veronica CaterinaGood morning, I need to check if an object's color is the same of another's color. I tried the most classical way to do it. Here is how: boolean Color checkColor() { if(obj1.getColor()==obj2.getColor) return true; else return false; } In another method I did this to che...

15:44
0
Q: timestamp function with milliseconds precision

arcomberI want to be able to print timestamps with milliseconds precision and time_t doesn't provide this. I also want the code to be portable, so operating specific functions are out. ftime seems to be deprecated but there doesn't seem to be an general purpose alternative so using ftime. How could th...

16:07
Afternoon all.
16:19
Another TDD answer:
0
A: Anchor Text String Transformation in Swift

nhgrifWe should always be thinking about how to write our code in a generic way. Otherwise, what happens if we want something very similar to what we've just written, but slightly different in some minor way? Well, it usually results in a lot of copy & pasting. Let's write some code that will allow ...

possible answer invalidation by S. Peter on question by S. Peter: codereview.stackexchange.com/posts/120621/revisions
God, there were so many problems with his first snippet... the Character extension...
extension Character {
    static let invalidSet = Set(" -&+$,/:;=?@\"#{}|^~[]`\\*()%.!'".characters)

    var invalid: Bool {
        return Character.invalidSet.contains(self)
    }

    var isAscii: Bool {
        guard let number = String(self).utf16.first else { return false }
        return (65..<127) ~= number
    }
}
isAscii is the only one that makes sense in the extension, and it wasn't even correct.
16:40
possible answer invalidation by S. Peter on question by S. Peter: codereview.stackexchange.com/posts/120621/revisions
This doesn't even compile. v1, v2... are used but not defined. Also, it's way too much code. Perhaps code review SE is a better place for this. Or rewrite as MCVE. — Paul Evans just now
@PaulEvans Please don't direct code that doesn't compile to Code Review (which requires code that works as intended). — nhgrif 1 min ago
@nhgrif long time no see, how's life?
Busy, mostly.
I just double-answered this question with some TDD answers: codereview.stackexchange.com/q/120585/36366
Quite lengthy ;)
How's work? I presume you still work for that ios app company?
Well, we're not a "ios app company". We make apps for all mobile platforms... and really, we'll do whatever people hire us to do. We have non-app projects.
But yes, I still work for Metova.
16:54
I didn't want to make it sound like 'just an ios app company' ;) But that was the only thing I remembered from it.
@Duga @Mat'sMug, can you check those revisions to that question?
on it
rolled back
How long before this question is deleted: codereview.stackexchange.com/q/120519/36366 ?
I don't want to edit, because I can't edit it into on-topic... but I'm tired of seeing it in both and .
And we're down to just 18 people with delete privileges (I should be the 19th soon enough).
17:10
@nhgrif poof
yey
Ooh, Github now supports file drag & drop!
It does....
Monking.
MONKING ROLFL!!!
Yesterday, I saw a draft of a job posting that listed "GitHub credibility" as a requirement.
17:20
What's up in monkeyland?
heh, so much it hurts.
Oh really?
We're setting up a new way of doing enterprise cloud computing, and there is a lot to do.
Lots of stress, but, the up-side is that I am successfully building a system with a complete continuous delivery toolchain, with code reviews, etc. For work, this is an accomplishment.
heh heh heh...
Given that the language we are using is lacking a lot of tools that are useful for these things, it means I am building tools at the moment, so that we can build the product later.
17:24
Swift?
;)
Go.
We are still designing the system based on numbers and math, more than actual hardware, but, the numbers are staggering..... 10,000,000 CPU's in a single zone
Each machine will have huge pipes and capacity, and almost no storage.....
Holy....
This sounds really big.
What is this:
std::vector<std::string> person(people);
The person(people) part is what I don't understand.
I would expect this: std::vector<std::string> people;
or... std::vector<Person> people;
17:40
@nhgrif What language? C++?
@rolfl To Read the Full Story, Subscribe or Sign In :(
Yes.
It does look like people was previously declared as an int.
> At an annual meeting with analysts Thursday, the company said it will shift $4 billion in 2015 spending to what it calls the “strategic imperatives” of cloud, analytics, mobile, social and security technologies.
(I thought the std:: stuff would be a dead giveaway on C++)
$4 billion surely is a lot of money.
If your code seems to work, then I think codereview.stackexchange.com might be a better fit for your question. — svick 12 secs ago
17:42
@nhgrif yeah, I was just confused as Go was mentioned just a minute ago :)
@SimonForsberg context
Maybe it is calling the constructor of std::vector and passing people as argument to that?
17:54
@rolfl Out of curiousity, do you have any experience with Docker?
Some, and not good. I think we were using it for the wrong things.
Some people I work with have been talking about Docker for something.
in a positive way, I think
0
Q: Python: making a graph of lists

pvb1995I have this csv file which contains data. It is an upper triangular matrix in the case that the diagonal and all values below the diagonal are zero, the others are positive. I converted this csv file to a list of lists. Now I want to create a weighted graph: the data represents the weights. The e...

0
Q: C++ program is too slow

Rasmus TollundMy program runs too slow. I use codejudge.net to check if it is working properly. I have already improved it a lot, from what i started with, but it still doesn't cut it. #include <iostream> #include <vector> using namespace std; int main () { int n, m, checkout; char action; vector <...

The concepts are good, but the implementation of espectially the networking components, make it hard to use. The things we were trying to do, relied on the code in the container updating registration systems with IP and port number configurations....
Unfortunately, the code inside the container cannot determine it's publicly accessible IP and port numbers very easily, if at all.
There are fixes in the new versions of docker coming down the pipeline, but, for the moment, it requires a lot of changes to a lot of code, to make it work for what we are doing.
I expect we will use docker though in the next 6 months or so, when the support is in....
00:00 - 18:0018:00 - 00:00

« first day (1022 days earlier)      last day (3291 days later) »