dpkg -l
# you can alternatively search for packages using the following
dpkg -l | grep [enter_search_term_here]
# or if you like shortcuts, here is one that you can put in ~/.bashrc or ~/.bash_profile
# instead type in dpkg ... you can use : find_package "name_of_package"
find_package () { dpkg -l | grep "$1"; }
function addElement() {
var ni = document.getElementById('');
var divIdName = '';
var newdiv = document.createElement('div');
newdiv.setAttribute('id',divIdName);
newdiv.innerHTML = '';
ni.appendChild(newdiv);
}
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Insert Image</string>
<key>uuid</key>
<string>B1EB3F7A-2989-4E32-A892-83013991F175</string>
<key>input</key>
<string>none</string>
<key>output</key>
<string>afterSelectedText</string>
<key>command</key>
<string>#!/usr/bin/env ruby
abort unless ENV[&apos;TM_PROJECT_DIRECTORY&apos;] &amp;&amp; ENV[&apos;TM_FILEPATH&apos;]
SUPPORT = ENV[&apos;TM_SUPPORT_PATH&apos;]
DIALOG = SUPPORT + &apos;/bin/CocoaDialog.exe&apos;
require &apos;pathname&apos;
require &apos;find&apos;
images = []
menu = []
# Find all images within a project and stuff them into
# an array (images) of hashes.
Find.find(ENV[&apos;TM_PROJECT_DIRECTORY&apos;]) do |f|
file_name = File.basename(f)
if /\.(gif|jpg|png)$/ =~ file_name
images &lt;&lt; {
:title =&gt; file_name,
:path =&gt; Pathname.new(f).relative_path_from(Pathname.new(ENV[&apos;TM_FILEPATH&apos;]).parent).to_s
}
end
end
abort if images.empty?
images = images.sort_by { |image| image[:title] }
# If there are less than 10 images within a project, use
# a popup menu; otherwise, use a dropdown.
if images.length &lt; 10 then
images.each_with_index do |image, i|
menu &lt;&lt; %(&quot;&amp;#{i+1} #{image[:title]}&quot; )
end
selected = `\&quot;#{DIALOG}\&quot; menu --items #{menu}`.to_i - 1
else
images.each do |image|
menu &lt;&lt; %(&quot;#{image[:title]}&quot; )
end
text = %{--text &quot;Choose an image&quot;}
button1 = %{--button1 &quot;Cancel&quot;}
button2 = %{--button2 &quot;Select Image&quot;}
result = `\&quot;#{DIALOG}\&quot; dropdown #{button2} #{button1} #{text} --items #{menu}`.split(&quot;\n&quot;)
abort if result[0].to_i == 1
selected = result[1].to_i
end
print %{url(#{images[selected][:path]})}
</string>
<key>keyEquivalent</key>
<string>@I</string>
<key>scope</key>
<string>source.css</string>
<key>beforeRunningCommand</key>
<string>saveActiveFile</string>
</dict>
</plist>
- (BOOL)canBecomeKeyWindow;
- (BOOL)canBecomeMainWindow;
- (BOOL)acceptsFirstResponder;
of NSView:
- (BOOL)shouldDelayWindowOrderingForEvent:(NSEvent *)theEvent;
and the style mask during the initialization:
styleMask:(� your app specific other flags� | NSNonactivatingPanelMask)