f



left shift then right shift an unsigned int

Hello, for the following code:     
    unsigned int var = 0xFF2277F0UL;
    unsigned char take2 = (var << 8) >> 24;
Is there any pitfall about the shift? (get '22' i.e. 34 or '"' as wanted)


Thanks and best regards,
Wenjie
0
gokkog (77)
7/11/2003 11:07:43 AM
comp.lang.c++ 49423 articles. 7 followers. Post Follow

3 Replies
508 Views

Similar Articles

[PageSpeed] 24

On 11 Jul 2003 04:07:43 -0700, gokkog@yahoo.com (Wenjie) wrote:

>Hello, for the following code:     
>    unsigned int var = 0xFF2277F0UL;
>    unsigned char take2 = (var << 8) >> 24;
>Is there any pitfall about the shift? (get '22' i.e. 34 or '"' as wanted)

It looks OK to me...


--
Bob Hairgrove
rhairgroveNoSpam@Pleasebigfoot.com
0
7/11/2003 3:37:23 PM
"Greg Schmidt" <gregs@trawna.com> wrote in message news:6k0ugvsn92ecngaglqeqlfcs41s5iane4e@4ax.com...
> On 11 Jul 2003 04:07:43 -0700, gokkog@yahoo.com (Wenjie) wrote:
>
> >Hello, for the following code:
> >    unsigned int var = 0xFF2277F0UL;
> >    unsigned char take2 = (var << 8) >> 24;
> >Is there any pitfall about the shift? (get '22' i.e. 34 or '"' as wanted)
>
> As others have said, it looks fine, but it seems to me that
>     unsigned int var = 0xFF2277F0UL;
>     unsigned char take2 = (var >> 16) & 0xFF;
> might be clearer as to the purpose, and easier to modify down the road.

I don't know what your assumptions are (since you hardcoded a lot of numbers
here), but if char is an 8 bit quantity, even the & 0xFF is superfluous.


0
ron156 (1433)
7/11/2003 7:05:50 PM
gokkog@yahoo.com (Wenjie) wrote in message news:<d2804eb3.0307110307.1f7e3d40@posting.google.com>...
> Hello, for the following code:     
>     unsigned int var = 0xFF2277F0UL;
>     unsigned char take2 = (var << 8) >> 24;
> Is there any pitfall about the shift? (get '22' i.e. 34 or '"' as wanted)

One pitfall is that it is dependent on the size of an unsigned int to
get the expected results.  If unsigned int holds more then 32 bits,
the << 8 won't do the intended stripping.

Even worse, I think it isn't clear what this code is doing.  I can
picture someone accidentally changing the code to:

   var >> 16;

If I were writing the code, I'd making the stripping more explicit.

   (var >> 16) & 0xFF

or possibly:

   (var & 0xFF0000) >> 16

samuel
0
7/11/2003 8:22:25 PM
Reply:

Similar Artilces:

Right Shift
Here's some confusion for you... <?PHP $x = (4653896912 >> 13); echo $x; ?> I ran that on two different servers. Server A gave me: 43814 Server B gave me: 568102 I have been hacking away and researching this for hours. I am completely clueless. Any suggestions or workarounds? Thanks in advance. I just figured out that server A is a 32 bit machine and server B is 64. How can I account for this? CrashRoX said the following on 15/03/2006 10:32: > Here's some confusion for you... > > <?PHP > $x = (4653896912 >> 13); > echo $x; > ?> > > I ran that on two different servers. > > Server A gave me: 43814 > Server B gave me: 568102 > > I have been hacking away and researching this for hours. I am > completely clueless. Any suggestions or workarounds? Thanks in advance. > 4653896912 is bigger than can be represented as a signed-int on a 32-bit platform, so gets truncated to 358929616. And (358929616 >> 13) == 43814. However, 4653896912 can be represented as a signed-int on a 64-bit platform, giving the "correct" answer of 568102. [NOTE: I haven't checked this to see if it's right though...] -- Oli Im actually looking for the answer as 43814. Is there no "workaround" or solution to force a 64 bit machine to generate the same answer? CrashRoX said the following on 15/03/2006 10:48: > Im actually looking for the answer as 43814. Is there no "work...

