Daily Archives

Articles indexed Wednesday December 22 2010

Page 15/32 | < Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >

  • Mesh Remote Desktop crashes 64 bit Windows 7 VM (8 GB)

    - by Andrew J. Brehm
    I have a Windows 7 VirtualBox VM (64 bit, 8 GB) on a Snow Leopard host (64 bit, 24 GB). It works fine until I connect via Microsoft Mesh. When I connect via Mesh remote desktop, the VM crashes about one or two minutes after the connection has been established. It doesn't answer to pings (from the host and from other machines in the network) and no RDC connections (from other Windows machines in the network where Mesh works) are possible. Any ideas?

    Read the article

  • How to set file associations and explorer options in one go?

    - by jokoon
    This has been itching me for quite a long time. When I come on a new computer with any version of Windows, I need to: un-hide file extensions set explorer default view to list instead of icons set the file extensions like h c cpp so they don't open Visual C++ (which can take up to 20 seconds!) each time I double click on them, opening them with something like Notepad++ instead. Isn't there some program to quickly set thoses options to something I want, like some standalone exe, or some generic registry file I can execute when I come on a new machine? I'm a developer and I can't believe I'm wasting so much time on those &*$%@# things.

    Read the article

  • Software for capturing still image snapshots from video input

    - by cantabilesoftware
    What software is available that will let me watch video from a USB video capture device at full PAL/NTSC resolution and capture a still image at a button press? More info: I'm using a KaiserBaas USB capture device (http://www.kaiserbaas.com/kaiser-baas-product-page/converters/video-to-dvd-maker), and want to capture screen shots from a PS2 connected to it. I'd like to play the game at the full PS2 resolution and capture certain scenes. The device has a one-touch snapshot button on it, but I can't seem to make it work and there's no mention of it anywhere in the documentation. The device works and the video appears in Power Producer (the included software), but I think it previews it smaller than the full resolution. I could print screen it, but having to crop will be a pain.

    Read the article

  • HTML5 : Microsoft propose des modules pour Websocket et IndexedDB installables sur la bêta d'Internet Explorer 9

    HTML5 : Microsoft propose des modules pour Websocket et IndexedDB Installables sur la bêta d'Internet Explorer 9 Microsoft vient de lancer un site dédié aux standards HTML5 ouverts, une manière de permettre aux développeurs d'expérimenter des standards qui ne seront pas intégrés à Internet Explorer avant leur finalisation par le W3C. Une approche qui se veut plus prudente et pragmatique que celles de ces concurrents, qui n'hésitent pas, eux, à implémenter - au moins partiellement - des standards en gestation dans les versions grand public de leurs navigateurs. Appelé HTML5 Labs, ce nouveau site propose, pour ses débuts, deux modules. Le premier est le...

    Read the article

  • PASS Summit 2010 Presentation Feedback

    - by andyleonard
    Introduction It's always an honor to present anywhere. Presenting at the PASS Summit is a special honor. I delivered three presentations last month: Database Design for Developers SSIS Design Patterns, Part 2 A Lightning Talk on SSIS Database Design for Developers First, a bit of explanation (defense): I submitted this abstract to the PASS Abstracts folks by mistake . I kid you not. Inspired by Adam Machanic ( Blog | @AdamMachanic ) I maintain a document of current presentations. I've recently published...(read more)

    Read the article

  • Grails validateable not work for non-persistent domain class

    - by Hoàng Long
    I followed the instruction here: http://www.grails.org/doc/latest/guide/7.%20Validation.html and added into config.groovy: grails.validateable.classes = [liningtest.Warm'] Then added in src/groovy/Warm.groovy (it's a non-persistent domain class): package liningtest import org.codehaus.groovy.grails.validation.Validateable class Warm { String name; int happyCite; Warm(String n, int h) { this.name = n; this.happyCite = h; } static constraints = { name(size: 1..50) happyCite(min: 100) } } But it just doesn't work (both "blank false" & "size: 0..25") for the "hasErrors" function. It always returns false, even when the name is 25. Is this a Grails bug, if yes, is there any work-around? I'm using Grails 1.3.3 UPDATE: I have updated the simplified code. And now I know that constraint "size" can't be used with "blank", but still does not work. My test class in test/unit/liningtest/WarmTests.groovy package liningtest import grails.test.* class WarmTests extends GrailsUnitTestCase { protected void setUp() { super.setUp() } protected void tearDown() { super.tearDown() } void testSomething() { def w = new Warm('Hihi', 3) assert (w.happyCite == 3) assert (w.hasErrors() == true) } } And the error I got: <?xml version="1.0" encoding="UTF-8" ?> <testsuite errors="1" failures="0" hostname="evolus-50b0002c" name="liningtest.WarmTests" tests="1" time="0.062" timestamp="2010-12-16T04:07:47"> <properties /> <testcase classname="liningtest.WarmTests" name="testSomething" time="0.062"> <error message="No signature of method: liningtest.Warm.hasErrors() is applicable for argument types: () values: [] Possible solutions: hashCode()" type="groovy.lang.MissingMethodException">groovy.lang.MissingMethodException: No signature of method: liningtest.Warm.hasErrors() is applicable for argument types: () values: [] Possible solutions: hashCode() at liningtest.WarmTests.testSomething(WarmTests.groovy:18) </error> </testcase> <system-out><![CDATA[--Output from testSomething-- ]]></system-out> <system-err><![CDATA[--Output from testSomething-- ]]></system-err> </testsuite> UPDATE 2: When I don't use Unit test, but try to call hasErrors in the controller, it runs but return false value. (hasErrors return false with Warm('Hihi', 3) ). Does anyone has a clue?

    Read the article

  • Android Maps: Installation error: INSTALL_FAILED_MISSING_SHARED_LIBRARY

    - by AP257
    I'm trying to use Android Maps, following the instructions in Hello MapView. I've added <uses-library android:name="com.google.android.maps" /> in the Manifest, and I'm building against the 'Google APIs' target, which claims to be API version 7. So I don't think I'm doing anything obviously wrong, but the project refuses to build with this error: [2010-12-22 13:34:32 - FMS]Installing FMS.apk... [2010-12-22 13:35:01 - FMS]Installation error: INSTALL_FAILED_MISSING_SHARED_LIBRARY [2010-12-22 13:35:01 - FMS]Please check logcat output for more details. [2010-12-22 13:35:01 - FMS]Launch canceled! logcat is telling me the following (not very enlightening): D/PackageParser( 55): Scanning package: /data/app/vmdl67147.tmp I/PackageParser( 55): com.android.fms: compat added android.permission.WRITE_EXTERNAL_STORAGE android.permission.READ_PHONE_STATE E/PackageManager( 55): Package com.android.fms requires unavailable shared library com.google.android.maps; failing! W/PackageManager( 55): Package couldn't be installed in /data/app/com.android.fms.apk D/AndroidRuntime( 206): Shutting down VM It is possible I haven't set up the Maps API key correctly - when I got it using keytools, I didn't specify an alias_name, though this didn't seem to cause an error. Can anyone help?

    Read the article

  • 2 compareTo method overriden in the same class definition, how could I force to use the second?

    - by jayjaypg22
    I want to sort a list List<Blabla> donnees by a criterion on one of its field. My problem is that compareTo is already overriden for this Class. So I've got something like : Blabla { public int compareTo(Object other) { ... } public int compareTo(Blabla other) { ... } } In a business layer class I call : Business { method (){ Collections.sort(List<Blabla > donnees); } } But this call N°1 compareTo method with object parameter. How could I sort my list with the N°2 method?

    Read the article

  • How to define paper in raphael JS liberary?

    - by cj333
    Hi, I want to learn raphael JS liberary to draw a square. I copied the official code, but it is not work, "paper is not defined on line 34". how to define it? The demo is on http://www.irunmywebsite.com/raphael/additionalhelp.php the left menu "animate" ,Thanks. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Raphaël · Gear</title> <style type="text/css"> body { background: #333; color: #fff; font: 300 100.1% "Helvetica Neue", Helvetica, "Arial Unicode MS", Arial, sans-serif; } #holder { height: 480px; left: 50%; margin: -240px 0 0 -320px; position: absolute; top: 50%; width: 640px; } #copy { bottom: 0; font: 300 .7em "Helvetica Neue", Helvetica, "Arial Unicode MS", Arial, sans-serif; position: absolute; right: 1em; text-align: right; } #copy a { color: #fff; } </style> <script src="raphael-min.js" type="text/javascript" charset="utf-8"></script> <script type="text/javascript" charset="utf-8"> var a = paper.circle(320, 100, 60).attr({fill:'#FF0000'}); a.animate({ 'translation': '0,300' }, 500, 'bounce'); var b = paper.circle(320, 100, 60).attr({fill:'#FFFF00'});; b.animate({ cx: 320, cy: 300 }, 500, 'bounce'); var path1=paper.path("M114 253").attr({"stroke": "#f00", "stroke-width":3}); path1.animate({path: "M114 253 L 234 253"},3000,function(){ var path2=paper.path("M234 253").attr({"stroke": "#f00","stroke-width":3}); path2.animate({path: "M234 253 L 234 134"},3000,function(){ var path3=paper.path("M234 134").attr({"stroke": "#f00","stroke-width":3}); path3.animate({path: "M234 134 L 97 134"},3000); }); }); </script> </head> <body> <div id="stroke"></div> </body> </html>

    Read the article

  • Fasted way to develop data entry screens for a .NET backend ?

    - by jay23
    I am a .NET / C# back end guy. I am working on a app that will have about 200 different data entry screens. For me exposing DTO as a collection for CRUD (IUpdatable and IQueryable) is the easy part, can do it in sleep :-). What I am trying to decide is what type of front end technology will allow me to develop these data entry screens fast. They don't have to be fancy but they are not just plain grid either and on average they have about 15 form fields and some client side data validation (no db look up) Options I am looking at are Use ExtJS on the front and REST / JSON on the back. ASP.NET RIA but I do not know SL (Well XAML) Plain ASP.NET / MVC One idea I had was the DTO will contain the meta data about the form (As Attributes) and the form can be dynamically generated, but i do not want to reinvent the wheel if their is an easy way. I have looked at RAD software but all of them look at the DB and generate screens. I rather want some thing that can look at my DTO and generate screens. Jay

    Read the article

  • Class Assignment Operators

    - by Maxpm
    I made the following operator overloading test: #include <iostream> #include <string> using namespace std; class TestClass { string ClassName; public: TestClass(string Name) { ClassName = Name; cout << ClassName << " constructed." << endl; } ~TestClass() { cout << ClassName << " destructed." << endl; } void operator=(TestClass Other) { cout << ClassName << " in operator=" << endl; cout << "The address of the other class is " << &Other << "." << endl; } }; int main() { TestClass FirstInstance("FirstInstance"); TestClass SecondInstance("SecondInstance"); FirstInstance = SecondInstance; SecondInstance = FirstInstance; return 0; } The assignment operator behaves as-expected, outputting the address of the other class. Now, how would I actually assign something from the other class? For example, something like this: void operator=(TestClass Other) { ClassName = Other.ClassName; }

    Read the article

  • mod_rewrite - can't combine rules

    - by mikua
    I have 3 rules: # DEL www. from URL RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC] RewriteRule ^(.*)$ http://%1/$1 [R=301,L] # DEL /index.php fron URL RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*index\.php\ HTTP/ RewriteRule ^(([^/]+/)*)index\.php$ http://masterok.kiev.ua/$1 [R=301,L] # ADD / to URL RewriteRule ^([^.]+[^./])$ /$1/ [R=301,L] All the rules work individually, but when you use them at the same time - there is a looping and the site don't open... Help please to combine them

    Read the article

  • How do I show the selected item in an HTML <select> at the top

    - by Michael Meadows
    I have an HTML select that looks something like this (values are fake) <select size="40"> <option value="1">What would you do if I sang out of tune,</option> <option value="2">Would you stand up and walk out on me?</option> ... more <option value="156">Lend me your ears, and I'll sing you a song,</option> <option selected="selected" value="157">I will try not to sing out of key.</option> <option value="158">Oh, I get by with a little help from my friends.</option> ... more <option value="507">I get high with a little help from my friends.</option> <option value="509">Gonna' try with a little from my friends.</option> </select> The problem that I have is that when displaying the list after loading the page and the selected option is in the middle of the very long list, IE scrolls the selected option to the top of the list (which is what I want). Firefox, Chrome, Opera, and Safari show it at the bottom (which I don't want). I have to assume that IE is doing it wrong since everyone else shows it at the bottom. How can I force the browsers to display the selected item at the top of the list. I do not want to put it at the top of the list, I just want it to scroll such that the selected option is at the top. bonus, it would be even better if I can put it fourth from the top, but I can live without that if it's too difficult.

    Read the article

  • Hosting images from unsecured servers (travelnow.com)

    - by i.am.not.aids
    Hi, My application needs to serve images hosted in travelnow.com (ie. this image) but the application only allow images hosted on a secured server (ie. https). What are my options? TravelNow's suggestion is as follows. How do I do this? Akamai image servers are not secure. Therefore you are unable to serve any of the image urls with a secure HTTPS URL. If you need to serve an image with HTTPS, you must temporarily save the image to your own secure server. This is suggested only for images to be saved as you use them or need them temporarily on the secure page. The hotel images file available from the Affiliate Center provides up to 1.5 million URLs at any time for all properties storing images in the Akamai system. It is not recommended or advised to store all files in advance on your own system since properties change and update images frequently. Although we are not responsible for the images each property stores on the Akamai system, YOU will be responsible for any customer issues arising from displaying outdated or saved image files on your own pages. Thanks! Adrian

    Read the article

  • Are there any data-binding solution that works in C++ and GWT and supports structures polymorphism?

    - by user116854
    I expect it should share a common description, like XmlSchema or IDL and should generate classes for target language. I found Thrift and it's really nice solution, but it doesn't support structures polymorphism. I would like to have collections of base class objects, where I could place instances of subclasses, serialize this and deserialize at the opposite side. Some mechanism of polymorphic behavior support, like Visitor, would be a perfect. Does anybody know something suitable for these requirements?

    Read the article

  • Multiple Remote call made simultenously

    - by Sudeep Kumar
    I was making multiple remote calls and they are done sequentially and when I am getting a result event back it's triggering calls to all the methods with ResultEvent as an argument . I am supposed to receive the result event only in the method given inthe event listener but it's triggering calls to all the methods with ResultEvent as an argument . Has anyone come across this kind of problem? Is there any workaround for it?

    Read the article

  • database table design

    - by e.b.white
    I design the tables as below for the system which looks like a package delivering system For example, after user received the package, postman should record in system, and the state(history table) is "delivered",and operator is this postman, the current state(state table) is of course "delivered" history table: +---------------+--------------------------+ | Field | Desc | +---------------+--------------------------+ | id | PRIMARY KEY | +---------------+--------------------------+ | package_id | package_tacking_id | +---------------+--------------------------+ | state | package_state | +---------------+--------------------------+ | operators | operators | +---------------+--------------------------+ | create_time| create_time | +---------------+--------------------------+ state table: +---------------+--------------------------+ | Field | Desc | +---------------+--------------------------+ | id | PRIMARY KEY | +---------------+--------------------------+ | package_id | package_tacking_id | +---------------+--------------------------+ | state | latest_package_state | +---------------+--------------------------+ Above is just the basic information to record, some other information( like invoice, destination,...) should be recored as well. But there are different service types like s1 and s2, for s1 it is not needed to record invoice but s1 need, and maybe s1 need some other information to record (like the tel of end user). After all, at delivering way stations there are additional information to record, and for different service type the information type is different. My question is: 1. For different service type, shall I need to declare different tables(option A) or just one big table which can record all information for all types(option B)? 2. If option A, since the basic information above is MUST, how can prevent from declaring there duplicate fields in different tables?

    Read the article

  • class not found expection.

    - by theJava
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mySessionFactory' defined in ServletContext resource [/WEB-INF/dispatcher-servlet.xml]: Initialization of bean failed; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert property value of type 'java.util.ArrayList' to required type 'java.lang.Class[]' for property 'annotatedClasses'; nested exception is java.lang.IllegalArgumentException: Cannot find class [com.vinoth.domain.User] org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527) org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291) org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288) org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190) org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:563) org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895) org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425) org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:442) org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:458) org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:339) org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:306) org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:127) javax.servlet.GenericServlet.init(GenericServlet.java:212) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:879) org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) java.lang.Thread.run(Unknown Source) I have the particular class in my source and here is my bean config and yet when i compile my application it throws me the error. <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> <bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver" p:prefix="/WEB-INF/jsp/" p:suffix=".jsp" /> <bean id="myDataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> <property name="driverClassName" value="com.mysql.jdbc.Driver"/> <property name="url" value="jdbc:mysql://127.0.0.1:3306/spring"/> <property name="username" value="monty"/> <property name="password" value="indian"/> </bean> <bean id="mySessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean"> <property name="dataSource" ref="myDataSource" /> <property name="annotatedClasses"> <list> <value>com.vinoth.domain.User</value> </list> </property> <property name="hibernateProperties"> <props> <prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop> <prop key="hibernate.show_sql">true</prop> <prop key="hibernate.hbm2ddl.auto">create</prop> </props> </property> </bean> <bean id="myUserDAO" class="com.vinoth.dao.UserDAOImpl"> <property name="sessionFactory" ref="mySessionFactory"/> </bean> <bean name="/user/*.htm" class="com.vinoth.web.UserController" > <property name="userDAO" ref="myUserDAO" /> </bean> </beans>

    Read the article

  • ScriptManager emits ScriptReferences after ClientScriptIncludes. Why?

    - by Chris F
    I have an application that uses a lot of javascript in a lot of different .js files. Each page can have any number and combination of different controls and each control can use a different set of js files. Instead of including all possible js files as <script src="xxx.js"> in the head of my master page, I thought I would reduce the amount of included files by getting each control to call ScriptManager.Scripts.Add(new ScriptReference("xxx.js")) - thus only the scripts that are actually needed by the page will be included. Well that bit works fine. But...the controls also use ScriptManager.RegisterClientScriptBlock fairly extensively too. (There are scenarios where the controls are inside update panels). I was disappointed to see that the ScriptManager emits the client script includes before the ScriptReferences. For example - see the test file and output at the end (this results in a JS error because $ is not defined). Am I being dumb or is this to be expected? I would have thought that a sensible thing for the ScriptManger to do would be to emit the ScriptReferences first and then the other stuff. Short of rolling my own ScriptManager like object to manage static JS file references, does anyone have any suggestions as to get the behaviour that I want from ScriptManager?? Thanks in advance. Example File <%@ Page Language="C#" AutoEventWireup="true" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <script runat="server"> protected void Page_Load(object sender, EventArgs e) { ScriptManager.RegisterClientScriptBlock(Page, Page.GetType(), "Test", "$(function() {alert('hello');});", true); } </script> </head> <body> <form id="form1" runat="server"> <asp:ScriptManager runat="server" > <Scripts> <asp:ScriptReference Path="~/jquery/jquery.js" /> </Scripts> </asp:ScriptManager> </form> </body> </html> Output <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > ... boring stuff removed .... <script src="/js/WebResource.axd?d=-nOHbla bla " type="text/javascript"></script> <script type="text/javascript"> //<![CDATA[ $(function() {alert('hello');});//]]> </script> ... boring stuff removed .... <script src="/js/ScriptResource.axd?d=qgCbla bla bla" type="text/javascript"></script> <script src="jquery/jquery.js" type="text/javascript"></script> ... boring stuff removed .... </form> </body> </html>

    Read the article

  • Parser line break if string contains &#8211;

    - by pask
    Hi all, My NSXMLParser breaks on this string: <title>AAA &#8211; BCDEFGQWERTYUIO</title> I parsed it in this way, hope is the right way: - (void) parser: (NSXMLParser *) parser foundCharacters: (NSString *) string{ [...] if ([currentElement isEqualToString:@"title"]) { if (![string isEqualToString:@""]) { [title addObject:string]; NSLog(@"str: %@", string); } } it returns me: str: AAA str: - str: BCDEFGQWERTYUIO But i want to return a single string: str: AAA - BCDEFGQWERTYUIO because it's the correct title. Any idea? Thanks.

    Read the article

  • asp.net drop down list viewstate issue after client side Ajax update

    - by DSharper
    In my aspx page I have drop down list that initialy in page load event loads up with list of values which is shown to client(drop down list "A") and in client side, depending on client selecion of another drop down list(drop down list "B") I have written a javascript to update drop down list "A" with corresponding values with Ajax behaviour(without full page postback). But when we post page to the server, in server side page load event shows initialy sent list of values for drop down list "A" but not the values that were loaded by Ajax calls due to ViewState not being updated correctly due to Ajax call. I could fix this easily with update panel but it increased Ajax request size to 44KB which is much higher than what currently is for hand made Ajax script I have written( 0.5KB) Is there special way of fixing this rather than using update panel?

    Read the article

  • Weird stuttering issues not related to GC.

    - by Smills
    I am getting some odd stuttering issues with my game even though my FPS never seems to drop below 30. About every 5 seconds my game stutters. I was originally getting stuttering every 1-2 seconds due to my garbage collection issues, but I have sorted those and will often go 15-20 seconds without a garbage collection. Despite this, my game still stutters periodically even when there is no GC listed in logcat anywhere near the stutter. Even when I take out most of my code and simply make my "physics" code the below code I get this weird slowdown issue. I feel that I am missing something or overlooking something. Shouldn't that "elapsed" code that I put in stop any variance in the speed of the main character related to changes in FPS? Any input/theories would be awesome. Physics: private void updatePhysics() { //get current time long now = System.currentTimeMillis(); //added this to see if I could speed it up, it made no difference Thread myThread = Thread.currentThread(); myThread.setPriority(Thread.MAX_PRIORITY); //work out elapsed time since last frame in seconds double elapsed = (now - mLastTime2) / 1000.0; mLastTime2 = now; //measures FPS and displays in logcat once every 30 frames fps+=1/elapsed; fpscount+=1; if (fpscount==30) { fps=fps/fpscount; Log.i("myActivity","FPS: "+fps+" Touch: "+touch); fpscount=0; } //this should make the main character (theoretically) move upwards at a steady pace mY-=100*elapsed; //increase amount I translate the draw to = main characters Y //location if the main character goes upwards if (mY<=viewY) { viewY=mY; } }

    Read the article

  • E4X in ActionScript

    - by Brian Genisio
    Hey all, Looking at the E4X implementation in ActionScript, it occurs to me that they had to figure out how to do three things that I am not sure can be done within ActionScript regularly: Properties/Getters prefixed with @: var myAttribute = xmlPerson.@name; Nameless functions for filtering: xmlData.person.(/* predicate */) lambda syntax for predicates: xmlData.person.(@name == "Brian") So here is my question: Are these just one-off capabilities (much like Vector.<>) they put in just for E4X, therefore keeping out of reach for us? Or do we, as ActionScript developers, have access to these features? More specifically, I'd love to get access to the expression tree of that lambda predicate for my own code (not tied to the XML classes in any way). I figured out that this is called the "filter operator"... but I am not sure how to harness it. Not sure I can... since ActionScript does not allow for operator overloading :(

    Read the article

  • recv receiving not whole data sometime

    - by milo
    hi all, i have following issue: here is the chunk of code: void get_all_buf(int sock, std::string & inStr) { int n = 1; char c; char temp[1024*1024]; bzero(temp, sizeof(temp)); n = recv(sock, temp, sizeof(temp), 0); inStr = temp; }; but sometimes recv returning not whole data (data length always less then sizeof(temp)), only it's part. write side always sends me whole data (i got it with sniffer). what matter? thx. P.S. i know, good manner suggests me to check n (if (n < 0) perror ("error while receiving data), but it doesn't matter now - it's not reason of my problem. P.S.2 i've forgot - it's blocking socket.

    Read the article

  • Detect if PCRE was built without the --enable-unicode-properties or --enable-utf8 configuration switches

    - by Mark Baker
    I've a PHP library that uses a number of regular expressions featuring the \P expressions for multibyte strings, e.g. ((((?:\P{M}\p{M}*)+?)|(\'[^\']*\')|(\"[^\"]*\"))!)?\$?([a-z]{1,3})\$?(\d+) While this works on most builds, I've had a few reports of the regexp returning an error. Depending on Operating platform, the error messages from PCRE are: Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset n or Compilation failed: support for \\P, \\p, and \\X has not been compiled at offset n I know that I can probably test a regexp at the beginning of my code that uses \P, and trap for a returned error, then use that response to set a compatibility flag and provide a degraded (non UTF-8) regexp without the \P within the main body of my code based on that compatibility flag; but I was wondering if there was any simpler way to identify whether PCRE had been built without the --enable-unicode-properties or --enable-utf8 configuration switches. PHP provides access to PCRE_VERSION constant, but that won't help identify whether \P support is enabled or not.

    Read the article

< Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >