pid
int64
2.28k
41.1M
label
int64
0
1
text
stringlengths
1
28.3k
17,280,926
0
<p>You have to prevent the default <code>onclick</code>-behaviour with <code>event.preventDefault</code>:</p> <pre><code>$("button#edit&lt;?= $list['ID']; ?&gt;").click(function(e) { e.preventDefault(); $('#longURL&lt;?= $list['ID']; ?&gt;').html("&lt;input type='text' value='&lt;?= $list['longURL']; ?&gt;' /&gt;"); $...
8,416,406
0
<pre><code>for i, fname in enumerate(dirList): print "%s) %s" % (i + 1, fname) selectedInt = int(raw_input("Select a file above: ")) selected = dirList[selectedInt - 1] </code></pre> <p>However, note that there is no error correction done. You should catch cases, where the input is no integer.</p>
3,720,900
0
How does JavaScript interpret indexing? <pre><code>function highlightRow(searchRow) { if(searchRow != null) { var oRows = document.getElementById('Table').getElementsByTagName('tr'); //use row number to highlight the correct HTML row. var lastTwo = searchRow; lastTwo = lastTwo.slice(-2); //extract last two digits oRows...
23,743,825
0
Keep getting BAD_ACCESS when compiling C in Xcode <p>If I start a new Command Line C Project in Xcode and enter the following code I always get a EXC_BAD_ACCESS error when compiling the project.</p> <pre><code>int main(int argc, const char * argv[]) { char *foo = "Hello"; *foo = 'M'; // get EXC_BAD_ACCESS here when com...
37,107,327
0
<p>If you want to send Push Notification on multiple platform use <a href="https://parse.com" rel="nofollow">Parse.com</a> but problem here is Parse.com is going to stop its services in January 28, 2017. You have alternatives like <a href="https://www.urbanairship.com/" rel="nofollow">urban airship</a> and many more. ...
3,935,900
0
How to commit and rollback transaction in sql server? <p>I have a huge script for creating tables and porting data from one server. So this sceipt basically has - </p> <ol> <li>Create statements for tables.</li> <li>Insert for porting the data to these newly created tables.</li> <li>Create statements for stored procedu...
1,093,319
0
<p>Adding a ParentNode property to each node is "not really that bad". In fact, it's rather common. Apparently you didn't add that property because you didn't need it originally. Now you need it, so you have good reason to add it.</p> <p>Alternates include: </p> <ul> <li>Writing a function to find the parent of a chil...
14,068,125
0
<p>PHP is indeed a <strong>server-side</strong> application and thus cannot perform <strong>client-side</strong> validation. </p> <p>If you really want to do client-side validation, you'll probably have to use javascript. Have a look at the <a href="http://bassistance.de/jquery-plugins/jquery-plugin-validation/" rel="...
9,899,648
0
Jquery UI disable dynamic tabs <p>My UI tabs can change based on user action (example - a status message may appear in tab[0]). </p> <p>I also need to be able to disable specific tabs - I know the href, but the index may well change.</p> <p>The UI dox say that you can pass a href instead of an index, but I can't seem t...
924,834
0
<p>You can use <code>Configure::read('Config.language')</code>. A part of the CakePHP cookbook states:</p> <blockquote> <p>The current locale is the current value of Configure::read('Config.language'). The value of Config.language is assigned in the L10n Class - unless it is already set.</p> </blockquote> <p>I18n, the...
40,194,256
0
<p>Your immediate problem is that you need parentheses around <code>(List.length xs)</code>. The code also treats an empty input list as an error in all cases, which is not correct. An empty list is a legitimate input if the desired length <code>k</code> is 0.</p> <p><strong>Update</strong></p> <p>You also have one ex...
3,397,043
0
<p>You can just use Windows Explorer. Open Windows Explorer and go into the <code>assembly</code> folder inside your Windows folder. You should then see all the assemblies that are registered, if you want to add yours in, just drag and drop it in there.</p> <p>Or if you prefer, you can locate the gacutil.exe and use t...
16,257,105
0
<p>Use a Backtick <code>`</code> to escape <code>"</code></p> <blockquote> <p>IfWinExist, "`"C:\Program Files (x86)\Git\" ahk_class VirtualConsoleClass</p> </blockquote>
33,742,599
0
<p>You have some acceleration function</p> <pre><code>a(p,q) where p=(x,y,z) and q=(vx,vy,vz) </code></pre> <p>Your order 1 system that can be solved via RK4 is</p> <pre><code>dotp = q dotq = a(p,q) </code></pre> <p>The stages of the RK method involve an offset of the state vector(s)</p> <pre><code>k1p = q k1q = a(p,q...
19,280,494
0
What are inline PHP tags utilizing the PHP shortcut operator? <pre><code> &lt;html&gt; &lt;head&gt;&lt;/head&gt; &lt;body&gt; &lt;h1&gt;Welcome to Our Website!&lt;/h1&gt; &lt;hr/&gt; &lt;h2&gt;News&lt;/h2&gt; &lt;h4&gt;&lt;?=$data['title'];?&gt;&lt;/h4&gt; &lt;p&gt;&lt;?=$data['content'];?&gt;&lt;/p&gt; &lt;/body&gt; &...
4,828,109
0
Create new identifier with macros <p>I want a macro that create a new identifier like</p> <pre><code>(new-name first second) =&gt; first-second </code></pre> <p>that could be used to define new toplevel bindings</p> <pre><code>(define-syntax define-generic (syntax-rules () ((define-generic (name a b ...)) (begin (defin...
36,075,549
0
<p>You should unquote to the true:</p> <pre><code>if(html==true) //or just, if(html) </code></pre> <p>Otherwise it will look for string "true" and this is why it goes to the else part.</p>
1,470,480
0
<pre><code>class Greeting(db.Model): author = db.UserProperty() content = db.StringProperty(multiline=True) date = db.DateTimeProperty(auto_now_add=True) </code></pre> <p>This code instructs the ORM (object relational mapper) to create a table in the database with the fields "author", "content" and "date". Notice how ...
39,980,536
0
Geolocation.getCurrentPosition: Timeout expired <p>I am using Ionic2.</p> <p>I am using the following code, but get an error:</p> <pre><code>import { Geolocation } from 'ionic-native'; public getPosition(): void { if (this.markers &amp;&amp; this.markers.length &gt; 0) { var marker: google.maps.Marker = this.markers[0]...
34,970,499
0
AWS S3 + CDN Speed, significantly slower <p>Ok,</p> <p>So I've been playing around with amazon web services as I am trying to speed up my website and save resources on my server by using AWS S3 &amp; CloudFront. </p> <p>I ran a page speed test initially, the page speed loaded in <strong>1.89ms</strong>. I then put all ...
19,440,168
0
<p>you're creating temporary variable <code>a</code> in function <code>calculateFlexibility</code>, then you store pointer to <code>f.flex</code> variable, but after function is ended - <code>a</code> is gone from memory, so your <code>f.flex</code> pointer is now pointing to nowhere</p> <p>if you want to have really ...
16,670,708
0
<p>finally it was fixed, the problem was with the encryption of the file, I put it UTF8 without BOM instead of UTF8 </p>
12,171,220
0
<p>div is a block element and it take the whole place horizantly, to place another div in parallel you need to use css property float left . use style property <code>style="float:left"</code>.</p> <p><code>&lt;div id="accountstabs-1"&gt; &lt;div id="links" style="text-align:left; float:left"&gt; &lt;li&gt;&lt;a href="...
1,270,689
0
<p>As an ex one-liner:</p> <pre><code>:syn clear Repeat | g/^\(.*\)\n\ze\%(.*\n\)*\1$/exe 'syn match Repeat "^' . escape(getline('.'), '".\^$*[]') . '$"' | nohlsearch </code></pre> <p>This uses the <code>Repeat</code> group to highlight the repeated lines.</p> <p>Breaking it down:</p> <ul> <li><code>syn clear Repeat</...
15,181,051
0
Simple TextView and ImageView "Hello" App <p>I'm trying to run a simple greeting app that displays some text and 2 clipart-type images. I think I put my image files in the right place and named everything correctly but when I run it, the console gets stuck on the following message, without going any further. Any sugges...
28,936,698
0
<p>The first solution works fine, I get all areas except the ones of TBA, HBA and AWN. (My datasource is a POSTGIS-DB)</p> <p>I tried the other two as well:</p> <ul> <li>EXPRESSION /^[TBA|HBA|AWN]/: I get the areas of TBA,HBA and AWN (with NOT it doesn't work) </li> <li>EXPRESSION ("[zustaendigkeit]" NOT IN "TBA,HBA,A...
15,031,198
0
Templates, variadic function, universal references and function pointer : an explosive cocktail <p>Consider the following code and the <code>apply</code> function :</p> <pre><code>// Include #include &lt;iostream&gt; #include &lt;array&gt; #include &lt;type_traits&gt; #include &lt;sstream&gt; #include &lt;string&gt; #i...
18,726,618
0
<p>You could use the <code>Url</code> helper to create the right url using the table routes rules. For sample:</p> <pre><code>window.location = '@Url.Action("RejectDocument", "YourController", new { id = 222, rejectReason = "this is my reject reason" })'; </code></pre>
39,802,637
0
<pre><code>SELECT * FROM ticket_message ORDER BY created_at DESC LIMIT 5; </code></pre> <p>If the framework won't let you say that, the fie on them.</p> <p>(<code>GROUP BY</code> is not appropriate.)<br> (Subqueries are not required.)</p>
7,602,199
0
<p>Did you try just triggering a click?</p> <pre><code>$('button.butter').click(); </code></pre>
4,529,350
0
<p><a href="http://articles.sitepoint.com/article/ajax-jquery" rel="nofollow">Easy Ajax with jQuery</a></p> <p><strong>I also learned AJAX/jQuery step by step from this platform by postings different scenarios question. Here are my some questions that will be helpful for you also</strong></p> <ul> <li><p><a href="http...
9,926,097
0
<p>Main problems:</p> <p>Database variable should be private, and dont create new variable in constructor.</p> <pre><code>private ArrayList&lt;String&gt; Database; public MovieDatabase(){ this.Database = new ArrayList&lt;String&gt;(); } </code></pre> <p>Your search methods returns list, but doesn't have return stateme...
11,869,820
0
TSQL Passing a varchar variable of column name to SUM function <p>I need to write a procedure where I have to sum an unknown column name.</p> <p>The only information I have access to is the column position.</p> <p>I am able to get the column name using the following:</p> <pre><code> SELECT @colName = (SELECT column_nam...
39,832,012
0
Does gcc use "LD_LIBARRY_PATH" when doing linking '-L'? <p>I've got libo.a file under current directory, I found I have to use '-L.' to make gcc able to find current directory's archive files.</p> <p>I know under linux/solaris, there's environment variable of "LD_LIBRARY_PATH" to specify shared_library path. I found it...
19,397,143
0
actionscript 3 export data to XML <p>How do I export data from my SWF file to an XML file?</p> <p>For example if there are 10 players (dyna blaster style game) and you want to store the scores over a longer period of time in a Excel file. You have to have the game create an XML file first, I figured that out myself. Bu...
36,270,761
0
<p>AuditReaderFactory only has two static methods. Can you autowire a SessionFactory object or your EntityMananger? Looks like either would give you what you want, which is access to an AuditReader.</p> <pre><code>AuditReaderFactory.get(sessionFactory.getCurrentSession()) </code></pre> <p><strong>EDIT</strong> <a href...
24,956,706
0
use *this as std::shared_ptr <p>here is a "chess++" problem that I'm facing wright now with my nested class, although it may look like some joke, it's not a joke but real problem which I want to either solve or change the way to achieve the same thing in my project.</p> <pre><code>#include &lt;map&gt; #include &lt;memo...
8,266,818
0
<p>In iOS 5 you can use the UIAppearance protocol to set the appearance of all UINavigationBars in your app. Reference: <a href="http://developer.apple.com/library/IOs/#documentation/UIKit/Reference/UIAppearance_Protocol/Reference/Reference.html#//apple_ref/occ/intf/UIAppearance">link</a>.</p> <p>The way I got a solid...
14,373,981
0
cloud foundry uploading error <p>Get the below error on doing <code>vmc push</code></p> <pre><code>Errno::EINVAL: Invalid argument - C:/DOCUME~1/lihengxu/LOCALS~1/Temp/.vmc_blog_files/E: C:/Ruby187/lib/ruby/1.8/fileutils.rb:243:in `mkdir' C:/Ruby187/lib/ruby/1.8/fileutils.rb:243:in `fu_mkdir' C:/Ruby187/lib/ruby/1.8/fi...
27,246,620
0
Pass Array as parameter in DB2 Stored Procedure <p>I am trying to create a stored procedure which takes an array as a parameter and in the WHILE loop iterates through this array and adds the chars into a table.</p> <p>For example if I had an array of ['a','b','c'] I would want to pass this into my stored procedure and ...
7,431,908
0
Wifi Device to Device Communication problem <p>I wrote a code in my application to enable Device to Device wifi Communication(transferring only a text/string).The code is same as the Apple's sample <strong>Witap</strong> Application which is downloaded from Developer.Apple.com.</p> <p>Its working in my network fine and...
1,491,029
0
<p><strong>First:</strong> I would really re-check your original code for the conditions, while its possible there is a bug in the query optimizer its more likely there was a bug on the expression used and it really didn't represent the below:</p> <blockquote> <p>var DesiredList = db.Things.Where(t=> condition1 || (!c...
39,063,011
0
gsap animation - import only one svg or multiple svgs <p>I would like to do "complex" animation with gsap and svgs. but I don't know what is the best approach to this. it is better to create and to import an unique svg with all the elements or maybe it is better 4 different svgs?</p> <p>I have 4 different characters: a...
30,731,510
0
<p>I have resolved the issue by calculating pinv from Eigen, instead of Armadillo. </p> <p>The function definition I used for Eigen, based on this bug report: <a href="http://eigen.tuxfamily.org/bz/show_bug.cgi?id=257" rel="nofollow">http://eigen.tuxfamily.org/bz/show_bug.cgi?id=257</a></p> <p>is: </p> <pre><code>temp...
20,857,325
0
Newtonsoft.Json.JsonSerializationException <pre><code> i'm trying to convert the json to C# objects by the statement var organizations = response.Content.ReadAsAsync&lt;IEnumerable&lt;Organization&gt;&gt;().Result; i found so many questions like the same what i'm facing now but i didn't found the proper answer may i kn...
22,558,607
0
The exception that is generated when SQLite returns an error.
35,227,417
0
Custom GcmListenerService not working <p>This is my manifest file </p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android" package="be.customapp" &gt; &lt;uses-permission android:name="android.permission.INTERNET" /&gt; &lt;!-- GCM: keep device...
8,151,662
0
TestNG enabled = false tests not showing as Skipped <p>We have a number of TestNG tests that are disabled due to functionality not yet being present (enabled = false), but when the test classes are executed the disabled tests do not show up as skipped in the TestNG report. We'd like to know at the time of execution how...
16,362,186
0
<p>Here is your validation simplified, and with the correct operation to check the length of the id.</p> <pre><code>if(empty($number)) { $msg = '&lt;span class="error"&gt; Please enter a value&lt;/span&gt;'; } else if(!is_numeric($number)) { $msg = '&lt;span class="error"&gt; Data entered was not numeric&lt;/span&gt;'...
30,565,155
0
<p>the question is a bit too broad. </p> <p>you have to step back and look at how source code in general ends up being executed (i.e. it is used). </p> <p>In case of some programming languages (e.g. C/C++) it's compiled to a native form and can be executed directly afterwards;</p> <p>In case of other languages it's co...
8,804,593
0
How to enable code coverage without using Visual Studio? <p>I have 80+ VS2010 solutions, each contains some unit test projects.<br> All solutions are merged into one big solution before build process.<br> All tests (or some test subset) are executed after the successful build.</p> <p>I want to enable test code coverage...
7,593,294
0
<p>wirte this in your css <code>word-wrap:break-word;</code> css:</p> <pre><code>#id_div_comments p{ word-wrap:break-word; } </code></pre>
29,228,982
0
<p>You can get the value using jQuery '.val()' function. <a href="https://api.jquery.com/val/" rel="nofollow">Jquery.fn.val()</a></p> <p>You can see how it works in the following example:</p> <p><a href="http://jsfiddle.net/uoL3s610/" rel="nofollow">http://jsfiddle.net/uoL3s610/</a></p> <pre><code>$(document).ready(fu...
22,774,115
0
Google Maps API data.setStyle not showing icons on map <p>I'm trying to create a little app using the Google Maps JS API. I'm using the data layer to load a bunch of points from a GeoJSON file. The file seems to be loading properly, and the map is displaying, but the icons that are set in the map.data.setstyle() won't ...
16,743,471
0
<p>Thomas's answer is much better than any of the three approaches I tried. Here I compare the four approaches with <code>microbenchmark</code>. I have not yet tried Thomas's answer with the actual data. My original nested for-loops approach is still running after 22 hours.</p> <pre><code>Unit: milliseconds expr min l...
15,164,620
0
<p>Instead of trying to parse the output of <code>ls</code>, <a href="http://mywiki.wooledge.org/ParsingLs" rel="nofollow">which is bad</a>, you should simply use file system operation provided by node.js. Using file system operations you can be sure your program will work in (almost) any edge case as the output is we...
40,420,033
0
polymer init bash: polymer: command not found <p>Install git. Install the latest version of Bower. npm install -g bower npm install -g polymer-cli install these one but polymer init bash: polymer: command not found i am trying so many times but not resolve this error please solve this error $ npm install -g polymer-cli...
33,297,381
0
<p>Maybe this is what you're trying to do:</p> <pre><code>def finalFuture(): Future[Option[(A1, Option[B1])]] = for ( o1 &lt;- outerFuture(); o2 &lt;- o1 match { case Some(a) =&gt; innerFuture(a.id).map(b =&gt; Some(a, b)) case _ =&gt; Future(None) } ) yield o2 </code></pre>
37,072,931
0
Getting HTML elements via XPath in bash <p>I was trying to parse a page (<a href="http://www.kaggle.com/competitions" rel="nofollow">Kaggle Competitions</a>) with <code>xpath</code> on MacOS as described in <a href="http://stackoverflow.com/questions/4984689/bash-xhtml-parsing-using-xpath">another</a> SO question:</p> ...
36,919,165
0
<p>You're only calling <code>receiveBytes</code> once, so that's why you only get one answer.</p> <p>To receive the multiple individual answers you'll need to call <code>receiveBytes</code> repeatedly, and most likely implement a timeout after which you give up waiting for any more responses to be received (since you ...
23,684,202
0
<p>Here's a function that works for Chrome, Safari, and Firefox. See the test page here:</p> <h3>Test Page: <a href="http://phrogz.net/SVG/CalculateSVGViewport.html" rel="nofollow">http://phrogz.net/SVG/CalculateSVGViewport.html</a></h3> <pre class="lang-js prettyprint-override"><code>// Given an &lt;svg&gt; element, ...
37,062,987
0
<p>I don't think that what you are asking for is possible, mainly because I do not think televisions have that kind of ability. I recommend you visit Android and/or LG forums to see if there is something better, for this site is mainly used for programming issues.</p>
4,728,492
0
<p>This is not going to be fun to debug. i suggest a google search like this one to maybe find an exsiting bug report dealing with this:</p> <p><a href="http://www.google.com/search?rlz=1C1ASUT_enUS401US401&amp;sourceid=chrome&amp;ie=UTF-8&amp;q=glTexSubImage2D1+core+dump#sclient=psy&amp;hl=en&amp;rlz=1C1ASUT_enUS401U...
14,347,509
0
<p>So I came up with a different solution. Instead of trying to save an array, I just saved the post ID which would allow me access to the title of the post as well as the permalink.</p> <p>This is my modified code</p> <pre><code>&lt;select name="pastor_select"&gt; &lt;?php $args = array( 'post_type' =&gt; 'employee',...
36,472,256
0
How to set the child control size inside ellipse when resize wpf <p>I am creating a user control which has a shape (a curved line) inside a circle. I used ellipse control to create the circle.how to keep the size of the shape inside the ellipse when resize? </p>
11,672,334
0
save special character in Database using Grails <pre><code>new Trainingcamp(name:"HΓΆhentraining", region:"Alpen").save() tr1 = Trainingcamp.findByName("HΓΆhentraining") tr2 = Trainingcamp.findByRegion("Alpen") println("Tr1: " + tr1?.name) println("Tr2: " + tr2?.name) </code></pre> <p>Output on console is:</p> <pre><code...
35,500,216
0
<pre><code> YourListView.setOnItemClickListener(new ListView.OnItemClickListener() { @Override public void onItemClick(AdapterView&lt;?&gt; a, View v, int pos, long l) { try { Toast.makeText(this,"Position is===&gt;&gt;"+pos , Toast.LENGTH_LONG).show(); } catch(Exception e) { System.out.println("Nay, cannot get the se...
13,840,495
0
mysql - combining 2 tables with different condition <p>Here i have 2 tables user and userStore</p> <pre><code>user Table ╔════╦══════╦════════╦═══════════╗ β•‘ ID β•‘ NAME β•‘ ROLE β•‘ STORECODE β•‘ ╠════╬══════╬════════╬═══════════╣ β•‘ 1 β•‘ A β•‘ Admin β•‘ β•‘ β•‘ 2 β•‘ B β•‘ Store β•‘ 1 β•‘ β•‘ 3 β•‘ C β•‘ Store β•‘ β•‘ β•‘ 4 β•‘ D β•‘ Client β•‘ β•‘ β•‘ 5 β•‘ E β•‘ Sta...
6,270,977
0
<pre><code>&lt;script type="text/javascript"&gt; function pageLoad() { window.document.getElementById('__EVENTARGUMENT').value = ''; } &lt;/script&gt; </code></pre>
39,160,340
0
<p>yes better way is change textbox in razor view @Html.TextboxFor bind automaticaly or other way is you can add</p> <pre><code>[HttpPost] public ActionResult AddtopoOrderList(string Qty, string ProductName, string Description, string Price, string Amount) { POdb.poOrderList.Add(new PO_OrderList { Qty = Convert.ToInt3...
5,867,844
0
Change letter case in jEditable input fields <p>I would like to change case (all caps or capitalize first letter of sentence) when editing field in place with <a href="http://www.appelsiini.net/projects/jeditable/" rel="nofollow">jEditable</a> plugin. My code looks similar to this:</p> <pre><code>$(".edit").editable("s...
28,928,833
0
<p>You can apply multiple style to a string in Textview by using following method :</p> <pre><code>TextView textView = (TextView) findViewById(R.id.tvText); String strFirst = "Text1"; String strSecond = "Text2"; Spannable spanTxt = new SpannableString(strFirst+strSecond); </code></pre> <p>// Set the custom typeface to...
32,504,887
0
<p>You can try this:</p> <pre><code>$(function () { $('.radio')[0].nextSibling.data = 'Screen Printing' }); </code></pre> <p><a href="http://jsfiddle.net/palash/xb1kv06g/2/" rel="nofollow"><strong>FIDDLE DEMO</strong></a></p>
15,021,826
0
Metasearch rails gem multiple time search by field <p>I have such code of searching (with metasearch rails gem):</p> <pre><code>@pre_oils = Oil.search({:manufacturer_like =&gt; params[:oilbrand], :description_like =&gt; params[:oiloiliness], :description_like =&gt; params[:oilstructure], :capacity_eq =&gt; params[:oils...
16,127,648
0
<p>I don't know of an existing algorithm that's really suited to this task. The obvious alternative is to write roughly the code above, but as a generic algorithm:</p> <pre><code>template &lt;class InIter1, class InIter2, class OutIter&gt; OutIter unsorted_merge(InIter1 b1, Inter1 e1, inIter2 b2, OutIter r) { while (b...
18,754,795
0
<p>The convention for REST is that we use HttpMethods for CRUD operations selection:</p> <ul> <li>GET - Read opeation (list and GetById)</li> <li>POST - Insertion</li> <li><strong>PUT</strong> - Udpating</li> <li>DELETE - Deletion</li> </ul> <p>The detailed description: <a href="http://www.asp.net/web-api/overview/cre...
39,155,598
0
What is the best way to represent constant in YAML? <p>I writing a framework where we represent code in YAML and on the fly it will get converted to Java code.</p> <p>What is the best way to represent java function in YAML? </p> <pre><code>Configuration: - name1: "a" - name2: computeName() </code></pre> <p>While parsin...
12,289,216
0
<pre><code>$('a[id]').closest('li').addClass('active'); </code></pre> <p><a href="http://jsfiddle.net/zZ2D4/" rel="nofollow">demo</a></p>
14,291,674
0
<p><strong>LISTEN TO YOUR ERRORS!</strong></p> <p>I don't mean to sound rude, but the problem is up on a soapbox outside your open window with a loudspeaker:</p> <blockquote> <p>res\drawable-xhdpi\video-unhover.png: Invalid file name: must contain only [a-z0-9_.]</p> </blockquote> <p><strong>must contain only [a-z0-9_...
20,057,156
0
Java AI for 2D game <p>Im creating a 2D game. Where the hero moves in a map. Where there are walls which the hero obviously cant go through. And i have enemies that are simple AI. So far the AI just move in random directions. The next step would be introducing another mode for the AI where he knows the hero position an...
22,665,951
0
Why is NullReferenceException being returned when trying to add an object to my cache? <p>This is an asp.net-mvc application and I am trying to add an object, specifically a list of user objects to the cache. I feel like I'm missing a key concept or component when it comes to caching data, so any help would be greatly ...
20,075,028
0
Garbage collector going crazy <p>I have just noticed that because of one action(that i am trying to find out) virtual machine stucked few times(looks like Garbage Collector stopped the world). Normally small GC takes 0.05 second and suddently something happened, i can see in logs that it increased to even 15 seconds pe...
17,651,719
0
<p>Try this:</p> <pre><code>#/bin/bash maxcount=`read wc -l file1 file2 file3 | sort -h -r | sed -rn '2s/^ *([0-9]+).*/\1/'` exec 4&lt;file1 exec 5&lt;file2 exec 6&lt;file3 while [ $maxcount -gt 0 ]; do read -a f1&lt;&amp;4 read -a f2&lt;&amp;5 read -a f3&lt;&amp;6 echo ${f1[0]},${f1[1]},${f2[0]},${f2[1]},${f3[0]},${f...
39,788,580
0
<p>Try following code:</p> <pre><code>function SetOneplusyearminus1date() { debugger; var start = Xrm.Page.getAttribute("msdyn_startdate").getValue(); if (start != null) { start.setDate(start.getDate() - 1); start.setYear(start.getFullYear() + 1); Xrm.Page.getAttribute("msdyn_enddate").setValue(start); } } </code></pr...
36,242,860
1
Attribute error while using opencv for face recognition <p>I am teaching myself how to use openCV by writing a simple face recognition program I found on youtube. I have installed opencv version 2 as well as numpy 1.8.0. I am using python2.7.</p> <p>I copyed this code exactly how it was done in the video and article li...
8,358,207
0
<p>You can match any non-(letters, digits, and underscores) characters with <code>\W</code>.</p> <p>So to check the password if has any special character you can just simply use:</p> <pre><code>if (password.match(/\W/)) { alert('you have at least one special character'); } </code></pre> <p>to use it in your function y...
21,873,610
0
jquery.touchwipe.cycle slider NOT WORKING for WINDOWS PHONE TOUCH SWIPE <p>we have used jquery.touchwipe.cycle JQuery in our site for image slider. Though the touch swipe works fine in iPhone, it does not work in windows phone (lumia 520 | windows 8)</p>
23,419,903
0
<p>Just add this line:</p> <pre><code>$('[class^=menu]').hide('fadeIn'); </code></pre> <p>Like this:</p> <pre><code>$(document).ready(function () { //hide all dropdown menus $("#pageHeadings div[class^=menu]").hide(); $("#pageHeadings div[id^=heading]").click(function () { // $(this).find('[class^=menu]').hide(); if (...
5,544,300
0
<p>This should work.</p> <pre><code>SELECT * FROM player WHERE height &gt; CASE WHEN @set = 'tall' THEN 180 WHEN @set = 'average' THEN 154 WHEN @set = 'low' THEN 0 END </code></pre> <p>I'll leave the &lt; case for your enjoyment.</p>
35,003,851
0
Is PyramidAdaptedFeatureDetector gone in OpenCV 3? <p>I have an OpenCV 2 C++ program which makes use of <a href="http://docs.opencv.org/2.4/modules/features2d/doc/common_interfaces_of_feature_detectors.html#pyramidadaptedfeaturedetector" rel="nofollow"><code>PyramidAdaptedFeatureDetector</code></a> (used over a <a href...
14,964,668
0
Accessing the file created in internal storage <p>I decided to save a file using internal storage into a folder. My code is:</p> <pre><code>File dir = new File (getFilesDir(), "myFolder"); dir.mkdirs(); File file = new File(dir, "myData.txt"); try { FileOutputStream f = new FileOutputStream(file); PrintWriter pw = new ...
3,627,718
0
<p>If you want to make parsing very easy, try <a href="http://jsoup.org/" rel="nofollow noreferrer">Jsoup</a>:</p> <p>This example will download the page, parse and get the text.</p> <pre><code>Document doc = Jsoup.connect("http://jsoup.org").get(); Elements tds = doc.select("td.bodybox"); for (Element td : tds) { Str...
22,471,171
0
<p>Try calling <code>invalidateLayout</code> on your layout before calling <code>reloadSections:</code>. That will cause the layout to be re-applied after the sections are redrawn, which should cause your footer to redraw.</p>
35,473,846
0
<p><em>p, just p, no asterisk, no brackets</em> gives the address of the first element of the array <code>p[]</code>. <code>*p</code> on the other hand gives the value of the first element of the array <code>p[]</code>, which happens to be the address of the first element of the array <code>n[]</code>, according to th...
11,593,960
0
Loading html5 pages which use javascript into a webview for a native iOS App <p>Was wondering if anyone knew how to load html5 pages which use javascript into a webview in XCode. I keep getting errors and the main one is <code>warning: no rule to process file '$(PROJECT_DIR)/donk/javascript/highlight.pack.js' of type s...
16,827,360
0
CodeIgniter Pagination is not working with routing <p>I want to show all users page wise initially. So if I browse <code>http://mydomain/user</code> it will redirect to <code>http://mydomain/user/page/1</code> and so on. But if I browse <code>http://mydomain/user/1</code> it will show only single user with id of user. ...
28,269,713
0
Drawing a line with a pixmap brush in Qt? <p>For some time I'm developing a simple drawing and painting app with Qt/C++. </p> <p>Currently I'm using QPainter::drawLine() to draw, and it works fine.</p> <p>What I want to do is drawing with pixmap brushes, which in a way I can do. I can draw with single color filled pixm...
29,455,119
0
<p>The problem can be that you requesting a SignedUrl for a PUT request but you later on POST the file to S3. You should PUT the file to S3 not POST.</p> <p>SignedUrls only allow GET and PUT right now.</p> <p>For more info see this answer: <a href="http://stackoverflow.com/questions/19322697/upload-file-from-angularjs...
10,454,434
0
<p>You have create new call,simple method using call files.</p> <p><a href="http://www.voip-info.org/wiki/view/Asterisk+auto-dial+out" rel="nofollow">http://www.voip-info.org/wiki/view/Asterisk+auto-dial+out</a></p> <p>After that you have place one of call legs to your conference like this</p> <pre><code>Channel: Loca...
37,806,549
0
<p>The explicit assignment:</p> <pre><code>Intent intent = new Intent(this, HelloWorldActivity.class); startActivity(intent); </code></pre> <p>should work fine provided you have added the import for HelloWorldActivity.class with the full package name of your module viz. ir.sibvas.testlibary1.HelloWorldActivity</p>