{"id":5957,"date":"2014-04-10T21:42:51","date_gmt":"2014-04-10T21:42:51","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/04\/10\/javascriptfunctionbuttononclickassignrelated-issues-collection-of-common-programming-errors\/"},"modified":"2014-04-10T21:42:51","modified_gmt":"2014-04-10T21:42:51","slug":"javascriptfunctionbuttononclickassignrelated-issues-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/04\/10\/javascriptfunctionbuttononclickassignrelated-issues-collection-of-common-programming-errors\/","title":{"rendered":"javascript,function,button,onclick,assignRelated issues-Collection of common programming errors"},"content":{"rendered":"<ul>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/54d4527e175ea6117587f9766ac4b8d7?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nshoriwa-shaun-benjamin<br \/>\njava javascript android cordova webview<br \/>\nI am trying to get my cordova webview to work with cordova 3.2 an use the phonegap Camera API to access the camera.Reference: Android WebViewsHere are some successful implementations of what I want to do, but these use Phonegap 1.9, i want to use Phonegap 3.2 (the latest one)Cordova WebView using AndroidAlso here&#8217;s a VideoWith the code below I am able to make the cordova webview display my index.html page without any issues but when I to access the camera by clicking on &#8220;Capture Photo&#8221; in my HTM<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/f38a77142bda47fc2a0c914fc3dd0d4c?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nInator<br \/>\nphp javascript apache nosql couchdb<br \/>\nI&#8217;ve recently successfully installed CouchDB version 1.2.1 and as a test I can access it using the following Apache rewrite in CentOS 6:RewriteRule couchdb\/(.*)$ http:\/\/127.0.0.1:5984\/$1 [QSA,P]I have a PHP authentication class that I use across a home grown API to support my mobile apps. My API accepts and authenticates each request using an HMAC signature that is included in the URL like so:https:\/\/api.domain.com\/endpoint\/?timestamp=[timestamp]&amp;signature=[signature]&amp;id=[id]&#8230;etcEach<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/cd53740ddcefc9ceac7b97f4d20487b3?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nnovicePrgrmr<br \/>\njava javascript ajax json jsp<br \/>\nI am sorry to ask this but i&#8217;ve been working on this for hours and I can&#8217;t figure it out on my own. I have to use json for part of a project and I was able to get it to work but now it&#8217;s not returning it back to the right jsp but instead just displaying the json jsp. I am pretty sure it is how I am receiving the json.here are screen shots of what is happening:this is the jsp that I need to use ajax on, I am wanting to populate the second dropdown using ajax:this is what is happening instead, (it<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/6ceaca2e4d36db284cae876622c9cfa2?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nAndrew Whitaker<br \/>\njavascript regex<br \/>\nI am trying to build a regexp from static text plus a variable in javascript. Obviously I am missing something very basic, see comments in code below. Help is very much appreciated:var test_string = &#8220;goodweather&#8221;;\/\/ One regexp we just set: var regexp1 = \/goodweather\/;\/\/ The other regexp we built from a variable + static text: var regexp_part = &#8220;good&#8221;; var regexp2 = &#8220;\\\/&#8221; + regexp_part + &#8220;weather\\\/&#8221;;\/\/ These alerts now show the 2 regexp are completely identical: alert (regexp1); alert (regexp2);\/<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/cc352d092caa8e1d41aa7b42b4b2f0c0?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nDOTang<br \/>\njavascript regex<br \/>\nI am searching for text inside of website resources (html and javascript), and need to identify 3 regular expressions that will locate this text under certain circumstances:some string of text when it is contained inside of a javascript single-quoted string some string of text when it is contained inside of a javascript double-quoted string some string of text when it is not contained inside of a javascript stringHere are some scenarios that are likely to occur (searching for the string &#8220;somestr<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/c3203aa647aeb214c463c59f1af2c38f?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nAndy E<br \/>\njavascript html<br \/>\nI&#8217;m building up a row to insert in a table using jQuery by creating a html string, i.e.var row = &#8220;&#8221;; row += &#8220;&lt;tr&gt;&#8221;; row += &#8220;&lt;td&gt;Name&lt;\/td&gt;&#8221;; row += &#8220;&lt;td&gt;&lt;input value='&#8221;+data.name+&#8221;&#8216;\/&gt;&lt;\/td&gt;&#8221;; row += &#8220;&lt;\/tr&gt;&#8221;;data.name is a string returned from an ajax call which could contain any characters. If it contains a single quote, &#8216;, it will break the HTML by defining the end of the attribute value. How can I ensure that the string is rendered correctly in the brow<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/1f3474816dadf7e51b3df220203559f5?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nsameer<br \/>\njavascript angularjs maven yeoman<br \/>\nI have recently integrated maven yeoman plugin with my app. I followed https:\/\/github.com\/trecloux\/yeoman-maven-plugin\/blob\/master\/TUTORIAL.md My angular version is v1.2.3 . When I run the mvn clean install command, I get the following error . grunt-contrib-imagemin@0.3.0 node_modules\\grunt-contrib-imagemin ?\u00f6\u00a3?\u00f6\u00c7?\u00f6\u00c7 filesize@1.10.0 ?\u00f6\u00a3?\u00f6\u00c7?\u00f6\u00c7 chalk@0.2.1 (ansi-styles@0.2.0, has-color@0.1.4) ?\u00f6\u00a3?\u00f6\u00c7?\u00f6\u00c7 optipng-bin@0.3.1 (bin-wrapper@0.1.9) ?\u00f6\u00a3?\u00f6\u00c7?\u00f6\u00c7 gifsicle@0.1.4 (bin-wrapper@0.1.9) ?\u00f6\u00a3?\u00f6\u00c7?\u00f6\u00c7 p<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/65f538663f6efb994a4261011f485297?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nRonald Yeung<br \/>\njavascript jquery ajax json cors<br \/>\nWhat I am trying to do is to have a page on the HTTP protocol sending an AJAX call to the same Web server but using HTTPS. Both the requesting page and the AJAX handler are on the same server, having the same domain and port. (I.e., only difference is the protocol.) To illustrate,Fromhttp:\/\/www.example.com\/index.phpTriggers a jQuery AJAX call tohttps:\/\/www.example.com\/authenticate.php?user=123&amp;password=456(I am hoping to pass the password through HTTPS to make it encrypted over the Internet.<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/ace32c4dac4f82c9069676a242ba4fe3?s=32&amp;d=identicon&amp;r=PG&amp;f=1\" \/><br \/>\nstanleyhope<br \/>\njavascript ajax ssl internet-explorer-8<br \/>\nThe problem: I have a site with a recently installed SSL certificate that is very dependent on POST calls over AJAX. The site worked fine on Internet Explorer 8 before the SSL certificate, but now does not.Since I haven&#8217;t been able to get a good way to read any error messages, I haven&#8217;t been able to pin down where the bug is coming from. I will try to list as much as I know\/ have figured out, and I greatly appreciate any suggestions.What I know:On IE8, the site will not perform any AJAX POST cal<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/4d453f2d31a6c3c0bf9e089620d3d8e8?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nMac-Gon<br \/>\njavascript jquery html5 css3 navigation<br \/>\nI&#8217;ve been reading lots of the other posts, and no doubt it&#8217;s my inexperience with jQuery that is giving me trouble, but there are lots of things close to what I&#8217;m trying to accomplish. I have a div where I have a vertical navigation set of buttons. Inside that I want the other divs (child divs) that will be shown or hidden based on the navigation button clicked by the user. I want all of these divs to be in the same location on the screen&#8230;so, basically like a tabbed form but with vertical navi<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/6c6e1b7e2ad6b50054d9ddc3b6deb360?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nAlaska Zach<br \/>\njavascript function events<br \/>\nI&#8217;m trying to make it so I don&#8217;t have a write a function for every input field I want to use this on. Rather sending the element id to the function and only having one function that I can recycle.Works like this&lt;input name=&#8221;field&#8221; id=&#8221;field&#8221; type=&#8221;text&#8221; onKeyPress=&#8221;onlyNum()&#8221; \/&gt;&lt;script type=&#8221;text\/javascript&#8221;&gt; function onlyNum() {var name = $(&#8220;#field&#8221;);name.keypress(function (e) {if (e.which &gt; 0 &amp;&amp; \/\/ check that key code existse.which != 8 &amp;&amp; \/\/ allow backspace!(e.w<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/f26727beba01cfc9c65e469d5ef94abf?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nuser1860536<br \/>\nphp function preg-replace str-replace<br \/>\nI try change characters by functions&lt;?php $string = &#8220;Hi everybody people [gal~images\/articles~100~100~4] here other imagen [gal~images\/products~100~100~3]&#8221;;$regex = &#8220;\/\\[(.*?)\\]\/&#8221;; preg_match_all($regex, $string, $matches);for($i=0; $i&lt;count($matches[1]);$i++) { $match = $matches[1][$i]; $array = explode(&#8216;~&#8217;, $match);\/\/$newValuet=&#8221;gal(&#8220;&#8221;.$array[1].&#8221;&#8221;,&#8221;&#8221;.$array[2].&#8221;&#8221;,&#8221;&#8221;.$array[3].&#8221;&#8221;,&#8221;&#8221;.$array[4].&#8221;&#8221;)&#8221;;$newValue=&#8221;gal(&#8220;.$array[1].&#8221;,&#8221;.$array[2].&#8221;,&#8221;.$array[3].&#8221;,&#8221;.$array[4].&#8221;)&#8221;;$string = str_repl<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/d6db99aa846a8217f7e2aba6fa198e7c?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\ngnat<br \/>\nc arrays function multidimensional-array<br \/>\nSay I have an array: array[2][4], and inside the main method, I have a call to a function blackandwhite. How can I pass this method the length and width of the array as arguments?<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/xw8bk.jpg?s=32&amp;g=1\" \/><br \/>\nFistOfFury<br \/>\nsql sql-server performance function user-defined-functions<br \/>\nI have a database with a lot of UDFs that contains a long running process involving lots of data manipulation and calculations. My thinking in using UDFs is to separate out logical units of information from the tables underlying. For example, if i am trying to get information about a car i might have several tables like Color, Model, Year, etc that i would have to join each time to get a Car. Instead, I would have a function like fnCar() to get a denormalized view of the data.I call these fun<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/8br6L.png?s=32&amp;g=1\" \/><br \/>\nkarlphillip<br \/>\nc osx function symbols hacking<br \/>\nIs there a tool for reading Mac OS X binaries that would print information about relocation tables and symbol offsets similar to this readelf output?readelf -r appRelocation section &#8216;.rel.dyn&#8217; at offset 0x5ec contains 2 entries:Offset Info Type Sym.Value Sym. Name 08049d58 00001706 R_386_GLOB_DAT 00000000 __gmon_start__ 08049d60 00000305 R_386_COPY 08049d60 _ZSt4coutRelocation section &#8216;.rel.plt&#8217; at offset 0x5fc contains 13 entries:Offset Info Type<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/ae6e3578ca36e9c66e1432926b30a822?s=32&amp;d=identicon&amp;r=PG&amp;f=1\" \/><br \/>\neagertoLearn<br \/>\npython function varargs default-parameters<br \/>\nwhen I try the following, I get error in the function definition itself.&gt;&gt;&gt; def mymap(*seq,pad=None):File &#8220;&lt;stdin&gt;&#8221;, line 1def mymap(*seq,pad=None):SyntaxError: invalid syntax I am trying to give default value for the parameter pad. but then, I tried this and it works (for wrong reason):&gt;&gt;&gt; def mymap(pad=None,*seq): &#8230; print seq &gt;&gt;&gt; mymap([1,2,3],[4,5,6]) ([4, 5, 6],) [(4,)] &gt;&gt;&gt; It is not printing the tuple of seq which should be ([1,2,3],[4,5,6]).<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/c706cef02e8cf03a0ad2b896727422c8?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nRichard Rodriguez<br \/>\nphp arrays function<br \/>\nI have the following function:function percentToColor($percent){$minBrightness = 160;$maxBrightness = 255;\/\/ Remainins?$brightness = ((($minBrightness-$maxBrightness)\/(100-0))*$percent+$maxBrightness);$first = (1-($percent\/100))*$brightness;$second = ($percent\/100)*$brightness;\/\/ Find the influence of the middle color (yellow if 1st and 2nd are red and green)$diff = abs($first-$second);$influence = ($brightness-$diff)\/2;$first = intval($first + $influence);$second = intval($second + $influence);<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/d0074a35d77016feecedf591f69794be?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nBach<br \/>\npython function exception-handling return<br \/>\nI defined the following function to test if an input is a positive int. I plan on using eval(raw_input(&#8220;&#8230;&#8221;)) so that&#8217;s why the try-except part is there:def is_ok(x): # checks if x is a positive integeris_int = Falseis_pos = Falsetry:if type(eval(x)) == int:is_int = Trueif x &gt; 0:is_pos = Trueelse:passelse:passexcept NameError:is_int = Falseprint &#8220;not even a number!&#8221;return is_int, is_pos if I try to pass a positive int it would return True, True as expected. It returns False, False<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/dCqDL.jpg?s=32&amp;g=1\" \/><br \/>\nInherent<br \/>\njavascript function object copy assign<br \/>\nI am new to Java Script and I don&#8217;t understand, what a variable is storing, if it gets the return value of a function that is a object. My fear is, that such a variable is not storing the value, but only a link to a memory, that is maybe overwritten a little later.I tried this to find it out:This function returns a object with the content: name=&#8221;first&#8221; or name=&#8221;second&#8221;:var returnObject = function (theSecond) {var obj = { name : &#8220;first&#8221; };if (theSecond) {obj.name = &#8216;second&#8217;;}return obj; };2 varia<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/70d671ad3176d816d0682b4f03521362?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nMcGarnagle<br \/>\nr function for-loop time-series derivative<br \/>\nSo I have a time series of MODIS NDVI values (vegetation values from 0-1 for the non-geographic geeks), and I&#8217;m trying to approximate the derivative by using a for loop.This is a sample of my data:&gt; m2001date value valnorm 1 1 0.4834 0.03460912 2 17 0.4844 0.03664495 3 33 0.5006 0.06962541 4 49 0.4796 0.02687296 5 65 0.5128 0.09446254 6 81 0.4915 0.05109935 7 97 0.4664 0.00000000 8 113 0.5345 0.13864007 9 129 0.8771 0.83611564 10 145 0.9529 0.99043160 11 161 0.<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/0b7e1bc91b8ab1cbc3e53804a3aba6cf?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nmerrill<br \/>\nlistview button activity back<br \/>\nI have a mainActivity which is Customer.java with listview of 5 diff. activities. I was able to open all 5 activities when I tap them but when i press back button(the device backbutton) to go back to the mainAcitivity it would give me an error which you will see debug\/logcat below the codes. I have post 2 examples activity below my main screen (logout and clockin) . Bonus: As one extra thing I would like to have is when click of the &#8216;clockinActivity&#8217; button i want it to send the current time &amp;am<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/9882a36fec45fa699c6d3e59a2fb99ef?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nDylanMark<br \/>\njava android xml button menu<br \/>\nEspecially android-developers \ud83d\ude42 I have some troubles with application menu which i try to create.When I click on some button &#8211; apllication says that process stopped unexpectedlyI make it almost like in manual here(http:\/\/www.droidnova.com\/creating-game-menus-in-android,518.html) but their sample works and my code not! I don&#8217;t understand what i&#8217;ve done wrong, please, can somebody help?main.xml&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;utf-8&#8243;?&gt; &lt;RelativeLayout android:id=&#8221;@+id\/widget32&#8243; android:layo<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/622326349534fe4bd054e8d43040a1d5?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nGrayFox<br \/>\nandroid xml android-layout button back<br \/>\nI can&#8217;t find a way how to make it work. So here it goes:Application starts and I press Option menu and it offers me &#8220;Settings&#8221; option, and when I click it, it goes to layout called &#8220;help.xml&#8221; which shows me some text &#8230;And in that layout I created a button which must return me to my activity ( the window which is shown when app starts) I tried making a back button works but I failed cause I need for user to wait 30 seconds until the next image switch , and by making back button works hw would e<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/l4PUL.jpg?s=32&amp;g=1\" \/><br \/>\nGuy Richards<br \/>\nandroid eclipse button<br \/>\nI&#8217;m trying to load a second layout after the click of a button but for some reason the application keeps crashing&#8230; I&#8217;m pretty sure I did everything right &#8211; but it&#8217;s still failing for some reason after each time I click on the save button at the bottom of the screen.P.S.If any more information is needed please let me know. I&#8217;ll be happy to provide it.JAVApackage com.example.linkingmanager;import android.app.Activity; import android.os.Bundle; import android.widget.Button; import android.content<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/db5e85bff2a4df46502c4dd39ff44766?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nwocmultimedia<br \/>\nandroid button android-intent google-play<br \/>\nI&#8217;m trying to launch the page of my app in android market from my activity. I am novice and maybe I&#8217;m making wrong coding this is what I wrote in the note.class import android.app.Activity; import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; import android.view.View; import android.webkit.WebView; import android.widget.Button;public class Note extends Activity{WebView mWebView;W<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/BJBmp.jpg?s=32&amp;g=1\" \/><br \/>\nChris Brendan<br \/>\njava android button media-player<br \/>\nI&#8217;m working on a drumpad with multitouch. I have used an inner class which extends a button:package dubstep.brendan;import android.content.Context; import android.media.MediaPlayer; import android.util.AttributeSet; import android.view.MotionEvent; import android.widget.Button;public class TestButton extends Button { private MediaPlayer mpButtonClick =MediaPlayer.create(getContext(),R.raw.firework);public TestButton(final Context context, final AttributeSet attrs) {super(context, attrs);\/\/ TODO<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/HJI0A.jpg?s=32&amp;g=1\" \/><br \/>\nsantirivera92<br \/>\nandroid button textcolor<br \/>\nI have a regular button which looks like this:&lt;Buttonandroid:id=&#8221;@+id\/button1&#8243;style=&#8221;@style\/ButtonInfo&#8221;android:layout_width=&#8221;match_parent&#8221;android:layout_height=&#8221;wrap_content&#8221;android:layout_marginLeft=&#8221;10dip&#8221;android:layout_marginRight=&#8221;10dip&#8221;android:text=&#8221;Button&#8221; \/&gt;ButtonInfo looks like this:&lt;style name=&#8221;ButtonInfo&#8221; parent=&#8221;@android:style\/Widget.Button&#8221;&gt;&lt;item name=&#8221;android:background&#8221;&gt;@drawable\/button_info&lt;\/item&gt;&lt;item name=&#8221;android:textColor&#8221;&gt;@color\/button_info_text&amp;<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/e44fdcfb1f25aea44e160db896104d22?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nmikeTheLiar<br \/>\nios facebook button facebook-like<br \/>\nI would like to know whether it is possible to add a Facebook Like button to a native iPhone app. In the app, the user browses a business directory or deals. When they tap on an item to view the details, it would be nice to have a Facebook Like button that can be used to post the item to the user&#8217;s Facebook page.Facebook writes: &#8220;Currently, the Like button is only available in mobile web apps&#8221;.My app is a native app and not a web app, so therefore I assume it&#8217;s not possible. However, I do assume<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/iAnwd.jpg?s=32&amp;g=1\" \/><br \/>\nMelquiades<br \/>\njava android button<br \/>\nI&#8217;m trying to put a Start New Game (Joc nou) button, but when I press this button, it is not working as it should. Usually, it starts a new game but it also puts an &#8216;X&#8217; on the first position of the table (mBoardsButtons[0])package xsi0.cristi.ro;import android.os.Bundle;import android.app.Activity;import android.graphics.Color;\/\/import android.view.Menu;import android.view.View;import android.widget.Button;import android.widget.TextView;\/\/import android.view.*;public class MainActivity extends A<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/e0bbc390cfaed05263f17e574866eb70?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nAntony<br \/>\nphp html table button<br \/>\nI am struggling to make a button appear in my table. I have seen various other answers on here but are a little too complicated for me (ie use javascript or are seeking to remove things from and to a database)My code is below and its the 8th line I am having trouble with (the table works fine without that line) &#8211; just says &#8216;unexpected &#8216;&lt;&#8216;?All I am seeking to do is show a button which will link to another website. That website is dictated by the variable &#8216;book&#8217; which I pull from a database.ech<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/ff7a12a8d26c0215fdcbf9615c1ac39a?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\ntylerjroach<br \/>\nandroid sqlite listview checkbox onclick<br \/>\nI am a beginner when it comes to programming with Android\/Java, and I am having trouble with what shouldn&#8217;t be too difficult to accomplish. I am using code I&#8217;ve tried to adapt from the Google Notepad v1. I realize this version is far from complete, but it was the most stripped down to begin on. What I am trying to do is modify the list to note include notes, but rather make it function like a to-do list, where one would add items to the list. Next to each item, there needs to be a checkbox. I&#8217;m<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/4cd4f49f904f14c291e65c4aa31e7c5e?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\ndeath2all110<br \/>\njava android onclick alertdialog<br \/>\nI&#8217;m trying to show an about page to the users of my wallpaper app when they click the about button however i get leaked window errors in a log cat and the activity quits before it shows the dialog.Here is the code:\/*** Sensational Wallpapers Pack 1** Wallpaper Designed by AZ2ENVY**\/package com.death2all110.SensationalWallpapers1;import android.app.Activity; import android.content.res.Resources; import android.graphics.BitmapFactory; import android.graphics.Bitmap; import android.graphics.drawabl<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/82762ea3991b3411abab1054dea063a4?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nJoshDM<br \/>\nandroid android-layout onclick onclicklistener findviewbyid<br \/>\nAndroid application keeps crashing on start-up. Everything appears fine to me, though.Stack trace: 01-24 21:23:41.417: I\/Process(767): Sending signal. PID: 767 SIG: 9 01-24 21:41:36.316: W\/Trace(890): Unexpected value from nativeGetEnabledTags: 0 01-24 21:41:36.485: W\/Trace(890): Unexpected value from nativeGetEnabledTags: 0 01-24 21:41:36.515: W\/Trace(890): Unexpected value from nativeGetEnabledTags: 0 01-24 21:41:36.515: D\/dalvikvm(890): newInstance failed: p0 i0 [0 a1 01-24 21:41:36.515: D<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/1b20408b81e7170cf042f406b8300e79?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nAleksandar Milicevic<br \/>\nonclick titanium appcelerator alloy-ui<br \/>\nI have an onClick listener added to an ImageView in index.xml. clicking the ImageView does not fire the function specified in the index.js, however adding the onClick to the containing view does. It&#8217;s almost as if the containing view is catching the click and not allowing the contained ImageView to receive it. However, I have several of these and others seem to work fine.index.xml:&lt;Alloy&gt; &lt;Window class=&#8221;container&#8221; onOpen=&#8221;onWIndowLoad&#8221;&gt;&lt;View id=&#8221;wholeView&#8221;&gt;&lt;!&#8211; header &#8211;&gt;<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/0e0ac290b833189cfaab8b5b060db879?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nJav_Rock<br \/>\nandroid onclick<br \/>\nHi I have implemented this code:Button goToRegister = (Button) findViewById(R.id.reg);goToRegister.setOnClickListener(new View.OnClickListener() {public void onClick(View v) {\/\/ TODO Auto-generated method stubIntent intent = new Intent(MindMappingLoginActivity.this, MindMappingRegisterActivity.class);startActivity(intent);Basically splash screen waits 1 second loads a login screen, I have a register button that I would like to use to go to a register activity, now when the splash screen finishes<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/e3f1b23b5576175bf78a8a156cf304b2?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nuser2208533<br \/>\njavascript jquery html div onclick<br \/>\nI am trying to bind a click event to a div which contains a input button. What i want is when the button is clicked i want to call another function. The HTML div class is shown below.var searchAttachPoint= document.querySelector(&#8216;.header1&#8217;);And in my javascript i have these lines.var searchAttachPoint= document.querySelector(&#8216;.header1&#8217;); $(#header1).bind(&#8220;click&#8221;,searchPrompt(&#8220;Key the text and press Ok&#8221;, false));I am getting an error saying &#8220;Unexpected token ILLEGAL &#8221; in the line where i bing the<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/IvwD2.jpg?s=32&amp;g=1\" \/><br \/>\nkoenbro<br \/>\nandroid activity onclick stop<br \/>\nI have a button which is supposed to open a new activity:@Overridepublic void onClick(View view) {switch (view.getId()) {case R.id.Button01:Intent myIntent = new Intent(LFSQL02.this, ManageFilms.class);startActivity(myIntent);break;}}When pressed, it leads to an unexpected stop. The manifest does list .ManageFilms class. Where is the location of the error? Thanks<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/da5694188e880af332208abf8eb2f619?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nDanny182<br \/>\njavascript php input onclick<br \/>\nI want to use the javascript function to clear a text input on click!but when I use it inside of php I get this error:Parse error: syntax error, unexpected &#8221;;&#8221; onfocus=&#8221;this.select()&#8221; on&#8217; (T_CONSTANT_ENCAPSED_STRING), expecting &#8216;,&#8217; or &#8216;;&#8217; in here is the code i&#8217;m using:&lt;?php echo'&lt;input type = &#8220;text&#8221; name = &#8220;mod_n_part&#8221; id = &#8220;mod_n_part&#8221; class=&#8221;modifica-regole-n_part&#8221; onclick=&#8221;this.value=&#8221;;&#8221; onfocus=&#8221;this.select()&#8221; onblur=&#8221;this.value=!this.value?&#8217;.$n_part.&#8217;:this.value;&#8221; value = &#8216;.$n_part.<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/b02d69f3dd9e6f32457cbe7c8e694e69?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nPaul Mennega<br \/>\nandroid onclick<br \/>\nI&#8217;m having some problem here with android + java + cloud. My onCLick event is working only one timeThe event only work again when i go back to the last screen and enter again in the screen that i made searchs in the cloud&#8230;<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/273217cea634212b1bc10852c2087f60?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nionutz staniu<br \/>\nandroid onclick save volume<br \/>\ni have an issue regardin my test App, in wich i try to create a View like in a Samsung Galaxy -&gt; Settings -&gt; Sound-&gt; Volume, but instead of all Volume Controler, and the two buttons OK Cancel, i want just Ringer Volume and a Save button.I am new in android and really don&#8217;t know why my code below behave bad. public class SaveActivity extends Activity {private AudioManager aManager;private SeekBar seekVolume;private Button save;public int main_progress;@Overridepublic void onCreate(Bundle savedIns<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/dCqDL.jpg?s=32&amp;g=1\" \/><br \/>\nInherent<br \/>\njavascript function object copy assign<br \/>\nI am new to Java Script and I don&#8217;t understand, what a variable is storing, if it gets the return value of a function that is a object. My fear is, that such a variable is not storing the value, but only a link to a memory, that is maybe overwritten a little later.I tried this to find it out:This function returns a object with the content: name=&#8221;first&#8221; or name=&#8221;second&#8221;:var returnObject = function (theSecond) {var obj = { name : &#8220;first&#8221; };if (theSecond) {obj.name = &#8216;second&#8217;;}return obj; };2 varia<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/xBwfL.jpg?s=32&amp;g=1\" \/><br \/>\nFrancisco Presencia<br \/>\nphp class variables assign<br \/>\nHow can I assign multiple variables at once in PHP? This is basically what I&#8217;m trying to achieve but it throws a parsing error on private $from = private $to saying syntax error, unexpected &#8216;private&#8217;:&lt;?php namespace Library;class Localize{\/\/ Default data for both fields. Localization must be specified.private $from = private $to = array(&#8216;language&#8217; =&gt; &#8216;en&#8217;, \/\/ Language: English&#8217;country&#8217; =&gt; &#8216;usa&#8217;, \/\/ Country: USA&#8217;currency&#8217; =&gt; &#8216;dollar&#8217;, \/\/ Currency: dollar $&#8217;units&#8217; =&gt; &#8216;is&#8217;<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/9dbf5bd7caf5f5f2cd76951aa6b87d08?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nsteve<br \/>\npython methods assign<br \/>\nI have this method in a class:def do_exit():# some taskI want to assign a bunch of other methods to do_exit, so currently I&#8217;m doing this:do_quit = do_exit do_stop = do_exit do_finish = do_exit do_complete = do_exit do_leave = do_exitThis works fine but I&#8217;m wondering if there&#8217;s a better way, especially if I&#8217;m going to be doing this a lot.<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/7e6e0e2b73358e47e0b7f83f8111f75b?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nMattDiPasquale<br \/>\nobjective-c delegates asihttprequest retain assign<br \/>\nIs it OK to retain a delegate of a subclass of ASIHTTPRequest?I made a subclass of ASIHTTPRequest called JSONRequest. Each instance of JSONRequest is its own delegate, handles the callbacks, and passes them on to jsonDelegate, which is a private property of JSONRequest, and responds to requestFinished:withResult:, where result is an NSDictionary representation of the JSON response. To do this, I overloaded setDelegate: in JSONRequest to do super.delegate = self; self.jsonDelegate = newDelegate.I<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/22d3ab8149b31abf3ae69907ad0557a1?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nmathinvalidnik<br \/>\nc# xml parsing assign<br \/>\nDo you know how I can explicitlyt assign xml content to a string ? Example :string myXml = &#8221; &lt;?xml version=&#8221;1.0&#8243;?&gt; &lt;note&gt; &lt;to&gt;Tove&lt;\/to&gt; &lt;from&gt;Jani&lt;\/from&gt; &lt;heading&gt;Reminder&lt;\/heading&gt; &lt;body&gt;Don&#8217;t forget me this weekend!&lt;\/body&gt; &lt;\/note&gt; &#8220;I want to do this but with a quite bigger file.I need it because I want to use it in my Unit testing but it shows lots of errors when I am trying to paste the content between the quotes.<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/529ba429a58902bef56c2fcb672d5ccb?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nJaredPar<br \/>\nvb.net runtime assign<br \/>\nsir, i have no idea how the code will look, but i want it to assign a value after reading from a text file and then store it for further use even if the text file is not there, but without using any external storage like registry, disk, ram. It should store the value in itself and do like this:- dim variable1, variable2 as string if file.exists(&#8220;text.txt&#8221;)read the textstore the text in variable 1 elsevariable2 = variable1 end ifon the basis of variable1 some action on the basis of variable2 some<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/3b1a3c7eb11abd99439c5b1b4b50b37f?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nmadth3<br \/>\nc++ string segmentation-fault assign<br \/>\ni have the indicated problem with the following code and i have no idea what it might be causing it. I searched before posting the problem, and i learned that it might be something going out of the scope like a reference to a freed memory location but i could not find it on my own. Thank you for helping me. #include&lt;iostream&gt; #include&lt;string&gt; using namespace std;class USR{ private:string name; public:void setName(string name){ this-&gt;name = name;}string getName(){return name;}};cl<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/987030e7aba06fff55699e80427c73bc?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nNeeta<br \/>\nandroid location return assign<br \/>\nIn my Main class I call another class to do something, and I need to return the data back to the Main class but it&#8217;s crashing for some reason on startup of the application:My Main Activity &#8211; it crashes in getLocation() something to do with returning the Location and assigning to a Point, because when I take these lines out, it works fine.public class Main extends Activity {ArrayList&lt;Point&gt; gpsCoordinates = new ArrayList&lt;Point&gt;();@Overridepublic void onCreate(Bundle savedInstanceState<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/a8518c33a76987dd41dd26497563fee9?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nLipis<br \/>\nc++ pointers structure arguments assign<br \/>\nI am a newbie in programming and apologise in advance if my question is too silly. My c++ project is compiled as library .xll (DLL for excel), the framework code (program entry point) is coded correct and work stable. Custom functions are separate modules. \/\/ header.h typedef struct _TMDYDate {long month;long day;long year; } TMonthDayYear;the file funcs.c has a function:\/\/ funcs.c #include &#8220;header.h&#8221;__declspec(dllexport) long GetDate() {TMonthDayYear myDate;myDate.day = 1 ;myDate.month = 1;myDa<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/aee3b44e5f0b4dfa0e2da672897b3751?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nj0k<br \/>\ntemplates smarty assign<br \/>\nI have a smarty structure like this\/ \/cache \/configs \/libs \/templates \/templates\/administrator \/cache \/administratorI want the same template structure assign to my administrator folder. I am getting error :&#8221;Fatal error: Uncaught exception &#8216;SmartyException&#8217; with message &#8216;Unable to load template file &#8216;administrator\/index.tpl&#8221;The Code I am using is$t = new smarty; $t-&gt;setTemplateDir(&#8216;.&#8217; . DS . &#8216;templates\/administrator&#8217; . DS)-&gt;setCompileDir(&#8216;.&#8217; . DS . &#8216;templates_c&#8217; . DS)-&gt;setPluginsDir(SMA<\/li>\n<\/ul>\n<p>Web site is in building<\/p>\n","protected":false},"excerpt":{"rendered":"<p>shoriwa-shaun-benjamin java javascript android cordova webview I am trying to get my cordova webview to work with cordova 3.2 an use the phonegap Camera API to access the camera.Reference: Android WebViewsHere are some successful implementations of what I want to do, but these use Phonegap 1.9, i want to use Phonegap 3.2 (the latest one)Cordova [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-5957","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5957","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=5957"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5957\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=5957"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=5957"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=5957"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}