Search Results

Search found 8189 results on 328 pages for 'fedora 16'.

Page 140/328 | < Previous Page | 136 137 138 139 140 141 142 143 144 145 146 147  | Next Page >

  • Performing full screen grab in windows

    - by Steven Lu
    I am working an idea that involves getting a full capture of the screen including windows and apps, analyzing it, and then drawing items back onto the screen, as an overlay. I want to learn image processing techniques and I could get lots of data to work with if I can directly access the Windows screen. I could use this to build automation tools the likes of which have never been seen before. More on that later. I have full screen capture working for the most part. HWND hwind = GetDesktopWindow(); HDC hdc = GetDC(hwind); int resx = GetSystemMetrics(SM_CXSCREEN); int resy = GetSystemMetrics(SM_CYSCREEN); int BitsPerPixel = GetDeviceCaps(hdc,BITSPIXEL); HDC hdc2 = CreateCompatibleDC(hdc); BITMAPINFO info; info.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); info.bmiHeader.biWidth = resx; info.bmiHeader.biHeight = resy; info.bmiHeader.biPlanes = 1; info.bmiHeader.biBitCount = BitsPerPixel; info.bmiHeader.biCompression = BI_RGB; void *data; hbitmap = CreateDIBSection(hdc2,&info,DIB_RGB_COLORS,(void**)&data,0,0); SelectObject(hdc2,hbitmap); Once this is done, I can call this repeatedly: BitBlt(hdc2,0,0,resx,resy,hdc,0,0,SRCCOPY); The cleanup code (I have no idea if this is correct): DeleteObject(hbitmap); ReleaseDC(hwind,hdc); if (hdc2) { DeleteDC(hdc2); } Every time BitBlt is called it grabs the screen and saves it in memory I can access thru data. Performance is somewhat satisfactory. BitBlt executes in 50 milliseconds (sometimes as low as 33ms) at 1920x1200x32. What surprises me is that when I switch display mode to 16 bit, 1920x1200x16, either through my graphics settings beforehand, or by using ChangeDisplaySettings, I get a massively improved screen grab time between 1ms and 2ms, which cannot be explained by the factor of two reduction in bit-depth. Using CreateDIBSection (as above) offers a significant speed up when in 16-bit mode, compared to if I set up with CreateCompatibleBitmap (6-7ms/f). Does anybody know why dropping to 16bit causes such a speed increase? Is there any hope for me to grab 32bit at such speeds? if not for the color depth, but for not forcing a change of screen buffer modes and the awful flickering.

    Read the article

  • loading data from a flat file to table using informatica, having both english and foreign language c

    - by Manish
    I am loading data from a flat file to table using informatica, the file has both english and foreign language characters like chinese, and others. The foreign language characters are not getting displayed properly after loading. How can this problem be solved ? I could solve it by using code page UTF - 16 Encoding of Unicode Platform Endian, earlier i was using different code page UTF-8.

    Read the article

  • Array split by range?

    - by acidzombie24
    I have an array, i don't know the length but i do know it will be =48bytes. The first 48bytes are the header and i need to split the header into two. Whats the easiest way? I am hoping something as simple as header.split(32); would work ([0] is 32 bytes [1] being 16 assuming header is an array of 48bytes) using .NET

    Read the article

  • PIX_FMT_YUYV422 8 bits conversion ffmpeg

    - by Sridhar
    Hi, I have a raw YUYV422 buffer with 8-bit 4:2:2 Component Y’CbCr format (Y0, Cb, Y1, Cr order). I know that ffmpeg's PIX_FMT_YUYV422 only handle 16-bit buffers.So I am getting Bad memory error when scaling that buffer into YUV420P. Can any one give me a clue, how can I use this buffer with ffmpeg to covert into YUV420. Thanks, Raghu

    Read the article

  • How to hide certain elements on a page using jQuery

    - by Ankur
    I am trying to implement something that is similar to a faceted search. My data is a series of objects and relationships. The idea is that you click an object (in this case "95 Theses" and then the possibly relationships are displayed, in this case "author" and clicking the relationship shows the object that matches the relationship, in this case "Martin Luther". My clicking of objects and relationsips (predicates) works fine. What I need to do is allow users to click an object or relationship and have all those that extend from it removed. This is what I thought of adding when a object or relationship 'tag' is clicked (every time I add another object or relationship I increment the global attribute called 'level'): if($(".objHolder,. preHolder").filter("[level>'"+level+"']").filter("[holderId='"+holderId+"']").length) { $(".objHolder,. preHolder").filter("[level>'"+level+"']").filter("[holderId='"+holderId+"']").remove(); } <table border="0" cellpadding="4" cellspacing="2"> <tbody><tr> <td class="objHolder" objid="1" holderid="1" level="1"> <table border="0" cellpadding="4" cellspacing="2"> <tbody><tr class="objItemRow" objid="1" holderid="1" level="1"> <td class="objItem" objid="1" holderid="1" level="2" bgcolor="#eeeeee" nowrap="nowrap">95 Theses</td> </tr></tbody> </table></td> <td><img src="images/right.jpg" alt="" height="10" width="16"></td> <td class="preHolder" level="2" holderid="1"> <table border="0" cellpadding="4" cellspacing="2"><tbody> <tr><td class="preItem" level="3" subid="1" preid="1" holderid="1" bgcolor="#eeeeee" nowrap="nowrap">author</td></tr> </tbody></table></td> <td><img src="images/right.jpg" alt="" height="10" width="16"></td> <td class="objHolder" level="3" holderid="1"> <table border="0" cellpadding="4" cellspacing="2"><tbody><tr><td class="objItem" level="4" objid="3" holderid="1" bgcolor="#eeeeee" nowrap="nowrap">Martin Luther</td></tr></tbody></table> </td> </tr></tbody> </table>

    Read the article

  • What is a good 64-bit NASM assembly reference?

    - by Xill
    I have been able to find plenty of 16 and 32-bit NASM assembly references like here, but the only thing I could find on 64-bit NASM was what was in the small section of the NASM manual here. Are there any good sites or books that would have a better explanation of 64-bit assembly (Windows or Linux/Unix) with some good code examples?

    Read the article

  • avoiding the tedium of optional parameters

    - by Kyle
    If I have a constructor with say 2 required parameters and 4 optional parameters, how can I avoid writing 16 constructors or even the 10 or so constructors I'd have to write if I used default parameters (which I don't like because it's poor self-documentation)? Are there any idioms or methods using templates I can use to make it less tedious? (And easier to maintain?)

    Read the article

  • Generate lags R

    - by Btibert3
    Hi All, I hope this is basic; just need a nudge in the right direction. I have read in a database table from MS Access into a data frame using RODBC. Here is a basic structure of what I read in: PRODID PROD Year Week QTY SALES INVOICE Here is the structure: str(data) 'data.frame': 8270 obs. of 7 variables: $ PRODID : int 20001 20001 20001 100001 100001 100001 100001 100001 100001 100001 ... $ PROD : Factor w/ 1239 levels "1% 20qt Box",..: 335 335 335 128 128 128 128 128 128 128 ... $ Year : int 2010 2010 2010 2009 2009 2009 2009 2009 2009 2010 ... $ Week : int 12 18 19 14 15 16 17 18 19 9 ... $ QTY : num 1 1 0 135 300 270 300 270 315 315 ... $ SALES : num 15.5 0 -13.9 243 540 ... $ INVOICES: num 1 1 2 5 11 11 10 11 11 12 ... Here are the top few rows: head(data, n=10) PRODID PROD Year Week QTY SALES INVOICES 1 20001 Dolie 12" 2010 12 1 15.46 1 2 20001 Dolie 12" 2010 18 1 0.00 1 3 20001 Dolie 12" 2010 19 0 -13.88 2 4 100001 Cage Free Eggs 2009 14 135 243.00 5 5 100001 Cage Free Eggs 2009 15 300 540.00 11 6 100001 Cage Free Eggs 2009 16 270 486.00 11 7 100001 Cage Free Eggs 2009 17 300 540.00 10 8 100001 Cage Free Eggs 2009 18 270 486.00 11 9 100001 Cage Free Eggs 2009 19 315 567.00 11 10 100001 Cage Free Eggs 2010 9 315 569.25 12 I simply want to generate lags for QTY, SALES, INVOICE for each product but I am not sure where to start. I know R is great with Time Series, but I am not sure where to start. I have two questions: 1- I have the raw invoice data but have aggregated it for reporting purposes. Would it be easier if I didn't aggregate the data? 2- Regardless of aggregation or not, what functions will I need to loop over each product and generate the lags as I need them? In short, I want to loop over a set of records, calculate lags for a product (if possible), append the lags (as they apply) to the current record for each product, and write the results back to a table in my database for my reporting software to use. Any help you can provide will be greatly appreciated! Many thanks in advance, Brock

    Read the article

  • Drupal site requires a higher memory limit after migration? Why?

    - by oalo
    Hello. We have a website which had a previous memory limit of 12 MB (12 MB in php.ini, and 16 MB in settings.php) and worked previously. After moving to a new server it started giving memory limit errors and displaying half-blank screen. We increaded the limit in both files (php.ini and settings.php) and now it works, but I dont understand how is it possible that now it needs a considerably larger amount of memory (it used to work with 12 MB, now it cont work with less than 20 MB).

    Read the article

  • how to Invoke User-Defined Functions That Return a Table Data Type

    - by nectar
    here my code- create function dbo.emptable() returns Table as return (select id, name, salary from employee) go select dbo.emptable() error: Msg 4121, Level 16, State 1, Line 1 Cannot find either column "dbo" or the user-defined function or aggregate "dbo.emptable", or the name is ambiguous. while when I run sp_helptext emptable it shows- create function dbo.emptable() returns Table as return (select id, name, salary from employee) it means function exists in database then why it is giving such error?

    Read the article

  • Stored procedure error when use computed column for ID

    - by Hari
    I got the error: Procedure or function usp_User_Info3 has too many arguments specified When I run the program. I don't know the error in SP or in C# code. I have to display the Vendor_ID after the user clicks the submit button. Where the thing going wrong here ? Table structure : CREATE TABLE User_Info3 ( SNo int Identity (2000,1) , Vendor_ID AS 'VEN' + CAST(SNo as varchar(16)) PERSISTED PRIMARY KEY, UserName VARCHAR(16) NOT NULL, User_Password VARCHAR(12) NOT NULL, User_ConPassword VARCHAR(12) NOT NULL, User_FirstName VARCHAR(25) NOT NULL, User_LastName VARCHAR(25) SPARSE NULL, User_Title VARCHAR(35) NOT NULL, User_EMail VARCHAR(35) NOT NULL, User_PhoneNo VARCHAR(14) NOT NULL, User_MobileNo VARCHAR(14)NOT NULL, User_FaxNo VARCHAR(14)NOT NULL, UserReg_Date DATE DEFAULT GETDATE() ) Stored Procedure : ALTER PROCEDURE [dbo].[usp_User_Info3] @SNo INT OUTPUT, @Vendor_ID VARCHAR(10) OUTPUT, @UserName VARCHAR(30), @User_Password VARCHAR(12), @User_ConPassword VARCHAR(12), @User_FirstName VARCHAR(25), @User_LastName VARCHAR(25), @User_Title VARCHAR(35), @User_OtherEmail VARCHAR(30), @User_PhoneNo VARCHAR(14), @User_MobileNo VARCHAR(14), @User_FaxNo VARCHAR(14) AS BEGIN SET NOCOUNT ON; INSERT INTO User_Info3 (UserName,User_Password,User_ConPassword,User_FirstName, User_LastName,User_Title,User_OtherEmail,User_PhoneNo,User_MobileNo,User_FaxNo) VALUES (@UserName,@User_Password,@User_ConPassword,@User_FirstName,@User_LastName, @User_Title,@User_OtherEmail,@User_PhoneNo,@User_MobileNo,@User_FaxNo) SET @SNo = Scope_Identity() SELECT Vendor_ID From User_Info3 WHERE SNo = @SNo END C# Code : protected void BtnUserNext_Click(object sender, EventArgs e) { cmd.CommandType = CommandType.StoredProcedure; cmd.CommandText = "usp_User_Info3"; System.Data.SqlClient.SqlParameter SNo=cmd.Parameters.Add("@SNo",System.Data.SqlDbType.Int); System.Data.SqlClient.SqlParameter Vendor_ID=cmd.Parameters.Add("@Vendor_ID", System.Data.SqlDbType.VarChar,10); cmd.Parameters.Add("@UserName", SqlDbType.VarChar).Value = txtUserName.Text; cmd.Parameters.Add("@User_Password", SqlDbType.VarChar).Value = txtRegPassword.Text; cmd.Parameters.Add("@User_ConPassword", SqlDbType.VarChar).Value = txtRegConPassword.Text; cmd.Parameters.Add("@User_FirstName", SqlDbType.VarChar).Value = txtRegFName.Text; cmd.Parameters.Add("@User_LastName", SqlDbType.VarChar).Value = txtRegLName.Text; cmd.Parameters.Add("@User_Title", SqlDbType.VarChar).Value = txtRegTitle.Text; cmd.Parameters.Add("@User_OtherEmail", SqlDbType.VarChar).Value = txtOtherEmail.Text; cmd.Parameters.Add("@User_PhoneNo", SqlDbType.VarChar).Value =txtRegTelephone.Text; cmd.Parameters.Add("@User_MobileNo", SqlDbType.VarChar).Value =txtRegMobile.Text; cmd.Parameters.Add("@User_FaxNo", SqlDbType.VarChar).Value =txtRegFax.Text; cmd.Connection = SqlCon; try { Vendor_ID.Direction = System.Data.ParameterDirection.Output; SqlCon.Open(); cmd.ExecuteNonQuery(); string VendorID = cmd.ExecuteScalar() as string; } catch (Exception ex) { throw new Exception(ex.Message); } finally { string url = "../CompanyBasicInfo.aspx?Parameter=" + Server.UrlEncode(" + VendorID + "); SqlCon.Close(); } }

    Read the article

  • replacing Fragment inside onActivityResult() geting error

    - by ajay
    When am lancing camera using Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE); startActivityForResult(intent, CAMERA_REQUEST);) And then we getting callback after taking pic to the onActivityResult(){ //HERE AM CALL ING ANOTHER FRAGMENT FragmentManager fm = getFragmentManager(); fm.beginTransaction().replace( R.id.tab_upload, new uploadingActivty(), "tabId").setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN) .addToBackStack(null).commit(); } Then we getting error as 11-21 16:13:44.316: E/AndroidRuntime(30944): Caused by: java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState Any idea?

    Read the article

  • PHP: How do I install soap extension?

    - by jun
    Ok. I am just starting to use soap and my first problem is installing it. I got this error: Fatal error: Class 'SoapClient' not found in /home/user/mysite.com/path/to/file.php on line 16 I am hosting my site in DreamHost and ask the guys there. But they told me that they don't support any third-party installation. Does anyone has the same problem and manage to solved it? Thansk!

    Read the article

  • iTunes App Store: Does a major version upgrade = longer approval queue time?

    - by erlingormar
    I'm wondering if anyone has insight into this... when releasing an update of an iPhone application, should I expect the approval process to take longer if I submit something that's declared as a major version update (as compared to a minor version)? Last time around (about the time the big Facebook-update was released) our wait time for a minor version review was 21 days (16 working days).

    Read the article

  • jQuery, Quotes, characters etc are breaking my JSON

    - by nobosh
    I'm using json2.js to create a JSON object which JQUERY posts to the Server. The object looks like: [{"locationID":"16","locationDesc":"XXXX"}, {"locationID":"111","locationDesc":"XXXX"}, {"locationID":"12","locationDesc":"XXXX"}, {"locationID":"11","locationDesc":"XXXX"}] Problem here is that XXXX sometimes contains quotes like "we're'" etc.... How should I handle this? Do you I escape somewhere or encode in some way? Thanks

    Read the article

  • Drupal menu item setting as active

    - by Mladen
    Hi Guys, Here is my problem. I have a site in drupal and some menu structure. When the URL address is application/android/all android menu item is highlighted. However, when the URL address is application/android/16 android menu item is not highlighted. My question is how to make everything that starts with /application/android/ to have highlighted android menu item? Cheers, Mladjo

    Read the article

  • vim unicode bufread/bufwrite script

    - by anon
    Problem: I want my unicode characters to be stored on disk as (rather tan utf8/16 encoding) \u#### However, I want them dispalyed as unicode characters when opened up in vim. I think the easiest way to acheive this is some bufopen/bufwrite script that automatically: on opening, convert \u#### to unicode character on writing, convert unicode characters into \u#### However, I don't know what functions to call to make this happen. Can someone lend a hand? Thanks!

    Read the article

  • Sequential (comb) GUIDs for Oracle

    - by Eyvind
    We are in the process of switching from the C# Guid.NewGuid() random-ish guid generator to the sequential guid algorithm suggested in this post. While this seems to work well for MS SQL Server, I am unsure about the implications for Oracle databases, in which we store guids in a raw(16) field. Does anyone have any insight as to whether this algorithm would be good for creating sequential guids for Oracle as well as for MS SQL Server, or if a different variant should be used. Thanks!

    Read the article

  • Can't destroy record in many-to-many relationship

    - by Dmart
    I'm new to Rails, so I'm sure I've made a simple mistake. I've set up a many-to-many relationship between two models: User and Group. They're connected through the junction model GroupMember. Here are my models (removed irrelevant stuff): class User < ActiveRecord::Base has_many :group_members has_many :groups, :through => :group_members end class GroupMember < ActiveRecord::Base belongs_to :group belongs_to :user end class Group < ActiveRecord::Base has_many :group_members has_many :users, :through => :group_members end The table for GroupMembers contains additional information about the relationship, so I didn't use has_and_belongs_to_many (as per the Rails "Active Record Associations" guide). The problem I'm having is that I can't destroy a GroupMember. Here's the output from rails console: irb(main):006:0> m = GroupMember.new => #<GroupMember group_id: nil, user_id: nil, active: nil, created_at: nil, updated_at: nil> irb(main):007:0> m.group_id =1 => 1 irb(main):008:0> m.user_id = 16 => 16 irb(main):009:0> m.save => true irb(main):010:0> m.destroy NoMethodError: undefined method `eq' for nil:NilClass from /usr/local/lib/ruby/gems/1.8/gems/activesupport-3.0.4/lib/active_support/whiny_nil.rb:48:in `method_missing' from /usr/local/lib/ruby/gems/1.8/gems/activerecord-3.0.4/lib/active_record/persistence.rb:79:in `destroy' from /usr/local/lib/ruby/gems/1.8/gems/activerecord-3.0.4/lib/active_record/locking/optimistic.rb:110:in `destroy' from /usr/local/lib/ruby/gems/1.8/gems/activerecord-3.0.4/lib/active_record/callbacks.rb:260:in `destroy' from /usr/local/lib/ruby/gems/1.8/gems/activesupport-3.0.4/lib/active_support/callbacks.rb:413:in `_run_destroy_callbacks' from /usr/local/lib/ruby/gems/1.8/gems/activerecord-3.0.4/lib/active_record/callbacks.rb:260:in `destroy' from /usr/local/lib/ruby/gems/1.8/gems/activerecord-3.0.4/lib/active_record/transactions.rb:235:in `destroy' from /usr/local/lib/ruby/gems/1.8/gems/activerecord-3.0.4/lib/active_record/transactions.rb:292:in `with_transaction_returning_status' from /usr/local/lib/ruby/gems/1.8/gems/activerecord-3.0.4/lib/active_record/connection_adapters/abstract/database_statements.rb:139:in `transaction' from /usr/local/lib/ruby/gems/1.8/gems/activerecord-3.0.4/lib/active_record/transactions.rb:207:in `transaction' from /usr/local/lib/ruby/gems/1.8/gems/activerecord-3.0.4/lib/active_record/transactions.rb:290:in `with_transaction_returning_status' from /usr/local/lib/ruby/gems/1.8/gems/activerecord-3.0.4/lib/active_record/transactions.rb:235:in `destroy' from (irb):10 This is driving me crazy, so any help would be greatly appreciated.

    Read the article

  • PostgreSQL: Why does this simple query not use the index?

    - by David
    I have a table t with a column c, which is an int and has a btree index on it. Why does the following query not utilize this index? explain select c from t group by c; The result I get is: HashAggregate (cost=1005817.55..1005817.71 rows=16 width=4) -> Seq Scan on t (cost=0.00..946059.84 rows=23903084 width=4) My understanding of indexes is limited, but I thought such queries were the purpose of indexes.

    Read the article

< Previous Page | 136 137 138 139 140 141 142 143 144 145 146 147  | Next Page >