Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. How to implement jquery function in vb.net 2010?

How to implement jquery function in vb.net 2010?

Scheduled Pinned Locked Moved Visual Basic
csharpjavascriptphpdata-structures
12 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Dave Kreskowiak

    QuickBooksDev wrote:

    How do you implement a jquery function in vb.net 2010?

    With extreme difficulty. Deserialize it from what format? JSON? XML? What?

    A guide to posting questions on CodeProject

    Click this: Asking questions is a skill. Seriously, do it.
    Dave Kreskowiak

    Q Offline
    Q Offline
    QuickBooksDev
    wrote on last edited by
    #3

    from a php named array string which looks like this: a:2:{s:3:"foo";s:3:"bar";s:3:"bar";s:3:"foo";} Is there a good way of handling this?

    D 1 Reply Last reply
    0
    • Q QuickBooksDev

      from a php named array string which looks like this: a:2:{s:3:"foo";s:3:"bar";s:3:"bar";s:3:"foo";} Is there a good way of handling this?

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #4

      That appears to be JSON, but looks malformed. You can try the stuff found in these[^].

      A guide to posting questions on CodeProject

      Click this: Asking questions is a skill. Seriously, do it.
      Dave Kreskowiak

      Q 1 Reply Last reply
      0
      • D Dave Kreskowiak

        That appears to be JSON, but looks malformed. You can try the stuff found in these[^].

        A guide to posting questions on CodeProject

        Click this: Asking questions is a skill. Seriously, do it.
        Dave Kreskowiak

        Q Offline
        Q Offline
        QuickBooksDev
        wrote on last edited by
        #5

        I am not sure if it is JSON. It is coming from a blob field in a database. What I sent was only an example of a php named array which is what I think it is. Here is the actual text that was sent to me (some text has been changed). It comes from the HikaShop shipping_parms field in the shipping table. o:8:"stdClass":36:{s:19:"shipping_percentage";s:1:"0";s:20:"shipping_per_product";s:1:"0";s:26:"shipping_price_per_product";s:0:"";s:25:"shipping_override_address";s:1:"0";s:30:"shipping_override_address_text";s:0:"";s:11:"access_code";s:17:" 8CDDA11596V5822B1";s:7:"user_id";s:10:"test012345";s:8:"password";s:8:"Aec3fX13";s:14:"shipper_number";s:6:"1X2167";s:11:"pickup_type";s:2:"01";s:16:"destination_type";s:4:"auto";s:15:"negotiated_rate";s:1:"0";s:13:"group_package";s:1:"1";s:13:"include_price";s:1:"1";s:18:"exclude_dimensions";s:1:"0";s:20:"weight_approximation";s:1:"5";s:17:"dim_approximation";s:0:"";s:25:"shipping_warehouse_filter";s:0:"";s:18:"shipping_min_price";s:1:"0";s:18:"shipping_max_price";s:1:"0";s:25:"shipping_virtual_included";s:1:"1";s:22:"shipping_price_use_tax";s:1:"1";s:21:"shipping_min_quantity";s:0:"";s:21:"shipping_max_quantity";s:0:"";s:19:"shipping_min_weight";s:1:"0";s:20:"shipping_weight_unit";s:1:"g";s:19:"shipping_max_weight";s:1:"0";s:19:"shipping_min_volume";s:1:"0";s:18:"shipping_size_unit";s:2:"in";s:19:"shipping_max_volume";s:1:"0";s:19:"shipping_zip_prefix";s:0:"";s:16:"shipping_min_zip";s:0:"";s:16:"shipping_max_zip";s:0:"";s:19:"shipping_zip_suffix";s:0:"";s:11:"methodsList";s:132:"a:4:{s:16:"ups_next_day_air";s:2:"01";s:18:"ups_second_day_air";s:2:"02";s:10:"ups_ground";s:2:"03";s:14:"ups_express_ca";s:2:"01";}";s:14:"warehousesList";s:275:"a:1:{i:0;O:8:"stdClass":8:{s:4:"name";s:7:"Vermont";s:3:"zip";s:5:"41234";s:4:"city";s:6:"Putney";s:7:"country";s:3:"223";s:4:"zone";s:36:"country_United_States_of_America_223";s:9:"zone_name";s:28:"223 United States of America";s:5:"units";s:2:"lb";s:8:"currency";s:1:"2";}}";}

        D 1 Reply Last reply
        0
        • Q QuickBooksDev

          I am not sure if it is JSON. It is coming from a blob field in a database. What I sent was only an example of a php named array which is what I think it is. Here is the actual text that was sent to me (some text has been changed). It comes from the HikaShop shipping_parms field in the shipping table. o:8:"stdClass":36:{s:19:"shipping_percentage";s:1:"0";s:20:"shipping_per_product";s:1:"0";s:26:"shipping_price_per_product";s:0:"";s:25:"shipping_override_address";s:1:"0";s:30:"shipping_override_address_text";s:0:"";s:11:"access_code";s:17:" 8CDDA11596V5822B1";s:7:"user_id";s:10:"test012345";s:8:"password";s:8:"Aec3fX13";s:14:"shipper_number";s:6:"1X2167";s:11:"pickup_type";s:2:"01";s:16:"destination_type";s:4:"auto";s:15:"negotiated_rate";s:1:"0";s:13:"group_package";s:1:"1";s:13:"include_price";s:1:"1";s:18:"exclude_dimensions";s:1:"0";s:20:"weight_approximation";s:1:"5";s:17:"dim_approximation";s:0:"";s:25:"shipping_warehouse_filter";s:0:"";s:18:"shipping_min_price";s:1:"0";s:18:"shipping_max_price";s:1:"0";s:25:"shipping_virtual_included";s:1:"1";s:22:"shipping_price_use_tax";s:1:"1";s:21:"shipping_min_quantity";s:0:"";s:21:"shipping_max_quantity";s:0:"";s:19:"shipping_min_weight";s:1:"0";s:20:"shipping_weight_unit";s:1:"g";s:19:"shipping_max_weight";s:1:"0";s:19:"shipping_min_volume";s:1:"0";s:18:"shipping_size_unit";s:2:"in";s:19:"shipping_max_volume";s:1:"0";s:19:"shipping_zip_prefix";s:0:"";s:16:"shipping_min_zip";s:0:"";s:16:"shipping_max_zip";s:0:"";s:19:"shipping_zip_suffix";s:0:"";s:11:"methodsList";s:132:"a:4:{s:16:"ups_next_day_air";s:2:"01";s:18:"ups_second_day_air";s:2:"02";s:10:"ups_ground";s:2:"03";s:14:"ups_express_ca";s:2:"01";}";s:14:"warehousesList";s:275:"a:1:{i:0;O:8:"stdClass":8:{s:4:"name";s:7:"Vermont";s:3:"zip";s:5:"41234";s:4:"city";s:6:"Putney";s:7:"country";s:3:"223";s:4:"zone";s:36:"country_United_States_of_America_223";s:9:"zone_name";s:28:"223 United States of America";s:5:"units";s:2:"lb";s:8:"currency";s:1:"2";}}";}

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #6

          OK, after looking at that bigger example, that's not JSON. I don't know of a library that handles serialization of PHP objects. But, there is this[^]. You can create a PHP project in your solution that handles serialization and deserialization, creating the objects for you. You can NOT just use an external PHP app because the objects that it creates will not be visible to your .NET code.

          A guide to posting questions on CodeProject

          Click this: Asking questions is a skill. Seriously, do it.
          Dave Kreskowiak

          Q 1 Reply Last reply
          0
          • Q QuickBooksDev

            Hi I need to serialize a php named array in vb.net 2010 (Desktop app). I believe that the only easy way might be with jquery. How do you implement a jquery function in vb.net 2010? If there is an easier way to covert the php named array string to a .net supported object i.e. array, dictionary or collection, etc. PLEASE LET ME KNOW.

            Richard DeemingR Offline
            Richard DeemingR Offline
            Richard Deeming
            wrote on last edited by
            #7

            This might help:

            http://sourceforge.net/projects/csphpserial/[^]

            Sharp Serialization Library serializes and deserializes primitives, ArrayLists and Hashtables, compatible with PHP serialize().


            "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

            "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

            Q 1 Reply Last reply
            0
            • Richard DeemingR Richard Deeming

              This might help:

              http://sourceforge.net/projects/csphpserial/[^]

              Sharp Serialization Library serializes and deserializes primitives, ArrayLists and Hashtables, compatible with PHP serialize().


              "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

              Q Offline
              Q Offline
              QuickBooksDev
              wrote on last edited by
              #8

              Sharp Serialization Library did not work. Failed in their test project on Hashtable htFile = (Hashtable)this.serializer.Deserialize(stSerial); Unable to cast object of type 'System.String' to type 'System.Collections.Hashtable'. I just clicked on open. Browsed to my file with the data and that was it.

              1 Reply Last reply
              0
              • D Dave Kreskowiak

                OK, after looking at that bigger example, that's not JSON. I don't know of a library that handles serialization of PHP objects. But, there is this[^]. You can create a PHP project in your solution that handles serialization and deserialization, creating the objects for you. You can NOT just use an external PHP app because the objects that it creates will not be visible to your .NET code.

                A guide to posting questions on CodeProject

                Click this: Asking questions is a skill. Seriously, do it.
                Dave Kreskowiak

                Q Offline
                Q Offline
                QuickBooksDev
                wrote on last edited by
                #9

                The web doc for Phalanger seems a bit complex. What I need is SomeVar = ToClass.ToFunction(BlobString) Plalanger goes into web pages, complex class functions and cannot see how. Perhaps the simple calculates factorial example technique with php Function ToFunction($str) { $ar = unserialize($str); return serialize($array); } VB Dim Ojb as object = ToClass.ToFunction(MyBlobString) would work???

                D 1 Reply Last reply
                0
                • Q QuickBooksDev

                  The web doc for Phalanger seems a bit complex. What I need is SomeVar = ToClass.ToFunction(BlobString) Plalanger goes into web pages, complex class functions and cannot see how. Perhaps the simple calculates factorial example technique with php Function ToFunction($str) { $ar = unserialize($str); return serialize($array); } VB Dim Ojb as object = ToClass.ToFunction(MyBlobString) would work???

                  D Offline
                  D Offline
                  Dave Kreskowiak
                  wrote on last edited by
                  #10

                  You can't do that. At. All. You cannot combine two different languages in the same code file. You can't even use two different languages in the same Project! The PHP and Managed code execute in completely separate execution environments that don't even know about each other. So, the objects you create in one are not visible in the other. Your only nice solution is to create a seperate PHP project (essentially PHP.NET) that handles serialization and reference it in the VB.NET code.

                  A guide to posting questions on CodeProject

                  Click this: Asking questions is a skill. Seriously, do it.
                  Dave Kreskowiak

                  Q 1 Reply Last reply
                  0
                  • D Dave Kreskowiak

                    You can't do that. At. All. You cannot combine two different languages in the same code file. You can't even use two different languages in the same Project! The PHP and Managed code execute in completely separate execution environments that don't even know about each other. So, the objects you create in one are not visible in the other. Your only nice solution is to create a seperate PHP project (essentially PHP.NET) that handles serialization and reference it in the VB.NET code.

                    A guide to posting questions on CodeProject

                    Click this: Asking questions is a skill. Seriously, do it.
                    Dave Kreskowiak

                    Q Offline
                    Q Offline
                    QuickBooksDev
                    wrote on last edited by
                    #11

                    If separate programs are created then I am back to a php program creating a file that VB.Net needs to read and Deserialize into some table. So what good is that except possible to make the external interface file being more 'friendly' i.e. Key,Value instead of all the types, length, etc. And this may not work for embedded structions which I believe this blob has. Since each record that I read would need to do the same thing it doesn't even seem to be very practical.

                    D 1 Reply Last reply
                    0
                    • Q QuickBooksDev

                      If separate programs are created then I am back to a php program creating a file that VB.Net needs to read and Deserialize into some table. So what good is that except possible to make the external interface file being more 'friendly' i.e. Key,Value instead of all the types, length, etc. And this may not work for embedded structions which I believe this blob has. Since each record that I read would need to do the same thing it doesn't even seem to be very practical.

                      D Offline
                      D Offline
                      Dave Kreskowiak
                      wrote on last edited by
                      #12

                      QuickBooksDev wrote:

                      If separate programs are created

                      A seperate project in the same solution is compiled to a library .DLL, not a seperate .EXE. It's not different than if you added a C# Class Library project to your Solution.

                      A guide to posting questions on CodeProject

                      Click this: Asking questions is a skill. Seriously, do it.
                      Dave Kreskowiak

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups