Search Results

Search found 206 results on 9 pages for 'dpi'.

Page 8/9 | < Previous Page | 4 5 6 7 8 9  | Next Page >

  • Can FAXCOMEXLib and Windows Fax Service send a color fax?

    - by Craig
    We are in the process of testing different options for sending faxes from within our C# code (receiving faxes is not necessary). One of those options is to use FAXCOMEXLib. Without surprise, I've had pretty good success sending out black & white faxes with FAXCOMExLib. But we also have a requirement to support sending color faxes. So I execute the following code (just a snippet): IFaxDocument oFaxDoc = new FaxDocumentClass(); oFaxDoc.Body = @"C:\Test\color_image.jpg"; oFaxDoc.ConnectedSubmit(m_oFaxServer); The image is 24bit color, 1728x2304, 204x196 dpi. For the most part, this process works (with a couple of small quirks) and the fax shows up in my "Windows Fax and Scan" outbox (I'm on Vista). The problem is the image has been dithered to a 1bit black & white image. I assume that what I see in "Windows Fax and Scan" is what is actually transmitted. So is there a way to send a color fax using this technology? Are we missing a configuration option somewhere to make it work?

    Read the article

  • asp.net mvc outputting json with backslashes ( escape) despite many attemps to filter

    - by minus4
    i have an asp.net controller that output Json as the results a section of it is here returnString += string.Format(@"{{""filename"":""{0}"",""line"":[", file.Filename); what i get returned is this: "{\"DPI\":\"66.8213457076566\",\"width\":\"563.341067\",\"editable\":\"True\",\"pricecat\":\"6\",\"numpages\":\"2\",\"height\":\"400\",\"page\":[{\"filename\":\"999_9_1.jpg\",\"line\":[]},{\"filename\":\"999_9_2.jpg\",\"line\":[]}]]" i have tried to return with the following methods: return Json(returnString); return Json(returnString.Replace("\\",""); return Json will serialize my string to a jSon string, this i know but it likes to escape for some reason, how can i get rid of it ???? for info this is how i call it with jQuery: $.ajax({ url:"/Products/LoadArtworkToJSon", type:"POST", dataType: "json", async: false, data:{prodid: prodid }, success: function(data){ sessvars.myData = data; measurements = sessvars.myData; $("#loading").remove(); //empty the canvas and create a new one with correct data, always start on page 0; $("#movements").remove(); $("#canvas").append("<div id=\"movements\" style=\"width:" + measurements.width + "px; height:" + Math.round(measurements.height) + "px; display:block; border:1px solid black; background:url(/Content/products/" + measurements.page[0].filename + ") no-repeat;\"></div>"); your help is much appreciated thanks

    Read the article

  • Save Dialog on top of another custom dialog is behaving strangely!

    - by Raghu
    I have a save as image feature for charts in my application. The chart control is a custom user control with custom logic in them. It also has some scaling based on size, zoom etc. However, while saving them as an image I would like to give the user the option to set the size of the image (eg: 800x600 px @ 300 DPI). To do this I have created a Form with textboxes/checkboxes etc for various settings for image. One of these TextBoxes is for the file name. The file name textbox is readonly and is accompanied with a browse button which shows a SaveFileDialog when clicked. The user clicks "Save As Image" in the main form's menu. I show the ImageExportDialog using the code below: using(ImageExportDialog dlg = new ImageExportDialog()) { if(dlg.ShowDialog() == DialogResult.OK) { //get the settings selected by the user and generate the image } } In the ImageExportDialog, the user clicks on the browse button and the SaveFileDialog is shown as follows: using(SaveFileDialog dlg = new SaveFileDialog()) { if(dlg.ShowDialog() == DialogResult.OK) { txtFileName.Text = dlg.FileName; } } Now the problem is, when the user clicks on "Save" button in the SaveFileDialog, as expected the txtFileName.Text is set, but the parent custom dialog also seems to return from the ShowDialog method and the DialogResult is the same as the one for SaveFileDialog! The control then goes on to the "get the settings selected by the user and generate the image" part of the code above. Not really sure what I am doing wrong here!

    Read the article

  • How to map coordinates in AxesImage to coordinates in saved image file?

    - by Vebjorn Ljosa
    I use matplotlib to display a matrix of numbers as an image, attach labels along the axes, and save the plot to a PNG file. For the purpose of creating an HTML image map, I need to know the pixel coordinates in the PNG file for a region in the image being displayed by imshow. I have found an example of how to do this with a regular plot, but when I try to do the same with imshow, the mapping is not correct. Here is my code, which saves an image and attempts to print the pixel coordinates of the center of each square on the diagonal: import numpy as np import matplotlib.pyplot as plt fig = plt.figure() ax = fig.add_axes([0.1, 0.1, 0.8, 0.8]) axim = ax.imshow(np.random.random((27,27)), interpolation='nearest') for x, y in axim.get_transform().transform(zip(range(28), range(28))): print int(x), int(fig.get_figheight() * fig.get_dpi() - y) plt.savefig('foo.png', dpi=fig.get_dpi()) Here is the resulting foo.png, shown as a screenshot in order to include the rulers: The output of the script starts and ends as follows: 73 55 92 69 111 83 130 97 149 112 … 509 382 528 396 547 410 566 424 585 439 As you see, the y-coordinates are correct, but the x-coordinates are stretched: they range from 73 to 585 instead of the expected 135 to 506, and they are spaced 19 pixels o.c. instead of the expected 14. What am I doing wrong?

    Read the article

  • Reducing moire when downsampling halftone comic images.

    - by drawnonward
    How can I reduce moire effects when downsampling halftone comic book images during live zoom on an iPhone or iPad? I am writing a comic book viewer. It would be nice to provide higher resolution images and allow the user to zoom in while reading the comic book. However, my client is averse to moire effects and will not allow this feature if there are noticeable moire artifacts while zooming, which of course there are. Modifying the images to be less susceptible to moire would only work if the modifications were not perceptible. Blur was specifically prohibited, as is anything that removes the beloved halftone dots. The images are black and white halftone and line art. The originals are 600 dpi but what we ship with the application will be half that at best, so probably 2500 pixels or less tall. So what are my options? If I write a custom downsampling algorithm would it be fast enough for real time on these devices? Are there other tricks I can do? Would it work to just avoid the size ratios that have the most visual moire effects? As you zoom in an out, there are definitely peaks where the moire effects are worst. Is there a way to calculate what those points are and just zoom to a nearby scale that is not as bad? Any suggestions are welcome. I have very little experience with image and signal processing, but am enjoying the opportunity to learn. I know nothing of wavelets and acutance and other jargon, so please be verbose.

    Read the article

  • UIImage - should be loaded with [UIImage imageNamed:@""] or not ?

    - by sagar
    Hello ! every one. I am having number of images with in my application. ( images more than 50 - approximately & it can extend according to client's need ) Each image are very large round about - 1024 x 768 & 150 dpi Now, I have to add all this images in a scroll view & display it. Ok, My question is as follows. According to me there are two options of loading large images imageNamed:@"" load asynchronously when viewDidLoad Called. Which is more preferable ? imgModel.image=[UIImage imageNamed:[dMain valueForKey:@"imgVal"]]; or like this. NSURL *ur=[[NSURL alloc] initFileURLWithPath:[[NSBundle mainBundle] pathForResource:lblModelName.text ofType:@"png"] isDirectory:NO]; NSURLRequest *req=[NSURLRequest requestWithURL:ur cachePolicy:NSURLCacheStorageNotAllowed timeoutInterval:40]; [ur release]; NSURLConnection *con=[[NSURLConnection alloc] initWithRequest:req delegate:self]; if(con){ myWebData=[[NSMutableData data] retain]; } else { } -(void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response { [myWebData setLength: 0]; } -(void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data { [myWebData appendData:data]; } -(void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error { [connection release]; } -(void)connectionDidFinishLoading:(NSURLConnection *)connection { NSLog(@"ImageView Ref From - %@",imgV); // my image view & set image imgV.image=[UIImage imageWithData:myWebData]; [connection release]; connection=nil; }

    Read the article

  • Use .bat file to recursively loop through folders and get hold of .class files

    - by user320550
    HI all, This is what i'm trying to do. I have a .bat file which takes in a argument which is nothing but a folder name. What i do first is go one level up (cd ..). Now in this directory i have 3 folders and each folders have sub-folders and have .class files in them. What i want to do is recursively loop through the folders and get hold of the .class files. Once this is done i want to echo the target folder of the .class file as well as echo the name of the.class file. So c:\temp\potter\myclass.class. I would echo out c:\temp\potter\ and myclass. I'm able to do this by writing a separate bat file which works. But when i integrate this with the recursive function it seems to break. This is what i'm doing: :: call the junit classes... and save the results echo step 3... cd %1 cd .. for /r %%a in (*.class) do set Var=%%a echo Full file location %Var% for %%i in ("%Var%") do Set CF=%%~dpi Set CF=%CF:~0,-1% :LOOP If "%CF:~-1,1%"=="\" GoTo :DONE Set CF=%CF:~0,-1% GoTo :LOOP :DONE Set CF=%CF:~0,-1% echo Folder Location %CF% ::cd %CF% For %%j in ("%Var%") Do Set name=%%~nxj :: -6 because of Quotations Set name=%name:~0,-6% echo File Name %name% echo step 3 complete... However i only get the output of one directory, while i have multiple directories having .class files. This is the output i get: step 3... Full file location C:\NKCV\Project\MyActivities\6_Selenium\htmlTestCasesConve rted2JUnit\iexplore\flow2\testCase_app2.class Folder Location C:\NKCV\Project\MyActivities\6_Selenium\htmlTestCasesConverte d2JUnit\iexplore\flow2 File Name testCase_app2 step 3 complete... missing argument! usage htmltestCaseLocation for eg., "C:\NKCV\Project\MyActivities\6_Selenium\htmlTestCases" Could anyone please let me know whats wrong here? Thanks.

    Read the article

  • How does one gets started with Winforms style applications on Win32?

    - by Billy ONeal
    EDIT: I'm extremely tired and frustrated at the moment -- please ignore that bit in this question -- I'll edit it in the morning to be better. Okay -- a bit of background: I'm a C++ programmer mostly, but the only GUI stuff I've ever done was on top of .NET's WinForms platform. I'm completely new to Windows GUI programming, and despite Petzold's excellent book, I'm extremely confused. Namely, it seems that most every reference on getting started with Win32 is all about drawing lines and curves and things -- a topic about which (at least at present time) I couldn't care less. I need a checked list box, a splitter, and a textbox -- something that would take less than 10 minutes to do in Winforms land. It has been recommended to me to use the WTL library, which provides an implementation of all three of these controls -- but I keep getting hung up on simple things, such as getting the damn controls to use the right font, and getting High DPI working correctly. I've spent two freaking days on this, and I can't help but think there has to be a better reference for these kinds of things than I've been able to find. Petzold's book is good, but it hasn't been updated since Windows 95 days, and there's been a LOT changed w.r.t. how applications should be correctly developed since it was published. I guess what I'm looking for is a modern Petzold book. Where can I find such a resource, if any?

    Read the article

  • Convert Justified Paragraph To Image

    - by rsrobbins
    I need to convert a paragraph of text into an image. Converting the text into an image is no problem. I have the code to do that. But the text must be shown as a paragraph with each line centered. That is a problem! Currently I can convert the text into a left justified paragraph because there are carriage returns in the text string. I suppose it could be center justified with spaces in the string but it would be hard to calculate the required spaces. There must be an easier way. What I need is some way to format the text into a paragraph and then convert it back into a string, preserving spaces. This needs to be done in VB.NET for an ASP.NET web application. Any ideas? I could get the paragraph justified in Rich Text Format but I don't know if it can be converted back into a string, preserving spaces. Creating a PDF is another possibility. The image created from the text needs to be 300 DPI with a transparent background. I'm using the DrawString method of a Graphics object to create the image.

    Read the article

  • Increasing figure size in Matplotlib

    - by Anirudh
    I am trying to plot a graph from a distance matrix. The code words fine and gives me a image in 800 * 600 pixels. The image being too small, All the nodes are packed together. I want increase the size of the image. so I added the following line to my code - figure(num=None, figsize=(10, 10), dpi=80, facecolor='w', edgecolor='k') After this all I get is a blank 1000 * 1000 image file. My overall code - import networkx as nx import pickle import matplotlib.pyplot as plt print "Reading from pickle." p_file = open('pickles/names') Names = pickle.load(p_file) p_file.close() p_file = open('pickles/distance') Dist = pickle.load(p_file) p_file.close() G = nx.Graph() print "Inserting Nodes." for n in Names: G.add_node(n) print "Inserting Edges." for i in range(601): for j in range(601): G.add_edge(Names[i],Names[j],weight=Dist[i][j]) print "Drawing Graph." nx.draw(G) print "Saving Figure." #plt.figure(num=None, figsize=(10, 10)) plt.savefig('new.png') print "Success!"

    Read the article

  • multiple screen support

    - by pedr0
    Hi at all, I have some problem with multiple screen support, I work with dp(dpi) for specify the layout_heigth and layout_width and I hope that is the better way to support multiple screen, but when I tried with two smartphone I meet two different result. I give an example, this is a layout I use: <?xml version="1.0" encoding="UTF-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/cities_main_layout" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <ListView android:id="@+id/citieslist" android:layout_width="wrap_content" android:layout_height="320dip" android:layout_gravity="center_vertical" android:layout_below="@id/cities_main_layout" /> <LinearLayout android:id="@+id/cities_button_layout" android:orientation="horizontal" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/citieslist" android:layout_gravity="center_vertical"> <Button android:id="@+id/bycountry" android:layout_height="50dip" android:layout_width="105dip" android:background="@drawable/buttonmarket" android:text="@string/button_bycountry" /> <Button android:id="@+id/top10" android:layout_height="50dip" android:layout_width="105dip" android:background="@drawable/buttonmarket" android:text="@string/button_top10" /> <Button android:id="@+id/recommended" android:layout_height="50dip" android:layout_width="105dip" android:background="@drawable/buttonmarket" android:text="@string/button_recommended" /> </LinearLayout> </RelativeLayout> The button are at the bottom of the layout, and I see two different result: In the last smartphone I can see the buttons, instead in the first I cannot...what's wrong? I have to write a layout for any set of screen??!!!

    Read the article

  • Best way to update/insert into a table based on a remote table.

    - by martilyo
    I have two very large enterprise tables in an Oracle 10g database. One table keeps the historical information of the other table. The problem is, I'm getting to the point where the records are just too many that my insert update is taking too long and my session is getting killed by the governor. Here's a pseudocode of my update process: sqlsel := 'SELECT col1, col2, col3, sysdate FROM table2@remote_location dpi WHERE (col1, col2, col3) IN ( SELECT col1, col2, col3 FROM table2@remote_location MINUS SELECT DISTINCT col1, col2, col3 FROM table1 mpc WHERE facility = '''||load_facility||''' )'; EXECUTE IMMEDIATE sqlsel BULK COLLECT INTO table1; I've tried the MERGE statement: MERGE INTO table1 t1 USING ( SELECT col1, col2, col3 FROM table2@remote_location ) t2 ON ( t1.col1 = t2.col1 AND t1.col2 = t2.col2 AND t1.col3 = t2.col3 ) WHEN NOT MATCHED THEN INSERT (t1.col1, t1.col2, t1.col3, t1.update_dttm ) VALUES (t2.col1, t2.col2, t2.col3, sysdate ) But there seems to be a confirmed bug on versions prior to Oracle 10.2.0.4 on the merge statement when doing a merge using a remote database. The chance of getting an enterprise upgrade is slim so is there a way to further optimize my first query or write it in another way to have it run best performance wise? Thanks.

    Read the article

  • Convert SVG image with filters to PNG /PDF

    - by user1599669
    I have the following svg image to the png image & pdf image with 300 DPI. <svg width="640" height="480" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <!-- Created with SVG-edit - http://svg-edit.googlecode.com/ --> <defs> <filter height="200%" width="200%" y="-50%" x="-50%" id="svg_1_blur"> <feGaussianBlur stdDeviation="10" in="SourceGraphic"/> </filter> </defs> <g> <title>Layer 1</title> <image filter="url(#svg_1_blur)" xlink:href="images/logo.png" id="svg_1" height="162.999996" width="223.999992" y="99" x="185"/> <text xml:space="preserve" text-anchor="middle" font-family="serif" font-size="24" id="svg_2" y="210" x="289" stroke-width="0" stroke="#000000" fill="#000000">sdfdsdsfsdf</text> </g> </svg> I want to do this using PHP and I have applied filters to the blur filter to the image and I want to retain that. Also I have problem in viewing this image in the IE, because it doesn't show the blur effect on IE9. Any suggestions?

    Read the article

  • Buying a new printer instead of replacing ink?

    - by Kelsey
    With prices of basic printers being around $40 - $50 and a ink cartridge being around $20 - $30 each for black AND color. It costs me more to replace the printer's ink than to just buy a brand new printer. This just seems like a total waste of materials though (I have 4 printers sitting in my basement with no ink). I know the ink cartridges are smaller (not as full) in a new printer but I go through it in about 1 to 1.5 years only and by then my $40 gets me a better printer to boot. Also with certain printers the heads are not part of the ink (Epson use to do this and still might) so I get new heads as well. Is this a bad practice? Are retailers making this a reality when they are selling working hardware cheaper than replacement parts? Is there something more I should be considering? Edit: Some background, long ago I bought an Epson printer which I used to print docs etc vary rarely. The ink started running low so I bought to new carts for around $60 if I recall. The printer then stopped working so I replaced the carts with the new ones but the head was dead on the black which was not worth repairing. I bought a new HP printer for $49. This lasted around 1.5yrs and then the ink ran out, I went to buy new carts and the guy at the store got me to buy a new printer (that was smaller, faster, higher dpi, etc) and it was cheaper than replacing the ink. When the ink ran out on that one I bought a new printer again, etc. The printer gets used maybe once a week at most and I never print photos or anything. It normally is jsut stored away unplugged accumulating dust. People say to buy a laser printer but they are much larger, do not print color, (in the price range I am looking at) and might have the exact same issues. The problem I see is the manufacturer is making my behaviour possible by selling new printers at a loss hoping that they will cash in on the ink later. How can they produce a printer for so cheap which HAS ink in it, and the refills cost more than the unit? It can't.

    Read the article

  • Unable to locate Windows Server Error log files

    - by Sam007
    I am getting an error in my application on 500 Internal Server Error. The firebug gives me, NetworkError: 500 Internal Server Error - http://webgis.arizona.edu/ArcGIS/rest/services/webGIS/Shock_Models/GPServer/Income_Log/jobs/jc09c501156564f71abc5d98393581267/results/final_shp?dpi=96&transparent=true&format=png8&imageSR=102100&f=image&bbox=%7B%22xmin%22%3A-14519891.438356264%2C%22ymin%22%3A637618.0139790997%2C%22xmax%22%3A-6692739.741956295%2C%22ymax%22%3A6507981.786279075%2C%22spatialReference%22%3A%7B%22wkid%22%3A102100%7D%7D&bboxSR=102100&size=800%2C600 And when I goto that particular link, I get this error, Server Error - Object reference not set to an instance of an object. Any idea how I can correct it? UPDATE I was told to use fiddler and see the error details that is occurring over the network and this is the output that I got, SESSION STATE: Done. Response Entity Size: 849 bytes. == FLAGS ================== BitFlags: [ClientPipeReused, ServerPipeReused] 0x18 X-CLIENTPORT: 2010 X-RESPONSEBODYTRANSFERLENGTH: 849 X-EGRESSPORT: 2023 X-HOSTIP: 128.196.53.161 X-PROCESSINFO: firefox:2248 X-CLIENTIP: 127.0.0.1 X-SERVERSOCKET: REUSE ServerPipe#2 == TIMING INFO ============ ClientConnected: 15:53:51.383 ClientBeginRequest: 15:53:51.494 GotRequestHeaders: 15:53:51.494 ClientDoneRequest: 15:53:51.494 Determine Gateway: 0ms DNS Lookup: 0ms TCP/IP Connect: 0ms HTTPS Handshake: 0ms ServerConnected: 15:52:45.077 FiddlerBeginRequest: 15:53:51.495 ServerGotRequest: 15:53:51.495 ServerBeginResponse: 15:53:51.679 GotResponseHeaders: 15:53:51.679 ServerDoneResponse: 15:53:51.679 ClientBeginResponse: 15:53:51.679 ClientDoneResponse: 15:53:51.679 Overall Elapsed: 00:00:00.1850106 The response was buffered before delivery to the client. == WININET CACHE INFO ============ This URL is not present in the WinINET cache. [Code: 2] * Note: Data above shows WinINET's current cache state, not the state at the time of the request. * Note: Data above shows WinINET's Medium Integrity (non-Protected Mode) cache only. But I am still confused as to what the error is? This is the application. I am not sure if the error is due to the ArcGIS-Server or the Windows Server 2008. I am new on working with the Windows Server and wanted to know where can I look for the error lof files? This is the link which gives the details and the log info of the job executed. This is the output.

    Read the article

  • Old CRT screen's high resolution doesn't work anymore on windows 7

    - by Mixxiphoid
    One year ago I decided to switch from Windows XP to Windows 7. I had a 17" CRT monitor with a screen resolution of 1600x1200 which worked fine on Windows XP. While installing Windows 7 everything went well until Windows 7 was going to install the video card its driver. Windows 7 puts the screen to its recommended resolution and my screen became black. I waited a few minutes to be sure the installation was finished. I turned off the computer by hand and restarted the computer on a resolution of 800x640. When windows 7 was done installing I went to screen resolutions and the resolution of 1600x1200 was on the top of the list with '(recommended)' next to it. I tried putting it on 1600x1200 but again my screen went black. I installed all windows 7 updates including the video card driver from the NVidia site (NOT from Windows 7). I tried about everything to make it work on 1600x1200 but with no succes. The highest resolution I got with the crt monitor was 1280x1024. I had a TFT screen which had 1280x1024 as max resolution and had better colors, so I used that one till today. My video card is 9600GT and my power supply is beyond sufficient. I even tried to install the driver I had on XP to see if it worked, but no results. I tried classic mode on windows 7, changed the dpi, the frequentie and the monitor settings, but nothing worked. I really like a vertical resolution of 1200, but it seems today I'm bound to all those standard monitors with a resolution of 1980x1024... Can anybody explain to me what the cause is that it worked on Windows XP but not on Windows 7? And maybe a solution to the problem (I actually gave up on getting it fixed...) Thanks a lot in advance. SOLUTION I downloaded the according monitor driver and installed it. Next I rebooted my computer on low resolution (800x640) and connected the CRT monitor. When Windows 7 booted successfully I went to computer management and 'update the driver' of my monitor. I manually selected 'Generic PnP monitor' and made that one active. I want to advanced settings at 'Screen resolution' and selected the mode '1600x1200 (32-bit) 80 Hertz (95 Hertz did not work). Now I had my resolution on 1600x1200. I repeated the earlier step to select the original monitor again instead of the Generic monitor. Quite a way to solve this problem, but it worked! Thanks a lot you all.

    Read the article

  • Nvidia Drivers on Debian / Lenny (Stable) -> Installation successful -> Monitors gets black

    - by David
    I have successfully installed the proprietary drivers for my nvidia (geforce 7300 gt) graphics card on debian/lenny. I know its not the best way to chose for driver installation ( see this link: http://wiki.debian.org/NvidiaGraphicsDrivers#non-freedrivers ). but the two ways seem to be possible for me (nvidia-kernel module compilation). Now the problem is that the monitors gets black, the power light starts blinking after i launch the x-server. Have a short look a the logs (output truncated from /var/log/Xorg.0.log): (II) Setting vga for screen 0. (**) NVIDIA(0): Depth 24, (--) framebuffer bpp 32 (==) NVIDIA(0): RGB weight 888 (==) NVIDIA(0): Default visual is TrueColor (==) NVIDIA(0): Using gamma correction (1.0, 1.0, 1.0) (**) Jul 28 17:10:11 NVIDIA(0): Enabling RENDER acceleration (II) Jul 28 17:10:11 NVIDIA(0): Support for GLX with the Damage and Composite X extensions is (II) Jul 28 17:10:11 NVIDIA(0): enabled. (II) Jul 28 17:10:11 NVIDIA(0): NVIDIA GPU GeForce 7300 GT (G73) at PCI:1:0:0 (GPU-0) (--) Jul 28 17:10:11 NVIDIA(0): Memory: 262144 kBytes (--) Jul 28 17:10:11 NVIDIA(0): VideoBIOS: 05.73.22.25.00 (II) Jul 28 17:10:11 NVIDIA(0): Detected PCI Express Link width: 16X (--) Jul 28 17:10:11 NVIDIA(0): Interlaced video modes are supported on this GPU (--) Jul 28 17:10:11 NVIDIA(0): Connected display device(s) on GeForce 7300 GT at PCI:1:0:0: (--) Jul 28 17:10:11 NVIDIA(0): Samsung SyncMaster (CRT-0) (--) Jul 28 17:10:11 NVIDIA(0): Samsung SyncMaster (DFP-0) (--) Jul 28 17:10:11 NVIDIA(0): Samsung SyncMaster (CRT-0): 400.0 MHz maximum pixel clock (--) Jul 28 17:10:11 NVIDIA(0): Samsung SyncMaster (DFP-0): 165.0 MHz maximum pixel clock (--) Jul 28 17:10:11 NVIDIA(0): Samsung SyncMaster (DFP-0): Internal Single Link TMDS (II) Jul 28 17:10:11 NVIDIA(0): Assigned Display Device: CRT-0 (==) Jul 28 17:10:11 NVIDIA(0): (==) Jul 28 17:10:11 NVIDIA(0): No modes were requested; the default mode "nvidia-auto-select" (==) Jul 28 17:10:11 NVIDIA(0): will be used as the requested mode. (==) Jul 28 17:10:11 NVIDIA(0): (II) Jul 28 17:10:11 NVIDIA(0): Validated modes: (II) Jul 28 17:10:11 NVIDIA(0): "nvidia-auto-select" (II) Jul 28 17:10:11 NVIDIA(0): Virtual screen size determined to be 1280 x 1024 (--) Jul 28 17:10:11 NVIDIA(0): DPI set to (85, 86); computed from "UseEdidDpi" X config (--) Jul 28 17:10:11 NVIDIA(0): option (==) Jul 28 17:10:11 NVIDIA(0): Enabling 32-bit ARGB GLX visuals. (--) Depth 24 pixmap format is 32 bpp Here is the complete /etc/X11/xorg.conf file as generated by nvidia-xconfig: # nvidia-xconfig: X configuration file generated by nvidia-xconfig # nvidia-xconfig: version 256.35 (buildmeister@builder101) Wed Jun 16 19:25:59 PDT 2010 Section "ServerLayout" Identifier "Layout0" Screen 0 "Screen0" InputDevice "Keyboard0" "CoreKeyboard" InputDevice "Mouse0" "CorePointer" EndSection Section "Files" EndSection Section "Module" Load "dbe" Load "extmod" Load "type1" Load "freetype" Load "glx" EndSection Section "InputDevice" # generated from default Identifier "Mouse0" Driver "mouse" Option "Protocol" "auto" Option "Device" "/dev/psaux" Option "Emulate3Buttons" "no" Option "ZAxisMapping" "4 5" EndSection Section "InputDevice" # generated from default Identifier "Keyboard0" Driver "kbd" EndSection Section "Monitor" Identifier "Monitor0" VendorName "Unknown" ModelName "Unknown" Hor

    Read the article

  • Why do I sometimes get 'sh: $'\302\211 ... ': command not found' in xterm/sh?

    - by amn
    Sometimes when I simply type a valid command like 'find ...', or anything really, I get back the following, which is completely unexpected and confusing (... is command name I type): sh: $'\302\211...': command not found There is some corruption going on I think. I don't use color in my prompt, I am using the Bash shell in POSIX mode as sh (chsh to /bin/sh and so on - $SHELL is sh). What is going on and why does this keep happening? Anything I can debug? I think this is more of an xterm issue than sh, or at least a combination of the two. Files, for context: My /etc/profile, as distributed with Arch Linux x86-64: # /etc/profile #Set our umask umask 022 # Set our default path PATH="/usr/local/sbin:/usr/local/bin:/usr/bin" export PATH # Load profiles from /etc/profile.d if test -d /etc/profile.d/; then for profile in /etc/profile.d/*.sh; do test -r "$profile" && . "$profile" done unset profile fi # Source global bash config if test "$PS1" && test "$BASH" && test -r /etc/bash.bashrc; then . /etc/bash.bashrc fi # Termcap is outdated, old, and crusty, kill it. unset TERMCAP # Man is much better than us at figuring this out unset MANPATH My /etc/shrc, which I created as a way to have sh parse some file on startup, when non-login shell. This is achieved using ENV variable set in /etc/environment with the line ENV=/etc/shrc: PS1='\u@\H \w \$ ' alias ls='ls -F --color' alias grep='grep -i --color' [ -f ~/.shrc ] && . ~/.shrc My ~/.profile, I am launching X when logging in through first virtual tty: [[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec xinit -- -dpi 111 My ~/.xinitc, as you can see I am using the system as a Virtual Box guest: xrdb -merge ~/.Xresources VBoxClient-all awesome & exec xterm And finally, my ~/.Xresources, no fancy stuff here I guess: *faceName: Inconsolata *faceSize: 10 xterm*VT100*translations: #override <Btn1Up>: select-end(PRIMARY, CLIPBOARD, CUT_BUFFER0) xterm*colorBDMode: true xterm*colorBD: #ff8000 xterm*cursorColor: S_red Since ~/.profile references among other things /etc/bash.bashrc, here is its content: # # /etc/bash.bashrc # # If not running interactively, don't do anything [[ $- != *i* ]] && return PS1='[\u@\h \W]\$ ' PS2='> ' PS3='> ' PS4='+ ' case ${TERM} in xterm*|rxvt*|Eterm|aterm|kterm|gnome*) PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/~}"' ;; screen) PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033_%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/~}"' ;; esac [ -r /usr/share/bash-completion/bash_completion ] && . /usr/share/bash-completion/bash_completion I have no idea what that case statement does, by the way, it does look a bit suspicious though, but then again, who am I to know.

    Read the article

  • .NET development on a Retina MacBook Pro with Windows 8

    - by Jeff
    I remember sitting in Building 5 at Microsoft with some of my coworkers, when one of them came in with a shiny new 11” MacBook Air. It was nearly two years ago, and we found it pretty odd that the OEM’s building Windows machines sucked at industrial design in a way that defied logic. While Dell and HP were in a race to the bottom building commodity crap, Apple was staying out of the low-end market completely, and focusing on better design. In the process, they managed to build machines people actually wanted, and maintain an insanely high margin in the process. I stopped buying the commodity crap and custom builds in 2006, when Apple went Intel. As a .NET guy, I was still in it for Microsoft’s stack of development tools, which I found awesome, but had back to back crappy laptops from HP and Dell. After that original 15” MacBook Pro, I also had a Mac Pro tower (that I sold after three years for $1,500!), a 27” iMac, and my favorite, a 17” MacBook Pro (the unibody style) with an SSD added from OWC. The 17” was a little much to carry around because it was heavy, but it sure was nice getting as much as eight hours of battery life, and the screen was amazing. When the rumors started about a 15” model with a “retina” screen inspired by the Air, I made up my mind I wanted one, and ordered it the day it came out. I sold my 17”, after three years, for $750 to a friend who is really enjoying it. I got the base model with the upgrade to 16 gigs of RAM. It feels solid for being so thin, and if you’ve used the third generation iPad or the newer iPhone, you’ll be just as thrilled with the screen resolution. I’m typically getting just over six hours of battery life while running a VM, but Parallels 8 allegedly makes some power improvements, so we’ll see what happens. (It was just released today.) The nice thing about VM’s are that you can run more than one at a time. Primarily I run the Windows 8 VM with four cores (the laptop is quad-core, but has 8 logical cores due to hyperthreading or whatever Intel calls it) and 8 gigs of RAM. I also have a Windows Server 2008 R2 VM I spin up when I need to test stuff in a “real” server environment, and I give it two cores and 4 gigs of RAM. The Windows 8 VM spins up in about 8 seconds. Visual Studio 2012 takes a few more seconds, but count part of that as the “ReSharper tax” as it does its startup magic. The real beauty, the thing I looked most forward to, is that beautifully crisp C# text. Consolas has never looked as good as it does at 10pt. as it does on this display. You know how it looks great at 80pt. when conference speakers demo stuff on a projector? Think that sharpness, only tiny. It’s just gorgeous. Beyond that, everything is just so responsive and fast. Builds of large projects happen in seconds, hundreds of unit tests run in seconds… you just don’t spend a lot of time waiting for stuff. It’s kind of painful to go back to my 27” iMac (which would be better if I put an SSD in it before its third birthday). Are there negatives? A few minor issues, yes. As is the case with OS X, not everything scales right. You’ll see some weirdness at times with splash screens and icons and such. Chrome’s text rendering (in Windows) is apparently not aware of how to deal with higher DPI’s, so text is fuzzy (the OS X version is super sharp, however). You’ll also have to do some fiddling with keyboard settings to use the Windows 8 keyboard shortcuts. Overall, it’s as close to a no-compromise development experience as I’ve ever had. I’m not even going to bother with Boot Camp because the VM route already exceeds my expectations. You definitely get what you pay for. If this one also lasts three years and I can turn around and sell it, it’s worth it for something I use every day.

    Read the article

  • How can I set my screen resolution to match my TV?

    - by Scott Severance
    I have a computer in my classroom that's connected to an LG smart TV (that's actually not so smart. I wouldn't recommend buying one.). For the touch interface, the TV wants a resolution of 1920x1080 at 60Hz. However, I can't seem to set the computer to that resolution. The display settings only offer 1024x768 and 640x480. The computer dual boots with Windows XP, where widescreen options are available in approximately the required size, but the exact resolution -- or even aspect ratio-- isn't available in XP either. I tried the following command: xrandr -s 1920x1080 -r 60 The response was: Size 1920x1080 not found in available modes Back in the old days, the solution would be to edit xorg.conf. However, since that file no longer exists, and I haven't found up-to-date info, I don't know what else to do. If it helps, this machine will never be connected to a different display, so resolution flexibility isn't important. Here's the output of lshw: *-display:0 description: VGA compatible controller product: 4 Series Chipset Integrated Graphics Controller vendor: Intel Corporation physical id: 2 bus info: pci@0000:00:02.0 version: 03 width: 64 bits clock: 33MHz capabilities: vga_controller bus_master cap_list rom configuration: driver=i915 latency=0 resources: irq:42 memory:fe800000-febfffff memory:d0000000-dfffffff ioport:ecd8(size=8) *-display:1 UNCLAIMED description: Display controller product: 4 Series Chipset Integrated Graphics Controller vendor: Intel Corporation physical id: 2.1 bus info: pci@0000:00:02.1 version: 03 width: 64 bits clock: 33MHz According to the system settings, my graphics driver is unknown and my "experience" is standard. This is 64-bit Ubuntu 12.04 (Precise) Note: There are a number of similar questions to this one, but they didn't include any answers that helped me. Update After posting this question, I noticed one in the sidebar that I hadn't found through search but which appeared to contain the answer. Based on that question, I created the /etc/X11/xorg.conf file below: Section "ServerLayout" Identifier "X.org Configured" Screen 0 "Screen0" 0 0 InputDevice "Mouse0" "CorePointer" InputDevice "Keyboard0" "CoreKeyboard" EndSection Section "Files" ModulePath "/usr/lib/xorg/modules" FontPath "/usr/share/fonts/X11/misc" FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType" FontPath "built-ins" EndSection Section "Module" Load "glx" Load "dri2" Load "dbe" Load "dri" Load "record" Load "extmod" EndSection Section "InputDevice" Identifier "Keyboard0" Driver "kbd" EndSection Section "InputDevice" Identifier "Mouse0" Driver "mouse" Option "Protocol" "auto" Option "Device" "/dev/input/mice" Option "ZAxisMapping" "4 5 6 7" EndSection Section "Monitor" Identifier "Monitor0" VendorName "LG" ModelName "Smart TV" EndSection Section "Device" ### Available Driver options are:- ### Values: <i>: integer, <f>: float, <bool>: "True"/"False", ### <string>: "String", <freq>: "<f> Hz/kHz/MHz", ### <percent>: "<f>%" ### [arg]: arg optional #Option "DRI" # [<bool>] #Option "ColorKey" # <i> #Option "VideoKey" # <i> #Option "FallbackDebug" # [<bool>] #Option "Tiling" # [<bool>] #Option "LinearFramebuffer" # [<bool>] #Option "Shadow" # [<bool>] #Option "SwapbuffersWait" # [<bool>] #Option "TripleBuffer" # [<bool>] #Option "XvMC" # [<bool>] #Option "XvPreferOverlay" # [<bool>] #Option "DebugFlushBatches" # [<bool>] #Option "DebugFlushCaches" # [<bool>] #Option "DebugWait" # [<bool>] #Option "HotPlug" # [<bool>] #Option "RelaxedFencing" # [<bool>] Identifier "Card0" Driver "intel" BusID "PCI:0:2:0" EndSection Section "Screen" Identifier "Screen0" Device "Card0" Monitor "Monitor0" DefaultDepth 24 #SubSection "Display" # Viewport 0 0 # Depth 1 #EndSubSection #SubSection "Display" # Viewport 0 0 # Depth 4 #EndSubSection #SubSection "Display" # Viewport 0 0 # Depth 8 #EndSubSection #SubSection "Display" # Viewport 0 0 # Depth 15 #EndSubSection #SubSection "Display" # Viewport 0 0 # Depth 16 #EndSubSection SubSection "Display" Viewport 0 0 Depth 24 Modes "1024x768" "1920x1080" EndSubSection EndSection According to /var/log/Xorg.0.log, my settings aren't being applied. In fact, I wonder if the config file is even being read. [ 1209.083] (**) intel(0): Depth 24, (--) framebuffer bpp 32 [ 1209.084] (==) intel(0): RGB weight 888 [ 1209.084] (==) intel(0): Default visual is TrueColor [ 1209.084] (II) intel(0): Integrated Graphics Chipset: Intel(R) G41 [ 1209.084] (--) intel(0): Chipset: "G41" [ 1209.084] (**) intel(0): Relaxed fencing enabled [ 1209.084] (**) intel(0): Wait on SwapBuffers? enabled [ 1209.084] (**) intel(0): Triple buffering? enabled [ 1209.084] (**) intel(0): Framebuffer tiled [ 1209.084] (**) intel(0): Pixmaps tiled [ 1209.084] (**) intel(0): 3D buffers tiled [ 1209.084] (**) intel(0): SwapBuffers wait enabled [ 1209.084] (==) intel(0): video overlay key set to 0x101fe [ 1209.172] (II) intel(0): Output VGA1 using monitor section Monitor0 [ 1209.260] (II) intel(0): EDID for output VGA1 [ 1209.260] (II) intel(0): Printing probed modes for output VGA1 [ 1209.260] (II) intel(0): Modeline "1024x768"x60.0 65.00 1024 1048 1184 1344 768 771 777 806 -hsync -vsync (48.4 kHz) [ 1209.260] (II) intel(0): Modeline "800x600"x60.3 40.00 800 840 968 1056 600 601 605 628 +hsync +vsync (37.9 kHz) [ 1209.260] (II) intel(0): Modeline "800x600"x56.2 36.00 800 824 896 1024 600 601 603 625 +hsync +vsync (35.2 kHz) [ 1209.260] (II) intel(0): Modeline "848x480"x60.0 33.75 848 864 976 1088 480 486 494 517 +hsync +vsync (31.0 kHz) [ 1209.260] (II) intel(0): Modeline "640x480"x59.9 25.18 640 656 752 800 480 489 492 525 -hsync -vsync (31.5 kHz) [ 1209.260] (II) intel(0): Output VGA1 connected [ 1209.260] (II) intel(0): Using user preference for initial modes [ 1209.260] (II) intel(0): Output VGA1 using initial mode 1024x768 [ 1209.260] (II) intel(0): Using default gamma of (1.0, 1.0, 1.0) unless otherwise stated. [ 1209.260] (II) intel(0): Kernel page flipping support detected, enabling [ 1209.260] (==) intel(0): DPI set to (96, 96)

    Read the article

  • Why is drawing to OnPaint graphics faster than image graphics?

    - by Tesserex
    I'm looking for a way to speed up the drawing of my game engine, which is currently the significant bottleneck, and is causing slowdowns. I'm on the verge of converting it over to XNA, but I just noticed something. Say I have a small image that I've loaded. Image img = Image.FromFile("mypict.png"); We have a picturebox on the screen we want to draw on. So we have a handler. pictureBox1.Paint += new PaintEventHandler(pictureBox1_Paint); I want our loaded image to be tiled on the picturebox (this is for a game, after all). Why on earth is this code: void pictureBox1_Paint(object sender, PaintEventArgs e) { for (int y = 0; y < 16; y++) for (int x = 0; x < 16; x++) e.Graphics.DrawImage(image, x * 16, y * 16, 16, 16); } over 25 TIMES FASTER than this code: Image buff = new Bitmap(256, 256, PixelFormat.Format32bppPArgb); // actually a form member void pictureBox1_Paint(object sender, PaintEventArgs e) { using (Graphics g = Graphics.FromImage(buff)) { for (int y = 0; y < 16; y++) for (int x = 0; x < 16; x++) g.DrawImage(image, x * 16, y * 16, 16, 16); } e.Graphics.DrawImage(buff, 0, 0, 256, 256); } To eliminate the obvious, I've tried commenting out the last e.Graphics.DrawImage (which means I don't see anything, but it gets rid a call that isn't in the first example). I've also left in the using block (needlessly) in the first example, but it's still just as blazingly fast. I've set properties of g to match e.Graphics - things like InterpolationMode, CompositingQuality, etc, but nothing I do bridges this incredible gap in performance. I can't find any difference between the two Graphics objects. What gives? My test with a System.Diagnostics.Stopwatch says that the first code snippet runs at about 7100 fps, while the second runs at a measly 280 fps. My reference image is VS2010ImageLibrary\Objects\png_format\WinVista\SecurityLock.png, which is 48x48 px, and which I modified to be 72 dpi instead of 96, but those made no difference either.

    Read the article

  • Tree Node Checked behavior on a TreeView in Compact Framework 3.5 running on Windows Mobile 6.5

    - by Hydroslide
    I have been upgrading an existing .NET Windows Mobile application to use the 3.5 version of the compact framework and to run on Windows Mobile 6.5. I have a form with a TreeView. The TreeView.Checkboxes property is set to true so that each node has a check box. This gives no trouble in all previous versions of Windows Mobile. However, in version 6.5 when you click on a check box it appears to check and then uncheck instantaneously. But it only raises the AfterCheck event once. The only way I can get a check to stick is by double clicking it (which is the wrong behavior). Has anyone seen this behavior? Does anyone know of a workaround for it? I have included a simple test form. Dump this form into a Visual Studio 2008 Smart Device application targeted at Windows Mobile 6 to see what I mean. Public Class frmTree Inherits System.Windows.Forms.Form #Region " Windows Form Designer generated code " Public Sub New() MyBase.new() ' This call is required by the Windows Form Designer. InitializeComponent() ' Add any initialization after the InitializeComponent() call. End Sub 'Form overrides dispose to clean up the component list. <System.Diagnostics.DebuggerNonUserCode()> _ Protected Overrides Sub Dispose(ByVal disposing As Boolean) If disposing AndAlso components IsNot Nothing Then components.Dispose() End If MyBase.Dispose(disposing) End Sub 'Required by the Windows Form Designer Private components As System.ComponentModel.IContainer Friend WithEvents TreeView1 As System.Windows.Forms.TreeView Private mainMenu1 As System.Windows.Forms.MainMenu 'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. <System.Diagnostics.DebuggerStepThrough()> _ Private Sub InitializeComponent() Dim TreeNode1 As System.Windows.Forms.TreeNode = New System.Windows.Forms.TreeNode("Node0") Dim TreeNode2 As System.Windows.Forms.TreeNode = New System.Windows.Forms.TreeNode("Node2") Dim TreeNode3 As System.Windows.Forms.TreeNode = New System.Windows.Forms.TreeNode("Node3") Dim TreeNode4 As System.Windows.Forms.TreeNode = New System.Windows.Forms.TreeNode("Node4") Dim TreeNode5 As System.Windows.Forms.TreeNode = New System.Windows.Forms.TreeNode("Node1") Dim TreeNode6 As System.Windows.Forms.TreeNode = New System.Windows.Forms.TreeNode("Node5") Dim TreeNode7 As System.Windows.Forms.TreeNode = New System.Windows.Forms.TreeNode("Node6") Dim TreeNode8 As System.Windows.Forms.TreeNode = New System.Windows.Forms.TreeNode("Node7") Me.mainMenu1 = New System.Windows.Forms.MainMenu Me.TreeView1 = New System.Windows.Forms.TreeView Me.SuspendLayout() ' 'TreeView1 ' Me.TreeView1.CheckBoxes = True Me.TreeView1.Location = New System.Drawing.Point(37, 41) Me.TreeView1.Name = "TreeView1" TreeNode2.Text = "Node2" TreeNode3.Text = "Node3" TreeNode4.Text = "Node4" TreeNode1.Nodes.AddRange(New System.Windows.Forms.TreeNode() {TreeNode2, TreeNode3, TreeNode4}) TreeNode1.Text = "Node0" TreeNode6.Text = "Node5" TreeNode7.Text = "Node6" TreeNode8.Text = "Node7" TreeNode5.Nodes.AddRange(New System.Windows.Forms.TreeNode() {TreeNode6, TreeNode7, TreeNode8}) TreeNode5.Text = "Node1" Me.TreeView1.Nodes.AddRange(New System.Windows.Forms.TreeNode() {TreeNode1, TreeNode5}) Me.TreeView1.Size = New System.Drawing.Size(171, 179) Me.TreeView1.TabIndex = 0 ' 'frmTree ' Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi Me.AutoScroll = True Me.ClientSize = New System.Drawing.Size(240, 268) Me.Controls.Add(Me.TreeView1) Me.Menu = Me.mainMenu1 Me.Name = "frmTree" Me.Text = "frmTree" Me.ResumeLayout(False) End Sub #End Region End Class

    Read the article

  • Problem with Freetype and OpenGL

    - by Morgan
    Hey, i'm having a weird issue with drawing text in openGL loaded with the Freetype 2 library. Here is a screenshot of what I'm seeing. http://img203.imageshack.us/img203/3316/freetypeweird.png Here are my code bits for loading and rendering my text. class Font { Font(const String& filename) { if (FT_New_Face(Font::ftLibrary, "arial.ttf", 0, &mFace)) { cout << "UH OH!" << endl; } FT_Set_Char_Size(mFace, 16 * 64, 16 * 64, 72, 72); } Glyph* GetGlyph(const unsigned char ch) { if(FT_Load_Char(mFace, ch, FT_LOAD_RENDER)) cout << "OUCH" << endl; FT_Glyph glyph; if(FT_Get_Glyph( mFace->glyph, &glyph )) cout << "OUCH" << endl; FT_BitmapGlyph bitmap_glyph = (FT_BitmapGlyph)glyph; Glyph* thisGlyph = new Glyph; thisGlyph->buffer = bitmap_glyph->bitmap.buffer; thisGlyph->width = bitmap_glyph->bitmap.width; thisGlyph->height = bitmap_glyph->bitmap.rows; return thisGlyph; } }; The relevant glyph information (width, height, buffer) is stored in the following struct struct Glyph { GLubyte* buffer; Uint width; Uint height; }; And finally, to render it, I have this class called RenderFont. class RenderFont { RenderFont(Font* font) { mTextureIds = new GLuint[128]; mFirstDisplayListId=glGenLists(128); glGenTextures( 128, mTextureIds ); for(unsigned char i=0;i<128;i++) { MakeDisplayList(font, i); } } void MakeDisplayList(Font* font, unsigned char ch) { Glyph* glyph = font->GetGlyph(ch); glBindTexture( GL_TEXTURE_2D, mTextureIds[ch]); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, glyph->width, glyph->height, 0, GL_ALPHA, GL_UNSIGNED_BYTE, glyph->buffer); glNewList(mFirstDisplayListId+ch,GL_COMPILE); glBindTexture(GL_TEXTURE_2D, mTextureIds[ch]); glBegin(GL_QUADS); glTexCoord2d(0,1); glVertex2f(0,glyph->height); glTexCoord2d(0,0); glVertex2f(0,0); glTexCoord2d(1,0); glVertex2f(glyph->width,0); glTexCoord2d(1,1); glVertex2f(glyph->width,glyph->height); glEnd(); glTranslatef(16, 0, 0); glEndList(); } void Draw(const String& text, Uint size, const TransformComponent* transform, const Color32* color) { glEnable(GL_TEXTURE_2D); glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glTranslatef(100, 250, 0.0f); glListBase(mFirstDisplayListId); glCallLists(text.length(), GL_UNSIGNED_BYTE, text.c_str()); glDisable(GL_TEXTURE_2D); glDisable(GL_BLEND); glLoadIdentity(); } private: GLuint mFirstDisplayListId; GLuint* mTextureIds; }; Can anybody see anything weird going on here that would cause the garbled text? It's strange because if I change the font size, or the DPI, then some of the letters that display correctly become garbled, and other letters that were garbled before then display correctly.

    Read the article

  • How do I get through proxy server environments for non-standard services?

    - by Ripred
    I'm not real hip on exactly what role(s) today's proxy servers can play and I'm learning so go easy on me :-) I have a client/server system I have written using a homegrown protocol and need to enhance the client side to negotiate its way out of a proxy environment. I have an existing client and server system written in C and C++ for the speed and a small amount of MFC in the client to handle the user interface. I have written both the server and client side of the system on Windows (the people I work for are mainly web developers using Windows everything - not a choice) sticking to Berkeley Sockets as it were via wsock32 for efficiency. The clients connect to the server through a nonstandard port (even though using port 80 is an option to get out of some environments but the protocol that goes over it isn't HTTP). The TCP connection(s) stay open for the duration of the clients participation in real time conferences. Our customer base is expanding to all kinds of networked environments. I have been able to solve a lot of problems by adding the ability to connect securely over port 443 and using secure sockets which allows the protocol to pass through a lot environments since the internal packets can't be sniffed. But more and more of our customers are behind a proxy server environment and my direct connections don't make it through. My old school understanding of proxy servers is that they act as a proxy for external HTML content over HTTP, possibly locally caching popular material for faster local access, and also allowing their IT staff to blacklist certain destination sites. Customer are complaining that my software doesn't recognize and easily navigate its way through their proxy environments but I'm finding it difficult to decide what my "best fit" solution should be. My software doesn't tear down the connection after each client request, and on top of that packets can come from either side at any time, basically your typical custom client/server system for a specific niche. My first reaction is "why can't they just add my servers addresses to their white list" but if there is a programmatic way I can get through without requiring their IT staff to help it is politically better and arguably a better solution anyway. Plus maybe I'm still not understanding the role and purpose of what proxy servers and environments have grown to be these days. My first attempt at a solution was to use WinInet with its various proxy capabilities to establish a connection over port 80 to my non-standard protocol server (which knows enough to recognize and answer a simple HTTP-looking GET request and answer it with a simple HTTP response page to get around some environments that employ initial packet sniffing (DPI)). I retrieved the actual SOCKET handle behind WinInet's HINTERNET request object and had hoped to use that in place of my software's existing SOCKET connection and hopefully not need to change much more on the client side. It initially seemed to be my solution but on further inspection it seems that the OS gets first-chance at the received data on this socket since when I get notified of events via the standard select(...) statement on the socket and query the size of the data available via ioctlsocket the call succeeds but returns 0 bytes available, the reads don't work and it goes downhill from there. Can someone tell me of a client-side library (commercial is fine) will let me get past these proxy server environments with as little user and IT staff help as possible? From what I read it has grown past SOCKS and I figure someone has to have solved this problem before me. Thanks for reading my long-winded question, Ripred

    Read the article

  • CodePlex Daily Summary for Monday, June 27, 2011

    CodePlex Daily Summary for Monday, June 27, 2011Popular ReleasesSQL Compact Bulk Insert Library: beta 2.0: Update, with ColumnMappings and support for IEnumerable implemented (for most data types, anyway).MiniTwitter: 1.71: MiniTwitter 1.71 ???? ?? OAuth ???????????? ????????、??????????????????? ???????????????????????SizeOnDisk: 1.0.10.0: Fix: issue 327: size format error when save settings Fix: some UI bindings trouble (sorting, refresh) Fix: user settings file deletion when corrupted Feature: TreeView virtualization (better speed with many folders) Feature: New file type DataGrid column Feature: In KByte view, show size of file < 1024B and > 0 with 3 decimal Feature: New language: Italian Task: Cleanup for speedRawr: Rawr 4.2.0: This is the Downloadable WPF version of Rawr!For web-based version see http://elitistjerks.com/rawr.php You can find the version notes at: http://rawr.codeplex.com/wikipage?title=VersionNotes Rawr AddonWe now have a Rawr Official Addon for in-game exporting and importing of character data hosted on Curse. The Addon does not perform calculations like Rawr, it simply shows your exported Rawr data in wow tooltips and lets you export your character to Rawr (including bag and bank items) like Char...HD-Trailers.NET Downloader: HD-Trailer.net Downloader 1.86: This version implements a new config flag "ConsiderTheatricalandNumberedTrailersasIdentical" that for the purposes of Exclusions only Teaser Trailer and one Trailer (named Trailer, Theatrical Traler Trailer No. 1, Trailer 1, Trailer No. 2, etc) will be downloaded. This also includes a bug fix where the .nfo file did not include the -trailer if configured for XBMC.N2 CMS: 2.2: * Web platform installer support available ** Nuget support available What's newDinamico Templates (beta) - an MVC3 & Razor based template pack using the template-first! development paradigm Boilerplate CSS & HTML5 Advanced theming with css comipilation (concrete, dark, roadwork, terracotta) Template-first! development style Content, news, listing, slider, image sizes, search, sitemap, globalization, youtube, google map Display Tokens - replaces text tokens with rendered content (usag...TerrariViewer: TerrariViewer v4.0 [Terraria Inventory Editor]: Version 4.0 Changelog Continued support for Terraria v1.0.5 Fixed image display problem (Major Issue) Added Buff tabs to allowed editing character buffs Added support for displays whose DPI is set to 120 (Major Issue) Added support for screen resolutions that are horizontally smaller than 1280 (Major Issue) Changed the way users will select replacement items on multiple tabs Added items that were missing in the latest Terraria update Fixed various other bugsCoding4Fun Tools: Coding4Fun.Phone.Toolkit v1.4.2: All color pickers can have value set now and UX updates Bunch of fixes - see check-in notes and associated bugsMosaic Project: Mosaic Alpha Build 256: - Improved support for HTML widgets - Added options support for HTML widgets - Added hubs support for all widgets - Added Lock widget which shows Windows 8 like lock screen when you click on it - Added HTML Today widget (by Daniel Steiner)NCalc - Mathematical Expressions Evaluator for .NET: NCalc - 1.3.7: Fixing overflow when comparing long values Circuit Diagram: Circuit Diagram v0.5 Beta: New in this release: New components: Ammeter (meter) Voltmeter (meter) Undo/redo functionality for placing/moving components Choose resolution when exporting PNG image New logothinktecture WSCF.blue: WSCF.blue V1 Update (1.0.12): Features Added a new AutoSetSpecifiedPropertiesDecorator to automatically set the _Specified property to true when setter on matching property is called. Obviously this will only work when the Properties option is used. Bug Fixes Reduced the number of times menu visibility is updated in the SelectionEvents.OnChange event to help prevent OutOfMemoryException inside EnvDTE. Fixed NullReferenceException in OnTypeNameChanged method of MessageContractConverter. Improved validation of namespac....Net Image Processor: v1.0: Initial release of the library containing the core architecture and two filters. To install, extract the library to somewhere sensible then reference as a file from your project in Visual Studio.KinectNUI: Jun 25 Alpha Release: Initial public version. No installer needed, just run the EXE.Media Companion: MC 3.409b-1 Weekly: This weeks release is part way through a major rewrite of the TVShow code. This means that a few TV related features & functions are not fully operational at the moment. The reason for this release is so that people can see if their particular issue has been fixed during the week. Some issues may not be able to be fully checked due to the ongoing TV code refactoring. So, I would strongly suggest that you put this version into a separate folder, copy your settings folder across & test MC that...Terraria World Viewer: Version 1.5: Update June 24th Made compatible with the new tiles found in Terraria 1.0.5CuttingEdge.Conditions: CuttingEdge.Conditions v1.2: CuttingEdge.Conditions is a library that helps developers to write pre- and postcondition validations in their C# 3.0 and VB.NET 9 code base. Writing these validations is easy and it improves the readability and maintainability of code. This release adds IsNullOrWhiteSpace and IsNotNullOrWhiteSpace extension methods for string arguments and a adds a WithExceptionOnFailure<TException>() method on the Condition class which allows users to specify the type of exception that will be thrown. Fo...patterns & practices: Project Silk: Project Silk Community Drop 12 - June 22, 2011: Changes from previous drop: Minor code changes. New "Introduction" chapter. New "Modularity" chapter. Updated "Architecture" chapter. Updated "Server-Side Implementation" chapter. Updated "Client Data Management and Caching" chapter. Guidance Chapters Ready for Review The Word documents for the chapters are included with the source code in addition to the CHM to help you provide feedback. The PDF is provided as a separate download for your convenience. Installation Overview To ins...DotNetNuke® Community Edition: 06.00.00 Beta: Beta 1 (Build 2300) includes many important enhancements to the user experience. The control panel has been updated for easier access to the most important features and additional forms have been adapted to the new pattern. This release also includes many bug fixes that make it more stable than previous CTP releases. Beta ForumsAcDown????? - Anime&Comic Downloader: AcDown????? v3.0 Beta7: ??AcDown???????????????,?????????????????????。????????????????????,??Acfun、Bilibili、???、???、?????,???????????、???????。 AcDown???????????????????????????,???,???????????????????。 AcDown???????C#??,?????"Acfun?????"。 ????32??64? Windows XP/Vista/7 ????????????? ??:????????Windows XP???,?????????.NET Framework 2.0???(x86)?.NET Framework 2.0???(x64),?????"?????????"??? ??????????????,??????????: ??"AcDown?????"????????? ??v3.0 Beta7 ????????????? ???? ?? ????????????????? "??????"?????"?...New Projects.Net Micro Framework Contrib Library: Contrib library for the .Net Micro Framework..NET Notepad: this is my version of notepadAntLifeISEN: Projet de Découverte MISN P54 Simulation du comportement des fourmisApuracao AG: Estudos asp.net com MCV3apuracaoIK: estudos asp.net desenvolvimento manual;Bikirom BikiSoft: BikiRom BikiSoft windows interface to the BikiRom Megaboard series of real-time ecu retuning hardware.BlogSource: Blog Source.Carmilla Learning: Lessons for Camille Dollé, sup in Epita.Debug Single Thread: This Visual Studio 2010 extension adds two shortcuts and toolbar buttons to allow developers to easily focus on single threads while debugging multi-threaded applications. It dramatically reduces the need to manually go into the Threads window to freeze/thaw all threads but the one that needs to be followed, and therefore helps improve productivity. Features: - Restrict further execution to the current thread only. Will freeze all other threads. Shortcut: CTRL+T+T or snowflake button. -...Excel Viewer: Excel Viewer is a .net component that allows programmers to load excel application and also excel spreadsheets in our windows form. This component is useful for viewing excel reports in applications. This component is written in C# 2.0.Image Processor: The Image Processor in C#jQuery Mobile Extensions for ASP.Net MVC: jQMvc is a collection of extensions built on jQuery Mobile (currently in beta) that can be used with ASP.Net MVC to produce HTML5 based mobile applications. With jQMvc we'll be able to do the neat and powerful MVC stuff but for the emerging world of mobile HTML5 applications.just Think: This is about how to use ***** data for make a application on *****.Kinkuma Framework F# (Prism based F# MVVM Support Library): Kinkuma Framework?????F#?ViewModel?Model??????????????????????。Leuphana MyStudy Mobile: MyStudy schedule at your finger tips. Brings your Leuphana MyStudy schedule to your windows phone 7.maxtor1234test: this is my testMayhemModules: This project contains the modules from the Mayhem repository.PlaOrganizer: PLA Organizer helps create and manage playlist that is based on the PLA format. PowerSys: My Super PowerSystemSilverlight out-of-browser Contoso Dashboard: This is a small demonstration of the capabilities of Silverlight's out of browser mode. This projet includes : - Notification Windows - Unrestricted access to network (netTcpBinding) - Automatic updates (provided that you create your own trusted certificate) - Excel and Outlook Interop - Access to file system - Fullscreen modeSimple Binding Framework: Simple binding frameworkSimply BackUp Tool: A simple tool for backing up personal folders that is built in .Net with WPF. The tool will be updated for using latest techniques and technologies. In partnership with: http://www.ganahtech.comSoftware Botany Ivy - String Utils with CSV, Delimited, & Positional Text Parser: The Software Botany Ivy project is a library containing various string utilities. Included in the library are fluent APIs for parsing and creating delimited and fixed width positional text. Quoted CSV is supported. The library is built on .NET 4.0 using the C# language.Software Botany Sunlight - Word Aligned Hybrid Bit Vector Search Framework: The Software Botany Sunlight project is a search framework built using Word Aligned Hybrid Bit Vectors. Its sole purpose is to provide high performance in-memory searching of data using unknown combinations of indices. It is developed with .NET 4.0 using C#.Torrent file parsing, editing, and writing library: A fully functional library for reading and parsing bencode'd files (ie .torrent) into a fully editable DOM. Work with custom bencode'd file formats, or use strongly typed torrent file reading, modification, and writing. Written in C#.Tweeting Attendant: The Tweeting Attendant is a project created for the Adafruit Make It Tweet Challenge.UBL Larsen: UBL Larsen is a C# .NET 4.0 Class Library for reading/writing Universal Business Language (UBL) xml documents. No xml parsing is required. XmlSerializer will take care of the streaming for you. The library is custom generated from the "UBL 2.0 updated" xsd files to resemble the layout of the Oasis xsd file hierarchy. Some optimizations have been made in order to improve streaming speed and ease the job of for the developer. All of the types in Common Basic Components have been replaced. O...WenbianAsk: Ask system using WPF WP7 Transfer Data Tool: This tool is used to transfer data from PC to WP7. ???????: ?????

    Read the article

< Previous Page | 4 5 6 7 8 9  | Next Page >