Search Results

Search found 20484 results on 820 pages for 'small projects'.

Page 81/820 | < Previous Page | 77 78 79 80 81 82 83 84 85 86 87 88  | Next Page >

  • How close can I get C# to the performance of C++ for small intensive tasks?

    - by SLC
    I was thinking about the speed difference of C++ to C# being mostly about C# compiling to byte-code that is taken in by the JIT compiler (is that correct?) and all the checks C# does. I notice that it is possible to turn a lot of these functions off, both in the compile options, and possibly through using the unsafe keyword as unsafe code is not verifiable by the common language runtime. Therefore if you were to write a simple console application in both languages, that flipped an imaginary coin an infinite number of times and displayed the results to the screen every 10,000 or so iterations, how much speed difference would there be? I chose this because it's a very simple program. I'd like to test this but I don't know C++ or have the tools to compile it. This is my C# version though: static void Main(string[] args) { unsafe { Random rnd = new Random(); int heads = 0, tails = 0; while (true) { if (rnd.NextDouble() > 0.5) heads++; else tails++; if ((heads + tails) % 1000000 == 0) Console.WriteLine("Heads: {0} Tails: {1}", heads, tails); } } } Is the difference enough to warrant deliberately compiling sections of code "unsafe" or into DLLs that do not have some of the compile options like overflow checking enabled? Or does it go the other way, where it would be beneficial to compile sections in C++? I'm sure interop speed comes into play too then. To avoid subjectivity, I reiterate the specific parts of this question as: Does C# have a performance boost from using unsafe code? Do the compile options such as disabling overflow checking boost performance, and do they affect unsafe code? Would the program above be faster in C++ or negligably different? Is it worth compiling long intensive number-crunching tasks in a language such as C++ or using /unsafe for a bonus? Less subjectively, could I complete an intensive operation faster by doing this?

    Read the article

  • Great projects, works, people in intersection of programming and art/music?

    - by jacob
    In a recent question I was introduced to the work of André Michelle, which blew me away. What other great people or works do you know in the fields of art and music? As someone with a love for math/programming and art/music I'd love to know more about people using sophisticated (or not so sophisticated) techniques to produce creative things. The software used can be anything from Max/MSP, Flash to simple C code or Assembler. Pointers to forums, blogs, newsletters and similar are very appreciated as well.

    Read the article

  • Adding UIComponent to both Canvas and Tree in Flex 3

    - by Chris M
    I currently am trying to add a custom class which subclasses UIComponent to both a tree and a canvas, but when I try to re-order the tree by dragging I get this error: TypeError: Error #1010: A term is undefined and has no properties. at mx.controls::Tree/get firstVisibleItem()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\controls\Tree.as:764] at flash.utils::ByteArray/writeObject() at flash.desktop::Clipboard/putSerialization() at flash.desktop::Clipboard/convertFlashFormat() at flash.desktop::Clipboard/setData() at mx.managers::NativeDragManagerImpl/doDrag()[C:\autobuild\3.2.0\frameworks\projects\airframework\src\mx\managers\NativeDragManagerImpl.as:282] at mx.managers::DragManager$/doDrag()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\managers\DragManager.as:243] at mx.controls.listClasses::ListBase/dragStartHandler()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\controls\listClasses\ListBase.as:9085] at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.core::UIComponent/dispatchEvent()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:9298] at mx.controls.listClasses::ListBase/mouseMoveHandler()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\controls\listClasses\ListBase.as:8822] When I do not add the UIComponent to the canvas, this error does not occur, anyone have any knowledge as to why this happens?

    Read the article

  • Stop images from wrapping when div width is to small.

    - by razass
    I have a div that contains a ul and in each li there is a picture. I have floated the pictures left to get them to line up in a straight line however once it reaches the end of the div, it wraps. I would like the pictures to continue on to the right, hidden, so that I am able to create a carousel. My code is below. The HTML <div id="container"> <div class="lfbtn"></div> <ul id="image_container"> <li class="the_image"> <img src="" /> </li> </ul> <div class="rtbtn"></div> </div> The CSS #container { width: 900px; height: 150px; margin: 10px auto; } #image_container { position: relative; left: 50px; list-style-type: none; width: 700px; height: 110px; overflow: hidden; } #image_container li { display: inline-block; padding: 7px 5px 7px 5px; float: left; } .lfbtn { background-image: url(../../img/left.gif); background-repeat: no-repeat; margin: 10px; position: relative; float: left; top: -12px; left: 50px; height: 90px; width: 25px; } .rtbtn { background-image: url(../../img/right.gif); background-repeat: no-repeat; height: 90px; width: 25px; margin: 10px; position: relative; top: -101px; left: 795px; } Thanks in advance!

    Read the article

  • How to use Wordpress' http.php in external projects?

    - by NJTechGuy
    I am trying to parse data from a pipe-delimited text file hosted on another server which in turn will be inserted in a database. My host (1and1) disabled allow_url_fopen in php.ini I guess. Error message : Warning: fopen() [function.fopen]: URL file-access is disabled in the server configuration in Code : <? // make sure curl is installed if (function_exists('curl_init')) { // initialize a new curl resource $ch = curl_init(); // set the url to fetch curl_setopt($ch, CURLOPT_URL, 'http://abc.com/data/output.txt'); // don't give me the headers just the content curl_setopt($ch, CURLOPT_HEADER, 0); // return the value instead of printing the response to browser curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // use a user agent to mimic a browser curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0'); $content = curl_exec($ch); // remember to always close the session and free all resources curl_close($ch); } else { // curl library is not installed so we better use something else } //$contents = fread ($fd,filesize ($filename)); //fclose ($fd); $delimiter = "|"; $splitcontents = explode($delimiter, $contents); $counter = ""; ?> <font color="blue" face="arial" size="4">Complete File Contents</font> <hr> <? echo $contents; ?> <br><br> <font color="blue" face="arial" size="4">Split File Contents</font> <hr> <? foreach ( $splitcontents as $color ) { $counter = $counter+1; echo "<b>Split $counter: </b> $colorn<br>"; } ?> Wordpress has this cool http.php file. Is there a better way of doing it? If not, how do I use http.php for this task? Thank you guys..

    Read the article

  • Whats faster in Javascript a bunch of small setInterval loops, or one big one?

    - by RobertWHurst
    Just wondering if its worth it to make a monolithic loop function or just add loops were they're needed. The big loop option would just be a loop of callbacks that are added dynamically with an add function. adding a function would look like this setLoop(function(){ alert('hahaha! I\'m a really annoying loop that bugs you every tenth of a second'); }); setLoop would add the function to the monolithic loop. so is the is worth anything in performance or should I just stick to lots of little loops using setInterval?

    Read the article

  • What is faster with PictureBox? Many small redraws or complete redraw.

    - by kornelijepetak
    I have a PictureBox (WinMobile 6 WinForm) on which I draw some images. There is a background image that goes in the background and it does not change. However objects that are drawn on the picturebox are moving during the application so I need to refresh the background. Since items that are redrawn fill from 50% to 80% of the surface, the question is which of the two is faster: 1) Redraw only parts of the background image that have been changed (previous+next location of the moving object). 2) Redraw complete background and then draw all the objects in their current position. Now, the reason for asking is because I am not sure how much of processor power is needed for a single drawImage operation and what are the time consuming factors. I am aware if there is almost complete coverage of the background, it would be stupid to redraw portions of it, because by drawing portions I will have drawn the complete picture. But since sometimes only half of the image had changed (some objects remained in their old position), it may (perhaps) be benefitial to redraw only those regions. But I need your insight on this... Thanks.

    Read the article

  • What signing method to use for public open-source projects?

    - by Irchi
    I'm publishing an open-source library on CodePlex, and want the dll files to have strong names so that they can be added to GAC. What's the best option for signing? Should I use SNK? If so, everyone have access to the key. I don't have a problem with everyone having access, but is it a good approach? Should I use PFX? If so, does it mean that other people downloading the source code are not able to build the solution? What I like to do is that I am the only one person to have access to the key, so that the signed assemblies also have a level of authenticity, but meanwhile don't prevent other developers to download, build, or change the source code for themselves, and be able to post changes for the main project.

    Read the article

  • UITableViewCell imageView images loading small even when they are the correct size!

    - by Alex Barlow
    Im having an issue whilst loading images into a UITableViewCell after an asynchronous download and placement into an UIImage variable.. The images appear smaller than they actually are! But when scrolled down and scrolled back up to the image, or the whole table is reloaded, they appear at the correct size... Here is a code excerpt... - (void)reviewImageDidLoad:(NSIndexPath *)indexPath { ThumbDownloader *thumbDownloader = [imageDownloadsInProgress objectForKey:indexPath]; if (thumbDownloader != nil) { UITableViewCell *cell = [self.tableView cellForRowAtIndexPath:thumbDownloader.indexPathInTableView]; [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:0.4]; [self.tableView cellForRowAtIndexPath:indexPath].imageView.alpha = 0.0; [UIView commitAnimations]; cell.imageView.image = thumbDownloader.review.thumb; [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:0.4]; [self.tableView cellForRowAtIndexPath:indexPath].imageView.alpha = 1.0; [UIView commitAnimations]; } } Here is an image of the app just after calling this method.. http://www.flickr.com/photos/arbarlow/5288563627/ After calling tableView reloadData or scrolling around the appear correctly, go the the next flickr image, to see the normal result, but im sure you can guess that.. Does anyone have an ideas as to make the images appear correctly? im absolutely stumped?! Regards, Alex iPhone noob

    Read the article

  • Quickly generate/publish RSS feeds from ASP.NET projects?

    - by jdk
    Under a timeline, therefore the salient point is "quickly" and willing to throw some $ at it too (doesn't have to be a free solution). Looking for an RSS feed generator usuable in .NET framework 2.0. Ideally it would be easy to use (inferred quick) but flexible enough to support the multiple standards (shown part way down this page). We have the business classes in .NET and want to publish RSS feeds on the ASP.NET website. Any software that's good? Doesn't have to be free. Must support .NET framework 2.0 Thanks.

    Read the article

  • How do I make a child control re-anchor to its parent Form when it has been cut off on a small resol

    - by Paul Fedory
    I have a Windows Form with a default size of 1100 x 400, and I have a DataGridView control on it anchored to Top, Left, Bottom, Right. Resizing the form on a screen with resolution higher than 1100 x 400 works fine, and the anchoring works well, resizing the DataGridView control as expected. When I launch the form on a screen with resolution 800x600, the form is cut off, and made to fit the 800 x 600. The DataGridView is cut off, and cannot be seen entirely - it bleeds off the form to the right, so it's not respecting the right anchor. Resizing the form in this situation doesn't respect the anchoring settings for some reason: the DataGridView control does not resize when the form is resized. Is there a way programmatically (on a resize event or something) to force the child DataGridView control to anchor to the sides of the form? I've already tried calling a PerformLayout and Refresh in the Form's resize event but it's rather redundant, isn't it?

    Read the article

  • Are these jobs for developer or designers or for client itself? for a web-site projects

    - by jitendra
    Spell checking grammar checking Descriptive alt text for big chart , graph images, technical images To write Table summary and caption Descriptive Link text Color Contrast checking Deciding in content what should be H2 ,H3, H4... and what should be <strong> or <span class="boldtext"> Meta Description and keywords for each pages Image compression To decide Filenames for images,PDf etc To decide Page's <title> for each page

    Read the article

  • How do people handle working with Code Names for their projects?

    - by Mark
    Hi All, Recently we started using some code names for several different types of prototype applications all following a theme. This made things a little more fun and was a great idea. The problem is that Im not too sure how people deal with migrating a codebase from "codename" state into version 1.0 state which may have a proper name... not something that a client really shouldnt see :) We are using Visual Studio at the moment, and I can see that you can change the assembly name, but there are references to the namespaces, etc... that would really be a large change to make. Do people both changing things like namespaces before the v1.0 release?

    Read the article

  • Android Performance Question : Many small apps or one big app?

    - by kunjaan
    I read this quote in one of the webpages: If you are writing a large application, consider dividing it into a suite of applications and services. Smaller applications load faster and use fewer resources. Making a suite of applications, content providers, and services makes your code more open to incorporation into other applications as described the "Use and be used" tip. Is this true? What is the thumb rule for the size of app?

    Read the article

  • What's a good unit test framework for Common Lisp projects?

    - by Lorenzo V.
    I need to write a unit test suite for a project I am developing in my spare time. Being a CL newbie I was overwhelmed by the amount of choices for a CL implementation, I spent quite some time to choose one. Now I am facing exactly the same thing with unit test frameworks. A quick glance at http://www.cliki.net/test%20framework shows 20 unit test frameworks! Choice is good but for a novice like me this can be a bit confusing and given the number of frameworks it would be painful to try them all. I would like to use a framework which: Is reasonably well maintained Easy to use but with some degree of flexibility Offers some sort of integration with Emacs (or it is possible to easily integrate it with Emacs) Integration with git post-commit hooks Integration with a continous integration system (such as buildbot) What are your experiences in this field?

    Read the article

  • Should I use the Model-View-ViewModel (MVVM) pattern in Silverlight projects?

    - by Jon Galloway
    One challenge with Silverlight controls is that when properties are bound to code, they're no longer really editable in Blend. For example, if you've got a ListView that's populated from a data feed, there are no elements visible when you edit the control in Blend. I've heard that the MVVM pattern, originated by the WPF development community, can also help with keeping Silverlight controls "blendable". I'm still wrapping my head around it, but here are some explanations: http://www.nikhilk.net/Silverlight-ViewModel-Pattern.aspx http://mark-dot-net.blogspot.com/2008/11/model-view-view-model-mvvm-in.html http://www.ryankeeter.com/silverlight/silverlight-mvvm-pt-1-hello-world-style/ http://jonas.follesoe.no/YouCardRevisitedImplementingTheViewModelPattern.aspx One potential downside is that the pattern requires additional classes, although not necessarily more code (as shown by the second link above). Thoughts?

    Read the article

< Previous Page | 77 78 79 80 81 82 83 84 85 86 87 88  | Next Page >