Search Results

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

Page 196/448 | < Previous Page | 192 193 194 195 196 197 198 199 200 201 202 203  | Next Page >

  • Database model for storing expressions and their occurrence in text

    - by lisak
    Hey, I'm doing a statistical research application. I need to store words according to 2 initial letters which is 676 combinations and each word has its number of occurrences (minimal, maximal, average) in text. I'm not sure how the model/schema should look like. There will be a lot of checking whether the keyword was already persisted. I appreciate your suggestions. Edit: I'll be using either mysql or postgresql + spring templates

    Read the article

  • Pass a pointer to a proc as an argument

    - by user146780
    I want to pass a pointer to a procedure in c++. I tried passing this LRESULT(*)(HWND, UINT, WPARAM, LPARAM) prc but it didn't work. How is this done? Thanks HWND OGLFRAME::create(HWND parent, LRESULT(*)(HWND, UINT, WPARAM, LPARAM) prc) { if(framehWnd != NULL) { return framehWnd; ZeroMemory(&rwc,sizeof(rwc)); } } By "it didn't work" I mean it's a syntax error.

    Read the article

  • Creating Tests at Runtime

    - by James Thigpen
    Are there any .NET testing frameworks which allow dynamic creation of tests without having to deal with a hokey Attribute syntax? Something like: foreach (var t in tests) { TestFx.Run(t.Name, t.TestDelegate); } But with the test reporting as you would expect... I could do something like this with RowTests et al, but that seems hokey.

    Read the article

  • Flexible array member in C-structure

    - by Arpan
    Quoting from the C-std section 6.7.2.1, struct s { int n; double d[]; }; This is a valid structure declaration. I am looking for some practical use of this kind of syntax. To be precise, how is this construct any more or less powerful than keeping a double* as the 2nd element? Or is this another case of 'you-can-do-it-in-multiple-ways'? Arpan

    Read the article

  • apex button to call a page in another application

    - by jaykio77
    I have a workspace with which I have 5 applications based on same schema. Now I want to have a main page from where I could call main pages of all these applications. I used this syntax to call home page in another application but to no avail f?p=4000:4150:&APP_SESSION. Where 4000:4150 are the values for the application and the page I want to display. Please let me know where am I making mistake.

    Read the article

  • Is there a better alternative to the Mongo shell?

    - by afvasd
    Dear Everyone, Is there a better shell than the native mongo shell? When I press UP I am seeing ^[[A . Does the shell not support last query? Tabbing in the shell does not autocomplete either. Of course, if there's a shell with syntax highlighting that would be great Is there an alternative that has the following features? (Or at least has some of them).

    Read the article

  • Can you call FB.login inside a callback from other FB methods (like FB.getLoginStatus) without triggering popup blockers?

    - by Erik Kallevig
    I'm trying to set up a pretty basic authentication logic flow with the FB JavaScript SDK to check a user's logged-in status and permissions before performing an action (and prompting the user to login with permissions if they are not)... User types a message into a textarea on my site to post to their Facebook feed and click's a 'post to facebook' button on my site. In response to the click, I check user's logged in status with FB.getLoginStatus In the callback to FB.getLoginStatus, if user is not logged in, prompt them to login (FB.login). In the callback to FB.login I then need to make sure they have the right permissions so I make a call to FB.api('/me/permissions') -- if they don't , I again prompt them to login (FB.login) The problem I'm running into is that anytime I try to call FB.login inside a callback to other FB methods, the browser seems to lose track of the origin of execution (the click) and thus will block the popup. I'm wondering if I'm missing some way to prompt the user to login after checking their status without the browser mistakenly thinking that it's not a user-initiated popup? I've currently fallen back to just calling FB.login() first regardless. The undesired side effect of this approach, however, is that if the user is already logged-in with permissions and I'm still calling FB.login, the auth popup will open and close immediately before continuing, which looks rather buggy despite being functional. It seems like checking a user's login status and permissions before doing something would be a common flow so I feel like I'm missing something. Here's some example code. <div onclick="onClickPostBtn()">Post to Facebook</div> <script> // Callback to click on Post button. function onClickPostBtn() { // Check if logged in, prompt to do so if not. FB.getLoginStatus(function(response) { if (response.status === 'connected') { checkPermissions(response.authResponse.accessToken); } else { FB.login(function(){}, {scope: 'publish_stream'}) } }); } // Logged in, check permissions. function checkPermissions(accessToken) { FB.api('/me/permissions', {'access_token': accessToken}, function(response){ // Logged in and authorized for this site. if (response.data && response.data.length) { // Parse response object to check for permission here... if (hasPermission) { // Logged in with permission, perform some action. } else { // Logged in without proper permission, request login with permissions. FB.login(function(){}, {scope: 'publish_stream'}) } // Logged in to FB but not authorized for this site. } else { FB.login(function(){}, {scope: 'publish_stream'}) } } ); } </script>

    Read the article

  • Good book for sql

    - by Uday
    I always considered database as a storage . but never thought it can be used for querying across tables etc. Which is a good book for sql for a developer. not just the syntax. How to write a query in different ways How internally queries are executed.etc especially related to microsoft sql server

    Read the article

  • How does pattern matching work behind the scenes in F#?

    - by kryptic
    Hello Everyone, I am completely new to F# (and functional programming in general) but I see pattern matching used everywhere in sample code. I am wondering for example how pattern matching actually works? For example, I imagine it working the same as a for loop in other languages and checking for matches on each item in a collection. This is probably far from correct, how does it actually work behind the scenes?

    Read the article

  • I'm trying to match some numbers in a string using a regexpressions and am having difficulty with th

    - by Ryan
    here is the line i'm trying to parse [\\?\Volume{d3f7f470-526b-11df-92eb-001a647802d2}\] 85 90 NotFound I'm basically just trying to get the numbers that are outside of the brackets and ignore anything in between the brackets. My original syntax worked until I realized that sometimes there would be numbers in the brackets (I was just using "([0-99]{2})") any help would be greatly appreciated. Thanks

    Read the article

  • js function to get filename from url

    - by Blankman
    Hi, I have a url like http://www.example.com/blah/th.html I need a javascript function to give me the 'th' value from that. All my urls have the same format (2 letter filenames, with .html extension). I want it to be a safe function, so if someone passes in an empty url it doesn't break. I know how to check for length, but I should be checking for null to right?

    Read the article

  • GCommit doesn't work with fugitive.vim under windows xp?

    - by Paul Wicks
    I've just discovered fugitive.vim, which is pretty cool. However, I've run into a problem (this is using windows xp, msys git 1.7, fugitive.vim 1.1, and gvim 7.2). Adding files to the index and checking the status works just fine, but when I do a :GCommit, a command prompt flashes for a second and nothing happens. No way to type a commit message and nothing is committed. Is this a bug? Am I doing something wrong?

    Read the article

  • Escapeing values in PDO statements

    - by Pardoner
    Doesn't prepare() escape any quotes(') in a PDO statement? For some reason when I do this: $sql = "INSERT INTO sessions (id, name) VALUES (1,'O'brian')"; $query = $this->connection->prepare($sql); $query->execute(); I get this error: Could not insert record SQLSTATE[42000]: [Microsoft][SQL Server Native Client 10.0][SQL Server]Incorrect syntax near 'brian'. How could this be if I'm using prepare()?

    Read the article

  • Javascript setFullYear

    - by user187870
    var currentDate=new Date(); currentDate.setFullYear(2011); alert(currentDate); == this works, it sets the year to 2011 as expected. alert((new Date()).setFullYear(2011)); == this one doesn't work. Any idea why? Am I misunderstanding the syntax?

    Read the article

  • Getting a list of all children of a given commit

    - by intuited
    I'd like to run git filter-branch on all children of a given commit. This doesn't seem to be an easy task, since there doesn't appear to be a way to tell git rev-list to only return children of a particular commit. Using the .. syntax won't work because it will also include the parent commits of any merge within that range. Am I missing something here?

    Read the article

  • Why don't web browsers have built in validators?

    - by August Karlstrom
    As far as I know there is no web browser with built in validators for HTML, CSS and JavaScript. Developing web pages without validation is like using a compiler that doesn't do syntax analysis. Even Firefox with its excellent plugins aimed at developers like Firebug lacks plugins for CSS and JavaScript validation. Wouldn't it be useful to have these plugins? Am I missing something?

    Read the article

  • what's the use of 0 in wait system call?

    - by Supereme
    Hi, The syntax for the wait system call is pid= wait(&var) where pid is the process id of child and var is the variable which will contain the reason for exiting child. But what happens when we use wait((int *)0)? What does it exactly mean? Thank you.

    Read the article

  • How to pass some data to JQuery AJAX in CAKEPHP

    - by kwokwai
    Hi all, I am learning how to use JQuery to help check data availability. To start with it, I wrote a few lines of codes using cakePHP. I have written a function in a Controller for checking data input, and the URL is like this: http://www.mywebsite.com/controllers/action/avariable I was trying to pass the value in a Input TextBox field using the JQuery Ajax to the URL above,but I don't know why it is not working in passing a variable to the Controller's action. Could you help me out please? <Script language="javascript"> //<!-- $(document).ready(function(){ $(document).change(function() { var usr = $("#data\\[User\\]\\[name\\]").val(); if(usr.length >= 3){ $("#username").append('<span><img align="absmiddle" src="loader.gif" />Checking</span>'); $.ajax({ type: "POST", url: "http://www.mywebsite.com/controllers/action/", data: usr, success: function(msg){ if(msg == 'OK') { $("#username").append('<span><img align="absmiddle" src="accepted.png"/></span>'); } else { $("#username").append('<span>'+msg+'</span>'); } } }); } else { $("#username").append('<span>The username should have at least 3 characters.</span>'); } }); }); //--> </Script> <form name="adduser" id="adduser" method="post" action="/controllers/action2"> <table border=0 width="100%"> <tr> <td>Username</td> <td> <div id="username"> <input type=text name="data[User][name]" id="data[User][name]"> </div> </td> </tr> <tr> <td> <input type="submit" value="Send"> </td> </tr> </table> </form>

    Read the article

  • Find an element by class name, from a known parent element

    - by user246114
    Hi, I want to find an element by class name. I know it will appear in a particular parent div, so rather than search the entire dom, I'd like to search only the particular div. I am trying this, but does not seem to be the correct syntax: var element = $("#parentDiv").(".myClassNameOfInterest"); what's the right way to do that? Thanks

    Read the article

  • How do I use multiple precisions in printf()?

    - by Tommy
    Looking at the information under the heading "Precision can be omitted or be any of:". The example: printf("%.*s", 3, "abcdef"); works, outputting:abc (truncating the rest of the string.) Now, I would like to have a string with multiple parameters formatted (truncated): printf("%.*s, %.*s", 3, 3, "abcdef", "xyz123"); but the program crashes. What is the correct syntax? Thank You.

    Read the article

  • What is DEFAULT_CC in function declaration?

    - by humoeba
    I'm relatively new to C, and am curious what this syntax means in a function declaration: int DEFAULT_CC foo(void) where DEFAULT_CC is probably defined somewhere else as: #define DEFAULT_CC "cc" Is this a direction to use a certain compiler or something?

    Read the article

< Previous Page | 192 193 194 195 196 197 198 199 200 201 202 203  | Next Page >