Search Results

Search found 30326 results on 1214 pages for 'html encode'.

Page 90/1214 | < Previous Page | 86 87 88 89 90 91 92 93 94 95 96 97  | Next Page >

  • Base64 Encode String in VBScript

    - by Patrick Cuff
    I have a web service load driver that's a Windows Script File (WSF), that includes some VBScript and JavaScript files. My web service requires that the incoming message is base64 encoded. I currently have a VBScript function that does this, but it's very inefficient (memory intensive, mostly due to VBScripts awful string concatenation) [Aside; Yes, I've seen Jeff's latest blog post. The concatenation is happening in a loop across messages that are 1,000's to 10,000's bytes in size.] I've tried using some custom string concatenation routines; one using an array and one using ADODB.Stream. These help, a little, but I think it would help more if I had some other way of encoding the message rather than via my own VBS function. Is there some other way of encoding my message, preferebly using native Windows methods?

    Read the article

  • HTML - Correct way of coding a checkbox with a Label.

    - by egarcia
    I've been using formtastic in order to generate HTML forms on rails applications. My question, however, is really HTML-related. Today I found a strange behaviour on the way formtastic generates checkboxes (fields of type :boolean on formtastic lingo). The rest of the fields (non-checkboxes) are generated this way: <li> <label for="my_textbox_field">My TextBox</label> <input id="my_textbox_field" type="text" ... > </li> Checkboxes, however, are enclosed inside their <label> tags completely - like this: <li> <label for="my_boolean_field"> <input id="my_boolean_field" type="checkbox" ... > This is my boolean field </label> </li> Formtastic phylosophy seems to be based on the Learning to Love Forms presentation. In effect, on slide 36 of that presentation this structure is suggested for checkboxes. I guess in the presentation itself the presenter explained why this was done, but it is not written on the slides. Can anyone tell me why enclosing checkboxes inside their <label> tag might be a good idea, as opposed to putting them outside, like with textboxes?

    Read the article

  • How to select form input based on label inner HTML?

    - by Shane
    I have multiple forms that are dynamically created with different input names and id's. The only thing unique they will have is the inner HTML of the label. Is it possible to select the input via the label inner HTML with jQuery? Here is an example of one of my patient date of birth blocks, there are many and all unique except for innerHTML. <div class="iphorm-element-spacer iphorm-element-spacer-text iphorm_1_8-element-spacer"> <label for="iphorm_081a9e2e6b9c83d70496906bb4671904150cf4b43c0cb1_8">events=Object { mouseover=[1], mouseout=[1]}handle=function()data=Object { InFieldLabels={...}} Patient DOB <span class="iphorm-required">*</span> </label> <div class="iphorm-input-wrap iphorm-input-wrap-text iphorm_1_8-input-wrap"> <input id="iphorm_081a9e2e6b9c83d70496906bb4671904150cf4b43c0cb1_8" class="iphorm-element-text iphorm_1_8" type="text" value="" name="iphorm_1_8">events=Object { focus=[1], blur=[1], keydown=[1], more...}handle=function() </div> <div class="iphorm-errors-wrap iphorm-hidden"> </div> This is in a Wordpress Plugin and because we are building to allow employees to edit their sites (this is actually a Wordpress Network), we do not want to alter the plugin if possible. Note that the label "for" and the input "id" share the same dynamic key, so this might be a way to maybe get the id, but wanted to see if there is a shorter way of doing this.

    Read the article

  • jQuery JSON encode set of input values

    - by gurun8
    I need tp serialize a group of input elements but I can't for the life of me figure out this simple task. I can successfully iterate through the targeted inputs using: $("#tr_Features :input").each(function() { ... } Here's my code, that doesn't work: var features = new Array(); $("#tr_Features :input").each(function() { features += {$(this).attr("name"): $(this).val()}; } Serializing the entire form won't give me what I need. The form has much more than this subset of inputs. This seems like it should be a pretty straightforward task but apparently programming late into a Friday afternoon isn't a good thing. If it's helpful, here's the form inputs I'm targeting: <table cellspacing="0" border="0" id="TblGrid_list" class="EditTable" cellpading="0"> <tbody><tr id="tr_Features" class="FormData" rowpos="1"> <td class="CaptionTD ui-widget-content">Cable Family</td> <td id="td_Features" class="DataTD ui-widget-content" style="white-space: pre;">&nbsp;<input type="text" value="" id="feature_id:8" name="feature_id:8"></td> </tr> <tr id="tr_Features" class="FormData" rowpos="1"> <td class="CaptionTD ui-widget-content">Material</td> <td id="td_Features" class="DataTD ui-widget-content" style="white-space: pre;">&nbsp;<input type="text" value="" id="feature_id:9" name="feature_id:9"></td> </tr> <tr id="tr_Features" class="FormData" rowpos="1"> <td class="CaptionTD ui-widget-content">Thread Size</td> <td id="td_Features" class="DataTD ui-widget-content" style="white-space: pre;">&nbsp;<input type="text" value="" id="feature_id:10" name="feature_id:10"></td> </tr> <tr id="tr_Features" class="FormData" rowpos="1"> <td class="CaptionTD ui-widget-content">Attachment Style</td> <td id="td_Features" class="DataTD ui-widget-content" style="white-space: pre;">&nbsp;<input type="text" value="" id="feature_id:11" name="feature_id:11"></td> </tr> <tr id="tr_Features" class="FormData" rowpos="1"> <td class="CaptionTD ui-widget-content">Feature</td> <td id="td_Features" class="DataTD ui-widget-content" style="white-space: pre;">&nbsp;<input type="text" value="" id="feature_id:12" name="feature_id:12"></td> </tr> <tr id="tr_Features" class="FormData" rowpos="1"> <td class="CaptionTD ui-widget-content">Comments</td> <td id="td_Features" class="DataTD ui-widget-content" style="white-space: pre;">&nbsp;<input type="text" value="" id="feature_id:13" name="feature_id:13"></td> </tr> </tbody></table>

    Read the article

  • location of index.html CentOS 6

    - by user2118559
    Based on this http://www.servermom.com/how-to-add-new-site-into-your-apache-based-centos-server/454/ tutorial installed Apache-based CentOS Server I use putty.exe as editor vi /etc/httpd/conf/httpd.conf at very bottom modified to <VirtualHost *:80> ServerAdmin [email protected] DocumentRoot /var/www/fikitipis.com/public_html ServerName www.fikitipis.com ServerAlias fikitipis.com ErrorLog /var/www/fikitipis.com/error.log CustomLog /var/www/fikitipis.com/requests.log common </VirtualHost> So expect that index is at /var/www/fikitipis.com/public_html When in browser type ip address of server, see Apache 2 Test Page powered by CentOS and so on You may now add content to the directory /var/www/html/ Then [root@vps ~]# ls /var/www/ see cgi-bin domain.com error fikitipis.com html icons Checking content of directories ls /var/www/domain.com/public_html, ls /var/www/fikitipis.com/public_html, /var/www/html/ are empty Where is index.html? Did touch /var/www/fikitipis.com/public_html/index1.html then vi /var/www/fikitipis.com/public_html/index1.html, typed a, then wrote some text in file, then Escape and shift+zz. And in browser http://111.111.11.111/index1.html and see what I had wrote. So until now seems that all works

    Read the article

  • XmlSlurper/NekoHTML document fragment parsing - No HTML or BODY tags wanted

    - by Misha Koshelev
    Dear All, I am trying to parse the following HTML fragment, and I would like to get the same fragment as output (without HTML and BODY tags). Is this possible? If so, how? Thank you Misha p.s. I am reading here: http://nekohtml.sourceforge.net/faq.html#fragments and I believe I have added the correct options below. However, the output is still incorrect :( Thank you Misha import groovy.xml.MarkupBuilder import groovy.xml.StreamingMarkupBuilder import groovy.util.XmlNodePrinter import groovy.util.slurpersupport.NodeChild def text=""" <div><h2>Test</h2> <div>Hi</div> </div> """ // Parse def config=new org.cyberneko.html.HTMLConfiguration() config.setFeature("http://cyberneko.org/html/features/balance-tags/document-fragment",true) def html=new XmlSlurper(new org.cyberneko.html.parsers.SAXParser()).parseText(text) // Output def printNode(NodeChild node) { def writer = new StringWriter() writer << new StreamingMarkupBuilder().bind { mkp.declareNamespace('':node[0].namespaceURI()) mkp.yield node } new XmlNodePrinter().print(new XmlParser().parseText(writer.toString())) } printNode(html) Output: <HTML> <tag0:HEAD xmlns:tag0="http://www.w3.org/1999/xhtml"/> <BODY> <DIV> <H2> Test </H2> <DIV> Hi </DIV> </DIV> </BODY> </HTML>

    Read the article

  • In My MVC Controller, Can I Add a Value to My HTML.DropDownList?

    - by Aaron Salazar
    In my view I have an HTML DropDownList that is filled, in my controller, using a List<string>. <%= Html.DropDownList("ReportedIssue", (IEnumerable<SelectListItem>)ViewData["ReportedIssue"]) %> List<string> reportedIssue = new List<string>(); reportedIssue.Add("All"); reportedIssue.Add(...); ViewData["ReportedIssue"] = new SelectList(reportedIssue); In my view the result is: <select name="ReportedIssue" id="ReportedIssue"><option>All</option> <option>All</option> <option>...</option> </select> Is there a way to do this and also include a value in each of the <option> tags like so? <select name="ReportedIssue" id="ReportedIssue"><option>All</option> <option value="0">All</option> <option value="1">...</option> </select> Thank you, Aaron

    Read the article

  • how to use json_encode without PHP 5.2

    - by Ashley Ward
    I've written a CMS which uses the PHP function json_encode to send some data back via an Ajax Request. Unfortunately, I'm trying to load it onto a server which is running PHP version 5.1, the json_encode PHP function is not available on versions of PHP before 5.2.0. Does anyone know of a way to encode a PH array as JSON without using the inbuilt json_encode function?

    Read the article

  • PHP JSON encode output number as string

    - by mitch
    I am trying to output a JSON string using PHP and MySQL but the latitude and longitude is outputting as a string with quotes around the values. This causes an issue when I am trying to add the markers to a google map. Here is my code: $sql = mysql_query('SELECT * FROM markers WHERE address !=""'); $results = array(); while($row = mysql_fetch_array($sql)) { $results[] = array( 'latitude' =>$row['lat'], 'longitude' => $row['lng'], 'address' => $row['address'], 'project_ID' => $row['project_ID'], 'marker_id' => $row['marker_id'] ); } $json = json_encode($results); echo "{\"markers\":"; echo $json; echo "}"; Here is the expected output: {"markers":[{"latitude":0.000000,"longitude":0.000000,"address":"2234 2nd Ave, Seattle, WA","project_ID":"7","marker_id":"21"}]} Here is the output that I am getting: {"markers":[{"latitude":"0.000000","longitude":"0.000000","address":"2234 2nd Ave, Seattle, WA","project_ID":"7","marker_id":"21"}]} Notice the quotes around the latitude and longitude values.

    Read the article

  • Encode JSON data into another JSON object

    - by jburns20
    I have a JSON string that I would like to include as a value in a larger JSON object that I am creating from an array. How can I create the larger JSON object without php escaping the string, and without having to decode the previously encoded string? For example, if my JSON string is: $encoded_already = '{"encoded_key": "encoded_value"}'; And I would like to include it in my array and json_encode() it: $new_array = array( "some_other_key" => $some_value, "premade_data" => $encoded_already ); $output = json_encode($new_array); but I want to have the $encoded_already string be included as actual JSON, not just an escaped string.

    Read the article

  • How do I print an HTML document from a web service?

    - by Chris Marasti-Georg
    I want to print HTML from a C# web service. The Web Browser control is overkill, and does not function well in a service-environment, nor does it function well on a system with very tight security constraints. Is there any sort of free .NET library that will support the printing of a basic HTML page? Here is the code I have so far, that is not running properly. public void PrintThing(string document) { if (Thread.CurrentThread.GetApartmentState() != ApartmentState.STA) { Thread thread = new Thread((ThreadStart) delegate { PrintDocument(document); }); thread.SetApartmentState(ApartmentState.STA); thread.Start(); } else { PrintDocument(document); } } protected void PrintDocument(string document) { WebBrowser browser = new WebBrowser(); browser.DocumentText = document; while (browser.ReadyState != WebBrowserReadyState.Complete) { Application.DoEvents(); } browser.Print(); } This works fine when called from UI-type threads, but nothing happens when called from a service-type thread. Changing Print() to ShowPrintPreviewDialog() yields the following IE script error: Error: 'dialogArguments.___IE_PrintType' is null or not an object URL: res://ieframe.dll/preview.dlg And a small empty print preview dialog appears.

    Read the article

  • extend base.html problem

    - by momo
    I'm getting the following error: Template error In template /home/mo/python/django/templates/yoga/index.html, error at line 1 Caught TemplateDoesNotExist while rendering: base.html 1 {% extends "base.html" %} 2 3 {% block main %} 4 <p>{{ page.title }}</p> 5 <p>{{ page.info}}</p> 6 <a href="method/">Method</a> 7 {% endblock %} 8 this is my base.html file, which is located at the same place as index.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <div style="width:50%; marginleft:25%;"> {% block main %}{% endblock %} </div> what exactly is going on here? should the base.html file be located somewhere else?

    Read the article

  • Encode URL while send ajax

    - by meotimdihia
    I use cakePHP and it generate ajax /animemanga/animes/search/page:1?type%5B0%5D=3&amp;genre%5B0%5D=20&amp;genre%5B1%5D=4&amp;info%5B0%5D=episodes&amp;info%5B1%5D=released&amp;info%5B2%5D=rating&amp;info%5B3%5D=synopsis&amp;info%5B4%5D=completed&amp;info%5B5%5D=rating_count&amp;info%5B6%5D=name&amp;info%5B7%5D=id&amp;info%5B8%5D=name&amp;info%5B9%5D=id cakePHP encoded: & = &apm; will create error while use with Ajax. I use Jquery, browser Opera. how can this solve ?

    Read the article

  • Efficient way to ASCII encode UTF-8

    - by Andreas Gohr
    I'm looking for a simple and efficient way to store UTF-8 strings in ASCII-7. With efficient I mean the following: all ASCII chars in the input should stay ASCII chars in the output the resulting string should be as short as possible the operation needs to be reversable without any data loss there should be no restriction on the input length the whole UTF-8 range should be allowed My first idea was to use Punycode (IDNA) as it fits the first three requirements, but it fails at the last two. Can anyone recommend an alternative encoding scheme? Even better if there's some code available to look at.

    Read the article

  • How can I remove HTML span tags with a Perl one liner?

    - by yaya3
    I want to perform the following vim substitution as a one-liner in the terminal with Perl. I would prefer to allow for any occurences of whitespace or newlines, rather than explicitly catering for them as I am below. %s/blockDontForget">\n*\s*<p><span><a\(.*\)<\/span>/blockDontForget"><p><a\1/g I've tried this: perl -pi -e 's/blockDontForget"><p><span><a(.*)<\/span>/blockDontForget"><p><a$1/msg' I presume I am misinterpreting the flags. Where am I going wrong? Thanks. EDIT: The above example is to strip the spans out of the following html: <div class="block blockDontForget"> <p><span><a href="../../../foo/bar/x/x.html">Lorem Ipsum</a></span></p> EDIT: It's just the <span>'s and </span>'s that are inbetween <p> and <a> from the "blockDontForget" class </div> that I want to remove (there are lots or these blockDontForget divs with spans inside anchors that I want to keep).

    Read the article

  • Can't DER encode and BER decode RSA public key

    - by Mildred
    I have problems using Crypto++ to save a RSA public key (that I obtained loading a private key file in PKCS#8 format). When decoding the key, I always get a BERDecodeErr exception. Here is the code I am using: CryptoPP::RSASSA_PKCS1v15_SHA_Signer _signer; CryptoPP::RSASSA_PKCS1v15_SHA_Verifier _verifier; CryptoPP::ByteQueue bytes; //_signer.AccessPublicKey().Save(bytes); // seem to save private key instead _signer.AccessKey().DEREncodePublicKey(bytes); //_verifier.AccessKey().Load(bytes); //_verifier.AccessKey().BERDecodePublicKey(bytes, 0, 0); _verifier.AccessPublicKey().Load(bytes); I also tried with the instructions commented above, without success. How do you do to save or open the public key? The public key looks like this in hex format, is there a tool to check its format / validity (regarding what crypto++ supports) ? 3081890281810097e24f2e95504a397e90fbc56d1b330ab2ab97a0d326007b890e40013f9e1d9bd9 f54b0c0840782ddae19b5b4595d8f8b9ffe0d2120174fcbc39585c5867cd2dfba69f8e540caa2c52 de8f08278a34e9249120500117f0ba756c5bb2be660013160db9f82f75deb7ccf63742a9e945da6c cf30c2b109b73342daaabd02b872e50203010001

    Read the article

  • php json encode

    - by hafizan
    This below output come from php json_encode.What we see here is 0849 is twice.Since javascript only use sn to get value why we need the "0" value.The main problem is speed execution. If 800 kb data might can be reduce to 400 kb {"success":"true","total":968,"data":[{"0":"0849","sn":"0849" }] If no solution i have to make a script to filter in json_encode so no need twice data transter.

    Read the article

  • Webcam capture and convert to avi

    - by Spidfire
    Im trying to make a program that captures a video from the webcam and sound from the microphone but im getting stuck at the part where ive try to make a movie out of still images ive heard you need to use directshow but it doesnt jet work for me Does someone know a good piece of example code that captures video and sound and can encode it to a file (divx or something like that) ? or some suggestions where to look so i can build it myself (if a other programming language is better for this im happy to know it early. )

    Read the article

  • rawurl encode problem

    - by pradeep
    hi, i am using rawurlencode($url_variable) while passing to a script.. when i receive the variable in the script ,before passing this variable to mysql ,i was doing mysql_real_escape_string . now the problem is like when there is a variable like $url_variable = "Off-St.Mark's-Road" ...after i do mysql_real_escape_string it become slike Off-St.Mark\\'s-Road . which is creating a problem in mysql query ... how i get over this...rawurlencode is necessary to pass variables to the script and i want to do mysql_real_escape_string to make the data safe...

    Read the article

  • Parse text/html part of email source using Javascript

    - by Ben McCormack
    Using javascript, I need to parse the Content-Type text/html portion of an email message and extract just the HTML part. Here's an example of the part of the mail source in question: ------=_Part_1504541_510475628.1327512846983 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit <html ... a bunch of html ... /html> I want to extract everything between (and including) the <html> tags after text/html. How do I do this? NOTE: I'm OK with a hacky regex. I don't expect this to be bulletproof.

    Read the article

  • Possible to write an Extension Method for ASP.NET's Html.ActionLink() method?

    - by Pretzel
    Right now, I'm trying to work around an IE6/7 bug which requires the wrapping of the </a closing tag with this IE specific comment to make some drop-down menu work: <!--[if IE 7]><!--></a><!--<![endif]--> Unfortunately, I cannot inject this directly into my View page code like this: <%= Html.ActionLink("LinkName<!--[if IE 7]><!--></a><!--<![endif]-->","Action","Controller") %> As Html.ActionLink will do the safe thing and filter out the comment to prevent a Javascript injection attack. Ok, cool. I'm fine with that. Good design decision. What I'd like to do is write an Extension Method to this, but the process is eluding me as I haven't done this before. I thought this would work, but Intellisense doesn't seem to be picking up this Extension method that I've written. public static class MyLinkExtensions { public static string ActionLinkIE(this HtmlHelper htmlHelper, string linkText, string actionName, string controllerName) { return LinkExtensions.ActionLink(htmlHelper, linkText, actionName, controllerName). Replace(@"</a>", @"<!--[if IE 7]><!--></a><!--<![endif]-->"); } } Any suggestions?

    Read the article

< Previous Page | 86 87 88 89 90 91 92 93 94 95 96 97  | Next Page >