pid
int64
2.28k
41.1M
label
int64
0
1
text
stringlengths
1
28.3k
13,717,747
0
<p>I got this problem and I think the easier way is the same with the second way that hvgotcodes gave.</p> <blockquote> <p>Or you can copy all the ones you want to keep into a new list as you iterate, and then discard the old list when done.</p> </blockquote> <pre><code>@Test public void testListCur(){ List&lt;String&...
37,290,612
0
sequencial numbers in mapreduce <p>I have written a Java code to create RowId in Java. But I need to convert it into mapreduce. I am new to MapReduce and need your help.</p> <p>Input is a file in local</p> <pre><code>example: Alex 23 M NY Alex 19 M NJ Alex 29 M DC Michael 20 M NY Michael 24 M DC </code></pre> <p>Count ...
15,913,387
0
<p><a href="http://unix.stackexchange.com/questions/26946/disabling-caps-lock-by-setxkbmap-makes-it-shift-key-in-emacs">This</a> question is probably relevant, basically just use xmodmap to set the keys directly. It worked for me when I had caps lock set to control and I think I was using gnome3 classic (which Cinammo...
28,198,941
0
<p>Re: I cannot work out how to make the VBA code select that Outlook Data File Inbox...</p> <pre><code>Private Sub ProcessPST() Dim objNs As Namespace Dim pstFolder As folder Dim objItem As Object Dim i As Long Set objNs = GetNamespace("MAPI") Set pstFolder = objNs.Folders("Test") ' &lt;--- Test is the name of the ps...
8,899,548
0
<p>Qt APIs for DVB-H do not exist. JSR-272 is the only option on Symbian. </p>
5,984,518
0
Create bindings of ListView items programmatically <p>I have the following wpf control added to xaml:</p> <pre class="lang-xml prettyprint-override"><code>&lt;ListView Margin="22,80,271,12" Name="listView1" ItemsSource="{Binding}" /&gt; </code></pre> <p>I know how to create a ListView object programmatically. The only ...
30,657,991
0
Lightswitch nested autocomplete boxes <p>I have Lightswitch 2013 and need to have nested autocomplete boxes. All the examples on the Internet are for older versions of Lightswitch and there are just a few differences in their examples from my version. Example: When adding Data Item for Local Property, Type "someTable" ...
26,143,255
0
Nginx rewrite POST as GET, and redirect <p>Is it possible for a <code>POST</code> request to <code>http://me.com</code></p> <p>to be converted to a <code>GET</code> request such as <code>http://me.com/api.php?some_static_param=yippee;&lt;rest of post data as get request&gt;</code> using Nginx?</p>
39,037,943
0
<p>Check if <code>remoteMessage.getNotification()</code> is not NULL. I think it is NULL because you are not sending the param 'notification' in your <code>$fields</code> array of your PHP code. You are sending 'data'. So, when you send the parameter 'data' you have to get that parameter with <code>remoteMessage.getDa...
27,187,365
0
<p>If you have a CustomCell, you must have a CustomCell.m (implementation file). In this file add this, to me is the easy way: </p> <pre><code>-(void)setHighlighted:(BOOL)highlighted { if (highlighted) { self.layer.opacity = 0.6; // Here what do you want. } else{ self.layer.opacity = 1.0; // Here all change need go ba...
35,871,296
0
Appending or adding new text next to current tooltip text JQuery <p>I was wondering whether its possible to add new text next to or append text to existing text already on tooltip. </p> <p>For example, I have a div tag containing tooltip text like so;</p> <pre><code>&lt;div id="myDiv1" class="myDiv" title="This is Tool...
6,956,521
0
<p>The Delete request isn't a full on true delete request. It's actually faked, much like the put request is when you use the form_for on a saved object. As far as I know, there's no reason why not use the REST convention provided. </p> <p>On another note, is that your own code in the snippet, or an example? Kind of c...
16,536,715
0
PHP generated XML parsing failed <p>In my CodeIgniter 2.x project with PHP 5.3.x I use following function to render Dom Document as XML response. Every things are goes fine. But generated XML parsing failed due to some malformed unexpected text (non-whitespace text outside root element).</p> <pre><code>function renderD...
13,046,003
0
<p><strong>yes</strong>. Don't see any point not to support it, documentation <a href="http://developer.android.com/guide/topics/resources/providing-resources.html" rel="nofollow">here</a> provides no restrictions on it (I myself at least have used -land qualifier)</p>
11,118,569
0
How do I keep a frame always on top within the application but put it to background when using other applications in Java? <p>My Java application has multiple frames. Some of them are set to be always on top. However, when the user opens another program (let's say a web browser), I want the always-on-top frames to move...
10,992,697
0
<p>Change this</p> <pre><code>onclick= "SaveData();" </code></pre> <p>to </p> <pre><code>onclick= "SaveData(this);" </code></pre> <p>Then change the <code>saveData</code> function to</p> <pre><code>function SaveData(elem) { localStorage["LessonID"] = $(elem).attr('LessonID'); localStorage["SubjectName"] = $(elem).find...
35,840,525
0
<p>You could just simplify your query to:</p> <pre><code>WITH MyQueryAlias1 AS (30 minutes sql query here) SELECT q1.field1 FROM MyQueryAlias1 q1 JOIN MyQueryAlias1 q2 ON q1.field2 = q2.field3 </code></pre> <p>Which will get rid of the second sub-query factoring clause.</p> <p>This might also work:</p> <pre><code>WITH...
35,385,953
0
<p>Firstly, it's the <em>view</em> rather than the <em>template</em> that you want to control HTTP caching on.</p> <p>The template is just a chunk of HTML that can be rendered by any view, the view is what sends an HTTP Response to the web browser.</p> <p>Django comes with some handy view decorators for controlling th...
39,969,247
0
<p>You have to answer twice, about where to install Java. If you want to use your own directories, instead of Windows's, you have to set a separate directory for the JRE, which is what it wants to know, on the second ask. ORACLE's installer should have been done a little less ambiguously.</p> <p>If you try and answer ...
28,991,120
0
<pre><code> #messydata.txt : created by copying/pasting the line above into a textfile. #Load Table into R data1 &lt;- read.table("messydata.txt", header=FALSE,sep=",", nrows=2, col.names=paste0("C", 1:16) ) #In col.names you can create the column names you want C1 C2 C3 C4 C5 C6 C7 C8 C9 C10 C11 C12 C13 C14 C15 C16 1...
19,429,905
0
<p><code>{username:kavi}</code> is not JSON. Strings must be quoted with <code>"</code> characters. <a href="http://jsonlint.com/" rel="nofollow">Test</a> your JSON (better yet: don't handcraft it in the first place).</p>
6,304,763
0
<p>With this information, I say this structure looks fine.</p> <p>You might also consider creating a separate ServiceModel assembly to store all your custom behavior and WCF. They could then be reused for other projects</p>
18,249,117
0
How to deploy web project on remote tomcat server outside Eclipse with .jar files in it <p>I have Rest <strong>API Project A</strong> which uses Project B and Project C for Database retrieval</p> <p><strong>Project B</strong>, <strong>Project c</strong> In which JPA is used for DB. Project A is working in Eclipse as i ...
7,871,219
0
<h3>Header Authentication</h3> <p>there are three ways to do it</p> <ol> <li>HTTP Basic Authentication</li> <li>HTTP Digest Authentication</li> <li>Roll our own using custom HTTP headers</li> </ol> <p>You can read more from <a href="http://php.net/manual/en/features.http-auth.php" rel="nofollow">PHP Manual</a></p> <p>...
3,864,427
0
Variables scope <p>I have two javascript files included at the header of my website. Both files contains almost same variables. </p> <p>If I have header like this </p> <pre><code> &lt;head&gt; &lt;script src="http://127.0.0.1/js/file1.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="http://127.0.0.1/js/fil...
35,380,050
0
<pre><code>#app/models/notification.rb class Notification &lt; ActiveRecord::Base belongs_to :device, foreign_key: :registration_id, primary_key: :token delegate :user, to: :device #-&gt; notification.user.name end #app/models/device.rb class Device &lt; ActiveRecord::Base belongs_to :user has_many :notifications, for...
38,287,494
0
<p>Because python uses references for arrays, objects, etc. If you want a copy of the array use <code>copy</code>:</p> <pre><code>import copy b = copy.copy(a) </code></pre>
10,368,214
0
<p>It's pretty late, but I got around a similar problem using masking</p> <p><a href="http://www.aurelienribon.com/blog/2011/07/box2d-tutorial-collision-filtering/" rel="nofollow">http://www.aurelienribon.com/blog/2011/07/box2d-tutorial-collision-filtering/</a></p> <p>cheers.</p>
3,446,579
0
How to use Windows Biometric Framework (WBF) in WPF application? <p>I'm working on WPF application which should identify user using Fingerprint Reader. </p> <p>It seems Windows Biometric Framework (WBF) is good enough for this task but I can't found examples where I can see how it can be used in my WPF application. Cou...
30,753,782
0
<h2>CSS</h2> <p>This is due to the border having to fit in with whatever the triangles height is. Just change with the width in <code>.triangle-left</code> and you will see the responsiveness.</p> <p>It will only resize up to 500px high though but this should be more than adequate.</p> <p><div class="snippet" data-lan...
23,642,620
0
<p>Yes. Something like this:</p> <pre><code>function whereami(elem) { var par = elem.parentNode, sibs = par.children, l = sibs.length, i; for( i=0; i&lt;l; i++) { if( sibs[i] === elem) return i; } throw "I am invisible!"; } </code></pre>
27,018,254
0
<p>In <code>SwipListView.java</code> change</p> <pre><code> case MotionEvent.ACTION_UP: case MotionEvent.ACTION_CANCEL: log("============ACTION_UP"); clearPressedState(); if (mIsShown) { hiddenRight(mPreItemView); } </code></pre> <p>to</p> <pre><code> case MotionEvent.ACTION_UP: showRight(mCurrentItemView); case Motio...
20,116,912
0
<p>A very simple GUI application is possible sticking with C and Windows API only.</p> <p>In short, you have to register your own Window class (<code>RegisterClassEx</code>), then create the window (<code>CreateWindowEx</code>). Note that your window class main element is its (<code>WindowProc</code>) that receive the...
31,843,347
0
Dynamically update position on Angular-Google-Maps-Native <p>Using the Angular-Google-Maps-Native plugin, when I change the information in JavaScript, my map is not updating. I believe my problem is the $scope for the map, versus the controller I am running.</p> <p><a href="https://i.stack.imgur.com/C2Rrp.png" rel="nof...
10,729,025
0
<p>edit or create a .profile in your home directory and add:</p> <pre><code>export PATH=/usr/local/mysql/bin:$PATH </code></pre> <p>Open a new terminal window for the changes to take effect.</p> <p>In general you shouldn't use root. You can change the username in MySQL 5.02 or higher:</p> <pre><code>mysql&gt; RENAME U...
6,054,281
0
Javascript alert() after Response.Redirect <p>I am calling this in my code behind: </p> <pre><code>(test.aspx) Response.Redirect("~/Default.aspx"); </code></pre> <p>I want to include a javascript alert after/before being redirected to Default.aspx, is it possible? I'm doing this because I'm passing a value to another p...
34,961,752
0
How do i programmatically click a button with C# in IE by classname? <p>So i'm trying to create a code which will automatically click buttons for me in my <code>webBroswer1</code> object in my visual studio C# Windows form application.</p> <p>However, the buttons in the website i would want to click do not have IDs, th...
13,900,558
0
<p>You call a class method by appending the class name likewise:</p> <pre><code>class.method </code></pre> <p>In your code something like this should suffice:</p> <pre><code>Test.static_init() </code></pre> <p>You could also do this:</p> <pre><code>static_init(Test) </code></pre> <p><strong>To call it inside your clas...
10,390,148
0
<p>I asked this very question during a Hangout with the guys from Google. They said they weren't aware of any limit.</p> <p>My company has going on for nearly 300 apps now.</p>
27,919,713
0
<p><strong>To reflect the status as of 2015:</strong></p> <p>Behaviorally both 400 and 422 response codes will be treated the same by clients and intermediaries, so it actually doesn't make a <em>concrete</em> difference which you use.</p> <p>However I'd expect to see 400 currently used more widely, and furthermore th...
5,076,705
0
Is it possible to upload files to Rackspace Files Cloud from browser? <p>Is it possible to upload files to Rackspace Files Cloud from browser like in Amazon S3?</p>
21,246,542
0
<p>Really no need to put the number of searches. And, actually this could be done<br> with a single regex. I can't remember if Dot-Net supports the <code>\G</code> anchor,<br> but this is really not necessary anyway. I left it in. </p> <p>Each Match:<br> Finds a new key.<br> Captures the keys sub-string matches at the...
13,282,015
0
<p>The right way to do it might be:</p> <pre><code>(defun my-grep-select(&amp;optional beg end) (interactive (if (use-region-p) (list (region-beginning) (region-end)) (list &lt;wordbegin&gt; &lt;wordend&gt;))) ...) </code></pre>
6,574,123
0
<p>If you use jquery datatables you can do something like this in your click event:</p> <pre><code>var columnIndexToSort = 0, sortAcending = true; $("#table").fnSort([[columnIndexToSort, sortAcending ? 'asc' : 'desc']]); </code></pre> <p>This will cause jquery datatables to sort and redraw the table for you. The jquer...
10,569,200
0
How to reset to default button BackColor? <p>I was experimenting with different options for the button background color and ended up changing the <code>BackColor</code> property in the Appearance category. I then changed it back to what it is by default which is <code>Control</code>, but it still looks different from o...
7,515,088
0
<p>All normal Bluetooth keyboards implement the HID profile, which requires an L2CAP connection. Android so far only provides the ability to use RFCOMM connections. You would need to use the Native Development Kit and write your keyboard code in C to using bluez to achieve your goal. Have a look at apps that use the N...
13,777,138
0
<p>When passing parameters into a macro, you should only need to access them with <code>@Parameter</code>. So in this case it would be <code>@Parameter.videoUrl</code>.</p> <p>Also, don't forget that you will need to add the parameter to the macro definition in Umbraco itself in the <em>Developers > Macros</em> sectio...
22,255,931
0
Are git branch deletions permanent? <p>Just wondering if there's a way to recover them after they've been deleted. I'm assuming here that I've deleted it both locally and remotely.</p>
1,467,979
0
<p>Thanks for the answers -- I've now decided to take the easy route and put all my web files in a TrueCrypt volume that I'll mount whenever I need to work on any local web sites, together with any database data. This is definitely the safest as far as I can see.</p>
25,165,198
0
<p>i am using date() easy to handle and formating</p> <pre><code>$date = date('Y-m-d H:i',strtotime('2014-08-29')); echo "&lt;option value='".$date."'&gt;" . $date . "&lt;/option&gt;"; </code></pre>
19,228,211
0
<p>Take a look on that script: <a href="https://github.com/CardinalPath/gas/blob/master/src/plugins/max_scroll.js" rel="nofollow">https://github.com/CardinalPath/gas/blob/master/src/plugins/max_scroll.js</a> Regards</p>
26,956,926
0
matplotlib not share axis x with many sub plots <p>I want to draw a chart with several sub-charts. The axes X have different lengths. The shape will be like:<br> subchart 1: ---------<br> subchart 2: --------------<br> subchart 3: ------------------ </p> <p>But i don't know how.</p>
15,338,972
0
erlang distributed programming <p>I have an application which has the following requirement.</p> <p>During the running of my Erlang App. on the fly I need to start one or more remote nodes either on the local host or a remote host.</p> <p>I have looked at the following options</p> <p>1) For starting a remote node on th...
18,228,542
0
<p>Looks fine too me. Why don't you try to use a DURATION (<a href="http://tools.ietf.org/html/rfc5545#section-3.8.2.5" rel="nofollow">RFC5545#section-3.8.2.5</a>) instead of a DTEND, e.g.</p> <pre><code>DURATION:PT1H </code></pre> <p>for a 1 hour event.</p>
13,935,816
0
UIActivityViewController change shared via iOS <p>I have simple sharing features in my app by using iOS 6 UIActivityView controller.</p> <p>When sharing in Facebook or Twitter there is a "shared via iOS"</p> <p>the code is:</p> <pre><code>NSString *textToShare = @"Test string to share"; UIActivityViewController *activi...
18,304,309
0
<p>The problem is that the <code>InPageAppender</code> relies on log4javascript's own page load handling code to know whether it can start drawing itself. When loaded via RequireJS, the page is already loaded and log4javascript's page load handling code never runs.</p> <p>You can get around this by calling <code>log4j...
30,979,260
0
<p>In ANSI standard SQL, you can do:</p> <pre><code>select (extract(year from col)*100000 + extract(month from col)*100 + extract(day from col)*1 + (extract(hour from col)*3600 + extract(minute from col)*60 + extract(second from col)) / (24.0*60*60) ) </code></pre>
7,271,552
0
How to store the cookie info when android killed my app <p>I have an app need login, I use a singleton http client to do everything, so it can track the cookies for me.</p> <p>But when I launch a browser intent in my app to view some html pages, the app sometimes be killed by low memory, when user come back from the br...
24,283,752
0
<p>I believe I've seen this issue upon trying to playback via the simulator vs. on an actual device. Similar to the following <a href="http://stackoverflow.com/questions/22569013/rtcreporting-pancake-apple-com-errors">post</a></p>
26,246,159
0
Panorama 360 viewer with phonegap <p>I read a lot of answers but i dont know wich is correct. Almost mobile browsers doesn support WEBGL, only newest. Almost script, libraries or plugins works with FLASH or WEBGL. I see and read a lot of your documentations and i dont know what to do. I need compatibility with almost s...
26,323,531
0
<p>i just add class ="draggable" to my clones. you have to learn more about clones. But I hate clones. I use to copy html contents. You have to practice manipulation of object more deeply concerning clones. the best way to use anythings about jquery is var element = $('#element'). Thats it. Simple, fast copy. </p>
34,101,905
0
Span acting like div <p>I have this code, where I planned to have three spans side by side displaying the step a person is at signing up for my website. However, the spans are acting like divs and going onto the next line. I have no idea why this is happening. To my understanding, the spans should only take up the widt...
12,699,884
0
<p>Use the correct character set.</p> <pre><code>3&gt;&gt; print(bytes((219,)).decode('cp437')) β–ˆ 3&gt;&gt; ord(bytes((219,)).decode('cp437')) 9608 3&gt;&gt; hex(9608) '0x2588' 3&gt;&gt; print('\u2588') β–ˆ </code></pre> <p><a href="http://www.fileformat.info/info/unicode/char/2588/index.htm" rel="nofollow">Unicode Char...
3,312,122
0
<p>Well it depends how, or what your trying to accomplish, one way would be: </p> <pre><code>android:layout_height </code></pre> <p>But if you mean programmatically, check this:</p> <p><a href="http://stackoverflow.com/questions/2963152/android-how-to-resize-a-custom-view-programmatically">Android: How to resize a cus...
29,057,648
0
Nginx always returning a 404 for non index pages <p>I was able to deploy a site (<a href="http://taiga.market" rel="nofollow">http://taiga.market</a>) and it appears that Nginx works on the index page. If you click a link to go to another page (<a href="http://taiga.market/login" rel="nofollow">http://taiga.market/logi...
16,718,003
0
Query version info from jsf application <p>I just stumbled upon a <a href="http://www.cigital.com/papers/download/dissecting_jsf_pt_aks_kr.pdf" rel="nofollow">paper</a> on JSF security containing the following statement:</p> <blockquote> <p>In Suns RI JSF implementation, the "com.sun.faces.disableVersionTracking" congu...
15,884,068
0
<p>It looks like you can remove the transform on the second image and it will go back behind the first one. So in other words, on image click I would probably first remove all occurrences of the transform property before applying to the clicked image. </p> <p>Or you could also set both images to position:relative and ...
5,980,761
0
<p>You will need to setup:</p> <ul> <li>A DNS entry pointing the DNS entry healthApp.name.com to your webserver</li> <li>A VirtualHost entry on the server to handle this new host name</li> <li>Set the DocumentRoot of the new vHost to the healthApp directory</li> <li>Check any configuration of your web application so i...
524,666
0
HTTP POST Though C# <p>I want to code an auto bot for an online game (tribalwars.net). I'm learning C# in school, but haven't covered networking yet. </p> <p>Is it possible to make HTTP POSTs though C#? Can anyone provide an example?</p>
31,810,030
0
<p>As the help states:</p> <pre><code>/trait "name=value" : only run tests with matching name/value traits : <b>if specified more than once, acts as an OR operation</b> </code></pre> <p>You have to add multiple <code>/trait</code> entries.</p>
4,324,726
0
Wrong encoding when getting response from Google's translate API? <p>I am using google translate API to translate text from English to German. The code i am using is:</p> <pre><code>string url = String.Format("http://www.google.com/translate_t?hl=en&amp;ie=UTF8&amp;text={0}&amp;langpair={1}", TxtEnglish.Text, Constants...
1,923,825
0
<p>See the <a href="http://lftp.yar.ru/lftp-man.html" rel="nofollow noreferrer">lftp docs</a> for proper usage of the ftp:sync-mode setting. (You want <code>true</code>.)</p>
32,453,502
0
<p>As far as I can see you're want to display list of entities, then provide an UI for selecting one of these entitites (via gridcontrol) and edit the selected entity properties in separate view (via text editors).</p> <p>So, I suggest you to use the MVVM approach. And, since you are already using DevExpress controls,...
13,500,863
0
<p>Recently, I was looking for that too. I think I got pointed to the solution here on SO, but I only have the final url at hand. This is what I do:</p> <pre><code># http://plumberjack.blogspot.de/2010/10/supporting-alternative-formatting.html class BraceMessage(object): def __init__(self, fmt, *args, **kwargs): self....
15,959,591
0
<p>I have modified this file : /opt/metasploit/ruby/lib/ruby/1.9.1/i686-linux/rbconfig.rb</p> <p>changed the line => CONFIG["LIBRUBYARG_STATIC"] = "-Wl,-R -Wl,$(libdir) -L$(libdir) -l$(RUBY_SO_NAME)-static" by => CONFIG["LIBRUBYARG_STATIC"] = "-Wl,-R -Wl,$(libdir) -L$(libdir) "</p> <p>go to /opt/metasploit/msf3 and ru...
16,460,994
0
Perform action in series <p>i am trying to perform action in series but here in my code alert message is printed firat though i have written it after some action.</p> <p>This is Fiddle i have Tried . <a href="http://jsfiddle.net/wggua/635/" rel="nofollow">http://jsfiddle.net/wggua/635/</a></p> <pre><code> $(document).r...
14,705,767
0
Change an AbstractAction name <p>I have a JMenuItem bounded to an Action that I can get using <code>item.getAction()</code>. The action name is set when constructing the Action, e.g. using anonymous <code>new AbstractAction(String text, ...)</code>. The text field is set according to a ResourceBundle and localization i...
17,354,829
0
<p>You'll need to create your own binder function to do that. The main reason for having <code>.bind()</code> was to deal with the non-lexically defined <code>this</code>. As such, they didn't provide any way to use it without setting <code>this</code>.</p> <p>Here's a simple example you could use:</p> <pre><code>Func...
24,722,350
0
<p>First of all,you're never reading your input in a variable!and then you're trying to check equality between the "scan" object which is of type Scanner.Instead read input "scan.nextLine();" in a variable say "var" and then call var.equals(password).Please also check that your String "Fish" is null initially which wi...
14,469,684
0
<p>This just happened to me... exactly. I needed to change it to <code>\\n</code> instead of <code>\n</code>.</p> <pre><code>alert("Hello again! This is how we"+"\\n"+"add line breaks to an alert box!"); </code></pre>
39,813,331
0
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-js lang-js prettyprint-override"><code>column: name: , while compiling: SELECT name, address, number FROM form</code></pre> </div> </div> Try looking these part. Are thes...
16,935,138
0
<p>This might work for you (GNU sed):</p> <pre><code>sed 's/.*_//' &lt;&lt;&lt;"abc_def_ghi jkl_lmn_opq" </code></pre>
26,089,782
0
<p>You can use replace() to do what yo want it to. Use it in this format</p> <pre><code>value = value.replace(" ", ","); //First param is the char you want to replace; The second is the one you want to replace the first param with </code></pre>
5,621,324
0
jQuery val() and checkboxes <p>Is there some rationale for <code>val()</code> being useless for checkbox controls, whereas it is useful for getting input data consistently across every other input control?</p> <p>e.g. for checkboxes, at appears to <em>always return "on" regardless of the checkbox state.</em> For other ...
28,313,486
0
<p>Here is a query. This will make sure in each column(any) any of the 1,2,3,4,5 number exists i.e. 5 columns have a different number in them</p> <pre><code>select *, ((LENGTH(concat(cola,colb,colc,cold,cole))) - LENGTH(REPLACE(concat(cola,colb,colc,cold,cole), '1', ''))) as one, ((LENGTH(concat(cola,colb,colc,cold,co...
39,569,406
0
<p>ArrayAdapter.java:401, is what is throwing this error. Check the values added in the object passed to this method. Probably one of those is null. android.os.Looper.loop(Looper.java:148)</p>
11,633,469
0
Are multiple Many-Many relationships evidence of bad design? <p>Good day all,</p> <p>I have been learning about databases and database design and I find I am still reaching a question I cannnot answer myself. So I pose the question to the community in hopes that someone with more knowledge/experience than I can answer ...
18,729,850
0
<p>This</p> <pre><code> R.id.enterHours </code></pre> <p>returns an <code>int</code>. That's why when you initialize a <code>View</code> you do it like</p> <pre><code>TextView mTextView = (TextView) findViewById(R.id.newHours_Value); </code></pre> <p>The <code>(TextView)</code> casts it to a <code>TextView</code> so y...
20,872,591
0
<p><code>sprintf</code> is indeed defined by the C standard. I would not look past that function to solve your problem.</p>
30,166,384
0
Sox - Piping output in windows <p>So I am emulating a RP2A03 chip using C++, using SoX to resample and output the audio.</p> <p>I can confirm that the APU itself and input pipe is working as a charm with the command following command:</p> <pre><code>FILE* fp = popen(".\\sox\\sox.exe -t raw -c1 -e signed-integer -b 16 -...
22,387,098
0
<p>As follow up from comments, next formulas works in <code>F2</code> and copied down:</p> <pre><code>=IF(D2="YES",B2*E2,0) </code></pre> <p>or</p> <pre><code>=B2*E2*(D2="YES") </code></pre>
20,395,607
0
How to split a comma separated string into groups of 2 each and then convert all these groups to an array <p>I have a string which is like <code>1,2,2,3,3,4</code> etc. First of all, I want to make them into groups of strings like <code>(1,2),(2,3),(3,4)</code>. Then how I can make this string to array like<code>{(1,2)...
29,520,907
0
<p>to let <code>p-q</code> make sense,p and q should point to the same array.<br>but <code>p-q</code> in your code is Undefined</p>
10,821,233
0
<p>Adding to Ansari's answer, the <code>diagDominantFlag</code> can be calculated by:</p> <pre><code>diagDominantFlag = all(diag(A) &gt;= (sum(A, 2) - diag(A))); </code></pre> <p>Thus replacing your double <code>for</code> loop with a one-liner.</p>
37,996,425
0
Resize CGSize to the maximum with keeping the aspect-ratio <p>I have a <code>CGSize</code> objects that I need to send to my server. The maximum size I can send to the server is 900*900 (900 width/900 height).</p> <p>There are some objects that are larger the 900*900 and I want to write a function that resizes them to ...
19,281,269
0
<p>There are not built-in facilities for this in Lua. Try <a href="http://luasocket.luaforge.net/" rel="nofollow">LuaSocket</a>.</p>
6,779,371
0
<p>HTTP is a pretty simple protocol, the following should get the status code out pretty reliably (updated to be a tad more robust):</p> <pre><code>int statusCodeStart = httpString.IndexOf(' ') + 1; int statusCodeEnd = httpString.IndexOf(' ', statusCodeStart); return httpString.Substring(statusCodeStart, statusCodeEnd...
5,416,251
0
<p>Well you could certainly remove the <code>ToList</code> call - that's not helping you at all.</p> <p>You could make the calling code simpler like this:</p> <pre><code>var dictionary = allDays.Where(n =&gt; n.Value.IsRequested || n.Value.IsApproved) .ToDictionary(x =&gt; x.Key, x =&gt; x.Value); var mostDays = new S...
32,461,397
0
<p>the second <code>r.index('something')</code> will find the first one. You need something like:</p> <pre><code>a = str(r[r.index('word001'):r.index('#something')]) b = str(r[r.index('word002'):r.index('#something', start=r.index('#something')+1)]) </code></pre> <p>This will find the first <code>#something</code> and...
33,442,910
0
<p>Setting HISTFILE=/dev/null is disabled in development version of Tramp, because there is a bug in bash which corrupts /dev/null then. Likely, the security department of your company is concerned about this.</p> <p>If you have a recent Tramp (say the one bundled with Emacs 24.5), setting HISTFILE=/dev/null is hardwi...