Search Results

Search found 8498 results on 340 pages for 'integrated graphics'.

Page 131/340 | < Previous Page | 127 128 129 130 131 132 133 134 135 136 137 138  | Next Page >

  • Python accessing modules from package that is distributed over different directories

    - by chaindriver
    Hi, I have a question regarding one single module that is distributed over multiple directories. Let's say I have these two file and directories: ~/lib/python xxx __init__.py util __init__.py module1.py module2.py ~/graphics/python xxx __init__.py misc __init__.py module3.py module4.py So then in my Python modules, I did this: import sys pythonlibpath = '~/lib/python' if pythonlibpath not in sys.path: sys.path.append(pythonlibpath) import xxx.util.module1 which works. Now, the problem is that I need xxx.misc.module3, so I did this: import sys graphicslibpath = '~/graphics/python' if graphicslibpath not in sys.path: sys.path.append(graphicslibpath) import xxx.misc.module3 but I get this error: ImportError: No module named misc.module3 It seems like it somehow still remembers that there was a xxx package in ~/lib/python and then tries to find misc.module3 from there. How do I get around this issue?

    Read the article

  • Bitmap brightness issue in c++

    - by Suriyan Suresh
    I have used the following code to adjust the image brightness, i am testing this application in Samsung BADA Platform and its SDK, While i am running this application in bada simulator it never ends runs infinity. Please point out the mistake in the code int BitmapWidth = 0, BitmapHeight = 0; result r = E_SUCCESS; BufferInfo myBuffer; Osp::Media::Image *pImage = null; Osp::Graphics::Canvas *pCanvas = null; Osp::Graphics::Rectangle *pRect = null; String path("/Media/Images/tom1.jpg"); pImage = new Osp::Media::Image(); r = pImage->Construct(); pBitmap2 = pImage->DecodeN(path, BITMAP_PIXEL_FORMAT_ARGB8888,LCD_WIDTH, LCD_HEIGHT); BitmapWidth = pBitmap2->GetWidth(); BitmapHeight = pBitmap2->GetHeight(); pBitmap2->Lock( myBuffer); int nVal = 0; int stride = myBuffer.pitch; byte *p= (byte *)(void *)myBuffer.pPixels; int nWidth = BitmapWidth *3; int nOffset = stride - BitmapWidth*4; for (int y = 0; y < BitmapHeight; ++y) { for (int x = 0; x < nWidth; ++x) { nVal = (int) (p[0] + nBrightness); if (nVal < 0) nVal = 0; if (nVal > 255) nVal = 255; p[0] = (byte) nVal; ++p; } p+= nOffset; } pBitmap2->Unlock(); pCanvas = GetCanvasN(); // Step 3: Create Rectangle pRect = new Osp::Graphics::Rectangle(0, 0, LCD_WIDTH, LCD_HEIGHT); r = pCanvas->DrawBitmap(*pRect, *pBitmap2); pCanvas->Show(); RequestRedraw(true); delete pBitmap2; delete pCanvas; delete pRect;

    Read the article

  • Is 'donation' considered as commerical?

    - by Horace Ho
    I want to port an open source program to iPhone, the license prohibited any commercial use of the code. I emailed the author and he sent back an email saying freeware is ok. Of course I cannot (should not) charge anything on top of the code. Still, I want to get compensation for my work on UI design, graphics and integration work. So I wonder: Is donation (via PayPal) OK for my case? Is in-app purchase OK? i.e. the program is free, the user has the option to buy addition theme graphics? Thanks

    Read the article

  • addthis sharing buttons adblocker workaround

    - by Manuel
    I just integrated the addthis sharing buttons into my website. I'd like to use the addthis buttons in reason of their tracking and reporting functionality. However they are blocked by adblock plus and other adblockers. Considering that nowaday 30% of internet users use an adblocker I thought of making a work around for those. I integrated manual sharing buttons into my website. So far so good. Do you have any idea on how to hide my manual sharing buttons if the addthis buttons are shown. Or better said, don't hide them if the addthis buttons are removed by a addblocker? Is it possible to detect an adblocker through js? thx, I really appreciate your help!

    Read the article

  • where should this check logic go?

    - by Benny
    I have a function that draw a string on graphics: private void DrawSmallImage(Graphics g) { if (this.SmallImage == null) return; var smallPicHeight = this.Height / 5; var x = this.ClientSize.Width - smallPicHeight; var y = this.ClientSize.Height - smallPicHeight; g.DrawImage(this.SmallImage, x, y, smallPicHeight, smallPicHeight); } the check if (this.SmallImage == null) return; should be in the function DrawSmallImage or should be in the caller? which is better?

    Read the article

  • How to read binary column in database into image on asp.net page?

    - by marko
    I want to read from database where I've stored a image in binary field and display a image. while (reader.Read()) { byte[] imgarr = (byte[])reader["file"]; Stream s = new MemoryStream(imgarr); System.Drawing.Image image = System.Drawing.Image.FromStream(s); Graphics g = Graphics.FromImage(image); g.DrawImage(image, new Point(400, 10)); image.Save(Response.OutputStream, ImageFormat.Jpeg); g.Dispose(); image.Dispose(); } con.Close(); This piece of code doesn't work: System.Drawing.Image image = System.Drawing.Image.FromStream(s); What am I doing wrong?

    Read the article

  • Does HTML5 only replace the video aspects of Flash/Silverlight?

    - by John
    I see a lot of talk how HTML5 video tag will kill Flash. But while video is the most widely used part of Flash/SL, it's only a small part of their technical abilities. For instance you can write a game using full 3D graphics and socket connections in Flex, and serious business applications, etc. Is the thinking that Javascript will kill those parts of Flash/Flex/SL? Because while that seems feasible now for even quite rich web-apps, what about any kind of high-performance app like real-time graphics?

    Read the article

  • Displaying same icon in 2 different sizes on c#

    - by ET
    My goal is to display the same icon twice, but each time in different size. I tried the following: FileStream fs = new FileStream("name_of_the_icon_file.ico", FileMode.Open); Icon ico = new Icon(fs, 32, 32); //create an in-memory instance of the icon, size 32x32 Icon ico2 = new Icon(fs, 16, 16); //create an in-memory instance of the icon, size 16x16 ... Graphics.DrawIcon(ico, /*some point*/); Graphics.DrawIcon(ico2, /*some other point*/); The last line throws an ArgumentException: Value does not fall within the expected range. Can some one explain me whats wrong and whats the way to do this right?

    Read the article

  • How can I draw a hollow rectangle using CreatePen?

    - by LarsTech
    Since using the DrawArc function in GDI+ isn't very accurate when drawing a small rounded rectangle, I am using RoundRect instead. Protected Overrides Sub OnPaint(ByVal e As PaintEventArgs) Dim hDC As IntPtr = e.Graphics.GetHdc Dim rc As New Rectangle(10, 10, 64, 24) Dim hPen As IntPtr = Win32.CreatePen(Win32.PenStyle.PS_SOLID, 0, _ ColorTranslator.ToWin32(Color.Green)) Dim hOldPen As IntPtr = Win32.SelectObject(hDC, hPen) Call Win32.RoundRect(hDC, rc.Left, rc.Top, rc.Right, rc.Bottom, 10, 10) Win32.SelectObject(hDC, hOldPen) Win32.DeleteObject(hPen) e.Graphics.ReleaseHdc(hDC) MyBase.OnPaint(e) End Sub This will draw a nice rounded rectangle, but it will also fill it with a white brush, erasing what I don't want to have erased. How can I draw this without erasing the inside of the rectangle?

    Read the article

  • How do you revert a file to a revision within an integration in Perforce?

    - by tenpn
    I have two branches, let's call them mainline and dev1. I regularly integrate a file from mainline to dev1. The last-but-one time I integrated the file, it was at revision 3 in mainline. The last time, it was at revision 5. Now for mysterious reasons lost to the sands of time, I want to work in dev1 with revision 4 of the file from mainline. Is that possible? I can't integrate it across as P4V complains that all revisions have already been integrated. I've tried right-click-get this revision on the revision graph, but that only updates which version of the file I have in mainline, not in dev1.

    Read the article

  • How should i draw text and shapes in wpf and C#?

    - by peterhu
    I want to do basic WPF graphics, i.e. rectangles, lines, circles and text. When should I use Drawing and when should I use a DrawingVisual? I have some code that uses Drawing and I render those to a DrawingImage and display that in an image control. Is this the right way? I could not see how to add text to a drawing. I had trouble positioning it too. Should I be rendering to a Canvas? I have some code that uses DrawingVisual and writes to a DrawingContext. That is like WinForms. Is this the recommended way? Do you have any high level advice on which APIs to use for basic graphics and labels? Will they options work on Silver Light and Desktop?

    Read the article

  • Is there any way I can use two monitors in the console in Linux?

    - by Alex
    I have recently become the proud owner of two monitors in my workspace. (Ok not owner, but you know what I mean) and I'd like to use both of them at once. Problem is, I much much prefer to use a Linux Server console over a desktop environment. The graphics card on the machine is a GTX295 (don't ask why, it's a long story.) so I essentially have two graphics cards. Each has a DVI output. Is there any way I can get the console to stretch across two screens? Or will I have to install a desktop Ubuntu for this to work?

    Read the article

  • what are the various approaches for generating PDFs?

    - by andthereitgoes
    I have an idea for an app that would take some flash content which contains graphics and images like various geometric shapes and polygons and some random images and convert them to PDF. Also, since I envision this app to be used my multiple users I want this process to be quick and scalable. One possible solution I could think of is have a small flash client with the capability of assembling the above mentioned graphics and images. Generate some sort of XML, send it to a server running a Java process which could render the PDF using iText. I was wondering what are the other possible ways to do it or the best practices. Technology isn't an issue; open source or commercial. I am looking for ideas to make the process fast and scalable. Most importantly, I don't want the back end server side PDF render engine to constraint the flash client capabilities. I would appreciate if you could share your tech stack idea. Thanks a lot!

    Read the article

  • Problem using GDI+ with multiple threads (VB.NET)

    - by Joe B
    I think it would be best if I just copy and pasted the code (it's very trivial). Private Sub Main() Handles MyBase.Shown timer.Interval = 10 timer.Enabled = True End Sub Private Sub Form1_Paint(ByVal sender As System.Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint e.Graphics.DrawImage(image, 0, 0) End Sub Private Sub tick() Handles timer.Elapsed Using g = Graphics.FromImage(image) g.Clear(Color.Transparent) g.DrawLine(Pens.Red, 0 + i, 0 + i, Me.Width - i, Me.Height - i) End Using Me.Invalidate() End Sub An exception, "The object is currently in use elsewhere", is raised during the tick event. Could someone tell me why this happens and how to solve it? Thanks.

    Read the article

  • Obtaining kerning information

    - by chadb
    How can I obtain kerning information for GDI to then use in GetKerningPairs? The documentation states that The number of pairs in the lpkrnpair array. If the font has more than nNumPairs kerning pairs, the function returns an error. However, I do not know how many pairs to pass in, and I don't see a way to query for it. EDIT I tried to do the following, however, it still gave me 0. Font* myFont = new Font(L"Times New Roman", 10); Bitmap* bitmap = new Bitmap(256, 256, PixelFormat32bppARGB); Graphics* g = new Graphics(bitmap); SelectObject(g->GetHDC(), myFont); //DWORD numberOfKerningPairs = GetKerningPairs( g->GetHDC(), -1, NULL ); DWORD numberOfKerningPairs = GetKerningPairs( g->GetHDC(), INT_MAX, NULL );

    Read the article

  • Resizing gives me to heavy image

    - by phenevo
    Hi, I'm resizing jpeg 1200x900 ,556kb by method: public static Image ResizeImage(Image imgToResize, int height) //height=400 { int destWidth; int destHeight; int sourceWidth = imgToResize.Width; int sourceHeight = imgToResize.Height; float nPercent = 0; float nPercentH = 0; nPercentH = ((float)height / (float)sourceHeight); nPercent = nPercentH; destWidth = (int)(sourceWidth * nPercent); destHeight = height; Bitmap b = new Bitmap(destWidth, destHeight); Graphics g = Graphics.FromImage((Image)b); g.InterpolationMode = InterpolationMode.HighQualityBicubic; g.DrawImage(imgToResize, 0, 0, destWidth, destHeight); g.Dispose(); return b; } gives me 555kb 533x400 jpeg. Why this photo is so heavy. For photo jpeg 2111kb 2156x1571 I get 556kb 533x400 jpeg Why in first case is so terrible !

    Read the article

  • How to integrate Python scripting in my Android App (like SL4A)

    - by Seraphim's host
    I need to add scripting layer to my android App. So I can remotely prepare a script that my app download form a web service and execute on the user device. I found a interesting project called Scripting Layer for Android (SL4A) here: http://code.google.com/p/android-scripting/ I'm not sure I can execute Python script without installing the PythonForAndroid_r4.apk first. I can't force my customer to install that application! So my question is, can the SL4A layer be integrated in my app without the need to install other apk? I need to execute actions like update data in the DB, create/read/delete a file on the sd card... Not so complex but I see SL4A can do a lot of things like these. Other scripting libraries? EDIT: Found also MVEL: http://mvel.codehaus.org/ but I think it needs to be integrated to execute complex operations like accessing a DB...

    Read the article

  • Is it acceptable to design my GLSurfaceView as a main control class?

    - by Omega
    I'm trying to structure a game I'm making in Android so that I have a sound, flexible design. Right now I'm looking at where I can tie my games rules engine and graphics engine together and what should be in between them. At a glance, I've been eying my implementation of GLSurfaceView, where various screen events are captured. My rationale would be to create an instance of my game engine and graphics engine here and receive events and state changes to trigger updates of either where applicable. Further to this, in the future, the GLSurfaceView implementation could also store stubs for players during a network game and implementations of computer opponents and dispatch them appropriately. Does this seem like a sensible design? Are there any kinds of improvements I can make? Thanks for any input!

    Read the article

  • Performance implications of using a variable versus a magic number

    - by Nathan
    I'm often confused by this. I've always been taught to name numbers I use often using variables or constants, but if it reduces the efficiency of the program, should I still do it? Heres an example: private int CenterText(Font font, PrintPageEventArgs e, string text) { int recieptCenter = 125; int stringLength = Convert.ToInt32(e.Graphics.MeasureString(text, font)); return recieptCenter - stringLength / 2; } The above code is using named variables, but runs slower then this code: private int CenterText(Font font, PrintPageEventArgs e, string text) { return 125 - Convert.ToInt32(e.Graphics.MeasureString(text, font) / 2); } In this example, the difference in execution time is minimal, but what about in larger blocks of code?

    Read the article

  • Speed of interpolation algorithms, C# and C++ working together.

    - by Kaminari
    Hello. I need fast implementation of popular interpolation algorithms. I figured it out that C# in such simple algorithms will be much slower than C++ so i think of writing some native code and using it in my C# GUI. First of all i run some tests and few operations on 1024x1024x3 matrix took 32ms in C# and 4ms in C++ and that's what i basicly need. Interpolation however is not a good word because i need them only for downscaling. But the question is: Will it be faster than C# methods in Drawing2D Image outputImage = new Bitmap(destWidth, destHeight, PixelFormat.Format24bppRgb); Graphics grPhoto = Graphics.FromImage(outputImage); grPhoto.InterpolationMode = InterpolationMode.*; //all of them grPhoto.DrawImage(bmp, new Rectangle(0, 0, destWidth, destHeight), Rectangle(0, 0, sourceWidth, sourceHeight), GraphicsUnit.Pixel); grPhoto.Dispose(); Some of these method run in 20ms and some in 80. Is there a way to do it faster?

    Read the article

  • Creating a Linux Desktop Envoriment

    - by Alon
    Suppose I want to create my own desktop envoriment for Linux, without X. Like Google with the Android did. Where do I start? Is it actually a normal application that just draws stuff, and starts after the kernel boot? And how does it draw it? Using OpenGL or is there something more generic? And graphics drivers, how is it going? You should develop custom graphics drivers for your desktop or it comes with the Linux kernel? Note: It's for normal PCs and not embedded devices. Thanks.

    Read the article

  • Expanded securityadmin

    - by user80652
    I'm aware that sysadmin is documented as the server role necessary for creating logins (SQL/Windows-integrated); nevertheless, I'm tasked to find out if there's any other server role (built-in or otherwise) that can be used. To be specific, I'm looking to setup one or two logins with access to create logins, create [database] users, assign users to [database] roles. Potentially reset passwords, but most of the logins are Windows-integrated and it's not necessary. Cannot have access to data at all, nor can these logins have rights to update tables nor create/update roles. Seems my only options so far are to set these 2 logins with securityadmin server role and for the specific databases, configure with db_securityadmin and db_accessadmin... but this configuration doesn't allow for creating logins.

    Read the article

  • Why do GPUs overheat?

    - by JAD
    About a year ago, I added a 9800GT (1 GB version) and a Corsair CX500 PSU to an HP M8000N computer. A few weeks ago, the HDD overheated and I decided to transfer the GPU & PSU to a new build, which consists of: i3 @ 3.3Ghz Gigabyte H61 Micro ATX Mobo 4GB RAM 500GB WD HDD DVD RW Drive Cooler Master Elite 430 Tower Once I had Win7 up and running, I installed all the essential drivers that came with the Gigabyte Mobo CD. However, whenever I tried installing the Graphics Media Accelerator driver, the computer would crash and enter an endless boot sequence on the next startup. I skipped installing this driver and installed the CD driver for the 9800GT, which by now is a year old. Everything was working fine, WEI rated my GPU at 6.6 graphics & aero performance. However, after updating my Nvidia drivers to the latest, the WEI dropped my rating to 3.3 for Aero, and 4.7 for graphics performance. Just to make sure that everything was ok, I ran Bad Company 2 on medium settings. The first few minutes ran just fine at a smooth framerate, so I dismissed this as Windows being Windows. About 6 hours later, I ran BC2 again. This time I averaged anywhere from 2-5 FPS. I checked the GPU temperature through GPU-Z, and it came back as 120C. The problem with this, is that the computer was on for six hours up to that point. Wouldn't the card have experienced a reactor core meltdown a lot sooner than that? Granted, the computer was "sleeping" some of the time, but still... The next day I took out a temperature gun and ran some tests. I would point the laser at a very specific area on the reverse side of the card (not the fan or "front"), and compare the temp reading with GPU-Z. After leaving the system on idle on idle for a few minutes, I ran BC2 twice. Here are the results: GPU-Z Reading / Temp Gun Reading / Time Null / 22.3°C / Comp is Off 53°C / 33.5°C / 1:49 78°C / 46°C / 1:53 - (First BC2 run; good framerate) 102°C / 64.6°C / 2:01 - (System is again on idle) 113°C / 64.8°C / 2:10 119°C / 71.8°C / 2:17 - (Second BC2 run; poor framerate) I should also mention that I also took a temp recording of another part of the GPU from 2:01-2:17. The temp in this area jumped from 75°C to 82.9°C in that time frame. This pretty much confirms that GPU-Z is reporting the temperature accurately, and the card is overheating. But I'd like to know why; the cars is doing nothing and still the temperature climbs at a steady rate. I thoroughly cleaned the GPU and PSU when I salvaged them from the old HP M8000N computer with a can of compressed air, dust cant be the issue. Similarly, the rest of the computer is brand new. I installed various Nvidia drivers, but no luck. It seems strange to me that a year-old card is suddenly failing on me; aren't they supposed to last at least two years? Could this be a driver issue? Is the motherboard faulty? Could the PSU be overfeeding the card on voltage? Neither case seems likely, as the CPU, RAM and otherwise the rest of the comp has worked flawlessly and has stayed well within respectable temp ranges (the i3 lingers around 50C, the HDD stays at 30C, so does the PSU). How can I pinpoint the issue?

    Read the article

  • Integration of WordPress With WordPress bbPress

    bbPress is a powerful and fully featured forum software that can be integrated with blogging tools like WordPress. A first glance at the software, gives the impression that it is simple and devoid of any complicated structure, but one has to use it in order, to believe that it is a very powerful tool.

    Read the article

  • WebCenter 11g (11.1.1.2) Certified with E-Business Suite Release 12

    - by Steven Chan
    Oracle WebCenter Suite is an integrated suite of products used to create social applications, enterprise portals, communities, composite applications, and Internet or intranet Web sites on a standards-based, service-oriented architecture (SOA).WebCenter 11g includes a multi-channel portal framework and a suite of horizontal Enterprise 2.0 applications which provide content, presence, and social networking capabilities.WebCenter 11g (11.1.1.2) is now certified with Oracle E-Business Suite Release 12.  For installation and configuration documentation, see:Using WebCenter 11.1.1 with Oracle E-Business Suite Release 12 (Note 1074345.1)

    Read the article

< Previous Page | 127 128 129 130 131 132 133 134 135 136 137 138  | Next Page >