Search Results

Search found 4489 results on 180 pages for 'black cobra'.

Page 46/180 | < Previous Page | 42 43 44 45 46 47 48 49 50 51 52 53  | Next Page >

  • Custom Tag implementation issue

    - by Appps
    I have a custom tag as follows. repeat and heading tag have doAfterBody method implemented. <csajsp:repeat reps="5"> <LI> <csajsp:heading bgColor="BLACK"> White on Black Heading </csajsp:heading> </LI> </csajsp:repeat> /* Repeat tag Class*/ public void setReps(String repeats) { System.out.println("TESTING"+repeats); //sets the reps variable. } public int doAfterBody() { System.out.println("Inside repeate tag"+reps); if (reps-- >= 1) { BodyContent body = getBodyContent(); try { JspWriter out = body.getEnclosingWriter(); System.out.println("BODY"+body.getString()); out.println(body.getString()); body.clearBody(); // Clear for next evaluation } catch(IOException ioe) { System.out.println("Error in RepeatTag: " + ioe); } return(EVAL_BODY_TAG); } else { return(SKIP_BODY); } } /* Class of Heading tag */ public int doAfterBody() { System.out.println("inside heading tag"); BodyContent body = getBodyContent(); System.out.println(body.getString()); try { JspWriter out = body.getEnclosingWriter(); out.print("NEW TEXT"); } catch(IOException ioe) { System.out.println("Error in FilterTag: " + ioe); } // SKIP_BODY means I'm done. If I wanted to evaluate // and handle the body again, I'd return EVAL_BODY_TAG. return(SKIP_BODY); } public int doEndTag() { try { JspWriter out = pageContext.getOut(); out.print("NEW TEXT 2"); } catch(IOException ioe) { System.out.println("Error in HeadingTag: " + ioe); } return(EVAL_PAGE); // Continue with rest of JSP page } The order in which SOP are printed is 1) Setter method of csajsp:repeat is called. 2) White on Black Heading is printed. ie doAfterBody of csajsp:heading tag is called. I don't know why it is not calling doAfterBody of csajsp:repeat tag. Please help me to understand this. Thanks in advance.

    Read the article

  • WPF performance for large number of elements on the screen

    - by Mark
    Im currently trying to create a Scene in WPF where I have around 250 controls on my screen and the user can Pan and Zoom in and out of these controls using the mouse. I have run the WPF Performance Suite tools on the application when there are a large number of these controls on the screen (i.e. when the user has zoomed right out) the FPS drops down to around 15 which is not very good. Here is the basic outline of the XAML: <Window> <Window.Resources> <ControlTemplate x:Key="LandTemplate" TargetType="{x:Type local:LandControl}"> <Canvas> <Path Fill="White" Stretch="Fill" Stroke="Black" StrokeThickness="1" Width="55.5" Height="74.687" Data="M0.5,0.5 L55,0.5 L55,74.187 L0.5,74.187 z"/> <Canvas x:Name="DetailLevelCanvas" Width="24.5" Height="21" Canvas.Left="15.306" Canvas.Top="23.972"> <TextBlock Width="21" Height="14" Text="712" TextWrapping="Wrap" Foreground="Black"/> <TextBlock Width="17.5" Height="7" Canvas.Left="7" Canvas.Top="14" Text="614m2" TextWrapping="Wrap" FontSize="5.333" Foreground="Black"/> </Canvas> </Canvas> </ControlTemplate> </Window.Resources> ... <local:LandControl Width="55.5" Height="74.552" Canvas.Top="xxx" Template=" {StaticResource LandTemplate}" RenderTransformOrigin="0.5,0.5" Canvas.Left="xxx"> <local:LandControl Width="55.5" Height="74.552" Canvas.Top="xxx" Template=" {StaticResource LandTemplate}" RenderTransformOrigin="0.5,0.5" Canvas.Left="xxx"> <local:LandControl Width="55.5" Height="74.552" Canvas.Top="xxx" Template=" {StaticResource LandTemplate}" RenderTransformOrigin="0.5,0.5" Canvas.Left="xxx"> <local:LandControl Width="55.5" Height="74.552" Canvas.Top="xxx" Template=" {StaticResource LandTemplate}" RenderTransformOrigin="0.5,0.5" Canvas.Left="xxx"> ... and so on... </Window> Ive tried to minimise the details in the control template and I even did a massive find and replace of the controls to just put their raw elements inline instead of using a template, but with no noticeable performance improvements. I have seen other SO questions about this and people say to do custom drawing, but I dont really see how that make sense when you have to zoom and pan like I do. If anyone can help out here, that would be great! Mark

    Read the article

  • Tag/Keyword based recommendation

    - by Hellnar
    Hello I am wondering what algorithm would be clever to use for a tag driven e-commerce enviroment: Each item has several tags. IE: Item name: "Metallica - Black Album CD", Tags: "metallica", "black-album", "rock", "music" Each user has several tags and friends(other users) bound to them. IE: Username: "testguy", Interests: "python", "rock", "metal", "computer-science" Friends: "testguy2", "testguy3" I need to generate recommendations to such users by checking their interest tags and generating recommendations in a sophisticated way. Ideas: A Hybrid recommendation algorithm can be used as each user has friends.(mixture of collaborative + context based recommendations). Maybe using user tags, similar users (peers) can be found to generate recommendations. Maybe directly matching tags between users and items via tags. Any suggestion is welcome. Any python based library is also welcome as I will be doing this experimental engine on python language.

    Read the article

  • Regex pattern for searches with include and exclude

    - by alex-kravchenko-zmeyp
    I am working on a Regex pattern for searches that should allow optional '+' sign to include in the search and '-' sign to exclude from the search. For example: +apple orange -peach should search for apples and oranges and not for peaches. Also the pattern should allow for phrases in double quotes mixed with single words, for example: "red apple" -"black grape" +orange - you get the idea, same as most of the internet searches. So I am running 2 regular expressions, first to pick all the negatives, which is simple because '-' is required: (?<=[\-]"?)((?<=")(?<exclude>[^"]+)|(?<exclude>[^\s,\+\-"]+)) And second to pick positives, and it is a little more complex because '+' is optional: ((?<=[\+\s]")(?<include>[^\s"\+\-][^"]+))|(?<include>(?<![\-\w]"?)([\w][^,\s\-\+]+))(?<!") Positive search is where I am having a problem, it works fine when I run it in RegexBuddy but when I try in .Net the pattern picks up second word from negative criteria, for example in -"black grape" it picks up word 'grape' even though it ends with double quote. Any suggestions?

    Read the article

  • This code changes the textbox instantly to red. I want it like, click button then red, again then green

    - by user1803685
    This code changes the textbox instantly to red. I want it like, click button then red, again then green. private void button1_Click(object sender, EventArgs e) { textBox1.BackColor = System.Drawing.Color.Black; if (textBox1.BackColor.Equals(System.Drawing.Color.Black)) { textBox1.BackColor = System.Drawing.Color.Red; } if (textBox1.BackColor.Equals(System.Drawing.Color.Red)) { textBox1.BackColor = System.Drawing.Color.Green; } if (textBox1.BackColor.Equals(System.Drawing.Color.Green)) { textBox1.BackColor = System.Drawing.Color.Blue; } if (textBox1.BackColor.Equals(System.Drawing.Color.Blue)) { textBox1.BackColor = System.Drawing.Color.Red; } }

    Read the article

  • Linux Kernel - Slab Allocator Question

    - by Drex
    I am playing around with the kernel and am looking at the kmem_cache files_cachep belonging to fork.c. It detects the sizeof(files_struct). My question is this: I have altered files_struct and added a rb_root (red/black tree root) using the built-in functionality in linux/rbtree.h. I can properly insert values into this tree. However, at some point, a segfault occurs and GDB backtraces the following information: (gdb) backtrace 0 0x08066ad7 in page_ok (page=) at arch/um/os-Linux/sys-i386/task_size.c:31 1 0x08066bdf in os_get_top_address () at arch/um/os-Linux/sys-i386/task_size.c:100 2 0x0804a216 in linux_main (argc=1, argv=0xbfb05f14) at arch/um/kernel/um_arch.c:277 3 0x0804acdc in main (argc=1, argv=0xbfb05f14, envp=0xbfb05f1c) at arch/um/os-Linux/main.c:150 I have spent many hours trying to figure out why there is a segfault given that the red/black tree inserts properly. I'm thinking it's a memory allocation issue with new processes made by fork() of a parent process. Could this be the case and could it have something to do with kmem_cache files_cachep?

    Read the article

  • Override transparency color when converting transparent PNG to JPG

    - by Alexander Malfait
    I'm using Dragonfly to generate thumbnail images in a Rails app. I'm serving all picture images as JPG's. Now the client is uploading transparent PNG files, like this one: http://www.ibanez.co.jp/products/images/eg2010/ART120_TRF_12_02.png Dragonfly uses RMagick to convert these images to JPG. The problem is that it converts the PNG images to JPG with a black background, and my site's design requires a white background. I've tried to override it like this: encoded_image = Magick::Image.from_blob(image.data).first if encoded_image.format.downcase == format image # do nothing else encoded_image.format = format encoded_image.background_color = "white" encoded_image.transparent_color = "white" encoded_image.to_blob end But the produced JPG images still contain a black background. Does anyone know how to beat RMagick into using a white background when converting the transparent layer? I know I could just serve as PNG, but then the images are 10 times as large, and the site is already pretty bandwidth heavy.

    Read the article

  • Perl script to print out cars model and car color

    - by Gary Liggons
    I am tying to create a perl script to printout car models and colors, and the data is below. I want to know if there is anyway to make the car model heading a field so that I can print it any time I want to? the data below is a csv file. the way I want the data to look on a report is below as well This is how the data looks* Chevy blue,1978,Washington brown,1989,Dallas black,2001,Queens white,2003,Manhattan Toyota red,2003,Bronx green,2004,Queens brown,2002,Brooklyn black,1999,Harlem ****This is how I am trying to get the data to look in a report**** Car Model:Toyota Color:Red Year:2002 City: Queens

    Read the article

  • System.Drawing - bad text rendering using DrawString on top of transparent pixels.

    - by mackenir
    When rendering text into a bitmap, I find that text looks very bad when rendered on top of an area with non-opaque alpha. The problem is progressively worse as the underlying pixels become more transparent. If I had to guess I'd say that when underlying pixels are transparent, the text renderer draws any anti-aliased 'gray' pixels as solid black. Here are some screenshots: Text drawn on top of transparent pixels: Text drawn on top of semi-transparent pixels: Text drawn on opaque pixels: Here is the code used to render the text: g.SmoothingMode = SmoothingMode.HighQuality; g.DrawString("Press the spacebar", Font, Brushes.Black, textLeft, textTop);

    Read the article

  • What's the best way to convert a .eps (CMYK) to a .jpg (RGB) with Image Magick

    - by Slinky
    Hi All, I have a bunch of .eps files (CMYK) that I need to convert to .jpg (RGB) files. The following command sometimes gives me under or over saturated .jpg images, when compared to the source EPS file: $cmd = "convert -density 300 -quality 100% -colorspace RGB ".$epsURL." -flatten -strip ".$convertedURL; Is there a smarter way to do this such that the converted image will have the same qualities as the source EPS file? Here is an example of the source file info: Image: rejm.eps Format: PS (PostScript) Class: DirectClass Geometry: 537x471 Base geometry: 1074x941 Type: ColorSeparation Endianess: Undefined Colorspace: CMYK Channel depth: Cyan: 8-bit Magenta: 8-bit Yellow: 8-bit Black: 8-bit Channel statistics: Cyan: Min: 0 (0) Max: 255 (1) Mean: 161.913 (0.634955) Standard deviation: 72.8257 (0.285591) Magenta: Min: 0 (0) Max: 255 (1) Mean: 184.261 (0.722591) Standard deviation: 75.7933 (0.297229) Yellow: Min: 0 (0) Max: 255 (1) Mean: 70.6607 (0.277101) Standard deviation: 39.8677 (0.156344) Black: Min: 0 (0) Max: 195 (0.764706) Mean: 34.4382 (0.135052) Standard deviation: 38.1863 (0.14975) Total ink density: 292% Colors: 210489 Rendering intent: Undefined Resolution: 28.35x28.35 Units: PixelsPerCentimeter Filesize: 997.727kb Interlace: None Background color: white Border color: #DFDFDFDFDFDF Matte color: grey74 Page geometry: 537x471+0+0 Dispose: Undefined Iterations: 0 Compression: Undefined Orientation: Undefined Signature: 8ea00688cb5ae496812125e8a5aea40b0f0e69c9b49b2dc4eb028b22f76f2964 Profile-iptc: 19738 bytes Thanks

    Read the article

  • Overriding disabled input and textarea with CSS

    - by igluratds
    Hi, Im trying to override the grey text of a disabled input and textarea. At the moment Im only really concerned with it working in Webkit and Mozilla. At the moment Im currently using every trick in the book that I know of: input[@disabled=true], input[@disabled], button[disabled]:active, button[disabled], input[type="reset"][disabled]:active, input[type="reset"][disabled], input[type="button"][disabled]:active, input[type="button"][disabled], select[disabled] > input[type="button"], select[disabled] > input[type="button"]:active, input[type="submit"][disabled]:active, input[type="submit"][disabled],input[disabled="disabled"], input[disabled] { color: black !important; } Sure it does change the colour if I change it to something else, however when I choose black it is still greyed out a bit. Any ideas? I am using Ext JS if I can use that to manipulate it. Thanks.

    Read the article

  • webOS style view switching on iPhone app

    - by Taylor Satula
    Hello, I have been working with a iPhone app that I would like to have switch views like the Palm Pre does for multitasking. I know the usual way of switching views by using the black bar at the bottom of the app but the app I am working on does not lend itself to having a big black bar in the way (see attached picture #1). I guess my question is, how do I shrink the current view (Current Location window) and show other views on the sides? (see attached picture #2) Then be able to swipe left and right to view other views. I have no idea how to do this and would be eternally grateful if someone could help me out with this. http://www.threepixeldrift.com/images/deep-storage/webOScardapp1.jpg http://www.threepixeldrift.com/images/deep-storage/webOScardapp2.jpg

    Read the article

  • jQuery fadeIn fadeOut pause on hover

    - by theDawckta
    I have a little jQuery snippet that will fadeIn and fadeOut a group of divs over a select interval. I now need to pause this fadeIn fadeOut on hover, then resume on mouse out. Any help is appreciated. Here is the relevant code. The following is what is located in my body <div class="gcRotate"> <div class="gcRotateContent"> <div style="border: solid 2px black; text-align: center; width: 150px;"> This is first content <img src="http://pix.motivatedphotos.com/2008/6/16/633492359109161542-Skills.jpg" alt="Dude" /> </div> </div> <div class="gcRotateContent"> <div style="border: solid 2px black; text-align: center; width: 150px"> This is second content <img src="http://www.funnycorner.net/funny-pictures/5010/cheezburger-locats.jpg" alt="Dude" /> </div> </div> <div class="gcRotateContent"> <div style="border: solid 2px black; text-align: center; width: 150px"> This is third content <img src="http://icanhascheezburger.files.wordpress.com/2007/06/business.jpg" alt="Dude" /> </div> </div> </div> <div> This shouldn't move. </div> <script type="text/javascript"> function fadeContent() { $(".gcRotate .gcRotateContent:hidden:first").fadeIn(500).delay(2000).fadeOut(500, function() { $(this).appendTo($(this).parent()); fadeContent(); }); } $(".gcRotate").height(0); $(".gcRotateContent").each( function() { if ($(".gcRotate").height() < $(this).height()) { $(".gcRotate").height($(this).height()); } } ); $(".gcRotateContent").each(function() { $(this).css("display", "none") }); fadeContent(); </script>

    Read the article

  • R ggplot barplot; Fill based on two separate variables

    - by user1476968
    A picture says more than a thousand words. As you can see, my fill is based on the variable variable. Within each bar there is however multiple data entities (black borders) since the discrete variable complexity make them unique. What I am trying to find is something that makes each section of the bar more distinguishable than the current look. Preferable would be if it was something like shading. Here's an example (not the same dataset, since the original was imported): dat <- read.table(text = "Complexity Method Sens Spec MMC 1 L Alpha 50 20 10 2 M Alpha 40 30 80 3 H Alpha 10 10 5 4 L Beta 70 50 60 5 M Beta 49 10 80 6 H Beta 90 17 48 7 L Gamma 19 5 93 8 M Gamma 18 39 4 9 H Gamma 10 84 74", sep = "", header=T) library(ggplot2) library(reshape) short.m <- melt(dat) ggplot(short.m, aes(x=Method, y= value/100 , fill=variable)) + geom_bar(stat="identity",position="dodge", colour="black") + coord_flip()

    Read the article

  • Changing The Underlying Background Color Of A Swing Window

    - by dimo414
    As discussed here, when resizing a Swing application in Vista (and Windows 7, which is what I'm using) you get a black background in the right/bottom corner while Swing's repaint catches up to the changes. Playing with other applications (Windows Explorer (Native), Firefox (C++?), and Eclipse (Java)) I notice that they all have this same problem - contrary to what the folks in the link above say - but they minimize the problem by having a grey fill color, which is far less visually jarring than the black that appears in Swing. I'm wondering if there's some way to change this so that Swing behaves like these other applications? I tried setting the background color of the JFrame, but to no avail.

    Read the article

  • Vimrc: how to reuse code and definitions for differnt file types?

    - by sixtyfootersdude
    I have defined my own file types using vim. For example I have: .classNotes .reportJotNotes .homework These file types are defined in .vim files: ~/.vim/syntax/homework.vim ~/.vim/syntax/reportJotNotes.vim ~/.vim/syntax/homework.vim Many of these things have several of the same code in them. Ie they all have this for titles: syn region JakeTitle start=+=== + end=+===+ oneline highlight JakeTitle ctermbg=black ctermfg=Yellow syn region JakeMasterTitle start=+==== + end=+====+ oneline highlight JakeMasterTitle cterm=bold term=bold ctermbg=black ctermfg=LightBlue Instead of having this in all three .vim files I would rather have it in one file and then in each file could source it. How can I do this?

    Read the article

  • How do I change syntax highlighting CSS to a blog hosted on WordPress.com?

    - by Emilio
    I've a blog hosted on WordPress.com, and i've buyed the "Custom CSS" update to modify CSS. Now I want to change some CSS options of Syntax Highlighting provided by Wordpress.com. For example, i want that [code lang="C"] int main() { } [/code] will be displayed with a black background instead of standard white one. I've added in Wordpress.com Appareance > Modify CSS the following code: .syntaxhighlighter { background-color: black !important; } As explained here, but it doesn't works. Any idea?

    Read the article

  • change attributes of SVG graph without refresh

    - by Mike Hudak
    Hello, I have a simple SVG graph generated by GraphViz: <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <!-- Generated by graphviz version 2.26.3 (20100126.1600) --> <!-- Title: G Pages: 1 --> <svg width="138pt" height="168pt" viewBox="0.00 0.00 138.00 168.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <g id="graph1" class="graph" transform="scale(1 1) rotate(0) translate(4 164)"> <title>G</title> <polygon fill="white" stroke="white" points="-4,5 -4,-164 135,-164 135,5 -4,5"/> <!-- Node1 --> <g id="node1" class="node"><title>Node1</title> <a xlink:href="http://localhost/viz/applet.php" xlink:title="Internet"> <image xlink:href="images/cloud.png" width="130px" height="77px" preserveAspectRatio="xMinYMin meet" x="0" y="-159.5"/> <text text-anchor="middle" x="65" y="-116.4" font-family="Times New Roman,serif" font-size="14.00">&#39;.$Internet.&#39;</text> </a> </g> <!-- Node2 --> <g id="node2" class="node"><title>Node2</title> <a xlink:href="http://localhost/viz/applet.php"> <image xlink:href="images/file server.png" width="44px" height="45px" preserveAspectRatio="xMinYMin meet" x="43" y="-45.5"/> </a> </g> <!-- Node1&#45;&gt;Node2 --> <g id="edge2" class="edge"><title>Node1&#45;&gt;Node2</title> <a xlink:title="Bandwidth: 1544kbps&#10;Using link: 12%&#10;VOIP calls: 4&#10;Packet rate: 10000&#10;Packet loss: 2"> <path fill="none" stroke="black" d="M65,-82.2678C65,-73.5404 65,-64.358 65,-55.8964"/> <polygon fill="black" stroke="black" points="68.5001,-55.6524 65,-45.6524 61.5001,-55.6525 68.5001,-55.6524"/> </a> </g> </g> </svg> I want to change some atributes: for example " VOIP calls: 4 " -changing "4" to value from Database(LDAP) without refreshing whole SVG graph <a xlink:title="Bandwidth: 1544kbps&#10;Using link: 12%&#10;VOIP calls: 4&#10;Packet rate: 10000&#10;Packet loss: 2"> Thank you for your answers

    Read the article

  • Animated status bar style transition, a la iPod app

    - by Ben Williamson
    In the iPod app, the navigation views have the default status bar style, and the Now Playing view is in the black style. The transition between them is animated with a crossfade. I want to do that. My first attempt: [UIView beginAnimations:@"whatever" context:nil]; [UIView setAnimationDuration:0.5]; self.navigationController.navigationBar.barStyle = UIBarStyleBlack; [UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleBlack [UIView commitAnimations]; No joy, it pops to black. Takers?

    Read the article

  • JQuery: Run animations on the element's contents

    - by BHare
    I have a div that has some padding, border, and style applied to it. Inside the div I have just some plain text. Something like this: <div id=test style="border: 2px solid black; background-color: blue;"> The text I would like to animate </div> Normally to animate the contents I would do something like this: $('#test > *').hide(1000); But apparently the > * only selects child elements, and not non-elements (text for example) So my current work around is: <div id=test style="border: 2px solid black; background-color: blue;"> <span>The text I would like to animate</span> </div> Making a span that is not really needed.

    Read the article

  • Return tiff file from outputstream on JSP

    - by YYY
    I am using a JSP to display a single TIFF file. The flow is as follows: I am given a PDF to convert to a TIFF. I feed a 'black box' API the PDF in the form of a File object and an OutputStream (I am currently using a ByteArrayOutputStream but that can change as needed. The 'black box' converts the PDF to a TIFF and saves the result to the OutputStream. I use out.println(outputstream) to spit out the TIFF. The problem is that I am getting a text stream instead of a displayed image. I have used the following head/meta tag: <head><title>PDF to TIFF tester</title> <META HTTP-EQUIV="Content-Script-Type" CONTENT="image/tiff"></head> <body> But that does not change the end result. Any help?

    Read the article

  • Caurina Tweener and Alpha

    - by Jk_
    Hi guys, Usually I work with TweenLite but I had to modify the code of someone else who worked with Caurina Tweener. I have a basic problem with it! On my scene, I have a simple movie clip filled with black. Into this movieclip a bitmap file (jpg). When I make a tween on the alpha of my mc, it seems that there is a delay (in the alpha) between this the black background and the image. Tweener.addTween(thisMc, { _autoAlpha:0, time:1 } ); I'm sure there is an easy way to avoid this problem but I can't find it out! Cheers, Jk_

    Read the article

  • Finding matching submatrics inside a matrix

    - by DaveO
    I have a 100x200 2D array expressed as a numpy array consisting of black (0) and white (255) cells. It is a bitmap file. I then have 2D shapes (it's easiest to think of them as letters) that are also 2D black and white cells. I know I can naively iterate through the matrix but this is going to be a 'hot' portion of my code so speed is an concern. Is there a fast way to perform this in numpy/scipy? I looked briefly at Scipy's correlate function. I am not interested in 'fuzzy matches', only exact matches. I also looked at some academic papers but they are above my head.

    Read the article

< Previous Page | 42 43 44 45 46 47 48 49 50 51 52 53  | Next Page >