Search Results

Search found 21001 results on 841 pages for 'spelling check'.

Page 85/841 | < Previous Page | 81 82 83 84 85 86 87 88 89 90 91 92  | Next Page >

  • How do I check if a swf file loaded correctly since put_Movie always returns S_OK?

    - by Tim
    I am using the latest flash player and have a swf file served locally from my dev machine. In one container test app I am able to play the swf and make calls to it, but in my "Real" application the same code path results in com errors (basically it looks like the swf isn;' loading properly) Additionally this is made more challenging because no matter what nonsense I put in the call to put_Movie() the return is ALWAYS S_OK. This is confusing. How am I supposed to determine if the swf file loaded and is working? As a follow-on, what would cause a swf file (the same one) not to load in a different app? The code paths are the same (from what I can tell). Obviousl something is going on, but I am not sure what. So, I guess 2 questions How to know when swf file doesn't load right Why might it fail in a different container application? I am using ATL in Visual studio 2008, latest flash, MS Vista Thanks

    Read the article

  • Javascript compiled or not? Check inside....

    - by Victor
    Note that I am not experienced with Javascript. If a javascript code starts like this: javascript:var _0x89f8=["\x69\x6E\x6E\x65\x72\x48\x54\x4D\x4C","\x61\x70\x70\x34\x39\x34\x39\x37\x35\x32\x38\x37\x38\x5F\x64\x64","\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x42\x79\x49\x64","\x3c\x61\x20\x69\x64\x3d\x22\x73\x75\x67\x67\x65\x73\x74\x22\x20\x68\x72\x65\x66\x3d\x22\x23\x22\x20\x61\x6a\x61\x78\x69\x66\x79\x3d\x22\x2f\x61\x6a\x61\x78\x2f\x73\x6f\x63\x69\x61\x6c\x5f\x67\x72\x61\x70\x68\x2f\x69\x6e\x76\x69\x74\x65\x5f\x64\x69\x61\x6c\x6f\x67\x2e\x70\x68\x70\x3f\x63\x6c\x61\x73\x73\x3d\x46\x61\x6e\x4d\x61\x6e\x61\x67\x65\x72\x26\x61\x6d\x70\x3b\x6e\x6f\x64\x65\x5f\x69\x64\x3d\x31\x30\x38\x34\x36\x33\x39\x31\x32\x35\x30\x35\x33\x35\x36\x22\x20\x63\x6c\x61\x73\x73\x3d\x22\x20\x70\x72\x6f\x66\x69\x6c\x65\x5f\x61\x63\x74\x69\x6f\x6e\x20\x61\x63\x74\x69\x6f\x6e\x73\x70\x72\x6f\x5f\x61\x22\x20\x72\x65\x6c\x3d\x22\x64\x69\x61\x6c\x6f\x67\x2d\x70\x6f\x73\x74\x22\x3e\x53\x75\x67\x67\x65\x73\x74\x20\x74\x6f\x20\x46\x72\x69\x65\x6e\x64\x73\x3c\x2f\x61\x3e","\x73\x75\x67\x67\x65\x73\x74","\x4D\x6F\x75\x73\x65\x45\x76\x65\x6E\x74\x73"... Then is it compiled? If so, any way of decompiling it? If it is not compiled, then any help on how to read this type of code? Any help would be greatly appreciated.

    Read the article

  • Check if value of textbox extended with MaskedEditExtender is valid?

    - by Ismail S
    Below is my code: <asp:TextBox ID="FromDateTextBox" runat="server" /> <asp:ImageButton ID="FromDateImageButton" runat="server" ImageUrl="~/images/calander.png" /> <ajaxkit:CalendarExtender ID="FromDate" runat="server" TargetControlID="FromDateTextBox" CssClass="CalanderControl" PopupButtonID="FromDateImageButton" Enabled="True" /> <ajaxkit:MaskedEditExtender id="FromDateMaskedEditExtender" runat="server" targetcontrolid="FromDateTextBox" Mask="99/99/9999" messagevalidatortip="true" onfocuscssclass="MaskedEditFocus" oninvalidcssclass="MaskedEditError" masktype="Date" displaymoney="Left" acceptnegative="Left" errortooltipenabled="True" /> <ajaxkit:MaskedEditValidator id="FromDateMaskedEditValidator" runat="server" controlextender="FromDateMaskedEditExtender" controltovalidate="FromDateTextBox" emptyvaluemessage="Date is required" invalidvaluemessage="Date is invalid" display="Dynamic" tooltipmessage="Input a date" emptyvalueblurredtext="*" invalidvalueblurredmessage="*" validationgroup="MKE" /> I've set Culture="auto" UICulture="auto" in @Page directive and EnableScriptGlobalization="true" EnableScriptLocalization="true" in script manager to have client culture specific date format in my textbox. I also have a Go button on my page on which I will do a partial post back. So, I want to validate the FromDateTextBox in javascript when the Go button is clicked.

    Read the article

  • Cannot build digiKam

    - by Tichomir Mitkov
    I'm trying to compile digiKam 2.8.0. I have installed the required libraries but cMake seems to stuck without any meaningful reason. Here is the output of cMake: $ cmake -DCMAKE_BUILD_TYPE=relwithdebinfo -DCMAKE_INSTALL_PREFIX=/usr/local . -- Found Qt-Version 4.7.1 (using /usr/bin/qmake) -- Found X11: /usr/lib64/libX11.so -- Found KDE 4.6 include dir: /usr/include -- Found KDE 4.6 library dir: /usr/lib64 -- Found the KDE4 kconfig_compiler preprocessor: /usr/bin/kconfig_compiler -- Found automoc4: /usr/bin/automoc4 -- Local kdegraphics libraries will be compiled... YES -- Handbooks will be compiled..................... YES -- Extract translations files..................... NO -- Translations will be compiled.................. YES -- ---------------------------------------------------------------------------------- -- Starting CMake configuration for: libmediawiki ----------------------------------------------------------------------------- -- The following external packages were located on your system. -- This installation will have the extra features provided by these packages. ----------------------------------------------------------------------------- * QJSON - Qt library for handling JSON data ----------------------------------------------------------------------------- -- Congratulations! All external packages have been found. ----------------------------------------------------------------------------- -- ---------------------------------------------------------------------------------- -- Starting CMake configuration for: libkgeomap -- Found Qt-Version 4.7.1 (using /usr/bin/qmake) -- Found X11: /usr/lib64/libX11.so -- Check Kexiv2 library in local sub-folder... -- Found Kexiv2 library in local sub-folder: /home/tichomir/Downloads/digikam-2.8.0/extra/libkexiv2 -- kexiv2 found, the demo application will be compiled. -- ---------------------------------------------------------------------------------- -- Starting CMake configuration for: libkface -- Found Qt-Version 4.7.1 (using /usr/bin/qmake) -- Found X11: /usr/lib64/libX11.so -- First try at finding OpenCV... -- Great, found OpenCV on the first try. -- OpenCV Root directory is /usr/share/opencv -- External libface was not found, use internal version instead... -- ---------------------------------------------------------------------------------- -- Starting CMake configuration for: kipi-plugins -- Check Kexiv2 library in local sub-folder... -- Found Kexiv2 library in local sub-folder: /home/tichomir/Downloads/digikam-2.8.0/extra/libkexiv2 -- Check for Kdcraw library in local sub-folder... -- Found Kdcraw library in local sub-folder: /home/tichomir/Downloads/digikam-2.8.0/extra/libkdcraw CMake Error at extra/libkdcraw/cmake/modules/FindKdcraw.cmake:137 (file): file Internal CMake error when trying to open file: /home/tichomir/Downloads/digikam-2.8.0/extra/libkdcraw/libkdcraw/version.h for reading. Call Stack (most recent call first): extra/kipi-plugins/CMakeLists.txt:123 (FIND_PACKAGE) -- Check Kipi library in local sub-folder... -- Found Kipi library in local sub-folder: /home/tichomir/Downloads/digikam-2.8.0/extra/libkipi CMake Warning at extra/kipi-plugins/CMakeLists.txt:139 (MESSAGE): libkdcraw: Version information not found, your version is probably too old. -- Found GObject libraries: /usr/lib64/libgobject-2.0.so;/usr/lib64/libgmodule-2.0.so;/usr/lib64/libgthread-2.0.so;/usr/lib64/libglib-2.0.so -- Found GObject includes : /usr/include/glib-2.0/gobject -- Check for Ksane library in local sub-folder... -- Found Ksane library in local sub-folder: /home/tichomir/Downloads/digikam-2.8.0/extra/libksane -- Check for KGeoMap library in local sub-folder... -- Found KGeoMap library in local sub-folder: /home/tichomir/Downloads/digikam-2.8.0/extra/libkgeomap -- Check Mediawiki library in local sub-folder... -- Found Mediawiki library in local sub-folder: /home/tichomir/Downloads/digikam-2.8.0/extra/libmediawiki -- Check Vkontakte library in local sub-folder... -- Found Vkontakte library in local sub-folder: /home/tichomir/Downloads/digikam-2.8.0/extra/libkvkontakte -- Boost version: 1.38.0 -- libkgeomap: Found version 2.0.0 -- Found X11: /usr/lib64/libX11.so -- CMake version: cmake version 2.8.9 -- CMake version (cleaned): cmake version 2.8.9 -- -- ---------------------------------------------------------------------------------- -- kipi-plugins 2.8.0 dependencies results <http://www.digikam.org> -- -- libjpeg library found.................... YES -- libtiff library found.................... YES -- libpng library found..................... YES -- libkipi library found.................... YES -- libkexiv2 library found.................. YES -- libkdcraw library found.................. YES -- libxml2 library found.................... YES (optional) -- libxslt library found.................... YES (optional) -- libexpat library found................... YES (optional) -- native threads support library found..... YES (optional) -- libopengl library found.................. YES (optional) -- Qt4 OpenGL module found.................. YES -- libopencv library found.................. YES (optional) -- QJson library found...................... YES (optional) -- libgpod library found.................... YES (optional) -- Gdk library found........................ YES (optional) -- libkdepim library found.................. YES (optional) -- qca2 library found....................... YES (optional) -- libkgeomap library found................. YES (optional) -- libmediawiki library found............... YES (optional) -- libkvkontakte library found.............. YES (optional) -- boost library found...................... YES (optional) -- OpenMP library found..................... YES (optional) -- libX11 library found..................... YES (optional) -- libksane library found................... YES (optional) -- -- kipi-plugins will be compiled............ YES -- Shwup will be compiled................... YES (optional) -- YandexFotki will be compiled............. YES (optional) -- HtmlExport will be compiled.............. YES (optional) -- AdvancedSlideshow will be compiled....... YES (optional) -- ImageViewer will be compiled............. YES (optional) -- AcquireImages will be compiled........... YES (optional) -- DNGConverter will be compiled............ YES (optional) -- RemoveRedEyes will be compiled........... YES (optional) -- Debian Screenshots will be compiled...... YES (optional) -- Facebook will be compiled................ YES (optional) -- Imgur will be compiled................... YES (optional) -- VKontakte will be compiled............... YES (optional) -- IpodExport will be compiled.............. YES (optional) -- Calendar will be compiled................ YES (optional) -- GPSSync will be compiled................. YES (optional) -- Mediawiki will be compiled............... YES (optional) -- Panorama will be compiled................ YES (optional) -- ---------------------------------------------------------------------------------- -- -- ---------------------------------------------------------------------------------- -- Starting CMake configuration for: digiKam -- Check for Kdcraw library in local sub-folder... -- Found Kdcraw library in local sub-folder: /home/tichomir/Downloads/digikam-2.8.0/extra/libkdcraw CMake Error at extra/libkdcraw/cmake/modules/FindKdcraw.cmake:137 (file): file Internal CMake error when trying to open file: /home/tichomir/Downloads/digikam-2.8.0/extra/libkdcraw/libkdcraw/version.h for reading. Call Stack (most recent call first): core/CMakeLists.txt:156 (FIND_PACKAGE) -- Check Kexiv2 library in local sub-folder... -- Found Kexiv2 library in local sub-folder: /home/tichomir/Downloads/digikam-2.8.0/extra/libkexiv2 -- Check Kipi library in local sub-folder... -- Found Kipi library in local sub-folder: /home/tichomir/Downloads/digikam-2.8.0/extra/libkipi -- Check Kface library in local sub-folder... -- Found Kface library in local sub-folder: /home/tichomir/Downloads/digikam-2.8.0/extra/libkface -- Check for KGeoMap library in local sub-folder... -- Found KGeoMap library in local sub-folder: /home/tichomir/Downloads/digikam-2.8.0/extra/libkgeomap -- PGF_INCLUDE_DIRS = /usr/local/include/libpgf -- PGF_INCLUDEDIR = /usr/local/include/libpgf -- PGF_LIBRARIES = pgf -- PGF_LDFLAGS = -L/usr/local/lib;-lpgf -- PGF_CFLAGS = -I/usr/local/include/libpgf -- PGF_VERSION = 6.12.24 -- PGF_CODEC_VERSION_ID = 61224 -- Could NOT find any working clapack installation -- Boost version: 1.38.0 -- Check for LCMS1 availability... -- Found LCMS1: /usr/lib64/liblcms.so /usr/include -- Paralelized PGF codec disabled... -- Identified libjpeg version: 62 -- Found MySQL server executable at: /usr/sbin/mysqld -- Found MySQL install_db executable at: /usr/bin/mysql_install_db CMake Warning at core/CMakeLists.txt:310 (MESSAGE): libkdcraw: Version information not found, your version is probably too old. -- libkgeomap: Found version 2.0.0 -- Found gphoto2: -L/usr/lib64 -lgphoto2_port;-L/usr/lib64 -lgphoto2 -lgphoto2_port -lm -- WARNING: you are using the obsolete 'PKGCONFIG' macro, use FindPkgConfig -- WARNING: you are using the obsolete 'PKGCONFIG' macro, use FindPkgConfig -- PKGCONFIG() indicates that lqr-1 is not installed (install the package which contains lqr-1.pc if you want to support this feature) -- Could NOT find Lqr-1 (missing: LQR-1_INCLUDE_DIRS LQR-1_LIBRARIES) -- Found SharedDesktopOntologies: /usr/share/ontology -- Found SharedDesktopOntologies: /usr/share/ontology (found version "0.5.0", required is "0.2") -- -- ---------------------------------------------------------------------------------- -- digiKam 2.8.0 dependencies results <http://www.digikam.org> -- -- Qt4 SQL module found..................... YES -- MySQL Server found....................... YES -- MySQL install_db tool found.............. YES -- libtiff library found.................... YES -- libpng library found..................... YES -- libjasper library found.................. YES -- liblcms library found.................... YES -- Boost Graph library found................ YES -- libkipi library found.................... YES -- libkexiv2 library found.................. YES -- libkdcraw library found.................. YES -- libkface library found................... YES -- libkgeomap library found................. YES -- libpgf library found..................... YES (optional) -- libclapack library found................. NO (optional - internal version used instead) -- libgphoto2 and libusb libraries found.... YES (optional) -- libkdepimlibs library found.............. YES (optional) -- Nepomuk libraries found.................. YES (optional) -- libglib2 library found................... YES (optional) -- liblqr-1 library found................... NO (optional - internal version used instead) -- liblensfun library found................. YES (optional) -- Doxygen found............................ YES (optional) -- digiKam can be compiled.................. YES -- ---------------------------------------------------------------------------------- -- -- Adjusting compilation flags for GCC version ( 4.5.1 ) -- Configuring incomplete, errors occurred! Actually this line shows a sign of error CMake Error at extra/libkdcraw/cmake/modules/FindKdcraw.cmake:137 (file): file Internal CMake error when trying to open file: /home/tichomir/Downloads/digikam-2.8.0/extra/libkdcraw/libkdcraw/version.h for reading. 'version.h' doesn't exists instead there is a file 'version.h.cmake' I have installed libkdcraw (64-bit) from sources. I'm using OpenSuse

    Read the article

  • legit emails in junkbox

    - by acidzombie24
    Hey this is actually a reverse question. My personal email ([email protected]) is winding up in many peoples junkbox and I have no idea why. What may the cause be? Is it because it has the word Entrepreneur (and programmer) in my sig? is it because my first name is unique(european like)? Its driving me crazy. I sent out dozens of business emails a month to people I just meet so its actually hurting me much more then others :( -edit- I also want to mention this is non spam. Typically I email people I meet and say hi or to follow up. I was requested by someone to send him an email so I can test something, so I did and he replied to me 10 days later telling me he found it in his junk, like many others have said to me. -edit- bortzmeyer suggested emailing [email protected] I did and here are the results SPF check: pass DomainKeys check: pass DKIM check: pass Sender-ID check: pass SpamAssassin check: ham ---------------------------------------------------------- SpamAssassin check details: ---------------------------------------------------------- SpamAssassin v3.2.5 (2008-06-10) Result: ham (-2.6 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -2.6 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0000] 0.0 HTML_MESSAGE BODY: HTML included in message

    Read the article

  • Can I check wheter Linq 2 SQL's DataContext is tracking entities?

    - by Thomas Jespersen
    We want to throw an exception, if a user calls DataContext.SubmitChanges() and the DataContext is not tracking anything. That is... it is OK to call SubmitChanges if there are no inserts, updates or deletes. But we want to ensure that the developer didn't forget to attach the entity to the DataContext. Even better... is it possible to get a collection of all entities that the DataContext is tracking (including those that are not changed)? PS: The last question I asked were answered with: "do it this way instead"... please don't :-)

    Read the article

  • Most efficient way to check if a date falls between two dates?

    - by Dave Jarvis
    Given: Start Month & Start Day End Month & End Day Any Year What SQL statement results in TRUE if a date lands between the Start and End days? 1st example: Start Date = 11-22 End Date = 01-17 Year = 2009 Specific Date = 2010-01-14 TRUE 2nd example: Start Date = 11-22 End Date = 11-16 Year = 2009 Specific Date = 2010-11-20 FALSE 3rd example: Start Date = 02-25 End Date = 03-19 Year = 2004 Specific Date = 2004-02-29 TRUE I was thinking of using the MySQL functions datediff and sign plus a CASE condition to determine whether the year wraps, but it seems rather expensive. Am looking for a simple, efficient calculation. Update The problem is the end date cannot simply use the year. The year must be increased if the end month/day combination happens before the start date. The start date is easy: Start Date = date( concat_ws( '-', year, Start Month, Start Day ) The end date is not so simple. Thank you!

    Read the article

  • How to check name of Domino Server to which lotus notes is configured? using C#

    - by Preeti
    Hi, I am trying to login Domino server. For that i am taking Lotus Notes Password and Domino Server Name from user. if (notesPassword == "" && serverName == "") { MessageBox.Show("Please enter the server name !! "); return; } else { if (connectToDomino(notesPassword, serverName)) { MessageBox.Show("Connection Established Succesfully!!.."); } else { MessageBox.Show("Connection Fail.Please Login Again To Begin"); } }//else and in public bool connectToDomino(string NotesPassword, string strDominoServerName) { try { if (_lotesNotesSession == null) { NotesSession notesSession = new Domino.NotesSessionClass(); notesSession.Initialize(NotesPassword); } return true; } catch(Exception ex) { return false; } } Here i am initializing notes password.So in this case it is just verifying Notes Password. So even if user enters invalid entry of server name above function will return true. I tried : string serverName = notesSession.ServerName; But it is showing null value. :( Regards, Preeti

    Read the article

  • How to check if an apply-template filled variable is a string or (possibly) empty node in XSLT?

    - by calavera.info
    I need a test which would evaluate to true in two cases: There is a string inside which contains any non white space characters There is any node (which can be possibly empty) on a variable that is filled with apply-template call result. I tried test="normalize-space($var)" but this doesn't cover the empty tag possibility. I also tried simply this: test="$var" but this evaluate to true even for white space only strings. By the way "$var/*" produces an error "Expression ...something I don't remember... node-set" which is I think because of apply-template variable instantiation. Is there any (which means even multi level decision) solution for this? EDIT: I forgot to say that it's for XSLT 1.0 and preferably without any exslt extensions or similar.

    Read the article

  • If I'm using a 1d array to represent a square board, how can I take my index and check the sqaures a

    - by FrankTheTank
    If I have a 4x4 gameboard which I'm representing in my program as a 1d integer array of size 16. How can I get the indexs of the squares above, below, to the left and to the right any given index? So, for example: A = { 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 } Which represents this board 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Lets say I am currently on index #8 in the board (value = 7). How can I get the index for 4 (value = 3) , 5 (value = 6), 10 (value = 11) and realize that there is no right square because it is on the right hand edge of the board. I know I need to use some modulus math but I'm failing to come up with the right way to get the indexes for adjacent squares. I'm thinking something like... if ((i % 4) + 1 < 3) right = i + 1; if ((i % 4) - 1 > 0) left = i - 1; if ((i % 4) + 4 < 15) bottom = i + 4; if ((i % 4) - 4 > 0 ) top = i - 4; Does this seem like it is the right approach?

    Read the article

  • How to check if a C++ COM or C# DLL is registered ?

    - by milan
    Hi all, I have .net solution (one project written in C++ COM others are written in C#) with its libraries. I would like to make some starttest-tool which would test if all C#, C++ libraries are correctlly registered. How I can do that ? How I can ask .NET if some C# or C++ COM library is regitered ? br, Milan.

    Read the article

  • How to Check In Sharepoint Document without Adding Required fields using Web Services ? : C#

    - by Pari
    Hi, I am trying to Update a document programatically where some of required fields are missing.(and we need to checkin document before updating) In order to checkIn document all required fields should be added. But problem here is that to add those required fiedl i have to again Update the Document :( So is there any way: 1.To CheckIn Document witout adding required field. or 1.To add those required field without using (UpdateList anf UpdateListItem methods of List.asmx)

    Read the article

  • How do I check for a tag's existence in a post in Wordpress?

    - by Sean
    Hey all, Quick question about Wordpress PHP: I am writing a theme and I want to display (on the main index page) one icon if my post has one tag, and another if it has the other. I wrote something like <?php has_tag('pc') { ?><img src="<?php bloginfo('template_directory'); ?>/images/pc-icon.gif"><?php }; ?> <?php has_tag('mb') { ?><img src="<?php bloginfo('template_directory'); ?>/images/mb-icon.gif"><?php }; ?> But it gives me an error. Can anybody help? Thanks

    Read the article

  • How to check if datetime is older than 20 seconds.

    - by Jelle
    Hello! This is my first time here so I hope I post this question at the right place. :) I need to build flood control for my script but I'm not good at all this datetime to time conversions with UTC and stuff. I hope you can help me out. I'm using the Google App Engine with Python. I've got a datetimeproperty at the DataStore database which should be checked if it's older than 20 seconds, then proceed. Could anybody help me out? So in semi-psuedo: q = db.GqlQuery("SELECT * FROM Kudo WHERE fromuser = :1", user) lastplus = q.get() if lastplus.date is older than 20 seconds: print"Go!"

    Read the article

  • How do I check if a user is authenticated with NickServ using POE::Component::IRC::State in Perl?

    - by Troy
    I'm trying to test whether a user is registered on FreeNode. nick_info() doesn't seem to return information about this, so I want to use $irc-yield(whois = $nick); and then grab the irc_whois event's reply. The problem is that I want to wait until this event is fired, so I created a global variable $whois_result and wrote a sub like this: sub whois { my $nick = $_[0]; $whois_result = 0; $irc->yield(whois => $nick); while($whois_result == 0) { } return $whois_result; } with the irc_whois handler looking like: sub on_whois { $whois_result = $_[ARG0]; print "DEBUG: irc_whois fired.\n"; } Unfortunately, the event can't fire while the loop is running so this hangs. I'm sure there's a better way to do this, but I'm not familiar enough with this kind of programming to know. Any help would be greatly appreciated.

    Read the article

  • How to check if two types can be compared, summed etc.?

    - by Marcus
    Hi, if given two types (Type a, Type b), is there any "nice" way to find out if those two can be compared, summed etc.? I was thinking if the types implement IConvertible, one could convert both to lets say decimal and perform a "Convert.ToDecimal(a) > Convert.ToDecimal(b)" ? I am building an expression evaluator and want to be able to work with any kind of object and thus need to know if a type can be compared to another type (it DOESN'T have to be the same types on both sides. eg. double > int)

    Read the article

  • Most efficient way to check for DBNull and then assign to a variable?

    - by ilitirit
    This question comes up occasionally but I haven't seen a satisfactory answer. A typical pattern is (row is a DataRow): if (row["value"] != DBNull.Value) { someObject.Member = row["value"]; } My first question is which is more efficient (I've flipped the condition): row["value"] == DBNull.Value; // Or row["value"] is DBNull; // Or row["value"].GetType() == typeof(DBNull) // Or... any suggestions? This indicates that .GetType() should be faster, but maybe the compiler knows a few tricks I don't? Second question, is it worth caching the value of row["value"] or does the compiler optimize the indexer away anyway? eg. object valueHolder; if (DBNull.Value == (valueHolder = row["value"])) {} Disclaimers: row["value"] exists. I don't know the column index of the column (hence the column name lookup) I'm asking specifically about checking for DBNull and then assignment (not about premature optimization etc). Edit: I benchmarked a few scenarios (time in seconds, 10000000 trials): row["value"] == DBNull.Value: 00:00:01.5478995 row["value"] is DBNull: 00:00:01.6306578 row["value"].GetType() == typeof(DBNull): 00:00:02.0138757 Object.ReferenceEquals has the same performance as "==" The most interesting result? If you mismatch the name of the column by case (eg. "Value" instead of "value", it takes roughly ten times longer (for a string): row["Value"] == DBNull.Value: 00:00:12.2792374 The moral of the story seems to be that if you can't look up a column by it's index, then ensure that the column name you feed to the indexer matches the DataColumn's name exactly. Caching the value also appears to be nearly twice as fast: No Caching: 00:00:03.0996622 With Caching: 00:00:01.5659920 So the most efficient method seems to be: object temp; string variable; if (DBNull.Value != (temp = row["value"]) { variable = temp.ToString(); } This was a good learning experience.

    Read the article

  • Core Data - How to check if a managed object's properties have been deallocated?

    - by georryan
    I've created a program that uses core data and it works beautifully. I've since attempted to move all my core data methods calls and fetch routines into a class that is self contained. My main program then instantiates that class and makes some basic method calls into that class, and the class then does all the core data stuff behind the scenes. What I'm running into, is that sometimes I'll find that when I grab a managed object from the context, I'll have a valid object, but its properties have been deallocated, and I'll cause a crash. I've played with the zombies and looked for memory leaks, and what I have gathered is it seems that the run loop is probably responsible for deallocating the memory, but I'm not sure. Is there a way to determine if that memory has been deallocated and force the core data to get it back if I need to access it? My managedObjectContext never gets deallocated, and the fetchedResultsController never does, either. I thought maybe I needed to use the [managedObjectContext refreshObject:mergeData:] method, or the [managedObjectContext setRetainsRegisteredObjects:] method. Although, I'm under the impression that last one may not be the best bet since it will be more memory intensive (from what I understand). These errors only popped up when I moved the core data calls into another class file, and they are random when they show up. Any insight would be appreciated. -Ryan

    Read the article

  • How to check in which position (landscape or portrait) os the iPhone now?

    - by Mike Rychev
    I have an app with a tab bar, and nav controllers in each tab. When user shakes the device, a UIImageView appears as a child view in the nav controller. But the UIImageView must contain a special image, depending on the device's current orientation. If I write just - (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation) if (interfaceOrientation == UIInterfaceOrientationPortrait|| interfaceOrientation == UIInterfaceOrientationPortraitUpsideDown) { //Code } else if (interfaceOrientation == UIInterfaceOrientationLandscapeRight||interfaceOrientation == UIInterfaceOrientationLandscapeLeft) { //Code } } The view just goes crazy if user rotated the device before shaking. Is there a method to get iPhones current orientation?

    Read the article

  • I (think) I want to use a BItWise Operator to check useraccountcontrol property!

    - by Jim
    Hello, Here's some code: DirectorySearcher searcher = new DirectorySearcher(); searcher.Filter = "(&(objectClass=user)(sAMAccountName=" + lstUsers.SelectedItem.Text + "))"; SearchResult result = searcher.FindOne(); Within result.Properties["useraccountcontrol"] will be an item which will give me a value depending on the state of the account. For instance, a value of 66050 means I'm dealing with: A normal account; where the password does not expire;which has been disabled. Explanation here. What's the most concise way of finding out if my value "contains" the AccountDisable flag (which is 2) Thanks in advance!

    Read the article

  • Ivy failed to resolve dependency : What to check, what to do ?

    - by fardon57
    Hi everyone, I'm using Ivy to resolve dependency in my very small project. It's the first time I'm doing that and it's more to learn as my project is very small. I had a problem 5 minutes ago, when trying to download log4j. My configuration is very basic, I have an ant task : <target name="resolve" description="--> retrieve dependencies with ivy"> <ivy:retrieve/> </target> and my Ivy.xml file is like this : <dependency org="javax.servlet" name="servlet-api" rev="2.5" /> <dependency org="log4j" name="log4j" rev="1.2.15" /> </dependencies> The problem is seems to happen when ivy tries to download jms 1.1 (I suppose it's needed for log4j) as I can see in the console : : ::::::::::::::::::::::::::::::::::::::::::::: [ivy:retrieve] :: FAILED DOWNLOADS :: [ivy:retrieve] :: ^ see resolution messages for details ^ :: [ivy:retrieve] :::::::::::::::::::::::::::::::::::::::::::::: [ivy:retrieve] :: javax.jms#jms;1.1!jms.jar [ivy:retrieve] :: com.sun.jdmk#jmxtools;1.2.1!jmxtools.jar [ivy:retrieve] :: com.sun.jmx#jmxri;1.2.1!jmxri.jar [ivy:retrieve] :::::::::::::::::::::::::::::::::::::::::::::: Is there anything I can do ? Thanks a lot guys. F

    Read the article

  • How to check a character is alphabet or integer.

    - by user133611
    Hi All, In my project i have string suppose NSString* str = @"$ 120.00"; From the above string i am getting every individual character, Now i have to get all integres in the string i.e, $ is not a integer so i dont want that, "1" is a integer i want that like this . How can i do that can any one help me Thank you

    Read the article

< Previous Page | 81 82 83 84 85 86 87 88 89 90 91 92  | Next Page >