Search Results

Search found 1471 results on 59 pages for 'surface rt'.

Page 6/59 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • How can I get the palette of an 8-bit surface in SDL.NET/Tao.SDL?

    - by lolmaster
    I'm looking to get the palette of an 8-bit surface in SDL.NET if possible, or (more than likely) using Tao.SDL. This is because I want to do palette swapping with the palette directly, instead of blitting surfaces together to replace colours like how you would do it with a 32-bit surface. I've gotten the SDL_Surface and the SDL_PixelFormat, however when I go to get the palette in the same way, I get a System.ExecutionEngineException: private Tao.Sdl.Sdl.SDL_Palette GetPalette(Surface surf) { // Get surface. Tao.Sdl.Sdl.SDL_Surface sdlSurface = (Tao.Sdl.Sdl.SDL_Surface)System.Runtime.InteropServices.Marshal.PtrToStructure(surf.Handle, typeof(Tao.Sdl.Sdl.SDL_Surface)); // Get pixel format. Tao.Sdl.Sdl.SDL_PixelFormat pixelFormat = (Tao.Sdl.Sdl.SDL_PixelFormat)System.Runtime.InteropServices.Marshal.PtrToStructure(sdlSurface.format, typeof(Tao.Sdl.Sdl.SDL_PixelFormat)); // Execution exception here. Tao.Sdl.Sdl.SDL_Palette palette = (Tao.Sdl.Sdl.SDL_Palette)System.Runtime.InteropServices.Marshal.PtrToStructure(pixelFormat.palette, typeof(Tao.Sdl.Sdl.SDL_Palette)); return palette; } When I used unsafe code to get the palette, I got a compile time error: "Cannot take the address of, get the size of, or declare a pointer to a managed type ('Tao.Sdl.Sdl.SDL_Palette')". My unsafe code to get the palette was this: unsafe { Tao.Sdl.Sdl.SDL_Palette* pal = (Tao.Sdl.Sdl.SDL_Palette*)pixelFormat.palette; } From what I've read, a managed type in this case is when a structure has some sort of reference inside it as a field. The SDL_Palette structure happens to have an array of SDL_Color's, so I'm assuming that's the reference type that is causing issues. However I'm still not sure how to work around that to get the underlying palette. So if anyone knows how to get the palette from an 8-bit surface, whether it's through safe or unsafe code, the help would be greatly appreciated.

    Read the article

  • For normal mapping, why can we not simply add the tangent normal to the surface normal?

    - by sebf
    I am looking at implementing bump mapping (which in all implementations I have seen is really normal mapping), and so far all I have read says that to do this, we create a matrix to convert from world-space to tangent-space, in order to transform the lights and eye direction vectors into tangent space, so that the vectors from the normal map may be used directly in place of those passed through from the vertex shader. What I do not understand though, is why we cannot just use the normalised sum of the sampled-normal vector, and the surface-normal? (assuming we already transform and pass through the surface normal for the existing lighting functions) Take the diagram below; the normal is simply the deviation from the 'reference normal' for any given coordinate system, correct? And transforming the surface normal of a mapped surface from world space to tangent space makes it equivalent to the tangent space 'reference normal', no? If so, why do we transform all lighting vectors into tangent space, instead of simply transforming the sampled tangent once in the pixel shader?

    Read the article

  • Does the windows 8 store only support windows RT?

    - by Need4Sleep
    I'm in a project for creating a game engine and eventually a game, and we need ideas on how to get our game out into the internet. I had an idea with putting it onto the windows 8 store at a low cost(or free) in order to get the word out, but does the windows 8 store only support apps programmed in windows RT? our game will be built in C++ / OpenGL / GLEW / Actionscript / GLM / etc.. , so we wont be using any windows RT functionality at all.

    Read the article

  • Windows 8.1 RT de retour sur le Windows Store, Microsoft corrige l'erreur qui empêchait l'installation de l'OS

    Windows 8.1 RT de retour sur le Windows Store Microsoft corrige l'erreur qui empêchait l'installation de l'OS Mise à jour du 23/10/13Les utilisateurs de tablettes sur Windows 8.1 peuvent reprendre avec le téléchargement et l'installation de la mise à jour Windows 8.1 RT sur leur dispositif.La mise à jour avait été retirée du Windows Store suite à un bogue pouvant entrainer l'échec de l'installation de Windows 8.1 sur certains dispositifs et l'affichage de l'écran bleu.Microsoft avait indiqué...

    Read the article

  • multiple timer to one process (without linking to rt)

    - by Richard
    Hi, is there any way to register multiple timer to a single process? I have tried following code, yet without success. (Use "gcc -lrt" to compile it...). Program output nothing, which should atleast print "test". Is it possibly due to the dependence to linking to rt? #define TT_SIGUSR1 (SIGRTMAX) #define TT_SIGUSR2 (SIGRTMAX - 1) #define TIME_INTERVAL_1 1 #define TIME_INTERVAL_2 2 #include <signal.h> #include <time.h> #include <stdio.h> #include <unistd.h> #include <linux/unistd.h> #include <sys/syscall.h> #include <sys/time.h> #include <sys/types.h> #include <sched.h> #include <signal.h> #include <setjmp.h> #include <errno.h> #include <assert.h> timer_t create_timer(int signo) { timer_t timerid; struct sigevent se; se.sigev_signo = signo; if (timer_create(CLOCK_REALTIME, &se, &timerid) == -1) { fprintf(stderr, "Failed to create timer\n"); exit(-1); } return timerid; } void set_timer(timer_t timerid, int seconds) { struct itimerspec timervals; timervals.it_value.tv_sec = seconds; timervals.it_value.tv_nsec = 0; timervals.it_interval.tv_sec = seconds; timervals.it_interval.tv_nsec = 0; if (timer_settime(timerid, 0, &timervals, NULL) == -1) { fprintf(stderr, "Failed to start timer\n"); exit(-1); } return; } void install_sighandler2(int signo, void(*handler)(int)) { struct sigaction sigact; sigemptyset(&sigact.sa_mask); sigact.sa_flags = SA_SIGINFO; //register the Signal Handler sigact.sa_sigaction = handler; // Set up sigaction to catch signal first timer if (sigaction(signo, &sigact, NULL) == -1) { printf("sigaction failed"); return -1; } } void install_sighandler(int signo, void(*handler)(int)) { sigset_t set; struct sigaction act; /* Setup the handler */ act.sa_handler = handler; act.sa_flags = SA_RESTART; sigaction(signo, &act, 0); /* Unblock the signal */ sigemptyset(&set); sigaddset(&set, signo); sigprocmask(SIG_UNBLOCK, &set, NULL); return; } void signal_handler(int signo) { printf("receiving sig %d", signo); } int main() { printf("test"); timer_t timer1 = create_timer(TT_SIGUSR1); timer_t timer2 = create_timer(TT_SIGUSR2); set_timer(timer1, TIME_INTERVAL_1); set_timer(timer2, TIME_INTERVAL_2); install_sighandler2(TT_SIGUSR1, signal_handler); install_sighandler(TT_SIGUSR2, signal_handler); while (1) ; return 0; }

    Read the article

  • Frame Buffers wont work with pyglet.

    - by Matthew Mitchell
    I have this code: def setup_framebuffer(surface): #Create texture if not done already if surface.texture is None: create_texture(surface) #Render child to parent if surface.frame_buffer is None: surface.frame_buffer = glGenFramebuffersEXT(1) glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, surface.frame_buffer) glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, surface.texture, 0) glPushAttrib(GL_VIEWPORT_BIT) glViewport(0,0,surface._scale[0],surface._scale[1]) glMatrixMode(GL_PROJECTION) glLoadIdentity() #Load the projection matrix gluOrtho2D(0,surface._scale[0],0,surface._scale[1]) glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, surface.frame_buffer) for this despite the second parameter printing as 1 for a test I did, I get: glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, surface.frame_buffer) I only got this after implementing pyglet. GLUT is too limited. Thank you.

    Read the article

  • Request Tracker 4: Ticket Escalation

    - by Randy
    I am running Request Tracker 4 on a Debian Squeeze Server. I have to implement a priority escalation. Actually escalation is not the right term for this since the the ticket priority should be set linear via rt-crontool (or any other tool that can be run via a cronjob) dependent on the time that has been passed between the „Started“ and „Due“ to a number between 0 (starting priority) and the „Final Priority“ (eg. 100) while the value of the „Final Priority“ should be reached exactly the moment the „Due“-Date is passed. This already implies that the search condition should be all tickets of a certain queue that have „Started“ AND „Due“ AND „Final Priority“. The cronjob should be called very frequently for excample any 5 or 10 minutes so that the call should be indempotent and not depentent on the frequency of the rt-crontool invocations. One Example: A Ticket is Started at 2012-12-23 0am and Due is 2012-12-23 11.59pm while the Final Priority is 100. When the call is made at noon the priority should be set to 50. Could anybody help me with this? Thank you for reading this to the bottom!

    Read the article

  • Distributing points over a surface within boundries

    - by vise
    I'm interested in a way (algorithm) of distributing a predefined number of points over a 4 sided surface like a square. The main issue is that each point has got to have a minimum and maximum proximity to each other (random between two predefined values). Basically the distance of any two points should not be closer than let's say 2, and a further than 3. My code will be implemented in ruby (the points are locations, the surface is a map), but any ideas or snippets are definitely welcomed as all my ideas include a fair amount of brute force.

    Read the article

  • Error in code of basic game using multiple sprites and surfaceView [on hold]

    - by Khagendra Nath Mahato
    I am a beginner to android and i was trying to make a basic game with the help of an online video tutorial. I am having problem with the multi-sprites and how to use with surfaceview.The application fails launching. Here is the code of the game.please help me. package com.example.killthemall; import java.util.ArrayList; import java.util.List; import java.util.Random; import android.app.Activity; import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Canvas; import android.graphics.Rect; import android.os.Bundle; import android.view.SurfaceHolder; import android.view.SurfaceView; import android.widget.Toast; public class Game extends Activity { KhogenView View1; @Override protected void onPause() { // TODO Auto-generated method stub super.onPause(); while(true){ try { OurThread.join(); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); }} } Thread OurThread; int herorows = 4; int herocolumns = 3; int xpos, ypos; int xspeed; int yspeed; int herowidth; int widthnumber = 0; int heroheight; Rect src; Rect dst; int round; Bitmap bmp1; // private Bitmap bmp1;//change name public List<Sprite> sprites = new ArrayList<Sprite>() { }; @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); View1 = new KhogenView(this); setContentView(View1); sprites.add(createSprite(R.drawable.image)); sprites.add(createSprite(R.drawable.bad1)); sprites.add(createSprite(R.drawable.bad2)); sprites.add(createSprite(R.drawable.bad3)); sprites.add(createSprite(R.drawable.bad4)); sprites.add(createSprite(R.drawable.bad5)); sprites.add(createSprite(R.drawable.bad6)); sprites.add(createSprite(R.drawable.good1)); sprites.add(createSprite(R.drawable.good2)); sprites.add(createSprite(R.drawable.good3)); sprites.add(createSprite(R.drawable.good4)); sprites.add(createSprite(R.drawable.good5)); sprites.add(createSprite(R.drawable.good6)); } private Sprite createSprite(int image) { // TODO Auto-generated method stub bmp1 = BitmapFactory.decodeResource(getResources(), image); return new Sprite(this, bmp1); } public class KhogenView extends SurfaceView implements Runnable { SurfaceHolder OurHolder; Canvas canvas = null; Random rnd = new Random(); { xpos = rnd.nextInt(canvas.getWidth() - herowidth)+herowidth; ypos = rnd.nextInt(canvas.getHeight() - heroheight)+heroheight; xspeed = rnd.nextInt(10 - 5) + 5; yspeed = rnd.nextInt(10 - 5) + 5; } public KhogenView(Context context) { super(context); // TODO Auto-generated constructor stub OurHolder = getHolder(); OurThread = new Thread(this); OurThread.start(); } @Override public void run() { // TODO Auto-generated method stub herowidth = bmp1.getWidth() / 3; heroheight = bmp1.getHeight() / 4; boolean isRunning = true; while (isRunning) { if (!OurHolder.getSurface().isValid()) continue; canvas = OurHolder.lockCanvas(); canvas.drawRGB(02, 02, 50); for (Sprite sprite : sprites) { if (widthnumber == 3) widthnumber = 0; update(); getdirection(); src = new Rect(widthnumber * herowidth, round * heroheight, (widthnumber + 1) * herowidth, (round + 1)* heroheight); dst = new Rect(xpos, ypos, xpos + herowidth, ypos+ heroheight); canvas.drawBitmap(bmp1, src, dst, null); } widthnumber++; OurHolder.unlockCanvasAndPost(canvas); } } public void update() { try { Thread.sleep(1000); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } if (xpos + xspeed <= 0) xspeed = 40; if (xpos >= canvas.getWidth() - herowidth) xspeed = -50; if (ypos + yspeed <= 0) yspeed = 45; if (ypos >= canvas.getHeight() - heroheight) yspeed = -55; xpos = xpos + xspeed; ypos = ypos + yspeed; } public void getdirection() { double angleinteger = (Math.atan2(yspeed, xspeed)) / (Math.PI / 2); round = (int) (Math.round(angleinteger) + 2) % herorows; // Toast.makeText(this, String.valueOf(round), // Toast.LENGTH_LONG).show(); } } public class Sprite { Game game; private Bitmap bmp; public Sprite(Game game, Bitmap bmp) { // TODO Auto-generated constructor stub this.game = game; this.bmp = bmp; } } } Here is the LogCat if it helps.... 08-22 23:18:06.980: D/AndroidRuntime(28151): Shutting down VM 08-22 23:18:06.980: W/dalvikvm(28151): threadid=1: thread exiting with uncaught exception (group=0xb3f6f4f0) 08-22 23:18:06.980: D/AndroidRuntime(28151): procName from cmdline: com.example.killthemall 08-22 23:18:06.980: E/AndroidRuntime(28151): in writeCrashedAppName, pkgName :com.example.killthemall 08-22 23:18:06.980: D/AndroidRuntime(28151): file written successfully with content: com.example.killthemall StringBuffer : ;com.example.killthemall 08-22 23:18:06.990: I/Process(28151): Sending signal. PID: 28151 SIG: 9 08-22 23:18:06.990: E/AndroidRuntime(28151): FATAL EXCEPTION: main 08-22 23:18:06.990: E/AndroidRuntime(28151): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.killthemall/com.example.killthemall.Game}: java.lang.NullPointerException 08-22 23:18:06.990: E/AndroidRuntime(28151): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1647) 08-22 23:18:06.990: E/AndroidRuntime(28151): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663) 08-22 23:18:06.990: E/AndroidRuntime(28151): at android.app.ActivityThread.access$1500(ActivityThread.java:117) 08-22 23:18:06.990: E/AndroidRuntime(28151): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931) 08-22 23:18:06.990: E/AndroidRuntime(28151): at android.os.Handler.dispatchMessage(Handler.java:99) 08-22 23:18:06.990: E/AndroidRuntime(28151): at android.os.Looper.loop(Looper.java:130) 08-22 23:18:06.990: E/AndroidRuntime(28151): at android.app.ActivityThread.main(ActivityThread.java:3683) 08-22 23:18:06.990: E/AndroidRuntime(28151): at java.lang.reflect.Method.invokeNative(Native Method) 08-22 23:18:06.990: E/AndroidRuntime(28151): at java.lang.reflect.Method.invoke(Method.java:507) 08-22 23:18:06.990: E/AndroidRuntime(28151): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:880) 08-22 23:18:06.990: E/AndroidRuntime(28151): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:638) 08-22 23:18:06.990: E/AndroidRuntime(28151): at dalvik.system.NativeStart.main(Native Method) 08-22 23:18:06.990: E/AndroidRuntime(28151): Caused by: java.lang.NullPointerException 08-22 23:18:06.990: E/AndroidRuntime(28151): at com.example.killthemall.Game$KhogenView.<init>(Game.java:96) 08-22 23:18:06.990: E/AndroidRuntime(28151): at com.example.killthemall.Game.onCreate(Game.java:58) 08-22 23:18:06.990: E/AndroidRuntime(28151): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049) 08-22 23:18:06.990: E/AndroidRuntime(28151): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611) 08-22 23:18:06.990: E/AndroidRuntime(28151): ... 11 more 08-22 23:18:18.050: D/AndroidRuntime(28191): Shutting down VM 08-22 23:18:18.050: W/dalvikvm(28191): threadid=1: thread exiting with uncaught exception (group=0xb3f6f4f0) 08-22 23:18:18.050: I/Process(28191): Sending signal. PID: 28191 SIG: 9 08-22 23:18:18.050: D/AndroidRuntime(28191): procName from cmdline: com.example.killthemall 08-22 23:18:18.050: E/AndroidRuntime(28191): in writeCrashedAppName, pkgName :com.example.killthemall 08-22 23:18:18.050: D/AndroidRuntime(28191): file written successfully with content: com.example.killthemall StringBuffer : ;com.example.killthemall 08-22 23:18:18.050: E/AndroidRuntime(28191): FATAL EXCEPTION: main 08-22 23:18:18.050: E/AndroidRuntime(28191): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.killthemall/com.example.killthemall.Game}: java.lang.NullPointerException 08-22 23:18:18.050: E/AndroidRuntime(28191): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1647) 08-22 23:18:18.050: E/AndroidRuntime(28191): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663) 08-22 23:18:18.050: E/AndroidRuntime(28191): at android.app.ActivityThread.access$1500(ActivityThread.java:117) 08-22 23:18:18.050: E/AndroidRuntime(28191): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931) 08-22 23:18:18.050: E/AndroidRuntime(28191): at android.os.Handler.dispatchMessage(Handler.java:99) 08-22 23:18:18.050: E/AndroidRuntime(28191): at android.os.Looper.loop(Looper.java:130) 08-22 23:18:18.050: E/AndroidRuntime(28191): at android.app.ActivityThread.main(ActivityThread.java:3683) 08-22 23:18:18.050: E/AndroidRuntime(28191): at java.lang.reflect.Method.invokeNative(Native Method) 08-22 23:18:18.050: E/AndroidRuntime(28191): at java.lang.reflect.Method.invoke(Method.java:507) 08-22 23:18:18.050: E/AndroidRuntime(28191): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:880) 08-22 23:18:18.050: E/AndroidRuntime(28191): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:638) 08-22 23:18:18.050: E/AndroidRuntime(28191): at dalvik.system.NativeStart.main(Native Method) 08-22 23:18:18.050: E/AndroidRuntime(28191): Caused by: java.lang.NullPointerException 08-22 23:18:18.050: E/AndroidRuntime(28191): at com.example.killthemall.Game$KhogenView.<init>(Game.java:96) 08-22 23:18:18.050: E/AndroidRuntime(28191): at com.example.killthemall.Game.onCreate(Game.java:58) 08-22 23:18:18.050: E/AndroidRuntime(28191): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049) 08-22 23:18:18.050: E/AndroidRuntime(28191): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611) 08-22 23:18:18.050: E/AndroidRuntime(28191): ... 11 more

    Read the article

  • Compiling realtime kernel from RHEL 6 MRG sources on CentOS 6

    - by Sashka B
    I'm trying to compile kernel-rt-2.6.33.9-rt31.75.el6rt.src.rpm from RHEL6 MRG source RPMs on Centos 6 x86_64 system. It's first time I'm doing this, so I did research on how to do this properly. From what I found, I did: rpm -ihv kernel-rt-2.6.33.9-rt31.75.el6rt.src.rpm cd ~/rpmbuild/SPECS nano kernel-rt.spec rpmbuild -bb kernel-rt.spec 2> build-err.log | tee build-out.log in kernel-rt.spec I've disbleed compilation of variants I don' need - ie compile only rt and firmware. Also defined not to build debuginfo. After compilation finished, I've got in ~/rpmbuild/RPMS/x86_64/ two files: kernel-rt-2.6.33.9-rt31.75.el6rt.x86_64.rpm kernel-rt-devel-2.6.33.9-rt31.75.el6rt.x86_64.rpm but when I tried to install kernel, I got error message: $ sudo rpm -ihv kernel-rt-2.6.33.9-rt31.75.el6rt.x86_64.rpm error: Failed dependencies: kernel-rt-firmware = 2.6.33.9-rt31.75.el6rt is needed by kernel-rt-2.6.33.9-rt31.75.el6rt.x86_64 There was no folder ~/rpmbuild/RPMS/noarch - where I would expect it to show up. Also, I've tried rpmbuild --rebuild kernel-rt-2.6.33.9-rt31.75.el6rt.src.rpm, but got same results... What am I doing wrong? I've seen this question, but it suggests what I tried already and I want to build kernel myself, not use pre-built from SLC.

    Read the article

  • Office 2013 : les détails de la version pour tablettes sous Windows RT, une déclinaison qui aura quelques limitations mais pas trop

    Office 2013 pour Windows RT serait limité en fonctionnalités Microsoft aurait supprimé le support des macros, des extensions et de VBA Microsoft avait annoncé que les tablettes ARM sur lesquelles seront exécutées Windows RT intégreront par défaut la suite bureautique Office 2013. Des sources officieuses, il semblerait que la firme aurait décidé que cette version d'Office serait dépourvue d'un certain nombre de fonctionnalités. Selon TheVerge, les fonctions comme les macros, les extensions tierces, le support de VBA et un petit nombre d'autres fonctionnalités ont été supprimées. Comme pour la version Metro d'Internet Explorer (dont les plugins ne sont pas autorisés), Micro...

    Read the article

  • L'Unreal Engine 3 fonctionne sur Windows 8 RT, le moteur d'Epic Games tente de prendre des parts de marché à Unity

    L'Unreal Engine 3 fonctionne sur Windows 8 RT Une réponse logique de la part de Epic Games, face à la récente annonce de Unity. Après l'annonce du support de Windows 8 et Windows Phone 8 par Unity 3D, NVIDIA propose une vidéo montrant la démo porte-étendard pour les plateformes mobiles : Epic Citadel, de l'Unreal Engine 3. Elle fonctionne sur la tablette ASUS Vivo Tab RT, intégrant un NVIDIA Tegra. Pour rappel, ce processeur basé sur l'architecture ARM, combine CPU et GPU sur une même puce. Un des points ...

    Read the article

  • Surface sous Windows RT sera supportée jusqu'en avril 2017, la tablette de Microsoft recevra des mises à jour pendant plus de 4 ans

    Surface sous Windows RT sera supportée jusqu'en avril 2017 la tablette de Microsoft recevra des mises à jour pendant plus de 4 ans Surface sous Windows RT bénéficiera d'un support de 4 ans et demi. Microsoft a procédé à une mise à jour de sa politique de support en intégrant une nouvelle section pour sa tablette fonctionnant avec la version ARM de Windows. Les possesseurs du dispositif pourront recevoir des mises à jour logicielles, des correctifs de sécurité, ainsi que des mises à jour du firmware (micrologiciel intégré dans le hardware) jusqu'au 24 avril 2017. Contrairement aux versions traditionnelles de Windows qui bénéficient d'un support principal de 5 ans, Mi...

    Read the article

  • Disable Shadow on a ScatterViewItem on Microsoft Surface

    - by Jeff
    Hello, I'm developing a program on Microsoft Surface. And I didn't succeed to make disable completely the shadow. Here is my problem : http://i61.servimg.com/u/f61/11/31/25/01/sans_t10.png Heres is the XAML code : <s:ScatterViewItem Height="130" x:Name="jetons1" Width="180" CanScale="False" BorderThickness="0" ShowsActivationEffects="False" StaysActive="True" SnapsToDevicePixels="True" Foreground="{x:Null}" Background="{x:Null}" BorderBrush="{x:Null}" />

    Read the article

  • Embedding a flowchart design surface in a .NET application

    - by PaulB
    I need to incorporate a flowchart design surface into an application we're developing to allow users to create what are essentially workflows/schedules. I need to be able to create my own 'shapes', set custom properties on them and possibly have a bit of logic in there too (if, while etc). I know I need to take a look at hosting WF in the application. It looks like a good fit, but what other designer compoments out there could I use?

    Read the article

  • Making an application draw a surface other than the desktop

    - by Cloud
    Hello Im looking for a way to get an application, any application, that has been started using ShellExecuteEx or CreateProcess to draw on an offscreen surface such as a bitmap instead of drawing on the desktop, this should include any dialogs the (Open, Save, messages) that the application invokes. I am familiar with the Windows API, GDI and device context, any suggestions would be much appreciated.

    Read the article

  • Is a point inside or outside a polygon which is on the surface of a globe

    - by richard
    How do I determine if a point is inside or outside a polygon that lies on the the surface of the earth? The inside of the polygon can be determined via the right hand rule, ie. the inside of the polygon is on your right hand side when you walk around the polygon. The polygon may Circle either pole Cross the 180 longitude Cover more than 50% of the globe As the globe is a sphere the normal ray crossing algorithms do not work correctly.

    Read the article

  • Get coordinates of beads covering the surface of a protein

    - by Hefeweizen
    Given a protein structure from the PDB, I would like to generate NS spheres of radius Rs which cover totally the protein surface. Given RS there, NS is the maximum number of spheres so they do not overlap. I would need the coordinates of the center of each sphere. Does anybody know if this has been implemented in some method / program? Or how to do it with scripting. Thanks

    Read the article

  • c# - clear surface when resizing

    - by dhh
    Hello, I'm trying to build my own custom control for a windows forms application in C#.Net. Currently I paint some rectangles and other graphic elements using the paint event. When I now resize the app form to fit the desktop size, all elements are repainted (which is exactly the behaviour I need) but the old one's are shown in the background. Here's what I'm doing by now: Pen penDefaultBorder = new Pen(Color.Wheat, 1); int margin = 5; private void CustomControl_Paint(object sender, PaintEventArgs e) { CustomControl calendar = (CustomControl)sender; Graphics graphics = e.Graphics; graphics.Clear(Color.WhiteSmoke); graphics.DrawRectangle(penDefaultBorder, margin, margin, calendar.Width - margin * 2, calendar.Height - margin * 2); //... } Neither the graphics.Clear, nor adding a graphics.FillRectangle(...) will hide the old rectangle from the surface. Ideas? Thank you all.

    Read the article

  • Matplotlib plotting non uniform data in 3D surface

    - by Raj Tendulkar
    I have a simple code to plot the points in 3D for Matplotlib as below - from mpl_toolkits.mplot3d import axes3d import matplotlib.pyplot as plt import numpy as np from numpy import genfromtxt import csv fig = plt.figure() ax = fig.add_subplot(111, projection='3d') my_data = genfromtxt('points1.csv', delimiter=',') points1X = my_data[:,0] points1Y = my_data[:,1] points1Z = my_data[:,2] ## I remove the header of the CSV File. points1X = np.delete(points1X, 0) points1Y = np.delete(points1Y, 0) points1Z = np.delete(points1Z, 0) # Convert the array to 1D array points1X = np.reshape(points1X,points1X.size) points1Y = np.reshape(points1Y,points1Y.size) points1Z = np.reshape(points1Z,points1Z.size) my_data = genfromtxt('points2.csv', delimiter=',') points2X = my_data[:,0] points2Y = my_data[:,1] points2Z = my_data[:,2] ## I remove the header of the CSV File. points2X = np.delete(points2X, 0) points2Y = np.delete(points2Y, 0) points2Z = np.delete(points2Z, 0) # Convert the array to 1D array points2X = np.reshape(points2X,points2X.size) points2Y = np.reshape(points2Y,points2Y.size) points2Z = np.reshape(points2Z,points2Z.size) ax.plot(points1X, points1Y, points1Z, 'd', markersize=8, markerfacecolor='red', label='points1') ax.plot(points2X, points2Y, points2Z, 'd', markersize=8, markerfacecolor='blue', label='points2') plt.show() My problem is that I tried to make a decent surface plot out of these data points that I have. I already tried to use ax.plot_surface() function to make it look nice. For this I eliminated some points, and recalculated the matrix kind of input needed by this function. However, the graph I generated was far more difficult to interpret and understand. So there might be 2 possibilities: either I am not using the function correctly, or otherwise, the data I am trying to plot is not good for the surface plot. What I was expecting was 3D graph which would have an effect similar to that we have of 3D pie chart. We see that one piece (that which is extracted out) is part of another piece. I was not expecting it to be exactly same like that, but some kind of effect like that. What I would like to ask is: Do you think it will be possible to make such 3D graph? Is there any way better, I could express my data in 3 dimension? Here are the 2 files - points1.csv Dim1,Dim2,Dim3 3,8,1 3,8,2 3,8,3 3,8,4 3,8,5 3,9,1 3,9,2 3,9,3 3,9,4 3,9,5 3,10,1 3,10,2 3,10,3 3,10,4 3,10,5 3,11,1 3,11,2 3,11,3 3,11,4 3,11,5 3,12,1 3,12,2 3,13,1 3,13,2 3,14,1 3,14,2 3,15,1 3,15,2 3,16,1 3,16,2 3,17,1 3,17,2 3,18,1 3,18,2 4,8,1 4,8,2 4,8,3 4,8,4 4,8,5 4,9,1 4,9,2 4,9,3 4,9,4 4,9,5 4,10,1 4,10,2 4,10,3 4,10,4 4,10,5 4,11,1 4,11,2 4,11,3 4,11,4 4,11,5 4,12,1 4,13,1 4,14,1 4,15,1 4,16,1 4,17,1 4,18,1 5,8,1 5,8,2 5,8,3 5,8,4 5,8,5 5,9,1 5,9,2 5,9,3 5,9,4 5,9,5 5,10,1 5,10,2 5,10,3 5,10,4 5,10,5 5,11,1 5,11,2 5,11,3 5,11,4 5,11,5 5,12,1 5,13,1 5,14,1 5,15,1 5,16,1 5,17,1 5,18,1 6,8,1 6,8,2 6,8,3 6,8,4 6,8,5 6,9,1 6,9,2 6,9,3 6,9,4 6,9,5 6,10,1 6,11,1 6,12,1 6,13,1 6,14,1 6,15,1 6,16,1 6,17,1 6,18,1 7,8,1 7,8,2 7,8,3 7,8,4 7,8,5 7,9,1 7,9,2 7,9,3 7,9,4 7,9,5 and points2.csv Dim1,Dim2,Dim3 3,12,3 3,12,4 3,12,5 3,13,3 3,13,4 3,13,5 3,14,3 3,14,4 3,14,5 3,15,3 3,15,4 3,15,5 3,16,3 3,16,4 3,16,5 3,17,3 3,17,4 3,17,5 3,18,3 3,18,4 3,18,5 4,12,2 4,12,3 4,12,4 4,12,5 4,13,2 4,13,3 4,13,4 4,13,5 4,14,2 4,14,3 4,14,4 4,14,5 4,15,2 4,15,3 4,15,4 4,15,5 4,16,2 4,16,3 4,16,4 4,16,5 4,17,2 4,17,3 4,17,4 4,17,5 4,18,2 4,18,3 4,18,4 4,18,5 5,12,2 5,12,3 5,12,4 5,12,5 5,13,2 5,13,3 5,13,4 5,13,5 5,14,2 5,14,3 5,14,4 5,14,5 5,15,2 5,15,3 5,15,4 5,15,5 5,16,2 5,16,3 5,16,4 5,16,5 5,17,2 5,17,3 5,17,4 5,17,5 5,18,2 5,18,3 5,18,4 5,18,5 6,10,2 6,10,3 6,10,4 6,10,5 6,11,2 6,11,3 6,11,4 6,11,5 6,12,2 6,12,3 6,12,4 6,12,5 6,13,2 6,13,3 6,13,4 6,13,5 6,14,2 6,14,3 6,14,4 6,14,5 6,15,2 6,15,3 6,15,4 6,15,5 6,16,2 6,16,3 6,16,4 6,16,5 6,17,2 6,17,3 6,17,4 6,17,5 6,18,2 6,18,3 6,18,4 6,18,5 7,10,1 7,10,2 7,10,3 7,10,4 7,10,5 7,11,1 7,11,2 7,11,3 7,11,4 7,11,5 7,12,1 7,12,2 7,12,3 7,12,4 7,12,5 7,13,1 7,13,2 7,13,3 7,13,4 7,13,5 7,14,1 7,14,2 7,14,3 7,14,4 7,14,5 7,15,1 7,15,2 7,15,3 7,15,4 7,15,5 7,16,1 7,16,2 7,16,3 7,16,4 7,16,5 7,17,1 7,17,2 7,17,3 7,17,4 7,17,5 7,18,1 7,18,2 7,18,3 7,18,4 7,18,5

    Read the article

  • Bouncing a ball off a surface

    - by Sagekilla
    Hi all, I'm currently in the middle of writing a game like Breakout, and I was wondering how I could properly bounce a ball off a surface. I went with the naive way of rotating the velocity by 180 degrees, which was: [vx, vy] -> [-vy, vx] Which (unsurprisingly) didn't work so well. If I know the position and veocity of the ball, as well as the point the ball would hit (but is going to instead bounce off of) how can I bounce it off that point? I don't need any language specific code. If anyone could provide a small, mathematical formula on how to properly do this that would work fine for me. I also need this to work with integer positions and velocity (I can't use floating point anywhere). Thanks!

    Read the article

  • Surface Area of a Spheroid in Python

    - by user3678321
    I'm trying to write a function that calculates the surface area of a prolate or oblate spheroid. Here's a link to where I got the formulas (http://en.wikipedia.org/wiki/Prolate_spheroid & http://en.wikipedia.org/wiki/Oblate_spheroid). I think I've written them wrong, but here is my code so far; from math import pi, sqrt, asin, degrees, tanh def checkio(height, width): height = float(height) width = float(width) lst = [] if height == width: r = 0.5 * width surface_area = 4 * pi * r**2 surface_area = round(surface_area, 2) lst.append(surface_area) elif height > width: #If spheroid is prolate a = 0.5 * width b = 0.5 * height e = 1 - a / b surface_area = 2 * pi * a**2 * (1 + b / a * e * degrees(asin**-1(e))) surface_area = round(surface_area, 2) lst.append(surface_area) elif height < width: #If spheroid is oblate a = 0.5 * height b = 0.5 * width e = 1 - b / a surface_area = 2 * pi * a**2 * (1 + 1 - e**2 / e * tanh**-1(e)) surface_area = round(surface_area, 2) lst.append(surface_area, 2) return lst

    Read the article

  • MatLab plot part of surface

    - by Kristian
    Say I have the following script: u = -5:.2:5; [X,Y] = meshgrid(u, u); Z = cos(X).*cos(Y).*exp(-sqrt(X.^2 + Y.^2)/4); surf(X,Y,Z); Is there anyway that I can make MatLab plot only parts of the surface? Say, for instance, I just want to plot a single point, or a single grid, what can I do? I thought perhaps to plot a single point I could use: surf(X(1,1), Y(1,1), Z(1,1)) But then I get the error message: ??? Error using ==> surf at 78 Data dimensions must agree. I would really appreciate some input/help here. Thanks in advance :)

    Read the article

  • Le bogue des nombres à virgule flottante refait surface en Java, il plonge le compilateur et les programmes dans des boucles infinies

    Le bogue des nombres à virgule flottante refait surface en Java Et plonge le compilateur et les programmes dans des boucles infinies Mise à jour du 08/02/2011 Quelque temps après sa correction sur PHP, le bogue étrange des nombres à virgule flottante refait surface sur un langage tout aussi populaire : Java. Ce bogue provoquait sur PHP avant sa correction le crash du système par le passage d'un simple paramètre dans l'URL, pour peu que le script convertisse en nombres ou utilise ces variables dans des opérations arithmétiques (pour plus de détails, lire ci-devant) Sur Java, un bogue similaire plon...

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >