pid int64 2.28k 41.1M | label int64 0 1 | text stringlengths 1 28.3k |
|---|---|---|
16,775,346 | 0 | <p>This will work:</p> <pre><code>var re = /^FIXED(?:-[a-zA-Z0-9]{4}){3}$/; </code></pre> <p>You could as well use the charactergroup <code>\w</code> which usually is pretty much equivalent to <code>[a-zA-Z0-9]</code> but that might contain several characters (ASCII <> UTF) you might not want to have.</p> |
27,465,985 | 0 | Accessing Output From C# Code <p>I am running this code in C# in VS2013 which I got from here: <a href="http://tda.codeplex.com/" rel="nofollow">http://tda.codeplex.com/</a>. The code is supposed to gather data from my TD Ameritrade 401k account. The code is running fine but where is the outputted data from the code be... |
30,647,476 | 0 | Extracting specific registry key from REG QUERY based on search string <p>I am trying to extract the key value of a registry entry. I only want the key which I have been trying to concatenate using FOR /F, however had no luck.</p> <p><strong>Eg: the command</strong></p> <p>REG QUERY HKEY_LOCAL_MACHINE\SOFTWARE\Microsof... |
34,001,277 | 0 | pip install in Cygwin cannot find file error <p>I am on a Mac OS El Capitan, running a Windows 10 64-bit VM inside Parallels. I have Cygwin installed and Anaconda3. I would like to install two packages (pyrsistent and rpy2) using pip. Both of them throw an error "error: [WinError 2] The system cannot find the file spec... |
40,115,021 | 0 | <p>I followed the <a href="http://support.sas.com/kb/53/105.html" rel="nofollow">support link</a> you provided, which states the following:</p> <blockquote> <p>With SAS® 9.3, the following message occurs in your SAS log when you use aliases for the value of SMTP MAIL FROM:email address and your SMTP server does not su... |
23,093,858 | 0 | <ul> <li><p>You could expose an event on your mediator so it notifies all listeners (eg your second VM) that its values have changed. .NET has a standard way of doing this: you could implement the <code>INotifyPropertyChanged</code><br> interface:<br> <a href="http://msdn.microsoft.com/en-us/library/vstudio/system.com... |
17,452,084 | 0 | <p>Very good question.</p> <p><strong>Event handlers are executed in order of initialization.</strong></p> <p>I haven't really thought about this before, because my handlers never needed to know which one run first, but by the look of you fiddle I can see that the handlers are called in the same order in which they ar... |
29,145,198 | 0 | Error while implementing XSSF example <p>I want to read large Excel files (.xlsx) with java. Apache has an example how to go this <a href="http://poi.apache.org/spreadsheet/how-to.html#xssf_sax_api" rel="nofollow">here</a>. So I just copied the whole class, added the path to my .xlsx file and tried to execute it but I ... |
7,856,401 | 0 | TTLauncherView move item to other page <p>I have a TTLauncherView in my ios app. I have allowed users to edit and move their items around, however it does not appear that you can move the item from one screen to another, does anyone know how to do this?</p> |
7,368,750 | 0 | How to set the cursor position at the end of a string in a text field using jQuery? <p>I am using jQuery 1.6 and I have a text field for which I would like the cursor to be positioned at the end of the string\text after the field receives focus. Is there a trivial or easy to do this?</p> <p>At this time I am using the ... |
40,261,458 | 0 | <p>Can u try to rename the file to log4j.properties and also </p> <pre><code>log4j.rootLogger=DEBUG,ERROR stdout, file </code></pre> <p>line should have either debug or error not both</p> |
5,248,219 | 0 | about number of bits required for Fibonacci number <p>I am reading a algorithms book by S.DasGupta. Following is text snippet from the text regarding number of bits required for nth Fibonacci number.</p> <blockquote> <p>It is reasonable to treat addition as a single computer step if small numbers are being added, 32-bi... |
31,710,546 | 0 | Responsive divs without using flexbox <p>I'm working on a chat interface at the moment and currently have the viewport height to 100vh, with a header/navbar, a "main content" section, and the footer where the input field is located - (see fiddle <a href="http://jsfiddle.net/2L8q3r5h/15/" rel="nofollow">here</a>)</p> <p... |
26,466,621 | 1 | AttributeError: 'int' object has no attribute 'rindex' <p><strong>Setup</strong></p> <p>I'm using Scrapy 0.24.4 and <a href="https://github.com/knockrentals/scrapy-elasticsearch" rel="nofollow">Scrapy-ElasticSearch 0.5</a> to scrape a website and store the results in an elasticsearch instance I have running.</p> <p>I'v... |
36,544,976 | 0 | JQuery not working after null ajax responce <p>I have Jquery code</p> <pre><code>$(document).ready(function(){ $('#login').click( function () { $.post('/profile/ajax/login', { username: $('#username').val(), password: $('#password').val(), }, function (res) { if (res != null) { $.each(res, function (i, val) { $('#login... |
1,142,354 | 0 | <p>If you're talking about large volumes of data (millions of rows+), then you will get have a benefit from using different tables to store them in. </p> <p>e.g. basic example 50 million log entries, assuming 5 different "types" of log table Better to have 5 x 10 million row tables than 1 x 50 million row table </p> <... |
35,327,644 | 0 | <p>It turns out that a naïve approach is fairly easy; the following (<em>complete</em> <code>.travis.yml</code>) works for my purposes:</p> <pre><code>language: R install: - Rscript -e 'install.packages(c("devtools", "testthat"))' - Rscript -e 'devtools::install_github("klmr/modules")' script: make test </code></pre> ... |
36,785,961 | 0 | How to make React Native's ScrollView initial zoom to not be 1? <p>I want to put content (multiple images vertically arranged) in a React Native ScrollView (iOS only for now, Android will come later) that is bigger than the phone's screen, and start zoomed out so that it is all visible at the same time.</p> <p>Are ther... |
10,781,974 | 0 | <p>just use</p> <pre><code>$("#edit_form").validate({ rules: { re_password: { equalTo: "#password" } }, messages: { re_password: { equalTo: "Password does not match" } } }); </code></pre> <p>without use class "required" in input field</p> <pre><code><input id="password" type="password" name="password" class="TextBo... |
34,833,883 | 0 | Configure Solr to index metadata included in seed.txt <p>I am currently running Nutch 1.10 and solr 5.3.1, and I am attempting to crawl and index a few sites. These sites have an id and name associated (on the same line as the url in the seed.txt file) which I would like to be included along side other fields in the so... |
19,217,964 | 0 | <p>For version 2.0</p> <p>create c# code to invoke power shell and execute 1st command for mailbox creation then dispose and write another set of c# code to invoke and execute the Active sync command and dispose.</p> <p>Note: the Domain controller should be the same for mailbox creation and Active sync.</p> |
21,164,297 | 0 | <p>This is how to do it:</p> <p>You need to send a special APDU to ask for the remaining data and look for status 0x61xx cl, ins, p1, p2, = (0x00, 0xa5, 0x00, 0x00)</p> <pre><code>def _cmd_ok(self, *args, **kwargs): data, status = self._cmd(*args, **kwargs) #get high bits low = status & 0xFF; high = status >>... |
33,061,176 | 0 | <p>New in iOS 9, <code>CMSensorRecorder</code>(<a href="https://developer.apple.com/library/prerelease/ios/documentation/CoreMotion/Reference/CMSensorRecorder_class/index.html#//apple_ref/occ/clm/CMSensorRecorder/isAuthorizedForRecording" rel="nofollow">doc link</a>) has a class method to check if your app is authoriz... |
26,104,872 | 0 | Java won't write UTF8 characters in MySQL through a JNDI datasource <p>I have configured JNDI to access a MySQL database with the UTF-8 server charset. My JNDI URL in Tomcat's context file is <code>jdbc:mysql://127.0.0.1:3306/my_db?useUnicode=true&amp;characterEncoding=UTF-8"</code> The database server, the databas... |
7,649,881 | 0 | <p>According to <a href="http://www.php.net/manual/en/function.is-numeric.php">http://www.php.net/manual/en/function.is-numeric.php</a>, is_numeric alows something like "+0123.45e6" or "0xFF". I think this not what you expect.</p> <p>preg_match can be slow, and you can have something like 0000 or 0051.</p> <p>I prefer... |
6,017,290 | 0 | <p>It isn't remembering the last used set on the directory, it's loading the gemset from the <code>.rvmrc</code> file in that directory</p> <p><a href="https://rvm.io/workflow/rvmrc/" rel="nofollow">https://rvm.io/workflow/rvmrc/</a></p> |
15,758,078 | 0 | <p>Performance GET or POST depends on how it is implemented on server side.</p> <p>You should more concerned about RESTful convention here.</p> <p>GET : Retrieve a representation of the entry specified by the url.</p> <p>POST: Create a new entry. </p> <p>Look more <a href="https://en.wikipedia.org/wiki/Representationa... |
16,904,739 | 0 | Canvas not drawing image from spritesheet <p>Ok So I have managed to draw one image that is the player, but Now I am trying to draw an enemy and it just wont work. I have added alerts and it shows that the program is doing the draw enemy function but it still wont draw? </p> <p>Here is the thing running: <a href="http:... |
33,691,557 | 0 | <p>Part of the <code>Type</code> logic is moved to <code>TypeInfo</code>(<a href="https://msdn.microsoft.com/en-us/library/system.reflection.typeinfo(v=vs.110).aspx">MSDN</a>) in Windows Runtime.</p> <pre><code>using System.Reflection; ... bool isSubClassOf = typeof (Dog).GetTypeInfo().IsSubclassOf(typeof (Animal)); <... |
3,474,582 | 0 | <p>The timeout suggested above worked around the issue on Chrome. Not issue existed on IE8 or FF3. Thanks for the tip as always. My code that to set focus that worked is: <code>window.setTimeout(function() { document.form1.password.focus(); },0);</code></p> |
2,172,295 | 0 | <p>See <a href="http://blogs.msdn.com/bimusings/archive/2005/12/14/503648.aspx" rel="nofollow noreferrer">Rendering HTML in Reporting Services Text Boxes in SQL Server 2008</a></p> <p>I've not tried it and may not apply to rdlc etc, so YMMV</p> |
16,510,567 | 0 | <p>Just remove the <code>setContentView(R.layout.activity_main)</code> line in addTextView() method. Because it always sets the layout to the screen.</p> |
10,245,064 | 0 | <p>You can use these rules of thumb to decide what storage model will work for your app.</p> <ul> <li>If the data fits in memory entirely and is relatively unstructured, use plist</li> <li>If the data fits in memory entirely and has tree-like structure, use XML</li> <li>If the data does not fit in memory and has a str... |
36,845,177 | 0 | <p>Using <code>split()</code> without parameters will result in splitting after a space example <code>"test1 test2".split()</code> results in <code>["test1", "test2"]</code></p> <p>instead, try this:</p> <pre><code>newLine = line.split("|") </code></pre> |
31,023,958 | 0 | <p><code>m.Attributes</code> can consist of a combination of some flag values, and <code>FileAttributes.Hidden</code> is one of them.(The complete list can be seen in <a href="https://msdn.microsoft.com/en-US/library/system.io.fileattributes.aspx" rel="nofollow">MSDN</a>)</p> <p>So, the predicate of the first statemen... |
6,942,014 | 0 | <p>There is a blog post about using activity indicators here: <a href="http://www.edumobile.org/iphone/iphone-programming-tutorials/use-activityindicator-in-iphone/" rel="nofollow">http://www.edumobile.org/iphone/iphone-programming-tutorials/use-activityindicator-in-iphone/</a></p> <p>The most important pieces of code... |
13,795,380 | 0 | Rails find by condition <p>Just wondering if there is any function that allows to do that:</p> <pre> MyModel.find_by_conditon(method_a - method_b > 0)</pre> <p> <code>MyModel.class</code></p> <pre> def method_a next_service_date.to_i end def method_b last_service_date.to_i end </pre> <pre> def next_service_date service... |
10,195,868 | 0 | Inserting value into an array using key value <p>I have already fetched both key and value in array.how can I insert that value into another array in the same key position using that fetched key value.</p> <p>Here my coding </p> <pre><code>$key=array_search($s_str,$opis_split); //key value $value=a; //array value $push... |
19,682,978 | 0 | <p>Maybe this could help? <a href="http://mottie.github.io/tablesorter/docs/example-locale-sort.html" rel="nofollow">jQuery Plugin: Tablesorter</a></p> <p>You may have to modify it slightly if the special character you are using is not supported but it should at least get you started.</p> |
2,289,003 | 0 | <blockquote> <p>So, the "inheritance" of static members merely looks like namespace pollution</p> </blockquote> <p>That's right, except that one guy's pollution is another guy's added spicy flavouring.</p> <p>I think Martin Fowler, in his work on DSLs, has suggested using inheritance in this way to allow convenient ac... |
27,130,355 | 0 | <p>In assumption that you're on a windows pc it sounds like you're experiencing a loop unrolling bug in <a href="https://code.google.com/p/angleproject/" rel="nofollow">ANGLE</a>.</p> <p>To verify this start your browser with <code>--use-gl=desktop</code>. This flag forces your browser to <em>not use</em> the ANGLE Di... |
25,057,174 | 1 | Scrapy crawl in order <p>I can't figure out how to make scrapy crawl links in order I've got a page with articles and in each one there is a title but the article doesn't match the title Also in settings.py I added:</p> <pre><code>DEPTH_PRIORITY = 1 SCHEDULER_DISK_QUEUE = 'scrapy.squeue.PickleFifoDiskQueue' SCHEDULER_M... |
22,996,315 | 0 | <p><code>SpringApplication</code> has a property <code>webEnvironment</code>. It defaults to true if Tomcat is on the classpath but you can set it to false (programmatically or with <code>spring.main.webEnvironment</code>).</p> |
7,573,528 | 0 | Data binding - Visual Studio 2010 <p>I am working with Visual Studio 2010.</p> <p>Scenario:</p> <p>I have 2 comboboxes. Contents of first combobox:</p> <p>PC</p> <p>DB...</p> <p>Contents of Second combobox:</p> <p>Password reset</p> <p>Hardware problem</p> <p>SQL</p> <p>My question:</p> <p>When I select 'PC' in the fir... |
19,697,700 | 0 | How to speed up rbind? <p>I'm supposed to download a table from MS-SQL server.</p> <p>The number of row is larger than 6million. The server cannot return entire data at once.</p> <p>So, I wrote a code that downloads 10,000 rows at a time. and, it binds rows in the loop.</p> <p>Assume that <code>getData()</code> functio... |
8,481,610 | 0 | R - Customizing X Axis Values in Histogram <p>I want to change the values on the x axis in my histogram in R. </p> <p>The computer currently has it set as </p> <pre><code>0, 20, 40, 60, 80, 100. </code></pre> <p>I want the x axis to go by 10 as in: </p> <pre><code>0,10,20,30,40,50,60,70,80,90,100. </code></pre> <p>I kn... |
20,733,107 | 0 | <p>As far as I know , some goals are yet not available with the tomcat7 mojo and <code>mvn tomcat7:list</code> is one of them. <code>mvn tomcat6:list</code> is available for the tomcat6 mojo.</p> |
26,423,414 | 0 | <pre><code>public static int yourFunction(ArrayList<Integer> list){ String numbers = ""; // fill a string with your numbers for(Integer i : list){ numbers += String.valueOf(i); } // could be nicer with java8 lambda function String tmp_numbers; // temporary string needed while(numbers.length() > 2){ tmp_number... |
1,541,941 | 0 | <p>Possible the Handle is not created, you can test this with IsHandleCreated. See <a href="http://stackoverflow.com/questions/1364116/avoiding-the-woes-of-invoke-begininvoke-in-cross-thread-winform-event-handling">this question</a> for numerous issues on IvokeReqired usage. You can see the my own answer was far from ... |
11,216,443 | 0 | <p>You can achieve that by using css overflow-x: auto; please see example <a href="http://jsfiddle.net/Xa8yB/6/" rel="nofollow">http://jsfiddle.net/Xa8yB/6/</a></p> |
19,756,944 | 0 | <p>you can use simply this code:</p> <pre><code>div{ width:100vw; height:100vh; } </code></pre> <p>this code work like a charm... <code>:)</code></p> <p><a href="http://jsfiddle.net/mohsen4887/m3BSk/" rel="nofollow"><strong>jsFiddle</strong></a></p> |
8,782,240 | 0 | <p><em>EDIT - The following will convert UTF-16 with BOM. I don't think it works with any of the other UTF formats. I know it doesn't work for UTF-8. I'm not sure about UTF-32 with BOM</em></p> <pre><code>for %%F in (*.txt) do type "%%F" >"%%~nF.converted" </code></pre> <p>If run from the command line then use sing... |
30,132,413 | 0 | <blockquote> <p>Are these the right schema types for generating the search results snippet shown in the picture?</p> </blockquote> <p>If these are rejected in GWT, then snippets will never appear. If proper <code>schema.org</code> is implemented, then Google may display it if it trusts your site enough and if it <a hr... |
27,733,794 | 0 | QML can't open file dialog <p>I'm trying to create a simple File dialog using the QML:</p> <pre><code>import QtQuick 2.2 import QtQuick.Dialogs 1.0 FileDialog { id: fileDialog title: "Please choose a file" onAccepted: { console.log("You chose: " + fileDialog.fileUrls) Qt.quit() } onRejected: { console.log("Canceled") Q... |
14,507,173 | 0 | Copy TabControl Tab <p>I searched the internet for this but i couldn't find how to do it with C#</p> <p>What i am trying to do is make it so that when i click on my <code>NewTab</code> button, a new tab appears with the same controls that were on the first tab. I saw some information on how to add a <code>UserControl</... |
4,053,417 | 0 | Problem with NSStrings and UIAlertView <p>I have having a very odd issue when utilizing this UIAlertView. When viewing a Physician they have several offices. Upon selecting one you get an alert that offers to call this location or display it on a map. To create the alert and to have data at the ready when the alert is ... |
8,164,576 | 0 | <pre><code>$var = '<a href="http://amazon.com/dp/' . $v . '">http://amazon.com/dp/' . $v.'</a>'; </code></pre> |
18,408,785 | 0 | Fatal error: Cannot use string offset as an array Not making any sense at all <p>I have the fatal error coming up in the error log but it is not affecting the application at all for some reason. This is the code that is running and it makes no sense why it generating the PHP error.</p> <pre><code>for ($i = 1; $i <= ... |
38,501,090 | 0 | How can I debug the source code of .Net Core (not ASP.net Core)? <p>I see that there is a simple solution to enable me to debug ASP.Net Core source Code (<a href="http://stackoverflow.com/a/38450697/6618773">http://stackoverflow.com/a/38450697/6618773</a>). But for me this doesn't work for the .Net Core assemblies from... |
35,646,989 | 0 | <p>On Linux, at least certain versions, <code>st_atime</code> and some other time fields in <code>struct stat</code> are inside <code>struct timespec</code> and contain proper timestamps with full nanosecond precision. On those systems <code>st_atime</code> is a define to something else. On my CentOS machine it is def... |
39,372,636 | 0 | Slow Small Webpack 2 Build - Tree Shaking - Sass - Chunking <p>I've put together a very basic webpack 2 build, but it seems to be slow for the project size. The three things I wanted have were:</p> <ol> <li>Chunking (js & scss)</li> <li>SCSS compiling</li> <li>Tree Shaking</li> </ol> <p>Webpack seemed to be a good ... |
15,093,480 | 0 | <pre><code>function updateObject(object, newValue, path){ var stack = path.split('>'); while(stack.length>1){ object = object[stack.shift()]; } object[stack.shift()] = newValue; } </code></pre> |
12,155,327 | 0 | <ol> <li>Find Ruby installation path. Maybe something like "C:\Ruby193...". There is a bin dir under that.</li> <li>Add the bin dir to your PATH env. </li> </ol> |
33,292,092 | 0 | <p>You can print "test->data" correctly because that's an int. The issue is that "test->left" and "test->right" are pointers, and pointers are basically numbers that refer to where another object is stored.</p> <p>If you wanted to print the left node's data, you'd have to do this:</p> <pre><code>cout << "left: "... |
25,319,584 | 0 | <p>i think it's not a javascript problem but more a server side issue.</p> <p>You should try to add <code>header('Content-Type: application/json');</code> before your echo in your php file</p> |
12,207,419 | 0 | R: How do I use coord_cartesian on facet_grid with free-ranging axis <p>Consider some <code>facet_grid</code> plot</p> <pre><code>mt <- ggplot(mtcars, aes(mpg, wt, colour = factor(cyl))) + geom_point() mt + facet_grid(vs ~ am, scales = "free") </code></pre> <p><img src="http://had.co.nz/ggplot2/graphics/3cece11dd9b5... |
28,318,309 | 0 | Embedding pyqtgraph into tab widget Pyqt <p>I am bit new to Pyqt4 and pyqtgraph. I have tab widget with me and I want to add pyqtgraph into tab widget, so that this graph will be displayed inside (tab1) widget. Can any one tell me how can I do it? where should I add my pyqtgrapgh code in tab widget code. Corresponding ... |
5,042,647 | 0 | <p>I store all data in the database (including last crawl date and post dates) and take all dates I need from database.</p> |
35,851,670 | 0 | <p>Access to a KML file can not be done locally each service based on google it must be made by means of a publicly accessible server on the Internet. it tries to place your file on a server accessible from the internet (there are also free services)</p> <p>this form google maps developer </p> <blockquote> <p>Your fil... |
7,070,626 | 0 | Multiple primary keys with Doctrine 1 and Symfony 1? <p>I already know that's not possible to work with multiple primary keys in Symfony 1 and Doctrine 1, but do you guys know any good workarounds?</p> |
14,108,374 | 0 | The condition doesn't seem to work. (while (dAmount != (2*dbAmount))) Also, the first calculation isn't correct o.O <p>My friend and I are learning C++, and we can't seem to get this program running as it should be. So basically, what we are now attempting, is a tasks that requires us to script a program in which the u... |
3,291,396 | 0 | What is an attached event? <p>I am learning WPF, and I've run into a term called "Attached Event". I have not been able to find a good resource that isn't confusing.</p> <p>Can anyone tell me what an attached event is and what it does?</p> |
5,051,877 | 0 | <p>To return javascript to be executed directly in the client, like the Rails erb.js template, the best method would be to return a JavaScriptResult from the controller method</p> <pre><code>public ActionResult AjaxMethod() { /* do stuff */ return JavaScript(script); </code></pre> <p>}</p> <p><a href="http://msdn.micr... |
35,192,846 | 0 | How to style a WordPress widget area? <p>I registered a couple new widget areas above my content and below entries, and I'm having trouble styling them. The classes are <code>above_content</code> and <code>after_entry</code> but making an <code>.above_content</code> and <code>.after_entry</code> class in my stylesheet ... |
34,956,067 | 0 | <p>Solved by using a different plugin: <a href="http://fengyuanchen.github.io/cropper/" rel="nofollow">http://fengyuanchen.github.io/cropper/</a></p> |
39,008,840 | 0 | <p>when the browser gets smaller you add col-sm-1 and col-xs-1 in to all class.</p> <pre><code> <div class="row wrapper"> <span class="prev-slide col-md-1 col-sm-1 col-xs-1"/> <ul class="tab-container row col-md-10"> <li class="col-md-1 col-sm-1 col-xs-1">Slide 1</li> <li class="col-md... |
16,236,337 | 0 | <p>Create 2 OLE DB Connection Managers. Name them Production and Archive and have them point to the correct servers and database. These CMs are what SSIS uses to push and pull data from the databases.</p> <p>Add a Data Flow Task. A DFT is the executable that will allow row by row manipulation of the data. Double click... |
6,042,564 | 0 | ConfirmationDialog Primefaces <p>..Now I come across a question.</p> <pre><code><tabview> <tab>... </tab> <tab>... </tab> <tab>... </tab> <tab id="p"> <h:form id="qorm"> <h:panelGroup > <p:commandButton value="Save" actionListener="#{...}" update="priorityD... |
22,515,737 | 0 | <p><a href="http://stackoverflow.com/questions/3207219/how-to-list-all-files-of-a-directory-in-python">This</a> will help you to list all the files in the directory. </p> <p>Then for each file, </p> <ol> <li>Iterate thru all the lines</li> <li>See if the current line starts with CONCLUSION:</li> <li>Do a substring on ... |
6,523,827 | 0 | <p>If you want to draw directly on the form, there are many tutorials and examples:</p> <ul> <li><a href="http://msdn.microsoft.com/en-us/library/aa287594%28v=vs.71%29.aspx" rel="nofollow">Code: Drawing Graphics on a Windows Form (Visual C#)</a></li> <li><a href="http://www.techotopia.com/index.php/Drawing_Graphics_in... |
38,899,314 | 0 | Highcharts thinks all dates are 1970-01-01, despite them being valid epoch times <p>I'm working with this simple chart:</p> <p><a href="https://jsfiddle.net/w7uyghqn/2/" rel="nofollow">https://jsfiddle.net/w7uyghqn/2/</a></p> <p>My dates are in the format: <code>Date(1447793679000)</code>, which translates correctly to... |
27,392,894 | 0 | How to find data by dynamic conditions on Rails? <p>I am using Rails 3.2.13 now.</p> <p>I made this method:</p> <pre><code>def search search_conditions = [] search_conditions << ["id = ?", params[:id]] if params[:id] != '' search_conditions << ["name LIKE ?", "%#{params[:name]}%"] if params[:name] != '' @us... |
24,897,853 | 0 | <p>Check again <code>FieldError</code> constructor, according to JavaDocs, 3rd parameter is rejected field value:</p> <pre><code>rejectedValue - the rejected field value </code></pre> <p>The exact part of code which overrides value is in <code>AbstractBindingResult</code> class:</p> <pre><code>public Object getFieldVa... |
18,483,419 | 0 | Selenium sendkeys drops character with Chrome Driver <p>Selenium sendkeys with Chrome Driver drops character "2" and "4". Other characters are OK. When I use other browser (IE or FF), everything is OK.</p> <p>code:</p> <pre><code>WebElement name = driver.findElement(localizator); name.clear(); name.sendKeys("1234567890... |
18,002,992 | 0 | <p>You could try to put it in a document.ready call. And as Samuel Reid pointed out, a hover function is what you need. Like so:</p> <pre><code>$(document).ready(function () { $('.baixo-tudo').find('.botao').each(function (i) { var imge = $('img'); var t = $('.botao'), src1 = t.find('.src1').text(), src2 = t.find('.sr... |
485,780 | 0 | <blockquote> <p>I have heard somewhere that a computer can have multiple IP addresses. I want the one that other programs on different computers can use to connect to the computer.</p> </blockquote> <p>Well... that could be any of them. If a computer has multiple IP addresses it can be accessed on any one of them. Of ... |
28,884,674 | 0 | If statement checking if current date equals string date <p>trying to retrieve users from an ArrayList that string bookingdate equals the current date. my problem is I don't believe I am formatting my if statement correctly. the returned users will then be displayed on a datatable in a xhtml file.</p> <pre><code> publi... |
16,287,000 | 0 | <p>I think the easiest way is to map the id to the name directly where you use it, as follows:</p> <pre><code>svg.selectAll("text") [...] .text( function(d) { return namesMap[d.name]; }); </code></pre> <p>assuming that <code>namesMap</code> converts <code>node_id</code> to <code>node_name</code>.</p> <p>Now you just h... |
10,777,770 | 0 | How can I declare a global require in NodeJS? <blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/5447771/node-js-global-variables">node.js global variables?</a> </p> </blockquote> <p>How can i include a file or a script in node js, that i can access it global. I would l... |
27,337,715 | 0 | how do I create search bar which will update search on typing <p>I created an application with the search on button click. How do I create search bar which will update search on typing letter? Something similar like in a google chrome. I was looking for an answer but I could not find it. Tnx a lot! </p> <p>SearchableDi... |
19,404,880 | 0 | <p>You can't parameteterize table name with PDO and MySQLi prepared statements, because SQL server needs basic information to prepare the query before executing actual query. </p> |
34,741,206 | 0 | <p>Ok, I finally used a piece of code that uses ctypes lib to provide some kind of killing thread function. I know this is not a clean way to proceed but in my case, there are no resources shared by the threads so it shouldn't have any impact ...</p> <p>If it can help, here is the piece of code that can easily be foun... |
4,825,949 | 0 | <p>Set the PuTTY charset to UTF-8 in the options.</p> |
13,789,208 | 0 | <p>Try this, this should work if any of the fields are empty.</p> <pre><code>if (temprature == 0 || methane == 0 || ethane == 0 || propane == 0 || nbutane == 0 || ibutane == 0 || oxygen == 0 || npetane == 0 || ipetane == 0 || nhexane == 0 || nitrogen == 0) { outputText.text = @"Please enter all values"; } else { outpu... |
35,160,883 | 0 | Vagrant is not picking up laravel/homestead box <p>I've downloaded the homestead box manually because of much slow downloading via terminal. But after adding the box, vagrant is not finding it and attempting to download again.</p> <p><a href="https://i.stack.imgur.com/73jRU.jpg" rel="nofollow noreferrer"><img src="http... |
20,370,985 | 0 | <p>As a starting point, use <code>int</code> which is probably native to the architecture and you'll avoid possible implicit conversions when comparing <code>i</code> with other bits and pieces. So my bet is that both <code>byte</code> and <code>short</code> will wind up being <em>slower</em>.</p> <p>A far cuter optim... |
1,887,979 | 0 | <p>In Python, you can use """ (triple-quoted strings) to embed long runs of text data in your program.</p> <p>In your case, however, don't waste time on this.</p> <p>If you have an object you've pickled, you'd be much, much happier dumping that object as Python source and simply including the source.</p> <p>The <code>... |
9,278,626 | 0 | <p>Why Can't you do some thing like below, Just fetch the user inside the closure.</p> <pre><code>Login.withNewSession { def user = grails.admin.User.read(appCtx.springSecurityService.currentUser.id) login = new Login(user: user) } </code></pre> <p>OR </p> <pre><code>Login.withTransaction{ def user = grails.admin.User... |
9,533,408 | 0 | Converting time so it can used in a Integer <p>I'm working on some code in VB that can get the average time from the speed of button press. I've got the maths done however I'm having a problem converting a TimeSpan declaration into a Integer where it can be divided and made into a average. Can you please help. Thanks!<... |
23,344,254 | 0 | <p>[Adding this here since you want a way to do it purely in XAML. I think that insisting on pure XAML here is not essential and @bit's answer is the right way to go, IMO.]</p> <p>You can use style to have triggers that do the change.</p> <p>Let's say your UC is called <code>MyUC</code> and currently you have an insta... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.