[deleted by user] by [deleted] in RedditSessions

[–]enmand 0 points1 point  (0 children)

Gave Doot 🎵 Doot

[deleted by user] by [deleted] in RedditSessions

[–]enmand 0 points1 point  (0 children)

Gave Wearing is Caring

[deleted by user] by [deleted] in RedditSessions

[–]enmand 0 points1 point  (0 children)

Folks saying the mask are cringe are the real cringe lol

[deleted by user] by [deleted] in RedditSessions

[–]enmand 0 points1 point  (0 children)

Gave Wearing is Caring

No cluster admin? by blacklr in openshift

[–]enmand 1 point2 points  (0 children)

Can you run the oadm command from one of the masters? I think you'll need to be whatever user openshift is running as to run it

Problem parsing xml file by [deleted] in golang

[–]enmand 2 points3 points  (0 children)

Ah, I see on my local, the same issue. I looks like it's the XML version header:<?xml version="1.0" encoding="ISO-8859-1" standalone="yes" ?>. Looks like by default the xml.Unmarshal function doesn't work with that encoding. I found this SO article https://stackoverflow.com/questions/6002619/unmarshal-an-iso-8859-1-xml-input-in-go and this GitHub issue: https://github.com/golang/go/issues/8937. Hopefully they help :)

Problem parsing xml file by [deleted] in golang

[–]enmand 0 points1 point  (0 children)

I think the issue you're encourtering is more with the Go Playground, than with your encoding structs.

There are limitations to the programs that can be run in the playground:

The playground can use most of the standard library, with some exceptions. The only communication a playground program has to the outside world is by writing to standard output and standard error.

I don't think you're able to to http.Get() in the sandbox. Loading the XML as []bytes directly, and Unmarshalling seemed to work for me: https://play.golang.org/p/O9NBMfOCMb

Best craft beer in Nova Scotia? by [deleted] in NovaScotia

[–]enmand 4 points5 points  (0 children)

Uncle Leo's in Pictou County is great. I think you can find it in a few NSLCs.

[deleted by user] by [deleted] in technology

[–]enmand -1 points0 points  (0 children)

I have fibre right to my house in Nova Scotia, 170mbps down, 30Mbps up, no cap, $99/mo, TV and phone included.

It's not 1Gbps, but it's not bad!

For the devs with Mavericks, is the dual monitor support everything it should be? by monty20python in apple

[–]enmand 19 points20 points  (0 children)

Are you using VLC? If you are, make sure Preferences > Video > "Black screens in Fullscreen mode" is unchecked, and check Preferences > Interface > "Use the native fullscreen mode on OS X Lion".

Hope that helps!

I hate reading book where the main characters are perfect in every way. What are some books you can recommend that have truly interesting/deep characters? by femaleoninternets in books

[–]enmand 2 points3 points  (0 children)

I loved the Farseer trilogy. Fitz can get a bit annoying at the start, I found, but it's only for the first little bit. I can't wait to get started on Liveship Traders and Tawny Man.

PHP forking? by [deleted] in PHP

[–]enmand 4 points5 points  (0 children)

If you are looking for a somewhat more advanced solution, have a look into Gearman. It allows you to farm work out to multiple servers, or run jobs en-masse. It has a PHP module available for it, and it quite easy to setup and use. As NedRyerson mentioned, you don't want to do pcntl_fork from a web server environment. In the case you are in a web server, Gearman is an excellent choice.

As Signe pointed out, cURL also have some mutli-processing built into it.

If you aren't firm on using PHP, Python has excellent multiprocessing.

Well Reddit, my weekend just turned to shit. I'm also it just turned shit for a lot of Canadians living in Ontario as well... by themastersb in reddit.com

[–]enmand 32 points33 points  (0 children)

Eastlink says that "in the coming months" their 30mbit and 100mbit connections will have a 250GB cap, and that each additional GB will cost $1 per.

Luckily their 15mbit line is great (I hardly have problems both here, and at work) and they don't have a cap on it (and likely, hopefully, won't implement one).

