Search Results

Search found 948 results on 38 pages for 'cryptic star'.

Page 20/38 | < Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >

  • Create a grid in WPF as Template programmatically

    - by wickie79
    I want to create a basic user control with a style programmatically. In this style i want to add a Grid (no problem), but i dont can add column definitions to this grid. My example code is ControlTemplate templ = new ControlTemplate(); FrameworkElementFactory mainPanel = new FrameworkElementFactory(typeof(DockPanel)); mainPanel.SetValue(DockPanel.LastChildFillProperty, true); FrameworkElementFactory headerPanel = new FrameworkElementFactory(typeof(StackPanel)); headerPanel.SetValue(StackPanel.OrientationProperty, Orientation.Horizontal); headerPanel.SetValue(DockPanel.DockProperty, Dock.Top); mainPanel.AppendChild(headerPanel); FrameworkElementFactory headerImg = new FrameworkElementFactory(typeof(Image)); headerImg.SetValue(Image.MarginProperty, new Thickness(5)); headerImg.SetValue(Image.HeightProperty, 32d); headerImg.SetBinding(Image.SourceProperty, new Binding("ElementImage") { RelativeSource = new RelativeSource(RelativeSourceMode.TemplatedParent) }); headerPanel.AppendChild(headerImg); FrameworkElementFactory headerTitle = new FrameworkElementFactory(typeof(TextBlock)); headerTitle.SetValue(TextBlock.FontSizeProperty, 16d); headerTitle.SetValue(TextBlock.VerticalAlignmentProperty, VerticalAlignment.Center); headerTitle.SetBinding(TextBlock.TextProperty, new Binding("Title") { RelativeSource = new RelativeSource(RelativeSourceMode.TemplatedParent) }); headerPanel.AppendChild(headerTitle); FrameworkElementFactory mainGrid = new FrameworkElementFactory(typeof(Grid)); FrameworkElementFactory c1 = new FrameworkElementFactory(typeof(ColumnDefinition)); c1.SetValue(ColumnDefinition.WidthProperty, new GridLength(1, GridUnitType.Star)); FrameworkElementFactory c2 = new FrameworkElementFactory(typeof(ColumnDefinition)); c2.SetValue(ColumnDefinition.WidthProperty, new GridLength(1, GridUnitType.Auto)); FrameworkElementFactory c3 = new FrameworkElementFactory(typeof(ColumnDefinition)); c3.SetValue(ColumnDefinition.WidthProperty, new GridLength(3, GridUnitType.Star)); FrameworkElementFactory colDefinitions = new FrameworkElementFactory(typeof(ColumnDefinitionCollection)); colDefinitions.AppendChild(c1); colDefinitions.AppendChild(c2); colDefinitions.AppendChild(c3); mainGrid.AppendChild(colDefinitions); mainPanel.AppendChild(mainGrid); FrameworkElementFactory content = new FrameworkElementFactory(typeof(ContentPresenter)); content.SetBinding(ContentPresenter.ContentProperty, new Binding() { RelativeSource = new RelativeSource(RelativeSourceMode.TemplatedParent), Path = new PropertyPath("Content") }); mainGrid.AppendChild(content); templ.VisualTree = mainPanel; Style mainStyle = new Style(); mainStyle.Setters.Add(new Setter(UserControl.TemplateProperty, templ)); this.Style = mainStyle; But the creation of FrameworkElementFactory with type ColumnDefinitionCollection will throw an exception "'ColumnDefinitionCollection' type must derive from FrameworkElement, FrameworkContentElement, or Visual3D." Who can help me?

    Read the article

  • Denormalization database

    - by Pedro Magalhaes
    I was taking a look at SSB (Star Schema Benchmark -http://www.percona.com/docs/wiki/_media/benchmark:ssb:starschemab.pdf) and then i was thinking if is possible to denormalize all tables from the SSB? So database size will increase a lot but potencially the performance will grow up. Is that right? Is It possible? Thanks and sorry for my poor english

    Read the article

  • UITableViewCellStyleValue2 edit indicators?

    - by Jason Jardim
    I am using this style of table view UITableViewCellStyleValue2. I set editing, but I cant seem to get the arrows to show up on the right of the cell - like the Contacts app. Also in the contacts app I notice that if I have a Favorite it puts a * (star) to the right. Any info on how to get an image would be appreciated. Thanks!

    Read the article

  • Inherited TShape.Paint does not work after overriding Shape property

    - by DarkWalker
    I'm to code a TExpandedShape class inherited from TShape. TExpandedShape must act like TShape and be able to draw extra shapes: Polygon and Star. Here is my code unit ExpandedShape; interface uses SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, Forms, Dialogs, ExtCtrls, Windows; type TExpandedShapeType = ( stRectangle, stSquare, stRoundRect, stRoundSquare, stEllipse, stCircle, stPolygon, stStar ); TExpandedShape = class(TShape) private FShape: TExpandedShapeType; FEdgeCount: integer; procedure SetShape(const Value: TExpandedShapeType); procedure SetEdgeCount(const Value: integer); public procedure Paint; override; published property Shape : TExpandedShapeType read FShape write SetShape;// default stPolygon; property EdgeCount : integer read FEdgeCount write SetEdgeCount default 5; end; procedure Register; implementation procedure Register; begin RegisterComponents('Course', [TExpandedShape]); end; // TExpandedShape procedure TExpandedShape.Paint; begin case Shape of stStar : begin {Draw Star} end; stPolygon : begin {Draw Polygon} end; else begin {It is supposed to draw Circle, Rectangle etc, but it does not} inherited; end; end; end; procedure TExpandedShape.SetEdgeCount(const Value: integer); begin FEdgeCount := Value; Repaint; end; procedure TExpandedShape.SetShape(const Value: TExpandedShapeType); begin FShape := Value; Repaint; end; end. So, what is wrong? IMO TShape.Paint checks private value like FShape in case section and then decides what to draw. When inherited Paint method is called in my code it checks FShape value sees default 0 value [stRectangle] in there and draws it. PS: I did solve it with blackmagic way using Shape1 property instead of Shape one and if Shape1 value is not stPolygon or stStar i do like this: begin Shape := TShapeType(Shape1); inherited end; But this option is not really an option. I need a good short nice-looking one.

    Read the article

  • insert c# code inside javascript

    - by niao
    Greetings, how can I inject c# code (my Model property) inside javascript? I want to do something like this: $(".star<%=Model.ROWGUID %>").mouseover(function() { var span = $(this).parent("span"); var newRating = $(this).attr("value"); setRating(span, newRating); });

    Read the article

  • Quantum PSO and Charged PSO (PSO = Particle Swarm Optimizer)

    - by The Elite Gentleman
    Hi Guys I need to implement PSO's (namely charged and quantum PSO's). My questions are these: What Velocity Update strategy do each PSO's use (Synchronous or Asynchronous particle update) What social networking topology does each of the PSO's use (Von Neumann, Ring, Star, Wheel, Pyramid, Four Clusters) For now, these are my issues. All your help will be appreciated. Thanks.

    Read the article

  • UINavigationBar BarButtonItem with Plain Style

    - by choise
    Hi, i got the following code: - (id)init { if (self = [super init]) { self.title = @"please wait"; UIBarButtonItem *favorite = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"star.png"] style:UIBarButtonItemStylePlain target:self action:@selector(buttonFavoriteClicked:)]; self.navigationItem.rightBarButtonItem = favorite; } return self; } but my button looks still like a Button with UIBarButtonItemStyleBordered is there a way to set a button with plain style at this position?

    Read the article

  • Getting shortest path between 2 nodes

    - by Xtapodi
    Hello, i want to ask if there is any way to generate the shortest path from node A to node B without generating the shortest paths to all the other nodes (stop when node B is in the examined set) with A-star in QuickGraph. I want to plug QuickGraph into a game and thus generating all the paths is not allowed from the time limitations the environment imposes. Any other suggestions to solve my problem in C# are welcome Thanks in advance, Xtapodi

    Read the article

  • Tool tip in modal window...

    - by piemesons
    I m havin a jqueryui modal form. and i m using jquery cluetip tool tip plugin but tool tip is not working in a proper way on modal window form.. this is the screen shot ... Star is showing the place where tool tip must be there and arrows are showing the place where tool tip is showin.. can any body tell me how to figure this out..

    Read the article

  • Rating mechanisms

    - by Jasie
    Is there any place that showcases a bunch of different types of rating systems (like using multiple sliders, star ratings, up/down votes)? I'm trying to get ideas for a better rating system than just up/down (more criteria). (I'm not interested in the backend, but the human/computer interaction part of it).

    Read the article

  • how can i put an image into select?

    - by Syom
    i have this script <select> <option value="1">one<img src="star.gif" height="15" width="15"></img> </option> </select> but it doesn't work. how can i put an image into select? thanks update: so it's impossible?:(

    Read the article

  • Draw a cross at center of a UIImagePickerController.

    - by VansFannel
    Hello. I'm very new on iPhone development. I'm trying to draw a cross over the image obtained from camera. I'm using a custom ViewController that inherits from UIImagePickerController. When I star the application, I see the cross, but a few seconds after the cross disappears. Should I use cameraOverlayView? Thank you

    Read the article

  • How to kill process on Remote Desktop Connection?

    - by user118190
    I am working remotely on a Windows Server via Remote Desktop Connection and some process has hung the server. I looked up how to bring up the Task Manager remote (equivalent of locally doing CTRL+ALT+DEL) and I found CTRL+ALT+END and it doesn't seem to work. I tried logging off and logging back on and the system is still up (tried earlier seeing the properties of My Comptuer, FYI). Does anyone know how I can escape this 'hindrance' and star fresh?!?

    Read the article

  • Getting shortest path between 2 nodes in quickgraph

    - by Xtapodi
    Hello, i want to ask if there is any way to generate the shortest path from node A to node B without generating the shortest paths to all the other nodes (stop when node B is in the examined set) with A-star in QuickGraph. I want to plug QuickGraph into a game and thus generating all the paths is not allowed from the time limitations the environment imposes. Any other suggestions to solve my problem in C# are welcome Thanks in advance, Xtapodi

    Read the article

  • Generating a URL pattern when provided a set of 5 or so URLs

    - by ryan
    Provided with a set of URLs, I need to generate a pattern, For example: http://www.buy.com/prod/disney-s-star-struck/q/loc/109/213724402.html http://www.buy.com/prod/samsung-f2380-23-widescreen-1080p-lcd-monitor-150-000-1-dc-8ms-1920-x/q/loc/101/211249863.html http://www.buy.com/prod/panasonic-nnh765wf-microwave-oven-countertop-1-6-ft-1250w-panasonic/q/loc/66357/202045865.html http://www.buy.com/prod/escape-by-calvin-klein-for-women-3-4-oz-edp-spray/q/loc/66740/211210860.html http://www.buy.com/prod/v-touch-8gb-mp3-mp4-2-8-touch-screen-2mp-camera-expandable-minisd-w/q/loc/111/211402014.html Pattern is http://www.buy.com/prod/[^~]/q/loc/[^~].html

    Read the article

  • Eclipse RCP and JFace: Problems with Images in Context menu and TreeViewer

    - by Juri
    I'm working on an Eclipse RCP application. Today I experienced some troubles when displaying images in the context menu. What I wanted to do is to add a column to my table containing images of stars for representing a user rating. On Windows, this causes some problems, since the star images are squeezed up on the left corner of the table cell instead of expanding on the whole cell, but I'll solve that somehow. In addition I have a context menu on the table, with an entry called "rate" where again the different stars from 1 to 5 (representing the rating level) are shown, such that the user can click on it for choosing different ratings. That works fine on Windows. Now I switched to Linux (Ubuntu) to see how it works out there, and strangely, the stars in the table cell are layed out perfectly, while the stars on the context menu don't even show up. On the context menu I'm using an action class where I'm setting the image descriptor for the star images: public class RateAction extends Action { private final int fRating; private IStructuredSelection fSelection; public RateAction(int rating, IStructuredSelection selection) { super("", AS_CHECK_BOX); fRating = rating; fSelection = selection; setImageDescriptor(createImageDescriptor()); } /** * Creates the correct ImageDescriptor depending on the given rating * @return */ private ImageDescriptor createImageDescriptor() { ImageDescriptor imgDescriptor = null; switch (fRating) { case 0: return OwlUI.NEWS_STARON_0; case 1: return OwlUI.NEWS_STARON_1; case 2: return OwlUI.NEWS_STARON_2; case 3: return OwlUI.NEWS_STARON_3; case 4: return OwlUI.NEWS_STARON_4; case 5: return OwlUI.NEWS_STARON_5; default: break; } return imgDescriptor; } /* * @see org.eclipse.jface.action.Action#getText() */ @Override public String getText() { //return no text, since the images of the stars will be displayed return ""; } ... } Does somebody know why this strange behaviour appears? Thanks a lot. (For some strange reason, the images don't appear. Here are the direct URLs: http://img187.imageshack.us/img187/4427/starsratingho4.png http://img514.imageshack.us/img514/8673/contextmenuproblemgt1.png) //Edit: I did some tries and it seems as if the images just don't appear when using a Checkbox style for the context menu (see constructor of the RateAction). When I switched to a PushButton style, the images appeared, although not correctly scaled, but at least they were shown.

    Read the article

  • Tiny MCE + Flash

    - by matthewb
    I am attempting to use tiny mce to insert a flash video from youtube. I have the media plugin installed and working from what I can tell but when I view the page http://philadelphia.cities2night.com/articles/show/article/105/arthur-kade-runs-into-stewart-bradley-starting-star-linebacker-for-the-philadelphia-eagles-and-talks-about-fashion-show-he-s-hosting I see the object tags. Is this a issue with the plugin?

    Read the article

  • Detecting abuse for post rating system

    - by Steven smethurst
    I am using a wordpress plugin called "GD Star Rating" to allow my users to vote on stories that I post to one of my websites. http://everydayfiction.com/ Recently we have been having a lot of abuse of the system. Stories that have obviously been voted up artificially. "GD Star Rating" creates some detailed logs when a user votes on a story. Including; IP, Time of vote, and user_adgent, ect.. For example this story has 181 votes with an average of 5.7 http://www.everydayfiction.com/snowman-by-shaun-simon/ Most other stories only get around ~40 votes each day. At first I thought that the story got on to a social bookmarking site Digg, Stumbleupon ect... but after checking the logs I found that this story is getting the same amount of traffic that a normal story gets ~2k-3k. I checked if all the votes for this perpendicular story where coming from a the same IP address. I could see this happening if a user was at a school's computer lab using all their lab computers to vote up this story. Not one duplicate IP address in the log for this story. SELECT ip, COUNT(*) as count FROM wp_gdsr_votes_log WHERE id=3932 GROUP BY (ip ) ORDER BY count DESC Next I thought that a use might be using a proxy to vote up a story. I checked this by grouping all the browser user_agent together to see if there a single browser voting in a perpendicular way. At most 7 users where using a similar browser but voted sporadically (1-5), no evidence of wrong doing. SELECT user_agent, COUNT(*) as count FROM wp_gdsr_votes_log WHERE id=3932 GROUP BY ( user_agent) ORDER BY count DESC I check was to see if all the votes came in at a once. Maybe someone has a really interesting bot that can change the user_adgent and uses proxies, ect... At most 5 votes came with in 2 mins of each other. It doesn't seem to be any regularity on how people vote (IE a 5 vote does not come in once a min) SELECT * FROM wp_gdsr_votes_log WHERE id =3932 AND vote=5 ORDER BY wp_gdsr_votes_log.voted DESC The obvious solution to this problem is to force people to login before they are allowed to vote. But I would prefer to not have to go down that route unless it is absolutely necessary. I'm looking for suggestions on things to test for to detect the abuse.

    Read the article

< Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >