Search Results

Search found 603 results on 25 pages for 'maximize'.

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

  • Configuring three monitors with two Radeon X1600/X1650 graphics cards under Ubuntu

    - by cpm
    I have three SyncMaster 932a monitors I want to use with two Radeon X1600/X1650 cards under Linux. I am running X.org X Server 1.6.0, as provided by Ubuntu's Wubi installer. After turning off mirroring, I ended up with this xorg.conf: Section "Monitor" Identifier "Configured Monitor" EndSection Section "Screen" Identifier "Default Screen" Monitor "Configured Monitor" Device "Configured Video Device" SubSection "Display" Virtual 2560 1024 EndSubSection EndSection Section "Device" Identifier "Configured Video Device" EndSection The left monitor had a menu bar and a task bar, the center monitor was just desktop, and windows would maximize to the current monitor. The third monitor and second graphics card weren't being used at all. Then I changed my configuration to manually specify each card with their PCI bus: Section "ServerLayout" Identifier "TheLayout" Screen 0 "Radeon Screen 1" Screen 1 "Radeon Screen 2" RightOf "Radeon Screen 1" EndSection Section "Screen" Identifier "Radeon Screen 1" Monitor "Configured Monitor" Device "Radeon the First" SubSection "Display" Virtual 2560 1024 EndSubSection EndSection Section "Screen" Identifier "Radeon Screen 2" Monitor "Configured Monitor" Device "Radeon the Second" EndSection Section "Device" Identifier "Radeon the First" Driver "radeon" BusID "PCI:1:0:0" EndSection Section "Device" Identifier "Radeon the Second" Driver "radeon" BusID "PCI:2:0:0" EndSection Section "Monitor" Identifier "Configured Monitor" EndSection Now both the left and right monitors have task bars and menu bars. Windows cannot be dragged from the first two monitors to the third monitor. Also, maximizing in the left or center window fills both monitors. I also tried adding Option "Xinerama" "true" to the ServerLayout section. X11 wasn't able to start up. I want to: Allow moving windows along all three monitors. Maximizing only fills the current monitor. Either have menu/task bars on only the left monitor or all three monitors How can I make this possible?

    Read the article

  • Value of Itanium or Sparc over x86_64 for Oracle Deployment

    - by Antitribu
    We are looking at a new environment to run our Oracle Database running on SUSE (potentially migrating to RedHat). Our database is approximately 100GB and performs adequately on our current hardware (x86_64) with approximately 6GB of ram allocated to it. We are growing quickly however and will require more performance shortly. Given the cost of Oracle licenses we would like to maximize the value from each license by choosing the most appropriate CPU to run the software on. The questions are: Are there substantial benefits to looking at Itanium or Sparc hardware, are there any drawbacks? Is there a point where one starts to scale out better? What are the long term support options for Itanium? Given the dominance of x86 would it be safer long term to stick with x86? On average what would be the performance benefit of implementing an Oracle database on Itanium or Sparc over x86_64? Is this an issue at all or will other factors (IO/RAM) cap out first? If anyone can point me towards some solid documentation on comparisons between the platforms that provides good case analysis of when to choose which I'm more than happy to accept that as an answer. Edit:- Added Sparc as an Option as it was previously not considered however with the recent Oracle Sun aquisition seems very relevant.

    Read the article

  • Weird problem with Visual C++ 2010 Express

    - by Robert Vella
    This has happened before on my Vista Premium installation, and now it's happening on my Windows 7 Home Premium installation. Basically everytime I install Visual Studio Express 2010, it works fine for a random amount of time but then suddenly starts to hide from my sight -- that's the best way I can explain it. VS does not crash, and from what I can tell it does not freeze either; It continues to work, I can even "minimize" and "maximize" it; I simply cannot see it nor can I interact with it any meaningful way. Also: After the "crash" there are no logs in: Root\Program Files (x86)\Microsoft Visual Studio 10.0\Microsoft Visual C++ 2010 Express - ENU. Nor any other files created at the time of the crash. There are no traces in the event viewer. The program seems to be functioning perfectly in the process manager. If I reinstall Visual C++, it works normally for a seemingly random period of time before going cookoo again. I am stumped. This has never happened to me before, with any other program. And yet I doubt it really is a problem with Visual C++; More like something general that seems to have picked on it for some reason. Still, after a clean install with a new OS, I'm kinda thinking there's something wrong here. Any help would be appreciated, altough I suspect that the answer to this question will make me feel embarassed. P.S. Not sure if it helps, but I think around the same time I started having problems (On both installations) with windows turning off the display when I leave the computer, and then seemingly crashing when it turns it on again -- in fact when I interact with it it seems to be responding to my commands without actually display anything.

    Read the article

  • Permanent solution to Win XP SP3 window animation removal

    - by epale85
    Hello everyone, May I know how I can get rid of the Window Animation (seen when you minimise or maximise a window) in Windows XP Service Pack 3 Permanently?? I have tried the following two solutions: I went to the control panel---adjust visual effects--- then unchecked the "Animate windows when maximising and minimising" option. 2.I have tried using windows powertoys tweakUI to disable the animation. 3.I even tried this: Turn Off Window Animation You can shut off the animation displayed when you minimize and maximize Windows. 1. Open RegEdit 2. Go to HKEY_CURRENT_USER\Control panel \Desktop\ WindowMetrics 3. Create a new string value "MinAnimate". 4. Set the value data of 0 for Off or 1 for On But still no help The Big Problem is that the window animation will disappear for a while but returns again some time later. When I navigate back to the "adjust visual effects" window, the checkbox for "Animate windows when maximising and minimising" is checked again. Thank you very much

    Read the article

  • Display errors using VMWare Player and Remote Desktop on Windows XP

    - by Tim
    I've come up against a weird display issue that I can't seem to find any "fix" for. When I first boot up my computer, everything behaves normally. If I start to use VMWare Player and/or Remote Desktop, my desktop starts having some odd video issues. The frames for some windows aren't drawn at all, if I move windows around rapidly, the area under where the window used to be isn't cleared (still shows artifacts of the content of the window), etc. In some cases, the minimize / restore / maximize buttons aren't drawn (but are click-able if you can guess where they are). I've tried the usual stuff - current drivers all around, using a single monitor, etc.. none of it seems to have any bearing. If I try to disable hardware acceleration, it tends to crash the computer. As I said earlier, it's running Windows XP, dual monitors, an NVidia en8400GS video card, asus p7p55d motherboard. Not sure what other pertinent details are needed. I would appreciate any help or suggestions!

    Read the article

  • WPF DataGrid window resize does not resize DataGridColumns

    - by skylap
    I have a WPF DataGrid (from the WPFToolkit package) like the following in my application. <Controls:DataGrid> <Controls:DataGrid.Columns> <Controls:DataGridTextColumn Width="1*" Binding="{Binding Path=Column1}" Header="Column 1" /> <Controls:DataGridTextColumn Width="1*" Binding="{Binding Path=Column2}" Header="Column 2" /> <Controls:DataGridTextColumn Width="1*" Binding="{Binding Path=Column3}" Header="Column 3" /> </Controls:DataGrid.Columns> </Controls:DataGrid> The column width should be automatically adjusted such that all three columns fill the width of the grid, so I set Width="1*" on every column. I encountered two problems with this approach. When the ItemsSource of the DataGrid is null or an empty List, the columns won't size to fit the width of the grid but have a fixed width of about 20 pixel. Please see the following picture: http://img169.imageshack.us/img169/3139/initialcolumnwidth.png When I maximize the application window, the columns won't adapt their size but keep their initial size. See the following picture: http://img88.imageshack.us/img88/9362/columnwidthaftermaximiz.png When I resize the application window with the mouse, the columns won't resize. I was able to solve problem #3 by deriving a sub class from DataGrid and override the DataGrid's OnRenderSizeChanged method as follows. protected override void OnRenderSizeChanged(SizeChangedInfo sizeInfo) { base.OnRenderSizeChanged(sizeInfo); foreach (var column in Columns) { var tmp = column.GetValue(DataGridColumn.WidthProperty); column.ClearValue(DataGridColumn.WidthProperty); column.SetValue(DataGridColumn.WidthProperty, tmp); } } Unfortunately this does not solve problems #1 and #2. How can I get rid of them?

    Read the article

  • Why jquery have problem with onbeforeprint even?

    - by Cesar Lopez
    Hi all, I have the following function. $(function() { $(".sectionHeader:gt(0)").click(function() { $(this).next(".fieldset").slideToggle("fast"); }); $("img[alt='minimize']").click(function(e) { $(this).closest("table").next(".fieldset").slideUp("fast"); e.stopPropagation(); return false; }); $("img[alt='maximize']").click(function(e) { $(this).closest("table").next(".fieldset").slideDown("fast"); e.stopPropagation(); return false; }); }); <script type="text/javascript"> window.onbeforeprint = expandAll; function expandAll(){ $(".fieldset:gt(0)").slideDown("fast"); } </script> For this html <table class="sectionHeader" ><tr ><td>Heading 1</td></tr></table> <div style="display:none;" class="fieldset">Content 1</div> <table class="sectionHeader" ><tr ><td>Heading 2</td></tr></table> <div style="display:none;" class="fieldset">Content 2</div> I have several div class="fieldset" over the page, but when I do print preview or print, I can see all divs sliding down before opening the print preview or printing but on the actual print preview or print out they are all collapse. I would appreciate if anyone comes with a solution for this. Anyone have any idea why is this or how to fix it? Thanks. PS:Using a does not work either ( I assume because jquery using toggle) and its not the kind of question I am looking for.

    Read the article

  • What's are the best readings to start using WPF instead of WinForms?

    - by Ivan
    Keeping in mind what CannibalSmith once said - "All the answers are saying "WPF is different". That's a huge understatement. You not only have to learn lots of new stuff - you must forget everything you've learned from Forms. It's a completely new way of doing UI." .. and having many years of experience with visual Windows desktop applications development (VB6, Borland C++ Builder VCL, WinForms) (which is hard to forget), how do I quickly move to developing to say well-formed WPF applications with Visual Studio? I don't need boozy-woozy graphics to give my app look and feel of a Hollywood blockbuster or a million dollar pyjamas. I always loved tidiness of standard Windows common controls and UI design guidelines, end even more I enjoyed them under Vista Glass Aero Graphite sauce. I am perfectly satisfied with WinForms but I want to my applications to be built of the most efficient and up-to-date standard technologies and architectured according to the most efficient and flexible patterns of today and tomorrow, leveraging interface-based integration and functionality reuse and to take all advantages of modern hardware and APIs to maximize performance, usability, reliability, maintainability, extensibility, etc. I very much like the idea of separating view, logic and data, letting a view to take all advantages of the platform (may it run as a web browser applet on a thin client or as a desktop application on a PC with a latest GPU), letting logic be reused, parallelized and seamlessly evolve, storing data in a well structured format in a right place. But... while moving from VB6 to Borland C++ Builder was very easy (no books/tutorials needed to turn it on and start working) (assuming I already knew C++), moving from BCB to WinForms was the same seamless, it does not seem any obvious to me how to do with WPF. So how do I best convert myself from a WinForms developer into a right-way thinking and doing WPF developer?

    Read the article

  • How can I process an image in .NET for a full-page print with a quality like Windows Photo Gallery d

    - by Triynko
    I'm writing a printing routing in C#, using the .NET PrintDocument class, handling the OnPrintPage event. I've managed to maximize the margins and print the Image in landscape mode, but it simply does not look as good as when I print the same image file from Windows Photo Gallery (formerly Windows Picture and Fax Viewer), the default image preview program in Windows Vista. I noticed an option there for selecting "Sharpen Image for Printing", but what does that do? I've thought about printing copies of the image from Windows Photo Gallery first, then sending the sheets through the printer a second time to print the custom overlays I need, but it's hard to make it line up every time, since the printer sucks the sheet in without the kind of precision I need... so I really need to do ALL the drawing commands within C#, including the image. Does anyone know how to perform pre-processing on the bitmap so that it prints as nicely as Windows Photo Gallery does it? Are there any simple print drivers that can intercept Photo Gallery printing output as a standard image file (bmp, png, etc.) that can be read by the .NET Image class? I'm all for creativity here.

    Read the article

  • How to implement Excel Solver functionality in C#?

    - by Vic
    Hi, I have an application in C#, I need to do some optimization calculations, like Excel Solver Add-in does, one option is certainly to write my own solver implementation, but I'm kind of short of time, so I'm looking into libraries that already exist that can help me with this. I've been trying the Microsoft Solver Foundation, which seems pretty neat and cool, the problem is that it doesn't seem to work with the kind of calculations that I need to do. At the end of this question I'm adding the information about the calculations I need to perform and optimize. So basically my question is if any of you know of any other library that I can use for this purpose, or any tutorial that can help to do my own solver, or any idea that gives me a lead to solve this issue. Thanks. Additional Info: This is the data I need to calculate: I have 7 variables, lets call them var1, var2,...,var7 The constraints for these variables are: All of them need to be 0 <= varn <= 0.5 (where n is the number of the variable) The sum of all the variables should be equal to 1 The objective is to maximize the target formula, which in Excel looks like this: (MMULT(TRANSPOSE(L26:L32),M14:M20)) / (SQRT(MMULT(MMULT(TRANSPOSE(L26:L32),M4:S10),L26:L32))) The range that you see in this formula, L26:L32, is actually the range with the variables from above, var1, var2,..., varn. M14:M20 and M4:S10 are ranges with data that I get from different sources, there are more likely decimal values. As I said before, I was using Microsoft Solver Foundation, I modeled pretty much everything with it, I created functions that handle the operations of the target formula, but when I tried to solve the model it always fail, I think it is because of the complexity of the operations. In any case, I just wanted to show these data so you can have an idea about the kind of calculations that I need to implement.

    Read the article

  • Programming tips for writing document editors?

    - by Tesserex
    I'm asking this because I'm in the process of writing two such editors for my Mega Man engine, one a tileset editor, and another a level editor. When I say document editor, I mean the superset application type for things like image editors and text editors. All of these share things like toolbars, menu options, and in the case of image editors, and my apps, tool panes. We all know there's tons of advice out there for interface design in these apps, but I'm wondering about programming advice. Specifically, I'm doubting my code designs with the following things: Many menu options toggle various behaviors. What's the proper way to reliably tie the checked state of the option with the status of the behavior? Sometimes it's more complicated, like options being disabled when there's no document loaded. More and more consensus seems to be against using MDI, but how should I control tool panes? For example, I can't figure out how to get the panels to minimize and maximize along with the main window, like Photoshop does. When tool panels are responsible for a particular part of the document, who actually owns that thing? The main window, or the panel class? How do you do communication between the tool panels and the main window? Currently mine is all event based but it seems like there could be a better way. This seems to be a common class of gui application, but I've never seen specific pointers on code design for them. Could you please offer whatever advice or experience you have for writing them?

    Read the article

  • Spaced repetition (SRS) for learning

    - by Fredrik Johansson
    A client has asked me to add a simple spaced repeition algorithm (SRS) for an onlinebased learning site. But before throwing my self into it, I'd like to discuss it with the community. Basically the site asks the user a bunch of questions (by automatically selecting say 10 out of 100 total questions from a database), and the user gives either a correct or incorrect answer. The users result are then stored in a database, for instance: userid questionid correctlyanswered dateanswered 1 123 0 (no) 2010-01-01 10:00 1 124 1 (yes) 2010-01-01 11:00 1 125 1 (yes) 2010-01-01 12:00 Now, to maximize a users ability to learn all answers, I should be able to apply an SRS algorithm so that a user, next time he takes the quiz, receives questions incorrectly answered more often; than questions answered correctly. Also, questions that are previously answered incorrectly, but recently often answered correctly should occur less often. Have anyone implemented something like this before? Any tips or suggestions? Theese are the best links I've found: http://en.wikipedia.org/wiki/Spaced_repetition http://www.mnemosyne-proj.org/principles.php http://www.supermemo.com/english/ol/sm2.htm

    Read the article

  • Form not updating usercontrol

    - by user328259
    From the post "Growing user control not updating"... Using C#, .Net 2.0 in a Windows environment. UserControl1 - draws cells to a bitmap buffer dependent upon NumberOfCells property UserControl2 - panel contains UserControl1 which displays vertical scroll when necessary; also contains NumberOfCells which sets UserControl1's NumberOfCells. Formf1 - contains NumericUpDown controls (just increments) which updates the UserControl2 - suppose to! When I increment the control on the form by say 20, UserControl1 adds the necessary cells, UserControl2 displays the vertical scroll bar accordingly, BUT the form does not 'redraw' to the updated/correct image!! Meaning, after I increment by 20, cells are added, vertical scrool bar added... but the image shown is just everything else expanding. I reset the control to scoll to the very TOP and the scrolling works, but the image is still staic... UNTIL I resize my form, more specifically, when I change it from maximize to window or vice versa!!! What can I do to 'reset/redraw' the correct image???? Thank you in advance. Lawrence

    Read the article

  • Scale image to fit text boxes around borders

    - by nispio
    I have the following plot in Matlab: The image size may vary, and so may the length of the text boxes at the top and left. I dynamically determine the strings that go in these text boxes and then create them with: [M,N] = size(img); imagesc((1:N)-0.5,(1:M)-0.5, img > 0.5); axis image; grid on; colormap([1 1 1; 0.5 0.5 0.5]); set(gca,'XColor','k','YColor','k','TickDir','out') set(gca,'XTick',1:N,'XTickLabel',cell(1,N)) set(gca,'YTick',1:N,'YTickLabel',cell(1,N)) for iter = 1:M text(-0.5, iter-0.5, sprintf(strL, br{iter,:}), ... 'FontSize',16, ... 'HorizontalAlignment','right', ... 'VerticalAlignment','middle', ... 'Interpreter','latex' ); end for iter = 1:N text(iter-0.5, -0.5, {bc{:,iter}}, ... 'FontSize',16, ... 'HorizontalAlignment','center', ... 'VerticalAlignment','bottom', ... 'Interpreter','latex' ); end where br and bc are cell arrays containing the appropriate numbers for the labels. The problem is that most of the time, the text gets clipped by the edges of the figure. I am using this as a workaround: set(gca,'Position',[0.25 0.25 0.5 0.5]); As you can see, I am simply adding a larger border around the plot so that there is more room for the text. While this scaling works for one zoom level, if I maximize my plot window I get way too much empty space, and if I shrink my plot window, I get clipping again. Is there a more intelligent way to add these labels to use the minimum amount of space while making sure that the text does not get clipped?

    Read the article

  • Designing code for a duo Website + AIR desktop App

    - by faB
    I want to use AIR to create an OFFLINE version of a "webapp" kind of website (lots of ajax, front end code). Haven't been much further than the HelloWorld example, I keep wondering: how do you design your code, to maximize code reuse between the website (say in php or Java or .Net), and the AIR app ? Can you actually re-use 100% of the front end code, provided that it is designed to account for the AIR app ? How would you go about doing that ? For example, the website makes many Ajax calls which have latency, and uses listeners. The AIR app doesn't need listeners it could run database requests synchronously, and it doesn't need to run ajax calls right? Would you write an abstraction layer for that ? So that the same calls on the AIR app will not do a xmlhttp but instead implement the server-side code with AIR; and call the listener ? So you don't have to rewrite the front end code patterns ? Does this make sense ? It's really hard to search on Google. I'm thinking there must be a good article somewhere of somebody who went through and perhaps a framework to do that ?

    Read the article

  • Helpful advice on developing a professional MS Word add-on

    - by Dan Tao
    A few months back I put together a simple proof-of-concept piece of software for a small firm with an idea for a document editing tool. The company wanted this tool to be integrated into Microsoft Word, understandably, to maximize its accessibility to the average user. I essentially wrote the underlying library with all of the core functionality as a C# project, and then used VSTO to get it running inside of Word. It felt like a bit of a duct tape solution, really; but then, I have (practically) zero experience developing tools for integration with MS Office, and it was only a proof of concept anyway. Well, the firm was quite pleased with my work overall, and they're looking to move from "proof of concept" to the real deal. Fortunately, as I said, the core functionality is all there and will only need to be somewhat tweaked and enhanced. My main concern is figuring out how to put together an application that will integrate with MS Word in a clean and polished way, and which can be deployed easily in accordance with a regular user's expectations (i.e., simply running an install program and voila, it's there in Word). I seem to remember reading somewhere that nobody uses VSTO for real professional projects. Is this true? False? What are the alternatives? And what are the tips and gotchas that I should be aware of before getting started on this issue of MS Word integration?

    Read the article

  • Special technology needed for browser based chat?

    - by orokusaki
    On this post, I read about the usage of XMPP. Is this sort of thing necessary, and more importantly, my main question expanded: Can a chat server and client be built efficiently using only standard HTTP and browser technologies (such as PHP and JS, or RoR and JS, etc)? Or, is it best to stick with old protocols like XMPP find a way to integrate them with my application? I looked into CampFire via LiveHTTPHeaders and Firebug for about 5 minutes, and it appears to use Ajax to send a request which is never answered until another chat happens. Is this just CampFire opening a new thread on the server to listen for an update and then returning a response to the request when the thread hears an update? I noticed that they're requesting on a specific port (8043 if memory serves me) which makes me think that they're doing something more complex than just what I mentioned. Also, the URL requested started with /tcp/ which I found interesting. Note: I don't expect to ever have more than 150 users live-chatting in all the rooms combined at the same time. I understand that if I was building a hosted pay for chat service like CampFire with thousands of concurrent users, it would behoove me to invest time in researching special technologies vs trying to reinvent the wheel in a simple way in my app. Also, if you're going to do it with server polling, how often would you personally poll to maximize response without slamming the server?

    Read the article

  • css background image is being cut off..

    - by Ronedog
    I have an unordered list and the background image is being cut off when trying to place it next to the text. I'm using jquery to add the class to the anchor tag to display the image, and its working fine, the only problem is the image gets cut off. I've been playing around with the css, but can't seem to figure out how to make the image display properly...it seems like the < li is hiding the image behind it somehow...can I place the image in front of the < li to make it display...or am I missing something else? Can someone help me? Thanks. Here's the HTML: <ul id="nav> <li> <a class="folder_closed">Item 1</a> </li> </ul> Here's the CSS: ul#nav{ margin-left:0; margin-right:0; padding-left:0px; text-indent:15px; } #nav > li{ vertical-align: top; text-align:left; clear: both; margin-left:0px; margin-right:0px; padding-right:0px; padding-left:15px; } .folder_open{ position:relative; background-image: url(../images/maximize.png); background-repeat: no-repeat; background-position: -5px 1px; } .folder_closed{ position:relative; background-image: url(../images/minimize.png); background-repeat: no-repeat; background-position: -5px 1px; }

    Read the article

  • Send Click Message to another application process

    - by Nazar
    Hi Guys I have a scenario, i need to send click events to an independent application. I started that application with the following code. private Process app; app = new Process(); app.StartInfo.FileName = app_path; app.StartInfo.WorkingDirectory = dir_path; app.Start(); Now i want to send Mouse click message to that applicaiton, I have specific coordinates in relative to application window. How can i do it using Windows Messaging or any other technique. I used [DllImport("user32.dll")] private static extern void mouse_event(UInt32 dwFlags, UInt32 dx, UInt32 dy, UInt32 dwData, IntPtr dwExtraInfo); It works well but cause the pointer to move as well. So not fit for my need. Then i use. [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = false)] static extern IntPtr SendMessage(IntPtr hWnd, int Msg, int wParam, int lParam); It works well for minimize maximize, but do not work for mouse events. The codes for mousevents i am using are, WM_LBUTTONDOWN = 0x201, //Left mousebutton down WM_LBUTTONUP = 0x202, //Left mousebutton up WM_LBUTTONDBLCLK = 0x203, //Left mousebutton doubleclick WM_RBUTTONDOWN = 0x204, //Right mousebutton down WM_RBUTTONUP = 0x205, //Right mousebutton up WM_RBUTTONDBLCLK = 0x206, //Right mousebutton do Thanks for the help in advance, and waiting for feedback.

    Read the article

  • How to index a table with a Type 2 slowly changing dimension for optimal performance

    - by The Lazy DBA
    Suppose you have a table with a Type 2 slowly-changing dimension. Let's express this table as follows, with the following columns: * [Key] * [Value1] * ... * [ValueN] * [StartDate] * [ExpiryDate] In this example, let's suppose that [StartDate] is effectively the date in which the values for a given [Key] become known to the system. So our primary key would be composed of both [StartDate] and [Key]. When a new set of values arrives for a given [Key], we assign [ExpiryDate] to some pre-defined high surrogate value such as '12/31/9999'. We then set the existing "most recent" records for that [Key] to have an [ExpiryDate] that is equal to the [StartDate] of the new value. A simple update based on a join. So if we always wanted to get the most recent records for a given [Key], we know we could create a clustered index that is: * [ExpiryDate] ASC * [Key] ASC Although the keyspace may be very wide (say, a million keys), we can minimize the number of pages between reads by initially ordering them by [ExpiryDate]. And since we know the most recent record for a given key will always have an [ExpiryDate] of '12/31/9999', we can use that to our advantage. However... what if we want to get a point-in-time snapshot of all [Key]s at a given time? Theoretically, the entirety of the keyspace isn't all being updated at the same time. Therefore for a given point-in-time, the window between [StartDate] and [ExpiryDate] is variable, so ordering by either [StartDate] or [ExpiryDate] would never yield a result in which all the records you're looking for are contiguous. Granted, you can immediately throw out all records in which the [StartDate] is greater than your defined point-in-time. In essence, in a typical RDBMS, what indexing strategy affords the best way to minimize the number of reads to retrieve the values for all keys for a given point-in-time? I realize I can at least maximize IO by partitioning the table by [Key], however this certainly isn't ideal. Alternatively, is there a different type of slowly-changing-dimension that solves this problem in a more performant manner?

    Read the article

  • Applying the Decorator Pattern to Forms

    - by devoured elysium
    I am trying to apply the Decorator Design Pattern to the following situation: I have 3 different kind of forms: Green, Yellow, Red. Now, each of those forms can have different set of attributes. They can have a minimize box disabled, a maximized box disabled and they can be always on top. I tried to model this the following way: Form <---------------------------------------FormDecorator /\ /\ |---------|-----------| |----------------------|-----------------| GreenForm YellowForm RedForm MinimizeButtonDisabled MaximizedButtonDisabled AlwaysOnTop Here is my GreenForm code: public class GreenForm : Form { public GreenForm() { this.BackColor = Color.GreenYellow; } public override sealed Color BackColor { get { return base.BackColor; } set { base.BackColor = value; } } } FormDecorator: public abstract class FormDecorator : Form { private Form _decoratorForm; protected FormDecorator(Form decoratorForm) { this._decoratorForm = decoratorForm; } } and finally NoMaximizeDecorator: public class NoMaximizeDecorator : FormDecorator { public NoMaximizeDecorator(Form decoratorForm) : base(decoratorForm) { this.MaximizeBox = false; } } So here is the running code: static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(CreateForm()); } static Form CreateForm() { Form form = new GreenForm(); form = new NoMaximizeDecorator(form); form = new NoMinimizeDecorator(form); return form; } The problem is that I get a form that isn't green and that still allows me to maximize it. It is only taking in consideration the NoMinimizeDecorator form. I do comprehend why this happens but I'm having trouble understanding how to make this work with this Pattern. I know probably there are better ways of achieving what I want. I made this example as an attempt to apply the Decorator Pattern to something. Maybe this wasn't the best pattern I could have used(if one, at all) to this kind of scenario. Is there any other pattern more suitable than the Decorator to accomplish this? Am I doing something wrong when trying to implement the Decorator Pattern? Thanks

    Read the article

  • How to get the most out of a 3 month intern?

    - by firoso
    We've got a software engineering intern coming in who's fairly competent and shows promise. There's one catch: we have him for 3 months full time and can't count on anything past that. He still has a year of school left, which is why we can't say for sure that we have him past 3 months. We have a specific project we're putting him on. How can we maximize his productivity while still giving him a positive learning experience? He wants to learn about development cycles and real-world software engineering. Anything that you think would be critical that you wish you had learned earlier? Nearly six months later: He's preformed admirably and even I have learned a lot from him. Thank you all for the input. Now I want to provide feedback to YOU! He has benefited most from sitting down and writing code. However, he has had a nasty history of bad software engineering practices which I'm trying to replace with good habits (properly finishing a method before moving on, not hacking code together, proper error channeling, etc). He has also really gained a lot by feeling involved in design decisions, even if most of the time they're related to my own design plans.

    Read the article

  • Where to store site settings: DB? XML? CONFIG? CLASS FILES?

    - by Emin
    I am re-building a news portal of which already have a large number of visits every day. One of the major concerns when re-building this site was to maximize performance and speed. Having said this, we have done many things from caching, to all sort of other measures to ensure speed. Now towards the end of the project, I am having a dilemma of where to store my site settings that would least affect performance. The site settings will include things such as: Domain, DefaultImgPath, Google Analytics code, default emails of editors as well as more dynamic design/display feature settings such as the background color of specific DIVs and default color for links etc.. As far as I know, I have 4 choices in storing all these info. Database: Storing general settings in the DB and caching them may be a solution however, I want to limit the access to the database for only necessary and essential functions of the project which generally are insert/update/delete news items, author articles etc.. XML: I can store these settings in an XML file but I have not done this sort of thing before so I don't know what kind of problems -if any- I might face in the future. CONFIG: I can also store these settings in web.config CLASS FILE: I can hard code all these settings in a SiteSettings class, but since the site admin himself will be able to edit these settings, It may not be the best solution. Currently, I am more close to choosing web.config but letting people fiddle with it too often is something I do not want. E.g. if somehow, I miss out a validation for something and it breaks the web.config, the whole site will go down. My concern basically is that, I cannot forsee any possible consequences of using any of the methods above (or is there any other?), I was hoping to get this question over to more experienced people out here who hopefully help make my decision.

    Read the article

  • Should I pass a SqlDataReader by reference or not when passing it out to multiple threads.

    - by deroby
    Hi all, being new to c# I've run into this 'conundrum' when passing around a SqlDataReader between different threads. Without going into too much detail, the idea is to have a main thread fetching data from the database (a large recordset) and then have a helper-task run through this record by record and doing some stuff based upon the contents of this. There is no feedback to the recordset, it simply wades through until no records are left. This works fine, but given the nature of the job at hand it should be possible to have this job spread over different threads (CPUs) to maximize throughput (the order of execution is of no significance). The question then becomes, when I pass this recordset in a SqlDataReader, do I have to use ref or not ? It kind of boils down to the question : if I pass the object around without specifying ref, won't it create new copies in memory and have records processed n times ? Or, don't I risk having the record-position being moved forward while not all fields have been fully read yet ? The latter seems more like a 'data racing' issue and probably is covered by the lock()ing mechanism (or not?). My initial take on the problem was that it doesn't really hurt passing the variable using ref, yet as a colleague put it : "you only need ref when you're doing something wrong" =) Additionally using ref restricts me from applying a Using() construction too which isn't very nice either. I thus create a "basic" project that tackles the same approach but without the ref notation. Tests so far show that it works flawlessly on a Core2Duo (2cpu) using any number of threads, yet I'm still a bit wary... What do you experts think about this ? Use ref or not ? You can find the test-project here as it seems I can't upload it to this question directly ?!? ps: it's just a test-project and I'm new to c#, so please be gentle on me when breaking down the code =P

    Read the article

  • Why jquery have problem with onbeforeprint event?

    - by Cesar Lopez
    Hi all, I have the following function. $(function() { $(".sectionHeader:gt(0)").click(function() { $(this).next(".fieldset").slideToggle("fast"); }); $("img[alt='minimize']").click(function(e) { $(this).closest("table").next(".fieldset").slideUp("fast"); e.stopPropagation(); return false; }); $("img[alt='maximize']").click(function(e) { $(this).closest("table").next(".fieldset").slideDown("fast"); e.stopPropagation(); return false; }); }); <script type="text/javascript"> window.onbeforeprint = expandAll; function expandAll(){ $(".fieldset:gt(0)").slideDown("fast"); } </script> For this html <table class="sectionHeader" ><tr ><td>Heading 1</td></tr></table> <div style="display:none;" class="fieldset">Content 1</div> <table class="sectionHeader" ><tr ><td>Heading 2</td></tr></table> <div style="display:none;" class="fieldset">Content 2</div> I have several div class="fieldset" over the page, but when I do print preview or print, I can see all divs sliding down before opening the print preview or printing but on the actual print preview or print out they are all collapse. I would appreciate if anyone comes with a solution for this. Anyone have any idea why is this or how to fix it? Thanks. PS:Using a does not work either ( I assume because jquery using toggle) and its not the kind of question I am looking for.

    Read the article

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