Search Results

Search found 6696 results on 268 pages for 'syntax highlighting'.

Page 140/268 | < Previous Page | 136 137 138 139 140 141 142 143 144 145 146 147  | Next Page >

  • Why cast null before checking if object is equal to null?

    - by jacerhea
    I was looking through the "Domain Oriented N-Layered .NET 4.0 Sample App" project and ran across some code that I do not understand. In this project they often use syntax like the following to check arguments for null: public GenericRepository(IQueryableContext context,ITraceManager traceManager) { if (context == (IQueryableContext)null) throw new ArgumentNullException("context", Resources.Messages.exception_ContainerCannotBeNull); Why would you cast null to the type of the object you are checking for null?

    Read the article

  • Is my Joda Time format pattern incorrect to produce a `T` and `Z` inside the parsed DateTime output?

    - by Tree
    Using Joda Time's pattern syntax below, this input string: Sunday, January 09, 2011 6:15:00 PM becomes this datetime: 2011-01-09T06:15:00.000Z Code: String start = "Sunday, January 09, 2011 6:15:00 PM"; DateTimeFormatter parser1 = DateTimeFormat.forPattern("EEEE, MMMM dd, yyyy H:mm:ss aa"); DateTime startTime = parser1.parseDateTime(start); Is this format pattern incorrect? If not, what are the T and Z doing inside the DateTime output? 2011-01-09T06:15:00.000Z

    Read the article

  • Good JavaScript IDE with JQuery support ?

    - by Pop Catalin
    I'm planing to start learning JQuery (among other things), so I'm looking for a good Javascript editor that can preferably provide some of the following features: Syntax coloring Contextual help for standard JS functions, JQuery functions and possibly custom ones. Some code completion. (optional) JS debugging Is there such and editor out here? or any that come close to this?

    Read the article

  • jquery - if else if?

    - by YesThatsRight
    I've been trying to figure out the syntax for an if / else if statement in jquery, but googling gives me mixed messages... There are some sites that say I need a plugin, and others that suggest that it's already possible. Trying those suggestions give me jquery errors in the jquery.js file, so I'm wondering, do I need a plugin or not? Does someone have an example of an if () { //do something } else if () { //do something else } else { //do something } in jquery?

    Read the article

  • jQuery Prototype conflict, alternative solutions

    - by lbolognini
    I have a problem as I'm conditionally including the Prototype-based Lightbox script for IE6 as it works better than the jQuery plugin. Of course the two libraries conflict but the official solution is not really feasible for me as i would have to replace tons of $ with the alternative no-conflict syntax. Is there any other solution for me, keeping in mind that in my case it would be easier to have Prototype work nicely with jQuery than the other way around?

    Read the article

  • Converting a selected date from a datetimepicker into my query, along with subtracting a day

    - by MyHeadHurts
    I am currently using this to get yesterdays date, however i need to do something similar where the user will use a javascript datetimepicker in my asp.net page and i will then use the date they select instead of just yesterdays date Declare @dayselection int set @dayselection = CONVERT(int,DateAdd(year, @YearToGet - Year(getdate() + 1), DateAdd(day, DateDiff(day, 1, @dayToGet), 1) , DateAdd(month, DateDiff(month, 0, @monthToGet), 0) ) but it isnt working i keep getting syntax errors I want the day and year functions to stay the same i just need help with the month part. I need to convert the selected date into an int

    Read the article

  • MYSQL updating data from other table

    - by atif089
    Hi, I have two tables like of this structure content (content_id, content_type, user_id, time, comment_count) comments (comment_id, content_id, userid, comment, comment_time) What I wold like to do is update the comments_count field with sum of comments i.e COUNT(content_id) from the comments table. I am not able to figure out the right syntax Thanks

    Read the article

  • action script dynamic type?

    - by Bin Chen
    I am curious about code in my action script project: public var _p:Object ... in a function: public function WObject(pp:MovieClip) { _p = pp; _p.Play(); } The Play() function is in MovieClip but not Object, can action script allow such syntax?

    Read the article

  • ExtJS: Add Single Click Action To A Node In A TreePanel

    - by FluidFoundation
    [revised] I'm creating a TreePanel in ExtJs that is loading its children from a JSON file. I'm having trouble adding a click action to the nodes. I'm not sure whether it's added in the script creating the tree, or if its added as a property in the JSON, and if so, what the syntax would be. Any help would be appreciated! Please provide an example if possible.

    Read the article

  • Are there any FREE Xaml Diff/Merge tools available?

    - by Ahikam
    I am searching a free diff tool with support of native syntax and markup for XAML, but failed to find one. I like Altova's DiffDog but it's paid. CodeCompare is an useful tool. It has some worth with its integration into VisualStudio and usage of native editors. It's a perfect solution for XML! However, it does not support XAML editors. Who can recommend a diff tool for XAML?

    Read the article

  • Apache installation in folder with chinese characters in name

    - by Zsolti
    I would like to install an Apache server into a folder like c:\anything\???\anything2\ under windows. When I try to start the service it sais that: httpd: Syntax error on line xx of C:/anything/\xe6\x80\x98\xe6\x80\x99\e6\80\9a/anything2/apache/conf/httpd.conf: ServerRoot must be a valid directory Does anyone have a solution?

    Read the article

  • Float conditional in bash

    - by Werner
    Hi, in bash I need to compare two float numbers, one which I define in the script and the other read as paramter, for that I do: if [[ $aff -gt 0 ]] then a=b echo "xxx "$aff #echo $CX $CY $CZ $aff fi but I get the error: [[: -309.585300: syntax error: invalid arithmetic operator (error token is ".585300") What is wrong? Thanks

    Read the article

  • Drupal 7 Install Error

    - by Matthew
    Guys, I was hoping that someone can shed some light on why I am getting this error: Parse error: syntax error, unexpected '{' in /homepages/22/d223624283/htdocs/drupal_new/includes/install.core.inc on line 74 Could it be something that I missed as far as D& configurations? Thanks, Matt

    Read the article

  • Bitwise operations in BC?

    - by user355926
    $ bc BC> ibase=2 BC> 110&101 // wanna get 100 (standar_in) 8: syntax error Wikipedia informs that the ops are "|, & and ^". It may be that they work only in certain BC-types or I misread something.

    Read the article

  • How do I limit JPQ output?

    - by den-javamaniac
    I need to limit number of entities returned by a query to some certain value inside a JPA query (through JPQL). Particularly: select m from Manual m //constraint e.g. in sql (mysql syntax) I would do it like: select * from Manual limit 1 The only solution that comes up is simply to get all entities and then choose first one, which is out of the issue. Any ideas?

    Read the article

  • Custom warning in Xcode

    - by maximumnamelength
    I'm working on an API library and I'd like to add a few warnings that would appear when another developers builds the app if an optional apikey is not included. It should be buildable w/o the key (since it's optional) so I can't just add a syntax error to force a build error. I know Xcode supports TODO and FIXME but those aren't really highlighted anywhere major. Any other thoughts on how to approach this?

    Read the article

  • rails howto use environment constant in models and views?

    - by fenec
    i have my constants initialized in environment.rb like this : Rails::Initializer.run do |config| ... MAX_BID = 10 end i would like to use this constant in my models and views,what is the correct syntax? if a use it a model its says NameError: uninitialized constant User::MAX_BID i understand that it is looking for the constant inside the model , how can i tell explicitly that this constant is in the environment? thanks

    Read the article

  • Intializing dictionary in c# 3.0

    - by Casey
    I'm having trouble with the following collections initalization: private Dictionary<string, string> mydictionary = new Dictionary<string, string>() { {"key", "value"} , {"key2", "value2"} , {"key3", "value3"} }; I keep getting various compiler errors about the syntax. From what I have googled this should be perfectly valid C# 3.0 code. The first error that pops up is: Error 102 ; expecte What am I doing wrong?

    Read the article

< Previous Page | 136 137 138 139 140 141 142 143 144 145 146 147  | Next Page >