Top "Block" questions

DO NOT USE This tag is scheduled for removal because it can refer to many different things depending on the use of other tags with it.

Ruby block, procs and instance_eval

I recently tried to do something akin to this: a = "some string" b = Proc.new{ upcase } a.instance_eval b …

ruby block lambda proc-object
How to stop enumerateObjectsUsingBlock Swift

How do I stop a block enumeration? myArray.enumerateObjectsUsingBlock( { object, index, stop in //how do I stop the enumeration in …

objective-c nsarray block swift enumeration
if/else format within while loop

while(true) { cout << "Name: "; getline(cin, Name); if(Name == "Stop") break; cout << "Additional Name - Y/…

c++ block if-statement braces
How to block signals in C?

I'm trying to create a program that blocks the signal SIGUSR1 and the it unblocks the signal. In the middle …

c linux signals block sigprocmask
Confusion about the lock statement in C#

This is from MSDN: The lock keyword ensures that one thread does not enter a critical section of code while …

c# multithreading locking block critical-section
Append to site <title> in Django template using block.super

I have 3 Django templates: base.html <title>{% block title %} SITE NAME {% endblock %}</title> default.html {% extends "…

django block super
Magento Grid Container Block not loading grid

I just set up an admin module with a grid view using the module creator, and it works great, but …

magento grid block adminhtml
Are there better ways to prevent 'yield' when no block is passed in?

I have a method that yields, which looks like: def a_method(*params) # do something yield # do something else end …

ruby block yield
Set maximum block height and trim content

I have a table in an XSL-FO document and in a cell there's an article description, which can easily overflow …

block xsl-fo
What is the purpose of using blocks

I want to use blocks in my application, but I don't really know anything about blocks. Can anyone explain how …

objective-c cocoa-touch block objective-c-blocks