Search Results

Search found 7914 results on 317 pages for 'valid xhtml'.

Page 43/317 | < Previous Page | 39 40 41 42 43 44 45 46 47 48 49 50  | Next Page >

  • Have there been attempts to make object containers that search for valid programs by auto wiring compatible components?

    - by Aaron Anodide
    I hope this post isn't too "Fringe" - I'm sure someone will just kill it if it is :) Three things made me want to reach out about this now: Decoupling is so in the forefront of design. TDD inspires the idea that it doesn't matter how a program comes to exist as long as it works. Seeing how often the adapter pattern is applied to achieve (1). I'm almost sure this has been tried from a memory of reading about it around the year 2000 or so. If I had to guess, it was maybe about and earlier version of the Java Spring framework. At this time we were not so far from days when the belief was that computer programs could exhibit useful emergent behavior. I think the article said it didn't work, but it didn't say it was impossible. I wonder if since then it has been deemed impossible or simply an illusion due to a false assumption of similarity between a brain and a CPU. I know this illusion existed because I had an internship in 1996 where I programmed neural nets that were supposedly going to exhibit "brain damage". STILL, after all that, I'm sitting around this morning and not able to shake the idea that it should be possible to have a method of programming to allow autonomous components to find each other, attempt to collaborate and their outputs evaluated against a set desired results.

    Read the article

  • Is this a valid implementation of the repository pattern?

    - by user1578653
    I've been reading up about the repository pattern, with a view to implementing it in my own application. Almost all examples I've found on the internet use some kind of existing framework rather than showing how to implement it 'from scratch'. Here's my first thoughts of how I might implement it - I was wondering if anyone could advise me on whether this is correct? I have two tables, named CONTAINERS and BITS. Each CONTAINER can contain any number of BITs. I represent them as two classes: class Container{ private $bits; private $id; //...and a property for each column in the table... public function __construct(){ $this->bits = array(); } public function addBit($bit){ $this->bits[] = $bit; } //...getters and setters... } class Bit{ //some properties, methods etc... } Each class will have a property for each column in its respective table. I then have a couple of 'repositories' which handle things to do with saving/retrieving these objects from the database: //repository to control saving/retrieving Containers from the database class ContainerRepository{ //inject the bit repository for use later public function __construct($bitRepo){ $this->bitRepo = $bitRepo; } public function getById($id){ //talk directly to Oracle here to all column data into the object //get all the bits in the container $bits = $this->bitRepo->getByContainerId($id); foreach($bits as $bit){ $container->addBit($bit); } //return an instance of Container } public function persist($container){ //talk directly to Oracle here to save it to the database //if its ID is NULL, create a new container in database, otherwise update the existing one //use BitRepository to save each of the Bits inside the Container $bitRepo = $this->bitRepo; foreach($container->bits as $bit){ $bitRepo->persist($bit); } } } //repository to control saving/retrieving Bits from the database class BitRepository{ public function getById($id){} public function getByContainerId($containerId){} public function persist($bit){} } Therefore, the code I would use to get an instance of Container from the database would be: $bitRepo = new BitRepository(); $containerRepo = new ContainerRepository($bitRepo); $container = $containerRepo->getById($id); Or to create a new one and save to the database: $bitRepo = new BitRepository(); $containerRepo = new ContainerRepository($bitRepo); $container = new Container(); $container->setSomeProperty(1); $bit = new Bit(); $container->addBit($bit); $containerRepo->persist($container); Can someone advise me as to whether I have implemented this pattern correctly? Thanks!

    Read the article

  • Is there a way to extracting semantic informations from PDF? (converting PDF to pure XHTML)

    - by Eonil
    Hi. I'm finding a way to extract semantic structural informations (like title, heading, paragraph or lists) from PDF. Because I want to get a pure structural data from PDF. Finally, I want to create an pure XHTML from the PDF. With only structural informations. No design or layout. I know, PDF can be created without any structural information. I don't consider those PDFs. Only regularly well-structured PDFs are considered. I'm new to PDF. So I don't know it offers regular semantic structure or not. If it exists, it's library will offer it. So I want to know whether PDF spec has those information, and best way to get those information if exists.

    Read the article

  • Is jQuery.parseJSON able to process all valid json?

    - by murze
    This piece of valid json (it has been generated using php's json_encode): {"html":"form is NOT valid<form id=\"articleform\" enctype=\"application\/x-www-form-urlencoded\" method=\"post\" action=\"\"><dl class=\"zend_form\">\n<dt id=\"title-label\">&nbsp;<\/dt>\n<dd id=\"title-element\">\n<input type=\"text\" name=\"title\" id=\"title\" value=\"Artikel K\"><\/dd>\n<dt id=\"articleFormSubmitted-label\">&nbsp;<\/dt>\n<dd id=\"articleFormSubmitted-element\">\n<input type=\"hidden\" name=\"articleFormSubmitted\" value=\"1\" id=\"articleFormSubmitted\"><\/dd>\n<dt id=\"submit-label\">&nbsp;<\/dt><dd id=\"submit-element\">\n<input type=\"submit\" name=\"submit\" id=\"submit\" value=\"Bewaar artikel\" onclick=\"this.value='Bezig...';\"><\/dd><\/dl><\/form><script type=\"text\/javascript\">\n\t $(\"#articleform\").submit(function(){\n $.post(\"\/admin\/ajax\/contenttree\/node\/9\/ajaxtarget\/ajaxContainer\", $(\"#articleform\").serialize(), function(html){$(\"#ajaxContainer\").html(html);} );\n\t\t return false;\n\t });\n\n <\/script>","newNodeName":""} is giving jQuery.parseJSON(data) and me a hard time. With this piece of code: alert('start'); alert(data); jQuery.parseJSON(data) alert('stop'); I get a message start and then the data (jsonstring above) is shown. The message "stop" never appears. When I use this json: {"html":"test","newNodeName":""} I've verified that my first big chick of json is valid. Why isn't it processed by jQuery.parseJSON Are there any special characters that don't go well with json?

    Read the article

  • Oracle - UPSERT with update not executed for unmodified values

    - by Buthrakaur
    I'm using following update or insert Oracle statement at the moment: BEGIN UPDATE DSMS SET SURNAME = :SURNAME, FIRSTNAME = :FIRSTNAME, VALID = :VALID WHERE DSM = :DSM; IF (SQL%ROWCOUNT = 0) THEN INSERT INTO DSMS (DSM, SURNAME, FIRSTNAME, VALID) VALUES (:DSM, :SURNAME, :FIRSTNAME, :VALID); END IF; END; This runs fine except that the update statement performs dummy update if the data is same as the parameter values provided. I would not mind the dummy update in normal situation, but there's a replication/synchronization system build over this table using triggers on tables to capture updated records and executing this statement frequently for many records simply means that I'd cause huge traffic in triggers and the sync system. Is there any simple method how to reformulate this code that the update statement wouldn't update record if not necessary without using following IF-EXISTS check code which I find not sleek enough and maybe also not most efficient for this task? DECLARE CNT NUMBER; BEGIN SELECT COUNT(1) INTO CNT FROM DSMS WHERE DSM = :DSM; IF SQL%FOUND THEN UPDATE DSMS SET SURNAME = :SURNAME, FIRSTNAME = :FIRSTNAME, VALID = :VALID WHERE DSM = :DSM AND (SURNAME != :SURNAME OR FIRSTNAME != :FIRSTNAME OR VALID != :VALID); ELSE INSERT INTO DSMS (DSM, SURNAME, FIRSTNAME, VALID) VALUES (:DSM, :SURNAME, :FIRSTNAME, :VALID); END IF; END;

    Read the article

  • Fluent NHibernate OptimisticLock.None() causes "The string 'none' is not a valid Boolean value."

    - by David Thomas Garcia
    I'm using the following mapping: public class LoadMap : IAutoMappingOverride<Load> { public void Override(AutoMapping<Load> mapping) { mapping.HasMany(x => x.Bids).OptimisticLock.None(); mapping.Version(x => x.Version); } } But when I try to create the session I get the following exception: [FormatException: The string 'none' is not a valid Boolean value.] [XmlSchemaValidationException: The 'optimistic-lock' attribute is invalid - The value 'none' is invalid according to its datatype 'http://www.w3.org/2001/XMLSchema:boolean' - The string 'none' is not a valid Boolean value.] I'm using NHibernate 2.1.2.4000 and I was using Fluent NHibernate 1.0RTM, but tried the latest build 636 just to be sure this isn't something that was fixed recently or something. As a side note, in case I'm doing this all wrong, I would like to be able to make changes to the .Bids list without incrementing Version. I saw an example on Ayende's blog that did what I wanted with properties.

    Read the article

  • CKEditor adds html entities to inline CSS. Is the CSS still valid?

    - by Mihai Secasiu
    I have this piece of code: <table style="background-image: url(path/to_image.png)"> And when I load it in CKEditor it's transformed in: <table style="background-image: url(&quot;path/to_image.png&quot;)"> Is this still still valid CSS? Actually I'm not so interested if it's valid but if there would be any problems with any web browser or email client ( the editor is used for composing a html email ). Firefox and Thunderbird seem to be fine with it.

    Read the article

  • Will client JVM for a web service(https) throw an SSL Exception when the server is having a valid ce

    - by ring bearer
    I have a web service deployed on tomcat hosted on a remote server. I have set it up such that it can be accessed only via HTTPS. For this, I generated a Certificate Signing Request (CSR) and used it to get a temporary certificate from VeriSign. My web service client is on my local machine. If I try to access the service it will throw a javax.net.ssl.SSLHandshakeException:unable to find valid certification path to requested target If I install the certificate in to local Java's keystore, the issue will be resolved. My question is if I install a valid SSL certificate from a CA in to my tomcat server, will I get this client-side error even if I do not import the certificate to local key store?

    Read the article

  • Is it valid for RSS feeds to include images with relative paths?

    - by Brian Armstrong
    I have an app which reads lots of RSS feeds. Someone added a feed recently that includes images in the html portion with relative URLS (i.e. it didn't include the http://www.domain.com/ part in front). Is this valid html for an RSS feed? I thought not, but I tried adding the feed to my Google reader and it picked up the images correctly, so they must be doing something smart where they guess the domain based on the feed's url parameter or something. Even if it's not valid, how common is it to see feeds like this in the wild? To display it correctly would require you to parse the html in the feed and find/replace parts of it to insert full URL's, so this seems wrong. But wanted to double check.

    Read the article

  • Is it valid to replace http:// with // in a <script src="http://...">?

    - by Darryl Hein
    I have the following tag: <script type="text/javascript" src="https://cdn.example.com/js_file.js"></script> In this case the site is HTTPS, but the site may also be just HTTP. (The JS file is on another domain.) I'm wondering if it's valid to do the following for convenience sake: <script type="text/javascript" src="//cdn.example.com/js_file.js"></script> I'm wondering if it's valid to remove the http: or https: ? It seems to work everywhere I have tested, but are there any cases where it doesn't work?

    Read the article

  • In ActionScript, Is there a way to check if an input argument is a valid Vector of any type?

    - by ty
    In the following code: var a:Vector.<int> ... var b:Vector.<String> ... var c:Vector.<uint> ... var c:Vector.<MyOwnClass> ... function verifyArrayLike(arr:*):Boolean { return (arr is Array || arr is Vector) } verifyArrayLike(a); verifyArrayLike(b); ... What I'm looking for is something like _var is Vector.<*> But Vector.<*> is not a valid expression, even Vector. can not be placed at the right side of operators. Is there a way to check if an input argument is a valid Vector of any type?

    Read the article

  • Why does casting a NaN to a long yeild a valid result?

    - by brainimus
    In the sample code below I am dividing by zero which when I step through it with the debugger the (dividend / divisor) yeilds an Infinity or NaN (if the divisor is zero). When I cast this result to a long I get a valid result, usually something like -9223372036854775808. Why is this cast valid? Why doesn't it stop executing (throw an exception for example) rather than assign an arbitrary value? double divisor = 0; double dividend = 7; long result = (long)(dividend / divisor);

    Read the article

  • how to debug a query that has valid syntax, executes, but returns no results?

    - by Ty W
    So I'm writing a fairly involved query with a half dozen joins, a dependent subquery for [greatest-n-per-group] purposes, grouping, etc. It is syntactically valid, but I've clearly made at least one mistake because it returns nothing. In the past I've debugged valid queries that return nothing by removing joins, executing subqueries on their own, removing WHERE conditions, and removing grouping to see what I would get but so far this one has me stumped. Are there better tools or techniques to use for this sort of thing? This particular query is for MySQL if it matters for any platform-specific tools.

    Read the article

  • Why does casting a NaN to a long yield a valid result?

    - by brainimus
    In the sample code below I am dividing by zero which when I step through it with the debugger the (dividend / divisor) yields an Infinity or NaN (if the divisor is zero). When I cast this result to a long I get a valid result, usually something like -9223372036854775808. Why is this cast valid? Why doesn't it stop executing (throw an exception for example) rather than assign an arbitrary value? double divisor = 0; double dividend = 7; long result = (long)(dividend / divisor);

    Read the article

  • TinyMCE is making my code valid, and I want it to stop! (<img> tag wrapped in <p>)

    - by hookedonwinter
    I have TinyMCE installed on the back end of a site. Some of the html it's accessing isn't totally valid, which I realize is the problem in itself. However, TinyMCE is messing things up by making things valid. I have an <img> with no parents (no <p>, no <div>, etc), and TinyMCE is wrapping the <img> in <p></p>. I'm trying to find a setting that will stop that from happening. Essentially, I want TinyMCE to allow <img> to be it's own element, rather than a child element, if that makes sense. My current settings are: tinyMCE.init({ theme : "advanced", mode : "textareas", relative_urls : false });

    Read the article

  • sendmail: how can I restrict access to clients that only have a valid certificate?

    - by lxg
    I want to reject all connections that don't present a valid SSL/TLS certificate. First of all is the access db file the correct one to be changing? I have already tried using the basic rule given in the documentation CertIssuer:/C=US/ST=California/O=endmail.org/OU=private/CN= Darth+20Mail+20+28Cert+29/[email protected] RELAY This will obviously need a rule afterward to filter and reject all that don't present the cert? Does anyone have any pointers as to what syntax I should use? wildcards? lxg

    Read the article

  • Which subnet masks are valid for a subnetted Class B address?

    - by Daddy Warbox
    Yes, this is a school question, and yes I already know the correct possible answers (supposedly), so I'm not going to bother posting them. Instead, I just want to understand the meaning of this question. I know what class B addresses are, and what valid class B subnet addresses are. I guess one way to define my question is to ask why the answer "255.255.0.0" is wrong, necessarily? That seems to defy my understanding, or else some part of my brain is just not registering the question correctly. Thanks in advance.

    Read the article

  • Install VMWare Tools from VMWare Workstation 7.1.1 build-282343 on Debian squeeze: complaint about gcc path not valid

    - by Misha Koshelev
    Dear All: I am trying to install VMWare tools on Debian Squeeze. My error: Before you can compile modules, you need to have the following installed... make gcc kernel headers of the running kernel Searching for GCC... The path "/usr/bin/gcc" is not valid path to the gcc binary. Would you like to change it? [yes] uname -a: Linux debian 2.6.32-5-686 #1 SMP Sat Sep 18 02:14:45 UTC 2010 i686 GNU/Linux dpkg -l | grep make ii make 3.81-8 An utility for Directing compilation. dpkg -l | grep gcc ii gcc 4:4.4.4-2 The GNU C compiler ii gcc-4.4 4.4.4-8 The GNU C compiler ii gcc-4.4-base 4.4.4-8 The GNU Compiler Collection (base package) ii libgcc1 1:4.4.4-8 GCC support library whereis gcc gcc: /usr/bin/gcc /usr/lib/gcc Thank you Misha

    Read the article

  • How the heck is http://to./ a valid domain name?

    - by Chris
    Apparently it's a URL shortener. It resolves just fine in Chrome and Firefox. How is this a valid top-level domain? Update: for the people saying it's browser shenanigans, why is it that: http://com./ does not take me to: http://www.com/? And, do browsers ever send you a response from some place other than what's actually up in the address bar? Aside from framesets and things like that, I thought browsers tried really hard to send you content only from the site in the address bar, to help guard against phishing.

    Read the article

  • Best way to reformat/recover in Windows when your CD key is no longer valid?

    - by CSarnia
    I have a copy of Windows 7 Professional that I have downloaded from the MSDN e-academy (thanks to my school). Now, the problem is that these license keys are one-use only. If I need to reformat or do a factory reset, what is the best way for me to do so, without invalidating my license and screwing me out of an operating system? Edit: I would also like to know some information on the "restore to factory settings" option in Windows 7 recovery center. Does it do exactly as the name implies and starts you off as if you had just done a fresh install? If I had some kind of nasty trojan or virus, would it be able to survive through the factory reset? The recovery center also has an option for reformatting, though I don't think that it's an actual format - it just backs up your stuff into a Windows.old folder or something like that. Does that require a valid license key?

    Read the article

  • How to troubleshoot if a zip file is valid or if it is big file size to be unzipped ?

    - by mireille raad
    Hello , I am trying to unzip a file with the size of 2GB I am getting the following error : unzip CLTE_C_08.zip Archive: CLTE_C_08.zip End-of-central-directory signature not found. Either this file is not a zipfile, or it constitutes one disk of a multi-part archive. In the latter case the central directory and zipfile comment will be found on the last disk(s) of this archive. unzip: cannot find zipfile directory in one of CLTE_C_08.zip or CLTE_C_08.zip.zip, and cannot find CLTE_C_08.zip.ZIP, period. After some googling, some people say that this error is because the file is too big, others say because file is corrupt, others say that it could be a not unix archive. So my question , how to find out if file is valid archive file on my Centos and what is the command/trick to uncompress big files ( if any ) Thanks in advance :)

    Read the article

  • How to troubleshoot if a zip file is valid or if it is big file size to be unzipped ?

    - by mireille raad
    Hello , I am trying to unzip a file with the size of 2GB I am getting the following error : unzip CLTE_C_08.zip Archive: CLTE_C_08.zip End-of-central-directory signature not found. Either this file is not a zipfile, or it constitutes one disk of a multi-part archive. In the latter case the central directory and zipfile comment will be found on the last disk(s) of this archive. unzip: cannot find zipfile directory in one of CLTE_C_08.zip or CLTE_C_08.zip.zip, and cannot find CLTE_C_08.zip.ZIP, period. After some googling, some people say that this error is because the file is too big, others say because file is corrupt, others say that it could be a not unix archive. So my question , how to find out if file is valid archive file on my Centos and what is the command/trick to uncompress big files ( if any ) Thanks in advance :)

    Read the article

< Previous Page | 39 40 41 42 43 44 45 46 47 48 49 50  | Next Page >