pid int64 2.28k 41.1M | label int64 0 1 | text stringlengths 1 28.3k |
|---|---|---|
13,604,607 | 0 | <p>User-agents define the <code><a /></code> tag as interactive, but this element was only designed to make an hypertext reference without any idea of click.</p> <p>This user-agent behavior became a standard, which is not the same with the longdesc attribute of the <code><img /></code> tag.</p> <p>Because ... |
35,699,448 | 0 | <p>The following regex <a href="https://regex101.com/r/nQ6oJ1/1" rel="nofollow">does what you're looking for</a>:</p> <pre><code>\d+(?:\s?(?:\$|euro)) </code></pre> <p>In <code>PHP</code> code, this would be:</p> <pre><code>$string ="i have 300 $, 1000$ ,500 euro in my account"; $regex = '~\d+(?:\s?(?:\$|euro))~'; pre... |
6,396,117 | 0 | <p>Use Psyco, for python2:</p> <pre><code>import psyco psyco.full() </code></pre> <p>Also, enable doublebuffering. For example:</p> <pre><code>from pygame.locals import * flags = FULLSCREEN | DOUBLEBUF screen = pygame.display.set_mode(resolution, flags, bpp) </code></pre> <p>You could also turn off alpha if you don't ... |
2,345,527 | 0 | <p>There's a <a href="http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/remove-zombie-locks.py" rel="nofollow noreferrer">Python</a> script (referenced here: <a href="http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2369399" rel="nofollow noreferrer">http://subversion.tigris.org/d... |
27,160,869 | 0 | <p>You can get content from articles easy with the follow "tools":</p> <ol> <li>scrapy (recommended, but have greater learning curve)</li> <li>newspaper (gives you immediately title, author, text, images, videos, etc. )</li> <li>goose-extractor (is like newspaper)</li> </ol> |
9,830,013 | 0 | <p>If you will never have dots, you can use this</p> <pre><code>PARSENAME(REPLACE(ColumnName,':','.'),1) </code></pre> <p>example</p> <pre><code>DECLARE @v VARCHAR(100) = 'DT:CSDF' SELECT PARSENAME(REPLACE(@v,':','.'),1) </code></pre> <p>otherwise use PATINDEX and RIGHT</p> <pre><code>SELECT RIGHT(ColumnName,LEN(Colum... |
21,417,690 | 0 | <p>The short answer is the operator needs to be at the end of the line in order to tell Ruby to continue reading the next line as part of the statement, so this would work:</p> <pre><code>if ( (aa != nil && self.prop1 == aa.decrypt) || (bb != nil && self.prop2 == bb.decrypt) ) && (self.id.nil? ... |
842,967 | 0 | <p>I have now switched from <code>wsDualHttpBinding</code> to <code>NetTcpBinding</code> and for some reason, everything is working fine. </p> <p>I have used <a href="http://www.singingeels.com/Articles/Duplex_WCF_Services_Hosted_in_IIS_Using_NetTcp.aspx" rel="nofollow noreferrer">this article</a> to help me set up ho... |
38,371,187 | 1 | Color sequence game in Python <p>The code below is for color sequence guessing in python.</p> <pre><code>import random import time def colorgame(): r='red' b='blue' g='green' y='yellow' v='violet' bl='black' o='orange' w='white' m='magenta' colors = [r, b, g, y, v, bl, o, w, m] sequence=[] win = True while win == True:... |
33,267,366 | 0 | <p>Here is my modified mulerequester as per Ryan's suggestion. It uses both connector and selector as Uri params.</p> <pre><code> <mulerequester:request config-ref="Mule_Requester" resource="wmq://REPLY.QUEUE?connector=wmqConnector&amp;selector=JMSCorrelationID%3D'#[sessionVars.myCorrelationId]'" doc:name="Mule... |
17,936,157 | 0 | <p>Either make plot space annotations for the second labels or create a second plot. Have the second plot only display data labels but no plot data (set all line styles and fills to <code>nil</code>).</p> |
34,134,911 | 0 | <p><code>String#to_i</code> returns a new Object (which is the only sensible implementation; think a moment about what would happen if <code>String#to_i</code> magically changed the object's class).</p> <p>So, to assign the integer value to your <code>sum</code> variable, use</p> <pre><code> sum = sum.to_i </code></pr... |
5,740,505 | 0 | <p>As other people have said, you need to implement a comparison function yourself.</p> <p>There is a proposed way to ask the compiler to generate the obvious/naive(?) implementation: see <a href="http://www.open-std.org/Jtc1/sc22/wg21/docs/papers/2014/n4126.htm" rel="nofollow">here</a>.</p> <p>It may seem a bit unhel... |
26,487,614 | 0 | storing transformed BufferedImage in Java <p>In Java, instead of using photoshop to transform my images(that I use in the program), I want to use code to transform and save them.</p> <p>I have created an AffineTransform object "at" and called the <code>rotate()</code> method. I have a BufferedImage called "image". </p>... |
31,916,705 | 0 | <p>Got it!</p> <p>It seems that <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1192763" rel="nofollow">the debugger has issues with internationalized domain names (IDN)</a>.</p> |
40,628,904 | 0 | <p>Change Swift Compiler optimization Level to </p> <blockquote> <p>Fast, Single File Optimization</p> </blockquote> <p>instead of whole module! <a href="https://i.stack.imgur.com/eJxcl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eJxcl.png" alt="see the highlighted"></a> Something seems unusual ... |
30,789,596 | 0 | How to save resource assignments on Bryntum's Gantt? <p>I have an resource assignment column on my Gantt. I can change the assignments but I want to know how to save them ? Also can I change the assignment default unit of percentage tot hours. </p> |
33,927,174 | 1 | Django reverse url to onetoonefield on success <p>Good day SO!</p> <p>Recently I've started working on Django, got myself a situation which I can't find the right solution on the web to solve it. So I've got a little question about URL reversing on a success. Currently when an user successfully creates an account, the ... |
6,019,294 | 0 | Loading a cookie and posting data with curl <p>If I load in a cookie, I am able to get to the page that requires cookies, like this:</p> <pre><code>$cookie = ".ASPXAUTH=Secret"; curl_setopt($ch, CURLOPT_COOKIE, $cookie); </code></pre> <p>No problem here, I can run <code>curl_exec</code>, and see the page that requires ... |
15,175,243 | 0 | Grouping elements under a new node in xslt <p>I need to group some elements together and pull them together under a new element. </p> <p>Below is a sample record, I would like to group together the address information into an additional layer.</p> <p>Here is the original record -</p> <pre><code> <Records> <Peo... |
36,690,802 | 0 | <p>You simply need to set the <code>Foreground</code> property:</p> <pre><code>marker.ToolTip.Foreground = Brushes.Green; </code></pre> |
13,354,692 | 0 | <p>If you are thinking about compilation time purpose IF CONDITION is always preferable. If conditions do faster checking than switch case.</p> <p>But if you thin programatically then If condition is just a series of boolean checks. For program to work efficiently switch case should be used(Although it consumes time).... |
6,520,737 | 0 | <p><code>[]</code> notation will make it possible to transmit array data in a form.</p> <p>Name the checkboxes in the form like this:</p> <pre><code><input name="area[]" type="checkbox" value="51-75"> </code></pre> <p>this should build an array of all selected check boxes. </p> |
19,419,101 | 0 | <p>Can't tell you how frustrated I am trying to narrow down the cause of this one. Took me hours. Trial and error here and there.. all leads to nothing until one comment in one of the threads relating to this mentioned about "Executable". Boom! I remember the plist key "Executable file" in my project plist (PROJECT-in... |
23,765,162 | 0 | <p>I’ve noticed occasionally that ASP.NET will cache the old SPROC in Visual Studio even after a change is made on SQL Server. So for example you changed custUPDATE by adding a parameter, and also added the parameter to your ASP.NET code, but are still receiving the “too many arguemtns specified” error because the old... |
2,783,555 | 0 | where can I get these kind of exercises to solve? <p>Recently I did a Java programming exercise successfully which was sent by a recruiting firm, The problem statement goes like this 'There are two text files FI(records abt files and directory information) and FS(containing blocks of data) which represent a file Index ... |
3,531,190 | 0 | <p>You can know when it's postback with a function such as:</p> <pre><code>import javax.faces.bean.ManagedBean; import javax.faces.context.FacesContext; @ManagedBean public class HelperBean { public boolean isPostback() { FacesContext context = FacesContext.getCurrentInstance(); return context.getRenderKit().getRespon... |
21,741,803 | 0 | Powershell SecureString Encrypt/Decrypt To Plain Text Not Working <p>We are trying to store a user password in the registry as a secure string but we can not seem to find a way to convert it back to plain text. Is this possible with SecureString?</p> <p>Here is the simple test script we are trying to use...</p> <pre><c... |
24,930,555 | 0 | <p>I don't understand what exactly you are trying to do. If you want to get an array of pointers from your array of structs, you will need to make a loop. It would look like this (i did not try it)</p> <pre><code>person * friends_ptrs[NUM_OF_FRIENDS]; for (int i = 0; i < NUM_OF_FRIENDS; i++) friends_ptrs[i] = frien... |
24,840,539 | 0 | if statement to check number of days in a month <p>I am writing a simple program in asp.net mvc5 that will display a calendar. I have an array that stores the months and days 1-31. I would like to use an if statement to check for the month to allow only the appropriate number of days. I am really new to mvc and would a... |
31,680,592 | 0 | what is the maximum limit that svnadmin load/dump file execute <p>I am migrating cvs and Subversion 1.6 repos to new subversion 1.8 server. I use cvs2svn for CVS dump and svnadmin dump to create dump files and load in new subversion server. My CVS repositories maximum size is 8 GB and Subversion repos 15 GB in size. 1.... |
39,664,115 | 0 | Produce an APK for multiple architectures for Qt projects <p>In 3d party APK files I notice there are folders for different architectures - armv7, arm64, x86, mips - so a single APK works for multiple architectures, supported by Android.</p> <p>However, I don't seem to find a way to do that with Qt projects. I have a p... |
14,533,682 | 0 | User Registration using Slim Rest server and android client <p>I am working on a simple app where I sign up new users. - I am using SLIM PHP framework with MySQL on apache local host - I have a MySQL database with table called tbl_user. I have tested my SLIM implementation using CURL - On Client side, I have three Edit... |
19,725,382 | 0 | <p>You can use <code>$.proxy</code> to set the context within which a function should be called. try this:</p> <pre><code>beforeShowDay: $.proxy(this._processDate, this), </code></pre> <p>Now, within your <code>_processDate</code> function the <code>this</code> keyword will refer to your widget. You can get access to ... |
5,358,680 | 0 | <p>Yes, that is a much more complicated task. You're going to have to store the last modified time into a database (since you're saying users can modify their profile content I'll assume you already have a database). The easiest way to get the last time the user modified their profile depends on your schema.</p> <p>To... |
16,070,455 | 0 | <p>Why wouldn't be corrupted? You are opening a document, getting all of the child elements, and writing them to the same document. I am not sure what is that supposed to do.</p> |
22,663,157 | 0 | <p>Overdispersion isn't really a useful concept in the normal model because it is already fitting a variance for the variability at the observation level. So the error message is telling you that you can't have a grouping factor at the observation level. In that sense, yes, you are trying to overfit your model.</p> <p... |
3,944,136 | 0 | <p>I <em>think</em> you want this:</p> <pre><code>$('#term').load('fetchcourses.php?', function() { $('[name=s2]').change(function() { $('#dept').load('fetchcourses.php?term='+$(this).val()); }); }); </code></pre> <p>The function passed to <code>load()</code> gets executed once the data is loaded. So if <code>$('[name... |
34,716,062 | 0 | <p>Try this code :</p> <pre><code><div ng-init="setFromDiv = 'green'" ng-click="setFromDiv = 'green'"class="box green"></div> <div ng-click="setFromDiv = 'blue'" class="box blue"></div> <div ng-click="setFromDiv = 'red'" class="box red"></div> <div ng-click="setFromDiv = 'yellow'... |
3,161,587 | 0 | SSRS - How can I conditionally send a report to a mail address <p>Let me specify the environment. The client has UI for entering orders in SQL Server database. A Windows Service one another machine is processing these orders from database at particular intervals. Sometimes the Windows service is stopped then orders pil... |
35,399,107 | 0 | <p>Got it! Incredibly simple when you add a container node. The following seems to work for any positions in any quadrants.</p> <pre><code> // pointAt_c is a container node located at, and child of, the originNode // pointAtNode is its child, position coincident with pointAt_c (and originNode) // get deltas (positions... |
16,555,300 | 0 | <p>This question has been answered already, but I want to point out that form_open() <strong>without</strong> any arguments would do exactly what you want (creating an action=""). </p> <p>So you can simply use the snippet below:</p> <pre class="lang-php prettyprint-override"><code><?php echo form_open(); ?> </co... |
498,526 | 0 | Native vs. Protothreads, what is easier? <p>I just stumbled on Protothreads. They seems superior to native threads since context switch are explicit. </p> <p>My question is. Makes this multi-threaded programming an easy task again?</p> <p>(I think so. But have I missed something?)</p> |
28,657,676 | 0 | Bash EXIT trap with command substitution <p>I want a bash function to start a background process and set a trap to kill it when exiting. Something like:</p> <pre><code>function start { <<<run process>>> & local pid="$!" trap "kill -9 $pid" EXIT echo $pid } </code></pre> <p>Now, if I just call this... |
25,328,659 | 0 | <p>Maybe..</p> <pre><code>public void Delete_Bus(String bus_num) { SQLiteDatabase db=this.getWritableDatabase(); db.execSQL("DELETE FROM "+TABLE_BUS+" WHERE "+KEY_BUS_NUM+"='"+bus_num+"'"); db.close(); } </code></pre> |
11,283,508 | 0 | How to fetch records using predicate from A having relationship with A<-->B<-->C with coredata <p>I have three entities A,B,C. EntityA: Properties: Id,Name Relationships: ABRelation(A-->>B)</p> <p>EntityB: Properties: Id,Name Relationships: BARelation(B-->A) BCRelation(B-->>C)</p> <p>EntityC: RoleId CBRelation(C-->>B)<... |
18,232,552 | 0 | Create Custom Action tab bar <p>I am trying to create a custom tabbar using <a href="http://www.androidbegin.com/tutorial/implementing-actionbarsherlock-side-menu-navigation-with-fragment-tabs-tutorial/" rel="nofollow noreferrer">this tutorial</a> for android 2.3.3 and above,but the title bar is disabled(Refer the imag... |
36,799,704 | 0 | <p>Here's an ersatz LR lexer/parser (in Python, but porting should be easy). Valid input is assumed.</p> <pre><code>#!/usr/bin/env python3 import re def parse(s): children = {} stack = [] for token in re.findall('[+-]?[0-9]+|.', s): if token == '[': stack.append(n) elif token == ']': del stack[-1] elif token != ',': n... |
28,188,596 | 0 | <p>You forgot to override among others the <a href="http://docs.oracle.com/javase/8/docs/api/java/util/ArrayList.html#size--" rel="nofollow"><code>size()</code></a> and <a href="http://docs.oracle.com/javase/8/docs/api/java/util/ArrayList.html#isEmpty--" rel="nofollow"><code>isEmpty()</code></a> methods. Moreover, you... |
14,654,124 | 0 | <p>You can use as mentioned below. You need a structure with an array of int.</p> <pre><code> struct Player { public int[] cards = new int[13]; }; </code></pre> <p>Then your while loop goes something like below</p> <pre><code>Palyer []player = new Palyer[4]; int random; int i = 1; while (i <= 4) { cout << "Ca... |
5,124,361 | 0 | <p>"onSaveInstanceState only seems to support primitives"</p> <p>onSaveInstanceState supports objects, as long as they are declared serializable.</p> <pre><code>// ON_SAVE_INSTANCE_STATE // save instance data (5) on soft kill such as user changing phone orientation protected void onSaveInstanceState(Bundle outState){ ... |
15,692,565 | 0 | <p>I would suggest to create an Items constructor</p> <pre><code>Items(string weapon, string armour, int gold); </code></pre> <p>And change your player constructor to</p> <pre><code>Player(int health, int stamina, int keys, Items items); </code></pre> <p>You can then aggregate <code>Items</code> in <code>Player</code>... |
28,085,866 | 0 | SQL Update to increment existing fields <p>I have an SQL table called 'Sales'</p> <p>I have the fields</p> <pre><code>ShopID int TotalSalesValue numeric(18.2) </code></pre> <p>Contents</p> <pre><code>ShopID | TotalSalesValue 1 | 10.34 2 | 100 </code></pre> <p>I have a stored procedure where I pass in the ShopID and add... |
6,404,464 | 0 | <p>If you look at the source code in <a href="http://webtimingdemo.appspot.com/" rel="nofollow">http://webtimingdemo.appspot.com/</a> it runs the code AFTER onload (setTimeout('writeTimings()', 0)), your code runs in $(document).ready() which runs before onload as it runs on DOMContentLoaded in Chrome.</p> <p>I have p... |
5,172,616 | 0 | How to parse one text file to multiple files based on data contained within <p>I have an enormous text file that I'd like to parse into other files - I think the only thing I have on this box (company computer) to use is VBS, so here's my question:</p> <p>I have text file with a bunch of network configurations that loo... |
6,401,393 | 0 | <p>You should probably write your application as a Home application. There is an example in the developer docs here:</p> <p><a href="http://developer.android.com/resources/samples/Home/index.html" rel="nofollow">http://developer.android.com/resources/samples/Home/index.html</a></p> <p>Then you'd be able to switch the ... |
12,011,482 | 0 | <p>Whatever is not implemented in the Linux kernel, you have to implement yourself or borrow from another open source kernel module. However, you'll find that <code>strcat</code> is implemented in the kernel.</p> <p>See the <a href="http://www.kernel.org/doc/htmldocs/kernel-api/">kernel API</a> documentation. Specific... |
33,730,659 | 0 | <p>With all the hints I found out that <code>DataGridTextColumn</code> is neither part of the visual tree nor of the logical tree. That should be the reason why <code>ElementName</code> and <code>RelativeSource</code> do not work. This answer regarding <code>DataGridTextColumn</code> explains that and gives a possible... |
30,140,030 | 0 | How to check if Graph is connected <p>I have a un-directed graph, and wanted to know a node is connected to another node or not?</p> <p>for example </p> <pre><code>0 1 0 1 0 1 0 1 0 </code></pre> <p>In this node 1 is connected to node 3 ( because there is a path from 1 to 2 and 2 to 3 hence 1-3 is connected )</p> <p>I ... |
549,600 | 0 | Is there a fundamental difference between backups and version control? <p>How does version control differ from plain backups?</p> <p>Let's forget about the feature decoration, and concentrate on the soul of version control. Is there a clear line that backups must cross before they can be called a VCS? Or are they, at h... |
16,611,423 | 0 | Send picture from android phone to a local web server <p>I've been searching all over and found a bunch of examples of ways to send a picture to a web server. So far none have quite worked for me. Maybe I started in the wrong end but I've already written the code for the controller which is to take care of the received... |
37,355,029 | 0 | <p>One thing you could do is take advantage of the <code>std::minmax</code> overload that takes a <code>std::initializer_list<T></code> and returns a <code>std::pair<T,T></code>. Using that you could have</p> <pre><code>int main() { const int a = 10, b = 20; static_assert(std::minmax({2, 1}) == std::make_p... |
7,029,215 | 0 | <p>oh, I just got what you mean by total revenue going down, weird...</p> <p>I suppose total revenue is only shown for the period of time selected, if you view a 30 or 90 days window, total revenue going down means the revenue over that period is lower than it was for the previous same-length period.</p> <p>Check "pen... |
29,153,431 | 0 | <p>You should add a tap gesture recognizer to your table view that closes the keyboard when it's fired:</p> <pre><code>//Somewhere in setup UITapGestureRecognizer *viewTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(closeKeyboard)]; viewTap.cancelsTouchesInView = FALSE; [myTableView addGestu... |
35,662,520 | 0 | <p>Remove the Chr from every item in the first column (you can go through every line and only keep </p> <pre><code> [3:] </code></pre> <p>of each line, means everything but the first 3 chars. Then sort the lines by the first column and you should almost be finished?</p> |
19,869,231 | 0 | Opening multiple programs on a HTA <p>I'm using a HTA and I want to make various buttons to open different programs on the system.</p> <p>I've managed to get one program to run via the runfile command but how do I write to open another program using a separate button such as MS Word for example.</p> <pre><code><html... |
30,614,683 | 0 | matching login info to external file php <p>I have html registration form with username and password inputs. Usernames and passwords are stored in <code>.txt</code> file like this:</p> <pre><code>username1,password1 username2,password2 </code></pre> <p>I need to match entered username and password with the stored ones.... |
15,074,850 | 0 | <p>It's not that you can't access "primitive values" by reference. The problem is that some data types in Python are mutable (lists, dictionaries) while others are immutable (integers, strings, tuples). Whenever you try to modify an immutable object, you always get back a new object with the new value. The original ob... |
11,144,267 | 0 | <p>If you use Three20, you can try this extension:</p> <p><a href="https://github.com/RIKSOF/three20/tree/development/src/extThree20Facebook" rel="nofollow">https://github.com/RIKSOF/three20/tree/development/src/extThree20Facebook</a></p> <p>It allows you to use all Graph API features with just a few line of code.</p> |
10,511,836 | 0 | <pre><code>var f = Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory,'example.txt'); var contents = f.read(); Ti.API.info('Output text of the file: '+contents.text); </code></pre> <p>This will give you the text. You can't simply put the text on the scroll view, you will need a label / textbox etc. set the value o... |
19,270,053 | 0 | php str_replace not works <p>I have a html code putted in a variable. I want to replace any relative image src to absolute aby using str_replace. like this:</p> <pre><code>$export = 'some html codes' $repthis = 'src="/images'; $reptothis = 'src="http://images.site.com'; $export = str_replace($repthis, $reptothis, $expo... |
8,827,607 | 0 | <p>Use <a href="http://php.net/manual/en/function.strftime.php" rel="nofollow"><code>strftime()</code></a> in conjunction with <a href="http://www.php.net/manual/en/function.setlocale.php" rel="nofollow"><code>setlocale()</code></a>. Seems like it's what you're looking for.</p> |
16,750,242 | 0 | <p>This is because you are effectively only using <code>data1</code>.</p> <p>The first loop can be expanded to</p> <pre><code>data1 = read.table('data1_lambda.dat', ...) data2 = read.table('data2_lambda.dat', ...) data3 = read.table('data3_lambda.dat', ...) </code></pre> <p>whereas your second loop is a bit buggy and ... |
35,098,118 | 0 | How to create report table in sql? <p>I am creating In-patient management system desktop application in javafx as my mini project of MCA, which has some data about patient admitted in hospital.</p> <p>I have to save all the records of patient test & test reports in a database.</p> <p>So, I have created <code>Test</... |
18,564,726 | 0 | <p>I have found in the past that there are 3 dlls you need to have the correct version of for debugging .Net.</p> <p>sos.dll mscorwks.dll mscordacwks.dll</p> <p>here's how I usually go about getting these dll's <a href="http://sjbdeveloper.blogspot.com.au/" rel="nofollow">http://sjbdeveloper.blogspot.com.au/</a>, alth... |
35,667,576 | 0 | <p><div class="snippet" data-lang="js" data-hide="false"> <div class="snippet-code"> <pre class="snippet-code-js lang-js prettyprint-override"><code>$(function() { //----- OPEN $('[data-popup-open]').on('click', function(e) { var targeted_popup_class = jQuery(this).attr('data-popup-open'); $('[data-popup="' + targeted... |
9,979,801 | 0 | <h2>PROBLEM:</h2> <p>I'm betting that you have a one-dimensional array with strings stored in each. So your array actually looks like:</p> <pre><code>array ( [0] => '...', [1] => '.X.', [2] => '...' ) </code></pre> <p>When this is what you want:</p> <pre><code>array ( [0] => array ( [0] => '.', [1] =>... |
17,344,168 | 0 | Using SQL "Tree Branch" shortcut to Join Tables <p>To add more clarity to my question, I've seen a way in which by right clicking in the object explorer (or somewhere within) we had the option of selecting a checkbox from one table and then another to have it autogenerate the JOIN query beneath. </p> <p>I'm unsure of w... |
29,657,155 | 0 | <p>in my case using <code>width="100%"</code> in table caused the problem, removing width solved it.</p> <p><strong>working code</strong></p> <pre><code><table id="dt_table"> <thead> <tr> <th>column1</th> <th>column2</th> <th>column3</th> <th>column4</th&g... |
12,489,854 | 0 | How can I prevent both the keyboard and the menu from being shown together? <p>Here's a screenshot of my application. When the search box is clicked, the soft-keyboard automatically pops up, which is fine, but, if I also press the "Menu" button, the menu appears on top of the soft-keyboard. </p> <p>How can I show the m... |
33,260,553 | 1 | Using PyperClip on web app <p>I am using pyperclip.py to grab a list of E-Mail Addresses in my web app using a form so a user can paste it locally via clipboard. It works perfect locally. However, while running it on a server (Linux 14.04 with Apache2) and accessed from a client system through the browser it doesn't co... |
34,459,670 | 0 | Convert Library to JavaScript closure <p>I have an external library of JavaScript functions that I need to pull into my server-side Google Apps Script project. I'm doing this mainly for performance reasons, but also because <a href="https://developers.google.com/apps-script/guide_libraries" rel="nofollow">Google now re... |
28,298,046 | 0 | Filter not working with laravel commands <p>Can we use filters with Laravel commands. It works fine with controllers. But when use with commands it shows error "call to undefined method". I have this filter customAuth. It works fine in controller by calling <code>$this->beforeFilter('podioAuth');</code></p> <p>But w... |
24,266,037 | 0 | <p>The following code should help. You should split each subject into a separate array within your query. Once your query is complete, you should iterate through the subject array, and then within each staff id.</p> <pre><code>$subjects = array(); $q = mysql_query("Select staff_id from my_table"); while($row = mysql_f... |
15,134,325 | 0 | <p>Call <code>moment.utc()</code> the same way you're calling <code>Date.UTC</code>: </p> <pre><code>var withMoment = moment.utc([now.getFullYear(), now.getMonth(), now.getDate(), now.getHours(), now.getMinutes(), now.getSeconds()]).valueOf(); </code></pre> <p>I think calling <code>moment.utc(now)</code> will make it ... |
21,927,147 | 0 | How to serialize ArrayList of float arrays <p>I have an ArrayList, and each object consists of an array of two floats representing coordinates. I found that I could serialize the ArrayList by calling the .toString() method on it, but this did not serialize the float arrays within the ArrayList. How can I go about seria... |
32,950,452 | 0 | <p>Copy and paste this into notepad and remove all <code>\</code> characters so that you get one long line. Then paste in cmd. Should work. And the message you are seeing usually means that you try to run <code>mvn</code> from a folder which does not contain <code>pom.xml</code></p> |
23,621,173 | 0 | <p>How about writing 2 servlets, one to take in the image and write it to the database and another one to get the image and pass it back in the response output stream which you can call from the webpage via an ajax call.</p> |
18,536,407 | 0 | Keep `this` on prototype's object <p>I am trying to build a small javascript library for study purposes. I have an object inside a prototype that has some functions inside. I would like to access <code>this</code> (the one that has <code>valueOf</code> and stuff) from inside the functions, but <code>this</code> now bri... |
25,439,285 | 0 | <p>I ended up implementing a custom version of the parsing algorithm used by JISON's compiled parsers, which takes an immutable state object, and a token, and performs as much work as possible with the token before returning. I am then able to use this implementation to check if a token will produce a parse error, and... |
28,671,966 | 0 | <p><strong>Function to get random integers where min, max are inclusive</strong></p> <pre><code>function getRandomInt(min, max) { return Math.floor(Math.random() * (max - min + 1)) + min; } </code></pre> <p><strong>Function to find Random Value from passed variable <code>plot</code></strong></p> <pre><code>function ge... |
40,550,961 | 0 | <p>Those specific pieces of information aren't necessarily available in any sort of direct way using the xAPI (Tin Can API). xAPI stores data points in a stream of statements, those statements <em>may</em> include some of that information depending on how and what generated them.</p> <p>To access the statement stream ... |
7,504,180 | 0 | <p>Maybe you could try this</p> <pre><code> double res = a / (b == 0 ? a : b); </code></pre> |
11,236,200 | 0 | Why do we need a static lock for synchronizing system.out.println()? <p>I am studying for java certification, and I see this example from Mughal's book:</p> <pre><code>public class Smiley extends Thread { @Override public void run() { while(true) { synchronized(this) { try { System.out.print(":"); Thread.sleep(100); Sy... |
121,231 | 0 | <p>In a word - No</p> |
40,503,745 | 0 | <p>how about </p> <pre><code>julia> collect(b)[1] "A" </code></pre> <p><strong>edit</strong> </p> <p>as the legendary Dan Getz suggested, consider doing </p> <pre><code>julia> collect(take(b,1))[1] "A" </code></pre> <p>if memory is an issue</p> |
13,424,483 | 0 | <p>When you open a MongoDB connection with the native driver, you're actually opening a pool of 5 connections (by default). So it's best to open that pool when your app starts and just leave it open rather than open and close the pool on each request.</p> <p>You're on the right track with closing out your HTTP respons... |
18,434,000 | 0 | <p>Check your remote "origin" to ensure the URL looks correct:</p> <p><code>git remote -v</code></p> <p>Next, try listing out the contents of the remote:</p> <p><code>git ls-remote origin</code></p> <p>If all goes well with the steps above, Git is certainly connecting to the GitHub hosted repository. Try the <code>git... |
14,747,579 | 0 | <p>Your code is already working:</p> <p>for download as cvs add this code block:</p> <pre><code>Highcharts.getOptions().exporting.buttons.exportButton.menuItems.push({ text: 'Download CSV', onclick: function () { Highcharts.post('http://www.highcharts.com/studies/csv-export/csv.php', { csv: this.getCSV() }); } }); </c... |
31,346,733 | 0 | How does mask affect stencil value according to stencil op? <p>The documentation in OpenGL reference pdf (both OpenGL 3.3 and 4.5 specs) is not much clear about what happens to the stored stencil value when a mask is applied.</p> <p>In example If I have the following mask:</p> <pre><code>glStencilMask( 0x06); </code></... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.