Search Results

Search found 2521 results on 101 pages for 'typed constants'.

Page 26/101 | < Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >

  • TypeScript first impressions

    - by Bertrand Le Roy
    Anders published a video of his new project today, which aims at creating a superset of JavaScript, that compiles down to regular current JavaScript. Anders is a tremendously clever guy, and it always shows in his work. There is much to like in the enterprise (good code completion, refactoring and adoption of the module pattern instead of namespaces to name three), but a few things made me rise an eyebrow. First, there is no mention of CoffeeScript or Dart, but he does talk briefly about Script# and GWT. This is probably because the target audience seems to be the same as the audience for the latter two, i.e. developers who are more comfortable with statically-typed languages such as C# and Java than dynamic languages such as JavaScript. I don’t think he’s aiming at JavaScript developers. Classes and interfaces, although well executed, are not especially appealing. Second, as any code generation tool (and this is true of CoffeeScript as well), you’d better like the generated code. I didn’t, unfortunately. The code that I saw is not the code I would have written. What’s more, I didn’t always find the TypeScript code especially more expressive than what it gets compiled to. I also have a few questions. Is it possible to duck-type interfaces? For example, if I have an IPoint2D interface with x and y coordinates, can I pass any object that has x and y into a function that expects IPoint2D or do I need to necessarily create a class that implements that interface, and new up an instance that explicitly declares its contract? The appeal of dynamic languages is the ability to make objects as you go. This needs to be kept intact. More technical: why are generated variables and functions prefixed with _ rather than the $ that the EcmaScript spec recommends for machine-generated variables? In conclusion, while this is a good contribution to the set of ideas around JavaScript evolution, I don’t expect a lot of adoption outside of the devoted Microsoft developers, but maybe some influence on the language itself. But I’m often wrong. I would certainly not use it because I disagree with the central motivation for doing this: Anders explicitly says he built this because “writing application-scale JavaScript is hard”. I would restate that “writing application-scale JavaScript is hard for people who are used to statically-typed languages”. The community has built a set of good practices over the last few years that do scale quite well, and many people are successfully developing and maintaining impressive applications directly in JavaScript. You can play with TypeScript here: http://www.typescriptlang.org

    Read the article

  • Gujarat Fonts - Indic

    - by Navin Talati
    Sir, I need to install Gujarat Fonts - INDIC. From where shell I get the concerned font file to install? I had previously Win XP and the fonts were installed but the same is not applicable for the Ubuntu. In indic case there is a facility to type gujarati as per the pronounciation using english alphabets and also gives display at a corner for guidance that which character required to be typed. Please suggest how to avail the same facility in this Ubuntu.

    Read the article

  • 'sudo su -' vs 'sudo -i' vs 'sudo /bin/bash' - when does it matter which is used, or does it matter at all?

    - by Paul
    When I'm doing something that requires root be typed in dozens of times in a row, I prefer to switch my session to a root session. In the various tutorials and instructions I have used on the Internet, I see sudo su, sudo su -, sudo -i and sudo /bin/bash being used to open a root session, but I'm not clear on the difference between these and when or if that difference matters. Can someone clear this up for me?

    Read the article

  • Four New Videos on ASP.NET MVC 2

    Microsoft?s Jon Galloway has recorded 4 new ?quick hit? videos to help you get up to speed on new features in ASP.NET MVC 2. Learn about HTML Encoding, Strongly Typed Helpers, Model Validation, and Template Customization in these newest videos.

    Read the article

  • Four New Videos on ASP.NET MVC 2

    Microsoft’s Jon Galloway has recorded 4 new “quick hit” videos to help you get up to speed on new features in ASP.NET MVC 2. Learn about HTML Encoding, Strongly Typed Helpers, Model Validation, and Template Customization in these newest videos.

    Read the article

  • How do I get long command lines to wrap to the next line?

    - by BrianH
    Edit It was my .bashrc file. I've copied the same profile from machine to machine, and I used special characters in my $PS1 that are somehow throwing it off. I'm now sticking with the standard bash variables for my $PS1. Thanks to @ændrük for the tip on the .bashrc! ...End Edit... Something I have noticed in Ubuntu for a long time that has been frustrating to me is when I am typing a command at the command line that gets longer (wider) than the terminal width, instead of wrapping to a new line, it goes back to column 1 on the same line and starts over-writing the beginning of my command line. (It doesn't actually overwrite the actual command, but visually, it is overwriting the text that was displayed). It's hard to explain without seeing it, but let's say my terminal was 20 characters wide (Mine is more like 120 characters - but for the sake of an example), and I want to echo the English alphabet. What I type is this: echo abcdefghijklmnopqrstuvwxyz But what my terminal looks like before I hit the key is: pqrstuvwxyzghijklmno When I hit enter, it echos abcdefghijklmnopqrstuvwxyz so I know the command was received properly. It just wrapped my typing after the "o" and started over on the same line. What I would expect to happen, if I typed this command in on a terminal that was only 20 characters wide would be this: echo abcdefghijklmno pqrstuvwxyz Background: I am using bash as my shell, and I have this line in my ~/.bashrc: set -o vi to be able to navigate the command line with VI commands. I am currently using Ubuntu 10.10 server, and connecting to the server with Putty. In any other environment I have worked in, if I type a long command line, it will add a new line underneath the line I am working on when my command gets longer than the terminal width and when I keep typing I can see my command on 2 different lines. But for as long as I can remember using Ubuntu, my long commands only occupy 1 line. This also happens when I am going back to previous commands in the history (I hit Esc, then 'K' to go back to previous commands) - when I get to a previous command that was longer than the terminal width, the command line gets mangled and I cannot tell where I am at in the command. The only work-around I have found to see the entire long command is to hit "Esc-V", which opens up the current command in a VI editor. I don't think I have anything odd in my .bashrc file. I commented out the "set -o vi" line, and I still had the problem. I downloaded a fresh copy of Putty and didn't make any changes to the configuration - I just typed in my host name to connect, and I still have the problem, so I don't think it's anything with Putty (unless I need to make some config changes) Has anyone else had this problem, and can anyone think of how to fix it? Thanks in advance! Brian

    Read the article

  • How do I get long command lines to wrap to the next line?

    - by BrianH
    Edit It was my .bashrc file. I've copied the same profile from machine to machine, and I used special characters in my $PS1 that are somehow throwing it off. I'm now sticking with the standard bash variables for my $PS1. Thanks to @ændrük for the tip on the .bashrc! ...End Edit... Something I have noticed in Ubuntu for a long time that has been frustrating to me is when I am typing a command at the command line that gets longer (wider) than the terminal width, instead of wrapping to a new line, it goes back to column 1 on the same line and starts over-writing the beginning of my command line. (It doesn't actually overwrite the actual command, but visually, it is overwriting the text that was displayed). It's hard to explain without seeing it, but let's say my terminal was 20 characters wide (Mine is more like 120 characters - but for the sake of an example), and I want to echo the English alphabet. What I type is this: echo abcdefghijklmnopqrstuvwxyz But what my terminal looks like before I hit the key is: pqrstuvwxyzghijklmno When I hit enter, it echos abcdefghijklmnopqrstuvwxyz so I know the command was received properly. It just wrapped my typing after the "o" and started over on the same line. What I would expect to happen, if I typed this command in on a terminal that was only 20 characters wide would be this: echo abcdefghijklmno pqrstuvwxyz Background: I am using bash as my shell, and I have this line in my ~/.bashrc: set -o vi to be able to navigate the command line with VI commands. I am currently using Ubuntu 10.10 server, and connecting to the server with Putty. In any other environment I have worked in, if I type a long command line, it will add a new line underneath the line I am working on when my command gets longer than the terminal width and when I keep typing I can see my command on 2 different lines. But for as long as I can remember using Ubuntu, my long commands only occupy 1 line. This also happens when I am going back to previous commands in the history (I hit Esc, then 'K' to go back to previous commands) - when I get to a previous command that was longer than the terminal width, the command line gets mangled and I cannot tell where I am at in the command. The only work-around I have found to see the entire long command is to hit "Esc-V", which opens up the current command in a VI editor. I don't think I have anything odd in my .bashrc file. I commented out the "set -o vi" line, and I still had the problem. I downloaded a fresh copy of Putty and didn't make any changes to the configuration - I just typed in my host name to connect, and I still have the problem, so I don't think it's anything with Putty (unless I need to make some config changes) Has anyone else had this problem, and can anyone think of how to fix it? Thanks in advance! Brian

    Read the article

  • Jokes search engine / PHP based search engine on database

    - by matt74tm
    I'm looking for a script, functioning like the Google homepage that fetches data from a database rather than the internet. This is not intended to be a search engine, but a repository of jokes that can be pulled depending on the keywords typed. No sophisticated search techniques are required - keyword based is perfectly fine. If some mechanism of up/down-voting jokes can be incorporated, that would be fantastic, but I'm presuming that will be an entirely different game.

    Read the article

  • Unable to add PPA, Help needed?

    - by Tanmay
    When I typed this command in the terminal: sudo add-apt-repository ppa:noobslab/icons I got the following error. Please help. Traceback (most recent call last): File "/usr/bin/add-apt-repository", line 125, in <module> ppa_info = get_ppa_info_from_lp(user, ppa_name) File "/usr/lib/python2.7/dist-packages/softwareproperties/ppa.py", line 80, in get_ppa_info_from_lp curl.perform() pycurl.error: (7, "couldn't connect to host")

    Read the article

  • Jokes search engine / PHP based search engine on database

    - by matt_tm
    I'm looking for a script, functioning like the Google homepage that fetches data from a database rather than the internet. This is not intended to be a search engine, but a repository of jokes that can be pulled depending on the keywords typed. No sophisticated search techniques are required - keyword based is perfectly fine. If some mechanism of up/down-voting jokes can be incorporated, that would be fantastic, but I'm presuming that will be an entirely different game.

    Read the article

  • How I install drRacket?

    - by aseed
    i install drRacket in ubuntu. downloaded the source file from http://pre.racket-lang.org/installers/ and typed sudo ./racket-5.2.1-bin-i386-linux-ubuntu-karmic.sh after making it exe file so the file is in the usr/racket/bin/drracket and i want to run it from command line without going to its directory i cant make the drracket to run the .rkt files by the "open with" how can i make this two things ???

    Read the article

  • Ubuntu Server adding a new user

    - by Paul Edwards
    Hi i am new to Ubuntu server and i have been trying to add a new user. I typed in adduser then username and also tried useradd then username but it does seem to add a user but when i login i only get a dollar sign instead of user@servername. I have tried adding rules to allow me into the sudo for that username but i just can't work out why i only get the dollar sign. So would be really grateful if someone could help me with this Thanks....

    Read the article

  • Working with legacy data

    - by John Paul Cook
    We encounter legacy data as a part of life. Colleges and universities have transcript records dating back decades or even centuries. Real estate property records in the United States go as far back as Spanish and British land grants in the 1500s. Very old records are completely paper based and may be completely manually prepared, perhaps typed on a typewriter or written in longhand with a quill pen. How long should transcripts be retained? Nola Ochs graduated from college at age 95 (can you imagine...(read more)

    Read the article

  • Enhanced history searching in zsh

    <b>Tech Republic:</b> "If you spend any length of time in the shell, chances are you&#8217;ve typed the same commands over and over. It&#8217;s usually not anything you can necessarily script as the commands may vary slightly on each invocation, but there are certain commands that can be used often with a little variation on each call."

    Read the article

  • Windows7 Console with session memory [closed]

    - by Mateusz
    I am searching console for windows 7 which have memory of typed commands which is stored when I close the cmd prompt. I got frustrated when I have to type again paths with commands, I'm developing for android and I use adb so you can know it can be quite a lot of commands to issue. Other workarounds would be appreciated. Open source or freeware prefed. I have, Console2 (don't store commands), git bash (can't work with that, have some paths issues).

    Read the article

  • How to programatically read native DLL imports in C#?

    - by Eric
    The large hunk of C# code below is intended to print the imports of a native DLL. I copied it from from this link and modified it very slightly, just to use LoadLibraryEx as Mike Woodring does here. I find that when I call the Foo.Test method with the original example's target, MSCOREE.DLL, it prints all the imports fine. But when I use other dlls like GDI32.DLL or WSOCK32.DLL the imports do not get printed. What's missing from this code that would let it print all the imports as, for example, DUMPBIN.EXE does? (Is there a hint I'm not grokking in the original comment that says, "using mscoree.dll as an example as it doesnt export any thing"?) Here's the extract that just shows how it's being invoked: public static void Test() { // WORKS: var path = @"c:\windows\system32\mscoree.dll"; // NO ERRORS, BUT NO IMPORTS PRINTED EITHER: //var path = @"c:\windows\system32\gdi32.dll"; //var path = @"c:\windows\system32\wsock32.dll"; var hLib = LoadLibraryEx(path, 0, DONT_RESOLVE_DLL_REFERENCES | LOAD_IGNORE_CODE_AUTHZ_LEVEL); TestImports(hLib, true); } And here is the whole code example: namespace PETest2 { [StructLayout(LayoutKind.Explicit)] public unsafe struct IMAGE_IMPORT_BY_NAME { [FieldOffset(0)] public ushort Hint; [FieldOffset(2)] public fixed char Name[1]; } [StructLayout(LayoutKind.Explicit)] public struct IMAGE_IMPORT_DESCRIPTOR { #region union /// <summary> /// CSharp doesnt really support unions, but they can be emulated by a field offset 0 /// </summary> [FieldOffset(0)] public uint Characteristics; // 0 for terminating null import descriptor [FieldOffset(0)] public uint OriginalFirstThunk; // RVA to original unbound IAT (PIMAGE_THUNK_DATA) #endregion [FieldOffset(4)] public uint TimeDateStamp; [FieldOffset(8)] public uint ForwarderChain; [FieldOffset(12)] public uint Name; [FieldOffset(16)] public uint FirstThunk; } [StructLayout(LayoutKind.Explicit)] public struct THUNK_DATA { [FieldOffset(0)] public uint ForwarderString; // PBYTE [FieldOffset(4)] public uint Function; // PDWORD [FieldOffset(8)] public uint Ordinal; [FieldOffset(12)] public uint AddressOfData; // PIMAGE_IMPORT_BY_NAME } public unsafe class Interop { #region Public Constants public static readonly ushort IMAGE_DIRECTORY_ENTRY_IMPORT = 1; #endregion #region Private Constants #region CallingConvention CALLING_CONVENTION /// <summary> /// Specifies the calling convention. /// </summary> /// <remarks> /// Specifies <see cref="CallingConvention.Winapi" /> for Windows to /// indicate that the default should be used. /// </remarks> private const CallingConvention CALLING_CONVENTION = CallingConvention.Winapi; #endregion CallingConvention CALLING_CONVENTION #region IMPORT DLL FUNCTIONS private const string KERNEL_DLL = "kernel32"; private const string DBGHELP_DLL = "Dbghelp"; #endregion #endregion Private Constants [DllImport(KERNEL_DLL, CallingConvention = CALLING_CONVENTION, EntryPoint = "GetModuleHandleA"), SuppressUnmanagedCodeSecurity] public static extern void* GetModuleHandleA(/*IN*/ char* lpModuleName); [DllImport(KERNEL_DLL, CallingConvention = CALLING_CONVENTION, EntryPoint = "GetModuleHandleW"), SuppressUnmanagedCodeSecurity] public static extern void* GetModuleHandleW(/*IN*/ char* lpModuleName); [DllImport(KERNEL_DLL, CallingConvention = CALLING_CONVENTION, EntryPoint = "IsBadReadPtr"), SuppressUnmanagedCodeSecurity] public static extern bool IsBadReadPtr(void* lpBase, uint ucb); [DllImport(DBGHELP_DLL, CallingConvention = CALLING_CONVENTION, EntryPoint = "ImageDirectoryEntryToData"), SuppressUnmanagedCodeSecurity] public static extern void* ImageDirectoryEntryToData(void* Base, bool MappedAsImage, ushort DirectoryEntry, out uint Size); } static class Foo { // From winbase.h in the Win32 platform SDK. // const uint DONT_RESOLVE_DLL_REFERENCES = 0x00000001; const uint LOAD_IGNORE_CODE_AUTHZ_LEVEL = 0x00000010; [DllImport("kernel32.dll"), SuppressUnmanagedCodeSecurity] static extern uint LoadLibraryEx(string fileName, uint notUsedMustBeZero, uint flags); public static void Test() { //var path = @"c:\windows\system32\mscoree.dll"; //var path = @"c:\windows\system32\gdi32.dll"; var path = @"c:\windows\system32\wsock32.dll"; var hLib = LoadLibraryEx(path, 0, DONT_RESOLVE_DLL_REFERENCES | LOAD_IGNORE_CODE_AUTHZ_LEVEL); TestImports(hLib, true); } // using mscoree.dll as an example as it doesnt export any thing // so nothing shows up if you use your own module. // and the only none delayload in mscoree.dll is the Kernel32.dll private static void TestImports( uint hLib, bool mappedAsImage ) { unsafe { //fixed (char* pszModule = "mscoree.dll") { //void* hMod = Interop.GetModuleHandleW(pszModule); void* hMod = (void*)hLib; uint size = 0; uint BaseAddress = (uint)hMod; if (hMod != null) { Console.WriteLine("Got handle"); IMAGE_IMPORT_DESCRIPTOR* pIID = (IMAGE_IMPORT_DESCRIPTOR*)Interop.ImageDirectoryEntryToData((void*)hMod, mappedAsImage, Interop.IMAGE_DIRECTORY_ENTRY_IMPORT, out size); if (pIID != null) { Console.WriteLine("Got Image Import Descriptor"); while (!Interop.IsBadReadPtr((void*)pIID->OriginalFirstThunk, (uint)size)) { try { char* szName = (char*)(BaseAddress + pIID->Name); string name = Marshal.PtrToStringAnsi((IntPtr)szName); Console.WriteLine("pIID->Name = {0} BaseAddress - {1}", name, (uint)BaseAddress); THUNK_DATA* pThunkOrg = (THUNK_DATA*)(BaseAddress + pIID->OriginalFirstThunk); while (!Interop.IsBadReadPtr((void*)pThunkOrg->AddressOfData, 4U)) { char* szImportName; uint Ord; if ((pThunkOrg->Ordinal & 0x80000000) > 0) { Ord = pThunkOrg->Ordinal & 0xffff; Console.WriteLine("imports ({0}).Ordinal{1} - Address: {2}", name, Ord, pThunkOrg->Function); } else { IMAGE_IMPORT_BY_NAME* pIBN = (IMAGE_IMPORT_BY_NAME*)(BaseAddress + pThunkOrg->AddressOfData); if (!Interop.IsBadReadPtr((void*)pIBN, (uint)sizeof(IMAGE_IMPORT_BY_NAME))) { Ord = pIBN->Hint; szImportName = (char*)pIBN->Name; string sImportName = Marshal.PtrToStringAnsi((IntPtr)szImportName); // yes i know i am a lazy ass Console.WriteLine("imports ({0}).{1}@{2} - Address: {3}", name, sImportName, Ord, pThunkOrg->Function); } else { Console.WriteLine("Bad ReadPtr Detected or EOF on Imports"); break; } } pThunkOrg++; } } catch (AccessViolationException e) { Console.WriteLine("An Access violation occured\n" + "this seems to suggest the end of the imports section\n"); Console.WriteLine(e); } pIID++; } } } } } Console.WriteLine("Press Any Key To Continue......"); Console.ReadKey(); } }

    Read the article

  • Ranking on the First Page in Search Engines

    How important is it to rank on the first page of the search result pages displayed by search engines when keywords are typed in and the enter key is pressed? This is a question that every website administrator must have asked himself at least a zillion times during the course of optimizing his website and continues to ask himself even though his website has been fully optimized and it has achieved a ranking on the search engines.

    Read the article

  • Any command line calculator for Ubuntu?

    - by AgentCool
    I am looking for a Calculator which can do calculations in the terminal itself without any other extra prefixes and suffixes. For example: If I typed something like 10000-9000 in the terminal, the answer should come out as 1000. Once again I am saying, I just need a quick calculator in terminal, without any characters added. I know if I switch to Python, it can do that but I don't want it in such a way.

    Read the article

  • C# 4.0 New Features

    New features on c# 4.0 1. Dynamic Typed Objects 2. Optional and Named Parameters 3. Improved COM Interoperability 4. Co- and Contra-Variance

    Read the article

  • Easy way to identify pages which are index, but not linked to on my site

    - by Stephen Connolly
    I'm just wondering if there is an easy way to find out what pages Google has indexed, that are not directly linked on my site, for example: www.mysite.com/skype.html originally had a link in my site menu, but this link was removed. The page is still available when the url is typed directly, but there is no direct link to it. I don't want Google indexing this page any more and want to put a 'disallow' in my robots.txt.

    Read the article

  • No firmware found for b43 wireless controlloer (BCM4318) on a Dell Latitude D610

    - by Stanton.Sculpture
    Trying to get my 03:03.0 Network controller: Broadcom Corporation BCM4318 [AirForce One 54g] 802.11g Wireless LAN Controller (rev 02) working. I just reformated and installed 12.04 on this old Windows XP machine, and I don't know where to get the firmware for this. This is what I got when I typed sudo lshw -c network: http://pastebin.ubuntu.com/1041161/ Also, when I go to additional drivers in the system settings, no proprietary drivers show up. Any help I can get on this would be Great, Thanks!

    Read the article

  • Can't get Rewrite rule to keep original URL

    - by user38100
    I have these Rewrites, but I would like to have the URL stay the same as what is typed originally, I thought removing the [R] flags would stop it but it hasn't RewriteCond %{HTTP_HOST} ^examplea\.example\.com$ [NC] RewriteRule (.*) http://examplea.example.com:32400/web [L] RewriteCond %{HTTP_HOST} ^exampleb\.example\.com$ [NC] RewriteRule (.*) http://exampleb.example.com:9091 [L] Edit: would this work better? RewriteCond %{HTTP_HOST} ^hello.example.com$ RewriteRule ^(/)?$ welcome [L]

    Read the article

  • Blank desktop after updates today, only unity2d works now [closed]

    - by NewUbuntuUser
    Possible Duplicate: Unity doesn't load, no Launcher, no Dash appears I have been using 12.04 (wubi) since a week now and this is my 1st exposure to linux. Everything was going on fine till now , but today as soon as I updated through the update manager , docky gave a message that compositing is required or something, and i got an error window which asked me to report the error and then the update manager asked me to reboot. After rebooting , i just get a blank desktop screen , no launcher, no toolbar. I have to restart with the power key. However if i login through Unity 2d everything is fine except the benefits of the 3d environment. I guess something got messed up after the update and i cant figure out which program or file caused this mess. I would highly appreciate if someone could help me out with this as I really liked working on ubuntu after windows 7. Thanks! SOLVED-- Thanks @jrg for the link provided.. it helped me to come out of this mess. Actually some update of compizconfig made the unity plugin inactive did something to the Animation add ons , the one which you use for the burn effect etc. What i did was : On the blank desktop Pressed keys Ctrl + Alt + T to bring up the terminal and typed ccsm This brought up the compiz config system manager, there i enabled the unity plugin and rebooted. Everything started working fine. But then again when i started the addons plugin ,everything went back to square one.. :( . This time pressing Ctrl + Alt + T also did not help. Then i tried Ctrl + Alt + F1 , it brought up a terminal or whatever u call it, and then i typed unity --reset , it did some resetting and in the end it showed some comositing done , I pressed Ctrl + Alt + F7 to come back to the desktop , and here it was , my old sweet desktop.. it had the animation effects too like wobbly windows, excepting the addons like the burn effect, i guess something got wrong with the last update of that addon plugin and now whenever i try turning that on , everything goes poof!! 6 hours wasted , but i guess i learnt something new.. not bad for an orthodontist i guess :))

    Read the article

  • Terminal command autocomplete

    - by Edhoari
    I'm currently trying to switch from OpenSUSE to Ubuntu as my main OS. While most of opensuse features is there in ubuntu, there is one feature that doesn't. In Opensuse, I can always use Ctrl+Up to autocomplete the command line using previously typed command. That feature is very useful for me as it allows me to work faster without having to retype long command. Can anyone provide a way to enable this on Ubuntu? Thank you

    Read the article

  • How can I clear history and settings for the Remote Desktop Viewer (Vinagre)?

    - by user68370
    How do I clear all the settings for Vinagre to take it back to a brand-new, virgin state? I accidentally typed a connection in wrong and I cannot figure out how to delete it. Also some of my connections are not working correctly and I think that if I could flush the whole thing clean it might fix those issues. I have tried uninstalling and reinstalling, but it remembers the previous settings/connections.

    Read the article

< Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >