pid
int64
2.28k
41.1M
label
int64
0
1
text
stringlengths
1
28.3k
26,893,775
0
<p>Try something like</p> <pre><code>connect(Bgn,End,Path) :- % to find a path between two nodes in the graph connected(Bgn,End,[],P) , % - we invoke the helper, seeding the visited list as the empty list reverse(P,Path) % - on success, since the path built has stack semantics, we need to reverse it, unifying it with ...
23,603,770
0
<p>Upgrading comment to an answer;</p> <p>Seems you are using <code>HSSF</code> instead of <code>XSSF</code> for xlsx. Hence, though <a href="https://poi.apache.org/apidocs/org/apache/poi/hssf/usermodel/HSSFRichTextString.html" rel="nofollow"><code>HSSFRichTextString</code></a> is valid for an <code>HSSFCell</code>, y...
16,179,110
0
<p>That is not valid JSON, so you cannot do it with standard methods.</p> <p>You either have to escape the quotes like this: <code>"sport is \" "</code> or else you need to write your own sanitizer</p>
12,745,199
0
loading another tableview when a tablecell of one tableview is clicked returning error:"Program received signal SIGABRT" <p>I am creating an app in which there are two UIViews and in those UIViews I am loading Tableviews.. When I click a tablecell in one TableView then I am unable to redirect it to another TableView an...
5,515,157
1
Python web service for a java application? <p>Forgive me if this is a stupid question. I am completely new to building web services and complete web apps. I want to develop a particular functionality for a java based web application. However this functionality is simpler to develop with Python. So is it possible If i d...
13,270,995
0
<p>I might have simplified my example a little to much. The data in A,B,C might be non-numeric and not sorted and so forth.</p> <p>I found last_value() <a href="http://www.oracle.com/technetwork/issue-archive/2006/06-nov/o66asktom-099001.html" rel="nofollow">http://www.oracle.com/technetwork/issue-archive/2006/06-nov/...
25,294,939
0
How to make a JButton add user input to an ArrayList and display it in a JList <p>I have an app that contains 3 classes - main gui (Book), add, contact.</p> <p>I have a JList in my phonebook class. I have a dialog window as my add class as it needs to add a contact, now I can add the data but storing it into an array a...
25,908,146
0
Need help on a specific Regex <p>I want to validate an attribute of an xml file with an XSD file. This attribute must contain a list of comma-separated languages, like this :</p> <pre><code>&lt;Params languages="English,French,Spanish" /&gt; // OK &lt;Params languages="French,Spanish" /&gt; // OK &lt;Params languages="...
20,402,214
0
Set mongo db via JNDI in Tomcat <p>i have a persistence.xml with the following structure:</p> <pre><code>&lt;persistence-unit name="contacts_nosql" transaction-type="RESOURCE_LOCAL"&gt; &lt;provider&gt;org.eclipse.persistence.jpa.PersistenceProvider&lt;/provider&gt; &lt;jta-data-source&gt;java:comp/env/jdbc/MY_DS&lt;/j...
21,983,359
0
Compojure/Clojure error with routes <p>I am making a web-app using Clojure/ring/compojure and am having trouble with the routing. I have two files: web.clj and landing.clj. I want to route the user who navigates to the uri from the web.clj handler to the landing.clj one and for the home function to be called which will...
37,733,947
0
How to track time taken for each goal in a Maven build? <p>Maven reports overall time taken for each module at the end of a build but how can I instrument Maven to report how long running each goal took in a build? This information can be even more helpful in a multi-module build.</p>
6,101,225
0
<p>You can also comment a block with =begin and =end like this:</p> <pre><code>&lt;% =begin %&gt; &lt;%= link_to "Sign up now!", signup_path, :class =&gt; "signup_button round" %&gt; &lt;% =end %&gt; </code></pre>
13,343,128
0
<p>I think I've found a workaround:</p> <p>In the Eclipse instance you want to disable DDMS, select: </p> <pre><code>Windows &gt; Preferences &gt; DDMS </code></pre> <p>And change the "Base local debugger port to some unused port number (such as 22222).</p> <p>There is an error messages about not being able to connect...
30,495,195
0
No mapping found for HTTP request with URI [] in DispatcherServlet with name 'spring' <p>I am having problem in viewresolver in spring framework .</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instanc...
31,644,740
0
<p>I think you should optimise your adapter for recycler view. PagerAdapter is not the culprit. It would be Recycler View that is involved in scrolling.</p> <p>Ideally you should use bean classes instead of ArrayList> because it takes more time to compute has code on keys every time. Also you should take care of follo...
2,610,216
0
<p>Either use SFTP or just plain FTP on an secure, encrypted connection.</p>
36,292,016
0
C - create TCP SYN without filling IP header using raw socket <p>I want my application to create TCP SYN packet and send on network. I did not set <code>IP_HDRINCL</code> using <code>setsockopt</code> because I want the kernel to fill the IP Header.</p> <p>I tried </p> <ol> <li>using a byte buffer to include TCP Header...
19,164,698
0
How to select a row based on its row number? <p>I'm working on a small project in which I'll need to select a record from a temporary table based on the actual row number of the record.</p> <p>How can I select a record based on its row number?</p>
33,949,162
0
<p>to actually get the response you must add:</p> <pre><code>curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); </code></pre> <p>don't scrape google, even to test, they actively detect and stop this</p>
33,234,871
0
How can I convert a data table in C# to data.fame in R using R.net <p>I need to convert a data table which I have defined as follows to a data frame in R.</p> <pre><code>DataTable dtb = new DataTable(); dtb.Columns.Add("Column1", Type.GetType("System.String")); dtb.Columns.Add("Column2", Type.GetType("System.String"));...
28,853,966
0
<p>You don't need any restriction. Just get the profile of the logged user and edit it:</p> <pre><code>@login_required def edit_profile(request): profile = request.user.profile ... </code></pre>
40,255,308
0
Why default proguard configurations in android sdk use keep *Annotation* <p>There is one line in the default proguard configuration of android sdk:</p> <pre><code>-keepattributes *Annotation* </code></pre> <p>According to Proguard Manual, this line equals to:</p> <pre><code>-keepattributes RuntimeVisibleAnnotations,Run...
35,685,490
0
<p>For me, this ERROR was the result of utilizing NSURLProtocol and the "setProperty" method.</p> <p>[NSURLProtocol setProperty:FOO forKey:BAR inRequest:newRequest];</p> <p>I am not exactly certain of what is going on here, but from my experience I had two NSURLProtocol implementations. One needed property (FOO) and t...
34,947,769
0
<p>This should do it:</p> <pre><code>perl -ne '/ZTFN00\D+(\d+)/ &amp;&amp; print $1,"\n"' yourfile </code></pre> <p>If your 'number' is always separated by whitespace ( where there 00 after ZTFN isn't) then you can use that as your test:</p> <pre><code>perl -ne 'print m/\b(\d+)\b/,"\n"' yourfile </code></pre>
37,818,981
0
<p>By default the body on the page has this css:</p> <pre><code>body { display: block; margin: 8px; } body:focus { outline: none; } </code></pre> <p>at the top of your css file just add:</p> <pre><code>body { margin:0; } </code></pre> <p>this way you're working with 0 margins to begin with.</p>
8,442,931
0
Margin on table <p>I have a margin-top problem on my <code>&lt;table&gt;</code>. The <code>&lt;p&gt;</code> is staggered for every line. I have tried to define the table in css, but it doesn't work.</p> <p><a href="http://whatsyourproblem.dk/?page_id=89" rel="nofollow">http://whatsyourproblem.dk/?page_id=89</a> </p>
19,661,658
0
Show Wordpress Posts Associated with Certain Author <p>Suppose I want to show posts from one certain author on the main index of a wordpress website, how would I go about this ?? Below is a loop from the twenty thirteen theme:</p> <pre><code>&lt;?php $curauth = (isset($_GET['liamhodnett'])) ? get_user_by('liamhodnett',...
22,643,899
0
<p>Darrell, if you run embedded there are no ports and no config files. </p> <p>You just provide store-directories and optionally database config to your <code>GraphDatabaseService</code> instances which are (in Spring Data Neo4j) created as spring beans.</p> <p>Unfortunately there is no compatible way between 1.9 and...
43,219
0
<p>We use <a href="http://www.sqlmanager.net/en/products/dbcomparer" rel="nofollow noreferrer">DB Comparer</a> from EMS - they have a large range of tools each specifically targeted for a particular platform (they support SQL Server, MySQL, Interbase/Firebird, PostgreSQL, Oracle etc).</p> <p>The program allows you to ...
30,455,219
0
catch mongo requests from app server <p>I have a MVC .net application, running on IIS, that uses mongo. The mongo servers are sharded, and not in my control. I want to see the request that my application server sends to mongo (the queries in the mongo syntax).</p> <p>I tries fiddler, but I saw that the communication to...
5,590,206
0
<p>I believe your instinct to create shorter segments with joints connecting them is correct and yes, the number of bodies you end up creating for a length of rope will have an effect on the performance.</p> <p>To know whether it will work for your particular situation, I would suggest creating a rope with variable le...
35,359,541
0
<p>I think you are looking for this: <a href="https://www.git-notifier.com/" rel="nofollow">https://www.git-notifier.com/</a></p> <p>The email notifications are for free, but to send SMS to your mobile it is not for free. Hope it helps.</p>
2,338,843
0
ActiveRecord Claims No Adaptor Specified <p>When I try to run the following, I get an error back from ActiveRecord stating that the connector hasn't been found.</p> <pre><code>require 'activerecord' ActiveRecord::Base.establish_connection( :adaptor =&gt; "sqlite3", :database =&gt; "db.sqlite3" ) </code></pre> <p>Error ...
27,295,570
0
HTTP POST is not working from Java <p>I am trying to do an http post. Same code was working.But now it is not hitting my servlet now, but giving http response code 200. From browser same url is hitting the servlet. Is there anything that restricting my post?. Please help me on it. Sorry for bad english.</p> <pre><code>...
34,818,481
0
<p><code>from app.models import Entry</code></p> <p>You must import Entry from the models module of the app.</p> <p>You may also need to add relative imports in your <code>__init__</code> for any custom modules.</p> <p>add to your <code>__init__</code></p> <p><code>from .models import *</code></p> <p>edit: Another use...
9,814,125
0
Hosted video - fullwidth preview on starred post? <p>When you post a YouTube video to your timeline and STAR the post, the video preview displays fullwidth. Same goes for a video uploaded to Facebook when starred. </p> <p>We self-host our video (flowplayer) and playing in-line works fine, but when we star a post with o...
1,482,487
0
<p>You could programmatically extract the jar file, <a href="http://www.devx.com/tips/Tip/22124" rel="nofollow noreferrer">http://www.devx.com/tips/Tip/22124</a>, the update one file that will prevent the application from running anymore, then rejar it.</p> <p>The other option would be to just delete some critical cla...
14,565,895
0
<p>This behaviour is fixed in the latest <a href="https://github.com/jzaefferer/jquery-validation/archive/master.zip" rel="nofollow">jquery-validate.js on github</a>. The bug was reported as </p> <blockquote> <p>'E-mail validation fires immediately when text is in the field'</p> </blockquote> <p><a href="https://githu...
26,267,570
0
How to select rows from Table X who share the least relationships with Table Y? <p>suppose we have the following two tables</p> <pre><code>TABLE: PEOPLE +----+------+ | id | name | +----+------+ | 1 | john | +----+------+ | 2 | mike | +----+------+ | 3 | derp | +----+------+ TABLE: Images +----+-----------+----------+ ...
15,822,140
0
<p>You probably want to do a <code>LEFT JOIN</code> and a <code>GROUP_CONCAT</code> and <code>HAVING</code> to get the info you are looking for:</p> <pre><code>SELECT i.id, i.title, GROUP_CONCAT( l.stockcode SEPARATOR ',' ) extras FROM items i LEFT JOIN ledger l ON i.id = l.itemid WHERE i.id = 123 HAVING SUM(l.qty) &g...
25,096,117
0
<pre><code>$ cat file [foo] name = 3 name = 17 [bar] name = 24 name = 5 $ awk -v id="foo" '/\[/{f=index($0,"["id"]")} f' file [foo] name = 3 name = 17 $ awk -v id="bar" '/\[/{f=index($0,"["id"]")} f' file [bar] name = 24 name = 5 </code></pre> <p>The above just sets a flag (<code>f</code> for found) when it finds a li...
6,277,869
0
<p>You could disable rich-text features of the editor so that HTML tags and characters don't get added to the content.</p>
31,872,653
0
How can i determine that CollapsingToolbar is collapsed? <p>I need to know when CollapsingToolbar from material design library is collapsed.</p>
28,302,016
0
How can I simulate events like Series1DblClick or Chart1ClickSeries when programatically creating Charts and Series on the runtime? <p>In a small Delphi program I create few TCharts and TBarSeries programmatically on the runtime but then I want to be able to click on a bar of the chart and fire, for example, a Chart1Cl...
40,642,093
0
<p>Your best bet is to:</p> <ol> <li>Review all of the docs (<a href="https://netsuite.custhelp.com/app/home" rel="nofollow noreferrer">NetSuite SuiteAnswers</a>).</li> <li>Install the SuiteScript IDE (needs Eclipse).</li> <li>Get in and mess around with sample use cases. Then ask about those, including a sample of th...
15,280,048
0
<p>You are only stopping the animation of certain classes. To achieve a "global" stop in animation, you will have to clear the animation queue for all elements that will be potentially animated in your JS function.</p> <p>This will mean doing something along the line of:</p> <pre><code>$(document).ready(function() { v...
26,857,394
0
<p>It will be pretty straight forward with jQuery. Below Fiddle will help you.</p> <p><a href="http://jsfiddle.net/17g6q8k0/2/" rel="nofollow">http://jsfiddle.net/17g6q8k0/2/</a></p> <pre><code>var sourceSwap = function () { var $this = $(this); var newSource = $this.data('alt-src'); $this.data('alt-src', $this.attr('...
40,486,918
0
Are AWS Security Group Port Ranges Inclusive or Exclusive <p>AWS security groups allow a port range to be specified for permitted traffic, written in the form <code>1234-5678</code>: would that be inclusive of ports <code>1234</code> and <code>5678</code>, or exclusive of either/both of those ports?</p> <p>The <a href=...
17,254,798
0
Check Which Website is Visited <p>I've been having trouble finding a way to check if the user of the program is visiting a specific website. If I wanted to open a pop up box telling me which website I was currently on, what would be the best way to do it?</p> <p>I've been thinking about various ways but I can never com...
23,812,057
0
<p>Your empty view needs to be set to <code>android:visibility="gone"</code> and be at the same level as your <code>ListView</code> in your activity/fragment layout file.</p>
28,604,276
0
<p>It seems one of <code>GetSuppliers()</code> ` is not executed till the part where you set</p> <pre><code>con.Close() </code></pre> <p>You have two alternatives:</p> <p>1.Open the connection only once and use it in every method without closing it and close it on <code>Application.Exit</code>:</p> <pre><code> public ...
744,275
0
<p>On the whole topic of IE6, whenever you get to that point of moving IT out of the past, you could use this: </p> <p><a href="http://code.google.com/p/ie6-upgrade-warning/" rel="nofollow noreferrer">http://code.google.com/p/ie6-upgrade-warning/</a></p>
5,656,805
0
<p>I had a similar problem using Star Impact Printer, spend over two days using all codes. At end resolve it by using RawPrinterHelper class available from Microsoft. Here is the code which I have used to open the cash Drawer attached to the printer. s = Chr(&amp;H7); RawPrinterHelper.SendStringToPrinter(receiptprinte...
32,068,342
0
<p>You can use,</p> <p>Your html,</p> <pre><code>&lt;table&gt; &lt;tr class="" role="row"&gt; &lt;td class="e-rowcell e-templatecell" role="gridcell" style="text-align: center;"&gt; &lt;input type="checkbox" class="XAxisrowCheckbox"&gt; &lt;/td&gt; &lt;td class="e-rowcell e-hide" role="gridcell" style="text-align: lef...
40,670,046
0
<p>The error says it all: fgets() expects three arguments. You are giving it one. </p> <p>So, call it like this:</p> <pre><code>fgets(buffer, 256, stdin) </code></pre> <p><em>buffer</em> is where the input is to be stored, <em>256</em> is the size of the buffer, <em>stdin</em> is the stream to read from. </p> <p>Also,...
23,918,462
0
angular directive unit testing with jasmine with template and link <p>I have a directive as below which i want to cover as part of my jasmine unit test but not sure how to get the template value and the values inside the link in my test case. This is the first time i am trying to unit test a directive.</p> <pre><code>a...
18,857,214
0
<p>I also ran into the same issue. It would seem that the <code>transactionReceipt</code> on the <code>originalTransaction</code> will always return nil when restoring purchases. From the Discussion in the apple docs for <code>transactionReceipt</code>:</p> <p><a href="https://developer.apple.com/library/ios/documenta...
2,112,442
0
Streaming Flash Video Problem - Clipping <p>I have a simple flash video player that streams the video from a streaming media server. The stream plays fine and I have no problems with playing the video and doing simple functions. However, my problem is that on a mouse over of the video, I have the controls come up and w...
28,795,269
0
<pre><code>$newArray = []; foreach($array as $value) { foreach($value as $key =&gt; $data) { $newArray[$key][] = $data; } } var_dump($newArray); </code></pre> <p>or </p> <pre><code>$newArray = []; foreach($array as $value) { $newArray = $newArray + $data; } var_dump($newArray); </code></pre>
21,782,032
0
<p>Based on my understanding, <strong>Navigation</strong> with <strong>ScopedRegions</strong> would not be a straight forward feature of <strong>Prism</strong>. There are some workarounds posted however, in order to accomplish it in a quite simple way.</p> <p>You can look at the following post and discussion thread fo...
12,451,523
0
<p>What's probably happening is that your URL has escaped characters in it (%3D%3D) and your $_GET is the unescaped characters so they don't match. str_replace can work on very large strings without a problem.</p> <p>If you want to get rid of that value, just do this:</p> <pre><code>$query_params = $_GET; unset($query...
32,835,746
0
HTML 5 Section and Main semantic tags use <p>While studying the HTML 5 semantic tags, I've ran upon some doubts on how to proper utilize the <em>main</em> and <em>section</em> tags, and since the <a href="http://www.w3schools.com/html/html5_semantic_elements.asp" rel="nofollow">W3Schools</a> reference seems a little va...
12,137,875
0
<p><strong>HTML :</strong></p> <pre><code>&lt;ul class="UL_tag"&gt; &lt;li&gt;Text 1&lt;/li&gt; &lt;li&gt;Text 2&lt;/li&gt; &lt;li&gt;&lt;a href="http://www.google.com" class="description"&gt;Link to GOOGLE&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;ul class="UL_tag"&gt; &lt;li&gt;Text 1&lt;/li&gt; &lt;li&gt;Text 2&lt;/li&g...
31,124,625
0
<p>Sounds like you are getting back an empty response, so that null check always resolves to true. Try checking if the count of the <code>NSArray</code> is greater than 0 instead of <code>if(self.jobs != nil)</code></p> <p>Just change <code>if(self.jobs != nil)</code> to <code>if([self.jobs count] &gt; 0)</code>. </p>...
27,319,283
0
<p>If you took time to read the FineManual for <code>pandas.DataFrame.to_sql</code>, you would have found out by yourself:</p> <blockquote> <p>if_exists : {‘fail’, ‘replace’, ‘append’}, default ‘fail’</p> <pre><code> fail: If table exists, do nothing. replace: If table exists, drop it, recreate it, and insert data. ap...
29,645,387
0
Send by mail a query result with a job in SQL Server <p>I'm trying to send an email by a SQL Server job with the result of a query.</p> <p>The query works perfectly and I face an issue when I pass a TABLE in the <code>@query</code> parameter of <code>sp_send_dbmail</code></p> <p>Here is my code : </p> <pre><code>DECLAR...
34,902,538
0
<p>I won't recommend to use <code>$resource</code>. It's the object that keeps link to the promise and when promise resolved it'll also contain data itself. So if you want to do some actions when data comes you'll have to assing a callback to that promise anyway. Use <code>$http</code> instead. It's lower level angula...
27,900,886
0
<p>The file's content includes <code>$variables</code> wich are expanded. To avoid variable expansion, I had to use single-quote escapes <code>'END'</code>.</p>
2,269,323
0
Is Passing a Parameter to a method the same as creating an object? <p>I am learning Servlets and JSP. I am wondering about the "doGet" and other methods that may be overidden. The "doGet" takes 2 params - HTTPServletRequest request, and HTTPServletResponse response. This is my question: The request and response objects...
13,113,477
0
<p>Perhaps this is something you are looking for:</p> <pre><code>from numpy.random import randint n = 50 R = randint(0,2,n) def get_number_of_zeros(x): return sum(0 == ele for ele in x) while(len(R) &gt; 0): number_of_zeros = get_number_of_zeros(R) print 'number of zeros is {}'.format(number_of_zeros) R = randint(0, 2...
814,697
0
<p>I assume you're talking about something like <a href="http://rogeralsing.com/2008/12/07/genetic-programming-evolution-of-mona-lisa/" rel="nofollow noreferrer">Roger Alsing's program</a>.</p> <p>I implemented a version of this, so I'm also interested in alternative fitness functions, though I'm coming at it from the...
8,534,840
0
<p>After some experimentation, I have found a way to specify a custom skipper and will outline it here:</p> <pre><code>template&lt;typename Iterator&gt; struct pl0_skipper : public qi::grammar&lt;Iterator&gt; { pl0_skipper() : pl0_skipper::base_type(skip, "PL/0") { skip = ascii::space | ('{' &gt;&gt; *(qi::char_ - '}'...
1,975,980
0
<p>I would set a class variable — eg. <code>@@my_variable</code> — inside the configure block. The configure block exists for code you want to run at start up, so setting your variable their makes sense. Your Sinatra application is a subclass of <code>Sinatra::Base</code>, so using a class variable in this situation s...
27,271,020
0
Invalid regular expression: Invalid group <p>I'm trying to write a regex with a negative lookahead that detects files which end with <code>.apk</code> but not with <code>-unaligned.apk</code>. Here it is.</p> <pre><code>/(?s)^((?!\-unaligned).)*\.apk$/ </code></pre> <p>However, when I use it in Node (or in the Chrome d...
14,492,933
0
Non binary decision tree to binary decision tree (Machine learning) <p>This is homework question, so I just need help may be yes/No and few comment will be appreciated!</p> <ul> <li>Prove: Arbitrary tree (NON binary tree) can be converted to equivalent binary decision tree.</li> </ul> <p>My answer: Every decision can b...
5,448,829
0
<p>you can add the accepted tags to strip_tags as second parameter</p> <p>ex.</p> <pre><code>strip_tags($text, '&lt;br&gt;'); </code></pre>
3,273,629
0
<p>You are right. Parallelization makes it work faster.</p> <p>In fact, the x264 encoder provides parallel encoding ability.</p> <p><a href="http://www.videolan.org/developers/x264.html" rel="nofollow noreferrer">http://www.videolan.org/developers/x264.html</a></p>
8,678,371
0
How to convert GPS degree to decimal and vice-versa in jquery or javascript and PHP? <p>does someone know how to convert GPS degree to decimal values or vice versa?</p> <p>I have to develop a way where users can insert an address and get the GPS values (both degree and/or decimal), but the main thing i need to know is ...
25,243,483
0
Bash - Wait with timeout <p>I have a problem with bash programming. I have this code:</p> <pre><code>#!/bin/bash tmpfile="temp.txt" ./child.sh &amp; sleep 4s </code></pre> <p>but I want to get the exit code of <code>child.sh</code>. I know that is possible with the costructor <code>wait</code>. There are any constructo...
5,565,156
0
<p>We have to maintain on an old system here (20 years and older).</p> <p>ESQL is used massively in here. The most of the problems we had while moving the software to a new OS (it was an 15 year old hpux) where with the ESQL code.</p> <p>The new software we are writing are all making use of the C++ library. This gives...
30,860,074
0
<p>What sstan is pointing out is that you are lacking the semicolon at the end of each statement.</p> <p>Try:</p> <pre><code>INSERT INTO report_header ( report_number, company_id, user_id, entry_date) VALUES ( 6797, 15967, 84, TRUNC(SYSDATE)); INSERT INTO report_detail (part_id, condition_id, uom_id, dvc_id, cqh_id, a...
14,554,552
0
How to Use Arrow Keys to Navigate a Vertical Page <p>I have a webpage with photos on it. I would like the viewer to be able to use the arrow keys (up, down, left, right) to advance. Typically the down key scrolls about 10 pixels. I'd like the down key and the right key to advance to the next photo, or say, 1000 pixels....
39,307,840
0
<p>If you want to restart the NGINX process, restart the container by running the command:</p> <pre><code>docker restart &lt;container name&gt; </code></pre> <p><a href="https://blog.docker.com/2015/04/tips-for-deploying-nginx-official-image-with-docker/" rel="nofollow">https://blog.docker.com/2015/04/tips-for-deployi...
13,826,975
0
<p>Since you can't refactor as suggested, you should check what type you need to return based on the <code>type</code> member that you assign in the <code>init()</code> function. I assume this will work, but you haven't shown where <code>type</code> is defined:</p> <pre><code>const void* Investment::getItem() const { ...
32,573,413
0
<p>Usually the best way to get data from a server to the front end is as a JSON string/object then we can easily manipulate that just like you're doing already.</p> <p>I think you're pretty much there you're just missing one part.</p> <p>In this below example i'm listing the same users in a table and menu and on click...
19,724,039
0
Match Schedule Generator Algorithm <p>I'm working on a schedule generator where every team plays a match with each other teams. My Database table and the output I need like below, <img src="https://i.stack.imgur.com/pf2tZ.png" alt="enter image description here"></p> <p>What I have tried so far is</p> <pre><code> &lt;% ...
32,366,138
0
implicit parameters and generic types <p>i'm trying to understand the behavior of the compiler in this situation</p> <pre><code>object ImplicitTest extends App { def foo[T](implicit x: (String =&gt; T)): T = ??? implicit val bar = (x: String) =&gt; x.toInt foo } </code></pre> <p>the code above does not compile and give...
3,663,772
0
<p>I used WMI to do this, found an example on the web, and this is what it looked like.</p> <pre><code> private ManagementScope _session = null; public ManagementPath CreateCNameRecord(string DnsServerName, string ContainerName, string OwnerName, string PrimaryName) { _session = new ManagementScope("\\\\" + DnsServerN...
15,588,929
0
CSS: :hover and Sibling Selector <p>I have a case where my design requires me to declare this class:</p> <pre class="lang-css prettyprint-override"><code>.panel { position: fixed; top: 100vh; height: 90vh; margin: 0px; padding: 0px; width: 100%; transition-property: top; transition-duration: 1s; } .panel:before { backg...
33,614,301
0
<p>Try </p> <pre><code>Sub HelloWord() Dim wordApp As Object Set wordApp = GetObject(, "Word.Application") MsgBox wordApp.Activedocument.FullName End Sub </code></pre> <p>Once you've got a handle on the the wordApp, you can access all the objects in the model as normal.</p> <p>The downvote might be because this doesn'...
2,474,667
0
<p>You would probably want to use a PHP syntax file such as: <a href="http://www.vim.org/scripts/script.php?script_id=1571" rel="nofollow noreferrer">http://www.vim.org/scripts/script.php?script_id=1571</a></p> <p>FWIW: Personally I am enjoying learning vim at the moment but still prefer netbeans for PHP development b...
26,066,966
0
<p><strong>try this</strong> </p> <pre><code>try { $pdo = new PDO('mysql:host=localhost;dbname=yourdbname', 'dbuser' , 'password'); $pdo-&gt;setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXECPTION); $pdo-&gt;exec('SET NAME "utf8"'); } catch (PDOException $e) { $error= 'error text'; include 'errorpage.php'; exit(); } $s...
37,315,341
0
<p>To use a closure in this situation try something like </p> <pre><code>func getCityDetail (completion:()-&gt;()){ dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0)) { //background thread, do ws related stuff, the ws should block until finished here dispatch_async(dispatch_get_main_queue...
26,361,807
0
<p>Googling for "css customized radio buttons" yielded a lots of useful results, such as <a href="http://www.hongkiat.com/blog/css3-checkbox-radio/" rel="nofollow">this</a>, here is a <a href="http://jsfiddle.net/dghjLra2/" rel="nofollow">jsfiddle</a> based on that tutorial, code provided below. Obviously, this is kin...
28,999,831
0
<p>First of all, Thomas Jungblut's answer is great and I gave me upvote. The only thing I want to add is that the Combiner will always be run <strong>at least</strong> once per Mapper if defined, unless the mapper output is empty or is a single pair. So having the combiner not being executed in the mapper is possible ...
21,392,529
0
Cascading multi-value parameter issue in SSRS 2008 <p>Basically I have built a report using SSRS 2008, the report has cascading parameters, the independent one is a multi-value parameter (work units) populated with values from a database query, the dependent parameter (job positions contained in respective work units) ...
29,749,150
0
How can i see my document settings.xml (maven) <p>I'm trying to see my informations (username &amp; url) in settings.xml but there is no document in my folder .m2, I try to display it with ls -la but nothing to do. How can we get those informations?</p>
2,151,770
0
<p>Maybe you can install PHPMailer as a Vendor and create a Component called "Mail"...</p> <p>And don't forget to authenticate with your <strong>SMTP server</strong>! :)</p>
16,254,122
0
<p>You could create another list in the correct order, by something like:</p> <pre><code>// Given that 'Person' for the sake of this example is: public class Person { public string FirstName; public string LastName; } // And you have a dictionary sorted by Person.FirstName: var dict = new SortedDictionary&lt;string, P...
38,206,662
0
How to cancel printing in ReportViewer1.Print Event? <p>I created ReportViewer1. It will show preview and I need to cancel print out to a printer when the user clicks a Print Button on the toolbar. </p> <p>Like this </p> <pre><code>Private Sub ReportViewer1_Print(sender As Object, e As ReportPrintEventArgs) _ Handles R...