menü

Alumni Blogs

Lots of our people have lots of opinions. Here are just a few of them

ThoughtWorks embraces the individuality of the people in the organization and hence the opinions expressed in the blogs may contradict each other and also may not represent the opinions of ThoughtWorks.

How to add navigation items to the Navigation Bar iOS

When you embed your root viewController into a NavigationController, your sub ViewControllers automatically get a title bar. But they don’t get any Nav bar items. To add something like a Welcome button for back navigation drag out a Navigation Item And drop it into the middle of the navbar. Same for a button. Only a […]

JR
16 July 2018

Original Link

How to change which ViewController loads at startup in Storyboard

You can drag around the little arrow from one VC to the other. Or your can select the little checkbox in the menu titled ‘Is Initial View Controller’ near the top on the right hand side. Advertisements

JR
16 July 2018

Original Link

When to use Optionals in Swift

Being new to Optionals, sometimes I struggle for good examples on where and when to use them. Here’s an example I link that show how one could use an Optional to model an AccountBalance. Both the ledger and overdraftLimit are let’s (meaning once assigned they can’t be changed). But the overdraftLimit is also an Optional […]

JR
16 July 2018

Original Link

Render An ERB Template With A Hash Of Values

ERB is a most commonly used for rendering HTML in Rails applications, but it can also easily be used to render any text document.

require 'erb'
value = 42
ERB.new('Value: ').result(binding) # "Value: 42"

Binding is a rather strange interface to be passing into a method call - since I was rendering templates from within a rake task I really just wanted to pass a hash of values. It turns out ERB recently introduced this functionality in Ruby 2.5, but since I’m not on the latest version I had…

Jaco Pretorius
13 July 2018

Original Link

Another Graphic for Technology Compatibility Kits (TCKs)

Related to (or a sub-part/refinement of) “contract testing”, that I periodically highlight:



Wire mocks are officially “service virtualization” (SV) of course. The TCK idea is a specific usage of them, originally to allow alternate implementations. Vendors making services (on the internet or installable on-prem or cloud) should make a TCK, too. They may want to include a “no reverse-engineering” clause for licensees of the TCK so they don’t make it too easy for their competitors. Lawsuits of note:

  1. Real Estate Title Insurer, Amrock, owes $706M after lawsuit
  2. SAS Institute Inc v World Programming Ltd: $80M settlement
  3. Oracle vs. Google on

Paul Hammant's blog
13 July 2018

Original Link

The International E-road Network and Neo4j

I was having fun recently with some E-road data that I found. E-roads are highly intuitive for spatial/ graph-y stuff: you will be on one regularly, and they will lead you to Rome, eventually. Or Aarhus. And because it is graph-y and spatial at the same time, it is obvious to try some shortest path queries on it, which Neo4j has built-in. Think route planning.

This particular dataset has 895 reference places and 1250 sections of road between them. Roads have a distance attribute, which will come in handy. And there is some more metadata to play with…

LasseWesth
12 July 2018

Original Link

Problema para logar com o Kindle Keyboard?

Em 2010 eu fiz a aquisição de um Kindle Keyboard (3a geração). O fato de poder transicionar da minha biblioteca física para livros eletrônicos era fascinante. Eu venho transformando minha biblioteca de livros desde então. Ao todo são +40 livros que já deixaram de existir na minha biblioteca física para fazer parte da minha coleção … Continue a ler Problema para logar com o Kindle Keyboard?

dwildt
10 July 2018

Original Link

火爆微信群等各大媒体的Coince 交易所,将是熊市中下一个百倍币?

火爆微信群等各大媒体的Coince 交易所,将是熊市中下一个百倍币? 随着年初一大波牛市之后,币圈之后的路子便 […]

笑捧博客
5 July 2018

Original Link

揭开神秘面纱的CBTX,能否成为下一个百倍币

揭开神秘面纱的CBTX,能否成为下一个百倍币 事实上,自从进入币圈以来,不管出现了多少造富神话,一支“百倍币” […]

