» Home » checking » Page 1
Issue checking if entry in table already exists by checking zone, date and hour
by tobybot in Programming Languages

I have a database with a table in which I store several values along with the zone to which it belongs, the date it is from, and the hour it is from. The table will get updated periodically, from a source that may contain both new and old data I already have, new data will be inserted, old data I already stored will be updated, since it may have changed from the time it was created and I need t

Build problems with Visual C++ project after checking in and checking out from CVS
by toutatis in C & C++ & C#

I am building a cross platform product and one of the requirements is across windows(win32,AMD64 and IA61). The product as is relatively simple CLI but we have a separate build team who checks out the code from CVS and build in separate build environments. I am able to build succesfully(using Visual C++ 2005) in one platform(AMD machine). But once I check in the code, check out the build fails.

iphone sdk - how do i do this if else checking logic. checking an NSMutableArray for a possible value against parsed xml
by Xpto in Programming Languages

hi guys , lets say i have an array with 5 Strings = "1","2","3","4","5".
Im also doing parsing of xml. So how do i check whether a parse xml value is the same value of either one of the objects IN the array?

PHP input filtering - checking ascii vs checking utf8
by Israel in Development Tools & Services

I need to insure that all my strings are utf8. Would it be better to check that input coming from a user is ascii-like or that it is utf8-like?

function is_ascii($str) {
return ! preg_match('/[^x00-x7F]/S', $str);
function seems_utf8($Str) {
for ($i=0; $i<strlen($Str); $i++) {
if (ord($Str[$i]) < 0x80

Checking another field at the same time as checking a many-to-many relationship
by WiseUp216 in Web Design

I have a simple-ish ownership design on one of my models. It can be owned by multiple people and current owners can add other people but they have to confirm the invite before they are treated as a real owner.

class MyOwnedThing(models.Model):
owners = models.ManyToManyField(User, through='Ownership', related_name='othings')
def is_owner(self, user):

Is there a more concise way of checking a property exists and then checking it's value?
by Flapdrol1337 in Programming Languages

I have the following code:

property_exists($foo,'bar') && 'x' === $foo->bar)

I want to stay away from @$foo->bar syntax since it's just bad form.

But I don't want to have to have $foo and bar on the line twice, it seems unnecessary.

Checking/un-checking a checkbox with jQuery
by vi edit in Web Design

I am trying to toggle a checkbox between checked and un-checked using the following code, but it seems to only un-check.

var checkbox = $this.find('[name="category"]');
if ('checkbox:checked') {
checkbox.prop("checked", false);
} else {
checkbox.prop("checked", true);

How can I make it toggle correctly?

Is there

Checking for string matches using hashes, without double-checking the entire string
by pulkizine in Coding

I'm trying to check if two strings are identical as quickly as possible. Can I protect myself from hash collisions without also comparing the entire string?

I've got a cache of items that are keyed by a string. I store the hash of the string, the length of the string, and the string itself. (I'm currently using djb2 to generate the hash.)

To check if an input string is

Checking If a String Contains a Word and Then Checking If It Starts With said Word and If It Doesnt?
by mii in Programming Languages

Having another tough one here guys, basically I would like to check if a string contains the word "Foo" and if it does contain it, does it start with it? If it does start with Foo, it should be the only Foo that starts with a capital, all others should be small letters.

If the above criteria is met, it should return true.

If the string contains Foo but doesn't start with

How much slower is drawing to a transparent canvas and checking if point is transparent than checking if point is in a complex polygon?
by Vijayant Singh in Web Design

This is more of a generic question to be honest, just wondering if anyone has done any sort of research on the subject.

Basically I am adding event support to a small game engine I am creating for my own personal use. I would like pixel perfect hover over 2d object event support and am just thinking of the best way of doing it. Realistically it would be faster for me personally just

Privacy Policy - Copyrights Notice - Feedback - Report Violation - RSS 2017 © bighow.org All Rights Reserved .