Search Results

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

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

  • Help me finish this Python self-challenge.

    - by Hamish Grubijan
    This is not a homework. I saw this article praising Linq library and how great it is for doing combinatorics stuff, and I thought to myself: Python can do it in a more readable fashion. After half hour of dabbing with Python I failed. Please finish where I left off. Also, do it in the most Pythonic and efficient way possible please. from itertools import permutations from operator import mul from functools import reduce glob_lst = [] def divisible(n): return (sum(j*10^i for i,j in enumerate(reversed(glob_lst))) % n == 0) oneToNine = list(range(1, 10)) twoToNine = oneToNine[1:] for perm in permutations(oneToNine, 9): for n in twoToNine: glob_lst = perm[1:n] #print(glob_lst) if not divisible(n): continue else: # Is invoked if the loop succeeds # So, we found the number print(perm) Thanks!

    Read the article

  • Continuous integration with ClearCase and long-updating snapshot views

    - by Yulia Rogovaya
    Hi, I need to set up a continuous integration system. We use ClearCase version control and only snapshot views due to platform restrictions. I have tried setting up Hudson and Luntbuild. They both show the same behaviour. In a view, we have lots of libraries that are used for build but are strictly read-only. The CI system executes cleartool lshistory and finds a change in the VCS. After that, it executes cleartool setcs, which causes update of the view. This can take about half an hour, which is very undesirable for CI. Why wouldn't it update only the changed elements, which were previously obtained by cleartool lshistory? Is there a CI system that can do this?

    Read the article

  • iPad UI clipped in simulator

    - by raj.tiwari
    My views created for iPad form factor look fine in Interface Builder. However, when I debug my app in iPhone Simulator 3.2 (with Hardware - Device set to iPad), I see the UI clipped and about half size. There is a 2x button at the bottom which lets me zoom in. But this just shows the same clipped UI in double size. This is really weird since I have created the XIB for iPad form factor and it is supposed to fit iPad completely. Any ideas what I might be doing wrong? I am using iPhone SDK 3.2 downloaded on 4/30/2010. Thanks. -Raj

    Read the article

  • How can I tell when a UIWebView has finished drawing to a context?

    - by phopkins
    In my code I'm trying to show a UIWebView as a page is loading, and then, when it's done, capture an image from the web view to cache and display later (so I don't have to reload and render the web page). I have something along the lines of: CGContextRef context = CGBitmapContextCreate(…); [[webView layer] renderInContext:context]; CGImageRef imageRef = CGBitmapContextCreateImage(context); UIImage *image = [UIImage imageWithCGImage:imageRef]; The problem I'm running into is that, due to UIWebView's tiling, sometimes only half of the page is rendered to the context by the time I capture the image. Is there a way to detect or block on UIWebView's background rendering thread so that I can get the image only after all of the rendering has finished?

    Read the article

  • Graphviz DOT arrange Nodes in circles, layout too "compact"

    - by Ivo Wetzel
    I'm halfway there please see the edit OK here's my problem, I'm generating a graph of a python module, including all the files with their functions/methods/classes. I want to arrange it so, that nodes gather in circles around their parent nodes, currently everything is on one gargantuan horizontal row, which makes the thing 50k pixels wide and also let's the svg converter fail(only renders about the half of the graph). I went trough the docs(http://www.graphviz.org/doc/info/attrs.html) but couldn't find anything that seems to do the trick. So the question is: Is there a simple way to do this or do I have to layout the whole thing by myself? :/ EDIT: Thanks to Andrews comment I've got the right layout, the only problem now is that it's a bit to "compact"... so the question now is, how to fix this?

    Read the article

  • Ruby Programming Techniques: simple yet not so simple object manipulation

    - by Shyam
    Hi, I want to create an object, let's say a Pie. class Pie def initialize(name, flavor) @name = name @flavor = flavor end end But a Pie can be divided in 8 pieces, a half or just a whole Pie. For the sake of argument, I would like to know how I could give each Pie object a price per 1/8, 1/4 or per whole. I could do this by doing: class Pie def initialize(name, flavor, price_all, price_half, price_piece) @name = name @flavor = flavor @price_all = price_all @price_half = price_half @price_piece = price_piece end end But now, if I would create fifteen Pie objects, and I would take out randomly some pieces somewhere by using a method such as getPieceOfPie(pie_name) How would I be able to generate the value of all the available pies that are whole and the remaining pieces? Eventually using a method such as: myCurrentInventoryHas(pie_name) # output: 2 whole strawberry pies and 7 pieces. I know, I am a Ruby nuby. Thank you for your answers, comments and help!

    Read the article

  • Extrapolation using fft in octave

    - by CFP
    Using GNU octave, I'm computing a fft over a piece of signal, then eliminating some frequencies, and finally reconstructing the signal. This give me a nice approximation of the signal ; but it doesn't give me a way to extrapolate the data. Suppose basically that I have plotted three periods and a half of f: x -> sin(x) + 0.5*sin(3*x) + 1.2*sin(5*x) and then added a piece of low amplitude, zero-centered random noise. With fft/ifft, I can easily remove most of the noise ; but then how do I extrapolate 3 more periods of my signal data? (other of course that duplicating the signal). The math way is easy : you have a decomposition of your function as an infinite sum of sines/cosines, and you just need to extract a partial sum and apply it anywhere. But I don't quite get the programmatic way... Thanks!

    Read the article

  • XML Table layout? Two EQUAL-width rows filled with equally width buttons??

    - by Oliver Goossens
    Hi heres a part from my XML for LAND format: <TableLayout android:layout_height="wrap_content" android:layout_width="wrap_content" android:layout_gravity="center" android:stretchColumns="*"> <TableRow> <Button android:id="@+id/countbutton" android:text="@string/plus1"/> <Button android:id="@+id/resetbutton" android:text="@string/reset" /> </TableRow> </TableLayout> And now what I dont get - the WIDTH of one row and also of the button depends on the TEXT inside the button. If the both texts are equaly long lets say : TEXT its ok - the table half is in the middle of the screen. But if they have different size - lets say "A" and "THIS IS THE LONG BUTTON" the CENTER of the table isnt in the middle of the screen anymore and so the buttons are not equally width... Cant find any solution... Please advise... Thank you Oliver Goossens

    Read the article

  • “Could not create the file”, “Access is denied” and “Unrecoverable build error” in building setup project in VS 2008

    - by Mister Cook
    When building a setup project I get a message: Error with setup build: Error 27 Could not create the file 'C:\Users\MyName\AppData\Local\Temp\VSI1E1A.tmp' 'Access is denied.' I have tried the following (from http://support.microsoft.com/kb/329214/EN-US) regsvr32 "C:\Program Files (x86)\Common Files\Microsoft Shared\MSI Tools\mergemod.dll" The DLL registers but this does not fix my problem. Also, I tried a Clean build, deleting the temp folder, ran VS2008 as administratror, restart my PC but it occurs every time. I have no anti-virus software running and running on Windows 7 64-bit. This operation worked fine until recently. I have read many other users see this but found no solution. The only half solution I found was to edit setup properties and switch to Package files as Loose uncompressed files. This works but is not ideal as I need a full installer.

    Read the article

  • Audio looping in Objective-C/iPhone

    - by Neurofluxation
    So, I'm finishing up an iPhone App. I have the following code in place to play the file: while(![player isPlaying]) { totalSoundDuration = soundDuration + 0.5; //Gives a half second break between sounds sleep(totalSoundDuration); //Don't play next sound until the previous sound has finished [player play]; //Play sound NSLog(@" \n Sound Finished Playing \n"); //Output to console } For some reason, the sound plays once then the code loops and it outputs the following: Sound Finished Playing Sound Finished Playing Sound Finished Playing etc... This just repeats forever, I don't suppose any of you lovely people can fathom what could be the boggle? Cheers!

    Read the article

  • Graphviz DOT arange Nodes in circles

    - by Ivo Wetzel
    OK here's my problem, I'm generating a graph of a python module, including all the files with their functions/methods/classes. I want to arrange it so, that nodes gather in circles around their parent nodes, currently everything is on one gargantuan horizontal row, which makes the thing 50k pixels wide and also let's the svg converter fail(only renders about the half of the graph). I went trough the docs(http://www.graphviz.org/doc/info/attrs.html) but couldn't find anything that seems to do the trick. So the question is: Is there a simple way to do this or do I have to layout the whole thing by myself? :/

    Read the article

  • Piano Keys using GridLayout (or Something Else)

    - by yar
    I am creating a container of JComponents which will look like a piano keyboard. The black keys look like this (Groovy) def setBlackNotes(buttons) { def octaves = (int)(buttons.size() / 5) def gridLayout = new GridLayout(1, octaves*7); def blackNotePanel = new JPanel(gridLayout) this.add blackNotePanel def i = 0 octaves.times { 2.times { blackNotePanel.add buttons[i++] } blackNotePanel.add Box.createHorizontalBox() 3.times { blackNotePanel.add buttons[i++] } blackNotePanel.add Box.createHorizontalBox() } } Which is just what I need, and looks like this: but then I'd like to move this over to the right by half-a-key width. All of my attempts to move the blackNotePanel over by an arbitrary width -- wrapping it a BorderLayout, a MigLayout, etc. -- have failed or changed the spacing of the GridLayout radically. Any suggestions on how to move this over to the right by an arbitrary amount in pixels?

    Read the article

  • Hiding Row in DataGridView Very Slow

    - by Ed Schwehm
    I have a DataGridView in a Winforms app that has about 1000 rows (unbound) and 50 columns. Hiding a column takes a full 2 seconds. When I want to hide about half the rows, this becomes a problem. private void ShowRows(string match) { this.SuspendLayout(); foreach (DataGridViewRow row in uxMainList.Rows) { if (match == row.Cells["thisColumn"].Value.ToString())) { row.Visible = false; } else { row.Visible = true; } } this.ResumeLayout(); } I did some testing by adding by addingConsole.WriteLine(DateTime.Now)around the actions, androw.Visible = falseis definitely the slow bit. Am I missing something obvious, like setting IsReallySlow = false? Or do I have to go ahead and enable Virtual Mode and code up the necessary events?

    Read the article

  • What are the CS fundamentals behind package/dependency management?

    - by Frep D-Oronge
    Often I hear about situations where companies are developing extensable in house software (the dreaded enterprise 'framework') which is supposed to support multiple 'plugins' from diffirent teams. Usually this ends up being a half baked solution that does not really work due to compatibility prolems between addins, or between addins and the framework itself. Usually this means QA have to 'rubber stamp' a global set of versions accross all plugins, or more usually plugins are released and stuff breaks in nasty ways. This problem has been solved before however, for example the package management systems like apt for debian linux. I suspect that the reason it works is that it is built from the start on a known 'Computer Science-y' concept. My question is what is it?

    Read the article

  • Can zlib.crc32 or zlib.adler32 be safely used to mask primary keys in URLs?

    - by David Eyk
    In Django Design Patterns, the author recommends using zlib.crc32 to mask primary keys in URLs. After some quick testing, I noticed that crc32 produces negative integers about half the time, which seems undesirable for use in a URL. zlib.adler32 does not appear to produce negatives, but is described as "weaker" than CRC. Is this method (either CRC or Adler-32) safe for usage in a URL as an alternate to a primary key? (i.e. is it collision-safe?) Is the "weaker" Adler-32 a satisfactory alternative for this task? How the heck do you reverse this?! That is, how do you determine the original primary key from the checksum?

    Read the article

  • Overlaying image also fades when images change in IE6 jQ slideshow

    - by Hege Rokenes
    I have a pretty basic slideshow fading between images. On top of that slideshow I have a logo that is absolute positioned to stay partly over the slideshow. It works perfectly, but then there is IE6. In IE6 the part of the logo that is overlaying the slideshow also fades when the images change in the slideshow. I really do not want to have half the logo in all the pictures in the slideshow, but that seems to be the only solution right now. Demo of the problem here: http://nonstopas.no/temp/slideshow/ Note that this happens a bit inconsistently (or so it seems), so watch it for a couple of rounds.

    Read the article

  • Level of SVG SMIL (animation) support among the browsers

    - by user246114
    Hi, Does anyone know the current state of SVG SMIL animation support in the popular browsers? It looks like Safari, Chrome, and Opera support it. Firefox has confusing reports in their dev pages about SMIL support having been added, but I don't see it as of v3.6: https://bugzilla.mozilla.org/show_bug.cgi?id=216462 I am ignoring IE since they don't even support SVG at all, and probably never will, much less SMIL. The other thing - just comparing this test page between Safari, Chrome, and Opera: http://srufaculty.sru.edu/david.dailey/svg/ovaling.svg looks like Opera is the only one that renders it correctly. Should we not be using SMIL - kind of looks half-baked in all the browsers (sadly)? Blast. Thanks

    Read the article

  • Delphi Unicode String Type Stored Directly at its Address

    - by Andreas Rejbrand
    I want a string type that is Unicode and that stores the string directly at the adress of the variable, as is the case of the (Ansi-only) ShortString type. I mean, if I declare a S: ShortString and let S := 'My String', then, at @S, I will find the length of the string (as one byte, so the string cannot contain more than 255 characters) followed by the ANSI-encoded string itself. What I would like is a Unicode variant of this. That is, I want a string type such that, at @S, I will find a unsigned 32-bit integer containing the length of the string in bytes (or in characters, which is half the number of bytes) followed by the Unicode representation of the string. I have tried WideString, UnicodeString, and RawByteString, but they all appear only to store an adress at @S, and the actual string somewhere else (I guess this has do do with reference counting and such). I suspect that there is no built-in type to use, and that I have to come up with my own way of storing text the way I want (which actually is fun). Am I right?

    Read the article

  • Which is faster in Python: x**.5 or math.sqrt(x)?

    - by Casey
    I've been wondering this for some time. As the title say, which is faster, the actual function or simply raising to the half power? UPDATE This is not a matter of premature optimization. This is simply a question of how the underlying code actually works. What is the theory of how Python code works? I sent Guido van Rossum an email cause I really wanted to know the differences in these methods. My email: There are at least 3 ways to do a square root in Python: math.sqrt, the '**' operator and pow(x,.5). I'm just curious as to the differences in the implementation of each of these. When it comes to efficiency which is better? His response: pow and ** are equivalent; math.sqrt doesn't work for complex numbers, and links to the C sqrt() function. As to which one is faster, I have no idea...

    Read the article

  • WPF layout with several fixed height parts and certain parts relative to window size

    - by Daniil Harik
    Hello, At moment my main layout consists of vertically oriented stack panel and it looks like this: Root StackPanel StackPanel - fixed Height 150 (horizontal orientation) StackPanel - relative Height must be behalf of free space left on screen (but at least 150 px). Used by Telerik GridView Control, if I don't specify Height or MaxHeight Telerik GridView Height becomes very large and does not fit my window. StackPanel - fixed Height 100 (horizontal orientation) StackPanel - relative Height must be half of free space left on screen (but at least 150 px). Used by Telerik GridView Control, if I don't specify Height or MaxHeight Telerik GridView Height becomes very large and does not fit my window. StackPanel - fixed Height 100 (horizontal orientation) The view must totally fit available screen size. The problem is that I don't understand how to make certain areas of my view resize depending on available screen size. Is there is easy way to solve it, or should I be binding to Window height property and doing math? Thank You very much!

    Read the article

  • ProgressBar not updating on change to Maximum through binding

    - by Tom
    <ProgressBar Foreground="Red" Background="Transparent" Value="{Binding NumFailed, Mode=OneWay}" Minimum="0" Maximum="{Binding NumTubes, Mode=OneWay, Converter={x:Static wpftools:DebuggingConverter.Instance}, ConverterParameter=Failedprogressbar}" FlowDirection="RightToLeft" Style="{DynamicResource {x:Static wpftools:CustomResources.StyleProgressBarVistaKey}}" /> This is what my progressbar looks like at the moment. The style came from http://mattserbinski.com/blog/look-and-feel-progressbar and the DebuggingConverter is a no-op converter that prints the value, type and parameter to the Console. I have verified that the converter for the Maximum is being called when my NumTubes property is changed. Basically, the ProgressBar won't redraw until the Value changes. So, if I have 2 tubes and 1 is failed, even if I add 20 more tubes, the bar is still half filled until the NumFailed changes, then the proportion is updated. I've tried adding spurious notifications of the NumFailed property, but that apparently doesn't work since the value didn't change. Ideas?

    Read the article

  • Video packet capture over multiple IP cameras

    - by nimals1986
    Hello We are working on a C language application which is simple RTSP/RTP client to record video from Axis a number of Cameras . We launch a pthread for each of the camera which establishes the RTP session and begins to record the packets captured suing the recvfrom() call... A single camera single pthread records fine for well over a day without issues.. but testing with more cameras available,about 25(so 25 pthreads), the recording to file goes fine for like 15 to 20 mins and then the recording just stops ..the application still keeps running .. Its been over a month and a half we have been trying with varied implementations but nothing seems to help .. Please provide suggestions.. We are using CentOS 5 platform

    Read the article

  • Ruby CMS/blog: Mephisto vs. Radiant

    - by Candidasa
    I'm looking for a blogging tool with some light CMS features in Ruby on Rails. I mainly want something simple, but configurable. I have no need for page snippets, etc. Just your basic main blog, very good (and easy) theme support, some nice sidebar stuff, a few static pages and MetaWeblog API support. I'm thinking of either using Mephisto or Radiant CMS (everything else seems half-baked or extremely lightweight at best): http://mephistoblog.com/ http://www.radiantcms.org/ Documentation for Mephisto seems very lacking and their site is a mess. I've also read some bad things about it's stability. Radiant seems more stable in comparison and has heaps of useful plug-ins. However, it isn't designed for blogging out of the box. That has to be added as almost an after thought. Creating a custom theme also seems more cumbersome with Radiant due to the sub-page/snippet feature. Which should I choose?

    Read the article

  • Why CABasicAnimation will send the layer's view to back and front?

    - by ohho
    There are two UIViews of similar size. UIView one (A) is originally on top of UIView two (B). When I try to perform a CABasicAnimation transform.rotation.y on A's layer: CABasicAnimation *rotateAnimation = [CABasicAnimation animationWithKeyPath:@"transform.rotation.y"]; CGFloat startValue = 0.0; CGFloat endValue = M_PI; rotateAnimation.fromValue = [NSNumber numberWithDouble:startValue]; rotateAnimation.toValue = [NSNumber numberWithDouble:endValue]; rotateAnimation.duration = 5.0; [CATransaction begin]; [imageA.layer addAnimation:rotateAnimation forKey:@"rotate"]; [CATransaction commit]; During the animation, the animating layer's UIView (A) will be: sent back (A is suddenly behind B) rotating ... passed second half of the animation sent front (A is now on top of B again) Is there a way to keep A on top of B for the whole animation period? Thanks! UPDATE: project source is attached: FlipLayer.zip

    Read the article

  • Cocos2D, UIScrollView, and initial placement of a scene

    - by diatrevolo
    Hello: I am using a UIScrollView to forward touches to Cocos2D as outlined in http://getsetgames.com/2009/08/21/cocos2d-and-uiscrollview/ Everything works great after a few days of working with it, except one thing: when the initial view appears on the screen, the background appears to be scrolled to the center. As soon as I try to scroll around, the image jumps to 0,0, and everything works as normal, except the touches are offset by half the width and height of the background image. Am I overlooking something basic? I can't think of a useful portion of the code that illustrates the issue, as I can't track it down, but would be happy to post code if anyone has any ideas. Thanks in advance, -Roberto

    Read the article

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