pid
int64
2.28k
41.1M
label
int64
0
1
text
stringlengths
1
28.3k
39,520,562
0
<p>You can reference Microsoft.SqlServer.Types and set "Copy Local" in its Properties. Should help.</p>
33,516,227
0
Eclipse: Error importing android-support-v7-appcompat to workspace <p>I'm new. I use Eclipse.</p> <p>As it is shown in several video tutorials.</p> <p>File> Import -> Existing Android Project -> (Route sdk / extas / android / support / v7 / appcompat).</p> <p>Imports almost all very well, however these errors appear wi...
9,816,909
0
<p>Use the following code:</p> <pre><code>protected void CashPayButton_Click(object sender, EventArgs e) { foreach(Gridviewrow gvr in Cash_GridView.Rows) { if(((CheckBox)gvr.findcontrol("MemberCheck")).Checked == true) { int uPrimaryid= gvr.cells["uPrimaryID"]; } } } </code></pre>
24,606,235
0
Issue inputing sas date as datalines <p>I've the following code. Though I've entered 30jun1983 it gets saved as 30/jun/2020. And it is reading only when there's two spaces between the date values in the cards and if there's only one space it reads the second value as missing.</p> <pre><code>DATA DIFFERENCE; infile card...
22,487,714
0
<p>Use <code>SqlFunctions.DatePart</code> static method. It will be transformed into <code>DATEPART</code> SQL function call in generated SQL query:</p> <blockquote> <p><a href="http://msdn.microsoft.com/en-us/library/dd487171%28v=vs.110%29.aspx" rel="nofollow"><strong><code>SqlFunctions.DatePart</code> Method</strong...
17,582,171
0
ServiceStack NUnit Test Debugging Connection Refused Issue <p>In this question: <a href="http://stackoverflow.com/q/16819463/149060">ServiceStack JsonServiceClient based test fails, but service works in browser</a> I'm looking for some clue as to why the test generates an exception, when an interactive browser test suc...
11,129,015
0
Why KeyPoint "detector" and "extractor" are different operation? <p>Bascially you have first to do a:</p> <pre><code>SurfFeatureDetector surf(400); surf.detect(image1, keypoints1); </code></pre> <p>And then a:</p> <pre><code>surfDesc.compute(image1, keypoints1, descriptors1); </code></pre> <p>Why detect and comput are ...
20,287,627
0
<p>Without seeing the import statement that you tried, I am not 100% sure about why is that happening... But perhaps the reason is that you are using the default delimiter for fields, which is precisely a comma, so if you want to keep it, you should use a different delimiter, like for example:</p> <pre><code>--fields-...
37,484,666
0
Java JAXB binding issues : 1 counts of IllegalAnnotationExceptions <p>I m facing some problems with JAXB , I want to deserilize a <strong>config.xml</strong> file : </p> <pre><code>&lt;configuration&gt; &lt;connectors&gt; &lt;connector name = "cust1"&gt; &lt;entity&gt; &lt;prefix&gt;C_JDD&lt;/prefix&gt; &lt;filename&gt...
21,302,600
0
<p><strong>Neither are safe</strong>. Please avoid flashy <code>max</code> macro implementations that rely on non-standard C extensions like <em>expression statements</em> which will give you all sort of headaches if you ever have to port your code to a different platform. Doing my best to present this answer from bec...
34,463,290
0
Get unseen messages via IMAP <p>I need to extract some data from new (unseen) messages; I'm trying to make range of that data:</p> <pre><code>c, _ = imap.Dial("someserverr") defer c.Logout(30 * time.Second) fmt.Println("Server says hello:", c.Data[0].Info) c.Data = nil if c.State() == imap.Login { c.Login("somedata", "...
26,668,770
0
<p>Try this:</p> <pre><code> String filename = "example_filename"; Multipart _multipart = new MimeMultipart(); BodyPart messageBodyPart = new MimeBodyPart(); DataSource source = new FileDataSource(filename); messageBodyPart.setDataHandler(new DataHandler(source)); messageBodyPart.setFileName(filename); _multipart.addB...
19,014,834
0
Is it possible to associate an instance of an object with one file while it's being mapped by a map-only mapred Job? <p>I want to use a HashSet that exists/works against one file while it's being mapped, and then is reset/recreated when the next file is being mapped. I have modified TextInputFormat to override isSplita...
15,633,605
0
How to use certificate in https Apache server with client Java <p>I'm using an Apache server to provide a https access to some files in this server. The client use Java program to access these files via a proxy.</p> <p>In my apache configuration:</p> <pre><code>SSLCertificateFile /etc/apache2/ssl/apache.pem </code></pr...
14,850,241
0
How to Identify the gps is turned off phonegap android <p>I want to figure out the gps is turned on in android device using phonegap. </p> <p>I tried like </p> <pre><code>navigator.geolocation.getCurrentPosition(function onSuccess(position){ console.log("The gps is availabile"); }, function geolocationError(error){ con...
1,984,966
0
<p>A lot of people underestimate the performance of java. I was once curious about this as well and wrote a simple program in java and then an equivalent in c (not much more than doing some operation with a for loop and a massive array). I don't recall exact figures, but I do know that java beat out c when the c progr...
30,509,148
0
<p>Found a workaround: retrieve text with jQuery object instead of WebElement.</p> <pre><code>$("g.highcharts-axis").find("tspan").jquery.text() == "Total fruit consumption" </code></pre>
15,109,040
0
Open application without tapping on icon <p>Is there any way by which we can launch the app by the external volume button or by any other gestures made on the iPhone instead of launching by the default way?</p> <p>OR</p> <p>Can our app recognise the users interaction with the volume button when app is in the background...
22,143,615
0
<p>Add CSS</p> <pre><code> .test{ position:absolute;} .wrapper{ position:relative} </code></pre> <p>HTML</p> <pre><code>&lt;div class="wrapper"&gt; &lt;div id="1" class="full-circle"&gt;&lt;/div&gt;&amp;#8213; &lt;div id="2" class="full-circle"&gt;&lt;/div&gt;&amp;#8213; &lt;div id="3" class="full-circle"&gt;&lt;/div&...
15,733,849
0
assignment switch case c ++ <p>Requirements</p> <ol> <li>VULTURE IS V, OWL IS O, EAGLE IS E...</li> <li>A <code>for</code> loop to input the data each bird watcher has collected.</li> <li>inside the <code>for</code> loop, a <code>do ... while</code> loop to input and process the data collected by one bird watcher.</li>...
22,981,385
0
<p>This is will match a string containing only 0 and 1's.</p> <pre><code>theString.matches("^[01]+$") </code></pre> <ol> <li>The character class [01] matches 0's or 1's</li> <li>The + says match 1 or more of the proceeding character class (so 0 or more 0's or 1's)</li> <li>The ^ and $ says that the entire string must ...
22,729,937
0
<p>Apparently, you're not missing anything else. Just try to do the following:</p> <ol> <li>Ensure that the necessary jars exist in the "lib" project folder;</li> <li>Do clean &amp; build;</li> </ol> <p>In the end, you should find those included jars, available within the "build" project folder.</p>
7,273,371
0
How do I edit and save a nib file at runtime? <p>Imagine an application that has a number of buttons it is displaying to the user. This application wants to allow the user to move the buttons around on the screen, customizing the display, and then save this configuration for later use. That is, when the app is closed a...
15,525,656
0
<p>The plugin's 'destroy' method removes the dialog functionality completely. This will return the element <strong>back to its pre-init state</strong>.</p> <pre><code>$( "#yourdiv" ).dialog( "destroy" ); </code></pre>
15,757,875
0
<blockquote> <p>Right click on Project--> Properties, Java Build Path.</p> </blockquote> <p><img src="https://i.stack.imgur.com/U06f6.png" alt="enter image description here"></p> <p>Check whether you have JRE installed. If installed click on EDIT and check whether its pointing to correct location</p> <p><img src="http...
33,905,084
0
Share Session Variables between projects c# asp.net <p>Is there any way to share Session or any type of variables with their own data between projects? </p> <p>I have a solution wich has 2+ projects in wich I have an object called <code>Users</code>, you login on the first project and I place the whole Users object wit...
6,959,481
0
Rails Trying to submit a form onchange of dropdown <p>I have my Ajax working, builtin Rails javascript, with the submit button. However, I would like it to submit when I change the value of the dropdown box and eliminate the button. In my research I found what looks like the correct solution but I get no request to the...
36,964,796
0
OPENCART 2.0 IMAGE MANAGER NOT WORKING <p><strong>IF NOT WORKING THEN CHANGE THE CODE IN FOLLOWING : Admin /conroller / common / filemanager.php</strong></p> <p>BY VINAY SINGH [ vinaysingh43@gmail.com] skype : vinaysingh43</p> <p>or Chagne the Code in line no GLOBAL_BRACE </p> <p>CONSTANT this contstant not wroking wth...
26,273,376
0
<p>You need to change window.location in a success callback since it may happen before the asynchronous POST request is finished.</p> <pre><code>$.ajax({ type: "POST", url: "/mobile.php", data: {values:"mobile"} success: function(){ window.location = "http://dekstopversionexample.lt"; } }); </code></pre>
27,377,344
0
ui-select angularjs bootstrap undefined is not a function error <p>I'm having some issues trying to work with the ui-select library. I'm trying to use the select dropdown features but it doesn't work properly.</p> <p>This is the library used: <a href="https://github.com/angular-ui/ui-select" rel="nofollow">https://gith...
3,191,551
0
SQL Create table script from DBMS contains [ ] <p>If some one does right click on a given Table in a Database using SQL Server management Studio from Microsoft and create script table to query window, it displays the create table code in the window. I notice something like the following</p> <p>CREATE TABLE [dbo].[Login...
10,288,141
0
<p>Well infinite data is theoretically possible while the practical implementation differ from process to process. </p> <ul> <li>Approach 1 - Generally many protocol do send size in the first few bytes ( 4 bytes ) and you can have a while loop </li> </ul> <p>{</p> <pre><code>int i = 0, ret = 1; unsigned char buffer[4]...
18,623,731
0
<blockquote> <p>So my question is how can i set the response object to contain the processed list of the images</p> </blockquote> <p>Use a stylesheet rather than an XPath selector:</p> <pre><code> select * from xslt where url="http://www.mysite.com/page-path" and stylesheet="http://www.mysite.com/page-path.xsl" </code...
21,724,486
0
Remove all numbers in brackets with the brackets from string <p>Trying to remove city code from string for my additional I have wrote the brackets removal with indexOf. how to do this with regex?</p> <p>Mr Smith (344) 455 66 44</p> <p>to </p> <p>Mr Smith 455 66 44</p>
10,888,707
0
<p>System.Data.Entity.dll is not bin deployable. If you have .NET Framework 4 installed on the target machine you should have this assembly. It should be in the GAC. When loading assemblies CLR first looks in GAC and ignores whatever you have in your bin directory. If you don't have the .NET Framework 4 on the target ...
21,670,606
0
MongoDB C driver does not return any results for aggregation query <p>I have following SQL query:</p> <p>SELECT SUM("PAYMENT_HISTORY"."AMOUNT_PAID") FROM "PAYMENT_HISTORY" WHERE (("PAYMENT_HISTORY".YEAR >= 2011) AND ("PAYMENT_HISTORY".YEAR &lt;= 2013) AND ("PAYMENT_HISTORY"."AMOUNT_PAID" >= 500.0))</p> <p>same SQL afte...
36,581,419
0
deleting particular rows takes longer time to execute oracle. have to kill the session <p>I have 3 tables Attribute_type, Attribute, Attribute_assignment which is referencing one another. Attribute has Attribute_id + Attribute_type_id, Attribute_assignment has Assignment_id + Attribute_id + Attribute_type_id</p> <p>The...
23,129,870
0
How do I clean input buffer before using getch()? <p>So, I am using GetAsyncKeyState() to see when some key is pressed. But, after using it I need to use getch(). But it seems that getch() gets whatever GetAsyncKeyState() got before again. That is the version of my simplified code:</p> <pre><code>#include &lt;graphics....
37,175,215
0
Error when trying to create a Timer in EJB <p>I'm having a problem with a timer in <strong>EJB</strong>.I don't have experience whit this type application, so I don't know What to do for resolve this problem.</p> <p>timer cod:</p> <pre><code> @Schedule(minute="*/2", second="0", dayOfMonth="*", month="*", year="*", hour...
3,830,858
0
<p>I think you're confusing the properties which pluck() works on with HTML attributes. It's anyway easier to add the pseudo class of checked as part of the initial selector, like:</p> <pre><code>$$('li.litemd input:checked').each(function(s) { alert(s.next().innerHTML); }); </code></pre> <p><a href="http://jsfiddle.n...
33,846,868
0
<p>You can use <a href="https://github.com/prasmussen/chrome-cli" rel="nofollow">chrome-cli</a> for this case.</p>
13,398,665
0
Assigning variable names to an output graph in R <p>I am a new user of R statistics. I am having a huge <code>for</code> loop, of multiple massive files, the loop ends up giving me the result of a graph.</p> <p>Everything is working fine, except with the output file names. what do I want exactly to do? </p> <p>I am usi...
7,794
0
<p>How about:</p> <pre><code>protected override void OnPreviewTextInput(System.Windows.Input.TextCompositionEventArgs e) { e.Handled = !AreAllValidNumericChars(e.Text); base.OnPreviewTextInput(e); } private bool AreAllValidNumericChars(string str) { foreach(char c in str) { if(!Char.IsNumber(c)) return false; } return...
2,872,166
0
<p>Alternativaly you could try the standard actions <a href="http://docs.embarcadero.com/products/rad_studio/delphiAndcpp2009/HelpUpdate2/EN/html/delphivclwin32/StdActns_TSearchFind.html" rel="nofollow noreferrer">TSearchFind</a>/<a href="http://docs.embarcadero.com/products/rad_studio/delphiAndcpp2009/HelpUpdate2/EN/...
2,872,920
0
<p>Full disclosure: I am a developer on the Visual Studio Profiler Team.</p> <p>Visual Studio Test Edition does not have a profiler, but the following editions do:</p> <ul> <li>Visual Studio 2005 Development Edition, Team Suite</li> <li>Visual Studio 2008 Development Edition, Team Suite</li> <li>Visual Studio 2010 Pre...
23,986,330
0
<p><strong>Quick answer</strong> - both operating systems have features for safely unmounting the drive. An unmounted drive can be snapshotted without fear of corruption.</p> <p><strong>Long answer</strong> An EBS snapshot is point-in-time and differential (it does not "copy" your data per-se), so as long as your driv...
24,392,492
0
VMWare vs Azure virtual machines <p>I searched the internet but couldnt find an answer. I know that VMWare gives you a true full virtual machine with a assigned NIC card where Azure virtual machine which is connected through Remote Desktop does not do full virtual. Is full virtual the correct terminology used to descri...
32,701,824
0
Swift: Comparing Implicitly Unwrapped Optionals results in "unexpectedly found nil while unwrapping an Optional values" <p>If got this class and would like to compare instances of it based on the value </p> <pre><code>class LocationOption: NSObject { var name:String! var radius:Int! var value:String! override func isEq...
27,847,647
0
<p>use a normalize.css to avoid this issue, if not set none style to an element, he inherit the user agent style.</p> <p><a href="http://necolas.github.io/normalize.css/" rel="nofollow">http://necolas.github.io/normalize.css/</a></p>
18,443,350
0
<p>The denormalization is in the dimension tables in a star schema: E. g. in a product table, you explicitly have many columns like several levels of product category in this one table, instead of having one table for each level, and using foreign keys referencing those values.</p> <p>This means you have normalization...
3,109,912
0
<p>The "correct" way according to the Java EE architecture would be to have a JCA connector to do inbound/outbound connection with the SMTP server. </p> <p>The JCA connector can do whatever you want, including threading and connection to external systems with sockets. Actually JMS is just a special kind of JCA connect...
23,469,361
0
<p>The issue is created by the logo image. Images are inline elements so they have a white-space after them. To remove the white-space, you can display the image as a block element by adding this CSS :</p> <pre><code>header &gt; img{ display: block; } </code></pre>
10,548,375
0
Call to function 'CFURLCreateStringByAddingPercentEscapes' returns a Core Foundation object with a +1 retain count <p>I am converting my project to ARC and Xcode thinks there is a memory leak here, does anyone see anything wrong with this? I didn't write this code so I am not familiar with C calls.</p> <pre><code>- (NS...
13,001,227
0
<p>You got the parameters in the wrong order (from the <a href="http://docs.oracle.com/javase/1.4.2/docs/api/java/util/regex/Pattern.html#matches%28java.lang.String,%20java.lang.CharSequence%29">documentation</a>)</p> <pre><code>Pattern.matches(String regex, CharSequence input) </code></pre>
9,128,382
0
<p>You can do this in <a href="http://noda-time.googlecode.com">Noda Time</a> fairly easily:</p> <pre><code>using System; using NodaTime; class Test { static void Main() { ShowAge(1988, 9, 6); ShowAge(1991, 3, 31); ShowAge(1991, 2, 25); } private static readonly PeriodType YearMonth = PeriodType.YearMonthDay.WithDaysR...
38,012,493
0
<p>Try this editablegrid framework <a href="http://www.editablegrid.net/en/" rel="nofollow">http://www.editablegrid.net/en/</a></p>
39,571,599
0
<p>It looks like you want to identify if some places belong to specific chains or franchises.</p> <p>This is not possible in Places API, other than by detecting <em>likely</em> relation to chains based on the <code>"name"</code> and <code>"website"</code> fields. But if you'd like to reliable detect this kind of relat...
5,453,814
0
Making part of the regex optional <p>Here is my regex:</p> <pre><code>/On.* \d{1,2}\/\d{1,2}\/\d{1,4} \d{1,2}:\d{1,2} (?:AM|PM),.*wrote:/ </code></pre> <p>to match:</p> <pre><code>On 3/14/11 2:55 PM, XXXXX XXXXXX wrote: </code></pre> <p>I need this Regex to also match:</p> <pre><code>On 25/03/2011, at 2:19 AM, XXXXX XX...
5,976,853
0
how can I know if user is logged in <p>Im using simple mechanizm in which after login in my database there is new row inserted with userId and expiresDate columns. Everything would be ok but how can I know if user leaves website, closes browser and so on ?</p> <p>Secondly how can I make his sessionlonger if he is viewi...
23,034,970
0
How to calculate False Accept and Reject Rates in pattern recognition <p>I am working on a vein pattern recognition project based on SURF algorithm and euclidean distance. I have completed my program to find the maximum and minimum distance between vein features and find a match exactly when there is an identical image...
32,280,137
0
<p>The parameters to <code>glfwOpenWindow</code> are specifying the desired values. However, it's entirely possible that your driver doesn't support the exact format you're asking for (24 bit color, 24 bit depth, no alpha, no stencil). GLFW will attempt to find the best match while meeting your minimums.</p> <p>In thi...
16,231,007
0
<p>Use <a href="http://msdn.microsoft.com/en-us/library/system.string.trimend.aspx">string.TrimEnd</a> on your TextBox Text. </p> <pre><code>Participant.Text = participants.TrimEnd(','); </code></pre>
15,177,129
0
<p>you can use the passed View object in <strong>onCreateContextMenu</strong> to determine the owner of the menu and populate a menu accordingly.</p> <p>Your code should look something like this :</p> <pre><code>public void onCreateContextMenu(ContextMenu menu, View v,ContextMenuInfo menuInfo) { super.onCreateContextM...
40,579,363
0
<p>You can use <code>list = sorted(list, key=...)</code> or <code>list.sort(key=...)</code>. </p> <p>First method lets you use slicing to get/set only part of list - without changing first row.</p> <pre><code>import datetime table_of_list = [['name', 'email', 'address', 'details', 'date_last_contacted'], [u'Jane Doe',...
7,209,234
0
<p>Any object within a serialised object also has to be serialised, if you see what I mean?</p>
16,326,855
0
Rails / Kaminari - How to order a paginated array? <p>I'm having a problem <strong>ordering</strong> an array that I've successfully paginated with Kaminari.</p> <p>In my controller I have:</p> <pre><code>@things = @friend_things + @user_things @results = Kaminari.paginate_array(@things).page(params[:page]).per(20) </c...
34,738,226
0
asp.net 5 deploy to iis got a TaskAwait.ThrowForNonSuccess exception <p>When I run my application on vs,everything is ok ,but when i deploy my application to iis(when the application try to access data from database by entityframework7 ,it throw an TaskAwait.ThrowForNonSuccess exception.Is anyone can help me?</p>
27,891,575
0
Generating all lexicographical permutations without comparisons of elements <p>I came into the problem when I have a given sequence s=(a,b,c,d,e...) - sorted in non-decreasing order. My job is to develop an algorithm that is going to generate all possible permutations in lexicographical order - ending on the reversed s...
9,277,937
0
<p>I think there is an error in your first document.ready</p> <pre><code>here : $(function() { </code></pre> <p>So the second document.ready </p> <pre><code>this one : $(document).ready(function() { </code></pre>
16,173,593
0
Where should Exceptions be put that are used by multiple projects? <p>I need to refactor a project with two data models into two separate projects. Both projects use the same Exceptions. Should I create a 3rd project only for these exceptions? Cloning sounds like a no-go.</p>
11,991,881
0
<p>Running the following command as documented in the <a href="http://code.google.com/p/dbdeploy/wiki/UsingTheMavenPlugin" rel="nofollow">Using Maven Plugin</a> page...</p> <pre><code>mvn help:describe -Dplugin=com.dbdeploy:maven-dbdeploy-plugin -Ddetail </code></pre> <p>we see the following goal, which helps generate...
4,736,248
0
<p>Sluama - Your suggestion fixed it! Such an obvious answer. The " was terminating the Where clause string. I could have sworn I tried that, but I guess not. Becuase, I just happened to come back to this question and saw your answer and it works!</p> <pre><code>&lt;asp:EntityDataSource ID="EDSParts" runat="server" Co...
35,034,841
0
How to measure time with Matlab while led diodes is on using Arduino? <p>I need measure time while led diodes is on for each one with Matlab guide. In Arduino code its sending data to Matlab if diodes are on:</p> <p>if(digitalRead(ledC1)==HIGH) { Serial.println("a"); } </p> <p>if(digitalRead(ledC2)==HIGH) { Serial.prin...
8,200,901
0
Design for long running ASP.net MVC web request <p>I'm aware of the model that involves a scheduled task runninng in the back ground which runs jobs registered with a web request but how about this for an idea that keeps everything within ASP.net...</p> <ol> <li><p>User uploads a CSV file with, perhaps, several thousan...
21,972,293
0
Data Type for Currency in Entity Framework <p>What data type should I use to hold currency values in Entity Framework 6 and what data type should I map it in SQL Server 2012?</p> <p>Thank You, Miguel</p>
27,520,469
0
iOS UITextField value without tapping on RETURN button <p>Is it possible to take UITextField value without tapping <em>RETURN</em> button?. If I type something in <strong><em>LOGIN UITextField</em></strong> and then tap on <strong><em>PASSWORD UITextField</em></strong>, it looks like LOGIN value is empty, however if I ...
37,573,829
0
<p>Easiest solution is</p> <pre><code>/%{DATA:col1}/%{DATA:col2}/%{DATA:index}/%{DATA:server}\.%{GREEDYDATA:end} </code></pre> <p>you can remove the names <code>col1</code>, <code>col2</code>, and <code>end</code> to drop those captures.</p> <p>This pattern relies on there always being the same number of parts in your...
1,715,943
0
workaround: site is www.site.com code incl. document.domain='site.com' <p>A customer site that I cannot change has the line 'document.domain = "site.com"; while the site is at www.site.com.</p> <p>The effect is that FB connect window login gets stuck after submitting username+password.</p> <p>Firebug shows its in infin...
25,708,029
0
Laravel 4: How to protect group routes admins and users? <p>Good day! Please tell me how to split the routes users and administrators? To authorize the user got to your home page and could move only to the right routes and the admin came on your web page and could see only their routes. My file routes.php</p> <pre><cod...
15,523,470
0
<p>This depends on how your <code>struct</code> is defined, whether or not you want your output to be human-readable, and whether or not the output file is meant to be read on a different architecture. </p> <p>The <code>fwrite</code> solution that others have given will write the <em>binary representation</em> of the ...
33,714,636
0
<p>Editing the raven context is currently quite hard as the error reporters are not registered anywhere, so you cannot say "hey give me the error reporters" and look for the Sentry one in that list.</p> <p>Currently the only way is to register an <code>after_config</code> hook, gather the Raven Client during the confi...
20,193,399
0
<p>Silly me! As i was told by user seutje in the #jquery irc.freenode channel, I should attach the jquery-ui methods <code>onRender</code> instead of initialization</p> <pre><code> initialize: function(){ this.setCssStyle(); }, onRender: function(){ this.$el.draggable({ containment: 'parent' }); this.$el.resizable(); ...
39,402,942
0
To print prime numbers between m and n when m and n are quite large in the range 10^10 using sieve of eratosthenes <p>My code is:</p> <pre><code>#include &lt;bits/stdc++.h&gt; #define s 100001 using namespace std; int main() { long long arr[s],i,j,t,m,n; for(i=0;i&lt;s;i++) arr[i] = 1; arr[0] = 0; arr[1] = 0; for(i=2;i...
15,099,949
0
<p>Something to get you stared, adapt to your own needs:</p> <p>Lets create some files:</p> <pre><code>$ touch a-b-2013-02-12-16-38-54-{a..f}.png $ ls a-b-2013-02-12-16-38-54-a.png a-b-2013-02-12-16-38-54-c.png a-b-2013-02-12-16-38-54-e.png f.py a-b-2013-02-12-16-38-54-b.png a-b-2013-02-12-16-38-54-d.png a-b-2013-02-1...
4,282,486
0
How to track more than one remote with a given branch using Git? <p>The situation is this:</p> <p>I have more than one remote repository - for reference, lets say that one is the "alpha" repository, and we have recently set up a new "beta" repository, which some users have migrated to.</p> <p>Both repositories have a "...
33,082,074
0
<p>Your code is neat but the time complexity is O(n^2), which can be reduced to O(n).</p> <pre><code>data = {(1,2,1,5),(1,2,7,2),(1,5,4,7),(4,7,7,5)} result = dict() for item in data: key = (item[0],item[1]) value = result.setdefault(key,[]) value.append((item[2],item[3])) result[key] = value print result </code></pre...
31,539,680
0
<p>instead of </p> <pre><code>if (currentSlide == 5) </code></pre> <p>you can add an incremented class on each of your slides, and check what is inside in this if. the html will looks like this: </p> <pre><code> &lt;div class="slide1"&gt;&lt;img src="http://placehold.it/900x500"&gt;&lt;/div&gt; &lt;div class="slide2"&...
37,300,137
0
Spring: Testing view-controllers created with ViewControllerRegistry.addViewController() <p>This is my first time carrying out junit testing so forgive me if this is a stupid question. The class from my Spring web application which I wish to test is below. The class extends WebMcvConfigurerAdapter to add view controlle...
34,462,089
1
Instagram API docs invalid JSON error <p>I keep getting this error when I tried the examples in the <a href="https://github.com/Instagram/python-instagram#using-an-access-token" rel="nofollow">python-instagram</a> documentation:</p> <pre><code>from instagram.client import InstagramAPI access_token = "YOUR_ACCESS_TOKEN"...
38,510,303
0
Applying velocity to a SKSpriteNode subclass & trouble with Expected Declaration Error <p>I'm currently working on my first iPhone game and I have a SKSpriteNode subclass <code>Alien</code> (which is also an abstract class) that will later be inherited by a class <code>normAlien</code>. Even with Apple's docs, I've bee...
19,645,106
0
<p>For "6 choose 3, with replacement", you can use <a href="http://www.jsoftware.com/docs/help701/dictionary/d520.htm" rel="nofollow">catalog <code>{</code></a>:</p> <pre><code>{3#&lt;i.6 β”Œβ”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β” β”‚0 0 0β”‚0 0 1β”‚0 0 2β”‚0 0 3β”‚0 0 4β”‚0 0 5β”‚ β”œβ”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€ β”‚0 1 0β”‚0 1 1β”‚0 1 ...
7,870,094
0
Change color scheme on komodo edit <p>Hi this is a very noob question but i am trying to change the color scheme on komodo edit, version 6. I am running windows 7. I put the .ksf file in the /schemes folder, now what?</p>
18,051,290
0
Method Hibernate.createBlob() is deprecated from Hibernate 4.0.1 and moved to Hibernate.getLobCreator(Session session).createBlob() <p>Method <code>Hibernate.createBlob()</code> is deprecated from <strong>Hibernate 4.0.1</strong> and moved to <code>Hibernate.getLobCreator(Session session).createBlob()</code>. Any solut...
27,472,769
0
Generating a Unique ID by using Rand() <p>Trying to create a ajax private chat. But can't seem to generate a unique ID that hasn't been used by another user.</p> <pre><code> $genid = rand(1,999999999999); foreach($genid as &amp;$rand){ $q = mysql_query("SELECT ".$q_pchat." FROM users WHERE pchat_id1='".$rand."'"); $r =...
28,872,472
0
<p>What you need to do inside your stored procedure is split the comma delimited list of numbers into a list of single values in rows. Once you have this you can use <code>WHERE myCol IN(SELECT v FROM @r)</code>, or use an INNER JOIN instead of IN. One point you might have to watch for is that you have leading zeros -...
38,396,949
0
<p>You can see there are comments in aapt_rules.txt. Beside each kept class there are corresponding layout files that referenced this class. Like that:</p> <pre><code># view res/layout/abc_list_menu_item_layout.xml #generated:17 # view res/layout/abc_popup_menu_item_layout.xml #generated:17 -keep class android.support...
20,296,286
0
<p>I don't claim to fully understand the <em>why</em> here, but as best I can tell, this is what's going on.</p> <p><code>summary.default</code> actually calls <code>oldClass</code> rather than <code>class</code>. <em>Why</em> I'm not sure, although I'm sure there's a good reason. </p> <p>Somewhat cryptically in <code...
20,710,984
0
<p>You need to also specify the locations that can use it. For example, in /etc/httpd/conf/httpd.conf you should see something like:</p> <pre><code>&lt;Directory "/var/www/html"&gt; ...lots of text... &lt;/Directory&gt; </code></pre> <p>Make sure is has:</p> <pre><code>&lt;Directory "/var/www/html"&gt; AllowOverride A...
4,134,999
0
<p>Typing six file names, or using the declarative style with #pragma comment(lib, "foo.lib") is small potatoes compared to the work you'll have to do to turn this into a DLL or COM server.</p> <p>The distribution is heavily biased towards using this as a static link library. There are only spotty declarations availab...
17,879,030
0
<p>Your JSON is invalid or your server responding with invalid JSON.</p> <p>It should be like this</p> <pre><code>{ "name":"rezepte", "id":"1", "name":null, "alter":"Ab 6.Monat", "kategorie":null, "tageszeit":"Mittags", "portionen":"1 baby- und 1 Erwachsenenportion", "bild":"\u0000\u0000\u0000\u0000\u0000", "vorrat":"...