笑捧博客
5 July 2018

Original Link

How to draw icons illustrator

Say you want to try an icon that looks something like this They first thing to realize is that this is just a series of geometric shapes – circles and lines. So we can start by simply drawing a circle Cut it in half with scissors by clicking on the dots Round the caps (Window […]

JR
30 June 2018

Original Link

深圳平显光电设备有限公司怎么样

深圳平显光电设备有限公司怎么样 笑捧有一段时间没有更新了,今天维护一下,投稿箱收到网友的投稿,在这里和大家分享 […]

笑捧博客
28 June 2018

Original Link

Three Distinct Mind-sets in TDD

I have blogged about TDD before. I think that it is one of the most important tools in improving the design of our software, as well as increasing the quality of the systems that we create. TDD provides valuable, fine-grained … Continue reading

davef
27 June 2018

Original Link

How to add a custom UITableViewCell Swift

Create a new UITableViewCell in Swift (with nib) Give it a unique identifier Load it up in your ViewController Then access it in your UITableView delegate methods like this Give your cell a default height in the ViewController else you will get a warning Advertisements

JR
24 June 2018

Original Link

How to hookup UITableView Swift

Implement the protocols, get a reference to the tableView in the VC, and set yourself as the x2 delegates. Then implement these x2 methods Give your prototype cell a reuse identifier

JR
24 June 2018

Original Link

以纯华昊二厂

以纯华昊二厂 今天一个群友投稿说以纯分厂太黑了,说道这里,笑捧心里就不爽了,以前特别喜欢以纯的衣服,个人感觉上 […]

笑捧博客
22 June 2018

Original Link

How To Specify The Version Of A Gem To Use From The Command-Line

Sometimes you have multiple versions of a gem installed.

$ gem list | ag "^rails "
rails (5.2.0, 5.0.7, 5.0.6)

But when I invoke the gem executable the latest version is always used.

$ rails -v
Rails 5.2.0

So how do you specify the version of the gem to use? You use _underscores_.

$ rails _5.0.7_ -v
Rails 5.0.7

This doesn’t seem to be documented anywhere, but luckily we have StackOverflow.

Jaco Pretorius
19 June 2018

Original Link

A Silly JavaScript Interview Question

Here’s the question, which I found in a thread on Hacker News.

Explain this behavior:

['1','1','1'].map(parseInt) returns [1, NaN, 1]
['1','1','1'].map(n => parseInt(n)) returns [1, 1, 1]

Obviously this is a completely ridiculous question and I would seriously question why anyone would ask this during an interview. But that doesn’t mean we can’t have fun trying to find the answer.

I was stumped at first, especially when I tried playing with the input:

['2','2','2'].map(parseInt)
-> [2, NaN, NaN]

Ok, so let’s try to understand what…

Jaco Pretorius
16 June 2018

Original Link

安徽加诺格科技有限公司怎么样?

安徽加诺格科技有限公司怎么样? 很多大学生都想利用空余的时间挣一点钱,那么安徽加诺格科技有限公司怎么样?近日网 […]

笑捧博客
15 June 2018

Original Link

上海索昕商务信息咨询有限公司怎么样

上海索昕商务信息咨询有限公司怎么样 高考完有一段时间了,毕业季来临,各大骗子团伙也开始蠢蠢欲动,在这里给大家泼 […]

笑捧博客
15 June 2018

Original Link

TLDR Pages

I colleague recently introduced me to tldr-pages, a community-driven and greatly simplified collection of man pages.

While man pages can be very useful I often just need a simple example of how to use a unix tool. For example, for some reason I always get confused by the syntax for find since it’s so different to grep (which I use all the time).

Here is the first explained option in man find.

The find utility recursively descends the directory tree for each path listed, evaluating an expression (composed of the ‘‘primaries’’ and ‘‘operands’’ listed below) in terms of…

Jaco Pretorius
13 June 2018

Original Link