pid
int64
2.28k
41.1M
label
int64
0
1
text
stringlengths
1
28.3k
26,787,995
0
<p>Absolutely positioned elements are removed from the normal document flow, so they won't fill up 100% of their parent like regular static block level elements. Instead, they rely on their content width or a specified width. Firefox seems to apply the content width a bit differently than Chrome or IE, which is why it...
38,942,505
0
<p>I have altered the accepted answer's data and query.</p> <p>The data is now a sample of a data from a 5 star rating system.<br> The function now correctly uses average values of all the posts.</p> <p>The difference is in the calculation of those average values, instead PHP, they are calculated in the SQL, for the p...
38,512,896
0
java regex match words that aren't numbers <p>I have a json missing quotes </p> <pre><code>{ data: [{ timestamp: 1467720920, val: { min: 6.90, max: 7.25, avg: 7.22 }, temp: { min: 75.49, max: 75.49, avg: 75.49 }, gps: { lat: 0.707581, long: -1.941864, hdop: 2.54, ttf: 49.4 } }], id: A1000049A6248C, groupId: HU5PPC1E, r...
31,204,453
0
<p>I'm afraid <code>document.save()</code> only returns a populated version of <code>model</code>. You can see all files in <code>model.files</code> but then it would be up to you to figure out which was the last one.</p> <p>One alternative is to create the file before adding it to document. You should be able to do:<...
22,474,325
0
My $_FILES['file']['name'] is producing gibberish <p>I am uploading files with the following code using Bootstrap as my front-end framework.</p> <pre><code>&lt;form method="POST" enctype="multipart/form-data" action= "php/up-load.php" role="form" &lt;div class="form-group"&gt; &lt;label for="file" class="col-sm-5 contr...
34,608,616
0
Objective C model - How to download image inside a model class? <p>I have the following model of a box, it is meant to download images in a background thread and create an image from this downloaded image.</p> <p>The viewcontroller has a custom uicollectioncell, but its just a uiimageview; nothing too complex.</p> <p>I...
31,788,660
0
Excel Chart colorize 3D bars <p>Colorzing a 3D-Bar chart with Excel and interop does not work:</p> <p>Creation of chart:</p> <pre><code>chartRange = xlsSheet.Range[xlsSheet.Cells[1, 1], xlsSheet.Cells[array.GetLength(0), array.GetLength(1)]]; chartPage.SetSourceData(chartRange, Excel.XlRowCol.xlRows); chartPage.ChartTy...
14,905,038
0
<p>If you call <code>System.exit()</code> your code won't execute <code>finally</code>, because that call terminates your JVM. </p>
13,775,908
0
<p>According to the comment in the source of HashMap, it has to be a power of two. It makes sense in a HashMap, because of how the hashing works.</p> <p>However, there is no reason why power of two makes sense in an arraylist. If there was any reason behind choosing such a number, it would have been mentioned in the s...
10,530,657
0
<pre><code> var latlong = "(2.34000000, -4.500000000)" var coords = latlong.replace(/[\(\) ]/g,'').split(','); console.log(coords[0]) console.log(coords[1]) </code></pre>
3,518,810
0
<p>Change <code>"Mode=Share Deny Write"</code> to <code>"Mode=Read"</code></p> <p>in connection string</p>
718,363
0
Why does IE7 fetch every favicon at startup? <p>I am trying to understand what IE7 is up to and why it takes forever to start up.</p> <p>I've been using Fiddler 2 to monitor traffic and the content of headers. I'll start Fiddler 2, then fire up IE7. And each time i do this I see that this browser always appears to chas...
3,932,774
0
divide 64bit in two 32bit registers by 32bit <p>I am trying to write an x86 emulator in JavaScript for education purposes. I have already written a compiler and at the moment I am trying to write the x86 emulator in JavaScript.</p> <p>I have however a problem with the DIV instruction. According to <a href="http://siyob...
17,523,964
0
listing generic relations in Django <p>I have a <strong>generic relation</strong> in a class called <strong>Unsubscribe</strong>. The relation at the moment links to a class called <strong>Contact</strong>.</p> <p>I would like to <strong>list all Unsubscribe Contacts</strong> in view. My question is, <strong>where do I...
34,631,211
0
<pre><code>&lt;div &gt;&lt;img src="&lt;%=request.getContextPath() %&gt;/images/logo.gif" title="Your Title" /&gt;&lt;/div&gt; </code></pre>
20,323,103
0
<p>When using == or != or > or &lt; if the types of the two expressions are different it will attempt to convert them to string, number, or Boolean etc<br/> use below code to compare </p> <pre><code>if ( Date.parse ( currentdate) &gt; Date.parse ( enddate) ) { // your code } </code></pre>
39,691,107
0
<p>You are embedding your data in the <code>Header</code> section of PostMan. These are for <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers" rel="nofollow">HTTP Headers</a> and not what you want. When using angular's post method, the parameters are in fact embedded into the Body section of a POST re...
18,537,117
0
<p>Divide and conquer. <code>printf</code>. Patience.</p>
27,276,680
1
How to get the last executed command in IDLE as in R? <p>When I use R and execute a command in the command window, I can just press up and I get the last executed command in the current command line. What key do I need to press in order to get the same in Python? </p> <p>Edit: When I asked this question, I did not know...
24,548,796
0
<p>This can only go wrong if you copied d3dcompiler_47.dll from your Windows directory. Which is not suitable to run on older Windows versions.</p> <p>You <em>must</em> use the redistributable version of it. You'll find it back in the Windows SDK directory. Like C:\Program Files (x86)\Windows Kits\8.1\Redist\D3D on mo...
755,889
0
<p>Try console.log() in the event to see if it is launched. Changing the store should work, however for other widgets like grid you have also to call refreshing methods.</p>
28,623,648
0
<p>Just do</p> <pre><code>String attValue = driver.findElement(byAnyMethod).getAttribute("AttributeName"); </code></pre> <p>Hope it helps</p>
34,573,051
0
<p>CSS: </p> <pre><code>h2 { color: blue; background-color: white; text-align: center; } header { background-color: black; width: 100%; height: 100px; } </code></pre> <p>Hope this work :) </p>
21,344,191
0
<p>Store the schedule as an iCalendar <a href="http://stackoverflow.com/questions/tagged/rrule?sort=votes">rrule</a> (or a more normalized version if your prefer). </p> <p>Create a function to return upcoming dates for the rule. </p> <p>Create a materialized view of upcoming dates if you need to, to boost performance....
3,038,454
0
Lambda Expressions in T4 Templates <p>Whilst putting together a T4 template I threw in a simple lambda expression:</p> <pre><code>&lt;#=string.Join(",", updateFields.ConvertAll(field =&gt; field.Name).ToArray())#&gt; </code></pre> <p>This causes the template to fail to generate with the error:</p> <pre><code>Compiling ...
39,322,006
0
How to compile scala files from eclipse <p>I could not find any relevant answer to my following question : </p> <p>I'm trying to compile an existing scala and java project from eclipse. I have installed the software from eclipse as well - but i'm still having errors.</p> <p><a href="http://i.stack.imgur.com/nxuo0.png" ...
15,351,389
0
<p>I don't think so. SMO supports SQL versions going back to before that syntax was supported. Aside from making smaller DML scripts, they have very little to gain by adding that functionality to SMO and it costs them maintainability in the code base.</p>
11,517,023
0
<p>Recover the id and use in the second activity:</p> <pre><code>public void onItemClick(AdapterView&lt;?&gt; parent, View view, int position, long id) { String rowid = String.valueOf(id) Bundle bundle = new Bundle(); bundle.putString("ID", rowid); intent.putExtras(bundle); startActivity(intent); } </code></pre> <p>Re...
26,717,074
0
gmaps4rails change map id <p>I have a Rails 3.2.x app which I'm using <code>gmaps4rails 2.0.0.pre</code> (yes I know it's an old version). I'm using this to plot different vehicles (units) on a map in a gps view/controller. Now I'm trying to leverage <code>gmaps4rails</code> to display a map in a different view/control...
24,754,437
0
<p>First thing is: you don't need to afraid cache's loose between requests - it's rather information that you shouldn't use it as a <em>regular</em> persistence layer.</p> <p>For main question: most probably <a href="http://playframework.com/documentation/2.3.x/ScalaSessionFlash" rel="nofollow"><strong>Flash</strong> ...
29,388,384
0
How to fire a keyboard shortcut function in JavaScript? <p>I have a record functionality in my website. If a user hits <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>R</kbd> the recording will begin. Now I would like a button named <code>RECORD</code> in my html page, so that when a user hits that button recording will start.</p>...
25,570,856
0
<p>This line is not necessary and should be removed from your code:</p> <pre><code>gpuErrchk( cudaMalloc((void**)&amp;dev_inp, sizeof(unsigned char)*flipped.rows*flipped.cols) ); </code></pre> <p>This line creates a device allocation, and assigns the pointer for that allocation to <code>dev_inp</code>.</p> <p>The prob...
24,414,708
0
clang: error: linker command failed with exit code 1 with duplicate symbol _TableLookup in database.o and main.o <p>After changing the code, I got new error in database_definitions.h header file. The error is near the 'extern const Lookup_Table TableLookup[TABLE_COUNT];' and mentioned the error in the code with comment...
6,490,672
0
<p>See</p> <p><code>$_SERVER['HTTP_HOST']</code></p> <p>More verbose <a href="http://php.net/manual/en/reserved.variables.server.php" rel="nofollow">http://php.net/manual/en/reserved.variables.server.php</a></p>
6,140,793
0
I have a syntax error in my PHP script? <p>I am working on a project were I need to turn text in a table cell into a dynamic link and I am getting an error when escaping to HTML.</p> <p>Here are the line of code I am trying to turn into a link. It works perfect before I try to make it a link.</p> <pre><code>echo "&lt;t...
21,699,730
0
how to run a java rmi program in the property of a jsp button <pre><code> &lt;%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%&gt; &lt;%@page import="com.studytrails.tutorials.springremotingrmiclient.TestSpringRemotingRmi" %&gt; &lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4....
39,801,975
0
<p>One data.table way of indexing a column by number would be to convert to a column name , convert to an R symbol, and evaluate:</p> <pre><code>mydata[ , eval( as.symbol( names(mydata)[1] ) )] [1] "ID123" "ID22" "AAA" &gt; grep("^ID", mydata[,eval(as.symbol(names(mydata)[1]))]) [1] 1 2 </code></pre> <p>But this is no...
33,453,542
0
<p>If you are using AppCompatActivity then you can directly do the following in your main/parent activity.</p> <blockquote> <p><code>int FEATURE_ACTION_BAR_OVERLAY</code> : Flag for requesting an Action Bar that overlays window content.</p> </blockquote> <pre><code>@Override protected void onCreate(Bundle savedInstanc...
3,896,276
0
<p>Mads, that did just the trick! Thank you so much, I knew there was a very simple solution that I just wasn't seeing. Here is the magical line that converts an XML string to JSON: </p> <pre><code>String ret = XML.toJSONObject(aStringOfXml).toString(); </code></pre>
35,936,122
0
Detect visibility of the fragment inside a navigation drawer <p>I have a fragment in the SDK that the wrapper application may display in the navigation drawer. I want to detect when this fragment will be visible to the user, for tracking purposes, from the Fragment itself. Is there any way to do it ?</p>
39,870,690
0
how can i get Get date text .Not able to get any text on the whole page.Attached Image <pre><code>List&lt;WebElement&gt; getAllTextOnPage = driver.findElements(By.id("com.condecosoftware.deskbooking:id/action_bar_root")); </code></pre> <p><a href="https://i.stack.imgur.com/yF9vE.png" rel="nofollow"><img src="https://i....
13,516,738
0
<p>I had the same problem : primefaces (or richfaces) offers rowspan only for header and footer.</p> <p>Then I tried to use the icefaces <code>ace:datatable</code> component and it run by adding only one attribute in the colum(s) you want to be "rowspanable" : <code>ace:column</code> : <code>groupBy="#{bean.field}"</c...
21,857,708
0
<p>div ids==>opened,phone1 each has a flip ep</p> <pre><code>&lt;div class="w" id="opened"&gt;BEGIN&lt;div class="ep"&gt;&lt;/div&gt;&lt;/div&gt; &lt;div class="w" id="phone1"&gt;PHONE INTERVIEW 1&lt;div class="ep"&gt;&lt;/div&gt;&lt;/div&gt; </code></pre> <p>eg:<a href="http://jsplumbtoolkit.com/demo/dynamicAnchors/j...
1,912,183
0
<p>I recently joined this company and i see they are using UniObjects.Net dll for interacting with this Data base Check it out its from IBM not sure about the performance though</p>
10,323,899
0
Recording user action to an array with Jquery <p>I am trying to make a simple user click action recorder in jquery but am having some trouble. I want the user to click a record button then once clicked record what he clicks on. Then press stop button to stop recording. What I have so far is:</p> <pre><code>var stack = ...
17,490,647
0
<p>Why not simple:</p> <pre><code>.a { color: red; } .b { color: blue; } .c { color: yellow; } </code></pre> <p>The difference between those two is that first one covers all six types:</p> <pre><code>.one .a, .one .b, .one .c, .two .a, .two .b, .two .c </code></pre> <p>While the second one only covers 4:</p> <pre><cod...
14,955,957
0
Angular js - data integrated in app Controller without external json . how to render data <p>how can i tell angular to inject the data from scope.shits into ShitDetail Controller?</p> <pre><code>function ShitCtrl($scope) { $scope.shits = [ { "id": "goMedus", "name": "goMedus", "snippet": "Fast just got faster with Nexu...
30,963,247
0
<p>You want to know the difference in these lines:</p> <pre><code>Base obj1 = new Derived(); Derived obj2 = new Derived(); </code></pre> <p>In both the cases the object constructed is of class <code>Derived</code>but references are different. You are able to use reference of type <code>Base</code> because <code>Derive...
19,171,799
0
<p>I have the same exact issue with Safari 6.1, getting <code>MEDIA_ERR_SRC_NOT_SUPPORTED</code> when trying to load a file from an input, like so:</p> <pre class="lang-js prettyprint-override"><code>var fileInput = document.querySelector('#file'), video = document.querySelector('video'); fileInput.addEventListener('c...
18,448,447
0
<p>I've found a solution to my problem. Here again (in short) what I tried to accomplish.</p> <p>Task build an <code>NSMutableArray</code> which will act as the dataSource object for a <code>UITableView</code> each entry includes core data fetch and processing operations parallelise work and add results on completion,...
5,279,815
0
Eclipse CDT Headless Build Question <p>Using Eclipse CDT 7.0, is there a way to specifiy to build just a single build configuration on the commandline when doing a headless build?</p>
7,777,145
0
<p>LDAP-compliant directory servers should provide information about the <code>namingContexts</code> when the root DSE is queried. For more information about the root DSE, see "<a href="http://www.evernote.com/shard/s5/sh/e6bdc1cd-068d-4d63-93f1-a3275f7a703b/b5968790355e854a35ba36dc775144b9" rel="nofollow">LDAP: The r...
33,192,074
0
Programming principles and practice (2nd) by Bjarne stroustrup - Chapter 3.3 , code isn't working <p>So i just started reading this book and copy pasted from the pdf file this code :</p> <pre><code>// read name and age (2nd version) int main() { cout &lt;&lt; "Please enter your first name and age\n"; string first_name ...
9,786,118
0
<p>The Reachability APIs will provide the connection change notifications to your app so that you can know when the connectivity changed from WWAN to wifi. It will not tell you if you've changed from Edge to 3G or LTE unfortunately. The Reachability API also has methods to test reachability to a specific host. So, in ...
17,680,150
0
<p>You can use Object instant of StudentUnion. Object will accept all classes. </p> <pre><code>public class CommonComparator implements Comparator&lt;Object&gt; { public int compare(Object s1, Object s2){ .... return result // 1 or 0; } } </code></pre>
12,521,983
0
JS Validation if dropdown value selected or not <p>I am trying to write a validation block inside my JS to check if the user has selected a value or not and pop up a message if the value is not selected. </p> <pre><code>function validate(form) { var success = true; var message = ""; if (form.dropdown.selectedIndex == 0...
2,999,048
0
<p>I would use php personally. Then you can save which page layout you chose for them as a session var making it easy to load that layout on each page refresh. You would probably also want to save into the database with their username (if they login) and if they visit later show them the same layout.</p>
20,440,321
0
<p>First look at the exception<br> <em>java.lang.OutOfMemoryError: bitmap size exceeds VM budget</em><br> and most probably this is the line in your code <br> <em>at com.PACKAGE.MainActivity$MyListAdapter.getView(MainActivity.java:132)</em> (notice your package)</p> <p>You tried to load an image larger than your heap ...
15,530,180
0
<p>Ajax code to call the add_driver.php </p> <pre><code>if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 &amp;&amp; ...
26,048,323
0
Code not executed in TFrame.Create <p>I have created a component with TFrame as ancestor with the following code:</p> <pre><code>type TCHAdvFrame = class(TFrame) private { Private declarations } FOnShow : TNotifyEvent; FOnCreate : TNotifyEvent; protected procedure CMShowingChanged(var M: TMessage); message CM_SHOWINGCH...
32,504,044
0
<p>You can use for loop like this, </p> <pre><code>for(i=1;i&lt;=num;i++){ txtView.append(word+"\n"); } </code></pre>
1,998,303
0
<pre><code>$randomPool = array_rand ( $butters-&gt;users-&gt;user, 10 ); </code></pre>
23,489,606
0
<p>If you want <code>Monster1</code> image to come from the array <code>kanaCharacters</code> with the index number from <code>imageDisplay</code> wouldn't you do this?</p> <pre><code>NSArray *array = [NSArray arrayWithObjects:@"a",@"b",@"c", nil]; //Setup array int imageDisplay = arc4random_uniform([array count]); //...
17,751,107
0
Gradle compile dependency ordering in InteliJ <p>I have a gradle project with subprojects, and Servlet API 2.5. I've added Servlet 3.0 and compile fine from command line gradle. However, InteliJ loads Servlet 2.5 classes first, so I am unable to compile. </p> <p>How can I manage dependency ordering within InteliJ?</p>
22,127,764
0
<p>in you initializers try doing something like this </p> <pre><code>#config/initializers/devise.rb #provider1 config.omniauth :facebook, ENV['FACEBOOK_APP_ID'], ENV['FACEBOOK_SECRET'], :site =&gt; 'https://graph.facebook.com/', :authorize_path =&gt; '/oauth/authorize', :access_token_path =&gt; '/oauth/access_token', ...
7,668,931
0
<p>Yop you should be looking into push notification (it's a lot more complicated than the periodic agent...)</p> <p>But periodic agent are set to 30 mins (and 25sec of code execution I think) and there is NOTHING you can do about it. Also note that the user can decide to deactivate your periodic agent in the options.<...
39,526,282
0
<p><code>[B@5f18cd5</code> is not a byte, it's a string representation of a reference. You can't turn them back into anything. </p> <pre><code>public class Ref { public static void main(final String[] args) { System.out.println(new Ref()); } } //Outputs: Ref@19e0bfd </code></pre> <p><code>foo@address</code> is a refer...
39,831,694
0
<p>If you follow through the <a href="https://referencesource.microsoft.com/#System.Xml/System/Xml/Serialization/XmlSerializer.cs,292c7197dcb706a1" rel="nofollow">reference source</a> you end up <a href="https://referencesource.microsoft.com/#System.Xml/System/Xml/Serialization/Compilation.cs,661" rel="nofollow">here<...
5,444,897
0
<p>Sounds like your friend can set up a reverse proxy rule on their web server for your file. <a href="http://httpd.apache.org/docs/2.0/mod/mod_proxy.html" rel="nofollow">http://httpd.apache.org/docs/2.0/mod/mod_proxy.html</a></p>
7,491,065
0
Grails Criteria not working in Integration Test <p>We have a simple method that gets all of a specific domain object where a property equals a hard coded string. This method is within MyDomainService.</p> <pre><code>def List&lt;MyDomain&gt; getAllDomain() { List resultList def criteria = MyDomain.createCriteria() resul...
1,821,978
0
<p>No, as explained in answers to the linked question, you can't do that. Modify the interface to pass in a factory object. (NB: <code>Class</code> makes a bad factory.)</p>
16,889,391
0
<p>Here's how (in C#):</p> <p>First, you create your name value collection using the inputs you need like:</p> <pre><code>var nvc = new NameValueCollection { {"q", input}, {"source", "en"}, {"target", "en"}, {"key","Your translate API key here"} }; </code></pre> <p>Then you can call a function like this one:</p> <pre>...
21,287,588
0
Sorting Array of Arrays having variable number of elements <p>I have to sort an array of arrays. I've searched for solutions however my problem is: </p> <ol> <li>need to sort arrays that may have different sizes from a script run to another. </li> <li>need to sort not only by one or two elements, but, if possible based...
35,970,550
0
<p>Try the regex bellow <code> (^|\s)([#][a-zA-Z\d-]+) </code></p> <p>Working regex example:</p> <p><a href="https://regex101.com/r/kJ2qR3/2" rel="nofollow">https://regex101.com/r/kJ2qR3/2</a></p>
20,664,291
0
Fetching Custom Variable Values using Piwik API <p>I am trying to use this api CustomVariables.getCustomVariablesValuesFromNameId (idSite, period, date, idSubtable, segment = '') from piwik to fetch CustomVariable values. But there is no example for it and also how to get idsubtable value ?</p> <p>Is there any way to f...
36,248,990
0
<p>You can do the following:</p> <pre><code>$(selector).on('click', function(e){ e.preventDefault(); $(this).parent().addClass('active').siblings('.active,.current') .removeClass('active current'); }); </code></pre> <p>First you go to the upper level (<code>LI</code>) and add <code>active</code> class to it. Then, sel...
35,399,002
0
<p>The way you handle the cookies appears to be correct. In terms of the shopping cart you can simply JSON.stringify it.</p> <p>To save the cart:</p> <pre><code>$cookies.put("shoppingCart", JSON.stringify($scope.shopping_cart)); </code></pre> <p>To retrieve the cart:</p> <pre><code>var cartCookie = $cookies.get("shopp...
3,923,213
0
<p>For the first two steps regular OLE automation using the <code>Outlook2000.pas</code> unit that comes bundled with Delphi should work fine though you might want to take a look at Dmitry Streblechenko's Redemption library: <a href="http://dimastr.com/redemption/">http://dimastr.com/redemption/</a> which simplifies m...
32,556,353
0
<p>You could just use the <code>/assets</code> folder instead of <code>/res</code> and load <code>drawable</code>s for your avatars directly.</p> <p><code>String avatarName = firstSpinner + '_' + secondSpinner + '.png'; Drawable d = Drawable.createFromStream(getAssets().open("avatars/" + avatarName), null);</code></p>
6,879,141
0
<p>You would use the "Content-Disposition" header to provide a recommended filename and force the web browser to show the save dialog.</p> <p>For example:</p> <pre><code>&lt;?php header('Content-type: text/xml'); header('Content-Disposition: attachment; filename="downloaded.xml"'); // ...your other code ?&gt; </code><...
34,149,871
0
<p>Your problem is basically in this bit:</p> <pre><code>G.add_edge((s,r), hrc_dict[(s,r)]) </code></pre> <p>networkx interprets this as "add an edge between the first argument <code>(s,r)</code> and the second argument <code>hrc_dict[(s,r)]</code>." So for example <code>('Hillary Clinton', 'Cheryl Mills'): 354</code>...
29,159,995
0
Creating nested fluent API in Java <p>We are trying to come up with fluent API for nested Object. Consider we have following three classes</p> <p>Attribute : name : String Value : Object</p> <p>Item : action : String attributes : </p> <p>Order : action : String attributes : items : </p> <p>Here we want to have fluent A...
14,390,146
0
<p>You can ask your <code>NSManagedObjectModel</code> by sending <code>versionIdentifiers</code> to the receiver.</p> <pre><code>- (NSSet *)versionIdentifiers </code></pre> <p>The docu is <a href="https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/CoreDataFramework/Classes/NSManagedObjectModel_Clas...
10,604,139
0
<p>I don't have access to Oracle, but I believe something along these lines should work...</p> <pre><code>WITH ranked_data AS ( SELECT COUNT(DISTINCT product_type) OVER (PARTITION BY brand_id) AS brand_rank, MIN(product_type) OVER (PARTITION BY brand_id) AS first_product_type, * FROM yourTable ) SELECT * FROM ranked_d...
34,136,291
0
<p>This error was caused by an error with the user permissions for sysadmin.</p> <p>Adding “NT AUTHORITY\NETWORK SERVICE” as sysadmin in the SQL server instance resolved the issues.</p>
40,078,892
0
I am showing aspx page(Add Item form) inside jquery modal, whenever I upload an image the page refreshes and loads as a normal webpage <p>I have 2 files :- </p> <ol> <li>Items.aspx with the list of items in a grid view, A button(to open a form for adding new item), and a div with id testing.</li> </ol> <p>code Inside I...
40,183,870
0
<p>Maybe someone will find this useful: somehow I had named the directory <code>'templatetags '</code> instead of <code>'templatetags'</code>, that is -- with a space at the end. Took hours to finally realize.</p>
36,777,974
0
android - viewpager OutOfMemoryError <p>I have a problem. I want to get image URL from JSON and setting to viewpager. I tried it with <code>drawable</code> folder, but large images are causing problems. If the image would be small, then I would not have a problem. How can I get large images? I benefited from this artic...
33,640,631
0
<p><em>(From the above comments:)</em> There are several problems here:</p> <ul> <li><p>You pass the address of the local variable <code>var selfPtr</code> to the callback. That address becomes invalid as soon as the <code>hookUpSocket()</code> function returns. See <a href="http://stackoverflow.com/questions/30786883...
34,857,027
0
How to Fit Image in CircleImage plugin of Xamarin.Forms <p>I am using following code.</p> <pre><code> &lt;StackLayout BackgroundColor="#303D43" HeightRequest="170" Padding="10" HorizontalOptions="Fill" VerticalOptions="Start"&gt; &lt;StackLayout HeightRequest="120" WidthRequest="120" Padding="0,0,0,10" HorizontalOption...
7,696,452
0
<p>You should print the error (using <a href="http://msdn.microsoft.com/en-us/library/ms679360.aspx" rel="nofollow"><code>GetLastError</code></a>). I suspect you are not initializing things:</p> <pre><code>WSADATA wsaData = {0}; WSAStartup(MAKEWORD(2, 2), &amp;wsaData); </code></pre>
20,128,267
0
C++ binary files and iterators: getting away with a 1:1 using ifstreambuf_iterator? <p><a href="http://stackoverflow.com/a/13665583/2485710">This answer</a> points out the fact that C++ is not well suited for the iteration over a binary file, but this is what I need right now, in short I need to operate on files in a "...
6,045,094
0
Deleting From DGV -- Index [x] does not have a value <p><strong>The Setup:</strong> I have a two DataGridViews, each bound to a BindingList&lt;> of custom business objects. These grids have a special row containing the mathematical totals of all rows in that grid -- this special row is reflective of a corresponding spe...
35,833,349
0
<p>You can't use the <code>CBCharacteristicProperties.Broadcast</code> property with characteristics you create yourself. From the <a href="https://developer.apple.com/library/prerelease/ios/documentation/CoreBluetooth/Reference/CBCharacteristic_Class/index.html#//apple_ref/c/tdef/CBCharacteristicProperties" rel="nofo...
24,908,293
0
<pre><code>user=bob lastb $user -t $(date -d "$(last $user | head -n 1 | tr -s '[:space:]' '\t' | cut -f 4-7)" +%Y%m%d%H%M%S) </code></pre> <p>More readably</p> <pre><code> user=bob last_login=$(last $user | head -n 1 | tr -s '[:space:]' '\t' | cut -f 4-7) datetime=$(date -d "$last_login" +%Y%m%d%H%M%S) lastb $user -t...
21,753,656
0
How to disable cell click of grid <p>I want to know if there is a way to disable clicking on a certain cell of a grid once its value is set in Google Web Toolkit?I tried <code>setEnabled(false)</code>, but it's not defined for cell</p>
11,609,062
0
ActiveMQ CLIENT on Java 1.4 <p>We are using Active MQ in the most current version 5.6.0. Now we have the problem that a new client has to be connected, unfortunately this client is developed with IBM JDK 1.4. Adding ActiveMQ to the application lead to the following error: </p> <pre><code>UNEXPECTED ERROR OCCURRED: org/...
11,602,702
0
<p>You probably want <a href="https://github.com/mikeash/MAObjCRuntime" rel="nofollow">this.</a> Objective-C wrapper for the Objective-C runtime.</p>
23,081,615
0
<p>you could use the audioplayer for playback instead of sound. So</p> <pre><code>player = audioplayer(signal, Fs); </code></pre> <p>Player is the the audioplayer object (check MATLAB help on audioplayer) which you can play using</p> <pre><code>play(player); </code></pre> <p>While the sound is playing you can do whate...
8,438,493
0
<p>The problems with the code in my initial attempt were:</p> <ol> <li>the read() method should return a value, so it should say:</li> </ol> <pre><code>return this.callParent([object]); </code></pre> <ol> <li><p>The alias should have been <code>'reader.my-json'</code></p></li> <li><p>The results needed to be mapped be...