Cocoapods Warning – CocoaPods did not set the base configuration of your project because because your project already has a custom config set

I had the same problem, but in Xcode 6.1.1 – what fixed it for me was to change the configuration file setting to None for the two Pods-related targets, then run pod install again. The configuration file setting is found by selecting the project (not the target) and then the Info tab.

Extract file basename without path and extension in bash [duplicate]

You don’t have to call the external basename command. Instead, you could use the following commands: $ s=/the/path/foo.txt $ echo “${s##*/}” foo.txt $ s=${s##*/} $ echo “${s%.txt}” foo $ echo “${s%.*}” foo Note that this solution should work in all recent (post 2004) POSIX compliant shells, (e.g. bash, dash, ksh, etc.). Source: Shell Command Language … Read more

How to map and remove nil values in Ruby

You could use compact: [1, nil, 3, nil, nil].compact => [1, 3] I’d like to remind people that if you’re getting an array containing nils as the output of a map block, and that block tries to conditionally return values, then you’ve got code smell and need to rethink your logic. For instance, if you’re … Read more

Normalize columns of a dataframe

one easy way by using Pandas: (here I want to use mean normalization) normalized_df=(df-df.mean())/df.std() to use min-max normalization: normalized_df=(df-df.min())/(df.max()-df.min()) Edit: To address some concerns, need to say that Pandas automatically applies colomn-wise function in the code above.

What is the best workaround for the WCF client `using` block issue?

Actually, although I blogged (see Luke’s answer), I think this is better than my IDisposable wrapper. Typical code: Service<IOrderService>.Use(orderService=> { orderService.PlaceOrder(request); }); (edit per comments) Since Use returns void, the easiest way to handle return values is via a captured variable: int newOrderId = 0; // need a value for definite assignment Service<IOrderService>.Use(orderService=> { newOrderId … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)