Search Results

Search found 4498 results on 180 pages for 'expression'.

Page 52/180 | < Previous Page | 48 49 50 51 52 53 54 55 56 57 58 59  | Next Page >

  • Design mode in Visual studio 2010 sp1 beta

    - by anirudha
    in MVC3 razor we found that their is no way to watch the design in Visual studio as well we can see aspx file by going to design mode. their is a little trick to solve this issue first is that if you have Expression web or Vs 2008 then open the file on them how see here in expression web 4 you need to add the extension .cshtml and open them as html as we open other. in Visual studio 2008 you need to add the extension .cshtml and set them open as html. well their is no big trouble if design not worked. but in some case when you need to get this issue solved this need to be work for configuration do this: Expression Web 4 > tools > application options > configure editor > click on new extension icon show in exact left put the cshtml in the window they show you and choose expression web [open as html] after that you can see the design in expression web. by default Expression web not have cshtml as known extension so you need to do that to add them because without it they never handle cshtml file and refer them to Visual studio. after setting this you  EW4 open the cshtml file as html and show you design in design mode. in Visual studio 2008 you can use same trick to solve this issue just follow this step > options > text editors > file extension put cshtml in textbox and set the option html editor from dropdown and click on add and ok this will open your cshtml file as html.

    Read the article

  • Comparing Dates in Oracle Business Rule Decision Tables

    - by James Taylor
    I have been working with decision tables for some time but have never had a scenario where I need to compare dates. The use case was to check if a persons membership had expired. I didn't think much of it till I started to develop it. The first trap I feel into was trying to create ranges and bucket sets. The other trap I fell into was not converting the date field to a complete date. This may seem obvious to most people but my Google searches came up with nothing so I thought I would create a quick post. I assume everyone knows how to create a decision table so I'm not going to go through those steps. The prerequisite for this post is to have a decision table with a payload that has a date field. This filed must have the date in the following format YYYY-MM-DDThh:mm:ss. Create a new condition in your decision table Right-click on the condition to edit it and select the expression builder In the expression builder, select the Functions tab. Expand the CurrentDate file and select date, and click Insert Into Expression button. In the Expression Builder you need to create an expression that will return true or false, add the operation <= after the CurrentDate.date In my scenario my date field is memberExpire, Navigate to your date field and expand, select toGregorianCalendar(). Your expression will look something like this, click OK to get back to the decision table Now its just a matter of checking if the value is true or false. Simple when you know how :-)

    Read the article

  • Ad-hoc String Manipulation With Visual Studio

    - by Liam McLennan
    Visual studio supports relatively advanced string manipulation via the ‘Quick Replace’ dialog. Today I had a requirement to modify some html, replacing line breaks with unordered list items. For example, I need to convert: Infrastructure<br/> Energy<br/> Industrial development<br/> Urban growth<br/> Water<br/> Food security<br/> to: <li>Infrastructure</li> <li>Energy</li> <li>Industrial development</li> <li>Urban growth</li> <li>Water</li> <li>Food security</li> This cannot be done with a simple search-and-replace but it can be done using the Quick Replace regular expression support. To use regular expressions expand ‘Find Options’, check ‘Use:’ and select ‘Regular Expressions’ Typically, Visual Studio regular expressions use a different syntax to every other regular expression engine. We need to use a capturing group to grab the text of each line so that it can be included in the replacement. The syntax for a capturing group is to replace the part of the expression to be captured with { and }. So my regular expression: {.*}\<br/\> means capture all the characters before <br/>. Note that < and > have to be escaped with \. In the replacement expression we can use \1 to insert the previously captured text. If the search expression had a second capturing group then its text would be available in \2 and so on. Visual Studio’s quick replace feature can be scoped to a selection, the current document, all open documents or every document in the current solution.

    Read the article

  • How to properly translate the "var" result of a lambda expression to a concrete type?

    - by CrimsonX
    So I'm trying to learn more about lambda expressions. I read this question on stackoverflow, concurred with the chosen answer, and have attempted to implement the algorithm using a console app in C# using a simple LINQ expression. My question is: how do I translate the "var result" of the lambda expression into a usable object that I can then print the result? I would also appreciate an in-depth explanation of what is happening when I declare the outer => outer.Value.Frequency (I've read numerous explanations of lambda expressions but additional clarification would help) C# //Input : {5, 13, 6, 5, 13, 7, 8, 6, 5} //Output : {5, 5, 5, 13, 13, 6, 6, 7, 8} //The question is to arrange the numbers in the array in decreasing order of their frequency, preserving the order of their occurrence. //If there is a tie, like in this example between 13 and 6, then the number occurring first in the input array would come first in the output array. List<int> input = new List<int>(); input.Add(5); input.Add(13); input.Add(6); input.Add(5); input.Add(13); input.Add(7); input.Add(8); input.Add(6); input.Add(5); Dictionary<int, FrequencyAndValue> dictionary = new Dictionary<int, FrequencyAndValue>(); foreach (int number in input) { if (!dictionary.ContainsKey(number)) { dictionary.Add(number, new FrequencyAndValue(1, number) ); } else { dictionary[number].Frequency++; } } var result = dictionary.OrderByDescending(outer => outer.Value.Frequency); // How to translate the result into something I can print??

    Read the article

  • How to use a variable in a function expression which is injected in a page?

    - by anonymous
    I'm trying to inject a function into a webpage via Chrome extension content script by: function inject(code) { var actualCode = '(' + code + ')();'; var script = document.createElement('script'); script.textContent = actualCode; (document.head||document.documentElement).appendChild(script); script.parentNode.removeChild(script); } var myObj = person; // myObj/person is passed in from elsewhere var fn = function() { alert(myObj.name); }; inject(fn); // myObj undefined My issue is, since fn is a function expression, I can't pass in myObj.personName. So my question is, how can I construct a function expression that includes a variable? Do I do some sort of string concatenation instead? I also tried to pass the object to the function, as follows: function inject(code, myObj) { var actualCode = '(' + code + ')(' + myObj +');'; ... But this did not work, and caused a "Uncaught SyntaxError: Unexpected identifier" error. Related: Building a Chrome Extension - Inject code in a page using a Content script

    Read the article

  • Silverlight Cream for April 16, 2010 -- #838

    - by Dave Campbell
    In this Issue: Alan Beasley(-2-, -3-, -4-, -5-), Brian, Rishi, Pete Brown, Yavor Georgiev, and David Anson. Shoutouts: As usual, Tim Heuer has all the scoop on all the hot-off-the-presses releases: Silverlight 4 released. Availability of tools announcement. He covers all the main parts of interest. Tim Heuer also discusses Backward Compatibility with Silverlight 4 applications And before you ask, Tim Heuer announced the Silverlight Client for Facebook updated for Silverlight 4 release If you're having trouble with the install, Peter Bromberg has a post up to help bail you out: Get Silverlight 4 Installed: Tips and Tricks Christian Schormann has a link to probably the fastest intro to SketchFlow I've seen: Video: SketchFlow in 90 seconds, with Jon Harris Chris Rouw has a Summary of Silverlight at DevConnections on his site. I had the opportunity to spend some time with Chris and we had some good discussions. Rene Schulte describes how to get started with the new final Silverlight 4 RTW build and announces that he updated his samples and open source projects. He also shares what he wishes for the next Silverlight version: Silverlight 4 Up and Running From SilverlightCream.com: Building Better Buttons in Expression Blend and Silverlight I generally end up missing articles embedded at CodeProject, so Alan Beasley emailed me a link to these, they were new to me. In this first one, he's got a very nice tutorial up on making some awesome buttons in Expression Blend Arcade Button in Expression Blend and Silverlight Alan Beasley's second Expression Blend Button tutorial is the classic 'arcade button' ... this is great stuff.. check it out. Picture Frame Control in Expression Blend and Silverlight I wasn't going to do the full list Alan Beasley had sent me in one post, but they're all so good! This third takes an excursion away from buttons to do a Picture Frame control. Styled to the max, and another great Blend tutorial! The last building buttons article (Part1), in Expression Blend and Silverlight Alan Beasley finishes what may be a definitive work on buttons in Blend... even if you don't want to follow the tutorials (and why wouldn't you??) ... he's got 10 buttons you can download! ListBox Styling (Part1-ScrollBars) in Expression Blend & Silverlight In Alan Beasley's 5th post at Code Project, He has a great long tutorial on Styling Listbox Scrollbars in Expression Blend ... the ScrollBars are Part 1 of a series. Some Notes on DRM in Silverlight 4 Brian at Silverlight SDK has a post up on DRM ... WMDRM and PlayReady. If you're planning on utilizing this, Brian's post looks like a good starting point. nRoute: Now, More Wholesome Rishi has a detailed post up explaining the latest nRoute release now supporting Silverlight 4, WP7, and WPF. What a piece of work! Scanning an Image from Silverlight 4 using WIA Automation Pete Brown demonstrates using VS2010 and SL4 to lash up to his scanner. Lots of code and external links... all good stuff, Pete! Dealing with those pesky WCF CommunicationException “NotFound” errors in Silverlight Yavor Georgiev has a quick post up discussing WCF CommunicationException errors in Silverlight with a couple external links to explain the solution. New Silverlight 4 Toolkit released with today's Silverlight 4 RTW! David Anson blogged about the new Toolkit release that is live right now along with the Silverlight 4 Release, and has some release notes up on the Toolkit. Stay in the 'Light! Twitter SilverlightNews | Twitter WynApse | WynApse.com | Tagged Posts | SilverlightCream Join me @ SilverlightCream | Phoenix Silverlight User Group Technorati Tags: Silverlight    Silverlight 3    Silverlight 4    Windows Phone MIX10

    Read the article

  • JQuery validate: How to add a rule for regular expression validation?

    - by PeterTheNiceGuy
    I am new to JQuery and am using the JQuery validation plugin. Great stuff! I want to migrate my existing ASP.NET solution to use JQuery instead of the ASP.NET validators. I am missing a replacement for the regular expression validator. I want to be able to do something like this: $("Textbox").rules("add", { regularExpression: "^[a-zA-Z'.\s]{1,40}$" }) Could anyone give me a hint how to add a custom rule to achieve this?

    Read the article

  • regular expression or replace function in where clause of a mysql query.

    - by Salil
    Hi All, I write a mysql query select * from table where name like '%salil%' which works fine but it will no return records with name 'sal-il', 'sa@lil'. So i want a query something like below select * from table where remove_special_character_from(name) like '%salil%' remove_special_character_from(name) is a mysql method or a regular expression which remove all the special characters from name before like executed.

    Read the article

  • How to parameterize @Scheduled(fixedDelay) with Spring 3.0 expression language?

    - by ngeek
    When using the Spring 3.0 capability to annotate the a scheduled task, I would like to set the fixedDelay as parameter from my configuration file, instead of hard-wiring it into my task class, like currently... @Scheduled(fixedDelay=5000) public void readLog() { ... } Unfortunately it seems that with the means of the Spring Expression Language (EL) @Value returns a String object which in turn is not able to be auto-boxed to a long value as required by the fixedDelay parameter. Thanks in advance for your help on this.

    Read the article

  • Way to get logged in user in Expression Engine?

    - by Andrew G. Johnson
    Hi all, I am using Expression Engine in part of a site I am developing and other parts are just using my own PHP. My question is how can I tell who the user is logged in as on a non-EE page? I have access to the EE cookies and the EE database but couldn't find a way to use these values to figure out who the user is. I have a list of all the cookie keys/values at: http://andrewgjohnson.com/cookies.html

    Read the article

  • How do I find multiple matches with one regular expression?

    - by christian studer
    I've got the following string: response: id="1" message="whatever" attribute="none" world="hello" The order of the attributes is random. There might be any number of other attributes. Is there a way to get the id, message and world attribute in one regular expression instead of applying the following three one after another? / message="(.*?)"/ / world="(.*?)"/ / id="(.*?)"/

    Read the article

  • How can I use Perl's s/// in an expression?

    - by mikeY
    I got a headache looking for this: How do you use s/// in an expression as opposed to an assignment. To clarify what I mean, I'm looking for a perl equivalent of python's re.sub(...) when used in the following context: newstring = re.sub('ab', 'cd', oldstring) The only way I know how to do this in perl so far is: $oldstring =~ s/ab/cd/; $newstring = $oldstring; Note the extra assignment.

    Read the article

  • ssh-rsa public key validation using a regular expression.

    - by Warlax
    What regular expression can I use (if any) to validate that a given string is a legal ssh rsa public key? I only need to validate the actual key - I don't care about the key type the precedes it or the username comment after it. Ideally, someone will also provide the python code to run the regex validation. Thanks.

    Read the article

  • Do I use a regular expression on this file path?

    - by uno
    I have to strip a file path and get the parent folder. Say my path is \\ServerA\FolderA\FolderB\File.jpg I need to get File Name = File.jog Folder it resides in = FolderB And parent folder = FolderA I always have to go 2 levels up from where the file resides. Is there an easier way or is a regular expression the way to go?

    Read the article

  • How do I create a regular expression to match a word misspelling the original case sensitivity?

    - by Patrick Allaert
    I want to discover wrong spelling of "FooBar" in sentence: "This is a 'FooBar' example where I should match different spelling of fooBar such as: foobar, FOOBAR or even fOoBaR but not foobarS!" In this sentence, I would like to match words (in order): fooBar, foobar, FOOBAR, fOoBaR and not: FooBar (correct spelling), foobarS (not the same word) Is there an existing solution using Perl Regular Expression? This is intended to be used with grep -P Thanks

    Read the article

< Previous Page | 48 49 50 51 52 53 54 55 56 57 58 59  | Next Page >