Search Results

Search found 19796 results on 792 pages for 'bit twiddler'.

Page 63/792 | < Previous Page | 59 60 61 62 63 64 65 66 67 68 69 70  | Next Page >

  • How can I concatenate two mp3 files with different bit rates

    - by Scott
    I have FFmpeg installed on my linux web server. When I execute the following code, I have intermittent results. I think I have figured out that the MP3s do not compile when they have different bitrates. exec ('cat '. $pair['source_file'] . ' ' . $pair['translated_word_file'] . '>' . $temp_mp3); I might have found some articles online that reference taking them apart and then bundling them back together at a consistent bitrates. I have confirmed that this won't really work with basic "cat" function and that "sox" can be used IF they have the same sample rate. The issue now becomes "What is the best way to get them to the same sample rate?"

    Read the article

  • glBlendFunc() with 32-bit RGBA textures

    - by oldSkool
    I have a texture that is semi-transparent with varying opacity at different locations. I have the main texture bitmap, and a mask bitmap. When the program executes, the alpha values from the mask bitmap are loaded into the alpha values of the main texture bitmap. The areas that I want to be transparent have a value of 255 alpha, and the areas that I want to remain totally opaque have values of 0 alpha. There are in-between values also for mid-transparency. I have tried all manner of glBlendFunc() settings, but it is either completely invisible or it acts on the RGB colors of the source texture. Any help out there?

    Read the article

  • Looking for advice on how to do some bit-twiddling [closed]

    - by davit-datuashvili
    hi everybody fisrt of all this is not homework and now question is like this suppose i have array int a[]=new int[]{0xBCDA,0xABFE,0xBCAD,0xEFCA,0xFFCA} i know that there is always some hexadecimal number which occurs in all number or in this case A is repeat in array everywhere so my aim is print only repeat number and other numbers should be zero so my new array should be like this 0x000A, 0xA000,0x00A0 0x000A,0x000A any idea please help me? p.s please nobody say that this is homework

    Read the article

  • Use of bit-torrent for large file download as an alternative to FTP

    - by questzen
    The company I work for procures large volumes of data and does this by subscribing to FTP locations. I was wondering if it is possible to download the same using a tracker, the major challenge is authentication of the users IMO. Most ftp servers we subscribe to have a restriction of the number of ftp connection attempts. Does any one here have any experience with this? Any advice is welcome. Edit To clarify, we subscribe to third party vendors and access their ftp location using credentials provided by them. The service is not exclusive to us, they do sell their data to several others. If we could be part of the swarm, the download rates would be pretty high without added penalty. The question is about the possibility of achieving this, so that we can put-forth a proposal in those lines. The vendors obviously wouldn't share data to non-subscribers, so that is a constraint.

    Read the article

  • ubuntu 64 or 32 bit for macbook/vps?

    - by ajsie
    i've got macbook pro and wonder if i should use 64 or 32 bits ubuntu server? and then i've got a vps not hosted by med. how do i know what version to choose? how do you check how many bits your cpu i working with? can i use 64 on 32 and vice versa?

    Read the article

  • Bit convector : Get byte array from string

    - by nCdy
    When I have a string like "0xd8 0xff 0xe0" I do Text.Split(' ').Select(part => byte.Parse(part, System.Globalization.NumberStyles.HexNumber)).ToArray(); But if I got string like "0xd8ffe0" I don't know what to do ? also I'm able for recommendations how to write byte array as one string.

    Read the article

  • system-wide hook for 64-bit operating systems

    - by strDisplayName
    Hey everybody I want to perform a system-wide hook (using SetWindowHook) on a 64bit operating system. I know that 64bit processes (= proc64) can load only 64bit dlls (= dll64) and 32bit processes (= proc32) can load only 32bit dlls (= dll32). Currently I am planning to call SetWindowHook twice, once with dll32 and once with dll64, expecting that proc64s will load dll64 and proc32s will load dll32 (while dll32 for proc64s and dll64 for proc32s will fail). Is that the correct way to do that, or is there a "more correct" way to do that? Thanks! :-)

    Read the article

  • IS operator behaving a bit strangely

    - by flockofcode
    1) According to my book, IS operator can check whether expression E (E is type) can be converted to the target type only if E is either a reference conversion, boxing or unboxing. Since in the following example IS doesn’t check for either of the three types of conversion, the code shouldn’t work, but it does: int i=100; if (i is long) //returns true, indicating that conversion is possible l = i; 2) a) B b; A a = new A(); if (a is B) b = (B)a; int i = b.l; class A { public int l = 100; } class B:A { } The above code always causes compile time error “Use of unassigned variable”. If condition a is B evaluates to false, then b won’t be assigned a value, but if condition is true, then it will. And thus by allowing such a code compiler would have no way of knowing whether the usage of b in code following the if statement is valid or not ( due to not knowing whether a is b evaluates to true or false) , but why should it know that? Intsead why couldn’t runtime handle this? b) But if instead we’re dealing with non reference types, then compiler doesn’t complain, even though the code is identical.Why? int i = 100; long l; if (i is long) l = i; thank you

    Read the article

  • Java print binary number using bit-wise operator

    - by user69514
    Hi I am creating a method that will take a number and print it along with its binary representation. The problems is that my method prints all 0's for any positive number, and all 1's for any negative number private static void display( int number ){ System.out.print(number + "\t"); int mask = 1 << 31; for(int i=1; i<=32; i++) { if( (mask & number) != 0 ) System.out.print(1); else System.out.print(0); if( (i % 4) == 0 ) System.out.print(" "); } }

    Read the article

  • MVC and Checkboxes...leaves a bit to be desired

    - by Josh
    Here is my problem. I have a list of models that are displayed to the user. On the left is a checkbox for each model to indicate that the user wants to choose this model (in this case, we're building products a user can add to their shopping cart). The model has no concept of being chosen...it strictly has information about the product in question. I've talked with a few other developers after having gone through and the best I could come up with is getting the formcollection and string parsing the key values to determine whether the checkbox is checked or not. This doesn't seem ideal. I was thinking there would be something more strongly bound, but I can't figure out a way to do it. I tried creating another model that had a boolean property to represent being checked and a property of the model and passing a list of that model type to the view and creating a ActionResult on the controller that accepts a list of the new model / checked property, but it comes back null. Am I just thinking too much like web forms and should just continue on with parsing checkbox values?

    Read the article

  • Flash Player error logs on Mac OS X

    - by paleozogt
    I'm on Mac OS X 10.5.8 running Flash Player 10,0,32,18. Flash Player is dumping giant amounts of error logging into the system log (stuff like "bit length overflow" and "code 0 bits 6-7"). Here's a tiny sampling: Oct 14 13:09:41 thorst-2 [0x0-0x58058].com.adobe.flash-10.0[2416]: bit length overflow Oct 14 13:09:41 thorst-2 [0x0-0x58058].com.adobe.flash-10.0[2416]: code 6 bits 6->7 Oct 14 13:09:41 thorst-2 [0x0-0x58058].com.adobe.flash-10.0[2416]: bit length overflow Oct 14 13:09:41 thorst-2 [0x0-0x58058].com.adobe.flash-10.0[2416]: code 5 bits 6->7 Oct 14 13:09:55 thorst-2 [0x0-0x58058].com.adobe.flash-10.0[2416]: bit length overflow Oct 14 13:09:55 thorst-2 [0x0-0x58058].com.adobe.flash-10.0[2416]: code 6 bits 6->7 Oct 14 13:09:55 thorst-2 [0x0-0x58058].com.adobe.flash-10.0[2416]: bit length overflow Oct 14 13:09:55 thorst-2 [0x0-0x58058].com.adobe.flash-10.0[2416]: code 5 bits 6->7 Oct 14 13:09:55 thorst-2 [0x0-0x58058].com.adobe.flash-10.0[2416]: bit length overflow Oct 14 13:09:55 thorst-2 [0x0-0x58058].com.adobe.flash-10.0[2416]: code 0 bits 6->7 Oct 14 13:10:06 thorst-2 [0x0-0x58058].com.adobe.flash-10.0[2416]: bit length overflow Oct 14 13:10:06 thorst-2 [0x0-0x58058].com.adobe.flash-10.0[2416]: code 4 bits 6->7 Oct 14 13:10:06 thorst-2 [0x0-0x58058].com.adobe.flash-10.0[2416]: bit length overflow Oct 14 13:10:06 thorst-2 [0x0-0x58058].com.adobe.flash-10.0[2416]: code 12 bits 6->7 Oct 14 13:10:20 thorst-2 [0x0-0x58058].com.adobe.flash-10.0[2416]: bit length overflow Oct 14 13:10:20 thorst-2 [0x0-0x58058].com.adobe.flash-10.0[2416]: code 6 bits 6->7 Oct 14 13:10:20 thorst-2 [0x0-0x58058].com.adobe.flash-10.0[2416]: bit length overflow Oct 14 13:10:20 thorst-2 [0x0-0x58058].com.adobe.flash-10.0[2416]: code 5 bits 6->7 Oct 14 13:10:21 thorst-2 [0x0-0x58058].com.adobe.flash-10.0[2416]: bit length overflow Oct 14 13:10:21 thorst-2 [0x0-0x58058].com.adobe.flash-10.0[2416]: code 0 bits 6->7 Oct 14 13:10:21 thorst-2 [0x0-0x58058].com.adobe.flash-10.0[2416]: bit length overflow Oct 14 13:10:21 thorst-2 [0x0-0x58058].com.adobe.flash-10.0[2416]: code 12 bits 6->7 Oct 14 13:10:31 thorst-2 [0x0-0x58058].com.adobe.flash-10.0[2416]: bit length overflow Oct 14 13:10:31 thorst-2 [0x0-0x58058].com.adobe.flash-10.0[2416]: code 7 bits 6->7 Oct 14 13:10:31 thorst-2 [0x0-0x58058].com.adobe.flash-10.0[2416]: bit length overflow Oct 14 13:10:31 thorst-2 [0x0-0x58058].com.adobe.flash-10.0[2416]: code 12 bits 6->7 Oct 14 13:11:06 thorst-2 [0x0-0x58058].com.adobe.flash-10.0[2416]: bit length overflow Oct 14 13:11:06 thorst-2 [0x0-0x58058].com.adobe.flash-10.0[2416]: code 3 bits 6->7 Oct 14 13:11:06 thorst-2 [0x0-0x58058].com.adobe.flash-10.0[2416]: bit length overflow Oct 14 13:11:06 thorst-2 [0x0-0x58058].com.adobe.flash-10.0[2416]: code 4 bits 6->7 Oct 14 13:11:06 thorst-2 [0x0-0x58058].com.adobe.flash-10.0[2416]: bit length overflow Oct 14 13:11:06 thorst-2 [0x0-0x58058].com.adobe.flash-10.0[2416]: code 3 bits 7->6 Oct 14 13:11:06 thorst-2 [0x0-0x58058].com.adobe.flash-10.0[2416]: code 4 bits 5->6 Oct 14 13:11:07 thorst-2 [0x0-0x58058].com.adobe.flash-10.0[2416]: bit length overflow Oct 14 13:11:07 thorst-2 [0x0-0x58058].com.adobe.flash-10.0[2416]: code 3 bits 6->7 Oct 14 13:11:07 thorst-2 [0x0-0x58058].com.adobe.flash-10.0[2416]: bit length overflow Oct 14 13:11:07 thorst-2 [0x0-0x58058].com.adobe.flash-10.0[2416]: code 3 bits 6->7 Oct 14 13:11:15 thorst-2 [0x0-0x58058].com.adobe.flash-10.0[2416]: bit length overflow Oct 14 13:11:15 thorst-2 [0x0-0x58058].com.adobe.flash-10.0[2416]: code 3 bits 6->7 Oct 14 13:11:26 thorst-2 [0x0-0x58058].com.adobe.flash-10.0[2416]: bit length overflow Oct 14 13:11:26 thorst-2 [0x0-0x58058].com.adobe.flash-10.0[2416]: code 7 bits 6->7 Oct 14 13:11:26 thorst-2 [0x0-0x58058].com.adobe.flash-10.0[2416]: code 0 bits 4->5 Oct 14 13:11:26 thorst-2 [0x0-0x58058].com.adobe.flash-10.0[2416]: code 14 bits 4->5 Oct 14 13:11:26 thorst-2 [0x0-0x58058].com.adobe.flash-10.0[2416]: code 10 bits 5->4 Oct 14 13:11:26 thorst-2 [0x0-0x58058].com.adobe.flash-10.0[2416]: code 4 bits 5->4 Oct 14 13:11:26 thorst-2 [0x0-0x58058].com.adobe.flash-10.0[2416]: bit length overflow Any ideas on what this may be about?

    Read the article

  • How do I read 64-bit Registry values from VBScript running as a an msi post-installation task?

    - by Joergen Bech
    I need to read the location of the Temporary ASP.NET Files folder from VBScript as part of a post-installation task in an installer created using a Visual Studio 2008 deployment project. I thought I would do something like this: Set oShell = CreateObject("Wscript.Shell") strPath = oShell.RegRead("HKLM\SOFTWARE\Microsoft\ASP.NET\2.0.50727.0\Path") and then concatenate strPath with "\Temporary ASP.NET Files" and be done with it. On an x64 system, however, I am getting the value from the WOW6432Node (HKLM\SOFTWARE\Wow6432Node\Microsoft\ASP.NET\2.0.50727.0), which gives me the 32-bit framework path (C:\Windows\Microsoft.NET\Framework\v2.0.50727), but on an x64 system, I actually want the 64-bit path, i.e. C:\Windows\Microsoft.NET\Framework64\v2.0.50727. I understand that this happens because the .vbs file is run using the 32-bit script host due to the parent process (the installer) being 32-bit itself. How can I run the script using the 64-bit script host - or - how can I read the 64-bit values even if the script is run using the 32-bit script host?

    Read the article

  • Ever any performance different between Java >> and >>> right shift operators?

    - by Sean Owen
    Is there ever reason to think the (signed) and (unsigned) right bit-shift operators in Java would perform differently? I can't detect any difference on my machine. This is purely an academic question; it's never going to be the bottleneck I'm sure. I know: it's best to write what you mean foremost; use for division by 2, for example. I assume it comes down to which architectures have which operations implemented as an instruction.

    Read the article

  • Java bitshift strangeness

    - by Martin
    Java has 2 bitshift operators for right shifts: >> shifts right, and is dependant on the sign bit for the sign of the result >>> shifts right and shifts a zero into leftmost bits http://java.sun.com/docs/books/tutorial/java/nutsandbolts/op3.html This seems fairly simple, so can anyone explain to me why this code, when given a value of -128 for bar, produces a value of -2 for foo: byte foo = (byte)((bar & ((byte)-64)) >>> 6); What this is meant to do is take an 8bit byte, mask of the leftmost 2 bits, and shift them into the rightmost 2 bits. Ie: initial = 0b10000000 (-128) -64 = 0b11000000 initial & -64 = 0b10000000 0b10000000 >>> 6 = 0b00000010 The result actually is -2, which is 0b11111110 Ie. 1s rather than zeros are shifted into left positions

    Read the article

  • C# int to byte[]

    - by Petoj
    If I need to convert an int to byte[] I could use Bitconvert.GetBytes(). But if I should follow this: An XDR signed integer is a 32-bit datum that encodes an integer in the range [-2147483648,2147483647]. The integer is represented in two's complement notation. The most and least significant bytes are 0 and 3, respectively. Integers are declared as follows: Taken from RFC1014 3.2. What method should I use then if there is no method to do this? How would it look like if you write your own? I don't understand the text 100% so I can't implement it on my own.

    Read the article

  • Alternative to BitConverter.ToInt32

    - by MusiGenesis
    I'm using BitConverter.ToInt32 to pack 3 byte values into an int, like so: byte R = 0; byte G = 0; byte B = 0; int i = BitConverter.ToInt32(new byte[] { R, G, B, 0 }, 0); Is there a faster way to do this that doesn't involve the creation of a new int each time? Getting the bytes out of an int is easy: int i = 34234; byte B = (byte)(i >> 0); byte G = (byte)(i >> 8); byte R = (byte)(i >> 16); Is there a simple way to reverse this process and use bit-shifting to write the RGB bytes back over an existing int?

    Read the article

  • How do I create an 8-bit PNG with transparency from an NSBitmapImageRep?

    - by Rob Keniger
    I have a 32-bit NSBitmapImageRep which has an alpha channel with essentially 1-bit values (the pixels are either on or off). I want to save this bitmap to an 8-bit PNG file with transparency. If I use the -representationUsingType:properties: method of NSBitmapImageRep and pass in NSPNGFileType, a 32-bit PNG is created, which is not what I want. I know that 8-bit PNGs can be read, they open in Preview with no problems, but is it possible to write this type of PNG file using any built-in Mac OS X APIs? I'm happy to drop down to Core Image or even QuickTime if necessary. A cursory examination of the CGImage docs didn't reveal anything obvious. EDIT: I've started a bounty on this question, if someone can provide working source code that takes a 32-bit NSBitmapImageRep and writes a 256-color PNG with 1-bit transparency, it's yours.

    Read the article

  • DataType for storing a long serial number (10 bytes)

    - by CrimsonX
    We have a device which has a 10 byte serial number which must be read into our application and stored into a .net datatype. In the device it is stored as an unsigned 10-byte (80-bit) number. I don't expect we will be performing any mathematical operations on this number, but only displaying it to the user. The .NET framework doesn't have a built in UNIT128 to store this datatype. My suggestion for storing this datatype is to create a 10 element byte array and read in the data into this array. Are there any better solutions to this problem? Note: I have seen in this question that a GUID is a 128 byte signed integer, but it seems like a bad idea to use a GUID in this fashion. Any other suggestions?

    Read the article

  • Extracting rightmost N bits of an integer

    - by srandpersonia
    In the yester Code Jam Qualification round http://code.google.com/codejam/contest/dashboard?c=433101#s=a&a=0 , there was a problem called Snapper Chain. From the contest analysis I came to know the problem requires bit twiddling stuff like extracting the rightmost N bits of an integer and checking if they all are 1. I saw a contestant's(Eireksten) code which performed the said operation like below: (((K&(1<<N)-1))==(1<<N)-1) I couldn't understand how this works. What is the use of -1 there in the comparison?. If somebody can explain this, it would be very much useful for us rookies. Also, Any tips on identifying this sort of problems would be much appreciated. I used a naive algorithm to solve this problem and ended up solving only the smaller data set.(It took heck of a time to compile the larger data set which is required to be submitted within 8 minutes.). Thanks in advance.

    Read the article

  • Representing a very large array of bits in little memory

    - by user614624
    Hello, I would like to represent a structure containing 250 M states(1 bit each) somehow into as less memory as possible (100 k maximum). The operations on it are set/get. I cold not say that it's dense or sparse, it may vary. The language I want to use is C. I looked at other threads here to find something suitable also. A probabilistic structure like Bloom filter for example would not fit because of the possible false answers. Any suggestions please?

    Read the article

  • how to downgrage gcc to version 4.1.1 if I use 64-bit Ubuntu 11.10 or 12.04?

    - by SSolid
    how to downgrade gcc to version 4.1.1 if i am using 64-bit ubuntu 11.10 or 12.04? please notice that I'm using 64-bit version of ubuntu It may seems simlar to this question Old version of gcc for new Ubuntu but I can't solve it with the method provide in that thread I get some error like gcc-4.1 : Depends: cpp-4.1 (= 4.1.2-27ubuntu1) but it is not going to be installed can someone tell me how to do it? thanks

    Read the article

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