shift
If I have a digital sampling of a signal that is centered at 100 kHz and I want to move it to 10 kHz, what is the easiest way to do this? Thanks. bob@coolgroups.com wrote: > If I have a digital sampling of a signal that is centered at 100 kHz > and I want to move it to 10 kHz, what is the easiest way to do this? What are the sampling frequency and the bandwidth if the signal? Is the spectrum of the signal symmetric about 100 KHz? Jerry -- "The rights of the best of men are secured only as the rights of the vilest and most abhorrent are protected." - Chief Justice Charles Evans Hughes, 1927 ��������������������������������������������������������������������� ...

Frequency shift and Pitch shift of speech signal m-files
Hi Everyone, I am working on an algorithm that implements frequenc shifting and pitch shifting on a fragment of a speech signal, Can anyon provide me a code that performs any of these shifts?? Best regards G.N ...

Mouse cursor shifting left in browser
Hi All I am using Clarion 5.5 Enterprise Edition with Windows XP Home Edition. I have created a program with an ABC Browse Template. I have three relational browse boxes in the procedure. My program was working great until I downloaded the c55ee07full.zip patch. Now when I use the up or down keys to scroll through my browser, my mouse cursor shifts to the left. It also happens when I use my mouse on the browser scrollbar. With every click of my mouse button, my cursor shifts to the left forcing me to move it back to the right. If I uninstall the c55ee07full patch, returning to my Clarion 5.5 EE cd install, the problem clears up. I can also clear up the problem by unchecking the 'Enhance pointer precision' checkbox in my mouse setup in windows. I am about to relaese my program but I am afraid I will get a lot of phone calls about the problem, thus hurting my sales. Does someone know howto fix this without telling every customer to disable the 'Enhance pointer precision' option. Thanks Benny In ABBROWSE.CLW find the instances of SETCURSOR() and change it to SETCURSOR(Cursor:Arrow) "Benny" <benny4129@adelphia.net> wrote in message news:1171721292.550540.212930@q2g2000cwa.googlegroups.com... > Hi All > > I am using Clarion 5.5 Enterprise Edition with Windows XP Home > Edition. I have created a program with an ABC Browse Template. I have > three relational browse boxes in the procedure. My program was working > great until...

samsung 710v console shifted left
Hello Folks, I've just connected a Samsung SyncMaster 710v and it works fine with X. However, at boot up and in console mode it misses out the first three characters of every line. Any suggestions as to where to look for a cure? TIA Peter p.scott@shu.ac.uk wrote: > Hello Folks, > > I've just connected a Samsung SyncMaster 710v and it works fine with X. > However, at boot up and in console mode it misses out the first three > characters of every line. Any suggestions as to where to look for a > cure? Sure. Use the monitor's front panel controls to shift the image to the right. The monitor should remember your settings for that combination of resolution/refresh rate...which is likely different from the resolution and refresh rate you use in X (unless you're running a high resolution framebuffer console or very low resolution in X) so you shouldn't have a problem. That's the way it works on my Samsung SyncMaster 760V. That worked a treat -- thanks! Peter ...

C and MISRA, blues... (arithmetic shifts)
I'm currently rewriting some numerical code for MISRA compliance. Signed shifts are not defined by the C-standard, and the code-checker complaints. Well - no big surprise here. I knew that and did it nevertheless. Now I have to rewrite. But do you do if you need them anyway? I need *lots* of them, so in despair I've just created this monster of unreadable code: int ArithmeticShiftRight (int value, unsigned int shift) { if (shift) { /* Get unsigned version of value to work with */ unsigned int x = (unsigned int) value; /* replicate the sign-bit of value into all bits of SignMask: */ unsigned int SignMask = ((unsigned int) -(value < 0)); /* assemble the arithmetic shift from two unsigned shifts. */ x = (x>>shift)|(SignMask<<(32-shift)); /* writeback result as signed integer */ value = (int) x; } return value; } I just had the urge to share this huge wtf code with you. It's horrible. It's unreadable, and all it does is doing a stupid shift. Has anyone here seen a C-compiler that does something different than arithmetic shifts on signed integers in the last 20 years? I've used a lot of compilers over the years, and they all shifted arithmetic. Nils On 2008-04-24, Nils <n.pipenbrinck@cubic.org> wrote: > I'm currently rewriting some numerical code for MISRA compliance. > > Signed shifts are not defined by the C-standard, and the code-checker > complain...

