pid int64 2.28k 41.1M | label int64 0 1 | text stringlengths 1 28.3k |
|---|---|---|
11,312,129 | 0 | Getting a Date with "ShortenedMonth/dd" format <p>Is there a way I can get a date by the format "MM/dd" but instead of the month being an <code>int</code>, it is a shortened <code>string</code> like "Jan 30"?</p> <p>Currently I did this with Java by a simple <code>Switch Case</code>, but I want to know if this is alrea... |
23,142,153 | 0 | How to use @Html.PartialView("XXX") in Jquery function? <p>I have a function that updates a div with raw HTML. However, the raw HTML is in another .CSHTML document.</p> <p>My function is:</p> <pre><code>function Demo(){ $('#ContainerDiv').html('@Html.Partial("MyPartialView")'); } </code></pre> <p>For some reason, whene... |
33,036,578 | 1 | Not sure what is wrong with my code (Tkinter BEGINNER) <p>I'm making a pretty simple GUI and each frame should have a Continue and Exit button. I need the continue button to open a new frame with writing, widgets...etc on it. </p> <p>The first frame (<code>frame1</code>) works when I call the <code>frame_2</code> funct... |
36,912,061 | 0 | How to set filename of excel file to export from html table <p>I try to export datatable html to excel file but right now, i don't know how to set file name in savefiledialog popup</p> <p>here my code</p> <pre><code> $('#exportTable').click(function () { var startDate = $('#startDate').val(); var endDate = $('#endDate'... |
35,053,146 | 0 | Helicon Ape by Helicon Tech provides support for Apache .htaccess and .htpasswd configuration files in Microsoft IIS. |
21,441,777 | 0 | JS. How to get list of div's with similar class name? <p>I have html, like this:</p> <pre><code><div id="c0" class="bz_comment bz_first_comment"></div> <div id="c1" class="bz_comment"></div> <div id="c2" class="bz_comment"></div> <div class="bz_add_comment"></div> </code>... |
7,405,118 | 0 | <pre><code> with(Math) { var exp = floor(log(number)/log(10)) - 1; exp = max(exp,0); var n = number/pow(10,exp); var n2 = ceil(n/5) * 5; var result = n2 * pow(10,exp); } </code></pre> <p><a href="http://jsfiddle.net/NvvGf/4/" rel="nofollow">http://jsfiddle.net/NvvGf/4/</a></p> <p>Caveat: only works for the natural num... |
39,687,720 | 0 | SSL not work in PHP5.6 on Windows <p>I tried:</p> <pre><code>$host = 'ssl://fbcdn-sphotos-c-a.akamaihd.net'; $port = 443; $fp = fsockopen($host, $port, $errno, $errstr, 30); if (!$fp) { var_dump($errno, $errstr); } else { echo 'Connected'; } </code></pre> <p>And:</p> <pre><code>$host = 'ssl://fbcdn-sphotos-c-a.akamaihd... |
8,674,210 | 0 | <p>One thing you can do is to use the interface (i.e. the header files) and provide an implementation of your own, at least for those functions you care about. To switch between both versions essentially amounts to linking with different libraries: yours for testing, theirs for the real implementation.</p> <p>There ar... |
16,854,165 | 0 | <p>Probably a more elegant way of doing this but you could loop the array and convert each value to a string by adding it to a blank string <code>+=""</code>. Check <a href="http://stackoverflow.com/questions/971039/javascript-string-and-number-conversion">here</a> for javascript type conversions </p> <pre><code>var a... |
9,303,307 | 0 | Upgrading application to Ruby 1.8.7, Rails 3 and getting undefined method `config_accessor' for SiteSweeper:Class <p>I'm struggling through upgrading an app to Rails 3 (Ruby 1.8.7), and my current roadblock is when running 'rake test --trace' i get the following:</p> <pre><code>** Invoke test (first_time) ** Execute te... |
4,333,894 | 0 | Read td values using prototype <p>I would like to read the values of HTML td using prototype. For example, say you have a table as follows</p> <pre><code><table id="myTable"> <tr> <td>apple</td> <td>orange</td> </tr> <tr> <td>car</td> <td>bus</td> ... |
7,118,415 | 0 | json not loading in iphone device while using sencha touch and phonegap <p>I'm trying to load a json into my view. Im using phonegap with sencha touch and when I load the app to my phone the json does not load at all.. It works fine in the browser and in the simulator. I would really appreciate some help from the exper... |
20,831,969 | 0 | <p>On Ruby <strong>.respond_to?</strong> is a test method. One of the things that does is takes a symbol and returns a <strong>true</strong> if the object can receive a method, a <strong>false</strong> if it doesn't.<br> For example,:<br> <strong>[1, 2, 3].respond_to?(:push)</strong> would return <strong>true</strong>... |
7,731,904 | 0 | <p>The Hough transform gives you equations of lines (ie infinitely long lines not segments).</p> <p>Once you have these equations you could test how <a href="http://paulbourke.net/geometry/pointline/" rel="nofollow">far each point is from a line</a> and decide whether it is on the line or not (given some maximum dista... |
20,526,267 | 0 | <p>You're returning a pointer to a local array, which is destroyed when the function returns. The best solution is to return a string object:</p> <pre><code>std::string read_word() { std::string input; std::cin >> input; return input; } </code></pre> <p>Note that I also changed the function name to match what it... |
38,632,620 | 0 | Yum and RPM show that the number of installed packages is different <pre><code>[root@study ~]# rpm -qa | wc -l 777 [root@study ~]# yum list installed | wc -l 1054 </code></pre> <p>i want to know why different,shoud i get correct number of installed packages?</p> |
39,506,983 | 0 | How can I create a reminder using AlarmManager? <p>I tried to make a project that will show <code>Notification</code> on particular time and even the app is not open it will show it. But it is showing message at particular time and also after the given time. Moreover the <code>Notification</code> does not work when the... |
17,554,915 | 0 | Elisp equivalent of Clojure's time? <p>Here's Clojure's doc:</p> <pre><code>clojure.core/time ([expr]) Macro Evaluates expr and prints the time it took. Returns the value of expr. </code></pre> <p>Is there some (semi-) standard way to do this in Emacs lisp?</p> |
36,941,627 | 0 | <blockquote> <p>Pushing and popping is definitely not a problem and you dont need a singleton request for it.</p> <p>Other thing for the <code>TableViewCell</code> , i would advise to make separate reusable cell index for the normal table cell and for the advertisement cell. That way , the cell will be reused and you ... |
18,057,685 | 0 | <p>You can try:</p> <pre><code>CultureInfo CultureInfoDateCulture = new CultureInfo("en-US"); DateTime date; bool works = DateTime.TryParseExact(dateString, "MM/dd/yyyy", CultureInfoDateCulture , DateTimeStyles.None, out date)) </code></pre> |
12,989,084 | 0 | <p>change this </p> <pre><code>message[i].getFrom() </code></pre> <p>to</p> <pre><code>message[i].getFrom()[0].toString()) </code></pre> |
40,104,782 | 0 | JAXB marshall date as epoch not consistent across databases <p>When we marhsal a date from a mysql database out of the box JAXB converts this to milliseconds since the epoch, which is what we want.</p> <p>However when swapping the database to oracle the JAXB marshal converts this to a string.</p> <p>I imagine this is d... |
33,838,176 | 0 | <p>You can explicitly set TerminationGracePeriodSeconds to zero in the PodSpec to obtain the old behavior.</p> |
21,194,987 | 0 | <p>Just don't change the <code>overflow</code> property:</p> <pre><code>nav > ul > li:hover > ul { min-height: 110px; /*overflow: visible; Remove this*/ } </code></pre> <p>Check this <a href="http://jsfiddle.net/r9Dyq/1/" rel="nofollow">http://jsfiddle.net/r9Dyq/1/</a></p> |
22,925,087 | 0 | how to use html to post multipart/form-data <p>I have form, I want to post through multipart/form-data. How to use html to specify each fields' type.</p> <pre><code><html> <head> <title> New Student </title> </head> <body> <form action="http://10.128.157.12:8080/student" method="p... |
38,242,778 | 0 | Error When I try to add dynamically component with angular2 using drag and drop <p>this is my directives to drag and drop</p> <p>I want when I apply my drag and drop to add a component to my div I did the some things after event click but now I how to change it to drag and drop </p> <pre><code>import { Directive, Outpu... |
12,097,977 | 0 | <p>CSS:</p> <pre><code>#pages-content ul li{ width: 250px; height: 75px; text-align: center; } </code></pre> <p>HTML:</p> <pre><code><div id="pages-content"> <ul> <li>Matter here</li> </ul> </div> </code></pre> <p><a href="http://jsfiddle.net/3zLcT/1/" rel="nofollow">Working fiddle<... |
32,641,604 | 0 | Java: How would I declare an undefined number of object with user inputted data? <p>for my assignment I am suppose to have a user input the name and price of items. However, they are to enter in an unlimited amount of times until a sentinel value is used. I don't actually know how I'd go about doing this. The only way ... |
33,129,138 | 0 | <p>You use a try..catch block to catch the Exception, then add whatever error handling logic is appropriate.</p> <pre><code>try { var response = authClient.Post<AccessTokenResponse>(authRequest); response.EnsureSuccessStatusCode(); } catch (WebException ex) { // something bad happened, add whatever logic is appr... |
25,347,825 | 0 | PyQt or PySide: QTextEdit deselect all <p>I'm using PySide(PyQt is fine as well) and I want to deselect everything inside a QTextEdit. Selecting everything is very easy and it's done by self.textedit.selectAll(), but I can't find a simple way to deselect everything. Is there a straightforward way to do it that I'm not ... |
16,827,652 | 0 | <p>I know you specifically asked for regex, but you don't really need regex for this. You simply need to split the string by delimiters (in this case a backslash), then choose the part you need (in this case, the 3rd field - the first field is empty).</p> <ul> <li><p><code>cut</code> example:</p> <pre><code>cut -d '/'... |
25,502,354 | 0 | How can I limit the results extracted by a query in Acces? <p>I have this query in my Access database:</p> <pre><code>SELECT t_Campioni_CAMPIONE, t_Campioni.[DATA ARRIVO], t_Campioni.PRODUTTORE, t_Campioni.CodF, t_Fornitori.[Nome Fornitore] FROM t_Campioni INNER JOIN t_Fornitori ON t_Campioni.CodF = t_Fornitori.CodF WH... |
4,647,666 | 0 | CoreData programming with multiple Entities <p>I'm looking for some help with CoreData and with Entities in general. For the purpose of my question, lets say I have a database of albums. I simple have an entity named albums with Attributes for Name, Artist, Year, Album Art, and such.</p> <p>Now, lets say I want to be a... |
26,048,684 | 0 | Sorting an array which the maximum value is similar to its size <p>I'm trying to figure out the best way to sort an array which the maximun value is similar to its size. The array does not contain repeated elements.</p> <pre><code>import java.util.Arrays; import java.util.Random; public class SortExamples { public stat... |
2,536,376 | 0 | <p>Selectors are ONE way to go... the alternative is to create a protocol and to require invokers of your API to provide a "delegate" object that implements the protocol. Then you can invoke the required selectors of that protocol on the delegate object that you have been given. Each has its advantages and disadvantag... |
162,192 | 0 | Visual Studio 2008 - Add Reference <p>When adding a DLL as a reference to an ASP.Net project, VS2008 adds several files to the bin directory. If the DLL is called foo.dll, VS2008 adds foo.dll.refresh, foo.pdb and foo.xml. I know what foo.dll is :-), why does VS2008 add the other three files? What do those three files d... |
37,988,054 | 0 | <p>One solution is to create a version of your network that is truncated at the LSTM layer of which you want to monitor the gate values, and then replace the original layer with a custom layer in which the stepfunction is modified to return not only the hidden layer values, but also the gate values.</p> <p>For instanc... |
1,320,687 | 0 | <p>The <code><legend></code> element can contain any <a href="http://www.htmlhelp.com/reference/html40/inline.html" rel="nofollow noreferrer">inline element</a>, so you can apply virtually whatever formatting you'd like.</p> |
38,113,748 | 0 | <p>The function <code>row.match</code> in the package <code>prodlim</code> allows you to identify the rows in one matrix that are also found (identical) in another matrix. Very convenient and easy to use.</p> <pre><code>library(prodlim) row.match(x,y) </code></pre> |
17,730,994 | 0 | <p>Create a <a href="https://developers.google.com/kml/documentation/kmzarchives" rel="nofollow">KMZ file</a> which includes the pictures and the KML <a href="http://www.google.com/earth/outreach/tutorials/kmz.html" rel="nofollow">KMZ tutorial for google earth</a></p> |
40,283,608 | 0 | How to apply vlookup formula in blank cells only <p>I want to apply vlookup formula only in those blank cells B4, B7, B10. I want to write macro so that vlookup formula applies only to the blank cells, rest of the data remain intact. </p> <p><a href="https://i.stack.imgur.com/ecStb.png" rel="nofollow">VLOOKUPFORMULA</a... |
37,575,458 | 0 | <p>Okay I see where you have gone wrong. Naming conventions would of actually prevented this but anyway. You're actually accessing the name like it's a static property, when in fact it's an instance property. Doing something like this will solve your problem:</p> <pre><code>let category = clothing_categories[indexPath... |
8,159,392 | 0 | arm-none-eabi-g++ calling globral constructor <p>I am trying to port c++ application to arm board with gcc tools (using RTOS). But my static const constructors are not being called. </p> <p>Simple code:</p> <pre><code>class TestClass { public: TestClass(); TestClass(int m); TestClass(const TestClass& other); ~TestC... |
9,871,158 | 0 | Annotation based request validation <p>I'm trying to validate a numeric variable in the request, what I'm trying to achieve, for this field to be non null and numeric. I want to have different errors reported for null and conversion error.</p> <p>I was trying to use org.springframework.format.annotation.NumberFormat</p... |
4,037,789 | 0 | <p>Combining the images can be done easily using <a href="http://www.mathworks.com/help/techdoc/math/f1-84864.html#f1-85019">concatenation</a>:</p> <pre><code>image3 = [image1 image2]; %# Concatenate horizontally </code></pre> <p>And you can then visualize <code>image3</code> using any of the functions <a href="http:/... |
32,251,318 | 0 | Warning: SoapClient::SoapClient(http://www.w3.org/2005/05/xmlmime): failed to open stream: HTTP request failed! HTTP/1.1 401 Authorization Required <p>I have simple script connection call using PHP 5.2.10 to a Web service working with SOAP 1.2. </p> <p>The same PHP installation is able to connect via Web service to ano... |
20,186,846 | 0 | <p>Make your HTML like this:</p> <pre><code><input type="text" name="mytextbox" id="mytextbox" onKeyUp="countChar(this)" size="1" maxlength="1" value="" /> </code></pre> <p>And JS will be this:</p> <pre><code>function countChar(that) { var xy = that.value; var len = xy.length; if (len >= 2) { that.value = tha... |
8,793,450 | 0 | <p>what you have to do to solve this problem is explicitly define the height of the input and then also define the font-size. For example:</p> <pre><code>input{ height:14px; font-size:10px; } </code></pre> |
29,135,280 | 0 | Java Array out of bounds error isn't out of bounds? <p>This code is the relevant portion of my program, and it produces an array out of bounds error, and I can't figure out why. My error is 'java.lang.ArrayIndexOutOfBoundsException: 6', with 6 being a random value, at the if statement in randomShot();</p> <pre><code>pu... |
36,736,466 | 0 | Google Analytics for Advanced Data Extraction <p>I am planning to use the FREE Google Analytics as the engine for analytic for an ecommerce website. Is it possible for me to do the advanced data extraction from Google Analytics for the following task?</p> <ol> <li><p>Every merchants will have their own analytic statist... |
2,086,081 | 0 | <p>I think it's because of the circular reference between InventoryUser and ProductUserPK.</p> <p>Either InventoryUser.pk or ProductUserPK.user should be lazy.</p> |
20,657,924 | 0 | <p>When you are storing code in MySQL wrap the input in the <code>addslashes()</code> PHP function. Then when you retrieve code from MySQL you need to wrap the output in <code>stripslashes()</code>. </p> <p>See: <a href="http://www.php.net/stripslashes" rel="nofollow">http://www.php.net/stripslashes</a> <a href="http:... |
11,463,190 | 0 | <p>Be careful about trusting the console, there is often asynchronous behavior that can trip you up.</p> <p>You're expecting <code>console.log(x)</code> to behave like this:</p> <ol> <li>You call <code>console.log(x)</code>.</li> <li><code>x</code> is dumped to the console.</li> <li>Execution continues on with the sta... |
7,729,256 | 0 | <p>You might try something like:</p> <pre><code>assemblyTypes.Where(x => StringList.Contains(x.Name)); </code></pre> <p>Keep in mind this is case sensitive and ignores whitespace, so you will need to add case consideration or trimming if that's an issue.</p> <p><strong>Edit:</strong> (example for loop usage)</p> <p... |
38,213,016 | 0 | <p>You probably want to have something like</p> <pre><code>void Test2(void(*Func)(wchar_t*, wchar_t*),wchar_t* x, wchar_t* y) { (*Func)(x,y); } int main() { Test2(Test,L"Hello", L"Testing"); return 0; } </code></pre> <p>instead.</p> <hr> <p>As for your comment</p> <blockquote> <p>How do i do this in C++ with templates... |
23,093,565 | 0 | <p>A set by definition doesn't contain any duplicates. A set determines if two items are alike, by using either the objects equals()/compareTo(..) method or by using a Comparator. If you only want unique items in your set, implementing the Comparable interface and overriding equals() is what you want to do. BUT in you... |
36,107,296 | 0 | <p>Assuming none of your file names contain any additional dots other than <code>.ogg.M4A</code>, then all you need is a single <code>REN</code> command.</p> <pre><code>ren *.ogg.M4A ??????????????????????????????.m4a </code></pre> <p>Be sure to use enough <code>?</code> to match the longest name in your file set.</p>... |
15,676,990 | 0 | Difference of connection pool, jdbc and jndi <p>I need to know my understanding on above are correct,</p> <p>In connection pool you set multiple connection with the use of java.sql.Datasource.</p> <p>In jdbc we directly specify the connection url and oracle.jdbc.driver.OracleDriver and its always one connection where a... |
1,924,487 | 0 | <p>C# doesn't support covariant return types. When implementing an interface, you have to return the type specified by the interface. If you want to, you can explicitly implement the interface and have another method with the same name that returns the subtype. For example:</p> <pre><code>class MyImplementation : MyIn... |
21,937,676 | 0 | <p>Use this <code>\[([^\[\]]*)\](.*)</code></p> <pre><code>$input_lines="[Hello World](http://google.com)"; preg_replace("/\[([^\[\]]*)\](.*)/", "$1", $input_lines); </code></pre> |
5,856,918 | 0 | Performance with WPF Combo Box inside a ListView <p>I was wondering if I was missing something obvious.</p> <p>I have a simple window with a ListView with 3 columns in it. One displays text and the other two have combo boxes in them.</p> <p>The ListView has approx. 500 records and the Comboboxes both pull from the same... |
18,533,221 | 0 | DelegateEvents: Child itemViews's not removed on deletion of model from collection <p>I've a collectionview ItineraryEditorView that is swapped in and out of a layout region. The same instance of collectionView is swapped in using region.show instead of creating new instance for collectioView everytime. The render meth... |
23,807,810 | 0 | <p>you can just do</p> <pre><code>std::ratio<a,b>::num </code></pre> <p>if you don't want to use typedef</p> |
9,069,461 | 0 | <p>In MATLAB, you can run</p> <pre><code>format debug </code></pre> <p>in the MATLAB Command Window to force it to display the variable as its memory location, rather than as its value. (This is an undocumented (AFAIK), but publicly known, option for the FORMAT function.)</p> <p>See HELP FORMAT to determine what your ... |
31,230,674 | 0 | Using AsyncTask with timer in fragment <p>I'm using Asynctask to load data via Volley. I want to do that AsyncTask invoked after n minutes, maybe this is duplicate and a silly question, but i cant figure how to implement it. Maybe I need to implement AsyncTask in my fragment ?</p> <p>This is my AsyncTask.class</p> <pre... |
40,505,891 | 0 | <p>Dart2JS was indeed the culprit. Turning minification off and looking at the output Javascript reveals:</p> <pre><code>t2 = J.getInterceptor(selection); t1 = t2.toString$0(selection); </code></pre> <p>Manually replacing it after compiling with:</p> <pre><code>t1 = selection.toString(); </code></pre> <p>fixes the iss... |
1,552,943 | 0 | <p>What specific problem are you encountering? Do you wish to get rid of the login page, and "automatically" use the user's AD credentials passed by IE? </p> |
36,316,370 | 0 | <p>Detailed guide for newbies like me. Took a long time to get it to work.</p> <p>I initially followed: <a href="http://php.net/manual/en/imagick.installation.php" rel="nofollow">http://php.net/manual/en/imagick.installation.php</a></p> <p>but after installation, PHPInfo under imagick shows number of supported formats... |
6,543,730 | 0 | <p>Create a table with an autoicrement id and the columns of the original table.</p> <p>Then</p> <pre><code>INSERT INTO new_table (column1, column2,.....) -- refer all columns except autoincrement id SELECT * FROM old_table </code></pre> <p>Update the old table by joining with the new, assuming the is a key composite ... |
29,935,815 | 0 | <pre><code>new Date("2015/04/29 11:24:00").getTime(); //for answer in milliseconds (new Date("2015/04/29 11:24:00").getTime()/1000); //to get answer in seconds </code></pre> <p>:)</p> |
25,642,960 | 0 | <p>You can make use of <code>dir.create</code> in conjunction with <code>paste</code> and <code>Sys.Date</code>, like this:</p> <pre><code>dir.create(paste("Test", Sys.Date(), sep = "_")) </code></pre> <p>If you want to change into that directory, I would suggest storing the output of <code>paste</code> as a character... |
2,512,629 | 0 | <p>Are you sure your database is not set up to try to do cascading deletes?</p> <p>One other thing to check, crack open the .edmx file in the xml editor and see if you have a line like this that relates to the entity in question:</p> <pre><code><OnDelete Action="Cascade"></OnDelete> </code></pre> |
38,074,742 | 1 | Built-in functions vs recursive functions <p>I am not a mathematician, nor a computer scientist - just a hobbyist programmer and I am trying to teach myself Python by doing the Euler Project problems. One of them requires the use of a factorial. I wrote my own calculation using a recursive function and then realised th... |
5,109,190 | 0 | <p>You can use <a href="http://www.postgresql.org/docs/current/static/functions-admin.html">pg_terminate_backend()</a> to kill a connection. You have to be superuser to use this function. This works on all operating systems the same. </p> <pre><code>SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE -- don't... |
3,877,198 | 0 | how to dice up the array <p>I have an array like this (below is the var_dump)</p> <pre><code>array 0 => object(stdClass)[11] public 'VN' => string '571.5' (length=5) public 'color' => string 'GREEN' (length=5) public 'name' => string 'CIRRHOSIS' (length=9) public 'icd9ID' => string '5765' (length=4) publ... |
21,977,347 | 0 | <p>You need to ask your fellow developers or repository administrator what your repository location is. You should already have the project checked out, in which case you are already using a working copy that is linked to it and you don't need to do any more to point at the right location.</p> <p>As for how to add an ... |
29,751,859 | 0 | Laravel 5 hasMany relationship on two columns <p>Is it possible to have a hasMany relationship on two columns?</p> <p>My table has two columns, <code>user_id</code> and <code>related_user_id</code>.</p> <p>I want my relation to match either of the columns.</p> <p>In my model I have </p> <pre><code>public function userR... |
23,832,876 | 0 | Adding an entity to the context <p>Why is this simple add not working! I get a previous record from the database, instantiate a new entity to add by using the previous record's data, except I increment the report number by 1. I keep getting the error "The property 'ReportNbr' is part of the primary key and cannot be mo... |
30,529,537 | 0 | <p>I ran into a similar problem once. What you can try is like </p> <pre><code>var cssLink = document.createElement("link") cssLink.href = "style.css"; cssLink .rel = "stylesheet"; cssLink .type = "text/css"; window.frames[0].document.body.appendChild(cssLink); </code></pre> <p>Try this out it may help you though i'm ... |
32,298,993 | 0 | <p>You have to use <code>providers</code> instead of <code>injectables</code></p> <pre class="lang-ts prettyprint-override"><code>@Component({ selector: 'my-app', providers: [NameService] }) </code></pre> <p><a href="https://github.com/Mellbourn/angular2-step-by-step-guide">Complete code sample here</a>.</p> |
27,567,050 | 0 | <p>Do you play your music in Service? Anyway, you should stop the playing manually in onStop method.</p> |
35,105,947 | 0 | Answer Set Programming: Group into two sets so that those who like each other are in same set, and dislike = different set <p>I'm basically a beginner to Answer Set Programming (CLINGO), so I've been attempting this problem for hours now. </p> <p>person(a;b;c;d;e;f).</p> <p>likes(b,e; d,f).</p> <p>dislikes(a,b; c,e).</... |
15,523,386 | 0 | <p>Note:</p> <ol> <li>Use getElementsByTagName</li> <li>There is no documentList tag in your xml</li> <li><p>Tag document is the only array in your xml not document_list</p> <pre><code>function viewXMLFiles() { console.log("viewXMLFiles() is running"); xmlhttp = new XMLHttpRequest(); xmlhttp.open("GET","TestInfo.xml",... |
11,707,681 | 0 | <p>Well this was an interesting problem and kept me guessing for a while... </p> <p>I wasn't able to derive the logic first but then I switched back to basics and derived the <code>boolean expression</code> for calculation the sum & carry for a 3 bit operation and here is the solution:</p> <pre><code>public static... |
3,967,202 | 0 | Storing log into .log file using SLF4j/log4j <p>I am using SLF4J and as per requirement i have to store the logs into the .log file. But when i run the program the log are not written into thelog file. </p> <p>Class :</p> <pre><code>import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class TestSLF4J { // pr... |
35,455,526 | 0 | Disable button when there are validation errors in listbox datatemplate <p>I have listbox with list of textboxes created using data template, And I want to disable save button when there are validation errors in listbox datatemplate(list of textboxes). I have used IDataErrorInfo for validation.</p> <pre><code><Style... |
24,335,677 | 0 | <p>Can you supply a dropbox link to one of the images so I can see what you mean? Do you mean you have one scan of 4 images all on the same layer, and you need to crop 4x and resave individual images? Or is each image on its own layer?</p> <p>Are the 100 images all exactly the same layout? If so, you may be able to cr... |
36,279,537 | 0 | <p>There's a Jenkins plugin precisely for this matter: <a href="https://wiki.jenkins-ci.org/display/JENKINS/Plugin+Usage+Plugin+%28Community%29" rel="nofollow noreferrer">Plugin Usage</a></p> <p>Thanks to this wonderful plugin I found many redundant plugins to remove in the Plugin Manager (you will be able to remove p... |
22,047,775 | 0 | Move of class with pimpl won't compile <p>In the following example, how is it possible that ~CImpl is called correctly but when the class needs to be moved, the compiler says it has an incomplete type?</p> <p>If the declaration of Impl is moved to the header it works, my question is how come the destructor is called fi... |
37,657,907 | 0 | <p>You can get the hashtable as javascript object with this snippet:</p> <pre><code><script type="text/javascript"> var hashtable = @Html.Raw(Json.Encode(Model.YourHashtable) </script> </code></pre> <p>After that you will be able to access your data by value:</p> <pre><code>hashtable["sample"] </code></pre... |
34,413,478 | 0 | <p>FlipView is a Windows Store/Universal App only class.</p> <p>The page you link to clearly states:</p> <blockquote> <p>Requirements (Windows 10 device family)</p> <p><strong>Device family</strong> Universal</p> </blockquote> <p>and</p> <blockquote> <p>Requirements (Windows 8.x and Windows Phone 8.x)</p> <p><strong>M... |
25,505,286 | 0 | Hive : How to execute a query from a file and dump the output in hdfs <p>I can execute a query from a sql file and store the output in a local file using </p> <pre><code>hive -f /home/Prashasti/test.sql > /home/Prashasti/output.csv </code></pre> <p>Also, I can store the output of a hive query in hdfs using :</p> <pr... |
9,979,233 | 0 | Could I export class names and package names into csv file? (java) <p>I have one java project in netBeans. There are some packages, and classes in that packages. Can I export this structure to csv?</p> <p>Example of csv:</p> <p>myPackage1,MyClass1;</p> <p>myPackage1,MyClass2;</p> <p>I would be more pleased if I can put... |
31,531,967 | 0 | <p>Found the answer and put it here for reference.</p> <p>My requestFocus() action on the JTable did indeed leave selection on the right row, but without any selection of the (single) column. Even when running as normal (not testing) the JTable column did not initially respond to F2. It was puzzling to me why the cell... |
18,424,940 | 0 | malloc:what can "corrupt" allocated memory in Linux/Qt application (threads involved)? <p><em>Dirty hacks at 05:00 AM. I have sinned, SO</em>, by passing pointer's address between same process's threads with FIFO:</p> <pre><code>total_buf = (char*)malloc(msize); // ... long addr = (long)&total_buf; // ... write(fif... |
30,140,741 | 0 | <p>Do we really need to convert?</p> <pre><code>SELECT * FROM DBO.CUSTOMER WHERE CAST([date] AS DATE) >= '01/12/2014' AND CAST([date] AS DATE) <= '31/12/2014' </code></pre> |
12,451,996 | 0 | <p>I'd have the entire content in an <code>article</code>, with each book in a <code>section</code>. </p> <p>This would make it extremely consistent with the third <a href="http://www.w3.org/TR/html5/the-section-element.html#the-section-element" rel="nofollow">section example given by the W3C</a> </p> |
30,748,306 | 0 | How to edit the link of a variable in opencart register.tpl file? <p>Here is the code of register.tpl file. The variable is called and this $action variable called the account/login.php file how to I can change the link of $action variable.</p> <pre><code><form action="<?php echo $action; ?>" method="post" enc... |
28,335,868 | 0 | <p><strong>Short answer:</strong> none, but you may feel like it is taking a few milliseconds depending on your processor speed and the amount of things angular need to check before it updates the HTML</p> <p><strong>Long answer:</strong> As soon as you update the model (well, at the end of the current javascript cont... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.