Search Results

Search found 269 results on 11 pages for 'wonko the sane'.

Page 2/11 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11  | Next Page >

  • Improve WPF Rendering Performance (WrapPanel in ItemsControl)

    - by Wonko the Sane
    Hello All, I have an ItemsSource that appears to have poor performance when adding even a fairly small ObservableCollection to it. The ItemsPanel is a WrapPanel, and the ItemTemplate is essentially a Border containing another Border painted with an ImageBrush. The ItemsControl is wrapped inside a ScrollViewer. After some investigation using WpfPerf, it would appear that most of the "what the heck is it doing?" time is spent on WrapPanel.Measure after creating the collection that is being bound. As I've mentioned, it's a fairly small collection - generally less than 100 items. If nothing else, I'd like to be able to put a "Please Wait" on the screen (during the collection creation portion as well), but I am not sure how to know when the rendering is complete. Any thoughts would be greatly appreciated! Thanks, wTs

    Read the article

  • Where Can I find a good tutorial for IJG libjpeg

    - by Dana the Sane
    I need to do some work with this library and I'm finding the documentation at http://apodeline.free.fr/DOC/libjpeg/libjpeg.html to be deficient (incomplete function signatures, etc). Does anyone know of some other sides or have some example code illustrating common tasks? [Edit] I also found this question with an example, but any others would be helpful.

    Read the article

  • Silverlight 3.0 Custom Cursor in Chart

    - by Wonko the Sane
    Hello All, I'm probably overlooking something that will be obvious when I see the solution, but for now... I am attempting to use a custom cursor inside the chart area of a Toolkit chart. I have created a ControlTemplate for the chart, and a grid to contain the cursors. I show/hide the cursors, and attempt to move the containing Grid, using various Mouse events. The cursor is being displayed at the correct times, but I cannot get it to move to the correct position. Here is the ControlTemplate (the funky colors are just attempts to confirm what the different pieces of the template pertain to): <dataVisTK:Title Content="{TemplateBinding Title}" Style="{TemplateBinding TitleStyle}"/> <Grid Grid.Row="1"> <!-- Remove the Legend --> <!--<dataVisTK:Legend x:Name="Legend" Title="{TemplateBinding LegendTitle}" Style="{TemplateBinding LegendStyle}" Grid.Column="1"/>--> <chartingPrimitivesTK:EdgePanel x:Name="ChartArea" Background="#EDAEAE" Style="{TemplateBinding ChartAreaStyle}" Grid.Column="0"> <Grid Canvas.ZIndex="-1" Background="#2008AE" Style="{TemplateBinding PlotAreaStyle}"> </Grid> <Border Canvas.ZIndex="1" BorderBrush="#FF250010" BorderThickness="3" /> <Grid x:Name="gridHandCursors" Canvas.ZIndex="5" Width="32" Height="32" Visibility="Collapsed"> <Image x:Name="cursorGrab" Width="32" Source="Resources/grab.png" /> <Image x:Name="cursorGrabbing" Width="32" Source="Resources/grabbing.png" Visibility="Collapsed"/> </Grid> </chartingPrimitivesTK:EdgePanel> </Grid> </Grid> </Border> and here are the mouse events (in particular, the MouseMove): void TimelineChart_Loaded(object sender, RoutedEventArgs e) { chartTimeline.UpdateLayout(); List<FrameworkElement> chartChildren = GetLogicalChildrenBreadthFirst(chartTimeline).ToList(); mChartArea = chartChildren.Where(element => element.Name.Equals("ChartArea")).FirstOrDefault() as Panel; if (mChartArea != null) { grabCursor = chartChildren.Where(element => element.Name.Equals("cursorGrab")).FirstOrDefault() as Image; grabbingCursor = chartChildren.Where(element => element.Name.Equals("cursorGrabbing")).FirstOrDefault() as Image; mGridHandCursors = chartChildren.Where(element => element.Name.Equals("gridHandCursors")).FirstOrDefault() as Grid; mChartArea.Cursor = Cursors.None; mChartArea.MouseMove += new MouseEventHandler(mChartArea_MouseMove); mChartArea.MouseLeftButtonDown += new MouseButtonEventHandler(mChartArea_MouseLeftButtonDown); mChartArea.MouseLeftButtonUp += new MouseButtonEventHandler(mChartArea_MouseLeftButtonUp); if (mGridHandCursors != null) { mChartArea.MouseEnter += (s, e2) => mGridHandCursors.Visibility = Visibility.Visible; mChartArea.MouseLeave += (s, e2) => mGridHandCursors.Visibility = Visibility.Collapsed; } } } void mChartArea_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) { if (grabCursor != null) grabCursor.Visibility = Visibility.Visible; if (grabbingCursor != null) grabbingCursor.Visibility = Visibility.Collapsed; } void mChartArea_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { if (grabCursor != null) grabCursor.Visibility = Visibility.Collapsed; if (grabbingCursor != null) grabbingCursor.Visibility = Visibility.Visible; } void mChartArea_MouseMove(object sender, MouseEventArgs e) { if (mGridHandCursors != null) { Point pt = e.GetPosition(null); mGridHandCursors.SetValue(Canvas.LeftProperty, pt.X); mGridHandCursors.SetValue(Canvas.TopProperty, pt.Y); } } Any help past this roadblock would be greatly appreciated! Thanks, wTs

    Read the article

  • Measuring WPF Rendering Performance

    - by Wonko the Sane
    Hi All, I am looking to get some better performance on an ItemsControl, and I believe that the biggest hang-up is the rendering. The ItemTemplate of the control consists of (basically) a Border around an ImageBrush. The ItemsSource is an ObservableCollection of a custom class (of which I have no real control). What I'd like to know are some techniques for measuring (rudimentary measurements are fine to start with) the performance. This is an XP machine using .NET 3.5 SP1. Thanks, wTs

    Read the article

  • Custom ProgressBarBrushConverter Not Filling In ProgressBar

    - by Wonko the Sane
    Hello All, I am attempting to create a custom ProgressBarBrushConverter, based on information from here and here. However, when it runs, the progress is not being shown. If I use the code found in the links, it appears to work correctly. Here is the converter in question: public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) { ProgressBar progressBar = null; foreach (object value in values) { if (value is ProgressBar) { progressBar = value as ProgressBar; break; } } if (progressBar == null) return DependencyProperty.UnsetValue; FrameworkElement indicator = progressBar.Template.FindName("PART_Indicator", progressBar) as FrameworkElement; DrawingBrush drawingBrush = new DrawingBrush(); drawingBrush.Viewport = drawingBrush.Viewbox = new Rect(0.0, 0.0, indicator.ActualWidth, indicator.ActualHeight); drawingBrush.ViewportUnits = BrushMappingMode.Absolute; drawingBrush.TileMode = TileMode.None; drawingBrush.Stretch = Stretch.None; DrawingGroup group = new DrawingGroup(); DrawingContext context = group.Open(); context.DrawRectangle(progressBar.Foreground, null, new Rect(0.0, 0.0, indicator.ActualWidth, indicator.ActualHeight)); context.Close(); drawingBrush.Drawing = group; return drawingBrush; } Here is the ControlTemplate (the MultiBinding is to make sure that the converter is called whenever the Value or IsIndeterminate properties are changed): <ControlTemplate x:Key="customProgressBarTemplate" TargetType="{x:Type ProgressBar}"> <Grid> <Path x:Name="PART_Track" HorizontalAlignment="Left" VerticalAlignment="Top" Stretch="Fill" StrokeLineJoin="Round" Stroke="#DDCBCBCB" StrokeThickness="4" Data="M 20,100 L 80,10 C 100,120 160,140 190,180 S 160,220 130,180 T 120,150 20,100 Z "> <Path.Fill> <MultiBinding> <MultiBinding.Converter> <local:ProgressBarBrushConverter /> </MultiBinding.Converter> <Binding RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type ProgressBar}}" /> <Binding Path="IsIndeterminate" RelativeSource="{RelativeSource TemplatedParent}"/> <Binding Path="Value" RelativeSource="{RelativeSource TemplatedParent}"/> </MultiBinding> </Path.Fill> <!--<Path.LayoutTransform> <RotateTransform Angle="180" CenterX="190" CenterY="110" /> </Path.LayoutTransform>--> </Path> <Rectangle x:Name="PART_Indicator" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="1" /> </Grid> </ControlTemplate> Finally, the Window code (fairly straightforward - it just animates progress from 0 to 100 and back again): <ProgressBar x:Name="progress" Template="{StaticResource customProgressBarTemplate}" Foreground="Red"> <ProgressBar.Triggers> <EventTrigger RoutedEvent="ProgressBar.Loaded"> <BeginStoryboard x:Name="storyAnimate"> <Storyboard> <DoubleAnimationUsingKeyFrames Duration="0:0:12" AutoReverse="True" FillBehavior="Stop" RepeatBehavior="Forever" Storyboard.TargetName="progress" Storyboard.TargetProperty="(ProgressBar.Value)"> <LinearDoubleKeyFrame Value="0" KeyTime="0:0:0" /> <LinearDoubleKeyFrame Value="100" KeyTime="0:0:5" /> <LinearDoubleKeyFrame Value="100" KeyTime="0:0:6" /> <LinearDoubleKeyFrame Value="0" KeyTime="0:0:11" /> <LinearDoubleKeyFrame Value="0" KeyTime="0:0:12" /> </DoubleAnimationUsingKeyFrames> </Storyboard> </BeginStoryboard> </EventTrigger> </ProgressBar.Triggers> </ProgressBar> I am thinking that the problem is in the DrawRectangle call in the Convert method, but setting a TracePoint on it shows what appear to be valid values for the Rect. What am I missing here? Thanks, wTs

    Read the article

  • ItemsControl ItemTemplate Binding

    - by Wonko the Sane
    Hi All, In WPF4.0, I have a class that contains other class types as properties (combining multiple data types for display). Something like: public partial class Owner { public string OwnerName { get; set; } public int OwnerId { get; set; } } partial class ForDisplay { public Owner OwnerData { get; set; } public int Credit { get; set; } } In my window, I have an ItemsControl with the following (clipped for clarity): <ItemsControl ItemsSource={Binding}> <ItemsControl.ItemTemplate> <DataTemplate> <local:MyDisplayControl OwnerName={Binding OwnerData.OwnerName} Credit={Binding Credit} /> </DataTemplate> </ItemsControl.ItemTemplate> </ItemsControl> I then get a collection of display information from the data layer, and set the DataContext of the ItemsControl to this collection. The "Credit" property gets displayed correctly, but the OwnerName property does not. Instead, I get a binding error: Error 40: BindingExpression path error: 'OwnerName' property not found on 'object' ''ForDisplay' (HashCode=449124874)'. BindingExpression:Path=OwnerName; DataItem='ForDisplay' (HashCode=449124874); target element is 'TextBlock' (Name=txtOwnerName'); target property is 'Text' (type 'String') I don't understand why this is attempting to look for the OwnerName property in the ForDisplay class, rather than in the Owner class from the ForDisplay OwnerData property. Edit It appears that it has something to do with using the custom control. If I bind the same properties to a TextBlock, they work correctly. <ItemsControl ItemsSource={Binding}> <ItemsControl.ItemTemplate> <DataTemplate> <StackPanel> <local:MyDisplayControl OwnerName={Binding OwnerData.OwnerName} Credit={Binding Credit} /> <TextBlock Text="{Binding OwnerData.OwnerName}" /> <TextBlock Text="{Binding Credit}" /> </StackPanel> </DataTemplate> </ItemsControl.ItemTemplate> </ItemsControl> Thanks, wTs

    Read the article

  • C# Thread-safe Extension Method

    - by Wonko the Sane
    Hello All, I may be waaaay off, or else really close. Either way, I'm currently SOL. :) I want to be able to use an extension method to set properties on a class, but that class may (or may not) be updated on a non-UI thread, and derives from a class the enforces updates to be on the UI thread (which implements INotifyPropertyChanged, etc). I have a class defined something like this: public class ClassToUpdate : UIObservableItem { private readonly Dispatcher mDispatcher = Dispatcher.CurrentDispatcher; private Boolean mPropertyToUpdate = false; public ClassToUpdate() : base() { } public Dispatcher Dispatcher { get { return mDispatcher; } } public Boolean PropertyToUpdate { get { return mPropertyToUpdate; } set { SetValue("PropertyToUpdate", ref mPropertyToUpdate, value; } } } I have an extension method class defined something like this: static class ExtensionMethods { public static IEnumerable<T> SetMyProperty<T>(this IEnumerable<T> sourceList, Boolean newValue) { ClassToUpdate firstClass = sourceList.FirstOrDefault() as ClassToUpdate; if (firstClass.Dispatcher.Thread.ManagedThreadId != System.Threading.Thread.CurrentThread.ManagedThreadId) { // WHAT GOES HERE? } else { foreach (var classToUpdate in sourceList) { (classToUpdate as ClassToUpdate ).PropertyToUpdate = newValue; yield return classToUpdate; } } } } Obviously, I'm looking for the "WHAT GOES HERE" in the extension method. Thanks, wTs

    Read the article

  • AreaDataPoint in SL3 Chart is Fixed Size

    - by Wonko the Sane
    In Silverlight 3, it appears that the AreaDataPoint template ignores any size set in its ControlTemplate. <ControlTemplate TargetType="chartingTK:AreaDataPoint"> <Grid x:Name="Root" Opacity="1"> <!-- Width and Height are ignored --> <Ellipse Width="75" Height="25" StrokeThickness="{TemplateBinding BorderThickness}" Stroke="OrangeRed" Fill="{TemplateBinding Background}"/> </Grid> </ControlTemplate> Does anybody know of a workaround?

    Read the article

  • Finding out whether a DirectInput device supports XInput (with mingw/gcc)

    - by Mr. Wonko
    I'm working on an input system, wrapping DirectInput and XInput. Currently XInput devices are enumerated twice, once as XInput and once as DirectInput (since they support both). How can I find out if a given DirectInput device also supports XInput? There is this MSDN page on the topic, but it requires wbemidl.h and wmsstd.h which aren't available in mingw/gcc (and for some reason I want to avoid msvc - probably by habit). I don't think blacklisting device names/guids is a good solution, but is there a better one? Thanks.

    Read the article

  • Which python mpi library to use?

    - by Dana the Sane
    I'm starting work on some simulations using MPI and want to do the programming in Python/scipy. The scipy site lists a number of mpi libraries, but I was hoping to get feedback on quality, ease of use, etc from anyone who has used one.

    Read the article

  • What are the strategies behind closing unresolved issues in different issue tracking process definitions

    - by wonko realtime
    Recently, i found out that it seems to me like a good part of the "administratives" tend to close "issues" in their bug- and issue-tracking systems with the reason that they don't fit in "their next release". One example for that can be found here: https://connect.microsoft.com/VisualStudio/feedback/details/640440/c-projects-add-option-to-remove-unused-references Because i fear that i've got a fundamental lack of understanding for this approach, i'm wondering if someone can point me to informations which could give some insight in the rationales behind such processes.

    Read the article

  • Custom Image Button and Radio/Toggle Button from Common Base Class

    - by Wonko the Sane
    Hi All, I would like to create a set of custom controls that are basically image buttons (it's a little more complex than that, but that's the underlying effect I'm going for) that I've seen a few different examples for. However, I would like to further extend that to also allow radio/toggle buttons. What I'd like to do is have a common abstract class called ImageButtonBase that has default implementations for ImageSource and Text, etc. That makes a regular ImageButton implementation pretty easy. The issue I am having is creating the RadioButton flavor of it. As I see it, there are at least three options: It would be easy to create something that derives from RadioButton, but then I can't use the abstract class I've created. I could change the abstract class to an interface, but then I lose the abstract implementations, and will in fact have duplication of code. I could derive from my abstract class, and re-implement the RadioButton-type properties and events (IsChecked, GroupName, etc.), but that certainly doesn't seem like a great idea. Note: I have seen http://stackoverflow.com/questions/2362641/how-to-get-a-group-of-toggle-buttons-to-act-like-radio-buttons-in-wpf, but what I want to do is a little more complex. I'm just wondering if anybody has an example of an implementation, or something that might be adapted to this kind of scenario. I can see pros and cons of each of the ideas above, but each comes with potential pitfalls. Thanks, wTs

    Read the article

  • Does OpenCL allow concurrent writes to same memory address?

    - by Wonko
    Is two (or more) different threads allowed to write to the same memory location in global space in OpenCL? The write is always changing a uchar from 0 to 1 so the outcome should be predictable, but I'm getting erratic results in my program, so I'm wondering if the reason can be that some of the writes fail. Could it help to declare the buffer write-only and copy it to a read-only buffer afterwards?

    Read the article

  • Disable Adding Item to Collection

    - by Wonko the Sane
    Hi All, I'm sure there's an "easy" answer to this, but for the moment it escapes me. In an MVVM application, I have a property that is a ObservableCollection, used for displaying some set of elements on the view. private readonly ObservableCollection<MyType> mMyCollection = new ObservableCollection<MyType>(); public ObservableCollection<MyType> MyCollection { get { return mMyCollection; } } I want to restrict consumers of this collection from simply using the property to add to the collection (i.e. I want to prevent this from the view): viewModel.MyCollection.Add(newThing); // want to prevent this! Instead, I want to force the use of a method to add items, because there may be another thread using that collection, and I don't want to modify the collection while that thread is processing it. public void AddToMyCollection(MyType newItem) { // Do some thread/task stuff here } Thanks, wTs

    Read the article

  • Getting a `free()` error when deallocating with `delete` in the backtrace

    - by wonko
    I got the following error from gdb: *** glibc detected *** /.root0/autohome/u132/hsreekum/ipopt/ipopt/debug/Ipopt/examples/ex3/ex3: free(): invalid next size (fast): 0x0000000120052b60 *** Here's the backtrace: #0 0x000000555626b264 in raise () from /lib/libc.so.6 #1 0x000000555626cc6c in abort () from /lib/libc.so.6 #2 0x00000055562a7b9c in __libc_message () from /lib/libc.so.6 #3 0x00000055562aeabc in malloc_printerr () from /lib/libc.so.6 #4 0x00000055562b036c in free () from /lib/libc.so.6 #5 0x000000555561ddd0 in Ipopt::TNLPAdapter::~TNLPAdapter () from /home/ba01/u132/hsreekum/ipopt/ipopt/build/lib/libipopt.so.1 #6 0x00000055556a9910 in Ipopt::GradientScaling::~GradientScaling () from /home/ba01/u132/hsreekum/ipopt/ipopt/build/lib/libipopt.so.1 #7 0x00000055557241b8 in Ipopt::OrigIpoptNLP::~OrigIpoptNLP () from /home/ba01/u132/hsreekum/ipopt/ipopt/build/lib/libipopt.so.1 #8 0x00000055556ae7f0 in Ipopt::IpoptAlgorithm::~IpoptAlgorithm () from /home/ba01/u132/hsreekum/ipopt/ipopt/build/lib/libipopt.so.1 #9 0x0000005555602278 in Ipopt::IpoptApplication::~IpoptApplication () from /home/ba01/u132/hsreekum/ipopt/ipopt/build/lib/libipopt.so.1 #10 0x0000005555614428 in FreeIpoptProblem () from /home/ba01/u132/hsreekum/ipopt/ipopt/build/lib/libipopt.so.1 #11 0x0000000120001610 in main () at ex3.c:169` And here's the code for Ipopt::TNLPAdapter::~TNLPAdapter () TNLPAdapter::~TNLPAdapter() { delete [] full_x_; delete [] full_lambda_; delete [] full_g_; delete [] jac_g_; delete [] c_rhs_; delete [] jac_idx_map_; delete [] h_idx_map_; delete [] x_fixed_map_; delete [] findiff_jac_ia_; delete [] findiff_jac_ja_; delete [] findiff_jac_postriplet_; delete [] findiff_x_l_; delete [] findiff_x_u_; } My question is : why does free() throw an error when ~TNLPAdapter() uses delete[]? Also, I would like to step through ~TNLPAdapter() so I can see which deallocation causes the error. I believe the error occurs in the external library (IPOPT) but I have compiled it with debug flags on ; is this sufficient?

    Read the article

  • How to build Gantt chart from a set of Redmine tickets without filling dates in all of them?

    - by Alexander Gladysh
    Redmine 1.1.1 I've created a set of tickets for a new project. In each issue I filled Subject, Description and Estimated time fields. I also filled blocks/blocked by dependencies in Related issues. But the Gantt chart for this project is empty (that is, it contains all the tasks, but does not contain any "bars" for them). I need to get a Gantt chart (or any other visual representation) to show to other project members. I'd hate to type all that information again into OpenProj. Is there a way to get a serviceable Gantt chart from the Redmine? Update: In the answers below I read that to get working Gantt chart I have to input start date and due date manually for each issue. I believe that this information should be inferred automatically from start date of first ticket (first — depenency-wise), estimated time of each ticket, dependency graph, resource assignment and working hours calendar. Just as it happens in any minimally sane Gantt chart project management tool. To enter this information by hand and to keep it up-to-date manually as the project evolves is insane waste of time. Is there a way to generate Gantt chart from the set of Redmine tickets without filling in all this information manually? (Solutions involving data export + import in sane tool or involving existing plugins are perfectly acceptable.)

    Read the article

  • File doesn't exist when trying to change permissions following the avasys image scan manual

    - by Howard Graham
    I was finally able to connect to avasys.jp and downloaded and installed iscan_2.28.1-3.ltdl7_amd64.deb iscan-data_1.13.0-1_all.deb. The programs appeared to install correctly. I then ran sane-find-scanner and got back: found USB scanner (vendor=0x04b8, product=0x012d) at libusb:001:003 I then ran lsusb and got back: Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 001 Device 003: ID 04b8:012d Seiko Epson Corp. Perfection V10/V100 (GT-S600/F650) Bus 001 Device 004: ID 03f0:4817 Hewlett-Packard Bus 002 Device 002: ID 093a:2510 Pixart Imaging, Inc. Optical Mouse the avasys image scan manual instructed me to run chmod 0666 /proc/bus/usb/001/003 which returned chmod: cannot access `/proc/bus/usb/001/003': No such file or directory In 12.04, no such directory exists. 12.04 appears to deal with USB in another way. What must I do to get the usb port 001/003 recognized by xsane and sane as the port where the scanner can be located? What must I do to continue installing the scanner?

    Read the article

  • Flash/AIR AS3: comparing contents of Screen.screens

    - by matt lohkamp
    In a sane world, this works as expected: var array:Array = ['a','b','c]; trace(array.indexOf(array[0])); // returns 0 In an insane world, this happens: trace(Screen.screens.indexOf(Screen.screens[0])); // returns -1 ... if Screen.screens is an Array of the available instances of Screen, why can't that array give an accurate indexOf one of its own children? edit - apparently to get back to the world of the sane, all you have to do is this: var array:Array = Screen.screens; trace(array.indexOf(array[0])); // returns 0 Anyone know why?

    Read the article

  • Which is the best .NET image capture API for me to use?

    - by David
    I have been tasked with integrating image acquisition into a .NET application and I have been looking for an API to use for performing this function. I have come across several "standard" APIs, some have been in existence for a long time, some not so long. I have looked at references to ISIS, TWAIN, WIA, and SANE (said to be mostly *nix). They all appear to be Win32 libraries except for SANE, and I was wondering what the current recommendations are for talking to image acquisition devices (scanners)? Feel free to recommend something else if you feel it is better. I'm looking for open source options. Edit: I put open source, when what I actually meant was free. using WIA or TWAIN is fine since they are free even though they are proprietary interfaces.

    Read the article

  • Data structures for a 2D multi-layered and multi-region map?

    - by DevilWithin
    I am working on a 2D world editor and a world format subsequently. If I were to handle the game "world" being created just as a layered set of structures, either in top or side views, it would be considerably simple to do most things. But, since this editor is meant for 3rd parties, I have no clue how big worlds one will want to make and I need to keep in mind that eventually it will become simply too much to check, handling and comparing stuff that are happening completely away from the player position. I know the solution for this is to subdivide my world into sub regions and stream them on the fly, loading and unloading resources and other data. This way I know a virtually infinite game area is achievable. But, while I know theoretically what to do, I really have a few questions I'd hoped to get answered for some hints about the topic. The logic way to handle the regions is some kind of grid, would you pick evenly distributed blocks with equal sizes or would you let the user subdivide areas by taste with irregular sized rectangles? In case of even grids, would you use some kind of block/chunk neighbouring system to check when the player transposes the limit or just put all those in a simple array? Being a region a different data structure than its owner "game world", when streaming a region, would you deliver the objects to the parent structures and track them for unloading later, or retain the objects in each region for a more "hard-limit" approach? Introducing the subdivision approach to the project, and already having a multi layered scene graph structure on place, how would i make it support the new concept? Would you have the parent node have the layers as children, and replicate in each layer node, a node per region? Or the opposite, parent node owns all the regions possible, and each region has multiple layers as children? Or would you just put the region logic outside the graph completely(compatible with the first suggestion in Q.3) When I say virtually infinite worlds, I mean it of course under the contraints of the variable sizes and so on. Using float positions, a HUGE world can already be made. Do you think its sane to think beyond that? Because I think its ok to stick to this limit since it will never be reached so easily.. As for when to stream a region, I'm implementing it as a collection of watcher cameras, which the streaming system works with to know what to load/unload. The problem here is, i will be needing some kind of warps/teleports built in for my game, and there is a chance i will be teleporting a player to a unloaded region far away. How would you approach something like this? Is it sane to load any region to memory which can be teleported to by a warp within a radius from the player? Sorry for the huge question, any answers are helpful!

    Read the article

  • Best way to solve tile drawing in 2D side scroller?

    - by TheCompBoy
    What i still can't figure out is which would be the more sane way / easier and faster way to draw the map on the screen.. I mean i will use many tiles for my maps in my side scroller.. But problem is should i make the maps in whole images like one .png file for each map (Example) or should i draw the tiles by code like a for loop in c++.. Which way is most recomended or where can i read about which way is the best.

    Read the article

  • How to configure an Ubuntu 12.04 virtual server and VMWare ESXi5 the way VMWare would be able to shut it down properly?

    - by Ivan
    I run an Ubuntu 12.04 server as a virtual machine on a VMWare ESXi 5 server. I've configured VMWare to shut the quest machines down the sane way (with an ACPI (if I understand it righ) shutdown signal so that guest OSes would do it). And this works with other VMs (running Windows 7 Professional and openSuSE) but doesn't work with the Ubuntu server - VMWare still offers just to power them off when I ask it to stop the guest. Any ideas how to fix this?

    Read the article

  • My internet goes down after a while

    - by Rafa Mena
    The problem is that the internet goes down after a while, i can connect perfectly when i first turn on my netbook but after a while it disconects and keeps trying to reconect but never gets it. now, im completely new in ubuntu, y merely know a few commands for the terminal and im not sure what info do you need from me to help... all i know is that the Wi-Fi is failind on ubuntu but not in windows 7 (in the sane netbook)

    Read the article

  • zsh : How to list directory content with tab?

    - by Philippe CM
    I just switched from BASH to ZSH and thing are pretty good, but: when I start typing cd /usr/share/s and hit TAB, this is what I get : $ cd /usr/share/sane/ sane/ skype/ ssl-cert/ screen/ smplayer/ strigi/ seed-gtk3/ snmp/ synaptic/ sgml/ software-properties/ system-config-printer/ sgml-base/ soprano/ sysv-rc/ sgml-data/ sounds/ simple-scan/ splashy/ And this is ok. If I then hit TAB again, I get $ cd /usr/share/screen/, the next candidate, witch is also OK. (BTW, how do I cycle back to the previous candidate? Sorry, on to my question) Now what if I want to see the contents of /usr/share/screen/ now ? You now, BASH-style? The cursor is at the end of the line, will I have to ctrl-a (or home), then del del (to erase cd) then ls then ENTER? That seems like a lot of typing. (And it - possibly unnecessarily - enters the command in the history) Would not there be a key (maybe modifier-TAB? but the obvious candidates are already taken by the desktop... I digress) that would tell zsh to stop cycling through /usr/share/ and instead, just list the content /usr/share/screen/ ?

    Read the article

  • PHP and Ruby: how to leverage both? and, is it worth it?

    - by dukeofgaming
    As you might have noticed from the title, this is not a "PHP or Ruby", or a "PHP vs. Ruby" question. This is a question on how to leverage PHP + Ruby in the same business. I myself am a PHP developer, I love the language because of its convenience and I specially love the ecosystem of resources that surround it: Joomla, Drupal, Wordpress, Symfony2, Doctrine2, etc. However, the language itself can be a little disappointing sometimes. OTOH, Ruby looks like a very beautiful language and —from studying it superficially in several aspects— I could say it is leaner than Python as a language per se. However, from what I've seen there is pretty much only RoR making noise, and I don't like RoR so much (mainly because its model layer). As Co-CEO and CTO at my company I'm trying to think outside of the box since I want to start to focus on the human side of technology and see if its sane to use both PHP and Ruby. Here are some random thoughts: Ruby folk seem to be generally better suited programmers than PHP folk (in terms of averages), I know the previous statement is somewhat baloney because very good and well architected PHP can be written, but I'd say the Ruby programmer culture is better than PHP's. The thing about Ruby is that it seems better suited for rapid development, I don't really know if this is only the case for RoR, but I do know that there are certain practices (perhaps not so good) like monkey patching that let business needs be satified quicker. From a marketing point of view (yep, sometimes you need to leverage the marketing BS for the sake of your company) Ruby seems better while PHP carries some stigmas. PHP 5.4 is bringing traits, and that is better/cleaner than mixins. That could really make PHP as lean as Ruby —or more— for certain stuff. Now, concretely, my questions: Would a PHP programmer want to learn Ruby?, I know I do, but conversely, would a Ruby programmer want to learn PHP?. What kinds of projects or situations would be better suited for Ruby that are not suited for PHP?. What is the actual ecosystem of Ruby?, aside from RoR, I have not seen other hyped technologies/frameworks (I've seen RSpec, but I confess being a total noob on what BDD really consists of and its implications). Supposing there are a certain type of projects ideal for Ruby, would there be a moment that its better to move it to PHP?. I know PHP can handle lots of stuff, but I've read that Ruby has its limitations when scaling (or is that RoR?, or is that baloney for both?). Finally and most importantly, would it be sane to maintain projects in two languages?, or is that just stupid. As I said, it looks like Ruby is leaner on the short term and that can make a project happen and succeed, but I'm not so sure about that on the long run. I'm looking for insights mainly from people that know well the strengths and weaknesses of the languages —preferably both of them— and Ruby's ecosystem in real practice, meaning: frameworks and applications like the ones I quoted from PHP's ecosystem. Best regards and thanks for your time.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11  | Next Page >