Regarding Left shift operator in embedded processor
Respected Experts, Iam RaviKumar.N, Iam using Intel-386EX embedded processor for one of my application also Iam using a cross compiler for the execution of my code. I have a query regarding left shift operator. Consider the following variables: 1) unsigned char a = 2; 2) unsigned char b = 3; 3) unsigned short c; Consider the following expression: c = (unsigned short)(( a << 8) | b); My query is: "Is it valid to shift a byte value by an 8-bit". I got this expression compiled,but Iam not sure about the results I got. Please let me know about this. With Regards Ravi Kumar.N On 12 Jan 2005 06:37:00 -0800, ravikumar.n@sunlux-india.com (Ravi kumar.N) wrote: > Consider the following variables: > 1) unsigned char a = 2; > 2) unsigned char b = 3; > 3) unsigned short c; > > Consider the following expression: > > c = (unsigned short)(( a << 8) | b); > > My query is: > "Is it valid to shift a byte value by an 8-bit". > > I got this expression compiled,but Iam not sure about the results I >got. consider this: unsigned char a, b; unsigned short c; a = 1; b = a << 8; c = a << 8; printf("b=%d, c=%d\n", b, c); theoretically we should get the answer: b=0, c=0 however... we get: b=0, c=256 we shou...

Detecting shift key with left mouse button
Is there any way in SCL to detect that the shift key was held down while the left mouse button was clicked on an object (e.g. a container box)? LMB (or Shift+LMB) is not something that can be set in a KEYS window because the left mouse button is reserved by SAS. So there doesn't seem to be a way to do this by defining a command in the KEYS entry. Any other way? ...

Re: Detecting shift key with left mouse button
You are right, that's not so easy. If you are running Windows, you can make a call to an external DLL to see if a shift button is pressed when a container box is selected, something like this in SCL: init: control label; return; container1: /* the container box code */ shift_pressed=(modulen('GetKeyState',16)<0); lmb_pressed=(modulen('GetKeyState',1)<0); return; The lmb_pressed variable will only be set when the mouse button is held down, not when it is released. But probably things will work well enough if you just look at the shift_pressed value, and possibly combine it with the SAS SCL function LASTKEY(), which should return zero (meaning that none of the definable keys/buttons were pressed). You will have to define the DLL module in a SASCBTBL fileref, which should contain something like this (and maybe other modules): routine GetKeyState minarg=1 maxarg=1 stackpop=called callseq=byvalue module=USER32 returns=short; arg 1 num format=ib4.; You can find documentation for the GetKeyState function at http://msdn.microsoft.com/en-us/library/ms646301(VS.85).aspx, and values for the various keys and buttons at http://msdn.microsoft.com/en-us/library/ms645540(VS.85).aspx Regards, Søren On Tue, 24 Feb 2009 13:51:56 -0500, Lorne Klassen <lk1@ROGERS.COM> wrote: >Is there any way in SCL to detect that the shift key was held down while >the left mouse button was clicked on an object (e.g. a container box)? > &...

no warning for assigning unsigned int to plain int
Consider the following program no_warning.c : #include <stdlib.h> #include <stdio.h> int main() { size_t length = 4294967295U; int size = 4294967295U; size = length; return EXIT_SUCCESS; } When I compile this program with gcc (GCC) 3.4.3 20050227 (Red Hat 3.4.3-22.1) as gcc -std=c99 -pedantic -Wall -Wextra no_warning.c it did not generate any warning. Consider the statements: int size = 4294967295U; size = length; In both these statements, I am assigning 'unsigned int' to 'plain int'. Still the compiler accepts them without issuing any warnings. I am unable to understand this. Please explain. Thanks V.Subramanian On 10/12/2011 10:36 AM, V.Subramanian, India wrote: > Consider the following program no_warning.c : > > #include <stdlib.h> > #include <stdio.h> > > int main() > { > size_t length = 4294967295U; > int size = 4294967295U; > > size = length; > > return EXIT_SUCCESS; > } > > When I compile this program with > gcc (GCC) 3.4.3 20050227 (Red Hat 3.4.3-22.1) > as > gcc -std=c99 -pedantic -Wall -Wextra no_warning.c > it did not generate any warning. 6.5.16.1p1 requires that: > One of the following shall hold:96) > � the left operand has qualified or unqualified arithmetic type and the right has arithmetic type; size_t and int are both arithmetic types, so that req...

