pid int64 2.28k 41.1M | label int64 0 1 | text stringlengths 1 28.3k |
|---|---|---|
19,186,457 | 0 | <p>I agree this is a bad idea, but here is another possible solution;</p> <pre><code>data big; cust_id = 1; retain var1-var20000 0; run; data temp/view=temp; set big(keep=cust_id var1-var10000); run; proc export data=temp outfile='c:\temp\file1.csv' dbms=csv replace; run; data temp/view=temp; set big(keep=cust_id var1... |
14,966,855 | 0 | <p>As far as I know, you need to attach an article to a category to view it.</p> <p>You can assign the article to a category. After that open an article from that category and replace the text after the last "/" in url with the alias of your article.</p> <p>You can also assign the article to a category that is linked ... |
39,885,290 | 0 | <p>Here is a simple example of how to copy values from an input to another html tag:</p> <pre><code><input id="myInput" type="text" value="waffles" /> <button type="button" onclick="$('#copiedValue').html($('#myInput').val())">Copy value</button> <span id="copiedValue"></span> </code></pr... |
4,632,709 | 0 | <p>As said, a reference to a pointer to Class.</p> <ul> <li>you pass a <code>Class *</code> to the function</li> <li>the function may change the pointer to a different one</li> </ul> <p>This is a rather uncommon interface, <strong>you need more details</strong> to know what pointers are expected, and what you have to ... |
2,692,829 | 0 | HTTP Response 412 - can you include content? <p>I am building a RESTful data store and leveraging Conditional GET and PUT. During a conditional PUT the client can include the Etag from a previous GET on the resource and if the current representation doesn't match the server will return the HTTP status code of 412 (Prec... |
14,098,868 | 0 | <pre><code><script type="text/javascript"> {literal} $(function(){ $( "#ds" ).datepicker({ dateFormat: "dd-mm-yy" }); }); {/literal} </script> </code></pre> <p>correction:</p> |
35,047,148 | 0 | When runtime modifications are written to Edits log file in Name Node, is the Edits Log file getting updated on RAM or Local Disk <p>When run-time modifications are written to Edits log file in Name Node, is the Edits Log file getting updated on RAM or Local Disk</p> |
4,510,418 | 0 | <pre><code>String urldisplay="http://www.google.com/";//sample url Log.d("url_dispaly",urldisplay); try{ InputStream in = new java.net.URL(urldisplay).openStream(); Bitmap mIcon11 = BitmapFactory.decodeStream(new SanInputStream(in)); } catch(Exception e){} </code></pre> <p>Create class name SanInputStream</p> <pre><co... |
10,762,744 | 0 | <p>Why make it so complex? Just declare the width and leave it at that:</p> <pre><code>#resulttbl{ width:100%; } </code></pre> <p>If for some reason that doesn't work, try using <code>!important</code>. If that does work then another rule is taking a higher precedence then the current rule.</p> <pre><code>#resulttbl{ ... |
39,799,979 | 0 | <p>A very similar answer to @Suever, using a loop and logical matrix rather than cells</p> <pre><code>a = [3 3 5 5 20 20 20 4 4 4 2 2 2 10 10 10 6 6 1 1 1]; vals = unique(a); %find unique values vals = vals(randperm(length(vals))); %shuffle vals matrix aout = []; %initialize output matrix for ii = 1:length(vals) aout ... |
26,620,087 | 0 | 'pathos' provides a fork of python's 'multiprocessing', where 'pathos.multiprocessing' can send a much broader range of the built-in python types across a parallel 'map' and 'pipe' (similar to python's 'map' and 'apply'). 'pathos' also provides a unified interface for parallelism across processors, threads, sockets (u... |
21,841,153 | 0 | <pre><code>from itertools import chain def shuffle(list1, list2): if len(list1)==len(list2): return list(chain(*zip(list1,list2))) # if the lists are of equal length, chaining the zip will be faster else: a = [] while any([list1,list2]): for lst in (list1,list2): try: a.append(lst.pop(0)) except IndexError: pass retur... |
23,569,592 | 0 | Lint does not find an Activity from a Library <p>I have a library project (in ADT) containing an Activity.</p> <p>This library is used by a project that uses this Activity.</p> <p>All this works perfectly well. The Activity is declared in the main project's manifest, it compiles, it runs, it does everything I need.</p>... |
20,947,917 | 0 | Missing architecture x86_64 for MediaLibsDemo <p>I am using the following library for connecting to the Red5 server. <a href="https://github.com/slavavdovichenko/MediaLibDemos" rel="nofollow">https://github.com/slavavdovichenko/MediaLibDemos</a>. It gives me the following error. How can I add the missing architecture t... |
31,630,353 | 0 | <p>how i fix it? my subdomain not is randomically have where the replace for $1 ? cheers</p> <p>RewriteCond %{HTTP_HOST} ^(.<em>).domain.com RewriteRule ^(.</em>)$ <a href="http://domain.com/folder/%1/" rel="nofollow">http://domain.com/folder/%1/</a>$1 [R=301,L]</p> |
12,924,058 | 0 | <p>One complexity of MIDI files is <a href="http://dogsbodynet.com/fileformats/midi.html#RUNSTATUS" rel="nofollow">Running Status</a>. If there's sequence of messages of the same type and channel (eg all controllers or all notes) then MIDI can save a number of bytes by omitting the status byte. If this didn't use runn... |
28,116,016 | 0 | <p>So my solution is following:</p> <ol> <li>I created an instance.</li> <li>Install the required services on that instance.</li> <li>Created the image from the disk using the steps mentioned on this <a href="https://cloud.google.com/compute/docs/images#create_an_image_from_a_root_persistent_disk" rel="nofollow">link<... |
38,041,813 | 0 | cassandra error after yum update <p>Running CentOS 7.2, I did a yum update, and now I get errors when running cassandra. </p> <pre><code>[idf@node1 conf]$ grep -e 'tracetype_query_ttl' -e 'roles_validity_in_ms' -e 'enable_user_defined_functions' -e 'windows_timer_interval' -e 'enable_user_defined_functions' -e 'roles_v... |
17,664,302 | 0 | comparing float values in C program gets stuck <p>I am working on an assignment for an embedded software course, but I'm having the strangest problem.</p> <p>Using the code below:</p> <pre><code>void decidePotato(float held) { printf("Deciding Potato, held for %f seconds \n", held); if (held >= 1.99) { printf("Held ... |
32,776,328 | 0 | <p>That's because the <code>i</code> in your projection is referencing the original item in <code>oldUserEntities</code>, then <code>i.RowKey</code> is modifying the original data.</p> <p>Try this instead (assuming your entity is named <code>UserEntity</code>):</p> <pre><code>var oldUserEntities = userEntities.ToList(... |
23,008,635 | 0 | How to correctly expose images uploaded by web application? <p>In my Spring MVC web application I have a web form to upload images. These images are stored in a server folder outside web application (say <code>C:\\images</code>).</p> <p>Now I need to load these images in another page, but I don't want to expose the fol... |
18,559,895 | 0 | <p>If the file has been staged (it looks like yours was), a snapshot will exist is Git's database. We can get it back!</p> <p>Git stores snapshots internally in the <code>.git/objects/</code> direction in your repository. Each object is stored in a file named for its hash, split into directories by the first 2 charact... |
34,817,389 | 0 | <p><code>mysqli_query()</code> can only execute 1 query, if you want to execute multiple queries, you need:</p> <pre><code>if (mysqli_multi_query($conn, $sql)) { </code></pre> |
25,337,758 | 0 | <p>Add this line in <code>form2</code> constructor:</p> <pre><code>public Form2() { InitializeComponenet(); picturebox.Image = Image.FromFile(@"D:\img.jpg"); //added } </code></pre> |
4,179,716 | 0 | jQuery - Event for when an attribute of a node changes <p>I have a webpage with an external javascript library, and my own extra code. The external library can't be change. It manipulates dom elements, adds new ones, changes attributes (e.g. <code>src</code> on some <code><img></code> nodes, etc.). I am using jQu... |
23,304,328 | 0 | <p>Since this specific issue seems to be resolved but it hasn't been addressed in an answer, I'll make the general remark that when trying to debug an error that pops up in the jQuery/jQuery UI/etc files, it's usually not actually an error IN THAT FILE, it's an error in your usage of it that isn't actually breaking un... |
30,051,602 | 0 | How to display reports in dashboard ms dynamic crm 2015 <p>I have tried webresource and iframe way to display reports in dasboard but screen is blank in 2015 crm.Please find the blog links which i used to display reports:</p> <p><a href="https://reportingondashboard.codeplex.com/SourceControl/latest#ReportControl.html"... |
35,961,223 | 0 | <p>Use the <code>file()</code> function in PHP to split each line of the file into an array then set each element of the array equal to it's respective variable. For example:</p> <pre><code>$lines = file('user1.txt'); $firstname = $lines[0]; $lname = $lines[1]; $age = $lines[2]; $gender = $lines[3]; </code></pre> |
19,550,324 | 0 | <p>!true -> false</p> <p>!!true -> true</p> <p>!!!true -> false</p> |
34,086,082 | 0 | <p>for time:</p> <pre><code>pattern = ("(\d{2}:\d{2}:\d{2},\d{3}?.*)") </code></pre> |
30,944,846 | 0 | <p>Something is missing from your question. Your input string cannot have spaces and your output of a double containing spaces is not possible.</p> <pre><code>double result = Convert.ToDouble("555 555 584", CultureInfo.InvariantCulture); </code></pre> <p>Results in:</p> <p>An unhandled exception of type 'System.Format... |
4,942,483 | 0 | logcat indicate error? <p>hi now i am create simple andengine application...now my logcat indicate error....what mistake i made for my application.....</p> <pre><code> 02-09 13:05:01.560: ERROR/AndEngine(280): Failed loading Bitmap in AssetTextureSource.AssetPath: ggg 02-09 13:05:01.560: ERROR/AndEngine(280): java.io.F... |
10,705,624 | 0 | TeamCity building MSP files <p>For background: I've got quite a nice TeamCity setup; containing a ci build and a release build which uses WiX to build my installers and patch all the version numbers. When I do a new release build, I'd like to automatically create MSP patches against a previous set of installers. I'm th... |
26,600,737 | 0 | <p>Once buyer login to their paypal account during checkout, the buyer will be able to see their email and shipping address as shown in the image for PayPal Payment Standard buttons such as buynow, addto cart.</p> <p>If you are using Express checkout Integration, you can use <a href="https://developer.paypal.com/docs/... |
4,251,945 | 0 | Symfony Actions Namespacing, or a better way? <p>In Rails, you can organize controllers into folders and keep your structure nice with namespacing. I'm looking for a similar organizational structure in Symfony 1.4.</p> <p>I was thinking of organizing multiple actions.class.php files in an actions folder, but all I came... |
13,002,233 | 0 | <p>You were close.</p> <pre><code>a.menuLink:link { color: green; } </code></pre> <p>Was what you intended to achieve. But try this:</p> <pre><code>a.menuLink { color: green; } </code></pre> <p>Would mean a <em><code>a</code> with a classname of <code>menuLink</code></em>, the <code>:link</code> is redundant. </p> <hr... |
13,425,602 | 0 | <p>Here's what I would do with what you've given</p> <pre><code>$('span.[class^="cell_"]').each(function(i,v){ // loop through each span with class that starts with cell_ var num = +$(v).attr('class').split('_')[1]; // get the number from the class $(v).css('left',(num * 10) + 'px') // use it to get the px }); </code>... |
24,214,469 | 0 | <p>What's happening is the Dependency Property is getting Registered multiple times under the same name and owner. Dependency Properties are intended to have a single owner, and should be statically instanced. If you don't statically instance them, an attempt will be made to register them for each instance of the cont... |
22,328,355 | 0 | Unity3D: Trying to make a custom Sleep/Wait function in C# <p>All this started yesterday when I use that code for make a snippet:</p> <pre><code>void Start() { print("Starting " + Time.time); StartCoroutine(WaitAndPrint(2.0F)); print("Before WaitAndPrint Finishes " + Time.time); } IEnumerator WaitAndPrint(float waitTim... |
2,841,484 | 0 | How can a <label> completely fill its parent <td>? <p>Here is the relevant code (doesn't work):</p> <pre><code><html> <head> <title>testing td checkboxes</title> <style type="text/css"> td { border: 1px solid #000; } label { border: 1px solid #f00; width: 100%; height: 100% } </style>... |
36,716,181 | 0 | Getting Plus.PeopleApi.getCurrentPerson(mGoogleApiClient) null value <p>This is onConnected method :</p> <pre><code>try { mGoogleApiClient.connect(); Plus.PeopleApi.loadVisible(mGoogleApiClient, null).setResultCallback(this); if (Plus.PeopleApi.getCurrentPerson(mGoogleApiClient) != null) { Person currentPerson = Plus.P... |
37,273,355 | 0 | <p>try this code: write this code in your manifest</p> <pre><code> <activity android:name="Activity1" android:theme="@style/AppTheme1" /> </code></pre> <p>for another activity</p> <pre><code><activity android:name="Activity2" android:theme="@style/AppTheme2" /> </code></pre> |
6,530,963 | 0 | Do I need to use authentication check for public methods? <p>In object-oriented PHP application, do I need to use <code>authentication</code> check in almost every <code>public</code> method in my application for security?</p> <p>I'm worried about this vulnerability: <a href="http://cwe.mitre.org/top25/#CWE-306" rel="n... |
5,910,090 | 0 | <pre><code> int[] a1, a2, a3; a1 = new int[3]; a2 = new int[1]; a3 = new int[1]; bool equalLength = (a1.Length == (a2.Length & a3.Length)); </code></pre> |
29,316,538 | 0 | Is f(++i, ++i) undefined? <p>I seem to recall that in C++11, they made some changes to the sequencing behaviour and that now i++ and ++i have different sequencing requirements.</p> <p>Is <code>f(++i, ++i)</code> still undefined behaviour? What is the difference between <code>f(i++, i++)</code> and <code>f(++i, ++i)</co... |
28,951,867 | 0 | <p>Your code is a bit messy but a quick fix will be to add: </p> <p><code>this.props.enter(this.refs.inputEl.getDOMNode().value);</code> </p> <p>where your <code>console.log()</code> is. I will edit my answer with the full explanation once I'm on my laptop</p> |
37,345,852 | 0 | <p>Check your main method:</p> <pre><code>public static void main(String[] args) throws Exception { new Test().searchBetweenDates(startDate, endDate); searchBetweenDates(startDate, endDate); </code></pre> <p>the parenthesis is missing. It should be:</p> <pre><code>public static void main(String[] args) throws Exceptio... |
9,838,299 | 0 | <p>How to debug a Rails application:</p> <ol> <li>Place a breakpoint somewhere in the app code</li> <li><a href="http://www.jetbrains.com/ruby/webhelp/running-and-debugging-2.html" rel="nofollow">Create Rails Server Run/Debug configuration</a> (or use the existing one if the project was created in RubyMine)</li> <li>C... |
12,436,436 | 0 | <p>The answers so far are all right, but i think you should do it differently for future use. Maybe your count will extend, so just search for the first occurence of "." and then cut the string there.</p> <pre><code>text = text.substring(text.indexOf(".")+1); </code></pre> |
15,973,808 | 0 | <p>You're sending something called "books.xls", and correctly signalling that it's an Excel spreadsheet... but it isn't. You've completely missed the step of actually creating an Excel spreadsheet containing your data (which is probably 80% of the work here).</p> <p>Try searching the web for how to create an excel spr... |
36,501,884 | 0 | <p>I need to do something like that, but When I try to execute this code it stops with an error</p> <pre><code>Run-time Error 91 : Object variable or With block variable not set. </code></pre> <p>And the error is in those lines:</p> <pre><code>iTotalWords = wordHilite.getNumText iTotalWords = PDFJScriptObj.getPageNumW... |
20,976,898 | 0 | <p>Firstly, the k-means clustering algorithm doesn't necessarily produce an optimal result, thus that's already a fairly significant indicator that it might have different results from different starting points.</p> <p>It really comes down to the fact that each cluster uses the points in its own cluster to determine w... |
40,451,054 | 0 | Can't install HTK on linux <p>I wan't to use ALIZE for speaker recognition and after the instalation there is one of the steps: <em>feature extraction using SPRO or HTK</em> So I downloaded zip file of HTK and using terminal I configured everything, but when entering <strong>make all</strong> I'm getting this error:</p... |
19,230,907 | 0 | How to override erb with liquid? <p>I've added a theming directory to my app as described <a href="http://stackoverflow.com/a/6082751/628859">here</a>, using <code>prepend_view_path</code>. It works as expected. I can now add a view structure in my app under <code>app/themes/my_theme/views</code></p> <p>Now, I want to ... |
2,118,469 | 0 | <p>Use ViewState between postbacks otherwise value of property will be lost.</p> <pre><code>public string UrlForRedirecting { get { object urlForRedirecting = ViewState["UrlForRedirecting"]; if (urlForRedirecting != null) { return urlForRedirecting as string; } return string.Empty; } set { ViewState["UrlForRedirecting... |
29,405,880 | 0 | mySQL group by 3 columns <p>I have a query here that group by 3 columns and count the total rows</p> <pre><code>SELECT count(*) FROM ( SELECT date,bankName FROM table GROUP BY date,bankName,referenceNo ) a; </code></pre> <p>Basically, this query is used for pagination. I have two queries before this one.</p> <p>I have ... |
30,891,392 | 0 | WPF: how to change my chart to get only one value instead of 2 <p>This is my <code>chart</code>:</p> <pre><code><Grid> <chartingToolkit:Chart Name="lineChart" Margin="16,90,30,483" Background="Transparent"> <chartingToolkit:LineSeries DependentValuePath="Value" IndependentValuePath="Key" ItemsSource="{Bi... |
5,919,530 | 1 | What is the pythonic way to calculate dot product? <p>I have two lists, one is named as A, another is named as B. Each element in A is a triple, and each element in B is just an number. I would like to calculate the result defined as :</p> <p>result = A[0][0] * B[0] + A[1][0] * B[1] + ... + A[n-1][0] * B[n-1]</p> <p>I ... |
15,185,421 | 0 | Using the Result arg in SuperObject <p>i'm using this superobject unit in one of my project as an rpc protocol, and inside a remote called procedure (signature has a var Result arg) i want to know how to use that arg...</p> <p>isn't there a documentation ? thanks.</p> <pre><code>program test_rpc; {$IFDEF FPC} {$MODE OB... |
20,195,544 | 0 | Scala: how to understand the flatMap method of Try? <p>The flatMap method of the Success is implemented like this:</p> <pre><code> def flatMap[U](f: T => Try[U]): Try[U] = try f(value) catch { case NonFatal(e) => Failure(e) } </code></pre> <p>I kinda understand what this method is doing, it helps us to avoid writ... |
12,677,532 | 0 | Datatable custom sort function on a given column <p>I am using jquery datatables and I need to sort data by the first column which contains checkboxes by displaying checked boxes first </p> <pre><code>oTable = $('#userTable', context).dataTable( { "sAjaxSource":'/ajax/getdata/', "fnServerData": function ( sSource, aoDa... |
36,001,963 | 0 | <p>Partitionkey and Rowkey are just two properties of entitis in Azure table. Rowkey is the "primary key" within one partition. Within one PartitionKey, you can only have unique RowKeys. If you use multiple partitions, the same RowKey can be reused in every partition. PartitionKey + RowKey form the unique identifier(P... |
16,875,368 | 0 | <p>This is a good use case for <em>promises</em>. </p> <p>They work like this (example using jQuery promises, but there are other APIs for promises if you don't want to use jQuery):</p> <pre><code>function doCallToGoogle() { var defer = $.Deferred(); callToGoogleServicesThatTakesLong({callback: function(data) { defer.... |
1,340,401 | 0 | <p>You can't with most SSH clients. You can work around it with by using SSH API's, like <a href="http://www.lag.net/paramiko/" rel="nofollow noreferrer">Paramiko</a> for Python. Be careful not to overrule all security policies.</p> |
18,041,981 | 0 | <p>Well the error is quite logical</p> <pre><code>if command == "iam": self.name = content msg = self.name + "has joined" elif command == "msg": msg = self.name + ": " + content print msg </code></pre> <p>In the first if clause you assign a value to self.name which may either rely on assumption that self.name exists s... |
6,713,460 | 0 | <p>To avoid string processing, lambdas are a good solution as in the answer by Johannes Schaub. If your compiler doesn't support lambdas yet then you could do it like this with no C++0x features and no macroes:</p> <pre><code>doTrace(LEVEL_INFO, some_props) << "Value of i is " << i; </code></pre> <p>doTrac... |
29,016,131 | 0 | SVG: Why <p> element is not displaying in <foreignobject> <p>I'm attempting to put a <code><p></code> element inside a <code><foreignobject></code> inside an <code><svg></code> node in chrome but I am not seeing the text. I have inspected the element and the DOM model shows the structure I expect. I c... |
35,480,331 | 0 | How run async method multiple times in separate threads? <p>I am newbie in using of await/async and windows phone 8.1 programming. I need to run async method simulateously in more than one thread. May be four, because my phone has four cores. But i cannot figure it out :-(</p> <p>This is example of my async method.</p>... |
7,100,174 | 0 | <p>You'll need to subclass <code>UITableViewCell</code> and override <code>-layoutSubviews</code>. When the cell's editing bit is set to YES, <code>-layoutSubviews</code> will automatically be invoked. Any changes made within <code>-layoutSubviews</code> are automatically animated.</p> <p>Consider this example</p> <pr... |
1,794,705 | 0 | <p>Seems like it would make more sense to compute the parameters within if/else or switch logic, store them in variables, and then call the function afterwords with whatever parameters you computed.</p> |
30,177,008 | 0 | <p>You should check out the update <a href="https://developers.google.com/analytics/devguides/reporting/core/v3/quickstart/" rel="nofollow">Hello Analytics API</a> docs. That way you only need to use the <a href="https://github.com/google/google-api-php-client" rel="nofollow">Google APIs Client Library</a> for PHP and... |
22,445,670 | 0 | Save and restore elscreen tabs and split frames <p>I have many elscreen tabs(frames?) that are horizontally and vertically split. I'd like to be able to save the current buffers, windows layout in each frame, and the frames themselves.</p> <p>In short, I'd like to be able to close emacs and re-open with relatively the ... |
36,693,872 | 0 | How to count households from each postcode in the database <p>I made an er diagram for a business and based on which I need to run a query for counting household from each postcode. </p> <pre><code>SELECT CU.POSTCODE, Count(CU.CUSTOMER_ID) AS HOUSEHOLDS_PER_POSTCODE FROM CUSTOMER AS CU INNER JOIN HOUSEHOLD AS HHD ON CU... |
34,643,390 | 0 | <p>You can find the value of the exponent using <code>log10</code>:</p> <pre><code>testVector = [3.5688e+10 3.1110e+10 5.2349e+10]; lowExp = min(floor(log10(testVector))); eVal = 10^lowExp; </code></pre> <p>Result:</p> <pre><code>eVal = 1.0000e+10 </code></pre> <p>Then you'll need to divide your original vector by <co... |
25,168,877 | 0 | <p>The answer may also lie in eval.points. Researching more it looks like you can enter your own points here, so you can potentially enter the points used to build the kde or an entirely new set of points.</p> |
5,598,274 | 0 | View drawn under status bar <p>So i managed to load another view when someone presses a button ,but it loads it to high. `i don't know why this happens. The difference is exactly the top bar hight. This is my code: In the delegate i have:</p> <pre><code>- (void)flipToAbout { AboutViewController *aaboutView = [[AboutVie... |
36,413,627 | 0 | <p>The issue was the Class assignment that was with the Search Icon. After removing the line <code>class: col-mw-3</code> it ran fine, and in all of the browsers. Also make sure nothing is covering the <code><a></code> Tag as well!</p> |
11,968,811 | 0 | <p>To go from an DateTime in the "Excel Format" to a C# Date Time you can use the <a href="http://msdn.microsoft.com/en-us/library/system.datetime.fromoadate.aspx">DateTime.FromOADate</a> function.</p> <p>In your example above:</p> <pre><code> DateTime myDate = DateTime.FromOADate(41172); </code></pre> <p>To write it ... |
10,187,851 | 0 | What gets send to the server with request factory <p>I have problem to understand what does Request factory send to server. I have a method </p> <pre><code>Request<NodeProxy> persist(NodeProxy node) </code></pre> <p>NodeProxy is an Object from tree like structure (has child nodes and one parent node, all of type ... |
7,013,326 | 0 | Firefox maximize doesn't trigger resize Event <p>I try to catch resize events with jquery and the </p> <pre><code>$(window).resize(function() { } </code></pre> <p>Everything works fine, except when I use the maximize Button in Firefox, the event is not thrown.</p> <p>Is there something wrong here?</p> |
1,866,475 | 0 | Table footer view buttons <p>I have some signup form that had email and login text fields as table cells and signup button as button in footer view. That all functioned superb, here is the code</p> <pre><code>frame = CGRectMake(boundsX+85, 100, 150, 60); UIButton *signInButton = [[UIButton alloc] initWithFrame:frame]; ... |
7,207,858 | 0 | php max function to get name of highest value? <p>I have a multi array and I am using the max function to return the highest value, however I'd like it to return the name? How can I do that?</p> <pre><code>$total = array($total_one => 'Total One', $total_two => 'Total Two'); echo max(array_keys($total)); </code><... |
9,577,115 | 0 | NoodleLineNumberView, the numbers are not aligned properly, not sure whats wrong <p>I'm trying to add line numbers using <a href="https://github.com/MrNoodle/NoodleKit" rel="nofollow noreferrer">NoodleLineNumberView</a>. The issue I'm having is that the line numbers dont line up properly with thier line number.I have t... |
34,375,310 | 0 | how to assign query to GridItem in SearchView? <p>I am trying to create a SearchView that searches for GridItems that each launch a specific second activity. However I cannot figure out the code that will help me with this. I have already set an onQueryTextChangeListener for the SearchView which should allow me to show... |
24,690,672 | 0 | <p>You can use <a href="https://docs.python.org/3.4/library/functions.html#input" rel="nofollow"><code>input</code></a> to accept a string from the user. As you'll have two co-ordinates to punch in, perhaps call this twice. Once you get the strings, cast the locations to integer via <code>int()</code>.</p> <p>If you w... |
30,462,181 | 0 | Webpack: Module build failed with jade-loader <p>This is likely a config issue, but I'm new to Webpack and haven't been able to figure it out after a few days. I'd appreciate some help! </p> <p><strong>Packages</strong></p> <ul> <li>webpack 1.9.8 </li> <li>jade-loader 0.7.1 </li> <li>jade 1.9.2 </li> </ul> <p><strong>w... |
35,630,788 | 0 | <p>I will explain how solved this problem. </p> <p>First of all the refresh token process is critical process. In my application and most of applications doing this : If refresh token fails logout current user and warn user to login .(Maybe you can retry refresh token process by 2-3-4 times by depending you)</p> <p>I ... |
38,564,716 | 0 | <p>Maybe this - JOIN instead of subselect:</p> <pre><code>SELECT t1.week_val, CASE t1.week_val WHEN 1 THEN t2.hour_val ELSE t1.hour_val END AS hour_val FROM table_name t1 LEFT JOIN table_name t2 ON t2.week_val = t1.week_val + 1 </code></pre> |
6,177,796 | 0 | <p>There are chances that the first solution is faster.</p> <p>A very nice article :</p> <p><a href="http://cpp-next.com/archive/2009/08/want-speed-pass-by-value/" rel="nofollow">http://cpp-next.com/archive/2009/08/want-speed-pass-by-value/</a></p> |
41,035,210 | 0 | AnimationDrawable animation on KeyboardView.Key android <p>I want to play animation on a key on custom keyboard. I've created the custom keyboard and everything is working fine, except the animation which is kind of popping up of key. I'm accomplishing it through AnimationDrawable. When <code>animation.start()</code> i... |
29,093,286 | 0 | <p>You can do something like:</p> <pre><code>$("#grid").kendoGrid({ dataSource: { type: "json", pageSize: 10, serverPaging: true, transport: { read: "http://whatever" } }, selectable: "cell", pageable: true, columns: ["ProductID", "ProductName"], change: function() { var dataItem = this.dataSource.view()[this.select()... |
21,132,192 | 0 | Outputting file contents as UTF-8 leads to character encoding issues <p>I set my header as follows:</p> <pre><code>header( 'Content-Type: text/html; charset="utf-8"' ); </code></pre> <p>and then output a local file on my server to the browser using the following code-segment:</p> <pre><code>$content = file_get_contents... |
6,786,715 | 0 | <pre><code><Button> <Button.Background> <ImageBrush Source="/AlarmClock;component/Images/page_preview.png" /> </Button.Background> </Button> </code></pre> <p>just make sure the file is maked as "Resource" in visual studio. Alternatively you can mark it as "Content" and use it like this:</... |
12,165,682 | 1 | yield with recursive function in python <p>I am trying to create a generator for permutation purpose.I know there are other ways to do that in python.But this is for somthing else. But I am not able to yield the values .Can you help?</p> <pre><code>def perm(s,p=0,ii=0): l=len(s) s=list(s) if(l==1): print ''.join(s) eli... |
27,428,019 | 0 | Report PHP / MySQL <p>I apologize in advance for my bad English level.</p> <p>I explain my problem ... I try to create a web interface that would handle the number of times that the employees will eat in the canteen ...</p> <p>Everything works fine but I would get a report of the number of times employees. and that I h... |
33,032,934 | 0 | <p>I've noticed this happens with Redshift/Flyway if the schema or table name contains characters in mixed case.</p> <p>Try to configure an all-lower-case metadata table name instead, like <code>test_schema.db_schema_ver</code>, for example.</p> |
7,784,436 | 0 | <p>First, your code does not have any effect. Hash table "breaks" the order. The order of elements in hash table depends on the particular hash implementation. </p> <p>There are 2 types of Maps in JDK: HashMap and SortedMap (typically we use its implementation TreeMap). BTW do not use Hashtable: this is old, synchroni... |
30,508,156 | 0 | Multiple multiple linear regression <p>I have 40 SNPs and want to see the effect each individual SNP has on the age of menopause. To do this I need do a multiple linear regression each of the individual SNPs. I want to avoid typing the same command 40 different times (as in the future I'll be doing this with even more ... |
38,134,727 | 0 | How to animate RecyclerView height before items are shown <p>How can I, or should I say when can I animate recyclerView height before items are shown ? I can get the final height in onMeasure but the items always appear too fast and the animation doesn't work.</p> <p>Any idea on how I could get this animation to work ?... |
20,252,938 | 0 | <p>I am using <code>BackgroundWorker</code> a lot and can tell that <code>RunWorkerCompleted</code> event is <strong>definitely</strong> ran in UI thread. Also, you can pass the <code>DoWork</code> result to according eventArgs field and then, in <code>RunWorkerCompleted</code> take it from eventArgs to perform some U... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.