Search Results

Search found 174 results on 7 pages for 'rational'.

Page 5/7 | < Previous Page | 1 2 3 4 5 6 7  | Next Page >

  • Encapsulate standard C functions?

    - by Jack Stout
    While studying the C programming language and learning safe practices, I'm inclined to write a layer of functionality over several parts of the standard library. This would serve two purposes: I could use standard parts of the language in ways that feel more familiar or rational to me, and I could easily replace that functionality with my own, if I needed to. I could benefit from this, but should I do it? As an example, we can consider memory management. If I've written malloc() into the constructors of each of my objects, then decide that I need to handle memory allocation on my own, I have to edit the constructor associated with every object. By referencing my own function, I can change the contents of that function without writing a new constructors. It seems obvious that I should do this, but I'm used to Python. I'm extremely comfortable in that environment and have no problem linking to any part of the standard library from any part of my program because I know I will almost certainly leave that relationship untouched for the life of the project. The situation I'm running into with C feels like I'm trying to hide the language from myself. Will writing a layer of functionality over the C standard library help me in learning the language and developing a codebase, or will it stifle my understanding going forward?

    Read the article

  • Installing software from source

    - by Learning
    I'm trying to understand the rational behind installing from software from source in Ubuntu 12.04. Obviously, I know I can download what I need from repos, but I want to develop a deeper understanding of Linux. As a Windows users, when I download a program I double click it, and it installs into the program files directory unless I specify otherwise. When I want to uninstall it, Windows has a tools that does that for me. When I install a program in Linux, where does it install to? How do I uninstall it afterwards? Are there residual files left over? How would I tell if it's been fully removed? For instance, I'm going to install LMMS (Linux Multimedia Studio) from source. I download and decompress the tar ball, and have a folder name lmms_XXX.tar (whatever). The folder is now on my desktop with an install file. If I run the install file from that location, does it install into that folder? If so, can I move that folder to where ever I want? I want thinking about putting it in /opt/lmms

    Read the article

  • CodePlex Daily Summary for Thursday, December 06, 2012

    CodePlex Daily Summary for Thursday, December 06, 2012Popular ReleasesPeriodic.Net: 0.8: Whats new for Periodic.Net 0.8: New Element Info Dialog New Website MenuItem Minor Bug Fix's, improvements and speed upsXLS File Deployment: XLS File Deployment V1.0: Initial releasemp3player-xslt-plugin: mp3player module 1.0: This is a mp3 player module that you can install on your umbraco project. It can display the list of the media and you can click the button to play or stop.Yahoo! UI Library: YUI Compressor for .Net: Version 2.2.0.0 - Epee: New : Web Optimization package! Cleaned up the nuget packages BugFix: minifying lots of files will now be faster because of a recent regression in some code. (We were instantiating something far too many times).DtPad - .NET Framework text editor: DtPad 2.9.0.40: http://dtpad.diariotraduttore.com/files/images/flag-eng.png English + A new built-in editor for the management of CSV files, including the edit of cells, deleting and adding new rows, replacement of delimiter character and much more (issue #1137) + The limit of rows allowed before the decommissioning of their side panel has been raised (new default: 1.000) (issue #1155, only partially solved) + Pressing CTRL+TAB now DtPad opens a screen that shows the list of opened tabs (issue #1143) + Note...AvalonDock: AvalonDock 2.0.1746: Welcome to the new release of AvalonDock 2.0 This release contains a lot (lot) of bug fixes and some great improvements: Views Caching: Content of Documents and Anchorables is no more recreated everytime user move it. Autohide pane opens really fast now. Two new themes Expression (Dark and Light) and Metro (both of them still in experimental stage). If you already use AD 2.0 or plan to integrate it in your future projects, I'm interested in your ideas for new features: http://avalondock...AcDown?????: AcDown????? v4.3.2: ??●AcDown??????????、??、??、???????。????,????,?????????????????????????。???????????Acfun、????(Bilibili)、??、??、YouTube、??、???、??????、SF????、????????????。 ●??????AcPlay?????,??????、????????????????。 ● AcDown??????????????????,????????????????????????????。 ● AcDown???????C#??,????.NET Framework 2.0??。?????"Acfun?????"。 ?? v4.3.2?? ?????????????????? ??Acfun??????? ??Bilibili?????? ??Bilibili???????????? ??Bilibili????????? ??????????????? ???? ??Bilibili??????? ????32??64? Windows XP/...ExtJS based ASP.NET 2.0 Controls: FineUI v3.2.2: ??FineUI ?? ExtJS ??? ASP.NET 2.0 ???。 FineUI??? ?? No JavaScript,No CSS,No UpdatePanel,No ViewState,No WebServices ???????。 ?????? IE 7.0、Firefox 3.6、Chrome 3.0、Opera 10.5、Safari 3.0+ ???? Apache License 2.0 (Apache) ???? ??:http://fineui.com/bbs/ ??:http://fineui.com/demo/ ??:http://fineui.com/doc/ ??:http://fineui.codeplex.com/ ???? +2012-12-03 v3.2.2 -?????????????,?????button/button_menu.aspx(????)。 +?Window????Plain??;?ToolbarPosition??Footer??;?????FooterBarAlign??。 -????win...Player Framework by Microsoft: Player Framework for Windows Phone 8: This is a brand new version of the Player Framework for Windows Phone, available exclusively for Windows Phone 8, and now based upon the Player Framework for Windows 8. While this new version is not backward compatible with Windows Phone 7 (get that http://smf.codeplex.com/releases/view/88970), it does offer the same great feature set plus dozens of new features such as advertising, localization support, and improved skinning. Click here for more information about what's new in the Windows P...SSH.NET Library: 2012.12.3: New feature(s): + SynchronizeDirectoriesQuest: Quest 5.3 Beta: New features in Quest 5.3 include: Grid-based map (sponsored by Phillip Zolla) Changable POV (sponsored by Phillip Zolla) Game log (sponsored by Phillip Zolla) Customisable object link colour (sponsored by Phillip Zolla) More room description options (by James Gregory) More mathematical functions now available to expressions Desktop Player uses the same UI as WebPlayer - this will make it much easier to implement customisation options New sorting functions: ObjectListSort(list,...Chinook Database: Chinook Database 1.4: Chinook Database 1.4 This is a sample database available in multiple formats: SQL scripts for multiple database vendors, embeded database files, and XML format. The Chinook data model is available here. ChinookDatabase1.4_CompleteVersion.zip is a complete package for all supported databases/data sources. There are also packages for each specific data source. Supported Database ServersDB2 EffiProz MySQL Oracle PostgreSQL SQL Server SQL Server Compact SQLite Issues Resolved293...RiP-Ripper & PG-Ripper: RiP-Ripper 2.9.34: changes FIXED: Thanks Function when "Download each post in it's own folder" is disabled FIXED: "PixHub.eu" linksD3 Loot Tracker: 1.5.6: Updated to work with D3 version 1.0.6.13300?????????? Microsoft Office 2013 ? 1? – ????? ???????????: ???????? ???? ???????? ?? ???????: ???? ????????? ???????? ???? ???????????????? ????????Jobboard Light Edition: Version 4.1: Updates Migration to Oracle 11g Express Changed CSS Improved entity framework connectivity Works with ODAC 11.2 Release 5 (11.2.0.3.20) with Oracle Developer Tools for Visual Studio Changed Data Layer Changed Business Layer Cleaned Oracle dbgen scriptsDirectoryEnumeratorAsync: Initial Release: Visual Studio 2012 SolutionBundler.NET: Bundler.NET 1.3.0: Added speed enhancements. It's faster than System.Web.Optimization! Added a bundle option that will include a file extension when alias names are used.AutoFixture: 2.15.4: This is an automatically published release created from the latest successful build. Versioning is based on Semantic Versioning. Read more here: http://blog.ploeh.dk/2011/09/06/AutoFixtureGoesContinuousDeliveryWithSemanticVersioning.aspx????????API for .Net SDK: SDK for .Net ??? Release 5: 2012?11?30??? ?OAuth?????????????????????SDK OAuth oauth = new OAuth("<AppKey>", "<AppSecret>", "<????>"); WebProxy proxy = new WebProxy(); proxy.Address = new Uri("http://proxy.domain.com:3128");//??????????? proxy.Credentials = new NetworkCredential("<??>", "<??>");//???????,??? oauth.Proxy = proxy; //??????,?~ New Projects.Net Source Code Syntax Highligher: High efficiency, detailed syntax highlighter for .Net source code.(a developer resource)12061327: d13261206: df1edex: 1edex40Fingers Simple Title Skin Object for DotNetNuke: Templatable DotNetNuke Title Skin Object. Renders cleaner HTML then default SKO. Will show the "page name" if used in a Skin, "module title" in a Container.aaa: fewfewAjaxShowOff: Ajax MVC ASP.NETBusStationTest: sdasdsadsadsadadsaCaseModelDataStore: use case data and model accumulateCiberSegurosWpf: ciberseguros wpfCodeSmith v3.x provider for VistaDB 3+: A CodeSmith v3.x provider for the excellent VistaDB .Net database engine.Cropper.TimeCapture: Captures at regular intervals of time the desktop/active window, along with his text See also CropperPlugins - http://www.codeplex.com/cropperplugins Cropper - http://www.codeplex.com/cropper It's developed in C#Distinct CAPTCHA Web Service: Distinct CAPTCHA used to add CAPTCHA to asp.net, InfoPath and SharePoint. The web service supports two methods one for generate and one to validate File Upload App: This is a silverlight 4 app, it used for upload files with progress bar. You can download it and run it directly. ???silverlight 4.0 ??, ???????,??????,???????FluentScriptWeb: Application for hosting FluentScript interpreter in a website for testing purposes.Fwql.Net: Fwql.Net is a General Class Libraries Collection.GaoPMS: NoneGuestbook Source Control: the codes in the bookHello world katal cloud: test katal cloud.net projectHREntry: TBDLyricFinder: Component for searching lyric by song title, artist, album, lyric part and topic/tagsPERSONAL PICTURE VIEWER 1.0: This is a picture viewer application that is programmed in C#.NET based on .NET 4.0 or higher.php pagination with shorter show page number: pagination in php pkrss: c++ version:pkrss.sf.net csharp version:is here. pkrss.sf.net is c++ version desktop productor written by qt 4.7.3. pkrss.codeplex is csharp version web productor.Plataforma: Plataforma MVC EntityProductivity Toolkit: This project is currently in its initial stage. prototype Assignement: prototype assignment Rational Team Concert Chrome Extensions: Google Chrome Extensions for Rational Team Concert. - Scrum Card PrintResource Monitor: Det er her vi er samlet om opgaven.rloreto@gmail.com: Caching for Windows Store Applications (Windows 8 WinRT)SignalRefresh: SignalRefresh is a open source project that as target has all .net developers that write pages and are board refreshing page after changes are done in source .SimpleTrack: SimpleTrack is a simplified alternative to the multitude of issue, bug and request trackers. This project is in response to painful experiences of trying to find a tracking solution which is not narrow in focus, yet not brutally complex. Singer: task 2 projectSitecore PowerShell Console for Sitecore Rocks: Sitecore PowerShell Console companion project that allows for it to be exposed in Sitecore Rocks.System Tools: Powerful tools for Windows in Batch File Delete Windows temporary Files Check if Port open Virus Scan Disable Default Sharing Format C: Drive Safely ShutdownTask Tracker: Task Tracker is a user customizable winform project to log details of tasks.TeslaFlux: Trytestddhg12052012hg01: xzcctesttom12052012git01: gfdgfdgtesttom12052012git02: gfdtesttom12052012hg01: fdstesttom12052012tfs01: fdstesttom12052012tfs02: fdsTyingsoftPortal: Tyingsoft Portal Websitewiki2doc: A tool to download a surtain namespace of a wiki and transform it into a documention format, like a windows help file (.chm) or a e-reader document (.epub).Windows (8) Update Notifier: Windows Update Notifier informs about Windows Updates via a desktop notification popup.The application only appears as an icon in the system tray.Windows 8 Isolated Storage: Useful tool to save data in Isolated Storage.WLW Insert Links Plugin: A plugin for Windows Live Writer: it combines an RSS/Atom-based link insert tool and a category heading insert tool (with linked Table of Contents).

    Read the article

  • What enterprise architecture tools support DoDAF 2.0?

    - by David Hunt
    What tools best support the DoD Architecture Framework (DoDAF) Version 2.0, including support for transfer of the architecture data in accordance with the DoDAF Meta Model (DM2) Physical Exchange Specification (PES)? My initial research found that MagicDraw and Casewise claim support for version 2.0; and several other tools have support for earlier (or unspecified) DoDAF/MoDAF versions including Sparx Enterprise Architect, Troux, IDS Scheer ARIS, Artisan Studio and Rational System Architect. Experiences with any enterprise architecture tools and DoDAF 2.0 would be appreciated. The immediate need is for Data and Information Viewpoint models (DIV-1, DIV-2/OV-7, DIV-3/SV-11), but models in the other Viewpoints will be developed. Thanks -

    Read the article

  • Eclipse Code Templates with Cobol

    - by Bruno Brant
    People, My team is just beginning to learn how to use COBOL on Eclipse (as part of the Rational Developer for System Z package) and one of our most desired features are code templates or code snippets. What we'd like to have is a code completion based on snippets just like we have on Java. For example, when I type try and hit ctrl-space Eclipse shows me a list of completion options, where one of those is create a try/catch block. Well, in COBOL one could leverage this when creating, for example, embedded SQL blocks, like EXEC SQL SELECT field, field, field, FROM table WHERE field = value, field = value END-EXEC. However, for some reason, it seems that Eclipse treats COBOL a little differently (no wonder why) from other languages. As such, when looking for the code templates in the preferences menu for COBOL, its appearance is very different from the Java one. The question is: how does one uses Eclipse's code templates with COBOL?

    Read the article

  • ClearCase: Copy old versions with Snapshot Views under Windows

    - by cogmios
    Using IBM Rational ClearCase: - I have only access to Snapshot Views so NO dynamic Views I want to copy ALL versions from a certain changeset to c:\temp. I have already listed the changeset versions in a file (couple of hundred of versions, I only need the latest one), I do not have a baseline over this older set. What I now have and does not work: #!/usr/bin/perl -w # # PROGRAM: copytest.pl $filename = "Design test123.doc"; $view = "D:\\AdminViews\\ABC_R1_READ_2\\ABCD002\\ABC_DESIGN\\BLA Framework\\P0\\"; $version = "\\main\\ABC_R1_READ\\1"; $printhet = 'cleartool find . -name "' . $filename . '" -version version(' . $version. ') -exec "cmd /c copy %CLEARCASE_XPN% D:\temp\%CLEARCASE_PN%"'; system($printhet);

    Read the article

  • Paperclip - Stream not recognized by identify command

    - by user117046
    I'm getting a paperclip error every time that I upload an image: [paperclip] An error was received while processing: #<Paperclip::NotIdentifiedByImageMagickError: /tmp/stream20100531-1921-uvlewk-0 is not recognized by the 'identify' command.> I'm running: Ubuntu 10.04, Imagemagick 6.5.1-0 (via apt-get), Paperclip 3.2.1.1 My path to identify is 'usr/bin/identify' and have confirmed Imagemagick works via command line I've tried putting adding the path to the options, but to no avail. I've tried: Paperclip.options[:command_path] = "usr/bin" or Paperclip.options.merge!(:command_path => "/usr/bin") in environment.rb or config/initializers/paperclip.rb. Though it makes no rational sense, I also tried "usr/local/bin" since this is the default for most people. Any thoughts on getting around this? Thanks!

    Read the article

  • Is it possible to use ContainsTable to get results for more than one column?

    - by LockeCJ
    Consider the following table: People FirstName nvarchar(50) LastName nvarchar(50) Let's assume for the moment that this table has a full-text index on it for both columns. Let's suppose that I wanted to find all of the people named "John Smith" in this table. The following query seems like a perfectly rational way to accomplish this: SELECT * from People p INNER JOIN CONTAINSTABLE(People,*,'"John*" AND "Smith*"') Unfortunately, this will return no results, assuming that there is no record in the People table that contains both "John" and "Smith" in either the FirstName or LastName columns. It will not match a record with "John" in the FirstName column, and "Smith" in the LastName column, or vice-versa. My question is this: How does one accomplish what I'm trying to do above? Please consider that the example above is simplified. The real table I'm working with has ten columns and the input I'm receiving is a single string which is split up based on standard word breakers (space, dash, etc.)

    Read the article

  • Android ant script workaround?

    - by haseman
    It appears that, in the transition between the Android 1.1 sdk and 1.5, Google radically changed how ant scripts using AAPT can build Android projects. Previously they support args allowing developers to specify source, res, asset, and a manifest for a particular build. Now, they seem to allow developers to specify only a single folder containing everything. While I could rewrite all our build scripts to work in this new way, I rather like our current system (as it doesn't require more hours of work that I don't have). To that end, has anyone figured out how to go back to the pre 1.5 method of ant script building? Further, has anyone found a rational reason for this change?

    Read the article

  • Software Evaluation license - How safe it is?

    - by Manav Sharma
    almost all the software companies across the globe offer an evaluation version for download. Often the terms and conditions are so many that it's not feasible to go through them. we usually skim through the pages to get to the download link. I was wondering how safe is that? I recently downloaded Rational PurifyPlus for evaluation and I expect that it would cease to function beyond the evaluation period. Are there any changes that the software would quietly move beyond the evaluation period without letting me know thus making me liable? Thanks

    Read the article

  • VS2010 profiler/leak detection

    - by Noah Roberts
    Anyone know of a profiler and leak detector that will work with VS2010 code? Preferably one that runs on Win7. I've searched here and in google. I've found one leak detector that works (Memory Validator) but I'm not too impressed. For one thing it shows a bunch of menu leaks and stuff which I'm fairly confident are not real. I also tried GlowCode but it's JUST a profiler and refuses to install on win7. I used to use AQtime. It had everything I needed, memory/resource leak detection, profiling various things, static analysis, etc. Unfortunately it gives bogus results now. My main immediate issue is that VS2010 is saying there are leaks in a program that had none in VS2005. I'm almost certain it's false positives but I can't seem to find a good tool to verify this. Memory Validator doesn't show the same ones and the reporting of leaks from VS doesn't seem rational.

    Read the article

  • Are there any tools to help the user to design a State Machine to be consumed by my application?

    - by kolrie
    When reading this question I remembered there was something I have been researching for a while now and I though Stackoverflow could be of help. I have created a framework that handles applications as state machines. Currently all the state business logic and transactions are handled via Java code. I was looking for some UI implementation that would allow the user to draw the state machines and transactions and generate a file that can later on be consumed by my framework to "run" the workflow according to one or more defined state machines. Ideally I would like to use an open standard like SCXML. The goal as the UI would be to have something like this plugin IBM have for Rational Software Architect: Do you know any editor, plugin or library that would have something similar or at least serve as a good starting point?

    Read the article

  • inheritance and hidden overloads

    - by Caspin
    The following code doesn't compile. struct A {}; struct B {}; class Base { public: virtual void method( A param ) { } virtual void method( B param ) = 0; }; class Derived : public Base { public: //using Base::method; void method( B param ) { } }; int main() { Derived derived; derived.method(A()); } The compiler can't find the overload of method() that has an A parameter. The 'fix' is to add a using declaration in the derived class. My question is why. What is the rational for a weird language rule like this? I verified the error in both GCC and Comeau, so I assume this isn't a compiler bug but a feature of the language. Comeau at least gives me this warning: "ComeauTest.c", line 10: warning: overloaded virtual function "Base::method" is only partially overridden in class "Derived" class Derived : public Base ^

    Read the article

  • Why do people develop emotional attachments for programming languages?

    - by Andrew Heath
    Aside from people who actually developed the languages, I really don't get how someone can develop passion/attachment/perhaps even obsession for a programming language... yet not a day goes by that I don't see a programmer exhibiting this behavior on the internet. I understand how people can feel this way regarding spoken languages - but there's a whole boatload of culture, history, etc that come attached with them. By comparison, the "Python Culture" (as an example) is so small as to be wholly insignificant. Does everyone have a language they love? Am I the odd one out? The dirty polygamist? Are these people rational or silly?

    Read the article

  • ClearCase UCM Mainline Configuration Management Pattern Question

    - by cogmios
    A configuration management pattern question (using Rational ClearCase UCM) When I use the mainline approach I create new releases by: - create release 1 from mainline - on a certain moment baseline release 1, deliver release 1 to mainline - create release 2 from mainline - on a certain moment baseline release 2, deliver release 2 to mainline - create release 3 from mainline - etc... Works very nice because the pathname is /main/release 3/latest instead of /main/release 1/release 2/release 3/latest etc... However... when in release 1 are new elements that have to be propagated to later releases I can not use the mainline since the mainline is already on e.g. release 4. The only thing I can do is deliver/merge from release 1 directly to release 2. The bad thing is that the pathname then becomes /main/release 1/release 2/latest for that files (and possibly later releases). That is I think not in line with the mainline approach. What am I doing wrong?

    Read the article

  • what practical proofs are there about the Turing completeness of neural nets? what nns can execute c

    - by Albert
    I'm interested in the computational power of neural nets. It is generally accepted that recurrent neural nets are Turing complete. Now I was searching for some papers which proofs this. What I found so far: Turing computability with neural nets, Hava T. Siegelmann and Eduardo D. Sontag, 1991 I think this is only interesting from a theoretical point of view because it needs to have the neuron activity of infinite exactness (to encode the state somehow as a rational number). S. Franklin and M. Garzon, Neural computability This needs an unbounded number of neurons and also doesn't really seem to be that much practical. (Note that another question of mine tries to point out this kind of problem between such theoretical results and the practice.) I'm searching mostly for some neural net which really can execute some code which I can also simulate and test in practice. Of course, in practice, they would have some kind of limited memory. Does anyone know something like this?

    Read the article

  • Why do Lua arrays(tables) start at 1 instead of 0?

    - by AraK
    Hi, I don't understand the rational behind the decision of this part of Lua. Why does indexing start at 1? I have read(as many others did) this great paper. It seems to me a strange corner of a language that is very pleasant to learn and program. Don't get me wrong, Lua is just great but there has to be an explanation somewhere. Most of what I found(on the web) is just saying the index starts at 1. Full stop. It would be very interesting to read what its designers said about the subject. Note that I am "very" beginner in Lua, I hope I am not missing something obvious about tables.

    Read the article

  • F# powerpack and distribution

    - by rwallace
    I need arbitrary precision rational numbers, which I'm given to understand are available in the F# powerpack. My question is about the mechanics of distribution; my program needs to be able to compile and run both on Windows/.Net and Linux/Mono at least, since I have potential users on both platforms. As I understand it, the best procedure is: Download the powerpack .zip, not the installer. Copy the DLL into my program directory. Copy the accompanying license file into my program directory, to make sure everything is above board. Declare references and go ahead and use the functions I need. Ship the above files along with my source and binary, and since the DLL uses byte code, it will work fine on any platform. Is this the correct procedure? Am I missing anything?

    Read the article

  • 0/1 Knapsack with irrational weights

    - by user356106
    Consider the 0/1 knapsack problem. The standard Dynamic Programming algorithm applies only when the capacity as well as the weights to fill the knapsack with are integers/ rational numbers. What do you do when the capacity/weights are irrational? The issue is that we can't memoize like we do for integer weights because we may need potentially infinite decimal places for irrational weights - leading to an infinitely large number of columns for the Dynamic Programming Table . Is there any standard method for solving this? Any comments on the complexity of this problem? Any heuristics? What about associated recurrences like (for example): f(x)=1, for x< sqrt(2) f(x)=f(x-sqrt(2))+sqrt(3)

    Read the article

  • Simplest way to create a wrapper class around some strings for a WPF DataGrid?

    - by Joel
    I'm building a simple hex editor in C#, and I've decided to use each cell in a DataGrid to display a byte*. I know that DataGrid will take a list and display each object in the list as a row, and each of that object's properties as columns. I want to display rows of 16 bytes each, which will require a wrapper with 16 string properties. While doable, it's not the most elegant solution. Is there an easier way? I've already tried creating a wrapper around a public string array of size 16, but that doesn't seem to work. Thanks *The rational for this is that I can have spaces between each byte without having to strip them all out when I want to save my edited file. Also it seems like it'll be easier to label the rows and columns.

    Read the article

  • New thread per client connection in socket server?

    - by Olaseni
    I am trying to optimize multiple connections per time to a TCP socket server. Is it considered good practice, or even rational to initiate a new thread in the listening server every time I receive a connection request? At what time should I begin to worry about a server based on this infrastructure? What is the maximum no of background threads I can work, until it doesn't make any sense anymore? Platform is C#, framework is Mono, target OS is CentOS, RAM is 2.4G, server is on the clouds, and I'm expecting about 200 connection requests per second.

    Read the article

  • Why are there two implementations of std::sort (with and without a comparator) rather than one implementation with a default template parameter?

    - by PolyVox
    In my code I'm adopting a design strategy which is similar to some standard library algorithms in that the exact behavior can be customized by a function object. The simplest example is std::sort, where a function object can control how the comparison is made between objects. I notice that the Visual C++ provides two implementations of std::sort, which naturally involves code duplication. I would have imagined that it was instead possible to have only one implementation, and provide a default comparator (using operator< ) as a default template parameter. What is the rational behind two separate versions? Would my suggestion make the interface more complex in some way? Or result in confusing error messages when the object does not provide operator Thanks, David

    Read the article

  • Need generated UML diagrams for C++ plugin modules

    - by archer1742
    I need various UML diagrams (sequence/collaboration, class, package, and system component) from some C++ files. However, these files are plugins in a larger programming framework. I have tried generating UML from Rational Rose 7 (2002 version), but I am not very experienced and I am unsure if RR simply cannot produce the diagram, I am doing something wrong, or the diagrams are not rendering correctly because the source files are plugins instead of standalone programs. I have also tried Star Modeler with little success and there seem to be no tutorials on how to generate these models. Is there a simple, bulletproof way to get UML diagrams for C++ files?

    Read the article

  • How can unit testing make parameter validation redundant?

    - by Johann Gerell
    We have a convention to validate all parameters of constructors and public functions/methods. For mandatory parameters of reference type, we mainly check for non-null and that's the chief validation in constructors, where we set up mandatory dependencies of the type. The number one reason why we do this is to catch that error early and not get a null reference exception a few hours down the line without knowing where or when the faulty parameter was introduced. As we start transitioning to more and more TDD, some team members feel the validation is redundant. Uncle Bob, who is a vocal advocate of TDD, strongly advices against doing parameter validation. His main argument seems to be "I have a suite of unit tests that makes sure everything works". But I can for the life of it just not see in what way unit tests can prevent our developers from calling these methods with bad parameters in production code. Please, unit testers out there, if you could explain this to me in a rational way with concrete examples, I'd be more than happy to seize this parameter validation!

    Read the article

  • Serialization of a TChan String

    - by J Fritsch
    I have declared the following type KEY = (IPv4, Integer) type TPSQ = TVar (PSQ.PSQ KEY POSIXTime) type TMap = TVar (Map.Map KEY [String]) data Qcfg = Qcfg { qthresh :: Int, tdelay :: Rational, cwpsq :: TPSQ, cwmap :: TMap, cw chan :: TChan String } deriving (Show) and would like this to be serializable in a sense that Qcfg can either be written to disk or be sent over the network. When I compile this I get the error No instances for (Show TMap, Show TPSQ, Show (TChan String)) arising from the 'deriving' clause of a data type declaration Possible fix: add instance declarations for (Show TMap, Show TPSQ, Show (TChan String)) or use a standalone 'deriving instance' declaration, so you can specify the instance context yourself When deriving the instance for (Show Qcfg) I am now not quite sure whether there is a chance at all to serialize my TChan although all individual nodes in it are members of the show class. For TMap and TPSQ I wonder whether there are ways to show the values in the TVar directly (because it does not get changed, so there should no need to lock it) without having to declare an instance that does a readTVar ?

    Read the article

< Previous Page | 1 2 3 4 5 6 7  | Next Page >