Search Results

Search found 2828 results on 114 pages for 'blue rose'.

Page 31/114 | < Previous Page | 27 28 29 30 31 32 33 34 35 36 37 38  | Next Page >

  • How To Query Many-to-Many Table (one table's values becomes column headers)

    - by CRice
    Given this table structure, I want to flatten out the many-to-many relationships and make the values in the Name field of one table into column headers and the quantities from the same table into column values. The current idea which will work is to put the values into a Dictionary (hashtable) and represent this data in code but im wondering if there is a SQL way to do this. I am also using Linq-to-SQL for data access so a Linq-to-SQL solution would be ideal. [TableA] (int Id) [TableB] (int id, string Name) [TableAB] (int tableAId, int tableBId, int Quantity) fk: TableA.Id joins to TableAB.tableAId fk: TableB.Id joins to TableAB.tableBId Is there a way I can query the three tables and return one result for example: TableA [Id] 1 TableB [Id], [Name] 1, "Red" 2, "Green" 3, "Blue" TableAB [TableAId], [TableBId], [Quantity] 1 1 5 1 2 6 1 3 7 Query Result: [TableA.Id], [Red], [Green], [Blue] 1, 5, 6, 7

    Read the article

  • Problems encountered in changing a CRichEditCtrl selection color.

    - by dev ray
    I have written the following code after creating the CRichEditCtrl // 06112010 : The following code was added to highlight the textselection in black color instead of the default blue color of CRichEditCtrl. - 1311 { m_EditControl.SetSel(0,100); CHARFORMAT2 cf1; cf1.cbSize = sizeof(CHARFORMAT2); m_EditControl.GetSelectionCharFormat(cf1); cf1.dwMask = CFM_BACKCOLOR ; cf1.dwEffects &= ~CFE_AUTOBACKCOLOR; cf1.crBackColor = RGB(0,0,0); m_EditControl.SetSelectionCharFormat(cf1); m_EditControl.Invalidate(); } After this I am adding text, but the selection still comes in blue color instead of Black. Could someone please tell me what I am doing wrong?? Thanks, DeV

    Read the article

  • SQL Find duplicate sets

    - by Aheho
    given this Schema: table tblSET SetID int PK SetName nvarchar(100) Table tblSetItem SetID int PK ItemID int PK tblSetItem.SetID is a FK into the tblSet Table. Some data: tblSet SetID SetName 1 Red 2 Blue 3 Maroon 4 Yellow 5 Sky tblSetItem SetID ItemID 1 100 1 101 2 100 2 108 2 109 3 100 3 101 4 101 4 108 4 109 4 110 5 100 5 108 5 109 I'd like a way to identify which sets contain the same items. In the example above Red and Maroon contain the same items (100,101) and Blue and Sky contain the same values (100,108,109) Is there a sql query which would provide this answer?

    Read the article

  • List/Grid Toggle for Photo Gallery with Shadowbox

    - by InfamouslyBubbly
    so I'm new to this site, and new to jquery, and javascript as a whole really, but I have very good comprehension of HTML and CSS. For a class in school, I'm making a photo gallery webpage using the Shadowbox plugin. I have that part all down, but one of the requirements is to add some sort of user option that the user can change that will get saved in a cookie. (I haven't gotten to the cookie part yet) For my option, I decided to add a toggle that will switch the view of the page from a grid view (default) with images, to a list view of just the captions of the images. I figured out how to do that, but decided it could probably done in a much simpler fashion with the use of loops. Here is the HTML I have: <body> <div id="preferences"> <h1>My Photo Gallery</h1> <ul id="options"> <li><a href="#" id="list"><img src="media/listview.png" alt="List view"/></a></li> <li><a href="#" id="grid"><img src="media/gridview.png" alt="List view"/></a></li> </ul> </div> <div id="gallery"> <a rel="shadowbox[Gallery]" class="l1 img" href="media/img1.jpg" title="Black and White Leopard Pattern"><img src="media/thumb1.jpg" alt="Black and White Leopard Pattern"/></a> <a rel="shadowbox[Gallery]" class="l2 img" href="media/img2.jpg" title="Snow Leopard Pattern"><img src="media/thumb2.jpg" alt="Snow Leopard Pattern"/></a> <a rel="shadowbox[Gallery]" class="l3 img" href="media/img3.jpg" title="Colorful Triangle Pattern"><img src="media/thumb3.jpg" alt="Colurful Triangle Pattern"/></a> <a rel="shadowbox[Gallery]" class="l4 img" href="media/img4.jpg" title="Tie Dye Zebra Stripe Pattern"><img src="media/thumb4.jpg" alt="Tie Dye Zebra Stripe Pattern"/></a> <a rel="shadowbox[Gallery]" class="l5 img" href="media/img5.jpg" title="Blue Knitted Pattern"><img src="media/thumb5.jpg" alt="Blue Knitted Pattern"/></a> <a rel="shadowbox[Gallery]" class="l6 img" href="media/img6.jpg" title="Black and White Damask Pattern"><img src="media/thumb6.jpg" alt="Black and White Damask Pattern"/></a> <a rel="shadowbox[Gallery]" class="l7 img" href="media/img7.jpg" title="Wooden Panel Pattern"><img src="media/thumb7.jpg" alt="Wooden Panel Pattern"/></a> <a rel="shadowbox[Gallery]" class="l8 img" href="media/img8.jpg" title="Brick Pattern"><img src="media/thumb8.jpg" alt="Brick Pattern"/></a> <a rel="shadowbox[Gallery]" class="l9 img" href="media/img9.jpg" title="Watercolor Pattern"><img src="media/thumb9.jpg" alt="Watercolor Pattern"/></a> <a rel="shadowbox[Gallery]" class="l10 img" href="media/img10.jpg" title="Orange Stripe Pattern"><img src="media/thumb10.jpg" alt="Orange Stripe Pattern"/></a> <a rel="shadowbox[Gallery]" class="l11 img" href="media/img11.jpg" title="Blue Scales Pattern"><img src="media/thumb11.jpg" alt="Blue Scales Pattern"/></a> <a rel="shadowbox[Gallery]" class="l12 img" href="media/img12.jpg" title="Woven Pattern"><img src="media/thumb12.jpg" alt="Woven Pattern"/></a> </div> </body> So here is the sample that works (for the list portion anyways), but seems excessive in terms of code since I'd have to repeat for each image: $(document).ready(function(){ $( "#list" ).click(function() { $( "a.l1" ).removeClass( "img" ); $( "a.l1" ).addClass( "lst" ); $( "a.l1" ).text( $( "a.l1" ).attr( "title" ); //repeat for l1 through l12 (that`s the letter L not a 1) }); $( "#grid" ).click(function() { $( "a.l1" ).removeClass( "lst" ); $( "a.l1" ).addClass( "grid" ); //actually have no idea at all how to get this back to the original img tag other than maybe .innerHTML??? //repeat for l1 through l12 (again, that`s the letter L not a 1) }); }): And here is kinda how I'd like it (Y'know, except in a way that works) $(document).ready(function(){ var i = 1; var selcur = $( "'a.l" + i + "'" ); var title = selcur.attr( "title" ); var image = '<img src="media/thumb' + i + '.jpg" alt="' + title + '"/>'; $( "#list" ).click(function() { while (1<=12) { selcur.addClass("lst"); selcur.removeClass("img"); selcur.text( title ); i++; } i = 1; }); $( "#grid" ).click(function() { while (1<=12) { selcur.removeClass("lst"); selcur.addClass("img"); selcur.text( image ); i++; } i = 1; }); }); Please tell me how I am going about this wrong, keep in mind again I'm new to this, I appreciate any and all responses! Is there a better way to do this? I really want to keep it simple.

    Read the article

  • How to get a green to show up like the charging battery on the iPhone lock screen?

    - by tarheel
    I am trying to get a color to show up on screen just like the charging battery (shown here): After looking at the Apple Documentation on UIColor here, I have attempted using both colorWithHue:saturation:brightness:aplha: and colorWithRed:green:blue:alpha: to get a color to show up like that. For example when I use colorWithHue:.3 saturation:.84 brightness:1 alpha:.5 on a black background, it renders a color like this: or the colorWithRed:0 green:1 blue:0 alpha:.5 on a black background shows up like this: It doesn't have that translucent or glossy look to it. Is there a better method to use? Or do I just not have the values right? (I have tried many combinations)

    Read the article

  • How to align item to the very bottom within flexible box layout column?

    - by Christina Lacey
    So far I have the three columns laid out in a vertical box (can't post images yet so here's a link): http://imgur.com/4Y34c <div id="vbox"> <div id="blck1"></div> <div id="blck2"></div> <div id="blck3"><div id="yellow"></div><div id="blue"></div></div> </div> css #vbox{ display: box; box-orient: vertical; } #vbox > div { box-flex: 1; } The problem is that I don't know how to get the blue box to align to the bottom of the third column.. I tried all the alignment properties, i must be doing something wrong. Any ideas???

    Read the article

  • XForms: set default selection in dropdown in binding

    - by Purni
    I have a main instance named 'myinstance' which has the element . Color can be 'Red', 'Blue', 'Green' or ''Yellow'. The colors are populated in a drop-down from another instance called 'colorsinstance'. When my form loads, I want the default in the dropdown to be set to 'Green' in the nodeset binding. <instance id="colorsinstance"> <items> <item label="Color1" value="Red"/> <item label="Color2" value="Blue"/> <item label="Color3" value="Green"/> <item label="Color4" value="Yellow"/> </items> </instance> Main instance binding is as follows: <xforms:bind nodeset="instance('myinstance')"> <xforms:bind nodeset="./color" required="true()"/> </xforms:bind>

    Read the article

  • simulate to change the background color when click the link

    - by tom
    I have the following HTML and the java script below to simulate the background color change when the link block is clicked, but it doesn't seem to work. Any reason why? If I have only the onmousedown event handled, the background color will be changed to blue for sure. But if both onmousedown and onmouseup are handled, nothing would change visually. note... function changeColorOnMouseDown() { document.getElementById('note').style.background='blue'; } function changeColorOnMouseUp() { document.getElementById('note').style.background='#d8dde7'; }

    Read the article

  • Changing a link-style, only for a certain class

    - by abelenky
    I want to change the link-style for some of my links, like this: a:hover { /* These links will be blue when hovered-over */ background-color: #3366FF; } However, I only want this to take effect in my Navigation Bar, and not for regular links. I have tried variations on this: #navbar a:hover { /* These links will be blue when hovered-over */ background-color: #3366FF; } With the intended meaning "this only applies to links with <div id="navbar">" But it didn't work. How can I set the style for only certain links, defined by the class or id of their container?

    Read the article

  • parsing Two-dimensional array in c

    - by gitter78
    I'm trying to parse an array that looks like the one below: char *arr[][2] = { { "1", "Purple" }, { "2", "Blue" }, { "22", "Red" }, ... }; I was thinking having a loop as: char *func(char *a){ for(i = 0; i<sizeof(arr)/sizeof(arr[0]);i++){ if(strstr(a,arr[i][0])!=NULL) return arr[i][1]; } } char *out; const char *hello = "this is my 2 string"; out = func(hello); In this case, I'm trying to get the second value based on the first one: Purple, Blue Red, etc.. The question is how would go in parsing this and instead of printing out the value, return the value. UPDATE/FIXED: It has been fixed above. Thanks

    Read the article

  • geom_rect and NULL

    - by csgillespie
    I've been looking at the geom_rect example in section 5.10 of the ggplot2 book and don't understand the purpose of the NULL's in the aes function. For example, using the mpg data: g = ggplot(data=mpg, aes(x=displ, y=hwy)) + geom_point() #Produces a plot with a transparent filled region g + geom_rect(aes(NULL, NULL), alpha=0.1,xmin=5, xmax=7, ymin=10, ymax=45, fill="blue") #Solid filled region (v0.9) or nothing in v0.8 g + geom_rect(alpha=0.1,xmin=5, xmax=7, ymin=10, ymax=45, fill="blue") My understanding is that the NULL's are resetting the x & y mapping, but I don't see why this should affect the transparency.

    Read the article

  • NoMethodError using Memcached Sinatra-style

    - by sevennineteen
    I've just installed Memcached on my Mac and updated my Sinatra app configuration as described in Heroku's documentation, but I'm getting a NoMethodError when trying to use the hash-based syntax they specify: >> CACHE['color'] = 'blue' >> CACHE['color'] Using explicit get and set methods as below seems to work fine. >> CACHE.set('color', 'blue') >> CACHE.get('color') If necessary I can use the latter syntax, but the former seems more elegant. I haven't tested this on Heroku's environment since I'd like whatever implementation I use to work on my local environment as well. Thanks!

    Read the article

  • OnSize() Problem in VC++

    - by Anu
    Hi, In my VC++ MFC applcaiton,i have different views.And in each view,when i maximize it,i changed the size and position to new thing(Normally it fully get maximixed to screen size).But i dont want tht.So in OnSize() i coded like this. void CChildFrame::OnSize(UINT nType, int cx, int cy) { CMDIChildWnd::OnSize(nType, cx, cy); int XBorder = GetSystemMetrics(SM_CXMAXIMIZED); int YBorder = GetSystemMetrics(SM_CYMAXIMIZED); switch (nType) { case SIZE_MAXIMIZED: SetWindowPos(NULL,0,60,XBorder-45,YBorder-60,SWP_NOZORDER ); break; } } But what happened is?When i maximize the view,its get maximized to above mention size only.But in that blue bar,there si no minimize,maximize,close button. When i double click in the blue bar,its get to resumed to previous postion with all buttons. How can i get that?

    Read the article

  • Java2D: if statement doesn`t work with java.awt.Color

    - by DarkSun
    I have a getPixelColour function: Color getPixelColor(int x, int y) { if(mazeImage == null) System.out.println(":("); int pixel = mazeImage.getRGB(x, y); int red = (pixel & 0x00ff0000) >> 16; int green = (pixel & 0x0000ff00) >> 8; int blue = pixel & 0x000000ff; return new Color(red,green,blue); } For example a pixel is black, and System.out.println(getPixelColor(x,y) + " " + Color.BLACK); writes "java.awt.Color[r=0,g=0,b=0] java.awt.Color[r=0,g=0,b=0]" But getPixelColor(x,y) == Color.BLACK return false. What's wrong with it?

    Read the article

  • Hold border and Resize two or more DIV simultaneously in the same container

    - by Manu
    Code : <div id="widget1"> <div class="part blue">this is the part</div> <div class="part white">of the genial</div> <div class="part red">and good widget</div> </div> Let's say that div#widget1 is 99px width and div.part are 33px by default. How can I easily resize div.blue by increasing its width and deacreasing width of other div.part proportionnaly ? http://jqueryui.com/demos/resizable/#synchronous-resize : give an example which show element increase in the same time. Thanks,

    Read the article

  • Most optimal way to detect if black (or any color pixels) exist in an image file?

    - by Zando
    What's the best and most flexible algorithm to detect any black (or colored pixel) in a given image file? Say I'm given an image file that could, say, have a blue background. And any non blue pixel, including a white pixel, is counted as a "mark". The function returns true if there are X number of pixels that deviate from each other at a certain threshold. I thought it'd be fastest to just simply iterate through every pixel and see if its color matches the last. But if it's the case that pixel (0,0) is deviant, and every other pixel is the same color (and I want to allow at least a couple deviated pixels before considering an image to be "marked), this won't work or be terribly efficient.

    Read the article

  • Replace carriage returns and line feeds in out.println?

    - by Mike
    I am a novice coder and I am using the following code to outprint a set of Image keywords and input a "|" between them. <% Set allKeywords = new HashSet(); for (AlbumObject ao : currentObjects) { XmpManager mgr = ao.getXmpManager(); if (mgr != null) { allKeywords.addAll(mgr.getKeywordSet()); } } //get the Iterator Iterator itr = allKeywords.iterator(); while(itr.hasNext()){ String str = itr.next(); out.println(str +"|"); } %> I want the output to be like this: red|blue|green|yellow but it prints out: red| blue| green| yellow which breaks my code. I've tried this: str.replaceAll("\n", ""); str.replaceAll("\r", ""); and str.replaceAll("(?:\\n|\\r)", ""); No luck. I'd really appreciate some help!

    Read the article

  • Set the thumbImage and watch the slider-bar disappear?

    - by Roberta
    [sld1 setThumbImage:[UIImage imageNamed:@"Blue.png"] forState:UIControlStateHighlighted]; [sld1 setThumbImage:[UIImage imageNamed:@"Blue.png"] forState:UIControlStateNormal ]; Would that cause the slider-bar image to disappear? Mine are all gone. (The thumb-image displays just fine.) Apple's docs make it sounds like I can use any ONE of above 2 lines of code. (But I guess I really need both.) And I can't find anything about "you must always do all 4": Set the normal-state image. Set the highlighted-state image. Set the setMinimumTrackImage. Set the setMaximumTrackImage.

    Read the article

  • Partition loop understanding

    - by user1795732
    Why the loop body of the partition method never throws an ArrayIndexOutOfBounds Exception? public static int partition( int[] a, low, high ) { int k = low, m = low; /* loop invariant: * low <= k <= m <= high and * all elements in a[low..k-1] are RED (i.e., < pivot) and * all elements in a[k..m-1] are BLUE (i.e., >= pivot) */ while (m != high) { if (a[m] >= pivot) // a[m] is BLUE { } else { // a[m] is RED swap(a,k,m); k = k+1; } m = m+1; } return k; }

    Read the article

  • Editing A Library Symbol From ActionScript

    - by Anonymous
    In the Flash authoring environment I can edit a library symbol and all on-stage instances based upon it reflect the changes. How can I do the same thing in ActionScript? There seems to be no way to address a library symbol. For example: Inside Flash CS3, I have created a Square.swf file that has 100 instances of the library symbol Square. Now, Square.swf is loaded into another file BlueSquare.swf and I want to change the Square symbol into a blue square so that all instances of Square become blue. How do I do this using Actionscript? Thanks for the help.

    Read the article

  • which type is best for three radiobuttons?

    - by Manog
    Maybe you consider this question trivial but im just curious what is your opinion. I have three radiobuttons. "Show blue", "Show red" and "Show all". I did it with nullable boolean. There is collumn in database where blue is 0 and red is 1 so in metode i have to translate bool to int to compare those values (i do it in c#).Of course it works, but i wonder if it is the best solution. And question is wich type is best in this case? nullable bool, int, or maybe string?

    Read the article

  • Efficient method of finding database rows that have *one or more* qualities from a list of seven qualities

    - by hithere
    Hello! For this question, I'm looking to see if anyone has a better idea of how to implement what I'm currently planning on implementing (below): I'm keeping track of a set of images, using a database. Each image is represented by one row. I want to be able to search for images, using a number of different search parameters. One of these parameters involves a search-by-color option. (The rest of the search stuff is currently working fine.) Images in this database can contain up to seven colors: -Red -Orange -Yellow -Green -Blue -Indigo -Violet Here are some example user queries: "I want an image that contains red." "I want an image that contains red and blue." "I want an image that contains yellow and violet." "I want an image that contains red, orange, yellow, green, blue, indigo and violet." And so on. Users make this selection through the use of checkboxes in an html form. They can check zero checkboxes, all seven, and anything in between. I'm curious to hear what people think would be the most efficient way to perform this database search. I have two possible options right now, but I feel like there must be something better that I'm not thinking of. (Option 1) -For each row, simply have seven additional fields in the database, one for each color. Each field holds a 1 or 0 (true/false) value, and I SELECT based on whatever the user has checked off. (I didn't like this solution so much, because it seemed kind of wasteful to add seven additional fields...especially since most pictures in this table will only have 3-4 colors max, though some could have up to 7. So that means I'm storing a lot of zeros.) Also, if I added more searchable colors later on (which I don't think I will, but it's always possible), I'd have to add more fields. (Option 2) -For each image row, I could have a "colors" text field that stores space-separated color names (or numbers for the sake of compactness). Then I could do a fulltext match against search through the fields, selecting rows that contain "red yellow green" (or "1 3 4"). But I kind of didn't want to do fulltext searching because I already allow a keyword search, and I didn't really want to do two fulltext searches per image search. Plus, if the database gets big, fulltext stuff might slow down. Any better options that I didn't think of? Thanks! Side Note: I'm using PHP to work with a MySQL database.

    Read the article

  • MULTIPLE CRITERIA TABLE JOIN

    - by user1447203
    I have a table listing clothing items (shirt, trousers, etc) named . Each item is identified with a unique CLOTHING.CLOTHING_ID. So a blue shirt is 01, a flowery shirt is 12 and jeans are 07 say. I have a second table identifying outfits with a column for shirts, for trousers, shoes etc. For example Outfit 1: shirt 01, trousers 07 (i.e. blue shirt with jeans) Outfit 2: shirt 12, trousers 07 (so flowery shirt with jeans). This table is named and each outfit is unique with OUTFIT_LIST.OUTFIT_ID. I want to produce a select statement that will list each outfit's contents, i.e. find the clothing specified in Outfit 1. Any help would be very much appreciated, and apologies in advance if I am missing a very simple solution. I have been playing with JOINS of all descriptions and CONCATS and so on with now luck - I am very new to this. Thanks.

    Read the article

  • In-memory data structure that supports boolean querying

    - by sanity
    I need to store data in memory where I map one or more key strings to an object, as follows: "green", "blue" -> object1 "red", "yellow" -> object2 I need to be able to efficiently receive a list of objects, where the strings match some boolean criteria, such as: ("red" OR "green") AND NOT "blue" I'm working in Java, so the ideal solution would be an off-the-shelf Java library. I am, however, willing to implement something from scratch if necessary. Anyone have any ideas? I'd rather avoid the overhead of an in-memory database if possible, I'm hoping for something comparable in speed to a HashMap (or at least the same order of magnitude).

    Read the article

  • Display x if x display y if y (bad title I know)

    - by user1914940
    Ok so after reading the title you are most likely like...what? Ok, so I have a jquery code that displays input box if an item with prefix Blue from dropdown menu is selected. Code: $(function() { $('#text1').hide(); $('#select2').on('change', function(event) { var opt = this.options[ this.selectedIndex ]; var picked_blue = $(opt).text().match(/Blue/i); if(picked_blue) { $('#text1').show(); } else { $('#text1').hide(); } }); }); But what I also need to add is to display something else if any other item from dropdown menu is selected.

    Read the article

< Previous Page | 27 28 29 30 31 32 33 34 35 36 37 38  | Next Page >