Search Results

Search found 1794 results on 72 pages for 'bytecode manipulation'.

Page 38/72 | < Previous Page | 34 35 36 37 38 39 40 41 42 43 44 45  | Next Page >

  • What's the easiest way to assign a string returned from the server to a javascript string?

    - by powerboy
    The following does not work: var js_str= '<?php echo $str_from_server; ?>'; The problem is that, $str_from_server can contain any characters. If it contains single quotes or line breaks or others, the above code will break. And I do not have access to the server-side code. What's the easiest way to "escape" the contents of $str_from_server into a javascript string, and then it can be restored later?

    Read the article

  • PHP split content when a HTML element is found

    - by sea_1987
    Hello, I have a PHP variable that holds some HTML I wanting to be able to split the variable into two pieces, and I want the spilt to take place when a second bold <strong> or <b> is found, essentially if I have content that looks like this, My content This is my content. Some more bold content, that would spilt into another variable. is this at all possible?

    Read the article

  • Strings in ASP?

    - by TSL
    Hi All, I have some APSX code that I am trying to modify for a programmer that is out on medicaly leave. I am not an ASP guy, but rather C++ So what I want to do is delare a string, check the first 4 characters and if it is 'http' do something, if not, something else. Here is what I have: string strYT= Left(objFile, 4); if (strYT=="http") { pnlYT.Visible = true; pnlIntro.Visible = false; pnlVideo.Visible = false; } else { pnlYT.Visible = false; pnlIntro.Visible = false; pnlVideo.Visible = true; PrintText(objFile); } But I get errors like: Compiler Error Message: CS0103: The name 'Left' does not exist in the class or namespace 'ASP.zen_aspx' My googling turns up many examples of doing it just like this.....

    Read the article

  • rb_str_modify() equivalent in the Ruby language

    - by Hagbard
    I was trying to add a method to the String class. This method should mutate the current string (of course it would be possible to write a not mutating version but I'd prefer the mutating one). I had no idea how to do this and after some googling I found the method rb_str_modify which makes a given string mutable. That's exactly what I need but I couldn't find an equivalent in the Ruby language. Did I miss something or is there really no possibility in the language itself?

    Read the article

  • jquery insert a html block so it starts before the target and ends after the target - is this possib

    - by Chris
    Hi all, I understand you can add insert blocks of html before and after a target using before(), insertBefore(), after() and insertAfter(). I tried to do something similar to this <script type="text/javascript"> $(document).ready(function(){ $("p").before("<div class='myContainer'>"); $("p").after("</div>"); }); </script> <p>paragraph</p> But the inject seems to automatically create closing tags for me, is there a way around this? Cheers

    Read the article

  • How to work with images(png's) of size 2-4Mb.

    - by Sam
    I am working with images of size 2 to 4MB. I want to edit image of resolution 1200x1600. performing scaling, traslation and rotation operations. I want to another images on that and saving it to photo album. My app is crashing(giving memory warning) after i successfully edit one image and save to album. I have releasing some images when i get memory warning. But still it crashes as i am working with 2 images of size 3MB each and context of size 1200x1600 and getting a image from the context at the same time. Is there any way to compress images and work with it by performing scaling, traslation and rotation operations?

    Read the article

  • Is it possible to slice off the end of a URL with XSLT 1.0?

    - by Eric
    Title says it all really. Using only XSLT 1.0's string functions, how would I go about slicing off the end of a url? So from http://stackoverflow.com/questions/2981175/is-it-possible-to-slice-the-end-of-a-url-with-xslt-1-0 I would like to extract is-it-possible-to-slice-the-end-of-a-url-with-xslt-1-0 Is this possible?

    Read the article

  • Automated obscuring of PDF content

    - by Manabenz
    Hello I'm looking for a tool which will allow me to automate the task of obscuring a certain section of content contained within a PDF. The PDF content is essentially one big image which contains some sensitive information, and it is this information we need to ensure is not readable. Any tips for where I should start looking for such a solution? Many thanks M

    Read the article

  • Manipulate data for scaling

    - by user1487000
    I have this data: Game 1: 7.0/10.0, Reviewed: 1000 times Game 2: 7.5/10.0, Reviewed: 3000 times Game 3: 8.9/10.0, Reviewed: 140,000 times Game 4: 10.0/10.0 Reviewed: 5 times . . . I want to manipulate this data in a way to make each rating reflective of how many times it has been reviewed. For example Game 3 should have a little heavier weight than than Game 4, since it has been reviewed way more. And Game 2's 7 should be weighted more than Game 1's 7. Is there a proper function to do this scaling? In such a way that ScaledGameRating = OldGameRating * (some exponential function?)

    Read the article

  • ????????s in my generated PDF

    - by gAMBOOKa
    I'm getting ???????? characters in my PDF, i've stripped out \r\n \r \n \t, trimmed everything, decoded html entities and stripped tags. Nothing helps. The data is coming from a MySQL database. Any help would be appreciated.

    Read the article

  • Java single Array best choice for accessing pixels for manipulation?

    - by Petrol
    I am just watching this tutorial https://www.youtube.com/watch?v=HwUnMy_pR6A and the guy (who seems to be pretty competent) is using a single array to store and access the pixels of his to-be-rendered image. I was wondering if this really is the best way to do this. The alternative of Multi-Array does have one pointer more, but Arrays do have an O(1) for accessing each index and calculating the index in a single array seems to take one addition and one multiplication operation per pixel. And if Multi-Arrays really are bad, can't you use something with Hashing to avoid those addition and multiplication operations? EDIT: here is his code... public class Screen { private int width, height; public int[] pixels; public Screen(int width, int height) { this.width = width; this.height = height; // creating array the size of one index/int for every pixel // single array has better performance than multi-array pixels = new int[width * height]; } public void render() { for (int y = 0; y < height; y++) { for (int x = 0; x < width; x++) { pixels[x + y * width] = 0xff00ff; } } } }

    Read the article

  • .NET processing unit [closed]

    - by configurator
    Do you think we'll ever see an IL (or other bytecode) processing unit? It sounds possible and would have a major benefit, because we wouldn't need the JITter. This isn't the same as compiling .NET directly to machine code, since the bytecode here is designed to be programmed and disassembled easily, unlike the bytecode used in x86 processors which is designed to work faster. What's stopping Intel (for example) from partnering with Microsoft and making such a .NET-optimised processor?

    Read the article

  • Javassist failure in hibernate: invalid constant type: 60

    - by Kaleb Pederson
    I'm creating a cli tool to manage an existing application. Both the application and the tests build fine and run fine but despite that I receive a javassist failure when running my cli tool that exists within the jar: INFO: Bytecode provider name : javassist ... INFO: Hibernate EntityManager 3.5.1-Final Exception in thread "main" javax.persistence.PersistenceException: Unable to configure EntityManagerFactory at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:371) at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:55) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:48) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:32) ... at com.sophware.flexipol.admin.AdminTool.<init>(AdminTool.java:40) at com.sophware.flexipol.admin.AdminTool.main(AdminTool.java:69) Caused by: java.lang.RuntimeException: Error while reading file:flexipol-jar-with-dependencies.jar at org.hibernate.ejb.packaging.NativeScanner.getClassesInJar(NativeScanner.java:131) at org.hibernate.ejb.Ejb3Configuration.addScannedEntries(Ejb3Configuration.java:467) at org.hibernate.ejb.Ejb3Configuration.addMetadataFromScan(Ejb3Configuration.java:457) at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:347) ... 11 more Caused by: java.io.IOException: invalid constant type: 60 at javassist.bytecode.ConstPool.readOne(ConstPool.java:1027) at javassist.bytecode.ConstPool.read(ConstPool.java:970) at javassist.bytecode.ConstPool.<init>(ConstPool.java:127) at javassist.bytecode.ClassFile.read(ClassFile.java:693) at javassist.bytecode.ClassFile.<init>(ClassFile.java:85) at org.hibernate.ejb.packaging.AbstractJarVisitor.checkAnnotationMatching(AbstractJarVisitor.java:243) at org.hibernate.ejb.packaging.AbstractJarVisitor.executeJavaElementFilter(AbstractJarVisitor.java:209) at org.hibernate.ejb.packaging.AbstractJarVisitor.addElement(AbstractJarVisitor.java:170) at org.hibernate.ejb.packaging.FileZippedJarVisitor.doProcessElements(FileZippedJarVisitor.java:119) at org.hibernate.ejb.packaging.AbstractJarVisitor.getMatchingEntries(AbstractJarVisitor.java:146) at org.hibernate.ejb.packaging.NativeScanner.getClassesInJar(NativeScanner.java:128) ... 14 more Since I know the jar is fine as the unit and integration tests run against it, I thought it might be a problem with javassist, so I tried cglib. The bytecode provider then shows as cglib but I still get the exact same stack trace with javassist present in it. cglib is definitely in the classpath: $ unzip -l flexipol-jar-with-dependencies.jar | grep cglib | wc -l 383 I've tried with both hibernate 3.4 and 3.5 and get the exact same error. Is this a problem with javassist?

    Read the article

  • How to set connection string dynamically in NHibernate

    - by jcreddy
    Hi I want assign connection string for NHibernate using following code and getting exception (bold). log4net.Config.DOMConfigurator.Configure(); Configuration config = new Configuration(); IDictionary props = new Hashtable(); props["hibernate.connection.provider"] = "NHibernate.Connection.DriverConnectionProvider"; props["hibernate.dialect"] = "NHibernate.Dialect.MsSql2000Dialect"; props["hibernate.connection.driver_class"] = "NHibernate.Driver.SqlClientDriver"; props["hibernate.connection.connection_string"] = @"Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=Sample;Data Source=HYDHTC92318D\SQLEXPRESS"; props["hibernate.connection.current_session_context_class"] = "web"; props["hibernate.connection.show_sql"] = "true"; props["hibernate.connection.proxyfactoryfactory.factory_class"] = "NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle"; foreach (DictionaryEntry de in props) { config.SetProperty(de.Key.ToString(), de.Value.ToString()); } config.AddAssembly("nhibernator"); factory = config.BuildSessionFactory(); session = factory.OpenSession(); The ProxyFactoryFactory was not configured. Initialize 'proxyfactory.factory_class' property of the session-factory configuration section with one of the available NHibernate.ByteCode providers. Example: NHibernate.ByteCode.LinFu.ProxyFactoryFactory, NHibernate.ByteCode.LinFu Example: NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle Please let me know the solution. Regards JCReddy

    Read the article

  • java.lang.ClassNotFoundException in Netbeans. 5 hours to fix

    - by user1304281
    Hi I've got to submit an interpreter assignment tonight and all of a sudden it stopped working! It was working yesterday but now when I try to create a class instance at runtime I get classnotfoundexception. My project has no libraries or dependencies, I've written everything myself. I've googled around and it seems to be an issue with classpath but I've had no luck fooling with the project properties on netbeans. Here's some code: package interpreter; import interpreter.bytecode.ByteCode; import java.io.*; import java.lang.reflect.*; class ByteCodeLoader { //.... String codeClass = CodeTable.CodeTable.get(args[0]); ByteCode bytecode = (ByteCode)(Class.forName("interpreter.bytecode."+codeClass).newInstance()); //this throws exception } all of my ByteCodes are contained within a subpackage of interpreter called interpreter.bytecode. I'll be watching this thread so I can answer/clarify any questions immediately. Thanks for your time!

    Read the article

< Previous Page | 34 35 36 37 38 39 40 41 42 43 44 45  | Next Page >