Search Results

Search found 5016 results on 201 pages for 'patrick white'.

Page 78/201 | < Previous Page | 74 75 76 77 78 79 80 81 82 83 84 85  | Next Page >

  • How can I assert from Python C code?

    - by Joe
    I'm writing a Python class in C and I want to put assertions in my debug code. assert.h suits me fine. This only gets put in debug compiles so there's no chance of an assert failure impacting a user of the Python code*. I'm trying to divide my 'library' code (which should be separate to the code linked against Python) so I can use it from other C code. My Python methods are therefore thinnish wrappers around my pure-C code. So I can't do this in my 'library' code: if (black == white) { PyErr_SetString(PyExc_RuntimeError, "Remap failed"); } because this pollutes my pure-C code with Python. It's also far uglier than a simple assert(black != white); I believe that the Distutils compiler always sets NDEBUG, which means I can't use assert.h even in debug builds. Mac OS and Linux. Help! *one argument I've heard against asserting in C code called from Python.

    Read the article

  • Can't change background for UIWebView in iPhone SDK

    - by leon
    Hi, Is there a way to change background color for UIWebView? None of the colors set in IB effect UIWebView behavior: before acctual content is loaded it shows as up as white (causing a white flash between the moment it is loaded and content is rendered). Setting background color programmatically does not do anything either. Here is code: @interface Web_ViewViewController : UIViewController { UIWebView *web; } @property (nonatomic, retain) IBOutlet UIWebView *web; @end .... (void)viewDidLoad { super viewDidLoad; web.backgroundColor = UIColor blueColor; NSURL *clUrl = NSURL URLWithString:@"http://www.apple.com" ; NSURLRequest *req = NSURLRequest requestWithURL:clUrl; web loadRequest:req; } thanks

    Read the article

  • css nth-child(2n+1) repaint css after filtering out list items

    - by Michael
    I have a list of 20+ items. The background-color changes using the :nth-child(2n+1) selector. (ie. even item black, odd item white). When I click a button to filter out specific items using the jQuery Isotope plugin it adds a .isotope-hidden class to the items I want to filter out, which changes the position of the list item to 0,0 and opacity to 0. When this happens the remaining items are left with the original black/white background-colors, which are now no longer in order. Does anyone know a way to "repaint' the css using the :nth-child(2n+1) selector on the items that do not contain the .isotope-hidden class. I tried #element tr:not(.isotope-hidden):nth-child(2n+1) with no avail. Any help would be appreciated. Thank you.

    Read the article

  • Overlay WriteableBitmap with color

    - by rajenk
    I'm trying to overlay a WriteableBitmap with a certain color in Silverlight. I have a black and white base image, which I'm using to create smaller WriteableBitmap images for a new composite image and I want to overlay either the black or white part of the source image cut-out with a certain color before adding it to the composite image. What I'm doing now is: var cutOut = new WriteableBitmap(8, 14); /* cut out the image here */ cutOut.Render(sourceImage, transform); // sourceImage is the base image cutOutImage.Source = cutOut; // cutOutImage is an Image element in XAML compositeImage.Render(cutOutImage, transform2); // compositeImage is the final WriteableBitmap that is shown on screen I tried the methods on http://blogs.silverarcade.com/silverlight-games-101/15/silverlight-blitting-and-blending-with-silverlights-writeablebitmap/ and using the extension methods from hxxp://writeablebitmapex.codeplex.com/, but I cannot seem to get a color overlay on the cutOut image before rendering it to the compositeImage. Does anyone know of a good method to do this? Thanks in advance.

    Read the article

  • IE GIF/PNG Transparency issue with jQuery

    - by Andrew
    Ok, this is pretty weird... Here's the page in question: http://s289116086.onlinehome.us/lawjournaltv/index.php The main blue callout background was originally a PNG, but when I applied some jQuery trickery to it (click the numbers in the top right to see what I mean), an ugly white border appeared where the transparency should be. See this screenshot from IE8: http://skitch.com/darkdriving/n62bu/windows-xp-professional I figured I could sacrifice the quality/flexibility of a PNG and just resaved each of the backgrounds as GIFs and set the matte color to white (for now). Well, I was proven wrong because IE is treating the GIF transparency the same as the original PNGs. I've read here that the issue with PNGs, Javascript, and IE has something to do with multiple filters can't be applied to one image, but shouldn't GIFs be exempt from this because they lack the Alpha Channel? Is there any way to make this page look similar in IE to Firefox or Webkit browsers? Thanks in advance!

    Read the article

  • Rails, searchlogic choose categories with checkboxes

    - by atmorell
    Hello, I am useing searchlogic to search some paintings. Each painting belong to a single category. What I would like to do is add multiple checkboxes to my search form, so that users can mark multiple categories. (joined with or) Is this possible with searchlogic? The query I am looking for is something like this: SELECT * FROM paintings WHERE category LIKE "white" OR category LIKE "red"... f.check_box :category (white) f.check_box :category (black) f.check_box :category (red) f.check_box :category (green) etc.

    Read the article

  • Applying atyle sheets in pyqt

    - by Jebagnanadas
    Hello all, If i apply a property to a parent widget it is automatically applied for child widgets too.. Is there any way of preventing this?? For example if i set background color as white in a dialog the button,combo boxes and scroll bars looks white as it lacks it native look(have to say it's unpleasant & ugly).. Is there any way that i can apply the stylesheets only to a parent widget not to it's children??? Experts help please..

    Read the article

  • Silverlight 4 Setting background color of textbox on focus

    - by Sean Riedel
    I am trying to set the background color of a Textbox to white on focus using a Style. My enabled Textbox has a Linear Gradient background by default: <Setter Property="Background"> <Setter.Value> <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1"> <GradientStop Color="#e8e8e8" Offset="0.0" /> <GradientStop Color="#f3f3f3" Offset="0.25" /> <GradientStop Color="#f4f4f4" Offset="0.75" /> <GradientStop Color="#f4f4f4" Offset="1.0" /> </LinearGradientBrush> </Setter.Value> </Setter> I have a focus visual state defined: <VisualStateGroup x:Name="FocusStates"> <VisualState x:Name="Focused"> <Storyboard> <DoubleAnimation Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="Opacity" To="1" Duration="0"/> </Storyboard> </VisualState> Here is the rest of the Control Template: <Border x:Name="Border" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="1" Opacity="1" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}"> <Grid> <Border x:Name="ReadOnlyVisualElement" Opacity="0" Background="#5EC9C9C9"/> <Border x:Name="MouseOverBorder" BorderThickness="1" BorderBrush="Transparent"> <ScrollViewer x:Name="ContentElement" Padding="{TemplateBinding Padding}" BorderThickness="0" IsTabStop="False"/> </Border> </Grid> </Border> <Border x:Name="DisabledVisualElement" Background="#A5D7D7D7" BorderBrush="#A5D7D7D7" BorderThickness="{TemplateBinding BorderThickness}" Opacity="0" IsHitTestVisible="False"/> <Border x:Name="FocusVisualElement" Background="#A5ffffff" BorderBrush="#FF72c1ec" BorderThickness="{TemplateBinding BorderThickness}" Margin="1" Opacity="0" IsHitTestVisible="False"/> On the last Border tag is where I am trying to set the background to white (#ffffff). Right now I have the opacity at A5 which does turn the background white, however it also starts to obscure the text in the box. Any higher opacity makes the text invisible so I am pretty sure that setting the background of that border is not the right way to do this. Can I set the Background color of the ContentElement somehow through a StoryBoard? Thanks.

    Read the article

  • Code editor skins?

    - by Khalspi
    This is a kind of unorthodox question. Frankly, I won't lie to you. I am new to programming and am planning to improve myself. I enjoy coding but I need something to keep me going during the down times, so my question is: Is there such a thing as a code editor skin? A compiler skin? For example, you have the Command Prompt, it has a black background with white writing, it seems geeky, exactly what I want. I want a compiler that looks like command prompt...black with white writing (or green) or still has color coding (some compilers change color of text based on command). Yes, this is mainly for boasting, but I don't want to show someone something that basically looks like a text editor, I just want something that looks a little cooler. P.S (This question may seem a little unnecessary, it is because it is my first question, I'd like to warm up to this community before I start asking some real questions about code.)

    Read the article

  • putpixel with pyglet

    - by pts
    I'm new to pyglet. I'd like to change a pixel from black to white at each on_draw iteration. So after 1000 iterations, there should be exactly 1000 white pixels in the window. However, I'd like to avoid calling 1000 draw operations in on_draw for that. So I'd like to create an image, do an RGB putpixel on the image, and blit the image to the screen. How can I do that? The pyglet documentation, the examples and the source code aren't too helpful on this.

    Read the article

  • How to specify behavior of Java BufferedImage resize: need min for pixel rows instead of averaging

    - by tucuxi
    I would like to resize a Java BufferedImage, making it smaller vertically but without using any type of averaging, so that if a pixel-row is "blank" (white) in the source image, there will be a white pixel-row in the corresponding position of the destination image: the "min" operation. The default algorithms (specified in getScaledInstance) do not allow me a fine-grained enough control. I would like to implement the following logic: for each pixel row in the w-pixels wide destination image, d = pixel[w] find the corresponding j pixel rows of the source image, s[][] = pixel[j][w] write the new line of pixels, so that d[i] = min(s[j][i]) over all j, i I have been reading on RescaleOp, but have not figured out how to implement this functionality -- it is admittedly a weird type of scaling. Can anyone provide me pointers on how to do this? In the worse case, I figure I can just reserve the destination ImageBuffer and copy the pixels following the pseudocode, but I was wondering if there is better way.

    Read the article

  • composite colors : CALayer and blend mode on iPhone

    - by Ali
    I'm trying to use core image on the iphone. I'm able to composite my colors using quartz to draw an uiview, but i want to separate each component into CALayer (UIview consume more resources). So i have a white mask i want to use to filter a background bitmap, and i want to try diffrent blending mode. UNfortunately, the layers are only "adding" their colors. Here is my code : @implementation WhiteLayerHelper - (void)drawLayer:(CALayer *)theLayer inContext:(CGContextRef)myContext { // draw a white overlay, with special blending and alpha values, so that the saturation can be animated CGContextSetBlendMode(myContext,kCGBlendModeSaturation); CGContextSetRGBFillColor(myContext,1.0,1.0,1.0,0.9); CGContextFillRect(myContext,[UIScreen mainScreen].bounds); } @end And here is the main view drawrect code, where i use my CALayer : - (void)drawRect:(CGRect)rect { //get the drawing context CGContextRef myContext = UIGraphicsGetCurrentContext(); // draw the background [self fillContext:myContext withBounds:m_overlayRect withImage:m_currentImage]; [whiteLayer renderInContext:myContext]; } Is there something wrong ?

    Read the article

  • Eclipse: Subclipse "Edit Conflicts"

    - by Wilco
    I have found that when using Subclipse to edit conflicts, all my syntax color settings are preserved except for the background color, which is reset to the standard white. Using my particular color scheme makes it almost impossible to read any of the text when stuck with a white background. Is there anywhere I can change this default background color? There doesn't seem to be any way to do this from the preferences window, but perhaps there is a config file somewhere I could edit? Any help would be very much appreciated (my eyes will thank you too)!

    Read the article

  • Strange padding/margin when using UIWebView

    - by Nicsoft
    Hello, I am creating an app that is having a UIWebView which contains an advert. The size of the view is the same as the advert (image) itself. Still, there is a white margin/padding of some kind above and to the left of the image, inside the UIWebView. Check out the linked image: Also, I did link to the actual advert itself, you can check out the image loaded and view the source code there: Link to advert Any idea how I should remove the white padding? Thanks in advance!

    Read the article

  • Masking a Drawable/Bitmap on Android

    - by Joshua Rodgers
    I'm currently looking for a way to use a black and white bitmap to mask the alpha channel of another bitmap or Drawable on Android. I'm curious as to what the best way to do this is. I certainly have a couple of ideas for how to do this, but they are not optimal. I need to be able to apply a new mask to the image every so often (the black and white bitmap will change every few seconds). Any feedback on how to achieve this would be greatly appreciated.

    Read the article

  • Changing color of the titlebar, background and text of MFMailComposeViewController

    - by iSharreth
    I am sending email from my iPhone application. Everything working fine, but I want to change the color of the title bar that appears from blue to black and the background color from white to black. Also, all the text to white color. What should I do? Anyone please help! I used the below code: (IBAction)sendMail{ MFMailComposeViewController *mailComposer = [[MFMailComposeViewController alloc]init]; mailComposer.mailComposeDelegate = self; if([MFMailComposeViewController canSendMail]){ [mailComposer setToRecipients: [NSArray arrayWithObjects:@"[email protected]",nil]]; [mailComposer setSubject: nil]; [mailComposer setMessageBody: nil isHTML:NO]; [self presentModalViewController:mailComposer animated: YES]; }

    Read the article

  • CSS inheritance: applying selector for itself and every descendant

    - by Cawas
    Get a custom user CSS and type this .answered-accepted { color: white !important; background: #090 !important; } Now go to answers.unity3d and look for an accepted answer. The design looks bad, because the <strong> in there overrides the customization. The fix I've found is this: .answered-accepted, .answered-accepted * { color: white !important; background: #090 !important; } Now it looks fine on the website, but the code looks ugly!! How can I do this without repeating the class name?

    Read the article

  • Setting Background of a Jbutton

    - by mithun1538
    Hello there, I have 5 JButtons: b1, b2, b3, b4, b5. By default, their color is gray. When I click on any button, the background of that button changes to white. When I click another button, I want that previous clicked button to change its background to gray, and this newly clicked button to change its background to white. Here is the code that I wrote: int liveButton = 0; //holds the value of the button that is last clicked. //0 indicates no button clicked (in the beginning) private void ChangeInUsersList(int clickedButton) { switch(liveButton) { case 1 : b1.setBackground(Color.GRAY); break; case 2 : b2.setBackground(Color.GRAY); break; case 3 : b3.setBackground(Color.GRAY); break; case 4 : b4.setBackground(Color.GRAY); break; case 5 : b5.setBackground(Color.GRAY); break; default: System.out.println("No button to change"); } liveButton = clickedButton;// store the clicked button to change its //background later } private void b1ActionPerformed(java.awt.event.ActionEvent evt) { ChangeInUsersList(1); b1.setBackground(new java.awt.Color(255,255,255)); } private void b2ActionPerformed(java.awt.event.ActionEvent evt) { ChangeInUsersList(2); b2.setBackground(new java.awt.Color(255,255,255)); } private void b3ActionPerformed(java.awt.event.ActionEvent evt) { ChangeInUsersList(3); b3.setBackground(new java.awt.Color(255,255,255)); } private void b4ActionPerformed(java.awt.event.ActionEvent evt) { ChangeInUsersList(4); b4.setBackground(new java.awt.Color(255,255,255)); } private void b5ButtonActionPerformed(java.awt.event.ActionEvent evt) { ChangeInUsersList(5); b5.setBackground(new java.awt.Color(255,255,255)); } However, its not working as expected. When i click on a button, its background does change to white. However, if i click on some other button after that, the former button's background doesnt change to grey. I tried replacing Color.GREY with new java.awt.Color(236,233,216) - the rgb for grey but it still doesnt work.

    Read the article

  • css table column width not set

    - by bsreekanth
    Hello, I'm trying to set the width of table column to a minimum value. The header row (th) was set white-space:nowrap to prevent wrapping. Now all the columns (including td rows) set to a width that of th. I tried to expand the size of smaller columns by setting it in the html as <th style="width:200px;"> and <td style="width:200px;">, but it has no effect. In firebug, in the style section, the width setting is active element.style { width:200px; } Still, the computed tab shows the width is less than 200px. Please see the details below. th -- computed: Text font-family verdana,arial,helvetica,sans-serif font-size 10px font-weight bold font-style normal color #333333 text-transform none text-decoration none letter-spacing normal word-spacing 0 line-height 17px text-align left vertical-align baseline direction ltr Background background-color transparent background-image none background-repeat repeat background-position 0 0 background-attachment scroll opacity 1 Box Model width 152px height 17px top auto right auto bottom auto left auto margin-top 0 margin-right 0 margin-bottom 0 margin-left 0 padding-top 0 padding-right 0 padding-bottom 0 padding-left 0 border-top-width 0 border-right-width 0 border-bottom-width 0 border-left-width 0 border-top-color #333333 border-right-color #333333 border-bottom-color #333333 border-left-color #333333 border-top-style none border-right-style none border-bottom-style none border-left-style none Layout position static display block visibility visible z-index auto overflow-x visible overflow-y visible white-space nowrap clip auto float none clear none -moz-box-sizing content-box Other cursor pointer list-style-image none list-style-position outside list-style-type disc marker-offset auto and td --computed: Text font-family verdana,arial,helvetica,sans-serif font-size 11px font-weight 400 font-style normal color #222222 text-transform none text-decoration none letter-spacing normal word-spacing 0 line-height 12px text-align left vertical-align top direction ltr Background background-color transparent background-image none background-repeat repeat background-position 0 0 background-attachment scroll opacity 1 Box Model width 152px height 48px top auto right auto bottom auto left auto margin-top 0 margin-right 0 margin-bottom 0 margin-left 0 padding-top 5px padding-right 6px padding-bottom 5px padding-left 6px border-top-width 0 border-right-width 1px border-bottom-width 0 border-left-width 0 border-top-color #222222 border-right-color #222222 border-bottom-color #222222 border-left-color #DDDDDD border-top-style none border-right-style none border-bottom-style none border-left-style solid Layout position static display table-cell visibility visible z-index auto overflow-x visible overflow-y visible white-space normal clip auto float none clear none -moz-box-sizing content-box Other cursor auto list-style-image none list-style-position outside list-style-type disc marker-offset auto Any help, highly appreciated... thanks

    Read the article

  • How do I change the background color of the column with the expanders in Eclipse?

    - by Pridkett
    Recently after scorching my retinas from the garish white background in Eclipse, I found some of the excellent posts about how to change the colors so it uses sane (i.e. dark background) colors in the editor. However, one problem present in all solutions is that background of the column with the expanders for code folding is always white. Is there a way to change the background of that column? Here's a screenshot of the problem: I'm not the only person that has this problem, as shown in the screenshots for the following questions: Dark Color Scheme for Eclipse Color Themes for Eclipse (application of color schemes results in this issue on a Mac, no idea about PC) I know that the problem is not language specific as it happens in Java, Python, HTML, and everything else. Any hints on where in the pages of preferences this setting is?

    Read the article

  • place and show pixel in the Cartesian plane graph in JavaFX

    - by user3671803
    I have this method to draw the Cartesian plane in JavaFX, using canvas and would like to know if it is possible to place or show the pixel: public class Grafics extends StackPane { private Canvas canvas; public void Grafics(){ GridPane grid = new GridPane(); grid.setPadding(new Insets(5)); grid.setHgap(10); grid.setVgap(10); canvas = new Canvas(); canvas.setHeight(500); canvas.setWidth(700); GridPane.setHalignment(canvas, HPos.CENTER); grid.add(canvas, 0, 2); GraphicsContext gc = canvas.getGraphicsContext2D(); gc.setFill(Color.BLACK); gc.fillRect(0, 0, canvas.getWidth(), canvas.getHeight()); gc.setFill(Color.WHITE); gc.fillRect(1, 1, canvas.getWidth() - 2, canvas.getHeight() - 2); drawAxesXY(gc); //call the method drawAxes getChildren().addAll(grid);// add an gridpane in stackpane } private void drawAxesXY(GraphicsContext gc1) { PixelWriter pixelWriter = canvas.getGraphicsContext2D().getPixelWriter(); gc1.setFill(Color.WHITE); gc1.setStroke(Color.BLACK); gc1.setLineWidth(1.5); gc1.strokeText("Y", 350, 30); gc1.scale(1, 1); gc1.translate((canvas.getHeight() / 50) - (canvas.getWidth() / 10), canvas.getHeight() / 50); gc1.strokeLine(canvas.getWidth() - 300, canvas.getWidth() - 300, canvas.getHeight() - 100, canvas.getHeight() / 30); pixelWriter.setColor(300, 300, Color.RED); gc1.strokeText("X", 620, 220); gc1.translate(canvas.getWidth() - (canvas.getHeight() / 10), -220); gc1.rotate(90.0); gc1.setFill(Color.WHITE); gc1.setStroke(Color.RED); gc1.setLineWidth(1.5); gc1.strokeLine(canvas.getWidth() - 250, canvas.getWidth() - 250, canvas.getHeight() - 50, canvas.getHeight() / 30); pixelWriter.setColor(620, 220, Color.RED); } } I put a line black and the other red http://postimg.org/image/tewjhco4z/ and I wanna know if is possible to place or show the pixel in Figure like this http://postimg.org/image/98k9mvnb3/

    Read the article

  • Splashscreen ProgressBar in Eclipse RCP has "dirty" corners

    - by pimpf0r
    Hi there, I am using the RCP Splash Screen along with the built-in ProgressBar (AbsolutePositionProgressMonitorPart). The splash image has a blue background color, but the background of the progressbar seems to be white, which leads to some white corners. There is no "setBackground" on BasicSplashHandler nor does getContent().setBackground(Color) has any noticeable effect. I don't want to be too picky, but since the splash is the first thing you see from the application, I think its very important to be tidy. So, do you have any idea how to get rid of these corners?

    Read the article

  • WPF - styling comboboxes

    - by devdigital
    Hi, I'm trying to style Comboboxes in WPF so that they are white, and have the same border as TextBoxes. I have the following style so far, but don't know how to set the border: <Style TargetType="ComboBox"> <Setter Property="Margin" Value="0,2,0,2" /> <Setter Property="VerticalAlignment" Value="Center" /> <Setter Property="Background" Value="White" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type ComboBox}"> ??? </ControlTemplate> </Setter.Value> </Setter> </Style>

    Read the article

< Previous Page | 74 75 76 77 78 79 80 81 82 83 84 85  | Next Page >