check

How to check the items in contextual menu in cocoa

How to check the items in contextual menu in cocoa i want to place a checkmark next to specific items I was added menu like shown below in mouseDown function, (void)mouseDown:(NSEvent *)event { NSPoint pointInView = [self convertPoint:[event locationInWindow] fromView:nil]; if (NSPointInRect(pointInView, [self shapeRect]) ) { ...

Multiple value checks using 'in' operator (Python)

if 'string1' in line: ... ... works as expected but what if I need to check multiple strings like so: if 'string1' or 'string2' or 'string3' in line: ... ... doesn't seem to work. ...

Rails check if IRB console or webpage

I my model I would like to check if the app is running inside IRB consol or as a website? class MyModel < ActiveRecord::Base def xmethod if !isIRBconsol self.user_id = UserSession.find.user.id end end end ...

PHP How to check if you can afford it?

Hello. I have this: $scCost = $row["gpsc"]; mysql_query(" UPDATE member_profile SET points = points-$scCost WHERE user_id = '".mysql_real_escape_string($userid)."' ") or die(mysql_error()); That takes do the user´s points - scCost. How do i check if the user can afford it or not? So, if the user...

xUnit testing framework for C

Hi all! I'm developing a fairly simple C project for an embedded device. I'd like to employ xUnit testing. I've settled down with the Check framework (http://check.sourceforge.net/), but it seems it doesn't support function stubs. I remember using a very syntactically similar framework a few years ago that supported stubs, but i can't r...

CHECK mysql not working (no error)

CREATE TABLE batsman ( InningId int NOT NULL, PlayerId int NOT NULL, BatsmanOrder int(2) NOT NULL, BatScore int NOT NULL default 0, Balls int NOT NULL default 0, sixes int NOT NULL default 0, fours int NOT NULL default 0, `out` varchar(10) NOT NULL, /*Foreign*/ catcher int, /*Foreign*/ bowler int, /*Foreign*/ Primar...

Create IBM DB2 CHECK for date greater or equal current date

I'm trying to create a table with a field that has a starting date, I want to put in a check to mkae sure that a date before today cannot be entered in. This is the code i have so far for that table CREATE TABLE client_service ( NHS_num Varchar(10) NOT NULL, service_id Integer NOT NULL, starting_date Date NOT NULL CHECK(star...

How does the gcc option -fstack-check exactly work?

My program crashed when I added the option -fstack-check and -fstack-protector. __stack_chk_fail is called in the back trace. So how could I know where the problem is ? What does -fstack-check really check ? The information about gcc seems too huge to find out the answer. ...

RepositoryItemCheckEdit to get value

Hi I have a GridView that has a column with RepositoryItemCheckEdit as ColumnEdit. I want to go get the value "True" and "False" once user click on the check box. what event should i use and how to i get the value. please if anyone can help is urgent. ...

what is the difference between triggers, assertions and checks (in database)

Can anybody explain (or suggest a site or paper) the exact difference between triggers, assertions and checks, and also describe where I should use them? EDIT: I mean in database, not in any other system or language. ...

What to use to check html links in large project, on Linux?

I have directory with > 1000 .html files, and would like to check all of them for bad links - preferably using console. Any tool you can recommend for such task? ...

highlight parent window text when spell checking from child window

I'm working on a simple spell checking app for a lecture that I'm giving. I've got the basic spell checking code working just fine using a child form and NHunspell - great lib, by the way. However, I'd like for the parent textbox to show the highlighted text for reference, and while I'm setting the SelectedText properties accordingly, ...

WPF Check/Uncheck all checkboxes located in a gridview

Hi! I have a gridview with some columns. One of these columns is checkbox type. Then I have two buttons in my UI, one for check all and another for uncheck all. I would like to check all checkboxes in the column when I press the a button and uncheck all checkboxes when I press the another one. How can I do this? Some snippet code: ...

How to check if form input has value

Hi, I'm trying to check if a form input has any value (doesn't matter what the value is) so that I can append the value to the action URL on submit if it does exist. I need to add the name of the param before adding the value, and just leaving a blank param name like "P=" without any value messes up the page. Here's my code: function ...

Fastest way to check array items existence in mySQL table

User writes a series of tags (, separated) and posts the form. I build an array containing the tags and delete dupes with array_unique() php function. I'm thinking of doing: go through the array with foreach($newarray as $item) { ... } check each $item for existence in the tags mySQL table if item does not exists, insert into ...

Check file stamp using FTP to see if it is today's file.

Hi, I am using FTP (plain version) to download files from a server. The name of the file is always the same. All I can do to check to know if it is today's file is look at the timestamp manually. How can I write FTP script to check if the time stamp is having today's date? If you have come across this situation and have solved it, plea...

Radion button unclickable / uncheckable due to jQuery script (slider)

I'm using a jQuery slider script to show and hide content. The script works perfectly but has one downside: radio buttons inside the sliding div are unclickable / cannot be checked. If you hit the radio button of "Keuzerondjes" or "Selectievakjes", you'll see a div slides out - and that the radio button you just hit isn't checked. Does...

What happened to the CSS Checker tool?

I used it before, and was reminded of it when someone asked about a tool to strip unsused CSS from a stylsheet. I went back to the link, but it's gone, what happened to it? Is it gone forever or does anyone know of a backup? Or a similar tool that can still check your CSS against the HTML and strip orphan CSS. Thanks. Link (to broken...

Ajax in UserControl

Hi i have a signup page and i want to check username exists or not with ajax <%@ Control Language="C#" AutoEventWireup="true" CodeFile="Simple.ascx.cs" Inherits="UserControls_Simple" %> نام کاربری: کلمه عبور i eant to show label if user exists how can i do that? tnx ...

What does it mean "regular file" according to S_ISREG C/C++ ?

Hello all, Let's consider the following 3 code lines: struct stat buffer; status = lstat(file.c_str(), &buffer); bool Flag = S_ISREG(buffer.st_mode) When S_ISREG() returns true it tells you that the file is a regular file What does regular means exactly ? Thanks ...