block

How can you write multiple statements in elisp 'if' statement?

In elisp, there is an 'if' case where I would like to perform many different things: (if condition (do-something) (do-something-else) ...) However, (do-something-else) is executed in the else-case only. How can you specify a block of instructions to execute? For example: (if condition (begin (do-something) ...

Discrepancy between call to statvfs and df command

When I use the statvfs command on a Linux machine to get the available free space on a mounted file system, the number I get is slightly different than what is reported by df. Is there some reason for this? For example, one on machine I have with a 500G hard drive, I get the following output from df: # df --block-size=1 --no-sync File...

Block certain html element from getting indexed by search engines

For styling purposes i want to insert some dummy text on the page, but it shouldn't be getting linked to the actual content. Is there a way to block it for search engines, or do i have to use good old images for that? Or would it be possible to load it dynamically via javascript? because i heard that google will read certain amounth of...

Idea on beginning block rewriting for top navigation of a module in magento..

Hi, I am a beginner in magento, have searched for block rewriting in google and forums,but looking for a simple and understandable example or some idea on how to rewrite block for customizing the top navigation of a module.Thanks 4 the help.. ...

How do I create a helper with block?

...

Block procedure PL/SQL with Oracle

Hello, I have a procedure and i would like that only one user could execute this procedure at same time. How i can do it? A lot of thanks! Regards Marc ...

can a variable be changed within a block - question about variable scope in block (ruby)

Hi all, Let's go to the code directly :) #!/usr/bin/ruby require 'tk' class Epg def initialize @var = "bad" @cvs = nil @items_demo = TkRoot.new() {title "EPG"} TkFrame.new(@items_demo) {|cf| @var = "good" @cvs = TkCanvas.new(cf) {|c|} puts "@cvs 1 is #{@cvs}" puts "@var 1 is #{@var}" }.pack('side'=>'top', 'fi...

Apache: Block all directories except for listed ones

I want to block people from accessing every directory except for /sandbox, /WebDev and /Projects I tried this: <Directory ^/(?<!sandbox|Projects|WebDev)+(/.*)> Order Deny,Allow Deny from all </Directory> but it gave a 500 error. ...

Ruby: obtaining number of block parameters

Hi there. I have a rather unusual use case whereby I need to be able to obtain the number of parameters a given block has been defined to take. For example... foobar(1,2,3) { |a, b, c| } def foobar(x, y, z, &block) # need to obtain number of arguments in block # which would be 3 in this example end From what I understand, this is...

Ruby instance methods from a string and a block

Is it possible to define an instance method in ruby from a string (the method name) and a block (the method's contents)? I imagine this will need to use instance_eval(), but I haven't figured out how to mix the two data types yet. Both the string and the block are dynamically determined, so it would work to create the block with the "de...

C# RichTextBox text block selection

Hi, Has anyone extended the .NET RichBextBox control to be able to select text by "block selection"? If so, care to share your code? Thanks. --Lenard ...

java & threads: interrupted exceptions & how to properly use BlockingQueue's take() method

Hi all, My first question is what exactly happens when there is nothing on the queue and a take() is called. The API says the method will wait but does that mean the CPU spins checking for empty/not empty until an item is on the queue or does it mean that the thread yields and will be awoken by an interrupt? If it is the case of the f...

java: datainputstream: do read calls take up processor time while waiting for data?

If I call read() on a DataInputStream, will it take up CPU cycles waiting for data or does it yield the current thread and get woken up by an interrupt signaling that data has arrived? My motivation for asking the question is to determine whether or not a stream reader needs to be in its own thread or not. A blocking read that takes up...

Read Block Data in Python?

Dear Sir/Madam. My name is Duc from University of Technology. I have faced a difficult problem. That is reading data file: /// * ABC Names A-06,B-18, * Data 1.727e-01, 1.258e-01, 2.724e-01, 2.599e-01,-3.266e-01,-9.425e-02,-6.213e-02, 1.479e-01, 1.219e-01, 1.174e-01, 2.213e-01, 2.875e-01,-2.306e-01,-3.900e-03,-5.269e-02, 7.420e-02, 2...

Internet Explorer Blocked download file

i use jquery post function to go to server and bring the link to file download. when the func come back and return the link, i try to open a popup or iframe with link source , to popup save/open file window i try this window.open(data.link,'Download','top=20,width=3,height=3,left=20'); or document.getElementById('download').src=...

What this mean? .. can you help ???

My site got harmed by this site " spywarepc.info " ..don't even know what is this ? My site has been blocked by google ..? please help me out from this ..is it a malware ? ..if that how will i recover it ? ...

Block/Nullify mouse movement/click in C#

Hi, I'm writing an application to fully control the mouse click/movement. What I mean is that say for instance, if I have the application running, form fully transparent, fullscreen, then if I click the mouse button, in normal case, it will bring the application in background in focus - I need to stop this from happening (i.e. clicking ...

CopyBlock tag for Django

How can write tag "copyblock" for Django templates? For such a functional:: <title> {% block title %} some title... {% endblock %} </title> <h1>{% copyblock title %}</h1> Thx! ...

Drupal: Access $profile from a block

I'm trying to get the avatar (profile picture) located in the $profile array to appear in a BLOCK. The variable $profile is not accessible from blocks. It's scope is only in that actual user-profile.tpl.php file. So... does anybody know how I can execute something like this: print $profile[user_picture]; in a drupal BLOCK? ...

In CAB is a service it's own module?

I'm learning Composite Application Block and I've hit a rock about services. I have my shell application in its own solution, and of course a test module in its own solution (developed and testing completely independent and external of the shell solution). If I created a service named "Sql Service", would I need to put this in it's own l...