Search Results

Search found 6569 results on 263 pages for 'specification pattern'.

Page 69/263 | < Previous Page | 65 66 67 68 69 70 71 72 73 74 75 76  | Next Page >

  • MVC & Design patterns in C++

    - by theunanonim
    I have an assignment (university level) in C++ The application that was done so far: - MVC agenda - the views are command-line - Agenda contains a list of contacts - a contact may be a friend or an acquiantance - Agenda may contain also a Company that is a contact and may contain other contacts (sorry the code is already too big as I tried to keep the MVC aspect of the application, and I can't post it here or request your time to study it..) To do: - implement factory method pattern - implement observer pattern - implement strategy pattern - implement visitor pattern The evaluation will depend on the number of added patterns and places they have been added. Am I an idiot or this is the stupidies possible assignement ? If not, please help me with some basic tips.. which one where ? Best Regards. P.S. Sorry for my English

    Read the article

  • Unit Testing the Use of TransactionScope

    - by Randolpho
    The preamble: I have designed a strongly interfaced and fully mockable data layer class that expects the business layer to create a TransactionScope when multiple calls should be included in a single transaction. The problem: I would like to unit test that my business layer makes use of a TransactionScope object when I expect it to. Unfortunately, the standard pattern for using TransactionScope is a follows: using(var scope = new TransactionScope()) { // transactional methods datalayer.InsertFoo(); datalayer.InsertBar(); scope.Complete(); } While this is a really great pattern in terms of usability for the programmer, testing that it's done seems... unpossible to me. I cannot detect that a transient object has been instantiated, let alone mock it to determine that a method was called on it. Yet my goal for coverage implies that I must. The Question: How can I go about building unit tests that ensure TransactionScope is used appropriately according to the standard pattern? Final Thoughts: I've considered a solution that would certainly provide the coverage I need, but have rejected it as overly complex and not conforming to the standard TransactionScope pattern. It involves adding a CreateTransactionScope method on my data layer object that returns an instance of TransactionScope. But because TransactionScope contains constructor logic and non-virtual methods and is therefore difficult if not impossible to mock, CreateTransactionScope would return an instance of DataLayerTransactionScope which would be a mockable facade into TransactionScope. While this might do the job it's complex and I would prefer to use the standard pattern. Is there a better way?

    Read the article

  • How to include named capture groups in java regex?

    - by jrummell
    I'm new to regex in Java and I can't figure out how to include named capture groups in an expression. I'm writing a ScrewTurn Image Converter for Confluence's Universal Wiki Converter. This is what I have: String image = "\\[image(?<align>auto)?\\|\\|{UP\\(((?<namespace>\\w+)\\.)?(?<pagename>[\\w-]+)\\)}(?<filename>[\\w- ]+\\.[\\w]+)\\]"; Pattern imagePattern = Pattern.compile(image, Pattern.CASE_INSENSITIVE); It's throwing this exception in Pattern.comiple(): java.util.regex.PatternSyntaxException: Unknown look-behind group near index 19 \[image(?<align>auto)?\|\|{UP\(((?<namespace>\w+)\.)?(?<pagename>[\w-]+)\)}(?<filename>[\w- ]+\.[\w]+)\] ^ I've used named capture groups like this before in C# (?<namedgroup>asdf), but not in Java. What am I missing?

    Read the article

  • How to code an efficient blacklist filter function in php?

    - by achairapart
    So, I have three arrays like this: [items] => Array ( [0] => Array ( [id] => someid [title] => sometitle [author] => someauthor ... ) ... ) and also a string with comma separated words to blacklist: $blacklist = "some,words,to,blacklist"; Now I need to match these words with (as they can be one of) id, title, author and show results accordingly. I was thinking of a function like this: $pattern = '('.strtr($blacklist, ",", "|").')'; // should return (some|words|etc) foreach ($items as $item) { if ( !preg_match($pattern,$item['id']) || !preg_match($pattern,$item['title']) || !preg_match($pattern,$item['author']) ) { // show item } } and I wonder if this is the most efficient way to filter the arrays or I should use something with strpos() or filter_var with FILTER_VALIDATE_REGEXP ... Note that this function is repeated per 3 arrays. However, each array will not contain more than 50 items.

    Read the article

  • JQuery - remove the chars not matching regEx

    - by JQueryBeginner
    Hi All, I am trying to use jquery for validating forms. This is the pattern that is allowed in a text box for a user. var pattern = /^[a-zA-Z0-9!#$&%*+,-./: ;=?@_]/g; If the user types anything else other than this then that has to be replaced with a "". $(document).ready(function() { $('#iBox').blur(function() { var jVal = $('#iBox').val(); if(jVal.match(pattern)) { alert("Valid"); } else { alert("New "+jVal.replace(!(pattern),"")); } }); }); }); But the replace function does not work this way.

    Read the article

  • Validating IPv4 string in Java

    - by Mat Banik
    Bellow method is validating if string is correct IPv4 address it returns true if it is valid. Any improvements in regex and elegance would be very appreciated: public static boolean validIP(String ip) { if (ip == null || ip.isEmpty()) return false; ip = ip.trim(); if ((ip.length() < 8) & (ip.length() > 15)) return false; try { Pattern pattern = Pattern.compile("^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$"); Matcher matcher = pattern.matcher(ip); return matcher.matches(); } catch (PatternSyntaxException ex) { return false; } }

    Read the article

  • Vibration after regular intervals

    - by umar
    I have a beep system which gives you four beeps. One beep after a second for one second. However If its silent mode i want the vibrator to do the same, vibrate for 1 second 4 times after 1 second. This is the code I am using long[] pattern = new long[2]; pattern[0] = 10; pattern [1] = 30; switch (am.getRingerMode()) { case AudioManager.RINGER_MODE_VIBRATE: vibe.vibrate(pattern, 0); break; case AudioManager.RINGER_MODE_NORMAL: soundsOn(mp); break; Kindly how can i do what i want to do Best Regards

    Read the article

  • Java regex skipping matches

    - by Mihail Burduja
    I have some text; I want to extract pairs of words that are not separated by punctuation. Thi is the code: //n-grams Pattern p = Pattern.compile("[a-z]+"); if (n == 2) { p = Pattern.compile("[a-z]+ [a-z]+"); } if (n == 3) { p = Pattern.compile("[a-z]+ [a-z]+ [a-z]+"); } Matcher m = p.matcher(text.toLowerCase()); ArrayList<String> result = new ArrayList<String>(); while (m.find()) { String temporary = m.group(); System.out.println(temporary); result.add(temporary); } The problem is that it skips some matches. For example "My name is James", for n = 3, must match "my name is" and "name is james", but instead it matches just the first. Is there a way to solve this?

    Read the article

  • regular expression repeating subexpression

    - by Michael Z
    I have the following text <pattern name="pattern1"/> <success>success case 1</success> <failed> failure 1</failed> <failed> failure 2</failed> <unknown> unknown </unknown> <pattern name="pattern2"/> <success>success case 2</success> <otherTag>There are many other tags.</otherTag> <failed> failure 3</failed> And the regular expression <failed>[\w|\W]*?</failed> matches all the lines contains failed tag. What do I need to to if I want to include the lines contains pattern tag as well? Basically, I want the following output: <pattern name="pattern1"/> <failed> failure 1</failed> <failed> failure 2</failed> <pattern name="pattern2"/> <failed> failure 3</failed> I am doing this in javascript, I do not mind of doing some intermediate steps.

    Read the article

  • using itext how to extracta string in java

    - by user2455183
    I am finding the string in between 123 and 321 and making it as bold. For that I used the Pattern to get the string before 123, text between 123 and 321 and text after 321. Could anyone please help me get all the strings between 123 and 321. Pattern p = Pattern.compile("^.*?(123)"); Matcher m = p.matcher(meredithEditorialSectionSegment); while (m.find()) { String desc = m.group(); String segDesc = (desc.substring(0, desc.length() - 3)); segmentDesc.add(new Chunk(segDesc, sectionDescriptionFont)); } descBold = meredithEditorialSectionSegment.substring(meredithEditorialSectionSegment.indexOf("123") + 3); descBold = descBold.substring(0, descBold.indexOf("321")); segmentDesc.add(new Chunk(descBold, sectionDescriptionBoldFont)); Matcher matcher = Pattern.compile("(?<=321).*").matcher(meredithEditorialSectionSegment); matcher.find(); segmentDesc.add(new Chunk(matcher.group(), sectionDescriptionFont));

    Read the article

  • How to display the found matches of preg_match function in PHP?

    - by Eric
    I am using the following to check if links exist on file.php: $fopen = fopen('file.php', 'r'); $fread = fread($fopen, filesize('file.php')); $pattern = "/^<a href=/i"; if (preg_match($pattern, $fread)) { echo 'Match Found'; } else { echo 'Match Not Found'; } if I echo preg_match($pattern, $fread) I get a boolean value, not the found matches. I tried what was on the php.net manual and did this: preg_match($pattern, $fread, $matches); then when I echoed $matches I got "Array" message. So I tried a foreach loop and when that didn't display anything I tried $matches[0] and that too outputted nothing. So how does one go about displaying the matches found?

    Read the article

  • very simple question but i am confused

    - by davit-datuashvili
    Suppose we have the following method (it is in c code): const char *bitap_search(const char *text, const char *pattern) My question is how can I compare text and pattern if they are char? This method is like a substring problem but I am confused a bit can I write in term of char such code? if (text[i]==pattern[i])?

    Read the article

  • Regex whitespace and special characters

    - by Sam R.
    I have this regular expression: [^\\s\"']+|\"([^\"]*)\"|'([^']*)' which works for splitting a string by white spaces, and anything within a quotation is not delimited. However, I notice that if I put in a string that starts with "" no matches are found. How would I correct this? For example, if I enter " test 2". I want it to match to [, test, 2] Note: using java to compile the regex, here is some code Pattern pattern = Pattern.compile("[^\\s\"']+|\"([^\"]*)\"|'([^']*)'"); Matcher matcher = pattern.matcher(SomeString); while (matcher.find()){ String temp = matcher.group(); //... Do something ... } Thanks.

    Read the article

  • How to check whether a String fully matches a Regex in Scala?

    - by mkneissl
    Assume I have a Regex pattern I want to match many Strings to. val Digit = """\d""".r I just want to check whether a given String fully matches the Regex. What is a good and idiomatic way to do this in Scala? I know that I can pattern match on Regexes, but this is syntactically not very pleasing in this case, because I have no groups to extract: scala> "5" match { case Digit() => true case _ => false } res4: Boolean = true Or I could fall back to the underlying Java pattern: scala> Digit.pattern.matcher("5").matches res6: Boolean = true which is not elegant, either. Is there a better solution?

    Read the article

  • Sequential coupling in code

    - by dotnetdev
    Hi, Is sequential coupling (http://en.wikipedia.org/wiki/Sequential_coupling) really a bad thing in code? Although it's an anti-pattern, the only risk I see is calling methods in the wrong order but documentation of an API/class library with this anti-pattern should take care of that. What other problems are there from code which is sequential? Also, this pattern could easily be fixed by using a facade it seems. Thanks

    Read the article

  • Get backreferences values and modificate these values

    - by roasted
    Could you please explain why im not able to get values of backreferences from a matched regex result and apply it some modification before effective replacement? The expected result is replacing for example string ".coord('X','Y')" by "X * Y". But if X to some value, divide this value by 2 and then use this new value in replacement. Here the code im currently testing: See /*>>1<<*/ & /*>>2<<*/ & /*>>3<<*/, this is where im stuck! I would like to be able to apply modification on backrefrences before replacement depending of backreferences values. Difference between /*>>2<<*/ & /*>>3<<*/ is just the self call anonymous function param The method /*>>2<<*/ is the expected working solution as i can understand it. But strangely, the replacement is not working correctly, replacing by alias $1 * $2 and not by value...? You can test the jsfiddle //string to test ".coord('125','255')" //array of regex pattern and replacement //just one for the example //for this example, pattern matching alphanumerics is not necessary (only decimal in coord) but keep it as it var regexes = [ //FORMAT is array of [PATTERN,REPLACEMENT] /*.coord("X","Y")*/ [/\.coord\(['"]([\w]+)['"],['"]?([\w:\.\\]+)['"]?\)/g, '$1 * $2'] ]; function testReg(inputText, $output) { //using regex for (var i = 0; i < regexes.length; i++) { /*==>**1**/ //this one works as usual but dont let me get backreferences values $output.val(inputText.replace(regexes[i][0], regexes[i][2])); /*==>**2**/ //this one should works as i understand it $output.val(inputText.replace(regexes[i][0], function(match, $1, $2, $3, $4) { $1 = checkReplace(match, $1, $2, $3, $4); //here want using $1 modified value in replacement return regexes[i][3]; })); /*==>**3**/ //this one is just a test by self call anonymous function $output.val(inputText.replace(regexes[i][0], function(match, $1, $2, $3, $4) { $1 = checkReplace(match, $1, $2, $3, $4); //here want using $1 modified value in replacement return regexes[i][4]; }())); inputText = $output.val(); } } function checkReplace(match, $1, $2, $3, $4) { console.log(match + ':::' + $1 + ':::' + $2 + ':::' + $3 + ':::' + $4); //HERE i should be able if lets say $1 > 200 divide it by 2 //then returning $1 value if($1 > 200) $1 = parseInt($1 / 2); return $1; }? Sure I'm missing something, but cannot get it! Thanks for your help, regards. EDIT WORKING METHOD: Finally get it, as mentionned by Eric: The key thing is that the function returns the literal text to substitute, not a string which is parsed for backreferences.?? JSFIDDLE So complete working code: (please note as pattern replacement will change for each matched pattern and optimisation of speed code is not an issue here, i will keep it like that) $('#btn').click(function() { testReg($('#input').val(), $('#output')); }); //array of regex pattern and replacement //just one for the example var regexes = [ //FORMAT is array of [PATTERN,REPLACEMENT] /*.coord("X","Y")*/ [/\.coord\(['"]([\w]+)['"],['"]?([\w:\.\\]+)['"]?\)/g, '$1 * $2'] ]; function testReg(inputText, $output) { //using regex for (var i = 0; i < regexes.length; i++) { $output.val(inputText.replace(regexes[i][0], function(match, $1, $2, $3, $4) { var checkedValues = checkReplace(match, $1, $2, $3, $4); $1 = checkedValues[0]; $2 = checkedValues[1]; regexes[i][1] = regexes[i][1].replace('$1', $1).replace('$2', $2); return regexes[i][1]; })); inputText = $output.val(); } } function checkReplace(match, $1, $2, $3, $4) { console.log(match + ':::' + $1 + ':::' + $2 + ':::' + $3 + ':::' + $4); if ($1 > 200) $1 = parseInt($1 / 2); if ($2 > 200) $2 = parseInt($2 / 2); return [$1,$2]; }

    Read the article

  • In Regex how to match in between the words?

    - by user828234
    I want to write the regex pattern which should match the string in between also. For example: I have writtenthe regex pattern like this ^((?!mystring).)*$ Which means match words which doesnot contain mystring. But i want regex pattern to match like this. mystringabcdfrevrgf regex matcher should return abcdfrevrgf How will i achieve this, Please help Thanks in advance. Answer: ((?!mystring)(.*))$

    Read the article

  • match word '90%' using regular expression

    - by amadhu
    Hi All, I want word '90%' to be matched with my String "I have 90% shares of this company". how can I write regular expression for same? I tried something like this: Pattern p = Pattern.compile("\\b90\\%\\b", Pattern.CASE_INSENSITIVE | Pattern.MULTILINE); Matcher m = p.matcher("I have 90% shares of this company"); while (m.find()){ System.out.println(m.group()); } but no luck. Can any one thow some lights on this? Many thanks, Archi

    Read the article

  • Tomcat 6: Access Control Exception?

    - by iftrue
    I'm trying to setup a tomcat6 server, and I'm trying to match another setup someone else established. However, my deployment (default Ubuntu install) uses a policy.d/ directory structure, and the established server just uses a catalina.policy file. I've tried setting every entry in policy.d to match the given catalina.policy, but I still get the following stacktrace on boot (from localhost log). I have two questions, then. First, how do I get tomcat to use a single poilcy file, rather than the directory structure presented by policy.d/? Secondly, why, when I specify all files to use the same policy, do I still get the stack trace below? Stack trace: SEVERE: Servlet /myapp threw load() exception java.security.AccessControlException: access denied (java.lang.RuntimePermission accessClassInPackage.org.apache.jasper) at java.security.AccessControlContext.checkPermission(AccessControlContext.java:342) at java.security.AccessController.checkPermission(AccessController.java:553) at java.lang.SecurityManager.checkPermission(SecurityManager.java:549) at java.lang.SecurityManager.checkPackageAccess(SecurityManager.java:1529) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:291) at java.lang.ClassLoader.loadClass(ClassLoader.java:264) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1314) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1245) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:332) at org.apache.jasper.servlet.JspServlet.init(JspServlet.java:100) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAsPrivileged(Subject.java:537) at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276) at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162) at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:115) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1166) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:992) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4058) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4367) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) at org.apache.catalina.core.ContainerBase.access$000(ContainerBase.java:123) at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:145) at java.security.AccessController.doPrivileged(Native Method) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:769) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:978) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:941) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:499) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1201) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:318) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) at org.apache.catalina.core.StandardHost.start(StandardHost.java:719) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:516) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:578) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.apache.commons.daemon.support.DaemonLoader.start(DaemonLoader.java:177) Policy.d grant codeBase "file:${java.home}/lib/-" { permission java.security.AllPermission; }; // These permissions apply to all shared system extensions grant codeBase "file:${java.home}/jre/lib/ext/-" { permission java.security.AllPermission; }; // These permissions apply to javac when ${java.home] points at $JAVA_HOME/jre grant codeBase "file:${java.home}/../lib/-" { permission java.security.AllPermission; }; // These permissions apply to all shared system extensions when // ${java.home} points at $JAVA_HOME/jre grant codeBase "file:${java.home}/lib/ext/-" { permission java.security.AllPermission; }; // ========== CATALINA CODE PERMISSIONS ======================================= // These permissions apply to the daemon code grant codeBase "file:${catalina.home}/bin/commons-daemon.jar" { permission java.security.AllPermission; }; // These permissions apply to the logging API grant codeBase "file:${catalina.home}/bin/tomcat-juli.jar" { permission java.util.PropertyPermission "java.util.logging.config.class", "read"; permission java.util.PropertyPermission "java.util.logging.config.file", "read"; permission java.io.FilePermission "${java.home}${file.separator}lib${file.separator}logging.properties", "read"; permission java.lang.RuntimePermission "shutdownHooks"; permission java.io.FilePermission "${catalina.base}${file.separator}conf${file.separator}logging.properties", "read"; permission java.util.PropertyPermission "catalina.base", "read"; permission java.util.logging.LoggingPermission "control"; permission java.io.FilePermission "${catalina.base}${file.separator}logs", "read, write"; permission java.io.FilePermission "${catalina.base}${file.separator}logs${file.separator}*", "read, write"; permission java.lang.RuntimePermission "getClassLoader"; // To enable per context logging configuration, permit read access to the appropriate file. // Be sure that the logging configuration is secure before enabling such access // eg for the examples web application: // permission java.io.FilePermission "${catalina.base}${file.separator}webapps${file.separator}examples${file.separator}WEB-INF${file.separator}classes${file.separator}logging.properties", "read"; }; // These permissions apply to the server startup code grant codeBase "file:${catalina.home}/bin/bootstrap.jar" { permission java.security.AllPermission; }; // These permissions apply to the servlet API classes // and those that are shared across all class loaders // located in the "lib" directory grant codeBase "file:${catalina.home}/lib/-" { permission java.security.AllPermission; }; // ========== WEB APPLICATION PERMISSIONS ===================================== // These permissions are granted by default to all web applications // In addition, a web application will be given a read FilePermission // and JndiPermission for all files and directories in its document root. grant { // Required for JNDI lookup of named JDBC DataSource's and // javamail named MimePart DataSource used to send mail permission java.util.PropertyPermission "java.home", "read"; permission java.util.PropertyPermission "java.naming.*", "read"; permission java.util.PropertyPermission "javax.sql.*", "read"; // OS Specific properties to allow read access permission java.util.PropertyPermission "os.name", "read"; permission java.util.PropertyPermission "os.version", "read"; permission java.util.PropertyPermission "os.arch", "read"; permission java.util.PropertyPermission "file.separator", "read"; permission java.util.PropertyPermission "path.separator", "read"; permission java.util.PropertyPermission "line.separator", "read"; // JVM properties to allow read access permission java.util.PropertyPermission "java.version", "read"; permission java.util.PropertyPermission "java.vendor", "read"; permission java.util.PropertyPermission "java.vendor.url", "read"; permission java.util.PropertyPermission "java.class.version", "read"; permission java.util.PropertyPermission "java.specification.version", "read"; permission java.util.PropertyPermission "java.specification.vendor", "read"; permission java.util.PropertyPermission "java.specification.name", "read"; permission java.util.PropertyPermission "java.vm.specification.version", "read"; permission java.util.PropertyPermission "java.vm.specification.vendor", "read"; permission java.util.PropertyPermission "java.vm.specification.name", "read"; permission java.util.PropertyPermission "java.vm.version", "read"; permission java.util.PropertyPermission "java.vm.vendor", "read"; permission java.util.PropertyPermission "java.vm.name", "read"; // Required for OpenJMX permission java.lang.RuntimePermission "getAttribute"; // Allow read of JAXP compliant XML parser debug permission java.util.PropertyPermission "jaxp.debug", "read"; // Precompiled JSPs need access to this package. permission java.lang.RuntimePermission "accessClassInPackage.org.apache.jasper.runtime"; permission java.lang.RuntimePermission "accessClassInPackage.org.apache.jasper.runtime.*"; // Precompiled JSPs need access to this system property. permission java.util.PropertyPermission "org.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER", "read"; };

    Read the article

  • Solaris SMF Syntax

    - by Benoît
    Hello, I'm trying to write a SMF manifest but i'm stuck because i can't find the complete documentation. Their DTD (/usr/share/lib/xml/dtd/service_bundle.dtd.1) is a joke, it's full of CDATA. For instance, i'm looking for the complete specification for <service_fmri/>, which value attributes are valid, etc. Where can i find the complete specification for writing Solaris SMF manifests ? Thanks.

    Read the article

  • How well are SVG filter elements defined?

    - by Peter Becker
    We are considering using SVG filters as part of our toolchain, serving the SVG to browsers capable of supporting it, while serving pre-rendered PNGs to other. One problem we noticed is that the rendering of the filter chains seems to be very inconsistent across renderers. When looking at the "filters01" example from the SVG specification, the rendering looks very different across the tools we tried. Chrome (5.0.307.11) failed to render the image, while other tools (Firefox 3.6, Opera 10.10, Inkscape 0.47, GIMP 2.6.7) render something vaguely similar in style to the picture in the specification, but no two are truly the same. Is that an issue of under-specification or are the tools just not there? If we would use SVG with filter effects: is there a reference tool that can give us a rendering the way it is intended by the spec?

    Read the article

  • How to add netbeans platform for compiling iReport sources?

    - by user356108
    I need to customize iReport sources.. (not creating plugin) Currently i am using iReport 3.7.2 and netbeans 6.5.1 ide. I downloaded the netbeans platform 6.0.1 and followed the procedures as shown in the jaspersoft link on how to compile iReport sources. But when i tried to compile the sources. I am getting errors like libs-xerces-jar is of incompatible specification version. And if i replace the jar new version of that jar in the NetBeans platform 6.0.1-200801291616 folder I am getting org-netbeans-awt.jar is of incompatiable specification version. and the same incompatiable specification version error is throwing for other jars in the netbeans platform folder. Can anyone help me in this issue

    Read the article

  • C++ - Where to code a member function for an inherited object.

    - by Francisco P.
    Hello! I have a few classes (heat, gas, contact, pressure) inheriting from a main one (sensor). I have a need to store them in a vector<Sensor *> (part of the specification). At some point in time, I need to call a function that indiscriminately stores those Sensor *. (also part of the specification, not open for discussion) Something like this: for(size_t i = 0; i < Sensors.size(); ++i) Sensors[i]->storeSensor(os) //os is an ofstream kind of object, passed onwards by reference Where and how shall storeSensor be defined? Is there any simple way to do this or will I need to disregard the specification? Mind you, I'm a beginner! Thanks for your time!

    Read the article

  • Real world examples of Ecmascript functions returning a Reference?

    - by Bergi
    Read the EcmaScript specification, section 8.7 The Reference Specification Type: The Reference type is used to explain the behaviour of such operators as delete, typeof, and the assignment operators. […] A Reference is a resolved name binding. Function calls are permitted to return references. This possibility is admitted purely for the sake of host objects. No built-in ECMAScript function defined by this specification returns a reference and there is no provision for a user-defined function to return a reference. Those last two sentences impressed me. With this, you could do things like coolHostFn() = value (valid syntax, btw). So my question is: Are there any EcmaScript implementations that define host function objects which result in Reference values?

    Read the article

< Previous Page | 65 66 67 68 69 70 71 72 73 74 75 76  | Next Page >