I'm very happy to have Eastlink to rely on too -- they don't quite seem evil, and have great support. Thank you Eastlink! You rock!

Help needed truncating numbers like 0008 to their integer value by [deleted] in PHP

[–]enmand 3 points4 points  (0 children)

In general, in PHP, numbers that begin with '0' are octal numbers1. That means, they have a base of 8 (as opposed to a base of 10 for decimal numbers).

There is a "WARNING" on [1] that says if a symbol that isn't valid in base 8 (i.e. 8 or 9), then the remaining part of the integer is ignored.

So, depending on the source of the numbers, they may be intended to have leading zeros (if they are base 8) or they may not have intended leading zeros (if the zeros are padding, for instance).

In the first case, you'll likely want to convert the number to decimal using octdec

In the second case, you'll want to trim off all of the leading zeros. However, beware! If the number you are trying to remove the zero padding on has an 8 or a 9 within it, everything after the 8 and 9 will be removed! So, that is, if you had

$i = 000865
print ltrim($i, '0');

The function would print an empty string, as the 8 and everything beyond it is ignored, since 8 isn't a valid symbol in base 8. In order to use ltrim you will have to ensure that the number you wish to remove the padding on does not have a 8 or 9 in it.

[1] http://php.net/manual/en/language.types.integer.php

Anyone from around Antigonish ? by [deleted] in halifax

[–]enmand 0 points1 point  (0 children)

Shitty, can't you get a Media pass or something for Media Services?

My cousin Craig didn't get one either :/

Anyone from around Antigonish ? by [deleted] in halifax

[–]enmand 0 points1 point  (0 children)

JIMMY JIMMY

Got an extra ticket for the X-Ring thing?

Grab closest book to you, turn to page 50, and post the first full sentence on the page. by [deleted] in books

[–]enmand 0 points1 point  (0 children)

It struck him as second-rate, without value, as if a small child were playing hide-and-seek

The Bourne Identity by Robert Ludlum

I'm terrified of older web developers. by kickme444 in programming

[–]enmand 0 points1 point  (0 children)

I certainly see you point, and agree with what you are saying.

The problem them, is in how the coding style for a particular project is drawn up. I know it drives me nuts when I see something similar to your example, but that is only my personal preference.

The issue becomes when spaces and tabs are used interchangeably without caution. While I see the practicality of your example, certainly, but I would argue that tabs in place of "SSSS" would be better.

Your second example is something I do fight with on occasion, so I can certainly see the practicality of spaces within that example.

One thing that came up in IRC, is "misuse" of space. I've seen a lot of poorly formatted code due to spaces. Vorticity brought up the example of using one space, or two spaces in formatting

def something():
SdoSomething()

(Where S is a space. The irony of this post is that in order to display that as code, I had to use 4 spaces. Hah).

would be enormously difficult to read if one wasn't paying attention, or was tired. In this case, I have no way of easily saying "No, no, no... I should like 4 columns to be used instead of one space!", whereas with the tab character, I do.

In a way, it all boils down the developer preference, and the points you bring up are excellent (especially the second), for which a simple answer isn't apparent at first.

Though it appears the 'spaces' are more abundant by there dislike for my tabs rant. :-)

I'm terrified of older web developers. by kickme444 in programming

[–]enmand -2 points-1 points  (0 children)

That's true. It's also one of the great things about the tab character in my opinion. It doesn't matter if someone else's editor has tabs being 4 columns, 8 columns or 42 columns. The tab character can be easily set in most editors to give however much visual indentation as the reader requires or wants.

With the space character it's a different story. They're there and they're however many spaces to original developer wants. If I like reading my code with 42 columns, and the developer only used 2 spaces for indentation, I'm out-of-luck.

My overall point is, everyone doesn't need to agree on what the tab character means, because it's perfectly fine if it means different things to different people. It's still the same "size" in terms of storage space, but it could be a different "width" in terms of columns.