Search Results

Search found 56 results on 3 pages for 'quotations'.

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

  • Is this an F# quotations bug?

    - by ControlFlow
    [<ReflectedDefinition>] let rec x = (fun() -> x + "abc") () The sample code with the recursive value above produces the following F# compiler error: error FS0432: [<ReflectedDefinition>] terms cannot contain uses of the prefix splice operator '%' I can't see any slicing operator usage in the code above, looks like a bug... :) Looks like this is the problem with the quotation via ReflectedDefinitionAttribute only, normal quotation works well: let quotation = <@ let rec x = (fun() -> x + "abc") () in x @> produces expected result with the hidden Lazy.create and Lazy.force usages: val quotation : Quotations.Expr<string> = LetRecursive ([(x, Lambda (unitVar, Application (Lambda (unitVar0, Call (None, String op_Addition[String,String,String](String, String), [Call (None, String Force[String](Lazy`1[System.String]), [x]), Value ("abc")])), Value (<null>)))), (x, Call (None, Lazy`1[String] Create[String](FSharpFunc`2[Unit,String]), [x])), (x, Call (None, String Force[String](Lazy`1[String]), [x]))], x) So the question is: is this an F# compiler bug or not?

    Read the article

  • Converting F# Quotations into LINQ Expressions

    - by forki23
    Hi, I can convert a quotation of type Expr<'a -> 'b> to a Linq expression via the following snippet: /// Converts a F# Expression to a LINQ Lambda let toLambda (exp:Expr) = let linq = exp.ToLinqExpression() :?> MethodCallExpression linq.Arguments.[0] :?> LambdaExpression /// Converts a Lambda quotation into a Linq Lamba Expression with 1 parameter let ToLinq (exp : Expr<'a -> 'b>) = let lambda = toLambda exp Expression.Lambda<Func<'a, 'b>>(lambda.Body, lambda.Parameters) Now I want to convert a quotation of type Expr<'a * 'b -> 'c> or maybe even Expr<'a -> 'b -> 'c> to a Linq Lambda Expression of type Expression<Func<'a,'b'c>>. How can I do this? Regards, forki

    Read the article

  • Shows how to use AutocompleteExtender to populate subjects and databind quotations via Entity Framew

    This article will focus on a database of famous quotations that I"ve pared down to a downloadable size for a demo, and how to wire up the AJAX Toolkit autocomplete extender to a textbox that is used to typeahead a Subject. When the ClientItemSelected event fires, the Display button Click is invoked, and this causes an EF query to display the matching quotes in a DataList.  read moreBy Peter BrombergDid you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Shows how to use AutocompleteExtender to populate subjects and databind quotations via Entity Framew

    This article will focus on a database of famous quotations that I"ve pared down to a downloadable size for a demo, and how to wire up the AJAX Toolkit autocomplete extender to a textbox that is used to typeahead a Subject. When the ClientItemSelected event fires, the Display button Click is invoked, and this causes an EF query to display the matching quotes in a DataList.  read moreBy Peter BrombergDid you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • How can I extract all quotations in a text?

    - by secr
    I'm looking for a SimpleGrepSedPerlOrPythonOneLiner that outputs all quotations in a text. Example 1: echo “HAL,” noted Frank, “said that everything was going extremely well.” | SimpleGrepSedPerlOrPythonOneLiner stdout: "HAL," "said that everything was going extremely well.” Example 2: cat MicrosoftWindowsXPEula.txt | SimpleGrepSedPerlOrPythonOneLiner stdout: "EULA" "Software" "Workstation Computer" "Device" "DRM" etc. (link to the corresponding text).

    Read the article

  • Regex Replace Between Quotations

    - by Kyle Rozendo
    Hi All, I am wondering on where to begin to perform the following replace in regex: Read file (.cs file) Replace anything between quotations ("e.g:") with its uppercase version ("E.G:") By example: string m = "stringishere"; Becomes string m = "STRINGISHERE"; Thanks in advance, Kyle

    Read the article

  • .net clipboard metadata (or whatever skype quotations use)

    - by Cyclone
    Is it possible to use the Clipboard class to grab all the data from the clipboard, like full skype quotes? They use some kind of metadata I think, which is how it knows when something is a quote or not. How can I access that from the Clipboard class? What functions would I call to set/restore Skype quotations? Thanks for the help!

    Read the article

  • Macro is not Cooperating with Quotations in Excel VBA

    - by B-Ballerl
    I Have a macro containing a line that will change the formula of a cell using R1C1 formula type. The formula is: ActiveCell.FormulaR1C1 = _ "=IF(R[0]C[-2]=0,"",(R[0]C[-20]-R[0]C[-16]))" When ever I attempt to run the macro it always comes up with a dialog box saying Run-time error '1004': Application-defined or object-defined error. And when you click debug it highlights those 2 lines in the macro. And I can't figure out how to fix it. Can anyone help?

    Read the article

  • Excel Help: Macro is not Cooperating with Quotations!!

    - by B-Ballerl
    Hi all, I Have a macro containing a line that will change the formula of a cell using R1C1 formula type. The formula is: ActiveCell.FormulaR1C1 = _ "=IF(R[0]C[-2]=0,"",(R[0]C[-20]-R[0]C[-16]))" When ever I attempt to run the macro it always comes up with a dialog box saying Run-time error '1004': Application-defined or object-defined error. And when you click debug it highlights those 2 lines in the macro. And I can't figure out how to fix it. Can anyone help?

    Read the article

  • Torvalds' quote about good programmer

    - by beyeran
    Accidentally I've stumbled upon the following quote by Linus Torvalds: "Bad programmers worry about the code. Good programmers worry about data structures and their relationships." I've thought about it for the last few days and I'm still confused (which is probably not a good sign), hence I wanted to discuss the following: What interpretation of this possible/makes sense? What can be applied/learned from it?

    Read the article

  • PHP Regular Expression to quotations to attributes

    - by atwellpub
    hey Guys, I need to run a string of html through a regex function that checks to see if the attributes are closed in quotes, and if they aren't then close them. for example i want <img src=http://www.domain.com/image.gif border=0> to turn into <img src='http://www.domain.com/image.gif' border='0'> Can anyone help me?

    Read the article

  • Returning currently displayed index of an array Javascript...

    - by Jeff Kindred
    I have a simple array with x number of items. I am displaying them individually via a link click... I want to update a number that say 1 of 10. when the next one is displayed i want it to display 2 of 10 etc... I have looked all around and my brain is fried right now... I know its simple I just cant get it out. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title>Page Title</title> <link rel="stylesheet" href="style.css" type="text/css" media="screen" charset="utf-8"/> <script type="text/javascript"> var quotations = new Array() quotations[0]= "1" quotations[1]= "2" quotations[2]= "3" quotations[3]= "4" quotations[4]= "5" quotations[5]= "6" quotations[6]= "7" numQuotes = quotations.length; curQuote = 1; function move( xflip ) { curQuote = curQuote + xflip; if (curQuote > numQuotes) { curQuote = 1 ; } if (curQuote == 0) { curQuote = numQuotes ; } document.getElementById('quotation').innerHTML=quotations[curQuote - 1]; } var curPage = //this is where the current index should go </script> </head> <body> <div id="quotation"> <script type="text/javascript">document.write(quotations[0]);</script> </div> <div> <p><a href="javascript();" onclick="move(-1)">GO back</a> <script type="text/javascript">document.write(curPage + " of " + numQuotes)</script> <a href="javascript();" onclick="move(1)">GO FORTH</a></p> </div> </body> </html>

    Read the article

  • How to do fixed price quote for design sessions?

    - by Shaul
    Normally when I do a system for a customer, I do design sessions on an hourly rate and then come out with a fixed price quotation for the full system development. Now this customer has thrown me a curveball: he doesn't want an hourly rate for design, either - he wants me to quote a fixed price to do all the design, too! Not that he's trying to cheap out, but he doesn't want to be in a situation where the longer design stretches out, the more he has to pay - and I can understand that. For the business layer it was actually not too difficult to work with this, because from his original functional spec I got a good idea of what the core business objects were, and in our design agreement I defined several objects which would be covered by a fixed design price; if any new non-trivial objects were discovered, they would be considered variances, and those would be billed on an hourly rate. So far so good. But when it comes to the UI, things start getting a lot more woolly. How many screens will there be? Don't know yet. What's going to be on each screen? Don't know yet. All we know is that it's a "dashboard" type of system, and there will be a lot of visual reporting involved e.g. gauges, graphs, etc. So maybe make it fixed price per screen design? Not a great definition; he might say that everything is going to be on one screen. Maybe a price per "visual report" design, including ability to slice & dice? Again not so easy - it might be that the entire system is just one report, and all the intelligence is going to go into how to present that segmentation. Anyone have any ideas how to do a fixed price quotation for a UI design like this?

    Read the article

  • random quote generator in php using mysql

    - by fusion
    i coded a random quote generator in php using mysql but also jquery. however when i try to integrate it with facebook, since i opted to use fbml, i could not use jquery. how do i get the quote to display randomly in php at say, 30 mins, without using jquery or javascript?

    Read the article

  • Elaboration of A quotation on 'Simple Design'

    - by HanuAthena
    An excerpt from Programming Perls: A Simple Design : Antonie de Saint-Exupery, the Fresh writer and aircraft designer, said that, *"A designer knows he has arrived at perfection not when there is no longer anything to add, but when there is no longer anything to take away."* More programmers should judge their work by this criteria. Can any one elaborate this, please? What does the author mean when he say "...TAKE AWAY"

    Read the article

  • using an alternative string quotation syntax in python

    - by Cawas
    Just wondering... I find using escape characters too distracting. I'd rather do something like this: print ^'Let's begin and end with sets of unlikely 2 chars and bingo!'^ Let's begin and end with sets of unlikely 2 chars and bingo! Note the ' inside the string, and how this syntax would have no issue with it, or whatever else inside for basically all cases. Too bad markdown can't properly colorize it (yet), so I decided to <pre> it. Sure, the ^ could be any other char, I'm not sure what would look/work better. That sounds good enough to me, tho. Probably some other language already have a similar solution. And, just maybe, Python already have such a feature and I overlooked it. I hope this is the case. But if it isn't, would it be too hard to, somehow, change Python's interpreter and be able to select an arbitrary (or even standardized) syntax for notating the strings? I realize there are many ways to change statements and the whole syntax in general by using pre-compilators, but this is far more specific. And going any of those routes is what I call "too hard". I'm not really needing to do this so, again, I'm just wondering.

    Read the article

  • Regex in Flex 3: How to Wrap Quotations Around a Dynamic String?

    - by Laxmidi
    Hi, I need some Regex help. I need to find beacon_ followed by an alphanumeric code and then wrap it in quotation marks. For something static, like the example, below it's straight forward. myReturn = myReturn.replace( 'id=beacon_80291ee9b3', 'id="beacon_80291ee9b3"'); But, my problem is that the part after beacon is a random alphanumeric code. (However, it is always the same length). For example, the beacon part could be: beacon_c8ac873136 beacon_dc83b5953e beacon_7a910d03d8 etc. The haystack that I'll search will look like: myReturn = "blah blah id=beacon_80291ee9b3 blah blah"; Thanks. -Laxmidi

    Read the article

  • Extracting two strings from quotations in Java using regex?

    - by user656710
    Hi everyone, I'm new to using patterns and looked everywhere on the internet for an explanation to this problem. Say I have a string: String info = "Data I need to extract is 'here' and 'also here'"; How would I extract the words: here also here without the single quotes using a pattern? This is what I have so far... Pattern p = Pattern.compile("(?<=\').*(?=\')"); But it returns ( here and 'also here ) minus the brackets, that is just for viewing. It skips over the second piece of data and goes straight to the last quote... Thank you!

    Read the article

  • web browser become slow or no response after several ajax calls

    - by Patrick
    I'm totally newbie to jquery and ajax, my recently project is to help the representatives (reps) to manage customer quotations online. I have a page which displays all the quotations in a big table. I've managed to use ajax to fetch and display the quotations which associate to a particular rep after i click that rep's name. But the only problem is the speed of response. The first few clicks are ok and very smooth. But after several tries, the response become slow and I cant even scroll down the webpage, and later on the web browser craches.... Please have a look at my ajax code. here it is: <!-- AJAX FETCH QUOTES DATA + Tablesorter + FIXED TABLE HEADER--> <script type="text/javascript"> //<![CDATA[ $(function(){ $("a.repID").click(function(){ $('div#loader').append("<p align='center'><img src='images/loadingbar2.gif' id='loading' /></p>"); var repID = $(this).attr("title"); $.ajax({ type:'POST', url:'quote_info.php', data:'repID=' + repID, cache: false, success:function(data) { $("#container").html('<div id="content">' + data + '</div>'); $("#loading").fadeOut(500, function() {$(this).remove();}); $("#sortme").tablesorter(); $('.tbl').fixedtableheader(); } }); return false; }); }); </script> <!-- AJAX FETCH QUOTES DATA + Tablesorter + FIXED TABLE HEADER-->

    Read the article

  • declare and assign value my sql stored procedure(5.0.45)

    - by naveen84n
    Hi everybody , DELIMITER $$ DROP PROCEDURE IF EXISTS quotations.sp_addservices $$ CREATE PROCEDURE quotations.sp_addservices (In categoryname varchar(25),in servicename varchar(250),in hours float,in cost float,in basis nvarchar (100)) BEGIN insert into categorydetails (Category_Name) values (categoryname); if(categoryname!=null) then DECLARE category_id int; set category_id= select max(Category_Id) from categorydetails ; insert into servicesdetails (Service_Name,Category_Id,Hours,Cost,Basis) values(servicename,category_id,hours,cost,basis); end if; END $$ DELIMITER ; This is my stored procedure .I have to retrive the value of categoryid that is posted into the database which is auto increased.Here i cant declare the variable and assign value to variable.Am getting error like Script line: 4 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 'DECLARE category_id int; set category_id= select max(Category_Id) from categor' at line 9 Can any one help me Thanks in advance.

    Read the article

  • How to Get the F# Name of a Module, Function, etc. From Quoted Expression Match

    - by Stephen Swensen
    I continue to work on a printer for F# quoted expressions, it doesn't have to be perfect, but I'd like to see what is possible. The active patterns in Microsoft.FSharp.Quotations.Patterns and Microsoft.FSharp.Quotations.DerivedPatterns used for decomposing quoted expressions will typically provide MemberInfo instances when appropriate, these can be used to obtain the name of a property, function, etc. and their "declaring" type, such as a module or static class. The problem is, I only know how to obtain the CompiledName from these instances but I'd like the F# name. For example, > <@ List.mapi (fun i j -> i+j) [1;2;3] @> |> (function Call(_,mi,_) -> mi.DeclaringType.Name, mi.Name);; val it : string * string = ("ListModule", "MapIndexed") How can this match be rewritten to return ("List", "mapi")? Is it possible?

    Read the article

  • start-stop-daemon quoted arguments misinterpreted

    - by Martin Westin
    Hi, I have been trying to make an init script using start-stop-daemon. I am stuck on the arguments to the daemon. I want to keep these in a variable at the top of the script but I can't get the quotations to filter down correctly. I'll use ls here so we don't have to look at binaries and arguments that most people wont know or care about. The end result I am looking for is for start-stop... to run ls -la "/folder with space/" DAEMON=/usr/bin/ls DAEMON_OPTS='-la "/folder with space/"' start-stop-daemon --start --make-pidfile --pidfile $PID --exec $DAEMON -- $DAEMON_OPTS Double escaping the options and trying innumerable variations of quotations do not help... Then they end up at the daemon they are always messed up. Enclosing $DAEMON_OPTS in quotes changes things... then they are seen as one since quote... never the right number though :) Echoing the command-line (start-stop...) prints exactly the right stuff to screen. But the daemon (the real one, not ls) complains about the wrong number of arguments. How do I specify a variable so that quotes inside it are brought along to the daemon correctly? Thanks, Martin

    Read the article

  • How to Choose a Web Developer to Create Your Online Template Site

    Online template systems are found online, and, typically offer you an "easy" and inexpensive way to build your website. Notice the quotations about easy. The actual process of building and maintaining the online template site might not feel like it's easy and inexpensive. The reality is that, in most cases, it really is easier to use an online template system than it is to start a new website from scratch. Also, you can get a site up much more quickly because the internal structure and background images of the site are already done. However, you should choose a developer that has some experience in this area.

    Read the article

1 2 3  | Next Page >