shift regester
I want to use a shift register to incremnt a value by 0.5 every time through a for loop.&nbsp; However, I do not want the value on the shift regester to start at 0 I want it to start at a user defined value.&nbsp; How do I get it to start at a user defined value and then increment by 0.5 from there?&nbsp; I can do the incrementing part, just not the addition at the start.&nbsp; If there is a better way to do this than shift registers, I would be up for that as well. thanks Hi Musser, &nbsp; You can wire a constant or a control to the shift register from out side the loop to give it a predefined start value. Infact, you should always wire at least a constant otherwise the shift register may contain undesired value in the beginning. For example, if you run the loop for a second time, the previous end value will be still present at the shift register. If you do not clear it, that becomes the first value for the second loop and so on. &nbsp; Hope it helps, Deepu. &nbsp; ShiftRegister_Fix Start Value.JPG: http://forums.ni.com/attachments/ni/170/184754/1/ShiftRegister_Fix Start Value.JPG Hi, &nbsp; Alternatively, you may consider to use while-loop, which allows loop termination during increment. &nbsp; Note : Changing the User Define Value will restart the INCrement &nbsp; Regards ian &nbsp; IFK_EXEC_ForLoopINcByUserDefVal.vi: http://forums.ni.com/attachments/ni/170/184756/1/IFK_EXEC_ForLoopINcByUserDefVal.vi Hello Musser &amp;...

Help with shifting
I'm wondering why, and speculate from reading the HLA docu, that the reason I cannot obtain a positive number when using the twos complement in the following example is because of overflow: SHL(%0100_0000,var) = +64 * 2 = +128(overflow) or sustain a negative number in this example: SHL(%1000_0000,var) = -128 * 2 = -256(overflow) am i right? any help would be appreciated. ___________________ Im Happy Hacking encryption_x wrote: > I'm wondering why, and speculate from reading the HLA docu, that the > reason I cannot obtain a positive number when using the twos > complement in the following example is because of overflow: > > SHL(%0100_0000,var) = +64 * 2 = +128(overflow) > > or sustain a negative number in this example: > > SHL(%1000_0000,var) = -128 * 2 = -256(overflow) > > am i right? > > any help would be appreciated. shl 01000000b, 1 == 10000000b = -128, not positive 128 shl 10000000b, 1 == 00000000b = 0, not negative 256. Assuming you are using bytes and not words/dwords Percival "encryption_x" <spamtrap@crayne.org> wrote in message news:c010664f.0407301140.4b172c9e@posting.google.com... > I'm wondering why, and speculate from reading the HLA docu, that the > reason I cannot obtain a positive number when using the twos > complement in the following example is because of overflow: > > SHL(%0100_0000,var) = +64 * 2 = +128(overflow) > > or sustain a negative number in ...

unsigned int
I have mysql database for internal computer evidence and I store IP as unsigned numeric value. It is very good for computing network ranges and so on. But PHP do not support unsigned integer. So when I store values to doatabase, I must convert it to string with sprintf. When reading it, I get a string value with 10-digit number, bigger than maxint. I need to convert it to signed int and work with it as a number (for making binary arithmetics). I have discovered no way how to do it. Intval() or (int) type conversion returns maxint. Converting it in mysql is anoying too, because mysql cant do signed 32-bit int type conversion, only 64 bit. Marek Marek Simon wrote: > I have mysql database for internal computer evidence and I store IP as > unsigned numeric value. It is very good for computing network ranges and > so on. But PHP do not support unsigned integer. So when I store values > to doatabase, I must convert it to string with sprintf. When reading it, > I get a string value with 10-digit number, bigger than maxint. I need to > convert it to signed int and work with it as a number (for making binary > arithmetics). I have discovered no way how to do it. Intval() or (int) > type conversion returns maxint. Converting it in mysql is anoying too, > because mysql cant do signed 32-bit int type conversion, only 64 bit. > Marek I've just found something. intVal(floatVal($num)); Marek Marek Simon wrote: > I have mysql databa...

Shift-Doubleclick
Is it possible to reproduce the shift double click from software? Part of a program I am working on should send the file concerned to the current editor. This is easily done if it is a textfile and I use *Filer_Run. How can I do the same with /any/ file? Thanks for any answers Jochen -- ------------------------------------ If you want to learn about Limavady in Northern Ireland , why not try http://www.binevenagh.com for some local history and other news. On 13 Nov, in message <4dc92667ccjl@spamnet.co.uk> Jochen Lueg <jl@spamnet.co.uk> wrote: > Is it possible to reproduce the shift double click from software? Part > of a program I am working on should send the file concerned to the > current editor. This is easily done if it is a textfile and I use > *Filer_Run. > > How can I do the same with /any/ file? > > Thanks for any answers The usual trick for doing this is to send a a wimp message of type DataOpen (5), with the details in the message claiming a filetype of text regardless of what the real filetype is; REM allocate space DIM block% 255 REM calculate size of block needed. size%=44+4*(INT(LEN(file$)/4)) block%!0=size% REM Message type - DataOpen block%!16=5 REM Claimed filetype - may differ from real filetype block%!40=4095 REM Path to file $(block%+44)=file$ SYS "Wimp_SendMessage",17,block%,0 See the section on user messages in the stronghelp manuals As I understand it, this is essen...

shifting a bit
I have an integer, say 150 for example which is represented in binary as 10010110, I want to perform a circular left shift on the most significant bit "1" so that the result is 00101101 which is 45 in decimal. Is there a fast an efficient way to perform this task rather than converting to binary, shifting, then converting back to decimal? Hi Anthony, Look at this code In your case Value =150; Size = 8; NumShift = 1 Function CircularShiftLeft(Value As Integer, Size As Integer, NumShift As Integer) As Integer ' Value : Value to shift ' Size : Number of bits ' NumShift : Number of shifts CircularShiftLeft = ((Value * (2 ^ NumShift)) Mod (2 ^ Size)) + ((Value * (2 ^ NumShift)) \ (2 ^ Size)) End Function Gertjan "Antony Clements" wrote... >I have an integer, say 150 for example which is represented in binary as >10010110, I want to perform a circular left shift on the most significant >bit "1" so that the result is 00101101 which is 45 in decimal. Is there a >fast an efficient way to perform this task rather than converting to >binary, shifting, then converting back to decimal? > Antony Clements wrote: > I have an integer, say 150 for example which is represented in > binary as 10010110, I want to perform a circular left shift on the > most significant bit "1" so that the result is 00101101 which is 45 > in decimal. Is there a fast an efficient way to perform thi...

Shift Register
Hello &nbsp; Today I tried to insert a kind of shift register into my SpeedAngle.Vi I&nbsp;am going to calculate the&nbsp;acceleration of the&nbsp;wheel and gear as well. &nbsp; I want to use the simple function to calculate the acceleration. &nbsp; a= &nbsp; Please refer to this thread for description and sample vi's <a href="http://forums.ni.com/ni/board/message?board.id=170&amp;message.id=150903" target="_blank">http://forums.ni.com/ni/board/message?board.id=170&amp;message.id=150903</a> ...

More about C and C++
Hello, I have wrote: >I will resume it like this: >On the criterias of "complexity" and "difficulty", the C and C++ >programming languages are more complex and difficult than Object >Pascal for example, so since they are more complex and difficult they >are likely to create something like a darwinian filter who don't let >the weaker humans among us humans to cross or to climb the social >ladder, this is why i think that C and C++ do participate to social >darwinism, this is why i say that C and C++ are bad. Joseph Mitzen repsonded: >Something may be more complex or more difficult to learn but it may >bring more capabilities. For instance, a helicopter is both >mechanically more complex and more difficult to learn to fly than an >airplane. However, helicopters possess vertical takeoff and landing >which allow it to reach places planes can not and also gives it >special abilities, such as hovering. >Two important measurements then are the value (what one gains for the >complexity) and what one needs to do (is language X enough for the >task, will feature Y be used, etc.). >Otherwise, one could simply say "Delphi is more complex and difficult >than Ruby or Python, therefore Delphi is bad." It's not only >simplistic, it's also meaningless (bad at what?). I understand your example of hellicopter, you are s...

SHIFT Is Unchangeable
I learn that Intel is not willing to fix SHIFT problem on Pentium 4 since 486DX through Pentium 3 are doing fine. Do you complain that SHIFT wants to steal 4-6 cycles on Pentium 4? Intel must have reasons to leave SHIFT unchangeable because they think best to do with their budget. It is really nonsense. Do you wish to wait until year 2007 before Pentium 4 will become available at 20GHz? Would you be satisifed that SHIFT's 4-6 cycles remain unchangeable on 20GHz? If Intel changes their mind and fix SHIFT that should cost only one cycle instead of 4-6 cycles on 20GHz. It would be over 100-1000 times faster like RISC's SHIFT. I want to show you C++ example by using SHIFT and pointer. If SHIFT is used before C++ is compiled into machine language. It will run faster on Pentium 3, but it will run slower on Pentium 4. It is very annoying that I have to modify C++ code in order to run faster on Pentium 4 than Pentium 3. It does not do good. I try to tell C/C++ programmers to avoid SHIFT and use pointer instead. I create one 32 Bits variable and four pointer variables. Four pointer variables link or point to one 32 Bits variable. Each pointer variable is 8 Bits. In fact is that only ONE variable is created. Pointer is not REALLY variable. Look at my example below. unsigned int AA = 0; unsigned char* const AA_Byte1 = (unsigned char*)&AA; unsigned char* const AA_Byte2 = (unsigned char*)&AA + 1; unsigned char* const AA_Byte3 ...

Shifting the printout precisely
How can I shift (vertically and horizontally) the printed contents in the precise way - I mean, in the 1/100 mm steps or something like this (even 1/20 mm will do)? Perhaps somebody could give me an example, what (and at which place - I'm quite new... ;) should I write directly to ps-file, to shift the contents 23/100 mm right and 31/100 mm down (or something similar)? What if I'll need to make opposite - shift it up-left? -- Marek In article <cfmfau$f20$1@nemesis.news.tpi.pl>, Marek N. <mark_n@false_address.pl> wrote: > >How can I shift (vertically and horizontally) the printed contents in the >precise way - I mean, in the 1/100 mm steps or something like this (even >1/20 mm will do)? I usually use /PageOffset to setpagedevice, or translate. I don't know what the recommended way is, though. >Perhaps somebody could give me an example, what (and at which place - I'm >quite new... ;) should I write directly to ps-file, to shift the contents >23/100 mm right and 31/100 mm down (or something similar)? What if I'll need >to make opposite - shift it up-left? It depends. Putting two small numbers, positive or negative, before "translate" before the drawing starts would be a good first thing to try. -- Mark On 2004-08-15, Mark Carroll <markc@chiark.greenend.org.uk> wrote: > It depends. Putting two small numbers, positive or negative, before > "translate" before the drawing starts would b...

Left and Right arrows
Hi, In recently recieved some excellent advice which ebnabled me to make a form behave as a spreadsheet with respect to the down and up arrow keys. To develop this further I would like the right and left arrow to move to the next or previous tab control. DoCmd.GotoRecord,,AcNext does the business for down, but nowhere can I find a 'docmd go to next tab' or words to that effect!!! Any ideas? Hum, I assume when you say "tab", you are talking about a tab control? I would not take away the left/right arrow keys...as then how can a user edit data in a field? They need the arrow keys to move within that field. If the whole field is highlighted when the cursor enters..then you can normally use the left/right arrows to move to the next/previously control (is this what you are asking for now???). However, if a users is actually typing/editing data in a control..then they need the left right arrow keys for editing. I don't think it is a very good idea to steal those keys, as then how can a user edit text in a field? You can usually hit ctrl-TAB to jump to the next tab. Also, perhaps ctrl-right arrow, and ctrl-left arrow might be a possible keys to use..but I can't see stealing the left/right arrow keys. To steal the ctrl-right/ and left key, you can add the following code to your keydown handler: Dim intTabCount As Integer Const TabMax As Integer = 1 ' max number of tabs (less 1, since this is zero...

convention for left right
when writing/defining such function which one form is better? ReadLine(line, file); ReadLine(file, line); ? (this function reads a line from file, line is char*) ...

Right-to-left languages?
Hi all, Can anyone please report the status of rendering of right-to-left languages in tk? I develop an LGPL NLP-related application (http://www.ellogon.org) and recently I got a question about supporting the Hebrew language. I need information on how the text widget can render these kind of languages and possible tkhtml. I feel a little akward for asking such a question :-) but I have no experence with right-to-left languages... Regards, George Hi Georgios, "Georgios Petasis" <petasis@iit.demokritos.gr> writes: > Can anyone please report the status of rendering of right-to-left > languages in tk? I develop an LGPL NLP-related application > (http://www.ellogon.org) and recently I got a question about > supporting the Hebrew language. Bidi is not supported on Tk yet. "Not supported" has different consequences depending on the widget and the underlying platform toolkit. For read-only widgets there are platform specific work-arounds and on some native controls (like menus on Windows and Mac OS X) it just works automatically. You may want to look into gnocl, the Tcl binding for the Gnome toolkit. Gnome is supposed to support bidi fine. I have never tried it myself though. benny Georgios Petasis wrote: > > Hi all, > > Can anyone please report the status of rendering of right-to-left > languages in tk? I develop an LGPL NLP-related application > (http://www.ellogon.org) and recently I got a question about s...

shifting a 1D array
Is there a function that works exactly like the "Rotate 1D Array" function (can do both right and left shift directions), but simply places a zero value in place of new data?&nbsp; It's ok to lose the data that gets shifted out. &nbsp; Thanks, Anthony ...

Pitch Shift Controller
Hello I'm a university student and am completely new to the DSP world, but a attempting to do my final year project. What I'm trying to do is to use a a guitar as a controller to pitch shif a pre-recorded sequence to match the fundamental frequency of the guita note being played. (in as much real time as possible (not fussed abou quality so much!)) I was wandering if this was possible because i cant seem to find code fo that can vary the amount of pitch without being pre-designated any suggestions would be awesome thankyou On Jan 30, 12:29 pm, "blurghman" <blurgh...@yahoo.co.uk> wrote: > > I'm a university student and am completely new to the DSP world, but am > attempting to do my final year project. > > What I'm trying to do is to use a a guitar as a controller to pitch shift > a pre-recorded sequence to match the fundamental frequency of the guitar > note being played. (in as much real time as possible (not fussed about > quality so much!)) > > I was wandering if this was possible because i cant seem to find code for > that can vary the amount of pitch without being pre-designated it's possible and difficult. you need a good pitch detector (actually two of them in your case) besides the pitch-shifter (a resampler with splicing). i am assuming your "pre-recorded sequence" is a recording of a bunch of monophonic instrument notes. unless your very bright and fast, i see this as much bigg...

Web resources about - left shift then right shift an unsigned int - comp.lang.c++

Unsigned highway - Wikipedia, the free encyclopedia
An unsigned highway is a highway that has been assigned a route number, but does not bear road markings that would conventionally be used to ...

soundhax : getting unsigned code execution through sound (DS) - YouTube
http://twitter.com/smealum this is a short and super crappy quality video showing off an exploit being delivered through audio (!) on the DS. ...

AFP raid: Schapelle Corby document was 'unsigned draft' only, says Seven boss
Channel Seven boss Tim Worner has rejected reports that an Australian Federal Police (AFP) raid turned up a document detailing an exclusive deal ...

How Alex Day Became The Biggest Unsigned Singer In The World, Without Touring
... loads of success through his YouTube channel, the U.K. native holds the Guinness World Record for the highest-charting single by an unsigned ...

NRL: Best 16 players unsigned for 2016 season - Rugby League, NRL Scores, NRL Ladder - Fox Sports
WHILE the bulk of players relax in the sun, enjoying a well deserved break from the game &#8212; it&#8217;s a nervous time for a handful of players ...

Unsigned Creagh: 'I don't want to leave the Dragons'
Ben Creagh is one of a host of NRL captains still unsigned for 2014, but the St George Illawarra skipper is more interested in putting a spark ...

James Packer letter of credit for $10m 'was unsigned'
James Packer letter of credit for $10m 'was unsigned'

The NRL's unsigned All Stars
More than 150 NRL stars are on the market for next season, here's a 17-man squad which would be a strong line-up in 2016.

New iOS security exploit lets apps read users’ information by executing unsigned code
Security expert Charlie Miller has found a flaw in code signing on iOS devices (via Forbes) that allows developers to sneak malware apps onto ...

Donation checks go unsigned in protest over campus sexual assault
Some former students withhold donations as a way of sending a message about campus sexual assault policies

Resources last updated: 3/30/2016 11:40:42 AM