Search Results

Search found 21980 results on 880 pages for 'input languages'.

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

  • If there's no problem treating a statement as an expression, why was there a distinction in the first place in some programming languages?

    - by cdmckay
    Why do we have the distinction between statements and expressions in most programming languages? For example, in Java, assuming f and g return ints, this still won't compile because it's a statement and statements don't return values. // won't compile int i = if (pred) { f(x); } else { g(x); } but in Scala, it's very happy with treating if as an expression. // compiles fine val i: Int = if (pred) f(x) else g(x) So if there's no problem treating an if statement as an expression, why was there a distinction in the first place?

    Read the article

  • What software programming languages were used by the Soviet Union's space program?

    - by shamp00
    I got interested in the Soviet space program and was interested to discover that the software on the Buran spacecraft circa 1988 was written in Prolog. Does anyone know what languages might have been used in earlier missions, especially the Mars PrOP-M rover missions of the early 1970s which were somewhat autonomous and could navigate obstacles? Edit My source for the Buran Prolog is this declassified document from the CIA site from May 1990. I couldn't find an OCR version, so here's the relevant quote from p. 0449: According to open-source literature, the Soviets used the French-developed programming language known as Prolog to develop on-board system software for the Buran vehicle...

    Read the article

  • What Languages are mostly understood "intuitively" and could benefit from a more formal learning approach?

    - by keppla
    In a presentation, i stumbled upon the Statement "JavaScript is a Language everybody uses, yet nearly noone seems to find it neccessary to learn how it works". And indeed, not many of the programmers i know could explain javascript's prototype concept, or why functions need to be 'bound' to this. CSS seems to be another example of this behaviour: everyone knows how to put a 'class' to an element, and to write a style .myclass { ... }, but only a few even know of margin-collapse. My question is: are there more of those languages, technologies, concepts, that are so prevalent that we dont even notice them as something worth learning while we use them?

    Read the article

  • Good choice of languages for making a program that manages and organizes business? [closed]

    - by Ronney P
    I've been reading questions and discussions on this website but haven't made an account to start talking or asking anything I had doubts in so please bare with a newbie here. What are specific languages that have are able to make a program that will record, and organize things such as hours, salaries, payments? Also solve business problems, mostly with payments, how much money there will be after interest, taxes and such. Anyway, I've been looking into COBOL, C++, Java, HTML, JavaScript, VB.NET and a couple more. Which ones should I focus on and look into more? I very much appreciate any answers. Thank you.

    Read the article

  • Help me sort programing languages a bit

    - by b-gen-jack-o-neill
    Hi, so I asked here few days ago about C# and its principles. Now, if I may, I have some additional general questions about some languages, becouse for novice like me, it seems a bit confusing. To be exact I want to ask more about language functions capabilities than syntax and so. To be honest, its just these special functions that bothers me and make me so confused. For exmaple, C has its printf(), Pascal has writeln() and so. I know in basic the output in assembler of these funtions would be similiar, every language has more or less its special functions. For console output, for file manipulation, etc. But all these functions are de-facto part of its OS API, so why is for example in C distinguished between C standard library functions and (on Windows) WinAPI functions when even printf() has to use some Windows feature, call some of its function to actually show desired text on console window, becouse the actuall "showing" is done by OS. Where is the line between language functions and system API? Now languages I dont quite understand - Python, Ruby and similiar. To be more specific, I know they are similiar to java and C# in term they are compiled into bytecode. But, I do not unerstand what are its capabilities in term of building GUI applications. I saw tutorial for using Ruby to program GUI applications on Linux and Windows. But isn´t that just some kind of upgrade? I mean fram other tutorials It seemed like these languages was first intended for small scripts than building big applications. I hope you understand why I am confused. If you do, please help me sort it out a bit, I have no one to ask.

    Read the article

  • Choosing a Job based on languages?

    - by Alan
    How often is language the deciding factor for selecting a job? Many of us here are well versed in many languages, C++, Java, C#, and likely have many other languages under our belt for the right occassion (really any occasion is the right occasion for Python, AMIRITE?), so this isn't so much a question of choosing a job that is a good fit based on your skill set. Rather, if you are skilled with most languages, do you pick your favorite, or do you follow the money (given the tight economy). I'm considering coming out of retirement, and have started to look around and what's available. Over the years, I've moved towards C# and Python; many jobs in the area are looking for .NET developers, but there are plenty of them that do not. I cut my teef on C++, consider myself adept at the language, and know my way around a Java. But I find myself really digging what they're doing to C#, and I have always loved python. So when I see an interesting job req that is looking for C++ developers; it gives me 2nd thoughts. Not because I can't cut it, but because I don't know if I want to go back to C++. Even if the work will be interesting, how important is the language to you?

    Read the article

  • Push or Pull Input Data In the Game Logic?

    - by Qua
    In the process of preparing my game for networking I'm adding a layer of seperation between the physical input (mouse/keyboard) and the actual game "engine"/logic. All input that has any relation to the game logic is wrapped inside action objects such as BuildBuildingAction. I was thinking of having an action processing layer that would determine what to do with the input. This layer could then be set up to either just pass the actions locally to the game engine or send it via sockets to the network server depending on whether the game was single- or multiplayer. In network games it would make sense that the player's actions should be sent to the server, but should the game logic be pulling (polling?) the data through some sort of interface or should the action processing layer be adding the actions to an input queue in the game logic code?

    Read the article

  • Will HTML5/JS Eventually Replace All Client Side Languages? [closed]

    - by Shnitzel
    I'm just wondering about the future of it all. IMHO, there are 4 forces that define where technology goes: Microsoft, Apple, Google, Adobe. It looks like in Apple's iPhone/iPad iADs can now be programmed in HTML5. So does that mean HTML5 will eventually replace objective-c? Also, Microsoft has now shifted it's focus from WPF/Silverlight to HTML5 and I assume Visual Studio 2011 will be all about tooling support for HTML5. Because that's what Microsoft do. (Tools). In a few months IE9 the last major browser will support HTML5. Similarly Adobe is getting on the HTML5 bandwagon and allows to export flash content to HTML5 in their latest tools. And we all know how much in bed Google is with html5. Heck, their latest Operating System (Chrome OS) is nothing but a big fat web browser. Apps for Mobile (i.e., iPhone, Android, WM7) are very hard for a company to program especially for many different devices (each with their own language) so I'm assuming this won't last too long. I.e., HTML5 will be the unifying language. Which is somewhat sad for app developers because now users will be able to play the "cool" html5 apps for free on the web and it'll be hard to charge for them. So are strongly-typed languages really doomed, and in the future, say 5-10 years, will client side programming only be in HTML5? Will all of us become javascript programmers? :) Because the signs are sure pointing that way...

    Read the article

  • Do there exist programming languages where a variable can truly know its own name?

    - by Job
    In PHP and Python one can iterate over the local variables and, if there is only once choice where the value matches, you could say that you know what the variable's name is, but this does not always work. Machine code does not have variable names. C compiles to assembly and does not have any native reflection capabilities, so it would not know it's name. (Edit: per Anton's answer the pre-processor can know the variable's name). Do there exist programming languages where a variable would know it's name? It gets tricky if you do something like b = a and b does not become a copy of a but a reference to the same place. EDIT: Why in the world would you want this? I can think of one example: error checking that can survive automatic refactoring. Consider this C# snippet: private void CheckEnumStr(string paramName, string paramValue) { if (paramName != "pony" && paramName != "horse") { string exceptionMessage = String.Format( "Unexpected value '{0}' of the parameter named '{1}'.", paramValue, paramName); throw new ArgumentException(exceptionMessage); } } ... CheckEnumStr("a", a); // Var 'a' does not know its name - this will not survive naive auto-refactoring There are other libraries provided by Microsoft and others that allow to check for errors (sorry the names have escaped me). I have seen one library which with the help of closures/lambdas can accomplish error checking that can survive refactoring, but it does not feel idiomatic. This would be one reason why I might want a language where a variable knows its name.

    Read the article

  • Exclude an input language from Alt+Shift/Ctrl+Shift switching cycle on Windows

    - by Headcrab
    I have 3 input languages installed on my Windows 7: English, Russian and Japanese. So when I switch between them by Ctrl+Shift, they go like English - Russian - Japanese - English - ... I don't use Japanese much, but still need it occasionally. Is there a way to somehow exclude it from the "Ctrl+Shift cycle" without uninstalling it from the system? E. g. Ctrl+Shift will be like English - Russian - English - ..., while I still could switch to Japanese by a dedicated keyboard shortcut, say, Ctrl + 3? That extra Ctrl+Shift to go through Japanese just to switch between English and Russian is very annoying, and using Ctrl+1, Ctrl+2, Ctrl+3 for each input language isn't very ergonomic, either.

    Read the article

  • How do functional programming languages work?

    - by eSKay
    I was just reading this excellent post, and got some better understanding of what exactly object oriented programming is, how Java implements it in one extreme manner, and how functional programming languages are a contrast. What I was thinking is this: if functional programming languages cannot save any state, how do they do some simple stuff like reading input from a user (I mean how do they "store" it), or storing any data for that matter? For example - how would this simple C thing translate to any functional programming language, for example haskell? #include<stdio.h> int main() { int no; scanf("%d",&no); return 0; }

    Read the article

  • Languages and development methodologies

    - by Carlos
    Having never worked with Ruby on Rails, I looked it up on Wikipedia. It says It is intended to be used with an Agile development methodology that is used by web developers for rapid development. This got me asking how a given language/framework can be more appropriate for given development methodologies. Are there certain languages that are more friendly for pair programming, for instance? Are there language features that make certain methodologies are more appropriate? Are there features that make certain methodologies impossible? My initial reaction is to dismiss the connection (the design process is a business process, which is more dependent on business needs that language features). But I'm an only programmer within the firm, and I'm a partner, so I get to decide the business needs. What do you think? Also, if the SO community finds that certain languages point towards certain methodologies, what methodology is most common for c#, which is what I use most of the time?

    Read the article

  • Managing multiple .NET languages in a web application

    - by tomfanning
    I am part of a development team building a new ASP.NET 3.5 web application. Two of us are C# coders, and the other is a VB.NET coder. I know that we can mix languages on a per-project basis, and one can build classes in one language that inherit from classes written in the other language in a different project (which we are already doing), but I can see us getting into a situation where we might well end up with cyclic dependencies between our various project DLLs. Other than simply having a high number of projects (more seperation of concerns into more libraries), how have you managed this situation on your own projects? Note - I believe this question to be different enough from the only similar match I could find (this one) on the basis that we are not wanting to use different languages in order to take advantage of their specific features per se, but rather to make use of what developer resource is available to us (i.e. one dev just happens to be VB.NET only).

    Read the article

  • Encapsulating user input of data for a class (C++)

    - by Dr. Monkey
    For an assignment I've made a simple C++ program that uses a superclass (Student) and two subclasses (CourseStudent and ResearchStudent) to store a list of students and print out their details, with different details shown for the two different types of students (using overriding of the display() method from Student). My question is about how the program collects input from the user of things like the student name, ID number, unit and fee information (for a course student) and research information (for research students): My implementation has the prompting for user input and the collecting of that input handled within the classes themselves. The reasoning behind this was that each class knows what kind of input it needs, so it makes sense to me to have it know how to ask for it (given an ostream through which to ask and an istream to collect the input from). My lecturer says that the prompting and input should all be handled in the main program, which seems to me somewhat messier, and would make it trickier to extend the program to handle different types of students. I am considering, as a compromise, to make a helper class that handles the prompting and collection of user input for each type of Student, which could then be called on by the main program. The advantage of this would be that the student classes don't have as much in them (so they're cleaner), but also they can be bundled with the helper classes if the input functionality is required. This also means more classes of Student could be added without having to make major changes to the main program, as long as helper classes are provided for these new classes. Also the helper class could be swapped for an alternative language version without having to make any changes to the class itself. What are the major advantages and disadvantages of the three different options for user input (fully encapsulated, helper class or in the main program)?

    Read the article

  • CSS Forms/Input Maniuplation

    - by user983969
    input:required{ background-color:#f00; } input:required label{ color: #FF3434; } I have the above CSS code currently for my form, I want to be able to make the label red when the field is required. My input field is: <label for="frmComTelephone">Telephone</label> <input type="number" name="Telephone" id="frmComTelephone"/> But that CSS isn't working how do I solve this? 2ND problem is I have the following CSS: input:focus { background-color:yellow; } input[type="text"], input[type="date"],input[type="time"],input[type="number"],textarea,select { border-radius:5px; border-width: 1px; border-style: solid; border-color: #C6C6C6; height:41px; background-color: #FF3434; width: 100%; } But when the item is focused it doesn't change to yellow, if i remove "background-color: #FF3434;" it turns yellow on focus? Is what I am doing not able to be done? Or am I going about this wrong? Thanks

    Read the article

  • Add Keyboard Input Language to Ubuntu

    - by Matthew Guay
    Want to type in multiple languages in Ubuntu?  Here we’ll show you how you can easily add and switch between multiple keyboard layouts in Ubuntu. Add a Keyboard Language To add a keyboard language, open the System menu, select Preferences, and then select Keyboard. In the Keyboard Preferences dialog, select the Layouts tab, and click Add.   You can select a country and then choose an language and keyboard variant.  Note that some countries, such as the United States, may show several languages.  Once you’ve made your selection, you can preview it on the sample keyboard displayed below the menu. Alternately, on the second tab, select a language and then choose a variant.  Click Add when you’ve made your selection. Now you’ll notice that there are two languages listed in the Keyboard Preferences, and they’re both ready to use immediately.  You can add more if you wish, or close the dialog. Switch Between Languages When you have multiple input languages installed, you’ll notice a new icon in your system tray on the top right.  It will show the abbreviation of the country and/or language name that is currently selected.  Click the icon to change the language. Right-click the dialog to view available languages (listed under Groups), open the Keyboard Preferences dialog again, or show the current layout. If you select Show Current Layout you’ll see a window with the keyboard preview we saw previously when setting the keyboard layout.  You can even print this layout preview out to help you remember a layout if you wish. Change Keyboard Shortcuts to Switch Languages By default, you can switch input languages in Ubuntu from the keyboard by pressing both Alt keys together.  Many users are already used to the default Alt+Switch combination to switch input languages in Windows, and we can add that in Ubuntu.  Open the keyboard preferences dialog, select the Layout tab, and click Options. Click the plus sign beside Key(s) to change layout, and select Alt+Shift.  Click Close, and you can now use this familiar shortcut to switch input languages. The layout options dialog offers many more neat keyboard shortcuts and options.  One especially neat option was the option to use a keyboard led to show when we’re using the alternate keyboard layout.  We selected the ScrollLock light since it’s hardly used today, and now it lights up when we’re using our other input language.   Conclusion Whether you regularly type in multiple languages or only need to enter an occasional character from an alternate keyboard layout, Ubuntu’s keyboard settings make it easy to make your keyboard work the way you want.  And since you can even preview and print a keyboard layout, you can even remember an alternate keyboard’s layout if it’s not printed on your keyboard. Windows users, you’re not left behind, either.  Check out our tutorial on how to Add keyboard languages to XP, Vista, and Windows 7. Similar Articles Productive Geek Tips Add keyboard languages to XP, Vista, and Windows 7Assign a Hotkey to Open a Terminal Window in UbuntuWhat is ctfmon.exe And Why Is It Running?Keyboard Shortcuts for VMware WorkstationInput Director Controls Multiple Windows Machines with One Keyboard and Mouse TouchFreeze Alternative in AutoHotkey The Icy Undertow Desktop Windows Home Server – Backup to LAN The Clear & Clean Desktop Use This Bookmarklet to Easily Get Albums Use AutoHotkey to Assign a Hotkey to a Specific Window Latest Software Reviews Tinyhacker Random Tips VMware Workstation 7 Acronis Online Backup DVDFab 6 Revo Uninstaller Pro MELTUP – "The Beginning Of US Currency Crisis And Hyperinflation" Enable or Disable the Task Manager Using TaskMgrED Explorer++ is a Worthy Windows Explorer Alternative Error Goblin Explains Windows Error Codes Twelve must-have Google Chrome plugins Cool Looking Skins for Windows Media Player 12

    Read the article

  • No audio input deviced are installed

    - by Meowbits
    If I go to Sound Recording Devices and it says "No audio devices are installed" If I click to set up a microphone I get an error "Wizard could not launch, No audio input device found, make sure your audio hardware is working properly and check your audio configuration in the Audio Devices and Sound Themes control panel. Where can I get an audio input device? I just want something so I can actually use the microphone on my headset. This is ridiculous. I have tried to look for any file but I simply cannot find a way to add an audio input device... I really do not want to format my computer just for this problem but I am starting to feel like that is the only option I have. I have the latest chipsets

    Read the article

  • How to create a virtual input in windows from an audio stream

    - by Brian
    Great to find this forum full of knowledge. I was wondering if anyone knew of an application or other work around to create a virtual input device in windows. I have a IP cam app on my android phone, that I would like to use for skype webcam. It comes with a port for getting the video feed into skype, and that works great. However, the only audio available, is a OGG stream. Both video and audio work great with media players such as VLC etc, but ot with skype, since skype only works with windows input devices. Is there such software outthere, in which I could simply name my audio stream address, and pipe that to a virtual input device to allow skype to find it?

    Read the article

  • iptables: built-in INPUT chain in nat table?

    - by ughmandaem
    I have a Gentoo Linux system running linux 2.6.38-rc8. I also have a machine running Ubuntu with linux 2.6.35-27. I also have a virtual machine running Debian Unstable with linux 2.6.37-2. On the Gentoo and Debian systems I have an INPUT chain built into my nat table in addition to PREROUTING, OUTPUT, and POSTROUTING. On Ubuntu, I only have PREROUTING, OUTPUT, and POSTROUTING. I am able to use this INPUT chain to use SNAT to modify the source of a packet that is destined to the local machine (imagine simulating an incoming spoofed IP to a local application or just to test a virtual host configuration). This is possible with 2 firewall rules on Gentoo and Debian but seemingly not so on Ubuntu. I looked around for documentation on changes to the SNAT target and the INPUT chain of the nat table and I couldn't find anything. Does anyone know if this is a configuration issue or is it something that was just added in more recent versions of linux?

    Read the article

  • Input not cleared.

    - by SoulBeaver
    As the question says, for some reason my program is not flushing the input or using my variables in ways that I cannot identify at the moment. This is for a homework project that I've gone beyond what I had to do for it, now I just want the program to actually work :P Details to make the finding easier: The program executes flawlessly on the first run through. All throws work, only the proper values( n 0 ) are accepted and turned into binary. As soon as I enter my terminate input, the program goes into a loop and only asks for the termiante again like so: When I run this program on Netbeans on my Linux Laptop, the program crashes after I input the terminate value. On Visual C++ on Windows it goes into the loop like just described. In the code I have tried to clear every stream and initialze every variable new as the program restarts, but to no avail. I just can't see my mistake. I believe the error to lie in either the main function: int main( void ) { vector<int> store; int terminate = 1; do { int num = 0; string input = ""; if( cin.fail() ) { cin.clear(); cin.ignore( numeric_limits<streamsize>::max(), '\n' ); } cout << "Please enter a natural number." << endl; readLine( input, num ); cout << "\nThank you. Number is being processed..." << endl; workNum( num, store ); line; cout << "Go again? 0 to terminate." << endl; cin >> terminate // No checking yet, just want it to work! cin.clear(); }while( terminate ); cin.get(); return 0; } or in the function that reads the number: void readLine( string &input, int &num ) { int buf = 1; stringstream ss; vec_sz size; if( ss.fail() ) { ss.clear(); ss.ignore( numeric_limits<streamsize>::max(), '\n' ); } if( getline( cin, input ) ) { size = input.size(); for( int loop = 0; loop < size; ++loop ) if( isalpha( input[loop] ) ) throw domain_error( "Invalid Input." ); ss << input; ss >> buf; if( buf <= 0 ) throw domain_error( "Invalid Input." ); num = buf; ss.clear(); } }

    Read the article

  • Insert default value if input-text is deleted

    - by Kim Andersen
    Hi all I have the following piece of jQuery code: $(".SearchForm input:text").each(function(){ /* Sets the current value as the defaultvalue attribute */ if(allowedDefaults.indexOf($(this).val()) > 0 || $(this).val() == "") { $(this).attr("defaultvalue", $(this).val()); $(this).css("color","#9d9d9d"); /* Onfocus, if default value clear the field */ $(this).focus(function(){ if($(this).val() == $(this).attr("defaultvalue")) { $(this).val(""); $(this).css("color","#4c4c4c"); } }); /* Onblur, if empty, insert defaultvalue */ $(this).blur(function(){ alert("ud"); if($(this).val() == "") { $(this).val($(this).attr("defaultvalue")); $(this).css("color","#9d9d9d"); }else { $(this).removeClass("ignore"); } }); } }); I use this code to insert some default text into some of my input fields, when nothing else is typed in. This means that when a user sees my search-form, the defaultvalues will be set as an attribute on the input-field, and this will be the value that is shown. When a user clicks inside of the input field, the default value will be removed. When the user sees an input field at first is looks like this: <input type="text" value="" defaultvalue="From" /> This works just fine, but I have a big challenge. If a user have posted the form, and something is entered into one of the fields, then I can't show the default value in the field, if the user deletes the text from the input field. This is happening because the value of the text-field is still containing something, even when the user deletes the content. So my problem is how to show the default value when the form is submitted, and the user then removes the typed in content? When the form is submitted the input looks like this, and keeps looking like this until the form is submitted again: <input type="text" value="someValue" defaultvalue="From" /> So I need to show the default value in the input-field right after the user have deleted the content in the field, and removed the focus from the field. Does everyone understand what my problem is? Otherwise just ask, I have struggled with this one for quite some times now, so any help will be greatly appreciated. Thanks in advance, Kim Andersen

    Read the article

  • How do you keep all your languages straight?

    - by Chris Blackwell
    I think I'm going a little crazy. Right now, I'm working with the following languages (I was just doing a mental inventory): C++ - our game engine Assembler - low level debugging and a few co-processor specific routines Lua - our game engine scripting language HLSL - for shaders Python - our build system and utility tools Objective C/C++ - game engine platform code for Mac and iPhone C# - A few tools developed in our overseas office ExtendScript - Photoshop exporting tools ActionScript - UI scripting VBScript - some spreadsheet related stuff PHP - some web related stuff SQL - some web and tool related stuff On top of this are the plethora of API's that often have many different ways of doing the same thing: std library, boost, .NET, wxWidgets, Cocoa, Carbon, native script libraries for Python, Lua, etc, OpenGL, Direct3d, GDI, Aqua, augh! I find myself inadvertently conflating languages and api's, not realizing what I'm doing until I get syntax errors. I feel like I can't possibly keep up with it, and I can't possibly be proficient in all of these areas. Especially outside the realm of C++ and Python, I find myself programming more by looking at manuals that from memory. Do you have a similar problem? Ideas for compartmentalizing so you're more efficient? Deciding where you want to stay proficient? Organizational tips? Good ways to remember when you switch from Lua to C++ you need to start using semi-colons again? Rants on how complicated we programmers have made things for ourselves? Any ideas welcome!

    Read the article

  • Different programming languages possibilities

    - by b-gen-jack-o-neill
    Hello. This should be very simple question. There are many programming languages out there, compiled into machine code or managed code. I first started with ASM back in high school. Assembler is very nice, since you know what exactly CPU does. Next, (as you can see from my other questions here) I decided to learn C and C++. I choosed C becouse from what I read it is the language with output most close to assembler-written programs. But, what I want to know is, can any other Windows programming language out there call win32 API? To be exact, like C has its special header and functions for win32 api interactions, is this assumed to be some important part of programming language? Or are there any languages that have no support for calling win32 API, or just use console to IO and some functions for basic file IO? Becouse, for Windows programming with graphic output, it is essential to have acess to win32 API. I know this question might seem silly, but still please, help me, I ask for study porposes. Thanks.

    Read the article

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