Search Results

Search found 1147 results on 46 pages for 'strict'.

Page 2/46 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • How do you write Valid XHTML 1.0 Strict code when you are using javascript to fill an element that r

    - by Tim Visher
    I'm running my site through the W3C's validator trying to get it to validate as XHTML 1.0 Strict and I've gotten down to a particularly sticky (at least in my experience) validation error. I'm including certain badges from various services in the site that provide their own API and code for inclusion on an external site. These badges use javascript (for the most part) to fill an element that you insert in the markup which requires a child. This means that in the end, perfectly valid markup is generated, but to the validator, all it sees is an incomplete parent-child tag which it then throws an error on. As a caveat, I understand that I could complain to the services that their badges don't validate. Sans this, I assume that someone has validated their code while including badges like this, and that's what I'm interested in. Answers such as, 'Complain to Flickr about their badge' aren't going to help me much. An additional caveat: I would prefer that as much as possible the markup remains semantic. I.E. Adding an empty li tag or tr-td pair to make it validate would be an undesirable solution, even though it may be necessary. If that's the only way it can be made to validate, oh well, but please lean answers towards semantic markup. As an example: <div id="twitter_div"> <h2><a href="http://twitter.com/stopsineman">@Twitter</a></h2> <ul id="twitter_update_list"> <script type="text/javascript" src="http://twitter.com/javascripts/blogger.js"></script> <script type="text/javascript" src="http://twitter.com/statuses/user_timeline/stopsineman.json?callback=twitterCallback2&amp;count=1"></script> </ul> </div> Notice the ul tags wrapping the javascript. This eventually gets filled in with lis via the script, but to the validator it only sees the unpopulated ul. Thanks in advance!

    Read the article

  • How to test PHP in MySQL Strict

    - by Ben Sinclair
    I had a client who had MySQL Strict which brought up a few errors in my MySQL code... I didn't even know there was a MySQL Strict. I've fixed up a lot of the issues but I want to run some further tests on my local server. How do I enable MySQL Strict for testing purposes and then disable it when I no longer want it?

    Read the article

  • Strict pointer aliasing: is access through a 'volatile' pointer/reference a solution?

    - by doublep
    On the heels of a specific problem, a self-answer and comments to it, I'd like to understand if it is a proper solution, workaround/hack or just plain wrong. Specifically, I rewrote code: T x = ...; if (*reinterpret_cast <int*> (&x) == 0) ... As: T x = ...; if (*reinterpret_cast <volatile int*> (&x) == 0) ... with a volatile qualifier to the pointer. Let's just assume that treating T as int in my situation makes sense. Does this accessing through a volatile reference solve pointer aliasing problem? For a reference, from specification: [ Note: volatile is a hint to the implementation to avoid aggressive optimization involving the object because the value of the object might be changed by means undetectable by an implementation. See 1.9 for detailed semantics. In general, the semantics of volatile are intended to be the same in C++ as they are in C. — end note ] EDIT: The above code did solve my problem at least on GCC 4.5.

    Read the article

  • XSLT nowrap and XHTML 1.0 Strict

    - by cc96ai
    we have XSLT to transform XML into HTML in XHTML 1.0 Strict in XSLT <td colspan="3" nowrap="nowrap"> HTML output will be <td colspan="3" nowrap="nowrap"> however it will failure in XHTML 1.0 Strict check. how XSLT can I generate into <td colspan="3" nowrap>

    Read the article

  • what's an option strict and explicit?

    - by Ygam
    I saw this post: "Typos… Just use option strict and explicit please.. during one software development project, which I was on as a consultant, they were getting ridiculous amounts of errors everywhere… turned out the developer couldn’t spell and would declare variables with incorrect spelling.. no big deal, until you use the correct spelling when you’re assigning a value to it… and you had option explicit off. Ouch to them…" what is an option strict and explicit anyway? I have googled it up but can't get the idea (because mostly it's Visual Basic, I'm doing PHP)

    Read the article

  • gcc, strict-aliasing, and casting through a union

    - by Joseph Quinsey
    About a year ago the following paragraph was added to the GCC Manual, version 4.3.4, regarding -fstrict-aliasing: Similarly, access by taking the address, casting the resulting pointer and dereferencing the result has undefined behavior [emphasis added], even if the cast uses a union type, e.g.: union a_union { int i; double d; }; int f() { double d = 3.0; return ((union a_union *)&d)->i; } Does anyone have an example to illustrate this undefined behavior? Note this question is not about what the C99 standard says, or does not say. It is about the actual functioning of gcc, and other existing compilers, today. My simple, naive, attempt fails. For example: #include <stdio.h> union a_union { int i; double d; }; int f1(void) { union a_union t; t.d = 3333333.0; return t.i; // gcc manual: 'type-punning is allowed, provided ...' } int f2(void) { double d = 3333333.0; return ((union a_union *)&d)->i; // gcc manual: 'undefined behavior' } int main(void) { printf("%d\n", f1()); printf("%d\n", f2()); return 0; } works fine, giving on CYGWIN: -2147483648 -2147483648 Also note that taking addresses is obviously wrong (or right, if you are trying to illustrate undefined behavior). For example, just as we know this is wrong: extern void foo(int *, double *); union a_union t; t.d = 3.0; foo(&t.i, &t.d); // UD behavior so is this wrong: extern void foo(int *, double *); double d = 3.0; foo(&((union a_union *)&d)->i, &d); // UD behavior For background discussion about this, see for example: http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1422.pdf http://gcc.gnu.org/ml/gcc/2010-01/msg00013.html http://davmac.wordpress.com/2010/02/26/c99-revisited/ http://cellperformance.beyond3d.com/articles/2006/06/understanding-strict-aliasing.html http://stackoverflow.com/questions/98650/what-is-the-strict-aliasing-rule http://stackoverflow.com/questions/2771023/c99-strict-aliasing-rules-in-c-gcc/2771041#2771041 The first link, draft minutes of an ISO meeting seven months ago, notes in section 4.16: Is there anybody that thinks the rules are clear enough? No one is really able to interpret tham.

    Read the article

  • Strict security and virtual host isolation with Nginx?

    - by Hach-Que
    I currently have an Apache web server set up under which each virtual host is isolated using HTTPD-ITK and the AppArmor module. Each virtual host's workers are setuid/setgid by the server and are then placed in an AppArmor profile. I'm looking to use Nginx but I can't find any documentation on setting it up so that rather than the worker processes being shared between all virtual hosts, worker processes are per virtual host (and thus can be setuid / setgid). Is there any way to do this under Nginx?

    Read the article

  • Strict doctype - form and input element

    - by David
    Does anyone know the reasoning behind the strict doctype not allowing input elements to be direct descendents of a form element. I find it annoying that i have to wrap a submit button which is a block level element inside another block level element say a fieldset or a div. However, I cannot find an answer anywhere as to why this actually is.

    Read the article

  • Where are the clever uses of strict evaluation?

    - by devonrt
    It seems like there are plenty of examples of clever things being done in a lazily-evaluated language that can't be done in an environment with strict evaluation. For example infinite lists in Haskell or replacing every element in a tree with the tree's minimum value in one pass. Are there any examples of clever things being done in a strictly-evaluated language that can't easily be done in a lazily-evaluated language?

    Read the article

  • strict string to int[long]

    - by baskin
    Do we have a standard way of converting a char* to int (or long) in a strict way, i.e. we should get proper result only if all characters are digits and can fit in an int (or long) -- some way by using strtol etc.. ? Thus "sbc45", "4590k", " 56", "56 ", should be all invalid using that function.

    Read the article

  • Is there a way to make XmlDocument parsing less strict

    - by Istrebitel
    I am making a program that will store its data in an XML file. When people write XML they can make subtle mistakes, like ending a comment with - so it looks like <!-- comment ---> or adding a </>inside an attribute. Naturally, the XML still can be read all right, but trying to input this text into XmlDocument will give a syntax error (and it wont be parsed). Is there a way to make XmlDocument less strict and make it ignore violations of the standard that do not make the document unparseable? For example, its clear that <!-- comment ---> is still a comment even though it contains - at the end which is against the standard specification).

    Read the article

  • html doctype adds whitespace ??

    - by pstanton
    can someone please explain to me why having a doctype of <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> and <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"> render the following block differently under firefox? <table style="border-collapse:collapse; margin:0; padding:0;"> <tr> <td style="border:1px solid red; margin:0; padding:0;"><img src="http://images.smh.com.au/2010/06/01/1533814/th_park-90x60.jpg" style="border:none; padding:0; margin:0;" /></td> </tr> </table> using 'Transitional', there is no white space below the image, using 'Strict' there is! 2nd question, using strict, is it at all possible to remove this whitespace?

    Read the article

  • Match entities fulfilling filter (strict superset of search)

    - by Jon
    I have an entity (let's say Person) with a set of arbitrary attributes with a known subset of values. I need to search for all of these entities that match all my filter conditions. That is, given a set of Attributes A, I need to find all people that have a set of Attributes that are a superset of A. For example, my table structures look like this: Person: id | name 1 | John Doe 2 | Jane Roe 3 | John Smith Attribute: id | attr_name 1 | Sex 2 | Eye Color ValidValue: id | attr_id | value_name 1 | 1 | Male 2 | 1 | Female 3 | 2 | Blue 4 | 2 | Green 5 | 2 | Brown PersonAttributes id | person_id | attr_id | value_id 1 | 1 | 1 | 1 2 | 1 | 2 | 3 3 | 2 | 1 | 2 4 | 2 | 2 | 4 5 | 3 | 1 | 1 6 | 3 | 2 | 4 In JPA, I have entities built for all of these tables. What I'd like to do is perform a search for all entities matching a given set of attribute-value pairs. For instance, I'd like to be able to find all males (John Doe and John Smith), all people with green eyes (Jane Roe or John Smith), or all females with green eyes (Jane Roe). I see that I can already take advantage of the fact that I only really need to match on value_id, since that's already unique and tied to the attr_id. But where can I go from there? I've been trying to do something like the following, given that the ValidValue is unique in all cases: select distinct p from Person p join p.personAttributes a where a.value IN (:values) Then I've tried putting my set of required values in as "values", but that gives me errors no matter how I try to structure that. I also have to get a little more complicated, as follows, but at this point I'd be happy with solving the first problem cleanly. However, if it's possible, the Attribute table actually has a field for default value: id | attr_name | default_value 1 | Sex | 1 2 | Eye Color | 5 If the value you're searching on happens to be the default value, I want it to return any people that have no explicit value set for that attribute, because in the application logic, that means they inherit the default value. Again, I'm more concerned about the primary question, but if someone who can help with that also has some idea of how to do this one, I'd be extremely grateful.

    Read the article

  • How strict to be when using Qt framework?

    - by toffeehoops
    I'm building a Qt application that needs to use libssh, a SSH client library. libssh (understandably) performs its own network connections, however Qt has its own infrastructure for network connections (QTcpSocket etc). Should I worry about these differences? Should I be trying to make libssh make network connections via QTcpSocket... Or if it works fine on the platforms I'm targeting, is that good enough?

    Read the article

  • PHP: Profiling code and strict environment ~ Improving my coding

    - by DavidYell
    I would like to update my local working environment to be stricter in an effort to improve my code. I know that my code is okay, but as with most things there is always room for improvement. I use XAMPP on my local machine, for simplicities sake Apache Friends XAMPP (Basic Package) version 1.7.2 So I've updated my php.ini : error_reporting to be E_ALL | E_STRICT to help with the code standard. I've also enabled the XDebug extension zend_extension = "C:\xampp\php\ext\php_xdebug.dll" which seems to be working, having tested some broken code and got the nice standard orange error notice. However, having read this question, http://stackoverflow.com/questions/133686/what-is-the-best-way-to-profile-php-code and enabled the profiler, I cannot seem to create a cachegrind file. Many of the guides that I've looked at seem to think you need to install XDebug in XAMPP which leads me to think they are out of date, as XDebug is bundled with XAMPP these days. So I would appreciate it if anyone can help point me in the right direction with both configuring XDebug to output grind files, and or just a great set of default settings for the XDebug config in XAMPP. Seems there is very little documentation to go on. If people have tips on integrating these tools with Netbeans, that would be awesomesauce. I'm happy to get suggestions on other things that I can do to help tighten up my php code, both syntactically and performance wise Thanks, and apologies for the rambling question(s)! Ninja edit I should menion that I'm using named vhosts as my Apache configuration, which I think is why running XDebug on port 9000 isn't working for me. I guess I'd need to edit my vhost to include port 9000

    Read the article

  • Android strict dependency checks in SDK 17

    - by Christine
    This is not a question because I already found the answer. The new Android SDK 17 has a stricter dependency check on jar files. At the same time, they added a jar that I think wasn't there before. My project encountered a conflict between the new annotations.jar in the SDK and one that I already used. Replacing one by the other would work, if they have the same origin. My annotations.jar is from jetbrains, via a Guice dependency, so replacing it doesn't work. This is the error I got: [2012-03-22 10:54:27 - MyApp] Jar mismatch! Fix your dependencies [2012-03-22 10:54:46 - MyApp] Found 2 versions of annotations.jar in the dependency list, [2012-03-22 10:54:46 - MyApp] but not all the versions are identical (check is based on SHA-1 only at this time). [2012-03-22 10:54:46 - MyApp] All versions of the libraries must be the same at this time. [2012-03-22 10:54:46 - MyApp] Versions found are: [2012-03-22 10:54:46 - MyApp] Path: /opt/android-sdk-linux_x86/tools/support/annotations.jar [2012-03-22 10:54:46 - MyApp] Length: 1463 [2012-03-22 10:54:46 - MyApp] SHA-1: 6f59fa3a223df6f332bee8b8bffb526f7445018b [2012-03-22 10:54:46 - MyApp] Path: /home/christine/workspace/MyApp/libs/annotations.jar [2012-03-22 10:54:46 - MyApp] Length: 7593 [2012-03-22 10:54:46 - MyApp] SHA-1: e28fe9e70610beb9ef49226a9e56fed7a86e742a [2012-03-22 10:54:46 - MyApp] Jar mismatch! Fix your dependencies

    Read the article

  • More strict query yields more results?

    - by Mark
    I've got a query that looks like this affiliates = User.objects.annotate(referral_count=Count('referrals')).filter(referral_count__gt=0) But when I restrict it more by adding referrals__user__date_joined__gt=start_date to the filter, I get even higher referral counts. I'm trying to count the number of people a user has referred within a time period. The relevant model looks like this: class Profile(models.Model): user = models.ForeignKey(User, unique=True, related_name='profile') referred_by = models.ForeignKey(User, null=True, blank=True, related_name='referrals') In contrast, when I try it like this: affiliates = User.objects \ .exclude(referrals__user__date_joined__lte=sd, referrals__user__date_joined__gt=ed) \ .annotate(referral_count=Count('referrals')) \ .filter(referral_count__gt=0) The exclude statement seems to do nothing... the counts don't change (should be 0 if no referred users have joined within that time period, but it isn't).

    Read the article

  • Floating Tables Problem Unwanted Space XHTML Strict

    - by Axel Myers
    Hi I have two floating tables side by side. One is set to float left, the other one is set to float right. The problem is when two table are floating, they both are out of flow so next table comes without any spacing. So I add a width attribute clear:both. But now it gave me a lot of unwanted space! it's height set to:0 (the div's) and nothing has changed. So what's the problem ? Website url: http://www.animetr.com/prv/

    Read the article

  • output query in strict table formate in code-igniter

    - by riad
    Dear all, my code is below.it show the output in table format having no problems. But when the particular tr gets long output from database then the table break. Now how can i fixed the tr width strictly?let say i want each td cannot be more than 100px. How can i do it? Note: Here table means html table,not the database table. if ($query->num_rows() > 0) { $output = ''; foreach ($query-result() as $function_info) { if ($description) { $output .= ''.$function_info-songName.''; $output .= ''.$function_info-albumName.''; $output .= ''.$function_info-artistName.''; $output .= ''.$function_info-Code1.''; $output .= ''.$function_info-Code2.''; $output .= ''.$function_info-Code3.''; $output .= ''.$function_info-Code4.''; $output .= ''.$function_info-Code5.''; } else { $output .= ''.$function_info-songName.''; } } $output .= ''; return $output; } else { return 'Result not found.'; } thanks riad

    Read the article

  • Free server solution for strict content photos with geotags

    - by Max Gontar
    Hi! I would like to create some kind of open free "group" posting of photos with geotags First I thought about Panoramio, but seems there is no API for photos upload. By now I can see only two ways: Flickr - there are groups but you have to approve group membership anyway, or use tags for grouping which is bad for maintenance Custom server solution which will cost efforts and hosting Can you suggest other free photo services with geotags functionality, or opensource solutions? Thank you!

    Read the article

  • gcc -Wshadow is too strict?

    - by idimba
    In the following example: class A { int len(); void setLen(int len) { len_ = len; } // warning at this line int len_; }; gcc with -Wshadow issue a warning: main.cpp:4: warning: declaration of `len' shadows a member of `this' function len and integer len are of different type. Why the warning?

    Read the article

  • Interpreter more strict

    - by pacopepe
    Hi, Today, i lost a lot of time fixing a stupid error in my code. Very simplified, the problem was this: def f(): return 2 2 == f I forgot to write the parenthesis in the sentence, so I compared a pointer function with a number. Ok, my question: Is there any way to change the interpreter to be more stricted with the code? Show more warnings for example... Thanks ^^

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >