Click here to Skip to main content
16,011,743 members
Home / Discussions / JavaScript
   

JavaScript

 
AnswerRe: How do I hide a column using JQuery? Pin
Dennis E White8-May-13 4:37
professionalDennis E White8-May-13 4:37 
GeneralRe: How do I hide a column using JQuery? Pin
Jasmine25018-May-13 7:50
Jasmine25018-May-13 7:50 
GeneralRe: How do I hide a column using JQuery? Pin
AspDotNetDev8-May-13 8:17
protectorAspDotNetDev8-May-13 8:17 
GeneralRe: How do I hide a column using JQuery? Pin
Jasmine25018-May-13 8:42
Jasmine25018-May-13 8:42 
GeneralRe: How do I hide a column using JQuery? Pin
Ilan Firsov8-May-13 19:51
Ilan Firsov8-May-13 19:51 
QuestionHTML Table to Export To Excel Pin
shreeniwas kushwah6-May-13 20:06
shreeniwas kushwah6-May-13 20:06 
AnswerRe: HTML Table to Export To Excel Pin
Dennis E White7-May-13 5:18
professionalDennis E White7-May-13 5:18 
QuestionCode translate from AS to Delphi Pin
isaev.mail6-May-13 0:28
isaev.mail6-May-13 0:28 
I have function readInt() this need a protocol-buffers[^] library and makes the following:
C#
override public function readInt() : int
{
   return decodeZigZag32(this.readRawVarint32());
}

I must translate the function in delphi.
description:
decodeZigZag32(int n)[^]
readRawVarint32()[^]

javacode:
C#
public int readRawVarint32() throws IOException {
    byte tmp = readRawByte();
    if (tmp >= 0) {
      return tmp;
    }
    int result = tmp & 0x7f;
    if ((tmp = readRawByte()) >= 0) {
      result |= tmp << 7;
    } else {
      result |= (tmp & 0x7f) << 7;
      if ((tmp = readRawByte()) >= 0) {
        result |= tmp << 14;
      } else {
        result |= (tmp & 0x7f) << 14;
        if ((tmp = readRawByte()) >= 0) {
          result |= tmp << 21;
        } else {
          result |= (tmp & 0x7f) << 21;
          result |= (tmp = readRawByte()) << 28;
          if (tmp < 0) {
            // Discard upper 32 bits.
            for (int i = 0; i < 5; i++) {
              if (readRawByte() >= 0) {
                return result;
              }
            }
            throw InvalidProtocolBufferException.malformedVarint();
          }
        }
      }
    }
    return result;
  }


ActionScript code:
C#
public function readRawVarint32() : int
    {
      var _loc_3:int = 0;
      var _loc_1:* = this.readByte();
      if (_loc_1 >= 0)
      {
        return _loc_1;
      }
      var _loc_2:* = _loc_1 & 127;
      var _loc_4:* = this.readByte();
      _loc_1 = this.readByte();
      if (_loc_4 >= 0)
      {
        _loc_2 = _loc_2 | _loc_1 << 7;
      }
      else
      {
          _loc_2 = _loc_2 | (_loc_1 & 127) << 7;
          var _loc_4:* = this.readByte();
          _loc_1 = this.readByte();
          if (_loc_4 >= 0)
          {
              _loc_2 = _loc_2 | _loc_1 << 14;
          }
          else
          {
              _loc_2 = _loc_2 | (_loc_1 & 127) << 14;
              var _loc_4:* = this.readByte();
              _loc_1 = this.readByte();
              if (_loc_4 >= 0)
              {
                  _loc_2 = _loc_2 | _loc_1 << 21;
              }
              else
              {
                  _loc_2 = _loc_2 | (_loc_1 & 127) << 21;
                  var _loc_4:* = this.readByte();
                  _loc_1 = this.readByte();
                  _loc_2 = _loc_2 | _loc_4 << 28;
                  if (_loc_1 < 0)
                  {
                      _loc_3 = 0;
                      while (_loc_3 < 5)
                      {
                         if (this.readByte() >= 0)
                         {
                             return _loc_2;
                         }
                         _loc_3++;
                      }
                      throw new IllegalArgumentException();
                  }
              }
          }
      }
      return _loc_2;
    }// end function


are they identical?

C#
public static function decodeZigZag32(param1:int) : int
{  return param1 >>> 1 ^ -(param1 & 1);
}


who can help me?
AnswerRe: Code translate from AS to Delphi Pin
isaev.mail12-May-13 21:12
isaev.mail12-May-13 21:12 
QuestionUsing this.id Pin
ASPnoob5-May-13 7:40
ASPnoob5-May-13 7:40 
AnswerRe: Using this.id Pin
twseitex5-May-13 7:49
twseitex5-May-13 7:49 
GeneralRe: Using this.id Pin
ASPnoob5-May-13 8:01
ASPnoob5-May-13 8:01 
AnswerRe: Using this.id Pin
dusty_dex6-May-13 8:26
dusty_dex6-May-13 8:26 
QuestionSend data with XMLHttpRequest Pin
Mohammad Hussein Fakhravari3-May-13 22:40
Mohammad Hussein Fakhravari3-May-13 22:40 
QuestionRe: Send data with XMLHttpRequest Pin
Sandeep Mewara4-May-13 0:50
mveSandeep Mewara4-May-13 0:50 
AnswerRe: Send data with XMLHttpRequest Pin
Mohammad Hussein Fakhravari4-May-13 11:08
Mohammad Hussein Fakhravari4-May-13 11:08 
NewsForm builder using jQueryUI and Bootstrap Pin
Anup Shinde3-May-13 2:10
Anup Shinde3-May-13 2:10 
GeneralRe: Form builder using jQueryUI and Bootstrap Pin
dusty_dex3-May-13 4:56
dusty_dex3-May-13 4:56 
GeneralRe: Form builder using jQueryUI and Bootstrap Pin
Anup Shinde3-May-13 5:05
Anup Shinde3-May-13 5:05 
GeneralRe: Form builder using jQueryUI and Bootstrap Pin
Anup Shinde3-May-13 5:06
Anup Shinde3-May-13 5:06 
GeneralRe: Form builder using jQueryUI and Bootstrap Pin
Dennis E White3-May-13 5:59
professionalDennis E White3-May-13 5:59 
Questionloading image before loading video on page Pin
meena mehra30-Apr-13 2:17
meena mehra30-Apr-13 2:17 
AnswerRe: loading image before loading video on page Pin
twseitex5-May-13 7:59
twseitex5-May-13 7:59 
QuestionI cant download the source code in the following projet Pin
Baturay E.H.AHMAD27-Apr-13 9:17
Baturay E.H.AHMAD27-Apr-13 9:17 
AnswerRe: I cant download the source code in the following projet Pin
NotPolitcallyCorrect27-Apr-13 12:03
NotPolitcallyCorrect27-Apr-13 12:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.