pid
int64
2.28k
41.1M
label
int64
0
1
text
stringlengths
1
28.3k
28,591,521
0
<p>Check the following tutorial, it appears to be for the latest version of TinyMCE (and it is updated recently).</p> <p><a href="https://www.gavick.com/blog/wordpress-tinymce-custom-buttons" rel="nofollow noreferrer">https://www.gavick.com/blog/wordpress-tinymce-custom-buttons</a></p> <p>The tutorial you linked is pr...
22,457,647
0
<p>WMS draw works fine but you have to implement a Proxy for downloading WMS tiles using AJAX. See the PHP proxy example of html2canvas for the implementation details of the "proxy" (which is not a http proxy".</p>
23,283,640
0
Is my code below secure enough to be used in production? <p>What is the best practice to securely upload an image to a php script based on my code below? I'm using the file transfer cordova plugin to upload the image to a php script.</p> <p>Javascript (file transfer cordova plugin)</p> <pre><code>var options = new File...
38,679,399
0
<p>When you create your documents, you must set the creation date:</p> <pre><code>MyCollection.insert({ text: "abc", createdAt: new Date() }); </code></pre> <p>then, you can filter your data:</p> <ol> <li><p>If you want the documents created in an interval:</p> <p><code>MyCollection.find( {createdAt: { $gte: new Date(...
10,093,352
0
<p>You can use <code>product</code> from <code>itertools</code> module.</p> <pre><code>itertools.product(range(3), range(2)) </code></pre>
7,097,691
0
<p>the second and fourth query do not have an ending ')' at the end of the values</p>
33,482,444
0
<p>I think this could help you. Defining your values directly as arrays, and representing them with a foreach loop. It's more like the way mysql_fetch_array represents the records obtained from the database.</p> <pre><code>$values = []; $values[] = [1, "A", "red"]; $values[] = [2, "B", "blue"]; $values[] = [3, "C", "y...
36,826,687
0
<p>The problem is you didn't implement <code>getItemId()</code>. You are calling the superclass implementation, which simply returns the same value for all positions.</p> <p>At the very least, you can do this:</p> <pre><code>@Override public long getItemId(int position) { return position; } </code></pre> <p>But if you...
13,231,433
0
gnuplot label not displayed <p>I have lots of files to generate a plot for and therefore wrote a little script for gnuplot. I want to add additional information with a label underneath the graph but my label is not displayed on the generated image. Anyone gut an idea?</p> <p>load.plt:</p> <pre><code># template.gnuplot ...
13,607,556
0
<p>The problem was a bit tricky but I manage to solve it.</p> <p>The fact is: <em>if a real postback is not executed</em> (responding with a file is not considered so) the value <em>is still considered "changed"</em>.</p> <p>The only way to solve this problem seems to be "resetting" manually the value of the hiddenfie...
28,782,331
0
I have a customized form but whatever written on the form is not saved in database <p><img src="https://i.stack.imgur.com/NuemA.png" alt="enter image description here">I have a form that uses styles of twitter/bootstrap however the content of the form is not saved. May I please know what am I missing?</p> <pre><code> &...
17,705,693
0
Scala - replace xml element with specific text <p>so i have this XMl</p> <pre><code>&lt;a&gt;blah&lt;/a&gt; </code></pre> <p>And i want to change it to </p> <pre><code>&lt;a&gt;someValueIDoNotKnowAtCompileTime&lt;/a&gt; </code></pre> <p>Currently, I am looking at <a href="http://stackoverflow.com/q/970675/1061426">this...
16,201,109
0
<p>There must be trouble with your click event for your links. It might be a good idea to just make a function responsible for doing whatever action (back/forward), then call that whenever you need it.</p>
17,716,880
0
cannot SetBackground Resource image for android buttons <p>I want button with two states:</p> <ol> <li>OFF </li> <li>ON(or click).</li> </ol> <p>I have set normal image in the button background and I am trying to change image(pressed) from <code>onClick</code> method, but it doesn't change.</p> <pre><code>final Button ...
10,949,691
0
<ul> <li>Don't forget the <em>bootstrap-tooltip.js</em>, which is <a href="http://twitter.github.com/bootstrap/javascript.html#popovers" rel="nofollow">required for popover</a>. </li> <li>Only add the <code>data-content</code> attributes to the <em>new</em> <code>&lt;li&gt;</code>. </li> <li>The selector for popover s...
23,416,410
0
<p>I have found the solution. The problem was that I was trying to use the adapter to get an reference to the views above and below the list item clicked. Instead I could find the appropriate views by using the getChildAt() method on the parent view (the listview itself).</p> <p>It was as easy as writing:</p> <pre><co...
20,204,537
0
<p>Ugh. As simple as this:</p> <pre><code>infixl 1 |&gt;= (|&gt;=) = flip fmap findFiles target = getDirectoryContents target |&gt;= filter (not . (=~ "[0-9]{8}\\.txt$")) |&gt;= filter (=~ "\\.txt$") &gt;&gt;= filterM doesFileExist &gt;&gt;= mapM canonicalizePath </code></pre>
27,646,512
0
<p>copy .ssh folder of C:\Users{Administrator}.ssh to git's working directory</p>
39,343,607
0
Better way to handle common headers and root? <p>Is there a better way to set bearer like a global config rather than setting it each time like this:</p> <pre><code>restClient.setBearerAuth(TokenStore.getInstance().getLocalToken()); </code></pre> <p>The same for root url, is there a global config rather than setting it...
19,965,144
0
<p>Your idea is wrong.</p> <p>DocBook is logical markup. Presentation matters are defined in stylesheets.</p>
18,432,005
0
<p>This looks like a bug in <a href="http://search.cpan.org/dist/XML-Schematron/" rel="nofollow">XML::Schematron</a>. The following line in docbook.sch is not taken into account:</p> <pre><code>&lt;s:ns prefix="db" uri="http://docbook.org/ns/docbook"/&gt; </code></pre> <p>The validation is done by turning the schema i...
38,390,423
0
<p>Try by giving margins and padding to enlarge view</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:padding="1dp" an...
26,012,730
0
Running time of Construction Heuristic in OptaPlanner <p>I am using the OptaPlanner to optimize a chained planning problem which is similar to the VehicleRoutingExample. My planning entities have a planning variable which is another planning entity.</p> <p>Now I am testing a huge dataset with ca. 1500 planning entities...
37,034,208
0
$_request ["request"] in a restful api <p>I am learning to program a restful api and I am confused about some code in this tutorial.</p> <p><a href="http://coreymaynard.com/blog/creating-a-restful-api-with-php/" rel="nofollow">http://coreymaynard.com/blog/creating-a-restful-api-with-php/</a></p> <p>They used </p> <p><c...
12,344,038
0
What caused my splitter to move? <p>I've got an issue that's doing my head in. I have a .net usercontrol with a splitcontainer control on it. The .net usercontrol is actually hosted in a control container in much older non .net legacy code (Visual Objects).</p> <p>The problem I'm having is that I'm getting a splitter_m...
80,787
0
Active threads in ExecutorService <p>Any ideas how to determine the number of active threads running in ExecutorService?</p>
19,523,981
0
<p>This appears to be basically a duplicate of <a href="http://stackoverflow.com/questions/52964/sql-server-random-sort/52976#52976">SQL Server Random Sort</a> which is basically a duplicate of <a href="http://stackoverflow.com/questions/19412/how-to-request-a-random-row-in-sql">How to request a random row in SQL?</a>...
19,979,525
0
<p>You'll need to make the messages in your application use a custom form. That form will need to show the message as well as have the check box. Then you'll want to store that information somewhere. I'm going to say in the application configuration file.</p> <p>So, to save the data in the configuration file, first bu...
15,371,413
0
How to convert a SPARQL query into an RDF file in Jena? <p>I am trying to output an RDF/XML file directly from an SPARQL query from an Oracle database. The query is working fine as I've verified the results in the ResultSet object.</p> <p>However, I'm not sure how to proceed from there. I think I want to create a State...
28,530,996
0
<p>The short answer is no. Welcome to the the fun and exiting world of 1991:) VBA is a subset of VB6. Inheritance was not supported at that time, and because Microsoft based VBA on VB6 and then abandoned* it when they went to .Net, that means it likely never will be:(</p> <p>*They did update it somewhat to cope w/64 b...
21,949,630
0
<p>Say you have two versions of the gem <code>foo</code> installed:</p> <pre><code>$ gem list foo *** LOCAL GEMS *** foo (2.0.1, 2.0.0) </code></pre> <hr> <p>If you use only <code>require</code>, the newest version will be loaded by default:</p> <pre><code>require 'foo' # =&gt; true Foo::VERSION # =&gt; "2.0.1" </code...
10,218,609
0
<p>The Android Open Source Project is your friend. You can make your own build of the stock Android Gallery app and implement this feature yourself.</p> <p>Have fun.</p> <p><a href="http://source.android.com/source/downloading.html" rel="nofollow">http://source.android.com/source/downloading.html</a></p>
28,149,552
0
<p>I think with the .tif format you have to use the command </p> <pre><code>[X,map] = imread('imagename.tif') newmap = rgb2gray(map) imshow(X,newmap) </code></pre> <p>Link to online Matlab help where's this exact example: <a href="http://it.mathworks.com/help/matlab/ref/rgb2gray.html" rel="nofollow">RGB to gray</a></p...
21,355,142
0
how to remove index.php?action=show&id=1234 from url on localhost <p>My URL is localhost/merge/Clients/index.php?action=show&amp;id=12 .. all i want to make it like localhost/merge/Clients</p> <pre><code>RewriteEngine on RewriteBase /Clients/ RewriteCond %{THE_REQUEST} ^.*\/index\.php\ HTTP/ RewriteRule ^(.*)index\.php...
21,548,018
0
Bulk Import Json into Parse.com backend via rest api, almost there <p>Evening all,</p> <p>I just have a quick questions about bulk importing via the rest api. I've tried various methods to automate looping through a file and adding the results to Parse backend without success. One example:</p> <p>curl -X POST \ -H "X-P...
1,415,446
0
<p>Is the performance due to network latency rather than the approach you're taking? What kind of volumes are you dealing with etc.</p> <p>I note they won't do replication or log shipping but could you talk them in to do doing some scheduled bulk exports which could be compressed and sent across for an automated routi...
35,844,227
0
While loop in shell <p>I am trying to run while loop in shell </p> <pre><code> NODESTATE="0" LOOPC="1" while [ "$NODESTATE" -ne "UP" ]; do echo "node is up " </code></pre> <p>but it is throwing me an error with [: UP: integer expression expected or shoud i use != instead of -ne </p>
9,213,719
0
How to append a RANDOM string to all occurrences of another string in file <p>I'm trying to write a bash script that would modify all occurrences of a certain string in a file. </p> <p>I have a file with a bunch of text, in which urls occur. All urls are in the following format:<code>http://goo.gl/abc23</code> (that's ...
29,332,179
0
<p>Ok thanks to @David Arenburg for his suggestion. I've modified it slightly to arrive at the following for my preferred solution</p> <pre><code> text &lt;- NULL for(i in 1:length(m.names)){ text &lt;- paste0(text, m.names[i], " = ", m.names[i], " + i.", m.names[i], ", ") } expr &lt;- parse(text = paste0("\":=\"(", s...
2,645,871
0
<p>One goal of Groovy is to have transparent interoperability with Java. Groovy is by design "a Java dependent language with scripting features". However, I don't think that these features are minor - Groovy has many features that are not found in static programming languages (such as Java).</p> <p>To summarize: If yo...
17,193,805
0
<p>As far as there has always to be a selected element, I think that "unselect" option cannot exist (because might provoke cases where no element is selected). The usual proceeding is just selecting other thing. In this case, I guess that selecting any cell would work for you:</p> <pre><code>Range("A1").Select </code>...
30,594,169
0
<p>You're trying to do this:</p> <pre><code>switch (responsegen) { //... } else //... </code></pre> <p>You can't follow a <code>switch</code> statement with an <code>else</code>. <code>switch</code> uses the <code>default</code> clause within its list of cases as a logical "else". (Which you're using already, so what ...
27,524,018
0
<pre><code> belongs_to :product, touch: true </code></pre> <p>and</p> <pre><code> after_save { product.touch } </code></pre> <p>do the same thing. However touch won't be called on <code>create</code> so you might need to use an <code>after_create</code> callback:</p> <pre><code>after_create :touch_product def touch_pr...
26,816,740
0
<p>This is my answer: the key point is forcing an integer as the index of the <code>seen</code> array by adding <code>0</code> to $1, that by appropriate use of ls and FS is guaranteed to be an integer.</p> <p>About taking track of the maximum value, the input <em>should</em> be sorted, but who knows...</p> <h3><em>Ed...
12,938,327
0
<p>Setting the container to position:relative and the span to 100% seemed to work.</p> <pre><code>.rw-words{ display: block; position: relative; } .rw-words-1 span{ position: absolute; width: 100%; ... } </code></pre> <p><a href="http://jsfiddle.net/willemvb/9Xubs/" rel="nofollow">http://jsfiddle.net/willemvb/9Xubs/</...
19,717,616
0
<p>The fact that you’re using Wine makes no difference in this particular context, which leaves requirements 1 and 2. Requirement 2 –</p> <blockquote> <p>I do not want the process to crash once it exceeds the limit. I want it to use HDD page swap.</p> </blockquote> <p>– is known as limiting the <em>resident set size</...
7,725,822
0
<p>If it were</p> <pre><code>if (mNotification!=null) { mNotification(this, null); } </code></pre> <p>mNotification could be set to null by another thread between <code>if (mNotification!=null)</code> and <code>mNotification(this, null);</code></p>
22,082,547
0
<p>I can think of two and a half pure CSS solutions.</p> <p>First solution requires to wrap all four div's in a container element with <code>position: relative</code> set to it.</p> <p>Then the blue div can be positioned absolutely and forced to inherit the containers/wrappers height (which comes from the total height...
2,087,275
0
Simple clean CMS for programming project website <p>What is the best yet simple CMS for closed-source programming project hosting? I'd like to keep webpage plain and simple, include screenshot, basic features and blog headlines on main page, then have project blog, screenshots gallery, feature list and downloads on sep...
32,250,351
0
<p>we faced same problem on Galaxy s4 with 5.0 update, after trying many solutions we finally changed protocol of url from http to rtsp (e.g. "<a href="http://some/file/url" rel="nofollow">http://some/file/url</a>" with "rtsp://some/file/url")and it resolved the issue</p>
32,013,700
0
<p>I highly recommend you to use jQuery or a proper JavaScript validator library for your form. Here is a simple example of how you can validate an input field with jQuery.</p> <p>HTML part:</p> <pre><code>&lt;input type="text" id="username"&gt; &lt;input type="button" id="sendForm" value="send"&gt; &lt;p id="username...
6,582,792
0
<pre><code>document.getElementById("theButton").onclick(); </code></pre> <p>Here is an <a href="http://jsfiddle.net/w2Vzu/" rel="nofollow">example fiddle</a>.</p>
37,248,621
0
<p>Please get the HTTP status from the response as below.</p> <pre><code>URL url = new URL("http://example.com"); HttpURLConnection connection = (HttpURLConnection)url.openConnection(); connection.setRequestMethod("GET");//Or POST, depending on your service connection.connect(); int code = connection.getResponseCode()...
13,697,945
0
<p>You Can not disable camera in your regular application.but it is possible to disable using admin setting in ICS and higher versions..check it here <a href="http://developer.android.com/guide/topics/admin/device-admin.html" rel="nofollow">http://developer.android.com/guide/topics/admin/device-admin.html</a></p>
28,825,606
0
<p>There's little interest in storing the <code>directory_service</code> object, because it is created without making calls to external APIs.</p> <p>What you should store is the <code>http_auth</code> object, as this one can be costly to generate.</p> <p>In addition, tokens from service accounts can only be requested ...
30,565,072
0
<p>I am not sure whether it is the solution or not,but my value could get and insert each textbox to each particular row without problem, thanks for the help from Peter Campbell and Mairaj Ahmad.</p> <p>hold my transactionNo as following: Dim lblTransactionNo As Label = DirectCast(row.FindControl("lblTransactionNo"), ...
17,684,793
0
Stacked shield doesn't have enough power -- dim PWR light <p>I'm stacking a <a href="http://www.seeedstudio.com/depot/bluetooth-shield-p-866.html" rel="nofollow">SeeedStudio Bluetooth Shield</a> on top of a <a href="https://www.olimex.com/Products/Duino/Shields/SHIELD-EKG-EMG/resources/SHIELD-EKG-EMG.pdf" rel="nofollow...
19,573,491
0
<p>From the curl manual:</p> <pre><code> -k, --insecure (SSL) This option explicitly allows curl to perform "insecure" SSL connections and transfers. All SSL connections are attempted to be made secure by using the CA certificate bundle installed by default. This makes all connections considered "insecure" fail unless...
40,407,307
0
<p>I know this is a bit late but I had a similar problem and I fixed it by adding an <strong>identity</strong> element to the app.config file for the service's endpoint. Example:</p> <pre><code>&lt;identity&gt; &lt;userPrincipalName value="username@domain" /&gt; &lt;/identity&gt; </code></pre> <p>The for me it worked ...
38,820,503
0
Not able to call a web service hosted in Service Fabric <p>I've published a OWIN hosted web service to my remote cluster. I'm using a custom port 4444 created during the cluster creation. I see the AppPort rule for 4444. I'm also able to remote to one of the VM, and invoke the service locally. However, I'm still not ab...
10,059,311
0
<p>Maybe something like this?</p> <pre><code>public TValue RetryHelper&lt;T, TValue&gt;(Func&lt;ObjectSet&lt;T&gt;, TValue&gt; func) where T : class { using (MyEntities dataModel = new MyEntities()) { var entitySet = dataModel.CreateObjectSet&lt;T&gt;(); return FancyRetryLogic(() =&gt; { return func(entitySet); }); } ...
34,285,530
0
<p>You can do it using <code>IF/ELSE</code> conditions.</p> <p>Try</p> <pre><code>&lt;?php $query = $connection-&gt;query('SELECT * FROM users'); while($r = $query-&gt;fetch()) { if($r['status'] == 1) $r['status'] = 'yes'; if($r['status'] == 0) $r['status'] = 'no'; echo "&lt;tr&gt; &lt;td class=\"danger\"&gt;$r[id]&lt...
17,670,269
0
<p>Try this tutorial: <a href="http://idevzilla.com/2010/10/04/uiscrollview-and-zoom/" rel="nofollow">http://idevzilla.com/2010/10/04/uiscrollview-and-zoom/</a></p> <p>It addresses simple zooming and centering.</p>
29,268,589
0
<p>Use the .on() function for this type of events. Check it out:</p> <pre><code> $(function() { // Clickable Dropdown $('.click-nav &gt; ul').toggleClass('no-js js'); $('.click-nav .js ul').hide(); $('.click-nav .js').click(function(e) { $('.click-nav .js ul').slideToggle(200); $('.clicker').toggleClass('active'); e.s...
35,002,830
1
Qpython not working right (beginner) <p>Using qpython on on an asus zenpad 10 z300. After troubleshooting what turned out to be a common raw input problem and learning about console mode i felt encouraged. Tried console mode in the editor and it generated this code:</p> <pre><code>#-*-coding:utf8;-*- #qpy:2 #qpy:consol...
15,336,748
0
Is there a way to add "Postcode" to Sales_Order_Grid in Magento? <p>I am looking for a way to add Shipping or billing postcode to Sales_Order_Grid in magento 1.7</p> <p>I have tried a few different methods but so far the results have either caused an error or a redirect to the main Dashboard when trying to search the c...
14,860,081
0
<p>Use integers and divide down:</p> <pre><code>for(int value = -20; value &lt;= 20; value += 2) std::cout &lt;&lt; (value/10.0) &lt;&lt; std::endl; </code></pre>
17,679,290
0
Mountain Lion Secure Transport SSLHandshake returns errDecryptionFail after Change Cipher Spec <p>On Mountain Lion, running some SSL code that works on Leopard - using the native Secure Transport Framework - the server-side SSLHandshake call fails with errDecryptionFail.</p> <p>Looking at a wireshark trace, the handsha...
3,153,279
0
<p>Are you trying to pass args on the command line?</p> <p>If so, $0 will contain the script name, and $1..n will contain command line args.</p> <p>$@ will contain all command line args, space-separated.</p>
9,424,084
0
<p>Change your code to:</p> <pre><code>for (NSDictionary *file in files) { NSString *userNumber = [file objectForKey:@"UserNumber"]; NSLog(@"output: %@", userNumber); } </code></pre> <p>i.e. <code>file objectForKey...</code>, not <code>result objectForKey...</code>. You're iterating through the <code>files</code> arra...
22,662,835
0
<p>If using FieldSetText, you have to be careful to format the value in a way that's consistent with the user's preferences and/or the settings of the field (e.g. whether the decimal separator is "," or "."). To avoid this source of error, it's better to use the NotesDocument object for this sort of thing. You need a ...
31,566,473
0
adding hebrew value to sql using PDO <p>I am trying to add a Hebrew value to a database using php's PDO class.</p> <p>After finally succeeding doing that (by using: <code>array(PDO::MYSQL_ATTR_INIT_COMMAND =&gt; "SET NAMES utf8"</code>), I found out that <code>COLLATE HEBREW_CI_AS</code> is added to my value.</p> <p>Is...
16,904,300
0
Disable CSS link for 1 second after it has been clicked <p>I'm trying to have a CSS link disabled for 1 second after it has been clicked. </p> <p>I have tried this without success; </p> <p>In the header:</p> <pre><code>&lt;script type="text/javascript"&gt; $(function() { $("#link").click(function() { $("#link").attr("d...
21,394,335
0
Does Clojure's core.async work with RoboVM? <p>I've used <a href="https://github.com/oakes/lein-fruit" rel="nofollow">lein-fruit</a> to generate a basic Clojure project that targets iOS through <a href="http://www.robovm.org/" rel="nofollow">RoboVM</a>. I've introduced core.async to pass button taps along a channel, bu...
17,236,454
0
<p>This function takes a string argument as input</p> <p>The first thing it does is checks the recursive base case. We'll get back to that</p> <p>If the base case is not satisfied, it then checks to see if the first character matches the last character using this code:</p> <pre><code>if (substr($string,0,1) == substr(...
23,070,095
0
Better understanding Ajax CORS <p>I have 3 domains that need to work along...<br> My flow basically works like this:</p> <ol> <li>The user goes to A.com</li> <li>A.com sets a cookie and redirect to B.com</li> <li>B.com ajaxs calls need to send the cookie on requests to C.com</li> </ol> <p>How "can I"/"should I" impleme...
37,699,304
0
Ionic - Remove Disable spinner on splash screen <p>I'm trying to disable spinner on startup splash screen. I can't find where are the settings for this feature. Which folder/file?</p>
34,463,147
0
<p>You can use OnTap event. It is not a perfect solution because this event don't work on Windows (so you have to use conditional defines to debug on Windows), but on at least on Android OnTap isn't raised when you scroll a box (tested on Seattle).</p>
39,927,552
0
Determining if a node stream is in objectMode <p>Given a node js stream object how do I determine if it is an object stream in objectMode? </p> <p>Say I have a readable stream instance</p> <pre><code> const myReadableStream = new ReadableStreamImplementation({ options: { objectMode : true } }); </code></pre> <p>How can...
39,622,214
0
Disable certain Android Studio compilation errors <p>I'm extending a hidden java class so I run into the error</p> <pre><code>Error:Execution failed for task ':app:transformClassesWithInstantRunForDebug'. &gt; class com.company.class.CustomVersion cannot access its superclass java.class.JavaVersion </code></pre> <p>How...
22,787,068
0
javascript: add html to end of <span> (noob) <p>I am sure there must be an easier way that doing this:</p> <pre><code>foo.innerHTML +="&lt;br&gt;"; </code></pre> <p>The above is producing dirty results as there is a textbox in the SPAN and the data from that textbox gets wiped away when using innerHTML.</p> <p>I am try...
40,932,309
0
<p>Just add <code>runat="server"</code> in your html code like this:</p> <pre><code>&lt;a id="topicLink" runat="server" href="default.aspx"&gt; New Topic &lt;/a&gt; </code></pre> <p>Then you can use <code>topicLink</code> to change the href value just as you did. :)</p>
26,104,618
0
<p>The li elements are hard coded into your list. To put them into a div you can either hard code them into the preferred div or use javascript to dynamically change the html code. It would probably be easier to just code a short list into the adjacent div, but if this is a list that gets generated in some way, css ca...
20,251,155
0
<p>Without a stacktrace it can be hard to tell. From what I can see you have two possible culprites.</p> <p><strong>First</strong></p> <pre><code>Bundle extras = getIntent().getExtras(); public final String ID_CITY = extras.getString("CITY_TH"); </code></pre> <p>In your Search class you are trying to get data from bun...
2,757,476
0
Android Cursor size <p>Anyone knows how to change cursor size in Edittext in Android???</p> <p>I'm trying to implement SMS function. I used EditText and tried to put background image. The background image has lines so I need to put extra space between lines so that the background image and the lines fit nicely. But... ...
7,691,666
0
<p>You should go with the second approach.</p> <p>One possible solution is a greedy algorithm. Define your set of transformations as a regular expression (used to test the pattern) and a function which is given the regexp match object and returns the transformed string.</p> <p>Regular expressions aren't quite powerful...
18,930,069
0
<p>Use The <code>NonActionAttribute</code>. It allows you to mark public methods in a controller as not being available for external requests.</p> <p><a href="http://weblogs.asp.net/gunnarpeipman/archive/2011/04/09/asp-net-mvc-using-nonactionattribute-to-restrict-access-to-public-methods-of-controller.aspx" rel="nofol...
39,698,624
0
<p>I think you need to rethink your design!</p> <p>"Undo" implies that a transaction is open and that specific transaction is rolled back. You can do this for instance by encapsulating your entire GUI in a transaction but that is bad practice. It will give long transactions, locking issues, bi-file growth and potentia...
27,157,347
0
<p>The answer is highly situational. In general, you want to handle exceptions elegantly whenever possible. That is, try to resolve / ignore them where you can. An IndexOutOfBoundsException is very often an example of where this is not possible.</p> <p>Hard breaks because of exceptions is a last-resort. Do this only w...
31,633,257
0
<p>I think you forget array like this:</p> <pre><code>1 0 0 9 1 1 0 1 0 1 1 1 0 0 0 1 </code></pre> <p>your recursive function will not be finished in the previous example, please check the size of array to finish recursion.</p> <p>Also your algorithm does not use up and right to find cheese</p> <p>EDIT</p> <p>you sho...
34,294,372
0
What are the cases in general which require template argument to be complete? <p>Consider simple code :</p> <pre><code>struct x; template&lt;typename&gt; void func(){} int main() { func&lt;x&gt;(); return 0; } </code></pre> <p>This above code doesn't requires class <code>x</code> to be complete, are there any other cas...
30,877,931
0
<p>As per my understanding, you want to filter-out file names with a specific file type/extension (ex: pdf) from the main list <code>uploadedfilenames</code>. This is one of the easiest ways:</p> <pre><code>&lt;cfset lFileNames = "C:\myfiles\proj\icon-img-12.png,C:\myfiles\proj\sample-file.ppt,C:\myfiles\proj\fin-doc1...
32,432,634
0
<p>Ideally the web service would use one of the HTTP status codes to tell the client there was a problem, then you could use a response descriptor specifically to handle that and an <code>NSError</code>.</p> <p>You can use a dynamic mping which checks the result type and determines how to process the result. Depending...
24,870,822
0
<p>As @leppie points out, the accepted solution does not match your text. I would have thought of the following:</p> <pre><code>(define (iterator start step end) (lambda () (if (&gt;= start end) '() (begin0 start (set! start (+ start step)))))) </code></pre> <p>testing:</p> <pre><code>(define i (iterator 0 2 7)) (i) =...
27,364,086
0
<p>Try to save your code at jsfiddle, show it.</p> <p>Start debugging:</p> <ol> <li>response - <code>console.log(xml);</code></li> <li>is true - <code>$('#selectYear option').length == 0</code></li> <li>is largest then 0 - <code>$(xml).find('year').length</code></li> </ol>
10,610,208
0
<p>That's because you are not translating it, when you use CGAffineTransformMakeTranslation you are saying <em>Give me these coordinates</em> not <em>give me this offset</em>. In other words, make translation gives you the translation from the <em>identity</em> matrix. The function you want is CGAffineTransformTransla...
30,070,051
0
<p>Try to add method atribute for form, like</p> <pre><code>&lt;form action="'+url+'" method="post" target="_blank"&gt;&lt;/form&gt; </code></pre> <p><strong>UPDATED</strong> But you can't store data in your url. Post should send params in body, not in URL. So your url should be like '/index.php'. And your params shou...
38,659,084
0
<p>You can use Core Data for local storage. You can do the upload functionality whenever the net is connected by using NSNotificationCenter in the Reachability code. Please refer the Reachability class sample code from the apple developer site. <a href="https://developer.apple.com/library/ios/samplecode/Reachability/I...
7,619,499
0
getting distinct column name and count when based on another table <p>i have the following query:</p> <pre><code>select cc.category from companies c left join categories cc on c.category_id = cc.category_id where company_title like '%gge%'; </code></pre> <p>which return categories with duplicate rows. what i need is to...
23,766,273
0
Where do I calculate my style strings in ember.js? <p>I have an ember.js app</p> <pre><code>var App = Ember.Application.create({ LOG_TRANSITIONS: true }); App.ApplicationAdapter = DS.FixtureAdapter; //==============================ROUTER============================== App.Router.map(function() { this.resource('organisat...