Search Results

Search found 11178 results on 448 pages for 'syntax checking'.

Page 173/448 | < Previous Page | 169 170 171 172 173 174 175 176 177 178 179 180  | Next Page >

  • Handling national language prefix for checkconstraints

    - by Chris Chilvers
    I'm trying to create a check constraint such as CHECK Type IN (N'Create', N'Remove') for an enumeration's value. Sqlite complains about this syntax and only accepts CHECK Type IN ('Create', 'Remove'). The main database will be Sql Server 2005, but I use sqlite's in memory database for unit tests. Is there any way to get sqlite to recognise the national language (N) prefix? Alternatively, is there an easy way when using FluentNHibernate to adapt an nvarchar constant to match the database's dialect?

    Read the article

  • Display/hide menu items depending on logged on user

    - by Andrew
    In my web app, I would like to show an "Admin" menu link only to users who have been added to the database as an administrator. What would be the best way to do this in ASP.NET MVC 2? At the moment, I am doing it by checking whether the user exists in the Admin database table for every page. Obviously, there must be a better way to do this. If it helps, I am using Windows Auth.

    Read the article

  • Which's the best way to protect primary key on ASP.NET MVC?

    - by Junior Mayhé
    I'm creating a ASP.NET MVC website and I was wandering which techniques do you guys use to protect primary key on these mvc urls. Actually ASP.NET MVC generates this syntax for its urls: /Controller/Action/Id Last week I was trying to encrypt it using SHA-1 Encryption, but this encrypter generates some special symbols like + (plus), / (slash), and other annoying chars which difficult the decryption. Perhaps creating a custom encryption should solve the problem. But I wanna here from you guys, do you have some ideas to protect mvc urls?

    Read the article

  • How do I access the TFS workspace of an employee that has quit to review/check in some of the change

    - by Fadeproof
    One of my co-workers has resigned and was made to leave the premises before checking in all of his code to TFS. I have access to the physical files. Is there a way for me to access his workspace and check in some of the changes that are still left unchecked in? From tfs I can see which files he has checked out but no way of seeing the exact changes unless very manually.

    Read the article

  • How can I combine two conditions in Perl?

    - by yael
    I have two Perl one liners: perl -pe "s/\b$a\b/$b/g if m/param1 /" test and perl -pe "s/\b$a\b/$b/g unless /^#/" test How can I combine theif m/somthing/ and the unless /something/, like: [root@localhost tmp]# perl -pe "s/\b$a\b/$b/g if m/param1/ unless /^#/" test syntax error at -e line 1, near "m/param1/ unless"

    Read the article

  • How to extend the Eclipse Java Editor to add coloured overlays

    - by Gavin Clarke
    I have an idea for an Eclipse plugin which I've been toying with. I need to be able to extend the Eclipse Java Editor component and add coloured overlays to the code based on pluggable external metrics. Unfortunately there doesn't appear to be any kind of syntax highlighting extension point. Does anyone know how I might be able to extend the exisitng eclipse Java Editor to add custom highlighting rules? Bear in mind I'm new to Eclipse plugin programming so please give as much detail as possible.

    Read the article

  • Autohotkey editor

    - by Kjensen
    What is the best editor for Autohotkey with regards to syntax hightlighting, command completion (intellisense), testing etc. I am doing a bit of Autohotkey programming, and being spoiled rotten by Visual Studio, I really miss these features - especially being new to the language/framework.

    Read the article

  • SQL Server 2005. Full Text Search. Need Thesaurus working with NEAR/AND/OR keywords

    - by user305924
    Hi, does anyone know if it's possible to do a thesaurus search together with NEAR or AND/OR keywords. Here is an example of the type of query I want to run: SELECT Title, RANK FROM Item INNER JOIN CONTAINSTABLE(Item, Title, 'FORMSOF(Thesaurus, "red" NEAR "wine")') AS KEY_TBL ON Item.ItemID = KEY_TBL.[KEY] ORDER BY RANK DESC ....But I get the error message: Syntax error near 'NEAR' in the full-text search condition 'FORMSOF(Thesaurus, "red" NEAR "wine")'.

    Read the article

  • check keyboard state without using KeyboardEvent in AS3

    - by Pieter888
    Is it possible to check for pressed keys without using the KeyboardEvent? I have an ENTER_FRAME event setup called enterFrameHandler and I want to check within the function enterFrameHandler if any keys are pressed. normally when using a KeyboardEvent I could check for keys easily using a switch that checks the KeyCode of the event, but in an ENTER_FRAME event this isn't possible for me. Is there any other way of checking the keyboard's state within the ENTER_FRAME event?

    Read the article

  • How to detect if a script is being sourced

    - by brianegge
    I have a script where I do not want it to call 'exit' if it's being sourced. Initially I though checking if $0 == bash but this has problems if the script is sourced from another script, or if the user sources it from ksh. Is there a reliable way of detecting if a script is being sourced?

    Read the article

  • java.bigDecimal divide in ruby environment

    - by Eyal
    I right script in Ruby that include java classes require 'java' include_class 'java.math.BigDecimal' include_class 'java.math.RoundingMode' during the script I need to divide 2 java.bigDecimal one = BigDecimal.new("1") number1 = BigDecimal.new("3") number1 = one.divide(number1,RoundingMode.new(HALF_EVEN)) since I don't have intellisense in this IDE I'm not sure the syntax is right and the runtime error is: uninitialized constant::HALF_EVEN do I combine java object in the ruby scrpit in the right way? how should I divide two java.bigDecimal object in ruby env?

    Read the article

  • Re-indexing table; update with from

    - by David Thorisson
    The query says it all, I can't find out the right syntax without without using a for..next UPDATE Webtree SET Webtree.Sorting=w2.Sorting FROM ( SELECT BranchID, CASE WHEN @Index>=ROW_NUMBER() OVER(ORDER BY Sorting ASC) THEN ROW_NUMBER() OVER(ORDER BY Sorting ASC) ELSE ROW_NUMBER() OVER(ORDER BY Sorting ASC)+1 END AS Sorting FROM Webtree w2 WHERE w2.ParentID=@ParentID ) WHERE Webtree.BranchID=w2.BranchID

    Read the article

  • Concerned with Top in sql

    - by ramyatk06
    hi guys, I have variable @count of datatype int.I am setting values to this @count. I want to select top @count number of rows from table.When i use Select top @count,its showing error. Delete from ItemDetails where GroupId in (Select Top @count Id from ItemDetails where GroupId=@Prm_GroupId ) The error is Incorrect syntax near '@count'.Can anybody help?

    Read the article

  • Check if 'onload' would have fired already?

    - by thomasrutter
    Hello, I have a situation where I'd like to set an onload handler for a script element, but it is possible that the script element has already loaded before I do so. If it's already loaded, I'd like to detect that and run my handler immediately. What would be a reliable way of checking a script element's onload state after the fact? BTW I know that IE uses readyState instead of an onload event so I don't need help for that.

    Read the article

  • format the ouput of a string

    - by prince23
    hi here string strTrendScore="2"; or string strTrendScore="2.45656" now here i am checking the condition if it is double value = double.Parse(strTrendScore); strTrendScore = value.ToString("##.##"); 2.45656 like this then i am showing the output as 2.45 if the input is string strTrendScore="2"; then the ouput is shown as "2" but now i need to show the output has 2.00 how can i format the code like this based on the condition

    Read the article

  • Flex PopUpManager: How can I detect the existence of a modal popup?

    - by Glenn
    My Flex 3 application has some modal dialogs displayed via the PopUpManager, but there are times when I'd like other view components to know there is popup displayed. The PopUpManager doesn't have any method for actually checking the existence of popups. Is there any other way to detect this in flash/flex without writing my own global manager? (also systemManager.popUpChildren.numChildren == 0 even when there's a modal popup) Cheers.

    Read the article

  • hibernate sybase db power function

    - by Vipin Thomas
    We are trying to use sybase function power to do mathematical calculation for one of the DB columns. The hibernate is generating power function as pow(?, xyzo0_.AmtScale) whereas sybase supports power function as Syntax POWER( numeric-expression-1, numeric-expression-2 ) We have tried modifying the hibernate.dialect. Have tried org.hibernate.dialect.SybaseASE15Dialect org.hibernate.dialect.Sybase11Dialect org.hibernate.dialect.SybaseAnywhereDialect but all dialects generate the power function as pow(?, xyzo0_.AmtScale). Is this hibernate issue or are we missing something?

    Read the article

  • Find maximum positive integer value in Bourne Shell

    - by l0b0
    I'm checking a counter in a loop to determine if it's larger than some maximum, if specified in an optional parameter. Since it's optional, I can either default the maximum to a special value or to the maximum possible integer. The first option would require an extra check at each iteration, so I'd like to instead find out what is the maximum integer that will work with the -gt Bourne Shell operation.

    Read the article

  • Comparison of web template engines

    - by Mark
    Post a snippet of code from your favorite templating engine, with the name of the engine and a link to its homepage; show off its basic syntax and maybe some neat features about it that makes it unique. Hopefully this will give people an idea of what's out there and make it easier for them to decide on an engine.

    Read the article

  • PHP vs Phpmyadmin

    - by user330306
    Hi there, I've got this code which i execute on phpmyadmin which works 100% Create Temporary Table Searches ( id int, dt datetime); Create Temporary Table Searches1 ( id int, dt datetime, count int); insert into Searches(id, dt) select a.id, now() from tblSavedSearches a; insert into Searches1(id, dt, count) select b.savedSearchesId, (select c.dt from tblSavedSearchesDetails c where b.savedSearchesId = c.savedSearchesId order by c.dt desc limit 1) as 'dt', count(b.savedSearchesId) as 'cnt' from tblSavedSearchesDetails b group by b.savedSearchesId; insert into tblSavedSearchResults(savedSearchId,DtSearched,isEnabled) select id,now(),0 from Searches where not id in (select savedSearchId from tblSavedSearchResults); update tblSavedSearchResults inner join Searches1 on tblSavedSearchResults.savedSearchId = Searches1.id Set tblSavedSearchResults.DtSearched = Searches1.dt, tblSavedSearchResults.isEnabled = 1; However when i put the same code in php as below it generates an error $dba = DbConnect::CreateDbaInstance(); $query = ""; $query.="Create Temporary Table Searches ( id int, dt datetime); "; $query.="Create Temporary Table Searches1 ( id int, dt datetime, count int); "; $query.="insert into Searches(id, dt) select a.id, now() from tblSavedSearches a; "; $query.="insert into Searches1(id, dt, count) "; $query.="select "; $query.=" b.savedSearchesId, "; $query.=" (select c.dt from tblSavedSearchesDetails c where b.savedSearchesId = c.savedSearchesId order by c.dt desc limit 1) as 'dt', "; $query.=" count(b.savedSearchesId) as 'cnt' "; $query.="from tblSavedSearchesDetails b "; $query.="group by b.savedSearchesId; "; $query.="insert into tblSavedSearchResults(savedSearchId,DtSearched,isEnabled) "; $query.="select id,now(),0 from Searches where not id in (select savedSearchId from tblSavedSearchResults); "; $query.="update tblSavedSearchResults "; $query.="inner join Searches1 on tblSavedSearchResults.savedSearchId = Searches1.id "; $query.="Set tblSavedSearchResults.DtSearched = Searches1.dt, tblSavedSearchResults.isEnabled = 1; "; $dba->DbQuery($query) or die(mysql_error()); I get the following error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Create Temporary Table Searches1 ( id int, dt datetime, count int) insert into S' at line 1 Please if someone could assist me with this ... Thanks

    Read the article

  • JWPlayer plays videos at 3x speed on the first run, then works fine in subsequent runs on the same p

    - by Josiah Kiehl
    Go here: http://nano.materials.drexel.edu/research/videolibrary For some bizarre reason, the videos will play at 3x speed on the first run through, but then will play at normal speed each subsequent play. This doesn't happen all the time, and it's not always the same video(s) that do it. I'm utterly baffled. I've reconverted the videos from m4p to flv (using BitComet's converter) several times, double checking the settings each time through with no change to the behavior. Anyone have a clue what's going on?

    Read the article

  • How do I nested options for plugins in jQuery

    - by Oscar Godson
    I know how to do plugins, but how do I do nested options like: var defaults = { spacing:10, shorten_to:50, from_start:0, from_end:2, classes: { test:'testing' } }; i know that isn't right, i just dont know how to write the proper syntax when I want to do something like this: $('#breadcrumbs').breadcrumbs({classes{test:'new_example'},spacing:12}) other suggestions are welcome, im in need of the ability to custom class names and there are 7, so rather than making something like test_class, example_class, etc id like it cleaner and neater like the example above.

    Read the article

< Previous Page | 169 170 171 172 173 174 175 176 177 178 179 180  | Next Page >