Search Results

Search found 2777 results on 112 pages for 'weak typing'.

Page 5/112 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Can I simulate human typing on Windows?

    - by James Sulak
    I'm working on a talk that will involve typing code and running it in front of an audience. So I don't screw it up, I'd like to pre-record typing the more complicated bits of the source code and play it back. Most programs I've found that do similar things (like AutoHotKey) dump the text instantaneously as a giant block. Is there any program that will do this and allow me to adjust the play-back speed?

    Read the article

  • Type Casting variables in PHP: Is there a practical example?

    - by Stephen
    PHP, as most of us know, has weak typing. For those who don't, PHP.net says: PHP does not require (or support) explicit type definition in variable declaration; a variable's type is determined by the context in which the variable is used. Love it or hate it, PHP re-casts variables on-the-fly. So, the following code is valid: $var = "10"; $value = 10 + $var; var_dump($value); // int(20) PHP also alows you to explicitly cast a variable, like so: $var = "10"; $value = 10 + $var; $value = (string)$value; var_dump($value); // string(2) "20" That's all cool... but, for the life of me, I cannot conceive of a practical reason for doing this. I don't have a problem with strong typing in languages that support it, like Java. That's fine, and I completely understand it. Also, I'm aware of—and fully understand the usefulness of—type hinting in function parameters. The problem I have with type casting is explained by the above quote. If PHP can swap types at-will, it can do so even after you force cast a type; and it can do so on-the-fly when you need a certain type in an operation. That makes the following valid: $var = "10"; $value = (int)$var; $value = $value . ' TaDa!'; var_dump($value); // string(8) "10 TaDa!" So what's the point? Can anyone show me a practical application or example of type casting—one that would fail if type casting were not involved? I ask this here instead of SO because I figure practicality is too subjective. Edit in response to Chris' comment Take this theoretical example of a world where user-defined type casting makes sense in PHP: You force cast variable $foo as int -- (int)$foo. You attempt to store a string value in the variable $foo. PHP throws an exception!! <--- That would make sense. Suddenly the reason for user defined type casting exists! The fact that PHP will switch things around as needed makes the point of user defined type casting vague. For example, the following two code samples are equivalent: // example 1 $foo = 0; $foo = (string)$foo; $foo = '# of Reasons for the programmer to type cast $foo as a string: ' . $foo; // example 2 $foo = 0; $foo = (int)$foo; $foo = '# of Reasons for the programmer to type cast $foo as a string: ' . $foo; UPDATE Guess who found himself using typecasting in a practical environment? Yours Truly. The requirement was to display money values on a website for a restaurant menu. The design of the site required that trailing zeros be trimmed, so that the display looked something like the following: Menu Item 1 .............. $ 4 Menu Item 2 .............. $ 7.5 Menu Item 3 .............. $ 3 The best way I found to do that wast to cast the variable as a float: $price = '7.50'; // a string from the database layer. echo 'Menu Item 2 .............. $ ' . (float)$price; PHP trims the float's trailing zeros, and then recasts the float as a string for concatenation.

    Read the article

  • Getting my head around the practical applications of strong and weak pointers in Objective-C

    - by Chris Wilson
    I've just read the accepted excellent answer to this question that clarifies the conceptual differences between strong and weak pointers in Objective-C, and I'm still trying to understand the practical differences. I come from a C++ background where these concepts don't exist, and I'm having trouble figuring out where I would use one vs the other. Could someone please provide a practical example, using Objective-C code, that illustrates the different uses of strong and weak pointers?

    Read the article

  • Is two-finger non-homerow touch-typing for programming acceptable?

    - by codebliss
    I'm currently typing about 90 wpm (from http://speedtest.10-fast-fingers.com/ 90 correct 0 missed) using two fingers and the occasional ring or index. This probably grew from learning to type at an early age, before home-row was presented to me. Is this acceptable? Do people religiously endorse home-row even with low-mistake poking without looking at the keyboard?

    Read the article

  • Disabling weak ciphers on Windows 2003

    - by Kev
    For PCI-DSS compliance you have to disable weak ciphers. PCI-DSS permits a minimum cipher size of 128 bits. However for the highest score (0 I believe) you should only accept 168 bit ciphers but you can still be compliant if you permit 128 bit ciphers. The trouble is that when we disable all but 168 bit encryption it seems to disable both inbound and out bound secure channels. For example we'd like to lock down inbound IIS HTTPS to 168 bit ciphers but permit outbound 128 bit SSL connections to payment gateways/services from service applications running on the server (not all payment gateways support 168 bit only we just found out today). Is it possible to have cipher asymmetry on Windows 2003? I am told it is all or nothing.

    Read the article

  • Name typing in the "TO" line for last name recognition

    - by Buck
    I have outlook 2010 on a Windows 7 laptop. When I go to send an email at the "TO" line and I start typing the name, if I start to enter the last name it will not recognize anyone in my contacts and will not auto-populate a list of all the names that fit the description of what I have typed so far. But if I start typing the first name first it will start this auto-choice feature based on what I have typed so far. The company I work for has 20k + employees and If I want to email someone like "Michael Hutch " if I type "Michael" it still gives me like 800 names to chose from. My old laptop that had 2003 Outlook on it, had this functionality. Is there a way to enable this in Outlook 2010?

    Read the article

  • .NET --- Textbox control - wait till user is done typing

    - by Cj Anderson
    Greetings all, Is there a built in way to know when a user is done typing into a textbox? (Before hitting tab, Or moving the mouse) I have a database query that occurs on the textchanged event and everything works perfectly. However, I noticed that there is a bit of lag of course because if a user is quickly typing into the textbox the program is busy doing a query for each character. So what I was hoping for was a way to see if the user has finished typing. So if they type "a" and stop then an event fires. However, if they type "all the way" the event fires after the y keyup. I have some ideas floating around my head but I'm sure they aren't the most efficient. Like measuring the time since the last textchange event and if it was than a certain value then it would proceed to run the rest of my procedures. let me know what you think. Language: VB.NET Framework: .Net 2.0 --Edited to clarify "done typing"

    Read the article

  • Wireless signal changes from strong to weak after connecting

    - by gibberish
    Router (primary AP) is a WRVS4400N, WAP (signal booster) is a WAP4410N. Problem: User is physically located within ten feet of WAP (200 feet from main wireless router). Signal is at 5 bars as user connects to wireless network. Within seconds, signal is at or below two bars and connection is poor. Background: Trying to solve problem of weak wireless signal in back offices. Desired result is for client laptops to automatically switch to the stronger signal. WAP is connected to network via Ethernet cable. WAP is set to AP mode (instead of Wireless Repeater mode) WAP does appear to boost signal. Using Windows 7 sys tray Connect To A Network applet, can observe signal boost as laptop approaches the WAP. Above-described problem happens to users located near or beyond the WAP. It does not happen to users in close proximity to the router. Secondary Question: If using WAP in AP Mode, do WAP and Router (primary AP) need to be on the same channel?

    Read the article

  • (Weak) ETags and Last-Modified

    - by Kai Moritz
    As far as I understand the specs, the ETag, which was introduced in RFC 2616 (HTTP/1.1) is a predecessor of the Last-Modified-Header, which is proposet to give the software-architect more controll over the cache-revalidating process. If both Cache-Validation-Headers (If-None-Match and If-Modified-Since) are present, according to RFC 2616, the client (i.e. the browser) should use the ETag when checking, if a resource has changed. According to section 14.26 of RFC 2616, the server MUST NOT respond with a 304 Not Modified, if the ETag presented in a If-None-Match-Header has changed, and the server has to ignore an additional If-Modified-Since-Header, if present. If the presented ETag matches, he MUST NOT perform the request, unless the Date in the Last-Modified-Header says so. (If the presented ETag matches, the server should respond with a 304 Not Modified in case of a GET- or HEAD-request...) This section leaves room for some speculations: A strong ETag is supposed to change ''everytime'', the resource changes. So, having to responde with something else as 304 Not Modified to a request with an unchanged ETag and an If-Modified-Since-Header, which dose not match is a bit of a contradiction, because the strong ETag says, that the resource was not modified. (Though, this is not that fatal, because the server can send the same unchanged resource again.) ... ... o.k. While I was writing this, the question was boiling down to this answer: The (small) contradiction stated above, was made because of Weak ETags. A resource marked with a Weak ETag may have changed, although the ETag has not. So, in case of a Weak ETag it would be wrong, to answer with 304 Not Modified, when the ETag has not changed, but the date presented in the If-Modified-Since does not match, right?

    Read the article

  • Delay KeyUp Action if User is Typing (C#)

    - by Kirk
    I have a function that is being called when the user is typing in a search box. I want to wait for the user to finish typing before I actually execute the function. I know how to easily accomplish this in JavaScript with timeouts, but how would I go about doing the same thing in C#? Also, how long should I wait before I assume the user is done typing? 100ms?

    Read the article

  • Is type safety worth the trade-offs?

    - by Prof Plum
    I began coding in in Python primarily where there is no type safety, then moved to C# and Java where there is. I found that I could work a bit more quickly and with less headaches in Python, but then again, my C# and Java apps are at much higher level of complexity so I have never given Python a true stress test I suppose. The Java and C# camps make it sound like without the type safety in place, most people would be running into all sorts of horrible bugs left an right and it would be more trouble than its worth. This is not a language comparison, so please do not address issues like compiled vs interpreted. Is type safety worth the hit to speed of development and flexibilty? WHY? to the people who wanted an example of the opinion that dynamic typing is faster: "Use a dynamically typed language during development. It gives you faster feedback, turn-around time, and development speed." - http://blog.jayway.com/2010/04/14/static-typing-is-the-root-of-all-evil/

    Read the article

  • Coping with weak typing

    - by John Leonard
    I'm a front end Flex developer peeking over the wall at html. One of the things I have a hard time with is weak typing in Javascript. I know many developers say they prefer it. How do I stop worrying and learn to love the weak typing? Are there best practices for variable naming that help make var types human readable? Another thing I have trouble with is getting by without my trusted compiler errors and warnings. I'm getting along with firebug. Is there anything else I should have in my toolkit?

    Read the article

  • Proper usage of Java Weak Reference in case of nested collections

    - by Tong Wang
    I need to define a weak reference Map, whose value is a Set. I use Google collections' MapMaker, like this: Map<Class<? extends Object>, Set<Foo>> map = new MapMaker().weakKeys().weakValues().makeMap(); So, for Set<Foo>, can I use a normal HashSet? Or, do I have to create a weak HashSet, like this: Collections.newSetFromMap(new WeakHashMap<Foo, Boolean>()); And why? Another question, the key of my map is Class objects, when will a Class object become weakly reachable? In other words, what is the lifetime of a Class object? Thanks.

    Read the article

  • Purely functional equivalent of weakhashmap?

    - by Jon Harrop
    Weak hash tables like Java's weak hash map use weak references to track the collection of unreachable keys by the garbage collector and remove bindings with that key from the collection. Weak hash tables are typically used to implement indirections from one vertex or edge in a graph to another because they allow the garbage collector to collect unreachable portions of the graph. Is there a purely functional equivalent of this data structure? If not, how might one be created? This seems like an interesting challenge. The internal implementation cannot be pure because it must collect (i.e. mutate) the data structure in order to remove unreachable parts but I believe it could present a pure interface to the user, who could never observe the impurities because they only affect portions of the data structure that the user can, by definition, no longer reach.

    Read the article

  • Typing filename in standard open file dialog (Windows 7) - file name suggestion

    - by bybor
    When you use standard windows open file dialog and start typing it puts files whose name starts with what you type to drop down list. But on another pc with same Windows 7 it also puts first of them into input box in which you type - like FF does with URLS, allowing you to immediately press Enter (without pressing 'Down' to select file). I don't know why this behavior is different, but I want suggested file name shown in input box. How could it be achieved? Thanks.

    Read the article

  • Typing the tab character in browser text boxes

    - by Rohit
    A lot of the time, when I want to format text within a web page's text box I'll hit the Tab key. Unfortunately, that doesn't insert the tab character but instead moves the control to the next form element (like a button or a check box). For browsers like Firefox/IE, is there a way to get the formatting behavior of a tab, within a text box, by typing a key combination?

    Read the article

  • Typing in web forms lagging - output very slow!

    - by intransit
    Hi all, Just recently, typing in forms on the internet has become rediculously slow. I'm on an oldish PC with low memory (1gb) and amd athlon XP 2800+ (2.08 ghz) and get an awesome 1.0 rating from windows :) Thing is though - it only just started happening. Was fine last week. Also, It doesn't only happen when heaps of other processes are open/running. I can have only one IE window up, after fresh reboot, and still happens. Any ideas why?

    Read the article

  • application to make shell typing easier?

    - by ajsie
    i wonder if there is any application for the linux bash shell to make it more easier to type. eg. if i type "c" then maybe it would give me all commands that starts with that letter for example "cd", "cp" etc. then if i type "cd" and press space it give me all the parameters for that command. is there application of this kind to automatize command typing?

    Read the article

  • Can a loosely typed language be considered true object oriented?

    - by user61852
    Can a loosely typed programming language like PHP be really considered object oriented? I mean, the methods don't have returning types and method parameters has no declared type either. Doesn't class design require methods to have a return type? Don't methods signatures have specifically-typed parameters? How can OOP techniques help you code in PHP if you always have to check the types of parameters received because the language doesn't enforce types? Please, if I'm wrong, explain it to me. When you design things using UML, then code classes in PHP with no return-typed methods and no-type parameters... Is the code really compliant with the UML design? You spend time designing the architecture of your software, then the compiler doesn't force the programmer to follow your design while coding, letting he/she assign any object variable to any other variable with no "type-mismatch" warning.

    Read the article

  • Javascript regex only matching entire url as typing

    - by dt
    I'm trying to use javascript to find all URLs in a textarea as the person is typing (onkeyup). The problem that I'm having is in finding a regex to match the entire URL, I need it only to match all the URL's in the text area that are complete URLs. All of the existing regex expressions that I find through Google and through my own experiementing seem to match as soon as the user has typed the first part of the pattern. So, for example, if I'm typing and then start to type http://w, all of a sudden, it will match. I need to find a regex that will match and return an array of all the urls that are in the textarea, while also not matching unless the person has completed typing the full URL. Hopefully that makes sense! Thank you!

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >