Search Results

Search found 2399 results on 96 pages for 'alex gosselin'.

Page 61/96 | < Previous Page | 57 58 59 60 61 62 63 64 65 66 67 68  | Next Page >

  • Are CMAttitude and CATransform3D related by rotational matrices?

    - by Alex Stone
    I'm looking at the core motion class CMAttitude, it can express the device's orientation as a 3x3 rotational matrix. At the same time I've taken a look at the CATransform3D, which encapsulates the view's attitude, as well as scaling. The CATransform3D is a 4x4 matrix. I've seen that the OpenGL rotational matrix is 4x4 and is simply 0001 padded in the 4th row and column. I'm wandering if the CMAttitude's rotational matrix is related to CATransform's matrix? Can I use the device's rotation in space obtained via a rotational matrix to transform a UIView using CATransform3D? My intention is to let the user move the phone and apply the same transform to a UIView on the screen. Bonus question: if they are related, how do I transform a CMAttitude's rotational matrix to CATransform3D?

    Read the article

  • How to reliably measure available memory in Linux?

    - by Alex B
    Linux /proc/meminfo shows a number of memory usage statistics. MemTotal: 4040732 kB MemFree: 23160 kB Buffers: 163340 kB Cached: 3707080 kB SwapCached: 0 kB Active: 1129324 kB Inactive: 2762912 kB There is quite a bit of overlap between them. For example, as far as I understand, there can be active page cache (belongs to "cached" and "active") and inactive page cache ("inactive" + "cached"). What I want to do is to measure "free" memory, but in a way that it includes used pages that are likely to be dropped without a significant impact on overall system's performance. At first, I was inclined to use "free" + "inactive", but Linux's "free" utility uses "free" + "cached" in its "buffer-adjusted" display, so I am curious what a better approach is. When the kernel runs out of memory, what is the priority of pages to drop and what is the more appropriate metric to measure available memory?

    Read the article

  • Migrating from Physical SQL (SQL2000) To VMWare machine (SQL2008) - Transferring Large DB

    - by alex
    We're in the middle of migrating from a windows & SQL 2000 box to a Virtualised Win & SQL 2k8 box The VMWare box is on a different site, with better hardware, connectivity etc... The old(current) physical machine is still in constant use - I've taken a backup of the DB on this machine, which is 21GB Transfering this to our virtual machine took around 7+ hours - which isn't ideal when we do the "actual" switchover. My question is - How should I handle the migration better? Could i set up our current machine to do log shipping to the VM machine to keep up to date? then, schedule down time out of hours to do the switch over? Is there a better way?

    Read the article

  • Forcing Arrange in a Custom WPF Canvas

    - by Alex Marshall
    Hello, I'm working on a project that involves creating a custom graphical editor. The graphical editor has multiple tabs, and I want to create a preview function that will show a popup with Bitmap previews of the content of each of the tabs. However, the problem I'm running into is that the content for each of the tabs must be arranged before a proper preview can be generated for it. This means going into each of the tabs to ensure that they're rendered and arranged. Then, and only then, do the previews get properly generated, otherwise the previews have a size of 0x0. Does anybody know how to force an arrange of a content control so that I can get a properly sized preview generated ?

    Read the article

  • How to disable scaling in JFreeChart?

    - by Alex Arnon
    Hi All, We're using JFreeChart to build an engine to display graphs. This is a web service that runs on Tomcat + Java 1.5.0, and renders charts to PNGs and JPEGs (using ChartUtilities.writeChartAs{PNG,JPEG}() ). We've run into a problem where JFreeChart seems to scale everything inside the Plot area, but only by a few pixels. The result is that the graph looks inconsistent, e.g.: Minor ticks are sometimes stretched horizontally, so that they seem to be two pixels wide instead of one. We use a small image in the top-right of the plot area as a watermark. This is stretched by one pixel horizontally and vertically somewhere near (but not exactly) its middle. Background grid lines seem to appear on sub-pixel boundaries. I have not found a way to create an accurately dotted grid line. We have tried both 1.0.9 and 1.0.13, with exactly the same results (except for the minor ticks, which were not available in the older version). Also, rendering the image to a Frame instead of JPEG/PNG produced an identical result. Help is greatly appreciated, in advance :)

    Read the article

  • Tag Cloud JS + Flash. Not clickable?

    - by Alex
    Hello all, I've implemented a tag cloud on a site of mine, and I'm using a JS script to populate it, but for some reason, the actual text in the tag cloud is not clickable. It displays and works correctly, but the actual text of the cloud is not getting treated as a link for some odd reason. My question is: In my script below, do you see anything that I need to fix in order to make my tag cloud's text actually be links? The site I've implemented it on is a stackexhange site that I run, it is supposed to be a cloud of the "recent tags." CloudPopulator.js <script type="text/javascript"> var divRecentTags = document.getElementById("recent-tags"); if (divRecentTags) { var cloud = new SWFObject("https://kynetx-images.s3.amazonaws.com/tagcloud.swf", "tagcloudflash", "200", "200", "9", "#ffffff"); cloud.addParam("allowScriptAccess", "always"); cloud.addVariable("tcolor", "0x0a94d6"); cloud.addVariable("tcolor2", "0xC0C0C0"); cloud.addVariable("hicolor", "0x000000"); cloud.addVariable("tspeed", "150"); cloud.addVariable("distr", "true"); cloud.addVariable("mode", "tags"); var aTags = divRecentTags.getElementsByTagName("a"); var tagHtml = ""; for(var i = 0; i < aTags.length; i++) { var hrefText = aTags[i].getAttribute("href"); var cssText = aTags[i].className; var tagName = $(aTags[i]).text(); var styleText = "style=\'font-size: 8pt;\'"; if (cssText == "post-tag pop1") { var styleText = "style=\'font-size: 15pt;\'"; } else if (cssText == "post-tag pop2") { var styleText = "style=\'font-size: 22pt;\'"; } var newLinkText = "<a href=\'"+hrefText+"\'"+styleText+">"+tagName+"</a>"; tagHtml = tagHtml + newLinkText; } cloud.addVariable("tagcloud", escape("<tags>" + tagHtml + "</tags>")); cloud.write("recent-tags"); }

    Read the article

  • Dynamic instant theming a la My Yahoo / iGoogle

    - by Alex Neth
    I can think of lots of ways to do this on my own, but I was hoping to find some sort of best practice and have been having trouble finding other's experiences. I want to create easily themed HTML and provide a real-time selector for the user to experiment with themes. I want to do something like the "Change Appearance" tab at http://my.yahoo.com . I'll be using jQuery. jQuery has a "theming" system, but it seems very much focused on jQuery widgets as opposed to the whole site, and also doesn't appear to address the real-time selection aspect (the jQuery page has this functionality, but I don't think it's part of the library.) Maybe there is a jQuery plugin that already does this? Or some sort of css/jQuery framework?

    Read the article

  • Reversing the effects of mkimage to get an original gzipped file back

    - by Alex Marshall
    Hello, We develop for a specific embedded device at our company, and part of that is making initial root disks that get loaded onto the devices over ethernet via netboot. We've experienced some problems, and as a result, the original folder with the contents of the initial root disks was lost along with its backups, but we do still have the initrd images, that have been created by gzipping the contents of a ramdisk that's been mounted as a local loop device, and then running mkimage on the gzipped file. Is there any way to undo the effects of mkimage and obtain the original gzipped content so that we can recover the original images ?

    Read the article

  • I DISTINCTly hate MySQL (help building a query)

    - by Alex Mcp
    This is staight forward I believe: I have a table with 30,000 rows. When I SELECT DISTINCT 'location' FROM myTable it returns 21,000 rows, about what I'd expect, but it only returns that one column. What I want is to move those to a new table, but the whole row for each match. My best guess is something like SELECT * from (SELECT DISTINCT 'location' FROM myTable) or something like that, but it says I have a vague syntax error. Is there a good way to grab the rest of each DISTINCT row and move it to a new table all in one go?

    Read the article

  • Google Maps custom marker - can the iframe accept one like the static maps?

    - by alex
    I was reading the static maps API, and it says you can include a custom marker in the GET params. You simply link to an image file. I now have a second Google Map within an iframe, and was wondering if you can attach custom markers via the GET params to it? Here is the src attribute of the iframe currently. http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=111+Fake+Street+Noosaville+Queensland+Australia&ie=UTF8&output=embed I can't seem to find the documentation on how to do this, if possible. Is this possible?

    Read the article

  • How do I make PyScripter work? Says it cant find python26.dll

    - by Alex
    I installed PyScript to try it out but it just wont start. It only gives me the error: "Error126: Could not open Dll "python26.dll" followed by: "Python could not be properly initialized. We must quit." I think this may have something to do with the PYTHONPATH but since I'm a newbie and dont know what it is or exactly what to put in the PYTHONPATH, after some googling, I ask here. Also, when I tried to install wxPython it was impossible becouse the PYTHONPATH could not be found.(Just a side note) I have installed ActivePython 2.6 and the PATH is set so I can access python in cmd.

    Read the article

  • Why can't RB-Tree be a list?

    - by Alex
    Hey everyone. I have a problem with the rb-trees. according to wikipedia, rb-tree needs to follow the following: A node is either red or black. The root is black. (This rule is used in some definitions and not others. Since the root can always be changed from red to black but not necessarily vice-versa this rule has little effect on analysis.) All leaves are black. Both children of every red node are black. Every simple path from a given node to any of its descendant leaves contains the same number of black nodes. As we know, an rb-tree needs to be balanced and has the height of O(log(n)). But, if we insert an increasing series of numbers (1,2,3,4,5...) and theoretically we will get a tree that will look like a list and will have the height of O(n) with all its nodes black, which doesn't contradict the rb-tree properties mentioned above. So, where am I wrong?? thanks.

    Read the article

  • 'How decode my encode xml data?

    - by Alex
    Hi <% 'Stage 1 datas=Server.URLencode("<PaginationData currentPage=""1"" totalPages=""9""/>") response.write "Encode = " datas &"</br></br>" 'Stage 2 response.write "Decode = " 'How i again decode my encode data? %> In the "Stage 1" , i encode my xml data In the "Stage 2", How i decode the "Stage 1" Encode data? hoping your support

    Read the article

  • What database field should this be?

    - by alex
    I have a table called "Event". A column has "duration"--which is...how long that event lasts. What database type should this be? Integer? (in seconds)? In the future, I will do statements such as: If now() > event.duration THEN don't display the event.

    Read the article

  • Using strtok() in a loop in C?

    - by Alex Xander
    I am trying to use strtok() in nested loop. But this is not giving me desired results. Possibly because they are using same memory location. My code is of the form:- char *token1 = strtok(Str1, "%"); while(token1 != NULL ) { char *token2 = strtok(Str2, "%"); while(token2 != NULL ) { //DO SMTHING token2 = strtok(NULL, "%"); } token1 = strtok(NULL, "%"); // Do something more }

    Read the article

  • Force close when starting new activity

    - by Alex
    I'm trying to launch a new activity from my main activity, but I just get error codes all the time. Heres my main activity; public class gunstats extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Button button4 = (Button)findViewById(R.id.button4); button4.setOnClickListener(new Button.OnClickListener() { public void onClick(View v) { Intent intent = new Intent(gunstats.this, more.class); startActivity(intent); } }); } } and the activity that is being called from my main class; public class more extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); final MediaPlayer mp = MediaPlayer.create(this, R.raw.deagle); Button buttonm1 = (Button)this.findViewById(R.id.buttonm1); buttonm1.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { mp.start(); } }); } } And there's nothing wrong in the manifest Heres my logcat: 01-08 16:33:17.647: ERROR/AndroidRuntime(552): Uncaught handler: thread main exiting due to uncaught exception 01-08 16:33:17.676: ERROR/AndroidRuntime(552): android.content.ActivityNotFoundException: Unable to find explicit activity class {com.gunstats/com.gunstats.more}; have you declared this activity in your AndroidManifest.xml? 01-08 16:33:17.676: ERROR/AndroidRuntime(552): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1480) 01-08 16:33:17.676: ERROR/AndroidRuntime(552): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1454) 01-08 16:33:17.676: ERROR/AndroidRuntime(552): at android.app.Activity.startActivityForResult(Activity.java:2660) 01-08 16:33:17.676: ERROR/AndroidRuntime(552): at android.app.Activity.startActivity(Activity.java:2704) 01-08 16:33:17.676: ERROR/AndroidRuntime(552): at com.gunstats.gunstats$4.onClick(gunstats.java:64) 01-08 16:33:17.676: ERROR/AndroidRuntime(552): at android.view.View.performClick(View.java:2344) 01-08 16:33:17.676: ERROR/AndroidRuntime(552): at android.view.View.onTouchEvent(View.java:4133) 01-08 16:33:17.676: ERROR/AndroidRuntime(552): at android.widget.TextView.onTouchEvent(TextView.java:6504) 01-08 16:33:17.676: ERROR/AndroidRuntime(552): at android.view.View.dispatchTouchEvent(View.java:3672) 01-08 16:33:17.676: ERROR/AndroidRuntime(552): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:882) 01-08 16:33:17.676: ERROR/AndroidRuntime(552): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:882) 01-08 16:33:17.676: ERROR/AndroidRuntime(552): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:882) 01-08 16:33:17.676: ERROR/AndroidRuntime(552): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:882) 01-08 16:33:17.676: ERROR/AndroidRuntime(552): at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1712) 01-08 16:33:17.676: ERROR/AndroidRuntime(552): at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1202) 01-08 16:33:17.676: ERROR/AndroidRuntime(552): at android.app.Activity.dispatchTouchEvent(Activity.java:1987) 01-08 16:33:17.676: ERROR/AndroidRuntime(552): at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1696) 01-08 16:33:17.676: ERROR/AndroidRuntime(552): at android.view.ViewRoot.handleMessage(ViewRoot.java:1658) 01-08 16:33:17.676: ERROR/AndroidRuntime(552): at android.os.Handler.dispatchMessage(Handler.java:99) 01-08 16:33:17.676: ERROR/AndroidRuntime(552): at android.os.Looper.loop(Looper.java:123) 01-08 16:33:17.676: ERROR/AndroidRuntime(552): at android.app.ActivityThread.main(ActivityThread.java:4203) 01-08 16:33:17.676: ERROR/AndroidRuntime(552): at java.lang.reflect.Method.invokeNative(Native Method) 01-08 16:33:17.676: ERROR/AndroidRuntime(552): at java.lang.reflect.Method.invoke(Method.java:521) 01-08 16:33:17.676: ERROR/AndroidRuntime(552): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791) 01-08 16:33:17.676: ERROR/AndroidRuntime(552): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549) 01-08 16:33:17.676: ERROR/AndroidRuntime(552): at dalvik.system.NativeStart.main(Native Method) What is causing this force close?

    Read the article

  • XNA .FBX Vertex Color Missing

    - by Alex
    When I vertex paint and export my models from Blender (or Maya) for use in my XNA 4.0 project, I somehow lose the vertex color channel for the model. I use no custom model object or content pipelines and my own shader throws me the error: The current vertex declaration does not include all the elements required by the current vertex shader. Color0 is missing. I tryed to reopen the model in other modeling tools and the vertex colors are there. What could cause the vertex color channel to not get loaded in XNA 4.0? Here's a temporary link to the FBX file(server refuses to send a fbx, so rename the .jpg file to .fbx after downloading) http://resources.gamestack.org/BananaBush.jpg

    Read the article

  • How to map code points to unicode characters depending on the font used?

    - by Alex Schröder
    The client prints labels and has been using a set of symbolic (?) fonts to do this. The application uses a single byte database (Oracle with Latin-1). The old application I am replacing was not Unicode aware. It somehow did OK. The replacement application I am writing is supposed to handle the old data. The symbols picked from the charmap application often map to particular Unicode characters, but sometimes they don't. What looks like the Moon using the LAB3 font, for example, is in fact U+2014 (EM DASH). When users paste this character into a Swing text field, the character has the code point 8212. It was "moved" into the Private Use Area (by Windows? Java?). When saving this character to the database, Oracle decides that it cannot be safely encoded and replaces it with the dreaded ¿. Thus, I started shifting the characters by 8000: -= 8000 when saving, += 8000 when displaying the field. Unfortunately I discovered that other characters were not shifted by the same amount. In one particular font, for example, ž has the code point 382, so I shifted it by +/-256 to "fix" it. By now I'm dreading the discovery of more strange offsets and I wonder: Can I get at this mapping using Java? Perhaps the TTF font has a list of the 255 glyphs it encodes and what Unicode characters those correspond to and I can do it "right"? Right now I'm using the following kludge: static String fromDatabase(String str, String fontFamily) { if (str != null && fontFamily != null) { Font font = new Font(fontFamily, Font.PLAIN, 1); boolean changed = false; char[] chars = str.toCharArray(); for (int i = 0; i < chars.length; i++) { if (font.canDisplay(chars[i] + 0xF000)) { // WE8MSWIN1252 + WinXP chars[i] += 0xF000; changed = true; } else if (chars[i] >= 128 && font.canDisplay(chars[i] + 8000)) { // WE8ISO8859P1 + WinXP chars[i] += 8000; changed = true; } else if (font.canDisplay(chars[i] + 256)) { // ž in LAB1 Eastern = 382 chars[i] += 256; changed = true; } } if (changed) str = new String(chars); } return str; } static String toDatabase(String str, String fontFamily) { if (str != null && fontFamily != null) { boolean changed = false; char[] chars = str.toCharArray(); for (int i = 0; i < chars.length; i++) { int chr = chars[i]; if (chars[i] > 0xF000) { // WE8MSWIN1252 + WinXP chars[i] -= 0xF000; changed = true; } else if (chars[i] > 8000) { // WE8ISO8859P1 + WinXP chars[i] = (char) (chars[i] - 8000); changed = true; } else if (chars[i] > 256) { // ž in LAB1 Eastern = 382 chars[i] = (char) (chars[i] - 256); changed = true; } } if (changed) return new String(chars); } return str; }

    Read the article

  • Explain "Leader/Follower" Pattern

    - by Alex B
    I can't seem to find a good explanation of "Leader/Follower" pattern. All explanations either simply refer to it in the context of some problem, or are completely meaningless. Can anyone explain to the the mechanics of how this pattern works, and why and how it improves performance over more traditional asynchronous IO models? Examples and links to diagrams are appreciated too.

    Read the article

  • propertyplaceholderconfigurer class name substitution problem

    - by Alex
    The following example works for "class name substitution using the PropertyPlaceHolderConfigurer": http://forum.springsource.org/showpost.php?p=228136&postcount=2 HOWEVER, when porting this code over (messages.properties, com.spring.ioc.TestClass, and spring-config.xml) to a web application, the class name substitution now fails! 1) I am running on the webapp on Tomcat through the Eclipse plugin. 2) In the web.xml I have the following: <context-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/spring-config.xml</param-value> </context-param> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> 3) The following is output in the log: 282 [main] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Ignoring bean class loading failure for bean 'test' org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [${test.class}] for bean with name 'test' defined in ServletContext resource [/WEB-INF/spring-config.xml]; nested exception is java.lang.ClassNotFoundException: ${test.class} at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1141) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:524) at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1177) at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:222) at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:505) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:362) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3795) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4252) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014) at org.apache.catalina.core.StandardHost.start(StandardHost.java:736) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:448) at org.apache.catalina.core.StandardServer.start(StandardServer.java:700) at org.apache.catalina.startup.Catalina.start(Catalina.java:552) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433) Caused by: java.lang.ClassNotFoundException: ${test.class} at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1438) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1284) at org.springframework.util.ClassUtils.forName(ClassUtils.java:211) at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:385) at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1138) ... 23 more Note: I haven't included it, but the PropertyPlaceHolderConfigurer is successfully locating the messages.properties file, but this seems to happen AFTER the above error is output?! DOES ANYBODY KNOW WHY THIS IS THE CASE AND HOW I CAN OVERCOME THIS PROBLEM?

    Read the article

< Previous Page | 57 58 59 60 61 62 63 64 65 66 67 68  | Next Page >