Search Results

Search found 1699 results on 68 pages for 'alpha carinae'.

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

  • NAnt doesn't recognize patternset type

    - by veljkoz
    I've downloaded the new version of NAnt 0.91 Alpha 1 release and it doesn't seem to recognize the patternset as in: <?xml version="1.0" encoding="UTF-8" ?> <project name="Testing project" default="testMe"> <patternset id="build.files"> <include name="*.dll" /> </patternset> <target name="testMe"> <echo message="hi" /> </target> </project> The error I get when running nant /f:mytest.build is: Invalid element <patternset>. Unknown task or datatype. Am I missing something?

    Read the article

  • Python: x-y-plot with matplotlib

    - by kame
    I want to plot some data. The first column contains the x-data. But matplotlib doesnt plot this. Where is my mistake? #fresnel formula import numpy as np from numpy import cos from scipy import * from pylab import plot, show, ylim, yticks from matplotlib import * from pprint import pprint n1 = 1.0 n2 = 1.5 #alpha, beta, intensity data = [ [10, 22, 4.3], [20, 42, 4.2], [30, 62, 3.6], [40, 83, 1.3], [45, 102, 2.8], [50, 123, 3.0], [60, 143, 3.2], [70, 163, 3.8], ] for i in range(len(data)): rhotang1 = (n1 * cos(data[i][0]) - n2 * cos(data[i][1])) rhotang2 = (n1 * cos(data[i][0]) + n2 * cos(data[i][1])) rhotang = rhotang1 / rhotang2 data[i].append(rhotang) #append 4th value pprint(data) x = data[:][0] y1 = data[:][2] y3 = data[:][3] plot(x, y1, x, y3) show() EDIT: http://paste.pocoo.org/show/205534/ But it doesnt work.

    Read the article

  • RegEx - Take all numeric characters following a text character

    - by Simon
    Given a string in the format: XXX999999v99 (where X is any alpha character and v is any numeric character and v is a literal v character) how can I get a regex to match the numeric characters following the v? So far I've got 'v\d\d' which includes the v but ideally I'd like just the numeric part. As an aside does anyone know of a tool in which you can specify a string to match and have the regex generated? Modifying an existing regex is one thing but I find starting from scratch painful! Edit: Re-reading this question I realise it reads like a homework assignment! However I can assure you it's not, the strings I'm trying to match represent product versions appended to product codes. The current code uses all sorts of substring expressions to retrieve the version part.

    Read the article

  • How to Stich to Image objects in Java

    - by Imran
    Hi, I have a scenario in which i`m getting a number of tiles (e.g.12) from my mapping server. Now for buffering and offline functions I need to join them all back again so that we have to deal with 1 single image object instead of 12. I ve tried to do it without JAI my code is below. package imagemerge; import java.awt.*; import java.awt.image.*; import java.awt.event.*; public class ImageSticher extends WindowAdapter { Image tile1; Image tile2; Image result; ColorModel colorModel; int width,height,widthr,heightr; //int t1,t2; int t12[]; public ImageSticher() { } public ImageSticher (Image img1,Image img2,int w,int h) { tile1=img1; tile2=img2; width=w; height=h; colorModel=ColorModel.getRGBdefault(); } public Image horizontalStich() throws Exception { widthr=width*2; heightr=height; t12=new int[widthr * heightr]; int t1[]=new int[width*height]; PixelGrabber p1 =new PixelGrabber(tile1, 0, 0, width, height, t1, 0, width); p1.grabPixels(); int t2[]=new int[width*height]; PixelGrabber p2 =new PixelGrabber(tile2, 0, 0, width, height, t1, 0, width); p2.grabPixels(); int y, x, rp, rpi; int red1, red2, redr; int green1, green2, greenr; int blue1, blue2, bluer; int alpha1, alpha2, alphar; for(y=0;y<heightr;y++) { for(x=0;x<widthr;x++) { //System.out.println(x); rpi=y*widthr+x; // index of resulting pixel; rp=0; //initializing resulting pixel System.out.println(rpi); if(x<(widthr/2)) // x is less than width , copy first tile { //System.out.println("tile1="+x); blue1 = t1[rpi] & 0x00ff; // ERROR occurs here green1=(t1[rpi] >> 8) & 0x00ff; red1=(t1[rpi] >> 16) & 0x00ff; alpha1 = (t1[rpi] >> 24) & 0x00ff; redr = (int)(red1 * 1.0); // copying red band pixel into redresult,,,,1.0 is the alpha valye redr = (redr < 0)?(0):((redr>255)?(255):(redr)); greenr = (int)(green1 * 1.0); // redr = (int)(red1 * 1.0); // greenr = (greenr < 0)?(0):((greenr>255)?(255):(greenr)); bluer = (int)(blue1 * 1.0); bluer = (bluer < 0)?(0):((bluer>255)?(255):(bluer)); alphar = 255; //resulting pixel computed rp = (((((alphar << 8) + (redr & 0x0ff)) << 8) + (greenr & 0x0ff)) << 8) + (bluer & 0x0ff); } else // index is ahead of half way...copy second tile { blue2 = t2[rpi] & 0x00ff; // blue band bit of first tile green2=(t2[rpi] >> 8) & 0x00ff; red2=(t2[rpi] >> 16) & 0x00ff; alpha2 = (t2[rpi] >> 24) & 0x00ff; redr = (int)(red2 * 1.0); // copying red band pixel into redresult,,,,1.0 is the alpha valye redr = (redr < 0)?(0):((redr>255)?(255):(redr)); greenr = (int)(green2 * 1.0); // redr = (int)(red2 * 1.0); // greenr = (greenr < 0)?(0):((greenr>255)?(255):(greenr)); bluer = (int)(blue2 * 1.0); bluer = (bluer < 0)?(0):((bluer>255)?(255):(bluer)); alphar = 255; //resulting pixel computed rp = (((((alphar << 8) + (redr & 0x0ff)) << 8) + (greenr & 0x0ff)) << 8) + (bluer & 0x0ff); } t12[rpi] = rp; // copying resulting pixel in the result int array which will be converted to image } } MemoryImageSource mis; if (t12!=null) { mis = new MemoryImageSource(widthr, heightr, colorModel, t12, 0, widthr); result = Toolkit.getDefaultToolkit().createImage(mis); return result; } return null; } } now to check the my theory Im trying to join or stich two tiles horizontaly but im getting the error : java.lang.ArrayIndexOutOfBoundsException: 90000 at imagemerge.ImageSticher.horizontalStich(ImageSticher.java:69) at imageStream.ImageStream.getImage(ImageStream.java:75) at imageStream.ImageStream.main(ImageStream.java:28) is there some kind of limitation because when stiching two images of 300 x 300 horizontally it means the resulting image will be 600 x 300 ... that would make 180000 index size but its giving error at 90000, what am I doing wrong here

    Read the article

  • Can not change UILabel text color

    - by HelloWorld
    Hi, all I want to chang UILabel text color,but can't change it's color,This is my code. UILabel *categoryTitle = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 46, 16)]; categoryTitle.text = @"abc"; categoryTitle.backgroundColor = [UIColor clearColor]; categoryTitle.font = [UIFont systemFontOfSize:12]; categoryTitle.textAlignment = UITextAlignmentCenter; categoryTitle.adjustsFontSizeToFitWidth = YES; categoryTitle.textColor = [UIColor colorWithRed:188 green:149 blue:88 alpha:1.0]; [self.view addSubview:categoryTitle]; [categoryTitle release]; The label text color is white ,not my custome color. Thank for any help.

    Read the article

  • Python/Django: Which authorize.net library should I use?

    - by Parand
    I need authorize.net integration for subscription payments, likely using CIM. The requirements are simple - recurring monthly payments, with a few different price points. Customer credit card info will be stored a authorize.net . There are quite a few libraries and code snippets around, I'm looking for recommendations as to which work best. Satchmo seems more than I need, and it looks like it's complex. Django-Bursar seems like what I need, but it's listed as alpha. The adroll/authorize library also looks pretty good. The CIM XML APIs don't look too bad, I could connect directly with them. And there are quite a few other code snippets. What's the best choice right now, given my fairly simple requirements?

    Read the article

  • Actionscript 3 reflection class questions

    - by VPDD
    I found this reflection class: http://www.adobe.com/devnet/flash/articles/reflect_class_as3.html However, I have some questions about it. Let´s say I have a moviclip named “ref_mc”, to add a reflection I use: import com.pixelfumes.reflect.*; var r1:Reflect = new Reflect({mc:ref_mc, alpha:50, ratio:50, distance:0, updateTime:0, reflectionDropoff:1}); Now, the questions: 1) How do I update the parameters for the reflection r1 after it is created? 2) Is there a way to check whether the movieclip “ref_mc” already has a reflection? 3) Anyone has the .fla for the example with bars adjustments and code sample shown on the page (it is not on the download .zip)? Thanks in advance.

    Read the article

  • How do i start with Gomoku?

    - by firstTry
    I read about Gomoku that it can be implemented using Minimax and Alpha-Beta Pruning algorithms. So, i read these algorithms and now understand how the game will be solved. But when i sat to down to code, I am facing problem how to approach it. As in , How to design the prototype functions like getNextMove or Max(Move) ? How will the next move searched? Till when should i apply the minimax algorithm. I know i can find the code online, but i want to do it myself. Can anyone please point me in the right direction?

    Read the article

  • How to translate legacy system (OLE) colors to (A)RGB?

    - by Paul Sasik
    I have a list of color values encoded as signed integers (OLE I think) in a legacy INI file that I need to translate into (A)RGB values with .NET. An INI example: [INI_Section] Color=-2147483633 Doing something like: Color.FromArgb(-2147483633) gives an alpha-blended version of a color that is not at all what I expect. I think that a value like -2147483633 is supposed to represent a system-defined, or named color like ButtonFace. Is there a .NET method for translating these legacy colors properly? Note that pInvoke to OlePro32.dll is not an option.

    Read the article

  • Change namespace/filesystem folder names in Visual Studio

    - by Rosarch
    I'm trying to change a namespace in Visual Studio. My folder structure looks something like this: GameAlpha/ GameAlpha.sln GameAlphaRelease/ GameAlphaTest/ GameAlphaLevelEditor/ These include namespaces like GameAlphaRelease. I want to change all this to GameBetaRelease. Before this process, it built fine. First, I changed the solution and project files from Alpha to Beta. Then, I did a "find-replace-all" on the namespace. Finally, I went through the properties of each project and changed the "Assembly Name" and "Default Namespace" to the appropriate Beta title. However, now the solution does not build. The error is: GameAlpha.accessor: The reference to 'GameAlpha.exe' was not found in the list of this projects references. (Project: GameBetaTest) What am I doing wrong? If I remove project GameBetaTest, the solution builds just fine. Also, what is the preferable way to change the names of the folders in the file system?

    Read the article

  • Compiler is able to find function without matching .h file is updated?

    - by Maxim Veksler
    Hello Friends, I'm writing a C University project and stumbled upon a compiler behavior which I don't understand. In this file http://code.google.com/p/openu-bsc-maximveksler/source/browse/trunk/20465/semester/tasks/maman14/alpha/maman14/assembler/phaseOne.c?r=112 I've added a call to function named freeAsmInstruction(). This function is defined in file named lineParser.c, yet I haven't updated the matching lineParser.h header file to include this function declaration. Why does this code compile? I would expect that gcc would fail to compile phaseOne.c until the correct lineParser.h is updated with the declaration of freeAsmInstruction(). I would appreciate an explanation. Thank you, Maxim

    Read the article

  • NSScanner scanFloat returning unexpected results

    - by E-Madd
    I'm trying to build a UIColor from a comma-delimited list of values for RGB, which is "0.45,0.53,0.65", represented here by the colorConfig object... NSScanner *scanner = [NSScanner scannerWithString:colorConfig]; [scanner setCharactersToBeSkipped:[NSCharacterSet characterSetWithCharactersInString:@"\n, "]]; float red, green, blue; return [UIColor colorWithRed:[scanner scanFloat:&red] green:[scanner scanFloat:&green] blue:[scanner scanFloat:&blue] alpha:1]; But my color is always coming back as black. So I logged the values to my console and I'm seeing Red = -1.988804, Green = -1.988800, Blue = -1.988796 What am I doing wrong?

    Read the article

  • Set tag and hidden for objects on custom UITableViewCell

    - by Rob
    I am re-using Apple's AdvancedTableViewCells example to create a custom, fast-scrolling tableview. Specifically, I am using their CompositeSubviewBasedApplicationCell method which draws the content on the tableviewcell with drawRect Everything works, but how do you hide a label or set the tag for a label or image using their method? Doing it this way is pretty new to me (without IB), so I apologize ahead of time if it's something easy. The code that sets the cell content is: - (void)drawRect:(CGRect)rect { [_cell.animalIcon drawAtPoint:CGPointMake(5.0, 5.0)]; [_cell.animalName drawAtPoint:CGPointMake(93.0, 25.0)]; _highlighted ? [[UIColor whiteColor] set] : [[UIColor colorWithWhite:0.23 alpha:1.0] set]; [_cell.animalDescription drawAtPoint:CGPointMake(100.0, 54.0) withFont:[UIFont boldSystemFontOfSize:13.0]]; [_cell.animalNameString drawAtPoint:CGPointMake(93.0, 5.0) withFont:[UIFont boldSystemFontOfSize:13.0]]; }

    Read the article

  • Vertical Align Issue

    - by Nasser Hajloo
    I have following styles which work greate but Vertical-Align:middle or bottom doesn't work in it. every thing inside goes top ofthe div .Progress { display: inline-block; z-index: 1000; width:auto; height: auto; background-color: #A9C646; vertical-align: bottom; text-align: center; text-align: -moz-center; !text-align: center; position: absolute; opacity: 0.4; filter: alpha(opacity = 40); }

    Read the article

  • Latex editor for windows that works with unicode

    - by Anna
    Hello, I need to write Hebrew text in Latex. I am currently working on Windows with TeXnicCenter. I was pretty happy with this tool, up until the time when I needed to write Hebrew text. My regular alt-shift just won't change the language (I even downloaded the last alpha version, which was supposed to solve the problem, but it didn't). So I'm looking for another latex editor for windows that will let me write Hebrew. Please advice. Note: I know that it is possible with Lyx, but I prefer a real Latex editor.

    Read the article

  • Memory over-release problem when I am animating UIView

    - by Sheehan Alam
    I have enabled NSZombie's and I am getting the following message in my console when I am running my application: *** -[UIViewAnimationState release]: message sent to deallocated instance 0xf96d7e0 Here is the method that is performing the animation -(void)loadAvatar:(STObject*)st { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; avatar.alpha = 0; avatar.frame = avatarRectSmall; avatar.image = [ImageCache getMemoryCachedImageAtUrl:st.avatar_url]; [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:.50]; avatar.frame = avatarRectNormal; [avatar setAlpha:1]; [UIView commitAnimations]; [pool release]; pool = nil; } I don't always get a crash, only sometimes. I'm wondering what is getting released?

    Read the article

  • Why does UIImageView "darken"/saturate PNG images, and can I stop it?

    - by Ben
    I have a PNG file in a UIImageView, and next to that I have an EAGLView which displays the continuation of that same image (long story) as a texture, carved from the same original PNG. The point is, that these images, which should match up flawlessly, actually have somewhat differing color saturation. Normally I'd blame my handling of the PNG texture load in GL, but when I hold Preview (with the PNG) up to the iPhone simulator, it's GL that's spot on, and the UIImageView that's wrong! It's taken the image and made it ever-so-slightly more saturated. The image view is opaque with 100% alpha. I verified this on a clean UIImageView with another PNG file when put next to Preview. Anyone know what's up?

    Read the article

  • Complex behavior generated by simple computation

    - by Yuval A
    Stephen Wolfram gave a fascinating talk at TED about his work with Mathematica and Wolfram Alpha. Amongst other things, he pointed out how very simple computations can yield extremely complex behaviors. (He goes on to discuss his ambition for computing the entire physical universe. Say what you will, you gotta give the guy some credit for his wild ideas...) As an example he showed several cellular automata. What other examples of simple computations do you know of that yield fascinating results?

    Read the article

  • linq to xml. read. and assign to ViewData..noob

    - by raklos
    I have some xml similar to this: <?xml version="1.0" encoding="utf-8" ?> <data> <resources> <resource key="Title">Alpha</resource> <resource key="ImageName">Small.png</resource> <resource key="Desc">blah</resource> </resources> </data> using linq-xml how can i assign each resource here as a key value pair with the ViewData collection. Thanks.

    Read the article

  • How to achieve a palette effect on iPhone using OpenGL

    - by Joe
    I'm porting a 2d retro game to iPhone that has the following properties: targets OpenGL ES 1.1 entire screen is filled with tiles (textured triangle strip tile textured using a single 256x256 RGBA texture image the texture is passed to OpenGL once at the start of the game only 4 displayed colours are used one of the displayed colours is black The original game flashed the screen when time starts to run out by toggling the black pixels to white using an indexed palette. What is the best (i.e. most efficient) way to achieve this in OpenGL ES 1.1? My thoughts so far: Generate an alternative texture with white instead of black pixels, and pass to OpenGL when the screen is flashing Render a white poly underneath the background and render the texture with alpha on to display it Try and render a poly on top with some blending that achieves the effect (not sure this is possible) I'm fairly new to OpenGL so I'm not sure what the performance drawbacks of each of these are, or if there's a better way of doing this.

    Read the article

  • Making large toolbars like the iPod app

    - by andybee
    I am trying to create a toolbar programatically (rather than via IB) very similar to the toolbar featured in the iPhone app. Currently I've been experimenting with the UIToolbar class, but I'm not sure how (and if?) you can make the toolbar buttons centrally aligned and large like that in the iPod app. Additionally, regardless of size, the gradient/reflection artwork never correctly respects the size and is stuck as if the object is the default smaller size. If this cannot be done with a standard UIToolbar, I guess I need to create my own view. In this case, can the reflection/gradient be created programmatically or will it require some clever alpha tranparency Photoshopped artwork?

    Read the article

  • Simple but efficient way to store a series of small changes to an image?

    - by finnw
    I have a series of images. Each one is typically (but not always) similar to the previous one, with 3 or 4 small rectangular regions updated. I need to record these changes using a minimum of disk space. The source images are not compressed, but I would like the deltas to be compressed. I need to be able to recreate the images exactly as input (so a lossy video codec is not appropriate.) I am thinking of something along the lines of: Composite the new image with a negative of the old image Save the composited image in any common format that can compress using RLE (probably PNG.) Recreate the second image by compositing the previous image with the delta. Although the images have an alpha channel, I can ignore it for the purposes of this function. Is there an easy-to-implement algorithm or free Java library with this capability?

    Read the article

  • How do I create an 8-bit PNG with transparency from an NSBitmapImageRep?

    - by Rob Keniger
    I have a 32-bit NSBitmapImageRep which has an alpha channel with essentially 1-bit values (the pixels are either on or off). I want to save this bitmap to an 8-bit PNG file with transparency. If I use the -representationUsingType:properties: method of NSBitmapImageRep and pass in NSPNGFileType, a 32-bit PNG is created, which is not what I want. I know that 8-bit PNGs can be read, they open in Preview with no problems, but is it possible to write this type of PNG file using any built-in Mac OS X APIs? I'm happy to drop down to Core Image or even QuickTime if necessary. A cursory examination of the CGImage docs didn't reveal anything obvious. EDIT: I've started a bounty on this question, if someone can provide working source code that takes a 32-bit NSBitmapImageRep and writes a 256-color PNG with 1-bit transparency, it's yours.

    Read the article

  • mysql random generated value

    - by bbutle01
    I need to generate a random alpha/numeric to give to users that they come to the site to enter. I dont' know much about random numbers and such, I know there are seeding issues and such, but I'm not sure what they are. So, I used this: select substrING(md5(concat_ws('-',md5(username_usr), MD5(zip_usr), MD5(id_usr), MD5(created_usr))),-12) from users_usr Is this safe? I used concat_ws because sometimes zip is null, but the others never are. And yes, I know this is kinda short, but 1. They have to enter the last 4 of their social, 2. It's 1 time use, 3. There's no private data displayed back in the application and 4. I may use captcha, but since there's no private data, thats probably overkill. THanks

    Read the article

  • How to refresh to entire device's screen (Windows Mobile)?

    - by walidad
    Hi everybody, I'm working on a simple application that draws an alpha-blended picture on the screen's Device Context every 2 secs, I want to refresh the screen contents before the drawing operation (To erase the drawn pic), I have used many many trick but unfortunately, the screen won't refresh correctly, some regions still keep portions of the drawn pic I'm really frustrated from this issue :( These are the sources codes I have used, I'm using C# SendMessage(HWND_BROADCAST, WM_SYSCOLORCHANGE, IntPtr.Zero, IntPtr.Zero); // wasted time in the refreshing process is enough to keep this. UpdateWindow(HWND_BROADCAST);// does not work at all! InvalidateRect(IntPtr.Zero,IntPtr.Zero,true); // the same goes here. SendMessage(HWND_BROADCAST, WM_PAINT, IntPtr.Zero, IntPtr.Zero); // pfffff ! SendMessage(HWND_BROADCAST, WM_SETTINGCHANGE, new IntPtr(SPI_SETNONCLIENTMETRICS), IntPtr.Zero); // trying to refresh the explorer, no resutl I used also EnumWindows and call back , very slow and does not fit my case. I wanna refresh the whole screen Help please! Regards Waleed

    Read the article

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