Search Results

Search found 167 results on 7 pages for 'lexical analyser'.

Page 5/7 | < Previous Page | 1 2 3 4 5 6 7  | Next Page >

  • Discuss: PLs are characterised by which (iso)morphisms are implemented

    - by Yttrill
    I am interested to hear discussion of the proposition summarised in the title. As we know programming language constructions admit a vast number of isomorphisms. In some languages in some places in the translation process some of these isomorphisms are implemented, whilst others require code to be written to implement them. For example, in my language Felix, the isomorphism between a type T and a tuple of one element of type T is implemented, meaning the two types are indistinguishable (identical). Similarly, a tuple of N values of the same type is not merely isomorphic to an array, it is an array: the isomorphism is implemented by the compiler. Many other isomorphisms are not implemented for example there is an isomorphism expressed by the following client code: match v with | ((?x,?y),?z = x,(y,z) // Felix match v with | (x,y), - x,(y,z) (* Ocaml *) As another example, a type constructor C of int in Felix may be used directly as a function, whilst in Ocaml you must write a wrapper: let c x = C x Another isomorphism Felix implements is the elimination of unit values, including those in tuples: Felix can do this because (most) polymorphic values are monomorphised which can be done because it is a whole program analyser, Ocaml, for example, cannot do this easily because it supports separate compilation. For the same reason Felix performs type-class dispatch at compile time whilst Haskell passes around dictionaries. There are some quite surprising issues here. For example an array is just a tuple, and tuples can be indexed at run time using a match and returning a value of a corresponding sum type. Indeed, to be correct the index used is in fact a case of unit sum with N summands, rather than an integer. Yet, in a real implementation, if the tuple is an array the index is replaced by an integer with a range check, and the result type is replaced by the common argument type of all the constructors: two isomorphisms are involved here, but they're implemented partly in the compiler translation and partly at run time.

    Read the article

  • Atelier gratuit : Découvrir la solution d'exploration de données structuré et non structuré

    - by David lefranc
    Explorer et découvrir l’information… Nous vous proposons un atelier découverte pour vous permettre d’explorer toute type de données grace à la solution Oracle Endeca Information Discovery. Quand : 7 Décembre 2012 De 9h30 à 12h30  Lieu : Oracle 15 Boulevard Charles de gaulle 92715 Colombes Pour s'inscrire : [email protected] Réalisé pour des utilisateurs métiers, cet atelier vous permettera en une demi journée , de découvrir Oracle Endeca Information Discovery afin de : Comprendre et explorer toute information venant de différents horizons ( Big Data, réseaux sociaux, forums, sondages, blogs..) Découvrir en quoi et comment OEID est un complément à des solutions de BI classiques Par une navigation simple et rapide, vous découvrirez combien il est facile de trouver des réponses à des questions imprévues en utilisant OEID sans formation préalable. Utilisez la recherche et la navigation guidée pour voir comment les informations structurées et non structurées peuvent être rapidement réunies pour dégager la valeur cachée. Explorer toutes vos données dans n'importe quel format et à partir de n'importe quelle source, y compris les médias sociaux, documents, fichiers,…. Pouvoir découvrir et explorer vos données sans référentiel pour permettre aux utilisateurs d’être autonome et d’analyser leurs propres données de manière rapide Élaborer une stratégie visant à accroître la valeur des données de l'entreprise tout en réduisant le coût total de possession Découvrez l'incroyable performance d’ Endeca sur Oracle Exalytics la machine In Memory Agenda Après une introduction sur la solution Oracle information Endeca, suivi d’un atelier, vous verrez comment il est facile de: Utiliser la navigation guidée et le moteur de recherche pour explorer les données structurées et non structurées intégrer rapidement les nouvelles sources de données comme les médias sociaux Construire de nouvelles interfaces utilisateur tout en découvrant l’information répondre rapidement aux besoins changeants des entreprises et des environnements de données Quand Lieu 7 Décembre 2012 De 9h30 à 12h30 Oracle 15 Boulevard Charles de gaulle 92715 Colombes

    Read the article

  • Language parsing to find important words

    - by Matt Huggins
    I'm looking for some input and theory on how to approach a lexical topic. Let's say I have a collection of strings, which may just be one sentence or potentially multiple sentences. I'd like to parse these strings to and rip out the most important words, perhaps with a score that denotes how likely the word is to be important. Let's look at a few examples of what I mean. Example #1: "I really want a Keurig, but I can't afford one!" This is a very basic example, just one sentence. As a human, I can easily see that "Keurig" is the most important word here. Also, "afford" is relatively important, though it's clearly not the primary point of the sentence. The word "I" appears twice, but it is not important at all since it doesn't really tell us any information. I might expect to see a hash of word/scores something like this: "Keurig" => 0.9 "afford" => 0.4 "want" => 0.2 "really" => 0.1 etc... Example #2: "Just had one of the best swimming practices of my life. Hopefully I can maintain my times come the competition. If only I had remembered to take of my non-waterproof watch." This example has multiple sentences, so there will be more important words throughout. Without repeating the point exercise from example #1, I would probably expect to see two or three really important words come out of this: "swimming" (or "swimming practice"), "competition", & "watch" (or "waterproof watch" or "non-waterproof watch" depending on how the hyphen is handled). Given a couple examples like this, how would you go about doing something similar? Are there any existing (open source) libraries or algorithms in programming that already do this?

    Read the article

  • How do I create my own programming language and a compiler for it

    - by Dave
    I am thorough with programming and have come across languages including BASIC, FORTRAN, COBOL, LISP, LOGO, Java, C++, C, MATLAB, Mathematica, Python, Ruby, Perl, JavaScript, Assembly and so on. I can't understand how people create programming languages and devise compilers for it. I also couldn't understand how people create OS like Windows, Mac, UNIX, DOS and so on. The other thing that is mysterious to me is how people create libraries like OpenGL, OpenCL, OpenCV, Cocoa, MFC and so on. The last thing I am unable to figure out is how scientists devise an assembly language and an assembler for a microprocessor. I would really like to learn all of these stuff and I am 15 years old. I always wanted to be a computer scientist someone like Babbage, Turing, Shannon, or Dennis Ritchie. I have already read Aho's Compiler Design and Tanenbaum's OS concepts book and they all only discuss concepts and code in a high level. They don't go into the details and nuances and how to devise a compiler or operating system. I want a concrete understanding so that I can create one myself and not just an understanding of what a thread, semaphore, process, or parsing is. I asked my brother about all this. He is a SB student in EECS at MIT and hasn't got a clue of how to actually create all these stuff in the real world. All he knows is just an understanding of Compiler Design and OS concepts like the ones that you guys have mentioned (i.e. like Thread, Synchronization, Concurrency, memory management, Lexical Analysis, Intermediate code generation and so on)

    Read the article

  • The most mind-bending programming language?

    - by Xepoch
    From a reasonably common programming language, which do you find to be the most mind-bending? I have been listening to a lot of programming podcasts and taking some time to learn some new languages that are being considered upcoming, and important. I'm not necessarily talking about BrainFuck, but which language would you consider to be one that challenges the common programming paradigms? For me, I did some functional and logic (ex. Prolog) programming in the 90s, so can't say that I find anything special there. I am far from being an expert in it, but even today the most mind-bending programming language for me is Perl. Not because "Hello World" is hard to implement but rather there is so much lexical flexibility that some of the hardest solutions can be decomposed so poetically that I have to walk outside away from my terminal to clear my head. I'm not saying I'd likely sell a commercial software implementation, just that there is a distinct reason Perl is so (in)famous. Just look at the basic list of books on it. So, what is your mind-bending language that promotes your better programming and practices?

    Read the article

  • The most mind-bending programming language? [closed]

    - by Xepoch
    From a reasonably common programming language, which do you find to be the most mind-bending? I have been listening to a lot of programming podcasts and taking some time to learn some new languages that are being considered upcoming, and important. I'm not necessarily talking about BrainFuck, but which language would you consider to be one that challenges the common programming paradigms? For me, I did some functional and logic (ex. Prolog) programming in the 90s, so can't say that I find anything special there. I am far from being an expert in it, but even today the most mind-bending programming language for me is Perl. Not because "Hello World" is hard to implement but rather there is so much lexical flexibility that some of the hardest solutions can be decomposed so poetically that I have to walk outside away from my terminal to clear my head. I'm not saying I'd likely sell a commercial software implementation, just that there is a distinct reason Perl is so (in)famous. Just look at the basic list of books on it. So, what is your mind-bending language that promotes your better programming and practices?

    Read the article

  • How do I create my own programming language and a compiler for it

    - by Dave
    I am thorough with programming and have come across languages including BASIC, FORTRAN, COBOL, LISP, LOGO, Java, C++, C, MATLAB, Mathematica, Python, Ruby, Perl, Javascript, Assembly and so on. I can't understand how people create programming languages and devise compilers for it. I also couldn't understand how people create OS like Windows, Mac, UNIX, DOS and so on. The other thing that is mysterious to me is how people create libraries like OpenGL, OpenCL, OpenCV, Cocoa, MFC and so on. The last thing I am unable to figure out is how scientists devise an assembly language and an assembler for a microprocessor. I would really like to learn all of these stuff and I am 15 years old. I always wanted to be a computer scientist some one like Babbage, Turing, Shannon, or Dennis Ritchie. I have already read Aho's Compiler Design and Tanenbaum's OS concepts book and they all only discuss concepts and code in a high level. They don't go into the details and nuances and how to devise a compiler or operating system. I want a concrete understanding so that I can create one myself and not just an understanding of what a thread, semaphore, process, or parsing is. I asked my brother about all this. He is a SB student in EECS at MIT and hasn't got a clue of how to actually create all these stuff in the real world. All he knows is just an understanding of Compiler Design and OS concepts like the ones that you guys have mentioned (ie like Thread, Synchronisation, Concurrency, memory management, Lexical Analysis, Intermediate code generation and so on)

    Read the article

  • ADF Logging In Deployed Apps

    - by Duncan Mills
    Harking back to my series on using the ADF logger and the related  ADF Insider Video, I've had a couple of queries this week about using the logger from Enterprise Manager (EM). I've alluded in those previous materials to how EM can be used but it's evident that folks need a little help.  So in this article, I'll quickly look at how you can switch logging on from the EM console for an application and how you can view the output.  Before we start I'm assuming that you have EM up and running, in my case I have a small test install of Fusion Middleware Patchset 5 with an ADF application deployed to a managed server. Step 1 - Select your Application In the EM navigator select the app you're interested in: At this point you can actually bring up the context ( right mouse click) menu to jump to the logging, but let's do it another way.  Step 2 - Open the Application Deployment Menu At the top of the screen, underneath the application name, you'll find a drop down menu which will take you to the options to view log messages and configure logging, thus: Step 3 - Set your Logging Levels  Just like the log configuration within JDeveloper, we can set up transient or permanent (not recommended!) loggers here. In this case I've filtered the class list down to just oracle.demo, and set the log level to config. You can now go away and do stuff in the app to generate log entries. Step 4 - View the Output  Again from the Application Deployment menu we can jump to the log viewer screen and, as I have here, start to filter down the logging output to the stuff you're interested in.  In this case I've filtered by module name. You'll notice here that you can again look at related log messages. Importantly, you'll also see the name of the log file that holds this message, so it you'd rather analyse the log in more detail offline, through the ODL log analyser in JDeveloper, then you can see which log to download.

    Read the article

  • CodePlex Daily Summary for Wednesday, November 30, 2011

    CodePlex Daily Summary for Wednesday, November 30, 2011Popular ReleasesLINQ to Twitter: LINQ to Twitter Beta v2.0.22: New support for Windows Phone 7.1, 100% Twitter API coverage.Anno 2070 Assistant: Anno 2070 Assistant v1.1: Anno 2070 Assistant v1.1 Released! Features Included: Building Layouts for Ecos, Tycoons & Techs Production Chains for Ecos, Tycoons & Techs Supply Calculator New Features: The new supply calculator will tell you how many of each production chain you need to sustain the current population. Simply plot in your total inhabitants of each type and calculate! Coming in v2.0: Population Calculator Port from hard coded data to XML data Calculate by Residence Feature and some more secret ...Rawr: Rawr 4.3.0: This is the Downloadable WPF version of Rawr!For web-based version see http://elitistjerks.com/rawr.php You can find the version notes at: http://rawr.codeplex.com/wikipage?title=VersionNotes Rawr AddonWe now have a Rawr Official Addon for in-game exporting and importing of character data hosted on Curse. The Addon does not perform calculations like Rawr, it simply shows your exported Rawr data in wow tooltips and lets you export your character to Rawr (including bag and bank items) like Char...BugNET Issue Tracker: BugNET 0.9.131: This is a bug fix release for 0.9 that fixes a number of pressing issues. FixesBGN-1989 - User verification is not working on the latest release BGN-1988 - Send password notification does not include the actual password and throws an error BGN-1987 - Issues revisions stop being updated BGN-1985 - Search by issue id no longer works Fixed issue when user is not authenticated and clicks on the Vote link the user is redirected to page not found (wrong location for the Login.aspx page) N...QuickStart Engine (3D Game Engine for XNA): QuickStart Engine v0.23: Main FeaturesXNA 4.0 compatible Clean engine architecture Makes it easy to make your own game using the engine. Messaging system allows you to communicate between systems and other entities without coupling your code in ways you wouldn't want to. Entity/Component system allows you to make your own objects and customize them very easily. Terrain engine Quad-tree culling Multi-texture splatting Multi-texture normal mapping Smoothing and scaling Physics engine integration Uses Ji...Windows Azure Toolkit for Windows Phone: Windows Azure Toolkit for Windows Phone v1.3.2: Upgraded Windows Azure projects to Windows Azure SDK for .NET – November 2011. Updated BabelCam, CRUDSqlAzure, WPCloud.ACS, and WPCloud.SQL.ACS samples to include default ACS configuration to allow developers running the samples without owning an ACS namespace.VideoLan DotNet for WinForm, WPF & Silverlight 5: VideoLan DotNet for WinForm, WPF, SL5 - 2011.11.29: The new version add and correct many features : Add Medias list property to VlcControl Correction to implement Medias list property Add PlaybackMode property to VlcControl (Loop/Repeat/Default) Remove "--play-and-pause" option in WPF sample Add MediaList Interops Add MediaListPlayer Interops Correction on Interops (error) Add MediaSubItemAdded event on MediaBaseMFCMAPI: November 2011 Release: Build: 15.0.0.1029 Full release notes at SGriffin's blog. If you just want to run the MFCMAPI or MrMAPI, get the executables. If you want to debug them, get the symbol files and the source. The 64 bit builds will only work on a machine with Outlook 2010 64 bit installed. All other machines should use the 32 bit builds, regardless of the operating system. Facebook BadgeWCF Community Site: WCF Web API Preview 6: Welcome to the sixth preview release of WCF Web API on Codeplex! Install WCF Web API Preview 6 using NuGet New Features/EnhancementsURL form encoding - Http request bodies sent as application/x-www-form-urlencoded can now deserialize into objects and participate in content negotiation. Custom OData entity keys - The ODataFormatter now supports custom conventions for determining which properties identify an entity key. [ServiceContract] is no longer required on the Web API class definiti...Devpad: 4.11: Whats new for Devpad 4.11: New Import Archive Improved Save Dialog Improved Replace Dialog Improved Go To Dialog Minor Bug Fix's, improvements and speed upsHome Access Plus+: v7.7: v7.7.1128.2200Added: ShowTo Option on Resources Added: Basic Authentication Logon Method Added: Button on the Live Tracker page to clear logons in the database but not do a remote logoff Updated: jquery from v1.6.2 to v1.7.1 Fixed: Another attempt at fixing the SIMS import in the booking system Fixed: JSON Issues with the Setup Added: More DEBUG Events to the Event Log (note DEBUG not RELEASE) Added: Support for Week A Week B instead of Week 1 and Week 2 Updated: The My Files ...CommonLibrary.NET: CommonLibrary.NET 0.9.8 - Alpha: A collection of very reusable code and components in C# 4.0 ranging from ActiveRecord, Csv, Command Line Parsing, Configuration, Holiday Calendars, Logging, Authentication, and much more. Samples in <root>\src\Lib\CommonLibrary.NET\Samples CommonLibrary.NET 0.9.8 AlphaNew Dynamic Scripting Language : workitem : 7493 Fixes 1622 6803Widget Suite for DotNetNuke: 01.04.00: The following features/enhancements are associated with this release: Bug: Removed the empty box/white space created by some widgets New Widget: FlexSlider New Widget: Google+ Button New Widget: Klout Badge Sample Widget Script FileFxCop Integrator for Visual Studio 2010: FxCop Integrator 2.0.0 RC: Replaced the MSBuild Tasks installer to fix the bug of the targets file. FxCop Integrator is not affected by this bug. (Nov 28 2011) New FeatureSupported calculating code metrics with Code Metrics PowerTool. (Work Item #6568: 6568). Provided MSBuild tasks. #7454: 7454 Supported to filter out auto-generated code from code analysis result. #7485: 7485 Supported exporting report of code analysis result. Supported multi-project analysis. Supported file level analysis. Added the featu...Terminals: Version 2 - Beta 4 Release: Beta 4 Refresh Build Dont forget to backup your config files BEFORE upgrading! As usual, please take time to use and abuse this release. We left logging in place, and this is a debug build so be sure to submit your logs on each bug reported, and please do report all bugs! Updated the About form to include the date and time of the build. Useful for CI builds to ensure we have the correct version "Favourites" and "History" save their expanded states after app restarts Code cleanup, secu...MiniTwitter: 1.76: MiniTwitter 1.76 ???? ?? ?????????? User Streams ???????????? User Streams ???????????、??????????????? REST ?????????? ?????????????????????????????? ??????????????????????????????Media Companion: MC 3.424b Weekly: Ensure .NET 4.0 Full Framework is installed. (Available from http://www.microsoft.com/download/en/details.aspx?id=17718) Ensure the NFO ID fix is applied when transitioning from versions prior to 3.416b. (Details here) Movie Show Resolutions... Resolved issue when reverting multiselection of movies to "-none-" Added movie rename support for subtitle files '.srt' & '.sub' Finalised code for '-1' fix - radiobutton to choose either filename or title Fixed issue with Movie Batch Wizard Fanart - ...Advanced Windows Phone Enginering Tool: WPE Downloads: This version of WPE gives you basic updating, restoring, and, erasing for your Windows Phone device.Microsoft Ajax Minifier: Microsoft Ajax Minifier 4.37: Fix for issue #16936 - CSS strings containing ASP.NET replacement blocks that contain the same delimiter character(s) as the CSS string cause the CSS parser to barf. Need to use the -aspnet:1 flag to treat the ASP.NET blocks as single entities. Added support for CSS3 @keyframes syntax. Added NuGet package support to the DLL project. Expand the -line switch to also optionally specify the multiline/single line mode, and the spaces-per-tab for multiline mode. Tweak the -pretty switch to be more ...Get simpler, simpler, and simpler: UI 0.1 Binary: Inklude: you can use it with lib, header and dlls. Uzing: you can use it by adding it to your project.New ProjectsArchiveBytes: ArchiveBytes is an archiving solution with rolling archive capabilities. Arduino Controller: Arduino Controller is a GUI to control and arduino wirelessly using: - XBEES - WIFI - Bluetooth All that is required is: - Arduino Controller - Your wireless technology - And an Arduino If you would like info I'm trying to put together sets that include: - Software - Arduino - And a wireless technology (your choice)Artesis - Studiegids MVC: Artesis StudiegidsAzureHost: AzureHost is a synchronization framework that makes it easy to deploy web application files to Windows Azure and keep them synchronized between Web Roles and Blob Storage. AzureHost is a fork of the Windows Azure Accelerator for Umbraco made more simple and generic.Codes Of My ACE Study: Activity-based Center ExpansionCoreGallery.NET: An extensible .NET-based photo gallery. Project has been inactive for some time and currently in very early planning/prototyping stages. Help is definitely welcome!Custom SharePoint Designer Activities for SharePoint 2010: This project adds to the power of SharePoint Designer workflows by adding additional activities that previously were not available including sending emails with attachments, custom from addresses, and much more. Created with visual studio 2010 for SharePoint 2010.Declarative command line parser: A powerful, declarative command-line parsing system in a single .cs file. This file is available as a nuget package (package id: declcmdparser) and can be easily included or excluded in your project.DevCow: This is a location for all of the community projects that help support DevCow.comejg: ejgFibo.Authority: a authority system based on nhibernate,autofac,asp.net MVC,jquery easyui and so on.Georgia Southern House Control: This is a semester project for a group of students at Georgia Southern university.JSAnalyse - Javascript Analyser and Dependency Checker: JSAnalyse - Javascript Analyser and Dependency CheckerLogger - logging for your .NET project using file, mail, debug output: A light weight yet competent logger for .NET with configurable output modules, such as log file, e-mail and debug log. Easy to add your own output module if needed.MetaEdit+ extension for Visual Studio: Visual Studio extension for integrating MetaEdit+ and Visual Studio. This extension allows you to browse MetaEdit+ models and use the main MetaEdit+ functions from Visual Studio. It can also automatically import into Visual Studio the source code generated from MetaEdit+. MonopolyPatrones: Proyecto de patrones de software universidad Javeriana ColombiaMulti-threaded simple Reversi game: XNA Reversi game supporting multi-core processors. NDuplicate: Finds duplicate code (methods) across a C# solution.Netduino-compatible embedded webserver: Embedded Webserver is a small footprint, multi-platform webserver implementation exposing IIS-like API to web enable your hobby project in four easy steps.Orchard UserReviewedItems: An Orchard module extension of the Contrib.Reviews module. Includes a orchard content part for showing the reviews that are written by the user of the current context.PivotViewer Extensions: PivotViewer Extensions is a collection of add-ons to the Silverlight 5 PivotViewer. PowerShell TFS Build Server CmdLets: A set of CmdLets for managing a Team Foundation Server (TFS) Build server through PowerShell. SABON: Simple Access Business Object Network. This is a JavaScript Library that provides quickest way on accessing HTML elements, and DOM this includes Object/Class Creator, Table Effects, Message Box, Object Pop-up, Email Notification, and caseed: Seed creates complete ASP.NET website from object oriented business model definitions. Programers serves programs? No... Programs serves programers, Yep! "Firstly, I think I will build a system with 90% solid functions, and 10% dynamiic functions, the dynamic functions is the flower blossoming from top of it."Sharpshooter: ????OOP??????,??????。Silverlight Front end calling WCF Service in Azure Web Role: I recently written a sample which has Windows Azure Web Role with Silverlight front end, calling to WCF service which is hosted in the same Windows Azure Web Role. SPWikiDialogFix: For SharePoint 2010: Fix to prevent users from receiving ‘The Ribbon Tab with id: "Ribbon.Read" has not been made available for this page or does not exist. Use Ribbon.MakeTabAvailable()’ when viewing wiki pages in dialog mode. For explanation and details, read the blog post at http://blog.furuknap.net/solving-the-ribbon-tab-with-id-ribbon-read-has-not-been-made-available-for-this-page-or-does-not-exist-use-ribbon-maketabavailable Written in C#, because you deserve it.Trinity Christian School Lunches: This is a semester project for a group of students at Georgia Southern University creating a software packages that allows a school to keep track of the lunch orders of students.wp7project: We`re just training...Zavida: C# learning curve.??: fff

    Read the article

  • 12c - Utl_Call_Stack...

    - by noreply(at)blogger.com (Thomas Kyte)
    Over the next couple of months, I'll be writing about some cool new little features of Oracle Database 12c - things that might not make the front page of Oracle.com.  I'm going to start with a new package - UTL_CALL_STACK.In the past, developers have had access to three functions to try to figure out "where the heck am I in my code", they were:dbms_utility.format_call_stackdbms_utility.format_error_backtracedbms_utility.format_error_stackNow these routines, while useful, were of somewhat limited use.  Let's look at the format_call_stack routine for a reason why.  Here is a procedure that will just print out the current call stack for us:ops$tkyte%ORA12CR1> create or replace  2  procedure Print_Call_Stack  3  is  4  begin  5    DBMS_Output.Put_Line(DBMS_Utility.Format_Call_Stack());  6  end;  7  /Procedure created.Now, if we have a package - with nested functions and even duplicated function names:ops$tkyte%ORA12CR1> create or replace  2  package body Pkg is  3    procedure p  4    is  5      procedure q  6      is  7        procedure r  8        is  9          procedure p is 10          begin 11            Print_Call_Stack(); 12            raise program_error; 13          end p; 14        begin 15          p(); 16        end r; 17      begin 18        r(); 19      end q; 20    begin 21      q(); 22    end p; 23  end Pkg; 24  /Package body created.When we execute the procedure PKG.P - we'll see as a result:ops$tkyte%ORA12CR1> exec pkg.p----- PL/SQL Call Stack -----  object      line  object  handle    number  name0x6e891528         4  procedure OPS$TKYTE.PRINT_CALL_STACK0x6ec4a7c0        10  package body OPS$TKYTE.PKG0x6ec4a7c0        14  package body OPS$TKYTE.PKG0x6ec4a7c0        17  package body OPS$TKYTE.PKG0x6ec4a7c0        20  package body OPS$TKYTE.PKG0x76439070         1  anonymous blockBEGIN pkg.p; END;*ERROR at line 1:ORA-06501: PL/SQL: program errorORA-06512: at "OPS$TKYTE.PKG", line 11ORA-06512: at "OPS$TKYTE.PKG", line 14ORA-06512: at "OPS$TKYTE.PKG", line 17ORA-06512: at "OPS$TKYTE.PKG", line 20ORA-06512: at line 1The bit in red above is the output from format_call_stack whereas the bit in black is the error message returned to the client application (it would also be available to you via the format_error_backtrace API call). As you can see - it contains useful information but to use it you would need to parse it - and that can be trickier than it seems.  The format of those strings is not set in stone, they have changed over the years (I wrote the "who_am_i", "who_called_me" functions, I did that by parsing these strings - trust me, they change over time!).Starting in 12c - we'll have structured access to the call stack and a series of API calls to interrogate this structure.  I'm going to rewrite the print_call_stack function as follows:ops$tkyte%ORA12CR1> create or replace 2  procedure Print_Call_Stack  3  as  4    Depth pls_integer := UTL_Call_Stack.Dynamic_Depth();  5    6    procedure headers  7    is  8    begin  9        dbms_output.put_line( 'Lexical   Depth   Line    Name' ); 10        dbms_output.put_line( 'Depth             Number      ' ); 11        dbms_output.put_line( '-------   -----   ----    ----' ); 12    end headers; 13    procedure print 14    is 15    begin 16        headers; 17        for j in reverse 1..Depth loop 18          DBMS_Output.Put_Line( 19            rpad( utl_call_stack.lexical_depth(j), 10 ) || 20                    rpad( j, 7) || 21            rpad( To_Char(UTL_Call_Stack.Unit_Line(j), '99'), 9 ) || 22            UTL_Call_Stack.Concatenate_Subprogram 23                       (UTL_Call_Stack.Subprogram(j))); 24        end loop; 25    end; 26  begin 27    print; 28  end; 29  /Here we are able to figure out what 'depth' we are in the code (utl_call_stack.dynamic_depth) and then walk up the stack using a loop.  We will print out the lexical_depth, along with the line number within the unit we were executing plus - the unit name.  And not just any unit name, but the fully qualified, all of the way down to the subprogram name within a package.  Not only that - but down to the subprogram name within a subprogram name within a subprogram name.  For example - running the PKG.P procedure again results in:ops$tkyte%ORA12CR1> exec pkg.pLexical   Depth   Line    NameDepth             Number-------   -----   ----    ----1         6       20      PKG.P2         5       17      PKG.P.Q3         4       14      PKG.P.Q.R4         3       10      PKG.P.Q.R.P0         2       26      PRINT_CALL_STACK1         1       17      PRINT_CALL_STACK.PRINTBEGIN pkg.p; END;*ERROR at line 1:ORA-06501: PL/SQL: program errorORA-06512: at "OPS$TKYTE.PKG", line 11ORA-06512: at "OPS$TKYTE.PKG", line 14ORA-06512: at "OPS$TKYTE.PKG", line 17ORA-06512: at "OPS$TKYTE.PKG", line 20ORA-06512: at line 1This time - we get much more than just a line number and a package name as we did previously with format_call_stack.  We not only got the line number and package (unit) name - we got the names of the subprograms - we can see that P called Q called R called P as nested subprograms.  Also note that we can see a 'truer' calling level with the lexical depth, we can see we "stepped" out of the package to call print_call_stack and that in turn called another nested subprogram.This new package will be a nice addition to everyone's error logging packages.  Of course there are other functions in there to get owner names, the edition in effect when the code was executed and more. See UTL_CALL_STACK for all of the details.

    Read the article

  • How to do a timestamp comparison with JPA query?

    - by Robert
    We need to make sure only results within the last 30 days are returned for a JPQL query. An example follows: Date now = new Date(); Timestamp thirtyDaysAgo = new Timestamp(now.getTime() - 86400000*30); Query query = em.createQuery( "SELECT msg FROM Message msg "+ "WHERE msg.targetTime < CURRENT_TIMESTAMP AND msg.targetTime > {ts, '"+thirtyDaysAgo+"'}"); List result = query.getResultList(); Here is the error we receive: <openjpa-1.2.3-SNAPSHOT-r422266:907835 nonfatal user error org.apache.openjpa.persistence.ArgumentException: An error occurred while parsing the query filter 'SELECT msg FROM BroadcastMessage msg WHERE msg.targetTime < CURRENT_TIMESTAMP AND msg.targetTime {ts, '2010-04-18 04:15:37.827'}'. Error message: org.apache.openjpa.kernel.jpql.TokenMgrError: Lexical error at line 1, column 217. Encountered: "{" (123), after : "" Help!

    Read the article

  • SAPI Speech recognition delphi

    - by XBasic3000
    I need create a programatic equivalent using delphi language... or could someone post a link on how to do grammars in peech recogniton using the delphi. sorry for my english... **Programmatic Equivalent C#:** Ref: http://msdn.microsoft.com/en-us/library/ms723634(v=VS.85).aspx To add a phrase to a rule, SAPI provides an API called ISpGrammarBuilder::AddWordTransition. The application developer can add the sentences as follows: SPSTATEHANDLE hsHelloWorld; // Create new top-level rule called "HelloWorld" hr = cpRecoGrammar->GetRule(L"HelloWorld", NULL, SPRAF_TopLevel | SPRAF_Active, TRUE, &hsHelloWorld); // Check hr // Add the command words "hello world" // Note that the lexical delimiter is " ", a space character. // By using a space delimiter, the entire phrase can be added // in one method call hr = cpRecoGrammar->AddWordTransition(hsHelloWorld, NULL, L"hello world", L" ", SPWT_LEXICAL, NULL, NULL); // Check hr // Add the command words "hiya there" // Note that the lexical delimiter is "|", a pipe character. // By using a pipe delimiter, the entire phrase can be added // in one method call hr = cpRecoGrammar->AddWordTransition(hsHelloWorld, NULL, L"hiya|there", L"|", SPWT_LEXICAL, NULL, NULL); // Check hr // save/commit changes hr = cpRecoGrammar->Commit(NULL); // Check hr XML Grammar Sample(s): <GRAMMAR> <!-- Create a simple "hello world" rule --> <RULE NAME="HelloWorld" TOPLEVEL="ACTIVE"> <P>hello world</P> </RULE> <!-- Create a more advanced "hello world" rule that changes the display form. When the user says "hello world" the display text will be "Hiya there!" --> <RULE NAME="HelloWorld_Disp" TOPLEVEL="ACTIVE"> <P DISP="Hiya there!">hello world</P> </RULE> <!-- Create a rule that changes the pronunciation and the display form of the phrase. When the user says "eh" the display text will be "I don't understand?". Note the user didn't say "huh". The pronunciation for "what" is specific to this phrase tag and is not changed for the user or application lexicon, or even other instances of "what" in the grammar --> <RULE NAME="Question_Pron" TOPLEVEL="ACTIVE"> <P DISP="I don't understand" PRON="eh">what</P> </RULE> <!-- Create a rule demonstrating repetition --> <!-- the rule will only be recognized if the user says "hey diddle diddle" --> <RULE NAME="NurseryRhyme" TOPLEVEL="ACTIVE"> <P>hey</P> <P MIN="2" MAX="2">diddle</P> </RULE> <!-- Create a list with variable phrase weights --> <!-- If the user says similar phrases, the recognizer will use the weights to pick a match --> <RULE NAME="UseWeights" TOPLEVEL="ACTIVE"> <LIST> <!-- Note the higher likelihood that the user is expected to say "recognizer speech" --> <P WEIGHT=".95">recognize speech</P> <P WEIGHT=".05">wreck a nice beach</P> </LIST> </RULE> <!-- Create a phrase with an attached semantic property --> <!-- Speaking "one two three" will return three different unique semantic properties, with different names, and different values --> <RULE NAME="UseProps" TOPLEVEL="ACTIVE"> <!-- named property, without value --> <P PROPNAME="NOVALUE">one</P> <!-- named property, with numeric value --> <P PROPNAME="NUMBER" VAL="2">two</P> <!-- named property, with string value --> <P PROPNAME="STRING" VALSTR="three">three</P> </RULE> </GRAMMAR>

    Read the article

  • Adding a sortcomparefunction to Dynamic Data Grid in flex

    - by Tom
    Hi, I am trying to create a dynamic datagrid in Flex 3, I have a list of columns a list of objects which correspond to datapoints for those columns which I fetch from a url. While the grid works perfectly fine the problem is that sorting on the columns is done in lexical order. I am aware that this can be fixed by adding a sortcomparefunction to a column, which is not easy for this case. I have tried doing var dgc:DataGridColumn = new DataGridColumn(dtf); f1[dtf] = function(obj1:Object, obj2:Object):int { return Comparators.sortNumeric(obj1[dtf],obj2[dtf]); }; dgc.sortCompareFunction = f1[dtf];` But the problem is that the function object that I am creating here is being overwritten in every iteration (as I am adding columns) and eventually all the columns will have sorting done only on the last column added. Suggestions please.

    Read the article

  • What's the best way to explain parsing to a new programmer?

    - by Daisetsu
    I am a college student getting my Computer Science degree. A lot of my fellow students really haven't done a lot of programming. They've done their class assignments, but let's be honest here those questions don't really teach you how to program. I have had several other students ask me questions about how to parse things, and I'm never quite sure how to explain it to them. Is it best to start just going line by line looking for substrings, or just give them the more complicated lecture about using proper lexical analysis, etc. to create tokens, use BNF, and all of that other stuff? They never quite understand it when I try to explain it. What's the best approach to explain this without confusing them or discouraging them from actually trying.

    Read the article

  • Lucene.NET and searching on multiple fields with specific values...

    - by Kieron
    Hi, I've created an index with various bits of data for each document I've added, each document can differ in it field name. Later on, when I come to search the index I need to query it with exact field/ values - for example: FieldName1 = X AND FieldName2 = Y AND FieldName3 = Z What's the best way of constructing the following using Lucene .NET: What analyser is best to use for this exact match type? Upon retrieving a match, I only need one specific field to be returned (which I add to each document) - should this be the only one stored? Later on I'll need to support keyword searching (so a field can have a list of values and I'll need to do a partial match). The fields and values come from a Dictionary<string, string>. It's not user input, it's constructed from code. Thanks, Kieron

    Read the article

  • How do I define functions using PLT Scheme macros?

    - by nickname
    I am trying to write a macro that defines a special class of data structure with associated functions. I know this is possible; it is done multiple times in the core language itself. As a specific example, how would I define the define-struct macro in Scheme itself. It needs to create make-struct, struct-<<field>>, etc functions. I tried doing this using define, however, this only defines the function in the macro's lexical scope. How can I actually define a function in a macro?

    Read the article

  • AppDelegate viewController memory leak?

    - by fuzzygoat
    I am just curious with regards to the correct way to create a view controller programatically. When I compile this code with the static analyser I get a leak (as you would expect) from the alloc. Should I just leave it as it needs to stay until the app exits anyways, or is there a cleaner way? - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { NSLog(@"UIApplication application:"); RectViewController *myController = [[RectViewController alloc] init]; [window addSubview:[myController view]]; [window makeKeyAndVisible]; return YES; } cheers Gary

    Read the article

  • How to sift idioms and set phrases apart from other common phrases using NLP techniques?

    - by hippietrail
    What techniques exist that can tell the difference betwen plain common phrases such as "to the", "and the" and set phrases and idioms which have their own lexical meanings such as "pick up", "fall in love", "red herring", "dead end"? Are there techniques which are successful even without a dictionary, statistical methods HMMs train on large corpora for instance? Or are there heuristics such as ignoring or weighting down "promiscuous" words which can co-occur with just about any word versus words which occur either alone or in a specific limited set of idiomatic phrases? If there are such heuristics, how do we take into account set phrases and verbal phrases which do incorporate promiscuous words such as "up" in "beat up", "eat up", "sit up", "think up"? UPDATE I've found an interesting paper online: Unsupervised Type and Token Identi?cation of Idiomatic Expressions

    Read the article

  • NSDate & Memory management

    - by iFloh
    Hi, memory management still gives me grief. This time it is an NSDate iVar that I init using NSDate *myNSDate = [[NSDate date] firstDayOfMonth]; with a method call to - (NSDate *)firstDayOfMonth { NSDateComponents *tmpDateComponents = [[NSCalendar currentCalendar] components:NSYearCalendarUnit | NSMonthCalendarUnit | NSEraCalendarUnit | NSWeekCalendarUnit | NSWeekdayOrdinalCalendarUnit fromDate:self]; [tmpDateComponents setDay:1]; [tmpDateComponents setHour:0]; [tmpDateComponents setMinute:0]; [tmpDateComponents setSecond:0]; return [[NSCalendar currentCalendar] dateFromComponents:tmpDateComponents]; } At the end of the init call the retain count is at 1 (Note the iVar is not defined as a property). When I step into the viewWillAppear method the myNSDate has vanished. I tried to do an explicit retain on it, but that only lasts until I update the iVar using the above method again. I though - ok - I add the retain to the return of the function, but that makes the leak analyser throw up an error. What am I doing wrong?

    Read the article

  • How do I read input character-by-character in Java?

    - by Jergason
    I am used to the c-style getchar(), but it seems like there is nothing comparable for java. I am building a lexical analyzer, and I need to read in the input character by character. I know I can use the scanner to scan in a token or line and parse through the token char-by-char, but that seems unwieldy for strings spanning multiple lines. Is there a way to just get the next character from the input buffer in Java, or should I just plug away with the Scanner class? Edit: forgot to say where the input is coming from. The input is a file, not the keyboard.

    Read the article

  • SQL Server Query Editors - any that warn of number of rows to be changed?

    - by ciaranarcher
    We're using SQL Server 2000 Query Analyser, and one issue we have is that very occasionally, when a user is updating our live database, they insert the incorrect/no(!) where clause. I know, not good, but it happens. Are there any editors that will warn of the number of rows that might be changed (if that is even possible) or even a way to configure an editor, if it is connected to a certain database, to prompt for confirmation before the query is run? We have a way to recover our data in the cases where we run an incorrect query, but it takes time, and I'm just seeing if there are any ways to catch the error, or at least give the user a second chance. Thanks in advance.

    Read the article

  • Sorting tab delimited text file based on multiple columns in natural way [duplicate]

    - by Vignesh
    This question already has an answer here: Sorting a column of CSV file resulting in 1123 appearing before 232 1 answer I am trying to sort a file based on all two columns Eg: chr19 1070019 1070020 chr16 869712 869713 chr1 1378131 1378132 chr12 189386 189387 chr4 254941 254942 chr16 1476500 1476501 chr2 1476810 1476811 chr19 313283 313284 chr17 595817 595818 chr18 656897 656898 chr19 1061829 1061830 I Tried sort -t $\t -k1,1 2,2 <filename> but doesn't work. I want the output to be sorted by first column and second column based on first column. I want to do a natural sort. Not lexical sorting. Eg: chr1 1378131 1378132 chr2 1476810 1476811 chr4 254941 254942 chr12 189386 189387 chr16 869712 869713 chr16 1476500 1476501 chr17 595817 595818 chr18 656897 656898 chr19 313283 313284 chr19 1061829 1061830 chr19 1070019 1070020 Anyone any idea?

    Read the article

  • habtm multiple times with the same model

    - by Ermin
    I am trying to model a publications. A publication can have multiple authors and editors. Since it is possible that one person is an author of one publication and an editor of another, no separate models for Authors and Editors: class Publication < ActiveRecord::Base has_and_belongs_to_many :authors, :class_name=>'Person' has_and_belongs_to_many :editors, :class_name=>'Person' end The above code doesn't work, because it uses the same join table. Now I now that I can specify the name of the join table, but there is a warning in the API documentation is a warning about that which I don't understand: :join_table: Specify the name of the join table if the default based on lexical order isn’t what you want. WARNING: If you’re overwriting the table name of either class, the table_name method MUST be declared underneath any has_and_belongs_to_many declaration in order to work.

    Read the article

  • Problem With Inserts of multibyte (converted to utf-8) strings in the mysql tables of utf_unicode_ci encoding

    - by user381595
    http://domainsoutlook.com/sandbox/keyword/?s=http://bhaskar.com raw example of my keyword density analyser. Every keyword shows up properly with no problems in unicode conversions etc. Now, When I am adding these words to the database column of a table, the words show up as messed up. http domainsoutlook.com/b/site/bhaskar.com.html For example on this front end page if you see there is a keyword that is shown as a blank but still occurs on the website 8 times. (It isnt empty in the database though). I have checked and there is no problem with mysql_real_escape_String...because the output stays the same before and after the word is gone through mysql_real_escape_String. Another problem was that I wanted to fix my urls for arabic language. They should be showing up as /word-{1st letter of the word}/{whole word}.html but its showing as /word-{whole word}/{1st letter of the word}.html I really need answers for these two questions.

    Read the article

  • What's a good book for learning BCPL?

    - by paxdiablo
    A long time ago, I worked on some BCPL code (very similar to C although even more basic, difficult though that is to imagine). Now, as part of a compiler course, we're going to be setting assignments for building some of the parts of the compiler (lexical and semantic analysis) and I'd like to know what the community thinks is the best book for learning about the language (and concrete why you think it's the best). Not how to write compilers for it, just on how to program in it. It'll be up to the students themselves to figure out how best to develop a compiler. We're using BCPL since the chance of people being able to plagiarise code for a compiler is very slim. Any suggestions?

    Read the article

< Previous Page | 1 2 3 4 5 6 7  | Next Page >