Search Results

Search found 18220 results on 729 pages for 'generic programming'.

Page 8/729 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • Programming in python Vs programming in Java

    - by yossale
    I've been writing Java for the last couple of years , and now I've started to write in python (in addition). The problem is that when I look at my Python code it looks like someone tried to hammer Java code into a python format , and it comes out crappy because - well , python ain't Java. Any tips on how to escape this pattern of "Writing Java in Python"? Thanks!

    Read the article

  • Programming activities for high school kids who have no idea what CS or programming is

    - by pointdxt
    I work at a small high school that's in a very high poverty area. There are only a handful of seniors that are thinking about applying to be an engineer of some sort in college and only 1 kid that applied for Computer Science (he has a couple acceptances so far!). He's been talking to me a lot as I majored in Computer Science as well and he is very excited about it. Unfortunately, our school doesn't have a Computer Science course of any kind so he asks me a lot of stuff. I want to help him out since he's really excited about majoring in CS but I don't know where to begin. I could say put Linux on a computer, go online and go research stuff like I did but this kid needs some direction and he doesn't even know what Linux is let alone have a free computer around for that sort of thing. He doesn't know much about CS but is keenly interested in having a computer do all sorts of things but I don't know how to help him in a meaningful way. Any advice? I'm not a teacher at the school so I'm not a great educator, I do IT at the school.

    Read the article

  • The future of programming, or what lies in the future in programming?

    - by prosseek
    I remember that a article that Microsoft uses formal verification to debug the Device Driver, and I also remember that Functional Programming removes much of the bug as it ensures stateless programming. And we all know about the multi-core. I beleive all of them are future direction of programming or programming language. Multi-core programming or parallel programming Software Formal Verification Functional Programming (as a mainstream?) What do you think? What will be the future of programming?

    Read the article

  • Generic socket 940 CPU fan interchangeable with HP part number 411454-001

    - by ConcernedOfTunbridgeWells
    Hi, I'm trying to find a generic CPU fan that will fit the air duct in an XW9300. Note that there are two CPU fan mounting schemes used on this machine. One with two grommets in the motherboard that the CPU fan screws into and one with a plastic collar and base plate. The form factor I'm looking for is the former (see picture below): Two HP part numbers for fans in this form factor are 411454-001 (shown below) and 416055-001. Note that the dimensions are important as the machine has an air duct that fits over the fan. Can anyone tell me the manufacturer and model of an equivalent generic part? Better yet, do you know somewhere (preferrably in the UK) that I can obtain such an item from?

    Read the article

  • Generic socket 940 CPU fan for HP XW9300 interchangeable with HP part number 411454-001

    - by ConcernedOfTunbridgeWells
    Hi, I'm trying to find a generic Socket 940 CPU fan that will fit the air duct in an XW9300. Note that two different CPU fan mounting schemes have been used on this machine. One has two grommets in the motherboard that the CPU fan screws into and the other has a plastic collar and base plate. The form factor I'm looking for is the former (see the picture below). Two HP part numbers for fans in this form factor are 411454-001 (shown below) and 416055-001. Note that the dimensions are important as the machine has an air duct that fits over the fan. Can anyone tell me the manufacturer and model of an equivalent generic part? Better yet, do you know somewhere (preferrably in the UK) from which such an item can be obtained?

    Read the article

  • Which order would you teach programming languages in, when teaching a newbie?

    - by blueberryfields
    If you had to design a study program, with a breadth-of-programming-languages requirement, which stated that the student should be exposed to all major concepts and methodologies that can be taught through (at the minimum) 6 programming languages, which programming languages would you choose to teach, and in which order? Breadth-of-programming-languages is based on programming language and theoretical concepts.

    Read the article

  • Good practices - database programming, unit testing

    - by Piotr Rodak
    Jason Brimhal wrote today on his blog that new book, Defensive Database Programming , written by Alex Kuznetsov ( blog ) is coming to bookstores. Alex writes about various techniques that make your code safer to run. SQL injection is not the only one vulnerability the code may be exposed to. Some other include inconsistent search patterns, unsupported character sets, locale settings, issues that may occur during high concurrency conditions, logic that breaks when certain conditions are not met. The...(read more)

    Read the article

  • Best Programming Language for Web Development

    - by Harish Kurup
    I am a Web Developer in PHP, and also know Javascript and some bit of CSS which is needed for web development. I use Symfony framework to build Websites and Web Application. As now i want to learn new Programming Language, which is best for Web Development(like Ruby, Python), as i have heard about Frameworks like Rails and Django. Which language will be best for Web Development apart from PHP or like PHP?

    Read the article

  • Does syntax really matter in a programming language?

    - by Saif al Harthi
    One of my professors says "the Syntax is the UI of a programming language", languages like ruby have great readability & its growing but we see alot of programmers productive with C\C++, so as programmers does it really matter that the syntax should be acceptable? I would love to know your opinion on that. Disclaimer: I'm not trying to start an argument I thought this is a good topic of discussion. Update : this turns out to be a good topic i'm glad you are all participating it , there will be more good questions to come

    Read the article

  • Dealing with state problems in functional programming

    - by Andrew Martin
    I've learned how to program primarily from an OOP standpoint (like most of us, I'm sure), but I've spent a lot of time trying to learn how to solve problems the functional way. I have a good grasp on how to solve calculational problems with FP, but when it comes to more complicated problems I always find myself reverting to needing mutable objects. For example, if I'm writing a particle simulator, I will want particle "objects" with a mutable position to update. How are inherently "stateful" problems typically solved using functional programming techniques?

    Read the article

  • Next programming paradigm for CBE/GPU in the next years

    - by Werner
    Hi, in the last five years, there has been a rise in the use of GPU and CBE for parallelization of applications. Around 2005-2007 verything seemed to be programmed by hand, C, etc. Afterwards new unifying alternatives emerged like CUDA for GPU and lastly OpenCL. What do you think will be the programming paradigm for GPU/CBE in the forthcoming years? My vote goes for OpenCL Thanks

    Read the article

  • Why do "Joke" programming languages exist? [closed]

    - by ThePlan
    First of all please be aware this post contains some abusive language but I hope it will not bother anyone. I apologize for the bad language but that's what the name is. As I've been doing documentation on existing programming languages attempting to make a complete list of them I stumbled across terrible programming languages, which were clearly not made for actual use and implementation due to their insane difficulty. Languages such as Brainfu*k and LOLCODE or Whitespace are fool languages because they have no real use. For example, a "Hello world" program written in BrainFu*k. Taken from Wikipedia: The following program prints "Hello World!" and a newline to the screen: +++++ +++++ initialize counter (cell #0) to 10 [ use loop to set the next four cells to 70/100/30/10 > +++++ ++ add 7 to cell #1 > +++++ +++++ add 10 to cell #2 > +++ add 3 to cell #3 > + add 1 to cell #4 <<<< - decrement counter (cell #0) ] > ++ . print 'H' > + . print 'e' +++++ ++ . print 'l' . print 'l' +++ . print 'o' > ++ . print ' ' << +++++ +++++ +++++ . print 'W' > . print 'o' +++ . print 'r' ----- - . print 'l' ----- --- . print 'd' > + . print '!' > . print '\n' or another example taken from LOLCODE language: HAI CAN HAS STDIO? PLZ OPEN FILE "LOLCATS.TXT"? AWSUM THX VISIBLE FILE O NOES INVISIBLE "ERROR!" KTHXBYE These languages are very difficult to learn/read/work with. My question is - Why do they exist? What is the purpose of them? Also, is there an official "name" for these type of languages?

    Read the article

  • Java Parallel Programming

    - by user578524
    Dear All, I need to parallelize a CPU intensive Java application on my multicore desktop but I am not so comfortable with threads programming. I looked at Scala but this would imply learning a new language which is really time consuming. I also looked at Ateji PX Java parallel extensions which seem very easy to use but did not have a chance yet to evaluate it. Would anyone recommend it? Other suggestions welcome. Thanks in advance for your help Bill

    Read the article

  • Ubuntu 12.04 updates fail recently - Please help

    - by user74152
    I upgraded Ubuntu 11.10 to 12.04 LTS immediately after its release (april 2012). Since then updates (new kernels and others) succeeded regularly, but recently, suddenly, updates fail consistently. What causes the problem and how can it be solved? Terminal information after the last update attempt: ariel@ariel-MS-7592:~$ sudo apt-get upgrade Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 3 not fully installed or removed. After this operation, 0 B of additional disk space will be used. Do you want to continue [Y/n]? y Setting up linux-image-3.2.0-26-generic (3.2.0-26.41) ... Running depmod. update-initramfs: deferring update (hook will be called later) Examining /etc/kernel/postinst.d. run-parts: executing /etc/kernel/postinst.d/dkms 3.2.0-26-generic /boot/vmlinuz-3.2.0-26-generic run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.2.0-26-generic /boot/vmlinuz-3.2.0-26-generic update-initramfs: Generating /boot/initrd.img-3.2.0-26-generic run-parts: executing /etc/kernel/postinst.d/pm-utils 3.2.0-26-generic /boot/vmlinuz-3.2.0-26-generic run-parts: executing /etc/kernel/postinst.d/update-notifier 3.2.0-26-generic /boot/vmlinuz-3.2.0-26-generic run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.2.0-26-generic /boot/vmlinuz-3.2.0-26-generic /usr/sbin/grub-mkconfig: 11: /etc/default/grub: splash”: not found run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 127 Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-3.2.0-26-generic.postinst line 1010. dpkg: error processing linux-image-3.2.0-26-generic (--configure): subprocess installed post-installation script returned error exit status 2 No apport report written because MaxReports is reached already dpkg: dependency problems prevent configuration of linux-image-generic: linux-image-generic depends on linux-image-3.2.0-26-generic; however: Package linux-image-3.2.0-26-generic is not configured yet. dpkg: error processing linux-image-generic (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of linux-generic: linux-generic depends on linux-image-generic (= 3.2.0.26.28); however: Package linux-image-generic is not configured yet. dpkg: error processing linux-generic (--configure): dependency problems - leaving unconfiguredNo apport report written because MaxReports is reached already No apport report written because MaxReports is reached already Errors were encountered while processing: linux-image-3.2.0-26-generic linux-image-generic linux-generic E: Sub-process /usr/bin/dpkg returned an error code (1)

    Read the article

  • If all programming languages are Turing Complete then why do we have language wars?

    - by kadaj
    There are language wars saying one programming language is better than other.. Consider Lisp and Java; and we can argue that the meta programming capabilities of Lisp is better than that of Java. But that does not mean Java cannot have meta programming capabilities without being another dialect of Lisp. Basically all programming languages are Turing Complete. So doesn't that mean we could solve any solvable problem in all those programming languages?

    Read the article

  • What programming language(s) could I develop this app with for an iPhone

    - by Keon Davies
    The app I'm thinking of making would be little similar to fruit ninja. The app/ game would involve different types of animals flying straight at and you have to choose the right item to catch the animal before he gets to you. For example to capture a fish you would have to select the net and then click on the fish to capture it. Also I would like to have a leader board too. Which programming language(s) could I use to develop what I just described?

    Read the article

  • Implement a generic C++/CLI interface in a C# generic interface

    - by Florent
    I have a C++/CLI generic interface like this : using namespace System::Collections::Generic; namespace Test { generic <class T> public interface class IElementList { property List<T>^ Elements; }; } and I want to implement it in a C# generic interface like this : using Test; namespace U { public interface IElementLightList<T> : IElementList<T> where T : IElementLight { bool isFrozen(); bool isPastable(); } } This don't work, Visual Studio is not able to see C++/CLI IElementList interface ! I tested with a not generic C++/CLI interface and this work. What I missed ?

    Read the article

  • In plain English, what are Django generic views?

    - by allyourcode
    The first two paragraphs of this page explain that generic views are supposed to make my life easier, less monotonous, and make me more attractive to women (I made up that last one): http://docs.djangoproject.com/en/dev/topics/generic-views/#topics-generic-views I'm all for improving my life, but what do generic views actually do? It seems like lots of buzzwords are being thrown around, which confuse more than they explain. Are generic views similar to scaffolding in Ruby on Rails? The last bullet point in the intro seems to indicate this. Is that an accurate statement?

    Read the article

  • Dynamically creating a Generic Type at Runtime

    - by Rick Strahl
    I learned something new today. Not uncommon, but it's a core .NET runtime feature I simply did not know although I know I've run into this issue a few times and worked around it in other ways. Today there was no working around it and a few folks on Twitter pointed me in the right direction. The question I ran into is: How do I create a type instance of a generic type when I have dynamically acquired the type at runtime? Yup it's not something that you do everyday, but when you're writing code that parses objects dynamically at runtime it comes up from time to time. In my case it's in the bowels of a custom JSON parser. After some thought triggered by a comment today I realized it would be fairly easy to implement two-way Dictionary parsing for most concrete dictionary types. I could use a custom Dictionary serialization format that serializes as an array of key/value objects. Basically I can use a custom type (that matches the JSON signature) to hold my parsed dictionary data and then add it to the actual dictionary when parsing is complete. Generic Types at Runtime One issue that came up in the process was how to figure out what type the Dictionary<K,V> generic parameters take. Reflection actually makes it fairly easy to figure out generic types at runtime with code like this: if (arrayType.GetInterface("IDictionary") != null) { if (arrayType.IsGenericType) { var keyType = arrayType.GetGenericArguments()[0]; var valueType = arrayType.GetGenericArguments()[1]; … } } The GetArrayType method gets passed a type instance that is the array or array-like object that is rendered in JSON as an array (which includes IList, IDictionary, IDataReader and a few others). In my case the type passed would be something like Dictionary<string, CustomerEntity>. So I know what the parent container class type is. Based on the the container type using it's then possible to use GetGenericTypeArguments() to retrieve all the generic types in sequential order of definition (ie. string, CustomerEntity). That's the easy part. Creating a Generic Type and Providing Generic Parameters at RunTime The next problem is how do I get a concrete type instance for the generic type? I know what the type name and I have a type instance is but it's generic, so how do I get a type reference to keyvaluepair<K,V> that is specific to the keyType and valueType above? Here are a couple of things that come to mind but that don't work (and yes I tried that unsuccessfully first): Type elementType = typeof(keyvalue<keyType, valueType>); Type elementType = typeof(keyvalue<typeof(keyType), typeof(valueType)>); The problem is that this explicit syntax expects a type literal not some dynamic runtime value, so both of the above won't even compile. I turns out the way to create a generic type at runtime is using a fancy bit of syntax that until today I was completely unaware of: Type elementType = typeof(keyvalue<,>).MakeGenericType(keyType, valueType); The key is the type(keyvalue<,>) bit which looks weird at best. It works however and produces a non-generic type reference. You can see the difference between the full generic type and the non-typed (?) generic type in the debugger: The nonGenericType doesn't show any type specialization, while the elementType type shows the string, CustomerEntity (truncated above) in the type name. Once the full type reference exists (elementType) it's then easy to create an instance. In my case the parser parses through the JSON and when it completes parsing the value/object it creates a new keyvalue<T,V> instance. Now that I know the element type that's pretty trivial with: // Objects start out null until we find the opening tag resultObject = Activator.CreateInstance(elementType); Here the result object is picked up by the JSON array parser which creates an instance of the child object (keyvalue<K,V>) and then parses and assigns values from the JSON document using the types  key/value property signature. Internally the parser then takes each individually parsed item and adds it to a list of  List<keyvalue<K,V>> items. Parsing through a Generic type when you only have Runtime Type Information When parsing of the JSON array is done, the List needs to be turned into a defacto Dictionary<K,V>. This should be easy since I know that I'm dealing with an IDictionary, and I know the generic types for the key and value. The problem is again though that this needs to happen at runtime which would mean using several Convert.ChangeType() calls in the code to dynamically cast at runtime. Yuk. In the end I decided the easier and probably only slightly slower way to do this is a to use the dynamic type to collect the items and assign them to avoid all the dynamic casting madness: else if (IsIDictionary) { IDictionary dict = Activator.CreateInstance(arrayType) as IDictionary; foreach (dynamic item in items) { dict.Add(item.key, item.value); } return dict; } This code creates an instance of the generic dictionary type first, then loops through all of my custom keyvalue<K,V> items and assigns them to the actual dictionary. By using Dynamic here I can side step all the explicit type conversions that would be required in the three highlighted areas (not to mention that this nested method doesn't have access to the dictionary item generic types here). Static <- -> Dynamic Dynamic casting in a static language like C# is a bitch to say the least. This is one of the few times when I've cursed static typing and the arcane syntax that's required to coax types into the right format. It works but it's pretty nasty code. If it weren't for dynamic that last bit of code would have been a pretty ugly as well with a bunch of Convert.ChangeType() calls to litter the code. Fortunately this type of type convulsion is rather rare and reserved for system level code. It's not every day that you create a string to object parser after all :-)© Rick Strahl, West Wind Technologies, 2005-2011Posted in .NET  CSharp   Tweet (function() { var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; po.src = 'https://apis.google.com/js/plusone.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s); })();

    Read the article

  • Opinions regarding C++ programming practice

    - by Sagar
    I have a program that I am writing, not too big. Apart from the main function, it has about 15 other functions that called for various tasks at various times. The code works just fine all in one file, and as it is right now. However, I was wondering if anyone had any advice on whether it is smarter/more efficient/better programming to put those functions in a separate file different from where main is, or whether it even matters at all. If yes, why? If no, why not? I am not new at C++, but definitely not an expert either, so if you think this question is stupid, feel free to tell me so. Thanks for your time!

    Read the article

  • Best practices to work on several programming projects simultaneously

    - by Mahbubur R Aaman
    Most of the time I have to work on several projects simultaneously. I want to provide my best output at every project. What practices would be the best for me work on each project with better output? EDIT: It is better to follow http://www.joelonsoftware.com/articles/fog0000000022.html But every companies does not follow JOEL methodologies. In this situation, what should i do? EDIT: I am a lead programmer. I have to lead several projects. Need to solve several programming problems of programmers. In this situation, what should i do?

    Read the article

  • Transitioning to asynchronous programming model

    - by Simone
    our team is mantaining and developing a .NET web service written in C#. We have stress tested the web service's farm and we have evidence that the actual architecture doesn't scale well, as the number of request are constantly increasing. We analyzed Martin Fowler's conclusion in this article, and our team feels that migrating to an asynchronous programming model such as the one described could be the right direction to point to for our service too. My question is: do you think that this "switch" needs a complete rewrite of the application? Has been someone of you been able to adopt APM without rewriting everything and has some insight to share? Thank you in advance

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >