Search Results

Search found 3130 results on 126 pages for 'half duplex'.

Page 71/126 | < Previous Page | 67 68 69 70 71 72 73 74 75 76 77 78  | Next Page >

  • How to draw a full ellipse in a StreamGeometry in WPF?

    - by romkyns
    The only method in a StreamGeometryContext that seems related to ellipses is the ArcTo method. Unfortunately it is heavily geared to joining lines rather than drawing ellipses. In particular, the position of the arc is determined by a starting and ending point. For a full ellipse the two coincide obviously, and the exact orientation becomes undefined. So far the best way of drawing an ellipse centered on 100,100 of size 10,10 that I found is like this: using (var ctx = geometry.Open()) { ctx.BeginFigure(new Point(100+5, 100), isFilled: true, isClosed: true); ctx.ArcTo( new Point(100 + 5*Math.Cos(0.01), 100 + 5*Math.Sin(0.01)), // need a small angle but large enough that the ellipse is positioned accurately new Size(10/2, 10/2), // docs say it should be 10,10 but in practice it appears that this should be half the desired width/height... 0, true, SweepDirection.Counterclockwise, true, true); } Which is pretty ugly, and also leaves a small "flat" area (although not visible at normal zoom levels). How else might I draw a full ellipse using StreamGeometryContext?

    Read the article

  • Loading a UIDatePicker in Landscape on a UINavigationController

    - by Ryan
    I have a custom UINavigationController that supports auto-rotate. I also have a UIDatePicker on one of my views that I throw onto the stack of the Navigation controller. The auto-rotate works if I start the date picker view in portrait and then rotate it. If I try load the date picker view in landscape to begin with, the view is all messed up. It looks like it would if it didn't support rotation and the frame only has about half of the picker visible and off center. I've tried making my own date picker that supports auto-rotate in case that was the problem, I've tried creating two different views and swapping them out, and I've tried changing the view frame size on the ViewWillAppear method. None of them seem to be working for me as of yet. Anyone have any suggestions on how to get the date picker to show up in landscape correctly on a navigation controller? I probably am overlooking something simple and the answer is right in front of me, but I'm not finding it.

    Read the article

  • How would you go about tackling this problem?

    - by incrediman
    I have a programming contest coming up in about half a week, and I've been prepping :) I found a bunch of questions from this canadian competition, they're great practice: http://cemc.math.uwaterloo.ca/contests/computing/2009/stage2/day1.pdf I'm looking at problem B ("Dinner"). Any idea where to start? I can't really think of anything besides the naive approach (ie. trying all permutations) which would take too long to be a valid answer. Btw, the language there says c++ and pascal I think, but i don't care what language you use - I mean really all I want is a brief description of how to tackle the problem. Like "use X technique treating each programmer as a Y" or something :)

    Read the article

  • Is there a way to put relationships/contraints into CSS?

    - by hekevintran
    In every design tool or art principle I've heard of, relationships are a central theme. By relationships I mean the thing you can do in Adobe Illustrator to specify that the height of one shape is equal to half the height of another. You cannot express this information in CSS. CSS hard-codes all values. Using a language like LESS that allows variables and arithmetic you can get closer to relationships but it's still a CSS variant. This inability in my mind is the biggest problem with CSS. CSS is supposed to be a language that describes the visual component of a Web page but it ignores relationships and contraints, ideas that are at the core of art. How possible is it to imagine a new Web design language that can express relationships and contraints that can be implemented in JavaScript using the current CSS properties?

    Read the article

  • JQuery - Ajax saving sortables in connected lists when sortable item is moved

    - by Ben Sinclair
    I have multiple JQuery sortable lists that connect with each other... They allow you to assign users to certain roles. Basically what I want to do is when a user is dragged from one list to another, I want JQuery to pick up the first list that the user was moved from so that I can send an AJAX request to delete it from that list in my database. I tried the following but every time you move the user over a list and haven't even dropped it within a list, it sends this request which means I'll be sending multiple AJAX requests... Does that make sense? $( ".selector" ).sortable({ out: function(event, ui) { ... } }); From my testing, I can use the following code to just update the list that user has been moved to so I've got the second half covered: $( ".selector" ).sortable({ receive: function(event, ui) { ... } }); Hopefully I am making sense :)

    Read the article

  • QWidget keyPressEvent override

    - by eaigner
    Hi there, I'm trying for half an eternity now overriding QWidgets keyPressEvent function in QT but it just won't work. I've to say i am new to CPP, but I know ObjC and standard C. My problem looks like this: class QSGameBoard : public QWidget { Q_OBJECT public: QSGameBoard(QWidget *p, int w, int h, QGraphicsScene *s); signals: void keyCaught(QKeyEvent *e); protected: virtual void keyPressEvent(QKeyEvent *event); }; QSGameBoard is my QWidget subclass and i need to override the keyPressEvent and fire a SIGNAL on each event to notify some registered objects. My overridden keyPressEvent in QSGameBoard.cpp looks like this: void QSGameBoard::keyPressEvent(QKeyEvent *event) { printf("\nkey event in board: %i", event->key()); //emit keyCaught(event); } When i change QSGameBoard:: to QWidget:: it receives the events, but i cant emit the signal because the compiler complains about the scope. And if i write it like this the function doesn't get called at all. What's the problem here?

    Read the article

  • What's the best way to do literate programming in Python on Windows?

    - by JasonFruit
    I've been playing with various ways of doing literate programming in Python. I like noweb, but I have two main problems with it: first, it is hard to build on Windows, where I spend about half my development time; and second, it requires me to indent each chunk of code as it will be in the final program --- which I don't necessarily know when I write it. I don't want to use Leo, because I'm very attached to Emacs. Is there a good literate programming tool that: Runs on Windows Allows me to set the indentation of the chunks when they're used, not when they're written Still lets me work in Emacs Thanks! Correction: noweb does allow me to indent later --- I misread the paper I found on it. By default, notangle preserves whitespace and maintains indentation when expanding chunks. It can therefore be used with languages like Miranda and Haskell, in which indentation is significant That leaves me with only the "Runs on Windows" problem.

    Read the article

  • What can cause legit MySql INSERT INTO command to fail?

    - by Makis
    I can't figure out what's causing my INSERT INTO's to fail to certain table in MySql. I can manage them to other tables. The table looks like: CREATE TABLE IF NOT EXISTS `Match` ( `id` int(11) NOT NULL AUTO_INCREMENT, `match_no` int(11) NOT NULL, `season` int(11) NOT NULL, `hometeam` int(11) NOT NULL, `awayteam` int(11) NOT NULL, PRIMARY KEY (`id`), KEY `match_no` (`match_no`), KEY `season` (`season`), KEY `hometeam` (`hometeam`), KEY `awayteam` (`awayteam`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; And the command is INSERT INTO Match (`match_no`, `season`, `hometeam`, `awaytem`) VALUES (1, 1, 2, 3) All I get is: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Match (match_no, season, hometeam, awaytem) VALUES (1, 1, 2, 3)' at line 1 I have checked the manual and half-a-dozen examples from the web and whatnought and tried all sorts of changes to the syntax in case there is some MySql specific oddity, but nothing seems to work.

    Read the article

  • Why in landscape orientation in simulator all the subviews appear out of order?

    - by wolverine
    I was doing a sample app in ipad. I added about 4 to 5 imageviews to the left side of the view vertically. This view will appear when we select the corresponding entry in the splitviewcontroller. In ipad simulator too, all the images were loading and all are working fine in portrait orientation. But when I rotate the simulator to landscape orientation, these imageviews doesnt appear where i placed them. Some of them overlapping each other, some have half of their part in the navigation bar and all. Has gone completely out of order. I am confused why is all this happening. Can anyone help me solve this issue?

    Read the article

  • Not getting correct time from UniversalDateTime

    - by Nakul Chaudhary
    I send a vcal through mail in web application with convert datetime to universal datetime. If i run web application locally (local sevser in India) i get correct time in my vcal. But run appication live (server in US) then not get corret time with a difference of 1 and half hour.Please suggest me. code : Dim result As StringBuilder = New StringBuilder() result.AppendFormat("BEGIN:VCALENDAR{0}", System.Environment.NewLine) result.AppendFormat("BEGIN:VEVENT{0}", System.Environment.NewLine) result.AppendFormat("SUMMARY:{0}{1}", subject, System.Environment.NewLine) result.AppendFormat("LOCATION:{0}{1}", location, System.Environment.NewLine) result.AppendFormat("DTSTART:{0}{1}", startDate.ToUniversalTime().ToString("yyyyMMdd\THHmmss\Z"), System.Environment.NewLine) result.AppendFormat("DTEND:{0}{1}", endDate.ToUniversalTime().ToString("yyyyMMdd\THHmmss\Z"), System.Environment.NewLine) result.AppendFormat("DTSTAMP:{0}{1}", DateTime.Now.ToUniversalTime().ToString("yyyyMMdd\THHmmss\Z"), System.Environment.NewLine) result.AppendFormat("DESCRIPTION:{0}{1}", description, System.Environment.NewLine) result.AppendFormat("END:VEVENT{0}", System.Environment.NewLine) result.AppendFormat("END:VCALENDAR{0}", System.Environment.NewLine) Return result.ToString()

    Read the article

  • DrawString with character wrapping

    - by Roy
    Hi all, I'm creating a fatal error dialog for a Windows Mobile Application using C#. The problem is when I try to draw the stacktrace using DrawString, half of my stacktrace is getting clipped off because DrawString uses word wrapping instead of character wrapping. For those who don't understand the explanation: When i draw the stacktrace, it comes out as this: at company.application.name.space.Funct at company.application.name.Function(St at etc. etc. And i want it to print like this: at company.application.name.space.Funct ion(String sometext, Int32 somenumbe r) at company.application.name.Function(St ring sometext, Int32 somenumber, Int 32 anothernumber) at etc. etc. Is this possible in Csharp?

    Read the article

  • Using core plot for iPhone, drawing date on x axis

    - by xmax
    I have available an array of dictionary that contains NSDate and NSNumber values. I wanted to plot date on X axis. for plotting I need to supply xRanges to plot with some decimal values.I don't understand how can i supply NSdate values to xRange (low and length). And what should be there in this method: -(NSNumber *)numberForPlot:(CPPlot *)plot field:(NSUInteger)fieldEnum recordIndex:(NSUInteger)index I mean how my date value will be returned as NSNumber..? I think i should use some interval over there.but what should be the exact conversion..? can any one explain me what are the exact requirement to plot the date on xAxis..? I am plotting my plot in half of the view.

    Read the article

  • How long should it take a senior developer to solve FizzBuzz during an interview?

    - by Jim McKeeth
    Assuming: Typical interview stress levels (I am watching) Using familiar IDE and program language (their choice on their PC!) Given adequate explanation and immediate answers to questions Able to compile code and check answers / progress Claims to be a senior level programmer How long should it take an interviewee to answer FizzBuzz correctly? Edit: FizzBuzz: Write a program that prints the numbers from 1 to 100. But for multiples of three print "Fizz" instead of the number and for the multiples of five print "Buzz". For numbers which are multiples of both three and five print "FizzBuzz". Edit: It isn't so much that if they take more then X minutes they are disqualified, but I am curious if I should just cut them loose after they work on it for half hour.

    Read the article

  • Efficient algorithm for creating an ideal distribution of groups into containers?

    - by Inshim
    I have groups of students that need to be allocated into classrooms of a fixed capacity (say, 100 chairs in each). Each group must only be allocated to a single classroom, even if it is larger than the capacity (ie there can be an overflow, with students standing up) I need an algorithm to make the allocations with minimum overflows and under-capacity classrooms. A naive algorithm to do this allocation is horrendously slow when having ~200 groups, with a distribution of about half of them being under 20% of the classroom size. Any ideas where I can find at least some good starting point for making this algorithm lightning fast? Thanks!

    Read the article

  • jQuery Cycle Plugin: How to preload first images with a loading background gif then fade in Cycle Sl

    - by Theo Ribeiro
    Hello all, I'm struggling with this, maybe some of you can help... I have a home page slideshow with large images at www.theoribeiro.com using jQuery Cycle plugin Images are large and sometimes with slow connections (but even in fast ones) the behavior of the slideshow start is pretty ugly, showing the image all of a sudden or half-loaded. I want to make sure that at least the 2 or 3 first images are loaded before the slideshow starts and meanwhile I want to run a loading animated gif, then I want to fade in the first image. I searched a lot on the internet and on the forums and tried loads of stuff with my limited knowledge of javascript and jQuery but could't come up with a solution. Any help would be greatly appreciated!!!

    Read the article

  • Is there a 3 way merger tool that “understands” common refactoring?

    - by Ian Ringrose
    When a simple refactoring like “rename field” has been done on one branch it can be very hard to merge the changes into the other branches. (Extract method is much harder as the merge tools don’t seem to match the unchanged blocks well) Now in my dreams, I am thinking of a tool that can record (or work out) what well defined refactoring operations have been done on one branch and then “replay” them on the other branch, rather than trying to merge every line the refactoring has affected. see also "Is there an intelligent 3rd merge tool that understands VB.NET" for the other half of my pain! Also has anyone try something like MolhadoRef (blog article about MolhadoRef and Refactoring-aware SCM), This is, in theory, refactoring-aware source control.

    Read the article

  • How to set Height of items in XAML so they always occupy the same proportion of available space in p

    - by aoven
    I have an ItemsControl with the following ItemTemplate: <DataTemplate x:Key="myItemTemplate"> <TextBlock Height="???" Text="{Binding Path=Description}" /> </DataTemplate> My question is, how do I set the Height of the TextBlock in the template so that it automatically assumes ItemsControl.Height div ItemsCount amount of vertical space? When there's only one item, I'd like it to be the full height of container, when there're two, each should be half the size, and so on. If possible, I'd prefer to do this completely in XAML to keep my ViewModel clean of UI logic.

    Read the article

  • Looking for a component (.NET or COM/ActiveX) that can play AVI files in a WinForms app

    - by MusiGenesis
    I'm looking for something like the Windows Media Player control that can be hosted on a form. The WMP doesn't work for me because I need a control that can play a continuously-appended playlist of AVI files in sequence, so that the transition from one file to the next happens seamlessly (i.e. without any glitches or pauses in the video and audio). With WMP, there's always a delay between files of half a second or so. Does anyone know of a control (it can be either commercial or open-source) that can do this? I assume anything like this wraps DirectX, and that's OK too.

    Read the article

  • How to set the pointer to the current row in the Datagridview in C Sharp

    - by user286546
    I have a datagridview on the Windows Form in c#. I am updating and filling the table adapter on the cell event. The problem is that When I go to lower half of the datagrid which is not visible until I scroll down, as I click any cell, the table adapter is filled and updated and the pointerpoints to the very first row. Any suggestion on how to fix it. I have a ideas to record the top row of the datagridview that is visible and set the pointer to that row. But how to do it?

    Read the article

  • W2k8 RC1: Windows Media Servers (WMS) as proxy

    - by da_didi
    I will have one streaming-server (W2k8, unknown streaming protocol [rtsp, mss, http]) and half dozen streaming-servers as proxies to save bandwidth. I have read the documentation and installed the modules, but I am unsure how I have to configure the proxy's according to http://technet.microsoft.com/de-de/library/ee126142(en-us,WS.10).aspx - as a proxy or reverse proxy and how I minimize the bandwidth needs between origin server and proxy's. What is the best way to realize my setup? Any short how-tos? How can I announce all players to use the proxy? Route all rtsp/mms/http-requests through my proxy? Announce the proxy with DHCP-releases? Thanks!

    Read the article

  • Difference between dates

    - by Ben C
    I want to calculate the difference between two times, one of which is the current time, and the other is just in the format HH:MM, always in the future. If I just subtract $futuretime from $now, it should, of course, be a positive number. This works fine until... If $now is in the afternoon or evening and $futuretime is, say, 7AM next morning, how can I force it to understand the the time is always going to be in the future? (It's for working out the time of something that occurs about every half an hour during working hours, and then stops until the following morning) Thanks in advance!

    Read the article

  • Using Mapkit to create a local searchable Map

    - by Digital D
    Using MapKit as a base, I'm planning on adding a map to a project with 'local search' capabilities. I think 'local search' describes the feature I want to design into the map. Here is my vision. The map is displayed on the bottom half of a view. The user's current location is highlighted by default. When the user pushes the 'search' button annotation pins drop onto the map. The search is programmatically fixed to a certain item....for example supermarkets. So supermarkets in a 5 mile radius of the user's current location will populate the map. How would I add this local search feature to the already amazing MapKit? I've learned an incredible amount as a new developer in the last few months, and look forward to learning googles...correction googols more. Thanks in anticipation.

    Read the article

  • Procedures before checking in to source control?

    - by Mongus Pong
    I am starting to get a reputation at work as the "guy who breaks the builds". The problem is not that I am writing dodgy code, but when it comes to checking my fixes back into source control, it all goes wrong. I am regularly doing stupid things like : forgetting to add new files accidentally checking in code for a half fixed bug along with another bug fix forgetting to save the files in VS before checking them in I need to develop some habits / tools to stop this. What do you regularly do to ensure the code you check in is correct and is what needs to go in? Edit I forgot to mention that things can get pretty chaotic in this place. I quite often have two or three things that Im working on in the same code base at any one time. When I check in I will only really want to check in one of those things.

    Read the article

  • Iphone UIView implementation

    - by Joo Park
    How does one code this scenerio in iphone sdk? In an expense app, when you want to add an expense, this view comes up. After selecting "Clothing," another view slides up with a UIPickerView control that has a "done" button which will dismiss the UIPickerView. Below is a screen shot after hitting "Clothing." I'm trying to figure out how one would slide up the UIPickerView half way up the screen with a "done" button on top of the "New Expense" view? thank you in advance!

    Read the article

  • Emacs shell output buffer height

    - by jimbo
    Hi , i have the following in my .emacs file(thanks to a SOer nikwin), which evaluates the current buffer content and displays the output in another buffer. (defun shell-compile () (interactive) (save-buffer) (shell-command (concat "python " (buffer-file-name)))) (add-hook 'python-mode-hook (lambda () (local-set-key (kbd "\C-c\C-c") 'shell-compile))) The problem is that the output window takes half the emacs screen. Is there any way to set the output windows's height to something smaller. I googled for 30mins or so and could not find anything that worked. Thanks in advance.

    Read the article

< Previous Page | 67 68 69 70 71 72 73 74 75 76 77 78  | Next Page >