循环遍历每个键空间并获取表名

时间:2016-09-16 17:36:53

标签: linux bash shell sh cql

我写了下面的代码,我正在尝试遍历每个Key空间并获得表格。有人可以帮我解决这个问题。

function demo

fig = 100;
figure(fig), close, figure(fig)  % ensure virgin figure
img = image;
EnableDataCursor(img)



function EnableDataCursor(img)

ax = get(img, 'parent');
fig = get(ax, 'parent');
dcm = datacursormode(fig);
datacursormode(fig, 'on')

set(dcm, 'UpdateFcn', @CursorModeCallback)
setappdata(img, 'CursorModeObject', dcm);
setappdata(img, 'Timer', timer('StartDelay', 0.010, 'TimerFcn', @TimerCallback));
setappdata(img, 'LastText', 'Initial text');



function txt = CursorModeCallback(cbo, event)

img = get(event, 'Target');
t = getappdata(img, 'Timer');
if strcmp(get(t, 'Running'), 'off') % If we have already asked for an updated tooltip and haven't got one yet then don't ask for another one
    txt = 'updating...';
    set(t, 'UserData', {cbo, event}); % Store the data needed by the slow callback to generate the tooltip
    start(t); % Ask the timer to generate new text
else
    txt = getappdata(img, 'LastText'); % Display the most recently generated text in the tooltip
end



function TimerCallback(t, varargin)

ud = get(t, 'UserData');
[cbo, event] = deal(ud{:});
img = get(event, 'Target');

pause(1) % numbercrunch, numbercrunch, numbercrunch

txt = num2str(get(event, 'Position'));
if ~isequal(txt, getappdata(img, 'LastText'))
    setappdata(img, 'LastText', txt); % Store the latest text
    updateDataCursors(getappdata(img, 'CursorModeObject')); % Update the cursor so the text is displayed
end

0 个答案:

没有答案