Posts

html - Trapezium span with CSS -

is there way draw trapezium span thing text in it? doesn't matter if corners rounded, in fact, i'd prefer if were. i know how make oval/circle border-radius , i'm stuck on trapezium. please! i did pure css using pseudo-elements , skew css property support border-radius : demo on dabblet.com http://img135.imageshack.us/img135/9683/eedea21cb3bc438fb33c80c.png html: <span>trapezium</span> css: span { display: block; z-index: 1; position: relative; /* custom sizes */ width: 200px; height: 50px; } span:before, span:after { content: ''; position: absolute; top: 0; left: 0; width: 100%; bottom: 0; z-index: -1; } span:before { transform: skew(25deg); left: 25px; } span:after { transform: skew(-25deg); right: 25px; left: auto; } upd: demo without pseudo-elements

winapi - 2D graph drawing in windows with unmanaged code callable from excel -

i want able input list of nodes excel spreadsheet , pop zoomable window graph of nodes. requirements are: graph quite large (typically 40+ nodes, 200+ edges). project distributed minimum of dependencies. project run in minimum privilege environment. zooming , scaling of rendered graph "smooth". targeting win7 / vista sp2. i know how build layout of graph unsure of best way render it. need render comes down list of cubic splines , rectangles. i leaning away using excel shapes or drawings using vb6/userform performance reasons. my current plan build render code dll (coded in c or c++) shipped spreadsheet , lives in same folder, calling dll , marshalling data no problem. the bit unsure of best technology use in dll render graph. options see them are: 1. gdi 2. gdi+ 3. direct2d 4. direct3d my understanding in latest version of windows gdi , gdi plus un-accelerated , relativity slow. direct2d appears needlessly complicated. direct3d appears in principal easier direct...

HTML : play a video inside an image -

i'm trying play video inside png image of tv tv serves frame video. i tried that, pushes tv image , plays video underneath. <img class="tv" src="images/tv.png" alt="tv"> <video width="320" height="240"> <source src="video/video.mp4" type="video/mp4" /> </video> </img> can me finding way in there ? because i'm sure there easy solution, don't know look. thank ! first of all, can't use <img> way, because it's element can't contain other elements. all have put image background div , display video correct position: <div id="tv_container"> <video width="320" height="240"> <source src="video/video.mp4" type="video/mp4" /> </video> </div> <style> #tv_container { background: url('images/tv.png') no-repeat top left tran...

Can't figure out how to fix a word replace javascript -

i want change words on page below script. m not sure how fix ... can help? http://jsfiddle.net/cip691/yums7/ var dict = { "not": " not ", "is not": " not ", "like": " likeeee ", "like": "lllike", "job": "job" }, terms = [], term; (term in dict) { terms.push(term); var search = new regexp('\\b(' + terms.join('|') + ')\\b', 'g'); }; // every text node: textnode.data = textnode.data.replace(search, function(full, match) { return dict[match] || match; });​ you should define textnode like in example link example <head> <script type="text/javascript"> function gettextnode () { var textcontainer = document.getelementbyid ("textcontainer"); var textnode = textcontainer.firstchild; alert (textnode.data); } ...

android - Set ImageView layout_gravity programmatically -

i need position imageview element on right side of framelayout element of it's child. here's i've done far: framelayout parentlayout; imageview checkimage = new imageview(anchor.getcontext()); linearlayout.layoutparams params = new linearlayout.layoutparams(layoutparams.wrap_content, layoutparams.wrap_content); params.weight = 1.0f; params.gravity= 5; checkimage.setlayoutparams(params); checkimage.setimagedrawable(anchor.getcontext().getresources().getdrawable(r.drawable.checkpoint)); parentlayout.addview(checkimage); <framelayout android:layout_width="match_parent" android:layout_height="wrap_content" > <button android:id="@+id/popular_type" android:layout_width="200dp" android:layout_height="wrap_content" android:background="@android:color/transparent" android:gravity="left" android:paddingbottom="10dp" ...

ruby - Watir-WebDriver won't work when hosts file redirects localhost -

hello i'am using windows 7 , wish use watir-webdriver ruby 1.9.2. please tell me why this: c:\>irb irb(main):001:0> require "watir-webdriver" => true irb(main):002:0> browser = watir::browser.new :ff errno::eaddrnotavail: ??dany adres jest nieprawid?owy w tym kontek?cie. - bind(2 ) c:/ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.22.0/lib/s elenium/webdriver/firefox/socket_lock.rb:45:in `initialize' c:/ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.22.0/lib/s elenium/webdriver/firefox/socket_lock.rb:45:in `new' c:/ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.22.0/lib/s elenium/webdriver/firefox/socket_lock.rb:45:in `can_lock?' c:/ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.22.0/lib/s elenium/webdriver/firefox/socket_lock.rb:31:in `lock' c:/ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.22.0/lib/s elenium/webdriver/firefox/socket_lock.rb:17:in `locked'...

Compile protobuf-2.4.1 code on NDK, version (android-ndk-r8-windows.) -

hi trying compile protobuf-2.4.1 code on ndk version (android-ndk-r8-windows.) i have set below: prebuilt=/cygdrive/d/d_drive/project/pr/ccore/code/ndk/android-ndk-r8-windows/android-ndk-r8/toolchains/arm-linux-androideabi-4.4.3 platform=/cygdrive/d/d_drive/project/pr/ccore/code/ndk/android-ndk-r8-windows/android-ndk-r8/platforms/android-4/arch-arm/ export cc="/cygdrive/d/d_drive/project/pr/ccore/code/ndk/android-ndk-r8-windows/android-ndk-r8/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/bin/arm-linux-androideabi-gcc" export cflags="-fpic -dandroid -nostdlib" export android_root="/cygdrive/d/d_drive/project/pr/ccore/code/ndk/android-ndk-r8-windows/android-ndk-r8" export ldflags="-wl,-rpath-link=$android_root/platforms/android-4/arch-arm/usr/lib/ -l$android_root/platforms/android-4/arch-arm/usr/lib/" export cppflags="-i$android_root/platforms/android-4/arch-arm/usr/include/" cppflags="-i$android_root/platfor...