Search Results

Search found 55 results on 3 pages for 'mcp'.

Page 1/3 | 1 2 3  | Next Page >

  • "mcp power or thermal limit exceeded" excessive in messages.log

    - by Stefan Thyberg
    I keep getting "mcp power or thermal limit exceeded" every five seconds while my computer is on, regardless of what it's doing. I googled it and found some Intel patches but I don't really know exactly what they do or how to apply them and I also don't want to patch my kernel with these random bits of code from some newsgroup. Can anyone shed some light on what exactly is going on and what the right fix is in this case? Am I better off just waiting for a kernel patch?

    Read the article

  • MCP 1.7.10 Java class navigation

    - by Elias Benevedes
    So, I'm new to the Minecraft modding community and trying to understand where to start. I've attempted to do it before, but dropped it to the complexity of starting and the lack of a site like this to help (Mind that I'm also semi-new to Java, but have worked extensively in Javascript and Python. I understand how Java is different from the two). I have downloaded MCP 9.08 (Decompiles 1.7.10), and decompiled Minecraft. I'm looking to mod client, so I didn't supply it with a server jar. Everything seemed to work fine in decompile (Only error was it couldn't find the server jar). I can find my files in /mcp908/src/minecraft/net/minecraft. However, if I open up one of the classes in, say, block, I see a bunch of variables starting with p_ and ending with _. Is there any way to make these variables more decipherable, to understand what's going on so I can learn by example? Thank you.

    Read the article

  • MCP 70-536 Acquired

    - by dave
    Yeah...   Today I passed the 70-536 exam, so my way to 70-562 (ASP.NET 3.5) is open. Points: 815 Points needed for pass:700 Strarting to read new book :)

    Read the article

  • Is it usual if my employer asks me to get MCP certificates for higher salary?

    - by Vimvq1987
    I just got a salary negotiation this morning (I passed three interviews last 3 weeks), and it was like a game. I was stubborn with my expectation, or that number, or I leave. OK, to be honest, it's not about money, but I, a not-very-experienced developer, want to see how much the employer pays me, and it was fun. And at last, my employer gave me this: "OK, * $, but with two conditions, first, you get your spoken skill improved (English is not my native), and second, you got MCPs before the end of the year". He asked me to get 3 MCP certificates. The company will buy any books that necessary to the exam, but I must read them at free time, take and pass the exams . If I not get them, my employer will not kick me out, but, salary discussion will be harder, for me. I accepted that offer, I thought it's good enough. But I wonder, is it usual? If you're an employer, have you ever given that offer to a candidate? If you're an employee, have you ever got, or will you accept an offer like that?

    Read the article

  • Why does apt-get install Skype easily while aptitude complains about MAJOR dependency errors?

    - by Prateek
    I was trying to install Skype on Ubuntu 13.04, from the Canonical repositories. With apt-get it worked easily, while aptitude had a huge problem with dependencies and proposed a complicated solution. Why is this so? Why doesn't aptitude offer whatever apt-get does as a potential solution? Here is the output of both: apt-get install skype: Reading package lists... Building dependency tree... Reading state information... The following extra packages will be installed: gcc-4.7-base:i386 libasound2 libasound2:i386 libasound2-plugins:i386 libasyncns0:i386 libaudio2:i386 libavahi-client3:i386 libavahi-common-data:i386 libavahi-common3:i386 libc6:i386 libcomerr2:i386 libcups2:i386 libdbus-1-3 libdbus-1-3:i386 libdbusmenu-qt2:i386 libdrm-intel1 libdrm-intel1:i386 libdrm-nouveau2 libdrm-nouveau2:i386 libdrm-radeon1 libdrm-radeon1:i386 libdrm2 libdrm2:i386 libexpat1:i386 libffi6:i386 libflac8:i386 libfontconfig1:i386 libfreetype6:i386 libgcc1:i386 libgcrypt11 libgcrypt11:i386 libgl1-mesa-dri libgl1-mesa-dri:i386 libgl1-mesa-glx:i386 libglapi-mesa:i386 libglib2.0-0:i386 libgnutls26 libgnutls26:i386 libgpg-error0:i386 libgssapi-krb5-2:i386 libgstreamer-plugins-base0.10-0:i386 libgstreamer0.10-0:i386 libice6:i386 libjack-jackd2-0:i386 libjbig0:i386 libjpeg-turbo8:i386 libjpeg8:i386 libjson0:i386 libk5crypto3:i386 libkeyutils1:i386 libkrb5-3:i386 libkrb5support0:i386 liblcms1:i386 libllvm3.2:i386 liblzma5:i386 libmng1:i386 libmysqlclient18:i386 libogg0:i386 liborc-0.4-0:i386 libp11-kit0:i386 libpciaccess0:i386 libpcre3:i386 libpng12-0:i386 libpulse0:i386 libqt4-dbus libqt4-dbus:i386 libqt4-declarative libqt4-declarative:i386 libqt4-designer libqt4-help libqt4-network libqt4-network:i386 libqt4-opengl libqt4-opengl:i386 libqt4-script libqt4-script:i386 libqt4-scripttools libqt4-sql libqt4-sql:i386 libqt4-sql-mysql:i386 libqt4-sql-sqlite libqt4-svg libqt4-test libqt4-xml libqt4-xml:i386 libqt4-xmlpatterns libqt4-xmlpatterns:i386 libqtcore4 libqtcore4:i386 libqtgui4 libqtgui4:i386 libqtwebkit4:i386 libsamplerate0:i386 libselinux1:i386 libsm6:i386 libsndfile1:i386 libspeexdsp1:i386 libsqlite3-0:i386 libssl1.0.0 libssl1.0.0:i386 libstdc++6:i386 libtasn1-3:i386 libtiff5 libtiff5:i386 libtxc-dxtn-s2tc0:i386 libuuid1:i386 libvorbis0a:i386 libvorbisenc2:i386 libwrap0:i386 libx11-6 libx11-6:i386 libx11-xcb1 libx11-xcb1:i386 libxau6:i386 libxcb-dri2-0 libxcb-dri2-0:i386 libxcb-glx0 libxcb-glx0:i386 libxcb1 libxcb1:i386 libxdamage1:i386 libxdmcp6:i386 libxext6 libxext6:i386 libxfixes3 libxfixes3:i386 libxi6 libxi6:i386 libxml2 libxml2:i386 libxrender1 libxrender1:i386 libxslt1.1:i386 libxss1:i386 libxt6 libxt6:i386 libxv1 libxv1:i386 libxxf86vm1 libxxf86vm1:i386 mysql-common qdbus skype-bin:i386 sni-qt:i386 zlib1g:i386 Suggested packages: nas:i386 glibc-doc:i386 locales:i386 rng-tools rng-tools:i386 libglide3 libglide3:i386 gnutls-bin gnutls-bin:i386 krb5-doc:i386 krb5-user:i386 libvisual-0.4-plugins:i386 gstreamer-codec-install:i386 gnome-codec-install:i386 gstreamer0.10-tools:i386 gstreamer0.10-plugins-base:i386 jackd2:i386 liblcms-utils:i386 pulseaudio:i386 libqt4-declarative-folderlistmodel libqt4-declarative-gestures libqt4-declarative-particles libqt4-declarative-shaders qt4-qmlviewer libqt4-declarative-folderlistmodel:i386 libqt4-declarative-gestures:i386 libqt4-declarative-particles:i386 libqt4-declarative-shaders:i386 qt4-qmlviewer:i386 libqt4-dev libqt4-dev:i386 libthai0:i386 libicu48:i386 qt4-qtconfig qt4-qtconfig:i386 Recommended packages: libtxc-dxtn0:i386 xml-core:i386 The following NEW packages will be installed gcc-4.7-base:i386 libasound2:i386 libasound2-plugins:i386 libasyncns0:i386 libaudio2:i386 libavahi-client3:i386 libavahi-common-data:i386 libavahi-common3:i386 libc6:i386 libcomerr2:i386 libcups2:i386 libdbus-1-3:i386 libdbusmenu-qt2:i386 libdrm-intel1:i386 libdrm-nouveau2:i386 libdrm-radeon1:i386 libdrm2:i386 libexpat1:i386 libffi6:i386 libflac8:i386 libfontconfig1:i386 libfreetype6:i386 libgcc1:i386 libgcrypt11:i386 libgl1-mesa-dri:i386 libgl1-mesa-glx:i386 libglapi-mesa:i386 libglib2.0-0:i386 libgnutls26:i386 libgpg-error0:i386 libgssapi-krb5-2:i386 libgstreamer-plugins-base0.10-0:i386 libgstreamer0.10-0:i386 libice6:i386 libjack-jackd2-0:i386 libjbig0:i386 libjpeg-turbo8:i386 libjpeg8:i386 libjson0:i386 libk5crypto3:i386 libkeyutils1:i386 libkrb5-3:i386 libkrb5support0:i386 liblcms1:i386 libllvm3.2:i386 liblzma5:i386 libmng1:i386 libmysqlclient18:i386 libogg0:i386 liborc-0.4-0:i386 libp11-kit0:i386 libpciaccess0:i386 libpcre3:i386 libpng12-0:i386 libpulse0:i386 libqt4-dbus:i386 libqt4-declarative:i386 libqt4-network:i386 libqt4-opengl:i386 libqt4-script:i386 libqt4-sql:i386 libqt4-sql-mysql:i386 libqt4-xml:i386 libqt4-xmlpatterns:i386 libqtcore4:i386 libqtgui4:i386 libqtwebkit4:i386 libsamplerate0:i386 libselinux1:i386 libsm6:i386 libsndfile1:i386 libspeexdsp1:i386 libsqlite3-0:i386 libssl1.0.0:i386 libstdc++6:i386 libtasn1-3:i386 libtiff5:i386 libtxc-dxtn-s2tc0:i386 libuuid1:i386 libvorbis0a:i386 libvorbisenc2:i386 libwrap0:i386 libx11-6:i386 libx11-xcb1:i386 libxau6:i386 libxcb-dri2-0:i386 libxcb-glx0:i386 libxcb1:i386 libxdamage1:i386 libxdmcp6:i386 libxext6:i386 libxfixes3:i386 libxi6:i386 libxml2:i386 libxrender1:i386 libxslt1.1:i386 libxss1:i386 libxt6:i386 libxv1:i386 libxxf86vm1:i386 mysql-common skype skype-bin:i386 sni-qt:i386 zlib1g:i386 The following packages will be upgraded: libasound2 libdbus-1-3 libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libdrm2 libgcrypt11 libgl1-mesa-dri libgnutls26 libqt4-dbus libqt4-declarative libqt4-designer libqt4-help libqt4-network libqt4-opengl libqt4-script libqt4-scripttools libqt4-sql libqt4-sql-sqlite libqt4-svg libqt4-test libqt4-xml libqt4-xmlpatterns libqtcore4 libqtgui4 libssl1.0.0 libtiff5 libx11-6 libx11-xcb1 libxcb-dri2-0 libxcb-glx0 libxcb1 libxext6 libxfixes3 libxi6 libxml2 libxrender1 libxt6 libxv1 libxxf86vm1 qdbus 41 upgraded, 105 newly installed, 0 to remove and 138 not upgraded. Need to get 85.9 MB/89.2 MB of archives. After this operation, 204 MB of additional disk space will be used. Do you want to continue [Y/n]? aptitude install skype: Reading package lists... Building dependency tree... Reading state information... Reading extended state information... Initialising package states... The following NEW packages will be installed: gcc-4.7-base:i386{a} libasound2:i386{a} libasound2-plugins:i386{a} libasyncns0:i386{a} libaudio2:i386{a} libavahi-client3:i386{a} libavahi-common-data:i386{a} libavahi-common3:i386{a} libc6:i386{a} libcomerr2:i386{a} libcups2:i386{a} libdbus-1-3:i386{a} libdbusmenu-qt2:i386{a} libdrm-intel1:i386{a} libdrm-nouveau2:i386{a} libdrm-radeon1:i386{a} libdrm2:i386{a} libexpat1:i386{a} libffi6:i386{a} libflac8:i386{a} libfontconfig1:i386{a} libfreetype6:i386{a} libgcc1:i386{a} libgcrypt11:i386{a} libgl1-mesa-dri:i386{a} libgl1-mesa-glx:i386{a} libglapi-mesa:i386{a} libglib2.0-0:i386{a} libgnutls26:i386{a} libgpg-error0:i386{a} libgssapi-krb5-2:i386{a} libgstreamer-plugins-base0.10-0:i386{a} libgstreamer0.10-0:i386{a} libice6:i386{a} libjack-jackd2-0:i386{a} libjbig0:i386{a} libjpeg-turbo8:i386{a} libjpeg8:i386{a} libjson0:i386{a} libk5crypto3:i386{a} libkeyutils1:i386{a} libkrb5-3:i386{a} libkrb5support0:i386{a} liblcms1:i386{a} libllvm3.2:i386{a} liblzma5:i386{a} libmng1:i386{a} libmysqlclient18:i386{a} libogg0:i386{a} liborc-0.4-0:i386{a} libp11-kit0:i386{a} libpciaccess0:i386{a} libpcre3:i386{a} libpng12-0:i386{a} libpulse0:i386{a} libqt4-dbus:i386{a} libqt4-declarative:i386{a} libqt4-network:i386{a} libqt4-opengl:i386{a} libqt4-script:i386{a} libqt4-sql:i386{a} libqt4-sql-mysql:i386{a} libqt4-xml:i386{a} libqt4-xmlpatterns:i386{a} libqtcore4:i386{a} libqtgui4:i386{a} libqtwebkit4:i386{a} libsamplerate0:i386{a} libselinux1:i386{a} libsm6:i386{a} libsndfile1:i386{a} libspeexdsp1:i386{a} libsqlite3-0:i386{a} libssl1.0.0:i386{a} libstdc++6:i386{a} libtasn1-3:i386{a} libtiff5:i386{a} libtxc-dxtn-s2tc0:i386{a} libuuid1:i386{a} libvorbis0a:i386{a} libvorbisenc2:i386{a} libwrap0:i386{a} libx11-6:i386{a} libx11-xcb1:i386{a} libxau6:i386{a} libxcb-dri2-0:i386{a} libxcb-glx0:i386{a} libxcb1:i386{a} libxdamage1:i386{a} libxdmcp6:i386{a} libxext6:i386{a} libxfixes3:i386{a} libxi6:i386{a} libxml2:i386{a} libxrender1:i386{a} libxslt1.1:i386{a} libxss1:i386{a} libxt6:i386{a} libxv1:i386{a} libxxf86vm1:i386{a} mysql-common{a} skype skype-bin:i386{a} sni-qt:i386{a} zlib1g:i386{a} The following packages will be upgraded: libasound2 libdbus-1-3 libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libdrm2 libgcrypt11 libgl1-mesa-dri libgnutls26 libqt4-dbus libqt4-declarative libqt4-network libqt4-opengl libqt4-script libqt4-sql libqt4-xml libqt4-xmlpatterns libqtcore4 libqtgui4 libssl1.0.0 libtiff5 libx11-6 libx11-xcb1 libxcb-dri2-0 libxcb-glx0 libxcb1 libxext6 libxfixes3 libxi6 libxml2 libxrender1 libxt6 libxv1 libxxf86vm1 qdbus 35 packages upgraded, 105 newly installed, 0 to remove and 144 not upgraded. Need to get 81.7 MB/85.0 MB of archives. After unpacking 204 MB will be used. The following packages have unmet dependencies: libqt4-test : Depends: libqtcore4 (= 4:4.8.4+dfsg-0ubuntu9) but 4:4.8.4+dfsg-0ubuntu9.2 is to be installed. libqt4-designer : Depends: libqt4-script (= 4:4.8.4+dfsg-0ubuntu9) but 4:4.8.4+dfsg-0ubuntu9.2 is to be installed. Depends: libqt4-xml (= 4:4.8.4+dfsg-0ubuntu9) but 4:4.8.4+dfsg-0ubuntu9.2 is to be installed. Depends: libqtcore4 (= 4:4.8.4+dfsg-0ubuntu9) but 4:4.8.4+dfsg-0ubuntu9.2 is to be installed. Depends: libqtgui4 (= 4:4.8.4+dfsg-0ubuntu9) but 4:4.8.4+dfsg-0ubuntu9.2 is to be installed. libqt4-sql-sqlite : Depends: libqt4-sql (= 4:4.8.4+dfsg-0ubuntu9) but 4:4.8.4+dfsg-0ubuntu9.2 is to be installed. Depends: libqtcore4 (= 4:4.8.4+dfsg-0ubuntu9) but 4:4.8.4+dfsg-0ubuntu9.2 is to be installed. libqt4-help : Depends: libqt4-network (= 4:4.8.4+dfsg-0ubuntu9) but 4:4.8.4+dfsg-0ubuntu9.2 is to be installed. Depends: libqt4-sql (= 4:4.8.4+dfsg-0ubuntu9) but 4:4.8.4+dfsg-0ubuntu9.2 is to be installed. Depends: libqtcore4 (= 4:4.8.4+dfsg-0ubuntu9) but 4:4.8.4+dfsg-0ubuntu9.2 is to be installed. Depends: libqtgui4 (= 4:4.8.4+dfsg-0ubuntu9) but 4:4.8.4+dfsg-0ubuntu9.2 is to be installed. libqt4-svg : Depends: libqtcore4 (= 4:4.8.4+dfsg-0ubuntu9) but 4:4.8.4+dfsg-0ubuntu9.2 is to be installed. Depends: libqtgui4 (= 4:4.8.4+dfsg-0ubuntu9) but 4:4.8.4+dfsg-0ubuntu9.2 is to be installed. libqt4-scripttools : Depends: libqt4-script (= 4:4.8.4+dfsg-0ubuntu9) but 4:4.8.4+dfsg-0ubuntu9.2 is to be installed. Depends: libqtcore4 (= 4:4.8.4+dfsg-0ubuntu9) but 4:4.8.4+dfsg-0ubuntu9.2 is to be installed. Depends: libqtgui4 (= 4:4.8.4+dfsg-0ubuntu9) but 4:4.8.4+dfsg-0ubuntu9.2 is to be installed. The following actions will resolve these dependencies: Remove the following packages: 1) account-plugin-aim 2) account-plugin-facebook 3) account-plugin-flickr 4) account-plugin-generic-oauth 5) account-plugin-google 6) account-plugin-jabber 7) account-plugin-salut 8) account-plugin-twitter 9) account-plugin-windows-live 10) account-plugin-yahoo 11) empathy 12) friends 13) friends-dispatcher 14) friends-facebook 15) friends-twitter 16) gir1.2-signon-1.0 17) gnome-control-center-signon 18) libaccount-plugin-1.0-0 19) libfriends0 20) libqt4-designer 21) libqt4-help 22) libqt4-scripttools 23) libqt4-sql-sqlite 24) libqt4-svg 25) libqt4-test 26) libsignon-glib1 27) mcp-account-manager-uoa 28) nautilus-sendto-empathy 29) python-qt4 30) shotwell 31) signon-plugin-oauth2 32) signon-plugin-password 33) signon-ui 34) signond 35) ubuntu-sso-client-qt 36) ubuntuone-control-panel-qt 37) unity-lens-friends 38) unity-lens-photos 39) unity-scope-gdrive 40) webaccounts-extension-common 41) xul-ext-webaccounts Leave the following dependencies unresolved: 42) mcp-account-manager-uoa recommends gnome-control-center-signon 43) mcp-account-manager-uoa recommends account-plugin-aim 44) mcp-account-manager-uoa recommends account-plugin-jabber 45) mcp-account-manager-uoa recommends account-plugin-google 46) mcp-account-manager-uoa recommends account-plugin-facebook 47) mcp-account-manager-uoa recommends account-plugin-windows-live 48) mcp-account-manager-uoa recommends account-plugin-yahoo 49) mcp-account-manager-uoa recommends account-plugin-salut 50) ubuntu-desktop recommends empathy 51) ubuntu-desktop recommends libqt4-sql-sqlite 52) ubuntu-desktop recommends shotwell 53) ubuntu-desktop recommends ubuntuone-control-panel-qt 54) ubuntu-desktop recommends xul-ext-webaccounts 55) unity recommends unity-lens-photos 56) unity recommends unity-lens-friends 57) unity-lens-files recommends unity-scope-gdrive 58) libqt4-sql recommends libqt4-sql-mysql | libqt4-sql-odbc | libqt4-sql-ps Accept this solution? [Y/n/q/?] And in case this helps, aptitude show skype: Package: skype State: not installed Version: 4.2.0.11-0ubuntu0.12.04.2 Priority: extra Section: net Maintainer: Steve Langasek <[email protected]> Architecture: amd64 Uncompressed Size: 62.5 k Depends: skype-bin Conflicts: skype Description: client for Skype VOIP and instant messaging service Skype is software that enables the world's conversations. Millions of individuals and businesses use Skype to make free video and voice calls, send instant messages and share files with other Skype users. Every day, people also use Skype to make low-cost calls to landlines and mobiles. * Make free Skype-to-Skype calls to anyone else, anywhere in the world. * Call to landlines and mobiles at great rates. * Group chat with up to 200 people or conference call with up to 25 others. * Free to download.

    Read the article

  • Sublime Text 2 'text bubbling'?

    - by Alex Mcp
    In vim and Notepad++ I have an awesome feature either mapped or built in that I've seen called text bubbling. I know about the Sublime documentation for mapping my own, but wanted to make sure I wasn't duplicating functionality: Basically when I have either block of text selected, or just a cursor on a line, I push (ctrl + up/down) or some other mapping, and the text is moved up or down, in a block, and the rest of the text 'flows' around it. Is this a native feature in Sublime Text or should I script it in?

    Read the article

  • How do I profile the startup process in OS X 10.5?

    - by Alex Mcp
    When I bought my MBP 2.2 GHZ in 2007, it got from dead to an active dock in about 18 seconds, and now it takes about 1:30 to get a fully responsive home screen. I want to find a way to profile the various things it does when it starts up so I can begin tuning it a bit. Any good software or other recommendations for this process?

    Read the article

  • Passiionate about Microsoft Technology - Help raise money for Cystic Fibrosis Foundation

    - by Testas
    I need your help! Please sign up to help our team raise $10,000 for Cystic Fibrosis Foundation. Simply by becoming a team member (a bit like a fan) and you will be helping our team earn points and advance in the race to rasie the money for charity.   If you can tick any of the boxes below then we need your help: Already Microsoft Certified? Hold a MCP/MCSA/MCSE/MCT/TS/MCITP? Want to help sufferers from the most common genetically inherited disease? Passionate about Microsoft Technology? Like to Blog, Tweet, email, connect! Enjoy the thrill of the race! Follow the Born To Learn Blog? Join our blue team and help us become the leader of the race.so please sign in with your Live ID which is associated with your MCP account and register with us - also take a look at the blue forums - we are building up some cool info! http://bit.ly/blueteam  or  http://borntolearn.mslearn.net/prix/p/index.aspx Please blog and let people know about this! Regards Chris

    Read the article

  • How important is managing memory in Objective-C?

    - by Alex Mcp
    Background: I'm (jumping on the bandwagon and) starting learning about iPhone/iPad development and Objective-C. I have a great background in web development and most of my programming is done in javascript (no libraries), Ruby, and PHP. Question: I'm learning about allocating and releasing memory in Objective-C, and I see it as quite a tricky task to layer on top of actually getting the farking thing to run. I'm trying to get a sense of applications that are out there and what will happen with a poorly memory-managed program. A) Are apps usually released with no memory leaks? Is this a feasible goal, or do people more realistically just excise the worst offenders and that's ok? B) If I make an NSString for a title of a view, let's say, and forget to deallocate it it, does this really only become a problem if I recreate that string repeatedly? I imagine what I'm doing is creating an overhead of the memory needed to store that string, so it's probably quite piddling (a few bytes?) However if I have a rapidly looping cycle in a game that 'leaks' an int every cycle or something, that would overflow the app quite quickly. Are these assumptions correct? Sorry if this isn't up the community-wiki alley, I'm just trying to get a handle on how to think about memory and how careful I'll need to be. Any anecdotes or App Store-submitted app experiences would be awesome to hear as well.

    Read the article

  • Is currying just a way to avoid inheritance?

    - by Alex Mcp
    So my understanding of currying (based on SO questions) is that it lets you partially set parameters of a function and return a "truncated" function as a result. If you have a big hairy function takes 10 parameters and looks like function (location, type, gender, jumpShot%, SSN, vegetarian, salary) { //weird stuff } and you want a "subset" function that will let you deal with presets for all but the jumpShot%, shouldn't you just break out a class that inherits from the original function? I suppose what I'm looking for is a use case for this pattern. Thanks!

    Read the article

  • Dashcode code translation

    - by Alex Mcp
    Hi, a quick, probably easy question whose answer is probably "best practice" I'm following a tutorial for a custom-template mobile Safari webapp, and to change views around this code is used: function btnSave_ClickHandler(event) { var views = document.getElementById('stackLayout'); var front = document.getElementById('mainScreen'); if (views && views.object && front) { views.object.setCurrentView(front, true); } } My question is just about the if conditional statement. What is this triplet saying, and why do each of those things need to be verified before the view can be changed? Does views.object just test to see if the views variable responds to the object method? Why is this important? EDIT - This is/was the main point of this question, and it regards not Javascript as a language and how if loops work, but rather WHY these 3 things specifically need to be checked: Under what scenarios might views and front not exist? I don't typically write my code so redundantly. If the name of my MySQL table isn't changing, I'll just say UPDATE 'mytable' WHERE... instead of the much more verbose (and in my view, redundant) $mytable = "TheSQLTableName"; if ($mytable == an actual table && $mytable exists && entries can be updated){ UPDATE $mytable; } Whereas if the table's name (or in the JS example, the view's names) ARE NOT "hard coded" but are instead a user input or otherwise mutable, I might right my code as the DashCode example has it. So tell me, can these values "go wrong" anyhow? Thanks!

    Read the article

  • Need suggestion for implementing Message alert in Client server application

    - by sandip-mcp
    My requrement is like, i have to display message alert like if you sign in yahoo messanger and once u got any message a alert box will display corner of the page.Like wise when i sign in my website and if anybody send me any message then message will store in database and symultaneously a alert should display in my site. I am using .net framework3.5 using wcf service.So i will appreciate ur suggestion.Thanks in advance

    Read the article

  • What objects would get defined in a Bridge scoring app (Javascript)

    - by Alex Mcp
    I'm writing a Bridge (card game) scoring application as practice in javascript, and am looking for suggestions on how to set up my objects. I'm pretty new to OO in general, and would love a survey of how and why people would structure a program to do this (the "survey" begets the CW mark. Additionally, I'll happily close this if it's out of range of typical SO discussion). The platform is going to be a web-app for webkit on the iPhone, so local storage is an option. My basic structure is like this: var Team = { player1: , player2: , vulnerable: , //this is a flag for whether or //not you've lost a game yet, affects scoring scoreAboveLine: , scoreBelowLine: gamesWon: }; var Game = { init: ,//function to get old scores and teams from DB currentBid: , score: , //function to accept whether bid was made and apply to Teams{} save: //auto-run that is called after each game to commit to DB }; So basically I'll instantiate two teams, and then run loops of game.currentBid() and game.score. Functionally the scoring is working fine, but I'm wondering if this is how someone else would choose to break down the scoring of Bridge, and if there are any oversights I've made with regards to OO-ness and how I've abstracted the game. Thanks!

    Read the article

  • What should a PHP generate to give back to a jQuery AJAX request?

    - by Alex Mcp
    Perhaps it's a syntax error, but I never assume that. I have a -dead- simple AJAX test set up: http://www.mcphersonindustries.com/bucket/api.php is a file with simply: <?php echo "test"; ?> And I have Apache as localhost with this jQuery bit running: $(document).ready(function() { function doAjaxPost() { $.ajax({ type: "POST", url: "http://www.mcphersonindustries.com/bucket/api.php", data: "null", success: function(resp){ console.log("Response: '" + resp + "'"); }, error: function(e){ console.log('Error: ' + e); } }); } doAjaxPost(); }); So Firebug spits out Response: '' each time, but nothing's coming through the request. Do I need to declare a header in PHP? Am I making a boneheaded mistake somewhere? Thanks for the insights, as always.

    Read the article

  • Is there a name for a language feature that allows assignment/creation?

    - by Alex Mcp
    This is a bit hard for me to articulate, but in PHP you can say something like: $myArray['someindex'] = "my string"; and if there is no index named that, it will create/assign the value, and if there IS an index, it will overwrite the existing value. Compare this to Javascript where today I had to do checks like so: if (!myObject[key]) myObject[key] = "value"; I know this may be a bit of a picky point, but is there a name for the ability of PHP (and many other languages) to do these checks on their own as opposed to the more verbose (read: PITA) method of Javascript?

    Read the article

  • Why can't I build this Javascript object?

    - by Alex Mcp
    I have an object I'm trying to populate from another object (that is, iterate over a return object to produce an object with only selected values from the original). My code looks like this: var collect = {}; function getHistoricalData(username){ $.getJSON("http://url/" + username + ".json?params", function(data){ for (var i=0; i < data.length; i++) { console.log(i); collect = { i : {text : data[i].text}}; $("#wrap").append("<span>" + data[i].text + "</span><br />"); }; console.log(collect); }); } So I'm using Firebug for debugging, and here's what I know: The JSON object is intact console.log(i); is showing the numbers 1-20 as expected When I log the collect object at the end, it's structure is this: var collect = { i : {text : "the last iteration's text"}}; So the incrementer is "applying" to the data[i].text and returning the text value, but it's not doing what I expected, which is create a new member of the collect object; it's just overwriting collect.i 20 times and leaving me with the last value. Is there a different syntax I need to be using for assigning object members? I tried collect.i.text = and collect[i].text = and the error was that whatever I tried was undefined. I'd love to know what's going on here, so the more in-depth an explanation the better. Thanks!

    Read the article

  • How can I use JSONP to download client-side javascript objects?

    - by Alex Mcp
    I'm trying to get client-side javascript objects saved as a file locally. I'm not sure if this is possible. The basic architecture is this: Ping an external API to get back a JSON object Work client-side with that object, and eventually have a "download me" link This link sends the data to my server, which processes it and sends it back with a mime type application/json, which (should) prompt the user to download the file locally. Right now here are my pieces: Server Side Code <?php $data = array('zero', 'one', 'two', 'testing the encoding'); $json = json_encode($data); //$json = json_encode($_GET['']); //eventually I'll encode their data, but I'm testing header("Content-type: application/json"); header('Content-Disposition: attachment; filename="backup.json"'); echo $_GET['callback'] . ' (' . $json . ');'; ?> Relevant Client Side Code $("#download").click(function(){ var json = JSON.stringify(collection); //serializes their object $.ajax({ type: "GET", url: "http://www.myURL.com/api.php?callback=?", //this is the above script dataType: "jsonp", contentType: 'jsonp', data: json, success: function(data){ console.log( "Data Received: " + data[3] ); } }); return false; }); Right now when I visit the api.php site with Firefox, it prompts a download of download.json and that results in this text file, as expected: (["zero","one","two","testing the encoding"]); And when I click #download to run the AJAX call, it logs in Firebug Data Received: testing the encoding which is almost what I'd expect. I'm receiving the JSON string and serializing it, which is great. I'm missing two things: The Actual Questions What do I need to do to get the same prompt-to-download behavior that I get when I visit the page in a browser (much simpler) How do I access, server-side, the json object being sent to the server to serialize it? I don't know what index it is in the GET array (silly, I know, but I've tried almost everything)

    Read the article

  • I DISTINCTly hate MySQL (help building a query)

    - by Alex Mcp
    This is staight forward I believe: I have a table with 30,000 rows. When I SELECT DISTINCT 'location' FROM myTable it returns 21,000 rows, about what I'd expect, but it only returns that one column. What I want is to move those to a new table, but the whole row for each match. My best guess is something like SELECT * from (SELECT DISTINCT 'location' FROM myTable) or something like that, but it says I have a vague syntax error. Is there a good way to grab the rest of each DISTINCT row and move it to a new table all in one go?

    Read the article

  • Idioms for a three-state toggle?

    - by Alex Mcp
    I have a table column where each row has one of three states, and the purpose of the row is to offer manipulation AND display of this property with three states. My current development view is to have three tightly packed radio buttons with labels at the head of the columns (and every 50 rows or so) and onClick they send an AJAX request and thar she blows. This is fugly. Is there a standard idiom for a control like this? I'm currently mocking up something similar to the iPhone on/off toggle, but with a "middle" state. Any input would be welcome.

    Read the article

  • Is there a way to get a mobile Safari WebApp to "forget" its state?

    - by Alex Mcp
    I have a nascent bridge scoring app that is meant to be stored locally on an iPod touch/iPhone (iPad? Would probably be fugly...) So far so good, got a custom icon rolling and basic JS navigation laid out, but my problem is that it retains its state when I quit the app. Is there a simple magic Apple meta tag for this? Or is it achieved with javascript? Thanks for any insight.

    Read the article

  • What's the difference between single and double quotes in Objective-C?

    - by Alex Mcp
    I'm working through a book exercise to generate some random serial number, and here's my function: NSString *randomSerialNumber = [NSString stringWithFormat:@"%c%c%c%c%c", '0' + random() % 10, 'A' + random() % 26, '0' + random() % 10, 'A' + random() % 26, '0' + random() % 10]; This works and has an output like: 2J6X7. But before, the 0s and As I had wrapped in double quotes, and an example output was 11764iÒ˜. What did I do wrong my first time around, and why did using single quotes fix it?

    Read the article

  • Shorter GUIDs than hashing a user id?

    - by Alex Mcp
    I'm wondering how Instapaper (bookmarklet that saves text) might generate URLs for their bookmarklet. Mine has a script src of something similar to www.instapaper.com/j/AnJHrfoDTRia The quality of these URLs is that they need to never collide, and not be really guessable (so other people can't save to your account). I know a simple approach might be to MD5 their email address (presumed to have been checked on signup for uniqueness), but then I'd end up with a super long string. This isn't a huge issue, but I'm wondering what techniques there are for shorter GUIDs that won't collide too often (this is obviously the tradeoff, but 12 characters above is pretty short in my opinion)

    Read the article

  • initalizing two pointers to same value in "for" loop

    - by MCP
    I'm working with a linked list and am trying to initalize two pointers equal to the "first"/"head" pointer. I'm trying to do this cleanly in a "for" loop. The point of all this being so that I can run two pointers through the linked list, one right behind the other (so that I can modify as needed)... Something like: //listHead = main pointer to the linked list for (blockT *front, *back = listHead; front != NULL; front = front->next) //...// back = back->next; The idea being I can increment front early so that it's one ahead, doing the work, and not incrementing "back" until the bottom of the code block in case I need to backup in order to modify the linked list... Regardless as to the "why" of this, in addition to the above I've tried: for (blockT *front = *back = listHead; /.../ for (blockT *front = listHead, blockT *back = listHead; /.../ I would like to avoid pointer to a pointer. Do I just need to initialize these before the loop? As always, thanks!

    Read the article

  • ' \r ' vs ' \n ' in C

    - by MCP
    I'm writing a function that basically waits for the user to hit "enter" and then does something. What I've found that works when testing is the below: #include <stdio.h> int main() { int x = getc(stdin); if (x == '\n') { printf("carriage return"); printf("\n"); } else { printf("missed it"); printf("\n"); } } The question I have, and what I tried at first was to do: "if (x == '\r')" but in testing, the program didn't catch me hitting enter. The '\n' seems to correspond to me hitting enter from the console. Can someone explain the difference? Also, to verify, writing it as "if... == "\n"" would mean the character string literal? Ie the user would literally have to enter "\n" from the console, correct? Thanks!

    Read the article

1 2 3  | Next Page >