pid int64 2.28k 41.1M | label int64 0 1 | text stringlengths 1 28.3k |
|---|---|---|
37,476,824 | 0 | <p>You can set the <strong>NumberFormat</strong> of the cell:</p> <p><code>Range("E" & destRow).NumberFormat = "m/d/yyyy"</code></p> <p><strong>EDIT</strong></p> <p>The value itself <strong>won't</strong> change. You could "cut" the value:</p> <pre><code>Left(Range("E" & destRow).Value, 10) </code></pre> |
9,891,660 | 0 | Struts2 + REST plugin XML output <p>I'm creating a Web Service with the Struts2 REST Plugin, which works great. I just have a problem with the entity names of the XML output.</p> <p>I have a model class named "ModelClass" in the package "com.mycompany.implementation" with a few properties and a nested class "NestedMode... |
1,443,584 | 0 | Is there any Document Management Component (Commercial or Open Source) for .NET? <p>We are building a .NET web application (case management) and one of the requirement it needs to have a Document Management System to store and manage the document and at the same time it can be used out side this application such as int... |
17,218,114 | 0 | Jquery User input into JSON <p>I have a complex form that the user has some selections to make and also a few textareas to fill in with info. The form works great and the data is passed via JSON to my MVC controller and all works fine.</p> <p>However users being users I have found that some are using special chars like... |
38,528,723 | 0 | <p>To handle it in better way, return date in String format from server side with appropriate timezone conversion. In the convert() function of your model, grab the string and return the date value. This will take care of your timezone issues.</p> <p>Example:</p> <pre><code>convert(v){ //Here v is the input string com... |
10,692,864 | 0 | Load UIImage from file using grand central dispatch <p>I'm trying to load images in the background using gcd. My first attempt didn't work:</p> <pre><code>dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_LOW,0), ^{ dispatch_async(dispatch_get_main_queue(), ^{ // create UI Image, add to subview }); }); <... |
3,051,992 | 0 | Compiler warning at C++ template base class <p>I get a compiler warning, that I don't understand in that context. When I compile the "Child.cpp" from the following code. (Don't wonder: I stripped off my class declarations to the bare minimum, so the content will not make much sense, but you will see the problem quicker... |
26,181,981 | 0 | DIDO is a MATLAB optimal control tool for solving general-purpose hybrid optimal control problems. |
8,762,863 | 0 | <p>** This is C# Code ** Hope you can use the logic for PHP **</p> <p>Step #1 – Create a products listing page, for each product add a CheckBox field.</p> <p>Step #2- Create a link “Compare” that has runs a function. Here is a sample:</p> <pre><code>private void funcCompare() { // REMOVED ALL SESSION Session.Remove("a... |
5,229,988 | 0 | Is there any guide lines for AirPlay on iOS <p>I there any guide line for AirPlay on iOS?</p> <p>Any sample code and tutorial is well cone.</p> <p>The only thing I could find is in <a href="http://developer.apple.com/library/prerelease/ios/#releasenotes/General/WhatsNewIniPhoneOS/Articles/iOS4_3.html%23//apple_ref/doc/... |
39,630,787 | 0 | <p>If you script has repeated instructions shorten the script down and use the "play loop" and increase "max" setting how many times you want the script to repeat, i find anything over 10,000 lines begans to stall the script to start longer the script the longer it takes to load into memory</p> |
25,322,918 | 0 | <p>The macros <code>\textup</code>, <code>\AE</code>, and <code>\SS</code> are not part of the default MathJax TeX macros and are not defined in your inline configuration, which is why the rendering in the image has them marked in red. </p> <p>You'll see a more specific error if you remove the <code>noundefined</code>... |
17,497,276 | 0 | RoR: friendly_id unique for user <p>I have a website that has works on the premise:</p> <p><code>example.com/user_id/news/slug-for-article</code></p> <p>By default, I have enabled unique slugs for articles, however I would like to have slugs unique per user, across all users.</p> <p>The non-uniqueness is handled by usi... |
22,356,018 | 0 | <p>try this out:-</p> <p>install <code>ruby-nmap</code> gem</p> <pre><code> gem install ruby-nmap </code></pre> |
945,344 | 0 | <p>Look into <a href="http://msdn.microsoft.com/en-us/library/ms712704(VS.85).aspx" rel="nofollow noreferrer">Multimedia Timers</a>.</p> |
21,654,981 | 0 | How do I add a column that points to another table in a Rails database? <p>Let's say I currently have a table titled "Report" and within Report, there are a bunch of strings, integers, timestamps, etc.</p> <p>Now, I want to somehow be able to see who is currently working on a certain report - all I need are names, but ... |
4,245,544 | 0 | <p>If the problem is "how to locate the field that's above the current field":</p> <p>You need to store your pictureBoxes not (just) as picturebox1 to pictureBox64, but (also) as a two-dimensional array: <code>PictureBox[,] grid = new PictureBox[8,8];</code>. (*)</p> <p>Then you need to find out where that 'current' f... |
564,273 | 0 | <p><strong>Perl</strong></p> <p>I love this language, and I don't want to add things that have already been used, but no one has mentioned this yet, so I'll throw it on the pot. When I used this feature, I found it to be the most horrible experience of my life (and I've worked in assembly language):</p> <ul> <li>The <... |
20,262,609 | 0 | GAE-Development-Server: How to exclude part of the code from beeing checked for restricted classes? <p>I want to try a new Jvm-language (yeti-lang) on app-engine.</p> <p>To have a more rapid development, there is a ServletFilter which in development-mode, watches the yeti-source dir and recompiles the yeti-sources on e... |
21,742,461 | 0 | <p>There's a central confusion here over the word "session". I'm not sure here, but it appears like you may be confusing the <a href="http://docs.sqlalchemy.org/en/latest/orm/session.html">SQLAlchemy Session</a> with a <a href="https://dev.mysql.com/doc/refman/5.1/en/set-statement.html">MySQL @@session</a>, which refe... |
35,662,195 | 0 | <p>My suggestion is:</p> <pre><code>get_foo = re.compile(r'([^\)]*\)?)').findall foo = get_foo(s1) # And so on </code></pre> |
38,945,859 | 0 | <p><strong>SQL INJECTION</strong></p> <p>^ Please Google that! Your code is <em><strong>seriously vulnerable!</strong></em> Your data can be stolen or deleted...</p> <p><strong>You have to sanitize your inputs at least with <a href="https://dev.mysql.com/doc/apis-php/en/apis-php-mysqli.real-escape-string.html" rel="no... |
30,512,313 | 0 | Indexing the last dimension of a 3D array with a 2D integer array <p>I have one 3D <code>data = NxMxD</code> numpy array, and another 2D <code>idx = NxM</code> integer array which values are in the range of <code>[0, D-1]</code>. I want to perform basic updates to each <code>data = NxM</code> entry at the depth given b... |
3,596,523 | 0 | Is it possible to read an LLVM bitcode file into an llvm::Module? <p>I'm writing a compiler with LLVM. Each source file is compiled into an LLVM bitcode file. Eventually the linker links and optimizes all the bitcode files into one final binary.</p> <p>I need a way to read the bitcode files in the compiler in order to ... |
34,647,436 | 0 | <pre><code>.*(=|<|>|!=)\s*(-?\d+|'[^']+') </code></pre> <p><a href="https://regex101.com/r/rX1pW3/1" rel="nofollow">regex101</a></p> |
9,104,335 | 0 | <p>As you requested, to automate this for all items with the class <code>moveID</code>, you could use this:</p> <pre><code>$('.moveID').each(function() { var id = this.id; $(this).removeAttr('id').children().first().attr('id', id); }); </code></pre> |
595,878 | 0 | Link in popup window does not close the window? <p>I have this bit of html code, but when I click the link, it does not close:</p> <pre><code><html> <head> <title></title> </head> <body> <h2>Members Only</h2> <p>You must be a member.</p> <p>Please Sign I... |
26,706,176 | 0 | <p>Create the "child" table to cascade the delete from the referenced "parent" table. Something like this:</p> <pre><code>CREATE TABLE answers ( id SERIAL, question_id int REFERENCES questions(id) ON DELETE CASCADE, ... ); </code></pre> <p>Now, deleting the question records will also delete the referenced answer recor... |
29,186,154 | 0 | Chrome - clicking mailto: links closes websocket connection <p>I'm using the latest stable Chrome, version 41 . I have an open websocket connection on the page and a link to an email address (mailto:***). When the user clicks on the email address the websocket connection is closed. Firefox doesn't have this issue. Do y... |
335,669 | 0 | <p>First, I would review my SQL 2000 code and get to the bottom of why this deadlock is happening. Fixing this may be hiding a bigger problem (Eg. missing index or bad query). </p> <p>Second I would review my architecture to confirm the deadlocking statement really needs to be called that frequently (Does <code>select... |
280,727 | 0 | <p>I don't think it's a good idea to create one class per method. You could instead create a static only methods class, named e.g StringUtils and implement the methods. This way you would call:</p> <p>String lowerCaseString = StringUtils.lowercase( targetString );</p> <p>This would also offer you intellisense help whi... |
33,085,823 | 0 | <p>All the snippets of code access data that has been deleted, which has no defined behavior. Therefore, any further assumption is meaningless and left to the single case. Whether you're accessing a <code>vector</code>, <code>char*</code>, <code>string</code> there's no difference: it's always the same violation.</p> |
9,936,386 | 0 | How to draw into PDF on iOS? <p>I am trying to find a way to allow the user to annotate (i.e. free form drawing) an existing PDF file in iOS, but the only approach that I have found seems extraordinarily cumbersome.</p> <p>The solution is in Monotouch, but I can translate from Objective-C if needed. This will also mean... |
26,542,261 | 0 | Contact form design issue in CSS <p>I'm trying to code the below contact form in HTML&CSS.. The issue is how to make the inputs, textarea and the post button in one container and at by taking in consideration that there is a label for each one (out of the container).</p> <p><img src="https://i.stack.imgur.com/46ShF... |
2,584,307 | 0 | <p>Yes, this is normal. It's not a problem that your test code is longer than your production code.</p> <p>Maybe your test code could be shorter than it is, and maybe not, but in any case you don't want test code to be "clever", and I would argue that after the first time of writing, you don't want to refactor test co... |
32,734,951 | 0 | <p>You are getting it wrong, <a href="https://msdn.microsoft.com/en-us/library/system.linq.enumerable.range(v=vs.100).aspx">Enumerable.Range</a> has second parameter as <code>count</code>, it should be:-</p> <pre><code>if (!Enumerable.Range(settingsAgeFrom, (settingsAgeTo - settingsAgeFrom) + 1) .Contains(age)) </code... |
9,914,065 | 0 | <p>Well, the other answer is probably better, but I wrote this anyway, so I'm posting it:</p> <p>Needs:</p> <pre><code>using System.Text.RegularExpressions; </code></pre> <p>Code: </p> <pre><code>string str = "B82V16814133260"; string[] match = Regex.match(str, @"^([\d\w]+?\w)(\d+)$").Groups; string left = match[1]; s... |
6,685,784 | 0 | <p>As a1ex07 says in a comment, your code looks more like what you would put in <code>operator=</code> than in a copy constructor.</p> <p>First of all, a copy constructor is initializing a brand new object. A check like <code>if (this != &p)</code> doesn't make much sense in a copy constructor; the point you are p... |
30,701,258 | 0 | <p>The createPolygon function needs to return the resulting polygon to GeoXml3 so it can manage it.</p> <pre><code>function addMyPolygon(placemark) { var polygon = geoXml.createPolygon(placemark); google.maps.event.addListener(polygon, 'click', function(event) { var myLatlng = event.latLng; infowindow.setContent("<... |
31,724,510 | 0 | <p>I found the problem, I had specified the index <code>my_index</code> in the server box on sense. Removing this and re-executing the post command as:</p> <pre><code>POST /my_index/_search?scroll=10m&search_type=scan { "query": { "match_all": {}} } </code></pre> <p>and passing the resulting scroll_id as:</p> <pre... |
4,277,726 | 0 | <p>I'm not expecting upvotes... but I wanted to share this: <a href="http://www.multicoreinfo.com/research/papers/whitepapers/MT-Algorithms-Chapter.pdf" rel="nofollow">Multithreaded Algorithms Chapter</a> of the Cormen book.</p> |
38,392,934 | 0 | Dompdf - Chroot cant find file in Directory <p>When i try to load a HTML file which is in my storage Directory of my Laravel Project. I specified the path correctly and the file is there.</p> <p>I tried moving the html file to the root of dompdf in the vendor map but that didn't help. Changing the path of chroot messes... |
8,924,602 | 0 | Injected JavaScript function not executing <p>As part of an XSS flaw I'm trying to demonstrate to a client, I'm trying to inject some JavaScript that will </p> <ol> <li>retrieve a webpage,</li> <li>edit the source of that webpage, and</li> <li>spawn an iframe with the new source.</li> </ol> <p>Here is the code that I h... |
30,604,353 | 0 | <p>Sometimes this problem happens when you <strong>don´t make any calls to some of Pygames <em>event queue functions</em> in each frame</strong> of your game, as the <a href="http://www.pygame.org/docs" rel="nofollow">Documentation</a> states.</p> <p><strong>If you are not using any other event functions</strong> in y... |
35,613,011 | 0 | The code below automatically fires notification on onCreate of MainActivity. I want to fire it only at set time which is at 17:10:00 <p><strong>This is MainActivity.class</strong></p> <pre><code>import android.app.Activity; import android.app.AlarmManager; import android.app.PendingIntent; import android.content.Contex... |
26,409,494 | 0 | <p>I did something similar recently.</p> <p><div class="snippet" data-lang="js" data-hide="false"> <div class="snippet-code"> <pre class="snippet-code-css lang-css prettyprint-override"><code>.progressbar { margin-top: 40px; margin-bottom: 30px; overflow: hidden; counter-reset: step; } .progressbar li { list-style-typ... |
24,066,737 | 0 | <p>In javascript your redirect using <code>window.location.href</code>:</p> <pre><code>$('#start_session').click(function() { $('#message').load('start_session.php', function() { window.location.href = 'page2.php'; }); }); </code></pre> <p>And you should redirect when you have processed your php so I put it in the cal... |
36,658,591 | 0 | Is there a way to display webdriver instance on iframe site <p>I'm stuck on how can I open the instance of webdriver on my html page using java.</p> <pre><code>WebDriver driver = new ChromeDriver(); // Open the Application </code></pre> <p>the code below open the instance of driver chrome.</p> |
36,631,453 | 0 | Eclipse Mars - one specific file will not open in compare editor? <p>All of the sudden last week, a single javascript file will no longer open in the compare editor.</p> <ul> <li>I am running the latest Mars Eclipse</li> <li>I am running the latest Subclipse</li> <li>I sync with the repo, and see the changed file</li> ... |
35,066,552 | 0 | <p>You don't really need the absolute url. Correct relative url is fine.</p> <p>You should use the <code>Url.Action</code> helper method to generate the correct relative path to your action method. This will generated the proper path irrespective of your current page/view.</p> <pre><code>url: "@Url.Action("ActionMetho... |
1,367,070 | 0 | Difference between Delegate.Invoke and Delegate() <pre><code>delegate void DelegateTest(); DelegateTest delTest; </code></pre> <p>Whats the difference between calling <code>delTest.Invoke()</code> and <code>delTest()</code>? Both would execute the delegate on the current thread, right?</p> |
28,800,060 | 0 | <p>if i got you right...</p> <p>JQuery:</p> <pre><code>$(document).ready(function(){ var ParentWidth = $('.parent').width(); if (ParentWidth > 400) { $('.parent').addClass('newstyle'); } }); </code></pre> <p>CSS:</p> <pre><code>.newstyle { background: red; /*** add more css ***/ } </code></pre> <p>i Recommends you ... |
33,896,449 | 0 | <p>Governance is a way to limit script execution to avoid the overcomsuption of resources server side, as metioned in the documentation:</p> <p><a href="https://netsuite.custhelp.com/app/answers/detail/a_id/10492" rel="nofollow">SuiteScript</a> </p> <p><a href="https://netsuite.custhelp.com/app/answers/detail/a_id/103... |
39,388,179 | 0 | <p>Google allow you to create a custom GVRView which doesn't have the (i) icon - but it involves creating your own OpenGL code for viewing the video.</p> <p>A hack working on v0.9.0 is to find an instance of QTMButton:</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">... |
29,020,353 | 0 | <p>We this for over at <a href="http://github.com/tryghost/ghost">Ghost</a>. Use ember-cli to generate an in-repo-addon for yourself, and then use your favorite library for copying the file (I already had fs-extra and am using it)</p> <p>Create your addon with <code>ember g in-repo-addon <addon-name></code></p> ... |
12,875,641 | 0 | <p>This should work:</p> <pre><code>function removeDups() { var container = document.getElementById("success"); var a = container.getElementsByTagName("a"); var hrefs = {}; for (var i = 0; i < a.length; i++) { if (a[i].href in hrefs) { a[i].parentNode.removeChild(a[i]); } else { hrefs[a[i].href] = 1; } } } </code><... |
20,959,928 | 0 | <p>You did not define the label <code>playerRollingForHit</code>... at least not in the code you are showing. This is a problem.</p> <p>As was pointed out by others, not having an idea of code structure is a much bigger problem. A <code>GoTo</code> statement, while legal should be used sparingly. And you should consid... |
4,701,510 | 0 | android: listActivity under Tab <p>Sorry if this is a repeat, none of the solutions I found online worked for me.</p> <p>I have 2 tabs, and I'm trying to add a list unto one of the tabs. Here's the code:</p> <pre><code>public class Library extends ListActivity { ParsingDBHelper mDbHelper; ListView lv; @Override public ... |
14,556,463 | 0 | <p>If you want to delete any commit then you might need to use git rebase command</p> <p>git rebase -i HEAD~2</p> <p>it will show you last 2 commit messages, if you delete the commit message and save that file deleted commit will automatically disappear...</p> |
27,060,810 | 0 | Apache proxypass and multilingual domains <p>I have a website on domain.com which has multilingual content in URLs e.g.:</p> <ul> <li>domain.com/en for english</li> <li>domain.com/de for german</li> <li>domain.com/it for italian</li> </ul> <p>etc. These are not really directories - these are just rewrites that rewrite ... |
4,312,981 | 0 | <p>The <a href="https://developer.mozilla.org/en/Gecko_DOM_Reference" rel="nofollow">Gecko DOM Reference</a> is pretty complete.</p> <p>For the dark side (IE-specific stuff), there's also Microsoft's <a href="http://msdn.microsoft.com/en-us/library/ms533050%28VS.85%29.aspx" rel="nofollow">HTML and DHTML Reference</a><... |
1,279,656 | 0 | Cocoa/Objective-C: how much optimization should I do myself? <p>I recently found myself writing a piece of code that executed a Core Data fetch, then allocated two mutable arrays with the initial capacity being equal to the number of results returned from the fetch:</p> <pre><code>// Have some existing context, request... |
35,760,975 | 0 | <p>The best way to coordinate multiple asynchronous operation is to use promises. So, if this were my code, I would change or wrap <code>saveImageToLocalTo()</code> and <code>Posts.insert()</code> to return promises and then use promise features for coordinating them. If you're going to be writing much node.js code, I... |
13,639,858 | 0 | <p>You could use something like this</p> <pre><code>$(function() { $('label').each(function() { var radio = $(this).prop('for'); $(this).prop('title',$('#' + radio).prop('title')); }); }); </code></pre> <p> All that it relies on is jQuery and the for attribute for each label is correct.</p> |
17,153,661 | 0 | <p>To exit the function stack without exiting shell one can use the command:</p> <pre><code>kill -INT $$ </code></pre> <p>As <a href="http://stackoverflow.com/users/1276280/pizza">pizza</a> stated, this is like pressing Ctrl-C, which will stop the current script from running and drop you down to the command prompt.</p... |
4,229,153 | 0 | Making an Alarm Clock with multiple alarm times <p>I am trying to make a programmable alarm clock. It should output a melody (.wav) at different moments of time. I used a usercontrol to make a digital clock. I have a timer for showing a progressbar to every second and a button that starts the process. I know exactly th... |
30,437,523 | 0 | <p>Easy way to solve this issue:</p> <pre><code>var d = new Date(); d.setMinutes (d.getMinutes() + 60); d.setMinutes (0); </code></pre> |
35,887,372 | 0 | <pre><code>def buildNR(nr): return 'http://file.server.com/content.asp?H=cat1&NR={}&T=abc'.format(nr) for line in csv.read(): nr = extract_nr(line) download_file(buildNR(nr)) </code></pre> <p>Just read the csv file and extrace the <code>NR</code> field.</p> |
3,166,526 | 0 | <p>Some Points which should be true for most IDEs:</p> <ul> <li>automated generation of build scripts</li> <li>highligting of compiler errors and warnings in the source</li> <li>integration with source control svn, git, ... (subversion, egit, ...)</li> <li>code completion</li> <li>debugging</li> <li>other things (plug... |
16,628,523 | 0 | AppDomain.CurrentDomain.BaseDirectory changes according to the app's target platform <p>I have this path set up as the path to the root dir of the application.<br> It worked perfectly until I decided to change my <code>System.Data.SQLite.dll</code> lib and my application to 32bit instead of 64bit (which I initially cha... |
11,783,391 | 0 | <p>It should work.</p> <p>Here's how</p> <pre><code>$ echo Helloabtb | perl -0777pe 's/a/x/g' Helloxbtb $ myvar=`echo Helloabtb | perl -0777pe 's/a/x/g'` $ echo $myvar Helloxbtb </code></pre> <p>So if it works with <code>echo</code> it should work with <code>cat</code>. I suggest using backticks as shown above in my e... |
13,601,342 | 0 | plot matlab function handle that outputs vector <p>So I have a matlab function I wrote that takes in a number and returns an array of numbers (transposed). I need to plot this function. I was trying to use fplot but it was giving me errors:</p> <pre><code>Error in fplot (line 105) x = xmin+minstep; y(2,:) = feval(fun,x... |
9,041,967 | 0 | <p>I think you need to use an adorner for a customized border. Create an adorner class that implements the OnRender to draw the chamfered corner. Then attach the adorner to the ellipse's adorner layer.</p> <pre><code>layer = AdornerLayer.GetAdornerLayer(myEllipse) layer.Add(New ChamferedAdorner(myEllipse)) </code></pr... |
14,750,314 | 0 | How to change data type of columns without dropping it <pre><code>CREATE TABLE DEPARTMENT( DEPARTMENT_NAME VARCHAR(25) NOT NULL PRIMARY KEY , BUDGET_CODE INT NOT NULL, OFFICE_NUM INT NOT NULL, PHONE NUMERIC NOT NULL , ); </code></pre> <p>I have this table that I am creating but i want to change budget code and office n... |
23,259,344 | 0 | How to get private variable from I18n yii? <p>I have a problem with multi languages from yii.</p> <p>I want the admin be able to add any languages to my system.</p> <p>Therefore I need get all country and region code languages from <code>i18n</code> <code>yii</code>.</p> <p>That means I will display a dropdown list. It... |
899,839 | 0 | <p>The canonical way is to create an IBAction and hook it up to the touchUpInside event in InterfaceBuilder.app.</p> <p>Everything time a touchUpInside happens, your IBAction will be called.</p> <p>If you are creating programmatically, outside of IB, you can still hook up the IBAction.</p> |
33,421,480 | 0 | <p>Google just deprecated the need for the #! scheme.</p> <p><a href="http://googlewebmastercentral.blogspot.com/2015/10/deprecating-our-ajax-crawling-scheme.html" rel="nofollow">http://googlewebmastercentral.blogspot.com/2015/10/deprecating-our-ajax-crawling-scheme.html</a></p> <p>They state: </p> <blockquote> <p>Tod... |
4,119,323 | 0 | <p>Have you set your DB set to Trusrtworth ON and enabled clr?</p> <p>Try this</p> <pre><code>sp_configure 'clr enabled', 1 GO RECONFIGURE GO ALTER DATABASE [YourDatabase] SET TRUSTWORTHY ON GO </code></pre> <p>I have a guide <a href="http://anyrest.wordpress.com/2010/09/06/execute-stored-procedures-in-parallel/" rel=... |
9,564,683 | 0 | <p>Looking at the code, the default seek for block devices is in <code>fs/block_dev.c</code>:</p> <pre><code>static loff_t block_llseek(struct file *file, loff_t offset, int origin) { struct inode *bd_inode = file->f_mapping->host; loff_t size; loff_t retval; mutex_lock(&bd_inode->i_mutex); size = i_size_... |
27,521,806 | 0 | How to dismiss programmatically created UIView when user taps on any part of iPhone screen <p>I am working on an app where a popup view is created programatically. Now requirement is when user taps somewhere else than that popview, I want to remove that view from superview.</p> <p>Below is my code for creating view</p>... |
14,590,175 | 0 | <p>You have to trim the last colon to align with java's zone info format of <code>"-0600"</code>. </p> <p>Try this:</p> <pre><code>String str = "2013-01-17T00:00:00-06:00"; new SimpleDataFormat("yyyy-MM-dd'T'hh:mm:ssZ").parse(str.replaceAll(":(..)$", "$1")); </code></pre> |
34,712,258 | 0 | <p>The add function returns a boolean which you can check to determine if the item was already in the Set. This is of course based on your needs and isn't a best practice. Its good to know that it will not remove an item that is already there so it can't be depended on to update the existing value with new information... |
28,843,800 | 0 | thrift - address already in use <p>I use Ubuntu 14.04 LTS. Here is an example code which works:</p> <pre><code>boost::shared_ptr<TestHandler> handler(new TestHandler()); boost::shared_ptr<TProcessor> processor(new TestProcessor(handler)); boost::shared_ptr<TServerTransport> serverTransport(new TServer... |
16,310,394 | 0 | CSS rollover image <p>I would like the top half of this image to display by default, and then use some CSS to make the image shift upward so that the bottom half shows when the mouse hovers over it. Here is the code and what I've tried, but it is not working. Can anyone help me make this code work?</p> <p>HTML:</p> <pr... |
20,674,738 | 0 | How to use typename in c++? <p>I have read the book named C++ primer and I don't understand the following code:</p> <pre><code>typedef typename std::vector<int>::size_type size_type; </code></pre> <p>Could you help me explain the use of <code>typename</code> here?</p> |
18,965,975 | 0 | <p>You could get rid of columns with<code>None</code>in them like this (in either Python 2.7 or 3+):</p> <pre><code>from __future__ import print_function try: from itertools import izip except ImportError: izip = zip ra = [0, 1, 2, float('nan'), 8 , 3, 8, 5] ma = [3, float('nan'), 5, 8, 9, 6, 4, 10] op = [7, None, 7, ... |
12,757,460 | 0 | <p>When you run <code>git push heroku master</code> 'heroku' identifies the remote repository you are pushing to. In your case 'heroku' seems to be a reference to your production server. Similarly you probably have an 'origin' remote pointing to github.</p> <p>If you list your git remotes you'll probably see something... |
16,644,830 | 0 | <p>Try enclosing them in back-ticks like </p> <pre><code>ORDER BY `Full Name` ASC </code></pre> <p>HTH</p> |
35,999,918 | 0 | <p>I think, if you delte the position: absolute; on the #nav-wrapper{} it is no more overlapping.<a href="https://i.stack.imgur.com/2My4Z.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2My4Z.png" alt="solution?"></a></p> |
30,827,203 | 0 | <p>If you are using the <a href="https://developers.google.com/maps/documentation/distancematrix/" rel="nofollow">Google Maps Distance Matrix API</a>, there is another field in the <code>distance</code> object called <code>value</code> that has a Number value. As documented in the API, the units is metres.</p> <p>But ... |
9,378,560 | 0 | <p>you should be able to use <a href="https://github.com/mootools/mootools-core/blob/master/Source/Types/Array.js#L120" rel="nofollow"><code>Array.erase</code></a> w/o any problems.</p> <p>change your remove method to:</p> <pre><code>remove: function () { this.targetElement.destroy(); Array.erase(Tags.tags, this); // ... |
4,512,892 | 0 | <p>Have you tried turning <code>Viewstate</code> off in your <code>UserControl</code>? If you're building the markup using a <code>StringBuilder</code>, then there will not be any <code>Viewstate</code> transferred back and forth for any of that markup. If you're using default ASP web controls, they will default to ha... |
6,662,565 | 0 | <p>Why have you declared val and dpayment as strings? If you want them to be numeric types then change the variable declaration and remove the ToString, i.e.</p> <pre><code>int val; double dpayment; dpayment = Convert.ToDouble(dt.Rows[1]["monthlyamount"]); val= Convert.ToInt32( dt.Rows[3]["value"]); </code></pre> |
5,467,038 | 0 | Adding 3rd party jars to WEB-INF/lib automatically using Eclipse/Tomcat <p>I have a dynamic-web project set up on Eclipse and I'm using Tomcat 7 as my web server. It doesn't seem to be automatically putting 3rd party JARs I add to my library on my build path into the WEB-INF/lib folder. Is there a way I can do this aut... |
12,699,006 | 0 | <p>Solved similar case a few times. It's very difficult (I call it lucky) to find solution in complicated app just from your session logging. (Oracle kills one of these sessions. One is killed and the other one lives on happily)</p> <p>Best solution is to ask your DBA (or if you have access to your oracle instalation,... |
29,700,784 | 0 | <p>Verify that the following line exists in your <code>page.tpl.php</code>:</p> <pre><code><?php print render($page['sidebar_second']);?> </code></pre> |
11,525,854 | 0 | How to correctly grab and replace selected text in JavaScript? <p>Here is code: </p> <pre><code>var selection; var edited_selection; var value; var string; $("#text").select(function(){ // $("#text") is textarea value = $("#text").val(); selection = window.getSelection(); string = selection.toString(); }); $("#bold").c... |
29,849,985 | 0 | <p>You can use Adobe Flash extension called 'Swiffy' so you can export Flash content as HTML5. Later on you can make it SCORM compatible.</p> <p>edit: up to 2MB if I'm not wrong.</p> |
1,176,932 | 0 | <p>CLR does not allow multiple inheritance, which is precisely what you're trying to express. You want <code>T</code> to be <code>Address</code>, <code>Email</code> an <code>Phone</code> at the same time (I assume those are class names). Thus is impossible. What's event more, this whole method makes no sense. You'll e... |
31,177,507 | 0 | <p>what about commit. Is autocommit on?</p> <p>or add 'commit' after your insert statement</p> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.